@bymos/agentkit-sdk 0.8.0 → 0.9.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/index.js CHANGED
@@ -470,9 +470,9 @@ var M = class {
470
470
  return this._refinement((n, r) => e(n) ? !0 : (r.addIssue(typeof t == "function" ? t(n, r) : t), !1));
471
471
  }
472
472
  _refinement(e) {
473
- return new I({
473
+ return new L({
474
474
  schema: this,
475
- typeName: R.ZodEffects,
475
+ typeName: z.ZodEffects,
476
476
  effect: {
477
477
  type: "refinement",
478
478
  refinement: e
@@ -490,31 +490,31 @@ var M = class {
490
490
  };
491
491
  }
492
492
  optional() {
493
- return L.create(this, this._def);
493
+ return R.create(this, this._def);
494
494
  }
495
495
  nullable() {
496
- return et.create(this, this._def);
496
+ return $e.create(this, this._def);
497
497
  }
498
498
  nullish() {
499
499
  return this.nullable().optional();
500
500
  }
501
501
  array() {
502
- return Le.create(this);
502
+ return Ie.create(this);
503
503
  }
504
504
  promise() {
505
- return $e.create(this, this._def);
505
+ return Qe.create(this, this._def);
506
506
  }
507
507
  or(e) {
508
- return ze.create([this, e], this._def);
508
+ return Re.create([this, e], this._def);
509
509
  }
510
510
  and(e) {
511
- return He.create(this, e, this._def);
511
+ return Ve.create(this, e, this._def);
512
512
  }
513
513
  transform(e) {
514
- return new I({
514
+ return new L({
515
515
  ...j(this._def),
516
516
  schema: this,
517
- typeName: R.ZodEffects,
517
+ typeName: z.ZodEffects,
518
518
  effect: {
519
519
  type: "transform",
520
520
  transform: e
@@ -523,27 +523,27 @@ var M = class {
523
523
  }
524
524
  default(e) {
525
525
  let t = typeof e == "function" ? e : () => e;
526
- return new tt({
526
+ return new et({
527
527
  ...j(this._def),
528
528
  innerType: this,
529
529
  defaultValue: t,
530
- typeName: R.ZodDefault
530
+ typeName: z.ZodDefault
531
531
  });
532
532
  }
533
533
  brand() {
534
- return new it({
535
- typeName: R.ZodBranded,
534
+ return new rt({
535
+ typeName: z.ZodBranded,
536
536
  type: this,
537
537
  ...j(this._def)
538
538
  });
539
539
  }
540
540
  catch(e) {
541
541
  let t = typeof e == "function" ? e : () => e;
542
- return new nt({
542
+ return new tt({
543
543
  ...j(this._def),
544
544
  innerType: this,
545
545
  catchValue: t,
546
- typeName: R.ZodCatch
546
+ typeName: z.ZodCatch
547
547
  });
548
548
  }
549
549
  describe(e) {
@@ -554,10 +554,10 @@ var M = class {
554
554
  });
555
555
  }
556
556
  pipe(e) {
557
- return at.create(this, e);
557
+ return it.create(this, e);
558
558
  }
559
559
  readonly() {
560
- return ot.create(this);
560
+ return at.create(this);
561
561
  }
562
562
  isOptional() {
563
563
  return this.safeParse(void 0).success;
@@ -565,25 +565,25 @@ var M = class {
565
565
  isNullable() {
566
566
  return this.safeParse(null).success;
567
567
  }
568
- }, te = /^c[^\s-]{8,}$/i, ne = /^[0-9a-z]+$/, re = /^[0-9A-HJKMNP-TV-Z]{26}$/i, ie = /^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i, ae = /^[a-z0-9_-]{21}$/i, oe = /^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/, se = /^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/, ce = /^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i, le = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$", ue, de = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/, fe = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/, pe = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/, me = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/, he = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/, ge = /^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/, _e = "((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))", ve = RegExp(`^${_e}$`);
569
- function ye(e) {
568
+ }, te = /^c[^\s-]{8,}$/i, ne = /^[0-9a-z]+$/, N = /^[0-9A-HJKMNP-TV-Z]{26}$/i, re = /^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i, ie = /^[a-z0-9_-]{21}$/i, ae = /^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/, oe = /^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/, se = /^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i, ce = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$", le, ue = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/, de = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/, fe = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/, pe = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/, me = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/, he = /^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/, ge = "((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))", _e = RegExp(`^${ge}$`);
569
+ function ve(e) {
570
570
  let t = "[0-5]\\d";
571
571
  e.precision ? t = `${t}\\.\\d{${e.precision}}` : e.precision ?? (t = `${t}(\\.\\d+)?`);
572
572
  let n = e.precision ? "+" : "?";
573
573
  return `([01]\\d|2[0-3]):[0-5]\\d(:${t})${n}`;
574
574
  }
575
- function be(e) {
576
- return RegExp(`^${ye(e)}$`);
575
+ function ye(e) {
576
+ return RegExp(`^${ve(e)}$`);
577
577
  }
578
- function xe(e) {
579
- let t = `${_e}T${ye(e)}`, n = [];
578
+ function be(e) {
579
+ let t = `${ge}T${ve(e)}`, n = [];
580
580
  return n.push(e.local ? "Z?" : "Z"), e.offset && n.push("([+-]\\d{2}:?\\d{2})"), t = `${t}(${n.join("|")})`, RegExp(`^${t}$`);
581
581
  }
582
- function Se(e, t) {
583
- return !!((t === "v4" || !t) && de.test(e) || (t === "v6" || !t) && pe.test(e));
582
+ function xe(e, t) {
583
+ return !!((t === "v4" || !t) && ue.test(e) || (t === "v6" || !t) && fe.test(e));
584
584
  }
585
- function Ce(e, t) {
586
- if (!oe.test(e)) return !1;
585
+ function Se(e, t) {
586
+ if (!ae.test(e)) return !1;
587
587
  try {
588
588
  let [n] = e.split(".");
589
589
  if (!n) return !1;
@@ -593,10 +593,10 @@ function Ce(e, t) {
593
593
  return !1;
594
594
  }
595
595
  }
596
- function we(e, t) {
597
- return !!((t === "v4" || !t) && fe.test(e) || (t === "v6" || !t) && me.test(e));
596
+ function Ce(e, t) {
597
+ return !!((t === "v4" || !t) && de.test(e) || (t === "v6" || !t) && pe.test(e));
598
598
  }
599
- var Te = class e extends M {
599
+ var we = class e extends M {
600
600
  _parse(e) {
601
601
  if (this._def.coerce && (e.data = String(e.data)), this._getType(e) !== f.string) {
602
602
  let t = this._getOrReturnCtx(e);
@@ -640,22 +640,22 @@ var Te = class e extends M {
640
640
  exact: !0,
641
641
  message: r.message
642
642
  }), t.dirty());
643
- } else if (r.kind === "email") ce.test(e.data) || (n = this._getOrReturnCtx(e, n), b(n, {
643
+ } else if (r.kind === "email") se.test(e.data) || (n = this._getOrReturnCtx(e, n), b(n, {
644
644
  validation: "email",
645
645
  code: m.invalid_string,
646
646
  message: r.message
647
647
  }), t.dirty());
648
- else if (r.kind === "emoji") ue ||= new RegExp(le, "u"), ue.test(e.data) || (n = this._getOrReturnCtx(e, n), b(n, {
648
+ else if (r.kind === "emoji") le ||= new RegExp(ce, "u"), le.test(e.data) || (n = this._getOrReturnCtx(e, n), b(n, {
649
649
  validation: "emoji",
650
650
  code: m.invalid_string,
651
651
  message: r.message
652
652
  }), t.dirty());
653
- else if (r.kind === "uuid") ie.test(e.data) || (n = this._getOrReturnCtx(e, n), b(n, {
653
+ else if (r.kind === "uuid") re.test(e.data) || (n = this._getOrReturnCtx(e, n), b(n, {
654
654
  validation: "uuid",
655
655
  code: m.invalid_string,
656
656
  message: r.message
657
657
  }), t.dirty());
658
- else if (r.kind === "nanoid") ae.test(e.data) || (n = this._getOrReturnCtx(e, n), b(n, {
658
+ else if (r.kind === "nanoid") ie.test(e.data) || (n = this._getOrReturnCtx(e, n), b(n, {
659
659
  validation: "nanoid",
660
660
  code: m.invalid_string,
661
661
  message: r.message
@@ -670,7 +670,7 @@ var Te = class e extends M {
670
670
  code: m.invalid_string,
671
671
  message: r.message
672
672
  }), t.dirty());
673
- else if (r.kind === "ulid") re.test(e.data) || (n = this._getOrReturnCtx(e, n), b(n, {
673
+ else if (r.kind === "ulid") N.test(e.data) || (n = this._getOrReturnCtx(e, n), b(n, {
674
674
  validation: "ulid",
675
675
  code: m.invalid_string,
676
676
  message: r.message
@@ -703,39 +703,39 @@ var Te = class e extends M {
703
703
  code: m.invalid_string,
704
704
  validation: { endsWith: r.value },
705
705
  message: r.message
706
- }), t.dirty()) : r.kind === "datetime" ? xe(r).test(e.data) || (n = this._getOrReturnCtx(e, n), b(n, {
706
+ }), t.dirty()) : r.kind === "datetime" ? be(r).test(e.data) || (n = this._getOrReturnCtx(e, n), b(n, {
707
707
  code: m.invalid_string,
708
708
  validation: "datetime",
709
709
  message: r.message
710
- }), t.dirty()) : r.kind === "date" ? ve.test(e.data) || (n = this._getOrReturnCtx(e, n), b(n, {
710
+ }), t.dirty()) : r.kind === "date" ? _e.test(e.data) || (n = this._getOrReturnCtx(e, n), b(n, {
711
711
  code: m.invalid_string,
712
712
  validation: "date",
713
713
  message: r.message
714
- }), t.dirty()) : r.kind === "time" ? be(r).test(e.data) || (n = this._getOrReturnCtx(e, n), b(n, {
714
+ }), t.dirty()) : r.kind === "time" ? ye(r).test(e.data) || (n = this._getOrReturnCtx(e, n), b(n, {
715
715
  code: m.invalid_string,
716
716
  validation: "time",
717
717
  message: r.message
718
- }), t.dirty()) : r.kind === "duration" ? se.test(e.data) || (n = this._getOrReturnCtx(e, n), b(n, {
718
+ }), t.dirty()) : r.kind === "duration" ? oe.test(e.data) || (n = this._getOrReturnCtx(e, n), b(n, {
719
719
  validation: "duration",
720
720
  code: m.invalid_string,
721
721
  message: r.message
722
- }), t.dirty()) : r.kind === "ip" ? Se(e.data, r.version) || (n = this._getOrReturnCtx(e, n), b(n, {
722
+ }), t.dirty()) : r.kind === "ip" ? xe(e.data, r.version) || (n = this._getOrReturnCtx(e, n), b(n, {
723
723
  validation: "ip",
724
724
  code: m.invalid_string,
725
725
  message: r.message
726
- }), t.dirty()) : r.kind === "jwt" ? Ce(e.data, r.alg) || (n = this._getOrReturnCtx(e, n), b(n, {
726
+ }), t.dirty()) : r.kind === "jwt" ? Se(e.data, r.alg) || (n = this._getOrReturnCtx(e, n), b(n, {
727
727
  validation: "jwt",
728
728
  code: m.invalid_string,
729
729
  message: r.message
730
- }), t.dirty()) : r.kind === "cidr" ? we(e.data, r.version) || (n = this._getOrReturnCtx(e, n), b(n, {
730
+ }), t.dirty()) : r.kind === "cidr" ? Ce(e.data, r.version) || (n = this._getOrReturnCtx(e, n), b(n, {
731
731
  validation: "cidr",
732
732
  code: m.invalid_string,
733
733
  message: r.message
734
- }), t.dirty()) : r.kind === "base64" ? he.test(e.data) || (n = this._getOrReturnCtx(e, n), b(n, {
734
+ }), t.dirty()) : r.kind === "base64" ? me.test(e.data) || (n = this._getOrReturnCtx(e, n), b(n, {
735
735
  validation: "base64",
736
736
  code: m.invalid_string,
737
737
  message: r.message
738
- }), t.dirty()) : r.kind === "base64url" ? ge.test(e.data) || (n = this._getOrReturnCtx(e, n), b(n, {
738
+ }), t.dirty()) : r.kind === "base64url" ? he.test(e.data) || (n = this._getOrReturnCtx(e, n), b(n, {
739
739
  validation: "base64url",
740
740
  code: m.invalid_string,
741
741
  message: r.message
@@ -1004,17 +1004,17 @@ var Te = class e extends M {
1004
1004
  return e;
1005
1005
  }
1006
1006
  };
1007
- Te.create = (e) => new Te({
1007
+ we.create = (e) => new we({
1008
1008
  checks: [],
1009
- typeName: R.ZodString,
1009
+ typeName: z.ZodString,
1010
1010
  coerce: e?.coerce ?? !1,
1011
1011
  ...j(e)
1012
1012
  });
1013
- function Ee(e, t) {
1013
+ function Te(e, t) {
1014
1014
  let n = (e.toString().split(".")[1] || "").length, r = (t.toString().split(".")[1] || "").length, i = n > r ? n : r;
1015
1015
  return Number.parseInt(e.toFixed(i).replace(".", "")) % Number.parseInt(t.toFixed(i).replace(".", "")) / 10 ** i;
1016
1016
  }
1017
- var De = class e extends M {
1017
+ var Ee = class e extends M {
1018
1018
  constructor() {
1019
1019
  super(...arguments), this.min = this.gte, this.max = this.lte, this.step = this.multipleOf;
1020
1020
  }
@@ -1047,7 +1047,7 @@ var De = class e extends M {
1047
1047
  inclusive: r.inclusive,
1048
1048
  exact: !1,
1049
1049
  message: r.message
1050
- }), n.dirty()) : r.kind === "multipleOf" ? Ee(e.data, r.value) !== 0 && (t = this._getOrReturnCtx(e, t), b(t, {
1050
+ }), n.dirty()) : r.kind === "multipleOf" ? Te(e.data, r.value) !== 0 && (t = this._getOrReturnCtx(e, t), b(t, {
1051
1051
  code: m.not_multiple_of,
1052
1052
  multipleOf: r.value,
1053
1053
  message: r.message
@@ -1173,13 +1173,13 @@ var De = class e extends M {
1173
1173
  return Number.isFinite(t) && Number.isFinite(e);
1174
1174
  }
1175
1175
  };
1176
- De.create = (e) => new De({
1176
+ Ee.create = (e) => new Ee({
1177
1177
  checks: [],
1178
- typeName: R.ZodNumber,
1178
+ typeName: z.ZodNumber,
1179
1179
  coerce: e?.coerce || !1,
1180
1180
  ...j(e)
1181
1181
  });
1182
- var Oe = class e extends M {
1182
+ var De = class e extends M {
1183
1183
  constructor() {
1184
1184
  super(...arguments), this.min = this.gte, this.max = this.lte;
1185
1185
  }
@@ -1300,13 +1300,13 @@ var Oe = class e extends M {
1300
1300
  return e;
1301
1301
  }
1302
1302
  };
1303
- Oe.create = (e) => new Oe({
1303
+ De.create = (e) => new De({
1304
1304
  checks: [],
1305
- typeName: R.ZodBigInt,
1305
+ typeName: z.ZodBigInt,
1306
1306
  coerce: e?.coerce ?? !1,
1307
1307
  ...j(e)
1308
1308
  });
1309
- var ke = class extends M {
1309
+ var Oe = class extends M {
1310
1310
  _parse(e) {
1311
1311
  if (this._def.coerce && (e.data = !!e.data), this._getType(e) !== f.boolean) {
1312
1312
  let t = this._getOrReturnCtx(e);
@@ -1319,12 +1319,12 @@ var ke = class extends M {
1319
1319
  return w(e.data);
1320
1320
  }
1321
1321
  };
1322
- ke.create = (e) => new ke({
1323
- typeName: R.ZodBoolean,
1322
+ Oe.create = (e) => new Oe({
1323
+ typeName: z.ZodBoolean,
1324
1324
  coerce: e?.coerce || !1,
1325
1325
  ...j(e)
1326
1326
  });
1327
- var Ae = class e extends M {
1327
+ var ke = class e extends M {
1328
1328
  _parse(e) {
1329
1329
  if (this._def.coerce && (e.data = new Date(e.data)), this._getType(e) !== f.date) {
1330
1330
  let t = this._getOrReturnCtx(e);
@@ -1387,13 +1387,13 @@ var Ae = class e extends M {
1387
1387
  return e == null ? null : new Date(e);
1388
1388
  }
1389
1389
  };
1390
- Ae.create = (e) => new Ae({
1390
+ ke.create = (e) => new ke({
1391
1391
  checks: [],
1392
1392
  coerce: e?.coerce || !1,
1393
- typeName: R.ZodDate,
1393
+ typeName: z.ZodDate,
1394
1394
  ...j(e)
1395
1395
  });
1396
- var je = class extends M {
1396
+ var Ae = class extends M {
1397
1397
  _parse(e) {
1398
1398
  if (this._getType(e) !== f.symbol) {
1399
1399
  let t = this._getOrReturnCtx(e);
@@ -1406,11 +1406,11 @@ var je = class extends M {
1406
1406
  return w(e.data);
1407
1407
  }
1408
1408
  };
1409
- je.create = (e) => new je({
1410
- typeName: R.ZodSymbol,
1409
+ Ae.create = (e) => new Ae({
1410
+ typeName: z.ZodSymbol,
1411
1411
  ...j(e)
1412
1412
  });
1413
- var Me = class extends M {
1413
+ var je = class extends M {
1414
1414
  _parse(e) {
1415
1415
  if (this._getType(e) !== f.undefined) {
1416
1416
  let t = this._getOrReturnCtx(e);
@@ -1423,11 +1423,11 @@ var Me = class extends M {
1423
1423
  return w(e.data);
1424
1424
  }
1425
1425
  };
1426
- Me.create = (e) => new Me({
1427
- typeName: R.ZodUndefined,
1426
+ je.create = (e) => new je({
1427
+ typeName: z.ZodUndefined,
1428
1428
  ...j(e)
1429
1429
  });
1430
- var Ne = class extends M {
1430
+ var Me = class extends M {
1431
1431
  _parse(e) {
1432
1432
  if (this._getType(e) !== f.null) {
1433
1433
  let t = this._getOrReturnCtx(e);
@@ -1440,11 +1440,11 @@ var Ne = class extends M {
1440
1440
  return w(e.data);
1441
1441
  }
1442
1442
  };
1443
- Ne.create = (e) => new Ne({
1444
- typeName: R.ZodNull,
1443
+ Me.create = (e) => new Me({
1444
+ typeName: z.ZodNull,
1445
1445
  ...j(e)
1446
1446
  });
1447
- var Pe = class extends M {
1447
+ var Ne = class extends M {
1448
1448
  constructor() {
1449
1449
  super(...arguments), this._any = !0;
1450
1450
  }
@@ -1452,11 +1452,11 @@ var Pe = class extends M {
1452
1452
  return w(e.data);
1453
1453
  }
1454
1454
  };
1455
- Pe.create = (e) => new Pe({
1456
- typeName: R.ZodAny,
1455
+ Ne.create = (e) => new Ne({
1456
+ typeName: z.ZodAny,
1457
1457
  ...j(e)
1458
1458
  });
1459
- var Fe = class extends M {
1459
+ var Pe = class extends M {
1460
1460
  constructor() {
1461
1461
  super(...arguments), this._unknown = !0;
1462
1462
  }
@@ -1464,11 +1464,11 @@ var Fe = class extends M {
1464
1464
  return w(e.data);
1465
1465
  }
1466
1466
  };
1467
- Fe.create = (e) => new Fe({
1468
- typeName: R.ZodUnknown,
1467
+ Pe.create = (e) => new Pe({
1468
+ typeName: z.ZodUnknown,
1469
1469
  ...j(e)
1470
1470
  });
1471
- var N = class extends M {
1471
+ var P = class extends M {
1472
1472
  _parse(e) {
1473
1473
  let t = this._getOrReturnCtx(e);
1474
1474
  return b(t, {
@@ -1478,11 +1478,11 @@ var N = class extends M {
1478
1478
  }), S;
1479
1479
  }
1480
1480
  };
1481
- N.create = (e) => new N({
1482
- typeName: R.ZodNever,
1481
+ P.create = (e) => new P({
1482
+ typeName: z.ZodNever,
1483
1483
  ...j(e)
1484
1484
  });
1485
- var Ie = class extends M {
1485
+ var Fe = class extends M {
1486
1486
  _parse(e) {
1487
1487
  if (this._getType(e) !== f.undefined) {
1488
1488
  let t = this._getOrReturnCtx(e);
@@ -1495,11 +1495,11 @@ var Ie = class extends M {
1495
1495
  return w(e.data);
1496
1496
  }
1497
1497
  };
1498
- Ie.create = (e) => new Ie({
1499
- typeName: R.ZodVoid,
1498
+ Fe.create = (e) => new Fe({
1499
+ typeName: z.ZodVoid,
1500
1500
  ...j(e)
1501
1501
  });
1502
- var Le = class e extends M {
1502
+ var Ie = class e extends M {
1503
1503
  _parse(e) {
1504
1504
  let { ctx: t, status: n } = this._processInputParams(e), r = this._def;
1505
1505
  if (t.parsedType !== f.array) return b(t, {
@@ -1571,35 +1571,35 @@ var Le = class e extends M {
1571
1571
  return this.min(1, e);
1572
1572
  }
1573
1573
  };
1574
- Le.create = (e, t) => new Le({
1574
+ Ie.create = (e, t) => new Ie({
1575
1575
  type: e,
1576
1576
  minLength: null,
1577
1577
  maxLength: null,
1578
1578
  exactLength: null,
1579
- typeName: R.ZodArray,
1579
+ typeName: z.ZodArray,
1580
1580
  ...j(t)
1581
1581
  });
1582
- function Re(e) {
1583
- if (e instanceof P) {
1582
+ function Le(e) {
1583
+ if (e instanceof F) {
1584
1584
  let t = {};
1585
1585
  for (let n in e.shape) {
1586
1586
  let r = e.shape[n];
1587
- t[n] = L.create(Re(r));
1587
+ t[n] = R.create(Le(r));
1588
1588
  }
1589
- return new P({
1589
+ return new F({
1590
1590
  ...e._def,
1591
1591
  shape: () => t
1592
1592
  });
1593
- } else if (e instanceof Le) return new Le({
1593
+ } else if (e instanceof Ie) return new Ie({
1594
1594
  ...e._def,
1595
- type: Re(e.element)
1595
+ type: Le(e.element)
1596
1596
  });
1597
- else if (e instanceof L) return L.create(Re(e.unwrap()));
1598
- else if (e instanceof et) return et.create(Re(e.unwrap()));
1599
- else if (e instanceof Ue) return Ue.create(e.items.map((e) => Re(e)));
1597
+ else if (e instanceof R) return R.create(Le(e.unwrap()));
1598
+ else if (e instanceof $e) return $e.create(Le(e.unwrap()));
1599
+ else if (e instanceof He) return He.create(e.items.map((e) => Le(e)));
1600
1600
  else return e;
1601
1601
  }
1602
- var P = class e extends M {
1602
+ var F = class e extends M {
1603
1603
  constructor() {
1604
1604
  super(...arguments), this._cached = null, this.nonstrict = this.passthrough, this.augment = this.extend;
1605
1605
  }
@@ -1621,7 +1621,7 @@ var P = class e extends M {
1621
1621
  }), S;
1622
1622
  }
1623
1623
  let { status: t, ctx: n } = this._processInputParams(e), { shape: r, keys: i } = this._getCached(), a = [];
1624
- if (!(this._def.catchall instanceof N && this._def.unknownKeys === "strip")) for (let e in n.data) i.includes(e) || a.push(e);
1624
+ if (!(this._def.catchall instanceof P && this._def.unknownKeys === "strip")) for (let e in n.data) i.includes(e) || a.push(e);
1625
1625
  let o = [];
1626
1626
  for (let e of i) {
1627
1627
  let t = r[e], i = n.data[e];
@@ -1634,7 +1634,7 @@ var P = class e extends M {
1634
1634
  alwaysSet: e in n.data
1635
1635
  });
1636
1636
  }
1637
- if (this._def.catchall instanceof N) {
1637
+ if (this._def.catchall instanceof P) {
1638
1638
  let e = this._def.unknownKeys;
1639
1639
  if (e === "passthrough") for (let e of a) o.push({
1640
1640
  key: {
@@ -1720,7 +1720,7 @@ var P = class e extends M {
1720
1720
  ...this._def.shape(),
1721
1721
  ...t._def.shape()
1722
1722
  }),
1723
- typeName: R.ZodObject
1723
+ typeName: z.ZodObject
1724
1724
  });
1725
1725
  }
1726
1726
  setKey(e, t) {
@@ -1749,7 +1749,7 @@ var P = class e extends M {
1749
1749
  });
1750
1750
  }
1751
1751
  deepPartial() {
1752
- return Re(this);
1752
+ return Le(this);
1753
1753
  }
1754
1754
  partial(t) {
1755
1755
  let n = {};
@@ -1767,7 +1767,7 @@ var P = class e extends M {
1767
1767
  for (let e of u.objectKeys(this.shape)) if (t && !t[e]) n[e] = this.shape[e];
1768
1768
  else {
1769
1769
  let t = this.shape[e];
1770
- for (; t instanceof L;) t = t._def.innerType;
1770
+ for (; t instanceof R;) t = t._def.innerType;
1771
1771
  n[e] = t;
1772
1772
  }
1773
1773
  return new e({
@@ -1776,29 +1776,29 @@ var P = class e extends M {
1776
1776
  });
1777
1777
  }
1778
1778
  keyof() {
1779
- return Xe(u.objectKeys(this.shape));
1779
+ return Ye(u.objectKeys(this.shape));
1780
1780
  }
1781
1781
  };
1782
- P.create = (e, t) => new P({
1782
+ F.create = (e, t) => new F({
1783
1783
  shape: () => e,
1784
1784
  unknownKeys: "strip",
1785
- catchall: N.create(),
1786
- typeName: R.ZodObject,
1785
+ catchall: P.create(),
1786
+ typeName: z.ZodObject,
1787
1787
  ...j(t)
1788
- }), P.strictCreate = (e, t) => new P({
1788
+ }), F.strictCreate = (e, t) => new F({
1789
1789
  shape: () => e,
1790
1790
  unknownKeys: "strict",
1791
- catchall: N.create(),
1792
- typeName: R.ZodObject,
1791
+ catchall: P.create(),
1792
+ typeName: z.ZodObject,
1793
1793
  ...j(t)
1794
- }), P.lazycreate = (e, t) => new P({
1794
+ }), F.lazycreate = (e, t) => new F({
1795
1795
  shape: e,
1796
1796
  unknownKeys: "strip",
1797
- catchall: N.create(),
1798
- typeName: R.ZodObject,
1797
+ catchall: P.create(),
1798
+ typeName: z.ZodObject,
1799
1799
  ...j(t)
1800
1800
  });
1801
- var ze = class extends M {
1801
+ var Re = class extends M {
1802
1802
  _parse(e) {
1803
1803
  let { ctx: t } = this._processInputParams(e), n = this._def.options;
1804
1804
  function r(e) {
@@ -1861,12 +1861,12 @@ var ze = class extends M {
1861
1861
  return this._def.options;
1862
1862
  }
1863
1863
  };
1864
- ze.create = (e, t) => new ze({
1864
+ Re.create = (e, t) => new Re({
1865
1865
  options: e,
1866
- typeName: R.ZodUnion,
1866
+ typeName: z.ZodUnion,
1867
1867
  ...j(t)
1868
1868
  });
1869
- var F = (e) => e instanceof Je ? F(e.schema) : e instanceof I ? F(e.innerType()) : e instanceof Ye ? [e.value] : e instanceof Ze ? e.options : e instanceof Qe ? u.objectValues(e.enum) : e instanceof tt ? F(e._def.innerType) : e instanceof Me ? [void 0] : e instanceof Ne ? [null] : e instanceof L ? [void 0, ...F(e.unwrap())] : e instanceof et ? [null, ...F(e.unwrap())] : e instanceof it || e instanceof ot ? F(e.unwrap()) : e instanceof nt ? F(e._def.innerType) : [], Be = class e extends M {
1869
+ var I = (e) => e instanceof qe ? I(e.schema) : e instanceof L ? I(e.innerType()) : e instanceof Je ? [e.value] : e instanceof Xe ? e.options : e instanceof Ze ? u.objectValues(e.enum) : e instanceof et ? I(e._def.innerType) : e instanceof je ? [void 0] : e instanceof Me ? [null] : e instanceof R ? [void 0, ...I(e.unwrap())] : e instanceof $e ? [null, ...I(e.unwrap())] : e instanceof rt || e instanceof at ? I(e.unwrap()) : e instanceof tt ? I(e._def.innerType) : [], ze = class e extends M {
1870
1870
  _parse(e) {
1871
1871
  let { ctx: t } = this._processInputParams(e);
1872
1872
  if (t.parsedType !== f.object) return b(t, {
@@ -1901,7 +1901,7 @@ var F = (e) => e instanceof Je ? F(e.schema) : e instanceof I ? F(e.innerType())
1901
1901
  static create(t, n, r) {
1902
1902
  let i = /* @__PURE__ */ new Map();
1903
1903
  for (let e of n) {
1904
- let n = F(e.shape[t]);
1904
+ let n = I(e.shape[t]);
1905
1905
  if (!n.length) throw Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);
1906
1906
  for (let r of n) {
1907
1907
  if (i.has(r)) throw Error(`Discriminator property ${String(t)} has duplicate value ${String(r)}`);
@@ -1909,7 +1909,7 @@ var F = (e) => e instanceof Je ? F(e.schema) : e instanceof I ? F(e.innerType())
1909
1909
  }
1910
1910
  }
1911
1911
  return new e({
1912
- typeName: R.ZodDiscriminatedUnion,
1912
+ typeName: z.ZodDiscriminatedUnion,
1913
1913
  discriminator: t,
1914
1914
  options: n,
1915
1915
  optionsMap: i,
@@ -1917,7 +1917,7 @@ var F = (e) => e instanceof Je ? F(e.schema) : e instanceof I ? F(e.innerType())
1917
1917
  });
1918
1918
  }
1919
1919
  };
1920
- function Ve(e, t) {
1920
+ function Be(e, t) {
1921
1921
  let n = p(e), r = p(t);
1922
1922
  if (e === t) return {
1923
1923
  valid: !0,
@@ -1929,7 +1929,7 @@ function Ve(e, t) {
1929
1929
  ...t
1930
1930
  };
1931
1931
  for (let n of r) {
1932
- let r = Ve(e[n], t[n]);
1932
+ let r = Be(e[n], t[n]);
1933
1933
  if (!r.valid) return { valid: !1 };
1934
1934
  i[n] = r.data;
1935
1935
  }
@@ -1941,7 +1941,7 @@ function Ve(e, t) {
1941
1941
  if (e.length !== t.length) return { valid: !1 };
1942
1942
  let n = [];
1943
1943
  for (let r = 0; r < e.length; r++) {
1944
- let i = e[r], a = t[r], o = Ve(i, a);
1944
+ let i = e[r], a = t[r], o = Be(i, a);
1945
1945
  if (!o.valid) return { valid: !1 };
1946
1946
  n.push(o.data);
1947
1947
  }
@@ -1955,11 +1955,11 @@ function Ve(e, t) {
1955
1955
  };
1956
1956
  else return { valid: !1 };
1957
1957
  }
1958
- var He = class extends M {
1958
+ var Ve = class extends M {
1959
1959
  _parse(e) {
1960
1960
  let { status: t, ctx: n } = this._processInputParams(e), r = (e, r) => {
1961
1961
  if (T(e) || T(r)) return S;
1962
- let i = Ve(e.value, r.value);
1962
+ let i = Be(e.value, r.value);
1963
1963
  return i.valid ? ((E(e) || E(r)) && t.dirty(), {
1964
1964
  status: t.value,
1965
1965
  value: i.data
@@ -1984,13 +1984,13 @@ var He = class extends M {
1984
1984
  }));
1985
1985
  }
1986
1986
  };
1987
- He.create = (e, t, n) => new He({
1987
+ Ve.create = (e, t, n) => new Ve({
1988
1988
  left: e,
1989
1989
  right: t,
1990
- typeName: R.ZodIntersection,
1990
+ typeName: z.ZodIntersection,
1991
1991
  ...j(n)
1992
1992
  });
1993
- var Ue = class e extends M {
1993
+ var He = class e extends M {
1994
1994
  _parse(e) {
1995
1995
  let { status: t, ctx: n } = this._processInputParams(e);
1996
1996
  if (n.parsedType !== f.array) return b(n, {
@@ -2028,16 +2028,16 @@ var Ue = class e extends M {
2028
2028
  });
2029
2029
  }
2030
2030
  };
2031
- Ue.create = (e, t) => {
2031
+ He.create = (e, t) => {
2032
2032
  if (!Array.isArray(e)) throw Error("You must pass an array of schemas to z.tuple([ ... ])");
2033
- return new Ue({
2033
+ return new He({
2034
2034
  items: e,
2035
- typeName: R.ZodTuple,
2035
+ typeName: z.ZodTuple,
2036
2036
  rest: null,
2037
2037
  ...j(t)
2038
2038
  });
2039
2039
  };
2040
- var We = class e extends M {
2040
+ var Ue = class e extends M {
2041
2041
  get keySchema() {
2042
2042
  return this._def.keyType;
2043
2043
  }
@@ -2066,16 +2066,16 @@ var We = class e extends M {
2066
2066
  return n instanceof M ? new e({
2067
2067
  keyType: t,
2068
2068
  valueType: n,
2069
- typeName: R.ZodRecord,
2069
+ typeName: z.ZodRecord,
2070
2070
  ...j(r)
2071
2071
  }) : new e({
2072
- keyType: Te.create(),
2072
+ keyType: we.create(),
2073
2073
  valueType: t,
2074
- typeName: R.ZodRecord,
2074
+ typeName: z.ZodRecord,
2075
2075
  ...j(n)
2076
2076
  });
2077
2077
  }
2078
- }, Ge = class extends M {
2078
+ }, We = class extends M {
2079
2079
  get keySchema() {
2080
2080
  return this._def.keyType;
2081
2081
  }
@@ -2120,13 +2120,13 @@ var We = class e extends M {
2120
2120
  }
2121
2121
  }
2122
2122
  };
2123
- Ge.create = (e, t, n) => new Ge({
2123
+ We.create = (e, t, n) => new We({
2124
2124
  valueType: t,
2125
2125
  keyType: e,
2126
- typeName: R.ZodMap,
2126
+ typeName: z.ZodMap,
2127
2127
  ...j(n)
2128
2128
  });
2129
- var Ke = class e extends M {
2129
+ var Ge = class e extends M {
2130
2130
  _parse(e) {
2131
2131
  let { status: t, ctx: n } = this._processInputParams(e);
2132
2132
  if (n.parsedType !== f.set) return b(n, {
@@ -2190,14 +2190,14 @@ var Ke = class e extends M {
2190
2190
  return this.min(1, e);
2191
2191
  }
2192
2192
  };
2193
- Ke.create = (e, t) => new Ke({
2193
+ Ge.create = (e, t) => new Ge({
2194
2194
  valueType: e,
2195
2195
  minSize: null,
2196
2196
  maxSize: null,
2197
- typeName: R.ZodSet,
2197
+ typeName: z.ZodSet,
2198
2198
  ...j(t)
2199
2199
  });
2200
- var qe = class e extends M {
2200
+ var Ke = class e extends M {
2201
2201
  constructor() {
2202
2202
  super(...arguments), this.validate = this.implement;
2203
2203
  }
@@ -2241,7 +2241,7 @@ var qe = class e extends M {
2241
2241
  });
2242
2242
  }
2243
2243
  let i = { errorMap: t.common.contextualErrorMap }, a = t.data;
2244
- if (this._def.returns instanceof $e) {
2244
+ if (this._def.returns instanceof Qe) {
2245
2245
  let e = this;
2246
2246
  return w(async function(...t) {
2247
2247
  let o = new h([]), s = await e._def.args.parseAsync(t, i).catch((e) => {
@@ -2271,7 +2271,7 @@ var qe = class e extends M {
2271
2271
  args(...t) {
2272
2272
  return new e({
2273
2273
  ...this._def,
2274
- args: Ue.create(t).rest(Fe.create())
2274
+ args: He.create(t).rest(Pe.create())
2275
2275
  });
2276
2276
  }
2277
2277
  returns(t) {
@@ -2288,13 +2288,13 @@ var qe = class e extends M {
2288
2288
  }
2289
2289
  static create(t, n, r) {
2290
2290
  return new e({
2291
- args: t || Ue.create([]).rest(Fe.create()),
2292
- returns: n || Fe.create(),
2293
- typeName: R.ZodFunction,
2291
+ args: t || He.create([]).rest(Pe.create()),
2292
+ returns: n || Pe.create(),
2293
+ typeName: z.ZodFunction,
2294
2294
  ...j(r)
2295
2295
  });
2296
2296
  }
2297
- }, Je = class extends M {
2297
+ }, qe = class extends M {
2298
2298
  get schema() {
2299
2299
  return this._def.getter();
2300
2300
  }
@@ -2307,12 +2307,12 @@ var qe = class e extends M {
2307
2307
  });
2308
2308
  }
2309
2309
  };
2310
- Je.create = (e, t) => new Je({
2310
+ qe.create = (e, t) => new qe({
2311
2311
  getter: e,
2312
- typeName: R.ZodLazy,
2312
+ typeName: z.ZodLazy,
2313
2313
  ...j(t)
2314
2314
  });
2315
- var Ye = class extends M {
2315
+ var Je = class extends M {
2316
2316
  _parse(e) {
2317
2317
  if (e.data !== this._def.value) {
2318
2318
  let t = this._getOrReturnCtx(e);
@@ -2331,19 +2331,19 @@ var Ye = class extends M {
2331
2331
  return this._def.value;
2332
2332
  }
2333
2333
  };
2334
- Ye.create = (e, t) => new Ye({
2334
+ Je.create = (e, t) => new Je({
2335
2335
  value: e,
2336
- typeName: R.ZodLiteral,
2336
+ typeName: z.ZodLiteral,
2337
2337
  ...j(t)
2338
2338
  });
2339
- function Xe(e, t) {
2340
- return new Ze({
2339
+ function Ye(e, t) {
2340
+ return new Xe({
2341
2341
  values: e,
2342
- typeName: R.ZodEnum,
2342
+ typeName: z.ZodEnum,
2343
2343
  ...j(t)
2344
2344
  });
2345
2345
  }
2346
- var Ze = class e extends M {
2346
+ var Xe = class e extends M {
2347
2347
  _parse(e) {
2348
2348
  if (typeof e.data != "string") {
2349
2349
  let t = this._getOrReturnCtx(e), n = this._def.values;
@@ -2394,8 +2394,8 @@ var Ze = class e extends M {
2394
2394
  });
2395
2395
  }
2396
2396
  };
2397
- Ze.create = Xe;
2398
- var Qe = class extends M {
2397
+ Xe.create = Ye;
2398
+ var Ze = class extends M {
2399
2399
  _parse(e) {
2400
2400
  let t = u.getValidEnumValues(this._def.values), n = this._getOrReturnCtx(e);
2401
2401
  if (n.parsedType !== f.string && n.parsedType !== f.number) {
@@ -2420,12 +2420,12 @@ var Qe = class extends M {
2420
2420
  return this._def.values;
2421
2421
  }
2422
2422
  };
2423
- Qe.create = (e, t) => new Qe({
2423
+ Ze.create = (e, t) => new Ze({
2424
2424
  values: e,
2425
- typeName: R.ZodNativeEnum,
2425
+ typeName: z.ZodNativeEnum,
2426
2426
  ...j(t)
2427
2427
  });
2428
- var $e = class extends M {
2428
+ var Qe = class extends M {
2429
2429
  unwrap() {
2430
2430
  return this._def.type;
2431
2431
  }
@@ -2441,17 +2441,17 @@ var $e = class extends M {
2441
2441
  })));
2442
2442
  }
2443
2443
  };
2444
- $e.create = (e, t) => new $e({
2444
+ Qe.create = (e, t) => new Qe({
2445
2445
  type: e,
2446
- typeName: R.ZodPromise,
2446
+ typeName: z.ZodPromise,
2447
2447
  ...j(t)
2448
2448
  });
2449
- var I = class extends M {
2449
+ var L = class extends M {
2450
2450
  innerType() {
2451
2451
  return this._def.schema;
2452
2452
  }
2453
2453
  sourceType() {
2454
- return this._def.schema._def.typeName === R.ZodEffects ? this._def.schema.sourceType() : this._def.schema;
2454
+ return this._def.schema._def.typeName === z.ZodEffects ? this._def.schema.sourceType() : this._def.schema;
2455
2455
  }
2456
2456
  _parse(e) {
2457
2457
  let { status: t, ctx: n } = this._processInputParams(e), r = this._def.effect || null, i = {
@@ -2533,21 +2533,21 @@ var I = class extends M {
2533
2533
  u.assertNever(r);
2534
2534
  }
2535
2535
  };
2536
- I.create = (e, t, n) => new I({
2536
+ L.create = (e, t, n) => new L({
2537
2537
  schema: e,
2538
- typeName: R.ZodEffects,
2538
+ typeName: z.ZodEffects,
2539
2539
  effect: t,
2540
2540
  ...j(n)
2541
- }), I.createWithPreprocess = (e, t, n) => new I({
2541
+ }), L.createWithPreprocess = (e, t, n) => new L({
2542
2542
  schema: t,
2543
2543
  effect: {
2544
2544
  type: "preprocess",
2545
2545
  transform: e
2546
2546
  },
2547
- typeName: R.ZodEffects,
2547
+ typeName: z.ZodEffects,
2548
2548
  ...j(n)
2549
2549
  });
2550
- var L = class extends M {
2550
+ var R = class extends M {
2551
2551
  _parse(e) {
2552
2552
  return this._getType(e) === f.undefined ? w(void 0) : this._def.innerType._parse(e);
2553
2553
  }
@@ -2555,12 +2555,12 @@ var L = class extends M {
2555
2555
  return this._def.innerType;
2556
2556
  }
2557
2557
  };
2558
- L.create = (e, t) => new L({
2558
+ R.create = (e, t) => new R({
2559
2559
  innerType: e,
2560
- typeName: R.ZodOptional,
2560
+ typeName: z.ZodOptional,
2561
2561
  ...j(t)
2562
2562
  });
2563
- var et = class extends M {
2563
+ var $e = class extends M {
2564
2564
  _parse(e) {
2565
2565
  return this._getType(e) === f.null ? w(null) : this._def.innerType._parse(e);
2566
2566
  }
@@ -2568,12 +2568,12 @@ var et = class extends M {
2568
2568
  return this._def.innerType;
2569
2569
  }
2570
2570
  };
2571
- et.create = (e, t) => new et({
2571
+ $e.create = (e, t) => new $e({
2572
2572
  innerType: e,
2573
- typeName: R.ZodNullable,
2573
+ typeName: z.ZodNullable,
2574
2574
  ...j(t)
2575
2575
  });
2576
- var tt = class extends M {
2576
+ var et = class extends M {
2577
2577
  _parse(e) {
2578
2578
  let { ctx: t } = this._processInputParams(e), n = t.data;
2579
2579
  return t.parsedType === f.undefined && (n = this._def.defaultValue()), this._def.innerType._parse({
@@ -2586,13 +2586,13 @@ var tt = class extends M {
2586
2586
  return this._def.innerType;
2587
2587
  }
2588
2588
  };
2589
- tt.create = (e, t) => new tt({
2589
+ et.create = (e, t) => new et({
2590
2590
  innerType: e,
2591
- typeName: R.ZodDefault,
2591
+ typeName: z.ZodDefault,
2592
2592
  defaultValue: typeof t.default == "function" ? t.default : () => t.default,
2593
2593
  ...j(t)
2594
2594
  });
2595
- var nt = class extends M {
2595
+ var tt = class extends M {
2596
2596
  _parse(e) {
2597
2597
  let { ctx: t } = this._processInputParams(e), n = {
2598
2598
  ...t,
@@ -2627,13 +2627,13 @@ var nt = class extends M {
2627
2627
  return this._def.innerType;
2628
2628
  }
2629
2629
  };
2630
- nt.create = (e, t) => new nt({
2630
+ tt.create = (e, t) => new tt({
2631
2631
  innerType: e,
2632
- typeName: R.ZodCatch,
2632
+ typeName: z.ZodCatch,
2633
2633
  catchValue: typeof t.catch == "function" ? t.catch : () => t.catch,
2634
2634
  ...j(t)
2635
2635
  });
2636
- var rt = class extends M {
2636
+ var nt = class extends M {
2637
2637
  _parse(e) {
2638
2638
  if (this._getType(e) !== f.nan) {
2639
2639
  let t = this._getOrReturnCtx(e);
@@ -2649,11 +2649,11 @@ var rt = class extends M {
2649
2649
  };
2650
2650
  }
2651
2651
  };
2652
- rt.create = (e) => new rt({
2653
- typeName: R.ZodNaN,
2652
+ nt.create = (e) => new nt({
2653
+ typeName: z.ZodNaN,
2654
2654
  ...j(e)
2655
2655
  });
2656
- var it = class extends M {
2656
+ var rt = class extends M {
2657
2657
  _parse(e) {
2658
2658
  let { ctx: t } = this._processInputParams(e), n = t.data;
2659
2659
  return this._def.type._parse({
@@ -2665,7 +2665,7 @@ var it = class extends M {
2665
2665
  unwrap() {
2666
2666
  return this._def.type;
2667
2667
  }
2668
- }, at = class e extends M {
2668
+ }, it = class e extends M {
2669
2669
  _parse(e) {
2670
2670
  let { status: t, ctx: n } = this._processInputParams(e);
2671
2671
  if (n.common.async) return (async () => {
@@ -2700,10 +2700,10 @@ var it = class extends M {
2700
2700
  return new e({
2701
2701
  in: t,
2702
2702
  out: n,
2703
- typeName: R.ZodPipeline
2703
+ typeName: z.ZodPipeline
2704
2704
  });
2705
2705
  }
2706
- }, ot = class extends M {
2706
+ }, at = class extends M {
2707
2707
  _parse(e) {
2708
2708
  let t = this._def.innerType._parse(e), n = (e) => (D(e) && (e.value = Object.freeze(e.value)), e);
2709
2709
  return O(t) ? t.then((e) => n(e)) : n(t);
@@ -2712,64 +2712,64 @@ var it = class extends M {
2712
2712
  return this._def.innerType;
2713
2713
  }
2714
2714
  };
2715
- ot.create = (e, t) => new ot({
2715
+ at.create = (e, t) => new at({
2716
2716
  innerType: e,
2717
- typeName: R.ZodReadonly,
2717
+ typeName: z.ZodReadonly,
2718
2718
  ...j(t)
2719
- }), P.lazycreate;
2720
- var R;
2719
+ }), F.lazycreate;
2720
+ var z;
2721
2721
  (function(e) {
2722
2722
  e.ZodString = "ZodString", e.ZodNumber = "ZodNumber", e.ZodNaN = "ZodNaN", e.ZodBigInt = "ZodBigInt", e.ZodBoolean = "ZodBoolean", e.ZodDate = "ZodDate", e.ZodSymbol = "ZodSymbol", e.ZodUndefined = "ZodUndefined", e.ZodNull = "ZodNull", e.ZodAny = "ZodAny", e.ZodUnknown = "ZodUnknown", e.ZodNever = "ZodNever", e.ZodVoid = "ZodVoid", e.ZodArray = "ZodArray", e.ZodObject = "ZodObject", e.ZodUnion = "ZodUnion", e.ZodDiscriminatedUnion = "ZodDiscriminatedUnion", e.ZodIntersection = "ZodIntersection", e.ZodTuple = "ZodTuple", e.ZodRecord = "ZodRecord", e.ZodMap = "ZodMap", e.ZodSet = "ZodSet", e.ZodFunction = "ZodFunction", e.ZodLazy = "ZodLazy", e.ZodLiteral = "ZodLiteral", e.ZodEnum = "ZodEnum", e.ZodEffects = "ZodEffects", e.ZodNativeEnum = "ZodNativeEnum", e.ZodOptional = "ZodOptional", e.ZodNullable = "ZodNullable", e.ZodDefault = "ZodDefault", e.ZodCatch = "ZodCatch", e.ZodPromise = "ZodPromise", e.ZodBranded = "ZodBranded", e.ZodPipeline = "ZodPipeline", e.ZodReadonly = "ZodReadonly";
2723
- })(R ||= {});
2724
- var z = Te.create;
2725
- De.create, rt.create, Oe.create;
2726
- var st = ke.create;
2727
- Ae.create, je.create, Me.create, Ne.create, Pe.create;
2728
- var ct = Fe.create;
2729
- N.create, Ie.create, Le.create;
2730
- var lt = P.create;
2731
- P.strictCreate, ze.create, Be.create, He.create, Ue.create;
2732
- var ut = We.create;
2733
- Ge.create, Ke.create, qe.create, Je.create, Ye.create;
2734
- var dt = Ze.create;
2735
- Qe.create, $e.create, I.create, L.create, et.create, I.createWithPreprocess, at.create;
2723
+ })(z ||= {});
2724
+ var B = we.create;
2725
+ Ee.create, nt.create, De.create;
2726
+ var ot = Oe.create;
2727
+ ke.create, Ae.create, je.create, Me.create, Ne.create;
2728
+ var st = Pe.create;
2729
+ P.create, Fe.create, Ie.create;
2730
+ var ct = F.create;
2731
+ F.strictCreate, Re.create, ze.create, Ve.create, He.create;
2732
+ var lt = Ue.create;
2733
+ We.create, Ge.create, Ke.create, qe.create, Je.create;
2734
+ var ut = Xe.create;
2735
+ Ze.create, Qe.create, L.create, R.create, $e.create, L.createWithPreprocess, it.create;
2736
2736
  //#endregion
2737
2737
  //#region ../../packages/widget-sdk/src/config/schema.ts
2738
- var ft = lt({
2739
- mode: dt([
2738
+ var dt = ct({
2739
+ mode: ut([
2740
2740
  "light",
2741
2741
  "dark",
2742
2742
  "system"
2743
2743
  ]).optional(),
2744
- accentColor: z().optional(),
2745
- fontFamily: z().optional(),
2746
- borderRadius: z().optional()
2747
- }), pt = lt({
2748
- externalId: z().optional(),
2749
- authId: z().optional(),
2750
- name: z().optional(),
2751
- email: z().optional()
2752
- }), mt = lt({
2753
- agentId: z().min(1, "agentId is required"),
2754
- apiBaseUrl: z().url("apiBaseUrl must be a valid URL"),
2755
- tenantId: z().optional(),
2756
- user: pt.optional(),
2757
- sessionId: z().optional(),
2758
- mode: dt(["floating", "inline"]).optional(),
2759
- title: z().optional(),
2760
- subtitle: z().optional(),
2761
- description: z().optional(),
2762
- avatarUrl: z().optional(),
2763
- streaming: st().optional(),
2764
- preview: st().optional(),
2765
- skipServerConfigFetch: st().optional(),
2766
- configChannel: dt(["draft", "published"]).optional(),
2767
- metadata: ut(ct()).optional(),
2768
- theme: ft.optional()
2769
- }), ht = mt.omit({
2744
+ accentColor: B().optional(),
2745
+ fontFamily: B().optional(),
2746
+ borderRadius: B().optional()
2747
+ }), ft = ct({
2748
+ externalId: B().optional(),
2749
+ authId: B().optional(),
2750
+ name: B().optional(),
2751
+ email: B().optional()
2752
+ }), pt = ct({
2753
+ agentId: B().min(1, "agentId is required"),
2754
+ apiBaseUrl: B().url("apiBaseUrl must be a valid URL"),
2755
+ tenantId: B().optional(),
2756
+ user: ft.optional(),
2757
+ sessionId: B().optional(),
2758
+ mode: ut(["floating", "inline"]).optional(),
2759
+ title: B().optional(),
2760
+ subtitle: B().optional(),
2761
+ description: B().optional(),
2762
+ avatarUrl: B().optional(),
2763
+ streaming: ot().optional(),
2764
+ preview: ot().optional(),
2765
+ skipServerConfigFetch: ot().optional(),
2766
+ configChannel: ut(["draft", "published"]).optional(),
2767
+ metadata: lt(st()).optional(),
2768
+ theme: dt.optional()
2769
+ }), mt = pt.omit({
2770
2770
  agentId: !0,
2771
2771
  apiBaseUrl: !0
2772
- }).partial(), gt = {
2772
+ }).partial(), ht = {
2773
2773
  mode: "floating",
2774
2774
  streaming: !0,
2775
2775
  title: "AI Assistant",
@@ -2780,15 +2780,15 @@ var ft = lt({
2780
2780
  borderRadius: "12px"
2781
2781
  }
2782
2782
  };
2783
- function _t(e, t) {
2784
- mt.parse(e);
2783
+ function gt(e, t) {
2784
+ pt.parse(e);
2785
2785
  let n, r = t ? { ...t } : void 0;
2786
2786
  r && typeof r.theme == "object" && r.theme !== null ? (n = r.theme, delete r.theme) : r && typeof r.theme == "string" && (n = { mode: r.theme }, delete r.theme);
2787
- let i = r ? ht.passthrough().safeParse(r).data : void 0, a = i ? vt(i, e) : e, o = {
2788
- mode: a.theme?.mode ?? n?.mode ?? gt.theme.mode,
2789
- accentColor: a.theme?.accentColor ?? n?.accentColor ?? gt.theme.accentColor,
2790
- fontFamily: a.theme?.fontFamily ?? n?.fontFamily ?? gt.theme.fontFamily,
2791
- borderRadius: a.theme?.borderRadius ?? n?.borderRadius ?? gt.theme.borderRadius
2787
+ let i = r ? mt.passthrough().safeParse(r).data : void 0, a = i ? _t(i, e) : e, o = {
2788
+ mode: a.theme?.mode ?? n?.mode ?? ht.theme.mode,
2789
+ accentColor: a.theme?.accentColor ?? n?.accentColor ?? ht.theme.accentColor,
2790
+ fontFamily: a.theme?.fontFamily ?? n?.fontFamily ?? ht.theme.fontFamily,
2791
+ borderRadius: a.theme?.borderRadius ?? n?.borderRadius ?? ht.theme.borderRadius
2792
2792
  };
2793
2793
  return {
2794
2794
  agentId: a.agentId,
@@ -2801,8 +2801,8 @@ function _t(e, t) {
2801
2801
  email: a.user?.email
2802
2802
  },
2803
2803
  sessionId: a.sessionId,
2804
- mode: a.mode ?? gt.mode,
2805
- title: a.title ?? gt.title,
2804
+ mode: a.mode ?? ht.mode,
2805
+ title: a.title ?? ht.title,
2806
2806
  subtitle: a.subtitle,
2807
2807
  description: a.description,
2808
2808
  suggestedQuestions: (() => {
@@ -2810,7 +2810,7 @@ function _t(e, t) {
2810
2810
  return Array.isArray(e) ? e : [];
2811
2811
  })(),
2812
2812
  avatarUrl: a.avatarUrl,
2813
- streaming: a.streaming ?? gt.streaming,
2813
+ streaming: a.streaming ?? ht.streaming,
2814
2814
  preview: a.preview === !0,
2815
2815
  skipServerConfigFetch: a.skipServerConfigFetch === !0,
2816
2816
  configChannel: a.configChannel,
@@ -2818,6 +2818,11 @@ function _t(e, t) {
2818
2818
  theme: o,
2819
2819
  photoSendingEnabled: i?.photoSendingEnabled === !0,
2820
2820
  fileUploadEnabled: i?.fileUploadEnabled === !0,
2821
+ voiceNoteEnabled: i?.voiceNoteEnabled === !0,
2822
+ voiceNoteMaxDurationSec: (() => {
2823
+ let e = i?.voiceNoteMaxDurationSec;
2824
+ return typeof e == "number" && Number.isFinite(e) ? e : 120;
2825
+ })(),
2821
2826
  attachmentMaxCount: (() => {
2822
2827
  let e = i?.attachmentMaxCount;
2823
2828
  return typeof e == "number" && Number.isFinite(e) ? e : 5;
@@ -2832,23 +2837,23 @@ function _t(e, t) {
2832
2837
  })()
2833
2838
  };
2834
2839
  }
2835
- function vt(e, t) {
2840
+ function _t(e, t) {
2836
2841
  let n = { ...e };
2837
2842
  for (let e of Object.keys(t)) {
2838
2843
  let r = t[e];
2839
- r != null && (typeof r == "object" && !Array.isArray(r) && n[e] !== null && typeof n[e] == "object" ? n[e] = vt(n[e], r) : n[e] = r);
2844
+ r != null && (typeof r == "object" && !Array.isArray(r) && n[e] !== null && typeof n[e] == "object" ? n[e] = _t(n[e], r) : n[e] = r);
2840
2845
  }
2841
2846
  return n;
2842
2847
  }
2843
2848
  //#endregion
2844
2849
  //#region ../../node_modules/.pnpm/tslib@2.8.1/node_modules/tslib/tslib.es6.mjs
2845
- var yt = function() {
2846
- return yt = Object.assign || function(e) {
2850
+ var vt = function() {
2851
+ return vt = Object.assign || function(e) {
2847
2852
  for (var t, n = 1, r = arguments.length; n < r; n++) for (var i in t = arguments[n], t) Object.prototype.hasOwnProperty.call(t, i) && (e[i] = t[i]);
2848
2853
  return e;
2849
- }, yt.apply(this, arguments);
2854
+ }, vt.apply(this, arguments);
2850
2855
  };
2851
- function B(e, t, n, r) {
2856
+ function V(e, t, n, r) {
2852
2857
  function i(e) {
2853
2858
  return e instanceof n ? e : new n(function(t) {
2854
2859
  t(e);
@@ -2875,7 +2880,7 @@ function B(e, t, n, r) {
2875
2880
  c((r = r.apply(e, t || [])).next());
2876
2881
  });
2877
2882
  }
2878
- function V(e, t) {
2883
+ function H(e, t) {
2879
2884
  var n = {
2880
2885
  label: 0,
2881
2886
  sent: function() {
@@ -2945,19 +2950,19 @@ function V(e, t) {
2945
2950
  };
2946
2951
  }
2947
2952
  }
2948
- function bt(e, t, n) {
2953
+ function yt(e, t, n) {
2949
2954
  if (n || arguments.length === 2) for (var r = 0, i = t.length, a; r < i; r++) (a || !(r in t)) && (a ||= Array.prototype.slice.call(t, 0, r), a[r] = t[r]);
2950
2955
  return e.concat(a || Array.prototype.slice.call(t));
2951
2956
  }
2952
2957
  //#endregion
2953
2958
  //#region ../../node_modules/.pnpm/@fingerprintjs+fingerprintjs@4.6.2/node_modules/@fingerprintjs/fingerprintjs/dist/fp.esm.js
2954
- var xt = "4.6.2";
2955
- function St(e, t) {
2959
+ var bt = "4.6.2";
2960
+ function xt(e, t) {
2956
2961
  return new Promise(function(n) {
2957
2962
  return setTimeout(n, e, t);
2958
2963
  });
2959
2964
  }
2960
- function Ct() {
2965
+ function St() {
2961
2966
  return new Promise(function(e) {
2962
2967
  var t = new MessageChannel();
2963
2968
  t.port1.onmessage = function() {
@@ -2965,22 +2970,22 @@ function Ct() {
2965
2970
  }, t.port2.postMessage(null);
2966
2971
  });
2967
2972
  }
2968
- function wt(e, t) {
2973
+ function Ct(e, t) {
2969
2974
  t === void 0 && (t = Infinity);
2970
2975
  var n = window.requestIdleCallback;
2971
2976
  return n ? new Promise(function(e) {
2972
2977
  return n.call(window, function() {
2973
2978
  return e();
2974
2979
  }, { timeout: t });
2975
- }) : St(Math.min(e, t));
2980
+ }) : xt(Math.min(e, t));
2976
2981
  }
2977
- function Tt(e) {
2982
+ function wt(e) {
2978
2983
  return !!e && typeof e.then == "function";
2979
2984
  }
2980
- function Et(e, t) {
2985
+ function Tt(e, t) {
2981
2986
  try {
2982
2987
  var n = e();
2983
- Tt(n) ? n.then(function(e) {
2988
+ wt(n) ? n.then(function(e) {
2984
2989
  return t(!0, e);
2985
2990
  }, function(e) {
2986
2991
  return t(!1, e);
@@ -2989,13 +2994,13 @@ function Et(e, t) {
2989
2994
  t(!1, e);
2990
2995
  }
2991
2996
  }
2992
- function Dt(e, t, n) {
2993
- return n === void 0 && (n = 16), B(this, void 0, void 0, function() {
2997
+ function Et(e, t, n) {
2998
+ return n === void 0 && (n = 16), V(this, void 0, void 0, function() {
2994
2999
  var r, i, a, o;
2995
- return V(this, function(s) {
3000
+ return H(this, function(s) {
2996
3001
  switch (s.label) {
2997
3002
  case 0: r = Array(e.length), i = Date.now(), a = 0, s.label = 1;
2998
- case 1: return a < e.length ? (r[a] = t(e[a], a), o = Date.now(), o >= i + n ? (i = o, [4, Ct()]) : [3, 3]) : [3, 4];
3003
+ case 1: return a < e.length ? (r[a] = t(e[a], a), o = Date.now(), o >= i + n ? (i = o, [4, St()]) : [3, 3]) : [3, 4];
2999
3004
  case 2: s.sent(), s.label = 3;
3000
3005
  case 3: return ++a, [3, 1];
3001
3006
  case 4: return [2, r];
@@ -3003,36 +3008,36 @@ function Dt(e, t, n) {
3003
3008
  });
3004
3009
  });
3005
3010
  }
3006
- function Ot(e) {
3011
+ function Dt(e) {
3007
3012
  return e.then(void 0, function() {}), e;
3008
3013
  }
3009
- function kt(e, t) {
3014
+ function Ot(e, t) {
3010
3015
  for (var n = 0, r = e.length; n < r; ++n) if (e[n] === t) return !0;
3011
3016
  return !1;
3012
3017
  }
3013
- function At(e, t) {
3014
- return !kt(e, t);
3018
+ function kt(e, t) {
3019
+ return !Ot(e, t);
3015
3020
  }
3016
- function jt(e) {
3021
+ function At(e) {
3017
3022
  return parseInt(e);
3018
3023
  }
3019
- function H(e) {
3024
+ function U(e) {
3020
3025
  return parseFloat(e);
3021
3026
  }
3022
- function U(e, t) {
3027
+ function W(e, t) {
3023
3028
  return typeof e == "number" && isNaN(e) ? t : e;
3024
3029
  }
3025
- function W(e) {
3030
+ function G(e) {
3026
3031
  return e.reduce(function(e, t) {
3027
3032
  return e + +!!t;
3028
3033
  }, 0);
3029
3034
  }
3030
- function Mt(e, t) {
3035
+ function jt(e, t) {
3031
3036
  if (t === void 0 && (t = 1), Math.abs(t) >= 1) return Math.round(e / t) * t;
3032
3037
  var n = 1 / t;
3033
3038
  return Math.round(e * n) / n;
3034
3039
  }
3035
- function Nt(e) {
3040
+ function Mt(e) {
3036
3041
  for (var t = `Unexpected syntax '${e}'`, n = /^\s*([a-z-]*)(.*)$/i.exec(e), r = n[1] || void 0, i = {}, a = /([.:#][\w-]+|\[.+?\])/gi, o = function(e, t) {
3037
3042
  i[e] = i[e] || [], i[e].push(t);
3038
3043
  };;) {
@@ -3056,7 +3061,7 @@ function Nt(e) {
3056
3061
  }
3057
3062
  return [r, i];
3058
3063
  }
3059
- function Pt(e) {
3064
+ function Nt(e) {
3060
3065
  for (var t = new Uint8Array(e.length), n = 0; n < e.length; n++) {
3061
3066
  var r = e.charCodeAt(n);
3062
3067
  if (r > 127) return new TextEncoder().encode(e);
@@ -3064,7 +3069,7 @@ function Pt(e) {
3064
3069
  }
3065
3070
  return t;
3066
3071
  }
3067
- function G(e, t) {
3072
+ function Pt(e, t) {
3068
3073
  var n = e[0] >>> 16, r = e[0] & 65535, i = e[1] >>> 16, a = e[1] & 65535, o = t[0] >>> 16, s = t[0] & 65535, c = t[1] >>> 16, l = t[1] & 65535, u = 0, d = 0, f = 0, p = 0;
3069
3074
  p += a + l, f += p >>> 16, p &= 65535, f += i + c, d += f >>> 16, f &= 65535, d += r + s, u += d >>> 16, d &= 65535, u += n + o, u &= 65535, e[0] = u << 16 | d, e[1] = f << 16 | p;
3070
3075
  }
@@ -3089,10 +3094,10 @@ function Rt(e) {
3089
3094
  }
3090
3095
  var zt = [2277735313, 289559509], Bt = [1291169091, 658871167], Vt = [0, 5], Ht = [0, 1390208809], Ut = [0, 944331445];
3091
3096
  function Wt(e, t) {
3092
- var n = Pt(e);
3097
+ var n = Nt(e);
3093
3098
  t ||= 0;
3094
3099
  var r = [0, n.length], i = r[1] % 16, a = r[1] - i, o = [0, t], s = [0, t], c = [0, 0], l = [0, 0], u;
3095
- for (u = 0; u < a; u += 16) c[0] = n[u + 4] | n[u + 5] << 8 | n[u + 6] << 16 | n[u + 7] << 24, c[1] = n[u] | n[u + 1] << 8 | n[u + 2] << 16 | n[u + 3] << 24, l[0] = n[u + 12] | n[u + 13] << 8 | n[u + 14] << 16 | n[u + 15] << 24, l[1] = n[u + 8] | n[u + 9] << 8 | n[u + 10] << 16 | n[u + 11] << 24, K(c, zt), Ft(c, 31), K(c, Bt), J(o, c), Ft(o, 27), G(o, s), K(o, Vt), G(o, Ht), K(l, Bt), Ft(l, 33), K(l, zt), J(s, l), Ft(s, 31), G(s, o), K(s, Vt), G(s, Ut);
3100
+ for (u = 0; u < a; u += 16) c[0] = n[u + 4] | n[u + 5] << 8 | n[u + 6] << 16 | n[u + 7] << 24, c[1] = n[u] | n[u + 1] << 8 | n[u + 2] << 16 | n[u + 3] << 24, l[0] = n[u + 12] | n[u + 13] << 8 | n[u + 14] << 16 | n[u + 15] << 24, l[1] = n[u + 8] | n[u + 9] << 8 | n[u + 10] << 16 | n[u + 11] << 24, K(c, zt), Ft(c, 31), K(c, Bt), J(o, c), Ft(o, 27), Pt(o, s), K(o, Vt), Pt(o, Ht), K(l, Bt), Ft(l, 33), K(l, zt), J(s, l), Ft(s, 31), Pt(s, o), K(s, Vt), Pt(s, Ut);
3096
3101
  c[0] = 0, c[1] = 0, l[0] = 0, l[1] = 0;
3097
3102
  var d = [0, 0];
3098
3103
  switch (i) {
@@ -3112,10 +3117,10 @@ function Wt(e, t) {
3112
3117
  case 2: d[1] = n[u + 1], q(d, 8), J(c, d);
3113
3118
  case 1: d[1] = n[u], J(c, d), K(c, zt), Ft(c, 31), K(c, Bt), J(o, c);
3114
3119
  }
3115
- return J(o, r), J(s, r), G(o, s), G(s, o), Rt(o), Rt(s), G(o, s), G(s, o), ("00000000" + (o[0] >>> 0).toString(16)).slice(-8) + ("00000000" + (o[1] >>> 0).toString(16)).slice(-8) + ("00000000" + (s[0] >>> 0).toString(16)).slice(-8) + ("00000000" + (s[1] >>> 0).toString(16)).slice(-8);
3120
+ return J(o, r), J(s, r), Pt(o, s), Pt(s, o), Rt(o), Rt(s), Pt(o, s), Pt(s, o), ("00000000" + (o[0] >>> 0).toString(16)).slice(-8) + ("00000000" + (o[1] >>> 0).toString(16)).slice(-8) + ("00000000" + (s[0] >>> 0).toString(16)).slice(-8) + ("00000000" + (s[1] >>> 0).toString(16)).slice(-8);
3116
3121
  }
3117
3122
  function Gt(e) {
3118
- return yt({
3123
+ return vt({
3119
3124
  name: e.name,
3120
3125
  message: e.message,
3121
3126
  stack: e.stack?.split("\n")
@@ -3128,9 +3133,9 @@ function qt(e) {
3128
3133
  return typeof e != "function";
3129
3134
  }
3130
3135
  function Jt(e, t) {
3131
- var n = Ot(new Promise(function(n) {
3136
+ var n = Dt(new Promise(function(n) {
3132
3137
  var r = Date.now();
3133
- Et(e.bind(null, t), function() {
3138
+ Tt(e.bind(null, t), function() {
3134
3139
  var e = [...arguments], t = Date.now() - r;
3135
3140
  if (!e[0]) return n(function() {
3136
3141
  return {
@@ -3148,7 +3153,7 @@ function Jt(e, t) {
3148
3153
  n(function() {
3149
3154
  return new Promise(function(e) {
3150
3155
  var n = Date.now();
3151
- Et(i, function() {
3156
+ Tt(i, function() {
3152
3157
  var r = [...arguments], i = t + Date.now() - n;
3153
3158
  if (!r[0]) return e({
3154
3159
  error: r[1],
@@ -3171,18 +3176,18 @@ function Jt(e, t) {
3171
3176
  }
3172
3177
  function Yt(e, t, n, r) {
3173
3178
  var i = Object.keys(e).filter(function(e) {
3174
- return At(n, e);
3175
- }), a = Ot(Dt(i, function(n) {
3179
+ return kt(n, e);
3180
+ }), a = Dt(Et(i, function(n) {
3176
3181
  return Jt(e[n], t);
3177
3182
  }, r));
3178
3183
  return function() {
3179
- return B(this, void 0, void 0, function() {
3184
+ return V(this, void 0, void 0, function() {
3180
3185
  var e, t, n, o, s;
3181
- return V(this, function(c) {
3186
+ return H(this, function(c) {
3182
3187
  switch (c.label) {
3183
3188
  case 0: return [4, a];
3184
- case 1: return e = c.sent(), [4, Dt(e, function(e) {
3185
- return Ot(e());
3189
+ case 1: return e = c.sent(), [4, Et(e, function(e) {
3190
+ return Dt(e());
3186
3191
  }, r)];
3187
3192
  case 2: return t = c.sent(), [4, Promise.all(t)];
3188
3193
  case 3:
@@ -3195,7 +3200,7 @@ function Yt(e, t, n, r) {
3195
3200
  }
3196
3201
  function Xt() {
3197
3202
  var e = window, t = navigator;
3198
- return W([
3203
+ return G([
3199
3204
  "MSCSSMatrix" in e,
3200
3205
  "msSetImmediate" in e,
3201
3206
  "msIndexedDB" in e,
@@ -3205,7 +3210,7 @@ function Xt() {
3205
3210
  }
3206
3211
  function Zt() {
3207
3212
  var e = window, t = navigator;
3208
- return W([
3213
+ return G([
3209
3214
  "msWriteProfilerMark" in e,
3210
3215
  "MSStream" in e,
3211
3216
  "msLaunchUri" in t,
@@ -3214,7 +3219,7 @@ function Zt() {
3214
3219
  }
3215
3220
  function Qt() {
3216
3221
  var e = window, t = navigator;
3217
- return W([
3222
+ return G([
3218
3223
  "webkitPersistentStorage" in t,
3219
3224
  "webkitTemporaryStorage" in t,
3220
3225
  (t.vendor || "").indexOf("Google") === 0,
@@ -3226,7 +3231,7 @@ function Qt() {
3226
3231
  }
3227
3232
  function Y() {
3228
3233
  var e = window, t = navigator;
3229
- return W([
3234
+ return G([
3230
3235
  "ApplePayError" in e,
3231
3236
  "CSSPrimitiveValue" in e,
3232
3237
  "Counter" in e,
@@ -3237,7 +3242,7 @@ function Y() {
3237
3242
  }
3238
3243
  function $t() {
3239
3244
  var e = window, t = e.HTMLElement, n = e.Document;
3240
- return W([
3245
+ return G([
3241
3246
  "safari" in e,
3242
3247
  !("ongestureend" in e),
3243
3248
  !("TouchEvent" in e),
@@ -3252,7 +3257,7 @@ function en() {
3252
3257
  }
3253
3258
  function tn() {
3254
3259
  var e = window;
3255
- return W([
3260
+ return G([
3256
3261
  "buildID" in navigator,
3257
3262
  "MozAppearance" in (document.documentElement?.style ?? {}),
3258
3263
  "onmozfullscreenchange" in e,
@@ -3263,7 +3268,7 @@ function tn() {
3263
3268
  }
3264
3269
  function nn() {
3265
3270
  var e = window;
3266
- return W([
3271
+ return G([
3267
3272
  !("MediaSettingsRange" in e),
3268
3273
  "RTCEncodedAudioFrame" in e,
3269
3274
  "" + e.Intl == "[object Intl]",
@@ -3272,7 +3277,7 @@ function nn() {
3272
3277
  }
3273
3278
  function rn() {
3274
3279
  var e = window, t = e.URLPattern;
3275
- return W([
3280
+ return G([
3276
3281
  "union" in Set.prototype,
3277
3282
  "Iterator" in e,
3278
3283
  t && "hasRegExpGroups" in t.prototype,
@@ -3281,7 +3286,7 @@ function rn() {
3281
3286
  }
3282
3287
  function an() {
3283
3288
  var e = window;
3284
- return W([
3289
+ return G([
3285
3290
  "DOMRectList" in e,
3286
3291
  "RTCPeerConnectionIceEvent" in e,
3287
3292
  "SVGGeometryElement" in e,
@@ -3290,7 +3295,7 @@ function an() {
3290
3295
  }
3291
3296
  function on() {
3292
3297
  var e = window, t = navigator, n = e.CSS, r = e.HTMLButtonElement;
3293
- return W([
3298
+ return G([
3294
3299
  !("getStorageUpdates" in t),
3295
3300
  r && "popover" in r.prototype,
3296
3301
  "CSSCounterStyleRule" in e,
@@ -3301,7 +3306,7 @@ function on() {
3301
3306
  function sn() {
3302
3307
  if (navigator.platform === "iPad") return !0;
3303
3308
  var e = screen, t = e.width / e.height;
3304
- return W([
3309
+ return G([
3305
3310
  "MediaSource" in window,
3306
3311
  !!Element.prototype.webkitRequestFullscreen,
3307
3312
  t > .65 && t < 1.53
@@ -3317,11 +3322,11 @@ function ln() {
3317
3322
  }
3318
3323
  function un() {
3319
3324
  var e = Qt(), t = tn(), n = window, r = navigator, i = "connection";
3320
- return e ? W([
3325
+ return e ? G([
3321
3326
  !("SharedWorker" in n),
3322
3327
  r[i] && "ontypechange" in r[i],
3323
3328
  !("sinkId" in new Audio())
3324
- ]) >= 2 : t ? W([
3329
+ ]) >= 2 : t ? G([
3325
3330
  "onorientationchange" in n,
3326
3331
  "orientation" in n,
3327
3332
  /android/i.test(r.appVersion)
@@ -3329,7 +3334,7 @@ function un() {
3329
3334
  }
3330
3335
  function dn() {
3331
3336
  var e = navigator, t = window, n = Audio.prototype, r = t.visualViewport;
3332
- return W([
3337
+ return G([
3333
3338
  "srLatency" in n,
3334
3339
  "srChannelCount" in n,
3335
3340
  "devicePosture" in e,
@@ -3348,7 +3353,7 @@ function pn() {
3348
3353
  i.type = "triangle", i.frequency.value = 1e4;
3349
3354
  var a = r.createDynamicsCompressor();
3350
3355
  a.threshold.value = -50, a.knee.value = 40, a.ratio.value = 12, a.attack.value = 0, a.release.value = .25, i.connect(a), a.connect(r.destination), i.start(0);
3351
- var o = gn(r), s = o[0], c = o[1], l = Ot(s.then(function(e) {
3356
+ var o = gn(r), s = o[0], c = o[1], l = Dt(s.then(function(e) {
3352
3357
  return _n(e.getChannelData(0).subarray(n));
3353
3358
  }, function(e) {
3354
3359
  if (e.name === "timeout" || e.name === "suspended") return -3;
@@ -3378,7 +3383,7 @@ function gn(e) {
3378
3383
  }, f = function() {
3379
3384
  try {
3380
3385
  var r = e.startRendering();
3381
- switch (Tt(r) && Ot(r), e.state) {
3386
+ switch (wt(r) && Dt(r), e.state) {
3382
3387
  case "running":
3383
3388
  u = Date.now(), c && d();
3384
3389
  break;
@@ -3405,12 +3410,12 @@ function vn(e) {
3405
3410
  }
3406
3411
  function yn(e, t, n) {
3407
3412
  var r;
3408
- return n === void 0 && (n = 50), B(this, void 0, void 0, function() {
3413
+ return n === void 0 && (n = 50), V(this, void 0, void 0, function() {
3409
3414
  var i, a;
3410
- return V(this, function(o) {
3415
+ return H(this, function(o) {
3411
3416
  switch (o.label) {
3412
3417
  case 0: i = document, o.label = 1;
3413
- case 1: return i.body ? [3, 3] : [4, St(n)];
3418
+ case 1: return i.body ? [3, 3] : [4, xt(n)];
3414
3419
  case 2: return o.sent(), [3, 1];
3415
3420
  case 3: a = i.createElement("iframe"), o.label = 4;
3416
3421
  case 4: return o.trys.push([
@@ -3433,7 +3438,7 @@ function yn(e, t, n) {
3433
3438
  c();
3434
3439
  })];
3435
3440
  case 5: o.sent(), o.label = 6;
3436
- case 6: return a.contentWindow?.document?.body ? [3, 8] : [4, St(n)];
3441
+ case 6: return a.contentWindow?.document?.body ? [3, 8] : [4, xt(n)];
3437
3442
  case 7: return o.sent(), [3, 6];
3438
3443
  case 8: return [4, e(a, a.contentWindow)];
3439
3444
  case 9: return [2, o.sent()];
@@ -3444,7 +3449,7 @@ function yn(e, t, n) {
3444
3449
  });
3445
3450
  }
3446
3451
  function bn(e) {
3447
- for (var t = Nt(e), n = t[0], r = t[1], i = document.createElement(n ?? "div"), a = 0, o = Object.keys(r); a < o.length; a++) {
3452
+ for (var t = Mt(e), n = t[0], r = t[1], i = document.createElement(n ?? "div"), a = 0, o = Object.keys(r); a < o.length; a++) {
3448
3453
  var s = o[a], c = r[s].join(" ");
3449
3454
  s === "style" ? xn(i.style, c) : i.setAttribute(s, c);
3450
3455
  }
@@ -3481,9 +3486,9 @@ function Dn() {
3481
3486
  var e = this;
3482
3487
  return yn(function(t, n) {
3483
3488
  var r = n.document;
3484
- return B(e, void 0, void 0, function() {
3489
+ return V(e, void 0, void 0, function() {
3485
3490
  var e, t, n, i, a, o, s, c, l, u, d, f;
3486
- return V(this, function(p) {
3491
+ return H(this, function(p) {
3487
3492
  for (e = r.body, e.style.fontSize = wn, t = r.createElement("div"), t.style.setProperty("visibility", "hidden", "important"), n = {}, i = {}, a = function(e) {
3488
3493
  var n = r.createElement("span"), i = n.style;
3489
3494
  return i.position = "absolute", i.top = "0", i.left = "0", i.fontFamily = e, n.textContent = Cn, t.appendChild(n), n;
@@ -3599,7 +3604,7 @@ function Rn() {
3599
3604
  }
3600
3605
  function zn() {
3601
3606
  var e = navigator, t = 0, n;
3602
- e.maxTouchPoints === void 0 ? e.msMaxTouchPoints !== void 0 && (t = e.msMaxTouchPoints) : t = jt(e.maxTouchPoints);
3607
+ e.maxTouchPoints === void 0 ? e.msMaxTouchPoints !== void 0 && (t = e.msMaxTouchPoints) : t = At(e.maxTouchPoints);
3603
3608
  try {
3604
3609
  document.createEvent("TouchEvent"), n = !0;
3605
3610
  } catch {
@@ -3628,14 +3633,14 @@ function Hn() {
3628
3633
  return window.screen.colorDepth;
3629
3634
  }
3630
3635
  function Un() {
3631
- return U(H(navigator.deviceMemory), void 0);
3636
+ return W(U(navigator.deviceMemory), void 0);
3632
3637
  }
3633
3638
  function Wn() {
3634
3639
  if (!(Y() && on() && en())) return Gn();
3635
3640
  }
3636
3641
  function Gn() {
3637
3642
  var e = screen, t = function(e) {
3638
- return U(jt(e), null);
3643
+ return W(At(e), null);
3639
3644
  }, n = [t(e.width), t(e.height)];
3640
3645
  return n.sort().reverse(), n;
3641
3646
  }
@@ -3652,11 +3657,11 @@ function Xn() {
3652
3657
  function Zn() {
3653
3658
  var e = this;
3654
3659
  return Xn(), function() {
3655
- return B(e, void 0, void 0, function() {
3660
+ return V(e, void 0, void 0, function() {
3656
3661
  var e;
3657
- return V(this, function(t) {
3662
+ return H(this, function(t) {
3658
3663
  switch (t.label) {
3659
- case 0: return e = $n(), er(e) ? Jn ? [2, bt([], Jn, !0)] : cn() ? [4, ln()] : [3, 2] : [3, 2];
3664
+ case 0: return e = $n(), er(e) ? Jn ? [2, yt([], Jn, !0)] : cn() ? [4, ln()] : [3, 2] : [3, 2];
3660
3665
  case 1: t.sent(), e = $n(), t.label = 2;
3661
3666
  case 2: return er(e) || (Jn = e), [2, e];
3662
3667
  }
@@ -3671,13 +3676,13 @@ function Qn() {
3671
3676
  };
3672
3677
  var t = Zn();
3673
3678
  return function() {
3674
- return B(e, void 0, void 0, function() {
3679
+ return V(e, void 0, void 0, function() {
3675
3680
  var e, n;
3676
- return V(this, function(r) {
3681
+ return H(this, function(r) {
3677
3682
  switch (r.label) {
3678
3683
  case 0: return [4, t()];
3679
3684
  case 1: return e = r.sent(), n = function(e) {
3680
- return e === null ? null : Mt(e, qn);
3685
+ return e === null ? null : jt(e, qn);
3681
3686
  }, [2, [
3682
3687
  n(e[0]),
3683
3688
  n(e[1]),
@@ -3692,10 +3697,10 @@ function Qn() {
3692
3697
  function $n() {
3693
3698
  var e = screen;
3694
3699
  return [
3695
- U(H(e.availTop), null),
3696
- U(H(e.width) - H(e.availWidth) - U(H(e.availLeft), 0), null),
3697
- U(H(e.height) - H(e.availHeight) - U(H(e.availTop), 0), null),
3698
- U(H(e.availLeft), null)
3700
+ W(U(e.availTop), null),
3701
+ W(U(e.width) - U(e.availWidth) - W(U(e.availLeft), 0), null),
3702
+ W(U(e.height) - U(e.availHeight) - W(U(e.availTop), 0), null),
3703
+ W(U(e.availLeft), null)
3699
3704
  ];
3700
3705
  }
3701
3706
  function er(e) {
@@ -3703,7 +3708,7 @@ function er(e) {
3703
3708
  return !0;
3704
3709
  }
3705
3710
  function tr() {
3706
- return U(jt(navigator.hardwareConcurrency), void 0);
3711
+ return W(At(navigator.hardwareConcurrency), void 0);
3707
3712
  }
3708
3713
  function nr() {
3709
3714
  var e = window.Intl?.DateTimeFormat;
@@ -3716,7 +3721,7 @@ function nr() {
3716
3721
  }
3717
3722
  function rr() {
3718
3723
  var e = (/* @__PURE__ */ new Date()).getFullYear();
3719
- return Math.max(H(new Date(e, 0, 1).getTimezoneOffset()), H(new Date(e, 6, 1).getTimezoneOffset()));
3724
+ return Math.max(U(new Date(e, 0, 1).getTimezoneOffset()), U(new Date(e, 6, 1).getTimezoneOffset()));
3720
3725
  }
3721
3726
  function ir() {
3722
3727
  try {
@@ -4076,16 +4081,16 @@ function pr() {
4076
4081
  }
4077
4082
  function mr(e) {
4078
4083
  var t = (e === void 0 ? {} : e).debug;
4079
- return B(this, void 0, void 0, function() {
4084
+ return V(this, void 0, void 0, function() {
4080
4085
  var e, n, r, i, a, o;
4081
- return V(this, function(s) {
4086
+ return H(this, function(s) {
4082
4087
  switch (s.label) {
4083
4088
  case 0: return hr() ? (e = pr(), n = Object.keys(e), r = (o = []).concat.apply(o, n.map(function(t) {
4084
4089
  return e[t];
4085
4090
  })), [4, gr(r)]) : [2, void 0];
4086
4091
  case 1: return i = s.sent(), t && vr(e, i), a = n.filter(function(t) {
4087
4092
  var n = e[t];
4088
- return W(n.map(function(e) {
4093
+ return G(n.map(function(e) {
4089
4094
  return i[e];
4090
4095
  })) > n.length * .6;
4091
4096
  }), a.sort(), [2, a];
@@ -4098,14 +4103,14 @@ function hr() {
4098
4103
  }
4099
4104
  function gr(e) {
4100
4105
  var t;
4101
- return B(this, void 0, void 0, function() {
4106
+ return V(this, void 0, void 0, function() {
4102
4107
  var n, r, i, a, o, s, c, o;
4103
- return V(this, function(l) {
4108
+ return H(this, function(l) {
4104
4109
  switch (l.label) {
4105
4110
  case 0:
4106
4111
  for (n = document, r = n.createElement("div"), i = Array(e.length), a = {}, _r(r), o = 0; o < e.length; ++o) s = bn(e[o]), s.tagName === "DIALOG" && s.show(), c = n.createElement("div"), _r(c), c.appendChild(s), r.appendChild(c), i[o] = s;
4107
4112
  l.label = 1;
4108
- case 1: return n.body ? [3, 3] : [4, St(50)];
4113
+ case 1: return n.body ? [3, 3] : [4, xt(50)];
4109
4114
  case 2: return l.sent(), [3, 1];
4110
4115
  case 3:
4111
4116
  n.body.appendChild(r);
@@ -4277,7 +4282,7 @@ function Rr(e, t) {
4277
4282
  var i = r.document, a = i.body, o = a.style;
4278
4283
  o.width = `${t}px`, o.webkitTextSizeAdjust = o.textSizeAdjust = "none", Qt() ? a.style.zoom = `${1 / r.devicePixelRatio}` : Y() && (a.style.zoom = "reset");
4279
4284
  var s = i.createElement("div");
4280
- return s.textContent = bt([], Array(t / 20 << 0), !0).map(function() {
4285
+ return s.textContent = yt([], Array(t / 20 << 0), !0).map(function() {
4281
4286
  return "word";
4282
4287
  }).join(" "), a.appendChild(s), e(i, a);
4283
4288
  }, "<!doctype html><html><head><meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">");
@@ -4575,7 +4580,7 @@ function mi(e) {
4575
4580
  return /^Win/.test(t) ? .6 : /^Mac/.test(t) ? .5 : .7;
4576
4581
  }
4577
4582
  function hi(e) {
4578
- return Mt(.99 + .01 * e, 1e-4);
4583
+ return jt(.99 + .01 * e, 1e-4);
4579
4584
  }
4580
4585
  function gi(e) {
4581
4586
  for (var t = "", n = 0, r = Object.keys(e).sort(); n < r.length; n++) {
@@ -4603,17 +4608,17 @@ function yi(e) {
4603
4608
  },
4604
4609
  confidence: pi(e),
4605
4610
  components: e,
4606
- version: xt
4611
+ version: bt
4607
4612
  };
4608
4613
  }
4609
4614
  function bi(e) {
4610
- return e === void 0 && (e = 50), wt(e, e * 2);
4615
+ return e === void 0 && (e = 50), Ct(e, e * 2);
4611
4616
  }
4612
4617
  function xi(e, t) {
4613
4618
  return { get: function(n) {
4614
- return B(this, void 0, void 0, function() {
4619
+ return V(this, void 0, void 0, function() {
4615
4620
  var r, i;
4616
- return V(this, function(a) {
4621
+ return H(this, function(a) {
4617
4622
  switch (a.label) {
4618
4623
  case 0: return [4, e()];
4619
4624
  case 1: return r = a.sent(), i = yi(r), t || n?.debug, [2, i];
@@ -4625,13 +4630,13 @@ function xi(e, t) {
4625
4630
  function Si() {
4626
4631
  if (!(window.__fpjs_d_m || Math.random() >= .001)) try {
4627
4632
  var e = new XMLHttpRequest();
4628
- e.open("get", `https://m1.openfpcdn.io/fingerprintjs/v${xt}/npm-monitoring`, !0), e.send();
4633
+ e.open("get", `https://m1.openfpcdn.io/fingerprintjs/v${bt}/npm-monitoring`, !0), e.send();
4629
4634
  } catch {}
4630
4635
  }
4631
4636
  function Ci(e) {
4632
- return e === void 0 && (e = {}), B(this, void 0, void 0, function() {
4637
+ return e === void 0 && (e = {}), V(this, void 0, void 0, function() {
4633
4638
  var t, n, r;
4634
- return V(this, function(i) {
4639
+ return H(this, function(i) {
4635
4640
  switch (i.label) {
4636
4641
  case 0: return (e.monitoring ?? !0) && Si(), t = e.delayFallback, n = e.debug, [4, bi(t)];
4637
4642
  case 1: return i.sent(), r = di({
@@ -4815,6 +4820,25 @@ var Oi = class {
4815
4820
  if (!o.success) throw Error(o.error ?? "Upload failed");
4816
4821
  return { url: o.data.url };
4817
4822
  }
4823
+ async uploadVoiceNote(e, t, n, r, i) {
4824
+ let a = await fetch(this.channel(`${this.baseUrl}/v1/upload`), {
4825
+ method: "POST",
4826
+ credentials: this.credentials,
4827
+ headers: this.authHeaders(),
4828
+ body: JSON.stringify({
4829
+ file: e,
4830
+ mimeType: t,
4831
+ fileName: n,
4832
+ agentId: r,
4833
+ tenantId: i,
4834
+ kind: "audio"
4835
+ })
4836
+ });
4837
+ if (!a.ok) throw Error(`Upload error: ${a.status} ${a.statusText}`);
4838
+ let o = await a.json();
4839
+ if (!o.success) throw Error(o.error ?? "Upload failed");
4840
+ return { url: o.data.url };
4841
+ }
4818
4842
  async fetchWidgetConfig(e, t) {
4819
4843
  try {
4820
4844
  let n = t ? `?tenantId=${encodeURIComponent(t)}` : "", r = await fetch(this.channel(`${this.baseUrl}/v1/agents/${encodeURIComponent(e)}/widget-config${n}`), { credentials: this.credentials });
@@ -4927,6 +4951,10 @@ async function ji(e, t, n, r = {}) {
4927
4951
  let e = t.documents;
4928
4952
  return e && n.onDocuments && n.onDocuments(e), !1;
4929
4953
  }
4954
+ if (t.type === "voice_transcript") {
4955
+ let e = t.transcript;
4956
+ return e && n.onVoiceTranscript && n.onVoiceTranscript(e), !1;
4957
+ }
4930
4958
  if (t.type === "control_mode") {
4931
4959
  let e = t.mode, r = !!t.queued;
4932
4960
  return e && n.onControlMode && n.onControlMode(e, r), r ? (n.onEnd(i), !0) : !1;
@@ -5131,11 +5159,29 @@ function $i(e) {
5131
5159
  return n > 0 ? `${t}m ${n}s` : `${t}m`;
5132
5160
  }
5133
5161
  //#endregion
5162
+ //#region ../../packages/widget-sdk/src/voice-transcript.ts
5163
+ var ea = "[Voice note] ";
5164
+ function ta(e, t) {
5165
+ let n = t?.trim();
5166
+ return n ? `${ea}${e}\n\n${n}` : `${ea}${e}`;
5167
+ }
5168
+ function na(e) {
5169
+ if (!e.startsWith("[Voice note] ")) return null;
5170
+ let t = e.slice(13), n = t.indexOf("\n\n");
5171
+ return n === -1 ? {
5172
+ transcript: t,
5173
+ rest: ""
5174
+ } : {
5175
+ transcript: t.slice(0, n),
5176
+ rest: t.slice(n + 2)
5177
+ };
5178
+ }
5179
+ //#endregion
5134
5180
  //#region ../../packages/widget-sdk/src/create-client.ts
5135
- function ea() {
5181
+ function ra() {
5136
5182
  return `msg-${Date.now().toString(36)}-${Math.random().toString(36).slice(2, 7)}`;
5137
5183
  }
5138
- var ta = 2e3, na = class {
5184
+ var ia = 2e3, aa = class {
5139
5185
  hostConfig;
5140
5186
  onStateChange;
5141
5187
  sessionTokenPromise;
@@ -5217,7 +5263,7 @@ var ta = 2e3, na = class {
5217
5263
  }
5218
5264
  if (!this.config.skipServerConfigFetch) {
5219
5265
  let e = await this.apiClient.fetchWidgetConfig(this.config.agentId, this.config.tenantId);
5220
- e && (this.config = _t(this.hostConfig, e), this.onStateChange(this.getState(), this.config));
5266
+ e && (this.config = gt(this.hostConfig, e), this.onStateChange(this.getState(), this.config));
5221
5267
  }
5222
5268
  if (this.setState({ initStatus: "ready" }), !this.state.sessionId) return;
5223
5269
  this.openEventStream();
@@ -5232,10 +5278,10 @@ var ta = 2e3, na = class {
5232
5278
  url: e.url,
5233
5279
  mimeType: e.mimeType,
5234
5280
  fileName: e.fileName,
5235
- kind: e.mimeType.startsWith("image/") ? "image" : "file"
5281
+ kind: e.mimeType.startsWith("image/") ? "image" : e.mimeType.startsWith("audio/") ? "audio" : "file"
5236
5282
  })) : void 0;
5237
5283
  return {
5238
- id: ea(),
5284
+ id: ra(),
5239
5285
  role: e.role,
5240
5286
  content: e.content,
5241
5287
  images: !n && e.images && e.images.length > 0 ? e.images : void 0,
@@ -5272,7 +5318,7 @@ var ta = 2e3, na = class {
5272
5318
  if (typeof e.content != "string" || e.id && this.state.messages.some((t) => t.id === e.id)) return;
5273
5319
  if (e.direction === "human") {
5274
5320
  let t = {
5275
- id: e.id ?? ea(),
5321
+ id: e.id ?? ra(),
5276
5322
  role: "assistant",
5277
5323
  content: e.content,
5278
5324
  createdAt: e.createdAt ?? (/* @__PURE__ */ new Date()).toISOString(),
@@ -5288,7 +5334,7 @@ var ta = 2e3, na = class {
5288
5334
  }
5289
5335
  if (e.direction === "ai") {
5290
5336
  let t = {
5291
- id: e.id ?? ea(),
5337
+ id: e.id ?? ra(),
5292
5338
  role: "assistant",
5293
5339
  content: e.content,
5294
5340
  createdAt: e.createdAt ?? (/* @__PURE__ */ new Date()).toISOString(),
@@ -5345,7 +5391,7 @@ var ta = 2e3, na = class {
5345
5391
  if (this.state.isLoading || !n || this.state.initStatus !== "ready") return;
5346
5392
  let r = [];
5347
5393
  if (t && t.length > 0) for (let e of t) try {
5348
- let t = await ia(e.file);
5394
+ let t = await sa(e.file);
5349
5395
  if (e.kind === "image") {
5350
5396
  let n = await this.apiClient.uploadImage(t, e.file.type, e.file.name, this.config.agentId, this.config.tenantId);
5351
5397
  r.push({
@@ -5354,6 +5400,15 @@ var ta = 2e3, na = class {
5354
5400
  fileName: e.file.name,
5355
5401
  kind: "image"
5356
5402
  });
5403
+ } else if (e.kind === "audio") {
5404
+ let n = await this.apiClient.uploadVoiceNote(t, e.file.type || "audio/webm", e.file.name, this.config.agentId, this.config.tenantId);
5405
+ r.push({
5406
+ url: n.url,
5407
+ mimeType: e.file.type || "audio/webm",
5408
+ fileName: e.file.name,
5409
+ durationMs: e.durationMs,
5410
+ kind: "audio"
5411
+ });
5357
5412
  } else {
5358
5413
  let n = await this.apiClient.uploadFile(t, e.file.type || "application/octet-stream", e.file.name, this.config.agentId, this.config.tenantId);
5359
5414
  r.push({
@@ -5369,7 +5424,7 @@ var ta = 2e3, na = class {
5369
5424
  return;
5370
5425
  }
5371
5426
  let i = r.filter((e) => e.kind === "image"), a = {
5372
- id: ea(),
5427
+ id: ra(),
5373
5428
  role: "user",
5374
5429
  content: e.trim(),
5375
5430
  uploadedImageUrl: i[0]?.url,
@@ -5399,7 +5454,7 @@ var ta = 2e3, na = class {
5399
5454
  if (!this.config.turnstileSiteKey || this.apiClient.hasValidSessionToken()) return;
5400
5455
  let e;
5401
5456
  await Promise.race([this.ensureSessionToken(), new Promise((t) => {
5402
- e = setTimeout(t, ta);
5457
+ e = setTimeout(t, ia);
5403
5458
  })]).finally(() => clearTimeout(e));
5404
5459
  }
5405
5460
  async sendNonStreaming(e, t, n, r = !1) {
@@ -5428,7 +5483,7 @@ var ta = 2e3, na = class {
5428
5483
  return;
5429
5484
  }
5430
5485
  let i = {
5431
- id: ea(),
5486
+ id: ra(),
5432
5487
  role: "assistant",
5433
5488
  content: r.content,
5434
5489
  images: r.images,
@@ -5455,7 +5510,7 @@ var ta = 2e3, na = class {
5455
5510
  }
5456
5511
  async sendStreaming(e, t, n, r = !1) {
5457
5512
  await this.awaitSessionToken();
5458
- let i = ea(), a = {
5513
+ let i = ra(), a = {
5459
5514
  id: i,
5460
5515
  role: "assistant",
5461
5516
  content: "",
@@ -5490,8 +5545,12 @@ var ta = 2e3, na = class {
5490
5545
  onDocuments: (e) => {
5491
5546
  this.updateMessage(i, { documents: e });
5492
5547
  },
5548
+ onVoiceTranscript: (e) => {
5549
+ let t = [...this.state.messages].reverse().find((e) => e.role === "user");
5550
+ t && this.updateMessage(t.id, { content: ta(e, t.content) });
5551
+ },
5493
5552
  onToolCallsStarted: (e, t) => {
5494
- t && c === null && (c = t), d = null, this.updateMessage(i, { answerStartedAtMs: null }), (t ?? c) !== "off" && this.updateMessage(i, { toolStatus: ra(e) });
5553
+ t && c === null && (c = t), d = null, this.updateMessage(i, { answerStartedAtMs: null }), (t ?? c) !== "off" && this.updateMessage(i, { toolStatus: oa(e) });
5495
5554
  },
5496
5555
  onAck: (e) => {
5497
5556
  this.updateMessage(i, { ackText: e });
@@ -5623,13 +5682,13 @@ var ta = 2e3, na = class {
5623
5682
  }), o && (this.handleSessionExpired(), await this.sendStreaming(e, t, n, !0));
5624
5683
  }
5625
5684
  };
5626
- function ra(e) {
5685
+ function oa(e) {
5627
5686
  let t = e[0];
5628
5687
  if (!t) return "Working...";
5629
5688
  let n = t.indexOf(".");
5630
5689
  return n > 0 ? `Using ${t.slice(0, n).replace(/_/g, " ")}: ${t.slice(n + 1).replace(/_/g, " ")}${e.length > 1 ? ` +${e.length - 1}` : ""}` : `Using ${t.replace(/_/g, " ")}`;
5631
5690
  }
5632
- function ia(e) {
5691
+ function sa(e) {
5633
5692
  return new Promise((t, n) => {
5634
5693
  let r = new FileReader();
5635
5694
  r.onload = () => {
@@ -5640,7 +5699,7 @@ function ia(e) {
5640
5699
  }
5641
5700
  //#endregion
5642
5701
  //#region ../../packages/widget-sdk/src/dom/shadow-root.ts
5643
- function aa(e) {
5702
+ function ca(e) {
5644
5703
  let t = document.createElement("div");
5645
5704
  t.setAttribute("data-agentkit-widget", ""), e.appendChild(t);
5646
5705
  let n = t.attachShadow({ mode: "open" }), r = document.createElement("style");
@@ -5653,18 +5712,18 @@ function aa(e) {
5653
5712
  mountPoint: i
5654
5713
  };
5655
5714
  }
5656
- function oa(e, t) {
5715
+ function la(e, t) {
5657
5716
  e.textContent = t;
5658
5717
  }
5659
- function sa(e) {
5718
+ function ua(e) {
5660
5719
  e.remove();
5661
5720
  }
5662
5721
  //#endregion
5663
5722
  //#region ../../packages/widget-sdk/src/dom/mount.ts
5664
- function ca(e) {
5723
+ function da(e) {
5665
5724
  document.body ? document.body.appendChild(e) : document.addEventListener("DOMContentLoaded", () => document.body.appendChild(e), { once: !0 });
5666
5725
  }
5667
- function la() {
5726
+ function fa() {
5668
5727
  let e = document.createElement("div");
5669
5728
  return e.setAttribute("data-agentkit-root", "floating"), e.style.cssText = [
5670
5729
  "position: fixed",
@@ -5672,9 +5731,9 @@ function la() {
5672
5731
  "right: 24px",
5673
5732
  "z-index: 2147483647",
5674
5733
  "pointer-events: none"
5675
- ].join("; "), ca(e), e;
5734
+ ].join("; "), da(e), e;
5676
5735
  }
5677
- function ua(e) {
5736
+ function pa(e) {
5678
5737
  getComputedStyle(e).position === "static" && (e.style.position = "relative");
5679
5738
  let t = document.createElement("div");
5680
5739
  return t.setAttribute("data-agentkit-root", "floating"), t.style.cssText = [
@@ -5685,21 +5744,21 @@ function ua(e) {
5685
5744
  "pointer-events: none"
5686
5745
  ].join("; "), e.appendChild(t), t;
5687
5746
  }
5688
- function da(e) {
5747
+ function ma(e) {
5689
5748
  return e.setAttribute("data-agentkit-root", "inline"), getComputedStyle(e).position === "static" && (e.style.position = "relative"), e;
5690
5749
  }
5691
- function fa(e) {
5750
+ function ha(e) {
5692
5751
  e.remove();
5693
5752
  }
5694
- function pa(e) {
5753
+ function ga(e) {
5695
5754
  e.removeAttribute("data-agentkit-root");
5696
5755
  }
5697
5756
  //#endregion
5698
5757
  //#region ../../packages/widget-sdk/src/create-widget.ts
5699
- function ma(e, t, n, r, i) {
5700
- let a = e.mode === "inline", o = !1, s = a && i ? da(i) : !a && i ? ua(i) : la(), c = aa(s);
5701
- oa(c.styleSlot, r);
5702
- let l = new na(e, t, (e, t) => {
5758
+ function _a(e, t, n, r, i) {
5759
+ let a = e.mode === "inline", o = !1, s = a && i ? ma(i) : !a && i ? pa(i) : fa(), c = ca(s);
5760
+ la(c.styleSlot, r);
5761
+ let l = new aa(e, t, (e, t) => {
5703
5762
  o || u.update(e, t);
5704
5763
  }), u = n(c.mountPoint, e, l.getState(), {
5705
5764
  onOpen: () => d.open(),
@@ -5731,7 +5790,7 @@ function ma(e, t, n, r, i) {
5731
5790
  o || (l.resetConversation(), l.emitter.emit("reset"));
5732
5791
  },
5733
5792
  destroy() {
5734
- o || (o = !0, l.closeEventStream(), u.destroy(), sa(c.host), a && i ? pa(i) : fa(s), l.emitter.emit("destroy"), l.emitter.removeAllListeners());
5793
+ o || (o = !0, l.closeEventStream(), u.destroy(), ua(c.host), a && i ? ga(i) : ha(s), l.emitter.emit("destroy"), l.emitter.removeAllListeners());
5735
5794
  },
5736
5795
  on(e, t) {
5737
5796
  l.emitter.on(e, t);
@@ -5747,43 +5806,43 @@ function ma(e, t, n, r, i) {
5747
5806
  }
5748
5807
  //#endregion
5749
5808
  //#region ../../packages/widget-sdk/src/init.ts
5750
- var ha = /* @__PURE__ */ new Map(), ga = 0;
5751
- function _a(e) {
5752
- let t = `agentkit-widget-${++ga}`, n = e.destroy.bind(e);
5809
+ var va = /* @__PURE__ */ new Map(), ya = 0;
5810
+ function ba(e) {
5811
+ let t = `agentkit-widget-${++ya}`, n = e.destroy.bind(e);
5753
5812
  return e.destroy = () => {
5754
- ha.delete(t), n();
5755
- }, ha.set(t, e), t;
5813
+ va.delete(t), n();
5814
+ }, va.set(t, e), t;
5756
5815
  }
5757
- function va(e, t, n) {
5816
+ function xa(e, t, n) {
5758
5817
  let r = {
5759
5818
  ...e,
5760
5819
  mode: "floating"
5761
- }, i = ma(_t(r), r, t, n);
5762
- return _a(i), i;
5820
+ }, i = _a(gt(r), r, t, n);
5821
+ return ba(i), i;
5763
5822
  }
5764
- function ya(e, t, n, r) {
5823
+ function Sa(e, t, n, r) {
5765
5824
  let i = {
5766
5825
  ...t,
5767
5826
  mode: "floating"
5768
- }, a = ma(_t(i), i, n, r, e);
5769
- return _a(a), a;
5827
+ }, a = _a(gt(i), i, n, r, e);
5828
+ return ba(a), a;
5770
5829
  }
5771
- function ba(e, t, n, r) {
5830
+ function Ca(e, t, n, r) {
5772
5831
  let i = {
5773
5832
  ...t,
5774
5833
  mode: "inline"
5775
- }, a = ma(_t(i), i, n, r, e);
5776
- return _a(a), a;
5834
+ }, a = _a(gt(i), i, n, r, e);
5835
+ return ba(a), a;
5777
5836
  }
5778
- function xa(e) {
5779
- e ? ha.get(e)?.destroy() : (ha.forEach((e) => e.destroy()), ha.clear());
5837
+ function wa(e) {
5838
+ e ? va.get(e)?.destroy() : (va.forEach((e) => e.destroy()), va.clear());
5780
5839
  }
5781
- function Sa() {
5782
- return Array.from(ha.keys());
5840
+ function Ta() {
5841
+ return Array.from(va.keys());
5783
5842
  }
5784
5843
  //#endregion
5785
5844
  //#region ../../packages/widget-ui/src/theme/tokens.ts
5786
- function Ca(e) {
5845
+ function Ea(e) {
5787
5846
  let { theme: t } = e, n = [
5788
5847
  `--ak-accent: ${t.accentColor}`,
5789
5848
  `--ak-font: ${t.fontFamily}`,
@@ -5791,15 +5850,15 @@ function Ca(e) {
5791
5850
  ];
5792
5851
  return n.push(`--ak-accent-hover: color-mix(in srgb, ${t.accentColor} 85%, black)`), `:host { ${n.join("; ")} }`;
5793
5852
  }
5794
- function wa(e) {
5853
+ function Da(e) {
5795
5854
  return e === "system" ? window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light" : e;
5796
5855
  }
5797
5856
  //#endregion
5798
5857
  //#region ../../packages/widget-ui/src/theme/styles.ts
5799
- var Ta = "\n*, *::before, *::after {\n box-sizing: border-box;\n margin: 0;\n padding: 0;\n}\n\n:host {\n --ak-accent: #6366f1;\n --ak-accent-hover: #4f46e5;\n --ak-bg: #ffffff;\n --ak-surface: #f9fafb;\n --ak-text: #111827;\n --ak-text-muted: #6b7280;\n --ak-border: #e5e7eb;\n --ak-user-bg: var(--ak-accent);\n --ak-user-text: #ffffff;\n --ak-bot-bg: #f3f4f6;\n --ak-bot-text: #111827;\n --ak-maintenance-fg: #92400e;\n --ak-maintenance-bg: #fffbeb;\n --ak-maintenance-halo: #fcd34d;\n --ak-font: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;\n --ak-radius: 12px;\n /* Chat surface texture — scattered line doodles, tiled. Neutral stroke (not accent-tinted)\n so it stays a texture rather than competing with brand colour. Alpha is baked into the\n SVG stroke, so the light/dark variants differ only in stroke rgba. */\n --ak-pattern: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220' fill='none' stroke='rgba(0,0,0,0.045)' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 30c5-8 14-8 19 0s14 8 19 0'/%3E%3Ccircle cx='96' cy='22' r='8'/%3E%3Cpath d='M150 34l6-11 6 11z'/%3E%3Cpath d='M196 18v14M189 25h14'/%3E%3Cpath d='M28 74h22M28 81h14'/%3E%3Cpath d='M84 68l8-8 8 8-8 8z'/%3E%3Cpath d='M186 76c0 7-6 12-13 12h-10l-6 6v-6c-5-1-8-6-8-12 0-7 6-12 13-12h11c7 0 13 5 13 12z'/%3E%3Ccircle cx='124' cy='104' r='5'/%3E%3Cpath d='M18 122c7-5 14-5 21 0'/%3E%3Cpath d='M62 132l7-13 7 13z'/%3E%3Cpath d='M106 156h20M106 163h12'/%3E%3Ccircle cx='176' cy='140' r='8'/%3E%3Cpath d='M32 170l6-6 6 6-6 6z'/%3E%3Cpath d='M148 196c5-7 13-7 18 0'/%3E%3Cpath d='M74 196v12M68 202h12'/%3E%3Ccircle cx='206' cy='178' r='4.5'/%3E%3Ccircle cx='58' cy='48' r='4'/%3E%3Cpath d='M128 56h16M128 62h10'/%3E%3Cpath d='M40 100l5-5 5 5-5 5z'/%3E%3Cpath d='M150 116c5-6 12-6 17 0'/%3E%3Ccircle cx='92' cy='128' r='4'/%3E%3Cpath d='M198 108v11M193 113h11'/%3E%3Cpath d='M8 148c5-7 12-7 17 0'/%3E%3Ccircle cx='142' cy='176' r='4'/%3E%3Cpath d='M76 166h16M76 172h9'/%3E%3Cpath d='M186 208l5-9 5 9z'/%3E%3Cpath d='M110 190l6-6 6 6-6 6z'/%3E%3Ccircle cx='46' cy='206' r='5'/%3E%3C/svg%3E\");\n --ak-pattern-size: 210px;\n --ak-shadow: 0 20px 60px rgba(0, 0, 0, 0.15), 0 8px 24px rgba(0, 0, 0, 0.08);\n --ak-launcher-size: 56px;\n /* Panel-to-launcher offset. Negative pulls the launcher up toward the panel.\n Applied as a margin on .ak-shell-wrap because CSS gap rejects negatives. */\n --ak-launcher-gap: -12px;\n font-family: var(--ak-font);\n -webkit-font-smoothing: antialiased;\n}\n\n/* Dark mode — set data-theme=\"dark\" on the shadow host element.\n Slate palette, aligned with the KlicForge dashboard dark tokens. */\n:host([data-theme=\"dark\"]) {\n --ak-bg: #0f172a; /* slate-900 — panel surface */\n --ak-surface: #1e293b; /* slate-800 — inputs, insets (lift off panel) */\n --ak-text: #f1f5f9; /* slate-100 */\n --ak-text-muted: #94a3b8;/* slate-400 */\n --ak-border: #334155; /* slate-700 */\n --ak-bot-bg: #1e293b; /* slate-800 — assistant bubble */\n --ak-bot-text: #f1f5f9; /* slate-100 */\n /* Same doodle tile, white stroke — dark surfaces need ~1.5x the alpha to read the same */\n --ak-pattern: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220' fill='none' stroke='rgba(255,255,255,0.07)' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 30c5-8 14-8 19 0s14 8 19 0'/%3E%3Ccircle cx='96' cy='22' r='8'/%3E%3Cpath d='M150 34l6-11 6 11z'/%3E%3Cpath d='M196 18v14M189 25h14'/%3E%3Cpath d='M28 74h22M28 81h14'/%3E%3Cpath d='M84 68l8-8 8 8-8 8z'/%3E%3Cpath d='M186 76c0 7-6 12-13 12h-10l-6 6v-6c-5-1-8-6-8-12 0-7 6-12 13-12h11c7 0 13 5 13 12z'/%3E%3Ccircle cx='124' cy='104' r='5'/%3E%3Cpath d='M18 122c7-5 14-5 21 0'/%3E%3Cpath d='M62 132l7-13 7 13z'/%3E%3Cpath d='M106 156h20M106 163h12'/%3E%3Ccircle cx='176' cy='140' r='8'/%3E%3Cpath d='M32 170l6-6 6 6-6 6z'/%3E%3Cpath d='M148 196c5-7 13-7 18 0'/%3E%3Cpath d='M74 196v12M68 202h12'/%3E%3Ccircle cx='206' cy='178' r='4.5'/%3E%3Ccircle cx='58' cy='48' r='4'/%3E%3Cpath d='M128 56h16M128 62h10'/%3E%3Cpath d='M40 100l5-5 5 5-5 5z'/%3E%3Cpath d='M150 116c5-6 12-6 17 0'/%3E%3Ccircle cx='92' cy='128' r='4'/%3E%3Cpath d='M198 108v11M193 113h11'/%3E%3Cpath d='M8 148c5-7 12-7 17 0'/%3E%3Ccircle cx='142' cy='176' r='4'/%3E%3Cpath d='M76 166h16M76 172h9'/%3E%3Cpath d='M186 208l5-9 5 9z'/%3E%3Cpath d='M110 190l6-6 6 6-6 6z'/%3E%3Ccircle cx='46' cy='206' r='5'/%3E%3C/svg%3E\");\n --ak-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 8px 24px rgba(0, 0, 0, 0.4);\n --ak-maintenance-fg: #fde68a;\n --ak-maintenance-bg: rgba(253, 230, 138, 0.06);\n --ak-maintenance-halo: #f59e0b;\n}\n\n/* ── Floating layout ─────────────────────────────────────────── */\n.ak-floating {\n position: relative;\n display: flex;\n flex-direction: column;\n align-items: flex-end;\n gap: 0;\n pointer-events: none;\n}\n.ak-floating > * {\n pointer-events: all;\n}\n\n/* ── Inline layout ───────────────────────────────────────────── */\n.ak-inline {\n display: flex;\n flex-direction: column;\n width: 100%;\n height: 100%;\n min-height: 400px;\n max-height: 100%;\n}\n\n/* ── Launcher button ─────────────────────────────────────────── */\n.ak-launcher {\n width: var(--ak-launcher-size);\n height: var(--ak-launcher-size);\n border-radius: 50%;\n background: var(--ak-accent);\n border: none;\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n color: white;\n box-shadow: 0 4px 16px rgba(99, 102, 241, 0.45);\n transition: background 0.2s, transform 0.15s, box-shadow 0.2s;\n flex-shrink: 0;\n}\n.ak-launcher:hover {\n background: var(--ak-accent-hover);\n transform: scale(1.08);\n box-shadow: 0 6px 24px rgba(99, 102, 241, 0.55);\n}\n.ak-launcher:active {\n transform: scale(0.95);\n}\n.ak-launcher svg {\n pointer-events: none;\n}\n/* Launcher showing avatar image instead of chat icon */\n.ak-launcher--avatar {\n padding: 0;\n overflow: hidden;\n}\n.ak-launcher__avatar-img {\n width: 100%;\n height: 100%;\n object-fit: cover;\n border-radius: 50%;\n pointer-events: none;\n}\n\n/* ── Shell wrapper (positions the hanging branding tab) ─────── */\n.ak-shell-wrap {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n margin-bottom: var(--ak-launcher-gap);\n}\n\n/* ── Widget shell / panel ────────────────────────────────────── */\n.ak-shell {\n background: var(--ak-bg);\n border-radius: var(--ak-radius);\n box-shadow: var(--ak-shadow);\n display: flex;\n flex-direction: column;\n overflow: hidden;\n border: 1px solid var(--ak-border);\n}\n.ak-shell--floating {\n width: 380px;\n height: 580px;\n}\n.ak-shell--inline {\n width: 100%;\n height: 100%;\n min-height: 400px;\n max-height: 100%;\n border-radius: 0;\n box-shadow: none;\n border: none;\n display: flex;\n flex-direction: column;\n}\n/* Inline shell-wrap fills its container and suppresses the duplicate widget header\n (the sidebar already renders its own header and close button). */\n.ak-inline .ak-shell-wrap {\n width: 100%;\n height: 100%;\n /* No launcher in inline mode — the negative offset would overflow the host. */\n margin-bottom: 0;\n}\n.ak-inline .ak-header {\n display: none;\n}\n.ak-shell-enter {\n animation: ak-panel-in 0.2s ease-out;\n}\n@keyframes ak-panel-in {\n from { opacity: 0; transform: translateY(10px) scale(0.97); }\n to { opacity: 1; transform: translateY(0) scale(1); }\n}\n\n/* ── Header ──────────────────────────────────────────────────── */\n.ak-header {\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: space-between;\n padding: 10px 14px;\n background: var(--ak-accent);\n color: #fff;\n flex-shrink: 0;\n gap: 8px;\n}\n.ak-header--confirming {\n flex-direction: column;\n align-items: stretch;\n justify-content: flex-start;\n gap: 0;\n}\n.ak-header__row {\n display: flex;\n align-items: center;\n justify-content: space-between;\n width: 100%;\n gap: 8px;\n}\n.ak-header__status {\n width: 8px;\n height: 8px;\n border-radius: 50%;\n background: #4ade80;\n flex-shrink: 0;\n}\n.ak-header__title-group {\n flex: 1;\n display: flex;\n flex-direction: column;\n gap: 1px;\n min-width: 0;\n}\n.ak-header__title {\n font-size: 15px;\n font-weight: 600;\n letter-spacing: -0.01em;\n}\n.ak-header__subtitle {\n font-size: 11px;\n font-weight: 400;\n opacity: 0.8;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.ak-header__close {\n width: 28px;\n height: 28px;\n border-radius: 50%;\n background: rgba(255, 255, 255, 0.2);\n border: none;\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n color: #fff;\n transition: background 0.15s;\n flex-shrink: 0;\n}\n.ak-header__close:hover {\n background: rgba(255, 255, 255, 0.35);\n}\n.ak-header__avatar {\n width: 30px;\n height: 30px;\n border-radius: 50%;\n object-fit: cover;\n flex-shrink: 0;\n border: 2px solid rgba(255, 255, 255, 0.3);\n background: rgba(255, 255, 255, 0.15);\n}\n.ak-header__bot-icon {\n width: 28px;\n height: 28px;\n border-radius: 50%;\n background: rgba(255, 255, 255, 0.2);\n display: flex;\n align-items: center;\n justify-content: center;\n color: #fff;\n flex-shrink: 0;\n}\n.ak-header__button {\n width: 28px;\n height: 28px;\n border-radius: 50%;\n background: transparent;\n border: none;\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n color: #fff;\n transition: background 0.15s;\n flex-shrink: 0;\n}\n.ak-header__button:hover {\n background: rgba(255, 255, 255, 0.15);\n}\n.ak-header__button--active {\n background: rgba(255, 255, 255, 0.3);\n}\n.ak-header__confirm {\n width: 100%;\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 8px;\n padding: 8px 0 0;\n margin: 8px 0 0;\n border-top: 1px solid rgba(255, 255, 255, 0.2);\n animation: ak-confirm-in 0.18s ease-out;\n}\n@keyframes ak-confirm-in {\n from { opacity: 0; transform: translateY(-4px); }\n to { opacity: 1; transform: translateY(0); }\n}\n.ak-header__confirm-text {\n display: flex;\n flex-direction: column;\n gap: 1px;\n flex: 1;\n min-width: 0;\n}\n.ak-header__confirm-title {\n font-size: 13px;\n font-weight: 600;\n color: #fff;\n line-height: 1.3;\n}\n.ak-header__confirm-sub {\n font-size: 11px;\n color: rgba(255, 255, 255, 0.75);\n line-height: 1.3;\n}\n.ak-header__confirm-actions {\n display: flex;\n align-items: center;\n gap: 6px;\n flex-shrink: 0;\n}\n.ak-header__confirm-cancel {\n padding: 5px 10px;\n border-radius: 6px;\n border: 1px solid rgba(255, 255, 255, 0.4);\n background: transparent;\n color: #fff;\n font-family: var(--ak-font);\n font-size: 12px;\n font-weight: 500;\n cursor: pointer;\n transition: background 0.15s;\n white-space: nowrap;\n}\n.ak-header__confirm-cancel:hover {\n background: rgba(255, 255, 255, 0.15);\n}\n.ak-header__confirm-cancel:active {\n background: rgba(255, 255, 255, 0.25);\n}\n.ak-header__confirm-ok {\n padding: 5px 10px;\n border-radius: 6px;\n border: none;\n background: rgba(255, 255, 255, 0.2);\n color: #fff;\n font-family: var(--ak-font);\n font-size: 12px;\n font-weight: 600;\n cursor: pointer;\n transition: background 0.15s;\n white-space: nowrap;\n}\n.ak-header__confirm-ok:hover {\n background: rgba(239, 68, 68, 0.7);\n}\n.ak-header__confirm-ok:active {\n background: rgba(239, 68, 68, 0.85);\n}\n\n/* ── Message list ────────────────────────────────────────────── */\n.ak-messages {\n flex: 1;\n overflow-y: auto;\n padding: 12px;\n display: flex;\n flex-direction: column;\n gap: 8px;\n scroll-behavior: smooth;\n min-height: 0; /* Allow flex child to shrink below its content height */\n /* Faint doodle texture so bubbles read as objects on a surface, not floating on flat colour.\n background-attachment defaults to scroll = anchored to the padding box, so the\n pattern stays put while messages scroll. */\n background-image: var(--ak-pattern);\n background-size: var(--ak-pattern-size) var(--ak-pattern-size);\n}\n.ak-messages::-webkit-scrollbar { width: 4px; }\n.ak-messages::-webkit-scrollbar-track { background: transparent; }\n.ak-messages::-webkit-scrollbar-thumb {\n background: var(--ak-border);\n border-radius: 4px;\n}\n\n/* ── Empty state ─────────────────────────────────────────────── */\n.ak-empty-state {\n flex: 1;\n position: relative;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: safe center;\n padding: 16px;\n text-align: center;\n gap: 16px;\n overflow-y: auto;\n overflow-x: hidden;\n min-height: 0;\n /* Glow layer is translucent so the same doodle texture as .ak-messages shows through —\n keeps empty state and message list on one continuous surface. */\n background-color: var(--ak-bg);\n background-image:\n radial-gradient(ellipse 110% 55% at 50% 0%,\n color-mix(in srgb, var(--ak-accent) 10%, transparent),\n transparent 72%\n ),\n var(--ak-pattern);\n background-size: auto, var(--ak-pattern-size) var(--ak-pattern-size);\n}\n/* Decorative blurred orb behind the avatar */\n.ak-empty-state__glow {\n position: absolute;\n top: -24px;\n left: 50%;\n transform: translateX(-50%);\n width: 180px;\n height: 180px;\n border-radius: 50%;\n background: color-mix(in srgb, var(--ak-accent) 18%, transparent);\n filter: blur(48px);\n pointer-events: none;\n}\n.ak-empty-state__body {\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 8px;\n position: relative;\n width: 100%;\n}\n.ak-empty-state__avatar {\n width: 64px;\n height: 64px;\n border-radius: 50%;\n background: var(--ak-bg);\n border: 2px solid color-mix(in srgb, var(--ak-accent) 25%, var(--ak-border));\n box-shadow:\n 0 0 0 4px color-mix(in srgb, var(--ak-accent) 10%, transparent),\n 0 4px 16px color-mix(in srgb, var(--ak-accent) 20%, transparent);\n display: flex;\n align-items: center;\n justify-content: center;\n color: var(--ak-accent);\n margin-bottom: 4px;\n flex-shrink: 0;\n}\n.ak-empty-state__avatar-img {\n width: 64px;\n height: 64px;\n border-radius: 50%;\n object-fit: cover;\n}\n.ak-empty-state__bot-icon {\n display: flex;\n align-items: center;\n justify-content: center;\n}\n.ak-empty-state__title {\n margin: 0;\n font-size: 16px;\n font-weight: 700;\n color: var(--ak-text);\n line-height: 1.3;\n letter-spacing: -0.01em;\n}\n.ak-empty-state__description {\n margin: 0;\n font-size: 13px;\n color: var(--ak-text-muted);\n line-height: 1.55;\n width: 100%;\n}\n/* Suggested question chips — 2-column grid */\n.ak-empty-state__suggestions {\n display: grid;\n grid-template-columns: 1fr 1fr;\n gap: 8px;\n width: 100%;\n}\n.ak-empty-state__suggestion {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n background: color-mix(in srgb, var(--ak-accent) 5%, var(--ak-bg));\n border: 1px solid color-mix(in srgb, var(--ak-accent) 16%, var(--ak-border));\n border-radius: 10px;\n padding: 10px 12px;\n cursor: pointer;\n text-align: left;\n transition: background 0.15s ease, border-color 0.15s ease;\n}\n/* Odd last item spans both columns so the grid doesn't look lopsided */\n.ak-empty-state__suggestion:last-child:nth-child(odd) {\n grid-column: 1 / -1;\n}\n.ak-empty-state__suggestion:hover {\n background: color-mix(in srgb, var(--ak-accent) 10%, var(--ak-bg));\n border-color: color-mix(in srgb, var(--ak-accent) 30%, var(--ak-border));\n}\n.ak-empty-state__suggestion-title {\n font-size: 13px;\n font-weight: 700;\n color: var(--ak-text);\n line-height: 1.4;\n}\n.ak-empty-state__suggestion-desc {\n font-size: 12px;\n color: var(--ak-text-muted);\n line-height: 1.4;\n margin-top: 2px;\n}\n\n/* ── Message bubbles ─────────────────────────────────────────── */\n.ak-message {\n display: flex;\n flex-direction: column;\n max-width: 86%;\n animation: ak-msg-in 0.15s ease-out;\n}\n@keyframes ak-msg-in {\n from { opacity: 0; transform: translateY(4px); }\n to { opacity: 1; transform: translateY(0); }\n}\n.ak-message--user {\n align-self: flex-end;\n align-items: flex-end;\n}\n.ak-message--assistant {\n align-self: flex-start;\n align-items: flex-start;\n}\n.ak-message__bubble {\n padding: 8px 12px;\n border-radius: 16px;\n font-size: 14px;\n line-height: 1.55;\n word-break: break-word;\n white-space: pre-wrap;\n max-width: 100%;\n min-width: 0;\n}\n.ak-message__bubble--md {\n white-space: normal;\n}\n.ak-message--user .ak-message__bubble {\n background: var(--ak-user-bg);\n color: var(--ak-user-text);\n border-bottom-right-radius: 4px;\n}\n.ak-message--assistant .ak-message__bubble {\n background: var(--ak-bot-bg);\n color: var(--ak-bot-text);\n border-bottom-left-radius: 4px;\n border: 1px solid var(--ak-border);\n}\n.ak-message--error .ak-message__bubble {\n background: #fee2e2;\n color: #991b1b;\n border-color: #fca5a5;\n}\n.ak-message--operator .ak-message__bubble--operator {\n background: color-mix(in srgb, var(--ak-accent) 8%, var(--ak-bot-bg));\n border: 1px solid color-mix(in srgb, var(--ak-accent) 22%, var(--ak-border));\n}\n.ak-message__time {\n display: block;\n text-align: right;\n font-size: 11px;\n color: var(--ak-text-muted);\n margin-top: 2px;\n padding: 0 4px;\n}\n.ak-message--user .ak-message__time {\n color: rgba(255, 255, 255, 0.7);\n}\n.ak-message__sender-label {\n font-size: 11px;\n font-weight: 500;\n color: var(--ak-text-muted);\n display: inline-flex;\n align-items: center;\n gap: 6px;\n padding: 0 2px;\n margin-bottom: 4px;\n}\n.ak-message--operator .ak-message__sender-label {\n color: var(--ak-accent);\n font-weight: 600;\n}\n.ak-message__operator-avatar {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 18px;\n height: 18px;\n border-radius: 50%;\n background: var(--ak-accent);\n color: #fff;\n font-size: 10px;\n font-weight: 700;\n line-height: 1;\n flex-shrink: 0;\n}\n.ak-message__operator-name {\n line-height: 1;\n}\n.ak-handoff-divider {\n display: flex;\n align-items: center;\n gap: 10px;\n margin: 8px 4px;\n color: var(--ak-text-muted);\n font-size: 11px;\n font-weight: 500;\n}\n.ak-handoff-divider::before,\n.ak-handoff-divider::after {\n content: '';\n flex: 1;\n height: 1px;\n background: var(--ak-border);\n}\n.ak-handoff-divider__label {\n white-space: nowrap;\n padding: 2px 8px;\n border-radius: 999px;\n background: color-mix(in srgb, var(--ak-accent) 6%, var(--ak-bg));\n border: 1px solid color-mix(in srgb, var(--ak-accent) 14%, var(--ak-border));\n color: color-mix(in srgb, var(--ak-accent) 70%, var(--ak-text));\n}\n/* ── Message avatar (assistant only, when avatarUrl is set) ─── */\n.ak-message--with-avatar {\n flex-direction: row;\n align-items: flex-end;\n gap: 8px;\n}\n.ak-message__avatar {\n width: 28px;\n height: 28px;\n border-radius: 50%;\n object-fit: cover;\n flex-shrink: 0;\n background: var(--ak-surface);\n}\n.ak-message__body {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n min-width: 0;\n}\n\n/* ── Generated images ────────────────────────────────────────── */\n\n/* Bubble that contains an image — remove padding so image is flush at top */\n.ak-message__bubble--has-image {\n padding: 0;\n overflow: hidden;\n}\n\n.ak-message__images {\n display: flex;\n flex-direction: column;\n gap: 0;\n}\n\n.ak-message__image-wrap {\n position: relative;\n line-height: 0;\n}\n\n/* Clicking the image opens it in a new tab */\n.ak-message__image-link {\n display: block;\n line-height: 0;\n}\n\n.ak-message__image {\n width: 100%;\n display: block;\n transition: filter 0.2s;\n}\n\n.ak-message__image-link:hover .ak-message__image {\n filter: brightness(0.93);\n}\n\n/* ── Image gallery (count-aware layouts) ───────────────────────────────── */\n.ak-gallery {\n position: relative;\n width: 100%;\n background: #ffffff;\n overflow: hidden;\n}\n\n/* Single hero: natural aspect, contained inside a white frame so transparent\n * product PNGs read clearly. Caps at 320px tall to keep bubble compact. */\n.ak-gallery--single {\n line-height: 0;\n}\n.ak-gallery--single .ak-gallery__cell--hero {\n display: block;\n background: #ffffff;\n}\n.ak-gallery__img--contain {\n width: 100%;\n max-height: 320px;\n object-fit: contain;\n background: #ffffff;\n display: block;\n}\n\n/* 2-up: side-by-side squares, gap-1 */\n.ak-gallery--two {\n display: grid;\n grid-template-columns: 1fr 1fr;\n gap: 2px;\n background: #e2e8f0;\n}\n\n/* 3-up: big left + 2 stacked right; container holds aspect */\n.ak-gallery--three {\n display: grid;\n grid-template-columns: 2fr 1fr;\n gap: 2px;\n background: #e2e8f0;\n aspect-ratio: 4 / 3;\n}\n.ak-gallery--three > .ak-gallery__cell {\n aspect-ratio: auto;\n height: 100%;\n}\n.ak-gallery--three .ak-gallery__col {\n display: grid;\n grid-template-rows: 1fr 1fr;\n gap: 2px;\n}\n\n/* 4-up (and 5+): 2x2 grid */\n.ak-gallery--grid {\n display: grid;\n grid-template-columns: 1fr 1fr;\n gap: 2px;\n background: #e2e8f0;\n}\n\n.ak-gallery__cell {\n position: relative;\n display: block;\n overflow: hidden;\n background: #f8fafc;\n aspect-ratio: 1 / 1;\n line-height: 0;\n text-decoration: none;\n}\n\n/* Override aspect-ratio for the 3-up layout's column cells (they take parent height) */\n.ak-gallery--three .ak-gallery__col .ak-gallery__cell {\n aspect-ratio: auto;\n height: 100%;\n width: 100%;\n}\n\n.ak-gallery__img {\n width: 100%;\n height: 100%;\n object-fit: cover;\n display: block;\n transition: transform 0.2s ease-out, filter 0.2s;\n}\n\n.ak-gallery__cell:hover .ak-gallery__img {\n transform: scale(1.04);\n filter: brightness(0.97);\n}\n\n.ak-gallery__cell:focus-visible {\n outline: 2px solid var(--ak-primary, #6366f1);\n outline-offset: -2px;\n}\n\n.ak-gallery__overlay {\n position: absolute;\n inset: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n background: rgba(15, 23, 42, 0.6);\n color: #ffffff;\n font-size: 22px;\n font-weight: 600;\n letter-spacing: -0.01em;\n pointer-events: none;\n}\n\n/* ── File chips (user-uploaded .pdf/.md/.txt/.csv) ─────────────────────── */\n.ak-message__files {\n display: flex;\n flex-direction: column;\n gap: 6px;\n padding: 8px 10px 4px;\n}\n.ak-message__bubble--has-image .ak-message__files {\n padding: 8px 8px 4px;\n}\n\n.ak-file-chip {\n display: inline-flex;\n align-items: center;\n gap: 10px;\n padding: 8px 10px;\n background: var(--ak-surface);\n border: 1px solid var(--ak-border, #e2e8f0);\n border-radius: 12px;\n text-decoration: none;\n color: var(--ak-text, #0f172a);\n transition: border-color 0.15s, box-shadow 0.15s;\n max-width: 100%;\n}\n\n.ak-file-chip:hover {\n border-color: #cbd5e1;\n box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);\n}\n\n.ak-file-chip:focus-visible {\n outline: 2px solid var(--ak-primary, #6366f1);\n outline-offset: 2px;\n}\n\n.ak-file-chip__icon {\n flex-shrink: 0;\n width: 34px;\n height: 34px;\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: 8px;\n}\n\n.ak-file-chip__icon--pdf { background: #fff1f2; color: #e11d48; }\n.ak-file-chip__icon--csv { background: #ecfdf5; color: #059669; }\n.ak-file-chip__icon--md { background: #f5f3ff; color: #7c3aed; }\n.ak-file-chip__icon--txt { background: #f1f5f9; color: #475569; }\n.ak-file-chip__icon--default { background: #eef2ff; color: #4f46e5; }\n\n.ak-file-chip__body {\n display: flex;\n flex-direction: column;\n min-width: 0;\n line-height: 1.2;\n}\n\n.ak-file-chip__name {\n font-size: 13px;\n font-weight: 500;\n color: var(--ak-text, #0f172a);\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n max-width: 220px;\n}\n\n.ak-file-chip__label {\n font-size: 10px;\n font-weight: 600;\n letter-spacing: 0.05em;\n color: #64748b;\n margin-top: 2px;\n}\n\n/* In user-side bubble (dark primary background), invert chip surface for legibility */\n.ak-message--user .ak-file-chip {\n background: rgba(255, 255, 255, 0.96);\n border-color: transparent;\n}\n\n/* ── Lightbox (image preview modal) ────────────────────────────────────── */\n.ak-lightbox {\n position: fixed;\n inset: 0;\n z-index: 2147483600; /* near max int — sits above any host-page content */\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 24px;\n background: rgba(15, 23, 42, 0.85);\n backdrop-filter: blur(6px);\n -webkit-backdrop-filter: blur(6px);\n animation: ak-lightbox-in 0.12s ease-out;\n}\n\n@keyframes ak-lightbox-in {\n from { opacity: 0; }\n to { opacity: 1; }\n}\n\n.ak-lightbox__img {\n max-width: 92vw;\n max-height: 88vh;\n border-radius: 8px;\n box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.45);\n user-select: none;\n display: block;\n}\n\n.ak-lightbox__toolbar {\n position: absolute;\n top: 16px;\n right: 16px;\n display: flex;\n align-items: center;\n gap: 8px;\n}\n\n.ak-lightbox__counter {\n display: inline-flex;\n align-items: center;\n height: 28px;\n padding: 0 12px;\n border-radius: 999px;\n background: rgba(255, 255, 255, 0.12);\n color: #ffffff;\n font-size: 12px;\n font-weight: 500;\n font-variant-numeric: tabular-nums;\n}\n\n.ak-lightbox__btn {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 36px;\n height: 36px;\n border: none;\n border-radius: 999px;\n background: rgba(255, 255, 255, 0.12);\n color: #ffffff;\n cursor: pointer;\n transition: background 0.15s;\n text-decoration: none;\n padding: 0;\n}\n\n.ak-lightbox__btn:hover {\n background: rgba(255, 255, 255, 0.22);\n}\n\n.ak-lightbox__btn:focus-visible {\n outline: 2px solid rgba(255, 255, 255, 0.8);\n outline-offset: 2px;\n}\n\n.ak-lightbox__nav {\n position: absolute;\n top: 50%;\n transform: translateY(-50%);\n display: flex;\n align-items: center;\n justify-content: center;\n width: 44px;\n height: 44px;\n border: none;\n border-radius: 999px;\n background: rgba(255, 255, 255, 0.12);\n color: #ffffff;\n cursor: pointer;\n transition: background 0.15s;\n padding: 0;\n}\n\n.ak-lightbox__nav:hover {\n background: rgba(255, 255, 255, 0.22);\n}\n\n.ak-lightbox__nav--prev { left: 16px; }\n.ak-lightbox__nav--next { right: 16px; }\n\n.ak-lightbox__nav:focus-visible {\n outline: 2px solid rgba(255, 255, 255, 0.8);\n outline-offset: 2px;\n}\n\n/* Gallery cells must be styled as plain buttons (we converted from <a>) */\n.ak-gallery__cell {\n border: none;\n padding: 0;\n margin: 0;\n cursor: zoom-in;\n font: inherit;\n color: inherit;\n background: #f8fafc;\n}\n\n.ak-gallery__cell:focus-visible {\n outline: 2px solid var(--ak-primary, #6366f1);\n outline-offset: -2px;\n}\n\n/* Faint download icon — always present, top-right corner of the image */\n.ak-message__image-dl-icon {\n position: absolute;\n top: 8px;\n right: 8px;\n width: 26px;\n height: 26px;\n background: rgba(0, 0, 0, 0.28);\n border-radius: 50%;\n display: flex;\n align-items: center;\n justify-content: center;\n color: rgba(255, 255, 255, 0.75);\n text-decoration: none;\n transition: background 0.15s, color 0.15s;\n}\n\n.ak-message__image-dl-icon:hover {\n background: rgba(0, 0, 0, 0.55);\n color: #ffffff;\n}\n\n/* Caption / text below the image, inside the same bubble */\n.ak-message__image-caption {\n padding: 8px 10px 8px;\n font-size: 14px;\n font-style: normal;\n color: var(--ak-text);\n line-height: 1.45;\n}\n\n/* User-uploaded image caption uses user bubble colors */\n.ak-message--user .ak-message__image-caption {\n color: rgba(255, 255, 255, 0.8);\n font-style: normal;\n}\n\n/* ── Typing indicator ────────────────────────────────────────── */\n.ak-typing {\n display: flex;\n align-items: center;\n gap: 5px;\n padding: 9px 12px;\n background: var(--ak-bot-bg);\n border-radius: 16px;\n border-bottom-left-radius: 4px;\n border: 1px solid var(--ak-border);\n align-self: flex-start;\n width: fit-content;\n animation: ak-msg-in 0.15s ease-out;\n}\n.ak-typing__dot {\n width: 7px;\n height: 7px;\n background: var(--ak-text-muted);\n border-radius: 50%;\n animation: ak-bounce 1.3s infinite ease-in-out;\n}\n.ak-typing__dot:nth-child(2) { animation-delay: 0.2s; }\n.ak-typing__dot:nth-child(3) { animation-delay: 0.4s; }\n@keyframes ak-bounce {\n 0%, 60%, 100% { transform: translateY(0); opacity: 0.6; }\n 30% { transform: translateY(-5px); opacity: 1; }\n}\n\n/* ── Init status (validating / error) ───────────────────────── */\n.ak-init-status {\n flex: 1;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n padding: 24px;\n}\n.ak-init-spinner {\n width: 28px;\n height: 28px;\n border: 3px solid var(--ak-border);\n border-top-color: var(--ak-accent);\n border-radius: 50%;\n animation: ak-spin 0.7s linear infinite;\n}\n@keyframes ak-spin {\n to { transform: rotate(360deg); }\n}\n.ak-init-status--error {\n justify-content: flex-start;\n}\n.ak-init-status--maintenance {\n padding: 28px 24px;\n}\n\n/* ── Composer ────────────────────────────────────────────────── */\n.ak-composer {\n position: relative; /* establishes positioning context for the attachment submenu */\n padding: 8px 12px 10px;\n border-top: 1px solid var(--ak-border);\n display: flex;\n flex-direction: column;\n gap: 8px;\n background: var(--ak-bg);\n flex-shrink: 0;\n}\n\n/* Hidden native file input */\n.ak-composer__file-input {\n display: none;\n}\n\n/* Unified input container — wraps +, textarea, send as one row */\n.ak-composer__input-wrap {\n display: flex;\n align-items: center;\n gap: 6px;\n background: var(--ak-surface);\n border: 1px solid var(--ak-border);\n border-radius: 14px;\n padding: 5px 5px 5px 6px;\n transition: border-color 0.15s;\n}\n.ak-composer__input-wrap:focus-within {\n border-color: var(--ak-accent);\n}\n\n/* Attach button wrapper */\n.ak-composer__attach-wrap {\n flex-shrink: 0;\n}\n\n/* \"+\" attachment button — square with rounded corners */\n.ak-composer__attach {\n width: 28px;\n height: 28px;\n border-radius: 8px;\n background: var(--ak-bg);\n border: 1px solid var(--ak-border);\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n color: var(--ak-text-muted);\n transition: color 0.15s, border-color 0.15s, background 0.15s;\n flex-shrink: 0;\n}\n.ak-composer__attach:hover:not(:disabled) {\n color: var(--ak-accent);\n border-color: var(--ak-accent);\n}\n.ak-composer__attach--open {\n color: var(--ak-accent);\n border-color: var(--ak-accent);\n background: color-mix(in srgb, var(--ak-accent) 8%, transparent);\n}\n.ak-composer__attach:disabled {\n opacity: 0.4;\n cursor: not-allowed;\n}\n\n/* Attachment submenu — floats above the composer, positioned relative to .ak-composer */\n.ak-composer__attach-menu {\n position: absolute;\n bottom: calc(100% + 6px);\n left: 12px;\n background: var(--ak-surface);\n border: 1px solid var(--ak-border);\n border-radius: 10px;\n box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);\n padding: 4px;\n min-width: 130px;\n z-index: 10;\n}\n\n/* Individual item inside the attachment submenu */\n.ak-composer__attach-menu-item {\n display: flex;\n align-items: center;\n gap: 8px;\n width: 100%;\n padding: 7px 10px;\n border: none;\n border-radius: 7px;\n background: transparent;\n color: var(--ak-text);\n font-family: var(--ak-font);\n font-size: 13px;\n cursor: pointer;\n transition: background 0.12s;\n text-align: left;\n}\n.ak-composer__attach-menu-item:hover:not(:disabled) {\n background: var(--ak-bg);\n}\n.ak-composer__attach-menu-item:disabled {\n opacity: 0.4;\n cursor: not-allowed;\n}\n\n/* Textarea — borderless, transparent, sits inside the container */\n.ak-composer__input {\n flex: 1;\n padding: 4px 6px;\n border: none;\n border-radius: 0;\n background: transparent;\n color: var(--ak-text);\n font-family: var(--ak-font);\n font-size: 14px;\n line-height: 1.45;\n resize: none;\n outline: none;\n min-height: 28px;\n max-height: 110px;\n overflow-y: auto;\n}\n.ak-composer__input::placeholder {\n color: var(--ak-text-muted);\n}\n\n/* Send button — square with rounded corners */\n.ak-composer__send {\n width: 28px;\n height: 28px;\n border-radius: 8px;\n background: var(--ak-accent);\n border: none;\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n color: white;\n transition: background 0.15s, opacity 0.15s;\n flex-shrink: 0;\n}\n.ak-composer__send:hover:not(:disabled) {\n background: var(--ak-accent-hover);\n}\n.ak-composer__send:disabled {\n opacity: 0.45;\n cursor: not-allowed;\n}\n\n/* Old photo button — hidden but keep so file-input trigger still works */\n.ak-composer__photo {\n display: none;\n}\n\n/* Image preview strip above the input row */\n.ak-composer__preview {\n display: flex;\n gap: 6px;\n padding: 0 2px;\n}\n.ak-composer__preview-wrap {\n position: relative;\n width: 60px;\n height: 60px;\n border-radius: 8px;\n overflow: hidden;\n border: 1px solid var(--ak-border);\n flex-shrink: 0;\n}\n.ak-composer__preview-img {\n width: 100%;\n height: 100%;\n object-fit: cover;\n display: block;\n}\n.ak-composer__preview-remove {\n position: absolute;\n top: 3px;\n right: 3px;\n width: 18px;\n height: 18px;\n border-radius: 50%;\n background: rgba(0, 0, 0, 0.55);\n border: none;\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n color: #ffffff;\n padding: 0;\n transition: background 0.15s;\n}\n.ak-composer__preview-remove:hover {\n background: rgba(0, 0, 0, 0.8);\n}\n\n/* ── Streaming cursor ────────────────────────────────────────── */\n.ak-cursor {\n display: inline-flex;\n align-items: center;\n gap: 3px;\n margin-left: 4px;\n vertical-align: middle;\n}\n.ak-cursor__dot {\n display: inline-block;\n width: 7px;\n height: 7px;\n border-radius: 50%;\n background: currentColor;\n opacity: 0.6;\n animation: ak-bounce 1.3s infinite ease-in-out;\n}\n.ak-cursor__dot:nth-child(2) { animation-delay: 0.2s; }\n.ak-cursor__dot:nth-child(3) { animation-delay: 0.4s; }\n\n/* Pre-first-chunk wait — deliberately shares the metrics of .ak-progress__item\n and .ak-progress__summary so dots → activity line → summary never reflow. */\n.ak-typing-row {\n display: inline-flex;\n align-items: center;\n gap: 5px;\n padding: 2px 0;\n margin: 0 0 4px;\n /* One text line at the shared row metrics, so the dots occupy exactly the\n box the activity line and summary will occupy (border-box). */\n min-height: calc(0.76rem * 1.4 + 4px);\n animation: ak-msg-in 0.15s ease-out;\n}\n.ak-typing-row__dot {\n width: 6px;\n height: 6px;\n border-radius: 50%;\n background: var(--ak-bot-text);\n opacity: 0.5;\n animation: ak-bounce 1.3s infinite ease-in-out;\n}\n.ak-typing-row__dot:nth-child(2) { animation-delay: 0.2s; }\n.ak-typing-row__dot:nth-child(3) { animation-delay: 0.4s; }\n@media (prefers-reduced-motion: reduce) {\n .ak-typing-row__dot,\n .ak-cursor__dot,\n .ak-typing__dot,\n .ak-progress__item--active,\n .ak-agent-status__icon {\n animation: none;\n }\n}\n\n/* ── Markdown rendering ──────────────────────────────────────── */\n.ak-message__bubble--md {\n white-space: normal;\n min-width: 0;\n}\n.ak-message__bubble--md .ak-md-p {\n margin: 0 0 0.4em 0;\n}\n.ak-message__bubble--md .ak-md-p:last-child {\n margin-bottom: 0;\n}\n/* Collapse margins between paragraph and following list */\n.ak-message__bubble--md .ak-md-p + .ak-md-ul,\n.ak-message__bubble--md .ak-md-p + .ak-md-ol {\n margin-top: 0;\n}\n.ak-message__bubble--md .ak-md-h1,\n.ak-message__bubble--md .ak-md-h2,\n.ak-message__bubble--md .ak-md-h3 {\n font-weight: 700;\n line-height: 1.3;\n margin: 0.6em 0 0.3em;\n}\n.ak-message__bubble--md .ak-md-h1:first-child,\n.ak-message__bubble--md .ak-md-h2:first-child,\n.ak-message__bubble--md .ak-md-h3:first-child {\n margin-top: 0;\n}\n.ak-message__bubble--md .ak-md-h1 { font-size: 1.12em; }\n.ak-message__bubble--md .ak-md-h2 { font-size: 1.04em; }\n.ak-message__bubble--md .ak-md-h3 { font-size: 0.97em; }\n.ak-message__bubble--md .ak-md-ul,\n.ak-message__bubble--md .ak-md-ol {\n padding-left: 1.4em;\n margin: 0.4em 0;\n}\n.ak-message__bubble--md .ak-md-ul li,\n.ak-message__bubble--md .ak-md-ol li {\n margin-bottom: 0.15em;\n}\n.ak-message__bubble--md .ak-md-pre-wrap {\n position: relative;\n margin: 0.4em 0;\n border-radius: 6px;\n overflow-x: auto;\n overflow-y: hidden;\n background: rgba(0, 0, 0, 0.08);\n max-width: 100%;\n}\n.ak-message--user .ak-message__bubble--md .ak-md-pre-wrap {\n background: rgba(255, 255, 255, 0.15);\n}\n.ak-message__bubble--md .ak-md-pre-lang {\n display: block;\n padding: 3px 10px;\n font-size: 10px;\n font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;\n font-weight: 600;\n text-transform: uppercase;\n letter-spacing: 0.05em;\n opacity: 0.55;\n border-bottom: 1px solid rgba(0, 0, 0, 0.08);\n}\n.ak-message--user .ak-message__bubble--md .ak-md-pre-lang {\n border-bottom-color: rgba(255, 255, 255, 0.15);\n}\n.ak-message__bubble--md .ak-md-pre {\n margin: 0;\n padding: 8px 10px;\n font-size: 12px;\n font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;\n white-space: pre;\n box-sizing: border-box;\n}\n.ak-message__bubble--md .ak-md-code {\n display: block;\n font-family: inherit;\n font-size: inherit;\n}\n.ak-message__bubble--md .ak-md-ic {\n background: rgba(0, 0, 0, 0.08);\n border-radius: 3px;\n padding: 1px 5px;\n font-size: 0.87em;\n font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;\n}\n.ak-message--user .ak-message__bubble--md .ak-md-ic {\n background: rgba(255, 255, 255, 0.2);\n}\n.ak-message__bubble--md .ak-md-hr {\n border: none;\n border-top: 1px solid currentColor;\n opacity: 0.2;\n margin: 0.5em 0;\n}\n.ak-message__bubble--md a {\n color: var(--ak-accent);\n text-decoration: underline;\n text-underline-offset: 2px;\n}\n.ak-message--user .ak-message__bubble--md a {\n color: rgba(255, 255, 255, 0.9);\n}\n.ak-message__bubble--md .ak-md-table {\n width: 100%;\n border-collapse: collapse;\n margin: 0.4em 0;\n font-size: 0.95em;\n line-height: 1.5;\n}\n.ak-message__bubble--md .ak-md-th {\n padding: 8px 10px;\n text-align: left;\n border-bottom: 2px solid var(--ak-accent) !important;\n background: color-mix(in srgb, var(--ak-accent) 8%, transparent) !important;\n font-weight: 600;\n color: var(--ak-text) !important;\n}\n.ak-message--user .ak-message__bubble--md .ak-md-th {\n border-bottom-color: rgba(255, 255, 255, 0.5) !important;\n background: rgba(0, 0, 0, 0.25) !important;\n color: #ffffff !important;\n font-weight: 700;\n}\n.ak-message__bubble--md .ak-md-td {\n padding: 6px 10px;\n border-bottom: 1px solid var(--ak-border) !important;\n color: var(--ak-text) !important;\n}\n.ak-message__bubble--md tr:nth-child(even) .ak-md-td {\n background: color-mix(in srgb, var(--ak-surface), transparent 40%) !important;\n}\n.ak-message--user .ak-message__bubble--md .ak-md-td {\n color: #ffffff !important;\n border-bottom-color: rgba(255, 255, 255, 0.25) !important;\n}\n.ak-message--user .ak-message__bubble--md tr:nth-child(even) .ak-md-td {\n background: rgba(0, 0, 0, 0.15) !important;\n}\n\n/* ── Composer disclaimer ─────────────────────────────────────── */\n.ak-composer__disclaimer {\n font-size: 11px;\n color: var(--ak-text-muted);\n text-align: center;\n line-height: 1.4;\n}\n.ak-composer__disclaimer a {\n color: var(--ak-text-muted);\n text-decoration: underline;\n text-underline-offset: 2px;\n}\n.ak-composer__disclaimer a:hover {\n color: var(--ak-accent);\n}\n\n/* ── Maintenance state ───────────────────────────────────────── */\n.ak-maintenance {\n position: relative;\n display: flex;\n flex-direction: column;\n align-items: center;\n text-align: center;\n max-width: 320px;\n padding: 8px 4px;\n animation: ak-maintenance-enter 320ms cubic-bezier(0.2, 0.7, 0.2, 1) both;\n}\n.ak-maintenance__halo {\n position: absolute;\n top: -6px;\n left: 50%;\n width: 120px;\n height: 120px;\n transform: translateX(-50%);\n border-radius: 50%;\n background: radial-gradient(\n closest-side,\n var(--ak-maintenance-halo) 0%,\n transparent 72%\n );\n opacity: 0.22;\n filter: blur(4px);\n pointer-events: none;\n animation: ak-maintenance-pulse 2.8s ease-in-out infinite;\n}\n.ak-maintenance__icon {\n position: relative;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 56px;\n height: 56px;\n border-radius: 50%;\n background: var(--ak-maintenance-bg);\n color: var(--ak-maintenance-fg);\n border: 1px solid color-mix(in srgb, var(--ak-maintenance-halo) 40%, transparent);\n box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);\n}\n.ak-maintenance__title {\n margin-top: 16px;\n font-size: 15px;\n font-weight: 600;\n color: var(--ak-text);\n line-height: 1.3;\n letter-spacing: -0.01em;\n}\n.ak-maintenance__description {\n margin-top: 6px;\n font-size: 13px;\n color: var(--ak-text-muted);\n line-height: 1.5;\n max-width: 28ch;\n}\n\n@keyframes ak-maintenance-enter {\n from {\n opacity: 0;\n transform: translateY(6px) scale(0.98);\n }\n to {\n opacity: 1;\n transform: translateY(0) scale(1);\n }\n}\n@keyframes ak-maintenance-pulse {\n 0%, 100% { opacity: 0.18; transform: translateX(-50%) scale(1); }\n 50% { opacity: 0.32; transform: translateX(-50%) scale(1.06); }\n}\n@media (prefers-reduced-motion: reduce) {\n .ak-maintenance,\n .ak-maintenance__halo,\n .ak-maintenance__icon {\n animation: none;\n }\n}\n\n/* ── Error banner ────────────────────────────────────────────── */\n.ak-error {\n padding: 12px 16px;\n background: #fee2e2;\n color: #991b1b;\n font-size: 13px;\n border-top: 1px solid #fca5a5;\n text-align: left;\n flex-shrink: 0;\n display: flex;\n align-items: flex-start;\n gap: 10px;\n}\n\n.ak-error__icon {\n font-size: 16px;\n line-height: 1;\n flex-shrink: 0;\n margin-top: 1px;\n}\n\n.ak-error__content {\n flex: 1;\n}\n\n.ak-error__title {\n font-size: 14px;\n font-weight: 600;\n margin: 0 0 4px 0;\n line-height: 1.3;\n}\n\n.ak-error__description {\n font-size: 13px;\n margin: 0 0 4px 0;\n line-height: 1.4;\n opacity: 0.9;\n}\n\n.ak-error__message {\n font-size: 13px;\n margin: 0;\n line-height: 1.4;\n opacity: 0.85;\n}\n\n/* Specific styling for origin restriction errors */\n.ak-error--origin {\n background: #fef3c7; /* Amber background instead of red for less scary appearance */\n color: #92400e; /* Amber text color */\n border-top: 1px solid #fbbf24;\n}\n\n/* ── Agent status indicator ──────────────────────────────────── */\n/* Same bare row as .ak-progress__item / .ak-typing-row — activity-off tenants\n see the tool status swap in without the surrounding box changing size. */\n.ak-agent-status {\n display: inline-flex;\n align-items: center;\n gap: 6px;\n margin-bottom: 4px;\n padding: 2px 0;\n color: var(--ak-bot-text);\n font-size: 0.76rem;\n line-height: 1.4;\n opacity: 0.6;\n animation: ak-msg-in 0.15s ease-out;\n}\n.ak-agent-status__icon {\n flex-shrink: 0;\n color: var(--ak-primary, #6366f1);\n animation: ak-sparkle-pulse 2.5s ease-in-out infinite;\n}\n.ak-agent-status__text {\n line-height: 1.4;\n}\n@keyframes ak-sparkle-pulse {\n 0%, 100% { opacity: 1; transform: scale(1) rotate(0deg); }\n 50% { opacity: 0.45; transform: scale(0.85) rotate(15deg); }\n}\n\n/* ── Progress block (tool execution / streaming chain) ───────── */\n.ak-progress {\n margin-bottom: 4px;\n max-width: 80%;\n}\n.ak-progress__block {\n display: inline-flex;\n flex-direction: column;\n gap: 3px;\n padding: 6px 12px;\n border-radius: 14px;\n background: var(--ak-bot-bg);\n border: 1px solid var(--ak-border);\n font-size: 0.8rem;\n color: var(--ak-bot-text);\n opacity: 0.85;\n animation: ak-msg-in 0.15s ease-out;\n}\n.ak-progress__header {\n display: flex;\n align-items: center;\n gap: 8px;\n}\n.ak-progress__label {\n font-weight: 600;\n font-size: 0.78rem;\n color: var(--ak-primary, #6366f1);\n}\n.ak-progress__toggle {\n display: inline-flex;\n align-items: center;\n gap: 3px;\n padding: 1px 7px;\n border: 1px solid var(--ak-border);\n border-radius: 8px;\n background: transparent;\n color: var(--ak-bot-text);\n font-size: 0.72rem;\n cursor: pointer;\n opacity: 0.65;\n transition: opacity 0.15s;\n}\n.ak-progress__toggle:hover { opacity: 0.9; }\n.ak-progress__toggle--collapsed {\n display: inline-flex;\n align-items: center;\n gap: 5px;\n padding: 5px 10px;\n border: 1px solid var(--ak-border);\n border-radius: 12px;\n background: transparent;\n color: var(--ak-bot-text);\n font-size: 0.78rem;\n cursor: pointer;\n opacity: 0.55;\n transition: opacity 0.15s;\n margin-bottom: 4px;\n}\n.ak-progress__toggle--collapsed:hover { opacity: 0.85; }\n.ak-progress__text {\n font-size: 0.76rem;\n color: var(--ak-bot-text);\n line-height: 1.4;\n margin: 0;\n}\n/* Active streaming state */\n.ak-progress__list {\n list-style: none;\n margin: 0 0 4px;\n padding: 0;\n}\n/* Bare row, not a pill — identical metrics to .ak-progress__summary so the\n live line and the post-turn \"Worked for Ns\" swap without a size change. */\n.ak-progress__item {\n display: flex;\n align-items: center;\n gap: 6px;\n padding: 2px 0;\n font-size: 0.76rem;\n line-height: 1.4;\n color: var(--ak-bot-text);\n opacity: 0.6;\n animation: ak-msg-in 0.15s ease-out;\n}\n.ak-progress__item--active {\n /* inherits base .ak-progress__item; subtle pulse to signal in-flight */\n animation: ak-msg-in 0.15s ease-out, ak-active-pulse 2s ease-in-out infinite;\n}\n@keyframes ak-active-pulse {\n 0%, 100% { opacity: 0.6; }\n 50% { opacity: 0.9; }\n}\n/* Claude-style step list (detailed mode) */\n.ak-progress__steps {\n list-style: none;\n margin: 0 0 4px;\n padding: 2px 0;\n}\n.ak-progress__step {\n display: flex;\n align-items: center;\n gap: 6px;\n padding: 2px 0;\n font-size: 0.76rem;\n color: var(--ak-bot-text);\n opacity: 0.6;\n line-height: 1.4;\n}\n.ak-progress__step--active {\n opacity: 0.9;\n}\n.ak-progress__step-text {\n min-width: 0;\n}\n.ak-progress__step-dur {\n opacity: 0.65;\n flex-shrink: 0;\n}\n.ak-progress__step-icon {\n flex-shrink: 0;\n opacity: 0.55;\n}\n.ak-progress__step-icon--fail {\n color: #ef4444;\n opacity: 0.9;\n}\n/* Post-turn summary row (\"Worked for Ns · N steps\") */\n.ak-progress__summary {\n display: inline-flex;\n align-items: center;\n gap: 6px;\n padding: 2px 0;\n margin: 0 0 4px;\n /* Shrink-to-fit as a column flex item would otherwise break \"Worked for 8.4s\"\n onto two lines, doubling the row height as the turn ends. */\n white-space: nowrap;\n border: none;\n background: transparent;\n font-size: 0.76rem;\n color: var(--ak-bot-text);\n opacity: 0.6;\n cursor: pointer;\n transition: opacity 0.15s;\n}\n.ak-progress__summary:hover { opacity: 0.85; }\n.ak-progress__summary--static {\n cursor: default;\n}\n.ak-progress__summary--static:hover { opacity: 0.6; }\n.ak-progress__spinner {\n display: inline-block;\n width: 11px;\n height: 11px;\n border: 1.5px solid var(--ak-border);\n border-top-color: var(--ak-primary, #6366f1);\n border-radius: 50%;\n flex-shrink: 0;\n animation: ak-spin 0.7s linear infinite;\n}\n\n/* ── Powered by hanging tab ──────────────────────────────────── */\n.ak-branding {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n padding: 3px 8px 4px;\n background: var(--ak-bg);\n border: 1px solid var(--ak-border);\n border-top: none;\n border-radius: 0 0 8px 8px;\n margin-left: 16px;\n box-shadow: 0 4px 8px rgba(0, 0, 0, 0.06);\n}\n.ak-branding__logo {\n width: 11px;\n height: 11px;\n flex-shrink: 0;\n color: var(--ak-accent);\n opacity: 0.75;\n}\n.ak-branding__label {\n font-size: 9px;\n color: var(--ak-text-muted);\n opacity: 0.75;\n}\n.ak-branding__name {\n font-size: 9px;\n font-weight: 600;\n color: var(--ak-accent);\n opacity: 0.75;\n letter-spacing: -0.01em;\n}\n\n/* ── Mobile: full-viewport panel ─────────────────────────────── */\n@media (max-width: 639px) {\n @keyframes ak-panel-in-mobile {\n from { opacity: 0; transform: translateY(32px); }\n to { opacity: 1; transform: translateY(0); }\n }\n\n /* The shadow host (data-agentkit-widget) sits inside the outer fixed container.\n Give it its own fixed position so it fills the viewport independently,\n bypassing the outer container's bottom/right offsets. */\n :host([data-open]) {\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n z-index: 2147483647;\n pointer-events: none;\n }\n\n :host([data-open]) .ak-floating {\n width: 100%;\n height: 100%;\n align-items: stretch;\n gap: 0;\n }\n\n :host([data-open]) .ak-shell-wrap {\n flex: 1;\n min-height: 0;\n width: 100%;\n align-items: stretch;\n /* Launcher is hidden here — the negative offset would leave a dead strip. */\n margin-bottom: 0;\n }\n\n :host([data-open]) .ak-shell--floating {\n width: 100%;\n flex: 1;\n height: auto;\n border-radius: 0;\n box-shadow: none;\n border-left: none;\n border-right: none;\n border-top: none;\n }\n\n :host([data-open]) .ak-launcher {\n display: none;\n }\n\n :host([data-open]) .ak-shell-enter {\n animation: ak-panel-in-mobile 0.22s ease-out;\n }\n\n :host([data-open]) .ak-branding {\n display: none;\n }\n}\n";
5858
+ var Oa = "\n*, *::before, *::after {\n box-sizing: border-box;\n margin: 0;\n padding: 0;\n}\n\n:host {\n --ak-accent: #6366f1;\n --ak-accent-hover: #4f46e5;\n --ak-bg: #ffffff;\n --ak-surface: #f9fafb;\n --ak-text: #111827;\n --ak-text-muted: #6b7280;\n --ak-border: #e5e7eb;\n --ak-user-bg: var(--ak-accent);\n --ak-user-text: #ffffff;\n --ak-bot-bg: #f3f4f6;\n --ak-bot-text: #111827;\n --ak-maintenance-fg: #92400e;\n --ak-maintenance-bg: #fffbeb;\n --ak-maintenance-halo: #fcd34d;\n --ak-font: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;\n --ak-radius: 12px;\n /* Chat surface texture — scattered line doodles, tiled. Neutral stroke (not accent-tinted)\n so it stays a texture rather than competing with brand colour. Alpha is baked into the\n SVG stroke, so the light/dark variants differ only in stroke rgba. */\n --ak-pattern: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220' fill='none' stroke='rgba(0,0,0,0.045)' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 30c5-8 14-8 19 0s14 8 19 0'/%3E%3Ccircle cx='96' cy='22' r='8'/%3E%3Cpath d='M150 34l6-11 6 11z'/%3E%3Cpath d='M196 18v14M189 25h14'/%3E%3Cpath d='M28 74h22M28 81h14'/%3E%3Cpath d='M84 68l8-8 8 8-8 8z'/%3E%3Cpath d='M186 76c0 7-6 12-13 12h-10l-6 6v-6c-5-1-8-6-8-12 0-7 6-12 13-12h11c7 0 13 5 13 12z'/%3E%3Ccircle cx='124' cy='104' r='5'/%3E%3Cpath d='M18 122c7-5 14-5 21 0'/%3E%3Cpath d='M62 132l7-13 7 13z'/%3E%3Cpath d='M106 156h20M106 163h12'/%3E%3Ccircle cx='176' cy='140' r='8'/%3E%3Cpath d='M32 170l6-6 6 6-6 6z'/%3E%3Cpath d='M148 196c5-7 13-7 18 0'/%3E%3Cpath d='M74 196v12M68 202h12'/%3E%3Ccircle cx='206' cy='178' r='4.5'/%3E%3Ccircle cx='58' cy='48' r='4'/%3E%3Cpath d='M128 56h16M128 62h10'/%3E%3Cpath d='M40 100l5-5 5 5-5 5z'/%3E%3Cpath d='M150 116c5-6 12-6 17 0'/%3E%3Ccircle cx='92' cy='128' r='4'/%3E%3Cpath d='M198 108v11M193 113h11'/%3E%3Cpath d='M8 148c5-7 12-7 17 0'/%3E%3Ccircle cx='142' cy='176' r='4'/%3E%3Cpath d='M76 166h16M76 172h9'/%3E%3Cpath d='M186 208l5-9 5 9z'/%3E%3Cpath d='M110 190l6-6 6 6-6 6z'/%3E%3Ccircle cx='46' cy='206' r='5'/%3E%3C/svg%3E\");\n --ak-pattern-size: 210px;\n --ak-shadow: 0 20px 60px rgba(0, 0, 0, 0.15), 0 8px 24px rgba(0, 0, 0, 0.08);\n --ak-launcher-size: 56px;\n /* Panel-to-launcher offset. Negative pulls the launcher up toward the panel.\n Applied as a margin on .ak-shell-wrap because CSS gap rejects negatives. */\n --ak-launcher-gap: -12px;\n font-family: var(--ak-font);\n -webkit-font-smoothing: antialiased;\n}\n\n/* Dark mode — set data-theme=\"dark\" on the shadow host element.\n Slate palette, aligned with the KlicForge dashboard dark tokens. */\n:host([data-theme=\"dark\"]) {\n --ak-bg: #0f172a; /* slate-900 — panel surface */\n --ak-surface: #1e293b; /* slate-800 — inputs, insets (lift off panel) */\n --ak-text: #f1f5f9; /* slate-100 */\n --ak-text-muted: #94a3b8;/* slate-400 */\n --ak-border: #334155; /* slate-700 */\n --ak-bot-bg: #1e293b; /* slate-800 — assistant bubble */\n --ak-bot-text: #f1f5f9; /* slate-100 */\n /* Same doodle tile, white stroke — dark surfaces need ~1.5x the alpha to read the same */\n --ak-pattern: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220' fill='none' stroke='rgba(255,255,255,0.07)' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 30c5-8 14-8 19 0s14 8 19 0'/%3E%3Ccircle cx='96' cy='22' r='8'/%3E%3Cpath d='M150 34l6-11 6 11z'/%3E%3Cpath d='M196 18v14M189 25h14'/%3E%3Cpath d='M28 74h22M28 81h14'/%3E%3Cpath d='M84 68l8-8 8 8-8 8z'/%3E%3Cpath d='M186 76c0 7-6 12-13 12h-10l-6 6v-6c-5-1-8-6-8-12 0-7 6-12 13-12h11c7 0 13 5 13 12z'/%3E%3Ccircle cx='124' cy='104' r='5'/%3E%3Cpath d='M18 122c7-5 14-5 21 0'/%3E%3Cpath d='M62 132l7-13 7 13z'/%3E%3Cpath d='M106 156h20M106 163h12'/%3E%3Ccircle cx='176' cy='140' r='8'/%3E%3Cpath d='M32 170l6-6 6 6-6 6z'/%3E%3Cpath d='M148 196c5-7 13-7 18 0'/%3E%3Cpath d='M74 196v12M68 202h12'/%3E%3Ccircle cx='206' cy='178' r='4.5'/%3E%3Ccircle cx='58' cy='48' r='4'/%3E%3Cpath d='M128 56h16M128 62h10'/%3E%3Cpath d='M40 100l5-5 5 5-5 5z'/%3E%3Cpath d='M150 116c5-6 12-6 17 0'/%3E%3Ccircle cx='92' cy='128' r='4'/%3E%3Cpath d='M198 108v11M193 113h11'/%3E%3Cpath d='M8 148c5-7 12-7 17 0'/%3E%3Ccircle cx='142' cy='176' r='4'/%3E%3Cpath d='M76 166h16M76 172h9'/%3E%3Cpath d='M186 208l5-9 5 9z'/%3E%3Cpath d='M110 190l6-6 6 6-6 6z'/%3E%3Ccircle cx='46' cy='206' r='5'/%3E%3C/svg%3E\");\n --ak-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 8px 24px rgba(0, 0, 0, 0.4);\n --ak-maintenance-fg: #fde68a;\n --ak-maintenance-bg: rgba(253, 230, 138, 0.06);\n --ak-maintenance-halo: #f59e0b;\n}\n\n/* ── Floating layout ─────────────────────────────────────────── */\n.ak-floating {\n position: relative;\n display: flex;\n flex-direction: column;\n align-items: flex-end;\n gap: 0;\n pointer-events: none;\n}\n.ak-floating > * {\n pointer-events: all;\n}\n\n/* ── Inline layout ───────────────────────────────────────────── */\n.ak-inline {\n display: flex;\n flex-direction: column;\n width: 100%;\n height: 100%;\n min-height: 400px;\n max-height: 100%;\n}\n\n/* ── Launcher button ─────────────────────────────────────────── */\n.ak-launcher {\n width: var(--ak-launcher-size);\n height: var(--ak-launcher-size);\n border-radius: 50%;\n background: var(--ak-accent);\n border: none;\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n color: white;\n box-shadow: 0 4px 16px rgba(99, 102, 241, 0.45);\n transition: background 0.2s, transform 0.15s, box-shadow 0.2s;\n flex-shrink: 0;\n}\n.ak-launcher:hover {\n background: var(--ak-accent-hover);\n transform: scale(1.08);\n box-shadow: 0 6px 24px rgba(99, 102, 241, 0.55);\n}\n.ak-launcher:active {\n transform: scale(0.95);\n}\n.ak-launcher svg {\n pointer-events: none;\n}\n/* Launcher showing avatar image instead of chat icon */\n.ak-launcher--avatar {\n padding: 0;\n overflow: hidden;\n}\n.ak-launcher__avatar-img {\n width: 100%;\n height: 100%;\n object-fit: cover;\n border-radius: 50%;\n pointer-events: none;\n}\n\n/* ── Shell wrapper (positions the hanging branding tab) ─────── */\n.ak-shell-wrap {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n margin-bottom: var(--ak-launcher-gap);\n}\n\n/* ── Widget shell / panel ────────────────────────────────────── */\n.ak-shell {\n background: var(--ak-bg);\n border-radius: var(--ak-radius);\n box-shadow: var(--ak-shadow);\n display: flex;\n flex-direction: column;\n overflow: hidden;\n border: 1px solid var(--ak-border);\n}\n.ak-shell--floating {\n width: 380px;\n height: 580px;\n}\n.ak-shell--inline {\n width: 100%;\n height: 100%;\n min-height: 400px;\n max-height: 100%;\n border-radius: 0;\n box-shadow: none;\n border: none;\n display: flex;\n flex-direction: column;\n}\n/* Inline shell-wrap fills its container and suppresses the duplicate widget header\n (the sidebar already renders its own header and close button). */\n.ak-inline .ak-shell-wrap {\n width: 100%;\n height: 100%;\n /* No launcher in inline mode — the negative offset would overflow the host. */\n margin-bottom: 0;\n}\n.ak-inline .ak-header {\n display: none;\n}\n.ak-shell-enter {\n animation: ak-panel-in 0.2s ease-out;\n}\n@keyframes ak-panel-in {\n from { opacity: 0; transform: translateY(10px) scale(0.97); }\n to { opacity: 1; transform: translateY(0) scale(1); }\n}\n\n/* ── Header ──────────────────────────────────────────────────── */\n.ak-header {\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: space-between;\n padding: 10px 14px;\n background: var(--ak-accent);\n color: #fff;\n flex-shrink: 0;\n gap: 8px;\n}\n.ak-header--confirming {\n flex-direction: column;\n align-items: stretch;\n justify-content: flex-start;\n gap: 0;\n}\n.ak-header__row {\n display: flex;\n align-items: center;\n justify-content: space-between;\n width: 100%;\n gap: 8px;\n}\n.ak-header__status {\n width: 8px;\n height: 8px;\n border-radius: 50%;\n background: #4ade80;\n flex-shrink: 0;\n}\n.ak-header__title-group {\n flex: 1;\n display: flex;\n flex-direction: column;\n gap: 1px;\n min-width: 0;\n}\n.ak-header__title {\n font-size: 15px;\n font-weight: 600;\n letter-spacing: -0.01em;\n}\n.ak-header__subtitle {\n font-size: 11px;\n font-weight: 400;\n opacity: 0.8;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.ak-header__close {\n width: 28px;\n height: 28px;\n border-radius: 50%;\n background: rgba(255, 255, 255, 0.2);\n border: none;\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n color: #fff;\n transition: background 0.15s;\n flex-shrink: 0;\n}\n.ak-header__close:hover {\n background: rgba(255, 255, 255, 0.35);\n}\n.ak-header__avatar {\n width: 30px;\n height: 30px;\n border-radius: 50%;\n object-fit: cover;\n flex-shrink: 0;\n border: 2px solid rgba(255, 255, 255, 0.3);\n background: rgba(255, 255, 255, 0.15);\n}\n.ak-header__bot-icon {\n width: 28px;\n height: 28px;\n border-radius: 50%;\n background: rgba(255, 255, 255, 0.2);\n display: flex;\n align-items: center;\n justify-content: center;\n color: #fff;\n flex-shrink: 0;\n}\n.ak-header__button {\n width: 28px;\n height: 28px;\n border-radius: 50%;\n background: transparent;\n border: none;\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n color: #fff;\n transition: background 0.15s;\n flex-shrink: 0;\n}\n.ak-header__button:hover {\n background: rgba(255, 255, 255, 0.15);\n}\n.ak-header__button--active {\n background: rgba(255, 255, 255, 0.3);\n}\n.ak-header__confirm {\n width: 100%;\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 8px;\n padding: 8px 0 0;\n margin: 8px 0 0;\n border-top: 1px solid rgba(255, 255, 255, 0.2);\n animation: ak-confirm-in 0.18s ease-out;\n}\n@keyframes ak-confirm-in {\n from { opacity: 0; transform: translateY(-4px); }\n to { opacity: 1; transform: translateY(0); }\n}\n.ak-header__confirm-text {\n display: flex;\n flex-direction: column;\n gap: 1px;\n flex: 1;\n min-width: 0;\n}\n.ak-header__confirm-title {\n font-size: 13px;\n font-weight: 600;\n color: #fff;\n line-height: 1.3;\n}\n.ak-header__confirm-sub {\n font-size: 11px;\n color: rgba(255, 255, 255, 0.75);\n line-height: 1.3;\n}\n.ak-header__confirm-actions {\n display: flex;\n align-items: center;\n gap: 6px;\n flex-shrink: 0;\n}\n.ak-header__confirm-cancel {\n padding: 5px 10px;\n border-radius: 6px;\n border: 1px solid rgba(255, 255, 255, 0.4);\n background: transparent;\n color: #fff;\n font-family: var(--ak-font);\n font-size: 12px;\n font-weight: 500;\n cursor: pointer;\n transition: background 0.15s;\n white-space: nowrap;\n}\n.ak-header__confirm-cancel:hover {\n background: rgba(255, 255, 255, 0.15);\n}\n.ak-header__confirm-cancel:active {\n background: rgba(255, 255, 255, 0.25);\n}\n.ak-header__confirm-ok {\n padding: 5px 10px;\n border-radius: 6px;\n border: none;\n background: rgba(255, 255, 255, 0.2);\n color: #fff;\n font-family: var(--ak-font);\n font-size: 12px;\n font-weight: 600;\n cursor: pointer;\n transition: background 0.15s;\n white-space: nowrap;\n}\n.ak-header__confirm-ok:hover {\n background: rgba(239, 68, 68, 0.7);\n}\n.ak-header__confirm-ok:active {\n background: rgba(239, 68, 68, 0.85);\n}\n\n/* ── Message list ────────────────────────────────────────────── */\n.ak-messages {\n flex: 1;\n overflow-y: auto;\n padding: 12px;\n display: flex;\n flex-direction: column;\n gap: 8px;\n scroll-behavior: smooth;\n min-height: 0; /* Allow flex child to shrink below its content height */\n /* Faint doodle texture so bubbles read as objects on a surface, not floating on flat colour.\n background-attachment defaults to scroll = anchored to the padding box, so the\n pattern stays put while messages scroll. */\n background-image: var(--ak-pattern);\n background-size: var(--ak-pattern-size) var(--ak-pattern-size);\n}\n.ak-messages::-webkit-scrollbar { width: 4px; }\n.ak-messages::-webkit-scrollbar-track { background: transparent; }\n.ak-messages::-webkit-scrollbar-thumb {\n background: var(--ak-border);\n border-radius: 4px;\n}\n\n/* ── Empty state ─────────────────────────────────────────────── */\n.ak-empty-state {\n flex: 1;\n position: relative;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: safe center;\n padding: 16px;\n text-align: center;\n gap: 16px;\n overflow-y: auto;\n overflow-x: hidden;\n min-height: 0;\n /* Glow layer is translucent so the same doodle texture as .ak-messages shows through —\n keeps empty state and message list on one continuous surface. */\n background-color: var(--ak-bg);\n background-image:\n radial-gradient(ellipse 110% 55% at 50% 0%,\n color-mix(in srgb, var(--ak-accent) 10%, transparent),\n transparent 72%\n ),\n var(--ak-pattern);\n background-size: auto, var(--ak-pattern-size) var(--ak-pattern-size);\n}\n/* Decorative blurred orb behind the avatar */\n.ak-empty-state__glow {\n position: absolute;\n top: -24px;\n left: 50%;\n transform: translateX(-50%);\n width: 180px;\n height: 180px;\n border-radius: 50%;\n background: color-mix(in srgb, var(--ak-accent) 18%, transparent);\n filter: blur(48px);\n pointer-events: none;\n}\n.ak-empty-state__body {\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 8px;\n position: relative;\n width: 100%;\n}\n.ak-empty-state__avatar {\n width: 64px;\n height: 64px;\n border-radius: 50%;\n background: var(--ak-bg);\n border: 2px solid color-mix(in srgb, var(--ak-accent) 25%, var(--ak-border));\n box-shadow:\n 0 0 0 4px color-mix(in srgb, var(--ak-accent) 10%, transparent),\n 0 4px 16px color-mix(in srgb, var(--ak-accent) 20%, transparent);\n display: flex;\n align-items: center;\n justify-content: center;\n color: var(--ak-accent);\n margin-bottom: 4px;\n flex-shrink: 0;\n}\n.ak-empty-state__avatar-img {\n width: 64px;\n height: 64px;\n border-radius: 50%;\n object-fit: cover;\n}\n.ak-empty-state__bot-icon {\n display: flex;\n align-items: center;\n justify-content: center;\n}\n.ak-empty-state__title {\n margin: 0;\n font-size: 16px;\n font-weight: 700;\n color: var(--ak-text);\n line-height: 1.3;\n letter-spacing: -0.01em;\n}\n.ak-empty-state__description {\n margin: 0;\n font-size: 13px;\n color: var(--ak-text-muted);\n line-height: 1.55;\n width: 100%;\n}\n/* Suggested question chips — 2-column grid */\n.ak-empty-state__suggestions {\n display: grid;\n grid-template-columns: 1fr 1fr;\n gap: 8px;\n width: 100%;\n}\n.ak-empty-state__suggestion {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n background: color-mix(in srgb, var(--ak-accent) 5%, var(--ak-bg));\n border: 1px solid color-mix(in srgb, var(--ak-accent) 16%, var(--ak-border));\n border-radius: 10px;\n padding: 10px 12px;\n cursor: pointer;\n text-align: left;\n transition: background 0.15s ease, border-color 0.15s ease;\n}\n/* Odd last item spans both columns so the grid doesn't look lopsided */\n.ak-empty-state__suggestion:last-child:nth-child(odd) {\n grid-column: 1 / -1;\n}\n.ak-empty-state__suggestion:hover {\n background: color-mix(in srgb, var(--ak-accent) 10%, var(--ak-bg));\n border-color: color-mix(in srgb, var(--ak-accent) 30%, var(--ak-border));\n}\n.ak-empty-state__suggestion-title {\n font-size: 13px;\n font-weight: 700;\n color: var(--ak-text);\n line-height: 1.4;\n}\n.ak-empty-state__suggestion-desc {\n font-size: 12px;\n color: var(--ak-text-muted);\n line-height: 1.4;\n margin-top: 2px;\n}\n\n/* ── Message bubbles ─────────────────────────────────────────── */\n.ak-message {\n display: flex;\n flex-direction: column;\n max-width: 86%;\n animation: ak-msg-in 0.15s ease-out;\n}\n@keyframes ak-msg-in {\n from { opacity: 0; transform: translateY(4px); }\n to { opacity: 1; transform: translateY(0); }\n}\n.ak-message--user {\n align-self: flex-end;\n align-items: flex-end;\n}\n.ak-message--assistant {\n align-self: flex-start;\n align-items: flex-start;\n}\n.ak-message__bubble {\n padding: 8px 12px;\n border-radius: 16px;\n font-size: 14px;\n line-height: 1.55;\n word-break: break-word;\n white-space: pre-wrap;\n max-width: 100%;\n min-width: 0;\n}\n.ak-message__bubble--md {\n white-space: normal;\n}\n.ak-message--user .ak-message__bubble {\n background: var(--ak-user-bg);\n color: var(--ak-user-text);\n border-bottom-right-radius: 4px;\n}\n.ak-message--assistant .ak-message__bubble {\n background: var(--ak-bot-bg);\n color: var(--ak-bot-text);\n border-bottom-left-radius: 4px;\n border: 1px solid var(--ak-border);\n}\n.ak-message--error .ak-message__bubble {\n background: #fee2e2;\n color: #991b1b;\n border-color: #fca5a5;\n}\n.ak-message--operator .ak-message__bubble--operator {\n background: color-mix(in srgb, var(--ak-accent) 8%, var(--ak-bot-bg));\n border: 1px solid color-mix(in srgb, var(--ak-accent) 22%, var(--ak-border));\n}\n.ak-message__time {\n display: block;\n text-align: right;\n font-size: 11px;\n color: var(--ak-text-muted);\n margin-top: 2px;\n padding: 0 4px;\n}\n.ak-message--user .ak-message__time {\n color: rgba(255, 255, 255, 0.7);\n}\n.ak-message__sender-label {\n font-size: 11px;\n font-weight: 500;\n color: var(--ak-text-muted);\n display: inline-flex;\n align-items: center;\n gap: 6px;\n padding: 0 2px;\n margin-bottom: 4px;\n}\n.ak-message--operator .ak-message__sender-label {\n color: var(--ak-accent);\n font-weight: 600;\n}\n.ak-message__operator-avatar {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 18px;\n height: 18px;\n border-radius: 50%;\n background: var(--ak-accent);\n color: #fff;\n font-size: 10px;\n font-weight: 700;\n line-height: 1;\n flex-shrink: 0;\n}\n.ak-message__operator-name {\n line-height: 1;\n}\n.ak-handoff-divider {\n display: flex;\n align-items: center;\n gap: 10px;\n margin: 8px 4px;\n color: var(--ak-text-muted);\n font-size: 11px;\n font-weight: 500;\n}\n.ak-handoff-divider::before,\n.ak-handoff-divider::after {\n content: '';\n flex: 1;\n height: 1px;\n background: var(--ak-border);\n}\n.ak-handoff-divider__label {\n white-space: nowrap;\n padding: 2px 8px;\n border-radius: 999px;\n background: color-mix(in srgb, var(--ak-accent) 6%, var(--ak-bg));\n border: 1px solid color-mix(in srgb, var(--ak-accent) 14%, var(--ak-border));\n color: color-mix(in srgb, var(--ak-accent) 70%, var(--ak-text));\n}\n/* ── Message avatar (assistant only, when avatarUrl is set) ─── */\n.ak-message--with-avatar {\n flex-direction: row;\n align-items: flex-end;\n gap: 8px;\n}\n.ak-message__avatar {\n width: 28px;\n height: 28px;\n border-radius: 50%;\n object-fit: cover;\n flex-shrink: 0;\n background: var(--ak-surface);\n}\n.ak-message__body {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n min-width: 0;\n}\n\n/* ── Generated images ────────────────────────────────────────── */\n\n/* Bubble that contains an image — remove padding so image is flush at top */\n.ak-message__bubble--has-image {\n padding: 0;\n overflow: hidden;\n}\n\n.ak-message__images {\n display: flex;\n flex-direction: column;\n gap: 0;\n}\n\n.ak-message__image-wrap {\n position: relative;\n line-height: 0;\n}\n\n/* Clicking the image opens it in a new tab */\n.ak-message__image-link {\n display: block;\n line-height: 0;\n}\n\n.ak-message__image {\n width: 100%;\n display: block;\n transition: filter 0.2s;\n}\n\n.ak-message__image-link:hover .ak-message__image {\n filter: brightness(0.93);\n}\n\n/* ── Image gallery (count-aware layouts) ───────────────────────────────── */\n.ak-gallery {\n position: relative;\n width: 100%;\n background: #ffffff;\n overflow: hidden;\n}\n\n/* Single hero: natural aspect, contained inside a white frame so transparent\n * product PNGs read clearly. Caps at 320px tall to keep bubble compact. */\n.ak-gallery--single {\n line-height: 0;\n}\n.ak-gallery--single .ak-gallery__cell--hero {\n display: block;\n background: #ffffff;\n}\n.ak-gallery__img--contain {\n width: 100%;\n max-height: 320px;\n object-fit: contain;\n background: #ffffff;\n display: block;\n}\n\n/* 2-up: side-by-side squares, gap-1 */\n.ak-gallery--two {\n display: grid;\n grid-template-columns: 1fr 1fr;\n gap: 2px;\n background: #e2e8f0;\n}\n\n/* 3-up: big left + 2 stacked right; container holds aspect */\n.ak-gallery--three {\n display: grid;\n grid-template-columns: 2fr 1fr;\n gap: 2px;\n background: #e2e8f0;\n aspect-ratio: 4 / 3;\n}\n.ak-gallery--three > .ak-gallery__cell {\n aspect-ratio: auto;\n height: 100%;\n}\n.ak-gallery--three .ak-gallery__col {\n display: grid;\n grid-template-rows: 1fr 1fr;\n gap: 2px;\n}\n\n/* 4-up (and 5+): 2x2 grid */\n.ak-gallery--grid {\n display: grid;\n grid-template-columns: 1fr 1fr;\n gap: 2px;\n background: #e2e8f0;\n}\n\n.ak-gallery__cell {\n position: relative;\n display: block;\n overflow: hidden;\n background: #f8fafc;\n aspect-ratio: 1 / 1;\n line-height: 0;\n text-decoration: none;\n}\n\n/* Override aspect-ratio for the 3-up layout's column cells (they take parent height) */\n.ak-gallery--three .ak-gallery__col .ak-gallery__cell {\n aspect-ratio: auto;\n height: 100%;\n width: 100%;\n}\n\n.ak-gallery__img {\n width: 100%;\n height: 100%;\n object-fit: cover;\n display: block;\n transition: transform 0.2s ease-out, filter 0.2s;\n}\n\n.ak-gallery__cell:hover .ak-gallery__img {\n transform: scale(1.04);\n filter: brightness(0.97);\n}\n\n.ak-gallery__cell:focus-visible {\n outline: 2px solid var(--ak-primary, #6366f1);\n outline-offset: -2px;\n}\n\n.ak-gallery__overlay {\n position: absolute;\n inset: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n background: rgba(15, 23, 42, 0.6);\n color: #ffffff;\n font-size: 22px;\n font-weight: 600;\n letter-spacing: -0.01em;\n pointer-events: none;\n}\n\n/* ── File chips (user-uploaded .pdf/.md/.txt/.csv) ─────────────────────── */\n.ak-message__files {\n display: flex;\n flex-direction: column;\n gap: 6px;\n padding: 8px 10px 4px;\n}\n.ak-message__bubble--has-image .ak-message__files {\n padding: 8px 8px 4px;\n}\n\n.ak-file-chip {\n display: inline-flex;\n align-items: center;\n gap: 10px;\n padding: 8px 10px;\n background: var(--ak-surface);\n border: 1px solid var(--ak-border, #e2e8f0);\n border-radius: 12px;\n text-decoration: none;\n color: var(--ak-text, #0f172a);\n transition: border-color 0.15s, box-shadow 0.15s;\n max-width: 100%;\n}\n\n.ak-file-chip:hover {\n border-color: #cbd5e1;\n box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);\n}\n\n.ak-file-chip:focus-visible {\n outline: 2px solid var(--ak-primary, #6366f1);\n outline-offset: 2px;\n}\n\n.ak-file-chip__icon {\n flex-shrink: 0;\n width: 34px;\n height: 34px;\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: 8px;\n}\n\n.ak-file-chip__icon--pdf { background: #fff1f2; color: #e11d48; }\n.ak-file-chip__icon--csv { background: #ecfdf5; color: #059669; }\n.ak-file-chip__icon--md { background: #f5f3ff; color: #7c3aed; }\n.ak-file-chip__icon--txt { background: #f1f5f9; color: #475569; }\n.ak-file-chip__icon--default { background: #eef2ff; color: #4f46e5; }\n\n.ak-file-chip__body {\n display: flex;\n flex-direction: column;\n min-width: 0;\n line-height: 1.2;\n}\n\n.ak-file-chip__name {\n font-size: 13px;\n font-weight: 500;\n color: var(--ak-text, #0f172a);\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n max-width: 220px;\n}\n\n.ak-file-chip__label {\n font-size: 10px;\n font-weight: 600;\n letter-spacing: 0.05em;\n color: #64748b;\n margin-top: 2px;\n}\n\n/* In user-side bubble (dark primary background), invert chip surface for legibility */\n.ak-message--user .ak-file-chip {\n background: rgba(255, 255, 255, 0.96);\n border-color: transparent;\n}\n\n/* ── Voice note player (audio attachment) ──────────────────────────────── */\n.ak-audio-chip {\n display: inline-flex;\n flex-direction: column;\n gap: 6px;\n padding: 8px 10px;\n background: var(--ak-surface);\n border: 1px solid var(--ak-border, #e2e8f0);\n border-radius: 12px;\n max-width: 100%;\n}\n\n.ak-message--user .ak-audio-chip {\n background: rgba(255, 255, 255, 0.96);\n border-color: transparent;\n}\n\n.ak-audio-chip__player {\n height: 36px;\n max-width: 260px;\n}\n\n.ak-audio-chip__transcript {\n margin: 0;\n font-size: 12px;\n font-style: italic;\n line-height: 1.4;\n color: var(--ak-text-muted);\n}\n\n/* ── Lightbox (image preview modal) ────────────────────────────────────── */\n.ak-lightbox {\n position: fixed;\n inset: 0;\n z-index: 2147483600; /* near max int — sits above any host-page content */\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 24px;\n background: rgba(15, 23, 42, 0.85);\n backdrop-filter: blur(6px);\n -webkit-backdrop-filter: blur(6px);\n animation: ak-lightbox-in 0.12s ease-out;\n}\n\n@keyframes ak-lightbox-in {\n from { opacity: 0; }\n to { opacity: 1; }\n}\n\n.ak-lightbox__img {\n max-width: 92vw;\n max-height: 88vh;\n border-radius: 8px;\n box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.45);\n user-select: none;\n display: block;\n}\n\n.ak-lightbox__toolbar {\n position: absolute;\n top: 16px;\n right: 16px;\n display: flex;\n align-items: center;\n gap: 8px;\n}\n\n.ak-lightbox__counter {\n display: inline-flex;\n align-items: center;\n height: 28px;\n padding: 0 12px;\n border-radius: 999px;\n background: rgba(255, 255, 255, 0.12);\n color: #ffffff;\n font-size: 12px;\n font-weight: 500;\n font-variant-numeric: tabular-nums;\n}\n\n.ak-lightbox__btn {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 36px;\n height: 36px;\n border: none;\n border-radius: 999px;\n background: rgba(255, 255, 255, 0.12);\n color: #ffffff;\n cursor: pointer;\n transition: background 0.15s;\n text-decoration: none;\n padding: 0;\n}\n\n.ak-lightbox__btn:hover {\n background: rgba(255, 255, 255, 0.22);\n}\n\n.ak-lightbox__btn:focus-visible {\n outline: 2px solid rgba(255, 255, 255, 0.8);\n outline-offset: 2px;\n}\n\n.ak-lightbox__nav {\n position: absolute;\n top: 50%;\n transform: translateY(-50%);\n display: flex;\n align-items: center;\n justify-content: center;\n width: 44px;\n height: 44px;\n border: none;\n border-radius: 999px;\n background: rgba(255, 255, 255, 0.12);\n color: #ffffff;\n cursor: pointer;\n transition: background 0.15s;\n padding: 0;\n}\n\n.ak-lightbox__nav:hover {\n background: rgba(255, 255, 255, 0.22);\n}\n\n.ak-lightbox__nav--prev { left: 16px; }\n.ak-lightbox__nav--next { right: 16px; }\n\n.ak-lightbox__nav:focus-visible {\n outline: 2px solid rgba(255, 255, 255, 0.8);\n outline-offset: 2px;\n}\n\n/* Gallery cells must be styled as plain buttons (we converted from <a>) */\n.ak-gallery__cell {\n border: none;\n padding: 0;\n margin: 0;\n cursor: zoom-in;\n font: inherit;\n color: inherit;\n background: #f8fafc;\n}\n\n.ak-gallery__cell:focus-visible {\n outline: 2px solid var(--ak-primary, #6366f1);\n outline-offset: -2px;\n}\n\n/* Faint download icon — always present, top-right corner of the image */\n.ak-message__image-dl-icon {\n position: absolute;\n top: 8px;\n right: 8px;\n width: 26px;\n height: 26px;\n background: rgba(0, 0, 0, 0.28);\n border-radius: 50%;\n display: flex;\n align-items: center;\n justify-content: center;\n color: rgba(255, 255, 255, 0.75);\n text-decoration: none;\n transition: background 0.15s, color 0.15s;\n}\n\n.ak-message__image-dl-icon:hover {\n background: rgba(0, 0, 0, 0.55);\n color: #ffffff;\n}\n\n/* Caption / text below the image, inside the same bubble */\n.ak-message__image-caption {\n padding: 8px 10px 8px;\n font-size: 14px;\n font-style: normal;\n color: var(--ak-text);\n line-height: 1.45;\n}\n\n/* User-uploaded image caption uses user bubble colors */\n.ak-message--user .ak-message__image-caption {\n color: rgba(255, 255, 255, 0.8);\n font-style: normal;\n}\n\n/* ── Typing indicator ────────────────────────────────────────── */\n.ak-typing {\n display: flex;\n align-items: center;\n gap: 5px;\n padding: 9px 12px;\n background: var(--ak-bot-bg);\n border-radius: 16px;\n border-bottom-left-radius: 4px;\n border: 1px solid var(--ak-border);\n align-self: flex-start;\n width: fit-content;\n animation: ak-msg-in 0.15s ease-out;\n}\n.ak-typing__dot {\n width: 7px;\n height: 7px;\n background: var(--ak-text-muted);\n border-radius: 50%;\n animation: ak-bounce 1.3s infinite ease-in-out;\n}\n.ak-typing__dot:nth-child(2) { animation-delay: 0.2s; }\n.ak-typing__dot:nth-child(3) { animation-delay: 0.4s; }\n@keyframes ak-bounce {\n 0%, 60%, 100% { transform: translateY(0); opacity: 0.6; }\n 30% { transform: translateY(-5px); opacity: 1; }\n}\n\n/* ── Init status (validating / error) ───────────────────────── */\n.ak-init-status {\n flex: 1;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n padding: 24px;\n}\n.ak-init-spinner {\n width: 28px;\n height: 28px;\n border: 3px solid var(--ak-border);\n border-top-color: var(--ak-accent);\n border-radius: 50%;\n animation: ak-spin 0.7s linear infinite;\n}\n@keyframes ak-spin {\n to { transform: rotate(360deg); }\n}\n.ak-init-status--error {\n justify-content: flex-start;\n}\n.ak-init-status--maintenance {\n padding: 28px 24px;\n}\n\n/* ── Composer ────────────────────────────────────────────────── */\n.ak-composer {\n position: relative; /* establishes positioning context for the attachment submenu */\n padding: 8px 12px 10px;\n border-top: 1px solid var(--ak-border);\n display: flex;\n flex-direction: column;\n gap: 8px;\n background: var(--ak-bg);\n flex-shrink: 0;\n}\n\n/* Hidden native file input */\n.ak-composer__file-input {\n display: none;\n}\n\n/* Unified input container — wraps +, textarea, send as one row */\n.ak-composer__input-wrap {\n display: flex;\n align-items: center;\n gap: 6px;\n background: var(--ak-surface);\n border: 1px solid var(--ak-border);\n border-radius: 14px;\n padding: 5px 5px 5px 6px;\n transition: border-color 0.15s;\n}\n.ak-composer__input-wrap:focus-within {\n border-color: var(--ak-accent);\n}\n\n/* Attach button wrapper */\n.ak-composer__attach-wrap {\n flex-shrink: 0;\n}\n\n/* \"+\" attachment button — square with rounded corners */\n.ak-composer__attach {\n width: 28px;\n height: 28px;\n border-radius: 8px;\n background: var(--ak-bg);\n border: 1px solid var(--ak-border);\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n color: var(--ak-text-muted);\n transition: color 0.15s, border-color 0.15s, background 0.15s;\n flex-shrink: 0;\n}\n.ak-composer__attach:hover:not(:disabled) {\n color: var(--ak-accent);\n border-color: var(--ak-accent);\n}\n.ak-composer__attach--open {\n color: var(--ak-accent);\n border-color: var(--ak-accent);\n background: color-mix(in srgb, var(--ak-accent) 8%, transparent);\n}\n.ak-composer__attach:disabled {\n opacity: 0.4;\n cursor: not-allowed;\n}\n\n/* Attachment submenu — floats above the composer, positioned relative to .ak-composer */\n.ak-composer__attach-menu {\n position: absolute;\n bottom: calc(100% + 6px);\n left: 12px;\n background: var(--ak-surface);\n border: 1px solid var(--ak-border);\n border-radius: 10px;\n box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);\n padding: 4px;\n min-width: 130px;\n z-index: 10;\n}\n\n/* Individual item inside the attachment submenu */\n.ak-composer__attach-menu-item {\n display: flex;\n align-items: center;\n gap: 8px;\n width: 100%;\n padding: 7px 10px;\n border: none;\n border-radius: 7px;\n background: transparent;\n color: var(--ak-text);\n font-family: var(--ak-font);\n font-size: 13px;\n cursor: pointer;\n transition: background 0.12s;\n text-align: left;\n}\n.ak-composer__attach-menu-item:hover:not(:disabled) {\n background: var(--ak-bg);\n}\n.ak-composer__attach-menu-item:disabled {\n opacity: 0.4;\n cursor: not-allowed;\n}\n\n/* Textarea — borderless, transparent, sits inside the container */\n.ak-composer__input {\n flex: 1;\n padding: 4px 6px;\n border: none;\n border-radius: 0;\n background: transparent;\n color: var(--ak-text);\n font-family: var(--ak-font);\n font-size: 16px; /* iOS zooms the page when a focused input is under 16px */\n line-height: 1.45;\n resize: none;\n outline: none;\n min-height: 28px;\n max-height: 110px;\n overflow-y: auto;\n}\n.ak-composer__input::placeholder {\n color: var(--ak-text-muted);\n}\n\n/* Mic button — square with rounded corners, sibling of the \"+\" attach button */\n.ak-composer__mic {\n width: 28px;\n height: 28px;\n border-radius: 8px;\n background: var(--ak-bg);\n border: 1px solid var(--ak-border);\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n color: var(--ak-text-muted);\n transition: color 0.15s, border-color 0.15s, background 0.15s;\n flex-shrink: 0;\n}\n.ak-composer__mic:hover:not(:disabled) {\n color: var(--ak-accent);\n border-color: var(--ak-accent);\n}\n.ak-composer__mic:disabled {\n opacity: 0.4;\n cursor: not-allowed;\n}\n\n/* Recording bar — replaces the input row while a voice note is being recorded */\n.ak-composer__recording {\n display: flex;\n align-items: center;\n gap: 10px;\n flex: 1;\n padding: 2px 2px 2px 6px;\n}\n.ak-composer__recording-timer {\n display: flex;\n align-items: center;\n gap: 8px;\n flex: 1;\n color: var(--ak-text);\n font-family: var(--ak-font);\n font-size: 13px;\n font-variant-numeric: tabular-nums;\n}\n.ak-composer__recording-dot {\n width: 8px;\n height: 8px;\n border-radius: 50%;\n background: #ef4444;\n animation: ak-recording-pulse 1.4s ease-in-out infinite;\n}\n@keyframes ak-recording-pulse {\n 0%,\n 100% {\n opacity: 1;\n }\n 50% {\n opacity: 0.35;\n }\n}\n.ak-composer__recording-cancel,\n.ak-composer__recording-stop {\n width: 28px;\n height: 28px;\n border-radius: 8px;\n border: none;\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n transition: background 0.15s, color 0.15s;\n}\n.ak-composer__recording-cancel {\n background: transparent;\n color: var(--ak-text-muted);\n}\n.ak-composer__recording-cancel:hover {\n color: var(--ak-text);\n background: var(--ak-bg);\n}\n.ak-composer__recording-stop {\n background: var(--ak-accent);\n color: white;\n}\n.ak-composer__recording-stop:hover {\n background: var(--ak-accent-hover);\n}\n\n/* Send button — square with rounded corners */\n.ak-composer__send {\n width: 28px;\n height: 28px;\n border-radius: 8px;\n background: var(--ak-accent);\n border: none;\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n color: white;\n transition: background 0.15s, opacity 0.15s;\n flex-shrink: 0;\n}\n.ak-composer__send:hover:not(:disabled) {\n background: var(--ak-accent-hover);\n}\n.ak-composer__send:disabled {\n opacity: 0.45;\n cursor: not-allowed;\n}\n\n/* Old photo button — hidden but keep so file-input trigger still works */\n.ak-composer__photo {\n display: none;\n}\n\n/* Image preview strip above the input row */\n.ak-composer__preview {\n display: flex;\n gap: 6px;\n padding: 0 2px;\n}\n.ak-composer__preview-wrap {\n position: relative;\n width: 60px;\n height: 60px;\n border-radius: 8px;\n overflow: hidden;\n border: 1px solid var(--ak-border);\n flex-shrink: 0;\n}\n.ak-composer__preview-img {\n width: 100%;\n height: 100%;\n object-fit: cover;\n display: block;\n}\n.ak-composer__preview-remove {\n position: absolute;\n top: 3px;\n right: 3px;\n width: 18px;\n height: 18px;\n border-radius: 50%;\n background: rgba(0, 0, 0, 0.55);\n border: none;\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n color: #ffffff;\n padding: 0;\n transition: background 0.15s;\n}\n.ak-composer__preview-remove:hover {\n background: rgba(0, 0, 0, 0.8);\n}\n\n/* ── Streaming cursor ────────────────────────────────────────── */\n.ak-cursor {\n display: inline-flex;\n align-items: center;\n gap: 3px;\n margin-left: 4px;\n vertical-align: middle;\n}\n.ak-cursor__dot {\n display: inline-block;\n width: 7px;\n height: 7px;\n border-radius: 50%;\n background: currentColor;\n opacity: 0.6;\n animation: ak-bounce 1.3s infinite ease-in-out;\n}\n.ak-cursor__dot:nth-child(2) { animation-delay: 0.2s; }\n.ak-cursor__dot:nth-child(3) { animation-delay: 0.4s; }\n\n/* Pre-first-chunk wait — deliberately shares the metrics of .ak-progress__item\n and .ak-progress__summary so dots → activity line → summary never reflow. */\n.ak-typing-row {\n display: inline-flex;\n align-items: center;\n gap: 5px;\n padding: 2px 0;\n margin: 0 0 4px;\n /* One text line at the shared row metrics, so the dots occupy exactly the\n box the activity line and summary will occupy (border-box). */\n min-height: calc(0.76rem * 1.4 + 4px);\n animation: ak-msg-in 0.15s ease-out;\n}\n.ak-typing-row__dot {\n width: 6px;\n height: 6px;\n border-radius: 50%;\n background: var(--ak-bot-text);\n opacity: 0.5;\n animation: ak-bounce 1.3s infinite ease-in-out;\n}\n.ak-typing-row__dot:nth-child(2) { animation-delay: 0.2s; }\n.ak-typing-row__dot:nth-child(3) { animation-delay: 0.4s; }\n@media (prefers-reduced-motion: reduce) {\n .ak-typing-row__dot,\n .ak-cursor__dot,\n .ak-typing__dot,\n .ak-progress__item--active,\n .ak-agent-status__icon {\n animation: none;\n }\n}\n\n/* ── Markdown rendering ──────────────────────────────────────── */\n.ak-message__bubble--md {\n white-space: normal;\n min-width: 0;\n}\n.ak-message__bubble--md .ak-md-p {\n margin: 0 0 0.4em 0;\n}\n.ak-message__bubble--md .ak-md-p:last-child {\n margin-bottom: 0;\n}\n/* Collapse margins between paragraph and following list */\n.ak-message__bubble--md .ak-md-p + .ak-md-ul,\n.ak-message__bubble--md .ak-md-p + .ak-md-ol {\n margin-top: 0;\n}\n.ak-message__bubble--md .ak-md-h1,\n.ak-message__bubble--md .ak-md-h2,\n.ak-message__bubble--md .ak-md-h3 {\n font-weight: 700;\n line-height: 1.3;\n margin: 0.6em 0 0.3em;\n}\n.ak-message__bubble--md .ak-md-h1:first-child,\n.ak-message__bubble--md .ak-md-h2:first-child,\n.ak-message__bubble--md .ak-md-h3:first-child {\n margin-top: 0;\n}\n.ak-message__bubble--md .ak-md-h1 { font-size: 1.12em; }\n.ak-message__bubble--md .ak-md-h2 { font-size: 1.04em; }\n.ak-message__bubble--md .ak-md-h3 { font-size: 0.97em; }\n.ak-message__bubble--md .ak-md-ul,\n.ak-message__bubble--md .ak-md-ol {\n padding-left: 1.4em;\n margin: 0.4em 0;\n}\n.ak-message__bubble--md .ak-md-ul li,\n.ak-message__bubble--md .ak-md-ol li {\n margin-bottom: 0.15em;\n}\n.ak-message__bubble--md .ak-md-pre-wrap {\n position: relative;\n margin: 0.4em 0;\n border-radius: 6px;\n overflow-x: auto;\n overflow-y: hidden;\n background: rgba(0, 0, 0, 0.08);\n max-width: 100%;\n}\n.ak-message--user .ak-message__bubble--md .ak-md-pre-wrap {\n background: rgba(255, 255, 255, 0.15);\n}\n.ak-message__bubble--md .ak-md-pre-lang {\n display: block;\n padding: 3px 10px;\n font-size: 10px;\n font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;\n font-weight: 600;\n text-transform: uppercase;\n letter-spacing: 0.05em;\n opacity: 0.55;\n border-bottom: 1px solid rgba(0, 0, 0, 0.08);\n}\n.ak-message--user .ak-message__bubble--md .ak-md-pre-lang {\n border-bottom-color: rgba(255, 255, 255, 0.15);\n}\n.ak-message__bubble--md .ak-md-pre {\n margin: 0;\n padding: 8px 10px;\n font-size: 12px;\n font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;\n white-space: pre;\n box-sizing: border-box;\n}\n.ak-message__bubble--md .ak-md-code {\n display: block;\n font-family: inherit;\n font-size: inherit;\n}\n.ak-message__bubble--md .ak-md-ic {\n background: rgba(0, 0, 0, 0.08);\n border-radius: 3px;\n padding: 1px 5px;\n font-size: 0.87em;\n font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;\n}\n.ak-message--user .ak-message__bubble--md .ak-md-ic {\n background: rgba(255, 255, 255, 0.2);\n}\n.ak-message__bubble--md .ak-md-hr {\n border: none;\n border-top: 1px solid currentColor;\n opacity: 0.2;\n margin: 0.5em 0;\n}\n.ak-message__bubble--md a {\n color: var(--ak-accent);\n text-decoration: underline;\n text-underline-offset: 2px;\n}\n.ak-message--user .ak-message__bubble--md a {\n color: rgba(255, 255, 255, 0.9);\n}\n.ak-message__bubble--md .ak-md-table {\n width: 100%;\n border-collapse: collapse;\n margin: 0.4em 0;\n font-size: 0.95em;\n line-height: 1.5;\n}\n.ak-message__bubble--md .ak-md-th {\n padding: 8px 10px;\n text-align: left;\n border-bottom: 2px solid var(--ak-accent) !important;\n background: color-mix(in srgb, var(--ak-accent) 8%, transparent) !important;\n font-weight: 600;\n color: var(--ak-text) !important;\n}\n.ak-message--user .ak-message__bubble--md .ak-md-th {\n border-bottom-color: rgba(255, 255, 255, 0.5) !important;\n background: rgba(0, 0, 0, 0.25) !important;\n color: #ffffff !important;\n font-weight: 700;\n}\n.ak-message__bubble--md .ak-md-td {\n padding: 6px 10px;\n border-bottom: 1px solid var(--ak-border) !important;\n color: var(--ak-text) !important;\n}\n.ak-message__bubble--md tr:nth-child(even) .ak-md-td {\n background: color-mix(in srgb, var(--ak-surface), transparent 40%) !important;\n}\n.ak-message--user .ak-message__bubble--md .ak-md-td {\n color: #ffffff !important;\n border-bottom-color: rgba(255, 255, 255, 0.25) !important;\n}\n.ak-message--user .ak-message__bubble--md tr:nth-child(even) .ak-md-td {\n background: rgba(0, 0, 0, 0.15) !important;\n}\n\n/* ── Composer disclaimer ─────────────────────────────────────── */\n.ak-composer__disclaimer {\n font-size: 11px;\n color: var(--ak-text-muted);\n text-align: center;\n line-height: 1.4;\n}\n.ak-composer__disclaimer a {\n color: var(--ak-text-muted);\n text-decoration: underline;\n text-underline-offset: 2px;\n}\n.ak-composer__disclaimer a:hover {\n color: var(--ak-accent);\n}\n\n/* ── Maintenance state ───────────────────────────────────────── */\n.ak-maintenance {\n position: relative;\n display: flex;\n flex-direction: column;\n align-items: center;\n text-align: center;\n max-width: 320px;\n padding: 8px 4px;\n animation: ak-maintenance-enter 320ms cubic-bezier(0.2, 0.7, 0.2, 1) both;\n}\n.ak-maintenance__halo {\n position: absolute;\n top: -6px;\n left: 50%;\n width: 120px;\n height: 120px;\n transform: translateX(-50%);\n border-radius: 50%;\n background: radial-gradient(\n closest-side,\n var(--ak-maintenance-halo) 0%,\n transparent 72%\n );\n opacity: 0.22;\n filter: blur(4px);\n pointer-events: none;\n animation: ak-maintenance-pulse 2.8s ease-in-out infinite;\n}\n.ak-maintenance__icon {\n position: relative;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 56px;\n height: 56px;\n border-radius: 50%;\n background: var(--ak-maintenance-bg);\n color: var(--ak-maintenance-fg);\n border: 1px solid color-mix(in srgb, var(--ak-maintenance-halo) 40%, transparent);\n box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);\n}\n.ak-maintenance__title {\n margin-top: 16px;\n font-size: 15px;\n font-weight: 600;\n color: var(--ak-text);\n line-height: 1.3;\n letter-spacing: -0.01em;\n}\n.ak-maintenance__description {\n margin-top: 6px;\n font-size: 13px;\n color: var(--ak-text-muted);\n line-height: 1.5;\n max-width: 28ch;\n}\n\n@keyframes ak-maintenance-enter {\n from {\n opacity: 0;\n transform: translateY(6px) scale(0.98);\n }\n to {\n opacity: 1;\n transform: translateY(0) scale(1);\n }\n}\n@keyframes ak-maintenance-pulse {\n 0%, 100% { opacity: 0.18; transform: translateX(-50%) scale(1); }\n 50% { opacity: 0.32; transform: translateX(-50%) scale(1.06); }\n}\n@media (prefers-reduced-motion: reduce) {\n .ak-maintenance,\n .ak-maintenance__halo,\n .ak-maintenance__icon {\n animation: none;\n }\n}\n\n/* ── Error banner ────────────────────────────────────────────── */\n.ak-error {\n padding: 12px 16px;\n background: #fee2e2;\n color: #991b1b;\n font-size: 13px;\n border-top: 1px solid #fca5a5;\n text-align: left;\n flex-shrink: 0;\n display: flex;\n align-items: flex-start;\n gap: 10px;\n}\n\n.ak-error__icon {\n font-size: 16px;\n line-height: 1;\n flex-shrink: 0;\n margin-top: 1px;\n}\n\n.ak-error__content {\n flex: 1;\n}\n\n.ak-error__title {\n font-size: 14px;\n font-weight: 600;\n margin: 0 0 4px 0;\n line-height: 1.3;\n}\n\n.ak-error__description {\n font-size: 13px;\n margin: 0 0 4px 0;\n line-height: 1.4;\n opacity: 0.9;\n}\n\n.ak-error__message {\n font-size: 13px;\n margin: 0;\n line-height: 1.4;\n opacity: 0.85;\n}\n\n/* Specific styling for origin restriction errors */\n.ak-error--origin {\n background: #fef3c7; /* Amber background instead of red for less scary appearance */\n color: #92400e; /* Amber text color */\n border-top: 1px solid #fbbf24;\n}\n\n/* ── Agent status indicator ──────────────────────────────────── */\n/* Same bare row as .ak-progress__item / .ak-typing-row — activity-off tenants\n see the tool status swap in without the surrounding box changing size. */\n.ak-agent-status {\n display: inline-flex;\n align-items: center;\n gap: 6px;\n margin-bottom: 4px;\n padding: 2px 0;\n color: var(--ak-bot-text);\n font-size: 0.76rem;\n line-height: 1.4;\n opacity: 0.6;\n animation: ak-msg-in 0.15s ease-out;\n}\n.ak-agent-status__icon {\n flex-shrink: 0;\n color: var(--ak-primary, #6366f1);\n animation: ak-sparkle-pulse 2.5s ease-in-out infinite;\n}\n.ak-agent-status__text {\n line-height: 1.4;\n}\n@keyframes ak-sparkle-pulse {\n 0%, 100% { opacity: 1; transform: scale(1) rotate(0deg); }\n 50% { opacity: 0.45; transform: scale(0.85) rotate(15deg); }\n}\n\n/* ── Progress block (tool execution / streaming chain) ───────── */\n.ak-progress {\n margin-bottom: 4px;\n max-width: 80%;\n}\n.ak-progress__block {\n display: inline-flex;\n flex-direction: column;\n gap: 3px;\n padding: 6px 12px;\n border-radius: 14px;\n background: var(--ak-bot-bg);\n border: 1px solid var(--ak-border);\n font-size: 0.8rem;\n color: var(--ak-bot-text);\n opacity: 0.85;\n animation: ak-msg-in 0.15s ease-out;\n}\n.ak-progress__header {\n display: flex;\n align-items: center;\n gap: 8px;\n}\n.ak-progress__label {\n font-weight: 600;\n font-size: 0.78rem;\n color: var(--ak-primary, #6366f1);\n}\n.ak-progress__toggle {\n display: inline-flex;\n align-items: center;\n gap: 3px;\n padding: 1px 7px;\n border: 1px solid var(--ak-border);\n border-radius: 8px;\n background: transparent;\n color: var(--ak-bot-text);\n font-size: 0.72rem;\n cursor: pointer;\n opacity: 0.65;\n transition: opacity 0.15s;\n}\n.ak-progress__toggle:hover { opacity: 0.9; }\n.ak-progress__toggle--collapsed {\n display: inline-flex;\n align-items: center;\n gap: 5px;\n padding: 5px 10px;\n border: 1px solid var(--ak-border);\n border-radius: 12px;\n background: transparent;\n color: var(--ak-bot-text);\n font-size: 0.78rem;\n cursor: pointer;\n opacity: 0.55;\n transition: opacity 0.15s;\n margin-bottom: 4px;\n}\n.ak-progress__toggle--collapsed:hover { opacity: 0.85; }\n.ak-progress__text {\n font-size: 0.76rem;\n color: var(--ak-bot-text);\n line-height: 1.4;\n margin: 0;\n}\n/* Active streaming state */\n.ak-progress__list {\n list-style: none;\n margin: 0 0 4px;\n padding: 0;\n}\n/* Bare row, not a pill — identical metrics to .ak-progress__summary so the\n live line and the post-turn \"Worked for Ns\" swap without a size change. */\n.ak-progress__item {\n display: flex;\n align-items: center;\n gap: 6px;\n padding: 2px 0;\n font-size: 0.76rem;\n line-height: 1.4;\n color: var(--ak-bot-text);\n opacity: 0.6;\n animation: ak-msg-in 0.15s ease-out;\n}\n.ak-progress__item--active {\n /* inherits base .ak-progress__item; subtle pulse to signal in-flight */\n animation: ak-msg-in 0.15s ease-out, ak-active-pulse 2s ease-in-out infinite;\n}\n@keyframes ak-active-pulse {\n 0%, 100% { opacity: 0.6; }\n 50% { opacity: 0.9; }\n}\n/* Claude-style step list (detailed mode) */\n.ak-progress__steps {\n list-style: none;\n margin: 0 0 4px;\n padding: 2px 0;\n}\n.ak-progress__step {\n display: flex;\n align-items: center;\n gap: 6px;\n padding: 2px 0;\n font-size: 0.76rem;\n color: var(--ak-bot-text);\n opacity: 0.6;\n line-height: 1.4;\n}\n.ak-progress__step--active {\n opacity: 0.9;\n}\n.ak-progress__step-text {\n min-width: 0;\n}\n.ak-progress__step-dur {\n opacity: 0.65;\n flex-shrink: 0;\n}\n.ak-progress__step-icon {\n flex-shrink: 0;\n opacity: 0.55;\n}\n.ak-progress__step-icon--fail {\n color: #ef4444;\n opacity: 0.9;\n}\n/* Post-turn summary row (\"Worked for Ns · N steps\") */\n.ak-progress__summary {\n display: inline-flex;\n align-items: center;\n gap: 6px;\n padding: 2px 0;\n margin: 0 0 4px;\n /* Shrink-to-fit as a column flex item would otherwise break \"Worked for 8.4s\"\n onto two lines, doubling the row height as the turn ends. */\n white-space: nowrap;\n border: none;\n background: transparent;\n font-size: 0.76rem;\n color: var(--ak-bot-text);\n opacity: 0.6;\n cursor: pointer;\n transition: opacity 0.15s;\n}\n.ak-progress__summary:hover { opacity: 0.85; }\n.ak-progress__summary--static {\n cursor: default;\n}\n.ak-progress__summary--static:hover { opacity: 0.6; }\n.ak-progress__spinner {\n display: inline-block;\n width: 11px;\n height: 11px;\n border: 1.5px solid var(--ak-border);\n border-top-color: var(--ak-primary, #6366f1);\n border-radius: 50%;\n flex-shrink: 0;\n animation: ak-spin 0.7s linear infinite;\n}\n\n/* ── Powered by hanging tab ──────────────────────────────────── */\n.ak-branding {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n padding: 3px 8px 4px;\n background: var(--ak-bg);\n border: 1px solid var(--ak-border);\n border-top: none;\n border-radius: 0 0 8px 8px;\n margin-left: 16px;\n box-shadow: 0 4px 8px rgba(0, 0, 0, 0.06);\n}\n.ak-branding__logo {\n width: 11px;\n height: 11px;\n flex-shrink: 0;\n color: var(--ak-accent);\n opacity: 0.75;\n}\n.ak-branding__label {\n font-size: 9px;\n color: var(--ak-text-muted);\n opacity: 0.75;\n}\n.ak-branding__name {\n font-size: 9px;\n font-weight: 600;\n color: var(--ak-accent);\n opacity: 0.75;\n letter-spacing: -0.01em;\n}\n\n/* ── Mobile: full-viewport panel ─────────────────────────────── */\n@media (max-width: 639px) {\n @keyframes ak-panel-in-mobile {\n from { opacity: 0; transform: translateY(32px); }\n to { opacity: 1; transform: translateY(0); }\n }\n\n /* The shadow host (data-agentkit-widget) sits inside the outer fixed container.\n Give it its own fixed position so it fills the viewport independently,\n bypassing the outer container's bottom/right offsets. */\n :host([data-open]) {\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n z-index: 2147483647;\n pointer-events: none;\n }\n\n :host([data-open]) .ak-floating {\n width: 100%;\n height: 100%;\n align-items: stretch;\n gap: 0;\n }\n\n :host([data-open]) .ak-shell-wrap {\n flex: 1;\n min-height: 0;\n width: 100%;\n align-items: stretch;\n /* Launcher is hidden here — the negative offset would leave a dead strip. */\n margin-bottom: 0;\n }\n\n :host([data-open]) .ak-shell--floating {\n width: 100%;\n flex: 1;\n height: auto;\n border-radius: 0;\n box-shadow: none;\n border-left: none;\n border-right: none;\n border-top: none;\n }\n\n :host([data-open]) .ak-launcher {\n display: none;\n }\n\n :host([data-open]) .ak-shell-enter {\n animation: ak-panel-in-mobile 0.22s ease-out;\n }\n\n :host([data-open]) .ak-branding {\n display: none;\n }\n}\n";
5800
5859
  //#endregion
5801
5860
  //#region ../../packages/widget-ui/src/components/Header.tsx
5802
- function Ea() {
5861
+ function ka() {
5803
5862
  return /* @__PURE__ */ l("svg", {
5804
5863
  width: "16",
5805
5864
  height: "16",
@@ -5838,7 +5897,7 @@ function Ea() {
5838
5897
  ]
5839
5898
  });
5840
5899
  }
5841
- function Da() {
5900
+ function Aa() {
5842
5901
  return /* @__PURE__ */ l("svg", {
5843
5902
  width: "14",
5844
5903
  height: "14",
@@ -5860,7 +5919,7 @@ function Da() {
5860
5919
  })]
5861
5920
  });
5862
5921
  }
5863
- function Oa() {
5922
+ function ja() {
5864
5923
  return /* @__PURE__ */ l("svg", {
5865
5924
  width: "16",
5866
5925
  height: "16",
@@ -5873,7 +5932,7 @@ function Oa() {
5873
5932
  children: [/* @__PURE__ */ c("path", { d: "M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8" }), /* @__PURE__ */ c("path", { d: "M3 3v5h5" })]
5874
5933
  });
5875
5934
  }
5876
- function ka({ title: e, subtitle: t, avatarUrl: n, onClose: r, onReset: i, hideClose: a = !1 }) {
5935
+ function Ma({ title: e, subtitle: t, avatarUrl: n, onClose: r, onReset: i, hideClose: a = !1 }) {
5877
5936
  let [s, u] = o(!1);
5878
5937
  return /* @__PURE__ */ l("div", {
5879
5938
  className: `ak-header${s ? " ak-header--confirming" : ""}`,
@@ -5888,7 +5947,7 @@ function ka({ title: e, subtitle: t, avatarUrl: n, onClose: r, onReset: i, hideC
5888
5947
  }) : /* @__PURE__ */ c("span", {
5889
5948
  className: "ak-header__bot-icon",
5890
5949
  "aria-hidden": "true",
5891
- children: /* @__PURE__ */ c(Ea, {})
5950
+ children: /* @__PURE__ */ c(ka, {})
5892
5951
  }),
5893
5952
  /* @__PURE__ */ l("div", {
5894
5953
  className: "ak-header__title-group",
@@ -5917,14 +5976,14 @@ function ka({ title: e, subtitle: t, avatarUrl: n, onClose: r, onReset: i, hideC
5917
5976
  "aria-label": "New conversation",
5918
5977
  type: "button",
5919
5978
  title: "Start a new conversation (Retains current conversation to memory)",
5920
- children: /* @__PURE__ */ c(Oa, {})
5979
+ children: /* @__PURE__ */ c(ja, {})
5921
5980
  }),
5922
5981
  !a && /* @__PURE__ */ c("button", {
5923
5982
  className: "ak-header__close",
5924
5983
  onClick: r,
5925
5984
  "aria-label": "Close chat",
5926
5985
  type: "button",
5927
- children: /* @__PURE__ */ c(Da, {})
5986
+ children: /* @__PURE__ */ c(Aa, {})
5928
5987
  })
5929
5988
  ]
5930
5989
  })
@@ -5962,7 +6021,7 @@ function ka({ title: e, subtitle: t, avatarUrl: n, onClose: r, onReset: i, hideC
5962
6021
  }
5963
6022
  //#endregion
5964
6023
  //#region ../../packages/widget-ui/src/lib/safe-url.ts
5965
- function Aa(e) {
6024
+ function Na(e) {
5966
6025
  if (!e) return null;
5967
6026
  let t = e.trim();
5968
6027
  if (!t) return null;
@@ -5977,12 +6036,12 @@ function Aa(e) {
5977
6036
  }
5978
6037
  //#endregion
5979
6038
  //#region ../../packages/widget-ui/src/lib/strip-latex.ts
5980
- function ja(e) {
5981
- return e.replace(/\\text\{([^}]*)\}/g, "$1").replace(/\\implies/g, "→").replace(/\\Rightarrow/g, "⟹").replace(/\\times/g, "×").replace(/\\div/g, "÷").replace(/\\cdot/g, "·").replace(/\\quad/g, " ").replace(/\\qquad/g, " ").replace(/\\leq/g, "≤").replace(/\\geq/g, "≥").replace(/\\neq/g, "≠").replace(/\\approx/g, "≈").replace(/\\infty/g, "∞").replace(/\\\((.+?)\\\)/gs, "$1").replace(/\\\[[\s\S]+?\\\]/g, "").replace(/\\\$/g, "\0DOLLAR\0").replace(/\$\$(?!\d)[\s\S]+?\$\$/g, "").replace(/\$(?![\s\d])([^$\n]+?)(?<!\s)\$/g, "$1").replace(/\x00DOLLAR\x00/g, "$").replace(/\\[a-zA-Z]+\*?/g, "").replace(/\n{3,}/g, "\n\n");
6039
+ function Pa(e) {
6040
+ return e.replace(/\\text\{([^}]*)\}/g, "$1").replace(/\\implies/g, "→").replace(/\\Rightarrow/g, "⟹").replace(/\\times/g, "×").replace(/\\div/g, "÷").replace(/\\cdot/g, "·").replace(/\\quad/g, " ").replace(/\\qquad/g, " ").replace(/\\leq/g, "≤").replace(/\\geq/g, "≥").replace(/\\neq/g, "≠").replace(/\\approx/g, "≈").replace(/\\infty/g, "∞").replace(/\\\((.+?)\\\)/gs, "$1").replace(/\\\[[\s\S]+?\\\]/g, "").replace(/\\\$/g, "\0DOLLAR\0").replace(/\$\$(?!\d)[\s\S]+?\$\$/g, "").replace(/\$(?![\s\d])([^$\n]+?)(?<!\s)\$(?!\d)/g, "$1").replace(/\x00DOLLAR\x00/g, "$").replace(/\\[a-zA-Z]+\*?/g, "").replace(/\n{3,}/g, "\n\n");
5982
6041
  }
5983
6042
  //#endregion
5984
6043
  //#region ../../packages/widget-ui/src/components/ProgressBlock.tsx
5985
- function Ma(e) {
6044
+ function Fa(e) {
5986
6045
  let [, t] = o(0);
5987
6046
  r(() => {
5988
6047
  if (!e) return;
@@ -5990,8 +6049,8 @@ function Ma(e) {
5990
6049
  return () => clearInterval(n);
5991
6050
  }, [e]);
5992
6051
  }
5993
- var Na = 800;
5994
- function Pa({ up: e }) {
6052
+ var Ia = 800;
6053
+ function La({ up: e }) {
5995
6054
  return /* @__PURE__ */ c("svg", {
5996
6055
  width: "10",
5997
6056
  height: "10",
@@ -6005,7 +6064,7 @@ function Pa({ up: e }) {
6005
6064
  children: /* @__PURE__ */ c("polyline", { points: e ? "18 15 12 9 6 15" : "6 9 12 15 18 9" })
6006
6065
  });
6007
6066
  }
6008
- function Fa({ event: e, active: t }) {
6067
+ function Ra({ event: e, active: t }) {
6009
6068
  return t ? /* @__PURE__ */ c("span", {
6010
6069
  className: "ak-progress__spinner",
6011
6070
  "aria-hidden": "true"
@@ -6033,8 +6092,8 @@ function Fa({ event: e, active: t }) {
6033
6092
  })] }) : /* @__PURE__ */ c("polyline", { points: "20 6 9 17 4 12" })
6034
6093
  });
6035
6094
  }
6036
- function Ia({ events: e, live: t, answerStartedAtMs: n }) {
6037
- Ma(t && !n && e.some((e) => e.status === "active"));
6095
+ function za({ events: e, live: t, answerStartedAtMs: n }) {
6096
+ Fa(t && !n && e.some((e) => e.status === "active"));
6038
6097
  let r = n ?? Date.now(), i = e[0]?.startedAtMs, a = e.reduce((e, t, n) => t.status === "active" ? n : e, -1);
6039
6098
  return /* @__PURE__ */ c("ul", {
6040
6099
  className: "ak-progress__steps",
@@ -6044,7 +6103,7 @@ function Ia({ events: e, live: t, answerStartedAtMs: n }) {
6044
6103
  return /* @__PURE__ */ l("li", {
6045
6104
  className: o ? "ak-progress__step ak-progress__step--active" : "ak-progress__step",
6046
6105
  children: [
6047
- /* @__PURE__ */ c(Fa, {
6106
+ /* @__PURE__ */ c(Ra, {
6048
6107
  event: e,
6049
6108
  active: o
6050
6109
  }),
@@ -6061,11 +6120,11 @@ function Ia({ events: e, live: t, answerStartedAtMs: n }) {
6061
6120
  })
6062
6121
  });
6063
6122
  }
6064
- function La({ events: e, answerStartedAtMs: t }) {
6123
+ function Ba({ events: e, answerStartedAtMs: t }) {
6065
6124
  let [n, i] = o(0), a = Math.min(n, e.length - 1), s = a < e.length - 1;
6066
6125
  r(() => {
6067
6126
  if (!s) return;
6068
- let t = setTimeout(() => i((t) => Math.min(t + 1, e.length - 1)), Na);
6127
+ let t = setTimeout(() => i((t) => Math.min(t + 1, e.length - 1)), Ia);
6069
6128
  return () => clearTimeout(t);
6070
6129
  }, [
6071
6130
  s,
@@ -6073,7 +6132,7 @@ function La({ events: e, answerStartedAtMs: t }) {
6073
6132
  e.length
6074
6133
  ]);
6075
6134
  let u = e[a], d = !s && u.status === "done";
6076
- Ma(!d && !t);
6135
+ Fa(!d && !t);
6077
6136
  let f = e[0]?.startedAtMs, p = d ? null : $i(f ? (t ?? Date.now()) - f : void 0);
6078
6137
  return /* @__PURE__ */ c("ul", {
6079
6138
  className: "ak-progress__list",
@@ -6081,7 +6140,7 @@ function La({ events: e, answerStartedAtMs: t }) {
6081
6140
  children: /* @__PURE__ */ l("li", {
6082
6141
  className: "ak-progress__item ak-progress__item--active",
6083
6142
  children: [
6084
- d ? /* @__PURE__ */ c(Fa, {
6143
+ d ? /* @__PURE__ */ c(Ra, {
6085
6144
  event: u,
6086
6145
  active: !1
6087
6146
  }) : /* @__PURE__ */ c("span", {
@@ -6100,7 +6159,7 @@ function La({ events: e, answerStartedAtMs: t }) {
6100
6159
  })
6101
6160
  });
6102
6161
  }
6103
- function Ra({ ackText: e, events: t = [], collapsed: n = !0, isComplete: i = !1, turnMeta: a, answerStartedAtMs: s }) {
6162
+ function Va({ ackText: e, events: t = [], collapsed: n = !0, isComplete: i = !1, turnMeta: a, answerStartedAtMs: s }) {
6104
6163
  let [u, d] = o(!n);
6105
6164
  r(() => {
6106
6165
  i && d(!n);
@@ -6119,11 +6178,11 @@ function Ra({ ackText: e, events: t = [], collapsed: n = !0, isComplete: i = !1,
6119
6178
  children: e
6120
6179
  })]
6121
6180
  })
6122
- }) : null : f === "detailed" ? /* @__PURE__ */ c(Ia, {
6181
+ }) : null : f === "detailed" ? /* @__PURE__ */ c(za, {
6123
6182
  events: t,
6124
6183
  live: !0,
6125
6184
  answerStartedAtMs: s
6126
- }) : /* @__PURE__ */ c(La, {
6185
+ }) : /* @__PURE__ */ c(Ba, {
6127
6186
  events: t,
6128
6187
  answerStartedAtMs: s
6129
6188
  });
@@ -6137,7 +6196,7 @@ function Ra({ ackText: e, events: t = [], collapsed: n = !0, isComplete: i = !1,
6137
6196
  "aria-expanded": u,
6138
6197
  "aria-label": u ? "Hide working steps" : "Show working steps",
6139
6198
  children: [
6140
- /* @__PURE__ */ c(Fa, {
6199
+ /* @__PURE__ */ c(Ra, {
6141
6200
  event: {
6142
6201
  stage: "",
6143
6202
  text: "",
@@ -6156,9 +6215,9 @@ function Ra({ ackText: e, events: t = [], collapsed: n = !0, isComplete: i = !1,
6156
6215
  t.length === 1 ? "" : "s"
6157
6216
  ]
6158
6217
  }),
6159
- /* @__PURE__ */ c(Pa, { up: u })
6218
+ /* @__PURE__ */ c(La, { up: u })
6160
6219
  ]
6161
- }), u && /* @__PURE__ */ c(Ia, {
6220
+ }), u && /* @__PURE__ */ c(za, {
6162
6221
  events: t,
6163
6222
  live: !1
6164
6223
  })]
@@ -6166,7 +6225,7 @@ function Ra({ ackText: e, events: t = [], collapsed: n = !0, isComplete: i = !1,
6166
6225
  className: "ak-progress",
6167
6226
  children: /* @__PURE__ */ l("p", {
6168
6227
  className: "ak-progress__summary ak-progress__summary--static",
6169
- children: [/* @__PURE__ */ c(Fa, {
6228
+ children: [/* @__PURE__ */ c(Ra, {
6170
6229
  event: {
6171
6230
  stage: "",
6172
6231
  text: "",
@@ -6180,7 +6239,7 @@ function Ra({ ackText: e, events: t = [], collapsed: n = !0, isComplete: i = !1,
6180
6239
  }
6181
6240
  //#endregion
6182
6241
  //#region ../../packages/widget-ui/src/components/MessageBubble.tsx
6183
- function za() {
6242
+ function Ha() {
6184
6243
  return /* @__PURE__ */ c("svg", {
6185
6244
  className: "ak-agent-status__icon",
6186
6245
  width: "13",
@@ -6191,18 +6250,18 @@ function za() {
6191
6250
  children: /* @__PURE__ */ c("path", { d: "M12 2C12 2 12.7 8.1 14.5 9.5C16.3 10.9 22 12 22 12C22 12 16.3 13.1 14.5 14.5C12.7 15.9 12 22 12 22C12 22 11.3 15.9 9.5 14.5C7.7 13.1 2 12 2 12C2 12 7.7 10.9 9.5 9.5C11.3 8.1 12 2 12 2Z" })
6192
6251
  });
6193
6252
  }
6194
- function Ba({ status: e }) {
6253
+ function Ua({ status: e }) {
6195
6254
  return /* @__PURE__ */ l("div", {
6196
6255
  className: "ak-agent-status",
6197
6256
  role: "status",
6198
6257
  "aria-live": "polite",
6199
- children: [/* @__PURE__ */ c(za, {}), /* @__PURE__ */ c("span", {
6258
+ children: [/* @__PURE__ */ c(Ha, {}), /* @__PURE__ */ c("span", {
6200
6259
  className: "ak-agent-status__text",
6201
6260
  children: e
6202
6261
  })]
6203
6262
  });
6204
6263
  }
6205
- function Va({ messageId: e, images: t, onCellClick: n }) {
6264
+ function Wa({ messageId: e, images: t, onCellClick: n }) {
6206
6265
  if (t.length === 0) return null;
6207
6266
  let r = t.length;
6208
6267
  if (r === 1) {
@@ -6220,7 +6279,7 @@ function Va({ messageId: e, images: t, onCellClick: n }) {
6220
6279
  className: "ak-gallery__img ak-gallery__img--contain"
6221
6280
  })
6222
6281
  }), /* @__PURE__ */ c("a", {
6223
- href: Aa(e.downloadHref) ?? void 0,
6282
+ href: Na(e.downloadHref) ?? void 0,
6224
6283
  download: !0,
6225
6284
  className: "ak-message__image-dl-icon",
6226
6285
  title: "Download image",
@@ -6250,7 +6309,7 @@ function Va({ messageId: e, images: t, onCellClick: n }) {
6250
6309
  }
6251
6310
  if (r === 2) return /* @__PURE__ */ c("div", {
6252
6311
  className: "ak-gallery ak-gallery--two",
6253
- children: t.map((t, r) => /* @__PURE__ */ c(Ha, {
6312
+ children: t.map((t, r) => /* @__PURE__ */ c(Ga, {
6254
6313
  src: t.src,
6255
6314
  alt: t.alt,
6256
6315
  onClick: () => n(r)
@@ -6258,17 +6317,17 @@ function Va({ messageId: e, images: t, onCellClick: n }) {
6258
6317
  });
6259
6318
  if (r === 3) return /* @__PURE__ */ l("div", {
6260
6319
  className: "ak-gallery ak-gallery--three",
6261
- children: [/* @__PURE__ */ c(Ha, {
6320
+ children: [/* @__PURE__ */ c(Ga, {
6262
6321
  src: t[0].src,
6263
6322
  alt: t[0].alt,
6264
6323
  onClick: () => n(0)
6265
6324
  }, t[0].key ?? `${e}-0`), /* @__PURE__ */ l("div", {
6266
6325
  className: "ak-gallery__col",
6267
- children: [/* @__PURE__ */ c(Ha, {
6326
+ children: [/* @__PURE__ */ c(Ga, {
6268
6327
  src: t[1].src,
6269
6328
  alt: t[1].alt,
6270
6329
  onClick: () => n(1)
6271
- }, t[1].key ?? `${e}-1`), /* @__PURE__ */ c(Ha, {
6330
+ }, t[1].key ?? `${e}-1`), /* @__PURE__ */ c(Ga, {
6272
6331
  src: t[2].src,
6273
6332
  alt: t[2].alt,
6274
6333
  onClick: () => n(2)
@@ -6280,7 +6339,7 @@ function Va({ messageId: e, images: t, onCellClick: n }) {
6280
6339
  className: "ak-gallery ak-gallery--grid",
6281
6340
  children: i.map((t, r) => {
6282
6341
  let o = r === i.length - 1;
6283
- return /* @__PURE__ */ c(Ha, {
6342
+ return /* @__PURE__ */ c(Ga, {
6284
6343
  src: t.src,
6285
6344
  alt: t.alt,
6286
6345
  overlayCount: o && a > 0 ? a : 0,
@@ -6289,7 +6348,7 @@ function Va({ messageId: e, images: t, onCellClick: n }) {
6289
6348
  })
6290
6349
  });
6291
6350
  }
6292
- function Ha({ src: e, alt: t, overlayCount: n = 0, onClick: r }) {
6351
+ function Ga({ src: e, alt: t, overlayCount: n = 0, onClick: r }) {
6293
6352
  return /* @__PURE__ */ l("button", {
6294
6353
  type: "button",
6295
6354
  onClick: r,
@@ -6306,7 +6365,7 @@ function Ha({ src: e, alt: t, overlayCount: n = 0, onClick: r }) {
6306
6365
  })]
6307
6366
  });
6308
6367
  }
6309
- function Ua({ images: e, index: t, onClose: n, onIndexChange: i }) {
6368
+ function Ka({ images: e, index: t, onClose: n, onIndexChange: i }) {
6310
6369
  let a = t !== null, o = a && t !== null ? Math.min(Math.max(0, t), e.length - 1) : 0, u = a ? e[o] : null;
6311
6370
  return r(() => {
6312
6371
  if (!a) return;
@@ -6340,7 +6399,7 @@ function Ua({ images: e, index: t, onClose: n, onIndexChange: i }) {
6340
6399
  ]
6341
6400
  }),
6342
6401
  /* @__PURE__ */ c("a", {
6343
- href: Aa(u.downloadHref) ?? void 0,
6402
+ href: Na(u.downloadHref) ?? void 0,
6344
6403
  download: !0,
6345
6404
  target: "_blank",
6346
6405
  rel: "noopener noreferrer",
@@ -6444,7 +6503,7 @@ function Ua({ images: e, index: t, onClose: n, onIndexChange: i }) {
6444
6503
  ]
6445
6504
  });
6446
6505
  }
6447
- function Wa({ url: e, mimeType: t, fileName: n }) {
6506
+ function qa({ url: e, mimeType: t, fileName: n }) {
6448
6507
  let r = (() => {
6449
6508
  if (n) return n;
6450
6509
  try {
@@ -6470,7 +6529,7 @@ function Wa({ url: e, mimeType: t, fileName: n }) {
6470
6529
  label: i || "FILE"
6471
6530
  };
6472
6531
  return /* @__PURE__ */ l("a", {
6473
- href: Aa(e) ?? void 0,
6532
+ href: Na(e) ?? void 0,
6474
6533
  target: "_blank",
6475
6534
  rel: "noopener noreferrer",
6476
6535
  className: "ak-file-chip",
@@ -6501,7 +6560,25 @@ function Wa({ url: e, mimeType: t, fileName: n }) {
6501
6560
  })]
6502
6561
  });
6503
6562
  }
6504
- function Ga(e) {
6563
+ function Ja({ url: e, mimeType: t, transcript: n }) {
6564
+ return /* @__PURE__ */ l("div", {
6565
+ className: "ak-audio-chip",
6566
+ children: [/* @__PURE__ */ c("audio", {
6567
+ controls: !0,
6568
+ src: e,
6569
+ className: "ak-audio-chip__player",
6570
+ "aria-label": "Voice note",
6571
+ children: /* @__PURE__ */ c("source", {
6572
+ src: e,
6573
+ type: t
6574
+ })
6575
+ }), n && /* @__PURE__ */ c("p", {
6576
+ className: "ak-audio-chip__transcript",
6577
+ children: n
6578
+ })]
6579
+ });
6580
+ }
6581
+ function Ya(e) {
6505
6582
  try {
6506
6583
  return new Date(e).toLocaleTimeString([], {
6507
6584
  hour: "2-digit",
@@ -6511,12 +6588,12 @@ function Ga(e) {
6511
6588
  return "";
6512
6589
  }
6513
6590
  }
6514
- var Ka = /(`[^`\n]+`|\*\*[^*\n]+\*\*|\*[^*\n]+\*|!\[[^\]\n]*\]\([^)\n]+\)|\[[^\]\n]+\]\([^)\n]+\))/g;
6591
+ var Xa = /(`[^`\n]+`|\*\*[^*\n]+\*\*|\*[^*\n]+\*|!\[[^\]\n]*\]\([^)\n]+\)|\[[^\]\n]+\]\([^)\n]+\))/g;
6515
6592
  function $(e) {
6516
6593
  let t = [], n = 0, r = 0;
6517
- Ka.lastIndex = 0;
6594
+ Xa.lastIndex = 0;
6518
6595
  let i;
6519
- for (; (i = Ka.exec(e)) !== null;) {
6596
+ for (; (i = Xa.exec(e)) !== null;) {
6520
6597
  i.index > n && t.push(e.slice(n, i.index));
6521
6598
  let a = i[0];
6522
6599
  if (a.startsWith("`")) t.push(/* @__PURE__ */ c("code", {
@@ -6526,7 +6603,7 @@ function $(e) {
6526
6603
  else if (a.startsWith("**")) t.push(/* @__PURE__ */ c("strong", { children: a.slice(2, -2) }, r++));
6527
6604
  else if (a.startsWith("*")) t.push(/* @__PURE__ */ c("em", { children: a.slice(1, -1) }, r++));
6528
6605
  else if (a.startsWith("![")) {
6529
- let e = a.match(/!\[([^\]]*)\]\(([^)]+)\)/), n = Aa(e?.[2]);
6606
+ let e = a.match(/!\[([^\]]*)\]\(([^)]+)\)/), n = Na(e?.[2]);
6530
6607
  e && n ? t.push(/* @__PURE__ */ c("a", {
6531
6608
  href: n,
6532
6609
  target: "_blank",
@@ -6534,7 +6611,7 @@ function $(e) {
6534
6611
  children: e[1] || "image"
6535
6612
  }, r++)) : e && t.push(e[1] || "image");
6536
6613
  } else {
6537
- let e = a.match(/\[(.+?)\]\((.+?)\)/), n = Aa(e?.[2]);
6614
+ let e = a.match(/\[(.+?)\]\((.+?)\)/), n = Na(e?.[2]);
6538
6615
  e && n ? t.push(/* @__PURE__ */ c("a", {
6539
6616
  href: n,
6540
6617
  target: "_blank",
@@ -6546,8 +6623,8 @@ function $(e) {
6546
6623
  }
6547
6624
  return n < e.length && t.push(e.slice(n)), t;
6548
6625
  }
6549
- function qa(e) {
6550
- e = ja(e);
6626
+ function Za(e) {
6627
+ e = Pa(e);
6551
6628
  let t = e.split("\n"), n = [], r = 0, i = 0;
6552
6629
  for (; r < t.length;) {
6553
6630
  let e = t[r], a = e.match(/^(\s*)```/);
@@ -6716,7 +6793,7 @@ function qa(e) {
6716
6793
  }
6717
6794
  return /* @__PURE__ */ c(s, { children: n });
6718
6795
  }
6719
- function Ja({ message: e }) {
6796
+ function Qa({ message: e }) {
6720
6797
  let [t, n] = o(null), [r, i] = o(null), a = e.role === "user", s = e.status === "error", u = e.status === "streaming", d = !!(e.images && e.images.length > 0), f = !!(e.documents && e.documents.length > 0), p = (() => {
6721
6798
  if (!a) return [];
6722
6799
  let t = (e.uploadedAttachments ?? []).filter((e) => e.kind === "image").map((e) => ({
@@ -6728,15 +6805,15 @@ function Ja({ message: e }) {
6728
6805
  url: e.uploadedImageUrl,
6729
6806
  mimeType: "image/jpeg"
6730
6807
  }] : [];
6731
- })(), m = a ? (e.uploadedAttachments ?? []).filter((e) => e.kind === "file") : [], h = p.length > 0, g = m.length > 0, _ = d || h, v = !!e.progressEvents && e.progressEvents.length > 0, y = u && !e.content && !e.toolStatus && !v, b = !a && !s, x = !!e.isHuman && !a, S = a ? "ak-message--user" : s ? "ak-message--assistant ak-message--error" : x ? "ak-message--assistant ak-message--operator" : "ak-message--assistant", C = [
6808
+ })(), m = a ? (e.uploadedAttachments ?? []).filter((e) => e.kind === "file") : [], h = a ? (e.uploadedAttachments ?? []).filter((e) => e.kind === "audio") : [], g = p.length > 0, _ = m.length > 0, v = h.length > 0, y = d || g, b = a && v ? na(e.content) : null, x = b ? b.rest : e.content, S = !!e.progressEvents && e.progressEvents.length > 0, C = u && !e.content && !e.toolStatus && !S, w = !a && !s, T = !!e.isHuman && !a, E = a ? "ak-message--user" : s ? "ak-message--assistant ak-message--error" : T ? "ak-message--assistant ak-message--operator" : "ak-message--assistant", D = [
6732
6809
  "ak-message__bubble",
6733
- b ? "ak-message__bubble--md" : "",
6734
- _ ? "ak-message__bubble--has-image" : "",
6735
- x ? "ak-message__bubble--operator" : ""
6736
- ].filter(Boolean).join(" "), w = x ? e.senderDisplay?.trim() || "Operator" : null, T = w ? w.charAt(0).toUpperCase() : "", E = /* @__PURE__ */ l("div", {
6737
- className: C,
6810
+ w ? "ak-message__bubble--md" : "",
6811
+ y ? "ak-message__bubble--has-image" : "",
6812
+ T ? "ak-message__bubble--operator" : ""
6813
+ ].filter(Boolean).join(" "), O = T ? e.senderDisplay?.trim() || "Operator" : null, k = O ? O.charAt(0).toUpperCase() : "", A = /* @__PURE__ */ l("div", {
6814
+ className: D,
6738
6815
  children: [
6739
- h && /* @__PURE__ */ c(Va, {
6816
+ g && /* @__PURE__ */ c(Wa, {
6740
6817
  messageId: `${e.id}-up`,
6741
6818
  images: p.map((e) => ({
6742
6819
  src: e.url,
@@ -6745,15 +6822,23 @@ function Ja({ message: e }) {
6745
6822
  })),
6746
6823
  onCellClick: (e) => n(e)
6747
6824
  }),
6748
- g && /* @__PURE__ */ c("div", {
6825
+ _ && /* @__PURE__ */ c("div", {
6749
6826
  className: "ak-message__files",
6750
- children: m.map((t, n) => /* @__PURE__ */ c(Wa, {
6827
+ children: m.map((t, n) => /* @__PURE__ */ c(qa, {
6751
6828
  url: t.url,
6752
6829
  mimeType: t.mimeType,
6753
6830
  fileName: t.fileName
6754
6831
  }, `${e.id}-up-file-${n}`))
6755
6832
  }),
6756
- d && /* @__PURE__ */ c(Va, {
6833
+ v && /* @__PURE__ */ c("div", {
6834
+ className: "ak-message__files",
6835
+ children: h.map((t, n) => /* @__PURE__ */ c(Ja, {
6836
+ url: t.url,
6837
+ mimeType: t.mimeType,
6838
+ transcript: n === 0 ? b?.transcript ?? null : null
6839
+ }, `${e.id}-up-audio-${n}`))
6840
+ }),
6841
+ d && /* @__PURE__ */ c(Wa, {
6757
6842
  messageId: `${e.id}-asst`,
6758
6843
  images: e.images.map((e, t) => {
6759
6844
  let n = e.url ?? (e.base64 ? `data:${e.mimeType};base64,${e.base64}` : null);
@@ -6768,15 +6853,15 @@ function Ja({ message: e }) {
6768
6853
  }),
6769
6854
  f && /* @__PURE__ */ c("div", {
6770
6855
  className: "ak-message__files",
6771
- children: e.documents.map((t, n) => t.url ? /* @__PURE__ */ c(Wa, {
6856
+ children: e.documents.map((t, n) => t.url ? /* @__PURE__ */ c(qa, {
6772
6857
  url: t.url,
6773
6858
  mimeType: t.mimeType,
6774
6859
  fileName: t.fileName
6775
6860
  }, `${e.id}-asst-doc-${n}`) : null)
6776
6861
  }),
6777
- e.content && /* @__PURE__ */ l("div", {
6778
- className: _ ? "ak-message__image-caption" : void 0,
6779
- children: [b ? qa(e.content) : e.content, u && /* @__PURE__ */ l("span", {
6862
+ x && /* @__PURE__ */ l("div", {
6863
+ className: y ? "ak-message__image-caption" : void 0,
6864
+ children: [w ? Za(x) : x, u && /* @__PURE__ */ l("span", {
6780
6865
  className: "ak-cursor",
6781
6866
  "aria-hidden": "true",
6782
6867
  children: [
@@ -6788,14 +6873,14 @@ function Ja({ message: e }) {
6788
6873
  }),
6789
6874
  /* @__PURE__ */ c("span", {
6790
6875
  className: "ak-message__time",
6791
- children: Ga(e.createdAt)
6876
+ children: Ya(e.createdAt)
6792
6877
  })
6793
6878
  ]
6794
- }), D = !!e.content || _ || g || f || !u && !e.toolStatus;
6879
+ }), ee = !!e.content || y || _ || f || !u && !e.toolStatus;
6795
6880
  return /* @__PURE__ */ l("div", {
6796
- className: `ak-message ${S}`,
6881
+ className: `ak-message ${E}`,
6797
6882
  children: [
6798
- !a && (e.ackText || e.progressEvents && e.progressEvents.length > 0 || e.turnMeta) && /* @__PURE__ */ c(Ra, {
6883
+ !a && (e.ackText || e.progressEvents && e.progressEvents.length > 0 || e.turnMeta) && /* @__PURE__ */ c(Va, {
6799
6884
  ackText: e.ackText,
6800
6885
  events: e.progressEvents,
6801
6886
  collapsed: e.progressCollapsed,
@@ -6803,7 +6888,7 @@ function Ja({ message: e }) {
6803
6888
  turnMeta: e.turnMeta,
6804
6889
  answerStartedAtMs: e.answerStartedAtMs
6805
6890
  }),
6806
- y && /* @__PURE__ */ l("div", {
6891
+ C && /* @__PURE__ */ l("div", {
6807
6892
  className: "ak-typing-row",
6808
6893
  role: "status",
6809
6894
  "aria-label": "Assistant is typing",
@@ -6813,20 +6898,20 @@ function Ja({ message: e }) {
6813
6898
  /* @__PURE__ */ c("span", { className: "ak-typing-row__dot" })
6814
6899
  ]
6815
6900
  }),
6816
- !a && e.toolStatus && !(e.progressEvents && e.progressEvents.length > 0) && /* @__PURE__ */ c(Ba, { status: e.toolStatus }),
6817
- x && /* @__PURE__ */ l("span", {
6901
+ !a && e.toolStatus && !(e.progressEvents && e.progressEvents.length > 0) && /* @__PURE__ */ c(Ua, { status: e.toolStatus }),
6902
+ T && /* @__PURE__ */ l("span", {
6818
6903
  className: "ak-message__sender-label",
6819
6904
  children: [/* @__PURE__ */ c("span", {
6820
6905
  className: "ak-message__operator-avatar",
6821
6906
  "aria-hidden": "true",
6822
- children: T
6907
+ children: k
6823
6908
  }), /* @__PURE__ */ c("span", {
6824
6909
  className: "ak-message__operator-name",
6825
- children: w
6910
+ children: O
6826
6911
  })]
6827
6912
  }),
6828
- D && E,
6829
- p.length > 0 && /* @__PURE__ */ c(Ua, {
6913
+ ee && A,
6914
+ p.length > 0 && /* @__PURE__ */ c(Ka, {
6830
6915
  images: p.map((e) => ({
6831
6916
  src: e.url,
6832
6917
  alt: e.fileName ?? "Uploaded image",
@@ -6836,7 +6921,7 @@ function Ja({ message: e }) {
6836
6921
  onClose: () => n(null),
6837
6922
  onIndexChange: n
6838
6923
  }),
6839
- d && /* @__PURE__ */ c(Ua, {
6924
+ d && /* @__PURE__ */ c(Ka, {
6840
6925
  images: e.images.map((e) => {
6841
6926
  let t = e.url ?? (e.base64 ? `data:${e.mimeType};base64,${e.base64}` : null);
6842
6927
  return t ? {
@@ -6854,7 +6939,7 @@ function Ja({ message: e }) {
6854
6939
  }
6855
6940
  //#endregion
6856
6941
  //#region ../../packages/widget-ui/src/components/TypingIndicator.tsx
6857
- function Ya() {
6942
+ function $a() {
6858
6943
  return /* @__PURE__ */ l("div", {
6859
6944
  className: "ak-typing",
6860
6945
  "aria-label": "Assistant is typing",
@@ -6867,7 +6952,7 @@ function Ya() {
6867
6952
  }
6868
6953
  //#endregion
6869
6954
  //#region ../../packages/widget-ui/src/components/MessageList.tsx
6870
- function Xa(e, t) {
6955
+ function eo(e, t) {
6871
6956
  let n = [], r = null;
6872
6957
  for (let i of e) {
6873
6958
  if (i.role === "assistant") {
@@ -6885,8 +6970,8 @@ function Xa(e, t) {
6885
6970
  }
6886
6971
  return n;
6887
6972
  }
6888
- function Za({ messages: e, isLoading: t, operatorFallbackLabel: n = "Operator" }) {
6889
- let o = a(null), s = a(null), u = a(!0), d = i(() => Xa(e, n), [e, n]);
6973
+ function to({ messages: e, isLoading: t, operatorFallbackLabel: n = "Operator" }) {
6974
+ let o = a(null), s = a(null), u = a(!0), d = i(() => eo(e, n), [e, n]);
6890
6975
  return r(() => {
6891
6976
  if (!(o.current?.parentElement ?? o.current)) return;
6892
6977
  let e = (e) => {
@@ -6914,15 +6999,15 @@ function Za({ messages: e, isLoading: t, operatorFallbackLabel: n = "Operator" }
6914
6999
  className: "ak-handoff-divider__label",
6915
7000
  children: e.label
6916
7001
  })
6917
- }, e.id) : /* @__PURE__ */ c(Ja, { message: e.message }, e.message.id)),
6918
- t && !e.some((e) => e.status === "streaming") && /* @__PURE__ */ c(Ya, {}),
7002
+ }, e.id) : /* @__PURE__ */ c(Qa, { message: e.message }, e.message.id)),
7003
+ t && !e.some((e) => e.status === "streaming") && /* @__PURE__ */ c($a, {}),
6919
7004
  /* @__PURE__ */ c("div", { ref: s })
6920
7005
  ]
6921
7006
  });
6922
7007
  }
6923
7008
  //#endregion
6924
7009
  //#region ../../packages/widget-ui/src/components/EmptyState.tsx
6925
- function Qa() {
7010
+ function no() {
6926
7011
  return /* @__PURE__ */ l("svg", {
6927
7012
  width: "30",
6928
7013
  height: "30",
@@ -6962,7 +7047,7 @@ function Qa() {
6962
7047
  ]
6963
7048
  });
6964
7049
  }
6965
- function $a({ title: e, description: t, suggestedQuestions: n, avatarUrl: r, onSelect: i }) {
7050
+ function ro({ title: e, description: t, suggestedQuestions: n, avatarUrl: r, onSelect: i }) {
6966
7051
  let a = (n ?? []).filter((e) => (e.title ?? "").trim().length > 0);
6967
7052
  return /* @__PURE__ */ l("div", {
6968
7053
  className: "ak-empty-state",
@@ -6985,7 +7070,7 @@ function $a({ title: e, description: t, suggestedQuestions: n, avatarUrl: r, onS
6985
7070
  }) : /* @__PURE__ */ c("span", {
6986
7071
  className: "ak-empty-state__bot-icon",
6987
7072
  "aria-hidden": "true",
6988
- children: /* @__PURE__ */ c(Qa, {})
7073
+ children: /* @__PURE__ */ c(no, {})
6989
7074
  })
6990
7075
  }),
6991
7076
  /* @__PURE__ */ c("p", {
@@ -7018,8 +7103,8 @@ function $a({ title: e, description: t, suggestedQuestions: n, avatarUrl: r, onS
7018
7103
  }
7019
7104
  //#endregion
7020
7105
  //#region ../../packages/widget-ui/src/components/Composer.tsx
7021
- var eo = "https://klicforge.ai/privacy-policy", to = "https://klicforge.ai/terms-of-service";
7022
- function no() {
7106
+ var io = "https://klicforge.ai/privacy-policy", ao = "https://klicforge.ai/terms-of-service";
7107
+ function oo() {
7023
7108
  return /* @__PURE__ */ l("svg", {
7024
7109
  width: "16",
7025
7110
  height: "16",
@@ -7037,7 +7122,7 @@ function no() {
7037
7122
  }), /* @__PURE__ */ c("polygon", { points: "22 2 15 22 11 13 2 9 22 2" })]
7038
7123
  });
7039
7124
  }
7040
- function ro() {
7125
+ function so() {
7041
7126
  return /* @__PURE__ */ l("svg", {
7042
7127
  width: "14",
7043
7128
  height: "14",
@@ -7059,7 +7144,7 @@ function ro() {
7059
7144
  })]
7060
7145
  });
7061
7146
  }
7062
- function io() {
7147
+ function co() {
7063
7148
  return /* @__PURE__ */ l("svg", {
7064
7149
  width: "14",
7065
7150
  height: "14",
@@ -7076,7 +7161,7 @@ function io() {
7076
7161
  })]
7077
7162
  });
7078
7163
  }
7079
- function ao() {
7164
+ function lo() {
7080
7165
  return /* @__PURE__ */ l("svg", {
7081
7166
  width: "14",
7082
7167
  height: "14",
@@ -7089,7 +7174,7 @@ function ao() {
7089
7174
  children: [/* @__PURE__ */ c("path", { d: "M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z" }), /* @__PURE__ */ c("polyline", { points: "14 2 14 8 20 8" })]
7090
7175
  });
7091
7176
  }
7092
- function oo() {
7177
+ function uo() {
7093
7178
  return /* @__PURE__ */ l("svg", {
7094
7179
  width: "10",
7095
7180
  height: "10",
@@ -7112,56 +7197,128 @@ function oo() {
7112
7197
  })]
7113
7198
  });
7114
7199
  }
7115
- var so = [
7200
+ function fo() {
7201
+ return /* @__PURE__ */ l("svg", {
7202
+ width: "14",
7203
+ height: "14",
7204
+ viewBox: "0 0 24 24",
7205
+ fill: "none",
7206
+ stroke: "currentColor",
7207
+ strokeWidth: "2",
7208
+ strokeLinecap: "round",
7209
+ strokeLinejoin: "round",
7210
+ children: [
7211
+ /* @__PURE__ */ c("path", { d: "M12 1a3 3 0 0 0-3 3v8a3 3 0 0 0 6 0V4a3 3 0 0 0-3-3z" }),
7212
+ /* @__PURE__ */ c("path", { d: "M19 10v2a7 7 0 0 1-14 0v-2" }),
7213
+ /* @__PURE__ */ c("line", {
7214
+ x1: "12",
7215
+ y1: "19",
7216
+ x2: "12",
7217
+ y2: "23"
7218
+ }),
7219
+ /* @__PURE__ */ c("line", {
7220
+ x1: "8",
7221
+ y1: "23",
7222
+ x2: "16",
7223
+ y2: "23"
7224
+ })
7225
+ ]
7226
+ });
7227
+ }
7228
+ function po() {
7229
+ return /* @__PURE__ */ c("svg", {
7230
+ width: "12",
7231
+ height: "12",
7232
+ viewBox: "0 0 24 24",
7233
+ fill: "currentColor",
7234
+ children: /* @__PURE__ */ c("rect", {
7235
+ x: "4",
7236
+ y: "4",
7237
+ width: "16",
7238
+ height: "16",
7239
+ rx: "2"
7240
+ })
7241
+ });
7242
+ }
7243
+ var mo = [
7116
7244
  "application/pdf",
7117
7245
  "text/markdown",
7118
7246
  "text/plain",
7119
7247
  "text/csv"
7120
- ], co = [
7248
+ ], ho = [
7121
7249
  ".pdf",
7122
7250
  ".md",
7123
7251
  ".txt",
7124
7252
  ".csv"
7125
- ], lo = [...co, ...so].join(","), uo = [
7253
+ ], go = [...ho, ...mo].join(","), _o = [
7126
7254
  "image/jpeg",
7127
7255
  "image/png",
7128
7256
  "image/gif",
7129
7257
  "image/webp"
7130
- ], fo = uo.join(",");
7131
- function po(e) {
7132
- if (so.includes(e.type)) return !0;
7133
- let t = e.name.toLowerCase();
7134
- return co.some((e) => t.endsWith(e));
7258
+ ], vo = _o.join(","), yo = [
7259
+ "audio/webm;codecs=opus",
7260
+ "audio/webm",
7261
+ "audio/mp4",
7262
+ "audio/ogg;codecs=opus"
7263
+ ];
7264
+ function bo() {
7265
+ return typeof MediaRecorder > "u" ? null : yo.find((e) => MediaRecorder.isTypeSupported(e)) ?? null;
7266
+ }
7267
+ function xo(e) {
7268
+ return e.includes("mp4") ? "mp4" : e.includes("ogg") ? "ogg" : "webm";
7135
7269
  }
7136
- function mo(e) {
7137
- return uo.includes(e.type);
7270
+ function So(e) {
7271
+ let t = Math.floor(e / 1e3), n = Math.floor(t / 60), r = t % 60;
7272
+ return `${n}:${String(r).padStart(2, "0")}`;
7138
7273
  }
7139
- function ho({ onSend: e, disabled: t = !1, placeholder: u = "Type a message…", photoSendingEnabled: d = !1, fileUploadEnabled: f = !1, attachmentMaxCount: p = 5, attachmentMaxFileSizeMb: m = 1 }) {
7140
- let [h, g] = o(""), [_, v] = o([]), [y, b] = o(/* @__PURE__ */ new Map()), [x, S] = o(!1), C = a(null), w = a(null), T = a(null), E = a(null), D = a(null), O = d || f, k = i(() => m * 1024 * 1024, [m]);
7274
+ function Co(e) {
7275
+ if (mo.includes(e.type)) return !0;
7276
+ let t = e.name.toLowerCase();
7277
+ return ho.some((e) => t.endsWith(e));
7278
+ }
7279
+ function wo(e) {
7280
+ return _o.includes(e.type);
7281
+ }
7282
+ function To({ onSend: e, disabled: t = !1, placeholder: u = "Type a message…", photoSendingEnabled: d = !1, fileUploadEnabled: f = !1, voiceNoteEnabled: p = !1, voiceNoteMaxDurationSec: m = 120, attachmentMaxCount: h = 5, attachmentMaxFileSizeMb: g = 1, onRecordingError: _ }) {
7283
+ let [v, y] = o(""), [b, x] = o([]), [S, C] = o(/* @__PURE__ */ new Map()), [w, T] = o(!1), [E, D] = o(!1), [O, k] = o(0), A = a(null), ee = a(null), j = a(null), M = a(null), te = a(null), ne = a(null), N = a(null), re = a([]), ie = a(null), ae = a(0), oe = a(null), se = a(!1), ce = a(!1), le = a(v);
7284
+ le.current = v;
7285
+ let ue = a(b);
7286
+ ue.current = b;
7287
+ let de = a(t);
7288
+ de.current = t;
7289
+ let fe = d || f, pe = i(() => g * 1024 * 1024, [g]), me = p && typeof window < "u" && typeof MediaRecorder < "u" && !!navigator.mediaDevices?.getUserMedia;
7141
7290
  r(() => () => {
7142
- y.forEach((e) => URL.revokeObjectURL(e));
7143
- }, []), r(() => {
7144
- t || C.current?.focus();
7291
+ S.forEach((e) => URL.revokeObjectURL(e));
7292
+ }, []);
7293
+ let he = a(null);
7294
+ r(() => {
7295
+ if (t) return;
7296
+ let e = he.current;
7297
+ he.current = t, !(e === null && typeof window < "u" && window.matchMedia?.("(pointer: coarse)").matches) && A.current?.focus();
7145
7298
  }, [t]);
7146
- let A = n((e) => {
7147
- if (!x) return;
7148
- let t = e.composedPath ? e.composedPath() : [], n = !!E.current && t.includes(E.current), r = !!D.current && t.includes(D.current);
7149
- !n && !r && S(!1);
7150
- }, [x]);
7299
+ let ge = a(!1);
7151
7300
  r(() => {
7152
- if (x) return document.addEventListener("click", A), () => document.removeEventListener("click", A);
7153
- }, [x, A]), r(() => {
7154
- O || S(!1);
7155
- }, [O]);
7156
- function ee() {
7157
- y.forEach((e) => URL.revokeObjectURL(e)), b(/* @__PURE__ */ new Map()), v([]), w.current && (w.current.value = ""), T.current && (T.current.value = "");
7158
- }
7159
- function j(e) {
7160
- v((t) => {
7301
+ E ? ne.current?.focus() : ge.current && !de.current && A.current?.focus(), ge.current = E;
7302
+ }, [E]);
7303
+ let _e = n((e) => {
7304
+ if (!w) return;
7305
+ let t = e.composedPath ? e.composedPath() : [], n = !!M.current && t.includes(M.current), r = !!te.current && t.includes(te.current);
7306
+ !n && !r && T(!1);
7307
+ }, [w]);
7308
+ r(() => {
7309
+ if (w) return document.addEventListener("click", _e), () => document.removeEventListener("click", _e);
7310
+ }, [w, _e]), r(() => {
7311
+ fe || T(!1);
7312
+ }, [fe]);
7313
+ function ve() {
7314
+ S.forEach((e) => URL.revokeObjectURL(e)), C(/* @__PURE__ */ new Map()), x([]), ee.current && (ee.current.value = ""), j.current && (j.current.value = "");
7315
+ }
7316
+ function ye(e) {
7317
+ x((t) => {
7161
7318
  let n = t[e];
7162
7319
  if (n) {
7163
- let e = y.get(n.file);
7164
- e && (URL.revokeObjectURL(e), b((e) => {
7320
+ let e = S.get(n.file);
7321
+ e && (URL.revokeObjectURL(e), C((e) => {
7165
7322
  let t = new Map(e);
7166
7323
  return t.delete(n.file), t;
7167
7324
  }));
@@ -7169,31 +7326,82 @@ function ho({ onSend: e, disabled: t = !1, placeholder: u = "Type a message…",
7169
7326
  return t.filter((t, n) => n !== e);
7170
7327
  });
7171
7328
  }
7172
- function M() {
7173
- let n = h.trim();
7174
- !n && _.length === 0 || t || (e(n, _), g(""), ee(), C.current && (C.current.style.height = "auto"));
7329
+ function be() {
7330
+ let n = v.trim();
7331
+ !n && b.length === 0 || t || (e(n, b), y(""), ve(), A.current && (A.current.style.height = "auto"));
7332
+ }
7333
+ let xe = n(() => {
7334
+ ie.current?.getTracks().forEach((e) => e.stop()), ie.current = null;
7335
+ }, []);
7336
+ r(() => () => {
7337
+ oe.current && clearInterval(oe.current), N.current && N.current.state !== "inactive" && (se.current = !0, N.current.stop()), xe();
7338
+ }, [xe]);
7339
+ async function Se() {
7340
+ if (!me || E || ce.current || t) return;
7341
+ if (b.length >= h) {
7342
+ _?.(`Only ${h} attachments can be sent at once`);
7343
+ return;
7344
+ }
7345
+ let n = bo();
7346
+ if (!n) {
7347
+ _?.("Voice recording is not supported in this browser");
7348
+ return;
7349
+ }
7350
+ ce.current = !0;
7351
+ let r;
7352
+ try {
7353
+ r = await navigator.mediaDevices.getUserMedia({ audio: !0 });
7354
+ } catch {
7355
+ ce.current = !1, _?.("Microphone access was denied");
7356
+ return;
7357
+ }
7358
+ ce.current = !1, ie.current = r, re.current = [], se.current = !1;
7359
+ let i = new MediaRecorder(r, { mimeType: n });
7360
+ i.ondataavailable = (e) => {
7361
+ e.data.size > 0 && re.current.push(e.data);
7362
+ }, i.onstop = () => {
7363
+ xe();
7364
+ let t = se.current, r = Date.now() - ae.current, i = new Blob(re.current, { type: n });
7365
+ if (re.current = [], t || r < 300 || de.current) return;
7366
+ let a = new File([i], `voice-note.${xo(n)}`, { type: n }), o = le.current.trim(), s = [...ue.current, {
7367
+ file: a,
7368
+ kind: "audio",
7369
+ durationMs: r
7370
+ }];
7371
+ if (s.length > h) {
7372
+ _?.(`Only ${h} attachments can be sent at once`);
7373
+ return;
7374
+ }
7375
+ e(o, s), y(""), ve(), A.current && (A.current.style.height = "auto");
7376
+ }, N.current = i, ae.current = Date.now(), k(0), i.start(), D(!0), oe.current = setInterval(() => {
7377
+ let e = Date.now() - ae.current;
7378
+ k(e), e >= m * 1e3 && Ce(!1);
7379
+ }, 250);
7380
+ }
7381
+ function Ce(e) {
7382
+ oe.current &&= (clearInterval(oe.current), null), se.current = e, N.current && N.current.state !== "inactive" && N.current.stop(), D(!1), k(0);
7175
7383
  }
7176
- function te(e) {
7177
- e.key === "Enter" && !e.shiftKey && (e.preventDefault(), M());
7384
+ function we(e) {
7385
+ e.key === "Enter" && !e.shiftKey && (e.preventDefault(), be());
7178
7386
  }
7179
- function ne(e) {
7387
+ function Te(e) {
7180
7388
  let t = e.currentTarget;
7181
- g(t.value), t.style.height = "auto", t.style.height = `${t.scrollHeight}px`;
7389
+ y(t.value), t.style.height = "auto", t.style.height = `${t.scrollHeight}px`;
7182
7390
  }
7183
- function re(e, t) {
7391
+ function Ee(e, t) {
7184
7392
  if (e.length === 0) return;
7185
7393
  let n = [], r = [];
7186
7394
  for (let i of e) {
7187
- if (t === "image" && !mo(i)) {
7395
+ if (t === "image" && !wo(i)) {
7188
7396
  r.push(`${i.name} (image type not supported)`);
7189
7397
  continue;
7190
7398
  }
7191
- if (t === "file" && !po(i)) {
7399
+ if (t === "file" && !Co(i)) {
7192
7400
  r.push(`${i.name} (file type not supported)`);
7193
7401
  continue;
7194
7402
  }
7195
- if (i.size > k) {
7196
- r.push(`${i.name} (over ${m} MB)`);
7403
+ if (i.size > pe) {
7404
+ r.push(`${i.name} (over ${g} MB)`);
7197
7405
  continue;
7198
7406
  }
7199
7407
  n.push({
@@ -7201,60 +7409,60 @@ function ho({ onSend: e, disabled: t = !1, placeholder: u = "Type a message…",
7201
7409
  kind: t
7202
7410
  });
7203
7411
  }
7204
- v((e) => {
7205
- let t = [...e, ...n], i = t.slice(0, p);
7206
- return t.length > p && r.push(`max ${p} attachments allowed`), b((e) => {
7412
+ x((e) => {
7413
+ let t = [...e, ...n], i = t.slice(0, h);
7414
+ return t.length > h && r.push(`max ${h} attachments allowed`), C((e) => {
7207
7415
  let t = new Map(e);
7208
7416
  for (let e of i) e.kind === "image" && !t.has(e.file) && t.set(e.file, URL.createObjectURL(e.file));
7209
7417
  return t;
7210
7418
  }), i;
7211
7419
  }), r.length > 0 && alert(`Some attachments were not added:\n• ${r.join("\n• ")}`);
7212
7420
  }
7213
- function ie(e) {
7421
+ function De(e) {
7214
7422
  let t = Array.from(e.currentTarget.files ?? []);
7215
- e.currentTarget.value = "", re(t, "image");
7423
+ e.currentTarget.value = "", Ee(t, "image");
7216
7424
  }
7217
- function ae(e) {
7425
+ function Oe(e) {
7218
7426
  let t = Array.from(e.currentTarget.files ?? []);
7219
- e.currentTarget.value = "", re(t, "file");
7427
+ e.currentTarget.value = "", Ee(t, "file");
7220
7428
  }
7221
- function oe() {
7222
- S(!1), w.current?.click();
7429
+ function ke() {
7430
+ T(!1), ee.current?.click();
7223
7431
  }
7224
- function se() {
7225
- S(!1), T.current?.click();
7432
+ function Ae() {
7433
+ T(!1), j.current?.click();
7226
7434
  }
7227
- let ce = !t && (!!h.trim() || _.length > 0);
7435
+ let je = !t && (!!v.trim() || b.length > 0);
7228
7436
  return /* @__PURE__ */ l("div", {
7229
7437
  className: "ak-composer",
7230
7438
  children: [
7231
- O && x && /* @__PURE__ */ l("div", {
7232
- ref: E,
7439
+ fe && w && /* @__PURE__ */ l("div", {
7440
+ ref: M,
7233
7441
  className: "ak-composer__attach-menu",
7234
7442
  role: "menu",
7235
7443
  children: [d && /* @__PURE__ */ l("button", {
7236
7444
  className: "ak-composer__attach-menu-item",
7237
- onClick: oe,
7445
+ onClick: ke,
7238
7446
  type: "button",
7239
7447
  role: "menuitem",
7240
7448
  disabled: t,
7241
- children: [/* @__PURE__ */ c(io, {}), /* @__PURE__ */ c("span", { children: "Photo" })]
7449
+ children: [/* @__PURE__ */ c(co, {}), /* @__PURE__ */ c("span", { children: "Photo" })]
7242
7450
  }), f && /* @__PURE__ */ l("button", {
7243
7451
  className: "ak-composer__attach-menu-item",
7244
- onClick: se,
7452
+ onClick: Ae,
7245
7453
  type: "button",
7246
7454
  role: "menuitem",
7247
7455
  disabled: t,
7248
- children: [/* @__PURE__ */ c(ao, {}), /* @__PURE__ */ c("span", { children: "File" })]
7456
+ children: [/* @__PURE__ */ c(lo, {}), /* @__PURE__ */ c("span", { children: "File" })]
7249
7457
  })]
7250
7458
  }),
7251
- _.length > 0 && /* @__PURE__ */ c("div", {
7459
+ b.length > 0 && /* @__PURE__ */ c("div", {
7252
7460
  className: "ak-composer__attachments",
7253
7461
  role: "list",
7254
- children: _.map((e, n) => {
7462
+ children: b.map((e, n) => {
7255
7463
  let r = `${e.file.name}-${n}`;
7256
7464
  if (e.kind === "image") {
7257
- let i = y.get(e.file);
7465
+ let i = S.get(e.file);
7258
7466
  return /* @__PURE__ */ l("div", {
7259
7467
  className: "ak-composer__preview-wrap",
7260
7468
  role: "listitem",
@@ -7264,11 +7472,11 @@ function ho({ onSend: e, disabled: t = !1, placeholder: u = "Type a message…",
7264
7472
  className: "ak-composer__preview-img"
7265
7473
  }), /* @__PURE__ */ c("button", {
7266
7474
  className: "ak-composer__preview-remove",
7267
- onClick: () => j(n),
7475
+ onClick: () => ye(n),
7268
7476
  type: "button",
7269
7477
  "aria-label": `Remove ${e.file.name}`,
7270
7478
  disabled: t,
7271
- children: /* @__PURE__ */ c(oo, {})
7479
+ children: /* @__PURE__ */ c(uo, {})
7272
7480
  })]
7273
7481
  }, r);
7274
7482
  }
@@ -7276,7 +7484,7 @@ function ho({ onSend: e, disabled: t = !1, placeholder: u = "Type a message…",
7276
7484
  className: "ak-composer__file-chip",
7277
7485
  role: "listitem",
7278
7486
  children: [
7279
- /* @__PURE__ */ c(ao, {}),
7487
+ /* @__PURE__ */ c(lo, {}),
7280
7488
  /* @__PURE__ */ c("span", {
7281
7489
  className: "ak-composer__file-chip-name",
7282
7490
  title: e.file.name,
@@ -7284,61 +7492,90 @@ function ho({ onSend: e, disabled: t = !1, placeholder: u = "Type a message…",
7284
7492
  }),
7285
7493
  /* @__PURE__ */ c("button", {
7286
7494
  className: "ak-composer__file-chip-remove",
7287
- onClick: () => j(n),
7495
+ onClick: () => ye(n),
7288
7496
  type: "button",
7289
7497
  "aria-label": `Remove ${e.file.name}`,
7290
7498
  disabled: t,
7291
- children: /* @__PURE__ */ c(oo, {})
7499
+ children: /* @__PURE__ */ c(uo, {})
7292
7500
  })
7293
7501
  ]
7294
7502
  }, r);
7295
7503
  })
7296
7504
  }),
7297
- /* @__PURE__ */ l("div", {
7505
+ fe && /* @__PURE__ */ l(s, { children: [d && /* @__PURE__ */ c("input", {
7506
+ ref: ee,
7507
+ type: "file",
7508
+ multiple: !0,
7509
+ accept: vo,
7510
+ className: "ak-composer__file-input",
7511
+ onChange: De,
7512
+ disabled: t,
7513
+ "aria-label": "Attach images"
7514
+ }), f && /* @__PURE__ */ c("input", {
7515
+ ref: j,
7516
+ type: "file",
7517
+ multiple: !0,
7518
+ accept: go,
7519
+ className: "ak-composer__file-input",
7520
+ onChange: Oe,
7521
+ disabled: t,
7522
+ "aria-label": "Attach files"
7523
+ })] }),
7524
+ /* @__PURE__ */ c("div", {
7298
7525
  className: "ak-composer__input-wrap",
7299
- children: [
7300
- O && /* @__PURE__ */ l(s, { children: [
7301
- d && /* @__PURE__ */ c("input", {
7302
- ref: w,
7303
- type: "file",
7304
- multiple: !0,
7305
- accept: fo,
7306
- className: "ak-composer__file-input",
7307
- onChange: ie,
7308
- disabled: t,
7309
- "aria-label": "Attach images"
7526
+ children: E ? /* @__PURE__ */ l("div", {
7527
+ className: "ak-composer__recording",
7528
+ children: [
7529
+ /* @__PURE__ */ c("button", {
7530
+ className: "ak-composer__recording-cancel",
7531
+ onClick: () => Ce(!0),
7532
+ "aria-label": "Cancel recording",
7533
+ type: "button",
7534
+ children: /* @__PURE__ */ c(uo, {})
7310
7535
  }),
7311
- f && /* @__PURE__ */ c("input", {
7312
- ref: T,
7313
- type: "file",
7314
- multiple: !0,
7315
- accept: lo,
7316
- className: "ak-composer__file-input",
7317
- onChange: ae,
7318
- disabled: t,
7319
- "aria-label": "Attach files"
7536
+ /* @__PURE__ */ l("span", {
7537
+ className: "ak-composer__recording-timer",
7538
+ children: [/* @__PURE__ */ c("span", { className: "ak-composer__recording-dot" }), So(O)]
7320
7539
  }),
7321
- /* @__PURE__ */ c("div", {
7322
- className: "ak-composer__attach-wrap",
7323
- children: /* @__PURE__ */ c("button", {
7324
- ref: D,
7325
- className: `ak-composer__attach${x ? " ak-composer__attach--open" : ""}`,
7326
- onClick: () => S((e) => !e),
7327
- disabled: t,
7328
- "aria-label": "Attachment options",
7329
- "aria-haspopup": "true",
7330
- "aria-expanded": x,
7331
- type: "button",
7332
- children: /* @__PURE__ */ c(ro, {})
7333
- })
7540
+ /* @__PURE__ */ c("button", {
7541
+ ref: ne,
7542
+ className: "ak-composer__recording-stop",
7543
+ onClick: () => Ce(!1),
7544
+ "aria-label": "Stop recording",
7545
+ type: "button",
7546
+ children: /* @__PURE__ */ c(po, {})
7547
+ })
7548
+ ]
7549
+ }) : /* @__PURE__ */ l(s, { children: [
7550
+ fe && /* @__PURE__ */ c("div", {
7551
+ className: "ak-composer__attach-wrap",
7552
+ children: /* @__PURE__ */ c("button", {
7553
+ ref: te,
7554
+ className: `ak-composer__attach${w ? " ak-composer__attach--open" : ""}`,
7555
+ onClick: () => T((e) => !e),
7556
+ disabled: t,
7557
+ "aria-label": "Attachment options",
7558
+ "aria-haspopup": "true",
7559
+ "aria-expanded": w,
7560
+ type: "button",
7561
+ children: /* @__PURE__ */ c(so, {})
7334
7562
  })
7335
- ] }),
7563
+ }),
7564
+ me && /* @__PURE__ */ c("button", {
7565
+ className: "ak-composer__mic",
7566
+ onClick: () => void Se(),
7567
+ disabled: t || b.length >= h,
7568
+ "aria-label": b.length >= h ? `Only ${h} attachments can be sent at once` : "Record a voice note",
7569
+ title: b.length >= h ? `Only ${h} attachments can be sent at once` : "Record a voice note",
7570
+ type: "button",
7571
+ children: /* @__PURE__ */ c(fo, {})
7572
+ }),
7336
7573
  /* @__PURE__ */ c("textarea", {
7337
- ref: C,
7574
+ ref: A,
7338
7575
  className: "ak-composer__input",
7339
- value: h,
7340
- onInput: ne,
7341
- onKeyDown: te,
7576
+ value: v,
7577
+ onInput: Te,
7578
+ onKeyDown: we,
7342
7579
  placeholder: u,
7343
7580
  disabled: t,
7344
7581
  rows: 1,
@@ -7346,13 +7583,13 @@ function ho({ onSend: e, disabled: t = !1, placeholder: u = "Type a message…",
7346
7583
  }),
7347
7584
  /* @__PURE__ */ c("button", {
7348
7585
  className: "ak-composer__send",
7349
- onClick: M,
7350
- disabled: !ce,
7586
+ onClick: be,
7587
+ disabled: !je,
7351
7588
  "aria-label": "Send message",
7352
7589
  type: "button",
7353
- children: /* @__PURE__ */ c(no, {})
7590
+ children: /* @__PURE__ */ c(oo, {})
7354
7591
  })
7355
- ]
7592
+ ] })
7356
7593
  }),
7357
7594
  /* @__PURE__ */ l("p", {
7358
7595
  className: "ak-composer__disclaimer",
@@ -7360,7 +7597,7 @@ function ho({ onSend: e, disabled: t = !1, placeholder: u = "Type a message…",
7360
7597
  "By chatting you agree to our",
7361
7598
  " ",
7362
7599
  /* @__PURE__ */ c("a", {
7363
- href: eo,
7600
+ href: io,
7364
7601
  target: "_blank",
7365
7602
  rel: "noopener noreferrer",
7366
7603
  children: "Privacy Policy"
@@ -7369,7 +7606,7 @@ function ho({ onSend: e, disabled: t = !1, placeholder: u = "Type a message…",
7369
7606
  "and",
7370
7607
  " ",
7371
7608
  /* @__PURE__ */ c("a", {
7372
- href: to,
7609
+ href: ao,
7373
7610
  target: "_blank",
7374
7611
  rel: "noopener noreferrer",
7375
7612
  children: "Terms of Service"
@@ -7383,7 +7620,7 @@ function ho({ onSend: e, disabled: t = !1, placeholder: u = "Type a message…",
7383
7620
  }
7384
7621
  //#endregion
7385
7622
  //#region ../../packages/widget-ui/src/components/ErrorState.tsx
7386
- function go({ message: e }) {
7623
+ function Eo({ message: e }) {
7387
7624
  return e.includes("Origin not allowed") ? /* @__PURE__ */ l("div", {
7388
7625
  className: "ak-error ak-error--origin",
7389
7626
  role: "alert",
@@ -7417,7 +7654,7 @@ function go({ message: e }) {
7417
7654
  }
7418
7655
  //#endregion
7419
7656
  //#region ../../packages/widget-ui/src/components/MaintenanceState.tsx
7420
- function _o() {
7657
+ function Do() {
7421
7658
  return /* @__PURE__ */ l("svg", {
7422
7659
  width: "28",
7423
7660
  height: "28",
@@ -7435,7 +7672,7 @@ function _o() {
7435
7672
  }), /* @__PURE__ */ c("path", { d: "M12 7v5l3 2" })]
7436
7673
  });
7437
7674
  }
7438
- function vo() {
7675
+ function Oo() {
7439
7676
  return /* @__PURE__ */ l("div", {
7440
7677
  className: "ak-maintenance",
7441
7678
  role: "status",
@@ -7447,7 +7684,7 @@ function vo() {
7447
7684
  }),
7448
7685
  /* @__PURE__ */ c("div", {
7449
7686
  className: "ak-maintenance__icon",
7450
- children: /* @__PURE__ */ c(_o, {})
7687
+ children: /* @__PURE__ */ c(Do, {})
7451
7688
  }),
7452
7689
  /* @__PURE__ */ c("p", {
7453
7690
  className: "ak-maintenance__title",
@@ -7462,7 +7699,7 @@ function vo() {
7462
7699
  }
7463
7700
  //#endregion
7464
7701
  //#region ../../packages/widget-ui/src/components/WidgetShell.tsx
7465
- function yo() {
7702
+ function ko() {
7466
7703
  return /* @__PURE__ */ l("svg", {
7467
7704
  width: "11",
7468
7705
  height: "11",
@@ -7481,11 +7718,11 @@ function yo() {
7481
7718
  })]
7482
7719
  });
7483
7720
  }
7484
- function bo() {
7721
+ function Ao() {
7485
7722
  return /* @__PURE__ */ l("div", {
7486
7723
  className: "ak-branding",
7487
7724
  children: [
7488
- /* @__PURE__ */ c(yo, {}),
7725
+ /* @__PURE__ */ c(ko, {}),
7489
7726
  /* @__PURE__ */ c("span", {
7490
7727
  className: "ak-branding__label",
7491
7728
  children: "Powered by"
@@ -7497,7 +7734,8 @@ function bo() {
7497
7734
  ]
7498
7735
  });
7499
7736
  }
7500
- function xo({ config: e, messages: t, isLoading: n, error: r, isInline: i, initStatus: a, initError: o, callbacks: u }) {
7737
+ function jo({ config: e, messages: t, isLoading: n, error: r, isInline: i, initStatus: a, initError: u, callbacks: d }) {
7738
+ let [f, p] = o(null);
7501
7739
  return /* @__PURE__ */ l("div", {
7502
7740
  className: i ? "ak-shell-wrap" : "ak-shell-wrap ak-shell-enter",
7503
7741
  children: [/* @__PURE__ */ l("div", {
@@ -7505,12 +7743,12 @@ function xo({ config: e, messages: t, isLoading: n, error: r, isInline: i, initS
7505
7743
  role: "dialog",
7506
7744
  "aria-label": e.title,
7507
7745
  children: [
7508
- /* @__PURE__ */ c(ka, {
7746
+ /* @__PURE__ */ c(Ma, {
7509
7747
  title: e.title,
7510
7748
  subtitle: e.subtitle,
7511
7749
  avatarUrl: e.avatarUrl,
7512
- onClose: u.onClose,
7513
- onReset: a === "ready" ? u.onReset : void 0,
7750
+ onClose: d.onClose,
7751
+ onReset: a === "ready" ? d.onReset : void 0,
7514
7752
  hideClose: i
7515
7753
  }),
7516
7754
  a === "validating" && /* @__PURE__ */ c("div", {
@@ -7522,41 +7760,46 @@ function xo({ config: e, messages: t, isLoading: n, error: r, isInline: i, initS
7522
7760
  }),
7523
7761
  a === "error" && /* @__PURE__ */ c("div", {
7524
7762
  className: "ak-init-status ak-init-status--error",
7525
- children: /* @__PURE__ */ c(go, { message: o ?? "Widget configuration is invalid." })
7763
+ children: /* @__PURE__ */ c(Eo, { message: u ?? "Widget configuration is invalid." })
7526
7764
  }),
7527
7765
  a === "disabled" && /* @__PURE__ */ c("div", {
7528
7766
  className: "ak-init-status ak-init-status--maintenance",
7529
- children: /* @__PURE__ */ c(vo, {})
7767
+ children: /* @__PURE__ */ c(Oo, {})
7530
7768
  }),
7531
7769
  a === "ready" && /* @__PURE__ */ l(s, { children: [
7532
- t.length === 0 ? /* @__PURE__ */ c($a, {
7770
+ t.length === 0 ? /* @__PURE__ */ c(ro, {
7533
7771
  title: e.title,
7534
7772
  description: e.description ?? e.subtitle,
7535
7773
  suggestedQuestions: e.suggestedQuestions,
7536
7774
  avatarUrl: e.avatarUrl,
7537
- onSelect: (e) => u.onSendMessage(e, [])
7538
- }) : /* @__PURE__ */ c(Za, {
7775
+ onSelect: (e) => d.onSendMessage(e, [])
7776
+ }) : /* @__PURE__ */ c(to, {
7539
7777
  messages: t,
7540
7778
  isLoading: n
7541
7779
  }),
7542
- r && /* @__PURE__ */ c(go, { message: r }),
7543
- /* @__PURE__ */ c(ho, {
7544
- onSend: u.onSendMessage,
7780
+ (r || f) && /* @__PURE__ */ c(Eo, { message: r ?? f }),
7781
+ /* @__PURE__ */ c(To, {
7782
+ onSend: (e, t) => {
7783
+ p(null), d.onSendMessage(e, t);
7784
+ },
7785
+ onRecordingError: p,
7545
7786
  disabled: n,
7546
7787
  placeholder: "Type a message…",
7547
7788
  photoSendingEnabled: e.photoSendingEnabled,
7548
7789
  fileUploadEnabled: e.fileUploadEnabled,
7790
+ voiceNoteEnabled: e.voiceNoteEnabled,
7791
+ voiceNoteMaxDurationSec: e.voiceNoteMaxDurationSec,
7549
7792
  attachmentMaxCount: e.attachmentMaxCount,
7550
7793
  attachmentMaxFileSizeMb: e.attachmentMaxFileSizeMb
7551
7794
  })
7552
7795
  ] })
7553
7796
  ]
7554
- }), !i && /* @__PURE__ */ c(bo, {})]
7797
+ }), !i && /* @__PURE__ */ c(Ao, {})]
7555
7798
  });
7556
7799
  }
7557
7800
  //#endregion
7558
7801
  //#region ../../packages/widget-ui/src/components/Launcher.tsx
7559
- function So() {
7802
+ function Mo() {
7560
7803
  return /* @__PURE__ */ c("svg", {
7561
7804
  width: "24",
7562
7805
  height: "24",
@@ -7569,7 +7812,7 @@ function So() {
7569
7812
  children: /* @__PURE__ */ c("path", { d: "M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z" })
7570
7813
  });
7571
7814
  }
7572
- function Co() {
7815
+ function No() {
7573
7816
  return /* @__PURE__ */ c("svg", {
7574
7817
  width: "22",
7575
7818
  height: "22",
@@ -7582,7 +7825,7 @@ function Co() {
7582
7825
  children: /* @__PURE__ */ c("polyline", { points: "6,9 12,15 18,9" })
7583
7826
  });
7584
7827
  }
7585
- function wo({ isOpen: e, onClick: t, avatarUrl: n, ariaLabel: r = "Toggle chat" }) {
7828
+ function Po({ isOpen: e, onClick: t, avatarUrl: n, ariaLabel: r = "Toggle chat" }) {
7586
7829
  let i = !e && !!n;
7587
7830
  return /* @__PURE__ */ c("button", {
7588
7831
  className: `ak-launcher${i ? " ak-launcher--avatar" : ""}`,
@@ -7590,31 +7833,31 @@ function wo({ isOpen: e, onClick: t, avatarUrl: n, ariaLabel: r = "Toggle chat"
7590
7833
  "aria-label": r,
7591
7834
  "aria-expanded": e,
7592
7835
  type: "button",
7593
- children: e ? /* @__PURE__ */ c(Co, {}) : i ? /* @__PURE__ */ c("img", {
7836
+ children: e ? /* @__PURE__ */ c(No, {}) : i ? /* @__PURE__ */ c("img", {
7594
7837
  src: n,
7595
7838
  alt: "",
7596
7839
  className: "ak-launcher__avatar-img",
7597
7840
  "aria-hidden": "true"
7598
- }) : /* @__PURE__ */ c(So, {})
7841
+ }) : /* @__PURE__ */ c(Mo, {})
7599
7842
  });
7600
7843
  }
7601
7844
  //#endregion
7602
7845
  //#region ../../packages/widget-ui/src/WidgetApp.tsx
7603
- function To({ config: e, state: t, callbacks: n }) {
7846
+ function Fo({ config: e, state: t, callbacks: n }) {
7604
7847
  let i = e.mode === "inline", o = a(null);
7605
7848
  return r(() => {
7606
7849
  let t = o.current?.getRootNode()?.host;
7607
7850
  if (!t) return;
7608
- let n = wa(e.theme.mode);
7851
+ let n = Da(e.theme.mode);
7609
7852
  t.setAttribute("data-theme", n);
7610
7853
  }, [e.theme.mode]), r(() => {
7611
7854
  if (i) return;
7612
7855
  let e = o.current?.getRootNode()?.host;
7613
7856
  e && (t.isOpen ? e.setAttribute("data-open", "") : e.removeAttribute("data-open"));
7614
- }, [i, t.isOpen]), i ? /* @__PURE__ */ c("div", {
7857
+ }, [i, t.isOpen]), t.initStatus === "disabled" && !i ? null : i ? /* @__PURE__ */ c("div", {
7615
7858
  ref: o,
7616
7859
  className: "ak-inline",
7617
- children: /* @__PURE__ */ c(xo, {
7860
+ children: /* @__PURE__ */ c(jo, {
7618
7861
  config: e,
7619
7862
  messages: t.messages,
7620
7863
  isLoading: t.isLoading,
@@ -7627,7 +7870,7 @@ function To({ config: e, state: t, callbacks: n }) {
7627
7870
  }) : /* @__PURE__ */ l("div", {
7628
7871
  ref: o,
7629
7872
  className: "ak-floating",
7630
- children: [t.isOpen && /* @__PURE__ */ c(xo, {
7873
+ children: [t.isOpen && /* @__PURE__ */ c(jo, {
7631
7874
  config: e,
7632
7875
  messages: t.messages,
7633
7876
  isLoading: t.isLoading,
@@ -7636,7 +7879,7 @@ function To({ config: e, state: t, callbacks: n }) {
7636
7879
  initStatus: t.initStatus,
7637
7880
  initError: t.initError,
7638
7881
  callbacks: n
7639
- }), /* @__PURE__ */ c(wo, {
7882
+ }), /* @__PURE__ */ c(Po, {
7640
7883
  isOpen: t.isOpen,
7641
7884
  onClick: t.isOpen ? n.onClose : n.onOpen,
7642
7885
  avatarUrl: e.avatarUrl
@@ -7645,15 +7888,15 @@ function To({ config: e, state: t, callbacks: n }) {
7645
7888
  }
7646
7889
  //#endregion
7647
7890
  //#region ../../packages/widget-ui/src/index.ts
7648
- var Eo = (n, r, i, a) => {
7891
+ var Io = (n, r, i, a) => {
7649
7892
  let o = e(n);
7650
- return o.render(t(To, {
7893
+ return o.render(t(Fo, {
7651
7894
  config: r,
7652
7895
  state: i,
7653
7896
  callbacks: a
7654
7897
  })), {
7655
7898
  update(e, n) {
7656
- o.render(t(To, {
7899
+ o.render(t(Fo, {
7657
7900
  config: n,
7658
7901
  state: e,
7659
7902
  callbacks: a
@@ -7666,28 +7909,28 @@ var Eo = (n, r, i, a) => {
7666
7909
  }
7667
7910
  };
7668
7911
  };
7669
- function Do(e) {
7670
- return Ta + "\n" + Ca(e);
7912
+ function Lo(e) {
7913
+ return Oa + "\n" + Ea(e);
7671
7914
  }
7672
7915
  //#endregion
7673
7916
  //#region src/api.ts
7674
- function Oo(e, t) {
7675
- return Do(_t({
7917
+ function Ro(e, t) {
7918
+ return Lo(gt({
7676
7919
  ...e,
7677
7920
  mode: t
7678
7921
  }));
7679
7922
  }
7680
- function ko(e, t = Eo, n) {
7681
- return va(e, t, n ?? Oo(e, "floating"));
7923
+ function zo(e, t = Io, n) {
7924
+ return xa(e, t, n ?? Ro(e, "floating"));
7682
7925
  }
7683
- function Ao(e, t, n = Eo, r) {
7684
- return ba(e, t, n, r ?? Oo(t, "inline"));
7926
+ function Bo(e, t, n = Io, r) {
7927
+ return Ca(e, t, n, r ?? Ro(t, "inline"));
7685
7928
  }
7686
- function jo(e, t, n = Eo, r) {
7687
- return ya(e, t, n, r ?? Oo(t, "floating"));
7929
+ function Vo(e, t, n = Io, r) {
7930
+ return Sa(e, t, n, r ?? Ro(t, "floating"));
7688
7931
  }
7689
- function Mo(e) {
7690
- xa(e);
7932
+ function Ho(e) {
7933
+ wa(e);
7691
7934
  }
7692
7935
  //#endregion
7693
- export { Oi as ApiClient, ho as Composer, go as ErrorState, Gi as EventEmitter, ka as Header, wo as Launcher, Ja as MessageBubble, Za as MessageList, Ya as TypingIndicator, To as WidgetApp, na as WidgetClient, xo as WidgetShell, Ca as buildThemeVars, Do as buildWidgetCSS, Xi as clearSession, la as createFloatingContainer, aa as createShadowHost, ma as createWidget, Mo as destroy, xa as destroyWidget, Ji as getSessionId, ko as init, oa as injectStyles, Sa as listWidgets, Ao as mount, jo as mountFloating, _t as normalizeConfig, da as prepareInlineContainer, sa as removeShadowHost, Eo as renderWidget, wa as resolveThemeMode, Yi as setSessionId, ji as streamChat, Ta as widgetCSS };
7936
+ export { Oi as ApiClient, To as Composer, Eo as ErrorState, Gi as EventEmitter, Ma as Header, Po as Launcher, Qa as MessageBubble, to as MessageList, $a as TypingIndicator, Fo as WidgetApp, aa as WidgetClient, jo as WidgetShell, Ea as buildThemeVars, Lo as buildWidgetCSS, Xi as clearSession, fa as createFloatingContainer, ca as createShadowHost, _a as createWidget, Ho as destroy, wa as destroyWidget, Ji as getSessionId, zo as init, la as injectStyles, Ta as listWidgets, Bo as mount, Vo as mountFloating, gt as normalizeConfig, ma as prepareInlineContainer, ua as removeShadowHost, Io as renderWidget, Da as resolveThemeMode, Yi as setSessionId, ji as streamChat, Oa as widgetCSS };