@coveops/abi 1.3.1 → 1.5.1

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.
Files changed (65) hide show
  1. package/dist/abi/abi.css +1 -1
  2. package/dist/abi/abi.esm.js +1 -1
  3. package/dist/abi/index.esm.js +1 -1
  4. package/dist/abi/p-224108b8.entry.js +1 -0
  5. package/dist/abi/{p-07a6ff58.entry.js → p-71e7ff5c.entry.js} +1 -1
  6. package/dist/abi/{p-c058cc61.entry.js → p-9d42030c.entry.js} +1 -1
  7. package/dist/abi/{p-b984457f.js → p-ac870f21.js} +2 -2
  8. package/dist/abi/p-bf957ebd.entry.js +1 -0
  9. package/dist/abi/p-c10b6b7f.js +2 -0
  10. package/dist/abi/p-c602c74e.entry.js +1 -0
  11. package/dist/abi/{p-3303b27f.entry.js → p-cd1744bb.entry.js} +1 -1
  12. package/dist/abi/{p-8c974da8.entry.js → p-d5e62885.entry.js} +1 -1
  13. package/dist/bundle/index.css +1 -1
  14. package/dist/bundle/index.js +64 -18
  15. package/dist/cjs/abi.cjs.js +2 -2
  16. package/dist/cjs/faq-popup-component.cjs.entry.js +5 -4
  17. package/dist/cjs/{index-355878fc.js → index-3cecd23d.js} +82 -3
  18. package/dist/cjs/{index-20ac4bdb.js → index-d1493bab.js} +2 -1
  19. package/dist/cjs/index.cjs.js +13 -10
  20. package/dist/cjs/loader.cjs.js +2 -2
  21. package/dist/cjs/recs-initialization-helper.cjs.entry.js +55 -0
  22. package/dist/cjs/recs-results-manager.cjs.entry.js +26 -0
  23. package/dist/cjs/results-manager.cjs.entry.js +2 -2
  24. package/dist/cjs/sample-component.cjs.entry.js +2 -2
  25. package/dist/cjs/standalone-searchbox-listener.cjs.entry.js +2 -2
  26. package/dist/cjs/strip-html-component.cjs.entry.js +1 -1
  27. package/dist/collection/collection-manifest.json +2 -0
  28. package/dist/collection/components/faq-popup-component/faq-popup-component.css +7 -1
  29. package/dist/collection/components/faq-popup-component/faq-popup-component.js +22 -2
  30. package/dist/collection/components/recs-initialization-helper/recs-initialization-helper.js +66 -0
  31. package/dist/collection/components/recs-results-manager/recs-results-manager.js +24 -0
  32. package/dist/collection/index.js +5 -2
  33. package/dist/components/index.d.ts +12 -0
  34. package/dist/components/index.js +172 -19
  35. package/dist/esm/abi.js +2 -2
  36. package/dist/esm/faq-popup-component.entry.js +5 -4
  37. package/dist/esm/{index-4e0bf5cd.js → index-072be88f.js} +2 -2
  38. package/dist/esm/{index-3c594d24.js → index-66fdbb35.js} +82 -3
  39. package/dist/esm/index.js +13 -10
  40. package/dist/esm/loader.js +2 -2
  41. package/dist/esm/recs-initialization-helper.entry.js +51 -0
  42. package/dist/esm/recs-results-manager.entry.js +22 -0
  43. package/dist/esm/results-manager.entry.js +2 -2
  44. package/dist/esm/sample-component.entry.js +2 -2
  45. package/dist/esm/standalone-searchbox-listener.entry.js +2 -2
  46. package/dist/esm/strip-html-component.entry.js +1 -1
  47. package/dist/types/components/faq-popup-component/faq-popup-component.d.ts +1 -0
  48. package/dist/types/components/recs-initialization-helper/recs-initialization-helper.d.ts +6 -0
  49. package/dist/types/components/recs-results-manager/recs-results-manager.d.ts +8 -0
  50. package/dist/types/components.d.ts +30 -0
  51. package/package.json +1 -1
  52. package/src/components/faq-popup-component/faq-popup-component.css +7 -1
  53. package/src/components/faq-popup-component/faq-popup-component.tsx +4 -4
  54. package/src/components/recs-initialization-helper/recs-initialization-helper.tsx +54 -0
  55. package/src/components/recs-results-manager/FaqTemplateRec.html +19 -0
  56. package/src/components/recs-results-manager/QuickLinksRec.html +16 -0
  57. package/src/components/recs-results-manager/defaultRec.html +14 -0
  58. package/src/components/recs-results-manager/recs-results-manager.tsx +38 -0
  59. package/src/components/results-manager/FAQTemplate.html +1 -1
  60. package/src/components.d.ts +30 -0
  61. package/src/index.ts +4 -2
  62. package/src/pages/recs.html +17 -20
  63. package/src/style/index.css +2 -2
  64. package/dist/abi/p-b267e2bb.entry.js +0 -1
  65. package/dist/abi/p-d6d34d34.js +0 -2
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@coveops/abi",
3
3
  "description": "Abi project",
