@xplortech/insights-elements 0.0.1-draft.7729525

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 (134) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +24 -0
  3. package/dist/cjs/apollo-data.esm-by4pfDU4.js +30 -0
  4. package/dist/cjs/apollo-data.esm-by4pfDU4.js.map +1 -0
  5. package/dist/cjs/app-globals-D-MP41KM.js +62 -0
  6. package/dist/cjs/app-globals-D-MP41KM.js.map +1 -0
  7. package/dist/cjs/index-CyoztwkV.js +40 -0
  8. package/dist/cjs/index-CyoztwkV.js.map +1 -0
  9. package/dist/cjs/index-DtrFwwSq.js +1472 -0
  10. package/dist/cjs/index-DtrFwwSq.js.map +1 -0
  11. package/dist/cjs/index.cjs.js +8 -0
  12. package/dist/cjs/index.cjs.js.map +1 -0
  13. package/dist/cjs/insights-bar-chart.cjs.entry.js +42 -0
  14. package/dist/cjs/insights-bar-chart.entry.cjs.js.map +1 -0
  15. package/dist/cjs/insights-chart-base-D6QbrWmD.js +102 -0
  16. package/dist/cjs/insights-chart-base-D6QbrWmD.js.map +1 -0
  17. package/dist/cjs/insights-donut-chart.cjs.entry.js +42 -0
  18. package/dist/cjs/insights-donut-chart.entry.cjs.js.map +1 -0
  19. package/dist/cjs/insights-elements.cjs.js +26 -0
  20. package/dist/cjs/insights-elements.cjs.js.map +1 -0
  21. package/dist/cjs/insights-wrapper.cjs.entry.js +1087 -0
  22. package/dist/cjs/insights-wrapper.entry.cjs.js.map +1 -0
  23. package/dist/cjs/loader.cjs.js +14 -0
  24. package/dist/cjs/loader.cjs.js.map +1 -0
  25. package/dist/collection/collection-manifest.json +15 -0
  26. package/dist/collection/components/insights-bar-chart/insights-bar-chart.css +87 -0
  27. package/dist/collection/components/insights-bar-chart/insights-bar-chart.js +51 -0
  28. package/dist/collection/components/insights-bar-chart/insights-bar-chart.js.map +1 -0
  29. package/dist/collection/components/insights-chart-base.js +213 -0
  30. package/dist/collection/components/insights-chart-base.js.map +1 -0
  31. package/dist/collection/components/insights-donut-chart/insights-donut-chart.css +87 -0
  32. package/dist/collection/components/insights-donut-chart/insights-donut-chart.js +51 -0
  33. package/dist/collection/components/insights-donut-chart/insights-donut-chart.js.map +1 -0
  34. package/dist/collection/components/insights-wrapper/insights-wrapper.css +17 -0
  35. package/dist/collection/components/insights-wrapper/insights-wrapper.js +402 -0
  36. package/dist/collection/components/insights-wrapper/insights-wrapper.js.map +1 -0
  37. package/dist/collection/global/app.js +35 -0
  38. package/dist/collection/global/app.js.map +1 -0
  39. package/dist/collection/index.js +12 -0
  40. package/dist/collection/index.js.map +1 -0
  41. package/dist/collection/utils/chart-types.js +16 -0
  42. package/dist/collection/utils/chart-types.js.map +1 -0
  43. package/dist/collection/utils/code-generator.js +201 -0
  44. package/dist/collection/utils/code-generator.js.map +1 -0
  45. package/dist/collection/utils/insights-context.js +33 -0
  46. package/dist/collection/utils/insights-context.js.map +1 -0
  47. package/dist/components/index.d.ts +33 -0
  48. package/dist/components/index.js +44 -0
  49. package/dist/components/index.js.map +1 -0
  50. package/dist/components/insights-bar-chart.d.ts +11 -0
  51. package/dist/components/insights-bar-chart.js +73 -0
  52. package/dist/components/insights-bar-chart.js.map +1 -0
  53. package/dist/components/insights-donut-chart.d.ts +11 -0
  54. package/dist/components/insights-donut-chart.js +73 -0
  55. package/dist/components/insights-donut-chart.js.map +1 -0
  56. package/dist/components/insights-wrapper.d.ts +11 -0
  57. package/dist/components/insights-wrapper.js +1123 -0
  58. package/dist/components/insights-wrapper.js.map +1 -0
  59. package/dist/components/p-CSTD3N9t.js +37 -0
  60. package/dist/components/p-CSTD3N9t.js.map +1 -0
  61. package/dist/components/p-DFvs3VMW.js +1195 -0
  62. package/dist/components/p-DFvs3VMW.js.map +1 -0
  63. package/dist/components/p-DHA6uI9u.js +9 -0
  64. package/dist/components/p-DHA6uI9u.js.map +1 -0
  65. package/dist/components/p-Dv82-c17.js +100 -0
  66. package/dist/components/p-Dv82-c17.js.map +1 -0
  67. package/dist/esm/apollo-data.esm-DHA6uI9u.js +9 -0
  68. package/dist/esm/apollo-data.esm-DHA6uI9u.js.map +1 -0
  69. package/dist/esm/app-globals-BtE_P06_.js +41 -0
  70. package/dist/esm/app-globals-BtE_P06_.js.map +1 -0
  71. package/dist/esm/index-BAqvP5--.js +1447 -0
  72. package/dist/esm/index-BAqvP5--.js.map +1 -0
  73. package/dist/esm/index-CSTD3N9t.js +37 -0
  74. package/dist/esm/index-CSTD3N9t.js.map +1 -0
  75. package/dist/esm/index.js +2 -0
  76. package/dist/esm/index.js.map +1 -0
  77. package/dist/esm/insights-bar-chart.entry.js +40 -0
  78. package/dist/esm/insights-bar-chart.entry.js.map +1 -0
  79. package/dist/esm/insights-chart-base-uNbdsloe.js +100 -0
  80. package/dist/esm/insights-chart-base-uNbdsloe.js.map +1 -0
  81. package/dist/esm/insights-donut-chart.entry.js +40 -0
  82. package/dist/esm/insights-donut-chart.entry.js.map +1 -0
  83. package/dist/esm/insights-elements.js +22 -0
  84. package/dist/esm/insights-elements.js.map +1 -0
  85. package/dist/esm/insights-wrapper.entry.js +1085 -0
  86. package/dist/esm/insights-wrapper.entry.js.map +1 -0
  87. package/dist/esm/loader.js +12 -0
  88. package/dist/esm/loader.js.map +1 -0
  89. package/dist/index.cjs.js +1 -0
  90. package/dist/index.js +1 -0
  91. package/dist/insights-elements/index.esm.js +2 -0
  92. package/dist/insights-elements/index.esm.js.map +1 -0
  93. package/dist/insights-elements/insights-bar-chart.entry.esm.js.map +1 -0
  94. package/dist/insights-elements/insights-donut-chart.entry.esm.js.map +1 -0
  95. package/dist/insights-elements/insights-elements.esm.js +2 -0
  96. package/dist/insights-elements/insights-elements.esm.js.map +1 -0
  97. package/dist/insights-elements/insights-wrapper.entry.esm.js.map +1 -0
  98. package/dist/insights-elements/loader.esm.js.map +1 -0
  99. package/dist/insights-elements/p-247183e1.entry.js +2 -0
  100. package/dist/insights-elements/p-247183e1.entry.js.map +1 -0
  101. package/dist/insights-elements/p-29ce0a90.entry.js +2 -0
  102. package/dist/insights-elements/p-29ce0a90.entry.js.map +1 -0
  103. package/dist/insights-elements/p-BAqvP5--.js +3 -0
  104. package/dist/insights-elements/p-BAqvP5--.js.map +1 -0
  105. package/dist/insights-elements/p-CSTD3N9t.js +2 -0
  106. package/dist/insights-elements/p-CSTD3N9t.js.map +1 -0
  107. package/dist/insights-elements/p-DE0h_D1B.js +2 -0
  108. package/dist/insights-elements/p-DE0h_D1B.js.map +1 -0
  109. package/dist/insights-elements/p-DHA6uI9u.js +3 -0
  110. package/dist/insights-elements/p-DHA6uI9u.js.map +1 -0
  111. package/dist/insights-elements/p-DVNwzSpV.js +2 -0
  112. package/dist/insights-elements/p-DVNwzSpV.js.map +1 -0
  113. package/dist/insights-elements/p-e48a7068.entry.js +2 -0
  114. package/dist/insights-elements/p-e48a7068.entry.js.map +1 -0
  115. package/dist/types/components/insights-bar-chart/insights-bar-chart.d.ts +9 -0
  116. package/dist/types/components/insights-chart-base.d.ts +54 -0
  117. package/dist/types/components/insights-donut-chart/insights-donut-chart.d.ts +9 -0
  118. package/dist/types/components/insights-wrapper/insights-wrapper.d.ts +46 -0
  119. package/dist/types/components.d.ts +201 -0
  120. package/dist/types/global/app.d.ts +6 -0
  121. package/dist/types/index.d.ts +12 -0
  122. package/dist/types/stencil-public-runtime.d.ts +1756 -0
  123. package/dist/types/utils/chart-types.d.ts +53 -0
  124. package/dist/types/utils/code-generator.d.ts +31 -0
  125. package/dist/types/utils/insights-context.d.ts +39 -0
  126. package/insights-loader/cdn.js +1 -0
  127. package/insights-loader/index.cjs.js +1 -0
  128. package/insights-loader/index.d.ts +24 -0
  129. package/insights-loader/index.es2017.js +1 -0
  130. package/insights-loader/index.js +2 -0
  131. package/loader/index.cjs.js +8 -0
  132. package/loader/index.d.ts +5 -0
  133. package/loader/index.js +7 -0
  134. package/package.json +92 -0
