@coveops/abi 1.5.8 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (92) hide show
  1. package/dist/abi/abi.css +206 -1
  2. package/dist/abi/abi.esm.js +129 -1
  3. package/dist/abi/app-globals-0f993ce5.js +3 -0
  4. package/dist/abi/css-shim-04165e59.js +4 -0
  5. package/dist/abi/dom-26e7cb2c.js +73 -0
  6. package/dist/{esm → abi}/faq-popup-component.entry.js +3 -4
  7. package/dist/abi/headless.esm-c328011d.js +72 -0
  8. package/dist/abi/index-4c45f50c.js +3064 -0
  9. package/dist/abi/index-bf9cad6e.js +4108 -0
  10. package/dist/abi/index.esm.js +168 -1
  11. package/dist/{esm → abi}/recs-initialization-helper.entry.js +3 -3
  12. package/dist/{esm → abi}/recs-results-manager.entry.js +1 -1
  13. package/dist/{esm → abi}/results-manager.entry.js +1 -1
  14. package/dist/{esm → abi}/sample-component.entry.js +3 -3
  15. package/dist/abi/shadow-css-1257b266.js +387 -0
  16. package/dist/{esm → abi}/standalone-searchbox-listener.entry.js +3 -3
  17. package/dist/{esm → abi}/strip-html-component.entry.js +2 -3
  18. package/package.json +2 -2
  19. package/dist/abi/p-380ced38.entry.js +0 -1
  20. package/dist/abi/p-9d42030c.entry.js +0 -1
  21. package/dist/abi/p-ac870f21.js +0 -49
  22. package/dist/abi/p-b09970bf.entry.js +0 -1
  23. package/dist/abi/p-b83bab81.js +0 -1
  24. package/dist/abi/p-c0436bc1.entry.js +0 -1
  25. package/dist/abi/p-c10b6b7f.js +0 -2
  26. package/dist/abi/p-c602c74e.entry.js +0 -1
  27. package/dist/abi/p-c82303fb.js +0 -1
  28. package/dist/abi/p-cd1744bb.entry.js +0 -1
  29. package/dist/abi/p-d20ee37c.js +0 -18
  30. package/dist/abi/p-d5e62885.entry.js +0 -1
  31. package/dist/bundle/index.css +0 -1
  32. package/dist/bundle/index.html +0 -72
  33. package/dist/bundle/index.js +0 -1363
  34. package/dist/cjs/abi.cjs.js +0 -19
  35. package/dist/cjs/atomic-70a93c69.js +0 -11
  36. package/dist/cjs/faq-popup-component.cjs.entry.js +0 -144
  37. package/dist/cjs/headless.esm-085e70ed-f2e18485.js +0 -1720
  38. package/dist/cjs/index-3cecd23d.js +0 -1283
  39. package/dist/cjs/index-d1493bab.js +0 -105
  40. package/dist/cjs/index.cjs.js +0 -170
  41. package/dist/cjs/loader.cjs.js +0 -21
  42. package/dist/cjs/recs-initialization-helper.cjs.entry.js +0 -55
  43. package/dist/cjs/recs-results-manager.cjs.entry.js +0 -36
  44. package/dist/cjs/result-template-decorators-881a4c8e-4ff46481.js +0 -33
  45. package/dist/cjs/results-manager.cjs.entry.js +0 -42
  46. package/dist/cjs/sample-component.cjs.entry.js +0 -87
  47. package/dist/cjs/standalone-searchbox-listener.cjs.entry.js +0 -48
  48. package/dist/cjs/strip-html-component.cjs.entry.js +0 -60
  49. package/dist/collection/collection-manifest.json +0 -23
  50. package/dist/collection/components/faq-popup-component/faq-popup-component.css +0 -15
  51. package/dist/collection/components/faq-popup-component/faq-popup-component.js +0 -162
  52. package/dist/collection/components/recs-initialization-helper/recs-initialization-helper.js +0 -66
  53. package/dist/collection/components/recs-results-manager/recs-results-manager.js +0 -39
  54. package/dist/collection/components/results-manager/results-manager.js +0 -50
  55. package/dist/collection/components/sample-component/sample-component.css +0 -10
  56. package/dist/collection/components/sample-component/sample-component.js +0 -102
  57. package/dist/collection/components/standalone-searchbox-listener/standalone-searchbox-listener.css +0 -1
  58. package/dist/collection/components/standalone-searchbox-listener/standalone-searchbox-listener.js +0 -50
  59. package/dist/collection/components/strip-html-component/strip-html-component.css +0 -3
  60. package/dist/collection/components/strip-html-component/strip-html-component.js +0 -64
  61. package/dist/collection/images/Default.png +0 -0
  62. package/dist/collection/images/Documents.png +0 -0
  63. package/dist/collection/images/FAQ.png +0 -0
  64. package/dist/collection/images/Images.png +0 -0
  65. package/dist/collection/images/Link.png +0 -0
  66. package/dist/collection/images/Movies.png +0 -0
  67. package/dist/collection/images/ProcessPeople.png +0 -0
  68. package/dist/collection/index.js +0 -167
  69. package/dist/collection/utils/atomic.js +0 -6
  70. package/dist/components/index.js +0 -3576
  71. package/dist/esm/abi.js +0 -17
  72. package/dist/esm/headless.esm-085e70ed-c4dfb380.js +0 -1717
  73. package/dist/esm/index-072be88f.js +0 -95
  74. package/dist/esm/index-66fdbb35.js +0 -1255
  75. package/dist/esm/index.js +0 -168
  76. package/dist/esm/loader.js +0 -17
  77. package/dist/esm/polyfills/core-js.js +0 -11
  78. package/dist/esm/polyfills/css-shim.js +0 -1
  79. package/dist/esm/polyfills/dom.js +0 -79
  80. package/dist/esm/polyfills/es5-html-element.js +0 -1
  81. package/dist/esm/polyfills/index.js +0 -34
  82. package/dist/esm/polyfills/system.js +0 -6
  83. package/dist/esm/result-template-decorators-881a4c8e-ed85ad21.js +0 -31
  84. package/dist/index.cjs.js +0 -1
  85. package/dist/index.js +0 -1
  86. package/dist/loader/cdn.js +0 -3
  87. package/dist/loader/index.cjs.js +0 -3
  88. package/dist/loader/index.d.ts +0 -12
  89. package/dist/loader/index.es2017.js +0 -3
  90. package/dist/loader/index.js +0 -4
  91. package/dist/loader/package.json +0 -10
  92. /package/dist/{esm → abi}/atomic-7b1e6d55.js +0 -0
