buzzcasting-utils 1.1.0 → 1.3.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.
- package/dist/buzzcasting-utils.d.ts +467 -0
- package/dist/buzzcasting-utils.esm.js +161 -152
- package/package.json +9 -9
|
@@ -19,6 +19,9 @@ export declare enum API {
|
|
|
19
19
|
|
|
20
20
|
export declare type ApiData = ISeries & IMessages & ICloud;
|
|
21
21
|
|
|
22
|
+
declare interface AreaStyle {
|
|
23
|
+
}
|
|
24
|
+
|
|
22
25
|
export declare function attachedMedia(message: IMessage): IAttachedMedia_2;
|
|
23
26
|
|
|
24
27
|
export declare function attrs(attributes: NamedNodeMap): any;
|
|
@@ -49,6 +52,28 @@ export declare const capitalizeFirstLetter: (prop: string) => string;
|
|
|
49
52
|
*/
|
|
50
53
|
export declare function clearContents(myNode: HTMLElement): void;
|
|
51
54
|
|
|
55
|
+
export declare interface Countries {
|
|
56
|
+
type: string;
|
|
57
|
+
geometries: CountriesGeometry[];
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export declare interface CountriesGeometry {
|
|
61
|
+
type: Type;
|
|
62
|
+
arcs: Array<Array<number[] | number>>;
|
|
63
|
+
id?: string;
|
|
64
|
+
properties: CountryProperties;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
declare interface CountryObjects {
|
|
68
|
+
countries: Countries;
|
|
69
|
+
land: Land;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
declare interface CountryProperties {
|
|
73
|
+
name: string;
|
|
74
|
+
code: string;
|
|
75
|
+
}
|
|
76
|
+
|
|
52
77
|
declare enum CSS_2 {
|
|
53
78
|
API = "color:white;background-color:grey;padding:0 4px 0 4px;border-radius:5px;",
|
|
54
79
|
APP = "color:white;background-color:navy;padding:0 4px 0 4px;border-radius:5px;",
|
|
@@ -151,6 +176,20 @@ export declare const HTMLtoDOM: (html: string, doc: any) => any;
|
|
|
151
176
|
|
|
152
177
|
export declare const HTMLtoXML: (html: string) => string;
|
|
153
178
|
|
|
179
|
+
export declare interface IAnimation {
|
|
180
|
+
items?: number;
|
|
181
|
+
interval: number;
|
|
182
|
+
animation: number;
|
|
183
|
+
speed?: '' | 'slow' | 'slower' | 'fast' | 'faster';
|
|
184
|
+
delay?: number;
|
|
185
|
+
parentTag?: string;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
export declare interface IArc {
|
|
189
|
+
strokeStyle: string;
|
|
190
|
+
lineWidth: number;
|
|
191
|
+
}
|
|
192
|
+
|
|
154
193
|
export declare interface IAttachedMedia {
|
|
155
194
|
image?: string;
|
|
156
195
|
background: {
|
|
@@ -167,6 +206,25 @@ declare interface IAttachedMedia_2 {
|
|
|
167
206
|
video?: string;
|
|
168
207
|
}
|
|
169
208
|
|
|
209
|
+
export declare interface IBorders {
|
|
210
|
+
strokeStyle: string;
|
|
211
|
+
lineWidth: number;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
export declare interface IBrand {
|
|
215
|
+
show?: boolean;
|
|
216
|
+
size?: string;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
export declare interface ICardOptions {
|
|
220
|
+
animation?: IAnimation;
|
|
221
|
+
brand?: IBrand;
|
|
222
|
+
css?: ICss;
|
|
223
|
+
d3?: ID3;
|
|
224
|
+
dateformat?: IDateFormat;
|
|
225
|
+
show?: IShow;
|
|
226
|
+
}
|
|
227
|
+
|
|
170
228
|
export declare interface ICategory {
|
|
171
229
|
type: string;
|
|
172
230
|
data: string[];
|
|
@@ -185,6 +243,68 @@ export declare interface ICloud {
|
|
|
185
243
|
previous_total: number;
|
|
186
244
|
}
|
|
187
245
|
|
|
246
|
+
export declare interface ICloudBubbles {
|
|
247
|
+
size: number;
|
|
248
|
+
classlist: string;
|
|
249
|
+
force: number;
|
|
250
|
+
color: string;
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
export declare interface ICloudConfig {
|
|
254
|
+
fixed?: number;
|
|
255
|
+
abbreviate?: boolean;
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
export declare interface ICloudCss {
|
|
259
|
+
arrowdown?: string;
|
|
260
|
+
arrowup?: string;
|
|
261
|
+
backdrop?: string;
|
|
262
|
+
body?: string;
|
|
263
|
+
brand?: string;
|
|
264
|
+
change?: string;
|
|
265
|
+
chart?: string;
|
|
266
|
+
count?: string;
|
|
267
|
+
container?: string;
|
|
268
|
+
date?: string;
|
|
269
|
+
down?: string;
|
|
270
|
+
host?: string;
|
|
271
|
+
image?: string;
|
|
272
|
+
key?: string;
|
|
273
|
+
legend?: string;
|
|
274
|
+
title?: string;
|
|
275
|
+
up?: string;
|
|
276
|
+
widget?: string;
|
|
277
|
+
dark?: boolean;
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
export declare interface ICloudD3 {
|
|
281
|
+
globe: {
|
|
282
|
+
colors: {
|
|
283
|
+
arc: string;
|
|
284
|
+
border: string;
|
|
285
|
+
country: string;
|
|
286
|
+
land: string;
|
|
287
|
+
sphere: string;
|
|
288
|
+
};
|
|
289
|
+
settings?: {
|
|
290
|
+
canvas?: string;
|
|
291
|
+
card?: string;
|
|
292
|
+
width?: number;
|
|
293
|
+
height?: number;
|
|
294
|
+
};
|
|
295
|
+
};
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
export declare interface ICloudDateFormat {
|
|
299
|
+
time?: string;
|
|
300
|
+
date?: string;
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
export declare interface ICloudDimensions {
|
|
304
|
+
width: number;
|
|
305
|
+
height: number;
|
|
306
|
+
}
|
|
307
|
+
|
|
188
308
|
declare interface ICloudIndicators {
|
|
189
309
|
total: number;
|
|
190
310
|
positive: number;
|
|
@@ -195,6 +315,202 @@ declare interface ICloudIndicators {
|
|
|
195
315
|
velocity: number;
|
|
196
316
|
}
|
|
197
317
|
|
|
318
|
+
export declare interface ICloudInfluencers {
|
|
319
|
+
labels?: Label[];
|
|
320
|
+
title?: string;
|
|
321
|
+
current?: ICloudInfluencersData[];
|
|
322
|
+
previous?: ICloudInfluencersData[];
|
|
323
|
+
type: string;
|
|
324
|
+
total?: number;
|
|
325
|
+
current_total?: number;
|
|
326
|
+
previous_total?: number;
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
export declare interface ICloudInfluencersData {
|
|
330
|
+
color: string;
|
|
331
|
+
label: string;
|
|
332
|
+
avatar: string;
|
|
333
|
+
rank: number;
|
|
334
|
+
authors: string;
|
|
335
|
+
influencers: string;
|
|
336
|
+
total: number;
|
|
337
|
+
positive: number;
|
|
338
|
+
neutral: number;
|
|
339
|
+
negative: number;
|
|
340
|
+
potential_reach: number;
|
|
341
|
+
reach_per_result: number;
|
|
342
|
+
engagement: number;
|
|
343
|
+
engagement_per_result: number;
|
|
344
|
+
profile: string;
|
|
345
|
+
biography: string;
|
|
346
|
+
country: string;
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
export declare interface ICloudKpi {
|
|
350
|
+
name: string;
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
export declare interface ICloudLegend {
|
|
354
|
+
count?: {
|
|
355
|
+
width?: string;
|
|
356
|
+
height?: string;
|
|
357
|
+
};
|
|
358
|
+
key: {
|
|
359
|
+
width: string;
|
|
360
|
+
};
|
|
361
|
+
width: string;
|
|
362
|
+
position: string;
|
|
363
|
+
gap?: {
|
|
364
|
+
column: string;
|
|
365
|
+
row: string;
|
|
366
|
+
};
|
|
367
|
+
show: {
|
|
368
|
+
percentage: boolean;
|
|
369
|
+
};
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
export declare interface ICloudOptions {
|
|
373
|
+
css?: ICloudCss;
|
|
374
|
+
d3?: ICloudD3;
|
|
375
|
+
dateformat?: ICloudDateFormat;
|
|
376
|
+
show?: ICloudShow;
|
|
377
|
+
config?: ICloudConfig;
|
|
378
|
+
colors?: string[];
|
|
379
|
+
dimensions?: ICloudDimensions;
|
|
380
|
+
pie?: ICloudPie;
|
|
381
|
+
kpi?: ICloudKpi;
|
|
382
|
+
legend?: ICloudLegend;
|
|
383
|
+
bubbles?: ICloudBubbles;
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
export declare interface ICloudPie {
|
|
387
|
+
radius: {
|
|
388
|
+
inner: number;
|
|
389
|
+
outer: number;
|
|
390
|
+
};
|
|
391
|
+
animation: {
|
|
392
|
+
duration: number;
|
|
393
|
+
};
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
export declare interface ICloudShow {
|
|
397
|
+
brand?: boolean;
|
|
398
|
+
date?: boolean;
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
export declare interface ICountries {
|
|
402
|
+
type: string;
|
|
403
|
+
objects: CountryObjects;
|
|
404
|
+
arcs: Array<Array<number[]>>;
|
|
405
|
+
bbox: number[];
|
|
406
|
+
transform: Transform;
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
export declare interface ICountry {
|
|
410
|
+
fillStyle: string;
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
export declare interface ICss {
|
|
414
|
+
avatar?: string;
|
|
415
|
+
backdrop?: string;
|
|
416
|
+
body?: string;
|
|
417
|
+
brand?: string;
|
|
418
|
+
card?: string;
|
|
419
|
+
container?: string;
|
|
420
|
+
date?: string;
|
|
421
|
+
dynamics?: string;
|
|
422
|
+
handle?: string;
|
|
423
|
+
host?: string;
|
|
424
|
+
image?: string;
|
|
425
|
+
kpi?: string;
|
|
426
|
+
label?: string;
|
|
427
|
+
name?: string;
|
|
428
|
+
sender?: string;
|
|
429
|
+
title?: string;
|
|
430
|
+
video?: string;
|
|
431
|
+
widget?: string;
|
|
432
|
+
dark?: boolean;
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
export declare interface ID3 {
|
|
436
|
+
globe: {
|
|
437
|
+
colors: {
|
|
438
|
+
arc: string;
|
|
439
|
+
border: string;
|
|
440
|
+
country: string;
|
|
441
|
+
land: string;
|
|
442
|
+
sphere: string;
|
|
443
|
+
};
|
|
444
|
+
settings?: {
|
|
445
|
+
canvas?: string;
|
|
446
|
+
card?: string;
|
|
447
|
+
width?: number;
|
|
448
|
+
height?: number;
|
|
449
|
+
};
|
|
450
|
+
};
|
|
451
|
+
}
|
|
452
|
+
|
|
453
|
+
export declare interface ID3Bubbles {
|
|
454
|
+
size: number;
|
|
455
|
+
force: number;
|
|
456
|
+
classlist?: string;
|
|
457
|
+
color?: string;
|
|
458
|
+
}
|
|
459
|
+
|
|
460
|
+
export declare interface ID3Data {
|
|
461
|
+
label: string;
|
|
462
|
+
count: number;
|
|
463
|
+
color: string;
|
|
464
|
+
radius?: number;
|
|
465
|
+
fill?: string;
|
|
466
|
+
}
|
|
467
|
+
|
|
468
|
+
export declare interface ID3Legend {
|
|
469
|
+
count: {
|
|
470
|
+
width: string;
|
|
471
|
+
};
|
|
472
|
+
key: {
|
|
473
|
+
width: string;
|
|
474
|
+
};
|
|
475
|
+
legend: {
|
|
476
|
+
width: string;
|
|
477
|
+
};
|
|
478
|
+
}
|
|
479
|
+
|
|
480
|
+
export declare interface ID3Map {
|
|
481
|
+
radius: {
|
|
482
|
+
inner: number;
|
|
483
|
+
outer: number;
|
|
484
|
+
};
|
|
485
|
+
animation: {
|
|
486
|
+
duration: number;
|
|
487
|
+
};
|
|
488
|
+
}
|
|
489
|
+
|
|
490
|
+
export declare interface ID3Options {
|
|
491
|
+
colors: string[];
|
|
492
|
+
pie?: ID3Pie;
|
|
493
|
+
map?: ID3Map;
|
|
494
|
+
legend?: ID3Legend;
|
|
495
|
+
bubbles?: ID3Bubbles;
|
|
496
|
+
dimensions?: {
|
|
497
|
+
width: number;
|
|
498
|
+
height: number;
|
|
499
|
+
};
|
|
500
|
+
data: [ID3Data?];
|
|
501
|
+
total?: number;
|
|
502
|
+
}
|
|
503
|
+
|
|
504
|
+
export declare interface ID3Pie {
|
|
505
|
+
radius: {
|
|
506
|
+
inner: number;
|
|
507
|
+
outer: number;
|
|
508
|
+
};
|
|
509
|
+
animation: {
|
|
510
|
+
duration: number;
|
|
511
|
+
};
|
|
512
|
+
}
|
|
513
|
+
|
|
198
514
|
export declare interface IDashboard {
|
|
199
515
|
id: string;
|
|
200
516
|
title: string;
|
|
@@ -210,6 +526,11 @@ export declare interface IDashboards {
|
|
|
210
526
|
dashboards: IDashboard[];
|
|
211
527
|
}
|
|
212
528
|
|
|
529
|
+
export declare interface IDateFormat {
|
|
530
|
+
time?: string;
|
|
531
|
+
date?: string;
|
|
532
|
+
}
|
|
533
|
+
|
|
213
534
|
export declare interface IDynamics {
|
|
214
535
|
engagement?: number;
|
|
215
536
|
semrush_visits?: number;
|
|
@@ -235,6 +556,13 @@ export declare interface IDynamics {
|
|
|
235
556
|
trending_score?: number;
|
|
236
557
|
}
|
|
237
558
|
|
|
559
|
+
export declare interface IEchartsLine {
|
|
560
|
+
color: string[];
|
|
561
|
+
xAxis: XAxis;
|
|
562
|
+
yAxis: YAxis;
|
|
563
|
+
series: Series[];
|
|
564
|
+
}
|
|
565
|
+
|
|
238
566
|
export declare interface IFilteredAttributes {
|
|
239
567
|
[key: string]: string | object;
|
|
240
568
|
}
|
|
@@ -261,6 +589,10 @@ export declare interface ILabel {
|
|
|
261
589
|
percentage?: number;
|
|
262
590
|
}
|
|
263
591
|
|
|
592
|
+
export declare interface ILand {
|
|
593
|
+
fillStyle: string;
|
|
594
|
+
}
|
|
595
|
+
|
|
264
596
|
export declare interface IMedium {
|
|
265
597
|
type: string;
|
|
266
598
|
url: string;
|
|
@@ -383,6 +715,14 @@ export declare interface IResponse {
|
|
|
383
715
|
query?: IQuery;
|
|
384
716
|
}
|
|
385
717
|
|
|
718
|
+
export declare interface IRotatingGlobe {
|
|
719
|
+
country: ICountry;
|
|
720
|
+
land: ILand;
|
|
721
|
+
borders: IBorders;
|
|
722
|
+
sphere: ISphere;
|
|
723
|
+
arc: IArc;
|
|
724
|
+
}
|
|
725
|
+
|
|
386
726
|
/**
|
|
387
727
|
* Messages
|
|
388
728
|
*/
|
|
@@ -416,6 +756,48 @@ export declare interface ISeries {
|
|
|
416
756
|
timestamp?: number;
|
|
417
757
|
}
|
|
418
758
|
|
|
759
|
+
export declare interface ISeriesConfig {
|
|
760
|
+
fixed?: number;
|
|
761
|
+
abbreviate?: boolean;
|
|
762
|
+
}
|
|
763
|
+
|
|
764
|
+
export declare interface ISeriesCss {
|
|
765
|
+
arrowdown?: string;
|
|
766
|
+
arrowup?: string;
|
|
767
|
+
backdrop?: string;
|
|
768
|
+
body?: string;
|
|
769
|
+
brand?: string;
|
|
770
|
+
change?: string;
|
|
771
|
+
count?: string;
|
|
772
|
+
container?: string;
|
|
773
|
+
date?: string;
|
|
774
|
+
down?: string;
|
|
775
|
+
host?: string;
|
|
776
|
+
image?: string;
|
|
777
|
+
title?: string;
|
|
778
|
+
up?: string;
|
|
779
|
+
widget?: string;
|
|
780
|
+
dark?: boolean;
|
|
781
|
+
}
|
|
782
|
+
|
|
783
|
+
export declare interface ISeriesD3 {
|
|
784
|
+
globe: {
|
|
785
|
+
colors: {
|
|
786
|
+
arc: string;
|
|
787
|
+
border: string;
|
|
788
|
+
country: string;
|
|
789
|
+
land: string;
|
|
790
|
+
sphere: string;
|
|
791
|
+
};
|
|
792
|
+
settings?: {
|
|
793
|
+
canvas?: string;
|
|
794
|
+
card?: string;
|
|
795
|
+
width?: number;
|
|
796
|
+
height?: number;
|
|
797
|
+
};
|
|
798
|
+
};
|
|
799
|
+
}
|
|
800
|
+
|
|
419
801
|
export declare interface ISeriesData {
|
|
420
802
|
name?: string;
|
|
421
803
|
label?: string;
|
|
@@ -427,11 +809,47 @@ export declare interface ISeriesData {
|
|
|
427
809
|
previous_category?: number;
|
|
428
810
|
}
|
|
429
811
|
|
|
812
|
+
export declare interface ISeriesDateFormat {
|
|
813
|
+
time?: string;
|
|
814
|
+
date?: string;
|
|
815
|
+
}
|
|
816
|
+
|
|
817
|
+
export declare interface ISeriesOptions {
|
|
818
|
+
css?: ISeriesCss;
|
|
819
|
+
d3?: ISeriesD3;
|
|
820
|
+
dateformat?: ISeriesDateFormat;
|
|
821
|
+
show?: ISeriesShow;
|
|
822
|
+
config?: ISeriesConfig;
|
|
823
|
+
}
|
|
824
|
+
|
|
825
|
+
export declare interface ISeriesShow {
|
|
826
|
+
brand?: boolean;
|
|
827
|
+
date?: boolean;
|
|
828
|
+
}
|
|
829
|
+
|
|
830
|
+
export declare interface IShow {
|
|
831
|
+
approve?: boolean;
|
|
832
|
+
avatar?: boolean;
|
|
833
|
+
brand?: boolean;
|
|
834
|
+
date?: boolean;
|
|
835
|
+
dynamics?: boolean;
|
|
836
|
+
kpi?: boolean;
|
|
837
|
+
sender?: boolean;
|
|
838
|
+
star?: boolean;
|
|
839
|
+
visible?: boolean;
|
|
840
|
+
}
|
|
841
|
+
|
|
430
842
|
export declare interface ISlides {
|
|
431
843
|
presentation: string;
|
|
432
844
|
slides: any;
|
|
433
845
|
}
|
|
434
846
|
|
|
847
|
+
export declare interface ISphere {
|
|
848
|
+
strokeStyle: string;
|
|
849
|
+
lineWidth: number;
|
|
850
|
+
fillStyle: string;
|
|
851
|
+
}
|
|
852
|
+
|
|
435
853
|
/**
|
|
436
854
|
* Storage Options
|
|
437
855
|
*/
|
|
@@ -491,6 +909,22 @@ export declare interface IWidgets {
|
|
|
491
909
|
|
|
492
910
|
export declare const json2html: (json: any) => any;
|
|
493
911
|
|
|
912
|
+
export declare interface Label {
|
|
913
|
+
label: string;
|
|
914
|
+
count: number;
|
|
915
|
+
info: string;
|
|
916
|
+
}
|
|
917
|
+
|
|
918
|
+
export declare interface Land {
|
|
919
|
+
type: string;
|
|
920
|
+
geometries: LandGeometry[];
|
|
921
|
+
}
|
|
922
|
+
|
|
923
|
+
export declare interface LandGeometry {
|
|
924
|
+
type: Type;
|
|
925
|
+
arcs: Array<Array<number[]>>;
|
|
926
|
+
}
|
|
927
|
+
|
|
494
928
|
export declare const log: (level: number | undefined, message: any[]) => void;
|
|
495
929
|
|
|
496
930
|
export declare const maxifyCss: (css: string) => string;
|
|
@@ -526,6 +960,19 @@ export declare function rtl(message: IMessage): {
|
|
|
526
960
|
|
|
527
961
|
export declare function sanitize(messages: IMessage[]): IMessage[];
|
|
528
962
|
|
|
963
|
+
declare interface Series {
|
|
964
|
+
data: number[];
|
|
965
|
+
type: string;
|
|
966
|
+
areaStyle: AreaStyle;
|
|
967
|
+
}
|
|
968
|
+
|
|
969
|
+
export declare enum ShapeType {
|
|
970
|
+
MultiPolygon = "MultiPolygon",
|
|
971
|
+
Polygon = "Polygon"
|
|
972
|
+
}
|
|
973
|
+
|
|
974
|
+
export declare function showModal(e: MouseEvent, widget: any, message: IMessage, options: any): void;
|
|
975
|
+
|
|
529
976
|
export declare function shuffleMessages(messages: IMessage[]): IMessage[];
|
|
530
977
|
|
|
531
978
|
export declare enum STORAGE {
|
|
@@ -542,6 +989,16 @@ export declare enum STORAGE {
|
|
|
542
989
|
*/
|
|
543
990
|
export declare function stringGen(): string;
|
|
544
991
|
|
|
992
|
+
export declare interface Transform {
|
|
993
|
+
scale: number[];
|
|
994
|
+
translate: number[];
|
|
995
|
+
}
|
|
996
|
+
|
|
997
|
+
declare enum Type {
|
|
998
|
+
MultiPolygon = "MultiPolygon",
|
|
999
|
+
Polygon = "Polygon"
|
|
1000
|
+
}
|
|
1001
|
+
|
|
545
1002
|
export declare const typeCss: (query: IQuery | undefined) => string;
|
|
546
1003
|
|
|
547
1004
|
export declare const uniq: (length?: number, existing?: never[]) => string;
|
|
@@ -552,4 +1009,14 @@ export declare function widgetParams(query: IQuery): IQuery;
|
|
|
552
1009
|
|
|
553
1010
|
export declare const wrapPromise: (promise: any, delay: number, reason: string) => Promise<any>;
|
|
554
1011
|
|
|
1012
|
+
declare interface XAxis {
|
|
1013
|
+
type: string;
|
|
1014
|
+
boundaryGap: boolean;
|
|
1015
|
+
data: string[];
|
|
1016
|
+
}
|
|
1017
|
+
|
|
1018
|
+
declare interface YAxis {
|
|
1019
|
+
type: string;
|
|
1020
|
+
}
|
|
1021
|
+
|
|
555
1022
|
export { }
|
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
var m = /* @__PURE__ */ ((e) => (e.MESSAGES = "messages", e.CLOUD = "cloud", e.SERIES = "series", e.TOPICS = "topics", e.WIDGET = "widget", e.WIDGETS = "widgets", e.DASHBOARD = "dashboard", e.DASHBOARDS = "dashboards", e.SLIDE = "slide", e.SLIDES = "slides", e.PRESENTATION = "presentation", e.PRESENTATIONS = "presentations", e.PREFERENCE = "preference", e.PREFERENCES = "preferences", e))(m || {}), h = /* @__PURE__ */ ((e) => (e.API = "color:white;background-color:grey;padding:0 4px 0 4px;border-radius:5px;", e.APP = "color:white;background-color:navy;padding:0 4px 0 4px;border-radius:5px;", e.BROADCAST = "color:navy;background-color:orange;padding:0 4px 0 4px;border-radius:5px;", e.CLOUD = "color:purple;background-color:mistyrose;padding:0 4px 0 4px;border-radius:5px;", e.DATA = "color:grey;background-color:lightskyblue;padding:0 4px 0 4px;border-radius:5px;", e.ERROR = "color:white;background-color:red;padding:0 4px 0 4px;border-radius:5px;", e.GET_DATA = "color:black;background-color:lime;padding:0 4px 0 4px;border-radius:5px;", e.HIDE = "color:white;background-color:red;padding:0 4px 0 4px;border-radius:5px;", e.KO = "color:white;background-color:red;padding:0 4px 0 4px;border-radius:5px;", e.MESSAGES = "color:white;background-color:darkslateblue;padding:0 4px 0 4px;border-radius:5px;", e.NO_UPDATES = "color:grey;border:1px solid grey;padding:0 4px 0 4px;border-radius:5px;", e.NONE = "color:transparent;background-color:transparent;", e.OK = "color:black;background-color:lime;padding:0 4px 0 4px;border-radius:5px;", e.PRESENTATION = "color:white;background-color:darkred;padding:0 4px 0 4px;border-radius:5px;", e.SERIES = "color:purple;background-color:thistle;padding:0 4px 0 4px;border-radius:5px;", e.SLIDE = "color:black;background-color:yellow;padding:0 4px 0 4px;border-radius:5px;", e.STORAGE = "color:black;background-color:cyan;padding:0 4px 0 4px;border-radius:5px;", e.SUBSCRIBE = "color:white;background-color:dodgerblue;padding:0 4px 0 4px;border-radius:5px;", e.WIDGET = "color:gret;background-color:lemonchiffon;padding:0 4px 0 4px;border-radius:5px;", e.WS = "color:white;background-color:green;padding:0 4px 0 4px;border-radius:5px;", e))(h || {}), k = /* @__PURE__ */ ((e) => (e.ADD_SLIDE = "addSlide", e.APP_READY = "appReady", e.API_UPDATE = "apiUpdate", e.WS_API_REQUEST = "wsApiRequest", e.WS_API_RESPONSE = "wsApiResponse", e.WS_API_UPDATE = "wsApiRUpdate", e.APPROVE_MESSAGE = "approveMessage", e.CHANNEL = "channel", e.CLEAN_MESSAGES = "cleanMessages", e.CLOSE_MODAL = "closeModal", e.CLOSE_BUILDER_MODAL = "closeBuilderModal", e.DASHBOARD_LOAD = "loadDashboard", e.DASHBOARD_STORE = "storeDashboard", e.ERROR = "error", e.HIDE_MESSAGE = "hideMessage", e.HIDE_LABELS = "hideLabels", e.MAUPPUT_UPDATE = "layoutUpdate", e.PREV_SLIDE = "prevSlide", e.RELOAD_PRESENTATION = "reloadPresentation", e.SHOW_MODAL = "showModal", e.STAR_MESSAGE = "starMessage", e.GOTO_SLIDE = "gotoSlide", e.NEXT_SLIDE = "nextSlide", e.PREFERENCE_LOAD = "loadPreference", e.PREFERENCE_STORE = "storePreference", e.PAUSE_PRESENTATION = "pausePresentation", e.PRESENTATION_READY = "presentationReady", e.PRESENTATION_LOAD = "loadPresentation", e.PRESENTATION_STORE = "storePresentation", e.SHOW_BUILDER_MODAL = "showBuilderModal", e.SLIDE_DID_LOAD = "slideDidLoad", e.SLIDE_GOTO = "slideGoto", e.SLIDE_READY = "slideReady", e.SLIDE_LOAD = "loadSlide", e.SLIDE_STORE = "storeSlide", e.SLIDE_TRANSITIONER = "slideTransitioner", e.START_TRANSITIONER = "startTransitioner", e.STORAGE_INIT = "storageInit", e.SUBSCRIBE = "subscribe", e.SUSPEND_ACCOUNT = "suspendAccount", e.SWITCH_PRESENTATION = "switchPresentation", e.REMOVE_CLOUD = "removeCloud", e.UPDATE = "update", e.VERSION = "version", e.WIDGETS_CLEAR = "widgetsClear", e.WIDGET_LOAD = "widgetLoad", e.WIDGET_STORE = "widgetStore", e.WIDGET_UPDATE = "widgetUpdate", e))(k || {}), x = /* @__PURE__ */ ((e) => (e.APPROVED = "approved", e.BEFORE = "before", e.DELAYED = "delayed", e.NONE = "none", e.REALTIME = "realtime", e))(x || {}), L = /* @__PURE__ */ ((e) => (e.KEYVAL = "keyval", e.LOCAL = "local", e.SESSION = "session", e.DEXIE = "dexie", e.WINDOW = "window", e))(L || {});
|
|
2
|
-
function
|
|
2
|
+
function j(e) {
|
|
3
3
|
const t = e.toUpperCase().split(/[\s_-]+/);
|
|
4
4
|
return t.length > 0 ? (t.forEach((r, n) => {
|
|
5
5
|
t[n] = `${r.charAt(0)}.`;
|
|
6
6
|
}), t.join(" ")) : "";
|
|
7
7
|
}
|
|
8
|
-
function
|
|
8
|
+
function J(e) {
|
|
9
9
|
let t = "", r = "", n = {
|
|
10
10
|
backgroundImage: ""
|
|
11
11
|
};
|
|
12
|
-
return typeof e.media < "u" && e.media.forEach((
|
|
13
|
-
(
|
|
14
|
-
backgroundImage: `url(${
|
|
15
|
-
}, r =
|
|
12
|
+
return typeof e.media < "u" && e.media.forEach((o) => {
|
|
13
|
+
(o.type === "photo" || o.type === "image") && (n = {
|
|
14
|
+
backgroundImage: `url(${o.url})`
|
|
15
|
+
}, r = o.url), o.type === "video" && (t = o.url);
|
|
16
16
|
}), {
|
|
17
17
|
image: r,
|
|
18
18
|
background: n || null,
|
|
19
19
|
video: t
|
|
20
20
|
};
|
|
21
21
|
}
|
|
22
|
-
function
|
|
22
|
+
function z(e) {
|
|
23
23
|
const t = {};
|
|
24
24
|
for (let r = 0; r < e.length; r++) {
|
|
25
25
|
const n = e.item(r);
|
|
@@ -27,7 +27,7 @@ function J(e) {
|
|
|
27
27
|
}
|
|
28
28
|
return t;
|
|
29
29
|
}
|
|
30
|
-
function
|
|
30
|
+
function N(e) {
|
|
31
31
|
const t = {};
|
|
32
32
|
for (let r = 0; r < e.length; r++) {
|
|
33
33
|
const n = e[r];
|
|
@@ -35,7 +35,7 @@ function z(e) {
|
|
|
35
35
|
}
|
|
36
36
|
return t;
|
|
37
37
|
}
|
|
38
|
-
function
|
|
38
|
+
function q(e) {
|
|
39
39
|
const t = {};
|
|
40
40
|
for (let r = 0; r < e.length; r++) {
|
|
41
41
|
const n = e[r];
|
|
@@ -43,7 +43,7 @@ function N(e) {
|
|
|
43
43
|
}
|
|
44
44
|
return t;
|
|
45
45
|
}
|
|
46
|
-
function
|
|
46
|
+
function V(e, t) {
|
|
47
47
|
switch (e) {
|
|
48
48
|
case "ax":
|
|
49
49
|
return '<div class="axa-switch-small bg-center bg-cover w-6 h-6"></div>';
|
|
@@ -87,92 +87,92 @@ function q(e, t) {
|
|
|
87
87
|
return "";
|
|
88
88
|
}
|
|
89
89
|
}
|
|
90
|
-
function
|
|
90
|
+
function ee(e) {
|
|
91
91
|
return e.replace(/^\w|[A-Z]|\b\w/g, (t, r) => r === 0 ? t.toLowerCase() : t.toUpperCase()).replace(/\s+/g, "");
|
|
92
92
|
}
|
|
93
93
|
function $(e) {
|
|
94
94
|
return e.toLowerCase().split("-").reduce((t, r) => t + (r.charAt(0).toUpperCase() + r.slice(1)));
|
|
95
95
|
}
|
|
96
|
-
const
|
|
97
|
-
function
|
|
96
|
+
const te = (e) => e.charAt(0).toUpperCase() + e.slice(1);
|
|
97
|
+
function re(e) {
|
|
98
98
|
const t = document.createRange();
|
|
99
99
|
t.selectNodeContents(e), t.deleteContents();
|
|
100
100
|
}
|
|
101
101
|
function P(e) {
|
|
102
102
|
e.reduce(
|
|
103
103
|
(t, r) => Object.keys(r).reduce(
|
|
104
|
-
(n,
|
|
104
|
+
(n, o) => ({
|
|
105
105
|
...n,
|
|
106
|
-
[
|
|
106
|
+
[o]: o in t && typeof t[o] == "object" && t[o] !== null && typeof r[o] == "object" && r[o] !== null ? P([t[o], r[o]]) : r[o]
|
|
107
107
|
}),
|
|
108
108
|
t
|
|
109
109
|
),
|
|
110
110
|
{}
|
|
111
111
|
);
|
|
112
112
|
}
|
|
113
|
-
function
|
|
113
|
+
function ne(e, t = "font-bold") {
|
|
114
114
|
return `${(e == null ? void 0 : e.title.length) > 0 ? `<div class="${t}">${e.title}</div>` : ""}${e != null && e.content ? e.content.replace(/\n\n/g, `
|
|
115
115
|
`).replace(/\n/g, "<br/>") : ""}`;
|
|
116
116
|
}
|
|
117
|
-
const
|
|
117
|
+
const oe = () => [b(2), b(1), b(1), b(1), b(3)].join("-"), b = (e) => {
|
|
118
118
|
let t = "";
|
|
119
119
|
for (let r = 0; r < e; r++)
|
|
120
120
|
t += ((1 + Math.random()) * 65536 | 0).toString(16).substring(1);
|
|
121
121
|
return t;
|
|
122
122
|
};
|
|
123
|
-
function
|
|
123
|
+
function v(e, t) {
|
|
124
124
|
for (; e.length < t; )
|
|
125
125
|
e = `0${e}`;
|
|
126
126
|
return e;
|
|
127
127
|
}
|
|
128
128
|
function f(e, t) {
|
|
129
|
-
let r, n,
|
|
129
|
+
let r, n, o;
|
|
130
130
|
if (t.length === 0)
|
|
131
131
|
return e;
|
|
132
|
-
for (r = 0,
|
|
132
|
+
for (r = 0, o = t.length; r < o; r++)
|
|
133
133
|
n = t.charCodeAt(r), e = (e << 5) - e + n, e |= 0;
|
|
134
134
|
return e < 0 ? e * -2 : e;
|
|
135
135
|
}
|
|
136
|
-
function
|
|
136
|
+
function I(e, t, r) {
|
|
137
137
|
return Object.keys(t).sort().reduce(n, e);
|
|
138
|
-
function n(
|
|
139
|
-
return _(
|
|
138
|
+
function n(o, a) {
|
|
139
|
+
return _(o, t[a], a, r);
|
|
140
140
|
}
|
|
141
141
|
}
|
|
142
142
|
function _(e, t, r, n) {
|
|
143
|
-
const
|
|
143
|
+
const o = f(f(f(e, r), y(t)), typeof t);
|
|
144
144
|
if (t === null)
|
|
145
|
-
return f(
|
|
145
|
+
return f(o, "null");
|
|
146
146
|
if (t === void 0)
|
|
147
|
-
return f(
|
|
147
|
+
return f(o, "undefined");
|
|
148
148
|
if (typeof t == "object" || typeof t == "function") {
|
|
149
149
|
if (n.includes(t))
|
|
150
|
-
return f(
|
|
150
|
+
return f(o, `[Circular]${r}`);
|
|
151
151
|
n.push(t);
|
|
152
|
-
const
|
|
152
|
+
const a = I(o, t, n);
|
|
153
153
|
if (!("valueOf" in t) || typeof t.valueOf != "function")
|
|
154
|
-
return
|
|
154
|
+
return a;
|
|
155
155
|
try {
|
|
156
|
-
return f(
|
|
156
|
+
return f(a, String(t.valueOf()));
|
|
157
157
|
} catch (l) {
|
|
158
|
-
return f(
|
|
158
|
+
return f(a, `[valueOf exception]${l.stack || l.message}`);
|
|
159
159
|
}
|
|
160
160
|
}
|
|
161
|
-
return f(
|
|
161
|
+
return f(o, t.toString());
|
|
162
162
|
}
|
|
163
163
|
function y(e) {
|
|
164
164
|
return Object.prototype.toString.call(e);
|
|
165
165
|
}
|
|
166
166
|
function ae(e) {
|
|
167
|
-
return
|
|
167
|
+
return v(_(0, e, "", []).toString(16), 8);
|
|
168
168
|
}
|
|
169
|
-
const
|
|
169
|
+
const ie = (e) => {
|
|
170
170
|
let t = "";
|
|
171
171
|
return D(e, {
|
|
172
|
-
start: function(r, n,
|
|
172
|
+
start: function(r, n, o) {
|
|
173
173
|
t += "<" + r;
|
|
174
|
-
for (let
|
|
175
|
-
t += ` ${n[
|
|
174
|
+
for (let a = 0; a < n.length; a++)
|
|
175
|
+
t += ` ${n[a].name}="${n[a].escaped}"`;
|
|
176
176
|
t += ">";
|
|
177
177
|
},
|
|
178
178
|
end: function(r) {
|
|
@@ -185,10 +185,10 @@ const oe = (e) => {
|
|
|
185
185
|
t += `<!-- ${r} -->`;
|
|
186
186
|
}
|
|
187
187
|
}), t;
|
|
188
|
-
},
|
|
188
|
+
}, se = (e, t) => {
|
|
189
189
|
const r = g("html,head,body,title"), n = { link: "head", base: "head" };
|
|
190
190
|
t ? t = t.ownerDocument || t.getOwnerDocument && t.getOwnerDocument() || t : typeof t < "u" ? t = new Document() : typeof document < "u" && document.implementation && document.implementation.createDocument && (t = document.implementation.createDocument("", "", null));
|
|
191
|
-
const
|
|
191
|
+
const o = [];
|
|
192
192
|
if (!(t.documentElement || t.getDocumentElement && t.getDocumentElement()) && t.createElement && function() {
|
|
193
193
|
const i = t.createElement("html"), u = t.createElement("head");
|
|
194
194
|
u.appendChild(t.createElement("title")), i.appendChild(u), i.appendChild(t.createElement("body")), t.appendChild(i);
|
|
@@ -198,16 +198,16 @@ const oe = (e) => {
|
|
|
198
198
|
return D(e, {
|
|
199
199
|
start: function(i, u, c) {
|
|
200
200
|
if (r[i]) {
|
|
201
|
-
l = r[i], c ||
|
|
201
|
+
l = r[i], c || o.push(l);
|
|
202
202
|
return;
|
|
203
203
|
}
|
|
204
204
|
const s = t.createElement(i);
|
|
205
205
|
for (let d in u)
|
|
206
206
|
s.setAttribute(u[d].name, u[d].value);
|
|
207
|
-
n[i] && typeof r[n[i]] != "boolean" ? r[n[i]].appendChild(s) : l && l.appendChild && l.appendChild(s), c || (
|
|
207
|
+
n[i] && typeof r[n[i]] != "boolean" ? r[n[i]].appendChild(s) : l && l.appendChild && l.appendChild(s), c || (o.push(s), l = s);
|
|
208
208
|
},
|
|
209
209
|
end: function(i) {
|
|
210
|
-
|
|
210
|
+
o.length -= 1, l = o[o.length - 1];
|
|
211
211
|
},
|
|
212
212
|
chars: function(i) {
|
|
213
213
|
l.appendChild(t.createTextNode(i));
|
|
@@ -219,7 +219,7 @@ const oe = (e) => {
|
|
|
219
219
|
let t = {}, r = e.split(",");
|
|
220
220
|
for (let n = 0; n < r.length; n++) t[r[n]] = !0;
|
|
221
221
|
return t;
|
|
222
|
-
}, R = /^<([-A-Za-z0-9_]+)((?:\s+[a-zA-Z_:][-a-zA-Z0-9_:.]*(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)>/, E = /^<\/([-A-Za-z0-9_]+)[^>]*>/,
|
|
222
|
+
}, R = /^<([-A-Za-z0-9_]+)((?:\s+[a-zA-Z_:][-a-zA-Z0-9_:.]*(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)>/, E = /^<\/([-A-Za-z0-9_]+)[^>]*>/, M = /([a-zA-Z_:][-a-zA-Z0-9_:.]*)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|([^>\s]+)))?/g, S = g(
|
|
223
223
|
"area,base,basefont,br,col,frame,hr,img,input,link,meta,param,embed,command,keygen,source,track,wbr"
|
|
224
224
|
), C = g(
|
|
225
225
|
"a,address,article,applet,aside,audio,blockquote,button,canvas,center,dd,del,dir,div,dl,dt,fieldset,figcaption,figure,footer,form,frameset,h1,h2,h3,h4,h5,h6,header,hgroup,hr,iframe,ins,isindex,li,map,menu,noframes,noscript,object,ol,output,p,pre,section,script,table,tbody,td,tfoot,th,thead,tr,ul,video"
|
|
@@ -232,25 +232,25 @@ Array.prototype.last = function() {
|
|
|
232
232
|
return this[this.length - 1];
|
|
233
233
|
};
|
|
234
234
|
const D = (e, t) => {
|
|
235
|
-
let r, n,
|
|
236
|
-
|
|
235
|
+
let r, n, o, a = [], l = e;
|
|
236
|
+
a.last = function() {
|
|
237
237
|
return this[this.length - 1];
|
|
238
238
|
};
|
|
239
239
|
const i = (c, s) => {
|
|
240
240
|
let d;
|
|
241
241
|
if (!s) d = 0;
|
|
242
242
|
else
|
|
243
|
-
for (d =
|
|
243
|
+
for (d = a.length - 1; d >= 0 && a[d] != s; d--)
|
|
244
244
|
;
|
|
245
245
|
if (d >= 0) {
|
|
246
|
-
for (let p =
|
|
247
|
-
t.end && t.end(
|
|
248
|
-
|
|
246
|
+
for (let p = a.length - 1; p >= d; p--)
|
|
247
|
+
t.end && t.end(a[p]);
|
|
248
|
+
a.length = d;
|
|
249
249
|
}
|
|
250
250
|
};
|
|
251
251
|
for (; e; ) {
|
|
252
|
-
if (n = !0, !
|
|
253
|
-
if (e.indexOf("<!--") == 0 ? (r = e.indexOf("-->"), r >= 0 && (t.comment && t.comment(e.substring(4, r)), e = e.substring(r + 3), n = !1)) : e.indexOf("</") == 0 ? (
|
|
252
|
+
if (n = !0, !a.last() || !H[a.last()]) {
|
|
253
|
+
if (e.indexOf("<!--") == 0 ? (r = e.indexOf("-->"), r >= 0 && (t.comment && t.comment(e.substring(4, r)), e = e.substring(r + 3), n = !1)) : e.indexOf("</") == 0 ? (o = e.match(E), o && (e = e.substring(o[0].length), o[0].replace(E, i), n = !1)) : e.indexOf("<") == 0 && (o = e.match(R), o && (e = e.substring(o[0].length), o[0].replace(R, u), n = !1)), n) {
|
|
254
254
|
r = e.indexOf("<");
|
|
255
255
|
let c = r < 0 ? e : e.substring(0, r);
|
|
256
256
|
e = r < 0 ? "" : e.substring(r), t.chars && t.chars(c);
|
|
@@ -258,25 +258,25 @@ const D = (e, t) => {
|
|
|
258
258
|
} else
|
|
259
259
|
e = e.replace(
|
|
260
260
|
//@ts-ignore
|
|
261
|
-
new RegExp("([\\s\\S]*?)</" +
|
|
261
|
+
new RegExp("([\\s\\S]*?)</" + a.last() + "[^>]*>"),
|
|
262
262
|
function(c, s) {
|
|
263
263
|
return s = s.replace(
|
|
264
264
|
/<!--([\s\S]*?)-->|<!\[CDATA\[([\s\S]*?)]]>/g,
|
|
265
265
|
"$1$2"
|
|
266
266
|
), t.chars && t.chars(s), "";
|
|
267
267
|
}
|
|
268
|
-
), i("",
|
|
268
|
+
), i("", a.last());
|
|
269
269
|
if (e == l) throw "Parse Error: " + e;
|
|
270
270
|
l = e;
|
|
271
271
|
}
|
|
272
272
|
i();
|
|
273
273
|
function u(c, s, d, p) {
|
|
274
274
|
if (s = s.toLowerCase(), C[s])
|
|
275
|
-
for (;
|
|
276
|
-
i("",
|
|
277
|
-
if (T[s] &&
|
|
275
|
+
for (; a.last() && U[a.last()]; )
|
|
276
|
+
i("", a.last());
|
|
277
|
+
if (T[s] && a.last() == s && i("", s), p = S[s] || !!p, p || a.push(s), t.start) {
|
|
278
278
|
const w = [];
|
|
279
|
-
d.replace(
|
|
279
|
+
d.replace(M, function(Q, A) {
|
|
280
280
|
let O = arguments[2] ? arguments[2] : arguments[3] ? arguments[3] : arguments[4] ? arguments[4] : B[A] ? A : "";
|
|
281
281
|
w.push({
|
|
282
282
|
name: A,
|
|
@@ -294,56 +294,56 @@ function G(e) {
|
|
|
294
294
|
function W(e) {
|
|
295
295
|
return e.replace(/<\?xml.*\?>\n/, "").replace(/<!doctype.*\>\n/, "").replace(/<!DOCTYPE.*\>\n/, "");
|
|
296
296
|
}
|
|
297
|
-
const
|
|
297
|
+
const le = (e) => {
|
|
298
298
|
e = W(e);
|
|
299
299
|
const t = [], r = {
|
|
300
300
|
node: "root",
|
|
301
301
|
child: []
|
|
302
302
|
};
|
|
303
303
|
return D(e, {
|
|
304
|
-
start: function(n,
|
|
304
|
+
start: function(n, o, a) {
|
|
305
305
|
let l = {
|
|
306
306
|
node: "element",
|
|
307
307
|
tag: n
|
|
308
308
|
};
|
|
309
|
-
if (
|
|
309
|
+
if (o.length !== 0 && (l.attr = o.reduce(function(i, u) {
|
|
310
310
|
let c = u.name, s = u.value;
|
|
311
311
|
return s.match(/ /) && (["title", "transform", "viewBox", "widget"].includes(u.name) || (s = s.split(" "))), i[c] ? Array.isArray(i[c]) ? i[c].push(s) : i[c] = [i[c], s] : i[c] = s, i;
|
|
312
|
-
}, {})),
|
|
312
|
+
}, {})), a) {
|
|
313
313
|
const i = t[0] || r;
|
|
314
314
|
i.child === void 0 && (i.child = []), i.child.push(l);
|
|
315
315
|
} else
|
|
316
316
|
t.unshift(l);
|
|
317
317
|
},
|
|
318
318
|
end: function(n) {
|
|
319
|
-
const
|
|
320
|
-
if (
|
|
321
|
-
r.child.push(
|
|
319
|
+
const o = t.shift();
|
|
320
|
+
if (o.tag !== n && console.error("invalid state: mismatch end tag"), t.length === 0)
|
|
321
|
+
r.child.push(o);
|
|
322
322
|
else {
|
|
323
|
-
const
|
|
324
|
-
|
|
323
|
+
const a = t[0];
|
|
324
|
+
a.child === void 0 && (a.child = []), a.child.push(o);
|
|
325
325
|
}
|
|
326
326
|
},
|
|
327
327
|
//@ts-ignore
|
|
328
328
|
chars: function(n) {
|
|
329
|
-
let
|
|
329
|
+
let o = {
|
|
330
330
|
node: "text",
|
|
331
331
|
text: n
|
|
332
332
|
};
|
|
333
333
|
if (t.length === 0)
|
|
334
|
-
r.child.push(
|
|
334
|
+
r.child.push(o);
|
|
335
335
|
else {
|
|
336
|
-
const
|
|
337
|
-
|
|
336
|
+
const a = t[0];
|
|
337
|
+
a.child === void 0 && (a.child = []), a.child.push(o);
|
|
338
338
|
}
|
|
339
339
|
},
|
|
340
340
|
//@ts-ignore
|
|
341
341
|
comment: function(n) {
|
|
342
|
-
const
|
|
342
|
+
const o = {
|
|
343
343
|
node: "comment",
|
|
344
344
|
text: n
|
|
345
|
-
},
|
|
346
|
-
|
|
345
|
+
}, a = t[0];
|
|
346
|
+
a.child === void 0 && (a.child = []), a.child.push(o);
|
|
347
347
|
}
|
|
348
348
|
}), r;
|
|
349
349
|
}, F = (e) => {
|
|
@@ -364,19 +364,19 @@ const se = (e) => {
|
|
|
364
364
|
"embed"
|
|
365
365
|
];
|
|
366
366
|
let r = "";
|
|
367
|
-
e.child && (r = e.child.map(function(
|
|
368
|
-
return F(
|
|
367
|
+
e.child && (r = e.child.map(function(o) {
|
|
368
|
+
return F(o);
|
|
369
369
|
}).join(""));
|
|
370
370
|
let n = "";
|
|
371
|
-
if (e.attr && (n = Object.keys(e.attr).map(function(
|
|
372
|
-
let
|
|
373
|
-
return Array.isArray(
|
|
371
|
+
if (e.attr && (n = Object.keys(e.attr).map(function(o) {
|
|
372
|
+
let a = e.attr[o];
|
|
373
|
+
return Array.isArray(a) && (a = a.join(" ")), `${o}=${G(a)}`;
|
|
374
374
|
}).join(" "), n !== "" && (n = ` ${n}`)), e.node === "element") {
|
|
375
|
-
let
|
|
376
|
-
if (t.indexOf(
|
|
375
|
+
let o = e.tag;
|
|
376
|
+
if (t.indexOf(o) > -1)
|
|
377
377
|
return `<${e.tag}${n}/>`;
|
|
378
|
-
const
|
|
379
|
-
return `${
|
|
378
|
+
const a = `<${e.tag}${n}>`, l = `</${e.tag}>`;
|
|
379
|
+
return `${a}${r}${l}`;
|
|
380
380
|
}
|
|
381
381
|
if (e.node === "text")
|
|
382
382
|
return e.text;
|
|
@@ -384,25 +384,25 @@ const se = (e) => {
|
|
|
384
384
|
return `<!-- ${e.text} -->`;
|
|
385
385
|
if (e.node === "root")
|
|
386
386
|
return r;
|
|
387
|
-
},
|
|
387
|
+
}, ce = (e, t = 0, r = !0, n = "en") => {
|
|
388
388
|
if (typeof e == "string" || e instanceof String) return e.toString().replace(/[^0-9.]/g, "");
|
|
389
389
|
if (r === !1)
|
|
390
390
|
return e.toLocaleString(n);
|
|
391
391
|
if (e < 1e3)
|
|
392
392
|
return e = e.toString().replace(/[^0-9.]/g, "");
|
|
393
393
|
e = e.toString().replace(/[^0-9.]/g, "");
|
|
394
|
-
let
|
|
394
|
+
let o = [
|
|
395
395
|
{ v: 1e3, s: "K" },
|
|
396
396
|
{ v: 1e6, s: "M" },
|
|
397
397
|
{ v: 1e9, s: "B" },
|
|
398
398
|
{ v: 1e12, s: "T" },
|
|
399
399
|
{ v: 1e15, s: "P" },
|
|
400
400
|
{ v: 1e18, s: "E" }
|
|
401
|
-
],
|
|
402
|
-
for (
|
|
401
|
+
], a;
|
|
402
|
+
for (a = o.length - 1; a > 0 && !(e >= o[a].v); a--)
|
|
403
403
|
;
|
|
404
|
-
return (e / a
|
|
405
|
-
},
|
|
404
|
+
return (e / o[a].v).toFixed(t).replace(/\.0+$|(\.[0-9]*[1-9])0+$/, "$1") + o[a].s;
|
|
405
|
+
}, de = (e = 0, t) => {
|
|
406
406
|
switch (!0) {
|
|
407
407
|
case e > 3:
|
|
408
408
|
console.debug(...t);
|
|
@@ -417,14 +417,14 @@ const se = (e) => {
|
|
|
417
417
|
console.error(...t);
|
|
418
418
|
break;
|
|
419
419
|
}
|
|
420
|
-
},
|
|
421
|
-
<`),
|
|
420
|
+
}, ue = (e) => e.replace(/\<\!--\s*?[^\s?\[][\s\S]*?--\>/g, "").replace(/\>\s*\</g, "><").replace(/\t/g, ""), fe = (e) => e.replace(/\>\</g, `>
|
|
421
|
+
<`), pe = (e) => {
|
|
422
422
|
e.replace(/\/\*.*\*\/|\/\*[\s\S]*?\*\/|\n|\t|\v|\s{2,}/g, "").replace(/\s*\{\s*/g, "{").replace(/\s*\}\s*/g, "}").replace(/\s*\:\s*/g, ":").replace(/\s*\;\s*/g, ";").replace(/\s*\,\s*/g, ",").replace(/\s*\~\s*/g, "~").replace(/\s*\>\s*/g, ">").replace(/\s*\+\s*/g, "+").replace(/\s*\!\s*/g, "!");
|
|
423
|
-
},
|
|
423
|
+
}, ge = (e) => e.replace(/\,/g, ", ").replace(/\{/g, ` {
|
|
424
424
|
`).replace(/\}/g, `}
|
|
425
425
|
`).replace(/\;/g, `;
|
|
426
426
|
`);
|
|
427
|
-
function
|
|
427
|
+
function be(e, t) {
|
|
428
428
|
const r = [
|
|
429
429
|
{ value: 1, symbol: "" },
|
|
430
430
|
{ value: 1e3, symbol: "K" },
|
|
@@ -434,23 +434,23 @@ function ge(e, t) {
|
|
|
434
434
|
{ value: 1e15, symbol: "P" },
|
|
435
435
|
{ value: 1e18, symbol: "E" }
|
|
436
436
|
], n = /\.0+$|(\.\d*[1-9])0+$/;
|
|
437
|
-
let
|
|
438
|
-
for (
|
|
437
|
+
let o;
|
|
438
|
+
for (o = r.length - 1; o > 0 && !(e >= r[o].value); o--)
|
|
439
439
|
;
|
|
440
|
-
return (e / r[
|
|
440
|
+
return (e / r[o].value).toFixed(t).replace(n, "$1") + r[o].symbol;
|
|
441
441
|
}
|
|
442
|
-
function
|
|
442
|
+
function he(e) {
|
|
443
443
|
const t = RegExp(`[?&]${e}=([^&]*)`).exec(window.location.search);
|
|
444
444
|
return t && decodeURIComponent(t[1].replace(/\+/g, " ")) || null;
|
|
445
445
|
}
|
|
446
|
-
const
|
|
446
|
+
const me = (e) => new Proxy(new URLSearchParams(window.location.search), {
|
|
447
447
|
// @ts-ignore
|
|
448
448
|
get: (r, n) => r.get(n)
|
|
449
449
|
})[e];
|
|
450
|
-
function
|
|
450
|
+
function xe(e) {
|
|
451
451
|
return e[Math.floor(Math.random() * e.length)];
|
|
452
452
|
}
|
|
453
|
-
function
|
|
453
|
+
function Ae(e) {
|
|
454
454
|
switch (e.language) {
|
|
455
455
|
case "ar":
|
|
456
456
|
return {
|
|
@@ -461,7 +461,7 @@ function xe(e) {
|
|
|
461
461
|
return {};
|
|
462
462
|
}
|
|
463
463
|
}
|
|
464
|
-
function
|
|
464
|
+
function De(e) {
|
|
465
465
|
const t = window.BuzzCasting.getOptions().suspended ?? !1;
|
|
466
466
|
return e.forEach((r) => {
|
|
467
467
|
var n;
|
|
@@ -497,12 +497,18 @@ function Ae(e) {
|
|
|
497
497
|
influence: 0
|
|
498
498
|
};
|
|
499
499
|
if (r.sender.title === "" && r.link !== "") {
|
|
500
|
-
const
|
|
501
|
-
r.sender.title =
|
|
500
|
+
const o = new URL(r.link);
|
|
501
|
+
r.sender.title = o.hostname.replace("www.", "");
|
|
502
502
|
}
|
|
503
503
|
}), e;
|
|
504
504
|
}
|
|
505
|
-
function
|
|
505
|
+
function we(e, t, r, n) {
|
|
506
|
+
e.stopPropagation(), t.showModal({
|
|
507
|
+
showComponent: "card-modal",
|
|
508
|
+
props: { data: r, options: n }
|
|
509
|
+
});
|
|
510
|
+
}
|
|
511
|
+
function Oe(e) {
|
|
506
512
|
const t = [...e];
|
|
507
513
|
for (let r = t.length - 1; r > 0; r--) {
|
|
508
514
|
const n = Math.floor(Math.random() * (r + 1));
|
|
@@ -510,13 +516,13 @@ function De(e) {
|
|
|
510
516
|
}
|
|
511
517
|
return t;
|
|
512
518
|
}
|
|
513
|
-
function
|
|
519
|
+
function Re() {
|
|
514
520
|
let e = "";
|
|
515
521
|
const t = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
|
|
516
522
|
for (let r = 0; r < 7; r++) e += t.charAt(Math.floor(Math.random() * t.length));
|
|
517
523
|
return e;
|
|
518
524
|
}
|
|
519
|
-
const
|
|
525
|
+
const Ee = (e) => {
|
|
520
526
|
switch (e == null ? void 0 : e.type) {
|
|
521
527
|
case m.MESSAGES:
|
|
522
528
|
return h.MESSAGES;
|
|
@@ -529,12 +535,12 @@ const Oe = (e) => {
|
|
|
529
535
|
}
|
|
530
536
|
}, Y = (e = 6) => Math.random().toString(36).substring(2, e + 2), K = (e, t = []) => !t.find(function(n) {
|
|
531
537
|
return n === e;
|
|
532
|
-
}),
|
|
533
|
-
let n = 0,
|
|
534
|
-
for (;
|
|
535
|
-
|
|
536
|
-
return
|
|
537
|
-
},
|
|
538
|
+
}), _e = (e, t = []) => {
|
|
539
|
+
let n = 0, o = "";
|
|
540
|
+
for (; o == "" && n < 100; )
|
|
541
|
+
o = Y(e), K(o, t) || (o = "", n++);
|
|
542
|
+
return o;
|
|
543
|
+
}, ke = (e) => {
|
|
538
544
|
switch (!0) {
|
|
539
545
|
case e < 0:
|
|
540
546
|
return "text-down text-xs";
|
|
@@ -543,12 +549,12 @@ const Oe = (e) => {
|
|
|
543
549
|
default:
|
|
544
550
|
return "text-white text-xs";
|
|
545
551
|
}
|
|
546
|
-
},
|
|
547
|
-
function
|
|
552
|
+
}, Le = (e, t, r) => Promise.race([e, Z(t, r)]), Z = (e, t) => new Promise((r, n) => setTimeout(() => t === void 0 ? r("ok") : n(t), e));
|
|
553
|
+
function $e(e) {
|
|
548
554
|
let t = `${e.type}.${e.topics}`;
|
|
549
555
|
return e.order && (t += `.${e.order}`), e.period && (t += `.${e.period}`), t;
|
|
550
556
|
}
|
|
551
|
-
function
|
|
557
|
+
function Pe(e) {
|
|
552
558
|
var t;
|
|
553
559
|
if (e.widget === void 0) {
|
|
554
560
|
const r = (t = e.topics) == null ? void 0 : t.split("-");
|
|
@@ -556,12 +562,12 @@ function Le(e) {
|
|
|
556
562
|
}
|
|
557
563
|
return e;
|
|
558
564
|
}
|
|
559
|
-
function
|
|
565
|
+
function ve(e, t) {
|
|
560
566
|
var i;
|
|
561
|
-
let r, n,
|
|
567
|
+
let r, n, o, a, l;
|
|
562
568
|
switch (e.moderation) {
|
|
563
569
|
case x.BEFORE:
|
|
564
|
-
r = /* @__PURE__ */ new Date(), n = (i = e.beforeTime) == null ? void 0 : i.split(":"),
|
|
570
|
+
r = /* @__PURE__ */ new Date(), n = (i = e.beforeTime) == null ? void 0 : i.split(":"), o = Number.parseInt(n ? n[0] : "00"), a = Number.parseInt(n ? n[1] : "00"), l = Number.parseInt(n ? n[2] : "00"), t.before = r.setHours(o, a, l, 0) / 1e3, t.period || (t.period = r.getDay() === 1 ? 72 : 24);
|
|
565
571
|
break;
|
|
566
572
|
case x.DELAYED:
|
|
567
573
|
e.delay && e.delay > 0 && (t.delay = `${e.delay}`);
|
|
@@ -574,50 +580,53 @@ function $e(e, t) {
|
|
|
574
580
|
}
|
|
575
581
|
return t;
|
|
576
582
|
}
|
|
583
|
+
var X = /* @__PURE__ */ ((e) => (e.MultiPolygon = "MultiPolygon", e.Polygon = "Polygon", e))(X || {});
|
|
577
584
|
export {
|
|
578
585
|
m as API,
|
|
579
586
|
h as CSS,
|
|
580
587
|
k as EVENTS,
|
|
581
588
|
D as HTMLParser,
|
|
582
|
-
|
|
583
|
-
|
|
589
|
+
se as HTMLtoDOM,
|
|
590
|
+
ie as HTMLtoXML,
|
|
584
591
|
x as MODERATION,
|
|
585
592
|
L as STORAGE,
|
|
586
|
-
|
|
587
|
-
j as
|
|
588
|
-
J as
|
|
589
|
-
|
|
593
|
+
X as ShapeType,
|
|
594
|
+
j as anonymize,
|
|
595
|
+
J as attachedMedia,
|
|
596
|
+
z as attrs,
|
|
597
|
+
V as brandLogo,
|
|
590
598
|
$ as camelCase,
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
599
|
+
q as camelCasedProps,
|
|
600
|
+
ee as camelize,
|
|
601
|
+
te as capitalizeFirstLetter,
|
|
602
|
+
re as clearContents,
|
|
595
603
|
P as deepMerge,
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
604
|
+
N as filterAttributes,
|
|
605
|
+
ne as formatContent,
|
|
606
|
+
oe as getGuid,
|
|
607
|
+
$e as getKey,
|
|
608
|
+
he as getParameterByName,
|
|
609
|
+
me as getQueryParam,
|
|
602
610
|
ae as hashSum,
|
|
603
|
-
|
|
604
|
-
|
|
611
|
+
le as html2json,
|
|
612
|
+
ce as intToString,
|
|
605
613
|
F as json2html,
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
614
|
+
de as log,
|
|
615
|
+
ge as maxifyCss,
|
|
616
|
+
fe as maxifyHtml,
|
|
617
|
+
pe as minifyCss,
|
|
618
|
+
ue as minifyHtml,
|
|
619
|
+
ve as moderation,
|
|
620
|
+
be as numberFormatter,
|
|
621
|
+
xe as randomValue,
|
|
622
|
+
Ae as rtl,
|
|
623
|
+
De as sanitize,
|
|
624
|
+
we as showModal,
|
|
625
|
+
Oe as shuffleMessages,
|
|
626
|
+
Re as stringGen,
|
|
627
|
+
Ee as typeCss,
|
|
628
|
+
_e as uniq,
|
|
629
|
+
ke as upDownColor,
|
|
630
|
+
Pe as widgetParams,
|
|
631
|
+
Le as wrapPromise
|
|
623
632
|
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "buzzcasting-utils",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.3.0",
|
|
5
5
|
"private": false,
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "Mark Tamis, TouchFlows SAS",
|
|
@@ -29,21 +29,21 @@
|
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {},
|
|
31
31
|
"devDependencies": {
|
|
32
|
-
"@antfu/eslint-config": "^4.
|
|
32
|
+
"@antfu/eslint-config": "^4.11.0",
|
|
33
33
|
"@commitlint/cli": "^19.8.0",
|
|
34
34
|
"@commitlint/config-conventional": "^19.8.0",
|
|
35
|
-
"@types/node": "^22.13.
|
|
36
|
-
"@typescript-eslint/eslint-plugin": "^8.
|
|
37
|
-
"@typescript-eslint/parser": "^8.
|
|
38
|
-
"@vitest/coverage-v8": "^3.0.
|
|
35
|
+
"@types/node": "^22.13.13",
|
|
36
|
+
"@typescript-eslint/eslint-plugin": "^8.28.0",
|
|
37
|
+
"@typescript-eslint/parser": "^8.28.0",
|
|
38
|
+
"@vitest/coverage-v8": "^3.0.9",
|
|
39
39
|
"camelcase": "^8.0.0",
|
|
40
40
|
"changelogen": "^0.6.1",
|
|
41
|
-
"eslint": "^9.
|
|
41
|
+
"eslint": "^9.23.0",
|
|
42
42
|
"lint-staged": "^15.5.0",
|
|
43
43
|
"typescript": "^5.8.2",
|
|
44
|
-
"vite": "^6.2.
|
|
44
|
+
"vite": "^6.2.3",
|
|
45
45
|
"vite-plugin-dts": "^4.5.3",
|
|
46
|
-
"vitest": "^3.0.
|
|
46
|
+
"vitest": "^3.0.9"
|
|
47
47
|
},
|
|
48
48
|
"lint-staged": {
|
|
49
49
|
"*.ts": "npm run lint"
|