@juspay/svelte-ui-components 4.53.0 → 4.54.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +14 -0
- package/dist/ChatComposer/ChatComposer.svelte +17 -5
- package/dist/ChatComposer/properties.d.ts +10 -4
- package/dist/DateRangePicker/DateRangePicker.svelte +82 -33
- package/dist/DateRangePicker/properties.d.ts +18 -2
- package/dist/ToolCallLog/ToolCallLog.svelte +4 -4
- package/dist-wc/index.js +247 -199
- package/package.json +3 -2
package/dist-wc/index.js
CHANGED
|
@@ -27497,9 +27497,15 @@ var TIME_DISPLAY_PATTERN = /^(1[0-2]|0?[1-9]):([0-5][0-9])\s?(AM|PM)$/i, pad = (
|
|
|
27497
27497
|
function DateRangePicker(e, t) {
|
|
27498
27498
|
let n = props_id();
|
|
27499
27499
|
push(t, !0), append_styles$1(e, $$css$79);
|
|
27500
|
-
let i = "<svg viewBox=\"0 0 16 16\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><circle cx=\"8\" cy=\"8\" r=\"6.25\" stroke=\"currentColor\" stroke-width=\"1.5\"/><path d=\"M8 4.5V8l2.25 1.5\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/></svg>", a = prop(t, "rangeStart", 15, null), o = prop(t, "rangeEnd", 15, null), s = prop(t, "value", 15, null), c = prop(t, "mode", 7, "range"), l = prop(t, "minDate", 7, null), u = prop(t, "maxDate", 7, null), f = prop(t, "disabledDates", 23, () => []), p = prop(t, "maxRangeDays", 7, null), h = prop(t, "presets", 7, null), S = prop(t, "presetCheckmark", 7, !1), C = prop(t, "showDateInputs", 7, !1), k = prop(t, "showTimeSelection", 7, !1), R = prop(t, "timeSelectionLayout", 7, "toggle"), G = prop(t, "presetToggle", 7, !1), te = prop(t, "placeholder", 7, "Select date"), ne = prop(t, "dualMonth", 7), re = prop(t, "timePicker", 7), be = prop(t, "align", 7, "left"), Me = prop(t, "presetsPosition", 7, "side"), Re = prop(t, "responsiveLayout", 7, !1), Ue = prop(t, "compareStart", 15, null), it = prop(t, "compareEnd", 15, null), at = prop(t, "compareCalendar", 7), ot = prop(t, "weekStartsOn", 7, 0), ct = prop(t, "locale", 7), lt = prop(t, "testId", 7), ut = prop(t, "classes", 7), dt = prop(t, "triggerSnippet", 7), ft = prop(t, "triggerIcon", 7), pt = prop(t, "clearable", 7, !1), mt = prop(t, "initialPresetLabel", 7), ht = prop(t, "compareTrigger", 7), gt = prop(t, "openCompare", 15, !1), _t = prop(t, "onapply", 7), vt = prop(t, "onapplysingle", 7), yt = prop(t, "onapplycompare", 7), bt = prop(t, "oncancel", 7), xt = prop(t, "onopentoggle", 7), St = prop(t, "onclear", 7), Ct = /* @__PURE__ */ user_derived(() => typeof ne() == "boolean" ? ne() : c() === "range"), wt = "(max-width: 1023px)", Tt = "(max-width: 688px)", Et = /* @__PURE__ */ state(!1), Dt = /* @__PURE__ */ state(!1), Ot = /* @__PURE__ */ user_derived(() => Re() && get(Dt)), kt = /* @__PURE__ */ user_derived(() => Re() && (c() === "range" ? get(Et) : get(Dt))), At = /* @__PURE__ */ user_derived(() => get(Ct) && !get(Ot)), jt = /* @__PURE__ */ user_derived(() => Me() === "top" || get(kt)), Mt = /* @__PURE__ */ state(null), Nt = /* @__PURE__ */ state(null), Pt = /* @__PURE__ */ state(null), It = /* @__PURE__ */ state(
|
|
27500
|
+
let i = "<svg viewBox=\"0 0 16 16\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><circle cx=\"8\" cy=\"8\" r=\"6.25\" stroke=\"currentColor\" stroke-width=\"1.5\"/><path d=\"M8 4.5V8l2.25 1.5\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/></svg>", a = prop(t, "rangeStart", 15, null), o = prop(t, "rangeEnd", 15, null), s = prop(t, "value", 15, null), c = prop(t, "mode", 7, "range"), l = prop(t, "minDate", 7, null), u = prop(t, "maxDate", 7, null), f = prop(t, "disabledDates", 23, () => []), p = prop(t, "maxRangeDays", 7, null), h = prop(t, "presets", 7, null), S = prop(t, "presetCheckmark", 7, !1), C = prop(t, "showDateInputs", 7, !1), k = prop(t, "showTimeSelection", 7, !1), R = prop(t, "timeSelectionLayout", 7, "toggle"), G = prop(t, "presetToggle", 7, !1), te = prop(t, "placeholder", 7, "Select date"), ne = prop(t, "dualMonth", 7), re = prop(t, "timePicker", 7), be = prop(t, "align", 7, "left"), Me = prop(t, "presetsPosition", 7, "side"), Re = prop(t, "responsiveLayout", 7, !1), Ue = prop(t, "compareStart", 15, null), it = prop(t, "compareEnd", 15, null), at = prop(t, "compareCalendar", 7), ot = prop(t, "weekStartsOn", 7, 0), ct = prop(t, "locale", 7), lt = prop(t, "testId", 7), ut = prop(t, "classes", 7), dt = prop(t, "triggerSnippet", 7), ft = prop(t, "triggerIcon", 7), pt = prop(t, "clearable", 7, !1), mt = prop(t, "initialPresetLabel", 7), ht = prop(t, "compareTrigger", 7), gt = prop(t, "openCompare", 15, !1), _t = prop(t, "onapply", 7), vt = prop(t, "onapplysingle", 7), yt = prop(t, "onapplycompare", 7), bt = prop(t, "oncancel", 7), xt = prop(t, "onopentoggle", 7), St = prop(t, "onclear", 7), Ct = /* @__PURE__ */ user_derived(() => typeof ne() == "boolean" ? ne() : c() === "range"), wt = "(max-width: 1023px)", Tt = "(max-width: 688px)", Et = /* @__PURE__ */ state(!1), Dt = /* @__PURE__ */ state(!1), Ot = /* @__PURE__ */ user_derived(() => Re() && get(Dt)), kt = /* @__PURE__ */ user_derived(() => Re() && (c() === "range" ? get(Et) : get(Dt))), At = /* @__PURE__ */ user_derived(() => get(Ct) && !get(Ot)), jt = /* @__PURE__ */ user_derived(() => Me() === "top" || get(kt)), Mt = /* @__PURE__ */ state(null), Nt = /* @__PURE__ */ state(null), Pt = /* @__PURE__ */ state(null), It = /* @__PURE__ */ state(proxy({
|
|
27501
|
+
start: null,
|
|
27502
|
+
end: null
|
|
27503
|
+
})), Lt = /* @__PURE__ */ state(proxy({
|
|
27504
|
+
start: null,
|
|
27505
|
+
end: null
|
|
27506
|
+
})), Rt = /* @__PURE__ */ state(null), zt = /* @__PURE__ */ state("12:00 AM"), Bt = /* @__PURE__ */ state("11:59 PM"), Ht = /* @__PURE__ */ state(!1), Gt = /* @__PURE__ */ state(null), qt = /* @__PURE__ */ state(null), Zt = /* @__PURE__ */ user_derived(() => get(Gt) ?? (get(Mt) === null ? "" : wn(get(Mt)))), Qt = /* @__PURE__ */ user_derived(() => get(qt) ?? (get(Nt) === null ? "" : wn(get(Nt)))), $t = /* @__PURE__ */ user_derived(() => k() && R() === "inline" && c() === "range"), en = 1440 * 60 * 1e3;
|
|
27501
27507
|
function tn(e) {
|
|
27502
|
-
return typeof f() == "function" ? f()(e) : f().some((t) =>
|
|
27508
|
+
return typeof f() == "function" ? f()(e) : f().some((t) => Er(t, e));
|
|
27503
27509
|
}
|
|
27504
27510
|
let nn = /* @__PURE__ */ user_derived(() => {
|
|
27505
27511
|
let e = p();
|
|
@@ -27539,7 +27545,7 @@ function DateRangePicker(e, t) {
|
|
|
27539
27545
|
let Tn = /* @__PURE__ */ user_derived(() => TIME_DISPLAY_PATTERN.test(get(zt).trim())), En = /* @__PURE__ */ user_derived(() => TIME_DISPLAY_PATTERN.test(get(Bt).trim())), Dn = /* @__PURE__ */ user_derived(() => {
|
|
27540
27546
|
if (!k()) return !0;
|
|
27541
27547
|
if (!get(Tn) || !get(En)) return !1;
|
|
27542
|
-
if (get(Mt) === null || get(Nt) === null || !
|
|
27548
|
+
if (get(Mt) === null || get(Nt) === null || !Er(get(Mt), get(Nt))) return !0;
|
|
27543
27549
|
let e = toMinutesOfDay(get(zt)), t = toMinutesOfDay(get(Bt));
|
|
27544
27550
|
return e === null || t === null || e <= t;
|
|
27545
27551
|
}), On = /* @__PURE__ */ user_derived(() => get(mn) === null ? c() === "single" ? s() === null ? te() : wn(s()) : a() !== null && o() !== null ? `${wn(a())} – ${wn(o())}` : a() === null ? te() : `${wn(a())} – ...` : get(mn)), kn = /* @__PURE__ */ user_derived(() => Ue() !== null && it() !== null ? `${wn(Ue())} – ${wn(it())}` : te());
|
|
@@ -27556,19 +27562,47 @@ function DateRangePicker(e, t) {
|
|
|
27556
27562
|
});
|
|
27557
27563
|
n !== null && (t.preventDefault(), n.focus());
|
|
27558
27564
|
}
|
|
27559
|
-
|
|
27560
|
-
|
|
27565
|
+
let Mn = (e, t) => (e === null ? null : e.getTime()) === (t === null ? null : t.getTime()), Nn = /* @__PURE__ */ user_derived(() => typeof at() == "function" && typeof ht() != "function");
|
|
27566
|
+
function Pn() {
|
|
27567
|
+
set(Lt, {
|
|
27568
|
+
start: Ue(),
|
|
27569
|
+
end: it()
|
|
27570
|
+
}, !0), get(It).start = Ue(), get(It).end = it();
|
|
27571
|
+
}
|
|
27572
|
+
let Fn = /* @__PURE__ */ user_derived(() => !Mn(get(It).start, get(Lt).start) || !Mn(get(It).end, get(Lt).end) ? {
|
|
27573
|
+
start: get(It).start,
|
|
27574
|
+
end: get(It).end
|
|
27575
|
+
} : {
|
|
27576
|
+
start: Ue(),
|
|
27577
|
+
end: it()
|
|
27578
|
+
}), In = /* @__PURE__ */ user_derived(() => get(Fn).start !== null && get(Fn).end !== null);
|
|
27579
|
+
function Ln() {
|
|
27580
|
+
let { start: e, end: t } = get(Fn);
|
|
27581
|
+
e === null || t === null || (Ue(e), it(t), yt()?.({
|
|
27582
|
+
compareStart: e,
|
|
27583
|
+
compareEnd: t,
|
|
27584
|
+
presetLabel: get(Rt)
|
|
27585
|
+
}));
|
|
27586
|
+
}
|
|
27587
|
+
function Rn() {
|
|
27588
|
+
Mn(Ue(), get(Lt).start) || Ue(get(Lt).start), Mn(it(), get(Lt).end) || it(get(Lt).end), get(It).start = get(Lt).start, get(It).end = get(Lt).end;
|
|
27589
|
+
}
|
|
27590
|
+
function zn() {
|
|
27591
|
+
get(Nn) && Rn(), Vn();
|
|
27592
|
+
}
|
|
27593
|
+
function Bn() {
|
|
27594
|
+
fn = get(on) ? findInteractive(get(on)) : null, set(Mt, a(), !0), set(Nt, o(), !0), set(Pt, s(), !0), get(Nn) && Pn(), set(Rt, get(hn), !0), set(Gt, null), set(qt, null), k() && (set(zt, get(Mt) === null ? "12:00 AM" : formatTimeDisplay(get(Mt)), !0), set(Bt, get(Nt) === null ? "11:59 PM" : formatTimeDisplay(get(Nt)), !0), set(Ht, !1));
|
|
27561
27595
|
let e = a() === null ? s() === null ? gn : s() : a();
|
|
27562
27596
|
set(_n, e.getFullYear(), !0), set(vn, e.getMonth(), !0), update(yn), set(rn, !0), xt()?.({ open: !0 }), tick().then(() => An(get(an)));
|
|
27563
27597
|
}
|
|
27564
|
-
function
|
|
27598
|
+
function Vn() {
|
|
27565
27599
|
set(rn, !1), set(cn, !1), xt()?.({ open: !1 });
|
|
27566
27600
|
let e = fn;
|
|
27567
27601
|
fn = null, tick().then(() => {
|
|
27568
27602
|
e?.focus();
|
|
27569
27603
|
});
|
|
27570
27604
|
}
|
|
27571
|
-
function
|
|
27605
|
+
function Hn(e = get(an)) {
|
|
27572
27606
|
if (e === null || get(on) === null || typeof window > "u") return;
|
|
27573
27607
|
if (get(kt)) {
|
|
27574
27608
|
set(cn, !1);
|
|
@@ -27577,30 +27611,30 @@ function DateRangePicker(e, t) {
|
|
|
27577
27611
|
let t = get(on).getBoundingClientRect(), n = e.offsetHeight, i = 6, a = window.innerHeight - t.bottom - 6, o = t.top - 6;
|
|
27578
27612
|
set(cn, n > a && o > a, !0);
|
|
27579
27613
|
}
|
|
27580
|
-
function
|
|
27581
|
-
let t = () =>
|
|
27614
|
+
function Un(e) {
|
|
27615
|
+
let t = () => Hn(e);
|
|
27582
27616
|
return t(), tick().then(t), window.addEventListener("resize", t), window.addEventListener("scroll", t, !0), { destroy: () => {
|
|
27583
27617
|
window.removeEventListener("resize", t), window.removeEventListener("scroll", t, !0);
|
|
27584
27618
|
} };
|
|
27585
27619
|
}
|
|
27586
|
-
function
|
|
27620
|
+
function Wn(e, t) {
|
|
27587
27621
|
if (typeof window > "u" || typeof window.matchMedia != "function") return () => {};
|
|
27588
27622
|
let n = window.matchMedia(e) ?? null;
|
|
27589
27623
|
if (n === null || (t(n.matches === !0), typeof n.addEventListener != "function")) return () => {};
|
|
27590
27624
|
let i = (e) => {
|
|
27591
27625
|
let n = get(an) !== null && get(an).contains(getActiveElement(get(an)));
|
|
27592
27626
|
t(e.matches), tick().then(() => {
|
|
27593
|
-
|
|
27627
|
+
Hn(), n && get(an) !== null && !get(an).contains(getActiveElement(get(an))) && An(get(an));
|
|
27594
27628
|
});
|
|
27595
27629
|
};
|
|
27596
27630
|
return n.addEventListener("change", i), () => n.removeEventListener("change", i);
|
|
27597
27631
|
}
|
|
27598
|
-
function
|
|
27632
|
+
function Gn(e, t) {
|
|
27599
27633
|
let n = () => {}, i = (e) => {
|
|
27600
27634
|
if (n(), n = () => {}, !e) return;
|
|
27601
|
-
let t =
|
|
27635
|
+
let t = Wn("(max-width: 1023px)", (e) => {
|
|
27602
27636
|
set(Et, e, !0);
|
|
27603
|
-
}), i =
|
|
27637
|
+
}), i = Wn("(max-width: 688px)", (e) => {
|
|
27604
27638
|
set(Dt, e, !0);
|
|
27605
27639
|
});
|
|
27606
27640
|
n = () => {
|
|
@@ -27612,34 +27646,30 @@ function DateRangePicker(e, t) {
|
|
|
27612
27646
|
destroy: () => i(!1)
|
|
27613
27647
|
};
|
|
27614
27648
|
}
|
|
27615
|
-
function
|
|
27616
|
-
get(rn) ?
|
|
27649
|
+
function Kn() {
|
|
27650
|
+
get(rn) ? zn() : Bn();
|
|
27617
27651
|
}
|
|
27618
|
-
function
|
|
27619
|
-
dn = get(un) ? findInteractive(get(un)) : null,
|
|
27652
|
+
function qn() {
|
|
27653
|
+
dn = get(un) ? findInteractive(get(un)) : null, Pn(), gt(!0), tick().then(() => An(get(ln)));
|
|
27620
27654
|
}
|
|
27621
|
-
function
|
|
27655
|
+
function Jn() {
|
|
27622
27656
|
gt(!1);
|
|
27623
27657
|
let e = dn;
|
|
27624
27658
|
dn = null, tick().then(() => {
|
|
27625
27659
|
e?.focus();
|
|
27626
27660
|
});
|
|
27627
27661
|
}
|
|
27628
|
-
function
|
|
27629
|
-
|
|
27630
|
-
compareStart: get(It),
|
|
27631
|
-
compareEnd: get(Lt),
|
|
27632
|
-
presetLabel: get(Rt)
|
|
27633
|
-
})), Bn();
|
|
27662
|
+
function Yn() {
|
|
27663
|
+
Ln(), Jn();
|
|
27634
27664
|
}
|
|
27635
|
-
function
|
|
27636
|
-
|
|
27665
|
+
function Xn() {
|
|
27666
|
+
Rn(), Jn();
|
|
27637
27667
|
}
|
|
27638
|
-
function
|
|
27668
|
+
function Zn(e) {
|
|
27639
27669
|
let t = new SvelteDate(get(_n), get(vn) + e, 1);
|
|
27640
27670
|
set(_n, t.getFullYear(), !0), set(vn, t.getMonth(), !0), update(yn);
|
|
27641
27671
|
}
|
|
27642
|
-
function
|
|
27672
|
+
function Qn() {
|
|
27643
27673
|
if (set(mn, null), c() === "range") {
|
|
27644
27674
|
if (get(Mt) !== null && get(Nt) !== null) {
|
|
27645
27675
|
let e = k() ? applyTimeDisplay(get(Mt), get(zt), "start") ?? get(Mt) : get(Mt), t = k() ? applyTimeDisplay(get(Nt), get(Bt), "end") ?? get(Nt) : get(Nt);
|
|
@@ -27649,24 +27679,20 @@ function DateRangePicker(e, t) {
|
|
|
27649
27679
|
presetLabel: get(Rt)
|
|
27650
27680
|
});
|
|
27651
27681
|
}
|
|
27652
|
-
typeof at() == "function" &&
|
|
27653
|
-
compareStart: get(It),
|
|
27654
|
-
compareEnd: get(Lt),
|
|
27655
|
-
presetLabel: get(Rt)
|
|
27656
|
-
}));
|
|
27682
|
+
typeof at() == "function" && Ln();
|
|
27657
27683
|
} else get(Pt) !== null && (s(get(Pt)), set(hn, get(Rt), !0), vt()?.({
|
|
27658
27684
|
date: get(Pt),
|
|
27659
27685
|
presetLabel: get(Rt)
|
|
27660
27686
|
}));
|
|
27661
|
-
|
|
27687
|
+
Vn();
|
|
27662
27688
|
}
|
|
27663
|
-
function
|
|
27664
|
-
s(null), set(Pt, null), set(hn, null), St()?.(),
|
|
27689
|
+
function $n() {
|
|
27690
|
+
s(null), set(Pt, null), set(hn, null), St()?.(), Vn();
|
|
27665
27691
|
}
|
|
27666
|
-
function
|
|
27667
|
-
bt()?.(),
|
|
27692
|
+
function er() {
|
|
27693
|
+
bt()?.(), zn();
|
|
27668
27694
|
}
|
|
27669
|
-
function
|
|
27695
|
+
function tr(e) {
|
|
27670
27696
|
if (G() && get(Rt) === e.label) {
|
|
27671
27697
|
set(Mt, a(), !0), set(Nt, o(), !0), set(Pt, s(), !0), set(Rt, get(hn), !0), set(Gt, null), set(qt, null);
|
|
27672
27698
|
let e = a() === null ? s() === null ? gn : s() : a();
|
|
@@ -27677,13 +27703,13 @@ function DateRangePicker(e, t) {
|
|
|
27677
27703
|
let { start: t, end: n } = e.getValue();
|
|
27678
27704
|
set(Rt, e.label, !0), c() === "range" ? (set(Mt, t, !0), set(Nt, n, !0), set(Gt, null), set(qt, null), k() && (set(zt, formatTimeDisplay(t), !0), set(Bt, formatTimeDisplay(n), !0)), set(_n, t.getFullYear(), !0), set(vn, t.getMonth(), !0), update(yn)) : set(Pt, t, !0);
|
|
27679
27705
|
}
|
|
27680
|
-
function
|
|
27681
|
-
set(Mt, e.rangeStart, !0), set(Nt, e.rangeEnd, !0), set(Rt, null), set(Gt, null), set(qt, null), k() && (set(zt, "12:00 AM"), set(Bt,
|
|
27706
|
+
function nr(e) {
|
|
27707
|
+
set(Mt, e.rangeStart, !0), set(Nt, e.rangeEnd, !0), set(Rt, null), set(Gt, null), set(qt, null), k() && (set(zt, "12:00 AM"), set(Bt, Er(e.rangeEnd, gn) ? formatTimeDisplay(gn) : "11:59 PM", !0));
|
|
27682
27708
|
}
|
|
27683
|
-
function
|
|
27709
|
+
function rr(e) {
|
|
27684
27710
|
set(Pt, e.date, !0), set(Rt, null);
|
|
27685
27711
|
}
|
|
27686
|
-
function
|
|
27712
|
+
function ir(e) {
|
|
27687
27713
|
if (l() !== null) {
|
|
27688
27714
|
let t = new SvelteDate(l().getFullYear(), l().getMonth(), l().getDate());
|
|
27689
27715
|
if (e.getTime() < t.getTime()) return !1;
|
|
@@ -27694,85 +27720,85 @@ function DateRangePicker(e, t) {
|
|
|
27694
27720
|
}
|
|
27695
27721
|
return !get(nn)(e);
|
|
27696
27722
|
}
|
|
27697
|
-
function
|
|
27698
|
-
if (!
|
|
27723
|
+
function ar(e, t) {
|
|
27724
|
+
if (!ir(t)) return !1;
|
|
27699
27725
|
let n = get(e === "start" ? Nt : Mt);
|
|
27700
27726
|
return n === null ? !0 : !((e === "start" ? t.getTime() > n.getTime() : t.getTime() < n.getTime()) || p() !== null && Math.abs(Math.round((t.getTime() - n.getTime()) / en)) + 1 > p());
|
|
27701
27727
|
}
|
|
27702
|
-
let
|
|
27728
|
+
let or = /* @__PURE__ */ user_derived(() => {
|
|
27703
27729
|
if (get(Zt).trim() === "") return !0;
|
|
27704
27730
|
let e = parseDateDisplay(get(Zt));
|
|
27705
|
-
return e !== null &&
|
|
27706
|
-
}),
|
|
27731
|
+
return e !== null && ar("start", e);
|
|
27732
|
+
}), sr = /* @__PURE__ */ user_derived(() => {
|
|
27707
27733
|
if (get(Qt).trim() === "") return !0;
|
|
27708
27734
|
let e = parseDateDisplay(get(Qt));
|
|
27709
|
-
return e !== null &&
|
|
27710
|
-
}),
|
|
27711
|
-
function
|
|
27735
|
+
return e !== null && ar("end", e);
|
|
27736
|
+
}), cr = "Enter a date this picker accepts, like 12 Mar 2025.", lr = "Enter a time like 12:00 AM.", ur = /* @__PURE__ */ user_derived(() => describeField(`${n}-start-date`, { error: get(or) ? null : cr })), dr = /* @__PURE__ */ user_derived(() => describeField(`${n}-start-time`, { error: get(Tn) ? null : lr })), fr = /* @__PURE__ */ user_derived(() => describeField(`${n}-end-date`, { error: get(sr) ? null : cr })), pr = /* @__PURE__ */ user_derived(() => describeField(`${n}-end-time`, { error: get(En) ? null : lr }));
|
|
27737
|
+
function mr(e) {
|
|
27712
27738
|
let t = e.getFullYear() === get(_n) && e.getMonth() === get(vn);
|
|
27713
27739
|
if (!get(At)) return t;
|
|
27714
27740
|
let n = new SvelteDate(get(_n), get(vn) + 1, 1), i = e.getFullYear() === n.getFullYear() && e.getMonth() === n.getMonth();
|
|
27715
27741
|
return t || i;
|
|
27716
27742
|
}
|
|
27717
|
-
function
|
|
27743
|
+
function hr(e) {
|
|
27718
27744
|
set(_n, e.year, !0), set(vn, e.month, !0);
|
|
27719
27745
|
}
|
|
27720
|
-
function
|
|
27721
|
-
|
|
27746
|
+
function gr(e) {
|
|
27747
|
+
mr(e) || (set(_n, e.getFullYear(), !0), set(vn, e.getMonth(), !0), update(yn));
|
|
27722
27748
|
}
|
|
27723
|
-
function
|
|
27749
|
+
function _r(e) {
|
|
27724
27750
|
set(e === "start" ? Gt : qt, null);
|
|
27725
27751
|
}
|
|
27726
|
-
function
|
|
27752
|
+
function vr(e, t) {
|
|
27727
27753
|
e.currentTarget instanceof HTMLInputElement && set(t === "start" ? Gt : qt, e.currentTarget.value, !0);
|
|
27728
27754
|
}
|
|
27729
|
-
function
|
|
27755
|
+
function yr(e) {
|
|
27730
27756
|
let t = get(e === "start" ? Gt : qt);
|
|
27731
27757
|
if (t === null) return;
|
|
27732
27758
|
let n = parseDateDisplay(t);
|
|
27733
|
-
if (n === null || !
|
|
27734
|
-
|
|
27759
|
+
if (n === null || !ar(e, n)) {
|
|
27760
|
+
_r(e);
|
|
27735
27761
|
return;
|
|
27736
27762
|
}
|
|
27737
|
-
set(e === "start" ? Mt : Nt, n, !0), set(Rt, null),
|
|
27763
|
+
set(e === "start" ? Mt : Nt, n, !0), set(Rt, null), gr(n), _r(e);
|
|
27738
27764
|
}
|
|
27739
|
-
function
|
|
27740
|
-
e.key === "Enter" && (e.preventDefault(),
|
|
27765
|
+
function br(e, t) {
|
|
27766
|
+
e.key === "Enter" && (e.preventDefault(), yr(t));
|
|
27741
27767
|
}
|
|
27742
|
-
function
|
|
27743
|
-
gt() ?
|
|
27768
|
+
function xr() {
|
|
27769
|
+
gt() ? Xn() : get(rn) && er();
|
|
27744
27770
|
}
|
|
27745
|
-
function
|
|
27746
|
-
get(rn) &&
|
|
27771
|
+
function Sr() {
|
|
27772
|
+
get(rn) && zn(), gt() && (Rn(), Jn());
|
|
27747
27773
|
}
|
|
27748
|
-
let
|
|
27774
|
+
let Cr = null;
|
|
27749
27775
|
user_effect(() => {
|
|
27750
27776
|
let e = get(rn) || gt();
|
|
27751
|
-
e &&
|
|
27777
|
+
e && Cr === null ? Cr = registerDismissible({
|
|
27752
27778
|
element: () => get(sn),
|
|
27753
|
-
onEscape:
|
|
27754
|
-
onOutside:
|
|
27755
|
-
}) : !e &&
|
|
27779
|
+
onEscape: xr,
|
|
27780
|
+
onOutside: Sr
|
|
27781
|
+
}) : !e && Cr !== null && (Cr(), Cr = null);
|
|
27756
27782
|
}), onDestroy(() => {
|
|
27757
|
-
|
|
27783
|
+
Cr?.(), Cr = null;
|
|
27758
27784
|
});
|
|
27759
|
-
let
|
|
27760
|
-
function
|
|
27785
|
+
let wr = /* @__PURE__ */ user_derived(() => c() === "range" ? get(Mt) !== null && get(Nt) !== null && get(Dn) : get(Pt) !== null);
|
|
27786
|
+
function Tr(e) {
|
|
27761
27787
|
if (get(mn) !== null && get(Mt) === null && get(Nt) === null && get(Pt) === null) return e.label === get(mn);
|
|
27762
27788
|
if (get(Rt) !== null) return e.label === get(Rt);
|
|
27763
27789
|
if (c() === "single") {
|
|
27764
27790
|
if (get(Pt) === null) return !1;
|
|
27765
27791
|
let { start: t } = e.getValue();
|
|
27766
|
-
return
|
|
27792
|
+
return Er(get(Pt), t);
|
|
27767
27793
|
}
|
|
27768
27794
|
if (get(Mt) === null || get(Nt) === null) return !1;
|
|
27769
27795
|
let { start: t, end: n } = e.getValue();
|
|
27770
|
-
return
|
|
27796
|
+
return Er(get(Mt), t) && Er(get(Nt), n);
|
|
27771
27797
|
}
|
|
27772
|
-
function
|
|
27798
|
+
function Er(e, t) {
|
|
27773
27799
|
return e.getFullYear() === t.getFullYear() && e.getMonth() === t.getMonth() && e.getDate() === t.getDate();
|
|
27774
27800
|
}
|
|
27775
|
-
var
|
|
27801
|
+
var Dr = {
|
|
27776
27802
|
get rangeStart() {
|
|
27777
27803
|
return a();
|
|
27778
27804
|
},
|
|
@@ -28007,11 +28033,11 @@ function DateRangePicker(e, t) {
|
|
|
28007
28033
|
set onclear(e) {
|
|
28008
28034
|
St(e), flushSync();
|
|
28009
28035
|
}
|
|
28010
|
-
},
|
|
28036
|
+
}, Or = root_20$2(), kr = child(Or), Ar = child(kr);
|
|
28011
28037
|
{
|
|
28012
28038
|
let e = /* @__PURE__ */ user_derived(() => get(rn) ? "Close date picker" : "Open date picker"), t = /* @__PURE__ */ user_derived(() => get(rn) ? "drp-trigger-open" : "");
|
|
28013
|
-
Button(
|
|
28014
|
-
onclick:
|
|
28039
|
+
Button(Ar, spread_props({
|
|
28040
|
+
onclick: Kn,
|
|
28015
28041
|
get ariaLabel() {
|
|
28016
28042
|
return get(e);
|
|
28017
28043
|
},
|
|
@@ -28044,13 +28070,13 @@ function DateRangePicker(e, t) {
|
|
|
28044
28070
|
$$slots: { default: !0 }
|
|
28045
28071
|
}));
|
|
28046
28072
|
}
|
|
28047
|
-
reset(
|
|
28048
|
-
var
|
|
28073
|
+
reset(kr), bind_this(kr, (e) => set(on, e), () => get(on));
|
|
28074
|
+
var jr = sibling(kr, 2), Mr = (e) => {
|
|
28049
28075
|
var t = root_4$22(), n = child(t);
|
|
28050
28076
|
{
|
|
28051
28077
|
let e = /* @__PURE__ */ user_derived(() => gt() ? "drp-compare-trigger-open" : "");
|
|
28052
28078
|
Button(n, {
|
|
28053
|
-
onclick:
|
|
28079
|
+
onclick: qn,
|
|
28054
28080
|
ariaLabel: "Open compare period picker",
|
|
28055
28081
|
get classes() {
|
|
28056
28082
|
return `drp-compare-trigger ${get(e) ?? ""}`;
|
|
@@ -28065,14 +28091,14 @@ function DateRangePicker(e, t) {
|
|
|
28065
28091
|
var i = sibling(n, 2), a = (e) => {
|
|
28066
28092
|
var t = root_3$26(), n = child(t), i = (e) => {
|
|
28067
28093
|
var t = root_2$28();
|
|
28068
|
-
snippet(child(t), at), reset(t), append(e, t);
|
|
28094
|
+
snippet(child(t), at, () => get(It)), reset(t), append(e, t);
|
|
28069
28095
|
};
|
|
28070
28096
|
if_block(n, (e) => {
|
|
28071
28097
|
typeof at() == "function" && e(i);
|
|
28072
28098
|
});
|
|
28073
28099
|
var a = sibling(n, 2), o = child(a);
|
|
28074
28100
|
Button(o, {
|
|
28075
|
-
onclick:
|
|
28101
|
+
onclick: Xn,
|
|
28076
28102
|
ariaLabel: "Cancel compare selection",
|
|
28077
28103
|
classes: "drp-btn-cancel",
|
|
28078
28104
|
children: (e, t) => {
|
|
@@ -28082,9 +28108,9 @@ function DateRangePicker(e, t) {
|
|
|
28082
28108
|
});
|
|
28083
28109
|
var s = sibling(o, 2);
|
|
28084
28110
|
{
|
|
28085
|
-
let e = /* @__PURE__ */ user_derived(() => get(
|
|
28111
|
+
let e = /* @__PURE__ */ user_derived(() => !get(In));
|
|
28086
28112
|
Button(s, {
|
|
28087
|
-
onclick:
|
|
28113
|
+
onclick: Yn,
|
|
28088
28114
|
ariaLabel: "Apply compare selection",
|
|
28089
28115
|
classes: "drp-btn-apply",
|
|
28090
28116
|
get disabled() {
|
|
@@ -28102,10 +28128,10 @@ function DateRangePicker(e, t) {
|
|
|
28102
28128
|
gt() && e(a);
|
|
28103
28129
|
}), reset(t), bind_this(t, (e) => set(un, e), () => get(un)), append(e, t);
|
|
28104
28130
|
};
|
|
28105
|
-
if_block(
|
|
28106
|
-
typeof ht() == "function" && e(
|
|
28131
|
+
if_block(jr, (e) => {
|
|
28132
|
+
typeof ht() == "function" && e(Mr);
|
|
28107
28133
|
});
|
|
28108
|
-
var
|
|
28134
|
+
var Nr = sibling(jr, 2), Pr = (e) => {
|
|
28109
28135
|
var t = root_19$4();
|
|
28110
28136
|
let n;
|
|
28111
28137
|
var a = child(t), o = child(a), p = (e) => {
|
|
@@ -28131,15 +28157,15 @@ function DateRangePicker(e, t) {
|
|
|
28131
28157
|
html(t, () => checkmark_default, !0), reset(t), template_effect(() => {
|
|
28132
28158
|
set_attribute(t, "data-pw", typeof lt() == "string" ? `${lt()}-preset-check` : null), set_attribute(t, "testid", typeof lt() == "string" ? `${lt()}-preset-check` : null);
|
|
28133
28159
|
}), append(e, t);
|
|
28134
|
-
}, k = /* @__PURE__ */ user_derived(() => S() &&
|
|
28160
|
+
}, k = /* @__PURE__ */ user_derived(() => S() && Tr(get(t)));
|
|
28135
28161
|
if_block(p, (e) => {
|
|
28136
28162
|
get(k) && e(C);
|
|
28137
28163
|
}), reset(l), template_effect((e, n) => {
|
|
28138
28164
|
u = set_class(l, 1, "drp-preset-item svelte-gpybdi", null, u, e), set_attribute(l, "aria-selected", n), set_attribute(l, "data-pw", typeof lt() == "string" ? `${lt()}-preset-${get(t).label}` : null), set_attribute(l, "testid", typeof lt() == "string" ? `${lt()}-preset-${get(t).label}` : null), set_text(f, `${get(t).label ?? ""} `);
|
|
28139
28165
|
}, [() => ({
|
|
28140
|
-
"drp-preset-active":
|
|
28166
|
+
"drp-preset-active": Tr(get(t)),
|
|
28141
28167
|
"drp-preset-checkable": S()
|
|
28142
|
-
}), () =>
|
|
28168
|
+
}), () => Tr(get(t))]), delegated("click", l, () => tr(get(t))), append(e, o);
|
|
28143
28169
|
}), reset(t), append(e, t);
|
|
28144
28170
|
};
|
|
28145
28171
|
if_block(o, (e) => {
|
|
@@ -28158,9 +28184,9 @@ function DateRangePicker(e, t) {
|
|
|
28158
28184
|
var u = child(c);
|
|
28159
28185
|
html(u, () => i, !0), reset(u);
|
|
28160
28186
|
var f = sibling(u, 2);
|
|
28161
|
-
remove_input_defaults(f), reset(c), drpFieldError(sibling(c, 2), () => get(
|
|
28187
|
+
remove_input_defaults(f), reset(c), drpFieldError(sibling(c, 2), () => get(ur).errorId, () => get(ur).showsError, () => cr), reset(n);
|
|
28162
28188
|
var p = sibling(n, 2);
|
|
28163
|
-
drpFieldError(p, () => get(
|
|
28189
|
+
drpFieldError(p, () => get(dr).errorId, () => get(dr).showsError, () => lr);
|
|
28164
28190
|
var h = sibling(p, 2);
|
|
28165
28191
|
html(h, () => chevron_right_default, !0), reset(h);
|
|
28166
28192
|
var S = sibling(h, 2), C = child(S);
|
|
@@ -28172,20 +28198,20 @@ function DateRangePicker(e, t) {
|
|
|
28172
28198
|
var ne = child(G);
|
|
28173
28199
|
html(ne, () => i, !0), reset(ne);
|
|
28174
28200
|
var re = sibling(ne, 2);
|
|
28175
|
-
remove_input_defaults(re), reset(G), drpFieldError(sibling(G, 2), () => get(
|
|
28176
|
-
o = set_class(a, 1, "drp-date-input svelte-gpybdi", null, o, { "drp-date-input-invalid": !get(
|
|
28177
|
-
}), delegated("input", s, (e) =>
|
|
28201
|
+
remove_input_defaults(re), reset(G), drpFieldError(sibling(G, 2), () => get(fr).errorId, () => get(fr).showsError, () => cr), reset(S), drpFieldError(sibling(S, 2), () => get(pr).errorId, () => get(pr).showsError, () => lr), template_effect(() => {
|
|
28202
|
+
o = set_class(a, 1, "drp-date-input svelte-gpybdi", null, o, { "drp-date-input-invalid": !get(or) }), set_value(s, get(Zt)), set_attribute(s, "aria-invalid", !get(or)), set_attribute(s, "aria-describedby", get(ur).describedBy), set_attribute(s, "data-pw", lt() ? `${lt()}-start-date` : null), set_attribute(s, "testid", lt() ? `${lt()}-start-date` : null), l = set_class(c, 1, "drp-time-input drp-time-input-inline svelte-gpybdi", null, l, { "drp-time-input-invalid": !get(Tn) }), set_attribute(f, "aria-invalid", !get(Tn)), set_attribute(f, "aria-describedby", get(dr).describedBy), set_attribute(f, "data-pw", lt() ? `${lt()}-start-time` : null), set_attribute(f, "testid", lt() ? `${lt()}-start-time` : null), k = set_class(C, 1, "drp-date-input svelte-gpybdi", null, k, { "drp-date-input-invalid": !get(sr) }), set_value(R, get(Qt)), set_attribute(R, "aria-invalid", !get(sr)), set_attribute(R, "aria-describedby", get(fr).describedBy), set_attribute(R, "data-pw", lt() ? `${lt()}-end-date` : null), set_attribute(R, "testid", lt() ? `${lt()}-end-date` : null), te = set_class(G, 1, "drp-time-input drp-time-input-inline svelte-gpybdi", null, te, { "drp-time-input-invalid": !get(En) }), set_attribute(re, "aria-invalid", !get(En)), set_attribute(re, "aria-describedby", get(pr).describedBy), set_attribute(re, "data-pw", lt() ? `${lt()}-end-time` : null), set_attribute(re, "testid", lt() ? `${lt()}-end-time` : null);
|
|
28203
|
+
}), delegated("input", s, (e) => vr(e, "start")), event("blur", s, () => yr("start")), delegated("keydown", s, (e) => br(e, "start")), bind_value(f, () => get(zt), (e) => set(zt, e)), delegated("input", R, (e) => vr(e, "end")), event("blur", R, () => yr("end")), delegated("keydown", R, (e) => br(e, "end")), bind_value(re, () => get(Bt), (e) => set(Bt, e)), append(e, t);
|
|
28178
28204
|
}, c = (e) => {
|
|
28179
28205
|
var t = root_12$12(), n = first_child(t);
|
|
28180
28206
|
let a;
|
|
28181
28207
|
var o = child(n);
|
|
28182
|
-
remove_input_defaults(o), drpFieldError(sibling(o, 2), () => get(
|
|
28208
|
+
remove_input_defaults(o), drpFieldError(sibling(o, 2), () => get(ur).errorId, () => get(ur).showsError, () => cr), reset(n);
|
|
28183
28209
|
var s = sibling(n, 2);
|
|
28184
28210
|
html(s, () => chevron_right_default, !0), reset(s);
|
|
28185
28211
|
var c = sibling(s, 2);
|
|
28186
28212
|
let l;
|
|
28187
28213
|
var u = child(c);
|
|
28188
|
-
remove_input_defaults(u), drpFieldError(sibling(u, 2), () => get(
|
|
28214
|
+
remove_input_defaults(u), drpFieldError(sibling(u, 2), () => get(fr).errorId, () => get(fr).showsError, () => cr), reset(c);
|
|
28189
28215
|
var f = sibling(c, 2), p = (e) => {
|
|
28190
28216
|
var t = root_11$12();
|
|
28191
28217
|
let n;
|
|
@@ -28197,8 +28223,8 @@ function DateRangePicker(e, t) {
|
|
|
28197
28223
|
if_block(f, (e) => {
|
|
28198
28224
|
k() && e(p);
|
|
28199
28225
|
}), template_effect(() => {
|
|
28200
|
-
a = set_class(n, 1, "drp-date-input svelte-gpybdi", null, a, { "drp-date-input-invalid": !get(
|
|
28201
|
-
}), delegated("input", o, (e) =>
|
|
28226
|
+
a = set_class(n, 1, "drp-date-input svelte-gpybdi", null, a, { "drp-date-input-invalid": !get(or) }), set_value(o, get(Zt)), set_attribute(o, "aria-invalid", !get(or)), set_attribute(o, "aria-describedby", get(ur).describedBy), set_attribute(o, "data-pw", lt() ? `${lt()}-start-date` : null), set_attribute(o, "testid", lt() ? `${lt()}-start-date` : null), l = set_class(c, 1, "drp-date-input svelte-gpybdi", null, l, { "drp-date-input-invalid": !get(sr) }), set_value(u, get(Qt)), set_attribute(u, "aria-invalid", !get(sr)), set_attribute(u, "aria-describedby", get(fr).describedBy), set_attribute(u, "data-pw", lt() ? `${lt()}-end-date` : null), set_attribute(u, "testid", lt() ? `${lt()}-end-date` : null);
|
|
28227
|
+
}), delegated("input", o, (e) => vr(e, "start")), event("blur", o, () => yr("start")), delegated("keydown", o, (e) => br(e, "start")), delegated("input", u, (e) => vr(e, "end")), event("blur", u, () => yr("end")), delegated("keydown", u, (e) => br(e, "end")), append(e, t);
|
|
28202
28228
|
};
|
|
28203
28229
|
if_block(o, (e) => {
|
|
28204
28230
|
get($t) ? e(s) : e(c, -1);
|
|
@@ -28209,7 +28235,7 @@ function DateRangePicker(e, t) {
|
|
|
28209
28235
|
var o = child(n);
|
|
28210
28236
|
html(o, () => i, !0), reset(o);
|
|
28211
28237
|
var s = sibling(o, 2);
|
|
28212
|
-
remove_input_defaults(s), drpFieldError(sibling(s, 2), () => get(
|
|
28238
|
+
remove_input_defaults(s), drpFieldError(sibling(s, 2), () => get(dr).errorId, () => get(dr).showsError, () => lr), reset(n);
|
|
28213
28239
|
var c = sibling(n, 2);
|
|
28214
28240
|
html(c, () => chevron_right_default, !0), reset(c);
|
|
28215
28241
|
var l = sibling(c, 2);
|
|
@@ -28217,8 +28243,8 @@ function DateRangePicker(e, t) {
|
|
|
28217
28243
|
var f = child(l);
|
|
28218
28244
|
html(f, () => i, !0), reset(f);
|
|
28219
28245
|
var p = sibling(f, 2);
|
|
28220
|
-
remove_input_defaults(p), drpFieldError(sibling(p, 2), () => get(
|
|
28221
|
-
a = set_class(n, 1, "drp-time-input svelte-gpybdi", null, a, { "drp-time-input-invalid": !get(Tn) }), set_attribute(s, "aria-invalid", !get(Tn)), set_attribute(s, "aria-describedby", get(
|
|
28246
|
+
remove_input_defaults(p), drpFieldError(sibling(p, 2), () => get(pr).errorId, () => get(pr).showsError, () => lr), reset(l), reset(t), template_effect(() => {
|
|
28247
|
+
a = set_class(n, 1, "drp-time-input svelte-gpybdi", null, a, { "drp-time-input-invalid": !get(Tn) }), set_attribute(s, "aria-invalid", !get(Tn)), set_attribute(s, "aria-describedby", get(dr).describedBy), set_attribute(s, "data-pw", lt() ? `${lt()}-start-time` : null), set_attribute(s, "testid", lt() ? `${lt()}-start-time` : null), u = set_class(l, 1, "drp-time-input svelte-gpybdi", null, u, { "drp-time-input-invalid": !get(En) }), set_attribute(p, "aria-invalid", !get(En)), set_attribute(p, "aria-describedby", get(pr).describedBy), set_attribute(p, "data-pw", lt() ? `${lt()}-end-time` : null), set_attribute(p, "testid", lt() ? `${lt()}-end-time` : null);
|
|
28222
28248
|
}), bind_value(s, () => get(zt), (e) => set(zt, e)), bind_value(p, () => get(Bt), (e) => set(Bt, e)), append(e, t);
|
|
28223
28249
|
};
|
|
28224
28250
|
if_block(l, (e) => {
|
|
@@ -28258,7 +28284,7 @@ function DateRangePicker(e, t) {
|
|
|
28258
28284
|
get initialMonth() {
|
|
28259
28285
|
return get(bn);
|
|
28260
28286
|
},
|
|
28261
|
-
onrangeselect:
|
|
28287
|
+
onrangeselect: nr,
|
|
28262
28288
|
classes: "drp-calendar-embedded",
|
|
28263
28289
|
get rangeStart() {
|
|
28264
28290
|
return get(Mt);
|
|
@@ -28292,7 +28318,7 @@ function DateRangePicker(e, t) {
|
|
|
28292
28318
|
get initialMonth() {
|
|
28293
28319
|
return get(xn);
|
|
28294
28320
|
},
|
|
28295
|
-
onrangeselect:
|
|
28321
|
+
onrangeselect: nr,
|
|
28296
28322
|
classes: "drp-calendar-embedded",
|
|
28297
28323
|
get rangeStart() {
|
|
28298
28324
|
return get(Mt);
|
|
@@ -28309,7 +28335,7 @@ function DateRangePicker(e, t) {
|
|
|
28309
28335
|
}), append(e, t);
|
|
28310
28336
|
}), reset(h), template_effect(() => {
|
|
28311
28337
|
set_text(s, get(Cn)), set_text(f, get(Sn));
|
|
28312
|
-
}), delegated("click", i, () =>
|
|
28338
|
+
}), delegated("click", i, () => Zn(-1)), delegated("click", p, () => Zn(1)), append(e, t);
|
|
28313
28339
|
}, Re = (e) => {
|
|
28314
28340
|
var t = comment();
|
|
28315
28341
|
key(first_child(t), () => get(yn), (e) => {
|
|
@@ -28337,9 +28363,9 @@ function DateRangePicker(e, t) {
|
|
|
28337
28363
|
get initialMonth() {
|
|
28338
28364
|
return get(bn);
|
|
28339
28365
|
},
|
|
28340
|
-
onrangeselect:
|
|
28341
|
-
onselect:
|
|
28342
|
-
onmonthchange:
|
|
28366
|
+
onrangeselect: nr,
|
|
28367
|
+
onselect: rr,
|
|
28368
|
+
onmonthchange: hr,
|
|
28343
28369
|
classes: "drp-calendar-embedded",
|
|
28344
28370
|
get rangeStart() {
|
|
28345
28371
|
return get(Mt);
|
|
@@ -28375,14 +28401,14 @@ function DateRangePicker(e, t) {
|
|
|
28375
28401
|
});
|
|
28376
28402
|
var ut = sibling(Ue, 2), dt = (e) => {
|
|
28377
28403
|
var t = root_18$4();
|
|
28378
|
-
snippet(child(t), at), reset(t), append(e, t);
|
|
28404
|
+
snippet(child(t), at, () => get(It)), reset(t), append(e, t);
|
|
28379
28405
|
};
|
|
28380
28406
|
if_block(ut, (e) => {
|
|
28381
28407
|
typeof at() == "function" && typeof ht() != "function" && e(dt);
|
|
28382
28408
|
}), reset(R), reset(a);
|
|
28383
28409
|
var ft = sibling(a, 2), mt = child(ft), gt = (e) => {
|
|
28384
28410
|
Button(e, {
|
|
28385
|
-
onclick:
|
|
28411
|
+
onclick: $n,
|
|
28386
28412
|
ariaLabel: "Clear date selection",
|
|
28387
28413
|
classes: "drp-btn-clear",
|
|
28388
28414
|
children: (e, t) => {
|
|
@@ -28396,7 +28422,7 @@ function DateRangePicker(e, t) {
|
|
|
28396
28422
|
});
|
|
28397
28423
|
var _t = sibling(mt, 2);
|
|
28398
28424
|
Button(_t, {
|
|
28399
|
-
onclick:
|
|
28425
|
+
onclick: er,
|
|
28400
28426
|
ariaLabel: "Cancel date selection",
|
|
28401
28427
|
classes: "drp-btn-cancel",
|
|
28402
28428
|
children: (e, t) => {
|
|
@@ -28406,9 +28432,9 @@ function DateRangePicker(e, t) {
|
|
|
28406
28432
|
});
|
|
28407
28433
|
var vt = sibling(_t, 2);
|
|
28408
28434
|
{
|
|
28409
|
-
let e = /* @__PURE__ */ user_derived(() => !get(
|
|
28435
|
+
let e = /* @__PURE__ */ user_derived(() => !get(wr));
|
|
28410
28436
|
Button(vt, {
|
|
28411
|
-
onclick:
|
|
28437
|
+
onclick: Qn,
|
|
28412
28438
|
ariaLabel: "Apply date selection",
|
|
28413
28439
|
classes: "drp-btn-apply",
|
|
28414
28440
|
get disabled() {
|
|
@@ -28420,7 +28446,7 @@ function DateRangePicker(e, t) {
|
|
|
28420
28446
|
$$slots: { default: !0 }
|
|
28421
28447
|
});
|
|
28422
28448
|
}
|
|
28423
|
-
reset(ft), reset(t), action(t, (e) =>
|
|
28449
|
+
reset(ft), reset(t), action(t, (e) => Un?.(e)), bind_this(t, (e) => set(an, e), () => get(an)), template_effect(() => {
|
|
28424
28450
|
n = set_class(t, 1, "drp-panel svelte-gpybdi", null, n, {
|
|
28425
28451
|
"drp-panel-above": get(cn),
|
|
28426
28452
|
"drp-panel-align-left": be() === "left",
|
|
@@ -28431,11 +28457,11 @@ function DateRangePicker(e, t) {
|
|
|
28431
28457
|
}), set_attribute(t, "data-pw", typeof lt() == "string" ? `${lt()}-panel` : null), set_attribute(t, "testid", typeof lt() == "string" ? `${lt()}-panel` : null);
|
|
28432
28458
|
}), delegated("keydown", t, (e) => jn(get(an), e)), append(e, t);
|
|
28433
28459
|
};
|
|
28434
|
-
return if_block(
|
|
28435
|
-
get(rn) && e(
|
|
28436
|
-
}), reset(
|
|
28437
|
-
set_class(
|
|
28438
|
-
}), append(e,
|
|
28460
|
+
return if_block(Nr, (e) => {
|
|
28461
|
+
get(rn) && e(Pr);
|
|
28462
|
+
}), reset(Or), bind_this(Or, (e) => set(sn, e), () => get(sn)), action(Or, (e, t) => Gn?.(e, t), Re), template_effect(() => {
|
|
28463
|
+
set_class(Or, 1, `drp-root ${ut() ?? "" ?? ""}`, "svelte-gpybdi"), set_attribute(Or, "data-pw", lt()), set_attribute(Or, "testid", lt());
|
|
28464
|
+
}), append(e, Or), pop(Dr);
|
|
28439
28465
|
}
|
|
28440
28466
|
delegate([
|
|
28441
28467
|
"keydown",
|
|
@@ -28517,9 +28543,17 @@ function DateRangePicker_wc(e, t) {
|
|
|
28517
28543
|
var n = comment();
|
|
28518
28544
|
slot(first_child(n), t, "time-picker", {}, null), append(e, n);
|
|
28519
28545
|
},
|
|
28520
|
-
compareCalendar: (e) => {
|
|
28521
|
-
var
|
|
28522
|
-
|
|
28546
|
+
compareCalendar: (e, n = noop) => {
|
|
28547
|
+
var i = comment(), a = first_child(i), o = (e) => {
|
|
28548
|
+
var i = comment();
|
|
28549
|
+
snippet(first_child(i), () => t.compareCalendar, n), append(e, i);
|
|
28550
|
+
}, s = (e) => {
|
|
28551
|
+
var n = comment();
|
|
28552
|
+
slot(first_child(n), t, "compare-calendar", {}, null), append(e, n);
|
|
28553
|
+
};
|
|
28554
|
+
if_block(a, (e) => {
|
|
28555
|
+
t.compareCalendar ? e(o) : e(s, -1);
|
|
28556
|
+
}), append(e, i);
|
|
28523
28557
|
},
|
|
28524
28558
|
$$slots: {
|
|
28525
28559
|
triggerIcon: !0,
|
|
@@ -28570,9 +28604,17 @@ function DateRangePicker_wc(e, t) {
|
|
|
28570
28604
|
t.triggerIcon ? e(a) : e(o, -1);
|
|
28571
28605
|
}), append(e, n);
|
|
28572
28606
|
},
|
|
28573
|
-
compareCalendar: (e) => {
|
|
28574
|
-
var
|
|
28575
|
-
|
|
28607
|
+
compareCalendar: (e, n = noop) => {
|
|
28608
|
+
var i = comment(), a = first_child(i), o = (e) => {
|
|
28609
|
+
var i = comment();
|
|
28610
|
+
snippet(first_child(i), () => t.compareCalendar, n), append(e, i);
|
|
28611
|
+
}, s = (e) => {
|
|
28612
|
+
var n = comment();
|
|
28613
|
+
slot(first_child(n), t, "compare-calendar", {}, null), append(e, n);
|
|
28614
|
+
};
|
|
28615
|
+
if_block(a, (e) => {
|
|
28616
|
+
t.compareCalendar ? e(o) : e(s, -1);
|
|
28617
|
+
}), append(e, i);
|
|
28576
28618
|
},
|
|
28577
28619
|
$$slots: {
|
|
28578
28620
|
triggerIcon: !0,
|
|
@@ -54738,7 +54780,7 @@ function ChatComposer(e, t) {
|
|
|
54738
54780
|
var i = sibling(n, 2);
|
|
54739
54781
|
bind_this(i, (e) => set(mn, e), () => get(mn)), reset(t), template_effect(() => {
|
|
54740
54782
|
set_attribute(i, "accept", mt()), i.multiple = ht();
|
|
54741
|
-
}), delegated("change", i,
|
|
54783
|
+
}), delegated("change", i, Wn), append(e, t);
|
|
54742
54784
|
};
|
|
54743
54785
|
if_block(n, (e) => {
|
|
54744
54786
|
get(vn) && e(i);
|
|
@@ -54752,9 +54794,9 @@ function ChatComposer(e, t) {
|
|
|
54752
54794
|
}), append(e, t);
|
|
54753
54795
|
}, a = (e) => {
|
|
54754
54796
|
var t = root_3$6();
|
|
54755
|
-
remove_textarea_child(t), bind_this(t, (e) => set(hn, e), () => get(hn)), effect(() => bind_value(t, s)), action(t, (e, t) =>
|
|
54756
|
-
set_attribute(t, "data-pw", an() ?? null), set_attribute(t, "placeholder", u()), t.disabled = get(bn), set_attribute(t, "aria-label", on() ?? (u().length > 0 ? u() : "Message")), set_attribute(t, "role", jt() === null ? null : "combobox"), set_attribute(t, "aria-expanded", jt() === null ? null : get(
|
|
54757
|
-
}), delegated("input", t,
|
|
54797
|
+
remove_textarea_child(t), bind_this(t, (e) => set(hn, e), () => get(hn)), effect(() => bind_value(t, s)), action(t, (e, t) => Kn?.(e, t), s), template_effect(() => {
|
|
54798
|
+
set_attribute(t, "data-pw", an() ?? null), set_attribute(t, "placeholder", u()), t.disabled = get(bn), set_attribute(t, "aria-label", on() ?? (u().length > 0 ? u() : "Message")), set_attribute(t, "role", jt() === null ? null : "combobox"), set_attribute(t, "aria-expanded", jt() === null ? null : get(Mn)), set_attribute(t, "aria-controls", get(Mn) ? Pn : null), set_attribute(t, "aria-autocomplete", jt() === null ? null : "list"), set_attribute(t, "aria-activedescendant", get(Fn)), set_attribute(t, "maxlength", k() > 0 ? k() : null);
|
|
54799
|
+
}), delegated("input", t, Un), event("focus", t, (e) => Ht()?.(e)), delegated("keydown", t, Hn), event("paste", t, (e) => qt()?.(e)), append(e, t);
|
|
54758
54800
|
}, o = (e) => {
|
|
54759
54801
|
var t = root_8$4(), n = first_child(t), i = (e) => {
|
|
54760
54802
|
var t = root_4$5();
|
|
@@ -54858,7 +54900,7 @@ function ChatComposer(e, t) {
|
|
|
54858
54900
|
{
|
|
54859
54901
|
let e = /* @__PURE__ */ user_derived(() => !get(wn));
|
|
54860
54902
|
Button(n, {
|
|
54861
|
-
onclick:
|
|
54903
|
+
onclick: Vn,
|
|
54862
54904
|
get disabled() {
|
|
54863
54905
|
return get(e);
|
|
54864
54906
|
},
|
|
@@ -54897,14 +54939,20 @@ function ChatComposer(e, t) {
|
|
|
54897
54939
|
}), append(e, t);
|
|
54898
54940
|
}, s = prop(t, "value", 15, ""), c = prop(t, "layout", 7, "row"), l = prop(t, "variant", 7, "default"), u = prop(t, "placeholder", 7, ""), f = prop(t, "disabled", 7, !1), p = prop(t, "textDisabled", 7, null), h = prop(t, "voiceDisabled", 7, null), S = prop(t, "sendDisabled", 7, null), C = prop(t, "submitOnEnter", 7, !0), k = prop(t, "maxLength", 7, 0), R = prop(t, "streaming", 7, !1), G = prop(t, "recording", 7, !1), te = prop(t, "attachments", 31, () => proxy([])), ne = prop(t, "attachmentsPreview", 7), re = prop(t, "richImages", 23, () => []), be = prop(t, "richFiles", 23, () => []), Me = prop(t, "richVideos", 23, () => []), Re = prop(t, "richImageTooltip", 7), Ue = prop(t, "richVideoTooltip", 7), it = prop(t, "richRemoveIcon", 7), at = prop(t, "richFileIcon", 7), ot = prop(t, "onremoverichimage", 7), ct = prop(t, "onremoverichfile", 7), lt = prop(t, "onremoverichvideo", 7), ut = prop(t, "onopenrichimage", 7), dt = prop(t, "onopenrichvideo", 7), ft = prop(t, "onopenrichfile", 7), pt = prop(t, "sendable", 7, null), mt = prop(t, "accept", 7, ""), ht = prop(t, "multiple", 7, !1), gt = prop(t, "sendLabel", 7, "Send message"), _t = prop(t, "stopLabel", 7, "Stop generating"), vt = prop(t, "voiceLabel", 7, "Voice input"), yt = prop(t, "attachLabel", 7, "Attach files"), bt = prop(t, "sendIcon", 7), xt = prop(t, "stopIcon", 7), St = prop(t, "voiceIcon", 7), Ct = prop(t, "attachIcon", 7), wt = prop(t, "actionIcon", 7), Tt = prop(t, "actionLabel", 7, "Voice conversation"), Et = prop(t, "actionText", 7), Dt = prop(t, "leading", 7), Ot = prop(t, "trailing", 7), kt = prop(t, "statusText", 7), At = prop(t, "statusTestId", 7), jt = prop(t, "slashCommands", 7, null), Mt = prop(t, "slashMenuAriaLabel", 7, "slash commands"), Nt = prop(t, "slashMenuHint", 7, "↑↓ move · tab complete · ↵ select · esc dismiss"), Pt = prop(t, "slashMenuClasses", 7), It = prop(t, "slashItemClasses", 7), Lt = prop(t, "slashSelectedItemClasses", 7), Rt = prop(t, "slashItem", 7), zt = prop(t, "onsubmit", 7), Bt = prop(t, "oninput", 7), Ht = prop(t, "oninputfocus", 7), Gt = prop(t, "onkeydown", 7), qt = prop(t, "onpaste", 7), Zt = prop(t, "onstop", 7), Qt = prop(t, "onvoice", 7), $t = prop(t, "oncanceldictation", 7), en = prop(t, "onattach", 7), tn = prop(t, "onattachclick", 7), nn = prop(t, "onaction", 7), rn = prop(t, "testId", 7), an = prop(t, "inputTestId", 7), on = prop(t, "inputAriaLabel", 7), sn = prop(t, "sendTestId", 7), cn = prop(t, "sendSlotTestId", 7), ln = prop(t, "stopTestId", 7), un = prop(t, "voiceTestId", 7), dn = prop(t, "attachTestId", 7), fn = prop(t, "actionTestId", 7), pn = prop(t, "classes", 7), mn = /* @__PURE__ */ state(null), hn = /* @__PURE__ */ state(null), gn = (e) => {
|
|
54899
54941
|
get(hn)?.focus(e);
|
|
54900
|
-
}, _n = /* @__PURE__ */ user_derived(() => typeof Qt() == "function"), vn = /* @__PURE__ */ user_derived(() => typeof en() == "function" || typeof tn() == "function"), yn = /* @__PURE__ */ user_derived(() => re().length > 0 || Me().length > 0 || be().length > 0), bn = /* @__PURE__ */ user_derived(() => resolveControlDisabled(p(), f())), xn = /* @__PURE__ */ user_derived(() => normalizeDictationState(G())), Sn = /* @__PURE__ */ user_derived(() => resolveControlDisabled(h(), f()) || get(xn) === "busy"), Cn = /* @__PURE__ */ user_derived(() => resolveControlDisabled(S(), f())), wn = /* @__PURE__ */ user_derived(() => !get(Cn) && (pt() ?? (s().trim().length > 0 || te().length > 0 || get(yn)))), Tn = /* @__PURE__ */ state(!1), En = /* @__PURE__ */ state(0), Dn = /* @__PURE__ */ state(null)
|
|
54901
|
-
|
|
54902
|
-
let
|
|
54903
|
-
return
|
|
54904
|
-
}
|
|
54942
|
+
}, _n = /* @__PURE__ */ user_derived(() => typeof Qt() == "function"), vn = /* @__PURE__ */ user_derived(() => typeof en() == "function" || typeof tn() == "function"), yn = /* @__PURE__ */ user_derived(() => re().length > 0 || Me().length > 0 || be().length > 0), bn = /* @__PURE__ */ user_derived(() => resolveControlDisabled(p(), f())), xn = /* @__PURE__ */ user_derived(() => normalizeDictationState(G())), Sn = /* @__PURE__ */ user_derived(() => resolveControlDisabled(h(), f()) || get(xn) === "busy"), Cn = /* @__PURE__ */ user_derived(() => resolveControlDisabled(S(), f())), wn = /* @__PURE__ */ user_derived(() => !get(Cn) && (pt() ?? (s().trim().length > 0 || te().length > 0 || get(yn)))), Tn = /* @__PURE__ */ state(!1), En = /* @__PURE__ */ state(0), Dn = /* @__PURE__ */ state(null);
|
|
54943
|
+
function On(e) {
|
|
54944
|
+
let [t = ""] = e;
|
|
54945
|
+
return /^[^\p{L}\p{N}\s]$/u.test(t) ? t : null;
|
|
54946
|
+
}
|
|
54947
|
+
let kn = /* @__PURE__ */ user_derived(() => {
|
|
54948
|
+
let e = On(s());
|
|
54949
|
+
if (jt() === null || get(Tn) || e === null || /\s/.test(s())) return [];
|
|
54950
|
+
let t = s().toLowerCase();
|
|
54951
|
+
return jt().filter((n) => On(n.name) === e && (n.name.toLowerCase().startsWith(t) || t.length > e.length && (n.description ?? "").toLowerCase().includes(t.slice(e.length))));
|
|
54952
|
+
}), An = /* @__PURE__ */ user_derived(() => {
|
|
54905
54953
|
if (jt() === null || get(Tn)) return null;
|
|
54906
|
-
let e = /^(
|
|
54907
|
-
if (e === null) return null;
|
|
54954
|
+
let e = /^(\S+)\s(\S*)$/.exec(s());
|
|
54955
|
+
if (e === null || On(e[1] ?? "") === null) return null;
|
|
54908
54956
|
let t = (e[1] ?? "").toLowerCase(), n = jt().find((e) => e.name.toLowerCase() === t && (e.choices?.length ?? 0) > 0);
|
|
54909
54957
|
if (typeof n != "object") return null;
|
|
54910
54958
|
let i = (e[2] ?? "").toLowerCase();
|
|
@@ -54912,35 +54960,35 @@ function ChatComposer(e, t) {
|
|
|
54912
54960
|
command: n,
|
|
54913
54961
|
choices: (n.choices ?? []).filter((e) => e.value.toLowerCase().startsWith(i))
|
|
54914
54962
|
};
|
|
54915
|
-
}),
|
|
54963
|
+
}), jn = /* @__PURE__ */ user_derived(() => get(An) === null ? get(kn) : get(An).choices.map((e) => typeof e.description == "string" ? {
|
|
54916
54964
|
name: e.value,
|
|
54917
54965
|
description: e.description
|
|
54918
|
-
} : { name: e.value })),
|
|
54919
|
-
function
|
|
54920
|
-
if (get(
|
|
54921
|
-
let t = get(
|
|
54922
|
-
return typeof t == "object" ? `${get(
|
|
54966
|
+
} : { name: e.value })), Mn = /* @__PURE__ */ user_derived(() => get(jn).length > 0), Nn = /* @__PURE__ */ user_derived(() => Math.min(get(En), Math.max(0, get(jn).length - 1))), Pn = `chat-composer-slash-listbox-${n}`, Fn = /* @__PURE__ */ user_derived(() => get(Mn) ? `chat-composer-slash-option-${n}-${get(Nn)}` : null);
|
|
54967
|
+
function In(e) {
|
|
54968
|
+
if (get(An) !== null) {
|
|
54969
|
+
let t = get(An).choices.at(e);
|
|
54970
|
+
return typeof t == "object" ? `${get(An).command.name} ${t.value}` : null;
|
|
54923
54971
|
}
|
|
54924
|
-
return get(
|
|
54972
|
+
return get(jn).at(e)?.name ?? null;
|
|
54925
54973
|
}
|
|
54926
|
-
function
|
|
54927
|
-
if (get(
|
|
54928
|
-
let t = get(
|
|
54929
|
-
typeof t == "object" && (s(`${get(
|
|
54974
|
+
function Ln(e) {
|
|
54975
|
+
if (get(An) !== null) {
|
|
54976
|
+
let t = get(An).choices.at(e);
|
|
54977
|
+
typeof t == "object" && (s(`${get(An).command.name} ${t.value}`), set(En, 0));
|
|
54930
54978
|
return;
|
|
54931
54979
|
}
|
|
54932
|
-
let t = get(
|
|
54980
|
+
let t = get(kn).at(e);
|
|
54933
54981
|
typeof t == "object" && (s(`${t.name} `), set(Tn, (t.choices?.length ?? 0) === 0), set(En, 0));
|
|
54934
54982
|
}
|
|
54935
|
-
function
|
|
54983
|
+
function Rn() {
|
|
54936
54984
|
tick().then(() => {
|
|
54937
|
-
(get(Dn)?.children.item(get(
|
|
54985
|
+
(get(Dn)?.children.item(get(Nn)))?.scrollIntoView({ block: "nearest" });
|
|
54938
54986
|
});
|
|
54939
54987
|
}
|
|
54940
|
-
function Rn(e) {
|
|
54941
|
-
return e.key === "ArrowDown" || e.key === "ArrowUp" ? (e.preventDefault(), set(En, e.key === "ArrowDown" ? Math.min(get(Mn) + 1, get(An).length - 1) : Math.max(get(Mn) - 1, 0), !0), Ln(), !0) : e.key === "Tab" && !e.shiftKey ? (e.preventDefault(), In(get(Mn)), !0) : e.key === "Enter" && !e.shiftKey && !e.isComposing ? (e.preventDefault(), s().trim() === Fn(get(Mn)) ? Bn() : In(get(Mn)), !0) : !1;
|
|
54942
|
-
}
|
|
54943
54988
|
function zn(e) {
|
|
54989
|
+
return e.key === "ArrowDown" || e.key === "ArrowUp" ? (e.preventDefault(), set(En, e.key === "ArrowDown" ? Math.min(get(Nn) + 1, get(jn).length - 1) : Math.max(get(Nn) - 1, 0), !0), Rn(), !0) : e.key === "Tab" && !e.shiftKey ? (e.preventDefault(), Ln(get(Nn)), !0) : e.key === "Enter" && !e.shiftKey && !e.isComposing ? (e.preventDefault(), s().trim() === In(get(Nn)) ? Vn() : Ln(get(Nn)), !0) : !1;
|
|
54990
|
+
}
|
|
54991
|
+
function Bn(e) {
|
|
54944
54992
|
return { destroy: registerDismissible({
|
|
54945
54993
|
element: () => e,
|
|
54946
54994
|
onEscape: () => {
|
|
@@ -54948,7 +54996,7 @@ function ChatComposer(e, t) {
|
|
|
54948
54996
|
}
|
|
54949
54997
|
}) };
|
|
54950
54998
|
}
|
|
54951
|
-
function
|
|
54999
|
+
function Vn() {
|
|
54952
55000
|
if (!get(wn)) return;
|
|
54953
55001
|
set(Tn, !1);
|
|
54954
55002
|
let e = {
|
|
@@ -54969,26 +55017,26 @@ function ChatComposer(e, t) {
|
|
|
54969
55017
|
attachments: te()
|
|
54970
55018
|
}) && (s(""), te([]));
|
|
54971
55019
|
}
|
|
54972
|
-
function Vn(e) {
|
|
54973
|
-
!(get(jn) && Rn(e)) && C() && e.key === "Enter" && !e.shiftKey && !e.isComposing && !R() && (e.preventDefault(), Bn()), e.key === "Escape" && get(xn) === "recording" && (e.preventDefault(), $t()?.()), Gt()?.(e);
|
|
54974
|
-
}
|
|
54975
55020
|
function Hn(e) {
|
|
54976
|
-
|
|
55021
|
+
!(get(Mn) && zn(e)) && C() && e.key === "Enter" && !e.shiftKey && !e.isComposing && !R() && (e.preventDefault(), Vn()), e.key === "Escape" && get(xn) === "recording" && (e.preventDefault(), $t()?.()), Gt()?.(e);
|
|
54977
55022
|
}
|
|
54978
55023
|
function Un(e) {
|
|
55024
|
+
set(Tn, !1), set(En, 0), Bt()?.(e.currentTarget.value, e);
|
|
55025
|
+
}
|
|
55026
|
+
function Wn(e) {
|
|
54979
55027
|
let t = Array.from(e.currentTarget.files ?? []);
|
|
54980
55028
|
t.length > 0 && (te([...te(), ...t]), en()?.(t)), e.currentTarget.value = "";
|
|
54981
55029
|
}
|
|
54982
|
-
function
|
|
55030
|
+
function Gn(e) {
|
|
54983
55031
|
te(te().filter((t, n) => n !== e));
|
|
54984
55032
|
}
|
|
54985
|
-
let
|
|
55033
|
+
let Kn = (e) => {
|
|
54986
55034
|
function t() {
|
|
54987
55035
|
e.style.height = "0px", e.style.height = `${e.scrollHeight}px`;
|
|
54988
55036
|
}
|
|
54989
55037
|
return t(), { update: t };
|
|
54990
55038
|
};
|
|
54991
|
-
var
|
|
55039
|
+
var qn = {
|
|
54992
55040
|
focus: gn,
|
|
54993
55041
|
get value() {
|
|
54994
55042
|
return s();
|
|
@@ -55428,26 +55476,26 @@ function ChatComposer(e, t) {
|
|
|
55428
55476
|
set classes(e) {
|
|
55429
55477
|
pn(e), flushSync();
|
|
55430
55478
|
}
|
|
55431
|
-
},
|
|
55432
|
-
let
|
|
55433
|
-
var
|
|
55479
|
+
}, Jn = root_19$2();
|
|
55480
|
+
let Yn;
|
|
55481
|
+
var Xn = child(Jn), Zn = (e) => {
|
|
55434
55482
|
var t = root_14$2(), i = child(t);
|
|
55435
|
-
each(i, 23, () => get(
|
|
55483
|
+
each(i, 23, () => get(jn), (e) => e.name, (e, t, i) => {
|
|
55436
55484
|
var a = root_13$2();
|
|
55437
55485
|
let o;
|
|
55438
55486
|
var s = child(a);
|
|
55439
55487
|
{
|
|
55440
|
-
let e = /* @__PURE__ */ user_derived(() => [It(), get(i) === get(
|
|
55488
|
+
let e = /* @__PURE__ */ user_derived(() => [It(), get(i) === get(Nn) ? Lt() : ""].filter((e) => typeof e == "string" && e.length > 0).join(" "));
|
|
55441
55489
|
Button(s, {
|
|
55442
55490
|
type: "button",
|
|
55443
55491
|
get classes() {
|
|
55444
55492
|
return get(e);
|
|
55445
55493
|
},
|
|
55446
|
-
onclick: () =>
|
|
55494
|
+
onclick: () => Ln(get(i)),
|
|
55447
55495
|
children: (e, n) => {
|
|
55448
55496
|
var a = comment(), o = first_child(a), s = (e) => {
|
|
55449
55497
|
var n = comment();
|
|
55450
|
-
snippet(first_child(n), Rt, () => get(t), () => get(i) === get(
|
|
55498
|
+
snippet(first_child(n), Rt, () => get(t), () => get(i) === get(Nn)), append(e, n);
|
|
55451
55499
|
}, c = (e) => {
|
|
55452
55500
|
var n = root_12$2(), i = first_child(n), a = child(i, !0);
|
|
55453
55501
|
reset(i);
|
|
@@ -55481,30 +55529,30 @@ function ChatComposer(e, t) {
|
|
|
55481
55529
|
});
|
|
55482
55530
|
}
|
|
55483
55531
|
reset(a), template_effect(() => {
|
|
55484
|
-
set_attribute(a, "id", `chat-composer-slash-option-${n}-${get(i)}`), set_attribute(a, "aria-selected", get(i) === get(
|
|
55532
|
+
set_attribute(a, "id", `chat-composer-slash-option-${n}-${get(i)}`), set_attribute(a, "aria-selected", get(i) === get(Nn)), o = set_class(a, 1, "svelte-xpd394", null, o, { "slash-item-selected-default": get(i) === get(Nn) && typeof Lt() != "string" });
|
|
55485
55533
|
}), event("mouseenter", a, () => set(En, get(i), !0)), append(e, a);
|
|
55486
55534
|
}), reset(i), bind_this(i, (e) => set(Dn, e), () => get(Dn));
|
|
55487
55535
|
var a = sibling(i, 2), o = child(a, !0);
|
|
55488
|
-
reset(a), reset(t), action(t, (e) =>
|
|
55489
|
-
set_class(t, 1, `slash-menu ${Pt() ?? "" ?? ""}`, "svelte-xpd394"), set_attribute(t, "id",
|
|
55536
|
+
reset(a), reset(t), action(t, (e) => Bn?.(e)), template_effect(() => {
|
|
55537
|
+
set_class(t, 1, `slash-menu ${Pt() ?? "" ?? ""}`, "svelte-xpd394"), set_attribute(t, "id", Pn), set_attribute(t, "aria-label", Mt()), set_text(o, Nt());
|
|
55490
55538
|
}), append(e, t);
|
|
55491
55539
|
};
|
|
55492
|
-
if_block(
|
|
55493
|
-
get(
|
|
55540
|
+
if_block(Xn, (e) => {
|
|
55541
|
+
get(Mn) && e(Zn);
|
|
55494
55542
|
});
|
|
55495
|
-
var
|
|
55543
|
+
var Qn = sibling(Xn, 2), $n = (e) => {
|
|
55496
55544
|
var t = root_15$2(), n = child(t, !0);
|
|
55497
55545
|
reset(t), template_effect(() => {
|
|
55498
55546
|
set_attribute(t, "data-pw", At() ?? null), set_text(n, kt());
|
|
55499
55547
|
}), append(e, t);
|
|
55500
55548
|
};
|
|
55501
|
-
if_block(
|
|
55502
|
-
typeof kt() == "string" && e(
|
|
55549
|
+
if_block(Qn, (e) => {
|
|
55550
|
+
typeof kt() == "string" && e($n);
|
|
55503
55551
|
});
|
|
55504
|
-
var
|
|
55552
|
+
var er = sibling(Qn, 2), tr = (e) => {
|
|
55505
55553
|
var t = comment();
|
|
55506
55554
|
snippet(first_child(t), ne), append(e, t);
|
|
55507
|
-
},
|
|
55555
|
+
}, nr = (e) => {
|
|
55508
55556
|
var t = root_16$2(), n = child(t);
|
|
55509
55557
|
{
|
|
55510
55558
|
let e = /* @__PURE__ */ user_derived(() => rn() && `${rn()}-rich-attachments`);
|
|
@@ -55554,7 +55602,7 @@ function ChatComposer(e, t) {
|
|
|
55554
55602
|
});
|
|
55555
55603
|
}
|
|
55556
55604
|
reset(t), append(e, t);
|
|
55557
|
-
},
|
|
55605
|
+
}, rr = (e) => {
|
|
55558
55606
|
var t = root_17$2();
|
|
55559
55607
|
each(t, 23, te, (e, t) => e.name + t, (e, t, n) => {
|
|
55560
55608
|
Pill(e, {
|
|
@@ -55562,34 +55610,34 @@ function ChatComposer(e, t) {
|
|
|
55562
55610
|
return get(t).name;
|
|
55563
55611
|
},
|
|
55564
55612
|
dismissible: !0,
|
|
55565
|
-
ondismiss: () =>
|
|
55613
|
+
ondismiss: () => Gn(get(n))
|
|
55566
55614
|
});
|
|
55567
55615
|
}), reset(t), append(e, t);
|
|
55568
55616
|
};
|
|
55569
|
-
if_block(
|
|
55570
|
-
typeof ne() == "function" ? e(
|
|
55617
|
+
if_block(er, (e) => {
|
|
55618
|
+
typeof ne() == "function" ? e(tr) : get(yn) ? e(nr, 1) : te().length > 0 && e(rr, 2);
|
|
55571
55619
|
});
|
|
55572
|
-
var
|
|
55573
|
-
let
|
|
55574
|
-
var
|
|
55620
|
+
var ir = sibling(er, 2);
|
|
55621
|
+
let ar;
|
|
55622
|
+
var or = child(ir), sr = (e) => {
|
|
55575
55623
|
var t = root_18$2(), n = first_child(t);
|
|
55576
55624
|
a(child(n)), reset(n);
|
|
55577
55625
|
var s = sibling(n, 2), c = child(s);
|
|
55578
55626
|
i(c), o(sibling(c, 4)), reset(s), append(e, t);
|
|
55579
|
-
},
|
|
55627
|
+
}, cr = (e) => {
|
|
55580
55628
|
var t = root_8$4(), n = first_child(t);
|
|
55581
55629
|
i(n);
|
|
55582
55630
|
var s = sibling(n, 2);
|
|
55583
55631
|
a(s), o(sibling(s, 2)), append(e, t);
|
|
55584
55632
|
};
|
|
55585
|
-
return if_block(
|
|
55586
|
-
c() === "stacked" ? e(
|
|
55587
|
-
}), reset(
|
|
55588
|
-
|
|
55633
|
+
return if_block(or, (e) => {
|
|
55634
|
+
c() === "stacked" ? e(sr) : e(cr, -1);
|
|
55635
|
+
}), reset(ir), reset(Jn), template_effect(() => {
|
|
55636
|
+
Yn = set_class(Jn, 1, `chat-composer ${pn() ?? "" ?? ""}`, "svelte-xpd394", Yn, {
|
|
55589
55637
|
disabled: f(),
|
|
55590
55638
|
pill: l() === "pill"
|
|
55591
|
-
}), set_attribute(
|
|
55592
|
-
}), append(e,
|
|
55639
|
+
}), set_attribute(Jn, "data-has-slash", jt() === null ? null : ""), set_attribute(Jn, "data-pw", typeof rn() == "string" ? rn() : null), set_attribute(Jn, "testid", typeof rn() == "string" ? rn() : null), ar = set_class(ir, 1, "input-row svelte-xpd394", null, ar, { stacked: c() === "stacked" });
|
|
55640
|
+
}), append(e, Jn), pop(qn);
|
|
55593
55641
|
}
|
|
55594
55642
|
delegate([
|
|
55595
55643
|
"change",
|
|
@@ -58858,7 +58906,7 @@ var diffstatBadges = (e, t = noop) => {
|
|
|
58858
58906
|
}), append(e, n);
|
|
58859
58907
|
}, root_1$5 = /* @__PURE__ */ from_html("<span class=\"diffstat-pill diffstat-added svelte-1vnfzde\"><!></span>"), root_2$3 = /* @__PURE__ */ from_html("<span class=\"diffstat-pill diffstat-removed svelte-1vnfzde\"><!></span>"), root_3$3 = /* @__PURE__ */ from_html("<!> <!>", 1), root_4$3 = /* @__PURE__ */ from_html("<span class=\"chip-spinner svelte-1vnfzde\" aria-hidden=\"true\"><!></span>"), root_5$2 = /* @__PURE__ */ from_html("<span> </span>"), root_6$2 = /* @__PURE__ */ from_html("<span class=\"diffstat chip-diffstat svelte-1vnfzde\"><!></span>"), root_7$2 = /* @__PURE__ */ from_html("<span class=\"diffstat popover-diffstat svelte-1vnfzde\"><!></span>"), root_8$2 = /* @__PURE__ */ from_html("<div class=\"chip-popover svelte-1vnfzde\" role=\"dialog\" tabindex=\"-1\"><p> </p> <!></div>"), root_9$1 = /* @__PURE__ */ from_html("<div class=\"chip-wrap\"><button type=\"button\"><!> <b class=\"chip-label svelte-1vnfzde\"> </b> <!> <!></button> <!></div>"), root_10$1 = /* @__PURE__ */ from_html("<div></div>"), $$css$16 = {
|
|
58860
58908
|
hash: "svelte-1vnfzde",
|
|
58861
|
-
code: "\n @keyframes svelte-1vnfzde-tool-call-log-fade-up {\n from {\n opacity: 0;\n transform: translateY(9px);\n }\n to {\n opacity: 1;\n transform: none;\n }\n }.tool-call-log.svelte-1vnfzde {display:flex;flex-wrap:wrap;align-items:flex-start;gap:var(--tool-call-log-gap, 8px);}\n\n /* Bespoke <button> markup (
|
|
58909
|
+
code: "\n @keyframes svelte-1vnfzde-tool-call-log-fade-up {\n from {\n opacity: 0;\n transform: translateY(9px);\n }\n to {\n opacity: 1;\n transform: none;\n }\n }.tool-call-log.svelte-1vnfzde {display:flex;flex-wrap:wrap;align-items:flex-start;gap:var(--tool-call-log-gap, 8px);}\n\n /* Bespoke <button> markup (the chip holds mixed content -- spinner, label, meta and nested\n diffstat Pill badges -- where Pill renders one `text` string; see docs), but its sizing\n recipe is deliberately pulled from Pill's own tokens (line-height, cursor) so it reads as\n the same family of control as the diffstat Pill badges nested inside it. */.chip.svelte-1vnfzde {display:inline-flex;align-items:center;gap:var(--tool-call-log-chip-gap, 6px);padding:var(--tool-call-log-chip-padding, 6px 10px);background:var(--tool-call-log-chip-background, #fafafa);border:var(--tool-call-log-chip-border, 1px solid #e4e4e7);border-radius:var(--tool-call-log-chip-radius, 6px);font:inherit;font-size:var(--tool-call-log-font-size, 0.8125rem);line-height:var(--tool-call-log-chip-line-height, 1);color:var(--tool-call-log-label-color, #2b2b2b);cursor:var(--tool-call-log-chip-cursor, pointer);max-width:100%;\n animation: svelte-1vnfzde-tool-call-log-fade-up\n var(--tool-call-log-chip-animation-duration, var(--motion-duration, 320ms))\n var(\n --tool-call-log-ease,\n var(--ease-smooth-out, var(--motion-easing, cubic-bezier(0.23, 1, 0.32, 1)))\n )\n both;transition:background var(--tool-call-log-chip-transition-duration, var(--motion-duration, 150ms))\n var(--tool-call-log-chip-transition-easing, var(--motion-easing, ease)),\n border-color var(--tool-call-log-chip-transition-duration, var(--motion-duration, 150ms))\n var(--tool-call-log-chip-transition-easing, var(--motion-easing, ease));}.chip.svelte-1vnfzde:hover {background:var(--tool-call-log-chip-hover-background, #f1f1f1);}.chip[aria-expanded='true'].svelte-1vnfzde {border-color:var(--tool-call-log-chip-open-border-color, #c7c7cc);}.chip.error.svelte-1vnfzde {color:var(--tool-call-log-error-color, #9f2d27);border-color:var(--tool-call-log-error-border-color, #f2b8b5);background:var(--tool-call-log-error-background, #fdf1f0);}.chip.error.svelte-1vnfzde:hover {background:var(--tool-call-log-error-hover-background, #fbe6e5);}.chip-label.svelte-1vnfzde {font-weight:var(--tool-call-log-label-weight, 500);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}.chip-meta.svelte-1vnfzde {color:var(--tool-call-log-meta-color, #666666);font-size:var(--tool-call-log-meta-font-size, 0.75rem);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}.chip-meta.mono.svelte-1vnfzde {font-family:var(--tool-call-log-mono-font, ui-monospace, Menlo, monospace);}\n\n /* Sizes and colors the nested library Loader via CSS custom-property\n inheritance (no :global() needed — Loader is a plain DOM descendant of\n this span, same pattern as ThinkingIndicator's `.avatar`). Loader itself\n ships no literal fallback for --loader-foreground/-foreground-end/\n -background, so all three are set explicitly here rather than left to\n chance. */.chip-spinner.svelte-1vnfzde {display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;--loader-width: var(--tool-call-log-spinner-size, 11px);--loader-height: var(--tool-call-log-spinner-size, 11px);--loader-before-width: 5px;--loader-before-height: 5px;--loader-after-width: 8px;--loader-after-height: 8px;--loader-foreground: var(--tool-call-log-spinner-color, #6b6b6b);--loader-foreground-end: var(--tool-call-log-spinner-track-color, #dcdcdc);--loader-background: var(--tool-call-log-chip-background, #fafafa);}.diffstat.svelte-1vnfzde {display:inline-flex;align-items:center;gap:4px;font-variant-numeric:tabular-nums;flex-shrink:0;}.chip-diffstat.svelte-1vnfzde {margin-left:var(--tool-call-log-diffstat-margin, 2px);}\n\n /* Pill customized into the small diffstat badge via its own --pill-* tokens\n (inherited the same way — Pill is a plain descendant of this span). Pill\n defaults `cursor` to `pointer` even when non-interactive, so it is pinned\n back to `default` here: these badges carry no onclick. */.diffstat-pill.svelte-1vnfzde {display:inline-flex;--pill-padding: var(--tool-call-log-diffstat-padding, 0 4px);--pill-border-radius: var(--tool-call-log-diffstat-radius, 4px);--pill-font-size: var(--tool-call-log-diffstat-font-size, 0.6875rem);--pill-font-family: var(--tool-call-log-mono-font, ui-monospace, Menlo, monospace);--pill-line-height: 1;--pill-cursor: default;}.diffstat-added.svelte-1vnfzde {--pill-background: var(--tool-call-log-added-background, #e4f5ee);--pill-color: var(--tool-call-log-added-color, #1f7a5f);}.diffstat-removed.svelte-1vnfzde {--pill-background: var(--tool-call-log-removed-background, #fbeceb);--pill-color: var(--tool-call-log-removed-color, #a8302a);}\n\n /* `position: fixed` is the baseline rather than a portal-only override —\n left/top/z-index come from the inline `popoverStyle`, computed against the\n live anchor rect, and that is viewport-relative in both portal modes. So\n `usePortal={false}` (see `popoverPortal`) changes only which ancestors can\n clip the popover, never how it is placed. */.chip-popover.svelte-1vnfzde {position:fixed;z-index:var(--tool-call-log-popover-z-index, 1000);display:flex;flex-direction:column;gap:var(--tool-call-log-popover-gap, 6px);min-width:var(--tool-call-log-popover-min-width, 220px);max-width:var(--tool-call-log-popover-max-width, 340px);padding:var(--tool-call-log-popover-padding, 10px 12px);background:var(--tool-call-log-popover-background, #ffffff);border:var(--tool-call-log-popover-border, 1px solid #e4e4e7);border-radius:var(--tool-call-log-popover-radius, 10px);box-shadow:var(--tool-call-log-popover-shadow, 0 10px 30px rgba(0, 0, 0, 0.12));\n animation: svelte-1vnfzde-tool-call-log-fade-up\n var(--tool-call-log-popover-animation-duration, var(--motion-duration, 200ms))\n var(\n --tool-call-log-ease,\n var(--ease-smooth-out, var(--motion-easing, cubic-bezier(0.23, 1, 0.32, 1)))\n )\n both;}.popover-detail.svelte-1vnfzde {margin:0;color:var(--tool-call-log-popover-color, #2b2b2b);font-size:var(--tool-call-log-popover-font-size, 0.8125rem);white-space:pre-wrap;overflow-wrap:anywhere;}.popover-detail.mono.svelte-1vnfzde {font-family:var(--tool-call-log-mono-font, ui-monospace, Menlo, monospace);}\n\n @media (prefers-reduced-motion: reduce) {.chip.svelte-1vnfzde,\n .chip-popover.svelte-1vnfzde {animation-duration:0.001s;}\n /* Loader's own spin keyframe lives on its internally-scoped `.loader`\n class, which this file cannot reach with a plain scoped selector —\n :global() is required to disable it, same pattern as `.pill-dismiss\n :global(svg)` elsewhere in the library. Loader ships no\n reduced-motion guard of its own. */.chip-spinner.svelte-1vnfzde .loader {\n animation: none;}\n }"
|
|
58862
58910
|
};
|
|
58863
58911
|
function ToolCallLog(e, t) {
|
|
58864
58912
|
push(t, !0), append_styles$1(e, $$css$16);
|