@sidebandai/sideband-web 1.4.1-rc.2 → 1.4.3
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/README.md +21 -119
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +124 -64
- package/dist/sideband.iife.js +1 -1
- package/dist/ui/snackbar-ui.d.ts +6 -0
- package/dist/ui/snackbar-ui.d.ts.map +1 -1
- package/dist/ui/survey-ui.d.ts +1 -0
- package/dist/ui/survey-ui.d.ts.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -308,7 +308,7 @@ function w(e, t) {
|
|
|
308
308
|
return Math.round(r * e.alpha + i * (1 - e.alpha)).toString(16).padStart(2, "0");
|
|
309
309
|
}).join("")}`, 1);
|
|
310
310
|
}
|
|
311
|
-
function
|
|
311
|
+
function te(e) {
|
|
312
312
|
let t = (t) => {
|
|
313
313
|
let n = y.find((e) => e.path.join(".") === t.join(".")), r = S(e, t);
|
|
314
314
|
return x(r, "") ? r : n.fallback;
|
|
@@ -356,14 +356,34 @@ function T(e) {
|
|
|
356
356
|
"--sb-snackbar-elapsed": x(f ? n : u)
|
|
357
357
|
};
|
|
358
358
|
}
|
|
359
|
-
var
|
|
359
|
+
var T = {
|
|
360
360
|
entrance: 1969.207,
|
|
361
361
|
timerEntrance: 2169.207,
|
|
362
362
|
widen: 200,
|
|
363
363
|
expand: 450
|
|
364
|
-
}
|
|
364
|
+
}, E = {
|
|
365
|
+
delay: 400,
|
|
366
|
+
enter: 450,
|
|
367
|
+
exit: 400,
|
|
368
|
+
removal: 450,
|
|
369
|
+
reduced: 150
|
|
370
|
+
}, ne = E.delay + E.enter;
|
|
365
371
|
function D(e, t) {
|
|
366
|
-
let { viewport: n, safeArea: r = {}, compactHeight: i } = t, a = A(r.left) + 12, o = A(r.right) + 12, s = A(r.top) + 24, c = A(r.bottom) + 8, l = Math.max(0, n.width - a - o), u = Math.min(364, l), d = Math.min(376, l), f = Math.max(0, n.height - s - c), p = Math.min(t.cardHeight, f)
|
|
372
|
+
let { viewport: n, safeArea: r = {}, compactHeight: i } = t, a = A(r.left) + 12, o = A(r.right) + 12, s = A(r.top) + 24, c = A(r.bottom) + 8, l = Math.max(0, n.width - a - o), u = Math.min(364, l), d = Math.min(376, l), f = Math.max(0, n.height - s - c), p = Math.min(t.cardHeight, f);
|
|
373
|
+
if (t.barPosition) return {
|
|
374
|
+
compactWidth: n.width,
|
|
375
|
+
compactLeft: 0,
|
|
376
|
+
compactBottom: 0,
|
|
377
|
+
cardWidth: d,
|
|
378
|
+
cardHeight: p,
|
|
379
|
+
maxCardHeight: f,
|
|
380
|
+
cardLeft: a + (l - d) / 2,
|
|
381
|
+
cardBottom: c,
|
|
382
|
+
cardTop: A(r.top) + 12,
|
|
383
|
+
entranceOffset: 0,
|
|
384
|
+
transformOrigin: t.barPosition === "top" ? "50% 0%" : "50% 100%"
|
|
385
|
+
};
|
|
386
|
+
let m = N(e, {
|
|
367
387
|
viewport: n,
|
|
368
388
|
element: {
|
|
369
389
|
width: u,
|
|
@@ -378,6 +398,7 @@ function D(e, t) {
|
|
|
378
398
|
compactBottom: g,
|
|
379
399
|
cardHeight: p,
|
|
380
400
|
maxCardHeight: f,
|
|
401
|
+
cardTop: 0,
|
|
381
402
|
entranceOffset: (u - i) * M(e?.anchor).x,
|
|
382
403
|
cardLeft: a + (l - d) / 2,
|
|
383
404
|
cardBottom: Math.max(c, Math.min(g, n.height - s - p)),
|
|
@@ -432,14 +453,14 @@ function P(e, t, n = "forward") {
|
|
|
432
453
|
}
|
|
433
454
|
//#endregion
|
|
434
455
|
//#region src/ui/icons.ts
|
|
435
|
-
var F = "<svg viewBox=\"0 0 24 24\" aria-hidden=\"true\"><path d=\"M6.4 6.4 17.6 17.6M17.6 6.4 6.4 17.6\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\"/></svg>", I = "<svg viewBox=\"0 0 14 14\" aria-hidden=\"true\"><path d=\"M6.66667 0 5.49167 1.175 10.1417 5.83333H0V7.5h10.1417l-4.65 4.6583 1.175 1.175L13.3333 6.66667 6.66667 0Z\" fill=\"currentColor\"/></svg>", L = "<svg viewBox=\"0 0 36 28\" aria-hidden=\"true\"><path d=\"m11.2619 21.3151-8.40108-8.4011L0 15.7546l11.2619 11.262L35.4379 2.84067 32.5972 0 11.2619 21.3151Z\" fill=\"currentColor\"/></svg>", R = "<svg viewBox=\"0 0 35.5556 35.5556\" aria-hidden=\"true\"><path d=\"M19.436 3.05195 11.2286 11.2594c-.5481.5481-.8592 1.3037-.8592 2.0888v14.8c0 1.6297 1.3333 2.963 2.9629 2.963h13.3334c1.1851 0 2.2518-.7111 2.7259-1.7926l4.8296-11.2741c1.2445-2.9333-.9037-6.1925-4.0889-6.1925H21.762l1.4074-6.78523c.1481-.74075-.0741-1.4963-.6074-2.02963-.8741-.85926-2.2667-.85926-3.126.01481ZM4.44343 31.1112c1.62963 0 2.96296-1.3333 2.96296-2.963V16.2964c0-1.6296-1.33333-2.963-2.96296-2.963-1.62963 0-2.96296 1.3334-2.96296 2.963v11.8518c0 1.6297 1.33333 2.963 2.96296 2.963Z\" fill=\"currentColor\"/></svg>", z = "<svg viewBox=\"0 0 35.5556 35.5556\" aria-hidden=\"true\"><path d=\"m16.1165 32.5036 8.1926-8.2074c.5481-.5482.8592-1.3037.8592-2.0889v-14.8c0-1.62963-1.3333-2.96296-2.9629-2.96296H8.88686c-1.18519 0-2.25185.71111-2.71111 1.79259L1.34612 17.511c-1.25926 2.9333.88889 6.1926 4.07407 6.1926h8.37041l-1.4074 6.7852c-.1482.7407.074 1.4963.6074 2.0296.874.8593 2.2666.8593 3.1259-.0148ZM31.1091 4.44434c-1.6296 0-2.963 1.33333-2.963 2.96296v11.8519c0 1.6296 1.3334 2.9629 2.963 2.9629 1.6296 0 2.9629-1.3333 2.9629-2.9629V7.4073c0-1.62963-1.3333-2.96296-2.9629-2.96296Z\" fill=\"currentColor\"/></svg>", B = ".sb-snackbar-root{--sb-text:var(--sb-snackbar-text);--sb-text-muted:var(--sb-theme-content-body);--sb-surface:var(--sb-snackbar-surface);z-index:1100;pointer-events:none;color:var(--sb-snackbar-text);font-family:Inter,-apple-system,BlinkMacSystemFont,system-ui,sans-serif;position:fixed;inset:0}.sb-snackbar-root *,.sb-snackbar-root :before,.sb-snackbar-root :after{box-sizing:border-box}.sb-snackbar-root h2{text-transform:none;letter-spacing:normal}.sb-snackbar-shell{left:var(--sb-snackbar-left);bottom:var(--sb-snackbar-bottom);width:var(--sb-snackbar-width);transition:left .2s ease-in-out,bottom .2s ease-in-out,width .2s ease-in-out;position:absolute}.sb-snackbar-surface{width:100%;height:var(--sb-snackbar-height,64px);border-radius:calc(var(--sb-snackbar-compact-height,64px) / 2);background:var(--sb-snackbar-surface);box-shadow:inset 0 0 0 1px var(--sb-snackbar-border);transition:height .45s cubic-bezier(0,.87,.39,1),border-radius .45s cubic-bezier(0,.87,.39,1);position:relative;overflow:hidden}.sb-snackbar-compact{width:var(--sb-snackbar-compact-width,364px);align-items:center;gap:10px;min-height:64px;padding:10px;transition:opacity .12s ease-out;display:flex;position:relative}.sb-snackbar-artwork{--sb-theme-fab-accent-primary:var(--sb-theme-sheet-progress-fill);--sb-theme-fab-accent-secondary:var(--sb-snackbar-surface);--sb-theme-fab-foreground:var(--sb-snackbar-text);background:var(--sb-theme-sheet-progress-fill);border-radius:50%;flex:0 0 40px;width:40px;height:40px;position:relative;overflow:hidden}.sb-snackbar-artwork img{z-index:2;object-fit:cover;width:100%;height:100%;position:absolute;inset:0}.sb-snackbar-prompt{overflow-wrap:anywhere;flex:1;min-width:0;margin:0;font-size:14px;font-weight:600;line-height:20px;position:relative}.sb-snackbar-answers{flex:none;gap:4px;display:flex;position:relative}.sb-snackbar-answer{width:44px;height:44px;color:var(--sb-snackbar-text);background:var(--sb-snackbar-normal);cursor:pointer;pointer-events:auto;border:0;border-radius:50%;place-items:center;margin:0;padding:0;transition:background .12s ease-out,scale .12s ease-out;display:grid}.sb-snackbar-answer svg{width:18px;height:18px}.sb-snackbar-answer:hover:not(:disabled){background:var(--sb-snackbar-hover)}.sb-snackbar-answer:active:not(:disabled){background:var(--sb-snackbar-pressed);scale:.94}.sb-snackbar-answer[aria-pressed=true]{color:var(--sb-snackbar-on-active);background:var(--sb-snackbar-active)}.sb-snackbar-answer:disabled{cursor:default;pointer-events:none;opacity:1}.sb-snackbar-close{top:-25px;width:44px;height:44px;color:var(--sb-snackbar-text);pointer-events:auto;cursor:pointer;background:0 0;border:0;place-items:center;margin:0;padding:13px;display:grid;position:absolute;inset-inline-start:-15px}.sb-snackbar-close svg{background:var(--sb-snackbar-surface);border-radius:50%;width:18px;height:18px;padding:2px}.sb-snackbar-answer:focus-visible,.sb-snackbar-close:focus-visible{outline:2px solid var(--sb-snackbar-text);outline-offset:2px}.sb-snackbar-timer{pointer-events:none;position:absolute;overflow:hidden}.sb-snackbar-timer--fill{background:var(--sb-snackbar-elapsed);inset:0}.sb-snackbar-timer--bar{inset-inline:1px 3px;background:var(--sb-theme-sheet-progress-track);height:2px;bottom:-6px}.sb-snackbar-timer-fill{transform-origin:0;background:var(--sb-theme-sheet-progress-fill);width:100%;height:100%;display:block}.sb-snackbar-timer--fill .sb-snackbar-timer-fill{background:var(--sb-snackbar-remaining)}.sb-snackbar-root:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)) .sb-snackbar-timer-fill{transform-origin:100%}.sb-snackbar-root[data-counting=true] .sb-snackbar-timer-fill{animation:sb-snackbar-countdown var(--sb-snackbar-duration) linear forwards}.sb-snackbar-root[data-frozen=true] .sb-snackbar-timer-fill{transform:scaleX(var(--sb-snackbar-fraction));animation:none}.sb-snackbar-overlay{background:var(--sb-theme-sheet-scrim);opacity:0;pointer-events:none;border:0;width:100%;height:100%;margin:0;padding:0;transition:opacity .45s ease-out;position:absolute;inset:0}.sb-snackbar-card{width:var(--sb-snackbar-card-width);max-height:var(--sb-snackbar-max-height);opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;overflow:auto}.sb-snackbar-root .sb-snackbar-card .sb-sheet-root{position:static;inset:auto}.sb-snackbar-root .sb-snackbar-card .sb-sheet-root__overlay{display:none}.sb-snackbar-root .sb-snackbar-card .sb-sheet{width:100%;max-height:none;box-shadow:none;background:0 0;border:0;margin:0;animation:none;position:relative;inset:auto;transform:none}.sb-snackbar-card[inert] *{animation-play-state:paused}.sb-snackbar-root[data-stage=widening] .sb-snackbar-compact,.sb-snackbar-root[data-stage=expanding] .sb-snackbar-compact,.sb-snackbar-root[data-stage=ready] .sb-snackbar-compact{opacity:0}.sb-snackbar-root[data-expanded=true] .sb-snackbar-overlay{opacity:1;pointer-events:auto}.sb-snackbar-root[data-expanded=true] .sb-snackbar-close{display:none}.sb-snackbar-root[data-stage=expanding] .sb-snackbar-surface,.sb-snackbar-root[data-stage=ready] .sb-snackbar-surface{box-shadow:none;background:var(--sb-theme-sheet-background);border-radius:40px}.sb-snackbar-root[data-stage=expanding] .sb-snackbar-card{opacity:1;transition:opacity .3s ease-out .12s}.sb-snackbar-root[data-stage=ready] .sb-snackbar-card{opacity:1;pointer-events:auto}.sb-snackbar-root[data-stage=entering] .sb-snackbar-shell{animation:.89016s cubic-bezier(.649439,.0577174,.124599,1) .18584s both sb-snackbar-enter-scale,.893207s cubic-bezier(.649439,.0577174,.124599,1) 1.076s both sb-snackbar-enter-width}.sb-snackbar-root[data-stage=entering] .sb-snackbar-surface{transition:none}.sb-snackbar-root[data-stage=entering] .sb-snackbar-prompt,.sb-snackbar-root[data-stage=entering] .sb-snackbar-answers,.sb-snackbar-root[data-stage=entering] .sb-snackbar-close{animation:.2s ease-out 1.076s both sb-snackbar-label}.sb-snackbar-root[data-stage=entering] .sb-snackbar-timer{animation:.2s ease-out 1.96921s both sb-snackbar-label}.sb-root--inline .sb-snackbar-root{position:absolute}@keyframes sb-snackbar-countdown{0%{transform:scaleX(1)}to{transform:scaleX(0)}}@keyframes sb-snackbar-enter-scale{0%{scale:0}to{scale:1}}@keyframes sb-snackbar-enter-width{0%{width:var(--sb-snackbar-compact-height,64px);translate:var(--sb-snackbar-entrance-offset) 0}to{width:var(--sb-snackbar-width);translate:0}}@keyframes sb-snackbar-label{0%{opacity:0}to{opacity:1}}@media (prefers-reduced-motion:reduce){.sb-snackbar-root[data-counting=true] .sb-snackbar-timer-fill{animation-duration:var(--sb-snackbar-duration)!important}.sb-snackbar-root .sb-snackbar-shell,.sb-snackbar-root .sb-snackbar-surface,.sb-snackbar-root .sb-snackbar-card,.sb-snackbar-root .sb-snackbar-compact,.sb-snackbar-root .sb-snackbar-overlay{transition:none}.sb-snackbar-root[data-stage=entering] .sb-snackbar-shell,.sb-snackbar-root[data-stage=entering] .sb-snackbar-prompt,.sb-snackbar-root[data-stage=entering] .sb-snackbar-timer,.sb-snackbar-root[data-stage=entering] .sb-snackbar-close,.sb-snackbar-root[data-stage=entering] .sb-snackbar-answers{animation:none}}:host{--sb-surface:var(--sb-theme-sheet-background,#fff);--sb-surface-muted:var(--sb-theme-button-secondary-background,#f2f2f2);--sb-border:var(--sb-theme-input-border,#0808081f);--sb-border-strong:#0808083d;--sb-border-active:var(--sb-theme-input-focused-border,#080808b3);--sb-text:var(--sb-theme-content-heading,#080808);--sb-text-muted:var(--sb-theme-content-body,#5c5c5c);--sb-overlay:var(--sb-theme-sheet-scrim,#00000061);--sb-ease:cubic-bezier(.2, .9, .2, 1);--sb-fab-motion-ease:cubic-bezier(.649439, .0577174, .124599, 1);--sb-sheet-motion-ease:cubic-bezier(0, .87, .39, 1);font-family:-apple-system,BlinkMacSystemFont,system-ui,Segoe UI,Roboto,Helvetica Neue,Arial,sans-serif}.sb-safe-area-probe{visibility:hidden;pointer-events:none;padding:env(safe-area-inset-top,0px) env(safe-area-inset-right,0px) env(safe-area-inset-bottom,0px) env(safe-area-inset-left,0px);position:fixed;inset:0}.sb-fab{right:16px;bottom:calc(24px + env(safe-area-inset-bottom,0px));z-index:1000;box-sizing:border-box;border:1px solid var(--sb-theme-fab-border,#080808);background:var(--sb-theme-fab-background,#080808);min-width:0;height:60px;color:var(--sb-theme-fab-foreground,#fff);border-color:var(--sb-theme-fab-border,#080808);cursor:pointer;will-change:transform;align-items:center;transition:scale .12s ease-out;display:inline-flex;position:fixed;overflow:hidden}.sb-fab--entering{animation:sb-fab-enter-scale .89016s var(--sb-fab-motion-ease) .259705s both, sb-fab-enter-width .893207s var(--sb-fab-motion-ease) 1.076s both;transform-origin:50%!important}.sb-fab--entering .sb-fab__label{animation:sb-fab-label-in .2s var(--sb-fab-motion-ease) 1.14987s both}.sb-fab--entering .sb-fab__timer{animation:sb-fab-timer-in .2s var(--sb-fab-motion-ease) 1.96921s both}.sb-fab--entering .sb-fab__timer-fill{animation-delay:1.96921s}.sb-fab--exiting{width:var(--sb-fab-exit-width,var(--sb-fab-expanded-width));pointer-events:none;scale:var(--sb-fab-exit-scale,1);translate:var(--sb-fab-exit-offset,0) 0;animation:.292089s cubic-bezier(.677885,.170122,.695982,.997824) .3s forwards sb-fab-exit-width,.390467s cubic-bezier(.362165,.0946429,.49708,.932961) .466372s forwards sb-fab-exit-scale;transform:none;transform-origin:50%!important}.sb-fab--exiting .sb-fab__label{opacity:var(--sb-fab-exit-label-opacity,1);animation:.389727s cubic-bezier(.5,0,.5,1) .3s forwards sb-fab-label-out}.sb-fab--exiting .sb-fab__timer{opacity:var(--sb-fab-exit-timer-opacity,0)}.sb-fab--exiting .sb-fab__badge{animation:.297243s cubic-bezier(.5,0,1,.600461) .398177s forwards sb-fab-badge-out}.sb-next:hover,.sb-next:focus-visible,.sb-button:hover,.sb-button:focus-visible,.sb-choice:hover,.sb-choice:focus-visible{transform:translateY(-1px)}.sb-fab:active{transition-duration:80ms;scale:.97}.sb-fab:focus-visible,.sb-next:focus-visible,.sb-button:focus-visible,.sb-choice:focus-visible,.sb-sheet__close:focus-visible,.sb-sentiment:focus-visible,.sb-sheet-root__overlay:focus-visible{outline-offset:2px;outline:2px solid #6366f1a6}.sb-fab--expanded{width:var(--sb-fab-expanded-width,auto);border-radius:999px;justify-content:flex-start;gap:12px;min-height:60px;padding:13px 28px 13px 14px}.sb-fab__label{z-index:1;width:var(--sb-fab-label-width,auto);color:currentColor;text-align:left;white-space:nowrap;text-overflow:clip;min-width:0;font-size:14px;font-weight:600;line-height:1;position:relative;overflow:hidden}.sb-fab__badge{z-index:1;background:var(--sb-theme-fab-accent-primary,#f97316);border-radius:50%;flex:none;place-items:center;width:32px;height:32px;display:grid;position:relative}.sb-fab__badge-artwork{background:var(--sb-theme-fab-accent-secondary,#2563eb);border-radius:50%;display:block;position:absolute;inset:5.44px}.sb-fab__badge-image{z-index:2;border-radius:inherit;object-fit:cover;width:100%;height:100%;display:block;position:absolute;inset:0}.sb-fab__badge-glyph-center,.sb-fab__badge-glyph-amber,.sb-fab__badge-glyph-mint,.sb-fab__badge-glyph-rose{border-radius:999px;display:block;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.sb-fab__badge-glyph-center{background:var(--sb-theme-fab-foreground,#fff);border-radius:3.52px;width:4.16px;height:11.52px}.sb-fab__badge-glyph-amber{background:#fac143;width:2.88px;height:6.72px;translate:-3.04px .8px}.sb-fab__badge-glyph-mint{background:#39c690;width:2.88px;height:5.44px;translate:3.04px -.32px}.sb-fab__badge-glyph-rose{background:#e86398;width:2.56px;height:4.16px;translate:.96px 3.68px}.sb-fab__timer{z-index:0;pointer-events:none;position:absolute;overflow:hidden}.sb-fab__timer--bar{background:var(--sb-theme-fab-timer-track,#08080829);border-radius:999px;height:2px;bottom:4px;left:59px;right:29px}.sb-fab[data-timer-direction=rtl] .sb-fab__timer--bar{left:29px;right:59px}.sb-fab__timer--fill{border-radius:inherit;background:var(--sb-theme-fab-timer-track,#08080829);inset:0}.sb-fab__timer-fill{border-radius:inherit;background:var(--sb-theme-fab-timer-fill,#080808e6);width:100%;height:100%;transform-origin:var(--sb-fab-timer-origin,left);animation:sb-fab-timer-bar var(--sb-timer-duration) linear forwards;display:block}.sb-sheet-root{z-index:1100;position:fixed;inset:0}.sb-sheet-root__overlay{background:var(--sb-overlay);cursor:pointer;border:none;animation:.2s ease-in both sb-overlay-in;position:absolute;inset:0}.sb-sheet-root--exiting{pointer-events:none}.sb-sheet-root--exiting .sb-sheet-root__overlay{animation:.2s ease-in forwards sb-overlay-out}.sb-sheet{width:min(100%,100vw);min-height:418px;padding:24px 20px calc(18px + env(safe-area-inset-bottom,0px));box-sizing:border-box;background:var(--sb-surface);box-shadow:var(--sb-shadow);color:var(--sb-text);animation:sb-sheet-in-mobile .45s var(--sb-sheet-motion-ease) both;border-radius:40px 40px 0 0;position:absolute;bottom:0;left:0;right:0}.sb-sheet--thanks{min-height:381px;padding-top:18px}.sb-sheet__header{justify-content:flex-end;align-items:flex-start;min-height:28px;margin-bottom:22px;display:flex;position:relative}.sb-progress{background:var(--sb-theme-sheet-progress-track,#eaeaea);border-radius:999px;width:219px;max-width:calc(100% - 96px);height:6px;position:absolute;top:5px;left:50%;overflow:hidden;transform:translate(-50%)}.sb-progress__fill{border-radius:inherit;background:var(--sb-theme-sheet-progress-fill,#080808);height:100%;transition:width .22s var(--sb-ease);display:block}.sb-sheet__close{background:var(--sb-theme-sheet-close-button-background,transparent);width:20px;height:20px;color:var(--sb-theme-sheet-close-button-foreground,var(--sb-text));cursor:pointer;border:none;padding:0}.sb-sheet__close svg,.sb-next svg,.sb-thanks__icon-core svg{width:100%;height:100%;display:block}.sb-sheet__body{gap:26px;display:grid}.sb-sheet__copy{justify-items:center;gap:8px;display:grid}.sb-sheet__eyebrow{color:var(--sb-theme-content-helper,var(--sb-text-muted));text-align:center;margin:0;font-size:16px;font-weight:400;line-height:1.4}.sb-sheet__body h2,.sb-thanks__copy h2{color:var(--sb-theme-content-heading,var(--sb-text));text-align:center;margin:0;font-size:22px;font-weight:600;line-height:1.2}.sb-sheet__body h2{justify-self:center;width:min(297px,100%)}.sb-choice--selected,.sb-choice:hover,.sb-textarea-shell:focus-within{border-color:var(--sb-theme-choice-hover-border,var(--sb-border-active))}.sb-choice:hover{background:var(--sb-theme-choice-hover-background,var(--sb-surface));color:var(--sb-theme-choice-hover-foreground,var(--sb-text))}.sb-choice:active{border-color:var(--sb-theme-choice-pressed-border,var(--sb-border-active));background:var(--sb-theme-choice-pressed-background,var(--sb-surface-muted));color:var(--sb-theme-choice-pressed-foreground,var(--sb-text))}.sb-choice--selected{box-shadow:0 0 0 3px #0808080d}.sb-choice:disabled{border-color:var(--sb-theme-choice-disabled-border,#e2e2e2);background:var(--sb-theme-choice-disabled-background,#f2f2f2);color:var(--sb-theme-choice-disabled-foreground,#5c5c5c);cursor:not-allowed}.sb-question--choices{grid-template-columns:repeat(2,160px);justify-content:center;justify-self:center;gap:9px;width:min(330px,100%)}.sb-choice{border:1px solid var(--sb-theme-choice-default-border,#e2e2e2);background:var(--sb-theme-choice-default-background,var(--sb-surface));width:160px;height:51px;color:var(--sb-theme-choice-default-foreground,var(--sb-text));text-align:center;white-space:nowrap;cursor:pointer;transition:transform .2s var(--sb-ease), border-color .18s ease, box-shadow .18s ease, background-color .18s ease;border-radius:999px;justify-content:center;align-items:center;padding:0 16px;font-size:16px;font-weight:700;line-height:1.2;display:flex}.sb-choice__label{-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.sb-choice--other{border-color:var(--sb-theme-choice-default-border,#e2e2e2);padding:0;font-weight:400}.sb-choice__other-content{align-items:center;gap:0;display:inline-flex}.sb-choice__other-caret{background:var(--sb-theme-input-foreground,var(--sb-text));flex:none;width:1px;height:22px}.sb-choice__other-label{color:var(--sb-theme-input-placeholder,#08080866);line-height:1.2}.sb-choice--selected{border-color:var(--sb-theme-choice-selected-border,var(--sb-text));background:var(--sb-theme-choice-selected-background,var(--sb-text));color:var(--sb-theme-choice-selected-foreground,var(--sb-surface))}.sb-question--text{justify-self:center;width:min(330px,100%)}.sb-textarea-shell{border:1px solid var(--sb-theme-input-border,#08080833);background:var(--sb-theme-input-background,var(--sb-surface));border-radius:16px;width:100%;min-height:155px;transition:border-color .18s,box-shadow .18s}.sb-textarea{resize:none;width:100%;min-height:155px;color:var(--sb-theme-input-foreground,var(--sb-text));font:inherit;box-sizing:border-box;background:0 0;border:none;outline:none;padding:16px 22px;font-size:16px;line-height:1.2}.sb-textarea::placeholder{color:var(--sb-theme-input-placeholder,#08080866)}.sb-textarea-shell:focus-within{border-color:var(--sb-theme-input-focused-border,var(--sb-border-active))}.sb-textarea:disabled{color:var(--sb-theme-input-disabled-foreground,var(--sb-text-muted))}.sb-textarea-shell:has(.sb-textarea:disabled){background:var(--sb-theme-input-disabled-background,var(--sb-surface-muted))}.sb-sheet__footer{min-height:84px;margin:0 -20px calc(-18px - env(safe-area-inset-bottom,0px));padding:18px 20px calc(18px + env(safe-area-inset-bottom,0px));border-top:1px solid var(--sb-theme-sheet-divider,#e2e2e2);box-sizing:border-box;justify-content:flex-end;align-items:center;gap:16px;display:flex}.sb-next,.sb-button{cursor:pointer;min-height:48px;font:inherit;transition:transform .2s var(--sb-ease), opacity .18s ease, box-shadow .18s ease;border:none;border-radius:999px}.sb-next{background:var(--sb-theme-button-primary-background,#080808);width:101px;color:var(--sb-theme-button-primary-foreground,#fff);place-items:center;padding:0;display:grid}.sb-next--acknowledging svg{animation:.36s cubic-bezier(.2,.8,.2,1) both sb-next-acknowledgement}.sb-next:disabled,.sb-button:disabled{cursor:not-allowed;box-shadow:none;transform:none}.sb-next:disabled{background:var(--sb-theme-button-primary-disabled-background,#080808);color:var(--sb-theme-button-primary-disabled-foreground,#fff)}.sb-thanks{justify-items:center;gap:23px;padding-top:12px;display:grid}.sb-thanks__icon-shell{background:var(--sb-theme-completion-outer-background,#f0f0f0);border-radius:999px;place-items:center;width:120px;height:120px;display:grid}.sb-thanks__icon-core{background:var(--sb-theme-completion-inner-background,#080808);width:66px;height:66px;color:var(--sb-theme-completion-glyph,#fff);border-radius:999px;place-items:center;display:grid}.sb-thanks__copy{gap:8px;max-width:313px;display:grid}.sb-thanks__copy h2{letter-spacing:-.03em;font-size:30px;line-height:1.1}.sb-thanks__copy p{color:var(--sb-theme-content-body,var(--sb-text-muted));text-align:center;margin:0;font-size:14px;line-height:1.3}.sb-thanks__actions{gap:10px;width:100%;display:flex}.sb-button{flex:1 1 0;padding:16px;font-size:14px;font-weight:600;line-height:1}.sb-button--primary{background:var(--sb-theme-button-primary-background,#080808);color:var(--sb-theme-button-primary-foreground,#fff)}.sb-button--secondary{background:var(--sb-theme-button-secondary-background,#f2f2f2);color:var(--sb-theme-button-secondary-foreground,var(--sb-text))}.sb-button--tertiary{background:var(--sb-theme-button-tertiary-background,transparent);color:var(--sb-theme-button-tertiary-foreground,var(--sb-text))}.sb-button--primary:hover,.sb-button--primary:focus-visible{background:var(--sb-theme-button-primary-hover-background,#080808)}.sb-button--secondary:hover,.sb-button--secondary:focus-visible{background:var(--sb-theme-button-secondary-hover-background,#f2f2f2)}.sb-button--tertiary:hover,.sb-button--tertiary:focus-visible{background:var(--sb-theme-button-tertiary-hover-background,#f2f2f2)}.sb-button--primary:active{background:var(--sb-theme-button-primary-pressed-background,#080808)}.sb-button--secondary:active{background:var(--sb-theme-button-secondary-pressed-background,#e2e2e2)}.sb-button--tertiary:active{background:var(--sb-theme-button-tertiary-pressed-background,#e2e2e2)}.sb-button--primary:disabled{background:var(--sb-theme-button-primary-disabled-background,#080808);color:var(--sb-theme-button-primary-disabled-foreground,#fff)}.sb-button--secondary:disabled{background:var(--sb-theme-button-secondary-disabled-background,#f2f2f2);color:var(--sb-theme-button-secondary-disabled-foreground,var(--sb-text))}.sb-button--tertiary:disabled{background:var(--sb-theme-button-tertiary-disabled-background,#f2f2f2);color:var(--sb-theme-button-tertiary-disabled-foreground,var(--sb-text))}@media (width>=768px){.sb-fab{bottom:24px;right:24px}}.sb-sheet-root__overlay{padding:0}.sb-sheet{top:auto;right:auto;bottom:calc(8px + env(safe-area-inset-bottom,0px));width:min(376px,100% - 24px);min-height:0;max-height:calc(100% - 16px - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px));box-shadow:none;animation:sb-card-in .45s var(--sb-sheet-motion-ease) both;interpolate-size:allow-keywords;border-radius:40px;padding:0;transition:height .45s cubic-bezier(0,.83,.363,.994);position:absolute;left:50%;overflow:hidden;transform:translate(-50%)}.sb-sheet-root--exiting .sb-sheet{animation:.45s ease-in forwards sb-card-out}.sb-sheet--thanks{min-height:0;padding:22px 20px}.sb-sheet__header{height:50px;min-height:0;margin:0;display:block;position:relative}.sb-progress{width:216px;max-width:calc(100% - 96px);height:6px;top:27px}.sb-progress__fill{transition:width .45s var(--sb-sheet-motion-ease)}.sb-sheet__close{box-sizing:border-box;border-radius:4px;width:40px;height:40px;padding:8px;position:absolute;top:10px;right:16px}.sb-sheet__close svg{width:24px;height:24px}.sb-sheet__body{animation:.25s ease-in-out both sb-step-in;display:block}.sb-sheet__copy{box-sizing:border-box;align-content:center;justify-items:center;gap:0;height:88px;padding:0 23px;display:grid}.sb-sheet__body h2{text-align:center;text-wrap:balance;width:100%;margin:0;font-size:19px;font-weight:600;line-height:1.22}.sb-sheet__body--sentiment{padding:12px 24px 22px}.sb-sheet__body--sentiment .sb-sheet__copy{gap:8px;height:auto;min-height:84px;padding:0}.sb-sheet__body--sentiment .sb-sheet__eyebrow{color:var(--sb-theme-content-helper,var(--sb-text-muted));text-align:center;-webkit-line-clamp:2;-webkit-box-orient:vertical;margin:0;font-size:16px;font-weight:400;line-height:1.2;display:-webkit-box;overflow:hidden}.sb-sheet__body--sentiment h2{-webkit-line-clamp:3;-webkit-box-orient:vertical;font-size:22px;font-weight:600;line-height:1.2;display:-webkit-box;overflow:hidden}.sb-sheet__body--sentiment h2.sb-sheet__acknowledgement{align-content:center;min-height:70px;font-size:29px;line-height:1.08;animation:.28s cubic-bezier(.2,.8,.2,1) both sb-acknowledgement-in}.sb-question{justify-items:stretch;display:grid}.sb-question--sentiment{grid-template-columns:repeat(2,80px);justify-content:center;gap:25px;width:185px;margin:37px auto 31px;position:relative}.sb-sheet__body--sentiment:has(.sb-sheet__acknowledgement) .sb-question--sentiment{margin-top:35px}.sb-sentiment{z-index:0;border:1.111px solid var(--sb-theme-choice-default-border,#e2e2e2);background:var(--sb-theme-choice-default-background,var(--sb-surface));width:80px;height:80px;color:var(--sb-theme-choice-default-foreground,var(--sb-text));cursor:pointer;border-radius:50%;place-items:center;padding:0;transition:transform .12s ease-out,border-color .18s,background-color .18s;display:grid;position:relative}.sb-sentiment__icon{z-index:1;width:35.5556px;height:35.5556px}.sb-sentiment__icon svg{width:100%;height:100%;display:block}.sb-sentiment:hover{border-color:var(--sb-theme-choice-hover-border,var(--sb-border-active));background:var(--sb-theme-choice-hover-background,var(--sb-surface));color:var(--sb-theme-choice-hover-foreground,var(--sb-text))}.sb-sentiment:active{border-color:var(--sb-theme-choice-pressed-border,var(--sb-border-active));background:var(--sb-theme-choice-pressed-background,var(--sb-surface-muted));color:var(--sb-theme-choice-pressed-foreground,var(--sb-text));transform:scale(.97)}.sb-sentiment--selected,.sb-sentiment--selected:disabled{border-color:var(--sb-theme-choice-selected-border,var(--sb-text));background:var(--sb-theme-choice-selected-background,var(--sb-text));color:var(--sb-theme-choice-selected-foreground,var(--sb-surface))}.sb-sentiment:disabled:not(.sb-sentiment--selected){border-color:var(--sb-theme-choice-disabled-border,#e2e2e2);background:var(--sb-theme-choice-disabled-background,#f2f2f2);color:var(--sb-theme-choice-disabled-foreground,#5c5c5c)}.sb-sentiment:disabled{cursor:default}.sb-spark-ring{z-index:-1;pointer-events:none;animation:.22s cubic-bezier(.25,.46,.45,.94) both sb-spark-ring-in;position:absolute;inset:-26px}.sb-spark-ring__spark{--sb-spark-angle:calc(var(--sb-spark-index) * 30deg);width:7px;height:7px;transform:translate(-50%, -50%) rotate(var(--sb-spark-angle)) translateY(-54px);background:#dedede;border-radius:50%;position:absolute;top:50%;left:50%}.sb-spark-ring__spark:nth-child(2n){width:12px;height:12px;transform:translate(-50%, -50%) rotate(var(--sb-spark-angle)) translateY(-59px)}.sb-question--choices,.sb-question--text{justify-self:stretch;width:auto;margin:0 24px}.sb-question--choices{scrollbar-gutter:stable;align-content:start;gap:8px;max-height:320.5px;overflow:hidden auto}.sb-question--choices-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.sb-question--choices-single{grid-template-columns:minmax(0,1fr)}.sb-question--choices-scrolling{padding-bottom:20px}.sb-choice{white-space:normal;overflow-wrap:anywhere;width:100%;min-width:0;height:51px;padding:0 8px}.sb-question--choices-single .sb-choice{text-align:left;border-radius:16px;justify-content:flex-start;height:auto;min-height:51px;padding:16px 22px}.sb-choice--other{color:var(--sb-theme-input-placeholder,#08080866);gap:0;font-weight:400}.sb-choice--other:before{background:var(--sb-theme-input-foreground,var(--sb-text));flex:0 0 1px;width:1px;height:22px;position:static;transform:none}.sb-question--text{padding-top:10px}.sb-question--other{animation:.25s ease-in-out both sb-step-in}.sb-textarea-shell,.sb-textarea{height:155px;min-height:155px}.sb-textarea{padding:17px 22px;font-size:16px;font-weight:400;line-height:1.2}.sb-sheet__body--question{padding-bottom:16px}.sb-sheet__footer{border-top:1px solid var(--sb-theme-sheet-divider,#e2e2e2);justify-content:flex-end;align-items:center;gap:16px;min-height:84px;margin:0;padding:16px 20px 20px;display:flex}.sb-sheet__footer-comment{color:var(--sb-theme-content-helper,var(--sb-text-muted));text-align:left;-webkit-line-clamp:2;-webkit-box-orient:vertical;flex:auto;margin:0;font-size:16px;font-weight:600;line-height:1.2;animation:.18s ease-out both sb-footer-comment-in,.18s ease-in 1s forwards sb-footer-comment-out;display:-webkit-box;overflow:hidden}.sb-next{flex:0 0 101px;height:48px}.sb-next svg{width:20px;height:20px;transform:none}.sb-sheet--completing .sb-progress__fill{transition-duration:.5s}.sb-thanks{gap:23px;padding:0;animation:.3s ease-in-out .89s both sb-completion-in}.sb-thanks__icon-shell{animation:sb-completion-icon-in .72s var(--sb-sheet-motion-ease) .35s both}.sb-thanks__icon-core svg{width:35.44px;height:27.02px}.sb-thanks__copy{width:100%;max-width:330px}.sb-thanks__copy h2{letter-spacing:-.6px;font-weight:600}.sb-thanks__copy p{max-width:292px;margin-inline:auto;line-height:1.5}.sb-thanks__actions{gap:10px}.sb-choice-measure{white-space:nowrap;visibility:hidden;width:max-content;padding:0 8px;font-size:16px;font-weight:700;position:fixed;top:-10000px;left:-10000px}.sb-choice-measure--other{padding-left:9px;padding-right:8px;font-weight:400}@keyframes sb-fab-enter-scale{0%{scale:0}to{scale:1}}@keyframes sb-fab-enter-width{0%{width:60px;translate:var(--sb-fab-anchor-offset) 0}to{width:var(--sb-fab-expanded-width);translate:0}}@keyframes sb-fab-label-in{0%{opacity:0}to{opacity:1}}@keyframes sb-fab-timer-in{0%{opacity:0}to{opacity:1}}@keyframes sb-fab-exit-width{0%{width:var(--sb-fab-exit-width,var(--sb-fab-expanded-width));translate:var(--sb-fab-exit-offset,0) 0}to{width:60px;translate:var(--sb-fab-anchor-offset) 0}}@keyframes sb-fab-label-out{0%{opacity:var(--sb-fab-exit-label-opacity,1)}to{opacity:0}}@keyframes sb-fab-badge-out{0%{scale:1}to{scale:0}}@keyframes sb-fab-exit-scale{0%{scale:var(--sb-fab-exit-scale,1)}to{scale:0}}@keyframes sb-sheet-in-mobile{0%{opacity:0;transform:translateY(28px)}to{opacity:1;transform:translateY(0)}}@keyframes sb-sheet-in-desktop{0%{opacity:0;transform:translate(-50%,calc(28px - 50%))}to{opacity:1;transform:translate(-50%,-50%)}}@keyframes sb-sheet-out-mobile{0%{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(100%)}}@keyframes sb-sheet-out-desktop{0%{opacity:1;transform:translate(-50%,-50%)}to{opacity:0;transform:translate(-50%,100vh)}}@keyframes sb-overlay-in{0%{opacity:0}to{opacity:1}}@keyframes sb-overlay-out{0%{opacity:1}to{opacity:0}}@keyframes sb-fab-timer-bar{0%{transform:scaleX(1)}to{transform:scaleX(0)}}@keyframes sb-card-in{0%{opacity:0;transform:translate(-50%,28px)}to{opacity:1;transform:translate(-50%)}}@keyframes sb-card-out{0%{opacity:1;transform:translate(-50%)}to{opacity:0;transform:translate(-50%,calc(100% + 8px))}}@keyframes sb-step-in{0%{opacity:0}to{opacity:1}}@keyframes sb-acknowledgement-in{0%{opacity:0;transform:scale(1.12)}to{opacity:1;transform:scale(1)}}@keyframes sb-next-acknowledgement{0%,to{rotate:0deg;scale:1}39%{rotate:-14deg;scale:1.18}}@keyframes sb-spark-ring-in{0%{opacity:0;transform:scale(.55)}to{opacity:1;transform:scale(1)}}@keyframes sb-footer-comment-in{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}@keyframes sb-footer-comment-out{0%{opacity:1}to{opacity:0}}@keyframes sb-completion-icon-in{0%{opacity:0;transform:translateY(46px)scale(.72)}58%{opacity:1;transform:translateY(46px)scale(1.82)}to{opacity:1;transform:translateY(0)scale(1)}}@keyframes sb-completion-in{0%{opacity:0;transform:translateY(20px)}to{opacity:1;transform:translateY(0)}}@media (prefers-reduced-motion:reduce){.sb-fab--entering,.sb-fab--entering .sb-fab__label,.sb-fab--entering .sb-fab__timer,.sb-fab--exiting,.sb-fab--exiting .sb-fab__label,.sb-fab--exiting .sb-fab__badge,.sb-sheet,.sb-step,.sb-spark-ring,.sb-sheet__acknowledgement,.sb-sheet__footer-comment,.sb-thanks,.sb-thanks__icon-shell,.sb-sheet-root__overlay,.sb-sheet-root--exiting .sb-sheet,.sb-sheet-root--exiting .sb-sheet-root__overlay{animation-duration:.001ms;animation-delay:0s}.sb-fab--entering .sb-fab__timer-fill{animation-delay:0s}.sb-sheet__footer-comment{animation:none}}";
|
|
456
|
+
var F = "<svg viewBox=\"0 0 24 24\" aria-hidden=\"true\"><path d=\"M6.4 6.4 17.6 17.6M17.6 6.4 6.4 17.6\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\"/></svg>", I = "<svg viewBox=\"0 0 14 14\" aria-hidden=\"true\"><path d=\"M6.66667 0 5.49167 1.175 10.1417 5.83333H0V7.5h10.1417l-4.65 4.6583 1.175 1.175L13.3333 6.66667 6.66667 0Z\" fill=\"currentColor\"/></svg>", L = "<svg viewBox=\"0 0 36 28\" aria-hidden=\"true\"><path d=\"m11.2619 21.3151-8.40108-8.4011L0 15.7546l11.2619 11.262L35.4379 2.84067 32.5972 0 11.2619 21.3151Z\" fill=\"currentColor\"/></svg>", R = "<svg viewBox=\"0 0 35.5556 35.5556\" aria-hidden=\"true\"><path d=\"M19.436 3.05195 11.2286 11.2594c-.5481.5481-.8592 1.3037-.8592 2.0888v14.8c0 1.6297 1.3333 2.963 2.9629 2.963h13.3334c1.1851 0 2.2518-.7111 2.7259-1.7926l4.8296-11.2741c1.2445-2.9333-.9037-6.1925-4.0889-6.1925H21.762l1.4074-6.78523c.1481-.74075-.0741-1.4963-.6074-2.02963-.8741-.85926-2.2667-.85926-3.126.01481ZM4.44343 31.1112c1.62963 0 2.96296-1.3333 2.96296-2.963V16.2964c0-1.6296-1.33333-2.963-2.96296-2.963-1.62963 0-2.96296 1.3334-2.96296 2.963v11.8518c0 1.6297 1.33333 2.963 2.96296 2.963Z\" fill=\"currentColor\"/></svg>", z = "<svg viewBox=\"0 0 35.5556 35.5556\" aria-hidden=\"true\"><path d=\"m16.1165 32.5036 8.1926-8.2074c.5481-.5482.8592-1.3037.8592-2.0889v-14.8c0-1.62963-1.3333-2.96296-2.9629-2.96296H8.88686c-1.18519 0-2.25185.71111-2.71111 1.79259L1.34612 17.511c-1.25926 2.9333.88889 6.1926 4.07407 6.1926h8.37041l-1.4074 6.7852c-.1482.7407.074 1.4963.6074 2.0296.874.8593 2.2666.8593 3.1259-.0148ZM31.1091 4.44434c-1.6296 0-2.963 1.33333-2.963 2.96296v11.8519c0 1.6296 1.3334 2.9629 2.963 2.9629 1.6296 0 2.9629-1.3333 2.9629-2.9629V7.4073c0-1.62963-1.3333-2.96296-2.9629-2.96296Z\" fill=\"currentColor\"/></svg>", B = ".sb-snackbar-root{--sb-text:var(--sb-snackbar-text);--sb-text-muted:var(--sb-theme-content-body);--sb-surface:var(--sb-snackbar-surface);z-index:1100;pointer-events:none;color:var(--sb-snackbar-text);font-family:Inter,-apple-system,BlinkMacSystemFont,system-ui,sans-serif;position:fixed;inset:0}.sb-snackbar-root *,.sb-snackbar-root :before,.sb-snackbar-root :after{box-sizing:border-box}.sb-snackbar-root h2{text-transform:none;letter-spacing:normal}.sb-snackbar-shell{left:var(--sb-snackbar-left);bottom:var(--sb-snackbar-bottom);width:var(--sb-snackbar-width);transition:left .2s ease-in-out,bottom .2s ease-in-out,width .2s ease-in-out;position:absolute}.sb-snackbar-surface{width:100%;height:var(--sb-snackbar-height,64px);border-radius:calc(var(--sb-snackbar-compact-height,64px) / 2);background:var(--sb-snackbar-surface);box-shadow:inset 0 0 0 1px var(--sb-snackbar-border);transition:height .45s cubic-bezier(0,.87,.39,1),border-radius .45s cubic-bezier(0,.87,.39,1);position:relative;overflow:hidden}.sb-snackbar-compact{width:var(--sb-snackbar-compact-width,364px);align-items:center;gap:10px;min-height:64px;padding:10px;transition:opacity .12s ease-out;display:flex;position:relative}.sb-snackbar-artwork{--sb-theme-fab-accent-primary:var(--sb-theme-sheet-progress-fill);--sb-theme-fab-accent-secondary:var(--sb-snackbar-surface);--sb-theme-fab-foreground:var(--sb-snackbar-text);background:var(--sb-theme-sheet-progress-fill);border-radius:50%;flex:0 0 40px;width:40px;height:40px;position:relative;overflow:hidden}.sb-snackbar-artwork img{z-index:2;object-fit:cover;width:100%;height:100%;position:absolute;inset:0}.sb-snackbar-prompt{overflow-wrap:anywhere;flex:1;min-width:0;margin:0;font-size:14px;font-weight:600;line-height:20px;position:relative}.sb-snackbar-answers{flex:none;gap:4px;display:flex;position:relative}.sb-snackbar-answer{width:44px;height:44px;color:var(--sb-snackbar-text);background:var(--sb-snackbar-normal);cursor:pointer;pointer-events:auto;border:0;border-radius:50%;place-items:center;margin:0;padding:0;transition:background .12s ease-out,scale .12s ease-out;display:grid}.sb-snackbar-answer svg{width:18px;height:18px}.sb-snackbar-answer:hover:not(:disabled){background:var(--sb-snackbar-hover)}.sb-snackbar-answer:active:not(:disabled){background:var(--sb-snackbar-pressed);scale:.94}.sb-snackbar-answer[aria-pressed=true]{color:var(--sb-snackbar-on-active);background:var(--sb-snackbar-active)}.sb-snackbar-answer:disabled{cursor:default;pointer-events:none;opacity:1}.sb-snackbar-close{top:-25px;width:44px;height:44px;color:var(--sb-snackbar-text);pointer-events:auto;cursor:pointer;background:0 0;border:0;place-items:center;margin:0;padding:13px;display:grid;position:absolute;inset-inline-start:-15px}.sb-snackbar-close svg{background:var(--sb-snackbar-surface);border-radius:50%;width:18px;height:18px;padding:2px}.sb-snackbar-answer:focus-visible,.sb-snackbar-close:focus-visible{outline:2px solid var(--sb-snackbar-text);outline-offset:2px}.sb-snackbar-timer{pointer-events:none;position:absolute;overflow:hidden}.sb-snackbar-timer--fill{background:var(--sb-snackbar-elapsed);inset:0}.sb-snackbar-timer--bar{inset-inline:1px 3px;background:var(--sb-theme-sheet-progress-track);height:2px;bottom:-6px}.sb-snackbar-timer-fill{transform-origin:0;background:var(--sb-theme-sheet-progress-fill);width:100%;height:100%;display:block}.sb-snackbar-timer--fill .sb-snackbar-timer-fill{background:var(--sb-snackbar-remaining)}.sb-snackbar-root:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)) .sb-snackbar-timer-fill{transform-origin:100%}.sb-snackbar-root[data-counting=true] .sb-snackbar-timer-fill{animation:sb-snackbar-countdown var(--sb-snackbar-duration) linear forwards}.sb-snackbar-root[data-frozen=true] .sb-snackbar-timer-fill{transform:scaleX(var(--sb-snackbar-fraction));animation:none}.sb-snackbar-overlay{background:var(--sb-theme-sheet-scrim);opacity:0;pointer-events:none;border:0;width:100%;height:100%;margin:0;padding:0;transition:opacity .45s ease-out;position:absolute;inset:0}.sb-snackbar-card{width:var(--sb-snackbar-card-width);max-height:var(--sb-snackbar-max-height);opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;overflow:auto}.sb-snackbar-root .sb-snackbar-card .sb-sheet-root{position:static;inset:auto}.sb-snackbar-root .sb-snackbar-card .sb-sheet-root__overlay{display:none}.sb-snackbar-root .sb-snackbar-card .sb-sheet{width:100%;max-height:none;box-shadow:none;background:0 0;border:0;margin:0;animation:none;position:relative;inset:auto;transform:none}.sb-snackbar-card[inert] *{animation-play-state:paused}.sb-snackbar-root[data-stage=widening] .sb-snackbar-compact,.sb-snackbar-root[data-stage=expanding] .sb-snackbar-compact,.sb-snackbar-root[data-stage=ready] .sb-snackbar-compact{opacity:0}.sb-snackbar-root[data-expanded=true] .sb-snackbar-overlay{opacity:1;pointer-events:auto}.sb-snackbar-root[data-expanded=true] .sb-snackbar-close{display:none}.sb-snackbar-root[data-stage=expanding] .sb-snackbar-surface,.sb-snackbar-root[data-stage=ready] .sb-snackbar-surface{box-shadow:none;background:var(--sb-theme-sheet-background);border-radius:40px}.sb-snackbar-root[data-stage=expanding] .sb-snackbar-card{opacity:1;transition:opacity .3s ease-out .12s}.sb-snackbar-root[data-stage=ready] .sb-snackbar-card{opacity:1;pointer-events:auto}.sb-snackbar-root[data-stage=entering] .sb-snackbar-shell{animation:.89016s cubic-bezier(.649439,.0577174,.124599,1) .18584s both sb-snackbar-enter-scale,.893207s cubic-bezier(.649439,.0577174,.124599,1) 1.076s both sb-snackbar-enter-width}.sb-snackbar-root[data-stage=entering] .sb-snackbar-surface{transition:none}.sb-snackbar-root[data-stage=entering] .sb-snackbar-prompt,.sb-snackbar-root[data-stage=entering] .sb-snackbar-answers,.sb-snackbar-root[data-stage=entering] .sb-snackbar-close{animation:.2s ease-out 1.076s both sb-snackbar-label}.sb-snackbar-root[data-stage=entering] .sb-snackbar-timer{animation:.2s ease-out 1.96921s both sb-snackbar-label}.sb-root--inline .sb-snackbar-root{position:absolute}@keyframes sb-snackbar-countdown{0%{transform:scaleX(1)}to{transform:scaleX(0)}}@keyframes sb-snackbar-enter-scale{0%{scale:0}to{scale:1}}@keyframes sb-snackbar-enter-width{0%{width:var(--sb-snackbar-compact-height,64px);translate:var(--sb-snackbar-entrance-offset) 0}to{width:var(--sb-snackbar-width);translate:0}}@keyframes sb-snackbar-label{0%{opacity:0}to{opacity:1}}@media (prefers-reduced-motion:reduce){.sb-snackbar-root[data-counting=true] .sb-snackbar-timer-fill{animation-duration:var(--sb-snackbar-duration)!important}.sb-snackbar-root .sb-snackbar-shell,.sb-snackbar-root .sb-snackbar-surface,.sb-snackbar-root .sb-snackbar-card,.sb-snackbar-root .sb-snackbar-compact,.sb-snackbar-root .sb-snackbar-overlay{transition:none}.sb-snackbar-root[data-stage=entering] .sb-snackbar-shell,.sb-snackbar-root[data-stage=entering] .sb-snackbar-prompt,.sb-snackbar-root[data-stage=entering] .sb-snackbar-timer,.sb-snackbar-root[data-stage=entering] .sb-snackbar-close,.sb-snackbar-root[data-stage=entering] .sb-snackbar-answers{animation:none}}.sb-snackbar-root[data-presentation=bar]{--sb-bar-hidden-y:max(80px, 100%)}.sb-snackbar-root[data-presentation=bar][data-position=top]{--sb-bar-hidden-y:calc(-1 * max(80px, 100%))}.sb-snackbar-root[data-presentation=bar][data-position=top] .sb-snackbar-shell{top:var(--sb-bar-top,0px);transition:left .2s ease-in-out,top .2s ease-in-out,width .2s ease-in-out;bottom:auto}.sb-snackbar-root[data-presentation=bar]:not([data-expanded=true]) .sb-snackbar-surface{box-shadow:none;border-radius:0}.sb-snackbar-root[data-presentation=bar] .sb-snackbar-compact{border-block-start:1px solid var(--sb-snackbar-border);min-height:48px;padding:10px max(108px, env(safe-area-inset-right,0px)) 10px max(108px, env(safe-area-inset-left,0px));pointer-events:auto;justify-content:center}.sb-snackbar-root[data-presentation=bar][data-position=bottom] .sb-snackbar-compact{padding-bottom:calc(10px + env(safe-area-inset-bottom,0px))}.sb-snackbar-root[data-presentation=bar][data-position=top] .sb-snackbar-compact{padding-top:calc(10px + env(safe-area-inset-top,0px));border-block-start:0;border-block-end:1px solid var(--sb-snackbar-border)}.sb-bar-content{align-items:center;gap:12px;min-width:0;transition:opacity .25s ease-out;display:flex;position:relative}.sb-snackbar-root[data-presentation=bar] .sb-snackbar-prompt{text-align:center;text-wrap:pretty;flex:0 auto;font-size:14px;font-weight:400;line-height:1.3}.sb-snackbar-root[data-presentation=bar] .sb-snackbar-answers{gap:4px}.sb-snackbar-root[data-presentation=bar] .sb-snackbar-answer{border:1px solid var(--sb-snackbar-border);background:var(--sb-snackbar-surface);-webkit-tap-highlight-color:transparent;border-radius:36px;width:36px;height:24px;transition:background .18s,border-color .18s,scale .15s ease-out}.sb-snackbar-root[data-presentation=bar] .sb-snackbar-answer svg{width:14.4px;height:14.4px}.sb-snackbar-root[data-presentation=bar] .sb-snackbar-answer[aria-pressed=true]{background:var(--sb-snackbar-active);color:var(--sb-snackbar-on-active)}.sb-bar-acknowledgement{opacity:0;visibility:hidden;pointer-events:none;text-align:center;color:var(--sb-snackbar-text);justify-content:center;align-items:center;padding:10px 24px;font-size:18px;font-weight:600;line-height:1.4;transition:opacity .35s cubic-bezier(.16,1,.3,1) .1s,translate .35s cubic-bezier(.16,1,.3,1) .1s;display:flex;position:absolute;inset:0;translate:0 10px}.sb-snackbar-root[data-rated=true] .sb-bar-content,.sb-snackbar-root[data-rated=true] .sb-bar-dismiss,.sb-snackbar-root[data-rated=true][data-presentation=bar] .sb-snackbar-timer{opacity:0;pointer-events:none}.sb-snackbar-root[data-rated=true] .sb-bar-acknowledgement{opacity:1;visibility:visible;translate:0}.sb-bar-acknowledgement-copy{overflow-wrap:anywhere;min-width:0;max-width:100%}.sb-snackbar-root[data-presentation=bar][data-rated=true] .sb-snackbar-compact{min-height:var(--sb-snackbar-height,48px)}.sb-bar-dismiss{inset-inline-end:20px;width:68px;height:44px;color:var(--sb-theme-content-body);font:inherit;white-space:nowrap;cursor:pointer;background:0 0;border:0;border-radius:0;margin:0;padding:0 5px;font-size:14px;line-height:1.3;transition:opacity .25s ease-out;position:absolute;top:50%;translate:0 -50%}.sb-snackbar-root[data-presentation=bar] .sb-snackbar-answer:hover:not(:disabled){background:var(--sb-snackbar-surface)}@media (hover:hover){.sb-snackbar-root[data-presentation=bar] .sb-snackbar-answer:hover:not(:disabled){background:var(--sb-snackbar-hover);border-color:var(--sb-theme-input-border)}}.sb-snackbar-root[data-presentation=bar] .sb-snackbar-answer:not(:disabled):active{background:var(--sb-snackbar-pressed);scale:.96}.sb-bar-dismiss:focus-visible{outline:2px solid var(--sb-snackbar-text);outline-offset:2px}.sb-bar-dismiss:disabled{cursor:default}.sb-snackbar-root[data-presentation=bar] .sb-snackbar-timer{transition:opacity .25s ease-out}.sb-snackbar-root[data-presentation=bar] .sb-snackbar-timer--bar{inset-inline:auto 25px;background:var(--sb-snackbar-border);width:58px;height:1px;top:calc(50% + 8px);bottom:auto}.sb-snackbar-root[data-presentation=bar] .sb-snackbar-timer--bar .sb-snackbar-timer-fill{background:var(--sb-theme-content-body)}.sb-snackbar-root[data-presentation=bar][data-paused=true] .sb-snackbar-timer-fill{animation-play-state:paused}.sb-snackbar-root[data-presentation=bar][data-stage=entering] .sb-snackbar-shell{animation:.45s cubic-bezier(.16,1,.3,1) .4s both sb-bar-enter}.sb-snackbar-root[data-presentation=bar][data-exiting=true] .sb-snackbar-shell{pointer-events:none;animation:.4s cubic-bezier(.55,0,.55,.2) both sb-bar-exit}.sb-snackbar-root[data-presentation=bar][data-exiting=true] .sb-snackbar-overlay{opacity:0;pointer-events:none}.sb-snackbar-root[data-presentation=bar][data-exiting=true][data-expanded=true] .sb-snackbar-shell{animation:.4s ease-out both sb-bar-card-exit}.sb-snackbar-root[data-presentation=bar][data-stage=entering] .sb-snackbar-prompt,.sb-snackbar-root[data-presentation=bar][data-stage=entering] .sb-snackbar-answers,.sb-snackbar-root[data-presentation=bar][data-stage=entering] .sb-snackbar-timer{animation:none}@keyframes sb-bar-enter{0%{translate:0 var(--sb-bar-hidden-y)}to{translate:0}}@keyframes sb-bar-exit{0%{translate:0}to{translate:0 var(--sb-bar-hidden-y)}}@keyframes sb-bar-fade-in{0%{opacity:0}to{opacity:1}}@keyframes sb-bar-fade-out{0%{opacity:1}to{opacity:0}}@keyframes sb-bar-card-exit{0%{opacity:1;translate:0}to{opacity:0;translate:0 12px}}@media (width<=768px){.sb-snackbar-root[data-presentation=bar] .sb-snackbar-compact{padding-inline:max(24px, env(safe-area-inset-left,0px)) max(24px, env(safe-area-inset-right,0px))}.sb-bar-content{width:100%}.sb-snackbar-root[data-presentation=bar] .sb-snackbar-prompt{text-align:start;flex:1}.sb-snackbar-root[data-presentation=bar] .sb-snackbar-answers{gap:5.333px}.sb-snackbar-root[data-presentation=bar] .sb-snackbar-answer{border-radius:48px;width:48px;height:32px}.sb-snackbar-root[data-presentation=bar] .sb-snackbar-answer svg{width:19.2px;height:19.2px}.sb-bar-acknowledgement{text-align:start;justify-content:flex-start}.sb-snackbar-root[data-presentation=bar][data-timed=true] .sb-bar-dismiss{display:none}.sb-snackbar-root[data-presentation=bar][data-timed=false] .sb-bar-content{padding-inline-end:76px}.sb-snackbar-root[data-presentation=bar] .sb-snackbar-timer--bar{inset-inline:0;width:auto;top:0}.sb-snackbar-root[data-presentation=bar][data-position=top] .sb-snackbar-timer--bar{top:auto;bottom:0}}.sb-root--inline .sb-snackbar-root[data-presentation=bar] .sb-snackbar-compact{padding-block:10px}@media (prefers-reduced-motion:reduce){.sb-snackbar-root[data-presentation=bar][data-stage=entering] .sb-snackbar-shell{animation:.15s ease-out both sb-bar-fade-in}.sb-snackbar-root[data-presentation=bar][data-exiting=true] .sb-snackbar-shell,.sb-snackbar-root[data-presentation=bar][data-exiting=true][data-expanded=true] .sb-snackbar-shell{animation:.15s ease-out both sb-bar-fade-out}.sb-snackbar-root[data-presentation=bar][data-position=top] .sb-snackbar-shell{transition:none}.sb-bar-acknowledgement{transition:opacity .15s ease-out;translate:none}.sb-bar-content,.sb-bar-dismiss{transition:opacity .15s ease-out}.sb-snackbar-root[data-presentation=bar] .sb-snackbar-answer:not(:disabled):active{scale:1}}:host{--sb-surface:var(--sb-theme-sheet-background,#fff);--sb-surface-muted:var(--sb-theme-button-secondary-background,#f2f2f2);--sb-border:var(--sb-theme-input-border,#0808081f);--sb-border-strong:#0808083d;--sb-border-active:var(--sb-theme-input-focused-border,#080808b3);--sb-text:var(--sb-theme-content-heading,#080808);--sb-text-muted:var(--sb-theme-content-body,#5c5c5c);--sb-overlay:var(--sb-theme-sheet-scrim,#00000061);--sb-ease:cubic-bezier(.2, .9, .2, 1);--sb-fab-motion-ease:cubic-bezier(.649439, .0577174, .124599, 1);--sb-sheet-motion-ease:cubic-bezier(0, .87, .39, 1);font-family:-apple-system,BlinkMacSystemFont,system-ui,Segoe UI,Roboto,Helvetica Neue,Arial,sans-serif}.sb-safe-area-probe{visibility:hidden;pointer-events:none;padding:env(safe-area-inset-top,0px) env(safe-area-inset-right,0px) env(safe-area-inset-bottom,0px) env(safe-area-inset-left,0px);position:fixed;inset:0}.sb-fab{right:16px;bottom:calc(24px + env(safe-area-inset-bottom,0px));z-index:1000;box-sizing:border-box;border:1px solid var(--sb-theme-fab-border,#080808);background:var(--sb-theme-fab-background,#080808);min-width:0;height:60px;color:var(--sb-theme-fab-foreground,#fff);border-color:var(--sb-theme-fab-border,#080808);cursor:pointer;will-change:transform;align-items:center;transition:scale .12s ease-out;display:inline-flex;position:fixed;overflow:hidden}.sb-fab--entering{animation:sb-fab-enter-scale .89016s var(--sb-fab-motion-ease) .259705s both, sb-fab-enter-width .893207s var(--sb-fab-motion-ease) 1.076s both;transform-origin:50%!important}.sb-fab--entering .sb-fab__label{animation:sb-fab-label-in .2s var(--sb-fab-motion-ease) 1.14987s both}.sb-fab--entering .sb-fab__timer{animation:sb-fab-timer-in .2s var(--sb-fab-motion-ease) 1.96921s both}.sb-fab--entering .sb-fab__timer-fill{animation-delay:1.96921s}.sb-fab--exiting{width:var(--sb-fab-exit-width,var(--sb-fab-expanded-width));pointer-events:none;scale:var(--sb-fab-exit-scale,1);translate:var(--sb-fab-exit-offset,0) 0;animation:.292089s cubic-bezier(.677885,.170122,.695982,.997824) .3s forwards sb-fab-exit-width,.390467s cubic-bezier(.362165,.0946429,.49708,.932961) .466372s forwards sb-fab-exit-scale;transform:none;transform-origin:50%!important}.sb-fab--exiting .sb-fab__label{opacity:var(--sb-fab-exit-label-opacity,1);animation:.389727s cubic-bezier(.5,0,.5,1) .3s forwards sb-fab-label-out}.sb-fab--exiting .sb-fab__timer{opacity:var(--sb-fab-exit-timer-opacity,0)}.sb-fab--exiting .sb-fab__badge{animation:.297243s cubic-bezier(.5,0,1,.600461) .398177s forwards sb-fab-badge-out}.sb-next:hover,.sb-next:focus-visible,.sb-button:hover,.sb-button:focus-visible,.sb-choice:hover,.sb-choice:focus-visible{transform:translateY(-1px)}.sb-fab:active{transition-duration:80ms;scale:.97}.sb-fab:focus-visible,.sb-next:focus-visible,.sb-button:focus-visible,.sb-choice:focus-visible,.sb-sheet__close:focus-visible,.sb-sentiment:focus-visible,.sb-sheet-root__overlay:focus-visible{outline-offset:2px;outline:2px solid #6366f1a6}.sb-fab--expanded{width:var(--sb-fab-expanded-width,auto);border-radius:999px;justify-content:flex-start;gap:12px;min-height:60px;padding:13px 28px 13px 14px}.sb-fab__label{z-index:1;width:var(--sb-fab-label-width,auto);color:currentColor;text-align:left;white-space:nowrap;text-overflow:clip;min-width:0;font-size:14px;font-weight:600;line-height:1;position:relative;overflow:hidden}.sb-fab__badge{z-index:1;background:var(--sb-theme-fab-accent-primary,#f97316);border-radius:50%;flex:none;place-items:center;width:32px;height:32px;display:grid;position:relative}.sb-fab__badge-artwork{background:var(--sb-theme-fab-accent-secondary,#2563eb);border-radius:50%;display:block;position:absolute;inset:5.44px}.sb-fab__badge-image{z-index:2;border-radius:inherit;object-fit:cover;width:100%;height:100%;display:block;position:absolute;inset:0}.sb-fab__badge-glyph-center,.sb-fab__badge-glyph-amber,.sb-fab__badge-glyph-mint,.sb-fab__badge-glyph-rose{border-radius:999px;display:block;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.sb-fab__badge-glyph-center{background:var(--sb-theme-fab-foreground,#fff);border-radius:3.52px;width:4.16px;height:11.52px}.sb-fab__badge-glyph-amber{background:#fac143;width:2.88px;height:6.72px;translate:-3.04px .8px}.sb-fab__badge-glyph-mint{background:#39c690;width:2.88px;height:5.44px;translate:3.04px -.32px}.sb-fab__badge-glyph-rose{background:#e86398;width:2.56px;height:4.16px;translate:.96px 3.68px}.sb-fab__timer{z-index:0;pointer-events:none;position:absolute;overflow:hidden}.sb-fab__timer--bar{background:var(--sb-theme-fab-timer-track,#08080829);border-radius:999px;height:2px;bottom:4px;left:59px;right:29px}.sb-fab[data-timer-direction=rtl] .sb-fab__timer--bar{left:29px;right:59px}.sb-fab__timer--fill{border-radius:inherit;background:var(--sb-theme-fab-timer-track,#08080829);inset:0}.sb-fab__timer-fill{border-radius:inherit;background:var(--sb-theme-fab-timer-fill,#080808e6);width:100%;height:100%;transform-origin:var(--sb-fab-timer-origin,left);animation:sb-fab-timer-bar var(--sb-timer-duration) linear forwards;display:block}.sb-sheet-root{z-index:1100;position:fixed;inset:0}.sb-sheet-root__overlay{background:var(--sb-overlay);cursor:pointer;border:none;animation:.2s ease-in both sb-overlay-in;position:absolute;inset:0}.sb-sheet-root--exiting{pointer-events:none}.sb-sheet-root--exiting .sb-sheet-root__overlay{animation:.2s ease-in forwards sb-overlay-out}.sb-sheet{width:min(100%,100vw);min-height:418px;padding:24px 20px calc(18px + env(safe-area-inset-bottom,0px));box-sizing:border-box;background:var(--sb-surface);box-shadow:var(--sb-shadow);color:var(--sb-text);animation:sb-sheet-in-mobile .45s var(--sb-sheet-motion-ease) both;border-radius:40px 40px 0 0;position:absolute;bottom:0;left:0;right:0}.sb-sheet--thanks{min-height:381px;padding-top:18px}.sb-sheet__header{justify-content:flex-end;align-items:flex-start;min-height:28px;margin-bottom:22px;display:flex;position:relative}.sb-progress{background:var(--sb-theme-sheet-progress-track,#eaeaea);border-radius:999px;width:219px;max-width:calc(100% - 96px);height:6px;position:absolute;top:5px;left:50%;overflow:hidden;transform:translate(-50%)}.sb-progress__fill{border-radius:inherit;background:var(--sb-theme-sheet-progress-fill,#080808);height:100%;transition:width .22s var(--sb-ease);display:block}.sb-sheet__close{background:var(--sb-theme-sheet-close-button-background,transparent);width:20px;height:20px;color:var(--sb-theme-sheet-close-button-foreground,var(--sb-text));cursor:pointer;border:none;padding:0}.sb-sheet__close svg,.sb-next svg,.sb-thanks__icon-core svg{width:100%;height:100%;display:block}.sb-sheet__body{gap:26px;display:grid}.sb-sheet__copy{justify-items:center;gap:8px;display:grid}.sb-sheet__eyebrow{color:var(--sb-theme-content-helper,var(--sb-text-muted));text-align:center;margin:0;font-size:16px;font-weight:400;line-height:1.4}.sb-sheet__body h2,.sb-thanks__copy h2{color:var(--sb-theme-content-heading,var(--sb-text));text-align:center;margin:0;font-size:22px;font-weight:600;line-height:1.2}.sb-sheet__body h2{justify-self:center;width:min(297px,100%)}.sb-choice--selected,.sb-choice:hover,.sb-textarea-shell:focus-within{border-color:var(--sb-theme-choice-hover-border,var(--sb-border-active))}.sb-choice:hover{background:var(--sb-theme-choice-hover-background,var(--sb-surface));color:var(--sb-theme-choice-hover-foreground,var(--sb-text))}.sb-choice:active{border-color:var(--sb-theme-choice-pressed-border,var(--sb-border-active));background:var(--sb-theme-choice-pressed-background,var(--sb-surface-muted));color:var(--sb-theme-choice-pressed-foreground,var(--sb-text))}.sb-choice--selected{box-shadow:0 0 0 3px #0808080d}.sb-choice:disabled{border-color:var(--sb-theme-choice-disabled-border,#e2e2e2);background:var(--sb-theme-choice-disabled-background,#f2f2f2);color:var(--sb-theme-choice-disabled-foreground,#5c5c5c);cursor:not-allowed}.sb-question--choices{grid-template-columns:repeat(2,160px);justify-content:center;justify-self:center;gap:9px;width:min(330px,100%)}.sb-choice{border:1px solid var(--sb-theme-choice-default-border,#e2e2e2);background:var(--sb-theme-choice-default-background,var(--sb-surface));width:160px;height:51px;color:var(--sb-theme-choice-default-foreground,var(--sb-text));text-align:center;white-space:nowrap;cursor:pointer;transition:transform .2s var(--sb-ease), border-color .18s ease, box-shadow .18s ease, background-color .18s ease;border-radius:999px;justify-content:center;align-items:center;padding:0 16px;font-size:16px;font-weight:700;line-height:1.2;display:flex}.sb-choice__label{-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.sb-choice--other{border-color:var(--sb-theme-choice-default-border,#e2e2e2);padding:0;font-weight:400}.sb-choice__other-content{align-items:center;gap:0;display:inline-flex}.sb-choice__other-caret{background:var(--sb-theme-input-foreground,var(--sb-text));flex:none;width:1px;height:22px}.sb-choice__other-label{color:var(--sb-theme-input-placeholder,#08080866);line-height:1.2}.sb-choice--selected{border-color:var(--sb-theme-choice-selected-border,var(--sb-text));background:var(--sb-theme-choice-selected-background,var(--sb-text));color:var(--sb-theme-choice-selected-foreground,var(--sb-surface))}.sb-question--text{justify-self:center;width:min(330px,100%)}.sb-textarea-shell{border:1px solid var(--sb-theme-input-border,#08080833);background:var(--sb-theme-input-background,var(--sb-surface));border-radius:16px;width:100%;min-height:155px;transition:border-color .18s,box-shadow .18s}.sb-textarea{resize:none;width:100%;min-height:155px;color:var(--sb-theme-input-foreground,var(--sb-text));font:inherit;box-sizing:border-box;background:0 0;border:none;outline:none;padding:16px 22px;font-size:16px;line-height:1.2}.sb-textarea::placeholder{color:var(--sb-theme-input-placeholder,#08080866)}.sb-textarea-shell:focus-within{border-color:var(--sb-theme-input-focused-border,var(--sb-border-active))}.sb-textarea:disabled{color:var(--sb-theme-input-disabled-foreground,var(--sb-text-muted))}.sb-textarea-shell:has(.sb-textarea:disabled){background:var(--sb-theme-input-disabled-background,var(--sb-surface-muted))}.sb-sheet__footer{min-height:84px;margin:0 -20px calc(-18px - env(safe-area-inset-bottom,0px));padding:18px 20px calc(18px + env(safe-area-inset-bottom,0px));border-top:1px solid var(--sb-theme-sheet-divider,#e2e2e2);box-sizing:border-box;justify-content:flex-end;align-items:center;gap:16px;display:flex}.sb-next,.sb-button{cursor:pointer;min-height:48px;font:inherit;transition:transform .2s var(--sb-ease), opacity .18s ease, box-shadow .18s ease;border:none;border-radius:999px}.sb-next{background:var(--sb-theme-button-primary-background,#080808);width:101px;color:var(--sb-theme-button-primary-foreground,#fff);place-items:center;padding:0;display:grid}.sb-next--acknowledging svg{animation:.36s cubic-bezier(.2,.8,.2,1) both sb-next-acknowledgement}.sb-next:disabled,.sb-button:disabled{cursor:not-allowed;box-shadow:none;transform:none}.sb-next:disabled{background:var(--sb-theme-button-primary-disabled-background,#080808);color:var(--sb-theme-button-primary-disabled-foreground,#fff)}.sb-thanks{justify-items:center;gap:23px;padding-top:12px;display:grid}.sb-thanks__icon-shell{background:var(--sb-theme-completion-outer-background,#f0f0f0);border-radius:999px;place-items:center;width:120px;height:120px;display:grid}.sb-thanks__icon-core{background:var(--sb-theme-completion-inner-background,#080808);width:66px;height:66px;color:var(--sb-theme-completion-glyph,#fff);border-radius:999px;place-items:center;display:grid}.sb-thanks__copy{gap:8px;max-width:313px;display:grid}.sb-thanks__copy h2{letter-spacing:-.03em;font-size:30px;line-height:1.1}.sb-thanks__copy p{color:var(--sb-theme-content-body,var(--sb-text-muted));text-align:center;margin:0;font-size:14px;line-height:1.3}.sb-thanks__actions{gap:10px;width:100%;display:flex}.sb-button{flex:1 1 0;padding:16px;font-size:14px;font-weight:600;line-height:1}.sb-button--primary{background:var(--sb-theme-button-primary-background,#080808);color:var(--sb-theme-button-primary-foreground,#fff)}.sb-button--secondary{background:var(--sb-theme-button-secondary-background,#f2f2f2);color:var(--sb-theme-button-secondary-foreground,var(--sb-text))}.sb-button--tertiary{background:var(--sb-theme-button-tertiary-background,transparent);color:var(--sb-theme-button-tertiary-foreground,var(--sb-text))}.sb-button--primary:hover,.sb-button--primary:focus-visible{background:var(--sb-theme-button-primary-hover-background,#080808)}.sb-button--secondary:hover,.sb-button--secondary:focus-visible{background:var(--sb-theme-button-secondary-hover-background,#f2f2f2)}.sb-button--tertiary:hover,.sb-button--tertiary:focus-visible{background:var(--sb-theme-button-tertiary-hover-background,#f2f2f2)}.sb-button--primary:active{background:var(--sb-theme-button-primary-pressed-background,#080808)}.sb-button--secondary:active{background:var(--sb-theme-button-secondary-pressed-background,#e2e2e2)}.sb-button--tertiary:active{background:var(--sb-theme-button-tertiary-pressed-background,#e2e2e2)}.sb-button--primary:disabled{background:var(--sb-theme-button-primary-disabled-background,#080808);color:var(--sb-theme-button-primary-disabled-foreground,#fff)}.sb-button--secondary:disabled{background:var(--sb-theme-button-secondary-disabled-background,#f2f2f2);color:var(--sb-theme-button-secondary-disabled-foreground,var(--sb-text))}.sb-button--tertiary:disabled{background:var(--sb-theme-button-tertiary-disabled-background,#f2f2f2);color:var(--sb-theme-button-tertiary-disabled-foreground,var(--sb-text))}@media (width>=768px){.sb-fab{bottom:24px;right:24px}}.sb-sheet-root__overlay{padding:0}.sb-sheet{top:auto;right:auto;bottom:calc(8px + env(safe-area-inset-bottom,0px));width:min(376px,100% - 24px);min-height:0;max-height:calc(100% - 16px - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px));box-shadow:none;animation:sb-card-in .45s var(--sb-sheet-motion-ease) both;interpolate-size:allow-keywords;border-radius:40px;padding:0;transition:height .45s cubic-bezier(0,.83,.363,.994);position:absolute;left:50%;overflow:hidden;transform:translate(-50%)}.sb-sheet-root--exiting .sb-sheet{animation:.45s ease-in forwards sb-card-out}.sb-sheet--thanks{min-height:0;padding:22px 20px}.sb-sheet__header{height:50px;min-height:0;margin:0;display:block;position:relative}.sb-progress{width:216px;max-width:calc(100% - 96px);height:6px;top:27px}.sb-progress__fill{transition:width .45s var(--sb-sheet-motion-ease)}.sb-sheet__close{box-sizing:border-box;border-radius:4px;width:40px;height:40px;padding:8px;position:absolute;top:10px;right:16px}.sb-sheet__close svg{width:24px;height:24px}.sb-sheet__body{animation:.25s ease-in-out both sb-step-in;display:block}.sb-sheet__copy{box-sizing:border-box;align-content:center;justify-items:center;gap:0;height:88px;padding:0 23px;display:grid}.sb-sheet__body h2{text-align:center;text-wrap:balance;width:100%;margin:0;font-size:19px;font-weight:600;line-height:1.22}.sb-sheet__body--sentiment{padding:12px 24px 22px}.sb-sheet__body--sentiment .sb-sheet__copy{gap:8px;height:auto;min-height:84px;padding:0}.sb-sheet__body--sentiment .sb-sheet__eyebrow{color:var(--sb-theme-content-helper,var(--sb-text-muted));text-align:center;-webkit-line-clamp:2;-webkit-box-orient:vertical;margin:0;font-size:16px;font-weight:400;line-height:1.2;display:-webkit-box;overflow:hidden}.sb-sheet__body--sentiment h2{-webkit-line-clamp:3;-webkit-box-orient:vertical;font-size:22px;font-weight:600;line-height:1.2;display:-webkit-box;overflow:hidden}.sb-sheet__body--sentiment h2.sb-sheet__acknowledgement{align-content:center;min-height:70px;font-size:29px;line-height:1.08;animation:.28s cubic-bezier(.2,.8,.2,1) both sb-acknowledgement-in}.sb-question{justify-items:stretch;display:grid}.sb-question--sentiment{grid-template-columns:repeat(2,80px);justify-content:center;gap:25px;width:185px;margin:37px auto 31px;position:relative}.sb-sheet__body--sentiment:has(.sb-sheet__acknowledgement) .sb-question--sentiment{margin-top:35px}.sb-sentiment{z-index:0;border:1.111px solid var(--sb-theme-choice-default-border,#e2e2e2);background:var(--sb-theme-choice-default-background,var(--sb-surface));width:80px;height:80px;color:var(--sb-theme-choice-default-foreground,var(--sb-text));cursor:pointer;border-radius:50%;place-items:center;padding:0;transition:transform .12s ease-out,border-color .18s,background-color .18s;display:grid;position:relative}.sb-sentiment__icon{z-index:1;width:35.5556px;height:35.5556px}.sb-sentiment__icon svg{width:100%;height:100%;display:block}.sb-sentiment:hover{border-color:var(--sb-theme-choice-hover-border,var(--sb-border-active));background:var(--sb-theme-choice-hover-background,var(--sb-surface));color:var(--sb-theme-choice-hover-foreground,var(--sb-text))}.sb-sentiment:active{border-color:var(--sb-theme-choice-pressed-border,var(--sb-border-active));background:var(--sb-theme-choice-pressed-background,var(--sb-surface-muted));color:var(--sb-theme-choice-pressed-foreground,var(--sb-text));transform:scale(.97)}.sb-sentiment--selected,.sb-sentiment--selected:disabled{border-color:var(--sb-theme-choice-selected-border,var(--sb-text));background:var(--sb-theme-choice-selected-background,var(--sb-text));color:var(--sb-theme-choice-selected-foreground,var(--sb-surface))}.sb-sentiment:disabled:not(.sb-sentiment--selected){border-color:var(--sb-theme-choice-disabled-border,#e2e2e2);background:var(--sb-theme-choice-disabled-background,#f2f2f2);color:var(--sb-theme-choice-disabled-foreground,#5c5c5c)}.sb-sentiment:disabled{cursor:default}.sb-spark-ring{z-index:-1;pointer-events:none;animation:.22s cubic-bezier(.25,.46,.45,.94) both sb-spark-ring-in;position:absolute;inset:-26px}.sb-spark-ring__spark{--sb-spark-angle:calc(var(--sb-spark-index) * 30deg);width:7px;height:7px;transform:translate(-50%, -50%) rotate(var(--sb-spark-angle)) translateY(-54px);background:#dedede;border-radius:50%;position:absolute;top:50%;left:50%}.sb-spark-ring__spark:nth-child(2n){width:12px;height:12px;transform:translate(-50%, -50%) rotate(var(--sb-spark-angle)) translateY(-59px)}.sb-question--choices,.sb-question--text{justify-self:stretch;width:auto;margin:0 24px}.sb-question--choices{scrollbar-gutter:stable;align-content:start;gap:8px;max-height:320.5px;overflow:hidden auto}.sb-question--choices-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.sb-question--choices-single{grid-template-columns:minmax(0,1fr)}.sb-question--choices-scrolling{padding-bottom:20px}.sb-choice{white-space:normal;overflow-wrap:anywhere;width:100%;min-width:0;height:51px;padding:0 8px}.sb-question--choices-single .sb-choice{text-align:left;border-radius:16px;justify-content:flex-start;height:auto;min-height:51px;padding:16px 22px}.sb-choice--other{color:var(--sb-theme-input-placeholder,#08080866);gap:0;font-weight:400}.sb-choice--other:before{background:var(--sb-theme-input-foreground,var(--sb-text));flex:0 0 1px;width:1px;height:22px;position:static;transform:none}.sb-question--text{padding-top:10px}.sb-question--other{animation:.25s ease-in-out both sb-step-in}.sb-textarea-shell,.sb-textarea{height:155px;min-height:155px}.sb-textarea{padding:17px 22px;font-size:16px;font-weight:400;line-height:1.2}.sb-sheet__body--question{padding-bottom:16px}.sb-sheet__footer{border-top:1px solid var(--sb-theme-sheet-divider,#e2e2e2);justify-content:flex-end;align-items:center;gap:16px;min-height:84px;margin:0;padding:16px 20px 20px;display:flex}.sb-sheet__footer-comment{color:var(--sb-theme-content-helper,var(--sb-text-muted));text-align:left;-webkit-line-clamp:2;-webkit-box-orient:vertical;flex:auto;margin:0;font-size:16px;font-weight:600;line-height:1.2;animation:.18s ease-out both sb-footer-comment-in,.18s ease-in 1s forwards sb-footer-comment-out;display:-webkit-box;overflow:hidden}.sb-next{flex:0 0 101px;height:48px}.sb-next svg{width:20px;height:20px;transform:none}.sb-sheet--completing .sb-progress__fill{transition-duration:.5s}.sb-thanks{gap:23px;padding:0;animation:.3s ease-in-out .89s both sb-completion-in}.sb-thanks__icon-shell{animation:sb-completion-icon-in .72s var(--sb-sheet-motion-ease) .35s both}.sb-thanks__icon-core svg{width:35.44px;height:27.02px}.sb-thanks__copy{width:100%;max-width:330px}.sb-thanks__copy h2{letter-spacing:-.6px;font-weight:600}.sb-thanks__copy p{max-width:292px;margin-inline:auto;line-height:1.5}.sb-thanks__actions{gap:10px}.sb-choice-measure{white-space:nowrap;visibility:hidden;width:max-content;padding:0 8px;font-size:16px;font-weight:700;position:fixed;top:-10000px;left:-10000px}.sb-choice-measure--other{padding-left:9px;padding-right:8px;font-weight:400}@keyframes sb-fab-enter-scale{0%{scale:0}to{scale:1}}@keyframes sb-fab-enter-width{0%{width:60px;translate:var(--sb-fab-anchor-offset) 0}to{width:var(--sb-fab-expanded-width);translate:0}}@keyframes sb-fab-label-in{0%{opacity:0}to{opacity:1}}@keyframes sb-fab-timer-in{0%{opacity:0}to{opacity:1}}@keyframes sb-fab-exit-width{0%{width:var(--sb-fab-exit-width,var(--sb-fab-expanded-width));translate:var(--sb-fab-exit-offset,0) 0}to{width:60px;translate:var(--sb-fab-anchor-offset) 0}}@keyframes sb-fab-label-out{0%{opacity:var(--sb-fab-exit-label-opacity,1)}to{opacity:0}}@keyframes sb-fab-badge-out{0%{scale:1}to{scale:0}}@keyframes sb-fab-exit-scale{0%{scale:var(--sb-fab-exit-scale,1)}to{scale:0}}@keyframes sb-sheet-in-mobile{0%{opacity:0;transform:translateY(28px)}to{opacity:1;transform:translateY(0)}}@keyframes sb-sheet-in-desktop{0%{opacity:0;transform:translate(-50%,calc(28px - 50%))}to{opacity:1;transform:translate(-50%,-50%)}}@keyframes sb-sheet-out-mobile{0%{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(100%)}}@keyframes sb-sheet-out-desktop{0%{opacity:1;transform:translate(-50%,-50%)}to{opacity:0;transform:translate(-50%,100vh)}}@keyframes sb-overlay-in{0%{opacity:0}to{opacity:1}}@keyframes sb-overlay-out{0%{opacity:1}to{opacity:0}}@keyframes sb-fab-timer-bar{0%{transform:scaleX(1)}to{transform:scaleX(0)}}@keyframes sb-card-in{0%{opacity:0;transform:translate(-50%,28px)}to{opacity:1;transform:translate(-50%)}}@keyframes sb-card-out{0%{opacity:1;transform:translate(-50%)}to{opacity:0;transform:translate(-50%,calc(100% + 8px))}}@keyframes sb-step-in{0%{opacity:0}to{opacity:1}}@keyframes sb-acknowledgement-in{0%{opacity:0;transform:scale(1.12)}to{opacity:1;transform:scale(1)}}@keyframes sb-next-acknowledgement{0%,to{rotate:0deg;scale:1}39%{rotate:-14deg;scale:1.18}}@keyframes sb-spark-ring-in{0%{opacity:0;transform:scale(.55)}to{opacity:1;transform:scale(1)}}@keyframes sb-footer-comment-in{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}@keyframes sb-footer-comment-out{0%{opacity:1}to{opacity:0}}@keyframes sb-completion-icon-in{0%{opacity:0;transform:translateY(46px)scale(.72)}58%{opacity:1;transform:translateY(46px)scale(1.82)}to{opacity:1;transform:translateY(0)scale(1)}}@keyframes sb-completion-in{0%{opacity:0;transform:translateY(20px)}to{opacity:1;transform:translateY(0)}}@media (prefers-reduced-motion:reduce){.sb-fab--entering,.sb-fab--entering .sb-fab__label,.sb-fab--entering .sb-fab__timer,.sb-fab--exiting,.sb-fab--exiting .sb-fab__label,.sb-fab--exiting .sb-fab__badge,.sb-sheet,.sb-step,.sb-spark-ring,.sb-sheet__acknowledgement,.sb-sheet__footer-comment,.sb-thanks,.sb-thanks__icon-shell,.sb-sheet-root__overlay,.sb-sheet-root--exiting .sb-sheet,.sb-sheet-root--exiting .sb-sheet-root__overlay{animation-duration:.001ms;animation-delay:0s}.sb-fab--entering .sb-fab__timer-fill{animation-delay:0s}.sb-sheet__footer-comment{animation:none}}";
|
|
436
457
|
//#endregion
|
|
437
458
|
//#region src/ui/snackbar-ui.ts
|
|
438
459
|
function V(e, t) {
|
|
439
460
|
let n = document.createElement(e);
|
|
440
461
|
return n.className = t, n;
|
|
441
462
|
}
|
|
442
|
-
var
|
|
463
|
+
var re = class {
|
|
443
464
|
root = V("div", "sb-snackbar-root");
|
|
444
465
|
shell = V("div", "sb-snackbar-shell");
|
|
445
466
|
surface = V("div", "sb-snackbar-surface");
|
|
@@ -447,6 +468,9 @@ var te = class {
|
|
|
447
468
|
card = V("div", "sb-snackbar-card");
|
|
448
469
|
overlay = document.createElement("button");
|
|
449
470
|
close = document.createElement("button");
|
|
471
|
+
acknowledgement = V("span", "sb-bar-acknowledgement");
|
|
472
|
+
acknowledgementCopy = V("span", "sb-bar-acknowledgement-copy");
|
|
473
|
+
barContent = V("div", "sb-bar-content");
|
|
450
474
|
answers = /* @__PURE__ */ new Map();
|
|
451
475
|
timers = /* @__PURE__ */ new Set();
|
|
452
476
|
observer;
|
|
@@ -460,56 +484,60 @@ var te = class {
|
|
|
460
484
|
onReady;
|
|
461
485
|
constructor(e, t, n, r, i, a) {
|
|
462
486
|
this.store = e, this.safeAreaProbe = r, this.renderCard = i, this.onReady = a, this.session = t;
|
|
463
|
-
let o = t.
|
|
464
|
-
this.
|
|
465
|
-
let c =
|
|
466
|
-
|
|
467
|
-
let l = V("span", "sb-
|
|
487
|
+
let o = t.sentimentPresentation === "bar";
|
|
488
|
+
this.root.dataset.presentation = t.sentimentPresentation, this.root.dataset.position = t.barPosition;
|
|
489
|
+
let s = t.survey.questions[t.survey.root_node_id], { imageUrl: c } = m(s, t.survey.fab);
|
|
490
|
+
this.compact.setAttribute("role", "group"), this.compact.setAttribute("aria-label", s.prompt);
|
|
491
|
+
let l = V("span", "sb-snackbar-artwork");
|
|
492
|
+
l.setAttribute("aria-hidden", "true");
|
|
493
|
+
let u = V("span", "sb-fab__badge-artwork");
|
|
468
494
|
for (let e of [
|
|
469
495
|
"center",
|
|
470
496
|
"amber",
|
|
471
497
|
"mint",
|
|
472
498
|
"rose"
|
|
473
|
-
])
|
|
474
|
-
if (
|
|
499
|
+
]) u.append(V("span", `sb-fab__badge-glyph-${e}`));
|
|
500
|
+
if (l.append(u), c) {
|
|
475
501
|
let e = document.createElement("img");
|
|
476
|
-
e.src =
|
|
502
|
+
e.src = c, e.alt = "", e.addEventListener("error", () => e.remove(), { once: !0 }), l.append(e);
|
|
477
503
|
}
|
|
478
|
-
let
|
|
479
|
-
|
|
480
|
-
let
|
|
481
|
-
for (let n of
|
|
504
|
+
let d = V("p", "sb-snackbar-prompt");
|
|
505
|
+
d.textContent = s.prompt, o && t.barBehavior === "dismiss" && (this.acknowledgement.setAttribute("role", "status"), this.acknowledgement.append(this.acknowledgementCopy));
|
|
506
|
+
let p = V("div", "sb-snackbar-answers");
|
|
507
|
+
for (let n of s.answers ?? []) {
|
|
482
508
|
let r = document.createElement("button");
|
|
483
|
-
r.type = "button", r.className = "sb-snackbar-answer", r.setAttribute("aria-label", n.label), r.innerHTML = f(n) ? R : z, r.addEventListener("click", () => e.answerSnackbar(t.presentationId, n.id)), this.answers.set(n.id, r),
|
|
484
|
-
}
|
|
485
|
-
let p = t.survey.fab?.timerStyle ?? "none";
|
|
486
|
-
if (p !== "none") {
|
|
487
|
-
let e = V("span", `sb-snackbar-timer sb-snackbar-timer--${p}`);
|
|
488
|
-
e.setAttribute("aria-hidden", "true"), e.append(V("span", "sb-snackbar-timer-fill")), p === "bar" ? u.append(e) : this.compact.append(e);
|
|
509
|
+
r.type = "button", r.className = "sb-snackbar-answer", r.setAttribute("aria-label", n.label), r.innerHTML = f(n) ? R : z, r.addEventListener("click", () => e.answerSnackbar(t.presentationId, n.id)), this.answers.set(n.id, r), p.append(r);
|
|
489
510
|
}
|
|
490
|
-
|
|
491
|
-
|
|
511
|
+
let h = t.survey.fab?.timerStyle ?? "none", g = null;
|
|
512
|
+
h !== "none" && (g = V("span", `sb-snackbar-timer sb-snackbar-timer--${h}`), g.setAttribute("aria-hidden", "true"), g.append(V("span", "sb-snackbar-timer-fill")), h === "bar" && !o ? d.append(g) : this.compact.append(g)), o || this.compact.append(l), o ? (this.barContent.append(d, p), this.compact.append(this.barContent)) : this.compact.append(d, p), this.overlay.type = "button", this.overlay.className = "sb-snackbar-overlay", this.overlay.tabIndex = -1, this.overlay.setAttribute("aria-hidden", "true"), this.overlay.addEventListener("click", () => void e.closeSurvey()), this.close.type = "button", this.close.className = o ? "sb-bar-dismiss" : "sb-snackbar-close", o ? this.close.textContent = "Not Now" : (this.close.setAttribute("aria-label", "Close survey"), this.close.innerHTML = F), this.close.addEventListener("click", () => void e.closeSurvey()), this.surface.append(this.compact, this.card), this.shell.append(this.surface), o ? this.compact.append(this.close) : this.shell.append(this.close), o && t.barBehavior === "dismiss" && this.compact.append(this.acknowledgement), this.root.append(this.overlay, this.shell), n.append(this.root), this.observer = typeof ResizeObserver > "u" ? null : new ResizeObserver(this.updatePlacement), this.observer?.observe(this.compact), this.observer?.observe(this.card), window.addEventListener("resize", this.updatePlacement), window.visualViewport?.addEventListener("resize", this.updatePlacement), window.visualViewport?.addEventListener("scroll", this.updatePlacement), o && (this.surface.addEventListener("pointerenter", this.onPointerEnter), this.surface.addEventListener("pointerleave", this.onPointerLeave)), this.update(t), this.after(o ? this.reducedMotion() ? E.reduced : ne : this.reducedMotion() ? 0 : h === "none" ? T.entrance : T.timerEntrance, () => {
|
|
513
|
+
this.stage = "compact", this.updateStage(), e.confirmPresentation("expanded_fab", t.presentationId), e.confirmFabEntranceCompleted(t.presentationId), o && this.surface.matches(":hover") && window.matchMedia?.("(hover: hover)").matches && e.setBarTimerPaused(t.presentationId, !0);
|
|
492
514
|
});
|
|
493
515
|
}
|
|
494
516
|
update(e) {
|
|
495
517
|
this.session = e;
|
|
496
|
-
for (let [t, n] of Object.entries(
|
|
497
|
-
this.root.style.setProperty("--sb-snackbar-duration", `${e.survey.fab?.expandedTimeout ?? 0}ms`), this.root.style.setProperty("--sb-snackbar-fraction", String(e.snackbar?.frozenFraction ?? 1)), this.root.dataset.counting = String(e.snackbar?.deadline != null), this.root.dataset.frozen = String(e.snackbar?.frozenFraction != null), this.root.dataset.expanded = String(e.isOpen);
|
|
518
|
+
for (let [t, n] of Object.entries(te(e.survey.theme))) this.root.style.setProperty(t, n);
|
|
519
|
+
this.root.style.setProperty("--sb-snackbar-duration", `${e.survey.fab?.expandedTimeout ?? 0}ms`), this.root.style.setProperty("--sb-snackbar-fraction", String(e.snackbar?.frozenFraction ?? 1)), this.root.dataset.counting = String(e.snackbar?.deadline != null || e.snackbar?.pausedRemainingMs != null), this.root.dataset.paused = String(e.snackbar?.pausedRemainingMs != null), this.root.dataset.timed = String((e.survey.fab?.timerStyle === "bar" || e.survey.fab?.timerStyle === "fill") && typeof e.survey.fab.expandedTimeout == "number" && e.survey.fab.expandedTimeout > 0), this.root.dataset.frozen = String(e.snackbar?.frozenFraction != null), this.root.dataset.expanded = String(e.isOpen), this.root.dataset.behavior = e.barBehavior;
|
|
520
|
+
let t = e.sentimentPresentation === "bar" && e.barBehavior === "dismiss" && e.snackbar?.selectedKey != null;
|
|
521
|
+
if (this.root.dataset.rated = String(t), this.barContent.inert = t, this.barContent.toggleAttribute("inert", t), this.barContent.setAttribute("aria-hidden", String(t)), e.sentimentPresentation === "bar" && e.barBehavior === "dismiss") {
|
|
522
|
+
let t = e.survey.questions[e.survey.root_node_id].answers?.find((t) => t.id === e.snackbar?.selectedKey), n = t ? t.comment?.trim() || "Thanks for your feedback." : "";
|
|
523
|
+
this.acknowledgementCopy.textContent !== n && (this.acknowledgementCopy.textContent = n);
|
|
524
|
+
}
|
|
498
525
|
for (let [t, n] of this.answers) n.disabled = !e.fabEntranceCompleted || e.snackbar?.phase !== "question", n.setAttribute("aria-pressed", String(e.snackbar?.selectedKey === t));
|
|
499
526
|
if (e.isOpen) {
|
|
500
527
|
let t = this.renderCard(e);
|
|
501
|
-
this.card.contains(t) || this.card.replaceChildren(t), this.expanded || (this.expanded = !0, this.stage = "widening", this.after(this.reducedMotion() ? 0 :
|
|
528
|
+
this.card.contains(t) || this.card.replaceChildren(t), this.expanded || (this.expanded = !0, this.stage = "widening", this.after(this.reducedMotion() ? 0 : T.widen, () => {
|
|
502
529
|
this.stage = "expanding", this.updateStage();
|
|
503
|
-
}), this.after(this.reducedMotion() ? 0 :
|
|
530
|
+
}), this.after(this.reducedMotion() ? 0 : T.widen + T.expand, () => {
|
|
504
531
|
this.stage = "ready", this.updateStage(), this.store.confirmPresentation("sheet", e.presentationId), this.store.confirmSnackbarContentReady(e.presentationId), this.onReady();
|
|
505
532
|
}));
|
|
506
533
|
}
|
|
507
534
|
this.updateStage();
|
|
508
535
|
}
|
|
509
536
|
updateStage() {
|
|
510
|
-
this.root.dataset.stage = this.stage, this.compact.inert = this.session.isOpen || this.stage === "entering", this.compact.toggleAttribute("inert", this.compact.inert), this.compact.setAttribute("aria-hidden", String(this.compact.inert)), this.card.inert = this.stage !== "ready", this.card.toggleAttribute("inert", this.card.inert), this.card.setAttribute("aria-hidden", String(this.card.inert)), this.overlay.disabled = this.stage !== "ready", this.close.disabled = this.session.isOpen, this.updatePlacement();
|
|
537
|
+
this.root.dataset.stage = this.stage, this.compact.inert = this.session.isOpen || this.stage === "entering" || this.stage === "exiting", this.compact.toggleAttribute("inert", this.compact.inert), this.compact.setAttribute("aria-hidden", String(this.compact.inert)), this.card.inert = this.stage !== "ready", this.card.toggleAttribute("inert", this.card.inert), this.card.setAttribute("aria-hidden", String(this.card.inert)), this.overlay.disabled = this.stage !== "ready", this.close.disabled = this.session.isOpen || this.stage === "exiting" || this.root.dataset.rated === "true", this.updatePlacement();
|
|
511
538
|
}
|
|
512
539
|
updatePlacement = () => {
|
|
540
|
+
if (this.stage === "exiting") return;
|
|
513
541
|
let e = window.visualViewport, t = e?.width || window.innerWidth, n = e?.height || window.innerHeight, r = getComputedStyle(this.safeAreaProbe), i = (e) => Number.parseFloat(e) || 0, { survey: a } = this.session, { placement: o } = m(a.questions[a.root_node_id], a.fab), s = {
|
|
514
542
|
viewport: {
|
|
515
543
|
width: t,
|
|
@@ -522,35 +550,54 @@ var te = class {
|
|
|
522
550
|
bottom: i(r.paddingBottom)
|
|
523
551
|
},
|
|
524
552
|
compactHeight: 64,
|
|
525
|
-
cardHeight: this.card.querySelector(".sb-sheet")?.offsetHeight || 0
|
|
553
|
+
cardHeight: this.card.querySelector(".sb-sheet")?.offsetHeight || 0,
|
|
554
|
+
barPosition: this.session.sentimentPresentation === "bar" ? this.session.barPosition : void 0
|
|
526
555
|
};
|
|
527
556
|
this.root.style.setProperty("--sb-snackbar-compact-width", `${D(o, s).compactWidth}px`);
|
|
528
|
-
let c =
|
|
557
|
+
let c = this.root.dataset.rated === "true";
|
|
558
|
+
c && (this.compact.style.minHeight = "48px");
|
|
559
|
+
let l = getComputedStyle(this.compact), u = Number.parseFloat(l.height) || this.compact.offsetHeight || (s.barPosition ? 48 : 64), d = c ? Math.max(u, this.acknowledgementCopy.scrollHeight + i(l.paddingTop) + i(l.paddingBottom)) : u;
|
|
560
|
+
c && this.compact.style.removeProperty("min-height");
|
|
561
|
+
let f = D(o, {
|
|
529
562
|
...s,
|
|
530
|
-
compactHeight:
|
|
563
|
+
compactHeight: d
|
|
531
564
|
});
|
|
532
565
|
this.root.style.left = `${e?.offsetLeft ?? 0}px`, this.root.style.top = `${e?.offsetTop ?? 0}px`, this.root.style.width = `${t}px`, this.root.style.height = `${n}px`;
|
|
533
|
-
let
|
|
566
|
+
let p = [
|
|
534
567
|
"widening",
|
|
535
568
|
"expanding",
|
|
536
569
|
"ready"
|
|
537
|
-
].includes(this.stage)
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
"compact-
|
|
545
|
-
"
|
|
546
|
-
"
|
|
570
|
+
].includes(this.stage);
|
|
571
|
+
this.root.style.setProperty("--sb-bar-top", `${p ? f.cardTop : 0}px`);
|
|
572
|
+
let h = ["expanding", "ready"].includes(this.stage), g = {
|
|
573
|
+
left: p ? f.cardLeft : f.compactLeft,
|
|
574
|
+
bottom: p ? f.cardBottom : f.compactBottom,
|
|
575
|
+
width: p ? f.cardWidth : f.compactWidth,
|
|
576
|
+
height: h ? f.cardHeight : d,
|
|
577
|
+
"compact-height": d,
|
|
578
|
+
"card-width": f.cardWidth,
|
|
579
|
+
"compact-width": f.compactWidth,
|
|
580
|
+
"entrance-offset": f.entranceOffset,
|
|
581
|
+
"max-height": f.maxCardHeight
|
|
547
582
|
};
|
|
548
|
-
for (let [e, t] of Object.entries(
|
|
549
|
-
this.shell.style.transformOrigin =
|
|
583
|
+
for (let [e, t] of Object.entries(g)) this.root.style.setProperty(`--sb-snackbar-${e}`, `${t}px`);
|
|
584
|
+
this.shell.style.transformOrigin = f.transformOrigin;
|
|
550
585
|
};
|
|
551
586
|
reducedMotion() {
|
|
552
587
|
return window.matchMedia?.("(prefers-reduced-motion: reduce)").matches ?? !1;
|
|
553
588
|
}
|
|
589
|
+
onPointerEnter = (e) => {
|
|
590
|
+
e.pointerType === "mouse" && window.matchMedia?.("(hover: hover)").matches && this.store.setBarTimerPaused(this.session.presentationId, !0);
|
|
591
|
+
};
|
|
592
|
+
onPointerLeave = () => this.store.setBarTimerPaused(this.session.presentationId, !1);
|
|
593
|
+
exit(e) {
|
|
594
|
+
for (let e of this.timers) clearTimeout(e);
|
|
595
|
+
this.timers.clear(), this.stage = "exiting", this.root.dataset.exiting = "true";
|
|
596
|
+
for (let e of this.answers.values()) e.disabled = !0;
|
|
597
|
+
this.updateStage(), this.after(this.reducedMotion() ? E.reduced : E.removal, () => {
|
|
598
|
+
this.destroy(), e();
|
|
599
|
+
});
|
|
600
|
+
}
|
|
554
601
|
after(e, t) {
|
|
555
602
|
let n = setTimeout(() => {
|
|
556
603
|
this.timers.delete(n), this.destroyed || t();
|
|
@@ -560,9 +607,9 @@ var te = class {
|
|
|
560
607
|
destroy() {
|
|
561
608
|
this.destroyed = !0;
|
|
562
609
|
for (let e of this.timers) clearTimeout(e);
|
|
563
|
-
this.observer?.disconnect(), window.removeEventListener("resize", this.updatePlacement), window.visualViewport?.removeEventListener("resize", this.updatePlacement), window.visualViewport?.removeEventListener("scroll", this.updatePlacement), this.root.remove();
|
|
610
|
+
this.observer?.disconnect(), window.removeEventListener("resize", this.updatePlacement), window.visualViewport?.removeEventListener("resize", this.updatePlacement), window.visualViewport?.removeEventListener("scroll", this.updatePlacement), this.surface.removeEventListener("pointerenter", this.onPointerEnter), this.surface.removeEventListener("pointerleave", this.onPointerLeave), this.root.remove();
|
|
564
611
|
}
|
|
565
|
-
}, H = 1969.207,
|
|
612
|
+
}, H = 1969.207, ie = 2169.207, ae = 856.839, oe = 450;
|
|
566
613
|
function U(e, t) {
|
|
567
614
|
let n = document.createElement(e);
|
|
568
615
|
return t && (n.className = t), n;
|
|
@@ -571,7 +618,7 @@ function W(e, t) {
|
|
|
571
618
|
let n = U("button", e);
|
|
572
619
|
return n.type = "button", t && n.setAttribute("aria-label", t), n;
|
|
573
620
|
}
|
|
574
|
-
var
|
|
621
|
+
var se = 0, ce = class {
|
|
575
622
|
host;
|
|
576
623
|
root;
|
|
577
624
|
store;
|
|
@@ -592,9 +639,10 @@ var ae = 0, oe = class {
|
|
|
592
639
|
restoreFocus = null;
|
|
593
640
|
restoreFocusPending = !1;
|
|
594
641
|
safeAreaProbe;
|
|
595
|
-
uiId = ++
|
|
642
|
+
uiId = ++se;
|
|
596
643
|
snackbarUi = null;
|
|
597
644
|
snackbarIdentity = null;
|
|
645
|
+
outgoingSnackbarUis = /* @__PURE__ */ new Set();
|
|
598
646
|
constructor(e, t = document.body) {
|
|
599
647
|
this.store = e, this.host = U("div"), this.host.setAttribute("data-sideband", ""), this.host.tabIndex = -1;
|
|
600
648
|
let n = this.host.attachShadow({ mode: "open" }), r = document.createElement("style");
|
|
@@ -623,7 +671,9 @@ var ae = 0, oe = class {
|
|
|
623
671
|
}), window.addEventListener("keydown", this.onKeyDown), window.addEventListener("resize", this.onViewportChange), window.addEventListener("orientationchange", this.onViewportChange), window.visualViewport?.addEventListener("resize", this.onViewportChange), window.visualViewport?.addEventListener("scroll", this.onViewportChange), this.render();
|
|
624
672
|
}
|
|
625
673
|
destroy() {
|
|
626
|
-
this.unsubscribe(), this.snackbarUi?.destroy()
|
|
674
|
+
this.unsubscribe(), this.snackbarUi?.destroy();
|
|
675
|
+
for (let e of this.outgoingSnackbarUis) e.destroy();
|
|
676
|
+
this.outgoingSnackbarUis.clear(), this.clearFabEntranceTimer();
|
|
627
677
|
for (let e of this.fabExitTimers) clearTimeout(e);
|
|
628
678
|
this.fabExitTimers.clear(), this.sheetExitTimer !== null && (clearTimeout(this.sheetExitTimer), this.sheetExitTimer = null), this.progressTimer !== null && clearTimeout(this.progressTimer), this.completionRevealTimer !== null && clearTimeout(this.completionRevealTimer), window.removeEventListener("keydown", this.onKeyDown), window.removeEventListener("resize", this.onViewportChange), window.removeEventListener("orientationchange", this.onViewportChange), window.visualViewport?.removeEventListener("resize", this.onViewportChange), window.visualViewport?.removeEventListener("scroll", this.onViewportChange), this.host.remove();
|
|
629
679
|
}
|
|
@@ -664,8 +714,18 @@ var ae = 0, oe = class {
|
|
|
664
714
|
};
|
|
665
715
|
render(e = !1, t = !0) {
|
|
666
716
|
let n = this.store.getState();
|
|
667
|
-
if (this.continueButton = null, n
|
|
668
|
-
|
|
717
|
+
if (this.continueButton = null, n) {
|
|
718
|
+
for (let e of this.outgoingSnackbarUis) e.destroy();
|
|
719
|
+
this.outgoingSnackbarUis.clear(), this.restoreFocusPending = !1, this.applyTheme(n.survey.theme);
|
|
720
|
+
}
|
|
721
|
+
if (this.snackbarUi && this.snackbarIdentity !== n?.presentationId) {
|
|
722
|
+
let e = this.snackbarUi;
|
|
723
|
+
!n && e.root.dataset.presentation === "bar" ? (this.outgoingSnackbarUis.add(e), e.exit(() => {
|
|
724
|
+
this.outgoingSnackbarUis.delete(e), this.restoreFocusWhenAnimationsComplete();
|
|
725
|
+
})) : e.destroy(), this.snackbarUi = null, this.snackbarIdentity = null, this.sheetEl = null, this.sheetRootEl = null;
|
|
726
|
+
}
|
|
727
|
+
if (n?.snackbar) {
|
|
728
|
+
this.snackbarUi ? (this.snackbarUi.update(n), e && n.snackbar.phase === "journey" && this.focusSheet()) : (this.startActiveFabExit(), this.sheetExitTimer !== null && clearTimeout(this.sheetExitTimer), this.sheetRootEl?.remove(), this.sheetEl = null, this.sheetRootEl = null, this.restoreFocus = document.activeElement instanceof HTMLElement ? document.activeElement : null, this.snackbarIdentity = n.presentationId, this.snackbarUi = new re(this.store, n, this.root, this.safeAreaProbe, (e) => this.sheetEl && this.sheetRootEl ? (this.fillSheet(this.sheetEl, e), this.sheetRootEl) : this.renderSheet(e), () => this.focusSheet()));
|
|
669
729
|
return;
|
|
670
730
|
}
|
|
671
731
|
if (n && (n.isOpen || n.completion)) {
|
|
@@ -752,7 +812,7 @@ var ae = 0, oe = class {
|
|
|
752
812
|
this.fabEntranceTimer = setTimeout(() => {
|
|
753
813
|
this.fabEntranceTimer = null, !(this.activeFabEl !== e || this.activeFabIdentity !== t) && (this.store.confirmPresentation("expanded_fab"), this.store.confirmFabEntranceCompleted());
|
|
754
814
|
}, n ? 0 : H);
|
|
755
|
-
let r = e.querySelector(".sb-fab__timer") ?
|
|
815
|
+
let r = e.querySelector(".sb-fab__timer") ? ie : H;
|
|
756
816
|
this.fabSettlingTimer = setTimeout(() => {
|
|
757
817
|
this.fabSettlingTimer = null, this.activeFabEl === e && this.activeFabIdentity === t && e.classList.remove("sb-fab--entering");
|
|
758
818
|
}, n ? 0 : r);
|
|
@@ -766,7 +826,7 @@ var ae = 0, oe = class {
|
|
|
766
826
|
this.clearFabEntranceTimer();
|
|
767
827
|
let t = getComputedStyle(e), n = Number.parseFloat(t.width) || e.offsetWidth || 314, r = Number.parseFloat(e.style.getPropertyValue("--sb-fab-expanded-width")) || n, i = Number.parseFloat(e.style.getPropertyValue("--sb-fab-anchor-offset")) || 0, a = r === 60 ? 0 : i / (r - 60), o = e.querySelector(".sb-fab__label"), s = e.querySelector(".sb-fab__timer");
|
|
768
828
|
e.style.setProperty("--sb-fab-exit-width", `${n}px`), e.style.setProperty("--sb-fab-exit-offset", `${(r - n) * a}px`), e.style.setProperty("--sb-fab-exit-scale", t.getPropertyValue("scale") || "1"), e.style.setProperty("--sb-fab-exit-label-opacity", o ? getComputedStyle(o).opacity : "0"), e.style.setProperty("--sb-fab-exit-timer-opacity", s ? getComputedStyle(s).opacity : "0"), e.classList.remove("sb-fab--entering"), e.classList.add("sb-fab--exiting"), e.disabled = !0, e.setAttribute("aria-hidden", "true"), e.tabIndex = -1, this.activeFabEl = null, this.activeFabIdentity = null, this.outgoingFabEls.add(e);
|
|
769
|
-
let c = this.prefersReducedMotion() ? 0 :
|
|
829
|
+
let c = this.prefersReducedMotion() ? 0 : ae, l = setTimeout(() => {
|
|
770
830
|
this.fabExitTimers.delete(l), this.outgoingFabEls.delete(e), e.remove(), this.restoreFocusWhenAnimationsComplete();
|
|
771
831
|
}, c);
|
|
772
832
|
this.fabExitTimers.add(l);
|
|
@@ -777,13 +837,13 @@ var ae = 0, oe = class {
|
|
|
777
837
|
e.classList.add("sb-sheet-root--exiting"), e.setAttribute("aria-hidden", "true"), e.querySelectorAll("button").forEach((e) => {
|
|
778
838
|
e.disabled = !0;
|
|
779
839
|
}), this.sheetEl = null;
|
|
780
|
-
let t = this.prefersReducedMotion() ? 0 :
|
|
840
|
+
let t = this.prefersReducedMotion() ? 0 : oe;
|
|
781
841
|
this.sheetExitTimer = setTimeout(() => {
|
|
782
842
|
this.sheetExitTimer = null, this.sheetRootEl === e && (e.remove(), this.sheetRootEl = null, this.restoreFocusWhenAnimationsComplete());
|
|
783
843
|
}, t);
|
|
784
844
|
}
|
|
785
845
|
restoreFocusWhenAnimationsComplete() {
|
|
786
|
-
!this.restoreFocusPending || this.activeFabEl || this.outgoingFabEls.size > 0 || this.sheetRootEl || (this.restoreFocus?.isConnected ? this.restoreFocus.focus() : this.restoreFocus && this.host.focus(), this.restoreFocus = null, this.restoreFocusPending = !1, this.applyTheme());
|
|
846
|
+
!this.restoreFocusPending || this.activeFabEl || this.outgoingFabEls.size > 0 || this.outgoingSnackbarUis.size > 0 || this.sheetRootEl || (this.restoreFocus?.isConnected ? this.restoreFocus.focus() : this.restoreFocus && this.host.focus(), this.restoreFocus = null, this.restoreFocusPending = !1, this.applyTheme());
|
|
787
847
|
}
|
|
788
848
|
prefersReducedMotion() {
|
|
789
849
|
return window.matchMedia?.("(prefers-reduced-motion: reduce)").matches ?? !1;
|
|
@@ -941,7 +1001,7 @@ var ae = 0, oe = class {
|
|
|
941
1001
|
};
|
|
942
1002
|
//#endregion
|
|
943
1003
|
//#region src/index.ts
|
|
944
|
-
function
|
|
1004
|
+
function le(e) {
|
|
945
1005
|
if (typeof document > "u" && e.ui !== !1) return {
|
|
946
1006
|
track: () => {},
|
|
947
1007
|
tagUser: () => {},
|
|
@@ -966,9 +1026,9 @@ function se(e) {
|
|
|
966
1026
|
onError: e.onError
|
|
967
1027
|
}), r = s({
|
|
968
1028
|
...e,
|
|
969
|
-
libraryVersion: "1.4.
|
|
1029
|
+
libraryVersion: "1.4.3",
|
|
970
1030
|
onSyncResponse: (e) => t.handleSyncResponse(e)
|
|
971
|
-
}), i = e.ui === !1 ? null : new
|
|
1031
|
+
}), i = e.ui === !1 ? null : new ce(t);
|
|
972
1032
|
return r.start(), {
|
|
973
1033
|
track: r.track,
|
|
974
1034
|
tagUser: r.tagUser,
|
|
@@ -991,7 +1051,7 @@ function K() {
|
|
|
991
1051
|
}
|
|
992
1052
|
function q(e) {
|
|
993
1053
|
$();
|
|
994
|
-
let t =
|
|
1054
|
+
let t = le(e);
|
|
995
1055
|
return G = t, t;
|
|
996
1056
|
}
|
|
997
1057
|
function J(e, t, n) {
|
|
@@ -1012,7 +1072,7 @@ function Q(e) {
|
|
|
1012
1072
|
function $() {
|
|
1013
1073
|
G?.destroy(), G = null;
|
|
1014
1074
|
}
|
|
1015
|
-
var
|
|
1075
|
+
var ue = {
|
|
1016
1076
|
configure: q,
|
|
1017
1077
|
track: J,
|
|
1018
1078
|
tagUser: Y,
|
|
@@ -1022,4 +1082,4 @@ var ce = {
|
|
|
1022
1082
|
destroy: $
|
|
1023
1083
|
};
|
|
1024
1084
|
//#endregion
|
|
1025
|
-
export {
|
|
1085
|
+
export { ue as Sideband, e as SidebandApiError, t as SurveySessionStore, r as SyncEngine, i as buildFabTitle, q as configure, o as createSidebandClient, $ as destroy, Z as flush, c as getChoiceValue, u as getDeviceId, d as getSessionId, Q as presentSimulatedPulse, Y as tagUser, J as track, X as untagUser };
|