@syntrologie/runtime-sdk 2.8.0-canary.164 → 2.8.0-canary.166
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/{chunk-4JKXOMV2.js → chunk-3WAJ3E6R.js} +1 -4
- package/dist/index.js +1936 -724
- package/dist/index.js.map +4 -4
- package/dist/smart-canvas.esm.js +191 -191
- package/dist/smart-canvas.esm.js.map +4 -4
- package/dist/smart-canvas.js +8876 -7667
- package/dist/smart-canvas.js.map +4 -4
- package/dist/smart-canvas.min.js +190 -190
- package/dist/smart-canvas.min.js.map +4 -4
- package/dist/theme/index.js +1 -1
- package/dist/version.d.ts +1 -1
- package/package.json +1 -1
- /package/dist/{chunk-4JKXOMV2.js.map → chunk-3WAJ3E6R.js.map} +0 -0
package/dist/index.js
CHANGED
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
|
-
blue,
|
|
3
2
|
flattenThemeConfig,
|
|
4
3
|
mergeThemeConfig,
|
|
5
|
-
mergeThemeWithWorkspace
|
|
6
|
-
|
|
7
|
-
slateGrey
|
|
8
|
-
} from "./chunk-4JKXOMV2.js";
|
|
4
|
+
mergeThemeWithWorkspace
|
|
5
|
+
} from "./chunk-3WAJ3E6R.js";
|
|
9
6
|
import {
|
|
10
7
|
AddClassZ,
|
|
11
8
|
AnchorIdZ,
|
|
@@ -80,35 +77,30 @@ import {
|
|
|
80
77
|
__publicField
|
|
81
78
|
} from "./chunk-5Z66FT5C.js";
|
|
82
79
|
|
|
83
|
-
// ../adaptives/adaptive-content/dist/
|
|
80
|
+
// ../adaptives/adaptive-content/dist/runtime.js
|
|
84
81
|
function guardAgainstReconciliation(container, anchor, reinsertFn, opts) {
|
|
85
82
|
var _a3, _b, _c;
|
|
86
83
|
const maxRetries = (_a3 = opts == null ? void 0 : opts.maxRetries) != null ? _a3 : 3;
|
|
87
84
|
const debounceMs = (_b = opts == null ? void 0 : opts.debounceMs) != null ? _b : 50;
|
|
88
85
|
const observeTarget = (_c = container.parentElement) != null ? _c : anchor.parentElement;
|
|
89
|
-
if (!observeTarget)
|
|
90
|
-
|
|
91
|
-
};
|
|
86
|
+
if (!observeTarget) return () => {
|
|
87
|
+
};
|
|
92
88
|
let retries = 0;
|
|
93
89
|
let debounceTimer = null;
|
|
94
90
|
let disconnected = false;
|
|
95
91
|
const observer = new MutationObserver((mutations) => {
|
|
96
|
-
if (disconnected)
|
|
97
|
-
return;
|
|
92
|
+
if (disconnected) return;
|
|
98
93
|
for (const mutation of mutations) {
|
|
99
94
|
for (const removed of mutation.removedNodes) {
|
|
100
|
-
if (removed !== container)
|
|
101
|
-
continue;
|
|
95
|
+
if (removed !== container) continue;
|
|
102
96
|
if (retries >= maxRetries) {
|
|
103
97
|
observer.disconnect();
|
|
104
98
|
disconnected = true;
|
|
105
99
|
return;
|
|
106
100
|
}
|
|
107
|
-
if (debounceTimer)
|
|
108
|
-
clearTimeout(debounceTimer);
|
|
101
|
+
if (debounceTimer) clearTimeout(debounceTimer);
|
|
109
102
|
debounceTimer = setTimeout(() => {
|
|
110
|
-
if (disconnected)
|
|
111
|
-
return;
|
|
103
|
+
if (disconnected) return;
|
|
112
104
|
if (!anchor.isConnected) {
|
|
113
105
|
observer.disconnect();
|
|
114
106
|
disconnected = true;
|
|
@@ -130,12 +122,9 @@ function guardAgainstReconciliation(container, anchor, reinsertFn, opts) {
|
|
|
130
122
|
return () => {
|
|
131
123
|
disconnected = true;
|
|
132
124
|
observer.disconnect();
|
|
133
|
-
if (debounceTimer)
|
|
134
|
-
clearTimeout(debounceTimer);
|
|
125
|
+
if (debounceTimer) clearTimeout(debounceTimer);
|
|
135
126
|
};
|
|
136
127
|
}
|
|
137
|
-
|
|
138
|
-
// ../adaptives/adaptive-content/dist/sanitizer.js
|
|
139
128
|
var ALLOWED_TAGS = /* @__PURE__ */ new Set([
|
|
140
129
|
"b",
|
|
141
130
|
"strong",
|
|
@@ -186,8 +175,8 @@ function sanitizeHtml(html14) {
|
|
|
186
175
|
const toRemove = [];
|
|
187
176
|
while (walker.nextNode()) {
|
|
188
177
|
const el = walker.currentNode;
|
|
189
|
-
const
|
|
190
|
-
if (!ALLOWED_TAGS.has(
|
|
178
|
+
const tag3 = el.tagName.toLowerCase();
|
|
179
|
+
if (!ALLOWED_TAGS.has(tag3)) {
|
|
191
180
|
toRemove.push(el);
|
|
192
181
|
continue;
|
|
193
182
|
}
|
|
@@ -216,8 +205,6 @@ function sanitizeHtml(html14) {
|
|
|
216
205
|
}
|
|
217
206
|
return tpl.innerHTML;
|
|
218
207
|
}
|
|
219
|
-
|
|
220
|
-
// ../adaptives/adaptive-content/dist/runtime.js
|
|
221
208
|
var executeInsertHtml = async (action, context) => {
|
|
222
209
|
var _a3;
|
|
223
210
|
let anchorEl = context.resolveAnchor(action.anchorId);
|
|
@@ -236,13 +223,11 @@ var executeInsertHtml = async (action, context) => {
|
|
|
236
223
|
const escapedLabel = CSS.escape(label);
|
|
237
224
|
const searchRoot = (_a3 = anchorEl.parentElement) != null ? _a3 : anchorEl;
|
|
238
225
|
const existing = searchRoot.querySelector(`[${dedupAttr}="${escapedLabel}"]`);
|
|
239
|
-
if (existing)
|
|
240
|
-
existing.remove();
|
|
226
|
+
if (existing) existing.remove();
|
|
241
227
|
}
|
|
242
228
|
const container = document.createElement("div");
|
|
243
229
|
container.setAttribute("data-syntro-action-id", context.generateId());
|
|
244
|
-
if (label)
|
|
245
|
-
container.setAttribute(dedupAttr, label);
|
|
230
|
+
if (label) container.setAttribute(dedupAttr, label);
|
|
246
231
|
container.innerHTML = sanitizedHtml;
|
|
247
232
|
let originalContent = null;
|
|
248
233
|
switch (action.position) {
|
|
@@ -308,8 +293,7 @@ var executeInsertHtml = async (action, context) => {
|
|
|
308
293
|
container.removeEventListener("click", deepLinkHandler);
|
|
309
294
|
}
|
|
310
295
|
guardCleanup();
|
|
311
|
-
if (!container.isConnected)
|
|
312
|
-
return;
|
|
296
|
+
if (!container.isConnected) return;
|
|
313
297
|
try {
|
|
314
298
|
if (action.position === "replace" && originalContent !== null) {
|
|
315
299
|
const restoredEl = document.createElement(anchorEl.tagName);
|
|
@@ -333,8 +317,7 @@ var executeInsertHtml = async (action, context) => {
|
|
|
333
317
|
};
|
|
334
318
|
function findTextTarget(el) {
|
|
335
319
|
var _a3, _b;
|
|
336
|
-
if (el.children.length === 0)
|
|
337
|
-
return el;
|
|
320
|
+
if (el.children.length === 0) return el;
|
|
338
321
|
const textChildren = Array.from(el.children).filter((child) => {
|
|
339
322
|
var _a4;
|
|
340
323
|
return (_a4 = child.textContent) == null ? void 0 : _a4.trim();
|
|
@@ -368,8 +351,7 @@ var executeSetText = async (action, context) => {
|
|
|
368
351
|
});
|
|
369
352
|
return {
|
|
370
353
|
cleanup: () => {
|
|
371
|
-
if (!anchorEl.isConnected)
|
|
372
|
-
return;
|
|
354
|
+
if (!anchorEl.isConnected) return;
|
|
373
355
|
textTarget.textContent = originalText;
|
|
374
356
|
},
|
|
375
357
|
updateFn: (changes) => {
|
|
@@ -411,8 +393,7 @@ var executeSetAttr = async (action, context) => {
|
|
|
411
393
|
});
|
|
412
394
|
return {
|
|
413
395
|
cleanup: () => {
|
|
414
|
-
if (!anchorEl.isConnected)
|
|
415
|
-
return;
|
|
396
|
+
if (!anchorEl.isConnected) return;
|
|
416
397
|
if (hadAttribute && originalValue !== null) {
|
|
417
398
|
anchorEl.setAttribute(action.attr, originalValue);
|
|
418
399
|
} else {
|
|
@@ -446,8 +427,7 @@ var executeAddClass = async (action, context) => {
|
|
|
446
427
|
});
|
|
447
428
|
return {
|
|
448
429
|
cleanup: () => {
|
|
449
|
-
if (!anchorEl.isConnected)
|
|
450
|
-
return;
|
|
430
|
+
if (!anchorEl.isConnected) return;
|
|
451
431
|
if (!hadClass) {
|
|
452
432
|
anchorEl.classList.remove(action.className);
|
|
453
433
|
}
|
|
@@ -474,8 +454,7 @@ var executeRemoveClass = async (action, context) => {
|
|
|
474
454
|
});
|
|
475
455
|
return {
|
|
476
456
|
cleanup: () => {
|
|
477
|
-
if (!anchorEl.isConnected)
|
|
478
|
-
return;
|
|
457
|
+
if (!anchorEl.isConnected) return;
|
|
479
458
|
if (hadClass) {
|
|
480
459
|
anchorEl.classList.add(action.className);
|
|
481
460
|
}
|
|
@@ -508,8 +487,7 @@ var executeSetStyle = async (action, context) => {
|
|
|
508
487
|
});
|
|
509
488
|
return {
|
|
510
489
|
cleanup: () => {
|
|
511
|
-
if (!anchorEl.isConnected)
|
|
512
|
-
return;
|
|
490
|
+
if (!anchorEl.isConnected) return;
|
|
513
491
|
for (const [prop, originalValue] of originalStyles) {
|
|
514
492
|
if (originalValue) {
|
|
515
493
|
anchorEl.style.setProperty(prop, originalValue);
|
|
@@ -543,7 +521,27 @@ var runtime = {
|
|
|
543
521
|
executors
|
|
544
522
|
};
|
|
545
523
|
|
|
546
|
-
// ../adaptives/adaptive-overlays/dist/
|
|
524
|
+
// ../adaptives/adaptive-overlays/dist/chunk-VHAA22YE.js
|
|
525
|
+
var __typeError = (msg) => {
|
|
526
|
+
throw TypeError(msg);
|
|
527
|
+
};
|
|
528
|
+
var __accessCheck = (obj, member, msg) => member.has(obj) || __typeError("Cannot " + msg);
|
|
529
|
+
var __privateGet2 = (obj, member, getter) => (__accessCheck(obj, member, "read from private field"), getter ? getter.call(obj) : member.get(obj));
|
|
530
|
+
var __privateAdd2 = (obj, member, value) => member.has(obj) ? __typeError("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
|
|
531
|
+
var __privateSet2 = (obj, member, value, setter) => (__accessCheck(obj, member, "write to private field"), setter ? setter.call(obj, value) : member.set(obj, value), value);
|
|
532
|
+
|
|
533
|
+
// ../adaptives/adaptive-overlays/dist/runtime.js
|
|
534
|
+
import {
|
|
535
|
+
arrow as arrowMiddleware,
|
|
536
|
+
autoUpdate,
|
|
537
|
+
computePosition,
|
|
538
|
+
flip,
|
|
539
|
+
hide,
|
|
540
|
+
offset,
|
|
541
|
+
shift
|
|
542
|
+
} from "@floating-ui/dom";
|
|
543
|
+
import { html, LitElement, nothing } from "lit";
|
|
544
|
+
import { styleMap } from "lit/directives/style-map.js";
|
|
547
545
|
var INTENSITY_COUNTS = { light: 50, medium: 100, heavy: 200 };
|
|
548
546
|
var DEFAULT_COLORS = [
|
|
549
547
|
"#ff0000",
|
|
@@ -587,8 +585,7 @@ var confettiEffect = {
|
|
|
587
585
|
if (p.y > 0 && p.opacity > 0) {
|
|
588
586
|
if (p.y > 500) {
|
|
589
587
|
p.opacity -= 0.02;
|
|
590
|
-
if (p.opacity < 0)
|
|
591
|
-
p.opacity = 0;
|
|
588
|
+
if (p.opacity < 0) p.opacity = 0;
|
|
592
589
|
}
|
|
593
590
|
}
|
|
594
591
|
if (p.opacity > 0.01) {
|
|
@@ -599,8 +596,7 @@ var confettiEffect = {
|
|
|
599
596
|
},
|
|
600
597
|
render(ctx, particles) {
|
|
601
598
|
for (const p of particles) {
|
|
602
|
-
if (p.opacity < 0.01)
|
|
603
|
-
continue;
|
|
599
|
+
if (p.opacity < 0.01) continue;
|
|
604
600
|
ctx.save();
|
|
605
601
|
ctx.globalAlpha = p.opacity;
|
|
606
602
|
ctx.fillStyle = p.color;
|
|
@@ -617,8 +613,6 @@ var confettiEffect = {
|
|
|
617
613
|
}
|
|
618
614
|
}
|
|
619
615
|
};
|
|
620
|
-
|
|
621
|
-
// ../adaptives/adaptive-overlays/dist/celebrations/effects/emoji-rain.js
|
|
622
616
|
var INTENSITY_COUNTS2 = { light: 20, medium: 40, heavy: 80 };
|
|
623
617
|
var DEFAULT_EMOJI = "\u{1F389}";
|
|
624
618
|
var emojiRainEffect = {
|
|
@@ -651,8 +645,7 @@ var emojiRainEffect = {
|
|
|
651
645
|
});
|
|
652
646
|
}
|
|
653
647
|
for (const p of particles) {
|
|
654
|
-
if (p.data)
|
|
655
|
-
p.data.originX = p.x;
|
|
648
|
+
if (p.data) p.data.originX = p.x;
|
|
656
649
|
}
|
|
657
650
|
return particles;
|
|
658
651
|
},
|
|
@@ -667,8 +660,7 @@ var emojiRainEffect = {
|
|
|
667
660
|
p.x = originX + Math.sin(elapsed * 3e-3 + phase) * amp * 20;
|
|
668
661
|
if (p.y > 600) {
|
|
669
662
|
p.opacity -= 0.02;
|
|
670
|
-
if (p.opacity < 0)
|
|
671
|
-
p.opacity = 0;
|
|
663
|
+
if (p.opacity < 0) p.opacity = 0;
|
|
672
664
|
}
|
|
673
665
|
if (p.opacity > 0.01) {
|
|
674
666
|
anyVisible = true;
|
|
@@ -678,8 +670,7 @@ var emojiRainEffect = {
|
|
|
678
670
|
},
|
|
679
671
|
render(ctx, particles) {
|
|
680
672
|
for (const p of particles) {
|
|
681
|
-
if (p.opacity < 0.01 || !p.emoji)
|
|
682
|
-
continue;
|
|
673
|
+
if (p.opacity < 0.01 || !p.emoji) continue;
|
|
683
674
|
ctx.save();
|
|
684
675
|
ctx.globalAlpha = p.opacity;
|
|
685
676
|
ctx.font = `${p.size}px serif`;
|
|
@@ -690,8 +681,6 @@ var emojiRainEffect = {
|
|
|
690
681
|
}
|
|
691
682
|
}
|
|
692
683
|
};
|
|
693
|
-
|
|
694
|
-
// ../adaptives/adaptive-overlays/dist/celebrations/effects/fireworks.js
|
|
695
684
|
var PARTICLES_PER_BURST = { light: 20, medium: 40, heavy: 80 };
|
|
696
685
|
var BURST_COUNTS = { light: 3, medium: 4, heavy: 5 };
|
|
697
686
|
var fireworksEffect = {
|
|
@@ -733,8 +722,7 @@ var fireworksEffect = {
|
|
|
733
722
|
p.x += p.vx;
|
|
734
723
|
p.y += p.vy;
|
|
735
724
|
p.opacity -= 8e-3;
|
|
736
|
-
if (p.opacity < 0)
|
|
737
|
-
p.opacity = 0;
|
|
725
|
+
if (p.opacity < 0) p.opacity = 0;
|
|
738
726
|
if (p.opacity > 0.01) {
|
|
739
727
|
anyVisible = true;
|
|
740
728
|
}
|
|
@@ -743,8 +731,7 @@ var fireworksEffect = {
|
|
|
743
731
|
},
|
|
744
732
|
render(ctx, particles) {
|
|
745
733
|
for (const p of particles) {
|
|
746
|
-
if (p.opacity < 0.01)
|
|
747
|
-
continue;
|
|
734
|
+
if (p.opacity < 0.01) continue;
|
|
748
735
|
ctx.save();
|
|
749
736
|
ctx.globalAlpha = p.opacity;
|
|
750
737
|
ctx.fillStyle = p.color;
|
|
@@ -757,8 +744,6 @@ var fireworksEffect = {
|
|
|
757
744
|
}
|
|
758
745
|
}
|
|
759
746
|
};
|
|
760
|
-
|
|
761
|
-
// ../adaptives/adaptive-overlays/dist/celebrations/effects/sparkles.js
|
|
762
747
|
var INTENSITY_COUNTS3 = { light: 30, medium: 60, heavy: 120 };
|
|
763
748
|
var sparklesEffect = {
|
|
764
749
|
init(width, height, config) {
|
|
@@ -796,8 +781,7 @@ var sparklesEffect = {
|
|
|
796
781
|
p.rotation += p.rotationSpeed;
|
|
797
782
|
if (p.data) {
|
|
798
783
|
p.data.baseOpacity = ((_a3 = p.data.baseOpacity) != null ? _a3 : 1) - 1e-3;
|
|
799
|
-
if (p.data.baseOpacity < 0)
|
|
800
|
-
p.data.baseOpacity = 0;
|
|
784
|
+
if (p.data.baseOpacity < 0) p.data.baseOpacity = 0;
|
|
801
785
|
}
|
|
802
786
|
const phase = (_c = (_b = p.data) == null ? void 0 : _b.phase) != null ? _c : 0;
|
|
803
787
|
const baseOpacity = (_e2 = (_d = p.data) == null ? void 0 : _d.baseOpacity) != null ? _e2 : 1;
|
|
@@ -815,8 +799,7 @@ var sparklesEffect = {
|
|
|
815
799
|
},
|
|
816
800
|
render(ctx, particles) {
|
|
817
801
|
for (const p of particles) {
|
|
818
|
-
if (p.opacity < 0.01)
|
|
819
|
-
continue;
|
|
802
|
+
if (p.opacity < 0.01) continue;
|
|
820
803
|
ctx.save();
|
|
821
804
|
ctx.globalAlpha = p.opacity;
|
|
822
805
|
ctx.fillStyle = p.color;
|
|
@@ -838,8 +821,6 @@ var sparklesEffect = {
|
|
|
838
821
|
}
|
|
839
822
|
}
|
|
840
823
|
};
|
|
841
|
-
|
|
842
|
-
// ../adaptives/adaptive-overlays/dist/celebrations/engine.js
|
|
843
824
|
var CelebrationEngine = class {
|
|
844
825
|
constructor() {
|
|
845
826
|
this.canvas = null;
|
|
@@ -904,8 +885,7 @@ var CelebrationEngine = class {
|
|
|
904
885
|
this.particles = [];
|
|
905
886
|
}
|
|
906
887
|
tick(now) {
|
|
907
|
-
if (!this.ctx || !this.canvas || !this.effect)
|
|
908
|
-
return;
|
|
888
|
+
if (!this.ctx || !this.canvas || !this.effect) return;
|
|
909
889
|
const elapsed = now - this.startTime;
|
|
910
890
|
const dt = now - this.lastFrame;
|
|
911
891
|
this.lastFrame = now;
|
|
@@ -925,8 +905,6 @@ var CelebrationEngine = class {
|
|
|
925
905
|
this.rafId = requestAnimationFrame(this.tick);
|
|
926
906
|
}
|
|
927
907
|
};
|
|
928
|
-
|
|
929
|
-
// ../adaptives/adaptive-overlays/dist/celebrations/index.js
|
|
930
908
|
var FALLBACK_COLORS = [
|
|
931
909
|
"#ff0000",
|
|
932
910
|
"#00ff00",
|
|
@@ -963,7 +941,9 @@ var executeCelebrate = async (action, context) => {
|
|
|
963
941
|
var _a3, _b, _c, _d;
|
|
964
942
|
const effect = effectRegistry.get(action.effect);
|
|
965
943
|
if (!effect) {
|
|
966
|
-
console.warn(
|
|
944
|
+
console.warn(
|
|
945
|
+
`[adaptive-overlays] Unknown celebration effect: "${action.effect}". Available: ${[...effectRegistry.keys()].join(", ")}`
|
|
946
|
+
);
|
|
967
947
|
return { cleanup: () => {
|
|
968
948
|
} };
|
|
969
949
|
}
|
|
@@ -987,18 +967,14 @@ var executeCelebrate = async (action, context) => {
|
|
|
987
967
|
}
|
|
988
968
|
};
|
|
989
969
|
};
|
|
990
|
-
|
|
991
|
-
// ../adaptives/adaptive-overlays/dist/executors/tour.js
|
|
992
970
|
var ACTIVE_TOUR_KEY = "syntro_active_tour";
|
|
993
971
|
var activeTours = /* @__PURE__ */ new Map();
|
|
994
972
|
function getTourState(tourId) {
|
|
995
973
|
try {
|
|
996
974
|
const data = localStorage.getItem(ACTIVE_TOUR_KEY);
|
|
997
|
-
if (!data)
|
|
998
|
-
return null;
|
|
975
|
+
if (!data) return null;
|
|
999
976
|
const state = JSON.parse(data);
|
|
1000
|
-
if (state.tourId !== tourId)
|
|
1001
|
-
return null;
|
|
977
|
+
if (state.tourId !== tourId) return null;
|
|
1002
978
|
return state;
|
|
1003
979
|
} catch {
|
|
1004
980
|
return null;
|
|
@@ -1020,8 +996,7 @@ function getCurrentRoute() {
|
|
|
1020
996
|
return window.location.pathname;
|
|
1021
997
|
}
|
|
1022
998
|
function stepMatchesRoute(step) {
|
|
1023
|
-
if (!step.route)
|
|
1024
|
-
return true;
|
|
999
|
+
if (!step.route) return true;
|
|
1025
1000
|
const currentRoute = getCurrentRoute();
|
|
1026
1001
|
if (step.route.includes("*")) {
|
|
1027
1002
|
const pattern = new RegExp(`^${step.route.replace(/\*/g, ".*")}$`);
|
|
@@ -1067,8 +1042,7 @@ var executeTour = async (action, context) => {
|
|
|
1067
1042
|
if (currentStepIndex === -1) {
|
|
1068
1043
|
const initialStepId = startStep || steps[0].id;
|
|
1069
1044
|
currentStepIndex = steps.findIndex((s) => s.id === initialStepId);
|
|
1070
|
-
if (currentStepIndex === -1)
|
|
1071
|
-
currentStepIndex = 0;
|
|
1045
|
+
if (currentStepIndex === -1) currentStepIndex = 0;
|
|
1072
1046
|
state.currentStepId = steps[currentStepIndex].id;
|
|
1073
1047
|
saveTourState(state);
|
|
1074
1048
|
}
|
|
@@ -1100,8 +1074,7 @@ var executeTour = async (action, context) => {
|
|
|
1100
1074
|
}
|
|
1101
1075
|
};
|
|
1102
1076
|
const advanceToStep = async (nextStepId) => {
|
|
1103
|
-
if (isDestroyed)
|
|
1104
|
-
return;
|
|
1077
|
+
if (isDestroyed) return;
|
|
1105
1078
|
await cleanupCurrentStep();
|
|
1106
1079
|
if (nextStepId === "end") {
|
|
1107
1080
|
clearTourState();
|
|
@@ -1135,8 +1108,7 @@ var executeTour = async (action, context) => {
|
|
|
1135
1108
|
await executeStep(nextStep);
|
|
1136
1109
|
};
|
|
1137
1110
|
const executeStep = async (step) => {
|
|
1138
|
-
if (isDestroyed)
|
|
1139
|
-
return;
|
|
1111
|
+
if (isDestroyed) return;
|
|
1140
1112
|
context.publishEvent("tour.step_started", {
|
|
1141
1113
|
tourId,
|
|
1142
1114
|
stepId: step.id,
|
|
@@ -1241,8 +1213,406 @@ var executeTour = async (action, context) => {
|
|
|
1241
1213
|
activeTours.set(tourId, { cleanup });
|
|
1242
1214
|
return { cleanup };
|
|
1243
1215
|
};
|
|
1244
|
-
|
|
1245
|
-
|
|
1216
|
+
var base = {
|
|
1217
|
+
white: "#ffffff",
|
|
1218
|
+
black: "#000000"
|
|
1219
|
+
};
|
|
1220
|
+
var brand = {
|
|
1221
|
+
0: "#2c0b0a",
|
|
1222
|
+
1: "#5b1715",
|
|
1223
|
+
2: "#89221f",
|
|
1224
|
+
3: "#b72e2a",
|
|
1225
|
+
4: "#d44844",
|
|
1226
|
+
5: "#dd6d69",
|
|
1227
|
+
6: "#e5918f",
|
|
1228
|
+
7: "#eeb6b4",
|
|
1229
|
+
8: "#f6dada",
|
|
1230
|
+
9: "#faebea"
|
|
1231
|
+
};
|
|
1232
|
+
var slateGrey = {
|
|
1233
|
+
0: "#07080a",
|
|
1234
|
+
1: "#0f1318",
|
|
1235
|
+
2: "#0e1114",
|
|
1236
|
+
3: "#1c222a",
|
|
1237
|
+
4: "#2b333f",
|
|
1238
|
+
5: "#394454",
|
|
1239
|
+
6: "#475569",
|
|
1240
|
+
7: "#677384",
|
|
1241
|
+
8: "#87919f",
|
|
1242
|
+
9: "#a8afba",
|
|
1243
|
+
10: "#cbd0d7",
|
|
1244
|
+
11: "#e8eaee",
|
|
1245
|
+
12: "#f6f7f9"
|
|
1246
|
+
};
|
|
1247
|
+
var green = {
|
|
1248
|
+
0: "#07230a",
|
|
1249
|
+
1: "#0e4514",
|
|
1250
|
+
2: "#16681e",
|
|
1251
|
+
3: "#1d8a28",
|
|
1252
|
+
4: "#24ad32",
|
|
1253
|
+
5: "#4fbd5a",
|
|
1254
|
+
6: "#7acd82",
|
|
1255
|
+
7: "#a5deab",
|
|
1256
|
+
8: "#d0eed3",
|
|
1257
|
+
9: "#e5f6e7"
|
|
1258
|
+
};
|
|
1259
|
+
var yellow = {
|
|
1260
|
+
0: "#301f09",
|
|
1261
|
+
1: "#5f3e12",
|
|
1262
|
+
2: "#8f5e1b",
|
|
1263
|
+
3: "#be7d24",
|
|
1264
|
+
4: "#ee9c2d",
|
|
1265
|
+
5: "#f1b057",
|
|
1266
|
+
6: "#f5c481",
|
|
1267
|
+
7: "#f8d7ab",
|
|
1268
|
+
8: "#fcebd5",
|
|
1269
|
+
9: "#fdf5ea"
|
|
1270
|
+
};
|
|
1271
|
+
var red = {
|
|
1272
|
+
0: "#330707",
|
|
1273
|
+
1: "#660f0e",
|
|
1274
|
+
2: "#991616",
|
|
1275
|
+
3: "#cc1e1d",
|
|
1276
|
+
4: "#ff2524",
|
|
1277
|
+
5: "#ff5150",
|
|
1278
|
+
6: "#ff7c7c",
|
|
1279
|
+
7: "#ffa8a7",
|
|
1280
|
+
8: "#ffd3d3",
|
|
1281
|
+
9: "#ffe9e9"
|
|
1282
|
+
};
|
|
1283
|
+
var blue = {
|
|
1284
|
+
0: "#051533",
|
|
1285
|
+
1: "#0a2a66",
|
|
1286
|
+
2: "#0f3f98",
|
|
1287
|
+
3: "#1454cb",
|
|
1288
|
+
4: "#1969fe",
|
|
1289
|
+
5: "#4787fe",
|
|
1290
|
+
6: "#75a5fe",
|
|
1291
|
+
7: "#a3c3ff",
|
|
1292
|
+
8: "#d1e1ff",
|
|
1293
|
+
9: "#e8f0ff"
|
|
1294
|
+
};
|
|
1295
|
+
var orange = {
|
|
1296
|
+
0: "#662500",
|
|
1297
|
+
1: "#993d00",
|
|
1298
|
+
2: "#cc5800",
|
|
1299
|
+
3: "#ff7700",
|
|
1300
|
+
4: "#fea85d",
|
|
1301
|
+
5: "#fec58f",
|
|
1302
|
+
6: "#ffd6ae",
|
|
1303
|
+
7: "#fee6cd",
|
|
1304
|
+
8: "#fff1e1",
|
|
1305
|
+
9: "#fff8f0"
|
|
1306
|
+
};
|
|
1307
|
+
var purple = {
|
|
1308
|
+
0: "#151229",
|
|
1309
|
+
1: "#2a2452",
|
|
1310
|
+
2: "#40357c",
|
|
1311
|
+
3: "#5547a5",
|
|
1312
|
+
4: "#6a59ce",
|
|
1313
|
+
5: "#887ad8",
|
|
1314
|
+
6: "#a69be2",
|
|
1315
|
+
7: "#c3bdeb",
|
|
1316
|
+
8: "#e1def5",
|
|
1317
|
+
9: "#f0eefa"
|
|
1318
|
+
};
|
|
1319
|
+
var pink = {
|
|
1320
|
+
0: "#37091f",
|
|
1321
|
+
1: "#69123c",
|
|
1322
|
+
2: "#9b1c58",
|
|
1323
|
+
3: "#cd2575",
|
|
1324
|
+
4: "#ff2e92",
|
|
1325
|
+
5: "#ff58a8",
|
|
1326
|
+
6: "#ff82be",
|
|
1327
|
+
7: "#ffabd3",
|
|
1328
|
+
8: "#ffd5e9",
|
|
1329
|
+
9: "#ffeaf4"
|
|
1330
|
+
};
|
|
1331
|
+
var text = {
|
|
1332
|
+
primary: slateGrey[10],
|
|
1333
|
+
secondary: slateGrey[9],
|
|
1334
|
+
tertiary: slateGrey[8]
|
|
1335
|
+
};
|
|
1336
|
+
var background = {
|
|
1337
|
+
primary: slateGrey[2],
|
|
1338
|
+
secondary: slateGrey[0]
|
|
1339
|
+
};
|
|
1340
|
+
var border = {
|
|
1341
|
+
primary: slateGrey[4],
|
|
1342
|
+
secondary: slateGrey[3]
|
|
1343
|
+
};
|
|
1344
|
+
var button = {
|
|
1345
|
+
primary: {
|
|
1346
|
+
text: base.white,
|
|
1347
|
+
icon: base.white,
|
|
1348
|
+
border: brand[3],
|
|
1349
|
+
backgroundDefault: brand[3],
|
|
1350
|
+
backgroundHover: brand[2]
|
|
1351
|
+
},
|
|
1352
|
+
neutral: {
|
|
1353
|
+
text: slateGrey[10],
|
|
1354
|
+
textHover: base.white,
|
|
1355
|
+
icon: slateGrey[10],
|
|
1356
|
+
iconHover: base.white,
|
|
1357
|
+
border: slateGrey[4],
|
|
1358
|
+
background: slateGrey[2]
|
|
1359
|
+
},
|
|
1360
|
+
link: {
|
|
1361
|
+
text: base.white,
|
|
1362
|
+
icon: base.white,
|
|
1363
|
+
hover: brand[5]
|
|
1364
|
+
},
|
|
1365
|
+
error: {
|
|
1366
|
+
text: red[5],
|
|
1367
|
+
hover: red[6]
|
|
1368
|
+
},
|
|
1369
|
+
success: {
|
|
1370
|
+
text: green[5],
|
|
1371
|
+
hover: green[6]
|
|
1372
|
+
}
|
|
1373
|
+
};
|
|
1374
|
+
var badge = {
|
|
1375
|
+
slateGrey: {
|
|
1376
|
+
content: slateGrey[10],
|
|
1377
|
+
pillOutline: slateGrey[10],
|
|
1378
|
+
borderPrimary: slateGrey[5],
|
|
1379
|
+
borderSecondary: slateGrey[5],
|
|
1380
|
+
background: slateGrey[3]
|
|
1381
|
+
},
|
|
1382
|
+
brand: {
|
|
1383
|
+
content: brand[9],
|
|
1384
|
+
pillOutline: brand[9],
|
|
1385
|
+
borderPrimary: brand[6],
|
|
1386
|
+
borderSecondary: brand[6],
|
|
1387
|
+
background: brand[0]
|
|
1388
|
+
},
|
|
1389
|
+
red: {
|
|
1390
|
+
content: red[8],
|
|
1391
|
+
pillOutline: red[4],
|
|
1392
|
+
borderPrimary: red[2],
|
|
1393
|
+
borderSecondary: red[2],
|
|
1394
|
+
background: red[0]
|
|
1395
|
+
},
|
|
1396
|
+
yellow: {
|
|
1397
|
+
content: yellow[8],
|
|
1398
|
+
pillOutline: yellow[4],
|
|
1399
|
+
borderPrimary: yellow[2],
|
|
1400
|
+
borderSecondary: yellow[2],
|
|
1401
|
+
background: yellow[0]
|
|
1402
|
+
},
|
|
1403
|
+
green: {
|
|
1404
|
+
content: green[8],
|
|
1405
|
+
pillOutline: green[4],
|
|
1406
|
+
borderPrimary: green[2],
|
|
1407
|
+
borderSecondary: green[2],
|
|
1408
|
+
background: green[0]
|
|
1409
|
+
},
|
|
1410
|
+
purple: {
|
|
1411
|
+
content: purple[8],
|
|
1412
|
+
pillOutline: purple[4],
|
|
1413
|
+
borderPrimary: purple[2],
|
|
1414
|
+
borderSecondary: purple[2],
|
|
1415
|
+
background: purple[0]
|
|
1416
|
+
},
|
|
1417
|
+
blue: {
|
|
1418
|
+
content: blue[8],
|
|
1419
|
+
pillOutline: blue[4],
|
|
1420
|
+
borderPrimary: blue[2],
|
|
1421
|
+
borderSecondary: blue[2],
|
|
1422
|
+
background: blue[0]
|
|
1423
|
+
},
|
|
1424
|
+
orange: {
|
|
1425
|
+
content: orange[8],
|
|
1426
|
+
pillOutline: orange[4],
|
|
1427
|
+
borderPrimary: orange[2],
|
|
1428
|
+
borderSecondary: orange[2],
|
|
1429
|
+
background: orange[0]
|
|
1430
|
+
},
|
|
1431
|
+
pink: {
|
|
1432
|
+
content: pink[8],
|
|
1433
|
+
pillOutline: pink[4],
|
|
1434
|
+
borderPrimary: pink[2],
|
|
1435
|
+
borderSecondary: pink[2],
|
|
1436
|
+
background: pink[0]
|
|
1437
|
+
}
|
|
1438
|
+
};
|
|
1439
|
+
var badgeBanner = {
|
|
1440
|
+
green: {
|
|
1441
|
+
content: green[8],
|
|
1442
|
+
border: green[2],
|
|
1443
|
+
background: green[0]
|
|
1444
|
+
},
|
|
1445
|
+
yellow: {
|
|
1446
|
+
content: yellow[8],
|
|
1447
|
+
border: yellow[2],
|
|
1448
|
+
background: yellow[0]
|
|
1449
|
+
},
|
|
1450
|
+
red: {
|
|
1451
|
+
content: red[8],
|
|
1452
|
+
border: red[2],
|
|
1453
|
+
background: red[0]
|
|
1454
|
+
}
|
|
1455
|
+
};
|
|
1456
|
+
var alert = {
|
|
1457
|
+
green: {
|
|
1458
|
+
content: green[1],
|
|
1459
|
+
background: green[9]
|
|
1460
|
+
},
|
|
1461
|
+
yellow: {
|
|
1462
|
+
content: yellow[1],
|
|
1463
|
+
background: yellow[9]
|
|
1464
|
+
},
|
|
1465
|
+
red: {
|
|
1466
|
+
content: red[1],
|
|
1467
|
+
background: red[9]
|
|
1468
|
+
}
|
|
1469
|
+
};
|
|
1470
|
+
var tag = {
|
|
1471
|
+
content: slateGrey[10],
|
|
1472
|
+
border: slateGrey[4],
|
|
1473
|
+
background: slateGrey[3]
|
|
1474
|
+
};
|
|
1475
|
+
var menu = {
|
|
1476
|
+
backgroundDefault: slateGrey[2],
|
|
1477
|
+
backgroundHover: slateGrey[1],
|
|
1478
|
+
selected: slateGrey[3]
|
|
1479
|
+
};
|
|
1480
|
+
var inputDropdown = {
|
|
1481
|
+
background: slateGrey[2],
|
|
1482
|
+
icon: slateGrey[10],
|
|
1483
|
+
borderDefault: slateGrey[4],
|
|
1484
|
+
borderSelected: brand[3],
|
|
1485
|
+
textLabel: slateGrey[9],
|
|
1486
|
+
textPlaceholder: slateGrey[8],
|
|
1487
|
+
textHint: slateGrey[8]
|
|
1488
|
+
};
|
|
1489
|
+
var inputField = {
|
|
1490
|
+
backgroundDefault: slateGrey[2],
|
|
1491
|
+
backgroundDisabled: slateGrey[0],
|
|
1492
|
+
textLabel: slateGrey[9],
|
|
1493
|
+
textPlaceholder: slateGrey[8],
|
|
1494
|
+
textHint: slateGrey[8],
|
|
1495
|
+
textError: red[5],
|
|
1496
|
+
iconDefault: slateGrey[9],
|
|
1497
|
+
iconPlaceholder: slateGrey[10],
|
|
1498
|
+
iconError: red[5],
|
|
1499
|
+
borderDefault: slateGrey[4],
|
|
1500
|
+
borderSelected: brand[3],
|
|
1501
|
+
borderError: red[5]
|
|
1502
|
+
};
|
|
1503
|
+
var toggle = {
|
|
1504
|
+
handleDefault: base.white,
|
|
1505
|
+
handleDisabled: slateGrey[10],
|
|
1506
|
+
off: {
|
|
1507
|
+
backgroundDefault: slateGrey[4],
|
|
1508
|
+
backgroundHover: slateGrey[5],
|
|
1509
|
+
backgroundDisabled: slateGrey[4]
|
|
1510
|
+
},
|
|
1511
|
+
on: {
|
|
1512
|
+
backgroundDefault: green[3],
|
|
1513
|
+
backgroundHover: green[2],
|
|
1514
|
+
backgroundDisabled: slateGrey[4]
|
|
1515
|
+
}
|
|
1516
|
+
};
|
|
1517
|
+
var checkbox = {
|
|
1518
|
+
off: {
|
|
1519
|
+
backgroundDefault: "#00000000",
|
|
1520
|
+
backgroundHover: slateGrey[5],
|
|
1521
|
+
backgroundDisabled: slateGrey[2],
|
|
1522
|
+
border: slateGrey[6]
|
|
1523
|
+
},
|
|
1524
|
+
on: {
|
|
1525
|
+
backgroundDefault: green[0],
|
|
1526
|
+
backgroundHover: green[1],
|
|
1527
|
+
backgroundDisabled: slateGrey[2],
|
|
1528
|
+
border: green[3]
|
|
1529
|
+
}
|
|
1530
|
+
};
|
|
1531
|
+
var avatar = {
|
|
1532
|
+
content: slateGrey[10],
|
|
1533
|
+
background: slateGrey[4]
|
|
1534
|
+
};
|
|
1535
|
+
var progressBarSlider = {
|
|
1536
|
+
background: slateGrey[4],
|
|
1537
|
+
active: green[3]
|
|
1538
|
+
};
|
|
1539
|
+
var card = {
|
|
1540
|
+
background: slateGrey[1],
|
|
1541
|
+
content: slateGrey[9],
|
|
1542
|
+
border: slateGrey[4]
|
|
1543
|
+
};
|
|
1544
|
+
var sidebar = {
|
|
1545
|
+
backgroundDefault: slateGrey[1],
|
|
1546
|
+
backgroundHover: slateGrey[3],
|
|
1547
|
+
backgroundActive: slateGrey[4],
|
|
1548
|
+
border: slateGrey[4],
|
|
1549
|
+
contentPrimary: slateGrey[10],
|
|
1550
|
+
contentSecondary: slateGrey[9],
|
|
1551
|
+
contentTertiary: slateGrey[8]
|
|
1552
|
+
};
|
|
1553
|
+
var modal = {
|
|
1554
|
+
background: slateGrey[1],
|
|
1555
|
+
content: slateGrey[9],
|
|
1556
|
+
border: slateGrey[4]
|
|
1557
|
+
};
|
|
1558
|
+
var tab = {
|
|
1559
|
+
activeBackground: slateGrey[3],
|
|
1560
|
+
activeContent: brand[5],
|
|
1561
|
+
inactiveContent: slateGrey[9],
|
|
1562
|
+
border: slateGrey[4]
|
|
1563
|
+
};
|
|
1564
|
+
var table = {
|
|
1565
|
+
header: {
|
|
1566
|
+
textDefault: slateGrey[9],
|
|
1567
|
+
textHover: slateGrey[8],
|
|
1568
|
+
backgroundDefault: slateGrey[1]
|
|
1569
|
+
},
|
|
1570
|
+
border: slateGrey[4],
|
|
1571
|
+
cell: {
|
|
1572
|
+
textPrimary: slateGrey[10],
|
|
1573
|
+
textSecondary: slateGrey[9],
|
|
1574
|
+
backgroundDefault: slateGrey[2],
|
|
1575
|
+
backgroundHover: slateGrey[1]
|
|
1576
|
+
}
|
|
1577
|
+
};
|
|
1578
|
+
var breadcrumbs = {
|
|
1579
|
+
textPrimaryDefault: slateGrey[10],
|
|
1580
|
+
textPrimaryHover: slateGrey[10],
|
|
1581
|
+
textSecondaryDefault: slateGrey[8],
|
|
1582
|
+
textSecondaryHover: slateGrey[9],
|
|
1583
|
+
iconPrimary: slateGrey[10],
|
|
1584
|
+
iconSecondary: slateGrey[8]
|
|
1585
|
+
};
|
|
1586
|
+
var loadingIndicator = {
|
|
1587
|
+
background: green[1],
|
|
1588
|
+
active: green[5]
|
|
1589
|
+
};
|
|
1590
|
+
var datePicker = {
|
|
1591
|
+
textDefault: slateGrey[10],
|
|
1592
|
+
textSelected: base.white,
|
|
1593
|
+
textDisabled: slateGrey[7],
|
|
1594
|
+
backgroundDefault: slateGrey[2],
|
|
1595
|
+
backgroundMiddle: slateGrey[3],
|
|
1596
|
+
backgroundSelected: brand[3],
|
|
1597
|
+
border: slateGrey[4]
|
|
1598
|
+
};
|
|
1599
|
+
var scroll = slateGrey[9];
|
|
1600
|
+
var fab = {
|
|
1601
|
+
/** Diameter in pixels. */
|
|
1602
|
+
size: 56,
|
|
1603
|
+
/** Inset from the panel's top-left corner in pixels. */
|
|
1604
|
+
inset: 12,
|
|
1605
|
+
/** Background color (always the brand black). */
|
|
1606
|
+
background: base.black,
|
|
1607
|
+
/** Icon / logo color. */
|
|
1608
|
+
color: base.white,
|
|
1609
|
+
/** Border — 2px brand red ring. */
|
|
1610
|
+
border: `2px solid ${brand[3]}`,
|
|
1611
|
+
/** Shadow when the panel is open (inner ring for "active" state). */
|
|
1612
|
+
shadowOpen: "0 4px 24px rgba(0,0,0,0.6), 0 0 0 2px rgba(255,255,255,0.08)",
|
|
1613
|
+
/** Shadow when the panel is closed. */
|
|
1614
|
+
shadowClosed: "0 4px 24px rgba(0,0,0,0.6)"
|
|
1615
|
+
};
|
|
1246
1616
|
var _a;
|
|
1247
1617
|
var supportsPathClip = typeof CSS !== "undefined" && ((_a = CSS.supports) == null ? void 0 : _a.call(CSS, "clip-path", "path('M0 0 H1 V1 Z')"));
|
|
1248
1618
|
function showHighlight(anchorEl, overlayRoot, opts) {
|
|
@@ -1401,8 +1771,6 @@ function showHighlight(anchorEl, overlayRoot, opts) {
|
|
|
1401
1771
|
update();
|
|
1402
1772
|
return handle;
|
|
1403
1773
|
}
|
|
1404
|
-
|
|
1405
|
-
// ../adaptives/adaptive-overlays/dist/sanitizer.js
|
|
1406
1774
|
var ALLOWED_TAGS2 = /* @__PURE__ */ new Set([
|
|
1407
1775
|
"b",
|
|
1408
1776
|
"strong",
|
|
@@ -1433,13 +1801,13 @@ var ALLOWED_TAGS2 = /* @__PURE__ */ new Set([
|
|
|
1433
1801
|
"rect",
|
|
1434
1802
|
"g"
|
|
1435
1803
|
]);
|
|
1436
|
-
function sanitizeHtml2(
|
|
1804
|
+
function sanitizeHtml2(html22) {
|
|
1437
1805
|
var _a3;
|
|
1438
1806
|
const hasNative = typeof window.Sanitizer === "function";
|
|
1439
1807
|
if (hasNative) {
|
|
1440
1808
|
try {
|
|
1441
1809
|
const s = new window.Sanitizer({});
|
|
1442
|
-
const frag = s.sanitizeToFragment(
|
|
1810
|
+
const frag = s.sanitizeToFragment(html22);
|
|
1443
1811
|
const div = document.createElement("div");
|
|
1444
1812
|
div.append(frag);
|
|
1445
1813
|
return div.innerHTML;
|
|
@@ -1447,14 +1815,14 @@ function sanitizeHtml2(html14) {
|
|
|
1447
1815
|
}
|
|
1448
1816
|
}
|
|
1449
1817
|
const tpl = document.createElement("template");
|
|
1450
|
-
tpl.innerHTML =
|
|
1818
|
+
tpl.innerHTML = html22;
|
|
1451
1819
|
const root = tpl.content;
|
|
1452
1820
|
const walker = document.createTreeWalker(root, NodeFilter.SHOW_ELEMENT, null);
|
|
1453
1821
|
const toRemove = [];
|
|
1454
1822
|
while (walker.nextNode()) {
|
|
1455
1823
|
const el = walker.currentNode;
|
|
1456
|
-
const
|
|
1457
|
-
if (!ALLOWED_TAGS2.has(
|
|
1824
|
+
const tag22 = el.tagName.toLowerCase();
|
|
1825
|
+
if (!ALLOWED_TAGS2.has(tag22)) {
|
|
1458
1826
|
toRemove.push(el);
|
|
1459
1827
|
continue;
|
|
1460
1828
|
}
|
|
@@ -1476,8 +1844,6 @@ function sanitizeHtml2(html14) {
|
|
|
1476
1844
|
}
|
|
1477
1845
|
return tpl.innerHTML;
|
|
1478
1846
|
}
|
|
1479
|
-
|
|
1480
|
-
// ../adaptives/adaptive-overlays/dist/modal.js
|
|
1481
1847
|
var V = {
|
|
1482
1848
|
bg: "var(--sc-overlay-background, #ffffff)",
|
|
1483
1849
|
title: "var(--sc-overlay-title-color, var(--sc-overlay-text-color, #111827))",
|
|
@@ -1499,12 +1865,12 @@ var executeModal = async (action, context) => {
|
|
|
1499
1865
|
transition: opacity 200ms ease-out;
|
|
1500
1866
|
`;
|
|
1501
1867
|
context.overlayRoot.appendChild(scrimEl);
|
|
1502
|
-
const
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1868
|
+
const modal22 = document.createElement("div");
|
|
1869
|
+
modal22.className = `syntro-modal syntro-modal-${size}`;
|
|
1870
|
+
modal22.setAttribute("role", "dialog");
|
|
1871
|
+
modal22.setAttribute("aria-modal", "true");
|
|
1506
1872
|
const sizeMap = { sm: "360px", md: "480px", lg: "640px" };
|
|
1507
|
-
|
|
1873
|
+
modal22.style.cssText = `
|
|
1508
1874
|
position: fixed;
|
|
1509
1875
|
top: 50%;
|
|
1510
1876
|
left: 50%;
|
|
@@ -1519,13 +1885,13 @@ var executeModal = async (action, context) => {
|
|
|
1519
1885
|
transition: opacity 200ms ease-out, transform 200ms ease-out;
|
|
1520
1886
|
padding: 24px;
|
|
1521
1887
|
`;
|
|
1522
|
-
let
|
|
1888
|
+
let html22 = "";
|
|
1523
1889
|
if (content.title) {
|
|
1524
|
-
|
|
1890
|
+
html22 += `<h2 class="syntro-modal-title" style="margin: 0 0 12px 0; font-size: 18px; font-weight: 600; color: ${V.title};">${sanitizeHtml2(content.title)}</h2>`;
|
|
1525
1891
|
}
|
|
1526
|
-
|
|
1892
|
+
html22 += `<div class="syntro-modal-body" style="color: ${V.text}; line-height: 1.5;">${sanitizeHtml2(content.body)}</div>`;
|
|
1527
1893
|
if ((dismiss == null ? void 0 : dismiss.closeButton) !== false) {
|
|
1528
|
-
|
|
1894
|
+
html22 += `
|
|
1529
1895
|
<button class="syntro-modal-close" data-syntro-action="dismiss" style="
|
|
1530
1896
|
position: absolute;
|
|
1531
1897
|
top: 16px;
|
|
@@ -1544,10 +1910,10 @@ var executeModal = async (action, context) => {
|
|
|
1544
1910
|
`;
|
|
1545
1911
|
}
|
|
1546
1912
|
if (ctaButtons && ctaButtons.length > 0) {
|
|
1547
|
-
|
|
1913
|
+
html22 += `<div class="syntro-modal-actions" style="display: flex; gap: 12px; margin-top: 24px; justify-content: flex-end;">`;
|
|
1548
1914
|
for (const btn of ctaButtons) {
|
|
1549
1915
|
const isPrimary = (_b = btn.primary) != null ? _b : false;
|
|
1550
|
-
|
|
1916
|
+
html22 += `
|
|
1551
1917
|
<button
|
|
1552
1918
|
class="syntro-modal-btn ${isPrimary ? "syntro-modal-btn-primary" : ""}"
|
|
1553
1919
|
data-syntro-action="${sanitizeHtml2(btn.actionId)}"
|
|
@@ -1565,12 +1931,12 @@ var executeModal = async (action, context) => {
|
|
|
1565
1931
|
</button>
|
|
1566
1932
|
`;
|
|
1567
1933
|
}
|
|
1568
|
-
|
|
1934
|
+
html22 += `</div>`;
|
|
1569
1935
|
}
|
|
1570
|
-
|
|
1571
|
-
context.overlayRoot.appendChild(
|
|
1936
|
+
modal22.innerHTML = html22;
|
|
1937
|
+
context.overlayRoot.appendChild(modal22);
|
|
1572
1938
|
let actionClicked = null;
|
|
1573
|
-
const actionBtns =
|
|
1939
|
+
const actionBtns = modal22.querySelectorAll("[data-syntro-action]");
|
|
1574
1940
|
const actionHandler = (e) => {
|
|
1575
1941
|
const btn = e.currentTarget;
|
|
1576
1942
|
const actionId = btn.getAttribute("data-syntro-action");
|
|
@@ -1610,14 +1976,16 @@ var executeModal = async (action, context) => {
|
|
|
1610
1976
|
handle.destroy();
|
|
1611
1977
|
}, dismiss.timeoutMs);
|
|
1612
1978
|
}
|
|
1613
|
-
const focusableEls =
|
|
1979
|
+
const focusableEls = modal22.querySelectorAll(
|
|
1980
|
+
'button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'
|
|
1981
|
+
);
|
|
1614
1982
|
if (focusableEls.length > 0) {
|
|
1615
1983
|
requestAnimationFrame(() => focusableEls[0].focus());
|
|
1616
1984
|
}
|
|
1617
1985
|
requestAnimationFrame(() => {
|
|
1618
1986
|
scrimEl.style.opacity = "1";
|
|
1619
|
-
|
|
1620
|
-
|
|
1987
|
+
modal22.style.opacity = "1";
|
|
1988
|
+
modal22.style.transform = "translate(-50%, -50%) scale(1)";
|
|
1621
1989
|
});
|
|
1622
1990
|
context.publishEvent("action.applied", {
|
|
1623
1991
|
id: context.generateId(),
|
|
@@ -1634,14 +2002,14 @@ var executeModal = async (action, context) => {
|
|
|
1634
2002
|
scrimEl.removeEventListener("click", onScrimClick);
|
|
1635
2003
|
actionBtns.forEach((btn) => btn.removeEventListener("click", actionHandler));
|
|
1636
2004
|
originalInert.forEach((el) => el.removeAttribute("inert"));
|
|
1637
|
-
|
|
2005
|
+
modal22.style.pointerEvents = "none";
|
|
1638
2006
|
scrimEl.style.pointerEvents = "none";
|
|
1639
|
-
|
|
1640
|
-
|
|
2007
|
+
modal22.style.opacity = "0";
|
|
2008
|
+
modal22.style.transform = "translate(-50%, -50%) scale(0.95)";
|
|
1641
2009
|
scrimEl.style.opacity = "0";
|
|
1642
2010
|
setTimeout(() => {
|
|
1643
2011
|
try {
|
|
1644
|
-
|
|
2012
|
+
modal22.remove();
|
|
1645
2013
|
} catch {
|
|
1646
2014
|
}
|
|
1647
2015
|
try {
|
|
@@ -1660,9 +2028,6 @@ var executeModal = async (action, context) => {
|
|
|
1660
2028
|
}
|
|
1661
2029
|
};
|
|
1662
2030
|
};
|
|
1663
|
-
|
|
1664
|
-
// ../adaptives/adaptive-overlays/dist/tooltip.js
|
|
1665
|
-
import { arrow as arrowMiddleware, autoUpdate, computePosition, flip, hide, offset, shift } from "@floating-ui/dom";
|
|
1666
2031
|
function getAnchorReference(anchorEl) {
|
|
1667
2032
|
const rect = anchorEl.getBoundingClientRect();
|
|
1668
2033
|
const viewportWidth = window.innerWidth;
|
|
@@ -1797,8 +2162,7 @@ function showTooltip(anchorEl, overlayRoot, opts) {
|
|
|
1797
2162
|
}
|
|
1798
2163
|
});
|
|
1799
2164
|
const onKey = (e) => {
|
|
1800
|
-
if (e.key === "Escape")
|
|
1801
|
-
handle.destroy();
|
|
2165
|
+
if (e.key === "Escape") handle.destroy();
|
|
1802
2166
|
};
|
|
1803
2167
|
window.addEventListener("keydown", onKey);
|
|
1804
2168
|
const originalInert = [];
|
|
@@ -1809,13 +2173,16 @@ function showTooltip(anchorEl, overlayRoot, opts) {
|
|
|
1809
2173
|
originalInert.push(el.id || el.tagName);
|
|
1810
2174
|
}
|
|
1811
2175
|
});
|
|
1812
|
-
const focusableEls = Array.from(
|
|
2176
|
+
const focusableEls = Array.from(
|
|
2177
|
+
div.querySelectorAll(
|
|
2178
|
+
'button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'
|
|
2179
|
+
)
|
|
2180
|
+
);
|
|
1813
2181
|
if (focusableEls.length > 0) {
|
|
1814
2182
|
const firstFocusable = focusableEls[0];
|
|
1815
2183
|
const lastFocusable = focusableEls[focusableEls.length - 1];
|
|
1816
2184
|
const trapFocus = (e) => {
|
|
1817
|
-
if (e.key !== "Tab")
|
|
1818
|
-
return;
|
|
2185
|
+
if (e.key !== "Tab") return;
|
|
1819
2186
|
if (e.shiftKey) {
|
|
1820
2187
|
if (document.activeElement === firstFocusable) {
|
|
1821
2188
|
lastFocusable.focus();
|
|
@@ -1858,8 +2225,7 @@ function showTooltip(anchorEl, overlayRoot, opts) {
|
|
|
1858
2225
|
anchorEl.addEventListener("focus", show);
|
|
1859
2226
|
anchorEl.addEventListener("blur", scheduleHide);
|
|
1860
2227
|
return () => {
|
|
1861
|
-
if (hideTimeout)
|
|
1862
|
-
clearTimeout(hideTimeout);
|
|
2228
|
+
if (hideTimeout) clearTimeout(hideTimeout);
|
|
1863
2229
|
anchorEl.removeEventListener("mouseenter", show);
|
|
1864
2230
|
anchorEl.removeEventListener("mouseleave", scheduleHide);
|
|
1865
2231
|
div.removeEventListener("mouseenter", show);
|
|
@@ -1869,7 +2235,7 @@ function showTooltip(anchorEl, overlayRoot, opts) {
|
|
|
1869
2235
|
};
|
|
1870
2236
|
}
|
|
1871
2237
|
if (opts.trigger === "click") {
|
|
1872
|
-
const
|
|
2238
|
+
const toggle22 = () => {
|
|
1873
2239
|
const isVisible = div.style.visibility === "visible";
|
|
1874
2240
|
if (isVisible) {
|
|
1875
2241
|
handle.destroy();
|
|
@@ -1881,8 +2247,8 @@ function showTooltip(anchorEl, overlayRoot, opts) {
|
|
|
1881
2247
|
div.style.visibility = "hidden";
|
|
1882
2248
|
div.style.opacity = "0";
|
|
1883
2249
|
div.style.transition = "opacity 200ms ease, visibility 200ms";
|
|
1884
|
-
anchorEl.addEventListener("click",
|
|
1885
|
-
return () => anchorEl.removeEventListener("click",
|
|
2250
|
+
anchorEl.addEventListener("click", toggle22);
|
|
2251
|
+
return () => anchorEl.removeEventListener("click", toggle22);
|
|
1886
2252
|
}
|
|
1887
2253
|
div.style.opacity = "0";
|
|
1888
2254
|
div.style.transition = "opacity 200ms ease";
|
|
@@ -1919,28 +2285,6 @@ function showTooltip(anchorEl, overlayRoot, opts) {
|
|
|
1919
2285
|
};
|
|
1920
2286
|
return handle;
|
|
1921
2287
|
}
|
|
1922
|
-
|
|
1923
|
-
// ../adaptives/adaptive-overlays/dist/WorkflowWidgetLit.js
|
|
1924
|
-
import { html, LitElement, nothing } from "lit";
|
|
1925
|
-
import { styleMap } from "lit/directives/style-map.js";
|
|
1926
|
-
var __classPrivateFieldSet = function(receiver, state, value, kind, f) {
|
|
1927
|
-
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
1928
|
-
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
1929
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
1930
|
-
return kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value), value;
|
|
1931
|
-
};
|
|
1932
|
-
var __classPrivateFieldGet = function(receiver, state, kind, f) {
|
|
1933
|
-
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
1934
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
1935
|
-
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
1936
|
-
};
|
|
1937
|
-
var _WorkflowTrackerLit_unsubTourStarted;
|
|
1938
|
-
var _WorkflowTrackerLit_unsubTourEvents;
|
|
1939
|
-
var _WorkflowTrackerLit_toastCleanups;
|
|
1940
|
-
var _WorkflowTrackerLit_notified;
|
|
1941
|
-
var _WorkflowTrackerLit_completedMap;
|
|
1942
|
-
var _WorkflowTrackerLit_persistInitialized;
|
|
1943
|
-
var _WorkflowTrackerLit_tourWorkflows;
|
|
1944
2288
|
var TOKEN_BLUE_4 = "#1969fe";
|
|
1945
2289
|
var TOKEN_GREEN_4 = "#24ad32";
|
|
1946
2290
|
var TOKEN_SLATE_2 = "#0e1114";
|
|
@@ -2013,19 +2357,26 @@ function extractWorkflowsFromActive(activeActions) {
|
|
|
2013
2357
|
return workflows;
|
|
2014
2358
|
}
|
|
2015
2359
|
var TAG_NAME = "syntro-workflow-tracker";
|
|
2360
|
+
var _unsubTourStarted;
|
|
2361
|
+
var _unsubTourEvents;
|
|
2362
|
+
var _toastCleanups;
|
|
2363
|
+
var _notified;
|
|
2364
|
+
var _completedMap;
|
|
2365
|
+
var _persistInitialized;
|
|
2366
|
+
var _tourWorkflows;
|
|
2016
2367
|
var WorkflowTrackerLit = class extends LitElement {
|
|
2017
2368
|
constructor() {
|
|
2018
2369
|
super(...arguments);
|
|
2019
2370
|
this.runtimeRef = null;
|
|
2020
2371
|
this._workflowEntries = [];
|
|
2021
2372
|
this._actionVersion = 0;
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
|
|
2026
|
-
|
|
2027
|
-
|
|
2028
|
-
|
|
2373
|
+
__privateAdd2(this, _unsubTourStarted, null);
|
|
2374
|
+
__privateAdd2(this, _unsubTourEvents, null);
|
|
2375
|
+
__privateAdd2(this, _toastCleanups, []);
|
|
2376
|
+
__privateAdd2(this, _notified, /* @__PURE__ */ new Set());
|
|
2377
|
+
__privateAdd2(this, _completedMap, {});
|
|
2378
|
+
__privateAdd2(this, _persistInitialized, false);
|
|
2379
|
+
__privateAdd2(this, _tourWorkflows, /* @__PURE__ */ new Map());
|
|
2029
2380
|
}
|
|
2030
2381
|
// ── Light DOM ─────────────────────────────────────────────────────────────
|
|
2031
2382
|
/**
|
|
@@ -2048,9 +2399,8 @@ var WorkflowTrackerLit = class extends LitElement {
|
|
|
2048
2399
|
var _a3, _b, _c, _d, _e2, _f, _g, _h;
|
|
2049
2400
|
const active = (_d = (_c = (_b = (_a3 = this.runtimeRef) == null ? void 0 : _a3.actions) == null ? void 0 : _b.getActive) == null ? void 0 : _c.call(_b)) != null ? _d : [];
|
|
2050
2401
|
const workflows = extractWorkflowsFromActive(active);
|
|
2051
|
-
|
|
2052
|
-
if (workflows.size === 0)
|
|
2053
|
-
return;
|
|
2402
|
+
__privateSet2(this, _tourWorkflows, workflows);
|
|
2403
|
+
if (workflows.size === 0) return;
|
|
2054
2404
|
const stateNs = this._stateNs;
|
|
2055
2405
|
const dismissed = (_e2 = stateNs == null ? void 0 : stateNs.get("dismissed")) != null ? _e2 : [];
|
|
2056
2406
|
const completed = (_f = stateNs == null ? void 0 : stateNs.get("completed")) != null ? _f : {};
|
|
@@ -2058,8 +2408,7 @@ var WorkflowTrackerLit = class extends LitElement {
|
|
|
2058
2408
|
const existingIds = new Set(this._workflowEntries.map((e) => e.tourId));
|
|
2059
2409
|
const newEntries = [];
|
|
2060
2410
|
for (const [tourId, { meta, steps }] of workflows) {
|
|
2061
|
-
if (existingIds.has(tourId))
|
|
2062
|
-
continue;
|
|
2411
|
+
if (existingIds.has(tourId)) continue;
|
|
2063
2412
|
let status = "active";
|
|
2064
2413
|
if (dismissed.includes(tourId)) {
|
|
2065
2414
|
status = "dismissed";
|
|
@@ -2081,11 +2430,11 @@ var WorkflowTrackerLit = class extends LitElement {
|
|
|
2081
2430
|
for (const [tourId, { meta }] of workflows) {
|
|
2082
2431
|
const dismissed2 = (_g = stateNs == null ? void 0 : stateNs.get("dismissed")) != null ? _g : [];
|
|
2083
2432
|
const completed2 = (_h = stateNs == null ? void 0 : stateNs.get("completed")) != null ? _h : {};
|
|
2084
|
-
if (!
|
|
2085
|
-
|
|
2086
|
-
stateNs == null ? void 0 : stateNs.set("notified", [...
|
|
2433
|
+
if (!__privateGet2(this, _notified).has(tourId) && meta.notification && !dismissed2.includes(tourId) && !completed2[tourId]) {
|
|
2434
|
+
__privateGet2(this, _notified).add(tourId);
|
|
2435
|
+
stateNs == null ? void 0 : stateNs.set("notified", [...__privateGet2(this, _notified)]);
|
|
2087
2436
|
const cleanup = showWorkflowToast(meta.notification);
|
|
2088
|
-
|
|
2437
|
+
__privateGet2(this, _toastCleanups).push(cleanup);
|
|
2089
2438
|
}
|
|
2090
2439
|
}
|
|
2091
2440
|
}
|
|
@@ -2097,10 +2446,10 @@ var WorkflowTrackerLit = class extends LitElement {
|
|
|
2097
2446
|
disconnectedCallback() {
|
|
2098
2447
|
super.disconnectedCallback();
|
|
2099
2448
|
this._teardownSubscriptions();
|
|
2100
|
-
for (const cleanup of
|
|
2449
|
+
for (const cleanup of __privateGet2(this, _toastCleanups)) {
|
|
2101
2450
|
cleanup();
|
|
2102
2451
|
}
|
|
2103
|
-
|
|
2452
|
+
__privateSet2(this, _toastCleanups, []);
|
|
2104
2453
|
}
|
|
2105
2454
|
updated(changed) {
|
|
2106
2455
|
if (changed.has("runtimeRef")) {
|
|
@@ -2114,59 +2463,61 @@ var WorkflowTrackerLit = class extends LitElement {
|
|
|
2114
2463
|
// ── Subscription management ───────────────────────────────────────────────
|
|
2115
2464
|
_initSubscriptions() {
|
|
2116
2465
|
var _a3, _b, _c, _d;
|
|
2117
|
-
if (!((_b = (_a3 = this.runtimeRef) == null ? void 0 : _a3.events) == null ? void 0 : _b.subscribe))
|
|
2118
|
-
|
|
2119
|
-
if (!__classPrivateFieldGet(this, _WorkflowTrackerLit_persistInitialized, "f") && this._stateNs) {
|
|
2466
|
+
if (!((_b = (_a3 = this.runtimeRef) == null ? void 0 : _a3.events) == null ? void 0 : _b.subscribe)) return;
|
|
2467
|
+
if (!__privateGet2(this, _persistInitialized) && this._stateNs) {
|
|
2120
2468
|
const notified = (_c = this._stateNs.get("notified")) != null ? _c : [];
|
|
2121
2469
|
for (const id of notified) {
|
|
2122
|
-
|
|
2470
|
+
__privateGet2(this, _notified).add(id);
|
|
2123
2471
|
}
|
|
2124
2472
|
const completed = (_d = this._stateNs.get("completed")) != null ? _d : {};
|
|
2125
|
-
|
|
2126
|
-
|
|
2473
|
+
__privateSet2(this, _completedMap, { ...completed });
|
|
2474
|
+
__privateSet2(this, _persistInitialized, true);
|
|
2127
2475
|
}
|
|
2128
|
-
|
|
2129
|
-
|
|
2130
|
-
|
|
2131
|
-
|
|
2132
|
-
|
|
2133
|
-
|
|
2476
|
+
__privateSet2(this, _unsubTourStarted, this.runtimeRef.events.subscribe(
|
|
2477
|
+
{ names: ["tour.started", "tour.resumed"] },
|
|
2478
|
+
() => {
|
|
2479
|
+
this._actionVersion += 1;
|
|
2480
|
+
}
|
|
2481
|
+
));
|
|
2482
|
+
__privateSet2(this, _unsubTourEvents, this.runtimeRef.events.subscribe(
|
|
2483
|
+
{ patterns: ["^tour\\."] },
|
|
2484
|
+
(event) => {
|
|
2485
|
+
this._handleTourEvent(event);
|
|
2486
|
+
}
|
|
2487
|
+
));
|
|
2134
2488
|
this._rescanWorkflows();
|
|
2135
2489
|
}
|
|
2136
2490
|
_teardownSubscriptions() {
|
|
2137
2491
|
var _a3, _b;
|
|
2138
|
-
(_a3 =
|
|
2139
|
-
|
|
2140
|
-
(_b =
|
|
2141
|
-
|
|
2492
|
+
(_a3 = __privateGet2(this, _unsubTourStarted)) == null ? void 0 : _a3.call(this);
|
|
2493
|
+
__privateSet2(this, _unsubTourStarted, null);
|
|
2494
|
+
(_b = __privateGet2(this, _unsubTourEvents)) == null ? void 0 : _b.call(this);
|
|
2495
|
+
__privateSet2(this, _unsubTourEvents, null);
|
|
2142
2496
|
}
|
|
2143
2497
|
// ── Event handler ─────────────────────────────────────────────────────────
|
|
2144
2498
|
_handleTourEvent(event) {
|
|
2145
2499
|
var _a3;
|
|
2146
2500
|
const tourId = (_a3 = event.props) == null ? void 0 : _a3.tourId;
|
|
2147
|
-
if (!tourId)
|
|
2148
|
-
|
|
2149
|
-
if (!__classPrivateFieldGet(this, _WorkflowTrackerLit_tourWorkflows, "f").has(tourId) && event.name === "tour.started") {
|
|
2501
|
+
if (!tourId) return;
|
|
2502
|
+
if (!__privateGet2(this, _tourWorkflows).has(tourId) && event.name === "tour.started") {
|
|
2150
2503
|
this._actionVersion += 1;
|
|
2151
2504
|
return;
|
|
2152
2505
|
}
|
|
2153
|
-
if (!
|
|
2154
|
-
return;
|
|
2506
|
+
if (!__privateGet2(this, _tourWorkflows).has(tourId)) return;
|
|
2155
2507
|
const stateNs = this._stateNs;
|
|
2156
2508
|
this._workflowEntries = this._workflowEntries.map((entry) => {
|
|
2157
2509
|
var _a4, _b, _c, _d, _e2;
|
|
2158
|
-
if (entry.tourId !== tourId)
|
|
2159
|
-
return entry;
|
|
2510
|
+
if (entry.tourId !== tourId) return entry;
|
|
2160
2511
|
switch (event.name) {
|
|
2161
2512
|
case "tour.started": {
|
|
2162
2513
|
const startStepId = ((_a4 = event.props) == null ? void 0 : _a4.startStepId) || ((_b = entry.steps[0]) == null ? void 0 : _b.id) || null;
|
|
2163
|
-
if (!
|
|
2164
|
-
|
|
2165
|
-
stateNs == null ? void 0 : stateNs.set("notified", [...
|
|
2166
|
-
const workflow =
|
|
2514
|
+
if (!__privateGet2(this, _notified).has(tourId)) {
|
|
2515
|
+
__privateGet2(this, _notified).add(tourId);
|
|
2516
|
+
stateNs == null ? void 0 : stateNs.set("notified", [...__privateGet2(this, _notified)]);
|
|
2517
|
+
const workflow = __privateGet2(this, _tourWorkflows).get(tourId);
|
|
2167
2518
|
if (workflow == null ? void 0 : workflow.meta.notification) {
|
|
2168
2519
|
const cleanup = showWorkflowToast(workflow.meta.notification);
|
|
2169
|
-
|
|
2520
|
+
__privateGet2(this, _toastCleanups).push(cleanup);
|
|
2170
2521
|
}
|
|
2171
2522
|
}
|
|
2172
2523
|
const activeIds = this._workflowEntries.filter((e) => e.status === "active" || e.tourId === tourId).map((e) => e.tourId);
|
|
@@ -2200,8 +2551,8 @@ var WorkflowTrackerLit = class extends LitElement {
|
|
|
2200
2551
|
}
|
|
2201
2552
|
case "tour.completed": {
|
|
2202
2553
|
const completedAt = Date.now();
|
|
2203
|
-
|
|
2204
|
-
stateNs == null ? void 0 : stateNs.set("completed", { ...
|
|
2554
|
+
__privateGet2(this, _completedMap)[tourId] = completedAt;
|
|
2555
|
+
stateNs == null ? void 0 : stateNs.set("completed", { ...__privateGet2(this, _completedMap) });
|
|
2205
2556
|
return {
|
|
2206
2557
|
...entry,
|
|
2207
2558
|
status: "completed",
|
|
@@ -2221,20 +2572,26 @@ var WorkflowTrackerLit = class extends LitElement {
|
|
|
2221
2572
|
_handleStepClick(tourId, stepId) {
|
|
2222
2573
|
var _a3, _b;
|
|
2223
2574
|
(_b = (_a3 = this.runtimeRef) == null ? void 0 : _a3.events) == null ? void 0 : _b.publish("workflow:jump_to_step", { tourId, stepId });
|
|
2224
|
-
this.dispatchEvent(
|
|
2225
|
-
|
|
2226
|
-
|
|
2227
|
-
|
|
2575
|
+
this.dispatchEvent(
|
|
2576
|
+
new CustomEvent("workflow-step-click", {
|
|
2577
|
+
bubbles: true,
|
|
2578
|
+
detail: { tourId, stepId }
|
|
2579
|
+
})
|
|
2580
|
+
);
|
|
2228
2581
|
}
|
|
2229
2582
|
_handleDismiss(tourId) {
|
|
2230
2583
|
var _a3;
|
|
2231
|
-
this._workflowEntries = this._workflowEntries.map(
|
|
2584
|
+
this._workflowEntries = this._workflowEntries.map(
|
|
2585
|
+
(entry) => entry.tourId === tourId ? { ...entry, status: "dismissed" } : entry
|
|
2586
|
+
);
|
|
2232
2587
|
const dismissedIds = this._workflowEntries.filter((e) => e.status === "dismissed").map((e) => e.tourId);
|
|
2233
2588
|
(_a3 = this._stateNs) == null ? void 0 : _a3.set("dismissed", dismissedIds);
|
|
2234
|
-
this.dispatchEvent(
|
|
2235
|
-
|
|
2236
|
-
|
|
2237
|
-
|
|
2589
|
+
this.dispatchEvent(
|
|
2590
|
+
new CustomEvent("workflow-dismissed", {
|
|
2591
|
+
bubbles: true,
|
|
2592
|
+
detail: { tourId }
|
|
2593
|
+
})
|
|
2594
|
+
);
|
|
2238
2595
|
}
|
|
2239
2596
|
// ── Render helpers ────────────────────────────────────────────────────────
|
|
2240
2597
|
_renderProgressBar(completed, total) {
|
|
@@ -2391,7 +2748,14 @@ var WorkflowTrackerLit = class extends LitElement {
|
|
|
2391
2748
|
|
|
2392
2749
|
<!-- Step list -->
|
|
2393
2750
|
<div style=${styleMap(stepsColStyles)}>
|
|
2394
|
-
${workflow.steps.map(
|
|
2751
|
+
${workflow.steps.map(
|
|
2752
|
+
(step) => this._renderStepItem(
|
|
2753
|
+
step,
|
|
2754
|
+
workflow.completedSteps.includes(step.id),
|
|
2755
|
+
workflow.currentStepId === step.id,
|
|
2756
|
+
workflow.tourId
|
|
2757
|
+
)
|
|
2758
|
+
)}
|
|
2395
2759
|
</div>
|
|
2396
2760
|
</div>
|
|
2397
2761
|
`;
|
|
@@ -2422,7 +2786,13 @@ var WorkflowTrackerLit = class extends LitElement {
|
|
|
2422
2786
|
`;
|
|
2423
2787
|
}
|
|
2424
2788
|
};
|
|
2425
|
-
|
|
2789
|
+
_unsubTourStarted = /* @__PURE__ */ new WeakMap();
|
|
2790
|
+
_unsubTourEvents = /* @__PURE__ */ new WeakMap();
|
|
2791
|
+
_toastCleanups = /* @__PURE__ */ new WeakMap();
|
|
2792
|
+
_notified = /* @__PURE__ */ new WeakMap();
|
|
2793
|
+
_completedMap = /* @__PURE__ */ new WeakMap();
|
|
2794
|
+
_persistInitialized = /* @__PURE__ */ new WeakMap();
|
|
2795
|
+
_tourWorkflows = /* @__PURE__ */ new WeakMap();
|
|
2426
2796
|
WorkflowTrackerLit.properties = {
|
|
2427
2797
|
// Public input: runtime ref injected by MountableWidget
|
|
2428
2798
|
runtimeRef: { attribute: false },
|
|
@@ -2436,12 +2806,12 @@ if (typeof window !== "undefined" && !customElements.get(TAG_NAME)) {
|
|
|
2436
2806
|
var WorkflowWidgetLitMountable = {
|
|
2437
2807
|
mount(container, config) {
|
|
2438
2808
|
var _a3;
|
|
2439
|
-
const
|
|
2809
|
+
const runtime22 = (_a3 = config == null ? void 0 : config.runtime) != null ? _a3 : null;
|
|
2440
2810
|
if (typeof window !== "undefined" && !customElements.get(TAG_NAME)) {
|
|
2441
2811
|
customElements.define(TAG_NAME, WorkflowTrackerLit);
|
|
2442
2812
|
}
|
|
2443
2813
|
const el = document.createElement(TAG_NAME);
|
|
2444
|
-
el.runtimeRef =
|
|
2814
|
+
el.runtimeRef = runtime22;
|
|
2445
2815
|
container.appendChild(el);
|
|
2446
2816
|
return () => {
|
|
2447
2817
|
el.remove();
|
|
@@ -2450,14 +2820,11 @@ var WorkflowWidgetLitMountable = {
|
|
|
2450
2820
|
update(container, config) {
|
|
2451
2821
|
var _a3;
|
|
2452
2822
|
const el = container.querySelector(TAG_NAME);
|
|
2453
|
-
if (!el)
|
|
2454
|
-
|
|
2455
|
-
|
|
2456
|
-
el.runtimeRef = runtime5;
|
|
2823
|
+
if (!el) return;
|
|
2824
|
+
const runtime22 = (_a3 = config == null ? void 0 : config.runtime) != null ? _a3 : null;
|
|
2825
|
+
el.runtimeRef = runtime22;
|
|
2457
2826
|
}
|
|
2458
2827
|
};
|
|
2459
|
-
|
|
2460
|
-
// ../adaptives/adaptive-overlays/dist/runtime.js
|
|
2461
2828
|
var executeHighlight = async (action, context) => {
|
|
2462
2829
|
var _a3, _b, _c, _d, _e2, _f, _g, _h, _i, _j, _k;
|
|
2463
2830
|
let anchorEl = context.resolveAnchor(action.anchorId);
|
|
@@ -2475,7 +2842,9 @@ var executeHighlight = async (action, context) => {
|
|
|
2475
2842
|
}
|
|
2476
2843
|
const existing = anchorEl.getAttribute("data-syntro-highlight");
|
|
2477
2844
|
if (existing) {
|
|
2478
|
-
const prev = context.overlayRoot.querySelectorAll(
|
|
2845
|
+
const prev = context.overlayRoot.querySelectorAll(
|
|
2846
|
+
".syntro-spotlight-scrim, .syntro-spotlight-ring"
|
|
2847
|
+
);
|
|
2479
2848
|
prev.forEach((el) => el.remove());
|
|
2480
2849
|
}
|
|
2481
2850
|
anchorEl.setAttribute("data-syntro-highlight", "true");
|
|
@@ -2483,8 +2852,7 @@ var executeHighlight = async (action, context) => {
|
|
|
2483
2852
|
if (!ringColor) {
|
|
2484
2853
|
try {
|
|
2485
2854
|
const primary = (_b = getComputedStyle(context.overlayRoot).getPropertyValue("--sc-color-primary")) == null ? void 0 : _b.trim();
|
|
2486
|
-
if (primary)
|
|
2487
|
-
ringColor = primary;
|
|
2855
|
+
if (primary) ringColor = primary;
|
|
2488
2856
|
} catch {
|
|
2489
2857
|
}
|
|
2490
2858
|
}
|
|
@@ -2547,8 +2915,7 @@ var executePulse = async (action, context) => {
|
|
|
2547
2915
|
} catch {
|
|
2548
2916
|
}
|
|
2549
2917
|
const existing = document.querySelector("[data-syntro-pulse-styles]");
|
|
2550
|
-
if (existing)
|
|
2551
|
-
existing.remove();
|
|
2918
|
+
if (existing) existing.remove();
|
|
2552
2919
|
const style = document.createElement("style");
|
|
2553
2920
|
style.setAttribute("data-syntro-pulse-styles", "");
|
|
2554
2921
|
const { r: pr, g: pg, b: pb } = primary;
|
|
@@ -2599,8 +2966,7 @@ var executePulse = async (action, context) => {
|
|
|
2599
2966
|
return {
|
|
2600
2967
|
cleanup: () => {
|
|
2601
2968
|
clearTimeout(timeoutId);
|
|
2602
|
-
if (!anchorEl.isConnected)
|
|
2603
|
-
return;
|
|
2969
|
+
if (!anchorEl.isConnected) return;
|
|
2604
2970
|
anchorEl.style.animation = originalAnimation;
|
|
2605
2971
|
anchorEl.removeAttribute("data-syntro-pulse");
|
|
2606
2972
|
}
|
|
@@ -2625,10 +2991,10 @@ var executeBadge = async (action, context) => {
|
|
|
2625
2991
|
}
|
|
2626
2992
|
} catch {
|
|
2627
2993
|
}
|
|
2628
|
-
const
|
|
2629
|
-
|
|
2630
|
-
|
|
2631
|
-
Object.assign(
|
|
2994
|
+
const badge22 = document.createElement("div");
|
|
2995
|
+
badge22.textContent = action.content;
|
|
2996
|
+
badge22.setAttribute("data-syntro-badge", action.anchorId.selector);
|
|
2997
|
+
Object.assign(badge22.style, {
|
|
2632
2998
|
position: "absolute",
|
|
2633
2999
|
padding: "2px 6px",
|
|
2634
3000
|
fontSize: "12px",
|
|
@@ -2646,19 +3012,19 @@ var executeBadge = async (action, context) => {
|
|
|
2646
3012
|
if (getComputedStyle(anchorEl).position === "static") {
|
|
2647
3013
|
anchorEl.style.position = "relative";
|
|
2648
3014
|
}
|
|
2649
|
-
anchorEl.appendChild(
|
|
3015
|
+
anchorEl.appendChild(badge22);
|
|
2650
3016
|
switch (position) {
|
|
2651
3017
|
case "top-left":
|
|
2652
|
-
Object.assign(
|
|
3018
|
+
Object.assign(badge22.style, { top: "-8px", left: "-8px" });
|
|
2653
3019
|
break;
|
|
2654
3020
|
case "top-right":
|
|
2655
|
-
Object.assign(
|
|
3021
|
+
Object.assign(badge22.style, { top: "-8px", right: "-8px" });
|
|
2656
3022
|
break;
|
|
2657
3023
|
case "bottom-left":
|
|
2658
|
-
Object.assign(
|
|
3024
|
+
Object.assign(badge22.style, { bottom: "-8px", left: "-8px" });
|
|
2659
3025
|
break;
|
|
2660
3026
|
case "bottom-right":
|
|
2661
|
-
Object.assign(
|
|
3027
|
+
Object.assign(badge22.style, { bottom: "-8px", right: "-8px" });
|
|
2662
3028
|
break;
|
|
2663
3029
|
}
|
|
2664
3030
|
context.publishEvent("action.applied", {
|
|
@@ -2671,18 +3037,17 @@ var executeBadge = async (action, context) => {
|
|
|
2671
3037
|
return {
|
|
2672
3038
|
cleanup: () => {
|
|
2673
3039
|
try {
|
|
2674
|
-
|
|
3040
|
+
badge22.remove();
|
|
2675
3041
|
} catch {
|
|
2676
3042
|
}
|
|
2677
|
-
if (!anchorEl.isConnected)
|
|
2678
|
-
return;
|
|
3043
|
+
if (!anchorEl.isConnected) return;
|
|
2679
3044
|
if (originalPosition !== void 0) {
|
|
2680
3045
|
anchorEl.style.position = originalPosition;
|
|
2681
3046
|
}
|
|
2682
3047
|
},
|
|
2683
3048
|
updateFn: (changes) => {
|
|
2684
3049
|
if ("content" in changes && typeof changes.content === "string") {
|
|
2685
|
-
|
|
3050
|
+
badge22.textContent = changes.content;
|
|
2686
3051
|
}
|
|
2687
3052
|
}
|
|
2688
3053
|
};
|
|
@@ -2699,16 +3064,16 @@ var executeTooltip = async (action, context) => {
|
|
|
2699
3064
|
} };
|
|
2700
3065
|
}
|
|
2701
3066
|
const { content } = action;
|
|
2702
|
-
let
|
|
3067
|
+
let html22 = "";
|
|
2703
3068
|
if (content.title) {
|
|
2704
|
-
|
|
3069
|
+
html22 += `<div class="syntro-tt-title">${sanitizeHtml2(content.title)}</div>`;
|
|
2705
3070
|
}
|
|
2706
|
-
|
|
3071
|
+
html22 += `<div class="syntro-tt-body">${sanitizeHtml2(content.body)}</div>`;
|
|
2707
3072
|
if (content.ctaButtons && content.ctaButtons.length > 0) {
|
|
2708
|
-
|
|
3073
|
+
html22 += `<div class="syntro-tt-actions">`;
|
|
2709
3074
|
for (const btn of content.ctaButtons) {
|
|
2710
3075
|
const isPrimary = (_a3 = btn.primary) != null ? _a3 : false;
|
|
2711
|
-
|
|
3076
|
+
html22 += `
|
|
2712
3077
|
<button
|
|
2713
3078
|
class="syntro-tt-btn ${isPrimary ? "syntro-tt-btn-primary" : ""}"
|
|
2714
3079
|
data-syntro-action="${sanitizeHtml2(btn.actionId)}"
|
|
@@ -2717,16 +3082,16 @@ var executeTooltip = async (action, context) => {
|
|
|
2717
3082
|
</button>
|
|
2718
3083
|
`;
|
|
2719
3084
|
}
|
|
2720
|
-
|
|
3085
|
+
html22 += `</div>`;
|
|
2721
3086
|
} else if (content.cta) {
|
|
2722
|
-
|
|
3087
|
+
html22 += `<div class="syntro-tt-actions">
|
|
2723
3088
|
<button class="syntro-tt-btn syntro-tt-btn-primary" data-syntro-action="cta">
|
|
2724
3089
|
${sanitizeHtml2(content.cta.label)}
|
|
2725
3090
|
</button>
|
|
2726
3091
|
</div>`;
|
|
2727
3092
|
}
|
|
2728
3093
|
const handle = showTooltip(anchorEl, context.overlayRoot, {
|
|
2729
|
-
html:
|
|
3094
|
+
html: html22,
|
|
2730
3095
|
placement: (_b = action.placement) != null ? _b : "top",
|
|
2731
3096
|
trigger: (_c = action.trigger) != null ? _c : "immediate",
|
|
2732
3097
|
onAction: (actionId) => {
|
|
@@ -3358,111 +3723,7 @@ var AppRegistry = class {
|
|
|
3358
3723
|
};
|
|
3359
3724
|
var appRegistry = new AppRegistry();
|
|
3360
3725
|
|
|
3361
|
-
// ../adaptives/adaptive-faq/dist/
|
|
3362
|
-
function resolveItem(store, itemId, itemQuestion) {
|
|
3363
|
-
if (itemId) {
|
|
3364
|
-
const found = store.getState().items.find((i) => i.config.id === itemId);
|
|
3365
|
-
if (found)
|
|
3366
|
-
return found;
|
|
3367
|
-
}
|
|
3368
|
-
if (itemQuestion) {
|
|
3369
|
-
const found = store.findByQuestion(itemQuestion);
|
|
3370
|
-
if (found)
|
|
3371
|
-
return found;
|
|
3372
|
-
}
|
|
3373
|
-
throw new Error("FAQ item not found");
|
|
3374
|
-
}
|
|
3375
|
-
async function executeScrollToFaq(action, context, store) {
|
|
3376
|
-
var _a3;
|
|
3377
|
-
const item = resolveItem(store, action.itemId, action.itemQuestion);
|
|
3378
|
-
const { id } = item.config;
|
|
3379
|
-
if (action.expand !== false) {
|
|
3380
|
-
store.expand(id);
|
|
3381
|
-
}
|
|
3382
|
-
const el = document.querySelector(`[data-faq-item-id="${id}"]`);
|
|
3383
|
-
if (el) {
|
|
3384
|
-
el.scrollIntoView({
|
|
3385
|
-
behavior: (_a3 = action.behavior) != null ? _a3 : "smooth"
|
|
3386
|
-
});
|
|
3387
|
-
}
|
|
3388
|
-
context.publishEvent("faq:scroll_to", { itemId: id });
|
|
3389
|
-
return {
|
|
3390
|
-
cleanup: () => {
|
|
3391
|
-
}
|
|
3392
|
-
};
|
|
3393
|
-
}
|
|
3394
|
-
async function executeToggleFaqItem(action, context, store) {
|
|
3395
|
-
var _a3;
|
|
3396
|
-
const item = resolveItem(store, action.itemId, action.itemQuestion);
|
|
3397
|
-
const { id } = item.config;
|
|
3398
|
-
const desiredState = (_a3 = action.state) != null ? _a3 : "toggle";
|
|
3399
|
-
let newState;
|
|
3400
|
-
switch (desiredState) {
|
|
3401
|
-
case "open":
|
|
3402
|
-
store.expand(id);
|
|
3403
|
-
newState = "open";
|
|
3404
|
-
break;
|
|
3405
|
-
case "closed":
|
|
3406
|
-
store.collapse(id);
|
|
3407
|
-
newState = "closed";
|
|
3408
|
-
break;
|
|
3409
|
-
default: {
|
|
3410
|
-
const wasExpanded = store.getState().expandedItems.has(id);
|
|
3411
|
-
store.toggle(id);
|
|
3412
|
-
newState = wasExpanded ? "closed" : "open";
|
|
3413
|
-
break;
|
|
3414
|
-
}
|
|
3415
|
-
}
|
|
3416
|
-
context.publishEvent("faq:toggle", { itemId: id, newState });
|
|
3417
|
-
return {
|
|
3418
|
-
cleanup: () => {
|
|
3419
|
-
}
|
|
3420
|
-
};
|
|
3421
|
-
}
|
|
3422
|
-
async function executeUpdateFaq(action, context, store) {
|
|
3423
|
-
var _a3, _b, _c;
|
|
3424
|
-
switch (action.operation) {
|
|
3425
|
-
case "add": {
|
|
3426
|
-
const items = (_a3 = action.items) != null ? _a3 : [];
|
|
3427
|
-
const position = action.position === "prepend" ? "prepend" : "append";
|
|
3428
|
-
store.addItems(items, position);
|
|
3429
|
-
break;
|
|
3430
|
-
}
|
|
3431
|
-
case "remove": {
|
|
3432
|
-
if (!action.itemId) {
|
|
3433
|
-
throw new Error("FAQ item not found");
|
|
3434
|
-
}
|
|
3435
|
-
const exists = store.getState().items.some((i) => i.config.id === action.itemId);
|
|
3436
|
-
if (!exists) {
|
|
3437
|
-
throw new Error("FAQ item not found");
|
|
3438
|
-
}
|
|
3439
|
-
store.removeItem(action.itemId);
|
|
3440
|
-
break;
|
|
3441
|
-
}
|
|
3442
|
-
case "reorder": {
|
|
3443
|
-
const order = (_b = action.order) != null ? _b : [];
|
|
3444
|
-
store.reorderItems(order);
|
|
3445
|
-
break;
|
|
3446
|
-
}
|
|
3447
|
-
case "replace": {
|
|
3448
|
-
const items = (_c = action.items) != null ? _c : [];
|
|
3449
|
-
store.replaceItems(items);
|
|
3450
|
-
break;
|
|
3451
|
-
}
|
|
3452
|
-
}
|
|
3453
|
-
context.publishEvent("faq:update", { operation: action.operation });
|
|
3454
|
-
return {
|
|
3455
|
-
cleanup: () => {
|
|
3456
|
-
}
|
|
3457
|
-
};
|
|
3458
|
-
}
|
|
3459
|
-
var executorDefinitions = [
|
|
3460
|
-
{ kind: "faq:scroll_to", executor: executeScrollToFaq },
|
|
3461
|
-
{ kind: "faq:toggle_item", executor: executeToggleFaqItem },
|
|
3462
|
-
{ kind: "faq:update", executor: executeUpdateFaq }
|
|
3463
|
-
];
|
|
3464
|
-
|
|
3465
|
-
// ../adaptives/adaptive-faq/dist/FAQWidgetLit.js
|
|
3726
|
+
// ../adaptives/adaptive-faq/dist/runtime.js
|
|
3466
3727
|
import { html as html2, LitElement as LitElement2, nothing as nothing2 } from "lit";
|
|
3467
3728
|
import { styleMap as styleMap2 } from "lit/directives/style-map.js";
|
|
3468
3729
|
import { unsafeHTML } from "lit/directives/unsafe-html.js";
|
|
@@ -4604,84 +4865,584 @@ var B = class {
|
|
|
4604
4865
|
this.defaults = { ...this.defaults, ...r };
|
|
4605
4866
|
}), this;
|
|
4606
4867
|
}
|
|
4607
|
-
setOptions(e) {
|
|
4608
|
-
return this.defaults = { ...this.defaults, ...e }, this;
|
|
4868
|
+
setOptions(e) {
|
|
4869
|
+
return this.defaults = { ...this.defaults, ...e }, this;
|
|
4870
|
+
}
|
|
4871
|
+
lexer(e, t) {
|
|
4872
|
+
return x.lex(e, t != null ? t : this.defaults);
|
|
4873
|
+
}
|
|
4874
|
+
parser(e, t) {
|
|
4875
|
+
return b.parse(e, t != null ? t : this.defaults);
|
|
4876
|
+
}
|
|
4877
|
+
parseMarkdown(e) {
|
|
4878
|
+
return (n, r) => {
|
|
4879
|
+
let i = { ...r }, s = { ...this.defaults, ...i }, a = this.onError(!!s.silent, !!s.async);
|
|
4880
|
+
if (this.defaults.async === true && i.async === false) return a(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));
|
|
4881
|
+
if (typeof n > "u" || n === null) return a(new Error("marked(): input parameter is undefined or null"));
|
|
4882
|
+
if (typeof n != "string") return a(new Error("marked(): input parameter is of type " + Object.prototype.toString.call(n) + ", string expected"));
|
|
4883
|
+
if (s.hooks && (s.hooks.options = s, s.hooks.block = e), s.async) return (async () => {
|
|
4884
|
+
let o = s.hooks ? await s.hooks.preprocess(n) : n, p = await (s.hooks ? await s.hooks.provideLexer() : e ? x.lex : x.lexInline)(o, s), c = s.hooks ? await s.hooks.processAllTokens(p) : p;
|
|
4885
|
+
s.walkTokens && await Promise.all(this.walkTokens(c, s.walkTokens));
|
|
4886
|
+
let h = await (s.hooks ? await s.hooks.provideParser() : e ? b.parse : b.parseInline)(c, s);
|
|
4887
|
+
return s.hooks ? await s.hooks.postprocess(h) : h;
|
|
4888
|
+
})().catch(a);
|
|
4889
|
+
try {
|
|
4890
|
+
s.hooks && (n = s.hooks.preprocess(n));
|
|
4891
|
+
let l = (s.hooks ? s.hooks.provideLexer() : e ? x.lex : x.lexInline)(n, s);
|
|
4892
|
+
s.hooks && (l = s.hooks.processAllTokens(l)), s.walkTokens && this.walkTokens(l, s.walkTokens);
|
|
4893
|
+
let c = (s.hooks ? s.hooks.provideParser() : e ? b.parse : b.parseInline)(l, s);
|
|
4894
|
+
return s.hooks && (c = s.hooks.postprocess(c)), c;
|
|
4895
|
+
} catch (o) {
|
|
4896
|
+
return a(o);
|
|
4897
|
+
}
|
|
4898
|
+
};
|
|
4899
|
+
}
|
|
4900
|
+
onError(e, t) {
|
|
4901
|
+
return (n) => {
|
|
4902
|
+
if (n.message += `
|
|
4903
|
+
Please report this to https://github.com/markedjs/marked.`, e) {
|
|
4904
|
+
let r = "<p>An error occurred:</p><pre>" + O(n.message + "", true) + "</pre>";
|
|
4905
|
+
return t ? Promise.resolve(r) : r;
|
|
4906
|
+
}
|
|
4907
|
+
if (t) return Promise.reject(n);
|
|
4908
|
+
throw n;
|
|
4909
|
+
};
|
|
4910
|
+
}
|
|
4911
|
+
};
|
|
4912
|
+
var L = new B();
|
|
4913
|
+
function g(u3, e) {
|
|
4914
|
+
return L.parse(u3, e);
|
|
4915
|
+
}
|
|
4916
|
+
g.options = g.setOptions = function(u3) {
|
|
4917
|
+
return L.setOptions(u3), g.defaults = L.defaults, G(g.defaults), g;
|
|
4918
|
+
};
|
|
4919
|
+
g.getDefaults = M;
|
|
4920
|
+
g.defaults = T;
|
|
4921
|
+
g.use = function(...u3) {
|
|
4922
|
+
return L.use(...u3), g.defaults = L.defaults, G(g.defaults), g;
|
|
4923
|
+
};
|
|
4924
|
+
g.walkTokens = function(u3, e) {
|
|
4925
|
+
return L.walkTokens(u3, e);
|
|
4926
|
+
};
|
|
4927
|
+
g.parseInline = L.parseInline;
|
|
4928
|
+
g.Parser = b;
|
|
4929
|
+
g.parser = b.parse;
|
|
4930
|
+
g.Renderer = y;
|
|
4931
|
+
g.TextRenderer = $;
|
|
4932
|
+
g.Lexer = x;
|
|
4933
|
+
g.lexer = x.lex;
|
|
4934
|
+
g.Tokenizer = w;
|
|
4935
|
+
g.Hooks = P;
|
|
4936
|
+
g.parse = g;
|
|
4937
|
+
var Ut = g.options;
|
|
4938
|
+
var Kt = g.setOptions;
|
|
4939
|
+
var Wt = g.use;
|
|
4940
|
+
var Xt = g.walkTokens;
|
|
4941
|
+
var Jt = g.parseInline;
|
|
4942
|
+
var Yt = b.parse;
|
|
4943
|
+
var en = x.lex;
|
|
4944
|
+
|
|
4945
|
+
// ../adaptives/adaptive-faq/dist/runtime.js
|
|
4946
|
+
function resolveItem(store, itemId, itemQuestion) {
|
|
4947
|
+
if (itemId) {
|
|
4948
|
+
const found = store.getState().items.find((i) => i.config.id === itemId);
|
|
4949
|
+
if (found) return found;
|
|
4950
|
+
}
|
|
4951
|
+
if (itemQuestion) {
|
|
4952
|
+
const found = store.findByQuestion(itemQuestion);
|
|
4953
|
+
if (found) return found;
|
|
4954
|
+
}
|
|
4955
|
+
throw new Error("FAQ item not found");
|
|
4956
|
+
}
|
|
4957
|
+
async function executeScrollToFaq(action, context, store) {
|
|
4958
|
+
var _a3;
|
|
4959
|
+
const item = resolveItem(store, action.itemId, action.itemQuestion);
|
|
4960
|
+
const { id } = item.config;
|
|
4961
|
+
if (action.expand !== false) {
|
|
4962
|
+
store.expand(id);
|
|
4963
|
+
}
|
|
4964
|
+
const el = document.querySelector(`[data-faq-item-id="${id}"]`);
|
|
4965
|
+
if (el) {
|
|
4966
|
+
el.scrollIntoView({
|
|
4967
|
+
behavior: (_a3 = action.behavior) != null ? _a3 : "smooth"
|
|
4968
|
+
});
|
|
4969
|
+
}
|
|
4970
|
+
context.publishEvent("faq:scroll_to", { itemId: id });
|
|
4971
|
+
return {
|
|
4972
|
+
cleanup: () => {
|
|
4973
|
+
}
|
|
4974
|
+
};
|
|
4975
|
+
}
|
|
4976
|
+
async function executeToggleFaqItem(action, context, store) {
|
|
4977
|
+
var _a3;
|
|
4978
|
+
const item = resolveItem(store, action.itemId, action.itemQuestion);
|
|
4979
|
+
const { id } = item.config;
|
|
4980
|
+
const desiredState = (_a3 = action.state) != null ? _a3 : "toggle";
|
|
4981
|
+
let newState;
|
|
4982
|
+
switch (desiredState) {
|
|
4983
|
+
case "open":
|
|
4984
|
+
store.expand(id);
|
|
4985
|
+
newState = "open";
|
|
4986
|
+
break;
|
|
4987
|
+
case "closed":
|
|
4988
|
+
store.collapse(id);
|
|
4989
|
+
newState = "closed";
|
|
4990
|
+
break;
|
|
4991
|
+
default: {
|
|
4992
|
+
const wasExpanded = store.getState().expandedItems.has(id);
|
|
4993
|
+
store.toggle(id);
|
|
4994
|
+
newState = wasExpanded ? "closed" : "open";
|
|
4995
|
+
break;
|
|
4996
|
+
}
|
|
4997
|
+
}
|
|
4998
|
+
context.publishEvent("faq:toggle", { itemId: id, newState });
|
|
4999
|
+
return {
|
|
5000
|
+
cleanup: () => {
|
|
5001
|
+
}
|
|
5002
|
+
};
|
|
5003
|
+
}
|
|
5004
|
+
async function executeUpdateFaq(action, context, store) {
|
|
5005
|
+
var _a3, _b, _c;
|
|
5006
|
+
switch (action.operation) {
|
|
5007
|
+
case "add": {
|
|
5008
|
+
const items = (_a3 = action.items) != null ? _a3 : [];
|
|
5009
|
+
const position = action.position === "prepend" ? "prepend" : "append";
|
|
5010
|
+
store.addItems(items, position);
|
|
5011
|
+
break;
|
|
5012
|
+
}
|
|
5013
|
+
case "remove": {
|
|
5014
|
+
if (!action.itemId) {
|
|
5015
|
+
throw new Error("FAQ item not found");
|
|
5016
|
+
}
|
|
5017
|
+
const exists = store.getState().items.some((i) => i.config.id === action.itemId);
|
|
5018
|
+
if (!exists) {
|
|
5019
|
+
throw new Error("FAQ item not found");
|
|
5020
|
+
}
|
|
5021
|
+
store.removeItem(action.itemId);
|
|
5022
|
+
break;
|
|
5023
|
+
}
|
|
5024
|
+
case "reorder": {
|
|
5025
|
+
const order = (_b = action.order) != null ? _b : [];
|
|
5026
|
+
store.reorderItems(order);
|
|
5027
|
+
break;
|
|
5028
|
+
}
|
|
5029
|
+
case "replace": {
|
|
5030
|
+
const items = (_c = action.items) != null ? _c : [];
|
|
5031
|
+
store.replaceItems(items);
|
|
5032
|
+
break;
|
|
5033
|
+
}
|
|
5034
|
+
}
|
|
5035
|
+
context.publishEvent("faq:update", { operation: action.operation });
|
|
5036
|
+
return {
|
|
5037
|
+
cleanup: () => {
|
|
5038
|
+
}
|
|
5039
|
+
};
|
|
5040
|
+
}
|
|
5041
|
+
var executorDefinitions = [
|
|
5042
|
+
{ kind: "faq:scroll_to", executor: executeScrollToFaq },
|
|
5043
|
+
{ kind: "faq:toggle_item", executor: executeToggleFaqItem },
|
|
5044
|
+
{ kind: "faq:update", executor: executeUpdateFaq }
|
|
5045
|
+
];
|
|
5046
|
+
var base2 = {
|
|
5047
|
+
white: "#ffffff",
|
|
5048
|
+
black: "#000000"
|
|
5049
|
+
};
|
|
5050
|
+
var brand2 = {
|
|
5051
|
+
0: "#2c0b0a",
|
|
5052
|
+
1: "#5b1715",
|
|
5053
|
+
2: "#89221f",
|
|
5054
|
+
3: "#b72e2a",
|
|
5055
|
+
4: "#d44844",
|
|
5056
|
+
5: "#dd6d69",
|
|
5057
|
+
6: "#e5918f",
|
|
5058
|
+
7: "#eeb6b4",
|
|
5059
|
+
8: "#f6dada",
|
|
5060
|
+
9: "#faebea"
|
|
5061
|
+
};
|
|
5062
|
+
var slateGrey2 = {
|
|
5063
|
+
0: "#07080a",
|
|
5064
|
+
1: "#0f1318",
|
|
5065
|
+
2: "#0e1114",
|
|
5066
|
+
3: "#1c222a",
|
|
5067
|
+
4: "#2b333f",
|
|
5068
|
+
5: "#394454",
|
|
5069
|
+
6: "#475569",
|
|
5070
|
+
7: "#677384",
|
|
5071
|
+
8: "#87919f",
|
|
5072
|
+
9: "#a8afba",
|
|
5073
|
+
10: "#cbd0d7",
|
|
5074
|
+
11: "#e8eaee",
|
|
5075
|
+
12: "#f6f7f9"
|
|
5076
|
+
};
|
|
5077
|
+
var green2 = {
|
|
5078
|
+
0: "#07230a",
|
|
5079
|
+
1: "#0e4514",
|
|
5080
|
+
2: "#16681e",
|
|
5081
|
+
3: "#1d8a28",
|
|
5082
|
+
4: "#24ad32",
|
|
5083
|
+
5: "#4fbd5a",
|
|
5084
|
+
6: "#7acd82",
|
|
5085
|
+
7: "#a5deab",
|
|
5086
|
+
8: "#d0eed3",
|
|
5087
|
+
9: "#e5f6e7"
|
|
5088
|
+
};
|
|
5089
|
+
var yellow2 = {
|
|
5090
|
+
0: "#301f09",
|
|
5091
|
+
1: "#5f3e12",
|
|
5092
|
+
2: "#8f5e1b",
|
|
5093
|
+
3: "#be7d24",
|
|
5094
|
+
4: "#ee9c2d",
|
|
5095
|
+
5: "#f1b057",
|
|
5096
|
+
6: "#f5c481",
|
|
5097
|
+
7: "#f8d7ab",
|
|
5098
|
+
8: "#fcebd5",
|
|
5099
|
+
9: "#fdf5ea"
|
|
5100
|
+
};
|
|
5101
|
+
var red2 = {
|
|
5102
|
+
0: "#330707",
|
|
5103
|
+
1: "#660f0e",
|
|
5104
|
+
2: "#991616",
|
|
5105
|
+
3: "#cc1e1d",
|
|
5106
|
+
4: "#ff2524",
|
|
5107
|
+
5: "#ff5150",
|
|
5108
|
+
6: "#ff7c7c",
|
|
5109
|
+
7: "#ffa8a7",
|
|
5110
|
+
8: "#ffd3d3",
|
|
5111
|
+
9: "#ffe9e9"
|
|
5112
|
+
};
|
|
5113
|
+
var blue2 = {
|
|
5114
|
+
0: "#051533",
|
|
5115
|
+
1: "#0a2a66",
|
|
5116
|
+
2: "#0f3f98",
|
|
5117
|
+
3: "#1454cb",
|
|
5118
|
+
4: "#1969fe",
|
|
5119
|
+
5: "#4787fe",
|
|
5120
|
+
6: "#75a5fe",
|
|
5121
|
+
7: "#a3c3ff",
|
|
5122
|
+
8: "#d1e1ff",
|
|
5123
|
+
9: "#e8f0ff"
|
|
5124
|
+
};
|
|
5125
|
+
var orange2 = {
|
|
5126
|
+
0: "#662500",
|
|
5127
|
+
1: "#993d00",
|
|
5128
|
+
2: "#cc5800",
|
|
5129
|
+
3: "#ff7700",
|
|
5130
|
+
4: "#fea85d",
|
|
5131
|
+
5: "#fec58f",
|
|
5132
|
+
6: "#ffd6ae",
|
|
5133
|
+
7: "#fee6cd",
|
|
5134
|
+
8: "#fff1e1",
|
|
5135
|
+
9: "#fff8f0"
|
|
5136
|
+
};
|
|
5137
|
+
var purple2 = {
|
|
5138
|
+
0: "#151229",
|
|
5139
|
+
1: "#2a2452",
|
|
5140
|
+
2: "#40357c",
|
|
5141
|
+
3: "#5547a5",
|
|
5142
|
+
4: "#6a59ce",
|
|
5143
|
+
5: "#887ad8",
|
|
5144
|
+
6: "#a69be2",
|
|
5145
|
+
7: "#c3bdeb",
|
|
5146
|
+
8: "#e1def5",
|
|
5147
|
+
9: "#f0eefa"
|
|
5148
|
+
};
|
|
5149
|
+
var pink2 = {
|
|
5150
|
+
0: "#37091f",
|
|
5151
|
+
1: "#69123c",
|
|
5152
|
+
2: "#9b1c58",
|
|
5153
|
+
3: "#cd2575",
|
|
5154
|
+
4: "#ff2e92",
|
|
5155
|
+
5: "#ff58a8",
|
|
5156
|
+
6: "#ff82be",
|
|
5157
|
+
7: "#ffabd3",
|
|
5158
|
+
8: "#ffd5e9",
|
|
5159
|
+
9: "#ffeaf4"
|
|
5160
|
+
};
|
|
5161
|
+
var text2 = {
|
|
5162
|
+
primary: slateGrey2[10],
|
|
5163
|
+
secondary: slateGrey2[9],
|
|
5164
|
+
tertiary: slateGrey2[8]
|
|
5165
|
+
};
|
|
5166
|
+
var background2 = {
|
|
5167
|
+
primary: slateGrey2[2],
|
|
5168
|
+
secondary: slateGrey2[0]
|
|
5169
|
+
};
|
|
5170
|
+
var border2 = {
|
|
5171
|
+
primary: slateGrey2[4],
|
|
5172
|
+
secondary: slateGrey2[3]
|
|
5173
|
+
};
|
|
5174
|
+
var button2 = {
|
|
5175
|
+
primary: {
|
|
5176
|
+
text: base2.white,
|
|
5177
|
+
icon: base2.white,
|
|
5178
|
+
border: brand2[3],
|
|
5179
|
+
backgroundDefault: brand2[3],
|
|
5180
|
+
backgroundHover: brand2[2]
|
|
5181
|
+
},
|
|
5182
|
+
neutral: {
|
|
5183
|
+
text: slateGrey2[10],
|
|
5184
|
+
textHover: base2.white,
|
|
5185
|
+
icon: slateGrey2[10],
|
|
5186
|
+
iconHover: base2.white,
|
|
5187
|
+
border: slateGrey2[4],
|
|
5188
|
+
background: slateGrey2[2]
|
|
5189
|
+
},
|
|
5190
|
+
link: {
|
|
5191
|
+
text: base2.white,
|
|
5192
|
+
icon: base2.white,
|
|
5193
|
+
hover: brand2[5]
|
|
5194
|
+
},
|
|
5195
|
+
error: {
|
|
5196
|
+
text: red2[5],
|
|
5197
|
+
hover: red2[6]
|
|
5198
|
+
},
|
|
5199
|
+
success: {
|
|
5200
|
+
text: green2[5],
|
|
5201
|
+
hover: green2[6]
|
|
5202
|
+
}
|
|
5203
|
+
};
|
|
5204
|
+
var badge2 = {
|
|
5205
|
+
slateGrey: {
|
|
5206
|
+
content: slateGrey2[10],
|
|
5207
|
+
pillOutline: slateGrey2[10],
|
|
5208
|
+
borderPrimary: slateGrey2[5],
|
|
5209
|
+
borderSecondary: slateGrey2[5],
|
|
5210
|
+
background: slateGrey2[3]
|
|
5211
|
+
},
|
|
5212
|
+
brand: {
|
|
5213
|
+
content: brand2[9],
|
|
5214
|
+
pillOutline: brand2[9],
|
|
5215
|
+
borderPrimary: brand2[6],
|
|
5216
|
+
borderSecondary: brand2[6],
|
|
5217
|
+
background: brand2[0]
|
|
5218
|
+
},
|
|
5219
|
+
red: {
|
|
5220
|
+
content: red2[8],
|
|
5221
|
+
pillOutline: red2[4],
|
|
5222
|
+
borderPrimary: red2[2],
|
|
5223
|
+
borderSecondary: red2[2],
|
|
5224
|
+
background: red2[0]
|
|
5225
|
+
},
|
|
5226
|
+
yellow: {
|
|
5227
|
+
content: yellow2[8],
|
|
5228
|
+
pillOutline: yellow2[4],
|
|
5229
|
+
borderPrimary: yellow2[2],
|
|
5230
|
+
borderSecondary: yellow2[2],
|
|
5231
|
+
background: yellow2[0]
|
|
5232
|
+
},
|
|
5233
|
+
green: {
|
|
5234
|
+
content: green2[8],
|
|
5235
|
+
pillOutline: green2[4],
|
|
5236
|
+
borderPrimary: green2[2],
|
|
5237
|
+
borderSecondary: green2[2],
|
|
5238
|
+
background: green2[0]
|
|
5239
|
+
},
|
|
5240
|
+
purple: {
|
|
5241
|
+
content: purple2[8],
|
|
5242
|
+
pillOutline: purple2[4],
|
|
5243
|
+
borderPrimary: purple2[2],
|
|
5244
|
+
borderSecondary: purple2[2],
|
|
5245
|
+
background: purple2[0]
|
|
5246
|
+
},
|
|
5247
|
+
blue: {
|
|
5248
|
+
content: blue2[8],
|
|
5249
|
+
pillOutline: blue2[4],
|
|
5250
|
+
borderPrimary: blue2[2],
|
|
5251
|
+
borderSecondary: blue2[2],
|
|
5252
|
+
background: blue2[0]
|
|
5253
|
+
},
|
|
5254
|
+
orange: {
|
|
5255
|
+
content: orange2[8],
|
|
5256
|
+
pillOutline: orange2[4],
|
|
5257
|
+
borderPrimary: orange2[2],
|
|
5258
|
+
borderSecondary: orange2[2],
|
|
5259
|
+
background: orange2[0]
|
|
5260
|
+
},
|
|
5261
|
+
pink: {
|
|
5262
|
+
content: pink2[8],
|
|
5263
|
+
pillOutline: pink2[4],
|
|
5264
|
+
borderPrimary: pink2[2],
|
|
5265
|
+
borderSecondary: pink2[2],
|
|
5266
|
+
background: pink2[0]
|
|
4609
5267
|
}
|
|
4610
|
-
|
|
4611
|
-
|
|
5268
|
+
};
|
|
5269
|
+
var badgeBanner2 = {
|
|
5270
|
+
green: {
|
|
5271
|
+
content: green2[8],
|
|
5272
|
+
border: green2[2],
|
|
5273
|
+
background: green2[0]
|
|
5274
|
+
},
|
|
5275
|
+
yellow: {
|
|
5276
|
+
content: yellow2[8],
|
|
5277
|
+
border: yellow2[2],
|
|
5278
|
+
background: yellow2[0]
|
|
5279
|
+
},
|
|
5280
|
+
red: {
|
|
5281
|
+
content: red2[8],
|
|
5282
|
+
border: red2[2],
|
|
5283
|
+
background: red2[0]
|
|
4612
5284
|
}
|
|
4613
|
-
|
|
4614
|
-
|
|
5285
|
+
};
|
|
5286
|
+
var alert2 = {
|
|
5287
|
+
green: {
|
|
5288
|
+
content: green2[1],
|
|
5289
|
+
background: green2[9]
|
|
5290
|
+
},
|
|
5291
|
+
yellow: {
|
|
5292
|
+
content: yellow2[1],
|
|
5293
|
+
background: yellow2[9]
|
|
5294
|
+
},
|
|
5295
|
+
red: {
|
|
5296
|
+
content: red2[1],
|
|
5297
|
+
background: red2[9]
|
|
4615
5298
|
}
|
|
4616
|
-
|
|
4617
|
-
|
|
4618
|
-
|
|
4619
|
-
|
|
4620
|
-
|
|
4621
|
-
|
|
4622
|
-
|
|
4623
|
-
|
|
4624
|
-
|
|
4625
|
-
|
|
4626
|
-
|
|
4627
|
-
|
|
4628
|
-
|
|
4629
|
-
|
|
4630
|
-
|
|
4631
|
-
|
|
4632
|
-
|
|
4633
|
-
|
|
4634
|
-
|
|
4635
|
-
|
|
4636
|
-
|
|
4637
|
-
|
|
5299
|
+
};
|
|
5300
|
+
var tag2 = {
|
|
5301
|
+
content: slateGrey2[10],
|
|
5302
|
+
border: slateGrey2[4],
|
|
5303
|
+
background: slateGrey2[3]
|
|
5304
|
+
};
|
|
5305
|
+
var menu2 = {
|
|
5306
|
+
backgroundDefault: slateGrey2[2],
|
|
5307
|
+
backgroundHover: slateGrey2[1],
|
|
5308
|
+
selected: slateGrey2[3]
|
|
5309
|
+
};
|
|
5310
|
+
var inputDropdown2 = {
|
|
5311
|
+
background: slateGrey2[2],
|
|
5312
|
+
icon: slateGrey2[10],
|
|
5313
|
+
borderDefault: slateGrey2[4],
|
|
5314
|
+
borderSelected: brand2[3],
|
|
5315
|
+
textLabel: slateGrey2[9],
|
|
5316
|
+
textPlaceholder: slateGrey2[8],
|
|
5317
|
+
textHint: slateGrey2[8]
|
|
5318
|
+
};
|
|
5319
|
+
var inputField2 = {
|
|
5320
|
+
backgroundDefault: slateGrey2[2],
|
|
5321
|
+
backgroundDisabled: slateGrey2[0],
|
|
5322
|
+
textLabel: slateGrey2[9],
|
|
5323
|
+
textPlaceholder: slateGrey2[8],
|
|
5324
|
+
textHint: slateGrey2[8],
|
|
5325
|
+
textError: red2[5],
|
|
5326
|
+
iconDefault: slateGrey2[9],
|
|
5327
|
+
iconPlaceholder: slateGrey2[10],
|
|
5328
|
+
iconError: red2[5],
|
|
5329
|
+
borderDefault: slateGrey2[4],
|
|
5330
|
+
borderSelected: brand2[3],
|
|
5331
|
+
borderError: red2[5]
|
|
5332
|
+
};
|
|
5333
|
+
var toggle2 = {
|
|
5334
|
+
handleDefault: base2.white,
|
|
5335
|
+
handleDisabled: slateGrey2[10],
|
|
5336
|
+
off: {
|
|
5337
|
+
backgroundDefault: slateGrey2[4],
|
|
5338
|
+
backgroundHover: slateGrey2[5],
|
|
5339
|
+
backgroundDisabled: slateGrey2[4]
|
|
5340
|
+
},
|
|
5341
|
+
on: {
|
|
5342
|
+
backgroundDefault: green2[3],
|
|
5343
|
+
backgroundHover: green2[2],
|
|
5344
|
+
backgroundDisabled: slateGrey2[4]
|
|
4638
5345
|
}
|
|
4639
|
-
|
|
4640
|
-
|
|
4641
|
-
|
|
4642
|
-
|
|
4643
|
-
|
|
4644
|
-
|
|
4645
|
-
|
|
4646
|
-
|
|
4647
|
-
|
|
4648
|
-
|
|
5346
|
+
};
|
|
5347
|
+
var checkbox2 = {
|
|
5348
|
+
off: {
|
|
5349
|
+
backgroundDefault: "#00000000",
|
|
5350
|
+
backgroundHover: slateGrey2[5],
|
|
5351
|
+
backgroundDisabled: slateGrey2[2],
|
|
5352
|
+
border: slateGrey2[6]
|
|
5353
|
+
},
|
|
5354
|
+
on: {
|
|
5355
|
+
backgroundDefault: green2[0],
|
|
5356
|
+
backgroundHover: green2[1],
|
|
5357
|
+
backgroundDisabled: slateGrey2[2],
|
|
5358
|
+
border: green2[3]
|
|
4649
5359
|
}
|
|
4650
5360
|
};
|
|
4651
|
-
var
|
|
4652
|
-
|
|
4653
|
-
|
|
4654
|
-
}
|
|
4655
|
-
g.options = g.setOptions = function(u3) {
|
|
4656
|
-
return L.setOptions(u3), g.defaults = L.defaults, G(g.defaults), g;
|
|
5361
|
+
var avatar2 = {
|
|
5362
|
+
content: slateGrey2[10],
|
|
5363
|
+
background: slateGrey2[4]
|
|
4657
5364
|
};
|
|
4658
|
-
|
|
4659
|
-
|
|
4660
|
-
|
|
4661
|
-
return L.use(...u3), g.defaults = L.defaults, G(g.defaults), g;
|
|
5365
|
+
var progressBarSlider2 = {
|
|
5366
|
+
background: slateGrey2[4],
|
|
5367
|
+
active: green2[3]
|
|
4662
5368
|
};
|
|
4663
|
-
|
|
4664
|
-
|
|
5369
|
+
var card2 = {
|
|
5370
|
+
background: slateGrey2[1],
|
|
5371
|
+
content: slateGrey2[9],
|
|
5372
|
+
border: slateGrey2[4]
|
|
5373
|
+
};
|
|
5374
|
+
var sidebar2 = {
|
|
5375
|
+
backgroundDefault: slateGrey2[1],
|
|
5376
|
+
backgroundHover: slateGrey2[3],
|
|
5377
|
+
backgroundActive: slateGrey2[4],
|
|
5378
|
+
border: slateGrey2[4],
|
|
5379
|
+
contentPrimary: slateGrey2[10],
|
|
5380
|
+
contentSecondary: slateGrey2[9],
|
|
5381
|
+
contentTertiary: slateGrey2[8]
|
|
5382
|
+
};
|
|
5383
|
+
var modal2 = {
|
|
5384
|
+
background: slateGrey2[1],
|
|
5385
|
+
content: slateGrey2[9],
|
|
5386
|
+
border: slateGrey2[4]
|
|
5387
|
+
};
|
|
5388
|
+
var tab2 = {
|
|
5389
|
+
activeBackground: slateGrey2[3],
|
|
5390
|
+
activeContent: brand2[5],
|
|
5391
|
+
inactiveContent: slateGrey2[9],
|
|
5392
|
+
border: slateGrey2[4]
|
|
5393
|
+
};
|
|
5394
|
+
var table2 = {
|
|
5395
|
+
header: {
|
|
5396
|
+
textDefault: slateGrey2[9],
|
|
5397
|
+
textHover: slateGrey2[8],
|
|
5398
|
+
backgroundDefault: slateGrey2[1]
|
|
5399
|
+
},
|
|
5400
|
+
border: slateGrey2[4],
|
|
5401
|
+
cell: {
|
|
5402
|
+
textPrimary: slateGrey2[10],
|
|
5403
|
+
textSecondary: slateGrey2[9],
|
|
5404
|
+
backgroundDefault: slateGrey2[2],
|
|
5405
|
+
backgroundHover: slateGrey2[1]
|
|
5406
|
+
}
|
|
5407
|
+
};
|
|
5408
|
+
var breadcrumbs2 = {
|
|
5409
|
+
textPrimaryDefault: slateGrey2[10],
|
|
5410
|
+
textPrimaryHover: slateGrey2[10],
|
|
5411
|
+
textSecondaryDefault: slateGrey2[8],
|
|
5412
|
+
textSecondaryHover: slateGrey2[9],
|
|
5413
|
+
iconPrimary: slateGrey2[10],
|
|
5414
|
+
iconSecondary: slateGrey2[8]
|
|
5415
|
+
};
|
|
5416
|
+
var loadingIndicator2 = {
|
|
5417
|
+
background: green2[1],
|
|
5418
|
+
active: green2[5]
|
|
5419
|
+
};
|
|
5420
|
+
var datePicker2 = {
|
|
5421
|
+
textDefault: slateGrey2[10],
|
|
5422
|
+
textSelected: base2.white,
|
|
5423
|
+
textDisabled: slateGrey2[7],
|
|
5424
|
+
backgroundDefault: slateGrey2[2],
|
|
5425
|
+
backgroundMiddle: slateGrey2[3],
|
|
5426
|
+
backgroundSelected: brand2[3],
|
|
5427
|
+
border: slateGrey2[4]
|
|
5428
|
+
};
|
|
5429
|
+
var scroll2 = slateGrey2[9];
|
|
5430
|
+
var fab2 = {
|
|
5431
|
+
/** Diameter in pixels. */
|
|
5432
|
+
size: 56,
|
|
5433
|
+
/** Inset from the panel's top-left corner in pixels. */
|
|
5434
|
+
inset: 12,
|
|
5435
|
+
/** Background color (always the brand black). */
|
|
5436
|
+
background: base2.black,
|
|
5437
|
+
/** Icon / logo color. */
|
|
5438
|
+
color: base2.white,
|
|
5439
|
+
/** Border — 2px brand red ring. */
|
|
5440
|
+
border: `2px solid ${brand2[3]}`,
|
|
5441
|
+
/** Shadow when the panel is open (inner ring for "active" state). */
|
|
5442
|
+
shadowOpen: "0 4px 24px rgba(0,0,0,0.6), 0 0 0 2px rgba(255,255,255,0.08)",
|
|
5443
|
+
/** Shadow when the panel is closed. */
|
|
5444
|
+
shadowClosed: "0 4px 24px rgba(0,0,0,0.6)"
|
|
4665
5445
|
};
|
|
4666
|
-
g.parseInline = L.parseInline;
|
|
4667
|
-
g.Parser = b;
|
|
4668
|
-
g.parser = b.parse;
|
|
4669
|
-
g.Renderer = y;
|
|
4670
|
-
g.TextRenderer = $;
|
|
4671
|
-
g.Lexer = x;
|
|
4672
|
-
g.lexer = x.lex;
|
|
4673
|
-
g.Tokenizer = w;
|
|
4674
|
-
g.Hooks = P;
|
|
4675
|
-
g.parse = g;
|
|
4676
|
-
var Ut = g.options;
|
|
4677
|
-
var Kt = g.setOptions;
|
|
4678
|
-
var Wt = g.use;
|
|
4679
|
-
var Xt = g.walkTokens;
|
|
4680
|
-
var Jt = g.parseInline;
|
|
4681
|
-
var Yt = b.parse;
|
|
4682
|
-
var en = x.lex;
|
|
4683
|
-
|
|
4684
|
-
// ../adaptives/adaptive-faq/dist/faq-styles.js
|
|
4685
5446
|
var baseStyles = {
|
|
4686
5447
|
container: {
|
|
4687
5448
|
fontFamily: "var(--sc-font-family, system-ui, -apple-system, sans-serif)",
|
|
@@ -4794,7 +5555,7 @@ var themeStyles = {
|
|
|
4794
5555
|
color: "inherit"
|
|
4795
5556
|
},
|
|
4796
5557
|
searchInput: {
|
|
4797
|
-
border: `1px solid ${
|
|
5558
|
+
border: `1px solid ${slateGrey2[11]}`
|
|
4798
5559
|
},
|
|
4799
5560
|
item: {
|
|
4800
5561
|
backgroundColor: "var(--sc-content-background)",
|
|
@@ -4817,17 +5578,17 @@ var themeStyles = {
|
|
|
4817
5578
|
color: "var(--sc-content-text-secondary-color)"
|
|
4818
5579
|
},
|
|
4819
5580
|
category: {
|
|
4820
|
-
backgroundColor:
|
|
4821
|
-
color:
|
|
5581
|
+
backgroundColor: purple2[8],
|
|
5582
|
+
color: purple2[2]
|
|
4822
5583
|
},
|
|
4823
5584
|
categoryHeader: {
|
|
4824
|
-
color:
|
|
5585
|
+
color: slateGrey2[7]
|
|
4825
5586
|
},
|
|
4826
5587
|
emptyState: {
|
|
4827
|
-
color:
|
|
5588
|
+
color: slateGrey2[8]
|
|
4828
5589
|
},
|
|
4829
5590
|
feedbackPrompt: {
|
|
4830
|
-
color:
|
|
5591
|
+
color: slateGrey2[7]
|
|
4831
5592
|
}
|
|
4832
5593
|
},
|
|
4833
5594
|
dark: {
|
|
@@ -4836,7 +5597,7 @@ var themeStyles = {
|
|
|
4836
5597
|
color: "inherit"
|
|
4837
5598
|
},
|
|
4838
5599
|
searchInput: {
|
|
4839
|
-
border: `1px solid ${
|
|
5600
|
+
border: `1px solid ${slateGrey2[5]}`
|
|
4840
5601
|
},
|
|
4841
5602
|
item: {
|
|
4842
5603
|
backgroundColor: "var(--sc-content-background)",
|
|
@@ -4859,31 +5620,27 @@ var themeStyles = {
|
|
|
4859
5620
|
color: "var(--sc-content-text-secondary-color)"
|
|
4860
5621
|
},
|
|
4861
5622
|
category: {
|
|
4862
|
-
backgroundColor:
|
|
4863
|
-
color:
|
|
5623
|
+
backgroundColor: purple2[0],
|
|
5624
|
+
color: purple2[6]
|
|
4864
5625
|
},
|
|
4865
5626
|
categoryHeader: {
|
|
4866
|
-
color:
|
|
5627
|
+
color: slateGrey2[8]
|
|
4867
5628
|
},
|
|
4868
5629
|
emptyState: {
|
|
4869
|
-
color:
|
|
5630
|
+
color: slateGrey2[7]
|
|
4870
5631
|
},
|
|
4871
5632
|
feedbackPrompt: {
|
|
4872
|
-
color:
|
|
5633
|
+
color: slateGrey2[8]
|
|
4873
5634
|
}
|
|
4874
5635
|
}
|
|
4875
5636
|
};
|
|
4876
|
-
|
|
4877
|
-
// ../adaptives/adaptive-faq/dist/FAQWidgetLit.js
|
|
4878
5637
|
function sm(styles) {
|
|
4879
5638
|
return styles;
|
|
4880
5639
|
}
|
|
4881
5640
|
var marked = new B({ async: false, gfm: true, breaks: true });
|
|
4882
5641
|
function getAnswerText(answer) {
|
|
4883
|
-
if (typeof answer === "string")
|
|
4884
|
-
|
|
4885
|
-
if (answer.type === "rich")
|
|
4886
|
-
return answer.html;
|
|
5642
|
+
if (typeof answer === "string") return answer;
|
|
5643
|
+
if (answer.type === "rich") return answer.html;
|
|
4887
5644
|
return answer.content;
|
|
4888
5645
|
}
|
|
4889
5646
|
function renderAnswerHtml(answer) {
|
|
@@ -4896,10 +5653,8 @@ function renderAnswerHtml(answer) {
|
|
|
4896
5653
|
return marked.parse(answer.content);
|
|
4897
5654
|
}
|
|
4898
5655
|
function resolveFeedbackConfig(feedback) {
|
|
4899
|
-
if (!feedback)
|
|
4900
|
-
|
|
4901
|
-
if (feedback === true)
|
|
4902
|
-
return { style: "thumbs" };
|
|
5656
|
+
if (!feedback) return null;
|
|
5657
|
+
if (feedback === true) return { style: "thumbs" };
|
|
4903
5658
|
return feedback;
|
|
4904
5659
|
}
|
|
4905
5660
|
function getFeedbackPrompt(feedbackConfig) {
|
|
@@ -4908,8 +5663,7 @@ function getFeedbackPrompt(feedbackConfig) {
|
|
|
4908
5663
|
}
|
|
4909
5664
|
function resolveTheme(theme) {
|
|
4910
5665
|
var _a3;
|
|
4911
|
-
if (theme && theme !== "auto")
|
|
4912
|
-
return theme;
|
|
5666
|
+
if (theme && theme !== "auto") return theme;
|
|
4913
5667
|
if (typeof window !== "undefined") {
|
|
4914
5668
|
return ((_a3 = window.matchMedia) == null ? void 0 : _a3.call(window, "(prefers-color-scheme: dark)").matches) ? "dark" : "light";
|
|
4915
5669
|
}
|
|
@@ -4971,8 +5725,7 @@ var FAQAccordionElement = class extends LitElement2 {
|
|
|
4971
5725
|
// -----------------------------------------------------------------------
|
|
4972
5726
|
_subscribeAll() {
|
|
4973
5727
|
var _a3, _b;
|
|
4974
|
-
if (!this.runtime)
|
|
4975
|
-
return;
|
|
5728
|
+
if (!this.runtime) return;
|
|
4976
5729
|
this._unsubContext = this.runtime.context.subscribe(() => {
|
|
4977
5730
|
this.requestUpdate();
|
|
4978
5731
|
});
|
|
@@ -4988,7 +5741,10 @@ var FAQAccordionElement = class extends LitElement2 {
|
|
|
4988
5741
|
}
|
|
4989
5742
|
if (this.runtime.events.subscribe) {
|
|
4990
5743
|
if (this.runtime.events.getRecent) {
|
|
4991
|
-
const recentEvents = this.runtime.events.getRecent(
|
|
5744
|
+
const recentEvents = this.runtime.events.getRecent(
|
|
5745
|
+
{ patterns: ["^action\\.tooltip_cta_clicked$", "^action\\.modal_cta_clicked$"] },
|
|
5746
|
+
10
|
|
5747
|
+
);
|
|
4992
5748
|
const pendingEvent = recentEvents.filter((e) => {
|
|
4993
5749
|
var _a4;
|
|
4994
5750
|
const actionId = (_a4 = e.props) == null ? void 0 : _a4.actionId;
|
|
@@ -4999,47 +5755,43 @@ var FAQAccordionElement = class extends LitElement2 {
|
|
|
4999
5755
|
this._expandedIds = /* @__PURE__ */ new Set([questionId]);
|
|
5000
5756
|
requestAnimationFrame(() => {
|
|
5001
5757
|
const el = document.querySelector(`[data-faq-item-id="${questionId}"]`);
|
|
5002
|
-
if (el)
|
|
5003
|
-
el.scrollIntoView({ behavior: "smooth", block: "center" });
|
|
5758
|
+
if (el) el.scrollIntoView({ behavior: "smooth", block: "center" });
|
|
5004
5759
|
});
|
|
5005
5760
|
}
|
|
5006
5761
|
}
|
|
5007
|
-
this._unsubCta = this.runtime.events.subscribe(
|
|
5008
|
-
|
|
5009
|
-
|
|
5010
|
-
|
|
5011
|
-
|
|
5012
|
-
|
|
5013
|
-
|
|
5014
|
-
|
|
5015
|
-
|
|
5016
|
-
|
|
5017
|
-
el.scrollIntoView({ behavior: "smooth", block: "center" });
|
|
5018
|
-
|
|
5019
|
-
|
|
5020
|
-
|
|
5762
|
+
this._unsubCta = this.runtime.events.subscribe(
|
|
5763
|
+
{ patterns: ["^action\\.tooltip_cta_clicked$", "^action\\.modal_cta_clicked$"] },
|
|
5764
|
+
(event) => {
|
|
5765
|
+
var _a4, _b2;
|
|
5766
|
+
const actionId = (_a4 = event.props) == null ? void 0 : _a4.actionId;
|
|
5767
|
+
if (typeof actionId !== "string" || !actionId.startsWith("faq:open:")) return;
|
|
5768
|
+
const questionId = actionId.replace("faq:open:", "");
|
|
5769
|
+
this._expandedIds = /* @__PURE__ */ new Set([questionId]);
|
|
5770
|
+
requestAnimationFrame(() => {
|
|
5771
|
+
const el = document.querySelector(`[data-faq-item-id="${questionId}"]`);
|
|
5772
|
+
if (el) el.scrollIntoView({ behavior: "smooth", block: "center" });
|
|
5773
|
+
});
|
|
5774
|
+
(_b2 = this.runtime) == null ? void 0 : _b2.events.publish("canvas.requestOpen");
|
|
5775
|
+
}
|
|
5776
|
+
);
|
|
5021
5777
|
}
|
|
5022
5778
|
if (this.runtime.events.subscribe) {
|
|
5023
5779
|
const handleDeepLink = (event) => {
|
|
5024
5780
|
var _a4, _b2;
|
|
5025
5781
|
const tileId = (_a4 = event.props) == null ? void 0 : _a4.tileId;
|
|
5026
5782
|
const itemId = (_b2 = event.props) == null ? void 0 : _b2.itemId;
|
|
5027
|
-
if (tileId !== this.instanceId)
|
|
5028
|
-
|
|
5029
|
-
if (!itemId)
|
|
5030
|
-
return;
|
|
5783
|
+
if (tileId !== this.instanceId) return;
|
|
5784
|
+
if (!itemId) return;
|
|
5031
5785
|
this._expandedIds = /* @__PURE__ */ new Set([itemId]);
|
|
5032
5786
|
this._highlightId = itemId;
|
|
5033
|
-
if (this._highlightTimer !== null)
|
|
5034
|
-
clearTimeout(this._highlightTimer);
|
|
5787
|
+
if (this._highlightTimer !== null) clearTimeout(this._highlightTimer);
|
|
5035
5788
|
this._highlightTimer = setTimeout(() => {
|
|
5036
5789
|
this._highlightId = null;
|
|
5037
5790
|
this._highlightTimer = null;
|
|
5038
5791
|
}, 1500);
|
|
5039
5792
|
requestAnimationFrame(() => {
|
|
5040
5793
|
const el = document.querySelector(`[data-faq-item-id="${itemId}"]`);
|
|
5041
|
-
if (el)
|
|
5042
|
-
el.scrollIntoView({ behavior: "smooth", block: "center" });
|
|
5794
|
+
if (el) el.scrollIntoView({ behavior: "smooth", block: "center" });
|
|
5043
5795
|
});
|
|
5044
5796
|
};
|
|
5045
5797
|
if (this.runtime.events.getRecent) {
|
|
@@ -5052,7 +5804,10 @@ var FAQAccordionElement = class extends LitElement2 {
|
|
|
5052
5804
|
handleDeepLink(pending);
|
|
5053
5805
|
}
|
|
5054
5806
|
}
|
|
5055
|
-
this._unsubDeepLink = this.runtime.events.subscribe(
|
|
5807
|
+
this._unsubDeepLink = this.runtime.events.subscribe(
|
|
5808
|
+
{ names: ["notification.deep_link"] },
|
|
5809
|
+
handleDeepLink
|
|
5810
|
+
);
|
|
5056
5811
|
}
|
|
5057
5812
|
}
|
|
5058
5813
|
_unsubscribeAll() {
|
|
@@ -5107,10 +5862,8 @@ var FAQAccordionElement = class extends LitElement2 {
|
|
|
5107
5862
|
_visibleQuestions() {
|
|
5108
5863
|
var _a3;
|
|
5109
5864
|
return ((_a3 = this.faqConfig.actions) != null ? _a3 : []).filter((q2) => {
|
|
5110
|
-
if (!q2.triggerWhen)
|
|
5111
|
-
|
|
5112
|
-
if (!this.runtime)
|
|
5113
|
-
return true;
|
|
5865
|
+
if (!q2.triggerWhen) return true;
|
|
5866
|
+
if (!this.runtime) return true;
|
|
5114
5867
|
const result = this.runtime.evaluateSync(q2.triggerWhen);
|
|
5115
5868
|
return result.value;
|
|
5116
5869
|
});
|
|
@@ -5126,19 +5879,19 @@ var FAQAccordionElement = class extends LitElement2 {
|
|
|
5126
5879
|
}
|
|
5127
5880
|
_filteredQuestions(ordered) {
|
|
5128
5881
|
const q2 = this._searchQuery.trim().toLowerCase();
|
|
5129
|
-
if (!this.faqConfig.searchable || !q2)
|
|
5130
|
-
|
|
5131
|
-
|
|
5132
|
-
|
|
5133
|
-
|
|
5134
|
-
|
|
5882
|
+
if (!this.faqConfig.searchable || !q2) return ordered;
|
|
5883
|
+
return ordered.filter(
|
|
5884
|
+
(item) => {
|
|
5885
|
+
var _a3;
|
|
5886
|
+
return item.config.question.toLowerCase().includes(q2) || getAnswerText(item.config.answer).toLowerCase().includes(q2) || ((_a3 = item.config.category) == null ? void 0 : _a3.toLowerCase().includes(q2));
|
|
5887
|
+
}
|
|
5888
|
+
);
|
|
5135
5889
|
}
|
|
5136
5890
|
_categoryGroups(filtered) {
|
|
5137
5891
|
const groups = /* @__PURE__ */ new Map();
|
|
5138
5892
|
for (const item of filtered) {
|
|
5139
5893
|
const cat = item.config.category;
|
|
5140
|
-
if (!groups.has(cat))
|
|
5141
|
-
groups.set(cat, []);
|
|
5894
|
+
if (!groups.has(cat)) groups.set(cat, []);
|
|
5142
5895
|
groups.get(cat).push(item);
|
|
5143
5896
|
}
|
|
5144
5897
|
return groups;
|
|
@@ -5158,19 +5911,23 @@ var FAQAccordionElement = class extends LitElement2 {
|
|
|
5158
5911
|
<span>${getFeedbackPrompt(feedbackConfig)}</span>
|
|
5159
5912
|
<button
|
|
5160
5913
|
type="button"
|
|
5161
|
-
style=${styleMap2(
|
|
5162
|
-
|
|
5163
|
-
|
|
5164
|
-
|
|
5914
|
+
style=${styleMap2(
|
|
5915
|
+
sm({
|
|
5916
|
+
...baseStyles.feedbackButton,
|
|
5917
|
+
...feedbackValue === "up" ? baseStyles.feedbackButtonSelected : {}
|
|
5918
|
+
})
|
|
5919
|
+
)}
|
|
5165
5920
|
aria-label="Thumbs up"
|
|
5166
5921
|
@click=${() => this._handleFeedback(item.config.id, item.config.question, "up")}
|
|
5167
5922
|
>\uD83D\uDC4D</button>
|
|
5168
5923
|
<button
|
|
5169
5924
|
type="button"
|
|
5170
|
-
style=${styleMap2(
|
|
5171
|
-
|
|
5172
|
-
|
|
5173
|
-
|
|
5925
|
+
style=${styleMap2(
|
|
5926
|
+
sm({
|
|
5927
|
+
...baseStyles.feedbackButton,
|
|
5928
|
+
...feedbackValue === "down" ? baseStyles.feedbackButtonSelected : {}
|
|
5929
|
+
})
|
|
5930
|
+
)}
|
|
5174
5931
|
aria-label="Thumbs down"
|
|
5175
5932
|
@click=${() => this._handleFeedback(item.config.id, item.config.question, "down")}
|
|
5176
5933
|
>\uD83D\uDC4E</button>
|
|
@@ -5187,7 +5944,7 @@ var FAQAccordionElement = class extends LitElement2 {
|
|
|
5187
5944
|
...colors.item,
|
|
5188
5945
|
...isExpanded ? colors.itemExpanded : {},
|
|
5189
5946
|
...isHighlighted ? {
|
|
5190
|
-
boxShadow: `0 0 0 2px ${
|
|
5947
|
+
boxShadow: `0 0 0 2px ${purple2[4]}, 0 0 12px rgba(106, 89, 206, 0.4)`,
|
|
5191
5948
|
transition: "box-shadow 0.3s ease"
|
|
5192
5949
|
} : {},
|
|
5193
5950
|
...!isLast ? { borderBottom: "var(--sc-content-item-divider, none)" } : {}
|
|
@@ -5233,13 +5990,20 @@ var FAQAccordionElement = class extends LitElement2 {
|
|
|
5233
5990
|
aria-hidden=${!isExpanded}
|
|
5234
5991
|
>
|
|
5235
5992
|
${this._renderAnswer(item.config.answer)}
|
|
5236
|
-
${isExpanded && feedbackConfig ? this._renderFeedback(
|
|
5993
|
+
${isExpanded && feedbackConfig ? this._renderFeedback(
|
|
5994
|
+
item,
|
|
5995
|
+
feedbackConfig,
|
|
5996
|
+
this._feedbackState.get(item.config.id),
|
|
5997
|
+
theme
|
|
5998
|
+
) : nothing2}
|
|
5237
5999
|
</div>
|
|
5238
6000
|
</div>
|
|
5239
6001
|
`;
|
|
5240
6002
|
}
|
|
5241
6003
|
_renderItems(items, theme, feedbackConfig) {
|
|
5242
|
-
return items.map(
|
|
6004
|
+
return items.map(
|
|
6005
|
+
(item, index) => this._renderItem(item, index === items.length - 1, theme, feedbackConfig)
|
|
6006
|
+
);
|
|
5243
6007
|
}
|
|
5244
6008
|
// -----------------------------------------------------------------------
|
|
5245
6009
|
// Render
|
|
@@ -5310,7 +6074,8 @@ var FAQAccordionElement = class extends LitElement2 {
|
|
|
5310
6074
|
` : nothing2}
|
|
5311
6075
|
|
|
5312
6076
|
<div style=${styleMap2(sm(baseStyles.accordion))}>
|
|
5313
|
-
${groups ? Array.from(groups.entries()).map(
|
|
6077
|
+
${groups ? Array.from(groups.entries()).map(
|
|
6078
|
+
([category, items]) => html2`
|
|
5314
6079
|
${category ? html2`
|
|
5315
6080
|
<div
|
|
5316
6081
|
style=${styleMap2(sm(categoryHeaderStyle))}
|
|
@@ -5320,7 +6085,8 @@ var FAQAccordionElement = class extends LitElement2 {
|
|
|
5320
6085
|
</div>
|
|
5321
6086
|
` : nothing2}
|
|
5322
6087
|
${this._renderItems(items, theme, feedbackConfig)}
|
|
5323
|
-
`
|
|
6088
|
+
`
|
|
6089
|
+
) : this._renderItems(filtered, theme, feedbackConfig)}
|
|
5324
6090
|
</div>
|
|
5325
6091
|
|
|
5326
6092
|
${this.faqConfig.searchable && filtered.length === 0 && this._searchQuery ? html2`
|
|
@@ -5349,11 +6115,13 @@ FAQAccordionElement.properties = {
|
|
|
5349
6115
|
if (!customElements.get("syntro-faq-accordion")) {
|
|
5350
6116
|
customElements.define("syntro-faq-accordion", FAQAccordionElement);
|
|
5351
6117
|
}
|
|
5352
|
-
|
|
5353
|
-
// ../adaptives/adaptive-faq/dist/runtime.js
|
|
5354
6118
|
var FAQWidgetLitMountable = {
|
|
5355
6119
|
mount(container, config) {
|
|
5356
|
-
const {
|
|
6120
|
+
const {
|
|
6121
|
+
runtime: runtime22,
|
|
6122
|
+
instanceId = "faq-widget",
|
|
6123
|
+
...faqConfig
|
|
6124
|
+
} = config != null ? config : {
|
|
5357
6125
|
expandBehavior: "single",
|
|
5358
6126
|
searchable: false,
|
|
5359
6127
|
theme: "auto",
|
|
@@ -5362,7 +6130,7 @@ var FAQWidgetLitMountable = {
|
|
|
5362
6130
|
const el = document.createElement("syntro-faq-accordion");
|
|
5363
6131
|
Object.assign(el, {
|
|
5364
6132
|
faqConfig,
|
|
5365
|
-
runtime:
|
|
6133
|
+
runtime: runtime22 != null ? runtime22 : null,
|
|
5366
6134
|
instanceId
|
|
5367
6135
|
});
|
|
5368
6136
|
container.appendChild(el);
|
|
@@ -5416,12 +6184,458 @@ var runtime3 = {
|
|
|
5416
6184
|
}
|
|
5417
6185
|
};
|
|
5418
6186
|
|
|
5419
|
-
// ../adaptives/adaptive-nav/dist/
|
|
6187
|
+
// ../adaptives/adaptive-nav/dist/chunk-ZYHZ6JAD.js
|
|
6188
|
+
import { z as z2 } from "zod";
|
|
6189
|
+
var AnchorIdZ2 = z2.object({
|
|
6190
|
+
selector: z2.string(),
|
|
6191
|
+
route: z2.union([z2.string(), z2.array(z2.string())])
|
|
6192
|
+
}).strict();
|
|
6193
|
+
var AuthoringFieldsZ = {
|
|
6194
|
+
title: z2.string().max(200).optional().describe("Authoring-only: short label shown on the action plan dashboard. Stripped before serving to the runtime SDK."),
|
|
6195
|
+
description: z2.string().max(1e3).optional().describe("Authoring-only: one-sentence explanation of what this action does and why. Stripped before serving to the runtime SDK."),
|
|
6196
|
+
validation: z2.array(z2.string().max(500)).max(10).optional().describe("Authoring-only: ordered steps a reviewer can follow to trigger this action and visually confirm it works. Each entry is one step. Stripped before serving to the runtime SDK.")
|
|
6197
|
+
};
|
|
6198
|
+
var COUNTABLE_EVENTS = [
|
|
6199
|
+
// User interactions (from PostHog autocapture normalization)
|
|
6200
|
+
"ui.click",
|
|
6201
|
+
"ui.scroll",
|
|
6202
|
+
"ui.input",
|
|
6203
|
+
"ui.change",
|
|
6204
|
+
"ui.submit",
|
|
6205
|
+
// Behavioral detectors (from event-processor)
|
|
6206
|
+
"ui.hover",
|
|
6207
|
+
"ui.idle",
|
|
6208
|
+
"ui.scroll_thrash",
|
|
6209
|
+
"ui.focus_bounce",
|
|
6210
|
+
// Navigation
|
|
6211
|
+
"nav.page_view",
|
|
6212
|
+
"nav.page_leave",
|
|
6213
|
+
// Derived behavioral signals
|
|
6214
|
+
"behavior.rage_click",
|
|
6215
|
+
"behavior.hesitation",
|
|
6216
|
+
"behavior.confusion"
|
|
6217
|
+
];
|
|
6218
|
+
var CountableEventZ = z2.enum(COUNTABLE_EVENTS).describe("Event name to count. ui.* = user interactions and behavioral detectors, nav.* = page navigation, behavior.* = derived behavioral signals.");
|
|
6219
|
+
var SESSION_METRIC_KEYS = ["time_on_page", "page_views", "scroll_depth"];
|
|
6220
|
+
var SessionMetricKeyZ = z2.enum(SESSION_METRIC_KEYS).describe("Session metric key. time_on_page = seconds on current page, page_views = pages visited this session, scroll_depth = 0-100 percentage.");
|
|
6221
|
+
var PageUrlConditionZ2 = z2.object({
|
|
6222
|
+
type: z2.literal("page_url"),
|
|
6223
|
+
url: z2.string().describe('URL path to match (e.g. "/pricing", "/dashboard")')
|
|
6224
|
+
}).describe('Fires when the current page URL matches. Use for page-specific actions. Example: {"type": "page_url", "url": "/pricing"}');
|
|
6225
|
+
var RouteConditionZ2 = z2.object({
|
|
6226
|
+
type: z2.literal("route"),
|
|
6227
|
+
routeId: z2.string().describe("Named route ID from the route filter")
|
|
6228
|
+
}).describe("Fires when the current route matches a named route ID.");
|
|
6229
|
+
var AnchorVisibleConditionZ2 = z2.object({
|
|
6230
|
+
type: z2.literal("anchor_visible"),
|
|
6231
|
+
anchorId: z2.string().describe("CSS selector of the anchor element"),
|
|
6232
|
+
state: z2.enum(["visible", "present", "absent"]).describe('"visible" = in viewport, "present" = in DOM, "absent" = not in DOM')
|
|
6233
|
+
}).describe(`Fires based on a DOM element's visibility state. Example: {"type": "anchor_visible", "anchorId": "#cta-button", "state": "visible"}`);
|
|
6234
|
+
var EventOccurredConditionZ2 = z2.object({
|
|
6235
|
+
type: z2.literal("event_occurred"),
|
|
6236
|
+
eventName: z2.string().describe('Event name (e.g. "ui.click", "$pageview")'),
|
|
6237
|
+
withinMs: z2.number().optional().describe("Time window in ms. Omit = any time this session.")
|
|
6238
|
+
}).describe('Fires when a specific event has occurred during this session. Example: {"type": "event_occurred", "eventName": "ui.click", "withinMs": 5000}');
|
|
6239
|
+
var StateEqualsConditionZ2 = z2.object({
|
|
6240
|
+
type: z2.literal("state_equals"),
|
|
6241
|
+
key: z2.string().describe("Key in the SDK persistent state store (localStorage). Only valid for keys the host app explicitly sets via syntro.state.set()."),
|
|
6242
|
+
value: z2.unknown().describe("Expected value to match against")
|
|
6243
|
+
}).describe("Checks the SDK persistent state store (localStorage). ONLY for host-app state set via syntro.state.set() \u2014 NOT for user attributes like region, device, or UTM params (those are handled by segment targeting). Do NOT use this for targeting. If you do not know the valid state keys, do not use this condition type.");
|
|
6244
|
+
var ViewportConditionZ2 = z2.object({
|
|
6245
|
+
type: z2.literal("viewport"),
|
|
6246
|
+
minWidth: z2.number().optional().describe("Minimum viewport width in pixels"),
|
|
6247
|
+
maxWidth: z2.number().optional().describe("Maximum viewport width in pixels"),
|
|
6248
|
+
minHeight: z2.number().optional().describe("Minimum viewport height in pixels"),
|
|
6249
|
+
maxHeight: z2.number().optional().describe("Maximum viewport height in pixels")
|
|
6250
|
+
}).describe('Fires based on viewport (screen) size. Use for responsive behavior. Example: {"type": "viewport", "minWidth": 768} \u2014 fires on tablet and larger.');
|
|
6251
|
+
var SessionMetricConditionZ2 = z2.object({
|
|
6252
|
+
type: z2.literal("session_metric"),
|
|
6253
|
+
key: SessionMetricKeyZ,
|
|
6254
|
+
operator: z2.enum(["gte", "lte", "eq", "gt", "lt"]),
|
|
6255
|
+
threshold: z2.number().describe("Numeric threshold to compare against")
|
|
6256
|
+
}).describe('Fires when a session metric crosses a threshold. Valid keys: "time_on_page" (seconds), "page_views" (count), "scroll_depth" (0-100). Example: {"type": "session_metric", "key": "time_on_page", "operator": "gte", "threshold": 30}');
|
|
6257
|
+
var DismissedConditionZ2 = z2.object({
|
|
6258
|
+
type: z2.literal("dismissed"),
|
|
6259
|
+
key: z2.string().describe("Dismissal key (usually a tile or action ID)"),
|
|
6260
|
+
inverted: z2.boolean().optional().describe("When true, fires if NOT dismissed (default behavior)")
|
|
6261
|
+
}).describe("Checks if an item has been dismissed by the user. Use with inverted: true to show only if not dismissed.");
|
|
6262
|
+
var CooldownActiveConditionZ2 = z2.object({
|
|
6263
|
+
type: z2.literal("cooldown_active"),
|
|
6264
|
+
key: z2.string().describe("Cooldown key"),
|
|
6265
|
+
inverted: z2.boolean().optional().describe("When true, fires if cooldown is NOT active")
|
|
6266
|
+
}).describe("Checks if a cooldown timer is currently active. Use to prevent showing the same intervention too frequently.");
|
|
6267
|
+
var FrequencyLimitConditionZ2 = z2.object({
|
|
6268
|
+
type: z2.literal("frequency_limit"),
|
|
6269
|
+
key: z2.string().describe("Frequency counter key"),
|
|
6270
|
+
limit: z2.number().describe("Maximum allowed count"),
|
|
6271
|
+
inverted: z2.boolean().optional().describe("When true, fires if limit NOT reached")
|
|
6272
|
+
}).describe("Checks if a frequency limit has been reached. Use to cap how many times an action fires per session.");
|
|
6273
|
+
var MatchOpZ2 = z2.object({
|
|
6274
|
+
equals: z2.union([z2.string(), z2.number(), z2.boolean()]).optional(),
|
|
6275
|
+
contains: z2.string().optional()
|
|
6276
|
+
}).describe("Match operator for counter filters. Exactly one of equals or contains must be specified.");
|
|
6277
|
+
var CounterDefZ2 = z2.object({
|
|
6278
|
+
events: z2.array(CountableEventZ).min(1).describe("Event names to count. Use values from the countable events enum."),
|
|
6279
|
+
match: z2.record(z2.string(), MatchOpZ2).optional().describe("Property filters. Keys are event prop names or element-chain fields (tag_name, $el_text, attr__*). All entries AND together.")
|
|
6280
|
+
}).describe("Defines what events to count. Registered as an accumulator predicate at config-load time.");
|
|
6281
|
+
var EventCountConditionZ2 = z2.object({
|
|
6282
|
+
type: z2.literal("event_count"),
|
|
6283
|
+
key: z2.string().describe("Unique key for this counter (used for accumulator registration)"),
|
|
6284
|
+
operator: z2.enum(["gte", "lte", "eq", "gt", "lt"]),
|
|
6285
|
+
count: z2.number().int().min(0).describe("Target count threshold"),
|
|
6286
|
+
withinMs: z2.number().positive().optional().describe("Time window in ms. Omit = count across entire session."),
|
|
6287
|
+
counter: CounterDefZ2.optional().describe("Inline counter definition. Defines what events to count.")
|
|
6288
|
+
}).describe('Fires when accumulated event count crosses a threshold. Most powerful trigger type. Example: {"type": "event_count", "key": "pricing-clicks", "operator": "gte", "count": 3, "counter": {"events": ["ui.click"], "match": {"attr__data-cta": {"contains": "pricing"}}}}');
|
|
6289
|
+
var ConditionZ2 = z2.discriminatedUnion("type", [
|
|
6290
|
+
PageUrlConditionZ2,
|
|
6291
|
+
RouteConditionZ2,
|
|
6292
|
+
AnchorVisibleConditionZ2,
|
|
6293
|
+
EventOccurredConditionZ2,
|
|
6294
|
+
StateEqualsConditionZ2,
|
|
6295
|
+
ViewportConditionZ2,
|
|
6296
|
+
SessionMetricConditionZ2,
|
|
6297
|
+
DismissedConditionZ2,
|
|
6298
|
+
CooldownActiveConditionZ2,
|
|
6299
|
+
FrequencyLimitConditionZ2,
|
|
6300
|
+
EventCountConditionZ2
|
|
6301
|
+
]);
|
|
6302
|
+
var RuleZ2 = z2.object({
|
|
6303
|
+
conditions: z2.array(ConditionZ2).describe("Array of conditions \u2014 ALL must match (AND logic) for this rule to fire."),
|
|
6304
|
+
value: z2.unknown().describe("Value returned when all conditions match. For triggerWhen: true = fire the action.")
|
|
6305
|
+
}).describe("A single rule. ALL conditions must match (AND logic). Rules in a strategy are evaluated top-to-bottom \u2014 first rule where all conditions match wins and returns its value.");
|
|
6306
|
+
var RuleStrategyZ2 = z2.object({
|
|
6307
|
+
type: z2.literal("rules"),
|
|
6308
|
+
rules: z2.array(RuleZ2).describe("Ordered list of rules. Evaluated top-to-bottom \u2014 first match wins."),
|
|
6309
|
+
default: z2.unknown().describe("Fallback value when no rule matches. For triggerWhen: false = do not fire by default.")
|
|
6310
|
+
}).describe("Rule-based strategy. Evaluates rules top-to-bottom. First rule where ALL conditions match returns its value. If no rule matches, returns default. For triggerWhen: set value=true on matching rules, default=false.");
|
|
6311
|
+
var ScoreStrategyZ2 = z2.object({
|
|
6312
|
+
type: z2.literal("score"),
|
|
6313
|
+
field: z2.string(),
|
|
6314
|
+
threshold: z2.number(),
|
|
6315
|
+
above: z2.unknown(),
|
|
6316
|
+
below: z2.unknown()
|
|
6317
|
+
}).describe("Score-based strategy. Compares a field value against a threshold.");
|
|
6318
|
+
var ModelStrategyZ2 = z2.object({
|
|
6319
|
+
type: z2.literal("model"),
|
|
6320
|
+
modelId: z2.string(),
|
|
6321
|
+
inputs: z2.array(z2.string()),
|
|
6322
|
+
outputMapping: z2.record(z2.string(), z2.unknown()),
|
|
6323
|
+
default: z2.unknown()
|
|
6324
|
+
}).describe("ML model strategy. Sends inputs to a model and maps outputs.");
|
|
6325
|
+
var ExternalStrategyZ2 = z2.object({
|
|
6326
|
+
type: z2.literal("external"),
|
|
6327
|
+
endpoint: z2.string(),
|
|
6328
|
+
method: z2.enum(["GET", "POST"]).optional(),
|
|
6329
|
+
default: z2.unknown(),
|
|
6330
|
+
timeoutMs: z2.number().optional()
|
|
6331
|
+
}).describe("External API strategy. Calls an endpoint to determine the value.");
|
|
6332
|
+
var DecisionStrategyZ2 = z2.discriminatedUnion("type", [
|
|
6333
|
+
RuleStrategyZ2,
|
|
6334
|
+
ScoreStrategyZ2,
|
|
6335
|
+
ModelStrategyZ2,
|
|
6336
|
+
ExternalStrategyZ2
|
|
6337
|
+
]);
|
|
6338
|
+
var TriggerWhenZ2 = DecisionStrategyZ2.nullable().optional();
|
|
6339
|
+
var EventScopeZ = z2.object({
|
|
6340
|
+
events: z2.array(z2.string()),
|
|
6341
|
+
urlContains: z2.string().optional(),
|
|
6342
|
+
props: z2.record(z2.union([z2.string(), z2.number(), z2.boolean()])).optional()
|
|
6343
|
+
});
|
|
6344
|
+
var NotifyZ = z2.object({
|
|
6345
|
+
title: z2.string().optional(),
|
|
6346
|
+
body: z2.string().optional(),
|
|
6347
|
+
icon: z2.string().optional()
|
|
6348
|
+
}).nullable().optional();
|
|
6349
|
+
var PREFIX = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"';
|
|
6350
|
+
var EMOJI_SVG_PATHS = {
|
|
6351
|
+
// ── existing in adaptive-nav ─────────────────────────────────────────────
|
|
6352
|
+
"\u{1F4B5}": [
|
|
6353
|
+
'<rect width="20" height="12" x="2" y="6" rx="2"/>',
|
|
6354
|
+
'<circle cx="12" cy="12" r="2"/>',
|
|
6355
|
+
'<path d="M6 12h.01M18 12h.01"/>'
|
|
6356
|
+
],
|
|
6357
|
+
"\u{1F3DB}\uFE0F": [
|
|
6358
|
+
'<line x1="3" x2="21" y1="22" y2="22"/>',
|
|
6359
|
+
'<line x1="6" x2="6" y1="18" y2="11"/>',
|
|
6360
|
+
'<line x1="10" x2="10" y1="18" y2="11"/>',
|
|
6361
|
+
'<line x1="14" x2="14" y1="18" y2="11"/>',
|
|
6362
|
+
'<line x1="18" x2="18" y1="18" y2="11"/>',
|
|
6363
|
+
'<polygon points="12 2 20 7 4 7"/>'
|
|
6364
|
+
],
|
|
6365
|
+
"\u23ED\uFE0F": ['<polygon points="5 4 15 12 5 20 5 4"/>', '<line x1="19" x2="19" y1="5" y2="19"/>'],
|
|
6366
|
+
"\u27A1\uFE0F": ['<path d="M5 12h14"/>', '<path d="m12 5 7 7-7 7"/>'],
|
|
6367
|
+
"\u{1F4A1}": [
|
|
6368
|
+
'<path d="M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5"/>',
|
|
6369
|
+
'<path d="M9 18h6"/>',
|
|
6370
|
+
'<path d="M10 22h4"/>'
|
|
6371
|
+
],
|
|
6372
|
+
"\u{1F4B0}": [
|
|
6373
|
+
'<rect width="20" height="12" x="2" y="6" rx="2"/>',
|
|
6374
|
+
'<circle cx="12" cy="12" r="2"/>',
|
|
6375
|
+
'<path d="M6 12h.01M18 12h.01"/>'
|
|
6376
|
+
],
|
|
6377
|
+
"\u{1F4CB}": [
|
|
6378
|
+
'<rect width="8" height="4" x="8" y="2" rx="1" ry="1"/>',
|
|
6379
|
+
'<path d="M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2"/>',
|
|
6380
|
+
'<path d="M12 11h4"/>',
|
|
6381
|
+
'<path d="M12 16h4"/>',
|
|
6382
|
+
'<path d="M8 11h.01"/>',
|
|
6383
|
+
'<path d="M8 16h.01"/>'
|
|
6384
|
+
],
|
|
6385
|
+
"\u2705": ['<path d="M22 11.08V12a10 10 0 1 1-5.93-9.14"/>', '<path d="m9 11 3 3L22 4"/>'],
|
|
6386
|
+
"\u26A0\uFE0F": [
|
|
6387
|
+
'<path d="m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3"/>',
|
|
6388
|
+
'<path d="M12 9v4"/>',
|
|
6389
|
+
'<path d="M12 17h.01"/>'
|
|
6390
|
+
],
|
|
6391
|
+
// ── added for healthmaxxer action_plans ──────────────────────────────────
|
|
6392
|
+
"\u{1F6E1}\uFE0F": [
|
|
6393
|
+
'<path d="M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z"/>'
|
|
6394
|
+
],
|
|
6395
|
+
"\u{1F4C8}": [
|
|
6396
|
+
'<polyline points="22 7 13.5 15.5 8.5 10.5 2 17"/>',
|
|
6397
|
+
'<polyline points="16 7 22 7 22 13"/>'
|
|
6398
|
+
],
|
|
6399
|
+
"\u{1F52C}": [
|
|
6400
|
+
'<path d="M6 18h8"/>',
|
|
6401
|
+
'<path d="M3 22h18"/>',
|
|
6402
|
+
'<path d="M14 22a7 7 0 1 0 0-14h-1"/>',
|
|
6403
|
+
'<path d="M9 14h2"/>',
|
|
6404
|
+
'<path d="M9 12a2 2 0 0 1-2-2V6h6v4a2 2 0 0 1-2 2Z"/>',
|
|
6405
|
+
'<path d="M12 6V3a1 1 0 0 0-1-1H9a1 1 0 0 0-1 1v3"/>'
|
|
6406
|
+
],
|
|
6407
|
+
"\u{1F48A}": [
|
|
6408
|
+
'<path d="m10.5 20.5 10-10a4.95 4.95 0 1 0-7-7l-10 10a4.95 4.95 0 1 0 7 7Z"/>',
|
|
6409
|
+
'<path d="m8.5 8.5 7 7"/>'
|
|
6410
|
+
],
|
|
6411
|
+
"\u{1F4C4}": [
|
|
6412
|
+
'<path d="M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"/>',
|
|
6413
|
+
'<path d="M14 2v4a2 2 0 0 0 2 2h4"/>',
|
|
6414
|
+
'<path d="M10 9H8"/>',
|
|
6415
|
+
'<path d="M16 13H8"/>',
|
|
6416
|
+
'<path d="M16 17H8"/>'
|
|
6417
|
+
],
|
|
6418
|
+
"\u{1F9EA}": [
|
|
6419
|
+
'<path d="M14 2v6a2 2 0 0 0 .245.96l5.51 10.08A2 2 0 0 1 18 22H6a2 2 0 0 1-1.755-2.96l5.51-10.08A2 2 0 0 0 10 8V2"/>',
|
|
6420
|
+
'<path d="M6.453 15h11.094"/>',
|
|
6421
|
+
'<path d="M8.5 2h7"/>'
|
|
6422
|
+
],
|
|
6423
|
+
"\u{1F501}": [
|
|
6424
|
+
'<path d="m17 2 4 4-4 4"/>',
|
|
6425
|
+
'<path d="M3 11v-1a4 4 0 0 1 4-4h14"/>',
|
|
6426
|
+
'<path d="m7 22-4-4 4-4"/>',
|
|
6427
|
+
'<path d="M21 13v1a4 4 0 0 1-4 4H3"/>'
|
|
6428
|
+
],
|
|
6429
|
+
"\u{1F9E0}": [
|
|
6430
|
+
'<path d="M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z"/>',
|
|
6431
|
+
'<path d="M12 5a3 3 0 1 1 5.997.125 4 4 0 0 1 2.526 5.77 4 4 0 0 1-.556 6.588A4 4 0 1 1 12 18Z"/>',
|
|
6432
|
+
'<path d="M15 13a4.5 4.5 0 0 1-3-4 4.5 4.5 0 0 1-3 4"/>',
|
|
6433
|
+
'<path d="M17.599 6.5a3 3 0 0 0 .399-1.375"/>',
|
|
6434
|
+
'<path d="M6.003 5.125A3 3 0 0 0 6.401 6.5"/>',
|
|
6435
|
+
'<path d="M3.477 10.896a4 4 0 0 1 .585-.396"/>',
|
|
6436
|
+
'<path d="M19.938 10.5a4 4 0 0 1 .585.396"/>',
|
|
6437
|
+
'<path d="M6 18a4 4 0 0 1-1.967-.516"/>',
|
|
6438
|
+
'<path d="M19.967 17.484A4 4 0 0 1 18 18"/>'
|
|
6439
|
+
],
|
|
6440
|
+
"\u{1F319}": ['<path d="M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z"/>'],
|
|
6441
|
+
"\u{1F4E6}": [
|
|
6442
|
+
'<path d="M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z"/>',
|
|
6443
|
+
'<path d="M12 22V12"/>',
|
|
6444
|
+
'<path d="m3.3 7 8.7 5 8.7-5"/>',
|
|
6445
|
+
'<path d="m7.5 4.27 9 5.15"/>'
|
|
6446
|
+
],
|
|
6447
|
+
"\u{1F69A}": [
|
|
6448
|
+
// Lucide truck
|
|
6449
|
+
'<path d="M14 18V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v11a1 1 0 0 0 1 1h2"/>',
|
|
6450
|
+
'<path d="M15 18H9"/>',
|
|
6451
|
+
'<path d="M19 18h2a1 1 0 0 0 1-1v-3.65a1 1 0 0 0-.22-.624l-3.48-4.35A1 1 0 0 0 17.52 8H14"/>',
|
|
6452
|
+
'<circle cx="17" cy="18" r="2"/>',
|
|
6453
|
+
'<circle cx="7" cy="18" r="2"/>'
|
|
6454
|
+
],
|
|
6455
|
+
"\u{1F331}": [
|
|
6456
|
+
'<path d="M7 20h10"/>',
|
|
6457
|
+
'<path d="M10 20c5.5-2.5.8-6.4 3-10"/>',
|
|
6458
|
+
'<path d="M9.5 9.4c1.1.8 1.8 2.2 2.3 3.7-2 .4-3.5.4-4.8-.3-1.2-.6-2.3-1.9-3-4.2 2.8-.5 4.4 0 5.5.8z"/>',
|
|
6459
|
+
'<path d="M14.1 6a7 7 0 0 0-1.1 4c1.9-.1 3.3-.6 4.3-1.4 1-1 1.6-2.3 1.7-4.6-2.7.1-4 1-4.9 2z"/>'
|
|
6460
|
+
],
|
|
6461
|
+
"\u26A1": [
|
|
6462
|
+
'<path d="M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z"/>'
|
|
6463
|
+
],
|
|
6464
|
+
"\u{1F525}": [
|
|
6465
|
+
// Lucide flame
|
|
6466
|
+
'<path d="M8.5 14.5A2.5 2.5 0 0 0 11 12c0-1.38-.5-2-1-3-1.072-2.143-.224-4.054 2-6 .5 2.5 2 4.9 4 6.5 2 1.6 3 3.5 3 5.5a7 7 0 1 1-14 0c0-1.153.433-2.294 1-3a2.5 2.5 0 0 0 2.5 2.5z"/>'
|
|
6467
|
+
],
|
|
6468
|
+
"\u{1F333}": [
|
|
6469
|
+
'<path d="M12 22V8"/>',
|
|
6470
|
+
'<path d="m17 8-5-6-5 6"/>',
|
|
6471
|
+
'<path d="M12 12c-2-2-4-2-4-2 0 0 0 4 2 6 1.5 1.5 3 1 4 0"/>',
|
|
6472
|
+
'<path d="M12 12c2-2 4-2 4-2 0 0 0 4-2 6-1.5 1.5-3 1-4 0"/>'
|
|
6473
|
+
],
|
|
6474
|
+
"\u{1F33F}": [
|
|
6475
|
+
'<path d="M11 20A7 7 0 0 1 9.8 6.1C15.5 5 17 4.48 19.2 2.96a1 1 0 0 1 1.8.5c0 6-2 11-9 16.5"/>',
|
|
6476
|
+
'<path d="M2 21c0-3 1.85-5.36 5.08-6"/>'
|
|
6477
|
+
],
|
|
6478
|
+
// ── added for runtime-sdk SyntroTileCard / SyntroToastStack ──────────────
|
|
6479
|
+
"\u2753": [
|
|
6480
|
+
// HelpCircle
|
|
6481
|
+
'<circle cx="12" cy="12" r="10"/>',
|
|
6482
|
+
'<path d="M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"/>',
|
|
6483
|
+
'<path d="M12 17h.01"/>'
|
|
6484
|
+
],
|
|
6485
|
+
"\u{1F9ED}": [
|
|
6486
|
+
// Compass
|
|
6487
|
+
'<circle cx="12" cy="12" r="10"/>',
|
|
6488
|
+
'<polygon points="16.24 7.76 14.12 14.12 7.76 16.24 9.88 9.88 16.24 7.76"/>'
|
|
6489
|
+
],
|
|
6490
|
+
"\u{1F4DD}": [
|
|
6491
|
+
// FileText
|
|
6492
|
+
'<path d="M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z"/>',
|
|
6493
|
+
'<polyline points="14 2 14 8 20 8"/>',
|
|
6494
|
+
'<line x1="16" y1="13" x2="8" y2="13"/>',
|
|
6495
|
+
'<line x1="16" y1="17" x2="8" y2="17"/>',
|
|
6496
|
+
'<line x1="10" y1="9" x2="8" y2="9"/>'
|
|
6497
|
+
],
|
|
6498
|
+
"\u{1F3AF}": [
|
|
6499
|
+
// Layers (bullseye-shaped emoji rendered as Lucide Layers — historical)
|
|
6500
|
+
'<polygon points="12 2 2 7 12 12 22 7 12 2"/>',
|
|
6501
|
+
'<polyline points="2 17 12 22 22 17"/>',
|
|
6502
|
+
'<polyline points="2 12 12 17 22 12"/>'
|
|
6503
|
+
],
|
|
6504
|
+
"\u{1F3C6}": [
|
|
6505
|
+
// Trophy
|
|
6506
|
+
'<path d="M6 9H4.5a2.5 2.5 0 0 1 0-5H6"/>',
|
|
6507
|
+
'<path d="M18 9h1.5a2.5 2.5 0 0 0 0-5H18"/>',
|
|
6508
|
+
'<path d="M4 22h16"/>',
|
|
6509
|
+
'<path d="M10 14.66V17c0 .55-.47.98-.97 1.21C7.85 18.75 7 20.24 7 22"/>',
|
|
6510
|
+
'<path d="M14 14.66V17c0 .55.47.98.97 1.21C16.15 18.75 17 20.24 17 22"/>',
|
|
6511
|
+
'<path d="M18 2H6v7a6 6 0 0 0 12 0V2Z"/>'
|
|
6512
|
+
],
|
|
6513
|
+
"\u2728": [
|
|
6514
|
+
// Sparkles
|
|
6515
|
+
'<path d="m12 3-1.912 5.813a2 2 0 0 1-1.275 1.275L3 12l5.813 1.912a2 2 0 0 1 1.275 1.275L12 21l1.912-5.813a2 2 0 0 1 1.275-1.275L21 12l-5.813-1.912a2 2 0 0 1-1.275-1.275L12 3Z"/>',
|
|
6516
|
+
'<path d="M5 3v4"/>',
|
|
6517
|
+
'<path d="M19 17v4"/>',
|
|
6518
|
+
'<path d="M3 5h4"/>',
|
|
6519
|
+
'<path d="M17 19h4"/>'
|
|
6520
|
+
],
|
|
6521
|
+
"\u{1F4AC}": [
|
|
6522
|
+
// MessageCircle
|
|
6523
|
+
'<path d="M7.9 20A9 9 0 1 0 4 16.1L2 22Z"/>'
|
|
6524
|
+
],
|
|
6525
|
+
"\u{1F3AE}": [
|
|
6526
|
+
// Gamepad2
|
|
6527
|
+
'<line x1="6" y1="11" x2="10" y2="11"/>',
|
|
6528
|
+
'<line x1="8" y1="9" x2="8" y2="13"/>',
|
|
6529
|
+
'<line x1="15" y1="12" x2="15.01" y2="12"/>',
|
|
6530
|
+
'<line x1="18" y1="10" x2="18.01" y2="10"/>',
|
|
6531
|
+
'<path d="M17.32 5H6.68a4 4 0 0 0-3.978 3.59c-.006.052-.01.101-.017.152C2.604 9.416 2 14.456 2 16a3 3 0 0 0 3 3c1 0 1.5-.5 2-1l1.414-1.414A2 2 0 0 1 9.828 16h4.344a2 2 0 0 1 1.414.586L17 18c.5.5 1 1 2 1a3 3 0 0 0 3-3c0-1.545-.604-6.584-.685-7.258-.007-.05-.011-.1-.017-.151A4 4 0 0 0 17.32 5z"/>'
|
|
6532
|
+
],
|
|
6533
|
+
"\u23F1\uFE0F": [
|
|
6534
|
+
// Timer
|
|
6535
|
+
'<line x1="10" y1="2" x2="14" y2="2"/>',
|
|
6536
|
+
'<line x1="12" y1="14" x2="12" y2="8"/>',
|
|
6537
|
+
'<circle cx="12" cy="14" r="8"/>'
|
|
6538
|
+
],
|
|
6539
|
+
"\u{1F4D6}": [
|
|
6540
|
+
// BookOpen
|
|
6541
|
+
'<path d="M2 3h6a4 4 0 0 1 4 4v14a3 3 0 0 0-3-3H2z"/>',
|
|
6542
|
+
'<path d="M22 3h-6a4 4 0 0 0-4 4v14a3 3 0 0 1 3-3h7z"/>'
|
|
6543
|
+
],
|
|
6544
|
+
"\u{1F514}": [
|
|
6545
|
+
// Bell
|
|
6546
|
+
'<path d="M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9"/>',
|
|
6547
|
+
'<path d="M10.3 21a1.94 1.94 0 0 0 3.4 0"/>'
|
|
6548
|
+
],
|
|
6549
|
+
// ── common UI icons ──────────────────────────────────────────────────────
|
|
6550
|
+
"\u{1F393}": [
|
|
6551
|
+
// GraduationCap
|
|
6552
|
+
'<path d="M21.42 10.922a1 1 0 0 0-.019-1.838L12.83 5.18a2 2 0 0 0-1.66 0L2.6 9.08a1 1 0 0 0 0 1.832l8.57 3.908a2 2 0 0 0 1.66 0z"/>',
|
|
6553
|
+
'<path d="M22 10v6"/>',
|
|
6554
|
+
'<path d="M6 12.5V16a6 3 0 0 0 12 0v-3.5"/>'
|
|
6555
|
+
],
|
|
6556
|
+
"\u23F0": [
|
|
6557
|
+
// AlarmClock
|
|
6558
|
+
'<circle cx="12" cy="13" r="8"/>',
|
|
6559
|
+
'<path d="M12 9v4l2 2"/>',
|
|
6560
|
+
'<path d="M5 3 2 6"/>',
|
|
6561
|
+
'<path d="m22 6-3-3"/>',
|
|
6562
|
+
'<path d="M6.38 18.7 4 21"/>',
|
|
6563
|
+
'<path d="M17.64 18.67 20 21"/>'
|
|
6564
|
+
],
|
|
6565
|
+
"\u{1F504}": [
|
|
6566
|
+
// RefreshCw
|
|
6567
|
+
'<path d="M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8"/>',
|
|
6568
|
+
'<path d="M21 3v5h-5"/>',
|
|
6569
|
+
'<path d="M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16"/>',
|
|
6570
|
+
'<path d="M8 16H3v5"/>'
|
|
6571
|
+
],
|
|
6572
|
+
"\u{1F464}": [
|
|
6573
|
+
// User
|
|
6574
|
+
'<path d="M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2"/>',
|
|
6575
|
+
'<circle cx="12" cy="7" r="4"/>'
|
|
6576
|
+
],
|
|
6577
|
+
"\u{1F3E0}": [
|
|
6578
|
+
// House
|
|
6579
|
+
'<path d="M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8"/>',
|
|
6580
|
+
'<path d="M3 10a2 2 0 0 1 .709-1.528l7-5.999a2 2 0 0 1 2.582 0l7 5.999A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"/>'
|
|
6581
|
+
],
|
|
6582
|
+
"\u{1F6D2}": [
|
|
6583
|
+
// ShoppingCart
|
|
6584
|
+
'<circle cx="8" cy="21" r="1"/>',
|
|
6585
|
+
'<circle cx="19" cy="21" r="1"/>',
|
|
6586
|
+
'<path d="M2.05 2.05h2l2.66 12.42a2 2 0 0 0 2 1.58h9.78a2 2 0 0 0 1.95-1.57l1.65-7.43H5.12"/>'
|
|
6587
|
+
],
|
|
6588
|
+
// ── viz / chart icons (paired with adaptive-viz) ─────────────────────────
|
|
6589
|
+
"\u{1F4CA}": [
|
|
6590
|
+
// BarChart3 — pairs with 📈 (TrendingUp)
|
|
6591
|
+
'<path d="M3 3v18h18"/>',
|
|
6592
|
+
'<path d="M18 17V9"/>',
|
|
6593
|
+
'<path d="M13 17V5"/>',
|
|
6594
|
+
'<path d="M8 17v-3"/>'
|
|
6595
|
+
],
|
|
6596
|
+
"\u{1F4C9}": [
|
|
6597
|
+
// TrendingDown
|
|
6598
|
+
'<polyline points="22 17 13.5 8.5 8.5 13.5 2 7"/>',
|
|
6599
|
+
'<polyline points="16 17 22 17 22 11"/>'
|
|
6600
|
+
],
|
|
6601
|
+
"\u{1F967}": [
|
|
6602
|
+
// PieChart
|
|
6603
|
+
'<path d="M21 12c.552 0 1.005-.449.95-.998a10 10 0 0 0-8.953-8.951c-.55-.055-.998.398-.998.95v8a1 1 0 0 0 1 1z"/>',
|
|
6604
|
+
'<path d="M21.21 15.89A10 10 0 1 1 8 2.83"/>'
|
|
6605
|
+
],
|
|
6606
|
+
"\u{1F4B9}": [
|
|
6607
|
+
// Activity — line-chart-style waveform
|
|
6608
|
+
'<path d="M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.5.5 0 0 1-.96 0L9.24 2.18a.5.5 0 0 0-.96 0l-2.35 8.36A2 2 0 0 1 4.02 12H2"/>'
|
|
6609
|
+
],
|
|
6610
|
+
"\u{1F321}\uFE0F": [
|
|
6611
|
+
// Thermometer — gauge-style indicator
|
|
6612
|
+
'<path d="M14 4v10.54a4 4 0 1 1-4 0V4a2 2 0 0 1 4 0Z"/>'
|
|
6613
|
+
]
|
|
6614
|
+
};
|
|
6615
|
+
function renderIcon2(emoji, options = {}) {
|
|
6616
|
+
var _a3, _b;
|
|
6617
|
+
const paths = EMOJI_SVG_PATHS[emoji];
|
|
6618
|
+
if (!paths)
|
|
6619
|
+
return "";
|
|
6620
|
+
const size = (_a3 = options.size) != null ? _a3 : 14;
|
|
6621
|
+
const stroke = (_b = options.color) != null ? _b : "currentColor";
|
|
6622
|
+
return `${PREFIX} width="${size}" height="${size}" stroke="${stroke}">${paths.join("")}</svg>`;
|
|
6623
|
+
}
|
|
6624
|
+
|
|
6625
|
+
// ../adaptives/adaptive-nav/dist/chunk-HMLY7DHA.js
|
|
6626
|
+
var __typeError2 = (msg) => {
|
|
6627
|
+
throw TypeError(msg);
|
|
6628
|
+
};
|
|
6629
|
+
var __accessCheck2 = (obj, member, msg) => member.has(obj) || __typeError2("Cannot " + msg);
|
|
6630
|
+
var __privateGet3 = (obj, member, getter) => (__accessCheck2(obj, member, "read from private field"), getter ? getter.call(obj) : member.get(obj));
|
|
6631
|
+
var __privateAdd3 = (obj, member, value) => member.has(obj) ? __typeError2("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
|
|
6632
|
+
var __privateSet3 = (obj, member, value, setter) => (__accessCheck2(obj, member, "write to private field"), setter ? setter.call(obj, value) : member.set(obj, value), value);
|
|
6633
|
+
var __privateMethod2 = (obj, member, method) => (__accessCheck2(obj, member, "access private method"), method);
|
|
6634
|
+
|
|
6635
|
+
// ../adaptives/adaptive-nav/dist/runtime.js
|
|
5420
6636
|
import { html as html3, LitElement as LitElement3, nothing as nothing3 } from "lit";
|
|
5421
6637
|
import { styleMap as styleMap3 } from "lit/directives/style-map.js";
|
|
5422
6638
|
import { unsafeHTML as unsafeHTML2 } from "lit/directives/unsafe-html.js";
|
|
5423
|
-
|
|
5424
|
-
// ../adaptives/adaptive-nav/dist/resolveNavTarget.js
|
|
5425
6639
|
function resolveNavTarget(args) {
|
|
5426
6640
|
const { href, external, windowOrigin, isIframe } = args;
|
|
5427
6641
|
const isOpaqueOrigin = windowOrigin === "null";
|
|
@@ -5443,51 +6657,24 @@ function resolveNavTarget(args) {
|
|
|
5443
6657
|
return { kind: "spa", url };
|
|
5444
6658
|
}
|
|
5445
6659
|
function detectIsIframe() {
|
|
5446
|
-
if (typeof window === "undefined")
|
|
5447
|
-
return false;
|
|
6660
|
+
if (typeof window === "undefined") return false;
|
|
5448
6661
|
try {
|
|
5449
6662
|
return window !== window.top;
|
|
5450
6663
|
} catch {
|
|
5451
6664
|
return true;
|
|
5452
6665
|
}
|
|
5453
6666
|
}
|
|
5454
|
-
|
|
5455
|
-
// ../adaptives/adaptive-nav/dist/NavWidgetLit.js
|
|
5456
|
-
var __classPrivateFieldGet2 = function(receiver, state, kind, f) {
|
|
5457
|
-
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
5458
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
5459
|
-
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
5460
|
-
};
|
|
5461
|
-
var __classPrivateFieldSet2 = function(receiver, state, value, kind, f) {
|
|
5462
|
-
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
5463
|
-
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
5464
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
5465
|
-
return kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value), value;
|
|
5466
|
-
};
|
|
5467
|
-
var _NavWidgetLit_instances;
|
|
5468
|
-
var _NavWidgetLit_contextUnsub;
|
|
5469
|
-
var _NavWidgetLit_accumulatorUnsub;
|
|
5470
|
-
var _NavWidgetLit_subscribeRuntime;
|
|
5471
|
-
var _NavWidgetLit_unsubscribeRuntime;
|
|
5472
|
-
var _NavWidgetLit_getVisibleTips;
|
|
5473
|
-
var _NavWidgetLit_getResolvedTheme;
|
|
5474
|
-
var _NavWidgetLit_handleToggle;
|
|
5475
|
-
var _NavWidgetLit_handleNavigate;
|
|
5476
|
-
var _NavWidgetLit_handleFocusAnchor;
|
|
5477
|
-
var _NavWidgetLit_publishEvent;
|
|
5478
|
-
var _NavWidgetLit_renderTipItem;
|
|
5479
6667
|
var TOKEN_PURPLE_4 = "#6a59ce";
|
|
5480
6668
|
var TOKEN_SLATE_GREY_7 = "#677384";
|
|
5481
6669
|
var TOKEN_SLATE_GREY_8 = "#87919f";
|
|
5482
6670
|
function escapeHtml(str) {
|
|
5483
6671
|
return str.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
|
5484
6672
|
}
|
|
5485
|
-
function
|
|
5486
|
-
return
|
|
6673
|
+
function renderIcon22(emoji) {
|
|
6674
|
+
return renderIcon2(emoji) || escapeHtml(emoji);
|
|
5487
6675
|
}
|
|
5488
6676
|
function routeMatchesCurrent(routes) {
|
|
5489
|
-
if (typeof window === "undefined")
|
|
5490
|
-
return false;
|
|
6677
|
+
if (typeof window === "undefined") return false;
|
|
5491
6678
|
const current = window.location.pathname;
|
|
5492
6679
|
return routes.some((route) => {
|
|
5493
6680
|
const routePath = route.split("?")[0].split("#")[0];
|
|
@@ -5506,52 +6693,63 @@ function pulseElement(el) {
|
|
|
5506
6693
|
}
|
|
5507
6694
|
function resolveTheme2(theme) {
|
|
5508
6695
|
var _a3;
|
|
5509
|
-
if (theme === "dark")
|
|
5510
|
-
|
|
5511
|
-
if (theme === "light")
|
|
5512
|
-
return "light";
|
|
6696
|
+
if (theme === "dark") return "dark";
|
|
6697
|
+
if (theme === "light") return "light";
|
|
5513
6698
|
if (typeof window !== "undefined") {
|
|
5514
6699
|
return ((_a3 = window.matchMedia) == null ? void 0 : _a3.call(window, "(prefers-color-scheme: dark)").matches) ? "dark" : "light";
|
|
5515
6700
|
}
|
|
5516
6701
|
return "light";
|
|
5517
6702
|
}
|
|
6703
|
+
var _contextUnsub;
|
|
6704
|
+
var _accumulatorUnsub;
|
|
6705
|
+
var _NavWidgetLit_instances;
|
|
6706
|
+
var subscribeRuntime_fn;
|
|
6707
|
+
var unsubscribeRuntime_fn;
|
|
6708
|
+
var getVisibleTips_fn;
|
|
6709
|
+
var getResolvedTheme_fn;
|
|
6710
|
+
var handleToggle_fn;
|
|
6711
|
+
var handleNavigate_fn;
|
|
6712
|
+
var handleFocusAnchor_fn;
|
|
6713
|
+
var publishEvent_fn;
|
|
6714
|
+
var renderTipItem_fn;
|
|
5518
6715
|
var NavWidgetLit = class extends LitElement3 {
|
|
5519
6716
|
constructor() {
|
|
5520
6717
|
super(...arguments);
|
|
5521
|
-
|
|
6718
|
+
__privateAdd3(this, _NavWidgetLit_instances);
|
|
5522
6719
|
this.config = { expandBehavior: "single", theme: "auto", actions: [] };
|
|
5523
6720
|
this.runtime = void 0;
|
|
5524
6721
|
this.instanceId = "nav-widget";
|
|
5525
6722
|
this._expandedIds = /* @__PURE__ */ new Set();
|
|
5526
6723
|
this._renderTick = 0;
|
|
5527
6724
|
this._hoveredId = null;
|
|
5528
|
-
|
|
5529
|
-
|
|
6725
|
+
__privateAdd3(this, _contextUnsub, null);
|
|
6726
|
+
__privateAdd3(this, _accumulatorUnsub, null);
|
|
5530
6727
|
}
|
|
6728
|
+
// ---------- No shadow DOM — inherit host CSS variables --------------------
|
|
5531
6729
|
createRenderRoot() {
|
|
5532
6730
|
return this;
|
|
5533
6731
|
}
|
|
5534
6732
|
// ---------- Lifecycle: connectedCallback ---------------------------------
|
|
5535
6733
|
connectedCallback() {
|
|
5536
6734
|
super.connectedCallback();
|
|
5537
|
-
|
|
6735
|
+
__privateMethod2(this, _NavWidgetLit_instances, subscribeRuntime_fn).call(this);
|
|
5538
6736
|
}
|
|
5539
6737
|
// ---------- Lifecycle: disconnectedCallback ------------------------------
|
|
5540
6738
|
disconnectedCallback() {
|
|
5541
6739
|
super.disconnectedCallback();
|
|
5542
|
-
|
|
6740
|
+
__privateMethod2(this, _NavWidgetLit_instances, unsubscribeRuntime_fn).call(this);
|
|
5543
6741
|
}
|
|
5544
6742
|
// ---------- Lifecycle: updated -------------------------------------------
|
|
5545
6743
|
updated(changed) {
|
|
5546
6744
|
if (changed.has("runtime")) {
|
|
5547
|
-
|
|
5548
|
-
|
|
6745
|
+
__privateMethod2(this, _NavWidgetLit_instances, unsubscribeRuntime_fn).call(this);
|
|
6746
|
+
__privateMethod2(this, _NavWidgetLit_instances, subscribeRuntime_fn).call(this);
|
|
5549
6747
|
}
|
|
5550
6748
|
}
|
|
5551
6749
|
// ---------- Render --------------------------------------------------------
|
|
5552
6750
|
render() {
|
|
5553
|
-
const visibleTips =
|
|
5554
|
-
const theme =
|
|
6751
|
+
const visibleTips = __privateMethod2(this, _NavWidgetLit_instances, getVisibleTips_fn).call(this);
|
|
6752
|
+
const theme = __privateMethod2(this, _NavWidgetLit_instances, getResolvedTheme_fn).call(this);
|
|
5555
6753
|
const containerStyle = styleMap3({
|
|
5556
6754
|
fontFamily: "var(--sc-font-family, system-ui, -apple-system, sans-serif)",
|
|
5557
6755
|
maxWidth: "100%",
|
|
@@ -5608,40 +6806,44 @@ var NavWidgetLit = class extends LitElement3 {
|
|
|
5608
6806
|
data-adaptive-type="adaptive-nav"
|
|
5609
6807
|
>
|
|
5610
6808
|
<div style=${accordionStyle}>
|
|
5611
|
-
${hasCategories ? Array.from(categoryGroups.entries()).map(
|
|
6809
|
+
${hasCategories ? Array.from(categoryGroups.entries()).map(
|
|
6810
|
+
([category, items]) => html3`
|
|
5612
6811
|
${category ? html3`<div style=${categoryHeaderStyle} data-category-header=${category}>${category}</div>` : nothing3}
|
|
5613
|
-
${items.map((tip, idx) =>
|
|
5614
|
-
`
|
|
6812
|
+
${items.map((tip, idx) => __privateMethod2(this, _NavWidgetLit_instances, renderTipItem_fn).call(this, tip, idx, items.length))}
|
|
6813
|
+
`
|
|
6814
|
+
) : visibleTips.map((tip, idx) => __privateMethod2(this, _NavWidgetLit_instances, renderTipItem_fn).call(this, tip, idx, visibleTips.length))}
|
|
5615
6815
|
</div>
|
|
5616
6816
|
</div>
|
|
5617
6817
|
`;
|
|
5618
6818
|
}
|
|
5619
6819
|
};
|
|
5620
|
-
|
|
6820
|
+
_contextUnsub = /* @__PURE__ */ new WeakMap();
|
|
6821
|
+
_accumulatorUnsub = /* @__PURE__ */ new WeakMap();
|
|
6822
|
+
_NavWidgetLit_instances = /* @__PURE__ */ new WeakSet();
|
|
6823
|
+
subscribeRuntime_fn = function() {
|
|
5621
6824
|
var _a3;
|
|
5622
|
-
if (!this.runtime)
|
|
5623
|
-
|
|
5624
|
-
__classPrivateFieldSet2(this, _NavWidgetLit_contextUnsub, this.runtime.context.subscribe(() => {
|
|
6825
|
+
if (!this.runtime) return;
|
|
6826
|
+
__privateSet3(this, _contextUnsub, this.runtime.context.subscribe(() => {
|
|
5625
6827
|
this._renderTick += 1;
|
|
5626
|
-
})
|
|
6828
|
+
}));
|
|
5627
6829
|
if ((_a3 = this.runtime.accumulator) == null ? void 0 : _a3.subscribe) {
|
|
5628
|
-
|
|
6830
|
+
__privateSet3(this, _accumulatorUnsub, this.runtime.accumulator.subscribe(() => {
|
|
5629
6831
|
this._renderTick += 1;
|
|
5630
|
-
})
|
|
6832
|
+
}));
|
|
5631
6833
|
}
|
|
5632
|
-
}
|
|
6834
|
+
};
|
|
6835
|
+
unsubscribeRuntime_fn = function() {
|
|
5633
6836
|
var _a3, _b;
|
|
5634
|
-
(_a3 =
|
|
5635
|
-
|
|
5636
|
-
(_b =
|
|
5637
|
-
|
|
5638
|
-
}
|
|
6837
|
+
(_a3 = __privateGet3(this, _contextUnsub)) == null ? void 0 : _a3.call(this);
|
|
6838
|
+
__privateSet3(this, _contextUnsub, null);
|
|
6839
|
+
(_b = __privateGet3(this, _accumulatorUnsub)) == null ? void 0 : _b.call(this);
|
|
6840
|
+
__privateSet3(this, _accumulatorUnsub, null);
|
|
6841
|
+
};
|
|
6842
|
+
getVisibleTips_fn = function() {
|
|
5639
6843
|
void this._renderTick;
|
|
5640
|
-
if (!this.runtime)
|
|
5641
|
-
return this.config.actions;
|
|
6844
|
+
if (!this.runtime) return this.config.actions;
|
|
5642
6845
|
return this.config.actions.filter((tip) => {
|
|
5643
|
-
if (!tip.triggerWhen)
|
|
5644
|
-
return true;
|
|
6846
|
+
if (!tip.triggerWhen) return true;
|
|
5645
6847
|
try {
|
|
5646
6848
|
const result = this.runtime.evaluateSync(tip.triggerWhen);
|
|
5647
6849
|
return result.value;
|
|
@@ -5649,15 +6851,17 @@ _NavWidgetLit_contextUnsub = /* @__PURE__ */ new WeakMap(), _NavWidgetLit_accumu
|
|
|
5649
6851
|
return false;
|
|
5650
6852
|
}
|
|
5651
6853
|
});
|
|
5652
|
-
}
|
|
6854
|
+
};
|
|
6855
|
+
getResolvedTheme_fn = function() {
|
|
5653
6856
|
return resolveTheme2(this.config.theme);
|
|
5654
|
-
}
|
|
6857
|
+
};
|
|
6858
|
+
handleToggle_fn = function(id) {
|
|
5655
6859
|
const wasExpanded = this._expandedIds.has(id);
|
|
5656
6860
|
let next;
|
|
5657
6861
|
if (this.config.expandBehavior === "single") {
|
|
5658
6862
|
for (const prevId of this._expandedIds) {
|
|
5659
6863
|
if (prevId !== id) {
|
|
5660
|
-
|
|
6864
|
+
__privateMethod2(this, _NavWidgetLit_instances, publishEvent_fn).call(this, "nav:toggled", {
|
|
5661
6865
|
tipId: prevId,
|
|
5662
6866
|
expanded: false
|
|
5663
6867
|
});
|
|
@@ -5672,20 +6876,22 @@ _NavWidgetLit_contextUnsub = /* @__PURE__ */ new WeakMap(), _NavWidgetLit_accumu
|
|
|
5672
6876
|
next.add(id);
|
|
5673
6877
|
}
|
|
5674
6878
|
}
|
|
5675
|
-
|
|
6879
|
+
__privateMethod2(this, _NavWidgetLit_instances, publishEvent_fn).call(this, "nav:toggled", {
|
|
5676
6880
|
tipId: id,
|
|
5677
6881
|
expanded: !wasExpanded
|
|
5678
6882
|
});
|
|
5679
6883
|
this._expandedIds = next;
|
|
5680
|
-
}
|
|
6884
|
+
};
|
|
6885
|
+
handleNavigate_fn = function(href, external) {
|
|
5681
6886
|
const normalized = href.trim().toLowerCase();
|
|
5682
|
-
if (normalized.startsWith("javascript:") || normalized.startsWith("data:"))
|
|
5683
|
-
|
|
5684
|
-
|
|
5685
|
-
|
|
5686
|
-
|
|
5687
|
-
|
|
5688
|
-
|
|
6887
|
+
if (normalized.startsWith("javascript:") || normalized.startsWith("data:")) return;
|
|
6888
|
+
__privateMethod2(this, _NavWidgetLit_instances, publishEvent_fn).call(this, "nav:tip_clicked", { href, external });
|
|
6889
|
+
this.dispatchEvent(
|
|
6890
|
+
new CustomEvent("nav-tip-clicked", {
|
|
6891
|
+
bubbles: true,
|
|
6892
|
+
detail: { href, external, instanceId: this.instanceId }
|
|
6893
|
+
})
|
|
6894
|
+
);
|
|
5689
6895
|
const target = resolveNavTarget({
|
|
5690
6896
|
href,
|
|
5691
6897
|
external,
|
|
@@ -5705,34 +6911,38 @@ _NavWidgetLit_contextUnsub = /* @__PURE__ */ new WeakMap(), _NavWidgetLit_accumu
|
|
|
5705
6911
|
window.history.pushState(null, "", target.url.toString());
|
|
5706
6912
|
window.dispatchEvent(new PopStateEvent("popstate"));
|
|
5707
6913
|
}
|
|
5708
|
-
}
|
|
6914
|
+
};
|
|
6915
|
+
handleFocusAnchor_fn = function(anchor) {
|
|
5709
6916
|
const el = document.querySelector(anchor.selector);
|
|
5710
|
-
if (!(el instanceof HTMLElement))
|
|
5711
|
-
|
|
5712
|
-
__classPrivateFieldGet2(this, _NavWidgetLit_instances, "m", _NavWidgetLit_publishEvent).call(this, "nav:tip_focused", {
|
|
6917
|
+
if (!(el instanceof HTMLElement)) return;
|
|
6918
|
+
__privateMethod2(this, _NavWidgetLit_instances, publishEvent_fn).call(this, "nav:tip_focused", {
|
|
5713
6919
|
selector: anchor.selector,
|
|
5714
6920
|
route: anchor.route
|
|
5715
6921
|
});
|
|
5716
|
-
this.dispatchEvent(
|
|
5717
|
-
|
|
5718
|
-
|
|
5719
|
-
|
|
6922
|
+
this.dispatchEvent(
|
|
6923
|
+
new CustomEvent("nav-tip-focused", {
|
|
6924
|
+
bubbles: true,
|
|
6925
|
+
detail: { selector: anchor.selector, instanceId: this.instanceId }
|
|
6926
|
+
})
|
|
6927
|
+
);
|
|
5720
6928
|
el.scrollIntoView({ behavior: "smooth", block: "center" });
|
|
5721
6929
|
pulseElement(el);
|
|
5722
6930
|
setTimeout(() => el.focus(), 400);
|
|
5723
|
-
}
|
|
6931
|
+
};
|
|
6932
|
+
publishEvent_fn = function(name, props) {
|
|
5724
6933
|
var _a3;
|
|
5725
6934
|
(_a3 = this.runtime) == null ? void 0 : _a3.events.publish(name, {
|
|
5726
6935
|
instanceId: this.instanceId,
|
|
5727
6936
|
timestamp: Date.now(),
|
|
5728
6937
|
...props
|
|
5729
6938
|
});
|
|
5730
|
-
}
|
|
6939
|
+
};
|
|
6940
|
+
renderTipItem_fn = function(tip, index, total) {
|
|
5731
6941
|
const { id, title, description, href, icon, external, anchor, category: _cat } = tip.config;
|
|
5732
6942
|
const isExpanded = this._expandedIds.has(id);
|
|
5733
6943
|
const isLast = index === total - 1;
|
|
5734
6944
|
const isHovered = this._hoveredId === id;
|
|
5735
|
-
const theme =
|
|
6945
|
+
const theme = __privateMethod2(this, _NavWidgetLit_instances, getResolvedTheme_fn).call(this);
|
|
5736
6946
|
const effectiveHref = anchor ? Array.isArray(anchor.route) ? anchor.route[0] : anchor.route : href;
|
|
5737
6947
|
const isSamePage = anchor ? routeMatchesCurrent(Array.isArray(anchor.route) ? anchor.route : [anchor.route]) : effectiveHref ? routeMatchesCurrent([effectiveHref]) : false;
|
|
5738
6948
|
const hasSelector = (anchor == null ? void 0 : anchor.selector) && anchor.selector !== "*";
|
|
@@ -5811,9 +7021,9 @@ _NavWidgetLit_contextUnsub = /* @__PURE__ */ new WeakMap(), _NavWidgetLit_accumu
|
|
|
5811
7021
|
e.preventDefault();
|
|
5812
7022
|
e.stopPropagation();
|
|
5813
7023
|
if (isFocusAction && anchor) {
|
|
5814
|
-
|
|
7024
|
+
__privateMethod2(this, _NavWidgetLit_instances, handleFocusAnchor_fn).call(this, anchor);
|
|
5815
7025
|
} else if (effectiveHref) {
|
|
5816
|
-
|
|
7026
|
+
__privateMethod2(this, _NavWidgetLit_instances, handleNavigate_fn).call(this, effectiveHref, external != null ? external : false);
|
|
5817
7027
|
}
|
|
5818
7028
|
};
|
|
5819
7029
|
return html3`
|
|
@@ -5825,7 +7035,7 @@ _NavWidgetLit_contextUnsub = /* @__PURE__ */ new WeakMap(), _NavWidgetLit_accumu
|
|
|
5825
7035
|
type="button"
|
|
5826
7036
|
style=${headerStyle}
|
|
5827
7037
|
aria-expanded=${isExpanded}
|
|
5828
|
-
@click=${() =>
|
|
7038
|
+
@click=${() => __privateMethod2(this, _NavWidgetLit_instances, handleToggle_fn).call(this, id)}
|
|
5829
7039
|
@mouseenter=${() => {
|
|
5830
7040
|
this._hoveredId = id;
|
|
5831
7041
|
}}
|
|
@@ -5833,7 +7043,7 @@ _NavWidgetLit_contextUnsub = /* @__PURE__ */ new WeakMap(), _NavWidgetLit_accumu
|
|
|
5833
7043
|
this._hoveredId = null;
|
|
5834
7044
|
}}
|
|
5835
7045
|
>
|
|
5836
|
-
${icon ? html3`<span style=${iconStyle}>${unsafeHTML2(
|
|
7046
|
+
${icon ? html3`<span style=${iconStyle}>${unsafeHTML2(renderIcon22(icon))}</span>` : nothing3}
|
|
5837
7047
|
<span>${title}</span>
|
|
5838
7048
|
<span style=${chevronStyle}>${"\u203A"}</span>
|
|
5839
7049
|
</button>
|
|
@@ -5864,19 +7074,18 @@ NavWidgetLit.properties = {
|
|
|
5864
7074
|
};
|
|
5865
7075
|
var TAG_NAME2 = "syntro-nav-tips";
|
|
5866
7076
|
function registerNavWidgetLit() {
|
|
5867
|
-
if (typeof window === "undefined")
|
|
5868
|
-
return;
|
|
7077
|
+
if (typeof window === "undefined") return;
|
|
5869
7078
|
if (!customElements.get(TAG_NAME2)) {
|
|
5870
7079
|
customElements.define(TAG_NAME2, NavWidgetLit);
|
|
5871
7080
|
}
|
|
5872
7081
|
}
|
|
5873
|
-
|
|
5874
|
-
// ../adaptives/adaptive-nav/dist/runtime.js
|
|
5875
7082
|
var executeScrollTo = async (action, context) => {
|
|
5876
7083
|
var _a3, _b, _c, _d;
|
|
5877
7084
|
const anchorEl = context.resolveAnchor(action.anchorId);
|
|
5878
7085
|
if (!anchorEl) {
|
|
5879
|
-
console.error(
|
|
7086
|
+
console.error(
|
|
7087
|
+
`[adaptive-nav] Anchor not found for scrollTo, skipping: ${action.anchorId.selector}`
|
|
7088
|
+
);
|
|
5880
7089
|
return { cleanup: () => {
|
|
5881
7090
|
} };
|
|
5882
7091
|
}
|
|
@@ -5898,8 +7107,7 @@ var executeScrollTo = async (action, context) => {
|
|
|
5898
7107
|
};
|
|
5899
7108
|
function navigateWithFrameworkRouter(url) {
|
|
5900
7109
|
var _a3, _b, _c, _d;
|
|
5901
|
-
if (typeof window === "undefined")
|
|
5902
|
-
return false;
|
|
7110
|
+
if (typeof window === "undefined") return false;
|
|
5903
7111
|
const w2 = window;
|
|
5904
7112
|
try {
|
|
5905
7113
|
const nextRouter = (_a3 = w2.next) == null ? void 0 : _a3.router;
|
|
@@ -5970,14 +7178,18 @@ var NavWidgetLitMountable = {
|
|
|
5970
7178
|
mount(container, config) {
|
|
5971
7179
|
registerNavWidgetLit();
|
|
5972
7180
|
const el = document.createElement("syntro-nav-tips");
|
|
5973
|
-
const {
|
|
7181
|
+
const {
|
|
7182
|
+
runtime: runtime22,
|
|
7183
|
+
instanceId = "nav-widget",
|
|
7184
|
+
...navConfig
|
|
7185
|
+
} = config != null ? config : {
|
|
5974
7186
|
expandBehavior: "single",
|
|
5975
7187
|
theme: "auto",
|
|
5976
7188
|
actions: []
|
|
5977
7189
|
};
|
|
5978
7190
|
Object.assign(el, {
|
|
5979
7191
|
config: navConfig,
|
|
5980
|
-
runtime:
|
|
7192
|
+
runtime: runtime22,
|
|
5981
7193
|
instanceId
|
|
5982
7194
|
});
|
|
5983
7195
|
container.appendChild(el);
|
|
@@ -7248,9 +8460,9 @@ function resolveInteractiveTag(elements, directTag) {
|
|
|
7248
8460
|
if (!elements)
|
|
7249
8461
|
return directTag;
|
|
7250
8462
|
for (const el of elements) {
|
|
7251
|
-
const
|
|
7252
|
-
if (
|
|
7253
|
-
return
|
|
8463
|
+
const tag3 = el.tag_name;
|
|
8464
|
+
if (tag3 && INTERACTIVE_TAGS.has(tag3))
|
|
8465
|
+
return tag3;
|
|
7254
8466
|
}
|
|
7255
8467
|
return directTag;
|
|
7256
8468
|
}
|
|
@@ -8190,7 +9402,7 @@ function error(prefix, message, data) {
|
|
|
8190
9402
|
}
|
|
8191
9403
|
|
|
8192
9404
|
// src/version.ts
|
|
8193
|
-
var SDK_VERSION = "2.8.0-canary.
|
|
9405
|
+
var SDK_VERSION = "2.8.0-canary.166";
|
|
8194
9406
|
|
|
8195
9407
|
// src/types.ts
|
|
8196
9408
|
var SDK_SCHEMA_VERSION = "2.0";
|
|
@@ -8567,7 +9779,7 @@ function fireTriggeredForTiles(tiles) {
|
|
|
8567
9779
|
tracker.trackTriggered(tile.id, (_b = tile.widget) != null ? _b : "unknown");
|
|
8568
9780
|
}
|
|
8569
9781
|
}
|
|
8570
|
-
var _controller, _controllerUnsub, _overlayContainer, _portalRoot, _batchHandle, _adoptedInitial, _runVersion, _rawConfig, _prevActionsJson, _prevTilesJson, _prevThemeJson, _prevLauncherJson, _derivedFetcher, _experimentUnsub,
|
|
9782
|
+
var _controller, _controllerUnsub, _overlayContainer, _portalRoot, _batchHandle, _adoptedInitial, _runVersion, _rawConfig, _prevActionsJson, _prevTilesJson, _prevThemeJson, _prevLauncherJson, _derivedFetcher, _experimentUnsub, _accumulatorUnsub2, _contextUnsub2, _eventBusUnsub, _onUrlChange, _themeCtrl, _runtimeProvider, _SmartCanvasElementLit_instances, rebuildFetcher_fn, buildFetcherOptions_fn, _loadConfigVersion, refilterTiles_fn, runActionLifecycle_fn, startUrlTracking_fn, stopUrlTracking_fn, subscribeRuntimeReactivity_fn, applyDisplayMode_fn, unsubscribeRuntimeReactivity_fn, subscribeCanvasRequestOpen_fn, _onCanvasToggle;
|
|
8571
9783
|
var SmartCanvasElementLit = class extends LitElement9 {
|
|
8572
9784
|
// ---------- Constructor --------------------------------------------------
|
|
8573
9785
|
constructor() {
|
|
@@ -8637,8 +9849,8 @@ var SmartCanvasElementLit = class extends LitElement9 {
|
|
|
8637
9849
|
__privateAdd(this, _derivedFetcher, null);
|
|
8638
9850
|
// Subscriptions
|
|
8639
9851
|
__privateAdd(this, _experimentUnsub, null);
|
|
8640
|
-
__privateAdd(this,
|
|
8641
|
-
__privateAdd(this,
|
|
9852
|
+
__privateAdd(this, _accumulatorUnsub2, null);
|
|
9853
|
+
__privateAdd(this, _contextUnsub2, null);
|
|
8642
9854
|
__privateAdd(this, _eventBusUnsub, null);
|
|
8643
9855
|
// Stable arrow field for URL tracking (popstate + hashchange)
|
|
8644
9856
|
__privateAdd(this, _onUrlChange, () => {
|
|
@@ -8705,10 +9917,10 @@ var SmartCanvasElementLit = class extends LitElement9 {
|
|
|
8705
9917
|
__privateSet(this, _controllerUnsub, null);
|
|
8706
9918
|
(_b = __privateGet(this, _experimentUnsub)) == null ? void 0 : _b.call(this);
|
|
8707
9919
|
__privateSet(this, _experimentUnsub, null);
|
|
8708
|
-
(_c = __privateGet(this,
|
|
8709
|
-
__privateSet(this,
|
|
8710
|
-
(_d = __privateGet(this,
|
|
8711
|
-
__privateSet(this,
|
|
9920
|
+
(_c = __privateGet(this, _accumulatorUnsub2)) == null ? void 0 : _c.call(this);
|
|
9921
|
+
__privateSet(this, _accumulatorUnsub2, null);
|
|
9922
|
+
(_d = __privateGet(this, _contextUnsub2)) == null ? void 0 : _d.call(this);
|
|
9923
|
+
__privateSet(this, _contextUnsub2, null);
|
|
8712
9924
|
(_e2 = __privateGet(this, _eventBusUnsub)) == null ? void 0 : _e2.call(this);
|
|
8713
9925
|
__privateSet(this, _eventBusUnsub, null);
|
|
8714
9926
|
__privateMethod(this, _SmartCanvasElementLit_instances, stopUrlTracking_fn).call(this);
|
|
@@ -8943,8 +10155,8 @@ _prevThemeJson = new WeakMap();
|
|
|
8943
10155
|
_prevLauncherJson = new WeakMap();
|
|
8944
10156
|
_derivedFetcher = new WeakMap();
|
|
8945
10157
|
_experimentUnsub = new WeakMap();
|
|
8946
|
-
|
|
8947
|
-
|
|
10158
|
+
_accumulatorUnsub2 = new WeakMap();
|
|
10159
|
+
_contextUnsub2 = new WeakMap();
|
|
8948
10160
|
_eventBusUnsub = new WeakMap();
|
|
8949
10161
|
_onUrlChange = new WeakMap();
|
|
8950
10162
|
_themeCtrl = new WeakMap();
|
|
@@ -9039,12 +10251,12 @@ stopUrlTracking_fn = function() {
|
|
|
9039
10251
|
subscribeRuntimeReactivity_fn = function() {
|
|
9040
10252
|
if (!this.runtime) return;
|
|
9041
10253
|
if (this.runtime.accumulator) {
|
|
9042
|
-
__privateSet(this,
|
|
10254
|
+
__privateSet(this, _accumulatorUnsub2, this.runtime.accumulator.subscribe(() => {
|
|
9043
10255
|
__privateMethod(this, _SmartCanvasElementLit_instances, refilterTiles_fn).call(this);
|
|
9044
10256
|
}));
|
|
9045
10257
|
}
|
|
9046
10258
|
if (this.runtime.context) {
|
|
9047
|
-
__privateSet(this,
|
|
10259
|
+
__privateSet(this, _contextUnsub2, this.runtime.context.subscribe((ctx) => {
|
|
9048
10260
|
var _a3;
|
|
9049
10261
|
const newUrl = (_a3 = ctx.page) == null ? void 0 : _a3.url;
|
|
9050
10262
|
if (newUrl && newUrl !== this._pageUrl) {
|
|
@@ -9076,10 +10288,10 @@ applyDisplayMode_fn = function() {
|
|
|
9076
10288
|
};
|
|
9077
10289
|
unsubscribeRuntimeReactivity_fn = function() {
|
|
9078
10290
|
var _a3, _b;
|
|
9079
|
-
(_a3 = __privateGet(this,
|
|
9080
|
-
__privateSet(this,
|
|
9081
|
-
(_b = __privateGet(this,
|
|
9082
|
-
__privateSet(this,
|
|
10291
|
+
(_a3 = __privateGet(this, _accumulatorUnsub2)) == null ? void 0 : _a3.call(this);
|
|
10292
|
+
__privateSet(this, _accumulatorUnsub2, null);
|
|
10293
|
+
(_b = __privateGet(this, _contextUnsub2)) == null ? void 0 : _b.call(this);
|
|
10294
|
+
__privateSet(this, _contextUnsub2, null);
|
|
9083
10295
|
};
|
|
9084
10296
|
subscribeCanvasRequestOpen_fn = function() {
|
|
9085
10297
|
var _a3;
|
|
@@ -9964,15 +11176,15 @@ onClickNotification_fn = function(notification) {
|
|
|
9964
11176
|
);
|
|
9965
11177
|
};
|
|
9966
11178
|
onMouseEnter_fn = function(e) {
|
|
9967
|
-
const
|
|
9968
|
-
|
|
9969
|
-
const bar =
|
|
11179
|
+
const card3 = e.currentTarget;
|
|
11180
|
+
card3.style.transform = "translateY(-1px)";
|
|
11181
|
+
const bar = card3.querySelector(".syntro-toast-progress");
|
|
9970
11182
|
if (bar) bar.classList.add("paused");
|
|
9971
11183
|
};
|
|
9972
11184
|
onMouseLeave_fn = function(e) {
|
|
9973
|
-
const
|
|
9974
|
-
|
|
9975
|
-
const bar =
|
|
11185
|
+
const card3 = e.currentTarget;
|
|
11186
|
+
card3.style.transform = "translateY(0)";
|
|
11187
|
+
const bar = card3.querySelector(".syntro-toast-progress");
|
|
9976
11188
|
if (bar) bar.classList.remove("paused");
|
|
9977
11189
|
};
|
|
9978
11190
|
renderToast_fn = function(notif) {
|
|
@@ -12940,9 +14152,9 @@ var CdnFetcher = class {
|
|
|
12940
14152
|
if (!response.ok) {
|
|
12941
14153
|
throw new Error(`[SmartCanvas] Failed to fetch config from CDN (${response.status})`);
|
|
12942
14154
|
}
|
|
12943
|
-
const
|
|
14155
|
+
const text3 = await response.text();
|
|
12944
14156
|
if (this.integrity) {
|
|
12945
|
-
const hash = await computeSha384(
|
|
14157
|
+
const hash = await computeSha384(text3);
|
|
12946
14158
|
const expected = this.integrity.replace("sha384-", "");
|
|
12947
14159
|
if (hash !== expected) {
|
|
12948
14160
|
throw new Error(
|
|
@@ -12950,7 +14162,7 @@ var CdnFetcher = class {
|
|
|
12950
14162
|
);
|
|
12951
14163
|
}
|
|
12952
14164
|
}
|
|
12953
|
-
const config = JSON.parse(
|
|
14165
|
+
const config = JSON.parse(text3);
|
|
12954
14166
|
const fetchTimeMs = performance.now() - start;
|
|
12955
14167
|
const cacheControl = response.headers.get("cache-control");
|
|
12956
14168
|
const age = response.headers.get("age");
|
|
@@ -14712,8 +15924,8 @@ function sanitizeWithFallback(html14) {
|
|
|
14712
15924
|
const toRemove = [];
|
|
14713
15925
|
while (walker.nextNode()) {
|
|
14714
15926
|
const el = walker.currentNode;
|
|
14715
|
-
const
|
|
14716
|
-
if (!allowed.has(
|
|
15927
|
+
const tag3 = el.tagName.toLowerCase();
|
|
15928
|
+
if (!allowed.has(tag3)) {
|
|
14717
15929
|
toRemove.push(el);
|
|
14718
15930
|
continue;
|
|
14719
15931
|
}
|
|
@@ -16461,47 +17673,47 @@ function needsMigration(config) {
|
|
|
16461
17673
|
}
|
|
16462
17674
|
|
|
16463
17675
|
// src/context/schema.ts
|
|
16464
|
-
import { z as
|
|
16465
|
-
var PageContextZ =
|
|
16466
|
-
url:
|
|
16467
|
-
routeId:
|
|
16468
|
-
title:
|
|
16469
|
-
locale:
|
|
17676
|
+
import { z as z3 } from "zod";
|
|
17677
|
+
var PageContextZ = z3.object({
|
|
17678
|
+
url: z3.string(),
|
|
17679
|
+
routeId: z3.string().optional(),
|
|
17680
|
+
title: z3.string().optional(),
|
|
17681
|
+
locale: z3.string().optional()
|
|
16470
17682
|
});
|
|
16471
|
-
var PageHistoryEntryZ =
|
|
16472
|
-
url:
|
|
16473
|
-
ts:
|
|
17683
|
+
var PageHistoryEntryZ = z3.object({
|
|
17684
|
+
url: z3.string(),
|
|
17685
|
+
ts: z3.number()
|
|
16474
17686
|
});
|
|
16475
|
-
var SessionContextZ =
|
|
16476
|
-
sessionId:
|
|
16477
|
-
startTs:
|
|
16478
|
-
pageHistory:
|
|
17687
|
+
var SessionContextZ = z3.object({
|
|
17688
|
+
sessionId: z3.string(),
|
|
17689
|
+
startTs: z3.number(),
|
|
17690
|
+
pageHistory: z3.array(PageHistoryEntryZ).optional()
|
|
16479
17691
|
});
|
|
16480
|
-
var ViewportContextZ =
|
|
16481
|
-
width:
|
|
16482
|
-
height:
|
|
17692
|
+
var ViewportContextZ = z3.object({
|
|
17693
|
+
width: z3.number(),
|
|
17694
|
+
height: z3.number()
|
|
16483
17695
|
});
|
|
16484
|
-
var BoundingBoxZ =
|
|
16485
|
-
x:
|
|
16486
|
-
y:
|
|
16487
|
-
w:
|
|
16488
|
-
h:
|
|
17696
|
+
var BoundingBoxZ = z3.object({
|
|
17697
|
+
x: z3.number(),
|
|
17698
|
+
y: z3.number(),
|
|
17699
|
+
w: z3.number(),
|
|
17700
|
+
h: z3.number()
|
|
16489
17701
|
});
|
|
16490
|
-
var AnchorStateZ =
|
|
16491
|
-
anchorId:
|
|
16492
|
-
present:
|
|
16493
|
-
visible:
|
|
17702
|
+
var AnchorStateZ = z3.object({
|
|
17703
|
+
anchorId: z3.string(),
|
|
17704
|
+
present: z3.boolean(),
|
|
17705
|
+
visible: z3.boolean().optional(),
|
|
16494
17706
|
boundingBox: BoundingBoxZ.optional()
|
|
16495
17707
|
});
|
|
16496
|
-
var AugmentationZ =
|
|
16497
|
-
|
|
16498
|
-
|
|
17708
|
+
var AugmentationZ = z3.record(
|
|
17709
|
+
z3.string(),
|
|
17710
|
+
z3.union([z3.number(), z3.string(), z3.boolean(), z3.undefined()])
|
|
16499
17711
|
);
|
|
16500
|
-
var RuntimeContextZ =
|
|
17712
|
+
var RuntimeContextZ = z3.object({
|
|
16501
17713
|
page: PageContextZ,
|
|
16502
17714
|
session: SessionContextZ,
|
|
16503
17715
|
viewport: ViewportContextZ,
|
|
16504
|
-
anchors:
|
|
17716
|
+
anchors: z3.array(AnchorStateZ).optional(),
|
|
16505
17717
|
augmented: AugmentationZ.optional()
|
|
16506
17718
|
});
|
|
16507
17719
|
function validateRuntimeContext(data) {
|
|
@@ -16672,19 +17884,19 @@ var RuntimeEventsController = class {
|
|
|
16672
17884
|
};
|
|
16673
17885
|
|
|
16674
17886
|
// src/events/schema.ts
|
|
16675
|
-
import { z as
|
|
16676
|
-
var EventSourceZ =
|
|
16677
|
-
var NormalizedEventZ =
|
|
16678
|
-
ts:
|
|
16679
|
-
name:
|
|
17887
|
+
import { z as z4 } from "zod";
|
|
17888
|
+
var EventSourceZ = z4.enum(["posthog", "canvas", "derived"]);
|
|
17889
|
+
var NormalizedEventZ = z4.object({
|
|
17890
|
+
ts: z4.number(),
|
|
17891
|
+
name: z4.string(),
|
|
16680
17892
|
source: EventSourceZ,
|
|
16681
|
-
props:
|
|
16682
|
-
schemaVersion:
|
|
17893
|
+
props: z4.record(z4.string(), z4.unknown()).optional(),
|
|
17894
|
+
schemaVersion: z4.string()
|
|
16683
17895
|
});
|
|
16684
|
-
var EventFilterZ =
|
|
16685
|
-
names:
|
|
16686
|
-
patterns:
|
|
16687
|
-
sources:
|
|
17896
|
+
var EventFilterZ = z4.object({
|
|
17897
|
+
names: z4.array(z4.string()).optional(),
|
|
17898
|
+
patterns: z4.array(z4.string()).optional(),
|
|
17899
|
+
sources: z4.array(EventSourceZ).optional()
|
|
16688
17900
|
});
|
|
16689
17901
|
function validateNormalizedEvent(data) {
|
|
16690
17902
|
return NormalizedEventZ.safeParse(data);
|
|
@@ -16694,50 +17906,50 @@ function validateEventFilter(data) {
|
|
|
16694
17906
|
}
|
|
16695
17907
|
|
|
16696
17908
|
// src/overlays/schema.ts
|
|
16697
|
-
import { z as
|
|
16698
|
-
var SelectorZ =
|
|
16699
|
-
|
|
16700
|
-
|
|
16701
|
-
|
|
16702
|
-
|
|
16703
|
-
|
|
17909
|
+
import { z as z5 } from "zod";
|
|
17910
|
+
var SelectorZ = z5.union([
|
|
17911
|
+
z5.object({ type: z5.literal("data"), key: z5.string(), value: z5.string().optional() }),
|
|
17912
|
+
z5.object({ type: z5.literal("css"), value: z5.string() }),
|
|
17913
|
+
z5.object({ type: z5.literal("aria"), role: z5.string().optional(), label: z5.string().optional() }),
|
|
17914
|
+
z5.object({ type: z5.literal("shadow-css"), value: z5.string() }),
|
|
17915
|
+
z5.object({ type: z5.literal("ref"), el: z5.any() })
|
|
16704
17916
|
// runtime-only
|
|
16705
17917
|
]);
|
|
16706
|
-
var TooltipStepZ =
|
|
16707
|
-
kind:
|
|
16708
|
-
id:
|
|
17918
|
+
var TooltipStepZ = z5.object({
|
|
17919
|
+
kind: z5.literal("tooltip"),
|
|
17920
|
+
id: z5.string(),
|
|
16709
17921
|
anchor: SelectorZ,
|
|
16710
|
-
content:
|
|
16711
|
-
placement:
|
|
16712
|
-
offsetPx:
|
|
16713
|
-
blocking:
|
|
16714
|
-
trigger:
|
|
16715
|
-
dismiss:
|
|
16716
|
-
onEsc:
|
|
16717
|
-
closeButton:
|
|
16718
|
-
timeoutMs:
|
|
17922
|
+
content: z5.object({ title: z5.string().optional(), body: z5.string() }),
|
|
17923
|
+
placement: z5.enum(["top", "bottom", "left", "right", "auto"]).optional(),
|
|
17924
|
+
offsetPx: z5.number().optional(),
|
|
17925
|
+
blocking: z5.boolean().optional(),
|
|
17926
|
+
trigger: z5.enum(["immediate", "hover", "click"]).optional(),
|
|
17927
|
+
dismiss: z5.object({
|
|
17928
|
+
onEsc: z5.boolean().optional(),
|
|
17929
|
+
closeButton: z5.boolean().optional(),
|
|
17930
|
+
timeoutMs: z5.number().optional()
|
|
16719
17931
|
}).optional()
|
|
16720
17932
|
});
|
|
16721
|
-
var HighlightStepZ =
|
|
16722
|
-
kind:
|
|
16723
|
-
id:
|
|
17933
|
+
var HighlightStepZ = z5.object({
|
|
17934
|
+
kind: z5.literal("highlight"),
|
|
17935
|
+
id: z5.string(),
|
|
16724
17936
|
anchor: SelectorZ,
|
|
16725
|
-
copy:
|
|
16726
|
-
ring:
|
|
16727
|
-
scrim:
|
|
16728
|
-
ringColor:
|
|
16729
|
-
blocking:
|
|
16730
|
-
dismiss:
|
|
16731
|
-
onClickOutside:
|
|
16732
|
-
onEsc:
|
|
16733
|
-
timeoutMs:
|
|
17937
|
+
copy: z5.string().optional(),
|
|
17938
|
+
ring: z5.object({ paddingPx: z5.number().optional(), radiusPx: z5.number().optional() }).optional(),
|
|
17939
|
+
scrim: z5.object({ opacity: z5.number().optional() }).optional(),
|
|
17940
|
+
ringColor: z5.string().optional(),
|
|
17941
|
+
blocking: z5.boolean().optional(),
|
|
17942
|
+
dismiss: z5.object({
|
|
17943
|
+
onClickOutside: z5.boolean().optional(),
|
|
17944
|
+
onEsc: z5.boolean().optional(),
|
|
17945
|
+
timeoutMs: z5.number().optional()
|
|
16734
17946
|
}).optional()
|
|
16735
17947
|
});
|
|
16736
|
-
var CanvasRecipeZ =
|
|
16737
|
-
id:
|
|
16738
|
-
version:
|
|
16739
|
-
routes:
|
|
16740
|
-
steps:
|
|
17948
|
+
var CanvasRecipeZ = z5.object({
|
|
17949
|
+
id: z5.string(),
|
|
17950
|
+
version: z5.number(),
|
|
17951
|
+
routes: z5.array(z5.string()).optional(),
|
|
17952
|
+
steps: z5.array(z5.union([TooltipStepZ, HighlightStepZ]))
|
|
16741
17953
|
});
|
|
16742
17954
|
function validateRecipe(json) {
|
|
16743
17955
|
return CanvasRecipeZ.parse(json);
|
|
@@ -16763,14 +17975,14 @@ var createOverlayRecipeFetcher = ({
|
|
|
16763
17975
|
};
|
|
16764
17976
|
|
|
16765
17977
|
// src/state/schema.ts
|
|
16766
|
-
import { z as
|
|
16767
|
-
var StoredValueZ =
|
|
16768
|
-
value:
|
|
16769
|
-
expiresAt:
|
|
17978
|
+
import { z as z6 } from "zod";
|
|
17979
|
+
var StoredValueZ = z6.object({
|
|
17980
|
+
value: z6.unknown(),
|
|
17981
|
+
expiresAt: z6.number().optional()
|
|
16770
17982
|
});
|
|
16771
|
-
var FrequencyEntryZ =
|
|
16772
|
-
count:
|
|
16773
|
-
resetAt:
|
|
17983
|
+
var FrequencyEntryZ = z6.object({
|
|
17984
|
+
count: z6.number(),
|
|
17985
|
+
resetAt: z6.number().optional()
|
|
16774
17986
|
});
|
|
16775
17987
|
function validateStoredValue(data) {
|
|
16776
17988
|
return StoredValueZ.safeParse(data);
|