@flarehr/apollo-super-selection 3.51.59881 → 3.54.61365
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/apollo-super-selection/apollo-super-selection.css +1 -0
- package/dist/lib/apollo-super-selection/apollo-super-selection.esm.js +1 -1
- package/dist/lib/apollo-super-selection/apollo-super-selection.js +1 -1
- package/dist/lib/apollo-super-selection/assets/icon-check.svg +3 -0
- package/dist/lib/apollo-super-selection/assets/icon-exclamation.svg +3 -0
- package/dist/lib/apollo-super-selection/assets/icon-information-circle.svg +3 -0
- package/dist/lib/apollo-super-selection/p-03373b03.system.js +1 -0
- package/dist/lib/apollo-super-selection/p-14885f78.system.js +15 -0
- package/dist/lib/apollo-super-selection/{p-381262c1.system.js → p-15f0e5eb.system.js} +1 -1
- package/dist/lib/apollo-super-selection/p-29c11183.js +15 -0
- package/dist/lib/apollo-super-selection/p-37369ee1.system.entry.js +69 -0
- package/dist/lib/apollo-super-selection/p-52c08b79.entry.js +14 -0
- package/dist/lib/apollo-super-selection/p-86e3e03f.js +1 -0
- package/dist/lib/cjs/apollo-super-selection.cjs.js +3 -4
- package/dist/lib/cjs/{app-globals-45007120.js → app-globals-b1125d8c.js} +1 -1
- package/dist/lib/cjs/{datorama-akita-7f4b082a.js → datorama-akita-6c9cb8fb.js} +1005 -68
- package/dist/lib/cjs/loader.cjs.js +3 -4
- package/dist/lib/cjs/{fl-button_31.cjs.entry.js → sss-button_28.cjs.entry.js} +2096 -2162
- package/dist/lib/collection/apollo-super-selection.css +1 -0
- package/dist/lib/collection/collection-manifest.json +16 -28
- package/dist/lib/collection/components/app-host/loading-page.js +3 -3
- package/dist/lib/collection/components/app-host/super-selection-app-host.css +0 -4
- package/dist/lib/collection/components/app-host/super-selection-app-host.js +7 -19
- package/dist/lib/collection/components/super-selection-app/api/super-selection.api.dto.js +69 -1
- package/dist/lib/collection/components/super-selection-app/api/super-selection.api.js +9 -3
- package/dist/lib/collection/components/super-selection-app/app-state-pages/success.js +16 -21
- package/dist/lib/collection/components/super-selection-app/assets/icon-check.svg +3 -0
- package/dist/lib/collection/components/super-selection-app/assets/icon-exclamation.svg +3 -0
- package/dist/lib/collection/components/super-selection-app/assets/icon-information-circle.svg +3 -0
- package/dist/lib/collection/components/super-selection-app/consent/consent.js +57 -0
- package/dist/lib/collection/components/super-selection-app/existing-choice/existing-choice.js +131 -0
- package/dist/lib/collection/components/super-selection-app/footer-section/footer-section.js +6 -18
- package/dist/lib/collection/components/super-selection-app/funds/constants.js +50 -0
- package/dist/lib/collection/components/super-selection-app/funds/custom-fund/custom-fund.js +32 -16
- package/dist/lib/collection/components/super-selection-app/funds/custom-fund/custom-fund.store.js +10 -14
- package/dist/lib/collection/components/super-selection-app/funds/custom-fund/default-fund/default-fund.js +36 -45
- package/dist/lib/collection/components/super-selection-app/funds/custom-fund/my-own-fund/my-own-fund-inputs.js +40 -19
- package/dist/lib/collection/components/super-selection-app/funds/custom-fund/my-own-fund/my-own-fund.js +45 -40
- package/dist/lib/collection/components/super-selection-app/funds/custom-fund/self-managed-fund/self-managed-fund-inputs.js +104 -58
- package/dist/lib/collection/components/super-selection-app/funds/custom-fund/self-managed-fund/self-managed-fund.js +53 -49
- package/dist/lib/collection/components/super-selection-app/funds/custom-fund/self-managed-fund/self-managed-not-supported.js +6 -16
- package/dist/lib/collection/components/super-selection-app/funds/promoted-fund/promoted-fund-join-page.js +1 -1
- package/dist/lib/collection/components/super-selection-app/funds/promoted-fund/promoted-fund.store.js +1 -4
- package/dist/lib/collection/components/super-selection-app/funds/promoted-fund/services/promoted-fund-join-iframe-builder.js +10 -4
- package/dist/lib/collection/components/super-selection-app/funds/slate-super/services/slate-iframe-builder.js +13 -4
- package/dist/lib/collection/components/super-selection-app/funds/slate-super/slate-join-page.js +2 -3
- package/dist/lib/collection/components/super-selection-app/header-section/header-section.js +28 -0
- package/dist/lib/collection/components/super-selection-app/misc/button.js +146 -0
- package/dist/lib/collection/components/super-selection-app/misc/dropdown-async.css +7 -0
- package/dist/lib/collection/components/super-selection-app/misc/dropdown-async.js +359 -0
- package/dist/lib/collection/components/super-selection-app/misc/loading-indicator.js +52 -0
- package/dist/lib/collection/components/super-selection-app/services/australian-fund-lookup.service.js +8 -4
- package/dist/lib/collection/components/super-selection-app/services/event-tracking.service.js +20 -0
- package/dist/lib/collection/components/super-selection-app/services/existing-super-choice-info.service.js +95 -0
- package/dist/lib/collection/components/super-selection-app/services/navigation.service.js +8 -0
- package/dist/lib/collection/components/super-selection-app/services/super-selection-app.routes.js +6 -4
- package/dist/lib/collection/components/super-selection-app/standard-choice/standard-choice-form.js +69 -34
- package/dist/lib/collection/components/super-selection-app/standard-choice/standard-choice-form.store.js +10 -0
- package/dist/lib/collection/components/super-selection-app/super-choice-page/super-choice-item/super-choice-item-bottom.js +94 -0
- package/dist/lib/collection/components/super-selection-app/super-choice-page/super-choice-item/super-choice-item-top.js +89 -0
- package/dist/lib/collection/components/super-selection-app/super-choice-page/super-choice-page.js +67 -90
- package/dist/lib/collection/components/super-selection-app/super-selection-app.css +16 -4
- package/dist/lib/collection/components/super-selection-app/super-selection-app.js +54 -11
- package/dist/lib/esm/apollo-super-selection.js +3 -4
- package/dist/lib/esm/{app-globals-7ac1ffba.js → app-globals-c1f89805.js} +1 -1
- package/dist/lib/esm/{datorama-akita-79ce4385.js → datorama-akita-127aea91.js} +960 -28
- package/dist/lib/esm/loader.js +3 -4
- package/dist/lib/esm/{fl-button_31.entry.js → sss-button_28.entry.js} +2083 -2146
- package/dist/lib/esm-es5/apollo-super-selection.js +1 -1
- package/dist/lib/esm-es5/{app-globals-7ac1ffba.js → app-globals-c1f89805.js} +1 -1
- package/dist/lib/esm-es5/datorama-akita-127aea91.js +15 -0
- package/dist/lib/esm-es5/loader.js +1 -1
- package/dist/lib/esm-es5/sss-button_28.entry.js +69 -0
- package/dist/lib/types/components/app-host/super-selection-app-host.d.ts +0 -3
- package/dist/lib/types/components/super-selection-app/api/super-selection-events.model.d.ts +30 -0
- package/dist/lib/types/components/super-selection-app/api/super-selection.api.d.ts +2 -1
- package/dist/lib/types/components/super-selection-app/api/super-selection.api.dto.d.ts +19 -4
- package/dist/lib/types/components/super-selection-app/consent/consent.d.ts +9 -0
- package/dist/lib/types/components/super-selection-app/existing-choice/existing-choice.d.ts +12 -0
- package/dist/lib/types/components/super-selection-app/footer-section/footer-section.d.ts +0 -1
- package/dist/lib/types/components/super-selection-app/funds/constants.d.ts +3 -0
- package/dist/lib/types/components/super-selection-app/funds/custom-fund/custom-fund.d.ts +1 -1
- package/dist/lib/types/components/super-selection-app/funds/custom-fund/custom-fund.store.d.ts +4 -6
- package/dist/lib/types/components/super-selection-app/funds/custom-fund/default-fund/default-fund.d.ts +0 -2
- package/dist/lib/types/components/super-selection-app/funds/custom-fund/my-own-fund/my-own-fund-inputs.d.ts +2 -1
- package/dist/lib/types/components/super-selection-app/funds/custom-fund/my-own-fund/my-own-fund.d.ts +1 -0
- package/dist/lib/types/components/super-selection-app/funds/custom-fund/self-managed-fund/self-managed-fund-inputs.d.ts +7 -0
- package/dist/lib/types/components/super-selection-app/funds/custom-fund/self-managed-fund/self-managed-fund.d.ts +1 -0
- package/dist/lib/types/components/super-selection-app/funds/custom-fund/self-managed-fund/self-managed-fund.form.d.ts +0 -1
- package/dist/lib/types/components/super-selection-app/funds/promoted-fund/promoted-fund.store.d.ts +0 -3
- package/dist/lib/types/components/super-selection-app/header-section/header-section.d.ts +4 -0
- package/dist/lib/types/components/super-selection-app/misc/button.d.ts +11 -0
- package/dist/lib/types/components/super-selection-app/misc/dropdown-async.d.ts +44 -0
- package/dist/lib/types/components/super-selection-app/misc/loading-indicator.d.ts +5 -0
- package/dist/lib/types/components/super-selection-app/services/australian-fund-lookup.service.d.ts +1 -0
- package/dist/lib/types/components/super-selection-app/services/event-tracking.service.d.ts +4 -0
- package/dist/lib/types/components/super-selection-app/services/existing-super-choice-info.service.d.ts +51 -0
- package/dist/lib/types/components/super-selection-app/services/navigation.service.d.ts +6 -0
- package/dist/lib/types/components/super-selection-app/services/super-selection-app.routes.d.ts +3 -2
- package/dist/lib/types/components/super-selection-app/standard-choice/standard-choice-form.d.ts +6 -3
- package/dist/lib/types/components/super-selection-app/standard-choice/standard-choice-form.store.d.ts +8 -0
- package/dist/lib/types/components/super-selection-app/super-choice-page/super-choice-item/super-choice-item-bottom.d.ts +9 -0
- package/dist/lib/types/components/super-selection-app/super-choice-page/super-choice-item/super-choice-item-top.d.ts +7 -0
- package/dist/lib/types/components/super-selection-app/super-choice-page/super-choice-page.d.ts +0 -3
- package/dist/lib/types/components/super-selection-app/super-selection-app.d.ts +2 -1
- package/dist/lib/types/components.d.ts +148 -97
- package/package.json +12 -7
- package/dist/lib/apollo-super-selection/assets/logo-qsuper-square.png +0 -0
- package/dist/lib/apollo-super-selection/assets/logo-qsuper.png +0 -0
- package/dist/lib/apollo-super-selection/p-13573238.system.js +0 -15
- package/dist/lib/apollo-super-selection/p-342cee5a.js +0 -1
- package/dist/lib/apollo-super-selection/p-38f24f69.js +0 -1
- package/dist/lib/apollo-super-selection/p-5c1ee0f8.system.entry.js +0 -69
- package/dist/lib/apollo-super-selection/p-64ebe17d.system.entry.js +0 -1
- package/dist/lib/apollo-super-selection/p-7dbe5a2f.system.js +0 -1
- package/dist/lib/apollo-super-selection/p-9317c049.entry.js +0 -14
- package/dist/lib/apollo-super-selection/p-d82b00ed.system.js +0 -1
- package/dist/lib/apollo-super-selection/p-df9ce4b7.js +0 -15
- package/dist/lib/apollo-super-selection/p-f7a45412.entry.js +0 -1
- package/dist/lib/cjs/delay-81aff2f1.js +0 -955
- package/dist/lib/cjs/fl-style-guide.cjs.entry.js +0 -90
- package/dist/lib/collection/components/super-selection-app/footer-section/footer-section.css +0 -11
- package/dist/lib/collection/components/super-selection-app/funds/custom-fund/self-managed-fund/self-managed-not-supported.css +0 -23
- package/dist/lib/collection/components/super-selection-app/funds/promoted-fund/promoted-fund-standard-choice-page.js +0 -62
- package/dist/lib/collection/components/super-selection-app/funds/slate-super/slate-fund.store.js +0 -10
- package/dist/lib/collection/components/super-selection-app/funds/slate-super/slate-standard-choice-page.js +0 -67
- package/dist/lib/collection/components/super-selection-app/funds/slate-super/slatesuper-header.css +0 -0
- package/dist/lib/collection/components/super-selection-app/funds/slate-super/slatesuper-header.js +0 -19
- package/dist/lib/collection/components/super-selection-app/notifications-section/notifications-section.js +0 -25
- package/dist/lib/collection/components/super-selection-app/services/notifications.service.js +0 -37
- package/dist/lib/collection/components/super-selection-app/services/notifications.store.js +0 -3
- package/dist/lib/collection/components/super-selection-app/services/selected-super-choice-info.service.js +0 -50
- package/dist/lib/collection/components/super-selection-app/standard-choice/api/standard-choice.model.js +0 -1
- package/dist/lib/collection/components/super-selection-app/super-choice-page/assets/logo-qsuper-square.png +0 -0
- package/dist/lib/collection/components/super-selection-app/super-choice-page/assets/logo-qsuper.png +0 -0
- package/dist/lib/collection/components/super-selection-app/super-choice-page/selected-super-choice-section/selected-super-choice-section.css +0 -18
- package/dist/lib/collection/components/super-selection-app/super-choice-page/selected-super-choice-section/selected-super-choice-section.js +0 -53
- package/dist/lib/collection/components/super-selection-app/super-choice-page/super-choice-item.js +0 -296
- package/dist/lib/collection/components/super-selection-app/super-choice-page/super-choice-page.css +0 -70
- package/dist/lib/esm/delay-c0555599.js +0 -935
- package/dist/lib/esm/fl-style-guide.entry.js +0 -86
- package/dist/lib/esm-es5/datorama-akita-79ce4385.js +0 -15
- package/dist/lib/esm-es5/delay-c0555599.js +0 -1
- package/dist/lib/esm-es5/fl-button_31.entry.js +0 -69
- package/dist/lib/esm-es5/fl-style-guide.entry.js +0 -1
- package/dist/lib/node_modules/@flarehr/beacon/dist/collection/components/button/button.css +0 -45
- package/dist/lib/node_modules/@flarehr/beacon/dist/collection/components/dropdown/dropdown.css +0 -9
- package/dist/lib/node_modules/@flarehr/beacon/dist/collection/components/dropdown-async/dropdown-async.css +0 -9
- package/dist/lib/node_modules/@flarehr/beacon/dist/collection/components/loading-indicator/loading-indicator.css +0 -141
- package/dist/lib/node_modules/@flarehr/beacon/dist/collection/components/promise-button/promise-button.css +0 -5
- package/dist/lib/node_modules/@flarehr/beacon/dist/collection/components/style-guide/style-guide.css +0 -0
- package/dist/lib/types/components/super-selection-app/funds/promoted-fund/promoted-fund-standard-choice-page.d.ts +0 -8
- package/dist/lib/types/components/super-selection-app/funds/slate-super/slate-fund.store.d.ts +0 -7
- package/dist/lib/types/components/super-selection-app/funds/slate-super/slate-standard-choice-page.d.ts +0 -8
- package/dist/lib/types/components/super-selection-app/funds/slate-super/slatesuper-header.d.ts +0 -3
- package/dist/lib/types/components/super-selection-app/notifications-section/notifications-section.d.ts +0 -5
- package/dist/lib/types/components/super-selection-app/services/notifications.service.d.ts +0 -15
- package/dist/lib/types/components/super-selection-app/services/notifications.store.d.ts +0 -14
- package/dist/lib/types/components/super-selection-app/services/selected-super-choice-info.service.d.ts +0 -18
- package/dist/lib/types/components/super-selection-app/standard-choice/api/standard-choice.model.d.ts +0 -3
- package/dist/lib/types/components/super-selection-app/super-choice-page/selected-super-choice-section/selected-super-choice-section.d.ts +0 -5
- package/dist/lib/types/components/super-selection-app/super-choice-page/super-choice-item.d.ts +0 -22
|
@@ -1 +0,0 @@
|
|
|
1
|
-
System.register(["./p-38ee2795.system.js","./p-13573238.system.js","./p-7dbe5a2f.system.js","./p-381262c1.system.js"],(function(e,s){"use strict";var t,o,n;return{setters:[function(e){t=e.p;o=e.b},function(){},function(){},function(e){n=e.g}],execute:function(){var e=function(){var e=s.meta.url;var o={};if(e!==""){o.resourcesUrl=new URL(".",e).href}return t(o)};e().then((function(e){n();return o([["p-64ebe17d.system",[[1,"fl-style-guide",{themeCssUrl:[1,"theme-css-url"]}]]],["p-cd49a6b7.system",[[0,"context-consumer",{context:[16],renderer:[16],subscribe:[16],unsubscribe:[32]}]]],["p-8cbfc343.system",[[0,"stencil-async-content",{documentLocation:[1,"document-location"],content:[32]}]]],["p-642db1f7.system",[[0,"stencil-route-title",{titleSuffix:[1,"title-suffix"],pageTitle:[1,"page-title"]}]]],["p-285da037.system",[[0,"stencil-router-prompt",{when:[4],message:[1],history:[16],unblock:[32]}]]],["p-f15bf700.system",[[0,"stencil-router-redirect",{history:[16],root:[1],url:[1]}]]],["p-5c1ee0f8.system",[[0,"sss-my-own-fund",{history:[16],formState:[32],isNotAllInformationProvidedMessageVisible:[32]}],[0,"sss-self-managed-fund",{history:[16],formState:[32],showSmsfNotSupported:[32]}],[0,"sss-default-fund",{history:[16],formState:[32],defaultFundProductName:[32]}],[0,"sss-slate-standard-choice-page",{history:[16],formState:[32]}],[1,"super-selection-app-host",{sessionState:[32],jwt:[32],appConfiguration:[32],areStylesLoaded:[32]}],[0,"sss-super-choice-page",{history:[16],promotedFunds:[32],chosenFund:[32]}],[0,"sss-promoted-fund-standard-choice-page",{history:[16],formState:[32]}],[0,"sss-success"],[0,"sss-promoted-fund-join-page",{history:[16]}],[0,"sss-slate-join-page",{history:[16]}],[0,"super-selection-app",{accessToken:[1,"access-token"],backendUrl:[1,"backend-url"],appBaseUrl:[1,"app-base-url"],history:[16],location:[16],isAppInitialised:[32]}],[0,"sss-my-own-fund-inputs",{myOwnFundForm:[16],selectedOption:[32]}],[0,"sss-loading-page"],[0,"sss-self-managed-fund-inputs",{fundForm:[16],currentBank:[32]}],[0,"sss-smsf-not-supported-dialog"],[0,"sss-super-choice-item",{isSelected:[4,"is-selected"],usi:[1],name:[1],subText:[1,"sub-text"],logo:[1],pdsLinkText:[1,"pds-link-text"],pdsLink:[1,"pds-link"],features:[1],featureSubText:[1,"feature-sub-text"],disclaimer:[16],abnInfo:[1,"abn-info"],abn:[1],history:[16]}],[0,"fl-dropdown",{placeholder:[1],options:[16],value:[16],required:[4],requiredValidationMessage:[1,"required-validation-message"],disabled:[4],inputValue:[32],isDropdownVisible:[32],filteredOptions:[32],highlightedOptionIndex:[32],selectedOption:[32]},[[2,"focus","handleFocus"],[2,"blur","handleBlur"],[2,"keydown","handleKeyDown"]]],[0,"sss-selected-super-choice-section",{fundType:[1,"fund-type"],fundName:[1,"fund-name"]}],[0,"sss-slatesuper-header"],[0,"sss-footer-section"],[4,"stencil-route-link",{url:[1],urlMatch:[1,"url-match"],activeClass:[1,"active-class"],exact:[4],strict:[4],custom:[1],anchorClass:[1,"anchor-class"],anchorRole:[1,"anchor-role"],anchorTitle:[1,"anchor-title"],anchorTabIndex:[1,"anchor-tab-index"],anchorId:[1,"anchor-id"],history:[16],location:[16],root:[1],ariaHaspopup:[1,"aria-haspopup"],ariaPosinset:[1,"aria-posinset"],ariaSetsize:[2,"aria-setsize"],ariaLabel:[1,"aria-label"],match:[32]}],[4,"stencil-route-switch",{group:[513],scrollTopOffset:[2,"scroll-top-offset"],location:[16],routeViewsUpdated:[16]}],[4,"stencil-router",{root:[1],historyType:[1,"history-type"],titleSuffix:[1,"title-suffix"],scrollTopOffset:[2,"scroll-top-offset"],location:[32],history:[32]}],[4,"sss-custom-fund",{history:[16],currentCustomFund:[32],fundOptionsList:[32]}],[0,"fl-dropdown-async",{placeholder:[1],searchFunction:[16],value:[16],required:[4],requiredValidationMessage:[1,"required-validation-message"],disabled:[4],minSearchStringLength:[2,"min-search-string-length"],searchState:[32],inputValue:[32],isDropdownVisible:[32],filteredOptions:[32],highlightedOptionIndex:[32],selectedOption:[32]},[[2,"focus","handleFocus"],[2,"blur","handleBlur"],[2,"keydown","handleKeyDown"]]],[0,"sss-notifications-section"],[0,"sss-standard-choice-form",{standardChoiceFormSignature:[32]}],[4,"fl-promise-button",{isBlockElement:[4,"is-block-element"],isRounded:[4,"is-rounded"],disabled:[4],variant:[1],promiseFn:[16],state:[32]}],[4,"fl-button",{isBlockElement:[4,"is-block-element"],disabled:[4],variant:[1]}],[0,"fl-loading-indicator",{theme:[1]}],[0,"stencil-route",{group:[513],componentUpdated:[16],match:[1040],url:[1],component:[1],componentProps:[16],exact:[4],routeRender:[16],scrollTopOffset:[2,"scroll-top-offset"],routeViewsUpdated:[16],location:[16],history:[16],historyType:[1,"history-type"]}]]]],e)}))}}}));
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import{S as t,O as e,r as s,a as i,A as n,b as r,N as h,h as o,o as c,s as u,i as a,c as f,e as l,d,f as p}from"./p-342cee5a.js";
|
|
2
|
-
/*! *****************************************************************************
|
|
3
|
-
Copyright (c) Microsoft Corporation.
|
|
4
|
-
|
|
5
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
6
|
-
purpose with or without fee is hereby granted.
|
|
7
|
-
|
|
8
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
9
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
10
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
11
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
12
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
13
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
14
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
15
|
-
***************************************************************************** */function y(t,e,s,i){var n,r=arguments.length,h=r<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)h=Reflect.decorate(t,e,s,i);else for(var o=t.length-1;o>=0;o--)(n=t[o])&&(h=(r<3?n(h):r>3?n(e,s,h):n(e,s))||h);return r>3&&h&&Object.defineProperty(e,s,h),h}function b(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}const g=(()=>{function t(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this}return t.prototype=Object.create(Error.prototype),t})();class w extends t{constructor(t,e){super(),this.subject=t,this.subscriber=e,this.closed=!1}unsubscribe(){if(this.closed)return;this.closed=!0;const t=this.subject,e=t.observers;if(this.subject=null,!e||0===e.length||t.isStopped||t.closed)return;const s=e.indexOf(this.subscriber);-1!==s&&e.splice(s,1)}}class v extends i{constructor(t){super(t),this.destination=t}}class O extends e{constructor(){super(),this.observers=[],this.closed=!1,this.isStopped=!1,this.hasError=!1,this.thrownError=null}[s](){return new v(this)}lift(t){const e=new j(this,this);return e.operator=t,e}next(t){if(this.closed)throw new g;if(!this.isStopped){const{observers:e}=this,s=e.length,i=e.slice();for(let e=0;e<s;e++)i[e].next(t)}}error(t){if(this.closed)throw new g;this.hasError=!0,this.thrownError=t,this.isStopped=!0;const{observers:e}=this,s=e.length,i=e.slice();for(let e=0;e<s;e++)i[e].error(t);this.observers.length=0}complete(){if(this.closed)throw new g;this.isStopped=!0;const{observers:t}=this,e=t.length,s=t.slice();for(let t=0;t<e;t++)s[t].complete();this.observers.length=0}unsubscribe(){this.isStopped=!0,this.closed=!0,this.observers=null}_trySubscribe(t){if(this.closed)throw new g;return super._trySubscribe(t)}_subscribe(e){if(this.closed)throw new g;return this.hasError?(e.error(this.thrownError),t.EMPTY):this.isStopped?(e.complete(),t.EMPTY):(this.observers.push(e),new w(this,e))}asObservable(){const t=new e;return t.source=this,t}}O.create=(t,e)=>new j(t,e);class j extends O{constructor(t,e){super(),this.destination=t,this.source=e}next(t){const{destination:e}=this;e&&e.next&&e.next(t)}error(t){const{destination:e}=this;e&&e.error&&this.destination.error(t)}complete(){const{destination:t}=this;t&&t.complete&&this.destination.complete()}_subscribe(e){const{source:s}=this;return s?this.source.subscribe(e):t.EMPTY}}class m extends O{constructor(t){super(),this._value=t}get value(){return this.getValue()}_subscribe(t){const e=super._subscribe(t);return e&&!e.closed&&t.next(this._value),e}getValue(){if(this.hasError)throw this.thrownError;if(this.closed)throw new g;return this._value}next(t){super.next(this._value=t)}}const E=new class extends r{}(class extends n{constructor(t,e){super(t,e),this.scheduler=t,this.work=e}schedule(t,e=0){return e>0?super.schedule(t,e):(this.delay=e,this.state=t,this.scheduler.flush(this),this)}execute(t,e){return e>0||this.closed?super.execute(t,e):this._execute(t,e)}requestAsyncId(t,e,s=0){return null!==s&&s>0||null===s&&this.delay>0?super.requestAsyncId(t,e,s):t.flush(this)}});class S extends i{constructor(t,e,s=0){super(t),this.scheduler=e,this.delay=s}static dispatch(t){const{notification:e,destination:s}=t;e.observe(s),this.unsubscribe()}scheduleMessage(t){this.destination.add(this.scheduler.schedule(S.dispatch,this.delay,new A(t,this.destination)))}_next(t){this.scheduleMessage(h.createNext(t))}_error(t){this.scheduleMessage(h.createError(t)),this.unsubscribe()}_complete(){this.scheduleMessage(h.createComplete()),this.unsubscribe()}}class A{constructor(t,e){this.notification=t,this.destination=e}}class x extends O{constructor(t=Number.POSITIVE_INFINITY,e=Number.POSITIVE_INFINITY,s){super(),this.scheduler=s,this._events=[],this._infiniteTimeWindow=!1,this._bufferSize=t<1?1:t,this._windowTime=e<1?1:e,e===Number.POSITIVE_INFINITY?(this._infiniteTimeWindow=!0,this.next=this.nextInfiniteTimeWindow):this.next=this.nextTimeWindow}nextInfiniteTimeWindow(t){if(!this.isStopped){const e=this._events;e.push(t),e.length>this._bufferSize&&e.shift()}super.next(t)}nextTimeWindow(t){this.isStopped||(this._events.push(new P(this._getNow(),t)),this._trimBufferThenGetEvents()),super.next(t)}_subscribe(e){const s=this._infiniteTimeWindow,i=s?this._events:this._trimBufferThenGetEvents(),n=this.scheduler,r=i.length;let h;if(this.closed)throw new g;if(this.isStopped||this.hasError?h=t.EMPTY:(this.observers.push(e),h=new w(this,e)),n&&e.add(e=new S(e,n)),s)for(let t=0;t<r&&!e.closed;t++)e.next(i[t]);else for(let t=0;t<r&&!e.closed;t++)e.next(i[t].value);return this.hasError?e.error(this.thrownError):this.isStopped&&e.complete(),h}_getNow(){return(this.scheduler||E).now()}_trimBufferThenGetEvents(){const t=this._getNow(),e=this._bufferSize,s=this._windowTime,i=this._events,n=i.length;let r=0;for(;r<n&&!(t-i[r].time<s);)r++;return n>e&&(r=Math.max(r,n-e)),r>0&&i.splice(0,r),i}}class P{constructor(t,e){this.time=t,this.value=e}}const _=(()=>{function t(){return Error.call(this),this.message="argument out of range",this.name="ArgumentOutOfRangeError",this}return t.prototype=Object.create(Error.prototype),t})();function I(t,e){return function(s){if("function"!=typeof t)throw new TypeError("argument is not a function. Are you looking for `mapTo()`?");return s.lift(new N(t,e))}}class N{constructor(t,e){this.project=t,this.thisArg=e}call(t,e){return e.subscribe(new C(t,this.project,this.thisArg))}}class C extends i{constructor(t,e,s){super(t),this.project=e,this.count=0,this.thisArg=s||this}_next(t){let e;try{e=this.project.call(this.thisArg,t,this.count++)}catch(t){return void this.destination.error(t)}this.destination.next(e)}}const U="function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator",R=t=>t&&"number"==typeof t.length&&"function"!=typeof t;function F(t){return!!t&&"function"!=typeof t.subscribe&&"function"==typeof t.then}const M=t=>{if(t&&"function"==typeof t[c])return i=t,t=>{const e=i[c]();if("function"!=typeof e.subscribe)throw new TypeError("Provided object does not correctly implement Symbol.observable");return e.subscribe(t)};if(R(t))return u(t);if(F(t))return s=t,t=>(s.then((e=>{t.closed||(t.next(e),t.complete())}),(e=>t.error(e))).then(null,o),t);if(t&&"function"==typeof t[U])return e=t,t=>{const s=e[U]();for(;;){let e;try{e=s.next()}catch(e){return t.error(e),t}if(e.done){t.complete();break}if(t.next(e.value),t.closed)break}return"function"==typeof s.return&&t.add((()=>{s.return&&s.return()})),t};{const e=a(t)?"an invalid object":`'${t}'`;throw new TypeError(`You provided ${e} where a stream was expected. You can provide an Observable, Promise, Array, or Iterable.`)}var e,s,i};function k(s,i){return i?function(s,i){if(null!=s){if(function(t){return t&&"function"==typeof t[c]}(s))return function(s,i){return new e((e=>{const n=new t;return n.add(i.schedule((()=>{const t=s[c]();n.add(t.subscribe({next(t){n.add(i.schedule((()=>e.next(t))))},error(t){n.add(i.schedule((()=>e.error(t))))},complete(){n.add(i.schedule((()=>e.complete())))}}))}))),n}))}(s,i);if(F(s))return function(s,i){return new e((e=>{const n=new t;return n.add(i.schedule((()=>s.then((t=>{n.add(i.schedule((()=>{e.next(t),n.add(i.schedule((()=>e.complete())))})))}),(t=>{n.add(i.schedule((()=>e.error(t))))}))))),n}))}(s,i);if(R(s))return f(s,i);if(function(t){return t&&"function"==typeof t[U]}(s)||"string"==typeof s)return function(s,i){if(!s)throw new Error("Iterable cannot be null");return new e((e=>{const n=new t;let r;return n.add((()=>{r&&"function"==typeof r.return&&r.return()})),n.add(i.schedule((()=>{r=s[U](),n.add(i.schedule((function(){if(e.closed)return;let t,s;try{const e=r.next();t=e.value,s=e.done}catch(t){return void e.error(t)}s?e.complete():(e.next(t),this.schedule())})))}))),n}))}(s,i)}throw new TypeError((null!==s&&typeof s||s)+" is not observable")}(s,i):s instanceof e?s:new e(M(s))}class K extends i{constructor(t){super(),this.parent=t}_next(t){this.parent.notifyNext(t)}_error(t){this.parent.notifyError(t),this.unsubscribe()}_complete(){this.parent.notifyComplete(),this.unsubscribe()}}class L extends i{notifyNext(t){this.destination.next(t)}notifyError(t){this.destination.error(t)}notifyComplete(){this.destination.complete()}}function D(t,s){if(!s.closed)return t instanceof e?t.subscribe(s):M(t)(s)}function $(t,e){return function(s){return s.lift(new W(t,e))}}class W{constructor(t,e){this.predicate=t,this.thisArg=e}call(t,e){return e.subscribe(new V(t,this.predicate,this.thisArg))}}class V extends i{constructor(t,e,s){super(t),this.predicate=e,this.thisArg=s,this.count=0}_next(t){let e;try{e=this.predicate.call(this.thisArg,t,this.count++)}catch(t){return void this.destination.error(t)}e&&this.destination.next(t)}}function Y(t,e){return s=>s.lift(new H(t,e))}class H{constructor(t,e){this.compare=t,this.keySelector=e}call(t,e){return e.subscribe(new Q(t,this.compare,this.keySelector))}}class Q extends i{constructor(t,e,s){super(t),this.keySelector=s,this.hasKey=!1,"function"==typeof e&&(this.compare=e)}compare(t,e){return t===e}_next(t){let e;try{const{keySelector:s}=this;e=s?s(t):t}catch(t){return this.destination.error(t)}let s=!1;if(this.hasKey)try{const{compare:t}=this;s=t(this.key,e)}catch(t){return this.destination.error(t)}else this.hasKey=!0;s||(this.key=e,this.destination.next(t))}}class B{constructor(t){if(this.total=t,this.total<0)throw new _}call(t,e){return e.subscribe(new q(t,this.total))}}class q extends i{constructor(t,e){super(t),this.total=e,this.count=0}_next(t){const e=this.total,s=++this.count;s<=e&&(this.destination.next(t),s===e&&(this.destination.complete(),this.unsubscribe()))}}function z(t,e){return"function"==typeof e?s=>s.pipe(z(((s,i)=>k(t(s,i)).pipe(I(((t,n)=>e(s,t,i,n))))))):e=>e.lift(new G(t))}class G{constructor(t){this.project=t}call(t,e){return e.subscribe(new J(t,this.project))}}class J extends L{constructor(t,e){super(t),this.project=e,this.index=0}_next(t){let e;const s=this.index++;try{e=this.project(t,s)}catch(t){return void this.destination.error(t)}this._innerSub(e)}_innerSub(t){const e=this.innerSubscription;e&&e.unsubscribe();const s=new K(this),i=this.destination;i.add(s),this.innerSubscription=D(t,s),this.innerSubscription!==s&&i.add(this.innerSubscription)}_complete(){const{innerSubscription:t}=this;t&&!t.closed||super._complete(),this.unsubscribe()}_unsubscribe(){this.innerSubscription=void 0}notifyComplete(){this.innerSubscription=void 0,this.isStopped&&super._complete()}notifyNext(t){this.destination.next(t)}}const X={type:null,entityIds:null,skip:!1};let Z=!1;function tt(t,e){et(t,e),Z=!0}function et(t,e){!1===Z&&(X.type=t,X.entityIds=e)}function st(t,e){return t.hasOwnProperty(e)}function it(t){return null==t}function nt(t){return it(t)?[]:Array.isArray(t)?t:[t]}var rt;!function(t){t.Set="Set",t.Add="Add",t.Update="Update",t.Remove="Remove"}(rt||(rt={}));const ht="undefined"!=typeof window;let ot=!0;function ct(){ot=!1,ht&&(delete window.$$stores,delete window.$$queries)}function ut(){return ot}function at(t){const e=typeof t;return null!=t&&("object"==e||"function"==e)}function ft(t){return Array.isArray(t)}function lt(t){return!1===it(t)}function dt(t){return!!ft(t)&&0===t.length}function pt(t){return"function"==typeof t}function yt(t){return void 0===t}function bt(t){return t.hasOwnProperty("active")}function gt(t){return ft(t)}function wt({active:t,ids:e,entities:s}){return gt(t)?function(t,e){const s=t.filter((t=>e.indexOf(t)>-1));return s.length===t.length?t:s}(t,e):!1===st(s,t)?null:t}function vt(t,e){let s={};for(const i of Object.keys(t))s[i]=e(t[i]);return s}let Ot={resettable:!1,ttl:null,producerFn:void 0};function jt(){return Ot}function mt(t){Object.freeze(t);const e="function"==typeof t,s=Object.prototype.hasOwnProperty;return Object.getOwnPropertyNames(t).forEach((function(i){!s.call(t,i)||e&&("caller"===i||"callee"===i||"arguments"===i)||null===t[i]||"object"!=typeof t[i]&&"function"!=typeof t[i]||Object.isFrozen(t[i])||mt(t[i])})),t}const Et=new O,Tt=new x(50,5e3),St=new O;function At(t){return null!=t&&""+t!="false"}function xt(t){return At(t)&&"Object"===t.constructor.name}function Pt(t){return function(e){e.akitaConfig={idKey:"id"};for(let s=0,i=Object.keys(t);s<i.length;s++){const n=i[s];"name"===n?e.akitaConfig.storeName=t[n]:e.akitaConfig[n]=t[n]}}}const _t={},It={};ht&&(window.$$stores=_t,window.$$queries=It);const Nt=new O,Ct=new m(!1),Ut={activeTransactions:0,batchTransaction:null};function Rt(){return Ut.activeTransactions>0}function Ft(t,e){Rt()||(Ut.batchTransaction=new O),Ut.activeTransactions++,Ct.next(!0);try{return t.apply(e)}finally{tt("@Transaction"),0==--Ut.activeTransactions&&(Ut.batchTransaction.next(!0),Ut.batchTransaction.complete(),Ct.next(!1),Nt.next(!0))}}function Mt(){return function(t,e,s){const i=s.value;return s.value=function(...t){return Ft((()=>i.apply(this,t)),this)},s}}class kt{constructor(t,e={}){this.options=e,this.inTransaction=!1,this.cache={active:new m(!1),ttl:null},this.onInit(t)}setLoading(t=!1){t!==this._value().loading&&(ut()&&et("Set Loading"),this._setState((e=>Object.assign({},e,{loading:t}))))}setHasCache(t,e={restartTTL:!1}){if(t!==this.cache.active.value&&this.cache.active.next(t),e.restartTTL){const t=this.getCacheTTL();t&&(null!==this.cache.ttl&&clearTimeout(this.cache.ttl),this.cache.ttl=setTimeout((()=>this.setHasCache(!1)),t))}}getValue(){return this.storeValue}setError(t){t!==this._value().error&&(ut()&&et("Set Error"),this._setState((e=>Object.assign({},e,{error:t}))))}_select(t){return this.store.asObservable().pipe(I((e=>t(e.state))),Y())}_value(){return this.storeValue}_cache(){return this.cache.active}get config(){return this.constructor.akitaConfig||{}}get storeName(){return this.config.storeName||this.options.storeName||this.options.name}get deepFreeze(){return this.config.deepFreezeFn||this.options.deepFreezeFn||mt}get cacheConfig(){return this.config.cache||this.options.cache}get _producerFn(){return this.config.producerFn||this.options.producerFn||Ot.producerFn}get resettable(){return lt(this.config.resettable)?this.config.resettable:this.options.resettable}_setState(t,e=!0){if(pt(t)){const e=t(this._value());this.storeValue=ot?this.deepFreeze(e):e}else this.storeValue=t;if(!this.store)return this.store=new m({state:this.storeValue}),void(ut()&&this.store.subscribe((({action:t})=>{t&&function(t,e){St.next({storeName:t,action:e})}(this.storeName,t)})));Rt()?this.handleTransaction():this.dispatch(this.storeValue,e)}reset(){this.isResettable()?(ut()&&et("Reset"),this._setState((()=>Object.assign({},this._initialState))),this.setHasCache(!1)):ut()&&console.warn("You need to enable the reset functionality")}update(t){let e;ut()&&et("Update");const s=this._value();e=pt(t)?pt(this._producerFn)?this._producerFn(s,t):t(s):t;const i=this.akitaPreUpdate(s,Object.assign({},s,e)),n=xt(s)?i:new s.constructor(i);this._setState(n)}updateStoreConfig(t){this.options=Object.assign({},this.options,t)}akitaPreUpdate(t,e){return e}ngOnDestroy(){this.destroy()}destroy(){ht&&window.hmrEnabled||this!==_t[this.storeName]||(delete _t[this.storeName],Et.next(this.storeName),this.setHasCache(!1),this.cache.active.complete(),this.store.complete())}onInit(t){_t[this.storeName]=this,this._setState((()=>t)),Tt.next(this.storeName),this.isResettable()&&(this._initialState=t),ut()&&(this.storeName||console.error("@StoreConfig({ name }) is missing in "+this.constructor.name))}dispatch(t,e=!0){let s=void 0;e&&(s=X,Z=!1),this.store.next({state:t,action:s})}watchTransaction(){(Ut.batchTransaction?Ut.batchTransaction.asObservable():d(!0)).subscribe((()=>{this.inTransaction=!1,this.dispatch(this._value())}))}isResettable(){return!1!==this.resettable&&(this.resettable||jt().resettable)}handleTransaction(){this.inTransaction||(this.watchTransaction(),this.inTransaction=!0)}getCacheTTL(){return this.cacheConfig&&this.cacheConfig.ttl||jt().ttl}}var Kt,Lt;class Dt extends kt{constructor(t={},e={}){super(Object.assign({},{entities:{},ids:[],loading:!0,error:null},t),e),this.options=e,this.entityActions=new O,this.entityIdChanges=new O}get selectEntityAction$(){return this.entityActions.asObservable()}get selectEntityIdChanges$(){return this.entityIdChanges.asObservable()}get idKey(){return this.config.idKey||this.options.idKey||"id"}set(t,e={}){if(it(t))return;ut()&&et("Set Entity");const s=this.akitaPreAddEntity===Dt.prototype.akitaPreAddEntity;this.setHasCache(!0,{restartTTL:!0}),this._setState((i=>{const n=function({state:t,entities:e,idKey:s,preAddEntity:i,isNativePreAdd:n}){let r,h;if(ft(e)){const t=function(t,e,s){const i={entities:{},ids:[]};for(const n of t){const t=s(n);i.entities[t[e]]=t,i.ids.push(t[e])}return i}(e,s,i);r=t.entities,h=t.ids}else!function(t){return t.entities&&t.ids}(e)?(r=n?e:vt(e,i),h=Object.keys(r).map((t=>isNaN(t)?t:Number(t)))):(r=n?e.entities:vt(e.entities,i),h=e.ids);const o=Object.assign({},t,{entities:r,ids:h,loading:!1});return bt(t)&&(o.active=wt(o)),o}({state:i,entities:t,idKey:this.idKey,preAddEntity:this.akitaPreAddEntity,isNativePreAdd:s});return!1===yt(e.activeId)&&(n.active=e.activeId),n})),this.hasInitialUIState()&&this.handleUICreation(),this.entityActions.next({type:rt.Set,ids:this.ids})}add(t,e={loading:!1}){const s=nt(t);if(dt(s))return;const i=function({state:t,entities:e,idKey:s,options:i={},preAddEntity:n}){let r={},h=[],o=!1;for(const c of e)if(!1===st(t.entities,c[s])){const t=n(c),e=t[s];r[e]=t,i.prepend?h.unshift(e):h.push(e),o=!0}return o?{newState:Object.assign({},t,{entities:Object.assign({},t.entities,r),ids:i.prepend?[...h,...t.ids]:[...t.ids,...h]}),newIds:h}:null}({state:this._value(),preAddEntity:this.akitaPreAddEntity,entities:s,idKey:this.idKey,options:e});i&&(ut()&&et("Add Entity"),i.newState.loading=e.loading,this._setState((()=>i.newState)),this.hasInitialUIState()&&this.handleUICreation(!0),this.entityActions.next({type:rt.Add,ids:i.newIds}))}update(t,e){if(yt(e))return void super.update(t);let s,i=[];i=pt(t)?this.ids.filter((e=>t(this.entities[e]))):it(t)?this.ids:nt(t),dt(i)||(ut()&&et("Update Entity",i),this._setState((t=>function({state:t,ids:e,idKey:s,newStateOrFn:i,preUpdateEntity:n,producerFn:r,onEntityIdChanges:h}){const o={};let c,u=!1;for(const h of e){if(!1===st(t.entities,h))continue;const e=t.entities[h];let a;a=pt(i)?pt(r)?r(e,i):i(e):i;const f=a.hasOwnProperty(s)&&a[s]!==e[s];let l;c=h,f&&(u=!0,c=a[s]);const d=Object.assign({},e,a);l=xt(e)?d:xt(a)?new e.constructor(d):new a.constructor(d),o[c]=n(e,l)}let a=t.ids,f=t.entities;if(u){const[s]=e,i=s;f=function(t,e){var s={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(s[i]=t[i]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(i=Object.getOwnPropertySymbols(t);n<i.length;n++)e.indexOf(i[n])<0&&Object.prototype.propertyIsEnumerable.call(t,i[n])&&(s[i[n]]=t[i[n]])}return s}(t.entities,["symbol"==typeof i?i:i+""]),a=t.ids.map((t=>t===s?c:t)),h(s,c)}return Object.assign({},t,{entities:Object.assign({},f,o),ids:a})}({idKey:this.idKey,ids:i,preUpdateEntity:this.akitaPreUpdateEntity,state:t,newStateOrFn:e,producerFn:this._producerFn,onEntityIdChanges:(t,e)=>{s={oldId:t,newId:e},this.entityIdChanges.next(Object.assign({},s,{pending:!0}))}}))),s&&this.entityIdChanges.next(Object.assign({},s,{pending:!1})),this.entityActions.next({type:rt.Update,ids:i}))}upsert(t,e,s,i={}){const n=nt(t),r=t=>e=>st(this.entities,e)===t,h=pt(s)?i.baseClass:s?s.baseClass:void 0,o=pt(h),c=n.filter(r(!0)),u=n.filter(r(!1)).map((t=>{const i="function"==typeof e?e({}):e,n=pt(s)?s(t,i):i,r=Object.assign({},n,{[this.idKey]:t});return o?new h(r):r}));this.update(c,e),this.add(u),ut()&&tt("Upsert Entity")}upsertMany(t,e={}){const s=[],i=[],n={};for(const r of t){const t=this.akitaPreCheckEntity(r),h=t[this.idKey];if(st(this.entities,h)){const s=this._value().entities[h],r=Object.assign({},this._value().entities[h],t),o=e.baseClass?new e.baseClass(r):r,c=this.akitaPreUpdateEntity(s,o),u=c[this.idKey];n[u]=c,i.push(u)}else{const i=e.baseClass?new e.baseClass(t):t,r=this.akitaPreAddEntity(i),h=r[this.idKey];s.push(h),n[h]=r}}ut()&&tt("Upsert Many"),this._setState((t=>Object.assign({},t,{ids:s.length?[...t.ids,...s]:t.ids,entities:Object.assign({},t.entities,n),loading:!!e.loading}))),i.length&&this.entityActions.next({type:rt.Update,ids:i}),s.length&&this.entityActions.next({type:rt.Add,ids:s}),s.length&&this.hasUIStore()&&this.handleUICreation(!0)}replace(t,e){const s=nt(t);if(dt(s))return;let i={};for(const t of s)e[this.idKey]=t,i[t]=e;ut()&&et("Replace Entity",t),this._setState((t=>Object.assign({},t,{entities:Object.assign({},t.entities,i)})))}move(t,e){const s=this.ids.slice();s.splice(e<0?s.length+e:e,0,s.splice(t,1)[0]),ut()&&et("Move Entity"),this._setState((t=>Object.assign({},t,{entities:Object.assign({},t.entities),ids:s})))}remove(t){if(dt(this.ids))return;const e=lt(t);let s=[];s=pt(t)?this.ids.filter((e=>t(this.entities[e]))):e?nt(t):this.ids,dt(s)||(ut()&&et("Remove Entity",s),this._setState((t=>function({state:t,ids:e}){if(it(e))return function(t){return Object.assign({},t,{entities:{},ids:[],active:gt(t.active)?[]:null})}(t);const s=t.entities;let i={};for(const n of t.ids)!1===e.includes(n)&&(i[n]=s[n]);const n=Object.assign({},t,{entities:i,ids:t.ids.filter((t=>!1===e.includes(t)))});return bt(t)&&(n.active=wt(n)),n}({state:t,ids:s}))),e||this.setHasCache(!1),this.handleUIRemove(s),this.entityActions.next({type:rt.Remove,ids:s}))}updateActive(t){const e=nt(this.active);ut()&&et("Update Active",e),this.update(e,t)}setActive(t){const e=function(t,e,s){let i;if(ft(t))i=t;else if(at(t)){if(it(s))return;t=Object.assign({wrap:!0},t);const n=e.indexOf(s);if(t.prev){const s=0===n;if(s&&!t.wrap)return;i=s?e[e.length-1]:e[n-1]}else if(t.next){const s=e.length===n+1;if(s&&!t.wrap)return;i=s?e[0]:e[n+1]}}else{if(t===s)return;i=t}return i}(t,this.ids,this.active);void 0!==e&&(ut()&&et("Set Active",e),this._setActive(e))}addActive(t){const e=nt(t);dt(e)||e.every((t=>this.active.indexOf(t)>-1))||(ut()&&et("Add Active",t),this._setState((t=>{const s=Array.from(new Set([...t.active,...e]));return Object.assign({},t,{active:s})})))}removeActive(t){const e=nt(t);dt(e)||e.some((t=>this.active.indexOf(t)>-1))&&(ut()&&et("Remove Active",t),this._setState((t=>Object.assign({},t,{active:Array.isArray(t.active)?t.active.filter((t=>-1===e.indexOf(t))):null}))))}toggleActive(t){const e=nt(t),s=t=>e=>this.active.includes(e)===t,i=e.filter(s(!0)),n=e.filter(s(!1));this.removeActive(i),this.addActive(n),ut()&&tt("Toggle Active")}createUIStore(t={},e={}){return this.ui=new $t(t,Object.assign({},{name:"UI/"+this.storeName,idKey:this.idKey},e)),this.ui}destroy(){super.destroy(),this.ui instanceof Dt&&this.ui.destroy(),this.entityActions.complete()}akitaPreUpdateEntity(t,e){return e}akitaPreAddEntity(t){return t}akitaPreCheckEntity(t){return t}get ids(){return this._value().ids}get entities(){return this._value().entities}get active(){return this._value().active}_setActive(t){this._setState((e=>Object.assign({},e,{active:t})))}handleUICreation(t=!1){const e=this.ids,s=pt(this.ui._akitaCreateEntityFn);let i;const n=t=>{const e=this.entities[t],i=s?this.ui._akitaCreateEntityFn(e):this.ui._akitaCreateEntityFn;return Object.assign({[this.idKey]:e[this.idKey]},i)};i=t?this.ids.filter((t=>yt(this.ui.entities[t]))).map(n):e.map(n),t?this.ui.add(i):this.ui.set(i)}hasInitialUIState(){return this.hasUIStore()&&!1===yt(this.ui._akitaCreateEntityFn)}handleUIRemove(t){this.hasUIStore()&&this.ui.remove(t)}hasUIStore(){return this.ui instanceof $t}}y([Mt(),b("design:type",Function),b("design:paramtypes",[Object,Object,Object,Object]),b("design:returntype",void 0)],Dt.prototype,"upsert",null),y([Mt(),b("design:type",Function),b("design:paramtypes",["function"==typeof(Kt="undefined"!=typeof T&&T)?Kt:Object]),b("design:returntype",void 0)],Dt.prototype,"toggleActive",null);class $t extends Dt{constructor(t={},e={}){super(t,e)}setInitialEntityState(t){this._akitaCreateEntityFn=t}}!function(t){t.ASC="asc",t.DESC="desc"}(Lt||(Lt={}));class Wt{constructor(t){this.store=t,this.__store__=t,ut()&&(It[t.storeName]=this)}select(t){let e;if(pt(t))e=t;else if("string"==typeof t)e=e=>e[t];else{if(Array.isArray(t))return this.store._select((t=>t)).pipe(Y((s=t,function(t,e){const i=pt(s[0]);return!1===s.some((s=>i?s(t)!==s(e):t[s]!==e[s]))})),I((e=>pt(t[0])?t.map((t=>t(e))):t.reduce(((t,s)=>(t[s]=e[s],t)),{}))));e=t=>t}var s;return this.store._select(e)}selectLoading(){return this.select((t=>t.loading))}selectError(){return this.select((t=>t.error))}getValue(){return this.store._value()}selectHasCache(){return this.store._cache().asObservable()}getHasCache(){return this.store._cache().value}get config(){return this.constructor.akitaQueryConfig}}const Vt=t=>t.pipe($((t=>null!=t)));function Yt(t,e){return 1===e.split(".").length?t:e.split(".").slice(1).join(".").split(".").reduce(((t,e)=>t&&t[e]),t)}new x(1);const Ht={pagesControls:!1,range:!1,startWith:1,cacheTimeout:void 0,clearStoreWithCache:!0};var Qt,Bt;y([function(t,e,s){const i=s.value;return s.value=function(...t){return tt("@Pagination - New Page",void 0),i.apply(this,t)},s},b("design:type",Function),b("design:paramtypes",[Object]),b("design:returntype",void 0)],class extends class{constructor(t,e){this.query=t,e&&e.resetFn&&jt().resettable&&this.onReset(e.resetFn)}getQuery(){return this.query}getStore(){return this.getQuery().__store__}isEntityBased(t){return At(t)}selectSource(t,e){return this.isEntityBased(t)?this.getQuery().selectEntity(t).pipe(Vt):e?this.getQuery().select((t=>Yt(t,this.withStoreName(e)))):this.getQuery().select()}getSource(t,e){if(this.isEntityBased(t))return this.getQuery().getEntity(t);const s=this.getQuery().getValue();return e?Yt(s,this.withStoreName(e)):s}withStoreName(t){return`${this.storeName}.${t}`}get storeName(){return this.getStore().storeName}updateStore(t,e,s){if(this.isEntityBased(e))this.getStore().update(e,t);else{if(s)return void this.getStore()._setState((e=>function(t,e,s){const i=e.split(".");if(1===i.length)return Object.assign({},t,s);t=Object.assign({},t);const n=i.length-2;return e.split(".").slice(1).reduce(((t,e,i)=>i!==n?(t[e]=Object.assign({},t[e]),t&&t[e]):(t[e]=Array.isArray(t[e])||!at(t[e])?s:Object.assign({},t[e],s),t&&t[e])),t),t}(e,this.withStoreName(s),t)));this.getStore()._setState((e=>Object.assign({},e,t)))}}onReset(t){const e=this.getStore().reset;this.getStore().reset=(...s)=>{setTimeout((()=>{e.apply(this.getStore(),s),t()}))}}}{constructor(t,s={}){super(t,{resetFn:()=>{this.initial=!1,this.destroy({clearCache:!0,currentPage:1})}}),this.query=t,this.config=s,this.metadata=new Map,this.pages=new Map,this.pagination={currentPage:1,perPage:0,total:0,lastPage:0,data:[]},this.initial=!0,this.isLoading$=this.query.selectLoading().pipe(p(0)),this.config=Object.assign(Ht,s);const{startWith:i,cacheTimeout:n}=this.config;var r;this.page=new m(i),(r=n)&&(r instanceof e||"function"==typeof r.lift&&"function"==typeof r.subscribe)&&(this.clearCacheSubscription=n.subscribe((()=>this.clearCache())))}get pageChanges(){return this.page.asObservable()}get currentPage(){return this.pagination.currentPage}get isFirst(){return 1===this.currentPage}get isLast(){return this.currentPage===this.pagination.lastPage}withControls(){return this.config.pagesControls=!0,this}withRange(){return this.config.range=!0,this}setLoading(t=!0){this.getStore().setLoading(t)}update(t){this.pagination=t,this.addPage(t.data)}addPage(t){this.pages.set(this.currentPage,{ids:t.map((t=>t[this.getStore().idKey]))}),this.getStore().upsertMany(t)}clearCache(t={}){this.initial||(tt("@Pagination - Clear Cache"),!1!==t.clearStore&&(this.config.clearStoreWithCache||t.clearStore)&&this.getStore().remove(),this.pages=new Map,this.metadata=new Map),this.initial=!1}clearPage(t){this.pages.delete(t)}destroy({clearCache:t,currentPage:e}={}){this.clearCacheSubscription&&this.clearCacheSubscription.unsubscribe(),t&&this.clearCache(),yt(e)||this.setPage(e),this.initial=!0}isPageActive(t){return this.currentPage===t}setPage(t){t===this.currentPage&&this.hasPage(t)||this.page.next(this.pagination.currentPage=t)}nextPage(){this.currentPage!==this.pagination.lastPage&&this.setPage(this.pagination.currentPage+1)}prevPage(){this.pagination.currentPage>1&&this.setPage(this.pagination.currentPage-1)}setLastPage(){this.setPage(this.pagination.lastPage)}setFirstPage(){this.setPage(1)}hasPage(t){return this.pages.has(t)}getPage(t){let e=this.pagination.currentPage;return this.hasPage(e)?this.selectPage(e):(this.setLoading(!0),k(t()).pipe(z((t=>(e=t.currentPage,Ft((()=>{this.setLoading(!1),this.update(t)})),this.selectPage(e))))))}getQuery(){return this.query}refreshCurrentPage(){!1===it(this.currentPage)&&(this.clearPage(this.currentPage),this.setPage(this.currentPage))}getFrom(){return this.isFirst?1:(this.currentPage-1)*this.pagination.perPage+1}getTo(){return this.isLast?this.pagination.total:this.currentPage*this.pagination.perPage}selectPage(t){return this.query.selectAll({asObject:!0}).pipe((1,t=>t.lift(new B(1))),I((e=>{let s=Object.assign({},this.pagination,{data:this.pages.get(t).ids.map((t=>e[t]))});const{range:i,pagesControls:n}=this.config;return isNaN(this.pagination.total)&&(s.total=1===s.lastPage?s.data?s.data.length:0:s.perPage*s.lastPage,this.pagination.total=s.total),i&&(s.from=this.getFrom(),s.to=this.getTo()),n&&(s.pageControls=function(t,e){const s=Math.ceil(t/e);let i=[];for(let t=0;t<s;t++)i.push(t+1);return i}(this.pagination.total,this.pagination.perPage)),s})))}}.prototype,"update",null),function(t){t.Update="UPDATE"}(Qt||(Qt={})),function(t){t.Update="UPDATE",t.AddEntities="ADD_ENTITIES",t.SetEntities="SET_ENTITIES",t.UpdateEntities="UPDATE_ENTITIES",t.RemoveEntities="REMOVE_ENTITIES",t.UpsertEntities="UPSERT_ENTITIES",t.UpsertManyEntities="UPSERT_MANY_ENTITIES"}(Bt||(Bt={}));export{Wt as Q,L as S,K as a,$ as b,Pt as c,Y as d,ct as e,k as f,kt as g,D as i,I as m}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as l,h as s,H as t}from"./p-082669d9.js";import{g as e,O as i,l as a,k as n,d as r,f as o}from"./p-342cee5a.js";function c(l){return!e(l)&&l-parseFloat(l)+1>=0}function u(l){const{index:s,period:t,subscriber:e}=l;if(e.next(s),!e.closed){if(-1===t)return e.complete();l.index=s+1,this.schedule(l,t)}}const d=l=>{const s=document.querySelector('script[data-fl-namespace="design-system"][data-fl-resources-url]'),t=s&&s.getAttribute("data-fl-resources-url")||"";try{return new URL(l,t).href}catch(s){return`${t}/${l}`}},m=class{constructor(s){l(this,s),this.data=["Apple","Application","Appetizer","Anna","Banana","Archery","Apogee"].map((l=>({label:l,value:l}))),this.searchFunction=l=>{const s=this.data.filter((s=>s.label.toLowerCase().includes(l.toLowerCase())));return r(s).pipe(o(1e3)).toPromise()}}render(){return s(t,null,s("link",{rel:"stylesheet",href:d("beacon.css"),media:"all"}),this.themeCssUrl&&s("link",{rel:"stylesheet",href:this.themeCssUrl,media:"all"}),s("div",{class:"container m-3 p-5 shadow"},s("h1",null,"Beacon"),s("h5",null,"Flare-Apollo Component Library 🚀"),s("div",{class:"row"},s("div",{class:"col"},s("ul",{class:"list-group"},s("li",{class:"list-group-item"},s("small",{class:"text-muted"},"Typography"),s("div",{class:"col"},s("h1",null,"h1 Heading"),s("h2",null,"h2 Sub-heading"),s("h3",null,"h3 Sub-heading"),s("h4",null,"h4 Sub-heading"),s("p",null,"Paragraph"),s("div",{class:"d-flex flex-column"},s("strong",null,"Strong"),s("small",null,"small"),s("a",{href:"https://www.flarehr.com",target:"_blank"},"Weblink")))),s("li",{class:"list-group-item"},s("small",{class:"text-muted"},"Buttons"),s("div",{class:"col-3 my-2"},this.renderButtonVariants())),s("li",{class:"list-group-item"},s("small",{class:"text-muted"},"Loading indicator"),s("div",{class:"col"},s("fl-loading-indicator",null),s("fl-loading-indicator",{theme:"dark"}))),s("li",{class:"list-group-item"},s("small",{class:"text-muted"},"Dropdown"),s("div",{class:"col-4"},s("fl-dropdown",{options:this.data}))),s("li",{class:"list-group-item"},s("small",{class:"text-muted"},"Async Dropdown"),s("div",{class:"col-4"},s("fl-dropdown-async",{"min-search-string-length":"2",searchFunction:this.searchFunction}))),s("li",{class:"list-group-item"},s("small",{class:"text-muted"},"Promise Button"),s("div",{class:"col-3 my-2"},s("fl-promise-button",{isBlockElement:!0,promiseFn:()=>this.takeTime()},"Promise Button block")),s("div",{class:"col-3 my-2"},s("fl-promise-button",{promiseFn:()=>this.takeTime()},"Promise Button")),s("div",{class:"col-3 my-2"},s("fl-promise-button",{variant:"secondary",promiseFn:()=>this.takeTime()},"Secondary Promise Button"))))))))}renderButtonVariants(){return s("ul",{class:"list-group"},s("li",{class:"list-group-item"},s("i",null,"Primary"),s("fl-button",{isBlockElement:!0},"Button")),s("li",{class:"list-group-item"},s("i",null,"Primary, disabled"),s("fl-button",{isBlockElement:!0,disabled:!0},"Button")),s("li",{class:"list-group-item"},s("i",null,"Secondary"),s("fl-button",{isBlockElement:!0,variant:"secondary"},"Button")),s("li",{class:"list-group-item"},s("i",null,"Secondary, disabled"),s("fl-button",{isBlockElement:!0,disabled:!0,variant:"secondary"},"Button")))}async takeTime(){return function(l=0,s,t){let e=-1;return c(s)?e=Number(s)<1?1:Number(s):a(s)&&(t=s),a(t)||(t=n),new i((s=>{const i=c(l)?l:+l-t.now();return t.schedule(u,i,{index:0,period:e,subscriber:s})}))}(2e3*Math.random()+2e3).toPromise()}};m.style="";export{m as fl_style_guide}
|