4
- "version": "1.3.1",
4
+ "version": "1.5.1",
5
5
  "private": false,
6
6
  "main": "dist/index.cjs.js",
7
7
  "module": "dist/index.js",
@@ -1,9 +1,15 @@
1
1
  b {
2
2
  color: var(--atomic-primary);
3
3
  }
4
- :host {
4
+
5
+ .search-css {
5
6
  color: #CAA144 !important;
6
7
  font-size: 1.7rem !important;
7
8
  max-height: unset !important;
8
9
  line-height: normal !important;
10
+ }
11
+
12
+
13
+ :host {
14
+ cursor: pointer;
9
15
  }
@@ -1,5 +1,5 @@
1
1
 
2
- import { Component, h, Element, State, Host } from "@stencil/core";
2
+ import { Component, h, Element, State, Host, Prop } from "@stencil/core";
3
3
  import { LogClickEventActionCreatorPayload, loadGenericAnalyticsActions } from '@coveo/headless';
4
4
  import { resultContext, Bindings, initializeBindings } from "@coveo/atomic";
5
5
 
@@ -13,7 +13,7 @@ import {
13
13
  shadow: true,
14
14
  })
15
15
  export class FaqPopupComponent {
16
-
16
+ @Prop() origin?: string;
17
17
  private bindings?: Bindings;
18
18
  private modalElement?: any;
19
19
 
@@ -164,9 +164,9 @@ export class FaqPopupComponent {
164
164
  if (!this.result) {
165
165
  return;
166
166
  }
167
-
167
+ const cssCondition = this.origin === 'searchResult' ? 'search-css' : '';
168
168
  return (
169
- <Host className="clickable-host" onClick={() => this.openFAQModal(this.result!)}>
169
+ <Host className={`clickable-host ${cssCondition}`} onClick={() => this.openFAQModal(this.result!)}>
170
170
  {this.result.title}
171
171
  </Host>
172
172
  );
@@ -0,0 +1,54 @@
1
+ import { Bindings, initializeBindings } from "@coveo/atomic";
2
+ import { Component, Element, Prop } from "@stencil/core";
3
+ import { waitForAtomic } from "../../utils/atomic";
4
+ import { buildContext } from "@coveo/headless";
5
+
6
+ @Component({
7
+ tag: "recs-initialization-helper",
8
+ shadow: true,
9
+ })
10
+ export class RecsInitializationHelper {
11
+ @Prop() userCountry!: string;
12
+ private bindings?: Bindings;
13
+ @Element() private host!: Element;
14
+
15
+ public async connectedCallback() {
16
+ try {
17
+ await waitForAtomic();
18
+ this.bindings = await initializeBindings(this.host);
19
+ let toDate = new Date().toISOString();
20
+ let fromDate = new Date();
21
+ if(fromDate.getMonth() == 1) {
22
+ fromDate.setMonth(12);
23
+ fromDate.setFullYear(fromDate.getFullYear() - 1);
24
+ }
25
+ else {
26
+ fromDate.setMonth(fromDate.getMonth() - 1);
27
+ }
28
+ let filter = encodeURIComponent(`(clicks.c_user_country=='${this.userCountry}')`);
29
+
30
+ let url = `https://${this.bindings?.engine.state.configuration.organizationId}.admin.org.coveo.com/rest/ua/v15/stats/combinedData?from=${fromDate.toISOString()}&to=${toDate}&m=DocumentView&d=documentTitle&d=documentURL&d=clicks.c_user_country&&d=documentSysUriHash&f=${filter}&p=1&n=10&s=DocumentView&asc=false&includeMetadata=true`;
31
+ const reqHeaders = new Headers();
32
+ reqHeaders.append("authorization", "Bearer xxf42da36f-db11-4565-8358-8bac8c307236");
33
+
34
+ const requestOptions = {
35
+ method: "GET",
36
+ headers: reqHeaders
37
+ };
38
+
39
+ let response:any = await fetch(url, requestOptions);
40
+ response = await response.json();
41
+ debugger;
42
+ if(response.combinations.length>0) {
43
+ let dqExp = response.combinations.map((c:any) => c.documentSysUriHash);
44
+ buildContext(this.bindings.engine).add("dqExp", dqExp);
45
+ (this.bindings.interfaceElement as any).getRecommendations();
46
+ }
47
+ else {
48
+ debugger;
49
+ }
50
+ } catch (error) {
51
+ console.error(error);
52
+ }
53
+ }
54
+ }
@@ -0,0 +1,19 @@
1
+
2
+ <style>
3
+ atomic-result-link{
4
+ font-size: 1.3rem !important;
5
+ color: #626971 !important;
6
+ }
7
+ faq-popup-component{
8
+ font-size: 1.3rem; color: #626971 !important;
9
+ }
10
+ faq-popup-component:hover{
11
+ text-decoration: underline;
12
+ }
13
+ hr {
14
+ margin-top: 20px !important;
15
+ }
16
+ </style>
17
+ <faq-popup-component></faq-popup-component>
18
+ <hr/>
19
+
@@ -0,0 +1,16 @@
1
+ <style>
2
+ atomic-result-link a {
3
+ font-size: 1.3rem;
4
+ color: #626971 !important;
5
+ }
6
+ hr {
7
+ margin-top: 20px !important;
8
+ }
9
+ </style>
10
+
11
+
12
+ <atomic-result-section-title>
13
+ <atomic-result-link href-template='${raw.sfppcustomlinkcpplinkurlc}'><a slot="attributes" target="_blank"></a>
14
+ </atomic-result-link>
15
+ <hr/>
16
+ </atomic-result-section-title>
@@ -0,0 +1,14 @@
1
+ <style>
2
+ atomic-result-link a {
3
+ font-size: 1.3rem;
4
+ color: #626971 !important;
5
+ }
6
+ hr {
7
+ margin-top: 20px !important;
8
+ }
9
+ </style>
10
+ <atomic-result-section-title>
11
+ <atomic-result-link><a slot="attributes" target="_blank"></a>
12
+ </atomic-result-link>
13
+ <hr/>
14
+ </atomic-result-section-title>
@@ -0,0 +1,38 @@
1
+ import { Component, h } from "@stencil/core";
2
+ import { waitForRecsAtomic } from "../../utils/atomic";
3
+ import FaqTemplateRec from "./FaqTemplateRec.html";
4
+ import QuickLinksRec from "./QuickLinksRec.html";
5
+ import defaultRec from "./defaultRec.html";
6
+
7
+
8
+ /**
9
+ * Component used to manage results & result templates.
10
+ * See https://docs.coveo.com/en/atomic/latest/usage/create-a-result-list/
11
+ */
12
+ @Component({
13
+ tag: "recs-results-manager",
14
+ shadow: false,
15
+ })
16
+ export class RecsResultsManager {
17
+ public async componentWillLoad() {
18
+ return waitForRecsAtomic();
19
+ }
20
+
21
+ public render() {
22
+
23
+
24
+ return (
25
+ <atomic-recs-list number-of-recommendations="5">
26
+ <atomic-recs-result-template must-match-abicontenttype='FAQ'>
27
+ <template innerHTML={FaqTemplateRec}></template>
28
+ </atomic-recs-result-template>
29
+ <atomic-recs-result-template must-match-abicontenttype='Quick Links'>
30
+ <template innerHTML={QuickLinksRec}></template>
31
+ </atomic-recs-result-template>
32
+ <atomic-recs-result-template>
33
+ <template innerHTML={defaultRec}></template>
34
+ </atomic-recs-result-template>
35
+ </atomic-recs-list>
36
+ );
37
+ }
38
+ }
@@ -91,7 +91,7 @@ atomic-result-section-visual {
91
91
  </atomic-result-section-visual>
92
92
 
93
93
  <atomic-result-section-title>
94
- <faq-popup-component></faq-popup-component>
94
+ <faq-popup-component origin="searchResult"></faq-popup-component>
95
95
  </atomic-result-section-title>
96
96
 
97
97
  <atomic-result-section-excerpt>
@@ -7,6 +7,12 @@
7
7
  import { HTMLStencilElement, JSXBase } from "@stencil/core/internal";
8
8
  export namespace Components {
9
9
  interface FaqPopupComponent {
10
+ "origin"?: string;
11
+ }
12
+ interface RecsInitializationHelper {
13
+ "userCountry": string;
14
+ }
15
+ interface RecsResultsManager {
10
16
  }
11
17
  interface ResultsManager {
12
18
  }
@@ -24,6 +30,18 @@ declare global {
24
30
  prototype: HTMLFaqPopupComponentElement;
25
31
  new (): HTMLFaqPopupComponentElement;
26
32
  };
33
+ interface HTMLRecsInitializationHelperElement extends Components.RecsInitializationHelper, HTMLStencilElement {
34
+ }
35
+ var HTMLRecsInitializationHelperElement: {
36
+ prototype: HTMLRecsInitializationHelperElement;
37
+ new (): HTMLRecsInitializationHelperElement;
38
+ };
39
+ interface HTMLRecsResultsManagerElement extends Components.RecsResultsManager, HTMLStencilElement {
40
+ }
41
+ var HTMLRecsResultsManagerElement: {
42
+ prototype: HTMLRecsResultsManagerElement;
43
+ new (): HTMLRecsResultsManagerElement;
44
+ };
27
45
  interface HTMLResultsManagerElement extends Components.ResultsManager, HTMLStencilElement {
28
46
  }
29
47
  var HTMLResultsManagerElement: {
@@ -50,6 +68,8 @@ declare global {
50
68
  };
51
69
  interface HTMLElementTagNameMap {
52
70
  "faq-popup-component": HTMLFaqPopupComponentElement;
71
+ "recs-initialization-helper": HTMLRecsInitializationHelperElement;
72
+ "recs-results-manager": HTMLRecsResultsManagerElement;
53
73
  "results-manager": HTMLResultsManagerElement;
54
74
  "sample-component": HTMLSampleComponentElement;
55
75
  "standalone-searchbox-listener": HTMLStandaloneSearchboxListenerElement;
@@ -58,6 +78,12 @@ declare global {
58
78
  }
59
79
  declare namespace LocalJSX {
60
80
  interface FaqPopupComponent {
81
+ "origin"?: string;
82
+ }
83
+ interface RecsInitializationHelper {
84
+ "userCountry": string;
85
+ }
86
+ interface RecsResultsManager {
61
87
  }
62
88
  interface ResultsManager {
63
89
  }
@@ -69,6 +95,8 @@ declare namespace LocalJSX {
69
95
  }
70
96
  interface IntrinsicElements {
71
97
  "faq-popup-component": FaqPopupComponent;
98
+ "recs-initialization-helper": RecsInitializationHelper;
99
+ "recs-results-manager": RecsResultsManager;
72
100
  "results-manager": ResultsManager;
73
101
  "sample-component": SampleComponent;
74
102
  "standalone-searchbox-listener": StandaloneSearchboxListener;
@@ -80,6 +108,8 @@ declare module "@stencil/core" {
80
108
  export namespace JSX {
81
109
  interface IntrinsicElements {
82
110
  "faq-popup-component": LocalJSX.FaqPopupComponent & JSXBase.HTMLAttributes<HTMLFaqPopupComponentElement>;
111
+ "recs-initialization-helper": LocalJSX.RecsInitializationHelper & JSXBase.HTMLAttributes<HTMLRecsInitializationHelperElement>;
112
+ "recs-results-manager": LocalJSX.RecsResultsManager & JSXBase.HTMLAttributes<HTMLRecsResultsManagerElement>;
83
113
  "results-manager": LocalJSX.ResultsManager & JSXBase.HTMLAttributes<HTMLResultsManagerElement>;
84
114
  "sample-component": LocalJSX.SampleComponent & JSXBase.HTMLAttributes<HTMLSampleComponentElement>;
85
115
  "standalone-searchbox-listener": LocalJSX.StandaloneSearchboxListener & JSXBase.HTMLAttributes<HTMLStandaloneSearchboxListenerElement>;
package/src/index.ts CHANGED
@@ -137,6 +137,7 @@ async function initRecs() {
137
137
  const accessToken = process.env.API_KEY!;
138
138
 
139
139
  const recsInterface:HTMLAtomicRecsInterfaceElement = document.querySelector('#recs')!;
140
+ recsInterface.querySelector("recs-initialization-helper")?.setAttribute("user-country","BE");
140
141
  await recsInterface?.initialize({
141
142
  accessToken: accessToken,
142
143
  organizationId: organizationId,
@@ -146,14 +147,15 @@ async function initRecs() {
146
147
  var body = JSON.parse(request.body as string);
147
148
  body.context = {
148
149
  "user_country": "CZ",
149
- "user_country_snow": "CZ"
150
+ "user_country_snow": "CZ",
151
+ ...body.context
150
152
  };
151
153
  request.body = JSON.stringify(body);
152
154
  }
153
155
  return request;
154
156
  }
155
157
  });
156
- recsInterface?.getRecommendations();
158
+ //recsInterface?.getRecommendations();
157
159
  /*await Promise.all(
158
160
  recsInterfaces.map(async (recommendationInterface: { initialize: (arg0: { accessToken: string; organizationId: string; }) => any; getOrganizationEndpoints: (arg0: string) => any; }) =>
159
161
  recommendationInterface.initialize({
@@ -28,27 +28,24 @@
28
28
 
29
29
  <body>
30
30
  <div class="atomic-recs-layout">
31
- <atomic-recs-interface search-hub="abirec" id="recs" pipeline="Content Recommendation EU" fields-to-include='["abicontenttype","spsitename","spsiteuri"]'>
31
+ <atomic-recs-interface search-hub="abirecsnow" id="recs" pipeline="Content Recommendation EU SNOW" fields-to-include='["abicontenttype","sfppcustomlinkcpplinkurlc","spsitename","spsiteuri","answer","category"]'>
32
+ <atomic-modal id="faq-modal" is-open="false">
33
+ <div slot="header" style="display: grid;grid-template-columns: 5fr 01fr; width:100%;">
34
+ <div class="header-title" style="padding-top:2%;">This is a title</div>
35
+ <div id="faq-modal-close" style="text-align: end;">
36
+ <svg width="48" height="49" viewBox="0 0 48 49" fill="black" xmlns="http://www.w3.org/2000/svg">
37
+ <rect y="0.5" width="48" height="48" rx="24" fill="white"/>
38
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M22.5382 24.5L15 16.9618L16.4618 15.5L24 23.0382L31.5382 15.5L33 16.9618L25.4618 24.5L33 32.0382L31.5382 33.5L24 25.9618L16.4618 33.5L15 32.0382L22.5382 24.5Z" fill="#17171A"/>
39
+ </svg>
40
+ </div>
41
+
42
+ </div>
43
+ <div slot="body" style="max-width: none;">This is the body</div>
44
+ <div slot="footer"><button id="btn-done">Done</button></div>
45
+ </atomic-modal>
32
46
  <div class="recommendation-title">Recommendations</div>
33
- <atomic-recs-list number-of-recommendations="10"
34
- number-of-recommendations-per-page="5">
35
- <atomic-recs-result-template>
36
- <template>
37
- <style>
38
- atomic-result-link a {
39
- font-size: 1.3rem;
40
- color: #626971 !important;
41
- }
42
- </style>
43
- <atomic-result-section-title>
44
- <atomic-result-link>
45
- <a slot="attributes" target="_blank"></a>
46
- </atomic-result-link>
47
- <hr>
48
- </atomic-result-section-title>
49
- </template>
50
- </atomic-recs-result-template>
51
- </atomic-recs-list>
47
+ <recs-results-manager></recs-results-manager>
48
+ <recs-initialization-helper></recs-initialization-helper>
52
49
  </atomic-recs-interface>
53
50
  </div>
54
51
  </body>
@@ -164,11 +164,11 @@ atomic-recs-list::part(outline){
164
164
  border : none;
165
165
  }
166
166
  atomic-recs-list::part(result-list-grid-clickable-container):hover {
167
- text-decoration: underline;
168
167
  box-shadow: none;
169
168
  }
170
- atomic-recs-list::part(result-list-grid-clickable-container) {
169
+ atomic-recs-list::part(result-list-grid-clickable) {
171
170
  padding: 10px;
171
+ pointer-events: none;
172
172
  }
173
173
 
174
174
  .atomic-recs-layout {
@@ -1 +0,0 @@
1
- import{r as i,h as s,g as o,H as t}from"./p-d6d34d34.js";import{i as l,f as a,a as n,m as r,$ as d}from"./p-b984457f.js";import{w as e}from"./p-c82303fb.js";import"./p-d20ee37c.js";const v=class{constructor(s){i(this,s)}async connectedCallback(){var i;try{await e(),this.bindings=await l(this.host),null===(i=this.bindings)||void 0===i||i.i18n.addResourceBundle("en","translation",{"search-tips":"You may want to try using different keywords or checking for spelling mistakes."})}catch(i){console.error(i)}}async handleStandaloneSearchbox(i){var s,o,t,l,e,v,c,h,u,p;let m=a(null===(s=this.bindings)||void 0===s?void 0:s.engine);null===(t=null===(o=this.bindings)||void 0===o?void 0:o.engine)||void 0===t||t.dispatch(m.updateQuery({q:i.detail}));let f=n(null===(l=this.bindings)||void 0===l?void 0:l.engine);null===(v=null===(e=this.bindings)||void 0===e?void 0:e.engine)||void 0===v||v.dispatch(f.updatePage(1));let y=r(null===(c=this.bindings)||void 0===c?void 0:c.engine),b=d(null===(h=this.bindings)||void 0===h?void 0:h.engine);null===(p=null===(u=this.bindings)||void 0===u?void 0:u.engine)||void 0===p||p.dispatch(b.executeSearch(y.logSearchboxSubmit()))}render(){return s(t,null)}get host(){return o(this)}};v.style="";export{v as standalone_searchbox_listener}
@@ -1,2 +0,0 @@
1
- let e,t,n=!1,l=!1;const s="undefined"!=typeof window?window:{},o=s.document||{head:{}},c={t:0,l:"",jmp:e=>e(),raf:e=>requestAnimationFrame(e),ael:(e,t,n,l)=>e.addEventListener(t,n,l),rel:(e,t,n,l)=>e.removeEventListener(t,n,l),ce:(e,t)=>new CustomEvent(e,t)},r=e=>Promise.resolve(e),i=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync}catch(e){}return!1})(),a=(e,t,n)=>{n&&n.map((([n,l,s])=>{const o=f(e,n),r=u(t,s),i=$(n);c.ael(o,l,r,i),(t.o=t.o||[]).push((()=>c.rel(o,l,r,i)))}))},u=(e,t)=>n=>{try{256&e.t?e.i[t](n):(e.u=e.u||[]).push([t,n])}catch(e){K(e)}},f=(e,t)=>8&t?s:e,$=e=>0!=(2&e),y=new WeakMap,d=e=>"sc-"+e.$,h={},m=e=>"object"==(e=typeof e)||"function"===e,p=(e,t,...n)=>{let l=null,s=!1,o=!1;const c=[],r=t=>{for(let n=0;n<t.length;n++)l=t[n],Array.isArray(l)?r(l):null!=l&&"boolean"!=typeof l&&((s="function"!=typeof e&&!m(l))&&(l+=""),s&&o?c[c.length-1].h+=l:c.push(s?w(null,l):l),o=s)};if(r(n),t){const e=t.className||t.class;e&&(t.class="object"!=typeof e?e:Object.keys(e).filter((t=>e[t])).join(" "))}const i=w(e,null);return i.m=t,c.length>0&&(i.p=c),i},w=(e,t)=>({t:0,g:e,h:t,v:null,p:null,m:null}),b={},g=(e,t,n,l,o,r)=>{if(n!==l){let i=J(e,t),a=t.toLowerCase();if("class"===t){const t=e.classList,s=S(n),o=S(l);t.remove(...s.filter((e=>e&&!o.includes(e)))),t.add(...o.filter((e=>e&&!s.includes(e))))}else if("style"===t){for(const t in n)l&&null!=l[t]||(t.includes("-")?e.style.removeProperty(t):e.style[t]="");for(const t in l)n&&l[t]===n[t]||(t.includes("-")?e.style.setProperty(t,l[t]):e.style[t]=l[t])}else if(i||"o"!==t[0]||"n"!==t[1]){const s=m(l);if((i||s&&null!==l)&&!o)try{if(e.tagName.includes("-"))e[t]=l;else{const s=null==l?"":l;"list"===t?i=!1:null!=n&&e[t]==s||(e[t]=s)}}catch(e){}null==l||!1===l?!1===l&&""!==e.getAttribute(t)||e.removeAttribute(t):(!i||4&r||o)&&!s&&e.setAttribute(t,l=!0===l?"":l)}else t="-"===t[2]?t.slice(3):J(s,a)?a.slice(2):a[2]+t.slice(3),n&&c.rel(e,t,n,!1),l&&c.ael(e,t,l,!1)}},v=/\s/,S=e=>e?e.split(v):[],j=(e,t,n,l)=>{const s=11===t.v.nodeType&&t.v.host?t.v.host:t.v,o=e&&e.m||h,c=t.m||h;for(l in o)l in c||g(s,l,o[l],void 0,n,t.t);for(l in c)g(s,l,o[l],c[l],n,t.t)},k=(t,l,s)=>{const c=l.p[s];let r,i,a=0;if(null!==c.h)r=c.v=o.createTextNode(c.h);else{if(n||(n="svg"===c.g),r=c.v=o.createElementNS(n?"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",c.g),n&&"foreignObject"===c.g&&(n=!1),j(null,c,n),null!=e&&r["s-si"]!==e&&r.classList.add(r["s-si"]=e),c.p)for(a=0;a<c.p.length;++a)i=k(t,c,a),i&&r.appendChild(i);"svg"===c.g?n=!1:"foreignObject"===r.tagName&&(n=!0)}return r},C=(e,n,l,s,o,c)=>{let r,i=e;for(i.shadowRoot&&i.tagName===t&&(i=i.shadowRoot);o<=c;++o)s[o]&&(r=k(null,l,o),r&&(s[o].v=r,i.insertBefore(r,n)))},O=(e,t,n,l)=>{for(;t<=n;++t)(l=e[t])&&l.v.remove()},M=(e,t)=>e.g===t.g,x=(e,t)=>{const l=t.v=e.v,s=e.p,o=t.p,c=t.g,r=t.h;null===r?(n="svg"===c||"foreignObject"!==c&&n,j(e,t,n),null!==s&&null!==o?((e,t,n,l)=>{let s,o=0,c=0,r=t.length-1,i=t[0],a=t[r],u=l.length-1,f=l[0],$=l[u];for(;o<=r&&c<=u;)null==i?i=t[++o]:null==a?a=t[--r]:null==f?f=l[++c]:null==$?$=l[--u]:M(i,f)?(x(i,f),i=t[++o],f=l[++c]):M(a,$)?(x(a,$),a=t[--r],$=l[--u]):M(i,$)?(x(i,$),e.insertBefore(i.v,a.v.nextSibling),i=t[++o],$=l[--u]):M(a,f)?(x(a,f),e.insertBefore(a.v,i.v),a=t[--r],f=l[++c]):(s=k(t&&t[c],n,c),f=l[++c],s&&i.v.parentNode.insertBefore(s,i.v));o>r?C(e,null==l[u+1]?null:l[u+1].v,n,l,c,u):c>u&&O(t,o,r)})(l,s,t,o):null!==o?(null!==e.h&&(l.textContent=""),C(l,null,t,o,0,o.length-1)):null!==s&&O(s,0,s.length-1),n&&"svg"===c&&(n=!1)):e.h!==r&&(l.data=r)},P=e=>D(e).S,E=(e,t)=>{t&&!e.j&&t["s-p"]&&t["s-p"].push(new Promise((t=>e.j=t)))},L=(e,t)=>{if(e.t|=16,!(4&e.t))return E(e,e.k),oe((()=>N(e,t)));e.t|=512},N=(e,t)=>{const n=e.i;let l;return t&&(e.t|=256,e.u&&(e.u.map((([e,t])=>U(n,e,t))),e.u=null),l=U(n,"componentWillLoad")),q(l,(()=>T(e,n,t)))},T=async(e,t,n)=>{const l=e.S,s=l["s-rc"];n&&(e=>{const t=e.C,n=e.S,l=t.t,s=((e,t)=>{let n=d(t);const l=Y.get(n);if(e=11===e.nodeType?e:o,l)if("string"==typeof l){let t,s=y.get(e=e.head||e);s||y.set(e,s=new Set),s.has(n)||(t=o.createElement("style"),t.innerHTML=l,e.insertBefore(t,e.querySelector("link")),s&&s.add(n))}else e.adoptedStyleSheets.includes(l)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,l]);return n})(n.shadowRoot?n.shadowRoot:n.getRootNode(),t);10&l&&(n["s-sc"]=s,n.classList.add(s+"-h"))})(e);W(e,t),s&&(s.map((e=>e())),l["s-rc"]=void 0);{const t=l["s-p"],n=()=>A(e);0===t.length?n():(Promise.all(t).then(n),e.t|=4,t.length=0)}},W=(n,l)=>{try{l=l.render(),n.t&=-17,n.t|=2,((n,l)=>{const s=n.S,o=n.O||w(null,null),c=(e=>e&&e.g===b)(l)?l:p(null,null,l);t=s.tagName,c.g=null,c.t|=4,n.O=c,c.v=o.v=s.shadowRoot||s,e=s["s-sc"],x(o,c)})(n,l)}catch(e){K(e,n.S)}return null},A=e=>{const t=e.S,n=e.k;64&e.t||(e.t|=64,F(t),e.M(t),n||R()),e.j&&(e.j(),e.j=void 0),512&e.t&&se((()=>L(e,!1))),e.t&=-517},H=e=>{{const t=D(e),n=t.S.isConnected;return n&&2==(18&t.t)&&L(t,!1),n}},R=()=>{F(o.documentElement),se((()=>(e=>{const t=c.ce("appload",{detail:{namespace:"abi"}});return e.dispatchEvent(t),t})(s)))},U=(e,t,n)=>{if(e&&e[t])try{return e[t](n)}catch(e){K(e)}},q=(e,t)=>e&&e.then?e.then(t):t(),F=e=>e.classList.add("hydrated"),V=(e,t,n)=>{if(t.P){const l=Object.entries(t.P),s=e.prototype;l.map((([e,[t]])=>{(31&t||2&n&&32&t)&&Object.defineProperty(s,e,{get(){return((e,t)=>D(this).L.get(t))(0,e)},set(t){((e,t,n)=>{const l=D(e),s=l.L.get(t),o=l.t,c=l.i;n=(e=>(null==e||m(e),e))(n),8&o&&void 0!==s||n===s||Number.isNaN(s)&&Number.isNaN(n)||(l.L.set(t,n),c&&2==(18&o)&&L(l,!1))})(this,e,t)},configurable:!0,enumerable:!0})}))}return e},_=e=>{U(e,"connectedCallback")},z=(e,t={})=>{const n=[],l=t.exclude||[],r=s.customElements,u=o.head,f=u.querySelector("meta[charset]"),$=o.createElement("style"),y=[];let h,m=!0;Object.assign(c,t),c.l=new URL(t.resourcesUrl||"./",o.baseURI).href,e.map((e=>{e[1].map((t=>{const s={t:t[0],$:t[1],P:t[2],N:t[3]};s.P=t[2],s.N=t[3];const o=s.$,u=class extends HTMLElement{constructor(e){super(e),I(e=this,s),1&s.t&&e.attachShadow({mode:"open"})}connectedCallback(){h&&(clearTimeout(h),h=null),m?y.push(this):c.jmp((()=>(e=>{if(0==(1&c.t)){const t=D(e),n=t.C,l=()=>{};if(1&t.t)a(e,t,n.N),_(t.i);else{t.t|=1;{let n=e;for(;n=n.parentNode||n.host;)if(n["s-p"]){E(t,t.k=n);break}}(async(e,t,n,l,s)=>{if(0==(32&t.t)){{if(t.t|=32,(s=X(n)).then){const e=()=>{};s=await s,e()}s.isProxied||(V(s,n,2),s.isProxied=!0);const e=()=>{};t.t|=8;try{new s(t)}catch(e){K(e)}t.t&=-9,e(),_(t.i)}if(s.style){let e=s.style;const t=d(n);if(!Y.has(t)){const l=()=>{};((e,t,n)=>{let l=Y.get(e);i&&n?(l=l||new CSSStyleSheet,"string"==typeof l?l=t:l.replaceSync(t)):l=t,Y.set(e,l)})(t,e,!!(1&n.t)),l()}}}const o=t.k,c=()=>L(t,!0);o&&o["s-rc"]?o["s-rc"].push(c):c()})(0,t,n)}l()}})(this)))}disconnectedCallback(){c.jmp((()=>(()=>{if(0==(1&c.t)){const e=D(this),t=e.i;e.o&&(e.o.map((e=>e())),e.o=void 0),U(t,"disconnectedCallback")}})()))}componentOnReady(){return D(this).T}};s.W=e[0],l.includes(o)||r.get(o)||(n.push(o),r.define(o,V(u,s,1)))}))})),$.innerHTML=n+"{visibility:hidden}.hydrated{visibility:inherit}",$.setAttribute("data-styles",""),u.insertBefore($,f?f.nextSibling:u.firstChild),m=!1,y.length?y.map((e=>e.connectedCallback())):c.jmp((()=>h=setTimeout(R,30)))},B=new WeakMap,D=e=>B.get(e),G=(e,t)=>B.set(t.i=e,t),I=(e,t)=>{const n={t:0,S:e,C:t,L:new Map};return n.T=new Promise((e=>n.M=e)),e["s-p"]=[],e["s-rc"]=[],a(e,n,t.N),B.set(e,n)},J=(e,t)=>t in e,K=(e,t)=>(0,console.error)(e,t),Q=new Map,X=e=>{const t=e.$.replace(/-/g,"_"),n=e.W,l=Q.get(n);return l?l[t]:import(`./${n}.entry.js`).then((e=>(Q.set(n,e),e[t])),K)
2
- /*!__STENCIL_STATIC_IMPORT_SWITCH__*/},Y=new Map,Z=[],ee=[],te=(e,t)=>n=>{e.push(n),l||(l=!0,t&&4&c.t?se(le):c.raf(le))},ne=e=>{for(let t=0;t<e.length;t++)try{e[t](performance.now())}catch(e){K(e)}e.length=0},le=()=>{ne(Z),ne(ee),(l=Z.length>0)&&c.raf(le)},se=e=>r().then(e),oe=te(ee,!0);export{b as H,z as b,H as f,P as g,p as h,r as p,G as r}