@@ -1 +1,168 @@
1
- import{w as i,a as c}from"./p-c82303fb.js";!async function(){await i();const e=document.querySelector("#search");e&&async function(i){await i.initialize({accessToken:"eyJhbGciOiJIUzI1NiJ9.eyJmaWx0ZXIiOiJAb2JqZWN0dHlwZT09RkFRIE9SIEBvYmplY3R0eXBlPT1BY2NvdW50IE9SIEB0YXJnZXRvcmc9PSh1YXQscHJvZHVjdGlvbikiLCJ2OCI6dHJ1ZSwidG9rZW5JZCI6InZ5MnJob3U0eTdjazJ2czd1Y3FwZDJzY3lhIiwib3JnYW5pemF0aW9uIjoiYW5oZXVzZXJidXNjaGluYmV2cHJvZCIsInVzZXJJZHMiOlt7InR5cGUiOiJVc2VyIiwibmFtZSI6ImFnbmllc3prYS5ub3Zha292YUBhYi1pbmJldi5jb20iLCJwcm92aWRlciI6IkVtYWlsIFNlY3VyaXR5IFByb3ZpZGVyIn1dLCJyb2xlcyI6WyJxdWVyeUV4ZWN1dG9yIl0sImlzcyI6IlNlYXJjaEFwaSIsImV4cCI6MTcyODQxOTcwNCwiaWF0IjoxNzI4MzMzMzA0fQ.KZjuzS5x8GlJY1E-wUAMpRFvUsMt0lurjDIS7bCBzEM",organizationId:"anheuserbuschinbevprod",platformUrl:"https://platform.cloud.coveo.com",preprocessRequest:(i,c,e)=>{if("searchApiFetch"==c&&"search"==(null==e?void 0:e.method)){i.url+="&viewAllContent=1";var I=JSON.parse(i.body);I.context={user_country_snow:"CZ"},i.body=JSON.stringify(I)}return i},search:{preprocessSearchResponseMiddleware:i=>(i.body.results.forEach((i=>(i.raw.snavatar&&(i.raw.resultpicture="https://abinbevwwdev.service-now.com/"+i.raw.snavatar),i))),i)}}),i.executeFirstSearch()}(e);const I=document.querySelector("#searchbox");I&&async function(i){await i.initialize({accessToken:"eyJhbGciOiJIUzI1NiJ9.eyJmaWx0ZXIiOiJAb2JqZWN0dHlwZT09RkFRIE9SIEBvYmplY3R0eXBlPT1BY2NvdW50IE9SIEB0YXJnZXRvcmc9PSh1YXQscHJvZHVjdGlvbikiLCJ2OCI6dHJ1ZSwidG9rZW5JZCI6InZ5MnJob3U0eTdjazJ2czd1Y3FwZDJzY3lhIiwib3JnYW5pemF0aW9uIjoiYW5oZXVzZXJidXNjaGluYmV2cHJvZCIsInVzZXJJZHMiOlt7InR5cGUiOiJVc2VyIiwibmFtZSI6ImFnbmllc3prYS5ub3Zha292YUBhYi1pbmJldi5jb20iLCJwcm92aWRlciI6IkVtYWlsIFNlY3VyaXR5IFByb3ZpZGVyIn1dLCJyb2xlcyI6WyJxdWVyeUV4ZWN1dG9yIl0sImlzcyI6IlNlYXJjaEFwaSIsImV4cCI6MTcyODQxOTcwNCwiaWF0IjoxNzI4MzMzMzA0fQ.KZjuzS5x8GlJY1E-wUAMpRFvUsMt0lurjDIS7bCBzEM",organizationId:"anheuserbuschinbevprod",platformUrl:"https://platform.cloud.coveo.com",preprocessRequest:(i,c,e)=>{if("searchApiFetch"==c&&"search"==(null==e?void 0:e.method)){i.url+="&viewAllContent=1";var I=JSON.parse(i.body);I.context={user_country_snow:"CZ"};var n=new CustomEvent("header/searchbox/query",{detail:I.q||""});window.dispatchEvent(n),i.body=JSON.stringify(I)}return i},analytics:{enabled:!1}})}(I),await c(),Array.from(document.querySelectorAll("atomic-recs-interface")).length&&async function(){var i;const c=document.querySelector("#recs");null===(i=c.querySelector("recs-initialization-helper"))||void 0===i||i.setAttribute("user-country","BE"),await(null==c?void 0:c.initialize({accessToken:"eyJhbGciOiJIUzI1NiJ9.eyJmaWx0ZXIiOiJAb2JqZWN0dHlwZT09RkFRIE9SIEBvYmplY3R0eXBlPT1BY2NvdW50IE9SIEB0YXJnZXRvcmc9PSh1YXQscHJvZHVjdGlvbikiLCJ2OCI6dHJ1ZSwidG9rZW5JZCI6InZ5MnJob3U0eTdjazJ2czd1Y3FwZDJzY3lhIiwib3JnYW5pemF0aW9uIjoiYW5oZXVzZXJidXNjaGluYmV2cHJvZCIsInVzZXJJZHMiOlt7InR5cGUiOiJVc2VyIiwibmFtZSI6ImFnbmllc3prYS5ub3Zha292YUBhYi1pbmJldi5jb20iLCJwcm92aWRlciI6IkVtYWlsIFNlY3VyaXR5IFByb3ZpZGVyIn1dLCJyb2xlcyI6WyJxdWVyeUV4ZWN1dG9yIl0sImlzcyI6IlNlYXJjaEFwaSIsImV4cCI6MTcyODQxOTcwNCwiaWF0IjoxNzI4MzMzMzA0fQ.KZjuzS5x8GlJY1E-wUAMpRFvUsMt0lurjDIS7bCBzEM",organizationId:"anheuserbuschinbevprod",preprocessRequest:(i,c,e)=>{if("searchApiFetch"==c&&"recommendations"==(null==e?void 0:e.method)){i.url+="&viewAllContent=1";var I=JSON.parse(i.body);I.context={user_country:"CZ",user_country_snow:"CZ",...I.context},i.body=JSON.stringify(I)}return i}}))}()}();
1
+ import { w as waitForAtomic, a as waitForRecsAtomic } from './atomic-7b1e6d55.js';
2
+
3
+ async function main() {
4
+ await waitForAtomic();
5
+ const searchInterface = document.querySelector("#search");
6
+ searchInterface && initSearch(searchInterface);
7
+ const searchBox = document.querySelector("#searchbox");
8
+ searchBox && initStandaloneSearchBox(searchBox);
9
+ // const platformUrl = "https://platform.cloud.coveo.com"!;
10
+ // const organizationId = "anheuserbuschinbevprod"!;
11
+ // const accessToken = "x715cc5e6-f6ef-4b01-8717-cc0d962b1b71"!;
12
+ // await searchInterface.initialize({
13
+ // accessToken,
14
+ // organizationId,
15
+ // platformUrl,
16
+ // preprocessRequest: (request, clientOrigin, metadata) => {
17
+ // if(clientOrigin == "searchApiFetch" && metadata?.method == "search") {
18
+ // request.url += '&viewAllContent=1';
19
+ // var body = JSON.parse(request.body as string);
20
+ // body.context = {
21
+ // "user_country_snow": "CZ"
22
+ // };
23
+ // request.body = JSON.stringify(body);
24
+ // }
25
+ // return request;
26
+ // }
27
+ // });
28
+ // searchInterface.executeFirstSearch();
29
+ // searchInterface.i18n.addResourceBundle('en', 'translation', {
30
+ // 'no-results-for': 'No results for {{query}}'
31
+ // });
32
+ // await searchBox.initialize({
33
+ // accessToken,
34
+ // organizationId,
35
+ // platformUrl,
36
+ // preprocessRequest: (request, clientOrigin, metadata) => {
37
+ // if(clientOrigin == "searchApiFetch" && metadata?.method == "search") {
38
+ // request.url += '&viewAllContent=1';
39
+ // var body = JSON.parse(request.body as string);
40
+ // body.context = {
41
+ // "user_country_snow": "CZ"
42
+ // };
43
+ // var q = body.q || "";
44
+ // var event = new CustomEvent('header/searchbox/query', {
45
+ // detail: q
46
+ // });
47
+ // window.dispatchEvent(event);
48
+ // request.body = JSON.stringify(body);
49
+ // }
50
+ // return request;
51
+ // },
52
+ // analytics: {
53
+ // enabled: false
54
+ // }
55
+ // });
56
+ await waitForRecsAtomic();
57
+ const recsInterfaces = Array.from(document.querySelectorAll('atomic-recs-interface'));
58
+ recsInterfaces.length && initRecs();
59
+ }
60
+ async function initStandaloneSearchBox(searchBox) {
61
+ const platformUrl = "https://platform.cloud.coveo.com";
62
+ const organizationId = "anheuserbuschinbevprod";
63
+ const accessToken = "x715cc5e6-f6ef-4b01-8717-cc0d962b1b71";
64
+ await searchBox.initialize({
65
+ accessToken,
66
+ organizationId,
67
+ platformUrl,
68
+ preprocessRequest: (request, clientOrigin, metadata) => {
69
+ if (clientOrigin == "searchApiFetch" && (metadata === null || metadata === void 0 ? void 0 : metadata.method) == "search") {
70
+ request.url += '&viewAllContent=1';
71
+ var body = JSON.parse(request.body);
72
+ body.context = {
73
+ "user_country_snow": "CZ"
74
+ };
75
+ var q = body.q || "";
76
+ var event = new CustomEvent('header/searchbox/query', {
77
+ detail: q
78
+ });
79
+ window.dispatchEvent(event);
80
+ request.body = JSON.stringify(body);
81
+ }
82
+ return request;
83
+ },
84
+ analytics: {
85
+ enabled: false
86
+ }
87
+ });
88
+ }
89
+ async function initSearch(searchInterface) {
90
+ const platformUrl = "https://platform.cloud.coveo.com";
91
+ const organizationId = "anheuserbuschinbevprod";
92
+ const accessToken = "x715cc5e6-f6ef-4b01-8717-cc0d962b1b71";
93
+ await searchInterface.initialize({
94
+ accessToken,
95
+ organizationId,
96
+ platformUrl,
97
+ preprocessRequest: (request, clientOrigin, metadata) => {
98
+ if (clientOrigin == "searchApiFetch" && (metadata === null || metadata === void 0 ? void 0 : metadata.method) == "search") {
99
+ request.url += '&viewAllContent=1';
100
+ var body = JSON.parse(request.body);
101
+ body.context = {
102
+ "user_country_snow": "CZ"
103
+ };
104
+ request.body = JSON.stringify(body);
105
+ }
106
+ return request;
107
+ },
108
+ search: {
109
+ preprocessSearchResponseMiddleware: (response) => {
110
+ response.body.results.forEach((result) => {
111
+ if (result.raw.snavatar) {
112
+ result.raw.resultpicture = 'https://abinbevwwdev.service-now.com/' + result.raw.snavatar;
113
+ }
114
+ return result;
115
+ });
116
+ return response;
117
+ },
118
+ }
119
+ });
120
+ searchInterface.executeFirstSearch();
121
+ }
122
+ async function initRecs() {
123
+ var _a;
124
+ const organizationId = "anheuserbuschinbevprod";
125
+ const accessToken = "x715cc5e6-f6ef-4b01-8717-cc0d962b1b71";
126
+ const recsInterface = document.querySelector('#recs');
127
+ (_a = recsInterface.querySelector("recs-initialization-helper")) === null || _a === void 0 ? void 0 : _a.setAttribute("user-country", "BE");
128
+ await (recsInterface === null || recsInterface === void 0 ? void 0 : recsInterface.initialize({
129
+ accessToken: accessToken,
130
+ organizationId: organizationId,
131
+ preprocessRequest: (request, clientOrigin, metadata) => {
132
+ if (clientOrigin == "searchApiFetch" && (metadata === null || metadata === void 0 ? void 0 : metadata.method) == "recommendations") {
133
+ request.url += '&viewAllContent=1';
134
+ var body = JSON.parse(request.body);
135
+ body.context = {
136
+ "user_country": "CZ",
137
+ "user_country_snow": "CZ",
138
+ ...body.context
139
+ };
140
+ request.body = JSON.stringify(body);
141
+ }
142
+ return request;
143
+ }
144
+ }));
145
+ //recsInterface?.getRecommendations();
146
+ /*await Promise.all(
147
+ recsInterfaces.map(async (recommendationInterface: { initialize: (arg0: { accessToken: string; organizationId: string; }) => any; getOrganizationEndpoints: (arg0: string) => any; }) =>
148
+ recommendationInterface.initialize({
149
+ accessToken: accessToken,
150
+ organizationId: organizationId
151
+ })
152
+ )
153
+ );
154
+
155
+ const context = {
156
+ "user_country": "CZ",
157
+ "context_user_country": "CZ"
158
+ };
159
+
160
+ recsInterfaces.forEach((recInterface: { engine: any; getRecommendations: () => void; }) => {
161
+ const engine = recInterface.engine;
162
+
163
+ engine.dispatch(loadContextActions(engine).setContext(context));
164
+
165
+ recInterface.getRecommendations();
166
+ });*/
167
+ }
168
+ main();
@@ -1,7 +1,7 @@
1
- import { r as registerInstance, g as getElement } from './index-66fdbb35.js';
2
- import { i as initializeBindings, Q as QP } from './index-072be88f.js';
1
+ import { r as registerInstance, g as getElement } from './index-4c45f50c.js';
2
+ import { i as initializeBindings } from './index-bf9cad6e.js';
3
3
  import { w as waitForAtomic } from './atomic-7b1e6d55.js';