@@ -0,0 +1,1123 @@
1
+ import { p as proxyCustomElement, H, h as h$1 } from './p-DFvs3VMW.js';
2
+ import { g as getConfiguration } from './p-CSTD3N9t.js';
3
+
4
+ var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
5
+
6
+ function getDefaultExportFromCjs (x) {
7
+ return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
8
+ }
9
+
10
+ var browserPonyfill = {exports: {}};
11
+
12
+ var hasRequiredBrowserPonyfill;
13
+
14
+ function requireBrowserPonyfill () {
15
+ if (hasRequiredBrowserPonyfill) return browserPonyfill.exports;
16
+ hasRequiredBrowserPonyfill = 1;
17
+ (function (module, exports) {
18
+ // Save global object in a variable
19
+ var __global__ =
20
+ (typeof globalThis !== 'undefined' && globalThis) ||
21
+ (typeof self !== 'undefined' && self) ||
22
+ (typeof commonjsGlobal !== 'undefined' && commonjsGlobal);
23
+ // Create an object that extends from __global__ without the fetch function
24
+ var __globalThis__ = (function () {
25
+ function F() {
26
+ this.fetch = false;
27
+ this.DOMException = __global__.DOMException;
28
+ }
29
+ F.prototype = __global__; // Needed for feature detection on whatwg-fetch's code
30
+ return new F();
31
+ })();
32
+ // Wraps whatwg-fetch with a function scope to hijack the global object
33
+ // "globalThis" that's going to be patched
34
+ (function(globalThis) {
35
+
36
+ ((function (exports) {
37
+
38
+ /* eslint-disable no-prototype-builtins */
39
+ var g =
40
+ (typeof globalThis !== 'undefined' && globalThis) ||
41
+ (typeof self !== 'undefined' && self) ||
42
+ // eslint-disable-next-line no-undef
43
+ (typeof commonjsGlobal !== 'undefined' && commonjsGlobal) ||
44
+ {};
45
+
46
+ var support = {
47
+ searchParams: 'URLSearchParams' in g,
48
+ iterable: 'Symbol' in g && 'iterator' in Symbol,
49
+ blob:
50
+ 'FileReader' in g &&
51
+ 'Blob' in g &&
52
+ (function() {
53
+ try {
54
+ new Blob();
55
+ return true
56
+ } catch (e) {
57
+ return false
58
+ }
59
+ })(),
60
+ formData: 'FormData' in g,
61
+ arrayBuffer: 'ArrayBuffer' in g
62
+ };
63
+
64
+ function isDataView(obj) {
65
+ return obj && DataView.prototype.isPrototypeOf(obj)
66
+ }
67
+
68
+ if (support.arrayBuffer) {
69
+ var viewClasses = [
70
+ '[object Int8Array]',
71
+ '[object Uint8Array]',
72
+ '[object Uint8ClampedArray]',
73
+ '[object Int16Array]',
74
+ '[object Uint16Array]',
75
+ '[object Int32Array]',
76
+ '[object Uint32Array]',
77
+ '[object Float32Array]',
78
+ '[object Float64Array]'
79
+ ];
80
+
81
+ var isArrayBufferView =
82
+ ArrayBuffer.isView ||
83
+ function(obj) {
84
+ return obj && viewClasses.indexOf(Object.prototype.toString.call(obj)) > -1
85
+ };
86
+ }
87
+
88
+ function normalizeName(name) {
89
+ if (typeof name !== 'string') {
90
+ name = String(name);
91
+ }
92
+ if (/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(name) || name === '') {
93
+ throw new TypeError('Invalid character in header field name: "' + name + '"')
94
+ }
95
+ return name.toLowerCase()
96
+ }
97
+
98
+ function normalizeValue(value) {
99
+ if (typeof value !== 'string') {
100
+ value = String(value);
101
+ }
102
+ return value
103
+ }
104
+
105
+ // Build a destructive iterator for the value list
106
+ function iteratorFor(items) {
107
+ var iterator = {
108
+ next: function() {
109
+ var value = items.shift();
110
+ return {done: value === undefined, value: value}
111
+ }
112
+ };
113
+
114
+ if (support.iterable) {
115
+ iterator[Symbol.iterator] = function() {
116
+ return iterator
117
+ };
118
+ }
119
+
120
+ return iterator
121
+ }
122
+
123
+ function Headers(headers) {
124
+ this.map = {};
125
+
126
+ if (headers instanceof Headers) {
127
+ headers.forEach(function(value, name) {
128
+ this.append(name, value);
129
+ }, this);
130
+ } else if (Array.isArray(headers)) {
131
+ headers.forEach(function(header) {
132
+ if (header.length != 2) {
133
+ throw new TypeError('Headers constructor: expected name/value pair to be length 2, found' + header.length)
134
+ }
135
+ this.append(header[0], header[1]);
136
+ }, this);
137
+ } else if (headers) {
138
+ Object.getOwnPropertyNames(headers).forEach(function(name) {
139
+ this.append(name, headers[name]);
140
+ }, this);
141
+ }
142
+ }
143
+
144
+ Headers.prototype.append = function(name, value) {
145
+ name = normalizeName(name);
146
+ value = normalizeValue(value);
147
+ var oldValue = this.map[name];
148
+ this.map[name] = oldValue ? oldValue + ', ' + value : value;
149
+ };
150
+
151
+ Headers.prototype['delete'] = function(name) {
152
+ delete this.map[normalizeName(name)];
153
+ };
154
+
155
+ Headers.prototype.get = function(name) {
156
+ name = normalizeName(name);
157
+ return this.has(name) ? this.map[name] : null
158
+ };
159
+
160
+ Headers.prototype.has = function(name) {
161
+ return this.map.hasOwnProperty(normalizeName(name))
162
+ };
163
+
164
+ Headers.prototype.set = function(name, value) {
165
+ this.map[normalizeName(name)] = normalizeValue(value);
166
+ };
167
+
168
+ Headers.prototype.forEach = function(callback, thisArg) {
169
+ for (var name in this.map) {
170
+ if (this.map.hasOwnProperty(name)) {
171
+ callback.call(thisArg, this.map[name], name, this);
172
+ }
173
+ }
174
+ };
175
+
176
+ Headers.prototype.keys = function() {
177
+ var items = [];
178
+ this.forEach(function(value, name) {
179
+ items.push(name);
180
+ });
181
+ return iteratorFor(items)
182
+ };
183
+
184
+ Headers.prototype.values = function() {
185
+ var items = [];
186
+ this.forEach(function(value) {
187
+ items.push(value);
188
+ });
189
+ return iteratorFor(items)
190
+ };
191
+
192
+ Headers.prototype.entries = function() {
193
+ var items = [];
194
+ this.forEach(function(value, name) {
195
+ items.push([name, value]);
196
+ });
197
+ return iteratorFor(items)
198
+ };
199
+
200
+ if (support.iterable) {
201
+ Headers.prototype[Symbol.iterator] = Headers.prototype.entries;
202
+ }
203
+
204
+ function consumed(body) {
205
+ if (body._noBody) return
206
+ if (body.bodyUsed) {
207
+ return Promise.reject(new TypeError('Already read'))
208
+ }
209
+ body.bodyUsed = true;
210
+ }
211
+
212
+ function fileReaderReady(reader) {
213
+ return new Promise(function(resolve, reject) {
214
+ reader.onload = function() {
215
+ resolve(reader.result);
216
+ };
217
+ reader.onerror = function() {
218
+ reject(reader.error);
219
+ };
220
+ })
221
+ }
222
+
223
+ function readBlobAsArrayBuffer(blob) {
224
+ var reader = new FileReader();
225
+ var promise = fileReaderReady(reader);
226
+ reader.readAsArrayBuffer(blob);
227
+ return promise
228
+ }
229
+
230
+ function readBlobAsText(blob) {
231
+ var reader = new FileReader();
232
+ var promise = fileReaderReady(reader);
233
+ var match = /charset=([A-Za-z0-9_-]+)/.exec(blob.type);
234
+ var encoding = match ? match[1] : 'utf-8';
235
+ reader.readAsText(blob, encoding);
236
+ return promise
237
+ }
238
+
239
+ function readArrayBufferAsText(buf) {
240
+ var view = new Uint8Array(buf);
241
+ var chars = new Array(view.length);
242
+
243
+ for (var i = 0; i < view.length; i++) {
244
+ chars[i] = String.fromCharCode(view[i]);
245
+ }
246
+ return chars.join('')
247
+ }
248
+
249
+ function bufferClone(buf) {
250
+ if (buf.slice) {
251
+ return buf.slice(0)
252
+ } else {
253
+ var view = new Uint8Array(buf.byteLength);
254
+ view.set(new Uint8Array(buf));
255
+ return view.buffer
256
+ }
257
+ }
258
+
259
+ function Body() {
260
+ this.bodyUsed = false;
261
+
262
+ this._initBody = function(body) {
263
+ /*
264
+ fetch-mock wraps the Response object in an ES6 Proxy to
265
+ provide useful test harness features such as flush. However, on
266
+ ES5 browsers without fetch or Proxy support pollyfills must be used;
267
+ the proxy-pollyfill is unable to proxy an attribute unless it exists
268
+ on the object before the Proxy is created. This change ensures
269
+ Response.bodyUsed exists on the instance, while maintaining the
270
+ semantic of setting Request.bodyUsed in the constructor before
271
+ _initBody is called.
272
+ */
273
+ // eslint-disable-next-line no-self-assign
274
+ this.bodyUsed = this.bodyUsed;
275
+ this._bodyInit = body;
276
+ if (!body) {
277
+ this._noBody = true;
278
+ this._bodyText = '';
279
+ } else if (typeof body === 'string') {
280
+ this._bodyText = body;
281
+ } else if (support.blob && Blob.prototype.isPrototypeOf(body)) {
282
+ this._bodyBlob = body;
283
+ } else if (support.formData && FormData.prototype.isPrototypeOf(body)) {
284
+ this._bodyFormData = body;
285
+ } else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) {
286
+ this._bodyText = body.toString();
287
+ } else if (support.arrayBuffer && support.blob && isDataView(body)) {
288
+ this._bodyArrayBuffer = bufferClone(body.buffer);
289
+ // IE 10-11 can't handle a DataView body.
290
+ this._bodyInit = new Blob([this._bodyArrayBuffer]);
291
+ } else if (support.arrayBuffer && (ArrayBuffer.prototype.isPrototypeOf(body) || isArrayBufferView(body))) {
292
+ this._bodyArrayBuffer = bufferClone(body);
293
+ } else {
294
+ this._bodyText = body = Object.prototype.toString.call(body);
295
+ }
296
+
297
+ if (!this.headers.get('content-type')) {
298
+ if (typeof body === 'string') {
299
+ this.headers.set('content-type', 'text/plain;charset=UTF-8');
300
+ } else if (this._bodyBlob && this._bodyBlob.type) {
301
+ this.headers.set('content-type', this._bodyBlob.type);
302
+ } else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) {
303
+ this.headers.set('content-type', 'application/x-www-form-urlencoded;charset=UTF-8');
304
+ }
305
+ }
306
+ };
307
+
308
+ if (support.blob) {
309
+ this.blob = function() {
310
+ var rejected = consumed(this);
311
+ if (rejected) {
312
+ return rejected
313
+ }
314
+
315
+ if (this._bodyBlob) {
316
+ return Promise.resolve(this._bodyBlob)
317
+ } else if (this._bodyArrayBuffer) {
318
+ return Promise.resolve(new Blob([this._bodyArrayBuffer]))
319
+ } else if (this._bodyFormData) {
320
+ throw new Error('could not read FormData body as blob')
321
+ } else {
322
+ return Promise.resolve(new Blob([this._bodyText]))
323
+ }
324
+ };
325
+ }
326
+
327
+ this.arrayBuffer = function() {
328
+ if (this._bodyArrayBuffer) {
329
+ var isConsumed = consumed(this);
330
+ if (isConsumed) {
331
+ return isConsumed
332
+ } else if (ArrayBuffer.isView(this._bodyArrayBuffer)) {
333
+ return Promise.resolve(
334
+ this._bodyArrayBuffer.buffer.slice(
335
+ this._bodyArrayBuffer.byteOffset,
336
+ this._bodyArrayBuffer.byteOffset + this._bodyArrayBuffer.byteLength
337
+ )
338
+ )
339
+ } else {
340
+ return Promise.resolve(this._bodyArrayBuffer)
341
+ }
342
+ } else if (support.blob) {
343
+ return this.blob().then(readBlobAsArrayBuffer)
344
+ } else {
345
+ throw new Error('could not read as ArrayBuffer')
346
+ }
347
+ };
348
+
349
+ this.text = function() {
350
+ var rejected = consumed(this);
351
+ if (rejected) {
352
+ return rejected
353
+ }
354
+
355
+ if (this._bodyBlob) {
356
+ return readBlobAsText(this._bodyBlob)
357
+ } else if (this._bodyArrayBuffer) {
358
+ return Promise.resolve(readArrayBufferAsText(this._bodyArrayBuffer))
359
+ } else if (this._bodyFormData) {
360
+ throw new Error('could not read FormData body as text')
361
+ } else {
362
+ return Promise.resolve(this._bodyText)
363
+ }
364
+ };
365
+
366
+ if (support.formData) {
367
+ this.formData = function() {
368
+ return this.text().then(decode)
369
+ };
370
+ }
371
+
372
+ this.json = function() {
373
+ return this.text().then(JSON.parse)
374
+ };
375
+
376
+ return this
377
+ }
378
+
379
+ // HTTP methods whose capitalization should be normalized
380
+ var methods = ['CONNECT', 'DELETE', 'GET', 'HEAD', 'OPTIONS', 'PATCH', 'POST', 'PUT', 'TRACE'];
381
+
382
+ function normalizeMethod(method) {
383
+ var upcased = method.toUpperCase();
384
+ return methods.indexOf(upcased) > -1 ? upcased : method
385
+ }
386
+
387
+ function Request(input, options) {
388
+ if (!(this instanceof Request)) {
389
+ throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.')
390
+ }
391
+
392
+ options = options || {};
393
+ var body = options.body;
394
+
395
+ if (input instanceof Request) {
396
+ if (input.bodyUsed) {
397
+ throw new TypeError('Already read')
398
+ }
399
+ this.url = input.url;
400
+ this.credentials = input.credentials;
401
+ if (!options.headers) {
402
+ this.headers = new Headers(input.headers);
403
+ }
404
+ this.method = input.method;
405
+ this.mode = input.mode;
406
+ this.signal = input.signal;
407
+ if (!body && input._bodyInit != null) {
408
+ body = input._bodyInit;
409
+ input.bodyUsed = true;
410
+ }
411
+ } else {
412
+ this.url = String(input);
413
+ }
414
+
415
+ this.credentials = options.credentials || this.credentials || 'same-origin';
416
+ if (options.headers || !this.headers) {
417
+ this.headers = new Headers(options.headers);
418
+ }
419
+ this.method = normalizeMethod(options.method || this.method || 'GET');
420
+ this.mode = options.mode || this.mode || null;
421
+ this.signal = options.signal || this.signal || (function () {
422
+ if ('AbortController' in g) {
423
+ var ctrl = new AbortController();
424
+ return ctrl.signal;
425
+ }
426
+ }());
427
+ this.referrer = null;
428
+
429
+ if ((this.method === 'GET' || this.method === 'HEAD') && body) {
430
+ throw new TypeError('Body not allowed for GET or HEAD requests')
431
+ }
432
+ this._initBody(body);
433
+
434
+ if (this.method === 'GET' || this.method === 'HEAD') {
435
+ if (options.cache === 'no-store' || options.cache === 'no-cache') {
436
+ // Search for a '_' parameter in the query string
437
+ var reParamSearch = /([?&])_=[^&]*/;
438
+ if (reParamSearch.test(this.url)) {
439
+ // If it already exists then set the value with the current time
440
+ this.url = this.url.replace(reParamSearch, '$1_=' + new Date().getTime());
441
+ } else {
442
+ // Otherwise add a new '_' parameter to the end with the current time
443
+ var reQueryString = /\?/;
444
+ this.url += (reQueryString.test(this.url) ? '&' : '?') + '_=' + new Date().getTime();
445
+ }
446
+ }
447
+ }
448
+ }
449
+
450
+ Request.prototype.clone = function() {
451
+ return new Request(this, {body: this._bodyInit})
452
+ };
453
+
454
+ function decode(body) {
455
+ var form = new FormData();
456
+ body
457
+ .trim()
458
+ .split('&')
459
+ .forEach(function(bytes) {
460
+ if (bytes) {
461
+ var split = bytes.split('=');
462
+ var name = split.shift().replace(/\+/g, ' ');
463
+ var value = split.join('=').replace(/\+/g, ' ');
464
+ form.append(decodeURIComponent(name), decodeURIComponent(value));
465
+ }
466
+ });
467
+ return form
468
+ }
469
+
470
+ function parseHeaders(rawHeaders) {
471
+ var headers = new Headers();
472
+ // Replace instances of \r\n and \n followed by at least one space or horizontal tab with a space
473
+ // https://tools.ietf.org/html/rfc7230#section-3.2
474
+ var preProcessedHeaders = rawHeaders.replace(/\r?\n[\t ]+/g, ' ');
475
+ // Avoiding split via regex to work around a common IE11 bug with the core-js 3.6.0 regex polyfill
476
+ // https://github.com/github/fetch/issues/748
477
+ // https://github.com/zloirock/core-js/issues/751
478
+ preProcessedHeaders
479
+ .split('\r')
480
+ .map(function(header) {
481
+ return header.indexOf('\n') === 0 ? header.substr(1, header.length) : header
482
+ })
483
+ .forEach(function(line) {
484
+ var parts = line.split(':');
485
+ var key = parts.shift().trim();
486
+ if (key) {
487
+ var value = parts.join(':').trim();
488
+ try {
489
+ headers.append(key, value);
490
+ } catch (error) {
491
+ console.warn('Response ' + error.message);
492
+ }
493
+ }
494
+ });
495
+ return headers
496
+ }
497
+
498
+ Body.call(Request.prototype);
499
+
500
+ function Response(bodyInit, options) {
501
+ if (!(this instanceof Response)) {
502
+ throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.')
503
+ }
504
+ if (!options) {
505
+ options = {};
506
+ }
507
+
508
+ this.type = 'default';
509
+ this.status = options.status === undefined ? 200 : options.status;
510
+ if (this.status < 200 || this.status > 599) {
511
+ throw new RangeError("Failed to construct 'Response': The status provided (0) is outside the range [200, 599].")
512
+ }
513
+ this.ok = this.status >= 200 && this.status < 300;
514
+ this.statusText = options.statusText === undefined ? '' : '' + options.statusText;
515
+ this.headers = new Headers(options.headers);
516
+ this.url = options.url || '';
517
+ this._initBody(bodyInit);
518
+ }
519
+
520
+ Body.call(Response.prototype);
521
+
522
+ Response.prototype.clone = function() {
523
+ return new Response(this._bodyInit, {
524
+ status: this.status,
525
+ statusText: this.statusText,
526
+ headers: new Headers(this.headers),
527
+ url: this.url
528
+ })
529
+ };
530
+
531
+ Response.error = function() {
532
+ var response = new Response(null, {status: 200, statusText: ''});
533
+ response.ok = false;
534
+ response.status = 0;
535
+ response.type = 'error';
536
+ return response
537
+ };
538
+
539
+ var redirectStatuses = [301, 302, 303, 307, 308];
540
+
541
+ Response.redirect = function(url, status) {
542
+ if (redirectStatuses.indexOf(status) === -1) {
543
+ throw new RangeError('Invalid status code')
544
+ }
545
+
546
+ return new Response(null, {status: status, headers: {location: url}})
547
+ };
548
+
549
+ exports.DOMException = g.DOMException;
550
+ try {
551
+ new exports.DOMException();
552
+ } catch (err) {
553
+ exports.DOMException = function(message, name) {
554
+ this.message = message;
555
+ this.name = name;
556
+ var error = Error(message);
557
+ this.stack = error.stack;
558
+ };
559
+ exports.DOMException.prototype = Object.create(Error.prototype);
560
+ exports.DOMException.prototype.constructor = exports.DOMException;
561
+ }
562
+
563
+ function fetch(input, init) {
564
+ return new Promise(function(resolve, reject) {
565
+ var request = new Request(input, init);
566
+
567
+ if (request.signal && request.signal.aborted) {
568
+ return reject(new exports.DOMException('Aborted', 'AbortError'))
569
+ }
570
+
571
+ var xhr = new XMLHttpRequest();
572
+
573
+ function abortXhr() {
574
+ xhr.abort();
575
+ }
576
+
577
+ xhr.onload = function() {
578
+ var options = {
579
+ statusText: xhr.statusText,
580
+ headers: parseHeaders(xhr.getAllResponseHeaders() || '')
581
+ };
582
+ // This check if specifically for when a user fetches a file locally from the file system
583
+ // Only if the status is out of a normal range
584
+ if (request.url.indexOf('file://') === 0 && (xhr.status < 200 || xhr.status > 599)) {
585
+ options.status = 200;
586
+ } else {
587
+ options.status = xhr.status;
588
+ }
589
+ options.url = 'responseURL' in xhr ? xhr.responseURL : options.headers.get('X-Request-URL');
590
+ var body = 'response' in xhr ? xhr.response : xhr.responseText;
591
+ setTimeout(function() {
592
+ resolve(new Response(body, options));
593
+ }, 0);
594
+ };
595
+
596
+ xhr.onerror = function() {
597
+ setTimeout(function() {
598
+ reject(new TypeError('Network request failed'));
599
+ }, 0);
600
+ };
601
+
602
+ xhr.ontimeout = function() {
603
+ setTimeout(function() {
604
+ reject(new TypeError('Network request timed out'));
605
+ }, 0);
606
+ };
607
+
608
+ xhr.onabort = function() {
609
+ setTimeout(function() {
610
+ reject(new exports.DOMException('Aborted', 'AbortError'));
611
+ }, 0);
612
+ };
613
+
614
+ function fixUrl(url) {
615
+ try {
616
+ return url === '' && g.location.href ? g.location.href : url
617
+ } catch (e) {
618
+ return url
619
+ }
620
+ }
621
+
622
+ xhr.open(request.method, fixUrl(request.url), true);
623
+
624
+ if (request.credentials === 'include') {
625
+ xhr.withCredentials = true;
626
+ } else if (request.credentials === 'omit') {
627
+ xhr.withCredentials = false;
628
+ }
629
+
630
+ if ('responseType' in xhr) {
631
+ if (support.blob) {
632
+ xhr.responseType = 'blob';
633
+ } else if (
634
+ support.arrayBuffer
635
+ ) {
636
+ xhr.responseType = 'arraybuffer';
637
+ }
638
+ }
639
+
640
+ if (init && typeof init.headers === 'object' && !(init.headers instanceof Headers || (g.Headers && init.headers instanceof g.Headers))) {
641
+ var names = [];
642
+ Object.getOwnPropertyNames(init.headers).forEach(function(name) {
643
+ names.push(normalizeName(name));
644
+ xhr.setRequestHeader(name, normalizeValue(init.headers[name]));
645
+ });
646
+ request.headers.forEach(function(value, name) {
647
+ if (names.indexOf(name) === -1) {
648
+ xhr.setRequestHeader(name, value);
649
+ }
650
+ });
651
+ } else {
652
+ request.headers.forEach(function(value, name) {
653
+ xhr.setRequestHeader(name, value);
654
+ });
655
+ }
656
+
657
+ if (request.signal) {
658
+ request.signal.addEventListener('abort', abortXhr);
659
+
660
+ xhr.onreadystatechange = function() {
661
+ // DONE (success or failure)
662
+ if (xhr.readyState === 4) {
663
+ request.signal.removeEventListener('abort', abortXhr);
664
+ }
665
+ };
666
+ }
667
+
668
+ xhr.send(typeof request._bodyInit === 'undefined' ? null : request._bodyInit);
669
+ })
670
+ }
671
+
672
+ fetch.polyfill = true;
673
+
674
+ if (!g.fetch) {
675
+ g.fetch = fetch;
676
+ g.Headers = Headers;
677
+ g.Request = Request;
678
+ g.Response = Response;
679
+ }
680
+
681
+ exports.Headers = Headers;
682
+ exports.Request = Request;
683
+ exports.Response = Response;
684
+ exports.fetch = fetch;
685
+
686
+ return exports;
687
+
688
+ }))({});
689
+ })(__globalThis__);
690
+ // This is a ponyfill, so...
691
+ __globalThis__.fetch.ponyfill = true;
692
+ delete __globalThis__.fetch.polyfill;
693
+ // Choose between native implementation (__global__) or custom implementation (__globalThis__)
694
+ var ctx = __global__.fetch ? __global__ : __globalThis__;
695
+ exports = ctx.fetch; // To enable: import fetch from 'cross-fetch'
696
+ exports.default = ctx.fetch; // For TypeScript consumers without esModuleInterop.
697
+ exports.fetch = ctx.fetch; // To enable: import {fetch} from 'cross-fetch'
698
+ exports.Headers = ctx.Headers;
699
+ exports.Request = ctx.Request;
700
+ exports.Response = ctx.Response;
701
+ module.exports = exports;
702
+ } (browserPonyfill, browserPonyfill.exports));
703
+ return browserPonyfill.exports;
704
+ }
705
+
706
+ var browserPonyfillExports = requireBrowserPonyfill();
707
+ var h = /*@__PURE__*/getDefaultExportFromCjs(browserPonyfillExports);
708
+
709
+ class c {
710
+ /**
711
+ * Create a ResultSet
712
+ * @param {object} data - Raw data from API response
713
+ */
714
+ constructor(e) {
715
+ this.rawData = e;
716
+ }
717
+ /**
718
+ * Get all data rows as an array
719
+ * @returns {Array<object>} Array of data rows
720
+ */
721
+ getData() {
722
+ return this.rawData.data || [];
723
+ }
724
+ /**
725
+ * Get total count of records
726
+ * @returns {number} Total number of records matching the query
727
+ */
728
+ getCount() {
729
+ return this.rawData.meta?.count || 0;
730
+ }
731
+ /**
732
+ * Get calculated totals
733
+ * @returns {object|null} Totals object
734
+ */
735
+ getTotals() {
736
+ return this.rawData.totals || null;
737
+ }
738
+ /**
739
+ * Get pagination information
740
+ * @returns {object} Object containing limit and offset
741
+ */
742
+ getPagination() {
743
+ return {
744
+ limit: this.rawData.meta?.limit || 0,
745
+ offset: this.rawData.meta?.offset || 0
746
+ };
747
+ }
748
+ /**
749
+ * Get raw response data
750
+ * @returns {object} Raw API response
751
+ */
752
+ getRawData() {
753
+ return this.rawData;
754
+ }
755
+ /**
756
+ * Get raw sql query if available
757
+ * @returns {(string|undefined)} Raw SQL query if available
758
+ */
759
+ getRawSQL() {
760
+ return this.rawData.meta?.sql;
761
+ }
762
+ /**
763
+ * Convert data to a tabular format with specified columns
764
+ * @param {Array<string>} columns - Array of column names to include
765
+ * @returns {Array<object>} Array of rows with only specified columns
766
+ */
767
+ tablePivot(e) {
768
+ const t = this.getData();
769
+ return !e || e.length === 0 ? t : t.map((r) => {
770
+ const a = {};
771
+ return e.forEach((n) => {
772
+ a[n] = r[n];
773
+ }), a;
774
+ });
775
+ }
776
+ /**
777
+ * Convert data to series format for charting libraries
778
+ * @param {string} xAxis - Column to use for x-axis
779
+ * @param {Array<string>} yAxes - Columns to use for y-axes
780
+ * @returns {Array<object>} Array of series with x and y values
781
+ */
782
+ chartPivot(e, t) {
783
+ const r = this.getData();
784
+ return t.map((a) => ({
785
+ key: a,
786
+ title: a,
787
+ series: r.map((n) => ({
788
+ x: n[e],
789
+ y: n[a]
790
+ }))
791
+ }));
792
+ }
793
+ }
794
+ const p = "0.1.6";
795
+ class l {
796
+ constructor(e, t) {
797
+ this.apiToken = e, this.apiUrl = t.apiUrl.endsWith("/") ? t.apiUrl.slice(0, -1) : t.apiUrl;
798
+ }
799
+ _getDefaultHeaders() {
800
+ const e = {
801
+ "Content-Type": "application/json",
802
+ "x-insights-sdk-version": p
803
+ };
804
+ return this.apiToken && (e.Authorization = `Bearer ${this.apiToken}`), e;
805
+ }
806
+ /**
807
+ * Get a report by name with specified query parameters
808
+ * @param {string} reportName - The name of the report to fetch
809
+ * @param {(Object|Array)} query - The query parameters
810
+ * @param {Object} [options] - Additional options
811
+ * @param {boolean} [options.sql=false] - Include generated SQL in response
812
+ * @returns {Promise<ResultSet>}
813
+ */
814
+ async getReport(e, t = {}, r = {}) {
815
+ if (!e)
816
+ throw new Error("Report name is required");
817
+ const a = new URL(`${this.apiUrl}/reports/${e}`);
818
+ (Array.isArray(t) ? t : [t]).forEach((u) => {
819
+ Object.keys(u).length > 0 && a.searchParams.append("query", JSON.stringify(u));
820
+ }), r.sql && a.searchParams.append("sql", "true");
821
+ const s = await h(a.toString(), {
822
+ headers: this._getDefaultHeaders()
823
+ });
824
+ if (!s.ok) {
825
+ const u = await s.text();
826
+ throw new Error(
827
+ `API request failed: ${s.status} ${s.statusText}. ${u}`
828
+ );
829
+ }
830
+ const i = await s.json();
831
+ return Array.isArray(i) ? i.map((u) => new c(u)) : new c(i);
832
+ }
833
+ /**
834
+ * Get metadata for a specific report
835
+ * @param {string} reportName - The name of the report
836
+ * @returns {Promise<object>} Report metadata
837
+ */
838
+ async getReportMeta(e) {
839
+ if (!e)
840
+ throw new Error("Report name is required");
841
+ const t = `${this.apiUrl}/reports/${e}/meta`, r = await h(t, {
842
+ headers: this._getDefaultHeaders()
843
+ });
844
+ if (!r.ok) {
845
+ const a = await r.text();
846
+ throw new Error(
847
+ `API request failed: ${r.status} ${r.statusText}. ${a}`
848
+ );
849
+ }
850
+ return r.json();
851
+ }
852
+ /**
853
+ * Get a list of all available reports
854
+ * @returns {Promise<object>} List of available reports
855
+ */
856
+ async listReports() {
857
+ const e = `${this.apiUrl}/reports`, t = await h(e, {
858
+ headers: this._getDefaultHeaders()
859
+ });
860
+ if (!t.ok) {
861
+ const r = await t.text();
862
+ throw new Error(
863
+ `API request failed: ${t.status} ${t.statusText}. ${r}`
864
+ );
865
+ }
866
+ return t.json();
867
+ }
868
+ /**
869
+ * Export a report in a specific format (default is CSV)
870
+ * @param {string} reportName - The name of the report to export
871
+ * @param {object} query - Optional query parameters
872
+ * @param {string} [type="csv"] - The export format (e.g., "csv", "json")
873
+ * @returns {Promise<string>} The exported report content as string
874
+ */
875
+ async exportReport(e, t = {}, r = "csv") {
876
+ if (!e)
877
+ throw new Error("Report name is required");
878
+ if (r !== "csv")
879
+ throw new Error("Only csv is supported");
880
+ const a = new URL(`${this.apiUrl}/reports/${e}/export`);
881
+ (Array.isArray(t) ? t : [t]).forEach((i) => {
882
+ Object.keys(i).length > 0 && a.searchParams.append("query", JSON.stringify(i));
883
+ });
884
+ const s = await h(a.toString(), {
885
+ headers: this._getDefaultHeaders()
886
+ });
887
+ if (!s.ok) {
888
+ const i = await s.text();
889
+ throw new Error(
890
+ `Export request failed: ${s.status} ${s.statusText}. ${i}`
891
+ );
892
+ }
893
+ return s.text();
894
+ }
895
+ }
896
+ function f(o, e) {
897
+ if (typeof o == "object" && o !== null) {
898
+ const { token: t, ...r } = o;
899
+ return new l(t, r);
900
+ }
901
+ return new l(o, e || { apiUrl: "" });
902
+ }
903
+
904
+ const insightsWrapperCss = ":host{display:block}.insights-wrapper{width:100%;height:100%}.loading{display:flex;align-items:center;justify-content:center;padding:20px;color:#666;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif}";
905
+
906
+ const InsightsWrapper$1 = /*@__PURE__*/ proxyCustomElement(class InsightsWrapper extends H {
907
+ constructor(registerHost) {
908
+ super();
909
+ if (registerHost !== false) {
910
+ this.__registerHost();
911
+ }
912
+ this.__attachShadow();
913
+ }
914
+ /**
915
+ * Name of the configuration to use from setupConfiguration
916
+ * Defaults to 'default' if not provided
917
+ */
918
+ configName;
919
+ /**
920
+ * API URL for the insights service (alternative to using configName)
921
+ */
922
+ apiUrl;
923
+ /**
924
+ * Authentication token (optional if using configName)
925
+ */
926
+ token;
927
+ /**
928
+ * Callback to refresh the token (can override configuration)
929
+ */
930
+ onRefreshTokenCallback;
931
+ /**
932
+ * Callback for error and warning events (can override configuration)
933
+ */
934
+ onEventEmittedCallback;
935
+ initialized = false;
936
+ insightsClient;
937
+ currentConfig;
938
+ componentWillLoad() {
939
+ this.initializeClient();
940
+ }
941
+ handlePropsChange() {
942
+ this.initializeClient();
943
+ }
944
+ async initializeClient() {
945
+ try {
946
+ let apiUrl;
947
+ let authToken;
948
+ let refreshTokenCallback;
949
+ let onEventEmittedCallback;
950
+ // Check if using configName or direct props
951
+ if (this.configName || (!this.apiUrl && !this.token)) {
952
+ // Using named configuration
953
+ const config = getConfiguration(this.configName);
954
+ if (!config) {
955
+ const configNameToUse = this.configName || 'default';
956
+ const errorMsg = `Configuration '${configNameToUse}' not found. Please call setupConfiguration() first.`;
957
+ console.error(errorMsg);
958
+ throw new Error(errorMsg);
959
+ }
960
+ apiUrl = config.apiUrl;
961
+ authToken = config.token;
962
+ // Props override configuration
963
+ refreshTokenCallback = this.onRefreshTokenCallback || config.refreshToken;
964
+ onEventEmittedCallback = this.onEventEmittedCallback || config.onEventEmitted;
965
+ // Store config for later use
966
+ this.currentConfig = {
967
+ apiUrl: config.apiUrl,
968
+ refreshToken: refreshTokenCallback,
969
+ onEventEmitted: onEventEmittedCallback,
970
+ };
971
+ // Get initial token from refreshToken callback if provided
972
+ if (refreshTokenCallback) {
973
+ authToken = typeof refreshTokenCallback === 'function' ? await refreshTokenCallback() : refreshTokenCallback;
974
+ }
975
+ // Emit warning through callback if no token
976
+ if (!authToken && onEventEmittedCallback) {
977
+ onEventEmittedCallback({ eventType: 'warning', data: { message: 'No token provided for configuration' } });
978
+ }
979
+ }
980
+ else {
981
+ // Using direct props (backwards compatible)
982
+ if (!this.apiUrl) {
983
+ const errorMsg = 'apiUrl is required when not using configName';
984
+ console.error(errorMsg);
985
+ throw new Error(errorMsg);
986
+ }
987
+ apiUrl = this.apiUrl;
988
+ authToken = this.token;
989
+ refreshTokenCallback = this.onRefreshTokenCallback;
990
+ onEventEmittedCallback = this.onEventEmittedCallback;
991
+ // Store config for later use even with direct props
992
+ this.currentConfig = {
993
+ apiUrl: this.apiUrl,
994
+ refreshToken: refreshTokenCallback,
995
+ onEventEmitted: onEventEmittedCallback,
996
+ };
997
+ }
998
+ // Create the insights client
999
+ this.insightsClient = f(authToken, {
1000
+ apiUrl: apiUrl,
1001
+ });
1002
+ this.initialized = true;
1003
+ }
1004
+ catch (error) {
1005
+ const errorMsg = error instanceof Error ? error.message : 'Failed to initialize insights client';
1006
+ // Emit error through callback if configured
1007
+ if (this.currentConfig?.onEventEmitted) {
1008
+ this.currentConfig.onEventEmitted({ eventType: 'error', data: { message: errorMsg, error } });
1009
+ }
1010
+ console.error('Error initializing insights client:', error);
1011
+ throw error;
1012
+ }
1013
+ }
1014
+ async handleTokenExpired() {
1015
+ // Auto-refresh token if refreshToken callback is configured
1016
+ if (this.currentConfig?.refreshToken) {
1017
+ try {
1018
+ await this.initializeClient();
1019
+ }
1020
+ catch (error) {
1021
+ console.error('Failed to refresh token:', error);
1022
+ if (this.currentConfig?.onEventEmitted) {
1023
+ this.currentConfig.onEventEmitted({ eventType: 'error', data: { message: 'Failed to refresh token', error } });
1024
+ }
1025
+ }
1026
+ }
1027
+ else {
1028
+ if (this.currentConfig?.onEventEmitted) {
1029
+ this.currentConfig.onEventEmitted({ eventType: 'warning', data: { message: 'Token expired but no refreshToken callback configured' } });
1030
+ }
1031
+ }
1032
+ }
1033
+ /**
1034
+ * Public method to fetch data for charts
1035
+ * This can be called by child chart components
1036
+ */
1037
+ async fetchData(reportName, query) {
1038
+ try {
1039
+ const response = await this.insightsClient.getReport(reportName, query);
1040
+ return response;
1041
+ }
1042
+ catch (error) {
1043
+ // Check if error is token expiration
1044
+ if (error.message && error.message.includes('401')) {
1045
+ await this.handleTokenExpired();
1046
+ // Retry fetching data after token refresh
1047
+ const response = await this.insightsClient.getReport(reportName, query);
1048
+ return response;
1049
+ }
1050
+ throw error;
1051
+ }
1052
+ }
1053
+ /**
1054
+ * Helper method to build query from filters
1055
+ */
1056
+ async buildQuery(filters, getQueryByFilters) {
1057
+ if (getQueryByFilters) {
1058
+ return getQueryByFilters(filters);
1059
+ }
1060
+ // Default query builder
1061
+ return {
1062
+ columns: ['*'],
1063
+ ...filters,
1064
+ };
1065
+ }
1066
+ /**
1067
+ * Manually refresh the token using the refreshToken callback from configuration
1068
+ */
1069
+ async manualRefreshToken() {
1070
+ if (!this.currentConfig?.refreshToken) {
1071
+ throw new Error('No refreshToken callback configured');
1072
+ }
1073
+ await this.initializeClient();
1074
+ }
1075
+ render() {
1076
+ return (h$1("div", { key: '8a00c399458b7dff7dff0ac7e50a6217d7c2ad3d', class: "insights-wrapper" }, this.initialized && h$1("slot", { key: '85f26cab746e109f97ef29288b57377c449b7429' }), !this.initialized && h$1("div", { key: 'a59a48e70a8ff0258d5112aafeca6bc5a4a620ac', class: "loading" }, "Initializing Insights...")));
1077
+ }
1078
+ static get watchers() { return {
1079
+ "configName": ["handlePropsChange"],
1080
+ "apiUrl": ["handlePropsChange"],
1081
+ "token": ["handlePropsChange"],
1082
+ "onRefreshTokenCallback": ["handlePropsChange"],
1083
+ "onEventEmittedCallback": ["handlePropsChange"]
1084
+ }; }
1085
+ static get style() { return insightsWrapperCss; }
1086
+ }, [769, "insights-wrapper", {
1087
+ "configName": [1, "config-name"],
1088
+ "apiUrl": [1, "api-url"],
1089
+ "token": [1],
1090
+ "onRefreshTokenCallback": [16],
1091
+ "onEventEmittedCallback": [16],
1092
+ "initialized": [32],
1093
+ "fetchData": [64],
1094
+ "buildQuery": [64],
1095
+ "manualRefreshToken": [64]
1096
+ }, undefined, {
1097
+ "configName": ["handlePropsChange"],
1098
+ "apiUrl": ["handlePropsChange"],
1099
+ "token": ["handlePropsChange"],
1100
+ "onRefreshTokenCallback": ["handlePropsChange"],
1101
+ "onEventEmittedCallback": ["handlePropsChange"]
1102
+ }]);
1103
+ function defineCustomElement$1() {
1104
+ if (typeof customElements === "undefined") {
1105
+ return;
1106
+ }
1107
+ const components = ["insights-wrapper"];
1108
+ components.forEach(tagName => { switch (tagName) {
1109
+ case "insights-wrapper":
1110
+ if (!customElements.get(tagName)) {
1111
+ customElements.define(tagName, InsightsWrapper$1);
1112
+ }
1113
+ break;
1114
+ } });
1115
+ }
1116
+
1117
+ const InsightsWrapper = InsightsWrapper$1;
1118
+ const defineCustomElement = defineCustomElement$1;
1119
+
1120
+ export { InsightsWrapper, defineCustomElement };
1121
+ //# sourceMappingURL=insights-wrapper.js.map
1122
+
1123
+ //# sourceMappingURL=insights-wrapper.js.map