4
- import './headless.esm-085e70ed-c4dfb380.js';
4
+ import { Q as QP } from './headless.esm-c328011d.js';
5
5
 
6
6
  const RecsInitializationHelper = class {
7
7
  constructor(hostRef) {
@@ -1,4 +1,4 @@
1
- import { r as registerInstance, h } from './index-66fdbb35.js';
1
+ import { r as registerInstance, h } from './index-4c45f50c.js';
2
2
  import { a as waitForRecsAtomic } from './atomic-7b1e6d55.js';
3
3
 
4
4
  const FaqTemplateRec = "\n<style>\n atomic-result-link{\n font-size: 1.3rem !important;\n color: #626971 !important;\n }\n faq-popup-component{\n font-size: 1.3rem; color: #626971 !important; \n }\n faq-popup-component:hover{\n text-decoration: underline; \n }\n hr {\n margin-top: 10px !important;\n }\n</style> \n<faq-popup-component></faq-popup-component>\n<hr>\n ";
@@ -1,4 +1,4 @@
1
- import { r as registerInstance, h } from './index-66fdbb35.js';
1
+ import { r as registerInstance, h } from './index-4c45f50c.js';
2
2
  import { w as waitForAtomic } from './atomic-7b1e6d55.js';
3
3
 
4
4
  const template1 = "<style>\n .field {\n display: inline-flex;\n align-items: center;\n }\n\n .field-label {\n font-weight: bold;\n margin-right: 0.25rem;\n }\n\n .title-date {\n display: grid;\n grid-template-columns: 3fr 1fr;\n }\n\n\n atomic-result-section-bottom-metadata {\n margin-top: 2px;\n color: #A6A6A6 !important;\n font-size: 1rem !important;\n margin-right: 3px;\n line-height: 18px !important;\n display: grid;\n grid-template-columns: auto auto auto;\n gap: 1rem;\n align-items: center;\n }\n\n atomic-result-date {\n font-size: 1.0rem;\n justify-self: end;\n }\n\n atomic-result-section-title a {\n color: #CAA144 !important;\n font-size: 1.7rem !important;;\n max-height: unset !important;\n line-height: normal !important;\n }\n\n\n atomic-result-section-bottom-metadata a {\n color: #A6A6A6 !important;\n }\n atomic-result-section-title a:visited {\n color: black !important;\n }\n atomic-result-section-excerpt {\n font-size: 1.3rem !important;\n margin-top: 0.875rem !important;\n max-height: unset !important;\n line-height: normal !important;\n }\n\n atomic-result-section-visual {\n width: 3rem !important;\n height: 5rem !important;\n display: grid;\n align-items: center;\n }\n atomic-result-section-bottom-metadata span {\n display: flex;\n align-items: center;\n }\n\n atomic-field-condition{\n max-width: 100%;\n display: grid;\n grid-template-columns: auto auto auto;\n align-items: center;\n gap: 1rem;\n }\n</style>\n\n<atomic-result-section-visual>\n <img src=\"https://cdn.jsdelivr.net/npm/@coveops/abi@latest/dist/abi/images/Default.png\" alt=\"Image\">\n <!-- <atomic-icon class=\"icon\"></atomic-icon>\n <?xml version=\"1.0\" encoding=\"UTF-8\"?>\n <svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"55px\" height=\"55px\"\n viewBox=\"0 0 65 65\" version=\"1.1\">\n <g id=\"surface1\">\n <path style=\" stroke:none;fill-rule:nonzero;fill:rgb(1.176471%,1.176471%,1.176471%);fill-opacity:1;\"\n d=\"M 10.785156 -0.527344 C 11.4375 -0.53125 12.09375 -0.535156 12.765625 -0.539062 C 14.140625 -0.539062 15.515625 -0.53125 16.890625 -0.515625 C 18.992188 -0.496094 21.09375 -0.515625 23.191406 -0.542969 C 24.535156 -0.539062 25.875 -0.535156 27.214844 -0.527344 C 28.152344 -0.539062 28.152344 -0.539062 29.109375 -0.550781 C 32.25 -0.484375 33.738281 -0.203125 36.414062 1.585938 C 38.53125 4.75 38.574219 7.054688 38.527344 10.785156 C 38.53125 11.4375 38.535156 12.09375 38.539062 12.765625 C 38.539062 14.140625 38.53125 15.515625 38.515625 16.890625 C 38.496094 18.992188 38.515625 21.09375 38.542969 23.191406 C 38.539062 24.535156 38.535156 25.875 38.527344 27.214844 C 38.535156 27.839844 38.542969 28.464844 38.550781 29.109375 C 38.484375 32.25 38.203125 33.738281 36.414062 36.414062 C 33.25 38.53125 30.945312 38.574219 27.214844 38.527344 C 26.234375 38.53125 26.234375 38.53125 25.234375 38.539062 C 23.859375 38.539062 22.484375 38.53125 21.109375 38.515625 C 19.007812 38.496094 16.90625 38.515625 14.804688 38.542969 C 13.464844 38.539062 12.125 38.535156 10.785156 38.527344 C 10.160156 38.535156 9.535156 38.542969 8.890625 38.550781 C 5.75 38.484375 4.261719 38.203125 1.585938 36.414062 C -0.53125 33.25 -0.574219 30.945312 -0.527344 27.214844 C -0.53125 26.5625 -0.535156 25.90625 -0.539062 25.234375 C -0.539062 23.859375 -0.53125 22.484375 -0.515625 21.109375 C -0.496094 19.007812 -0.515625 16.90625 -0.542969 14.804688 C -0.539062 13.464844 -0.535156 12.125 -0.527344 10.785156 C -0.535156 10.160156 -0.542969 9.535156 -0.550781 8.890625 C -0.484375 5.75 -0.203125 4.261719 1.585938 1.585938 C 4.75 -0.53125 7.054688 -0.574219 10.785156 -0.527344 Z M 10.785156 -0.527344 \" />\n <path style=\" stroke:none;fill-rule:nonzero;fill:rgb(83.921569%,83.921569%,83.921569%);fill-opacity:1;\"\n d=\"M 24.796875 3.710938 C 29.566406 5.886719 32.808594 9.382812 34.832031 14.25 C 35.578125 19.839844 35.054688 24.695312 31.667969 29.292969 C 29.167969 32.035156 26.738281 33.707031 22.957031 34.042969 C 23.5625 33.566406 24.167969 33.09375 24.789062 32.605469 C 26.847656 31 26.847656 31 28.253906 29.488281 C 29.292969 28.5 29.292969 28.5 30.875 28.5 C 32.050781 24.1875 32.050781 24.1875 33.25 19.792969 C 31.160156 19.792969 29.070312 19.792969 26.917969 19.792969 C 26.65625 20.835938 26.394531 21.882812 26.125 22.957031 C 26.125 21.914062 26.125 20.867188 26.125 19.792969 C 24.035156 19.792969 21.945312 19.792969 19.792969 19.792969 C 19.792969 21.621094 19.792969 23.449219 19.792969 25.332031 C 20.28125 25.429688 20.769531 25.527344 21.277344 25.628906 C 22.957031 26.125 22.957031 26.125 24.542969 27.707031 C 23.234375 29.535156 21.929688 31.367188 20.582031 33.25 C 19.539062 32.988281 18.492188 32.726562 17.417969 32.457031 C 17.679688 30.367188 17.9375 28.277344 18.207031 26.125 C 17.164062 25.863281 16.117188 25.601562 15.042969 25.332031 C 16.085938 25.332031 17.132812 25.332031 18.207031 25.332031 C 18.207031 23.503906 18.207031 21.675781 18.207031 19.792969 C 16.117188 19.792969 14.027344 19.792969 11.875 19.792969 C 11.875 21.097656 11.875 22.402344 11.875 23.75 C 11.613281 23.75 11.351562 23.75 11.082031 23.75 C 11.082031 22.445312 11.082031 21.136719 11.082031 19.792969 C 8.992188 19.792969 6.902344 19.792969 4.75 19.792969 C 5.535156 22.664062 6.316406 25.539062 7.125 28.5 C 7.648438 28.5 8.171875 28.5 8.707031 28.5 C 9.78125 29.539062 10.835938 30.597656 11.875 31.667969 C 12.917969 32.476562 13.96875 33.273438 15.042969 34.042969 C 10.839844 33.785156 8.28125 31.484375 5.542969 28.5 C 2.808594 24.003906 2.378906 19.386719 3.167969 14.25 C 6.851562 5.152344 15.371094 0.917969 24.796875 3.710938 Z M 24.796875 3.710938 \" />\n <path style=\" stroke:none;fill-rule:nonzero;fill:rgb(75.294118%,75.294118%,75.294118%);fill-opacity:1;\"\n d=\"M 4.75 19.792969 C 9.191406 19.792969 13.632812 19.792969 18.207031 19.792969 C 18.207031 23.972656 18.207031 28.152344 18.207031 32.457031 C 18.992188 32.457031 19.777344 32.457031 20.582031 32.457031 C 22.335938 30.128906 22.335938 30.128906 23.75 27.707031 C 23.097656 27.429688 22.445312 27.152344 21.769531 26.867188 C 21.117188 26.359375 20.464844 25.855469 19.792969 25.332031 C 19.792969 23.503906 19.792969 21.675781 19.792969 19.792969 C 24.234375 19.792969 28.675781 19.792969 33.25 19.792969 C 32.457031 26.125 32.457031 26.125 30.875 28.5 C 30.351562 28.5 29.828125 28.5 29.292969 28.5 C 29.03125 29.285156 28.769531 30.066406 28.5 30.875 C 25.070312 33.25 25.070312 33.25 22.957031 33.25 C 22.957031 33.773438 22.957031 34.296875 22.957031 34.832031 C 14.914062 35.332031 14.914062 35.332031 12.269531 33.347656 C 11.878906 32.792969 11.488281 32.238281 11.082031 31.667969 C 10.300781 31.144531 9.515625 30.621094 8.707031 30.082031 C 8.707031 29.5625 8.707031 29.039062 8.707031 28.5 C 8.1875 28.5 7.664062 28.5 7.125 28.5 C 5.269531 25.171875 4.75 23.742188 4.75 19.792969 Z M 4.75 19.792969 \" />\n <path style=\" stroke:none;fill-rule:nonzero;fill:rgb(80.784314%,80.784314%,80.784314%);fill-opacity:1;\"\n d=\"M 15.832031 3.167969 C 21.050781 2.730469 24.960938 3.25 29.292969 6.332031 C 32.199219 9.09375 34.5625 12.214844 35.097656 16.242188 C 35.179688 21.960938 34.46875 26.214844 30.539062 30.53125 C 28.171875 32.675781 26.136719 33.761719 22.957031 34.042969 C 23.5625 33.566406 24.167969 33.09375 24.789062 32.605469 C 26.847656 31 26.847656 31 28.253906 29.488281 C 29.292969 28.5 29.292969 28.5 30.875 28.5 C 31.660156 25.625 32.441406 22.753906 33.25 19.792969 C 31.160156 19.792969 29.070312 19.792969 26.917969 19.792969 C 26.65625 20.835938 26.394531 21.882812 26.125 22.957031 C 26.125 21.914062 26.125 20.867188 26.125 19.792969 C 24.035156 19.792969 21.945312 19.792969 19.792969 19.792969 C 19.792969 21.621094 19.792969 23.449219 19.792969 25.332031 C 20.28125 25.429688 20.769531 25.527344 21.277344 25.628906 C 22.957031 26.125 22.957031 26.125 24.542969 27.707031 C 23.234375 29.535156 21.929688 31.367188 20.582031 33.25 C 19.539062 32.988281 18.492188 32.726562 17.417969 32.457031 C 17.679688 30.367188 17.9375 28.277344 18.207031 26.125 C 17.164062 25.863281 16.117188 25.601562 15.042969 25.332031 C 16.085938 25.332031 17.132812 25.332031 18.207031 25.332031 C 18.207031 23.503906 18.207031 21.675781 18.207031 19.792969 C 16.117188 19.792969 14.027344 19.792969 11.875 19.792969 C 11.875 19.269531 11.875 18.746094 11.875 18.207031 C 16.578125 18.207031 21.28125 18.207031 26.125 18.207031 C 25.601562 16.378906 25.078125 14.550781 24.542969 12.667969 C 23.234375 12.40625 21.929688 12.144531 20.582031 11.875 C 21.628906 11.613281 22.671875 11.351562 23.75 11.082031 C 23.226562 10.332031 22.703125 9.582031 22.167969 8.808594 C 20.582031 6.332031 20.582031 6.332031 20.582031 4.75 C 19.277344 5.011719 17.972656 5.273438 16.625 5.542969 C 16.363281 4.757812 16.101562 3.972656 15.832031 3.167969 Z M 15.832031 3.167969 \" />\n <path style=\" stroke:none;fill-rule:nonzero;fill:rgb(83.529412%,83.529412%,83.529412%);fill-opacity:1;\"\n d=\"M 19.792969 19.792969 C 24.234375 19.792969 28.675781 19.792969 33.25 19.792969 C 32.457031 26.125 32.457031 26.125 30.875 28.5 C 30.351562 28.5 29.828125 28.5 29.292969 28.5 C 29.03125 29.285156 28.769531 30.066406 28.5 30.875 C 25.070312 33.25 25.070312 33.25 22.957031 33.25 C 22.957031 33.773438 22.957031 34.296875 22.957031 34.832031 C 20.605469 34.832031 18.253906 34.832031 15.832031 34.832031 C 16.617188 33.65625 16.617188 33.65625 17.417969 32.457031 C 18.460938 32.457031 19.507812 32.457031 20.582031 32.457031 C 22.390625 30.144531 22.390625 30.144531 23.75 27.707031 C 23.097656 27.429688 22.445312 27.152344 21.769531 26.867188 C 21.117188 26.359375 20.464844 25.855469 19.792969 25.332031 C 19.792969 23.503906 19.792969 21.675781 19.792969 19.792969 Z M 19.792969 19.792969 \" />\n <path style=\" stroke:none;fill-rule:nonzero;fill:rgb(72.156863%,72.156863%,72.156863%);fill-opacity:1;\"\n d=\"M 17.417969 4.75 C 18.460938 4.75 19.507812 4.75 20.582031 4.75 C 22.265625 6.925781 22.265625 6.925781 23.75 9.5 C 24.058594 10.007812 24.371094 10.511719 24.691406 11.035156 C 25.332031 12.667969 25.332031 12.667969 26.125 18.207031 C 21.421875 18.207031 16.71875 18.207031 11.875 18.207031 C 12.773438 11.90625 12.773438 11.90625 14.25 9.5 C 14.738281 8.652344 15.230469 7.800781 15.734375 6.925781 C 16.289062 6.207031 16.84375 5.488281 17.417969 4.75 Z M 17.417969 4.75 \" />\n <path style=\" stroke:none;fill-rule:nonzero;fill:rgb(78.823529%,78.823529%,78.823529%);fill-opacity:1;\"\n d=\"M 11.875 18.207031 C 16.578125 18.207031 21.28125 18.207031 26.125 18.207031 C 26.125 18.730469 26.125 19.253906 26.125 19.792969 C 24.035156 19.792969 21.945312 19.792969 19.792969 19.792969 C 19.792969 21.621094 19.792969 23.449219 19.792969 25.332031 C 20.28125 25.429688 20.769531 25.527344 21.277344 25.628906 C 22.957031 26.125 22.957031 26.125 24.542969 27.707031 C 23.234375 29.535156 21.929688 31.367188 20.582031 33.25 C 19.539062 32.988281 18.492188 32.726562 17.417969 32.457031 C 17.679688 30.367188 17.9375 28.277344 18.207031 26.125 C 17.164062 25.863281 16.117188 25.601562 15.042969 25.332031 C 16.085938 25.332031 17.132812 25.332031 18.207031 25.332031 C 18.207031 23.503906 18.207031 21.675781 18.207031 19.792969 C 16.117188 19.792969 14.027344 19.792969 11.875 19.792969 C 11.875 19.269531 11.875 18.746094 11.875 18.207031 Z M 11.875 18.207031 \" />\n <path style=\" stroke:none;fill-rule:nonzero;fill:rgb(80.392157%,80.392157%,80.392157%);fill-opacity:1;\"\n d=\"M 5.542969 9.5 C 6.0625 9.5 6.585938 9.5 7.125 9.5 C 6.757812 10.332031 6.757812 10.332031 6.382812 11.183594 C 5.515625 13.527344 5.09375 15.734375 4.75 18.207031 C 6.839844 18.207031 8.929688 18.207031 11.082031 18.207031 C 11.082031 18.730469 11.082031 19.253906 11.082031 19.792969 C 8.992188 19.792969 6.902344 19.792969 4.75 19.792969 C 5.535156 22.664062 6.316406 25.539062 7.125 28.5 C 7.648438 28.5 8.171875 28.5 8.707031 28.5 C 9.78125 29.539062 10.835938 30.597656 11.875 31.667969 C 12.917969 32.476562 13.96875 33.273438 15.042969 34.042969 C 10.839844 33.785156 8.28125 31.484375 5.542969 28.5 C 2.789062 23.96875 2.5625 19.417969 3.167969 14.25 C 4.355469 11.332031 4.355469 11.332031 5.542969 9.5 Z M 5.542969 9.5 \" />\n <path style=\" stroke:none;fill-rule:nonzero;fill:rgb(3.137255%,3.137255%,3.137255%);fill-opacity:1;\"\n d=\"M 30.875 9.5 C 33.179688 12.402344 33.503906 14.5625 33.25 18.207031 C 31.160156 18.207031 29.070312 18.207031 26.917969 18.207031 C 26.65625 15.855469 26.394531 13.503906 26.125 11.082031 C 28.5 9.5 28.5 9.5 30.875 9.5 Z M 30.875 9.5 \" />\n <path style=\" stroke:none;fill-rule:nonzero;fill:rgb(3.137255%,3.137255%,3.137255%);fill-opacity:1;\"\n d=\"M 7.125 9.5 C 8.84375 9.902344 10.292969 10.292969 11.875 11.082031 C 11.613281 13.433594 11.351562 15.785156 11.082031 18.207031 C 8.992188 18.207031 6.902344 18.207031 4.75 18.207031 C 4.492188 14.507812 4.984375 12.535156 7.125 9.5 Z M 7.125 9.5 \" />\n <path style=\" stroke:none;fill-rule:nonzero;fill:rgb(3.921569%,3.921569%,3.921569%);fill-opacity:1;\"\n d=\"M 26.917969 19.792969 C 29.007812 19.792969 31.097656 19.792969 33.25 19.792969 C 32.761719 25.734375 32.761719 25.734375 31.222656 27.707031 C 30.65625 28.101562 30.65625 28.101562 30.082031 28.5 C 28.125 27.714844 28.125 27.714844 26.125 26.917969 C 26.386719 24.566406 26.648438 22.214844 26.917969 19.792969 Z M 26.917969 19.792969 \" />\n <path style=\" stroke:none;fill-rule:nonzero;fill:rgb(3.529412%,3.529412%,3.529412%);fill-opacity:1;\"\n d=\"M 4.75 19.792969 C 6.839844 19.792969 8.929688 19.792969 11.082031 19.792969 C 11.34375 22.144531 11.605469 24.496094 11.875 26.917969 C 10.308594 27.179688 8.738281 27.4375 7.125 27.707031 C 5.21875 24.929688 4.460938 23.175781 4.75 19.792969 Z M 4.75 19.792969 \" />\n <path style=\" stroke:none;fill-rule:nonzero;fill:rgb(89.019608%,89.019608%,89.019608%);fill-opacity:1;\"\n d=\"M 15.832031 3.167969 C 17.921875 3.167969 20.011719 3.167969 22.167969 3.167969 C 22.265625 3.828125 22.265625 3.828125 22.363281 4.503906 C 23.136719 6.882812 24.546875 8.371094 26.125 10.292969 C 27.027344 13 26.996094 15.109375 26.964844 17.960938 C 26.960938 18.894531 26.953125 19.828125 26.945312 20.789062 C 26.933594 21.507812 26.925781 22.222656 26.917969 22.957031 C 26.65625 22.957031 26.394531 22.957031 26.125 22.957031 C 25.601562 19.5625 25.078125 16.164062 24.542969 12.667969 C 23.234375 12.40625 21.929688 12.144531 20.582031 11.875 C 21.628906 11.613281 22.671875 11.351562 23.75 11.082031 C 23.226562 10.332031 22.703125 9.582031 22.167969 8.808594 C 20.582031 6.332031 20.582031 6.332031 20.582031 4.75 C 19.277344 5.011719 17.972656 5.273438 16.625 5.542969 C 16.363281 4.757812 16.101562 3.972656 15.832031 3.167969 Z M 15.832031 3.167969 \" />\n <path style=\" stroke:none;fill-rule:nonzero;fill:rgb(1.568627%,1.568627%,1.568627%);fill-opacity:1;\"\n d=\"M 25.332031 12.667969 C 25.59375 14.496094 25.855469 16.324219 26.125 18.207031 C 24.035156 18.207031 21.945312 18.207031 19.792969 18.207031 C 19.792969 16.378906 19.792969 14.550781 19.792969 12.667969 C 22.273438 11.839844 22.949219 11.925781 25.332031 12.667969 Z M 25.332031 12.667969 \" />\n <path style=\" stroke:none;fill-rule:nonzero;fill:rgb(1.176471%,1.176471%,1.176471%);fill-opacity:1;\"\n d=\"M 13.457031 11.875 C 15.046875 12.101562 16.632812 12.363281 18.207031 12.667969 C 18.207031 14.496094 18.207031 16.324219 18.207031 18.207031 C 16.117188 18.207031 14.027344 18.207031 11.875 18.207031 C 12.566406 12.765625 12.566406 12.765625 13.457031 11.875 Z M 13.457031 11.875 \" />\n <path style=\" stroke:none;fill-rule:nonzero;fill:rgb(3.137255%,3.137255%,3.137255%);fill-opacity:1;\"\n d=\"M 19.792969 19.792969 C 21.882812 19.792969 23.972656 19.792969 26.125 19.792969 C 25.863281 21.621094 25.601562 23.449219 25.332031 25.332031 C 23.503906 25.332031 21.675781 25.332031 19.792969 25.332031 C 19.792969 23.503906 19.792969 21.675781 19.792969 19.792969 Z M 19.792969 19.792969 \" />\n <path style=\" stroke:none;fill-rule:nonzero;fill:rgb(3.137255%,3.137255%,3.137255%);fill-opacity:1;\"\n d=\"M 11.875 19.792969 C 13.964844 19.792969 16.054688 19.792969 18.207031 19.792969 C 18.207031 21.621094 18.207031 23.449219 18.207031 25.332031 C 16.378906 25.332031 14.550781 25.332031 12.667969 25.332031 C 12.40625 23.503906 12.144531 21.675781 11.875 19.792969 Z M 11.875 19.792969 \" />\n <path style=\" stroke:none;fill-rule:nonzero;fill:rgb(6.27451%,6.27451%,6.27451%);fill-opacity:1;\"\n d=\"M 25.332031 27.707031 C 27.292969 28.492188 27.292969 28.492188 29.292969 29.292969 C 27.046875 31.867188 25.582031 32.871094 22.167969 33.25 C 23.210938 31.421875 24.257812 29.59375 25.332031 27.707031 Z M 25.332031 27.707031 \" />\n <path style=\" stroke:none;fill-rule:nonzero;fill:rgb(6.27451%,6.27451%,6.27451%);fill-opacity:1;\"\n d=\"M 11.082031 27.707031 C 13.457031 28.5 13.457031 28.5 14.792969 30.925781 C 15.136719 31.691406 15.480469 32.460938 15.832031 33.25 C 12.417969 32.871094 10.953125 31.867188 8.707031 29.292969 C 9.492188 28.769531 10.277344 28.246094 11.082031 27.707031 Z M 11.082031 27.707031 \" />\n <path style=\" stroke:none;fill-rule:nonzero;fill:rgb(10.588235%,10.588235%,10.588235%);fill-opacity:1;\"\n d=\"M 15.832031 4.75 C 14.808594 7.035156 13.726562 8.605469 11.875 10.292969 C 10.828125 9.507812 9.785156 8.722656 8.707031 7.917969 C 13.160156 4.75 13.160156 4.75 15.832031 4.75 Z M 15.832031 4.75 \" />\n <path style=\" stroke:none;fill-rule:nonzero;fill:rgb(6.27451%,6.27451%,6.27451%);fill-opacity:1;\"\n d=\"M 19.792969 26.125 C 22.144531 26.515625 22.144531 26.515625 24.542969 26.917969 C 23.496094 28.746094 22.453125 30.574219 21.375 32.457031 C 20.851562 32.457031 20.328125 32.457031 19.792969 32.457031 C 19.792969 30.367188 19.792969 28.277344 19.792969 26.125 Z M 19.792969 26.125 \" />\n <path style=\" stroke:none;fill-rule:nonzero;fill:rgb(9.411765%,9.411765%,9.411765%);fill-opacity:1;\"\n d=\"M 22.167969 4.75 C 25.15625 5.613281 27.289062 6.261719 29.292969 8.707031 C 27.984375 9.230469 26.679688 9.753906 25.332031 10.292969 C 22.167969 6.53125 22.167969 6.53125 22.167969 4.75 Z M 22.167969 4.75 \" />\n <path style=\" stroke:none;fill-rule:nonzero;fill:rgb(3.529412%,3.529412%,3.529412%);fill-opacity:1;\"\n d=\"M 18.207031 26.125 C 18.207031 28.214844 18.207031 30.304688 18.207031 32.457031 C 14.347656 28.699219 14.347656 28.699219 13.457031 26.917969 C 15.101562 26.476562 16.5 26.125 18.207031 26.125 Z M 18.207031 26.125 \" />\n <path style=\" stroke:none;fill-rule:nonzero;fill:rgb(3.529412%,3.529412%,3.529412%);fill-opacity:1;\"\n d=\"M 19.792969 5.542969 C 21.144531 6.828125 22.464844 8.148438 23.75 9.5 C 23.75 10.023438 23.75 10.546875 23.75 11.082031 C 22.445312 11.082031 21.136719 11.082031 19.792969 11.082031 C 19.792969 9.253906 19.792969 7.425781 19.792969 5.542969 Z M 19.792969 5.542969 \" />\n <path style=\" stroke:none;fill-rule:nonzero;fill:rgb(3.529412%,3.529412%,3.529412%);fill-opacity:1;\"\n d=\"M 17.417969 5.542969 C 17.679688 5.542969 17.9375 5.542969 18.207031 5.542969 C 18.207031 7.371094 18.207031 9.199219 18.207031 11.082031 C 16.902344 11.082031 15.597656 11.082031 14.25 11.082031 C 15.101562 8.777344 15.65625 7.300781 17.417969 5.542969 Z M 17.417969 5.542969 \" />\n <path style=\" stroke:none;fill-rule:nonzero;fill:rgb(72.941176%,72.941176%,72.941176%);fill-opacity:1;\"\n d=\"M 12.667969 27.707031 C 15.625 28.695312 15.980469 29.792969 17.417969 32.457031 C 16.632812 33.632812 16.632812 33.632812 15.832031 34.832031 C 15.3125 34.570312 14.789062 34.3125 14.25 34.042969 C 14.511719 33.519531 14.773438 32.996094 15.042969 32.457031 C 14.300781 30.851562 13.511719 29.265625 12.667969 27.707031 Z M 12.667969 27.707031 \" />\n </g>\n </svg> -->\n</atomic-result-section-visual>\n\n<atomic-result-section-title>\n <div class=\"title-date\">\n <atomic-result-link> <a slot=\"attributes\" target=\"_blank\"></a></atomic-result-link>\n </div>\n</atomic-result-section-title>\n\n<atomic-result-section-excerpt>\n <atomic-result-text field=\"excerpt\"></atomic-result-text>\n</atomic-result-section-excerpt>\n\n<atomic-result-section-bottom-metadata>\n <atomic-field-condition must-match-sourcetype=\"SharePointOnline\">\n <span>\n <atomic-text value=\"Date: &nbsp;\"></atomic-text>\n <atomic-result-date></atomic-result-date>\n </span><span>\n <atomic-text value=\"Source: &nbsp;\"></atomic-text><atomic-result-text field=\"sourcetype\"></atomic-result-text>\n </span><span> <atomic-text value=\"Sharepoint: &nbsp;\"></atomic-text>\n <atomic-result-link><a slot=\"attributes\" target=\"_blank\"></a>\n <atomic-result-text field=\"spsitename\"></atomic-result-text>\n </atomic-result-link>\n </span>\n </atomic-field-condition>\n</atomic-result-section-bottom-metadata>";
@@ -1,7 +1,7 @@
1
- import { r as registerInstance, h, g as getElement, f as forceUpdate } from './index-66fdbb35.js';
2
- import { i as initializeBindings, n as nw, D as DI } from './index-072be88f.js';
1
+ import { r as registerInstance, f as forceUpdate, h, g as getElement } from './index-4c45f50c.js';
2
+ import { i as initializeBindings } from './index-bf9cad6e.js';
3
+ import { n as nw, D as DI } from './headless.esm-c328011d.js';
3
4
  import { w as waitForAtomic } from './atomic-7b1e6d55.js';
4
- import './headless.esm-085e70ed-c4dfb380.js';
5
5
 
6
6
  const sampleComponentCss = "nav{width:300px;display:flex;justify-content:space-around}button{color:var(--atomic-on-primary);background-color:var(--atomic-primary)}";
7
7
 
@@ -0,0 +1,387 @@
1
+ /*
2
+ Stencil Client Platform v2.17.3 | MIT Licensed | https://stenciljs.com
3
+ */
4
+ /**
5
+ * @license
6
+ * Copyright Google Inc. All Rights Reserved.
7
+ *
8
+ * Use of this source code is governed by an MIT-style license that can be
9
+ * found in the LICENSE file at https://angular.io/license
10
+ *
11
+ * This file is a port of shadowCSS from webcomponents.js to TypeScript.
12
+ * https://github.com/webcomponents/webcomponentsjs/blob/4efecd7e0e/src/ShadowCSS/ShadowCSS.js
13
+ * https://github.com/angular/angular/blob/master/packages/compiler/src/shadow_css.ts
14
+ */
15
+ const safeSelector = (selector) => {
16
+ const placeholders = [];
17
+ let index = 0;
18
+ // Replaces attribute selectors with placeholders.
19
+ // The WS in [attr="va lue"] would otherwise be interpreted as a selector separator.
20
+ selector = selector.replace(/(\[[^\]]*\])/g, (_, keep) => {
21
+ const replaceBy = `__ph-${index}__`;
22
+ placeholders.push(keep);
23
+ index++;
24
+ return replaceBy;
25
+ });
26
+ // Replaces the expression in `:nth-child(2n + 1)` with a placeholder.
27
+ // WS and "+" would otherwise be interpreted as selector separators.
28
+ const content = selector.replace(/(:nth-[-\w]+)(\([^)]+\))/g, (_, pseudo, exp) => {
29
+ const replaceBy = `__ph-${index}__`;
30
+ placeholders.push(exp);
31
+ index++;
32
+ return pseudo + replaceBy;
33
+ });
34
+ const ss = {
35
+ content,
36
+ placeholders,
37
+ };
38
+ return ss;
39
+ };
40
+ const restoreSafeSelector = (placeholders, content) => {
41
+ return content.replace(/__ph-(\d+)__/g, (_, index) => placeholders[+index]);
42
+ };
43
+ const _polyfillHost = '-shadowcsshost';
44
+ const _polyfillSlotted = '-shadowcssslotted';
45
+ // note: :host-context pre-processed to -shadowcsshostcontext.
46
+ const _polyfillHostContext = '-shadowcsscontext';
47
+ const _parenSuffix = ')(?:\\((' + '(?:\\([^)(]*\\)|[^)(]*)+?' + ')\\))?([^,{]*)';
48
+ const _cssColonHostRe = new RegExp('(' + _polyfillHost + _parenSuffix, 'gim');
49
+ const _cssColonHostContextRe = new RegExp('(' + _polyfillHostContext + _parenSuffix, 'gim');
50
+ const _cssColonSlottedRe = new RegExp('(' + _polyfillSlotted + _parenSuffix, 'gim');
51
+ const _polyfillHostNoCombinator = _polyfillHost + '-no-combinator';
52
+ const _polyfillHostNoCombinatorRe = /-shadowcsshost-no-combinator([^\s]*)/;
53
+ const _shadowDOMSelectorsRe = [/::shadow/g, /::content/g];
54
+ const _selectorReSuffix = '([>\\s~+[.,{:][\\s\\S]*)?$';
55
+ const _polyfillHostRe = /-shadowcsshost/gim;
56
+ const _colonHostRe = /:host/gim;
57
+ const _colonSlottedRe = /::slotted/gim;
58
+ const _colonHostContextRe = /:host-context/gim;
59
+ const _commentRe = /\/\*\s*[\s\S]*?\*\//g;
60
+ const stripComments = (input) => {
61
+ return input.replace(_commentRe, '');
62
+ };
63
+ const _commentWithHashRe = /\/\*\s*#\s*source(Mapping)?URL=[\s\S]+?\*\//g;
64
+ const extractCommentsWithHash = (input) => {
65
+ return input.match(_commentWithHashRe) || [];
66
+ };
67
+ const _ruleRe = /(\s*)([^;\{\}]+?)(\s*)((?:{%BLOCK%}?\s*;?)|(?:\s*;))/g;
68
+ const _curlyRe = /([{}])/g;
69
+ const _selectorPartsRe = /(^.*?[^\\])??((:+)(.*)|$)/;
70
+ const OPEN_CURLY = '{';
71
+ const CLOSE_CURLY = '}';
72
+ const BLOCK_PLACEHOLDER = '%BLOCK%';
73
+ const processRules = (input, ruleCallback) => {
74
+ const inputWithEscapedBlocks = escapeBlocks(input);
75
+ let nextBlockIndex = 0;
76
+ return inputWithEscapedBlocks.escapedString.replace(_ruleRe, (...m) => {
77
+ const selector = m[2];
78
+ let content = '';
79
+ let suffix = m[4];
80
+ let contentPrefix = '';
81
+ if (suffix && suffix.startsWith('{' + BLOCK_PLACEHOLDER)) {
82
+ content = inputWithEscapedBlocks.blocks[nextBlockIndex++];
83
+ suffix = suffix.substring(BLOCK_PLACEHOLDER.length + 1);
84
+ contentPrefix = '{';
85
+ }
86
+ const cssRule = {
87
+ selector,
88
+ content,
89
+ };
90
+ const rule = ruleCallback(cssRule);
91
+ return `${m[1]}${rule.selector}${m[3]}${contentPrefix}${rule.content}${suffix}`;
92
+ });
93
+ };
94
+ const escapeBlocks = (input) => {
95
+ const inputParts = input.split(_curlyRe);
96
+ const resultParts = [];
97
+ const escapedBlocks = [];
98
+ let bracketCount = 0;
99
+ let currentBlockParts = [];
100
+ for (let partIndex = 0; partIndex < inputParts.length; partIndex++) {
101
+ const part = inputParts[partIndex];
102
+ if (part === CLOSE_CURLY) {
103
+ bracketCount--;
104
+ }
105
+ if (bracketCount > 0) {
106
+ currentBlockParts.push(part);
107
+ }
108
+ else {
109
+ if (currentBlockParts.length > 0) {
110
+ escapedBlocks.push(currentBlockParts.join(''));
111
+ resultParts.push(BLOCK_PLACEHOLDER);
112
+ currentBlockParts = [];
113
+ }
114
+ resultParts.push(part);
115
+ }
116
+ if (part === OPEN_CURLY) {
117
+ bracketCount++;
118
+ }
119
+ }
120
+ if (currentBlockParts.length > 0) {
121
+ escapedBlocks.push(currentBlockParts.join(''));
122
+ resultParts.push(BLOCK_PLACEHOLDER);
123
+ }
124
+ const strEscapedBlocks = {
125
+ escapedString: resultParts.join(''),
126
+ blocks: escapedBlocks,
127
+ };
128
+ return strEscapedBlocks;
129
+ };
130
+ const insertPolyfillHostInCssText = (selector) => {
131
+ selector = selector
132
+ .replace(_colonHostContextRe, _polyfillHostContext)
133
+ .replace(_colonHostRe, _polyfillHost)
134
+ .replace(_colonSlottedRe, _polyfillSlotted);
135
+ return selector;
136
+ };
137
+ const convertColonRule = (cssText, regExp, partReplacer) => {
138
+ // m[1] = :host(-context), m[2] = contents of (), m[3] rest of rule
139
+ return cssText.replace(regExp, (...m) => {
140
+ if (m[2]) {
141
+ const parts = m[2].split(',');
142
+ const r = [];
143
+ for (let i = 0; i < parts.length; i++) {
144
+ const p = parts[i].trim();
145
+ if (!p)
146
+ break;
147
+ r.push(partReplacer(_polyfillHostNoCombinator, p, m[3]));
148
+ }
149
+ return r.join(',');
150
+ }
151
+ else {
152
+ return _polyfillHostNoCombinator + m[3];
153
+ }
154
+ });
155
+ };
156
+ const colonHostPartReplacer = (host, part, suffix) => {
157
+ return host + part.replace(_polyfillHost, '') + suffix;
158
+ };
159
+ const convertColonHost = (cssText) => {
160
+ return convertColonRule(cssText, _cssColonHostRe, colonHostPartReplacer);
161
+ };
162
+ const colonHostContextPartReplacer = (host, part, suffix) => {
163
+ if (part.indexOf(_polyfillHost) > -1) {
164
+ return colonHostPartReplacer(host, part, suffix);
165
+ }
166
+ else {
167
+ return host + part + suffix + ', ' + part + ' ' + host + suffix;
168
+ }
169
+ };
170
+ const convertColonSlotted = (cssText, slotScopeId) => {
171
+ const slotClass = '.' + slotScopeId + ' > ';
172
+ const selectors = [];
173
+ cssText = cssText.replace(_cssColonSlottedRe, (...m) => {
174
+ if (m[2]) {
175
+ const compound = m[2].trim();
176
+ const suffix = m[3];
177
+ const slottedSelector = slotClass + compound + suffix;
178
+ let prefixSelector = '';
179
+ for (let i = m[4] - 1; i >= 0; i--) {
180
+ const char = m[5][i];
181
+ if (char === '}' || char === ',') {
182
+ break;
183
+ }
184
+ prefixSelector = char + prefixSelector;
185
+ }
186
+ const orgSelector = prefixSelector + slottedSelector;
187
+ const addedSelector = `${prefixSelector.trimRight()}${slottedSelector.trim()}`;
188
+ if (orgSelector.trim() !== addedSelector.trim()) {
189
+ const updatedSelector = `${addedSelector}, ${orgSelector}`;
190
+ selectors.push({
191
+ orgSelector,
192
+ updatedSelector,
193
+ });
194
+ }
195
+ return slottedSelector;
196
+ }
197
+ else {
198
+ return _polyfillHostNoCombinator + m[3];
199
+ }
200
+ });
201
+ return {
202
+ selectors,
203
+ cssText,
204
+ };
205
+ };
206
+ const convertColonHostContext = (cssText) => {
207
+ return convertColonRule(cssText, _cssColonHostContextRe, colonHostContextPartReplacer);
208
+ };
209
+ const convertShadowDOMSelectors = (cssText) => {
210
+ return _shadowDOMSelectorsRe.reduce((result, pattern) => result.replace(pattern, ' '), cssText);
211
+ };
212
+ const makeScopeMatcher = (scopeSelector) => {
213
+ const lre = /\[/g;
214
+ const rre = /\]/g;
215
+ scopeSelector = scopeSelector.replace(lre, '\\[').replace(rre, '\\]');
216
+ return new RegExp('^(' + scopeSelector + ')' + _selectorReSuffix, 'm');
217
+ };
218
+ const selectorNeedsScoping = (selector, scopeSelector) => {
219
+ const re = makeScopeMatcher(scopeSelector);
220
+ return !re.test(selector);
221
+ };
222
+ const injectScopingSelector = (selector, scopingSelector) => {
223
+ return selector.replace(_selectorPartsRe, (_, before = '', _colonGroup, colon = '', after = '') => {
224
+ return before + scopingSelector + colon + after;
225
+ });
226
+ };
227
+ const applySimpleSelectorScope = (selector, scopeSelector, hostSelector) => {
228
+ // In Android browser, the lastIndex is not reset when the regex is used in String.replace()
229
+ _polyfillHostRe.lastIndex = 0;
230
+ if (_polyfillHostRe.test(selector)) {
231
+ const replaceBy = `.${hostSelector}`;
232
+ return selector
233
+ .replace(_polyfillHostNoCombinatorRe, (_, selector) => injectScopingSelector(selector, replaceBy))
234
+ .replace(_polyfillHostRe, replaceBy + ' ');
235
+ }
236
+ return scopeSelector + ' ' + selector;
237
+ };
238
+ const applyStrictSelectorScope = (selector, scopeSelector, hostSelector) => {
239
+ const isRe = /\[is=([^\]]*)\]/g;
240
+ scopeSelector = scopeSelector.replace(isRe, (_, ...parts) => parts[0]);
241
+ const className = '.' + scopeSelector;
242
+ const _scopeSelectorPart = (p) => {
243
+ let scopedP = p.trim();
244
+ if (!scopedP) {
245
+ return '';
246
+ }
247
+ if (p.indexOf(_polyfillHostNoCombinator) > -1) {
248
+ scopedP = applySimpleSelectorScope(p, scopeSelector, hostSelector);
249
+ }
250
+ else {
251
+ // remove :host since it should be unnecessary
252
+ const t = p.replace(_polyfillHostRe, '');
253
+ if (t.length > 0) {
254
+ scopedP = injectScopingSelector(t, className);
255
+ }
256
+ }
257
+ return scopedP;
258
+ };
259
+ const safeContent = safeSelector(selector);
260
+ selector = safeContent.content;
261
+ let scopedSelector = '';
262
+ let startIndex = 0;
263
+ let res;
264
+ const sep = /( |>|\+|~(?!=))\s*/g;
265
+ // If a selector appears before :host it should not be shimmed as it
266
+ // matches on ancestor elements and not on elements in the host's shadow
267
+ // `:host-context(div)` is transformed to
268
+ // `-shadowcsshost-no-combinatordiv, div -shadowcsshost-no-combinator`
269
+ // the `div` is not part of the component in the 2nd selectors and should not be scoped.
270
+ // Historically `component-tag:host` was matching the component so we also want to preserve
271
+ // this behavior to avoid breaking legacy apps (it should not match).
272
+ // The behavior should be:
273
+ // - `tag:host` -> `tag[h]` (this is to avoid breaking legacy apps, should not match anything)
274
+ // - `tag :host` -> `tag [h]` (`tag` is not scoped because it's considered part of a
275
+ // `:host-context(tag)`)
276
+ const hasHost = selector.indexOf(_polyfillHostNoCombinator) > -1;
277
+ // Only scope parts after the first `-shadowcsshost-no-combinator` when it is present
278
+ let shouldScope = !hasHost;
279
+ while ((res = sep.exec(selector)) !== null) {
280
+ const separator = res[1];
281
+ const part = selector.slice(startIndex, res.index).trim();
282
+ shouldScope = shouldScope || part.indexOf(_polyfillHostNoCombinator) > -1;
283
+ const scopedPart = shouldScope ? _scopeSelectorPart(part) : part;
284
+ scopedSelector += `${scopedPart} ${separator} `;
285
+ startIndex = sep.lastIndex;
286
+ }
287
+ const part = selector.substring(startIndex);
288
+ shouldScope = shouldScope || part.indexOf(_polyfillHostNoCombinator) > -1;
289
+ scopedSelector += shouldScope ? _scopeSelectorPart(part) : part;
290
+ // replace the placeholders with their original values
291
+ return restoreSafeSelector(safeContent.placeholders, scopedSelector);
292
+ };
293
+ const scopeSelector = (selector, scopeSelectorText, hostSelector, slotSelector) => {
294
+ return selector
295
+ .split(',')
296
+ .map((shallowPart) => {
297
+ if (slotSelector && shallowPart.indexOf('.' + slotSelector) > -1) {
298
+ return shallowPart.trim();
299
+ }
300
+ if (selectorNeedsScoping(shallowPart, scopeSelectorText)) {
301
+ return applyStrictSelectorScope(shallowPart, scopeSelectorText, hostSelector).trim();
302
+ }
303
+ else {
304
+ return shallowPart.trim();
305
+ }
306
+ })
307
+ .join(', ');
308
+ };
309
+ const scopeSelectors = (cssText, scopeSelectorText, hostSelector, slotSelector, commentOriginalSelector) => {
310
+ return processRules(cssText, (rule) => {
311
+ let selector = rule.selector;
312
+ let content = rule.content;
313
+ if (rule.selector[0] !== '@') {
314
+ selector = scopeSelector(rule.selector, scopeSelectorText, hostSelector, slotSelector);
315
+ }
316
+ else if (rule.selector.startsWith('@media') ||
317
+ rule.selector.startsWith('@supports') ||
318
+ rule.selector.startsWith('@page') ||
319
+ rule.selector.startsWith('@document')) {
320
+ content = scopeSelectors(rule.content, scopeSelectorText, hostSelector, slotSelector);
321
+ }
322
+ const cssRule = {
323
+ selector: selector.replace(/\s{2,}/g, ' ').trim(),
324
+ content,
325
+ };
326
+ return cssRule;
327
+ });
328
+ };
329
+ const scopeCssText = (cssText, scopeId, hostScopeId, slotScopeId, commentOriginalSelector) => {
330
+ cssText = insertPolyfillHostInCssText(cssText);
331
+ cssText = convertColonHost(cssText);
332
+ cssText = convertColonHostContext(cssText);
333
+ const slotted = convertColonSlotted(cssText, slotScopeId);
334
+ cssText = slotted.cssText;
335
+ cssText = convertShadowDOMSelectors(cssText);
336
+ if (scopeId) {
337
+ cssText = scopeSelectors(cssText, scopeId, hostScopeId, slotScopeId);
338
+ }
339
+ cssText = cssText.replace(/-shadowcsshost-no-combinator/g, `.${hostScopeId}`);
340
+ cssText = cssText.replace(/>\s*\*\s+([^{, ]+)/gm, ' $1 ');
341
+ return {
342
+ cssText: cssText.trim(),
343
+ slottedSelectors: slotted.selectors,
344
+ };
345
+ };
346
+ const scopeCss = (cssText, scopeId, commentOriginalSelector) => {
347
+ const hostScopeId = scopeId + '-h';
348
+ const slotScopeId = scopeId + '-s';
349
+ const commentsWithHash = extractCommentsWithHash(cssText);
350
+ cssText = stripComments(cssText);
351
+ const orgSelectors = [];
352
+ if (commentOriginalSelector) {
353
+ const processCommentedSelector = (rule) => {
354
+ const placeholder = `/*!@___${orgSelectors.length}___*/`;
355
+ const comment = `/*!@${rule.selector}*/`;
356
+ orgSelectors.push({ placeholder, comment });
357
+ rule.selector = placeholder + rule.selector;
358
+ return rule;
359
+ };
360
+ cssText = processRules(cssText, (rule) => {
361
+ if (rule.selector[0] !== '@') {
362
+ return processCommentedSelector(rule);
363
+ }
364
+ else if (rule.selector.startsWith('@media') ||
365
+ rule.selector.startsWith('@supports') ||
366
+ rule.selector.startsWith('@page') ||
367
+ rule.selector.startsWith('@document')) {
368
+ rule.content = processRules(rule.content, processCommentedSelector);
369
+ return rule;
370
+ }
371
+ return rule;
372
+ });
373
+ }
374
+ const scoped = scopeCssText(cssText, scopeId, hostScopeId, slotScopeId);
375
+ cssText = [scoped.cssText, ...commentsWithHash].join('\n');
376
+ if (commentOriginalSelector) {
377
+ orgSelectors.forEach(({ placeholder, comment }) => {
378
+ cssText = cssText.replace(placeholder, comment);
379
+ });
380
+ }
381
+ scoped.slottedSelectors.forEach((slottedSelector) => {
382
+ cssText = cssText.replace(slottedSelector.orgSelector, slottedSelector.updatedSelector);
383
+ });
384
+ return cssText;
385
+ };
386
+
387
+ export { scopeCss };
@@ -1,7 +1,7 @@
1
- import { r as registerInstance, h, g as getElement, H as Host } from './index-66fdbb35.js';
2
- import { i as initializeBindings, f as fce, a as nce, m as mde, $ as $ce } from './index-072be88f.js';
1
+ import { r as registerInstance, h, e as Host, g as getElement } from './index-4c45f50c.js';
2
+ import { i as initializeBindings } from './index-bf9cad6e.js';
3
3
  import { w as waitForAtomic } from './atomic-7b1e6d55.js';
4
- import './headless.esm-085e70ed-c4dfb380.js';
4
+ import { f as fce, a as nce, m as mde, $ as $ce } from './headless.esm-c328011d.js';
5
5
 
6
6
  const standaloneSearchboxListenerCss = "";
7
7