@vehiclehistory/property-lib 0.0.2 → 0.0.4

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.
@@ -1,6 +1,6 @@
1
1
  import { jsx as i, jsxs as g, Fragment as z } from "react/jsx-runtime";
2
- import { memo as A, useState as x, useEffect as k } from "react";
3
- const Z = {
2
+ import { memo as A, useState as Z, useEffect as S, useRef as q } from "react";
3
+ const B = {
4
4
  xxSmall: "w-4 h-4",
5
5
  xSmall: "w-5 h-5",
6
6
  small: "w-6 h-6",
@@ -9,7 +9,7 @@ const Z = {
9
9
  mediumPlus: "w-9 h-9",
10
10
  large: "w-10 h-10",
11
11
  xLarge: "w-12 h-12"
12
- }, N = {
12
+ }, I = {
13
13
  account: {
14
14
  path: '<path d="M12,4A4,4 0 0,1 16,8A4,4 0 0,1 12,12A4,4 0 0,1 8,8A4,4 0 0,1 12,4M12,14C16.42,14 20,15.79 20,18V20H4V18C4,15.79 7.58,14 12,14Z" />'
15
15
  },
@@ -469,36 +469,36 @@ const Z = {
469
469
  chatBubble: {
470
470
  path: '<path d="M12,3C17.5,3 22,6.58 22,11C22,15.42 17.5,19 12,19C10.76,19 9.57,18.82 8.47,18.5C5.55,21 2,21 2,21C4.33,18.67 4.7,17.1 4.75,16.5C3.05,15.07 2,13.13 2,11C2,6.58 6.5,3 12,3Z" />'
471
471
  }
472
- }, O = (d) => N[d], D = ({
472
+ }, P = (d) => I[d], R = ({
473
473
  color: d = "text-current",
474
- className: t,
475
- name: e,
474
+ className: e,
475
+ name: t,
476
476
  size: a = "medium",
477
- viewBox: r = "0 0 20 20"
477
+ viewBox: l = "0 0 20 20"
478
478
  }) => {
479
- const n = O(e), [s, l] = x(d), [o, c] = x(n);
480
- return k(() => {
479
+ const n = P(t), [s, r] = Z(d), [o, c] = Z(n);
480
+ return S(() => {
481
481
  c(n);
482
- }, [n]), k(() => {
483
- l(d);
484
- }, [d]), !n && console.error("Icon does not exist", e), /* @__PURE__ */ i(
482
+ }, [n]), S(() => {
483
+ r(d);
484
+ }, [d]), !n && console.error("Icon does not exist", t), /* @__PURE__ */ i(
485
485
  "svg",
486
486
  {
487
487
  xmlns: "http://www.w3.org/2000/svg",
488
- className: `${Z[a]} fill-current flex-shrink-0 ${s}${t ? ` ${t}` : ""}`,
488
+ className: `${B[a]} fill-current flex-shrink-0 ${s}${e ? ` ${e}` : ""}`,
489
489
  style: { maxWidth: "4em" },
490
490
  role: "presentation",
491
- viewBox: r,
491
+ viewBox: l,
492
492
  dangerouslySetInnerHTML: {
493
493
  __html: o && o.path
494
494
  }
495
495
  }
496
496
  );
497
- }, y = A(D);
498
- function T(d) {
497
+ }, y = A(R);
498
+ function U(d) {
499
499
  return d && d.__esModule && Object.prototype.hasOwnProperty.call(d, "default") ? d.default : d;
500
500
  }
501
- var S = { exports: {} };
501
+ var D = { exports: {} };
502
502
  /*!
503
503
  Copyright (c) 2018 Jed Watson.
504
504
  Licensed under the MIT License (MIT), see
@@ -506,11 +506,11 @@ var S = { exports: {} };
506
506
  */
507
507
  (function(d) {
508
508
  (function() {
509
- var t = {}.hasOwnProperty;
510
- function e() {
509
+ var e = {}.hasOwnProperty;
510
+ function t() {
511
511
  for (var n = "", s = 0; s < arguments.length; s++) {
512
- var l = arguments[s];
513
- l && (n = r(n, a(l)));
512
+ var r = arguments[s];
513
+ r && (n = l(n, a(r)));
514
514
  }
515
515
  return n;
516
516
  }
@@ -520,49 +520,49 @@ var S = { exports: {} };
520
520
  if (typeof n != "object")
521
521
  return "";
522
522
  if (Array.isArray(n))
523
- return e.apply(null, n);
523
+ return t.apply(null, n);
524
524
  if (n.toString !== Object.prototype.toString && !n.toString.toString().includes("[native code]"))
525
525
  return n.toString();
526
526
  var s = "";
527
- for (var l in n)
528
- t.call(n, l) && n[l] && (s = r(s, l));
527
+ for (var r in n)
528
+ e.call(n, r) && n[r] && (s = l(s, r));
529
529
  return s;
530
530
  }
531
- function r(n, s) {
531
+ function l(n, s) {
532
532
  return s ? n ? n + " " + s : n + s : n;
533
533
  }
534
- d.exports ? (e.default = e, d.exports = e) : window.classNames = e;
534
+ d.exports ? (t.default = t, d.exports = t) : window.classNames = t;
535
535
  })();
536
- })(S);
537
- var E = S.exports;
538
- const V = /* @__PURE__ */ T(E), F = ({
536
+ })(D);
537
+ var Q = D.exports;
538
+ const m = /* @__PURE__ */ U(Q), W = ({
539
539
  children: d,
540
- className: t,
541
- clickHandler: e,
540
+ className: e,
541
+ clickHandler: t,
542
542
  panelClass: a,
543
- title: r,
543
+ title: l,
544
544
  unmount: n = !0,
545
545
  isOpen: s = !1
546
546
  }) => {
547
- const [l, o] = x(s);
548
- return /* @__PURE__ */ i("div", { className: V("shadow rounded-lg", t), children: /* @__PURE__ */ g(z, { children: [
547
+ const [r, o] = Z(s);
548
+ return /* @__PURE__ */ i("div", { className: m("shadow rounded-lg", e), children: /* @__PURE__ */ g(z, { children: [
549
549
  /* @__PURE__ */ g(
550
550
  "button",
551
551
  {
552
552
  type: "button",
553
- "data-div-track": `report | accordion | ${r}`,
554
- className: V(
553
+ "data-div-track": `report | accordion | ${l}`,
554
+ className: m(
555
555
  "acc-a flex w-full justify-between items-center bg-gray-50 px-4 py-2 text-left font-medium text-slate-700 border border-gray-200 focus:outline-none focus-visible:ring focus-visible:ring-gray-500 focus-visible:ring-opacity-75",
556
556
  {
557
- "acc-o": l
557
+ "acc-o": r
558
558
  }
559
559
  ),
560
- title: r,
560
+ title: l,
561
561
  onClick: () => {
562
- o(!l), e && e(!l);
562
+ o(!r), t && t(!r);
563
563
  },
564
564
  children: [
565
- /* @__PURE__ */ i("div", { className: "font-medium text-slate-700 sm-max:!text-base text-lg flex items-center", children: r }),
565
+ /* @__PURE__ */ i("div", { className: "font-medium text-slate-700 sm-max:!text-base text-lg flex items-center", children: l }),
566
566
  /* @__PURE__ */ i("span", { className: "ml-6 h-7 flex items-center", children: /* @__PURE__ */ i(
567
567
  y,
568
568
  {
@@ -574,10 +574,10 @@ const V = /* @__PURE__ */ T(E), F = ({
574
574
  ]
575
575
  }
576
576
  ),
577
- n && l && /* @__PURE__ */ i(
577
+ n && r && /* @__PURE__ */ i(
578
578
  "div",
579
579
  {
580
- className: V(
580
+ className: m(
581
581
  "acc-p p-4 border-x border-b rounded-bl-lg rounded-br-lg border-gray-200 relative",
582
582
  a
583
583
  ),
@@ -587,25 +587,25 @@ const V = /* @__PURE__ */ T(E), F = ({
587
587
  !n && /* @__PURE__ */ i(
588
588
  "div",
589
589
  {
590
- className: V(
590
+ className: m(
591
591
  "acc-p p-4 border-x border-b rounded-bl-lg rounded-br-lg border-gray-200 relative",
592
592
  a,
593
- { hidden: !l }
593
+ { hidden: !r }
594
594
  ),
595
595
  children: d
596
596
  }
597
597
  )
598
598
  ] }) });
599
- }, a1 = A(F), q = ({
599
+ }, u1 = A(W), J = ({
600
600
  children: d,
601
- className: t = "",
602
- messages: e = [],
601
+ className: e = "",
602
+ messages: t = [],
603
603
  title: a = "",
604
- titleClass: r = "",
604
+ titleClass: l = "",
605
605
  props: n = {},
606
606
  type: s = "error"
607
607
  }) => {
608
- const l = {
608
+ const r = {
609
609
  error: {
610
610
  icon: "error",
611
611
  iconColor: "text-red-500",
@@ -626,15 +626,15 @@ const V = /* @__PURE__ */ T(E), F = ({
626
626
  iconColor: "text-yellow-500",
627
627
  styles: "bg-yellow-50 border-yellow-300 text-yellow-700"
628
628
  }
629
- }, { icon: o, iconColor: c, styles: h } = l[s];
629
+ }, { icon: o, iconColor: c, styles: h } = r[s];
630
630
  return /* @__PURE__ */ i(
631
631
  "div",
632
632
  {
633
633
  id: s,
634
- className: V(
634
+ className: m(
635
635
  "rounded w-full py-2 px-4 mb-4 border",
636
636
  h,
637
- t
637
+ e
638
638
  ),
639
639
  ...n,
640
640
  children: /* @__PURE__ */ g("div", { className: "flex", children: [
@@ -648,44 +648,44 @@ const V = /* @__PURE__ */ T(E), F = ({
648
648
  }
649
649
  ) }),
650
650
  /* @__PURE__ */ g("div", { className: "ml-3", children: [
651
- /* @__PURE__ */ i("div", { className: V("font-medium text-sm", r), children: a }),
652
- e.length > 0 ? /* @__PURE__ */ i("div", { className: "mt-2 text-xs", children: /* @__PURE__ */ i("ul", { role: "list", className: "list-disc space-y-1 pl-5", children: e.map((p, M) => /* @__PURE__ */ i("li", { children: p }, M)) }) }) : ""
651
+ /* @__PURE__ */ i("div", { className: m("font-medium text-sm", l), children: a }),
652
+ t.length > 0 ? /* @__PURE__ */ i("div", { className: "mt-2 text-xs", children: /* @__PURE__ */ i("ul", { role: "list", className: "list-disc space-y-1 pl-5", children: t.map((p, f) => /* @__PURE__ */ i("li", { children: p }, f)) }) }) : ""
653
653
  ] })
654
654
  ] })
655
655
  }
656
656
  );
657
- }, n1 = A(q), r1 = ({
657
+ }, p1 = A(J), m1 = ({
658
658
  autoFocus: d = !1,
659
- required: t = !1,
660
- className: e = "",
659
+ required: e = !1,
660
+ className: t = "",
661
661
  defaultValue: a = "",
662
- id: r = "",
662
+ id: l = "",
663
663
  type: n,
664
664
  floatingLabel: s = "",
665
- inputClass: l = "",
665
+ inputClass: r = "",
666
666
  leftIcon: o = "homeSearch",
667
667
  mobileBackdrop: c = !1,
668
668
  showSearchIcon: h = !0,
669
669
  options: p = [],
670
- name: M = "",
670
+ name: f = "",
671
671
  placeholder: v = "",
672
672
  props: b = {},
673
- size: H = "medium",
673
+ size: C = "medium",
674
674
  styles: u = null,
675
- title: C = ""
675
+ title: V = ""
676
676
  }) => /* @__PURE__ */ g(
677
677
  "div",
678
678
  {
679
- id: r,
679
+ id: l,
680
680
  "data-search": "container",
681
681
  "data-search-type": n,
682
- className: V("Autocomplete", e),
682
+ className: m("Autocomplete", t),
683
683
  style: u ? { ...u } : null,
684
684
  children: [
685
685
  h && /* @__PURE__ */ g(
686
686
  "span",
687
687
  {
688
- className: V(
688
+ className: m(
689
689
  "search-icon-left absolute inset-y-0 left-0 flex items-center pl-2",
690
690
  {
691
691
  "pointer-events-none": c
@@ -697,7 +697,7 @@ const V = /* @__PURE__ */ T(E), F = ({
697
697
  {
698
698
  className: "home-search select-none text-gray-500",
699
699
  name: o,
700
- size: H === "xLarge" ? "small" : "xSmall",
700
+ size: C === "xLarge" ? "small" : "xSmall",
701
701
  viewBox: "0 0 24 24"
702
702
  }
703
703
  ),
@@ -706,7 +706,7 @@ const V = /* @__PURE__ */ T(E), F = ({
706
706
  {
707
707
  className: "arrow-left select-none text-gray-500 hidden",
708
708
  name: "arrowLeft",
709
- size: H === "xLarge" ? "small" : "xSmall",
709
+ size: C === "xLarge" ? "small" : "xSmall",
710
710
  viewBox: "0 0 24 24"
711
711
  }
712
712
  )
@@ -718,23 +718,23 @@ const V = /* @__PURE__ */ T(E), F = ({
718
718
  {
719
719
  "data-lpignore": "true",
720
720
  autoFocus: d,
721
- className: V(
721
+ className: m(
722
722
  "w-full bg-white placeholder:bg-white rounded border border-gray-300 py-2 pr-8 shadow-sm focus:outline-none sm-max:text-sm placeholder:text-gray-500 sm-max:placeholder:text-sm placeholder-shown:text-ellipsis truncate",
723
723
  {
724
724
  "pl-8": h === !0,
725
- "px-3 h-10": H === "medium",
726
- "px-4 h-12": H === "large",
727
- "px-5 h-[60px] sm:!text-base": H === "xLarge",
725
+ "px-3 h-10": C === "medium",
726
+ "px-4 h-12": C === "large",
727
+ "px-5 h-[60px] sm:!text-base": C === "xLarge",
728
728
  peer: s
729
729
  },
730
- l
730
+ r
731
731
  ),
732
- required: t,
732
+ required: e,
733
733
  autoComplete: "off",
734
734
  value: a,
735
735
  placeholder: !v && s ? " " : v,
736
736
  type: "search",
737
- name: M || "search-input",
737
+ name: f || "search-input",
738
738
  "data-id": "search-input",
739
739
  ...b
740
740
  }
@@ -742,13 +742,13 @@ const V = /* @__PURE__ */ T(E), F = ({
742
742
  s && /* @__PURE__ */ i(
743
743
  "label",
744
744
  {
745
- className: V(
745
+ className: m(
746
746
  "floating-label absolute text-sm !normal-case text-gray-500 duration-300 transform -translate-y-4 scale-75 top-2 z-10 origin-[0] bg-white px-2 peer-focus:text-[#222] peer-focus:px-2 peer-focus:bg-white peer-placeholder-shown:bg-white peer-placeholder-shown:scale-100 peer-placeholder-shown:-translate-y-1/2 peer-placeholder-shown:top-1/2 peer-focus:top-2 peer-focus:scale-75 peer-focus:-translate-y-4 start-1 pointer-events-none",
747
747
  {
748
748
  "!left-7": h === !0,
749
- "left-2": H === "medium",
750
- "left-3": H === "large",
751
- "left-4": H === "xLarge"
749
+ "left-2": C === "medium",
750
+ "left-3": C === "large",
751
+ "left-4": C === "xLarge"
752
752
  }
753
753
  ),
754
754
  children: s
@@ -798,20 +798,20 @@ const V = /* @__PURE__ */ T(E), F = ({
798
798
  {
799
799
  "data-id": "search-dropdown-body",
800
800
  role: "listbox",
801
- "data-title": C,
801
+ "data-title": V,
802
802
  "aria-labelledby": "Label",
803
803
  "aria-activedescendant": "search-item-0",
804
- children: p.length > 0 ? p.map((w, f) => /* @__PURE__ */ i(
804
+ children: p.length > 0 ? p.map((w, M) => /* @__PURE__ */ i(
805
805
  "li",
806
806
  {
807
- id: `search-item-${f}`,
807
+ id: `search-item-${M}`,
808
808
  tabIndex: -1,
809
809
  className: "dropdown-item text-gray-900 cursor-default select-none py-2 pl-3 pr-4 truncate hover:bg-gray-50 font-normal focus:bg-gray-50 focus:text-green-400 focus-visible:outline-0",
810
- "aria-selected": f === 0,
810
+ "aria-selected": M === 0,
811
811
  role: "option",
812
812
  children: (w == null ? void 0 : w.name) || w
813
813
  },
814
- `search-item-${f}`
814
+ `search-item-${M}`
815
815
  )) : ""
816
816
  }
817
817
  )
@@ -820,34 +820,34 @@ const V = /* @__PURE__ */ T(E), F = ({
820
820
  )
821
821
  ]
822
822
  }
823
- ), l1 = ({
823
+ ), V1 = ({
824
824
  children: d,
825
- className: t = "",
826
- size: e = "sm",
825
+ className: e = "",
826
+ size: t = "sm",
827
827
  tag: a = "span"
828
828
  }) => /* @__PURE__ */ i(
829
829
  a || "span",
830
830
  {
831
- className: V(
831
+ className: m(
832
832
  " bg-gray-200 font-semibold py-1 px-2 rounded-md",
833
833
  {
834
- "text-sm": e === "sm",
835
- "text-xs": e === "xs",
836
- "text-xxs !py-0.5 !px-1.5": e === "xxs"
834
+ "text-sm": t === "sm",
835
+ "text-xs": t === "xs",
836
+ "text-xxs !py-0.5 !px-1.5": t === "xxs"
837
837
  },
838
- t
838
+ e
839
839
  ),
840
840
  children: d
841
841
  }
842
- ), B = ({
842
+ ), G = ({
843
843
  children: d,
844
- className: t = "",
845
- disabled: e = !1,
844
+ className: e = "",
845
+ disabled: t = !1,
846
846
  href: a,
847
- props: r = {},
847
+ props: l = {},
848
848
  rounded: n = !1,
849
849
  type: s = "button",
850
- uppercase: l = !1,
850
+ uppercase: r = !1,
851
851
  variation: o = "primary"
852
852
  }) => {
853
853
  const c = a ? "a" : "button";
@@ -855,7 +855,7 @@ const V = /* @__PURE__ */ T(E), F = ({
855
855
  c,
856
856
  {
857
857
  type: c !== "a" ? s : null,
858
- className: V(
858
+ className: m(
859
859
  "Button",
860
860
  {
861
861
  "Button--primary": o === "primary",
@@ -863,89 +863,89 @@ const V = /* @__PURE__ */ T(E), F = ({
863
863
  "Button--rounded": n,
864
864
  "Button--icon": o === "icon",
865
865
  "Button--link": o === "link",
866
- "Button--disabled": e,
866
+ "Button--disabled": t,
867
867
  "custom-link": a
868
868
  },
869
- l,
870
- t
869
+ r,
870
+ e
871
871
  ),
872
- disabled: e,
872
+ disabled: t,
873
873
  href: a,
874
- ...r,
874
+ ...l,
875
875
  children: d
876
876
  }
877
877
  );
878
- }, s1 = A(B), i1 = ({ children: d, className: t }) => /* @__PURE__ */ i("div", { className: V("flex md:max-w-min border border-gray-300 divide-x divide-gray-200 rounded-lg", t), children: d }), o1 = ({
878
+ }, H1 = A(G), L1 = ({ children: d, className: e }) => /* @__PURE__ */ i("div", { className: m("flex md:max-w-min border border-gray-300 divide-x divide-gray-200 rounded-lg", e), children: d }), C1 = ({
879
879
  block: d = !1,
880
- borderless: t = !1,
881
- children: e,
880
+ borderless: e = !1,
881
+ children: t,
882
882
  className: a = "",
883
- divider: r = !0,
883
+ divider: l = !0,
884
884
  inset: n = !0,
885
885
  id: s = null,
886
- role: l = null
886
+ role: r = null
887
887
  }) => /* @__PURE__ */ i(
888
888
  "div",
889
889
  {
890
- className: V(
890
+ className: m(
891
891
  "bg-white",
892
892
  {
893
- f1: !t,
893
+ f1: !e,
894
894
  f2: d,
895
- f3: r,
895
+ f3: l,
896
896
  f4: n
897
897
  },
898
898
  a
899
899
  ),
900
900
  id: s,
901
- role: l,
902
- children: e
901
+ role: r,
902
+ children: t
903
903
  }
904
- ), j = ({
904
+ ), K = ({
905
905
  checked: d = !1,
906
- children: t,
907
- className: e = "",
906
+ children: e,
907
+ className: t = "",
908
908
  error: a = !1,
909
- id: r = "",
909
+ id: l = "",
910
910
  label: n = "",
911
911
  name: s = "",
912
- props: l = {},
912
+ props: r = {},
913
913
  variation: o = "primary",
914
914
  value: c = ""
915
915
  }) => {
916
- const h = n ? "div" : "label", p = h === "label" ? { htmlFor: r } : {};
916
+ const h = n ? "div" : "label", p = h === "label" ? { htmlFor: l } : {};
917
917
  return /* @__PURE__ */ g(
918
918
  h,
919
919
  {
920
- className: V("checkbox flex items-center", o, e),
920
+ className: m("checkbox flex items-center", o, t),
921
921
  ...p,
922
922
  children: [
923
923
  /* @__PURE__ */ i(
924
924
  "input",
925
925
  {
926
926
  checked: d,
927
- className: V("form-checkbox ", {
927
+ className: m("form-checkbox ", {
928
928
  "!border-red-500 !bg-red-500 focus:!ring-red-500 focus:!border-red-500": a
929
929
  }),
930
- id: r,
930
+ id: l,
931
931
  name: s,
932
932
  type: "checkbox",
933
933
  value: c,
934
- ...l
934
+ ...r
935
935
  }
936
936
  ),
937
- t
937
+ e
938
938
  ]
939
939
  }
940
940
  );
941
- }, c1 = A(j), I = ({ children: d, aside: t, direction: e = "right" }) => /* @__PURE__ */ g("div", { className: "flex flex-col lg:flex-row lg:p-0 max-w-screen-lg", children: [
941
+ }, f1 = A(K), Y = ({ children: d, aside: e, direction: t = "right" }) => /* @__PURE__ */ g("div", { className: "flex flex-col lg:flex-row lg:p-0 max-w-screen-lg", children: [
942
942
  /* @__PURE__ */ i(
943
943
  "main",
944
944
  {
945
- className: V(
945
+ className: m(
946
946
  "w-full md:mb-0 flex-1 md:block lg:max-w-container",
947
947
  {
948
- "lg:order-2": e === "left"
948
+ "lg:order-2": t === "left"
949
949
  }
950
950
  ),
951
951
  children: d
@@ -954,43 +954,43 @@ const V = /* @__PURE__ */ T(E), F = ({
954
954
  /* @__PURE__ */ i(
955
955
  "aside",
956
956
  {
957
- className: V(
957
+ className: m(
958
958
  "sm-max:hidden md:hidden lg:block flex-1 max-w-aside mb-6 md:mb-0 empty:!hidden",
959
959
  {
960
- "md:ml-8": e === "right",
961
- "md:mr-8": e === "left"
960
+ "md:ml-8": t === "right",
961
+ "md:mr-8": t === "left"
962
962
  }
963
963
  ),
964
- children: t
964
+ children: e
965
965
  }
966
966
  )
967
- ] }), d1 = A(I), $ = ({
967
+ ] }), M1 = A(Y), X = ({
968
968
  activator: d,
969
- id: t = "",
970
- children: e,
969
+ id: e = "",
970
+ children: t,
971
971
  className: a = "",
972
- contentClass: r = "",
972
+ contentClass: l = "",
973
973
  dark: n = !1,
974
974
  footer: s,
975
- fullMobile: l = !0,
975
+ fullMobile: r = !0,
976
976
  headerClass: o = "",
977
977
  hideClose: c = !1,
978
978
  iconSize: h = "medium",
979
979
  preventPageScroll: p = !0,
980
- stickyHeader: M = !1,
980
+ stickyHeader: f = !1,
981
981
  title: v = "",
982
982
  titleClass: b = ""
983
983
  }) => /* @__PURE__ */ g(z, { children: [
984
- d && /* @__PURE__ */ i("span", { id: `${t}-dialog-activator`, children: d }),
984
+ d && /* @__PURE__ */ i("span", { id: `${e}-dialog-activator`, children: d }),
985
985
  /* @__PURE__ */ i(
986
986
  "dialog",
987
987
  {
988
988
  inert: "",
989
- id: `${t}-dialog`,
990
- className: V(
989
+ id: `${e}-dialog`,
990
+ className: m(
991
991
  "dialog",
992
992
  {
993
- "dialog-full-mobile": l,
993
+ "dialog-full-mobile": r,
994
994
  dark: n,
995
995
  "prevent-scroll": p
996
996
  },
@@ -1000,17 +1000,17 @@ const V = /* @__PURE__ */ T(E), F = ({
1000
1000
  /* @__PURE__ */ g(
1001
1001
  "header",
1002
1002
  {
1003
- className: V(
1003
+ className: m(
1004
1004
  "dialog-header flex items-center p-4",
1005
1005
  {
1006
- "sticky top-0 bg-white z-10": M,
1006
+ "sticky top-0 bg-white z-10": f,
1007
1007
  "!pb-0 border-0 justify-end": !v,
1008
1008
  "justify-between border-b": v
1009
1009
  },
1010
1010
  o
1011
1011
  ),
1012
1012
  children: [
1013
- v && /* @__PURE__ */ i("h3", { id: `${t}-dialog-title`, className: b, children: v }),
1013
+ v && /* @__PURE__ */ i("h3", { id: `${e}-dialog-title`, className: b, children: v }),
1014
1014
  !c && /* @__PURE__ */ i(
1015
1015
  "button",
1016
1016
  {
@@ -1035,16 +1035,117 @@ const V = /* @__PURE__ */ T(E), F = ({
1035
1035
  /* @__PURE__ */ i(
1036
1036
  "div",
1037
1037
  {
1038
- id: `${t}-dialog-content`,
1039
- className: V("dialog-content", r),
1040
- children: e
1038
+ id: `${e}-dialog-content`,
1039
+ className: m("dialog-content", l),
1040
+ children: t
1041
1041
  }
1042
1042
  ),
1043
- s && /* @__PURE__ */ i("footer", { id: `${t}-dialog-footer`, className: "dialog-footer", children: s })
1043
+ s && /* @__PURE__ */ i("footer", { id: `${e}-dialog-footer`, className: "dialog-footer", children: s })
1044
1044
  ] })
1045
1045
  }
1046
1046
  )
1047
- ] }), h1 = A($), u1 = ({ className: d = "" }) => /* @__PURE__ */ g("div", { id: "dots", className: V("mx-auto", d), children: [
1047
+ ] }), g1 = A(X), _ = ({
1048
+ activator: d,
1049
+ id: e = "",
1050
+ children: t,
1051
+ className: a = "",
1052
+ contentClass: l = "",
1053
+ onClose: n,
1054
+ disableOutsideClick: s = !1,
1055
+ footer: r,
1056
+ fullMobile: o = !0,
1057
+ headerClass: c = "",
1058
+ hideClose: h = !1,
1059
+ iconSize: p = "medium",
1060
+ isOpen: f = !1,
1061
+ setDialogOpen: v,
1062
+ stickyHeader: b = !1,
1063
+ title: C = "",
1064
+ titleClass: u = ""
1065
+ }) => {
1066
+ const V = q(null), w = async () => {
1067
+ V.current.classList.add("closing"), await O(V.current), V.current.classList.remove("closing"), n && n(), v(!1);
1068
+ }, M = async (x) => {
1069
+ x.key === "Escape" && await w();
1070
+ }, N = async ({ clientX: x, clientY: k, target: T }) => {
1071
+ const { left: E, right: j, top: F, bottom: $ } = V.current.getBoundingClientRect() ?? {};
1072
+ (!V.current.contains(T) || x < E || x > j || k < F || k > $) && await w();
1073
+ }, O = (x) => Promise.allSettled(
1074
+ x.getAnimations().map((k) => k.finished)
1075
+ );
1076
+ return S(() => {
1077
+ const x = V.current;
1078
+ x && (f ? x.showModal() : typeof x.close == "function" && x.close());
1079
+ }, [f]), /* @__PURE__ */ g(z, { children: [
1080
+ d && /* @__PURE__ */ i("span", { id: `${e}-dialog-activator`, onClick: () => v(!0), children: d }),
1081
+ /* @__PURE__ */ g(
1082
+ "dialog",
1083
+ {
1084
+ ref: V,
1085
+ id: `${e}-dialog`,
1086
+ className: m(
1087
+ "dialog",
1088
+ {
1089
+ hidden: !f,
1090
+ "xs-max:h-full xs-max:max-h-full": o
1091
+ },
1092
+ a
1093
+ ),
1094
+ onKeyDown: M,
1095
+ onClick: (x) => s ? null : N(x),
1096
+ children: [
1097
+ /* @__PURE__ */ g(
1098
+ "header",
1099
+ {
1100
+ className: m(
1101
+ "dialog-header flex items-center p-4",
1102
+ { "sticky top-0 bg-white": b },
1103
+ c
1104
+ ),
1105
+ children: [
1106
+ /* @__PURE__ */ i("h3", { id: `${e}-dialog-title`, className: u, children: C || "" }),
1107
+ !h && /* @__PURE__ */ i(
1108
+ "button",
1109
+ {
1110
+ type: "button",
1111
+ title: "Close",
1112
+ className: "dialog-close",
1113
+ "data-dialog-close": "",
1114
+ onClick: w,
1115
+ children: /* @__PURE__ */ i(
1116
+ y,
1117
+ {
1118
+ name: "close",
1119
+ size: p,
1120
+ className: "pointer-events-none"
1121
+ }
1122
+ )
1123
+ }
1124
+ )
1125
+ ]
1126
+ }
1127
+ ),
1128
+ /* @__PURE__ */ i(
1129
+ "div",
1130
+ {
1131
+ id: `${e}-dialog-content`,
1132
+ className: m("dialog-content p-4", l),
1133
+ children: t
1134
+ }
1135
+ ),
1136
+ r && /* @__PURE__ */ i(
1137
+ "footer",
1138
+ {
1139
+ id: `${e}-dialog-footer`,
1140
+ className: "dialog-footer flex justify-between items-center p-4 border-t",
1141
+ children: r
1142
+ }
1143
+ )
1144
+ ]
1145
+ }
1146
+ )
1147
+ ] });
1148
+ }, v1 = A(_), A1 = ({ className: d = "" }) => /* @__PURE__ */ g("div", { id: "dots", className: m("mx-auto", d), children: [
1048
1149
  /* @__PURE__ */ i("span", { style: { animationDelay: "0.1s" } }),
1049
1150
  /* @__PURE__ */ i("span", { style: { animationDelay: "0.2s" } }),
1050
1151
  /* @__PURE__ */ i("span", { style: { animationDelay: "0.3s" } }),
@@ -1053,61 +1154,61 @@ const V = /* @__PURE__ */ T(E), F = ({
1053
1154
  /* @__PURE__ */ i("span", { style: { animationDelay: "0.6s" } }),
1054
1155
  /* @__PURE__ */ i("span", { style: { animationDelay: "0.7s" } }),
1055
1156
  /* @__PURE__ */ i("span", { style: { animationDelay: "0.8s" } })
1056
- ] }), P = ({ cb: d, className: t = "", timeout: e = 1e4 }) => {
1057
- function a({ cb: r }) {
1157
+ ] }), e1 = ({ cb: d, className: e = "", timeout: t = 1e4 }) => {
1158
+ function a({ cb: l }) {
1058
1159
  const n = document.querySelector(".bar");
1059
1160
  if (!n) return;
1060
- let s, l, o = !1;
1161
+ let s, r, o = !1;
1061
1162
  function c(h) {
1062
1163
  s === void 0 && (s = h);
1063
1164
  const p = h - s;
1064
- if (l !== h) {
1065
- const M = p / e * 101;
1066
- n.style.transition = `width ${M}ms ease-out`, n.style.width = `${M}%`, M >= 101 && (r && r(), o = !0, window.cancelAnimationFrame(h));
1165
+ if (r !== h) {
1166
+ const f = p / t * 101;
1167
+ n.style.transition = `width ${f}ms ease-out`, n.style.width = `${f}%`, f >= 101 && (l && l(), o = !0, window.cancelAnimationFrame(h));
1067
1168
  }
1068
- p < e && (l = h, o || window.requestAnimationFrame(c));
1169
+ p < t && (r = h, o || window.requestAnimationFrame(c));
1069
1170
  }
1070
1171
  window.requestAnimationFrame(c);
1071
1172
  }
1072
- return k(() => {
1173
+ return S(() => {
1073
1174
  a({ cb: d });
1074
- }, []), /* @__PURE__ */ i("div", { className: V("progress-bar my-8", t), children: /* @__PURE__ */ i("div", { className: "bar", "data-size": "100" }) });
1075
- }, p1 = A(P), R = {
1175
+ }, []), /* @__PURE__ */ i("div", { className: m("progress-bar my-8", e), children: /* @__PURE__ */ i("div", { className: "bar", "data-size": "100" }) });
1176
+ }, y1 = A(e1), t1 = {
1076
1177
  name: "spinnerDark",
1077
1178
  color: "text-teal-700",
1078
1179
  viewBox: "0 0 24 24"
1079
- }, Q = ({ className: d = "" }) => /* @__PURE__ */ i("div", { className: "rounded-r-md px-2 focus:outline-none", children: /* @__PURE__ */ i(
1180
+ }, a1 = ({ className: d = "" }) => /* @__PURE__ */ i("div", { className: "rounded-r-md px-2 focus:outline-none", children: /* @__PURE__ */ i(
1080
1181
  y,
1081
1182
  {
1082
1183
  size: "xSmall",
1083
- ...R,
1184
+ ...t1,
1084
1185
  className: `animate-spin ${d}`
1085
1186
  }
1086
- ) }), V1 = A(Q), m1 = ({
1187
+ ) }), b1 = A(a1), w1 = ({
1087
1188
  activator: d,
1088
- activatorClass: t = "",
1089
- attrs: e = {},
1189
+ activatorClass: e = "",
1190
+ attrs: t = {},
1090
1191
  options: a = {},
1091
- children: r,
1192
+ children: l,
1092
1193
  className: n = "",
1093
1194
  containerClass: s = "",
1094
- disabled: l = !1,
1195
+ disabled: r = !1,
1095
1196
  id: o = "",
1096
1197
  trigger: c = "click"
1097
1198
  }) => /* @__PURE__ */ g(z, { children: [
1098
1199
  /* @__PURE__ */ i(
1099
1200
  "div",
1100
1201
  {
1101
- className: V("popover z-10 max-w-[350px] hidden", n),
1202
+ className: m("popover z-10 max-w-[350px] hidden", n),
1102
1203
  children: /* @__PURE__ */ g(
1103
1204
  "div",
1104
1205
  {
1105
- className: V(
1206
+ className: m(
1106
1207
  "popover-container rounded border bg-gray-50 border-gray-300 shadow-md text-gray-500 animate-menu-close",
1107
1208
  s
1108
1209
  ),
1109
1210
  children: [
1110
- r,
1211
+ l,
1111
1212
  /* @__PURE__ */ i(
1112
1213
  "div",
1113
1214
  {
@@ -1123,86 +1224,86 @@ const V = /* @__PURE__ */ T(E), F = ({
1123
1224
  /* @__PURE__ */ i(
1124
1225
  "div",
1125
1226
  {
1126
- className: V(
1227
+ className: m(
1127
1228
  "popover-activator",
1128
1229
  `trigger-${c}`,
1129
- l ? "is-disabled" : "",
1130
- t
1230
+ r ? "is-disabled" : "",
1231
+ e
1131
1232
  ),
1132
- ...e,
1233
+ ...t,
1133
1234
  "data-options": JSON.stringify(a),
1134
1235
  children: d
1135
1236
  }
1136
1237
  )
1137
- ] }), W = ({
1238
+ ] }), n1 = ({
1138
1239
  ariaValuemax: d = 100,
1139
- ariaValuemin: t = 0,
1140
- bgColor: e = "bg-orange-500",
1240
+ ariaValuemin: e = 0,
1241
+ bgColor: t = "bg-orange-500",
1141
1242
  className: a,
1142
- completed: r = 0,
1243
+ completed: l = 0,
1143
1244
  maxCompleted: n = 100,
1144
1245
  rounded: s = !0,
1145
- showLabel: l = !1
1246
+ showLabel: r = !1
1146
1247
  }) => {
1147
1248
  const c = ((h, p) => {
1148
1249
  if (h) {
1149
- const M = Number(p) / h;
1150
- return M > 1 ? 100 : M * 100;
1250
+ const f = Number(p) / h;
1251
+ return f > 1 ? 100 : f * 100;
1151
1252
  }
1152
- return r;
1153
- })(n, r);
1253
+ return l;
1254
+ })(n, l);
1154
1255
  return /* @__PURE__ */ i(
1155
1256
  "div",
1156
1257
  {
1157
- className: V(
1258
+ className: m(
1158
1259
  "w-full bg-gray-200",
1159
1260
  { "rounded-full": s },
1160
1261
  a
1161
1262
  ),
1162
1263
  role: "progressbar",
1163
1264
  "aria-label": "Progress Bar",
1164
- "aria-valuenow": r,
1165
- "aria-valuemin": t,
1265
+ "aria-valuenow": l,
1266
+ "aria-valuemin": e,
1166
1267
  "aria-valuemax": d,
1167
1268
  children: /* @__PURE__ */ i(
1168
1269
  "div",
1169
1270
  {
1170
- className: V(
1271
+ className: m(
1171
1272
  "h-full text-right flex items-center justify-end rounded-full",
1172
- e
1273
+ t
1173
1274
  ),
1174
1275
  style: { width: `${c}%` },
1175
- children: l && /* @__PURE__ */ i("span", { className: "font-bold text-white text-xs mr-2", children: Math.round(c) })
1276
+ children: r && /* @__PURE__ */ i("span", { className: "font-bold text-white text-xs mr-2", children: Math.round(c) })
1176
1277
  }
1177
1278
  )
1178
1279
  }
1179
1280
  );
1180
- }, H1 = A(W), U = ({
1281
+ }, x1 = A(n1), l1 = ({
1181
1282
  checked: d = !1,
1182
- children: t,
1183
- className: e = "",
1283
+ children: e,
1284
+ className: t = "",
1184
1285
  id: a = "",
1185
- label: r = "",
1286
+ label: l = "",
1186
1287
  name: n = "",
1187
1288
  props: s = {},
1188
- variation: l = "primary",
1289
+ variation: r = "primary",
1189
1290
  value: o = ""
1190
1291
  }) => {
1191
- const c = r ? "div" : "label", h = c === "label" ? { htmlFor: a } : {};
1292
+ const c = l ? "div" : "label", h = c === "label" ? { htmlFor: a } : {};
1192
1293
  return /* @__PURE__ */ g(
1193
1294
  c,
1194
1295
  {
1195
- className: V("radio flex items-center", e),
1296
+ className: m("radio flex items-center", t),
1196
1297
  ...h,
1197
1298
  children: [
1198
1299
  /* @__PURE__ */ i(
1199
1300
  "input",
1200
1301
  {
1201
1302
  checked: d,
1202
- className: V(
1303
+ className: m(
1203
1304
  "form-radio focus:ring-2 focus:ring-offset-2 focus-within:outline-none",
1204
1305
  {
1205
- "focus:ring-[#222]": l === "primary"
1306
+ "focus:ring-[#222]": r === "primary"
1206
1307
  }
1207
1308
  ),
1208
1309
  id: a,
@@ -1212,56 +1313,56 @@ const V = /* @__PURE__ */ T(E), F = ({
1212
1313
  ...s
1213
1314
  }
1214
1315
  ),
1215
- t
1316
+ e
1216
1317
  ]
1217
1318
  }
1218
1319
  );
1219
- }, C1 = A(U), G = ({
1320
+ }, k1 = A(l1), r1 = ({
1220
1321
  children: d,
1221
- className: t = "",
1222
- error: e = !1,
1322
+ className: e = "",
1323
+ error: t = !1,
1223
1324
  errorMessage: a = "",
1224
- id: r = "",
1325
+ id: l = "",
1225
1326
  label: n = "",
1226
1327
  name: s = "",
1227
- options: l = [],
1328
+ options: r = [],
1228
1329
  placeholder: o = "",
1229
1330
  props: c = {},
1230
1331
  selectClass: h = "",
1231
1332
  styles: p = null,
1232
- variation: M = "primary",
1333
+ variation: f = "primary",
1233
1334
  value: v
1234
1335
  }) => {
1235
1336
  const b = o ? { defaultValue: "" } : {};
1236
1337
  return /* @__PURE__ */ g(
1237
1338
  "label",
1238
1339
  {
1239
- className: V("relative select", t, M),
1340
+ className: m("relative select", e, f),
1240
1341
  style: p ? { ...p } : null,
1241
1342
  children: [
1242
1343
  n,
1243
1344
  /* @__PURE__ */ g(
1244
1345
  "select",
1245
1346
  {
1246
- className: V(
1347
+ className: m(
1247
1348
  "form-select relative bg-white pl-3 pr-10 text-left cursor-default",
1248
- e ? "!border-red-500 !bg-red-500/10 !text-red-700 focus:!ring-red-500 focus:!border-red-500" : "",
1349
+ t ? "!border-red-500 !bg-red-500/10 !text-red-700 focus:!ring-red-500 focus:!border-red-500" : "",
1249
1350
  h
1250
1351
  ),
1251
- id: r,
1352
+ id: l,
1252
1353
  name: s,
1253
1354
  value: v,
1254
1355
  ...b,
1255
1356
  ...c,
1256
1357
  children: [
1257
1358
  o && /* @__PURE__ */ i("option", { hidden: !0, value: "", children: o }),
1258
- l.map((H, u) => /* @__PURE__ */ i(
1359
+ r.map((C, u) => /* @__PURE__ */ i(
1259
1360
  "option",
1260
1361
  {
1261
- value: (H == null ? void 0 : H.id) || (H == null ? void 0 : H.value) || H,
1262
- children: (H == null ? void 0 : H.name) || H
1362
+ value: (C == null ? void 0 : C.id) || (C == null ? void 0 : C.value) || C,
1363
+ children: (C == null ? void 0 : C.name) || C
1263
1364
  },
1264
- (H == null ? void 0 : H.name) || H
1365
+ (C == null ? void 0 : C.name) || C
1265
1366
  ))
1266
1367
  ]
1267
1368
  }
@@ -1270,10 +1371,10 @@ const V = /* @__PURE__ */ T(E), F = ({
1270
1371
  ]
1271
1372
  }
1272
1373
  );
1273
- }, L1 = A(G), J = ({ className: d = "" }) => /* @__PURE__ */ g(
1374
+ }, S1 = A(r1), s1 = ({ className: d = "" }) => /* @__PURE__ */ g(
1274
1375
  "div",
1275
1376
  {
1276
- className: V(
1377
+ className: m(
1277
1378
  "flex justify-center items-center bg-gray-200 rounded-lg animate-pulse",
1278
1379
  d
1279
1380
  ),
@@ -1282,17 +1383,17 @@ const V = /* @__PURE__ */ T(E), F = ({
1282
1383
  /* @__PURE__ */ i("span", { className: "sr-only", children: "Loading..." })
1283
1384
  ]
1284
1385
  }
1285
- ), M1 = A(J), K = ({
1386
+ ), z1 = A(s1), i1 = ({
1286
1387
  placeholderClass: d = "",
1287
- children: t,
1288
- className: e = "",
1388
+ children: e,
1389
+ className: t = "",
1289
1390
  id: a = 1,
1290
- padding: r = !0,
1391
+ padding: l = !0,
1291
1392
  sliderName: n = ""
1292
1393
  }) => /* @__PURE__ */ g(
1293
1394
  "div",
1294
1395
  {
1295
- className: `slider relative overflow-hidden ${e}`,
1396
+ className: `slider relative overflow-hidden ${t}`,
1296
1397
  id: `slider-${a}`,
1297
1398
  children: [
1298
1399
  /* @__PURE__ */ i(
@@ -1310,13 +1411,13 @@ const V = /* @__PURE__ */ T(E), F = ({
1310
1411
  {
1311
1412
  id: `slider-container-${a}`,
1312
1413
  className: "slider-container inline-flex w-full overflow-x-scroll md:overflow-x-hidden md:w-auto transition duration-200 ease-in-out sm-max:!transform-none",
1313
- children: Array.from({ length: 4 }, (s, l) => /* @__PURE__ */ i(
1414
+ children: Array.from({ length: 4 }, (s, r) => /* @__PURE__ */ i(
1314
1415
  "div",
1315
1416
  {
1316
1417
  className: `card-ph slider-card bg-gray-200 animate-pulse ${d}`,
1317
- children: /* @__PURE__ */ i("div", { className: `slider-card-action ${r ? "p-4" : ""}`, children: t })
1418
+ children: /* @__PURE__ */ i("div", { className: `slider-card-action ${l ? "p-4" : ""}`, children: e })
1318
1419
  },
1319
- l
1420
+ r
1320
1421
  ))
1321
1422
  }
1322
1423
  ),
@@ -1333,56 +1434,56 @@ const V = /* @__PURE__ */ T(E), F = ({
1333
1434
  )
1334
1435
  ]
1335
1436
  }
1336
- ), f1 = A(K), g1 = ({
1437
+ ), Z1 = A(i1), N1 = ({
1337
1438
  className: d = "",
1338
- value: t
1439
+ value: e
1339
1440
  }) => {
1340
- const e = {
1341
- "--value": `calc(${t} / 5 * 100%)`
1441
+ const t = {
1442
+ "--value": `calc(${e} / 5 * 100%)`
1342
1443
  };
1343
1444
  return /* @__PURE__ */ i(
1344
1445
  "div",
1345
1446
  {
1346
- className: V(
1447
+ className: m(
1347
1448
  'Stars inline-block leading-none font-sans text-base before:content-["★★★★★"]',
1348
1449
  d
1349
1450
  ),
1350
- style: e
1451
+ style: t
1351
1452
  }
1352
1453
  );
1353
- }, Y = ({
1454
+ }, o1 = ({
1354
1455
  className: d = "",
1355
- clear: t = !1,
1356
- error: e = !1,
1456
+ clear: e = !1,
1457
+ error: t = !1,
1357
1458
  errorMessage: a = "",
1358
- id: r = "",
1459
+ id: l = "",
1359
1460
  inputClass: n = "",
1360
1461
  name: s = "",
1361
- placeholder: l = "",
1462
+ placeholder: r = "",
1362
1463
  props: o = {},
1363
1464
  rows: c = 4,
1364
1465
  variation: h = "primary"
1365
- }) => /* @__PURE__ */ g("div", { className: V("relative textarea", h, d), children: [
1466
+ }) => /* @__PURE__ */ g("div", { className: m("relative textarea", h, d), children: [
1366
1467
  /* @__PURE__ */ i(
1367
1468
  "textarea",
1368
1469
  {
1369
- placeholder: l,
1370
- id: r,
1470
+ placeholder: r,
1471
+ id: l,
1371
1472
  name: s,
1372
1473
  rows: c,
1373
- className: V(
1474
+ className: m(
1374
1475
  "form-textarea min-h-[40px] pl-4",
1375
- t ? "pr-10" : "pr-4",
1376
- e ? "!border-red-500 !bg-red-500/10 placeholder:!text-red-700 focus:!ring-red-500 focus:!border-red-500" : "",
1476
+ e ? "pr-10" : "pr-4",
1477
+ t ? "!border-red-500 !bg-red-500/10 placeholder:!text-red-700 focus:!ring-red-500 focus:!border-red-500" : "",
1377
1478
  n
1378
1479
  ),
1379
1480
  ...o
1380
1481
  }
1381
1482
  ),
1382
- t && /* @__PURE__ */ i(
1483
+ e && /* @__PURE__ */ i(
1383
1484
  "div",
1384
1485
  {
1385
- id: `${r}-clear`,
1486
+ id: `${l}-clear`,
1386
1487
  className: "textarea-clear absolute right-0 top-2 bottom-auto flex items-center rounded-r-md pr-2 focus:outline-none hidden",
1387
1488
  children: /* @__PURE__ */ i(
1388
1489
  y,
@@ -1395,32 +1496,32 @@ const V = /* @__PURE__ */ T(E), F = ({
1395
1496
  }
1396
1497
  ),
1397
1498
  a && /* @__PURE__ */ i("span", { className: "relative flex mt-0.5 text-red-700 text-xs text-left", children: a })
1398
- ] }), v1 = A(Y), X = ({
1499
+ ] }), D1 = A(o1), c1 = ({
1399
1500
  className: d = "",
1400
- clear: t = !1,
1401
- error: e = !1,
1501
+ clear: e = !1,
1502
+ error: t = !1,
1402
1503
  errorMessage: a = "",
1403
- iconLeft: r = "",
1504
+ iconLeft: l = "",
1404
1505
  id: n = "",
1405
1506
  inputClass: s = "",
1406
- name: l = "",
1507
+ name: r = "",
1407
1508
  placeholder: o = "",
1408
1509
  props: c = {},
1409
1510
  styles: h = null,
1410
1511
  type: p = "text",
1411
- value: M,
1512
+ value: f,
1412
1513
  variation: v = "primary"
1413
1514
  }) => /* @__PURE__ */ g(
1414
1515
  "div",
1415
1516
  {
1416
- className: V("relative textbox", v, d),
1517
+ className: m("relative textbox", v, d),
1417
1518
  style: h ? { ...h } : null,
1418
1519
  children: [
1419
- r && /* @__PURE__ */ i("div", { className: "pointer-events-none absolute inset-y-0 left-0 flex items-center px-2", children: /* @__PURE__ */ i(
1520
+ l && /* @__PURE__ */ i("div", { className: "pointer-events-none absolute inset-y-0 left-0 flex items-center px-2", children: /* @__PURE__ */ i(
1420
1521
  y,
1421
1522
  {
1422
1523
  size: "xSmall",
1423
- name: r,
1524
+ name: l,
1424
1525
  color: "text-gray-500",
1425
1526
  viewBox: "0 0 24 24"
1426
1527
  }
@@ -1430,16 +1531,16 @@ const V = /* @__PURE__ */ T(E), F = ({
1430
1531
  {
1431
1532
  placeholder: o,
1432
1533
  id: n,
1433
- name: l,
1534
+ name: r,
1434
1535
  type: p,
1435
- value: M,
1536
+ value: f,
1436
1537
  autoComplete: "off",
1437
- className: V(
1538
+ className: m(
1438
1539
  "form-input",
1439
- t ? "pr-10" : "pr-4",
1440
- r ? "pl-8" : "pl-4",
1540
+ e ? "pr-10" : "pr-4",
1541
+ l ? "pl-8" : "pl-4",
1441
1542
  {
1442
- "!border-red-500 !bg-red-500/10 placeholder:!text-red-700 focus:!ring-red-500 focus:!border-red-500": e
1543
+ "!border-red-500 !bg-red-500/10 placeholder:!text-red-700 focus:!ring-red-500 focus:!border-red-500": t
1443
1544
  },
1444
1545
  c.inputClass ?? "",
1445
1546
  s
@@ -1447,7 +1548,7 @@ const V = /* @__PURE__ */ T(E), F = ({
1447
1548
  ...c
1448
1549
  }
1449
1550
  ),
1450
- t && /* @__PURE__ */ i(
1551
+ e && /* @__PURE__ */ i(
1451
1552
  "div",
1452
1553
  {
1453
1554
  id: `${n}-clear`,
@@ -1465,175 +1566,48 @@ const V = /* @__PURE__ */ T(E), F = ({
1465
1566
  a && /* @__PURE__ */ i("span", { className: "relative flex mt-0.5 text-red-700 text-xs text-left", children: a })
1466
1567
  ]
1467
1568
  }
1468
- ), A1 = A(X);
1469
- class m {
1470
- static async getHeaders(t = 300) {
1471
- const {
1472
- userAgent: e = null,
1473
- userAgentData: a = null,
1474
- platform: r = null
1475
- } = navigator || {}, n = (a == null ? void 0 : a.platform) ?? r, s = {
1476
- tolken: null,
1477
- ip: null,
1478
- userAgent: e,
1479
- platform: n
1480
- };
1481
- if (options && options.isBot || typeof window.localStorage > "u")
1482
- return s;
1483
- const l = localStorage.getItem("headerTolken");
1484
- if (l) {
1485
- const o = JSON.parse(l), c = (/* @__PURE__ */ new Date()).getTime();
1486
- return o.expire - c < 0 && localStorage.removeItem("headerTolken"), {
1487
- tolken: o.tolken,
1488
- ip: o.ip,
1489
- userAgent: e,
1490
- platform: n
1491
- };
1492
- }
1493
- try {
1494
- const c = await (await fetch("/api/headers")).json(), h = (c == null ? void 0 : c.token) ?? null, p = (c == null ? void 0 : c.ip) ?? null;
1495
- return localStorage.setItem(
1496
- "headerTolken",
1497
- JSON.stringify({
1498
- tolken: h,
1499
- ip: p,
1500
- expire: (/* @__PURE__ */ new Date()).getTime() + t * 1e3
1501
- })
1502
- ), { tolken: h, ip: p, userAgent: e, platform: n };
1503
- } catch (o) {
1504
- console.error("getHeaders", o);
1505
- }
1506
- return s;
1507
- }
1508
- static elementScrollTop() {
1509
- setTimeout(() => {
1510
- document.body.scrollTop = document.documentElement.scrollTop = 0;
1511
- }, 100);
1512
- }
1513
- static async getUserHistory(t = null) {
1514
- const { uuid: e = null } = t ?? {};
1515
- if (!e)
1516
- return { data: null };
1517
- const a = JSON.stringify({
1518
- limit: 1,
1519
- where: {
1520
- uuid: e
1521
- }
1522
- });
1523
- return await m.makeSearchFetchCall(
1524
- `/api/client?query=user-get-history&filter=${a}`
1525
- );
1526
- }
1527
- static async performSearch(t = null, e = {}) {
1528
- if (!t)
1529
- return [];
1530
- if (1 > t.trim().length)
1531
- return [];
1532
- const {
1533
- addressesOnly: a = !1,
1534
- useCitySearch: r = !1,
1535
- useCityStateSearch: n = !1,
1536
- useSearch: s = !1,
1537
- useLocation: l = !0,
1538
- state: o = ""
1539
- } = e ?? {}, { tolken: c = null, ip: h = null } = await m.getHeaders(), M = [
1540
- "query=" + encodeURIComponent(this.cleanupAddress(t)),
1541
- "addressesOnly=" + a,
1542
- "useSearch=" + s,
1543
- "useCitySearch=" + r,
1544
- "useCityStateSearch=" + n,
1545
- "useLocation=" + l
1546
- ];
1547
- o && o !== "" && !n && M.push("state=" + o), c && c !== "" && M.push("tolken=" + c), h && h !== "" && M.push("ip=" + h);
1548
- const v = M.join("&"), H = (r || n ? "/api/autocomplete-city" : "/api/autocomplete") + "?" + v;
1549
- return await m.makeSearchFetchCall(H);
1569
+ ), O1 = A(c1);
1570
+ class H {
1571
+ static calcCrow(e, t, a, l) {
1572
+ const s = H.toRad(a - e), r = H.toRad(l - t);
1573
+ e = H.toRad(e), a = H.toRad(a);
1574
+ const o = Math.sin(s / 2) * Math.sin(s / 2) + Math.sin(r / 2) * Math.sin(r / 2) * Math.cos(e) * Math.cos(a);
1575
+ return 6371 * (2 * Math.atan2(Math.sqrt(o), Math.sqrt(1 - o)));
1550
1576
  }
1551
- static cleanupAddress(t) {
1552
- return t.split(" ").map((a) => a.split("-")[0]).join(" ").trim();
1577
+ static cleanupAddress(e) {
1578
+ return e.split(" ").map((a) => a.split("-")[0]).join(" ").trim();
1553
1579
  }
1554
- static async makeSearchFetchCall(t) {
1555
- try {
1556
- return (await fetch(t, {
1557
- method: "GET",
1558
- headers: { "Content-Type": "application/json" }
1559
- })).json();
1560
- } catch (e) {
1561
- console.error("performSearch", e, { url: t });
1562
- }
1563
- return [];
1580
+ static clearBounds(e = "bounds") {
1581
+ localStorage.setItem(e, JSON.stringify([]));
1564
1582
  }
1565
- static initObserver(t, e, a = null) {
1566
- if (!t)
1583
+ static clickTrack(e = !0) {
1584
+ if (e !== !0)
1567
1585
  return;
1568
- const r = (a == null ? void 0 : a.useBounding) ?? !1;
1569
- new IntersectionObserver(async (s, l) => {
1570
- r ? (s[0].isIntersecting || s[0].boundingClientRect.y < 0) && e({ obs: l, entry: s[0], entries: s }) : s[0].isIntersecting && e({ obs: l, entry: s[0], entries: s });
1571
- }, a).observe(t);
1586
+ window.dataLayer = window.dataLayer || [];
1587
+ const t = document.querySelectorAll("[data-div-track]");
1588
+ typeof H == "function" && t.forEach((a) => {
1589
+ a.addEventListener("click", () => {
1590
+ H.clickTrackEvent(a.dataset.divTrack);
1591
+ });
1592
+ });
1572
1593
  }
1573
- static detectMouseMovement(t, e = null) {
1574
- const a = document.querySelector("body");
1575
- let r = !1;
1576
- a.addEventListener("mousemove", () => {
1577
- r || (r = !0, t(e));
1578
- }), a.addEventListener("touchmove", () => {
1579
- r || (r = !0, t(e));
1594
+ static clickTrackEvent(e) {
1595
+ window.dataLayer.push({
1596
+ event: "click_tracking",
1597
+ click_value: e
1580
1598
  });
1581
1599
  }
1582
- static async fetchData(t, e = !1, a = !0) {
1583
- if (options.isBot)
1600
+ /* TODO: Not sure if this or PRECS is more correct */
1601
+ static async createData(e, t = null, a = !0) {
1602
+ if (options.isBot || !t)
1584
1603
  return null;
1585
- const { tolken: r = null, ip: n = null } = await m.getHeaders(), l = t.replace("#", "").replace("%23", "") + "&tolken=" + r + "&ip=" + n;
1586
- try {
1587
- const o = await fetch(l, { method: "GET" });
1588
- if (e === !0) {
1589
- const h = await o.text();
1590
- return h ? h.replace("__next", "") : null;
1591
- }
1592
- const c = o.headers.get("content-type");
1593
- return c && c.indexOf("application/json") !== -1 ? o.json() : null;
1594
- } catch (o) {
1595
- console.error("fetchData", o, t);
1596
- }
1597
- return null;
1598
- }
1599
- static async getUser() {
1600
- if (typeof window < "u") {
1601
- const { user: t = null } = (window == null ? void 0 : window.options) ?? {};
1602
- if (t)
1603
- return t;
1604
- }
1605
- try {
1606
- return await m.createData("/api/cookie/fetch?name=odrUser");
1607
- } catch (t) {
1608
- console.error("getUser", t.message);
1609
- }
1610
- return null;
1611
- }
1612
- static async setSearchValueClient(t) {
1613
- localStorage.setItem("odrSearchValue", JSON.stringify(t)), await m.createData("/api/cookie/create?name=odrSearchValue", t);
1614
- }
1615
- static getWebsiteHeaderName() {
1616
- const t = "onlinedatareports.com", e = "propertyrecs.com", a = typeof window < "u" ? window.location.host : t;
1617
- return a && a.includes(e) ? e : t;
1618
- }
1619
- static async logRequest(t = null, e = null, a = null, r = null, n = null) {
1620
- const s = {
1621
- name: t,
1622
- uuid: e,
1623
- ip: a,
1624
- url: r,
1625
- data: n
1626
- };
1627
- return await m.createData("/api/client?query=log/save&method=POST", s), null;
1628
- }
1629
- static async createData(t, e = null, a = !0) {
1630
- const { tolken: r = null, ip: n = null } = await m.getHeaders(), s = a === !1 ? "" : "&tolken=" + r + "&ip=" + n, l = t + s, o = typeof e == "string" ? e : JSON.stringify(e);
1604
+ const { tolken: l = null, ip: n = null } = await H.getHeaders(), s = a === !1 ? "" : "&tolken=" + l + "&ip=" + n, r = e + s, o = typeof t == "string" ? t : JSON.stringify(t);
1631
1605
  try {
1632
- const c = await fetch(l, {
1606
+ const c = await fetch(r, {
1633
1607
  method: "POST",
1634
1608
  body: o === "null" ? null : o,
1635
1609
  headers: {
1636
- website: m.getWebsiteHeaderName()
1610
+ website: H.getWebsiteHeaderName()
1637
1611
  }
1638
1612
  }), h = c.headers.get("content-type");
1639
1613
  if (h && h.indexOf("application/json") !== -1)
@@ -1645,359 +1619,198 @@ class m {
1645
1619
  }
1646
1620
  return null;
1647
1621
  }
1648
- static money(t, e = "", a = 0) {
1649
- return t === null ? e : Intl ? new Intl.NumberFormat("en-US", {
1650
- style: "currency",
1651
- currency: "USD",
1652
- minimumFractionDigits: a,
1653
- maximumFractionDigits: a
1654
- }).format(t) : t;
1655
- }
1656
- static number(t, e = "", a = 0) {
1657
- return t === null ? e : Intl ? new Intl.NumberFormat("en-US", {
1658
- minimumFractionDigits: a,
1659
- maximumFractionDigits: a
1660
- }).format(t) : t;
1661
- }
1662
- static ucWords(t) {
1663
- return t ? t.toString().split(" ").map((e) => m.ucFirst(e)).join(" ") : null;
1664
- }
1665
- static ucFirst(t = null) {
1666
- if (!t)
1667
- return null;
1668
- const e = t.toLowerCase();
1669
- return e.charAt(0).toUpperCase() + e.slice(1);
1622
+ static dataLayer({ type: e = null, data: t = null }) {
1623
+ typeof dataLayer.push > "u" || typeof dataLayer.push > "u" || (e === "custom" && t && this.dlvCustom(t), e === "login" && t && this.dlvUserLogin(t), e === "userData" && t && this.dlvUserData(t));
1670
1624
  }
1671
- static s(t) {
1672
- return Math.round(t) > 1 ? "s" : "";
1625
+ static async deleteSearchValue(e = "recsSearchValue") {
1626
+ try {
1627
+ return await H.createData(`/api/cookie/remove?name=${e}`);
1628
+ } catch (t) {
1629
+ console.error("deleteSearchValue", t.message);
1630
+ }
1631
+ return null;
1673
1632
  }
1674
- static toSlug(t) {
1675
- return t.toString().trim().toLowerCase().split(":").join("-").split("'").join("").replace("‘", "");
1633
+ static detectMouseMovement(e, t = null) {
1634
+ const a = document.querySelector("body");
1635
+ let l = !1;
1636
+ a.addEventListener("mousemove", () => {
1637
+ l || (l = !0, e(t));
1638
+ }), a.addEventListener("touchmove", () => {
1639
+ l || (l = !0, e(t));
1640
+ });
1676
1641
  }
1677
- static getReportUrl(t, e = null) {
1678
- var o, c, h;
1679
- const a = ((o = t == null ? void 0 : t.state) == null ? void 0 : o.slug) ?? null, r = ((c = t == null ? void 0 : t.city) == null ? void 0 : c.slug) ?? null, n = ((h = t == null ? void 0 : t.name) == null ? void 0 : h.slug) ?? null, s = (t == null ? void 0 : t.zip) ?? null;
1680
- e = e || ((t == null ? void 0 : t.id) ?? null);
1681
- const l = [s, "-piq", e].filter((p) => p).join("");
1682
- return "/" + [a, r, n].filter((p) => p).map((p) => m.toSlug(p)).join("/") + "/" + l;
1683
- }
1684
- static calcCrow(t, e, a, r) {
1685
- const s = m.toRad(a - t), l = m.toRad(r - e);
1686
- t = m.toRad(t), a = m.toRad(a);
1687
- const o = Math.sin(s / 2) * Math.sin(s / 2) + Math.sin(l / 2) * Math.sin(l / 2) * Math.cos(t) * Math.cos(a);
1688
- return 6371 * (2 * Math.atan2(Math.sqrt(o), Math.sqrt(1 - o)));
1642
+ static dlvCustom(e) {
1643
+ console.info("dlvCustom", JSON.stringify(e)), dataLayer.push(e);
1689
1644
  }
1690
- // Converts numeric degrees to radians
1691
- static toRad(t) {
1692
- return t * Math.PI / 180;
1645
+ static dlvUserLogin(e) {
1646
+ dataLayer.push({
1647
+ event: "login",
1648
+ userId: e == null ? void 0 : e.uuid
1649
+ });
1693
1650
  }
1694
- static kFormat(t, e = 0) {
1695
- if (!t)
1696
- return null;
1697
- const a = Math.abs(t), r = Math.sign(t);
1698
- return a > 999999 ? r * (a / 1e6).toFixed(1) + "m" : a > 999 ? r * (a / 1e3).toFixed(e) + "k" : r * a;
1651
+ static dlvUserData(e) {
1652
+ dataLayer.push({
1653
+ event: "userData",
1654
+ userId: e == null ? void 0 : e.uuid,
1655
+ uuid: e == null ? void 0 : e.uuid,
1656
+ email: e == null ? void 0 : e.email,
1657
+ name: e == null ? void 0 : e.name
1658
+ });
1699
1659
  }
1700
- static clickTrack(t = !0) {
1701
- if (t !== !0)
1702
- return;
1703
- window.dataLayer = window.dataLayer || [];
1704
- const e = document.querySelectorAll("[data-div-track]");
1705
- typeof m == "function" && e.forEach((a) => {
1706
- a.addEventListener("click", () => {
1707
- m.clickTrackEvent(a.dataset.divTrack);
1708
- });
1660
+ static documentLoaded(e, t = 0) {
1661
+ document.addEventListener("DOMContentLoaded", async function() {
1662
+ t ? setTimeout(() => e(), t) : e();
1709
1663
  });
1710
1664
  }
1711
- static eventListenerOnce(t, e, a) {
1712
- t == null || t.addEventListener(e, a, {
1665
+ static elementScrollTop() {
1666
+ setTimeout(() => {
1667
+ document.body.scrollTop = document.documentElement.scrollTop = 0;
1668
+ }, 100);
1669
+ }
1670
+ static eventListenerOnce(e, t, a) {
1671
+ e == null || e.addEventListener(t, a, {
1713
1672
  once: !0
1714
1673
  });
1715
1674
  }
1716
- static clickTrackEvent(t) {
1717
- window.dataLayer.push({
1718
- event: "click_tracking",
1719
- click_value: t
1720
- });
1675
+ static async fetchData(e, t = !1, a = !0) {
1676
+ if (options.isBot)
1677
+ return null;
1678
+ const { tolken: l = null, ip: n = null } = await H.getHeaders(), r = e.replace("#", "").replace("%23", "") + "&tolken=" + l + "&ip=" + n;
1679
+ try {
1680
+ const o = await fetch(r, { method: "GET" });
1681
+ if (t === !0) {
1682
+ const h = await o.text();
1683
+ return h ? h.replace("__next", "") : null;
1684
+ }
1685
+ const c = o.headers.get("content-type");
1686
+ return c && c.indexOf("application/json") !== -1 ? o.json() : null;
1687
+ } catch (o) {
1688
+ console.error("fetchData", o, e);
1689
+ }
1690
+ return null;
1721
1691
  }
1722
- static sendWoopraEvent(t, e) {
1723
- typeof woopra == "object" && woopra.track(t, e);
1692
+ static findAncestor(e, t) {
1693
+ let a = e.parentElement;
1694
+ return a.tagName.toLowerCase() === t || (a = e.parentElement.parentElement, a.tagName.toLowerCase() === t) || (a = e.parentElement.parentElement.parentElement, a.tagName.toLowerCase() === t) ? a : null;
1724
1695
  }
1725
- static async getLocationData(t) {
1726
- const { swLat: e, neLng: a, neLat: r, swLng: n } = m.getBounds(t, 3, 0.05), s = "zip-location&swLat=" + e + "&neLng=" + a + "&neLat=" + r + "&swLng=" + n;
1727
- return await m.fetchData("/api/client?query=" + s);
1696
+ static formatDate(e = null) {
1697
+ return e ? (e = new Date(e), [
1698
+ H.padTo2Digits(e.getMonth() + 1),
1699
+ H.padTo2Digits(e.getDate()),
1700
+ e.getFullYear()
1701
+ ].join("-")) : null;
1728
1702
  }
1729
- static getBounds(t, e = null, a = null) {
1730
- if (!t)
1731
- return console.error("no map", t), {
1703
+ static getBoundsEntries(e = "bounds") {
1704
+ const t = localStorage.getItem(e);
1705
+ return t ? JSON.parse(t) : [];
1706
+ }
1707
+ static getBounds(e, t = null, a = null) {
1708
+ if (!e)
1709
+ return console.error("no map", e), {
1732
1710
  swLat: 0,
1733
1711
  neLng: 0,
1734
1712
  neLat: 0,
1735
1713
  swLng: 0
1736
1714
  };
1737
- const r = t.getBounds();
1738
- let n = r.getSouth(), s = r.getEast(), l = r.getNorth(), o = r.getWest();
1739
- return a && (n = n - a, s = s + a, l = l + a, o = o - a), e && (n = n.toFixed(e), s = s.toFixed(e), l = l.toFixed(e), o = o.toFixed(e)), {
1715
+ const l = e.getBounds();
1716
+ let n = l.getSouth(), s = l.getEast(), r = l.getNorth(), o = l.getWest();
1717
+ return a && (n = n - a, s = s + a, r = r + a, o = o - a), t && (n = n.toFixed(t), s = s.toFixed(t), r = r.toFixed(t), o = o.toFixed(t)), {
1740
1718
  swLat: n,
1741
1719
  neLng: s,
1742
- neLat: l,
1720
+ neLat: r,
1743
1721
  swLng: o
1744
1722
  };
1745
1723
  }
1746
- static gridTest(t, e, a = 1500) {
1747
- const r = this;
1748
- L.GridLayer.GridDebug = L.GridLayer.extend({
1749
- createTile: function(n, s) {
1750
- const l = document.createElement("div");
1751
- return setTimeout(() => {
1752
- s(null, l);
1753
- const { se: o, nw: c } = r.getGridBounds({
1754
- map: t,
1755
- tileSize: this.getTileSize(),
1756
- coords: n
1757
- });
1758
- e({
1759
- swLat: o.lat,
1760
- neLng: o.lng,
1761
- neLat: c.lat,
1762
- swLng: c.lng,
1763
- coords: n,
1764
- key: n.z + "-" + n.x + "-" + n.y
1765
- });
1766
- }, a), l;
1767
- }
1768
- }), L.gridLayer.gridDebug = function(n) {
1769
- return new L.GridLayer.GridDebug(n);
1770
- }, t.addLayer(L.gridLayer.gridDebug());
1771
- }
1772
- static getGridBounds({ map: t, tileSize: e, coords: a }) {
1773
- const r = a.scaleBy(e), n = r.add(e);
1774
- return {
1775
- nw: t.unproject(r, a.z),
1776
- se: t.unproject(n, a.z)
1777
- };
1778
- }
1779
- static scrollWheelZoom(t) {
1780
- t.scrollWheelZoom.disable(), t.on("focus", () => {
1781
- t.scrollWheelZoom.enable();
1782
- }), t.on("blur", () => {
1783
- t.scrollWheelZoom.disable();
1784
- });
1785
- }
1786
- static useLayerTitle(t, e) {
1787
- const a = m.getLayerTitle(t);
1788
- L.tileLayer(a, {
1789
- maxNativeZoom: 19,
1790
- maxZoom: 25,
1791
- subdomains: ["mt0", "mt1", "mt2", "mt3"],
1792
- attribution: '&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a>'
1793
- }).addTo(e);
1794
- }
1795
- static getLayerTitle(t) {
1796
- return {
1797
- hybrid: "https://{s}.google.com/vt/lyrs=s&x={x}&y={y}&z={z}",
1798
- roadmap: "https://{s}.google.com/vt/lyrs=m&x={x}&y={y}&z={z}"
1799
- }[t];
1800
- }
1801
- static removeElements(t) {
1802
- document.querySelectorAll(t).forEach((e) => e == null ? void 0 : e.remove());
1724
+ static getFirstN(e, t = 5) {
1725
+ return e === null ? null : e.length === 0 ? [] : e.filter((a, l) => l < t);
1803
1726
  }
1804
- static removeNullFromObject(t) {
1805
- return Object.keys(t).filter((e) => t[e]).reduce((e, a) => (e[a] = t[a], e), {});
1806
- }
1807
- static getBoundsEntries(t = "bounds") {
1808
- const e = localStorage.getItem(t);
1809
- return e ? JSON.parse(e) : [];
1810
- }
1811
- static setBoundsEntries(t, e = "bounds") {
1812
- const a = m.getBoundsEntries(e);
1813
- a.push(t), localStorage.setItem(e, JSON.stringify(a));
1814
- }
1815
- static hasBoundsEntry(t, e = "bounds") {
1816
- return m.getBoundsEntries(e).includes(t);
1727
+ static getFormUrl(e = null) {
1728
+ const { name: t = null, isOptOut: a = !1 } = e ?? {};
1729
+ if (!t || t === "address")
1730
+ return a === !0 ? "/opt-out/address" : "/";
1731
+ if (t === "background-check")
1732
+ return "/report/background-check";
1733
+ if (t === "background-check-search")
1734
+ return a === !0 ? "/opt-out/records" : "/report/background-check/search";
1735
+ if (t === "dmv-records")
1736
+ return "/report/dmv-records";
1737
+ if (t === "dmv-records-search")
1738
+ return a === !0 ? "/opt-out/records" : "/report/dmv-records/search";
1739
+ if (t === "phone")
1740
+ return "/report/phone";
1741
+ if (t === "phone-search")
1742
+ return a === !0 ? "/opt-out/records" : "/report/phone/search";
1743
+ if (t === "vin")
1744
+ return "/report/vin";
1745
+ if (t === "license" || t === "license-plate")
1746
+ return "/report/license-plate";
1817
1747
  }
1818
- static clearBounds(t = "bounds") {
1819
- localStorage.setItem(t, JSON.stringify([]));
1748
+ static async getHeaders(e = 300) {
1749
+ const {
1750
+ userAgent: t = null,
1751
+ userAgentData: a = null,
1752
+ platform: l = null
1753
+ } = navigator || {}, n = (a == null ? void 0 : a.platform) ?? l, s = {
1754
+ tolken: null,
1755
+ ip: null,
1756
+ userAgent: t,
1757
+ platform: n
1758
+ };
1759
+ if (options && options.isBot || typeof window.localStorage > "u")
1760
+ return s;
1761
+ const r = localStorage.getItem("headerTolken");
1762
+ if (r) {
1763
+ const o = JSON.parse(r), c = (/* @__PURE__ */ new Date()).getTime();
1764
+ return o.expire - c < 0 && localStorage.removeItem("headerTolken"), {
1765
+ tolken: o.tolken,
1766
+ ip: o.ip,
1767
+ userAgent: t,
1768
+ platform: n
1769
+ };
1770
+ }
1771
+ try {
1772
+ const c = await (await fetch("/api/headers")).json(), h = (c == null ? void 0 : c.token) ?? null, p = (c == null ? void 0 : c.ip) ?? null;
1773
+ return localStorage.setItem(
1774
+ "headerTolken",
1775
+ JSON.stringify({
1776
+ tolken: h,
1777
+ ip: p,
1778
+ expire: (/* @__PURE__ */ new Date()).getTime() + e * 1e3
1779
+ })
1780
+ ), { tolken: h, ip: p, userAgent: t, platform: n };
1781
+ } catch (o) {
1782
+ console.error("getHeaders", o);
1783
+ }
1784
+ return s;
1820
1785
  }
1821
- static padTo2Digits(t) {
1822
- return t.toString().padStart(2, "0");
1786
+ static getLayerTitle(e) {
1787
+ return {
1788
+ hybrid: "https://{s}.google.com/vt/lyrs=s&x={x}&y={y}&z={z}",
1789
+ roadmap: "https://{s}.google.com/vt/lyrs=m&x={x}&y={y}&z={z}"
1790
+ }[e];
1823
1791
  }
1824
- static formatDate(t = null) {
1825
- return t ? (t = new Date(t), [
1826
- m.padTo2Digits(t.getMonth() + 1),
1827
- m.padTo2Digits(t.getDate()),
1828
- t.getFullYear()
1829
- ].join("-")) : null;
1792
+ static async getLocationData(e) {
1793
+ const { swLat: t, neLng: a, neLat: l, swLng: n } = H.getBounds(e, 3, 0.05), s = "zip-location&swLat=" + t + "&neLng=" + a + "&neLat=" + l + "&swLng=" + n;
1794
+ return await H.fetchData("/api/client?query=" + s);
1830
1795
  }
1831
- static documentLoaded(t, e = 0) {
1832
- document.addEventListener("DOMContentLoaded", async function() {
1833
- e ? setTimeout(() => t(), e) : t();
1834
- });
1796
+ static getReportUrl(e, t = null) {
1797
+ var o, c, h;
1798
+ const a = ((o = e == null ? void 0 : e.state) == null ? void 0 : o.slug) ?? null, l = ((c = e == null ? void 0 : e.city) == null ? void 0 : c.slug) ?? null, n = ((h = e == null ? void 0 : e.name) == null ? void 0 : h.slug) ?? null, s = (e == null ? void 0 : e.zip) ?? null;
1799
+ t = t || ((e == null ? void 0 : e.id) ?? null);
1800
+ const r = [s, "-piq", t].filter((p) => p).join("");
1801
+ return "/" + [a, l, n].filter((p) => p).map((p) => H.toSlug(p)).join("/") + "/" + r;
1835
1802
  }
1836
- static async loadCustomScript({ name: t = null, id: e = "", module: a = !1 } = {}) {
1837
- if (t) {
1838
- const r = "/scripts/" + t + ".js?v=100.0.5";
1839
- try {
1840
- return await m.injectScript({
1841
- src: r,
1842
- id: e || t,
1843
- async: !1,
1844
- module: a
1845
- });
1846
- } catch (n) {
1847
- console.error("loadCustomScript", n);
1848
- }
1803
+ static async getSearchValue(e = "recsSearchValue") {
1804
+ try {
1805
+ return await H.createData(`/api/cookie/fetch?name=${e}`);
1806
+ } catch (t) {
1807
+ console.error("getSearchValue", t.message);
1849
1808
  }
1850
1809
  return null;
1851
1810
  }
1852
- static injectScript({ src: t, id: e = null, async: a = !0, module: r = !1 }) {
1853
- return new Promise(function(n, s) {
1854
- let l = document.getElementById(e);
1855
- if (e && l && l.dataset.loaded === "true")
1856
- return n({ alreadyLoaded: !0, id: e });
1857
- l || (l = document.createElement("script"), l.src = t, l.dataset.loaded = "false", e && (l.id = e), l.type = r ? "module" : "text/javascript", l.async = a, document.body.appendChild(l), l.onload = () => (l.dataset.loaded = "true", n({ alreadyLoaded: !1, id: e })), l.onerror = () => s(!1));
1858
- });
1859
- }
1860
- static injectLink({ href: t, id: e }) {
1861
- const a = document.createElement("link");
1862
- a.href = t, a.type = "text/css", a.rel = "stylesheet", e && (a.id = e), document.getElementsByTagName("head")[0].appendChild(a);
1863
- }
1864
- static async loadGoogleMapApi() {
1865
- if (window.options.googleMapsLoaded === !0)
1866
- return;
1867
- const t = "https://maps.googleapis.com/maps/api/js", e = window.options.googleApiKey, a = t + "?key=" + e + "&libraries=marker&v=beta&callback=mapCb";
1868
- await m.injectScript({ src: a, id: "googleapis", async: !1 });
1869
- }
1870
- static async loadLeafletApi() {
1871
- const t = "https://unpkg.com/leaflet@1.9.3/dist", e = t + "/leaflet.js", a = t + "/leaflet.css", r = "//unpkg.com/leaflet-gesture-handling", n = "//unpkg.com/leaflet-gesture-handling/dist/leaflet-gesture-handling.min.css";
1872
- await m.injectLink({ href: a, id: "leafletCss" }), await m.injectLink({ href: n, id: "gestureCss" }), await m.injectScript({ src: e, id: "leafletJs", async: !1 }), await m.injectScript({
1873
- src: r,
1874
- id: "gestureJs",
1875
- async: !1
1876
- });
1877
- }
1878
- static stickyHeader(t = ".nav") {
1879
- const e = document.querySelector(t);
1880
- if (!e)
1881
- return;
1882
- new IntersectionObserver(
1883
- ([r]) => {
1884
- r && (r.intersectionRatio < 1 ? e.classList.add("intersecting") : e.classList.remove("intersecting"));
1885
- },
1886
- { threshold: 1 }
1887
- ).observe(e);
1888
- }
1889
- static isMobile({ selector: t = null, width: e = 640 } = {}) {
1890
- var r;
1891
- const a = document.querySelector(t);
1892
- return ((r = a == null ? void 0 : a.getBoundingClientRect()) == null ? void 0 : r.width) ?? 0 < e;
1893
- }
1894
- static isMobileAndTablet() {
1895
- return window.mobileAndTabletCheck = function() {
1896
- let t = !1;
1897
- return function(e) {
1898
- (/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(
1899
- e
1900
- ) || /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(
1901
- e.substr(0, 4)
1902
- )) && (t = !0);
1903
- }(navigator.userAgent || navigator.vendor || window.opera), t;
1904
- }, window.mobileAndTabletCheck();
1905
- }
1906
- /**
1907
- * Handle Native Dialogs
1908
- * @type {function} handleDialog
1909
- * @param {string|null} target - Selector that open the dialog
1910
- * @param {string} id - Unique dialog id
1911
- * @param {function|null} onOpen - Callback function called when dialog is opened
1912
- * @param {function|null} onClose - Callback function called when dialog is closed
1913
- * @param {boolean} disableOutsideClick - Disable dialog closing when clicking outside the dialog
1914
- * @returns {{activators: NodeListOf<Element>, handleOpen: {function}, handleClose: {function}, ref: HTMLDialogElement}}
1915
- */
1916
- static handleDialog({
1917
- target: t = null,
1918
- id: e = "",
1919
- onOpen: a = null,
1920
- onClose: r = null,
1921
- disableOutsideClick: n = !1
1922
- }) {
1923
- const s = t ? document.querySelectorAll(t) : [], l = document.getElementById(e + "-dialog"), o = document.querySelectorAll("[data-dialog-close]"), c = ["closing", "closed", "opening", "opened", "removed"].reduce(
1924
- (u, C) => ({
1925
- ...u,
1926
- [C]: new Event(C)
1927
- }),
1928
- {}
1929
- ), h = new MutationObserver((u, C) => {
1930
- u.forEach(async (w) => {
1931
- if (w.attributeName === "open") {
1932
- const f = w.target;
1933
- if (!(f == null ? void 0 : f.hasAttribute("open"))) return;
1934
- f == null || f.removeAttribute("inert"), f == null || f.dispatchEvent(c.opening), f && await H(f), f == null || f.dispatchEvent(c.opened);
1935
- }
1936
- });
1937
- }), p = new MutationObserver((u, C) => {
1938
- u.forEach((w) => {
1939
- w.removedNodes.forEach((f) => {
1940
- f.nodeName === "DIALOG" && (f.removeEventListener("click", b), f.removeEventListener("close", v), f.dispatchEvent(c.removed), p == null || p.disconnect(), h == null || h.disconnect());
1941
- });
1942
- });
1943
- });
1944
- l && (h.observe(l, {
1945
- attributes: !0
1946
- }), p.observe(document.body, {
1947
- attributes: !1,
1948
- subtree: !1,
1949
- childList: !0
1950
- }));
1951
- const M = () => {
1952
- l == null || l.showModal();
1953
- }, v = async ({ target: u }) => {
1954
- u == null || u.classList.add("closing"), u == null || u.setAttribute("inert", ""), u == null || u.dispatchEvent(c.closing), u && await H(u), u == null || u.classList.remove("closing"), u == null || u.dispatchEvent(c.closed);
1955
- }, b = async ({ target: u }) => {
1956
- (u == null ? void 0 : u.nodeName) === "DIALOG" && (l == null || l.close("outside"));
1957
- }, H = (u) => Promise.allSettled(
1958
- u == null ? void 0 : u.getAnimations().map((C) => C == null ? void 0 : C.finished)
1959
- );
1960
- return !n && (l == null || l.addEventListener("click", b)), l == null || l.addEventListener("close", v), s == null || s.forEach((u) => {
1961
- u.addEventListener("click", (C) => {
1962
- M(), a && a(C, l);
1963
- });
1964
- }), o == null || o.forEach((u) => {
1965
- u.addEventListener("click", async (C) => {
1966
- l == null || l.close("close"), r && r(C, l);
1967
- });
1968
- }), {
1969
- activators: s,
1970
- ref: l,
1971
- handleOpen: M,
1972
- handleClose: v
1973
- };
1974
- }
1975
- static isNameCompany(t = null) {
1976
- if (!t)
1977
- return !1;
1978
- const e = t.trim().toLowerCase();
1979
- return e.includes("unknown") || e.includes("institute") || e.includes("bldg") || e.includes("llc") || e.includes("l l c") || e.includes(" inc") || e.includes(" co") || e.includes("univ") || e.includes("unvi") || e.includes(" fund") || e.includes(" union") || e.includes(" assoc") || e.includes(" corp") || e.includes("service") || e.includes("members") || e.includes("properties") || e.includes("management") || e.includes("investment") || e.includes("enterprise") || e.includes(" group") || e.includes(" group") || e.includes(" rent") || e.includes(" home") || e.includes(" cu") || e.includes(" inc") || e.includes("laborator") || e.includes("pharma") || e.includes("holding") || e.includes("worship") || e.includes("bank") || e.includes("agent") || e.includes("title") || e.includes("city ") || e.includes("technolo") || e.includes("estate") || e.includes("capital") || e.includes(" of ") || e.includes("trust");
1980
- }
1981
- static objToQp(t) {
1982
- const {
1983
- name: e = null,
1984
- first: a = null,
1985
- middle: r = null,
1986
- last: n = null,
1987
- min: s = null,
1988
- max: l = null,
1989
- city: o = null,
1990
- state: c = null,
1991
- vin: h = null,
1992
- license: p = null,
1993
- token: M = null,
1994
- phone: v = null
1995
- } = t || {}, b = e && e !== "", H = s && s !== "" && s !== "18", u = l && l !== "" && s !== "99";
1996
- let C = [];
1997
- return e && e !== "" && C.push("name=" + e), b || (a && a !== "" && C.push("first=" + a), r && r !== "" && C.push("middle=" + r), n && n !== "" && C.push("last=" + n)), H && u ? parseInt(s) > parseInt(l) ? (C.push("min=" + l), C.push("max=" + s)) : (C.push("min=" + s), C.push("max=" + l)) : (H && C.push("min=" + s), u && C.push("max=" + l)), v && v !== "" && C.push("phone=" + v), o && o !== "" && C.push("city=" + o), p && p !== "" && C.push("license=" + p), h && h !== "" && C.push("vin=" + h), c && c !== "" && C.push("state=" + c), M && M !== "" && C.push("token=" + M), C.join("&");
1998
- }
1999
- static getFirstN(t, e = 5) {
2000
- return t === null ? null : t.length === 0 ? [] : t.filter((a, r) => r < e);
1811
+ static getSearchValueClient(e = "recsSearchValue") {
1812
+ const t = localStorage.getItem(e);
1813
+ return t ? JSON.parse(t) : null;
2001
1814
  }
2002
1815
  static getStates() {
2003
1816
  return [
@@ -2094,83 +1907,444 @@ class m {
2094
1907
  { name: "Wyoming", id: "wy", slug: "wyoming", short: "WY" }
2095
1908
  ];
2096
1909
  }
2097
- static async setCityState(t = null) {
2098
- let { cityState: e = null } = t ?? {};
1910
+ static getTrackingData(e) {
1911
+ const [t, ...a] = e.split("|"), l = a.join("|").trim(), n = [
1912
+ "[pageType::" + t.trim() + "]",
1913
+ "[name::" + l + "]"
1914
+ ].join(" ");
1915
+ return {
1916
+ value: n,
1917
+ dataLayer: {
1918
+ event: "clickTrack",
1919
+ value: n
1920
+ }
1921
+ };
1922
+ }
1923
+ static async getUser() {
1924
+ if (typeof window < "u") {
1925
+ const { user: e = null } = (window == null ? void 0 : window.options) ?? {};
1926
+ if (e)
1927
+ return e;
1928
+ }
1929
+ try {
1930
+ return await H.createData("/api/cookie/fetch?name=odrUser");
1931
+ } catch (e) {
1932
+ console.error("getUser", e.message);
1933
+ }
1934
+ return null;
1935
+ }
1936
+ static async getUserHistory(e = null) {
1937
+ const { uuid: t = null } = e ?? {};
1938
+ if (!t)
1939
+ return { data: null };
1940
+ const a = JSON.stringify({
1941
+ limit: 1,
1942
+ where: {
1943
+ uuid: t
1944
+ }
1945
+ });
1946
+ return await H.makeSearchFetchCall(
1947
+ `/api/client?query=user-get-history&filter=${a}`
1948
+ );
1949
+ }
1950
+ static getWebsiteHeaderName() {
1951
+ const e = "onlinedatareports.com", t = "propertyrecs.com", a = typeof window < "u" ? window.location.host : e;
1952
+ return a && a.includes(t) ? t : e;
1953
+ }
1954
+ static getGridBounds({ map: e, tileSize: t, coords: a }) {
1955
+ const l = a.scaleBy(t), n = l.add(t);
1956
+ return {
1957
+ nw: e.unproject(l, a.z),
1958
+ se: e.unproject(n, a.z)
1959
+ };
1960
+ }
1961
+ static gridTest(e, t, a = 1500) {
1962
+ const l = this;
1963
+ L.GridLayer.GridDebug = L.GridLayer.extend({
1964
+ createTile: function(n, s) {
1965
+ const r = document.createElement("div");
1966
+ return setTimeout(() => {
1967
+ s(null, r);
1968
+ const { se: o, nw: c } = l.getGridBounds({
1969
+ map: e,
1970
+ tileSize: this.getTileSize(),
1971
+ coords: n
1972
+ });
1973
+ t({
1974
+ swLat: o.lat,
1975
+ neLng: o.lng,
1976
+ neLat: c.lat,
1977
+ swLng: c.lng,
1978
+ coords: n,
1979
+ key: n.z + "-" + n.x + "-" + n.y
1980
+ });
1981
+ }, a), r;
1982
+ }
1983
+ }), L.gridLayer.gridDebug = function(n) {
1984
+ return new L.GridLayer.GridDebug(n);
1985
+ }, e.addLayer(L.gridLayer.gridDebug());
1986
+ }
1987
+ /**
1988
+ * Handle Native Dialogs
1989
+ * @type {function} handleDialog
1990
+ * @param {string|null} target - Selector that open the dialog
1991
+ * @param {string} id - Unique dialog id
1992
+ * @param {function|null} onOpen - Callback function called when dialog is opened
1993
+ * @param {function|null} onClose - Callback function called when dialog is closed
1994
+ * @param {boolean} disableOutsideClick - Disable dialog closing when clicking outside the dialog
1995
+ * @returns {{activators: NodeListOf<Element>, handleOpen: {function}, handleClose: {function}, ref: HTMLDialogElement}}
1996
+ */
1997
+ static handleDialog({
1998
+ target: e = null,
1999
+ id: t = "",
2000
+ onOpen: a = null,
2001
+ onClose: l = null,
2002
+ disableOutsideClick: n = !1
2003
+ }) {
2004
+ const s = e ? document.querySelectorAll(e) : [], r = document.getElementById(t + "-dialog"), o = document.querySelectorAll("[data-dialog-close]"), c = ["closing", "closed", "opening", "opened", "removed"].reduce(
2005
+ (u, V) => ({
2006
+ ...u,
2007
+ [V]: new Event(V)
2008
+ }),
2009
+ {}
2010
+ ), h = new MutationObserver((u, V) => {
2011
+ u.forEach(async (w) => {
2012
+ if (w.attributeName === "open") {
2013
+ const M = w.target;
2014
+ if (!(M == null ? void 0 : M.hasAttribute("open"))) return;
2015
+ M == null || M.removeAttribute("inert"), M == null || M.dispatchEvent(c.opening), M && await C(M), M == null || M.dispatchEvent(c.opened);
2016
+ }
2017
+ });
2018
+ }), p = new MutationObserver((u, V) => {
2019
+ u.forEach((w) => {
2020
+ w.removedNodes.forEach((M) => {
2021
+ M.nodeName === "DIALOG" && (M.removeEventListener("click", b), M.removeEventListener("close", v), M.dispatchEvent(c.removed), p == null || p.disconnect(), h == null || h.disconnect());
2022
+ });
2023
+ });
2024
+ });
2025
+ r && (h.observe(r, {
2026
+ attributes: !0
2027
+ }), p.observe(document.body, {
2028
+ attributes: !1,
2029
+ subtree: !1,
2030
+ childList: !0
2031
+ }));
2032
+ const f = () => {
2033
+ r == null || r.showModal();
2034
+ }, v = async ({ target: u }) => {
2035
+ u == null || u.classList.add("closing"), u == null || u.setAttribute("inert", ""), u == null || u.dispatchEvent(c.closing), u && await C(u), u == null || u.classList.remove("closing"), u == null || u.dispatchEvent(c.closed);
2036
+ }, b = async ({ target: u }) => {
2037
+ (u == null ? void 0 : u.nodeName) === "DIALOG" && (r == null || r.close("outside"));
2038
+ }, C = (u) => Promise.allSettled(
2039
+ u == null ? void 0 : u.getAnimations().map((V) => V == null ? void 0 : V.finished)
2040
+ );
2041
+ return !n && (r == null || r.addEventListener("click", b)), r == null || r.addEventListener("close", v), s == null || s.forEach((u) => {
2042
+ u.addEventListener("click", (V) => {
2043
+ f(), a && a(V, r);
2044
+ });
2045
+ }), o == null || o.forEach((u) => {
2046
+ u.addEventListener("click", async (V) => {
2047
+ r == null || r.close("close"), l && l(V, r);
2048
+ });
2049
+ }), {
2050
+ activators: s,
2051
+ ref: r,
2052
+ handleOpen: f,
2053
+ handleClose: v
2054
+ };
2055
+ }
2056
+ static hasBoundsEntry(e, t = "bounds") {
2057
+ return H.getBoundsEntries(t).includes(e);
2058
+ }
2059
+ static initObserver(e, t, a = null) {
2099
2060
  if (!e)
2100
- return t;
2101
- e = e.toLowerCase().replace(" usa", "").replace("city or state", "").replace(" state", "").trim();
2102
- let [a = null, r = null] = e.split(",").map((n) => n.trim());
2103
- if (m.getStates(), a && !r) {
2061
+ return;
2062
+ const l = (a == null ? void 0 : a.useBounding) ?? !1;
2063
+ new IntersectionObserver(async (s, r) => {
2064
+ l ? (s[0].isIntersecting || s[0].boundingClientRect.y < 0) && t({ obs: r, entry: s[0], entries: s }) : s[0].isIntersecting && t({ obs: r, entry: s[0], entries: s });
2065
+ }, a).observe(e);
2066
+ }
2067
+ static injectLink({ href: e, id: t }) {
2068
+ const a = document.createElement("link");
2069
+ a.href = e, a.type = "text/css", a.rel = "stylesheet", t && (a.id = t), document.getElementsByTagName("head")[0].appendChild(a);
2070
+ }
2071
+ static injectScript({ src: e, id: t = null, async: a = !0, module: l = !1 }) {
2072
+ return new Promise(function(n, s) {
2073
+ let r = document.getElementById(t);
2074
+ if (t && r && r.dataset.loaded === "true")
2075
+ return n({ alreadyLoaded: !0, id: t });
2076
+ r || (r = document.createElement("script"), r.src = e, r.dataset.loaded = "false", t && (r.id = t), r.type = l ? "module" : "text/javascript", r.async = a, document.body.appendChild(r), r.onload = () => (r.dataset.loaded = "true", n({ alreadyLoaded: !1, id: t })), r.onerror = () => s(!1));
2077
+ });
2078
+ }
2079
+ static isMobile({ selector: e = null, width: t = 640 } = {}) {
2080
+ var l;
2081
+ const a = document.querySelector(e);
2082
+ return ((l = a == null ? void 0 : a.getBoundingClientRect()) == null ? void 0 : l.width) ?? 0 < t;
2083
+ }
2084
+ static isMobileAndTablet() {
2085
+ return window.mobileAndTabletCheck = function() {
2086
+ let e = !1;
2087
+ return function(t) {
2088
+ (/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(
2089
+ t
2090
+ ) || /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(
2091
+ t.substr(0, 4)
2092
+ )) && (e = !0);
2093
+ }(navigator.userAgent || navigator.vendor || window.opera), e;
2094
+ }, window.mobileAndTabletCheck();
2095
+ }
2096
+ static isNameCompany(e = null) {
2097
+ if (!e)
2098
+ return !1;
2099
+ const t = e.trim().toLowerCase();
2100
+ return t.includes("unknown") || t.includes("institute") || t.includes("bldg") || t.includes("llc") || t.includes("l l c") || t.includes(" inc") || t.includes(" co") || t.includes("univ") || t.includes("unvi") || t.includes(" fund") || t.includes(" union") || t.includes(" assoc") || t.includes(" corp") || t.includes("service") || t.includes("members") || t.includes("properties") || t.includes("management") || t.includes("investment") || t.includes("enterprise") || t.includes(" group") || t.includes(" group") || t.includes(" rent") || t.includes(" home") || t.includes(" cu") || t.includes(" inc") || t.includes("laborator") || t.includes("pharma") || t.includes("holding") || t.includes("worship") || t.includes("bank") || t.includes("agent") || t.includes("title") || t.includes("city ") || t.includes("technolo") || t.includes("estate") || t.includes("capital") || t.includes(" of ") || t.includes("trust");
2101
+ }
2102
+ static kFormat(e, t = 0) {
2103
+ if (!e)
2104
+ return null;
2105
+ const a = Math.abs(e), l = Math.sign(e);
2106
+ return a > 999999 ? l * (a / 1e6).toFixed(1) + "m" : a > 999 ? l * (a / 1e3).toFixed(t) + "k" : l * a;
2107
+ }
2108
+ static async logRequest(e = null, t = null, a = null, l = null, n = null) {
2109
+ const s = {
2110
+ name: e,
2111
+ uuid: t,
2112
+ ip: a,
2113
+ url: l,
2114
+ data: n
2115
+ };
2116
+ return await H.createData("/api/client?query=log/save&method=POST", s), null;
2117
+ }
2118
+ static loadAds() {
2119
+ window.dataLayer = window.dataLayer || [];
2120
+ const e = document.querySelectorAll(".adsbygoogle");
2121
+ window.ezstandalone = window.ezstandalone || {}, ezstandalone.cmd = ezstandalone.cmd || [];
2122
+ const t = [];
2123
+ for (let a = 0; a < e.length; a++)
2124
+ t.push(parseInt(e[a].dataset.adSlot));
2125
+ console.info("loadAds", t), t.length && ezstandalone.cmd.push(function() {
2126
+ ezstandalone.define(...t), ezstandalone.enable(), ezstandalone.display();
2127
+ });
2128
+ }
2129
+ static async loadCustomScript({ name: e = null, id: t = "", module: a = !1 } = {}) {
2130
+ if (e) {
2131
+ const l = "/scripts/" + e + ".js?v=100.0.5";
2132
+ try {
2133
+ return await H.injectScript({
2134
+ src: l,
2135
+ id: t || e,
2136
+ async: !1,
2137
+ module: a
2138
+ });
2139
+ } catch (n) {
2140
+ console.error("loadCustomScript", n);
2141
+ }
2142
+ }
2143
+ return null;
2144
+ }
2145
+ static async loadGoogleMapApi() {
2146
+ if (window.options.googleMapsLoaded === !0)
2147
+ return;
2148
+ const e = "https://maps.googleapis.com/maps/api/js", t = window.options.googleApiKey, a = e + "?key=" + t + "&libraries=marker&v=beta&callback=mapCb";
2149
+ await H.injectScript({ src: a, id: "googleapis", async: !1 });
2150
+ }
2151
+ static async loadLeafletApi() {
2152
+ const e = "https://unpkg.com/leaflet@1.9.3/dist", t = e + "/leaflet.js", a = e + "/leaflet.css", l = "//unpkg.com/leaflet-gesture-handling", n = "//unpkg.com/leaflet-gesture-handling/dist/leaflet-gesture-handling.min.css";
2153
+ await H.injectLink({ href: a, id: "leafletCss" }), await H.injectLink({ href: n, id: "gestureCss" }), await H.injectScript({ src: t, id: "leafletJs", async: !1 }), await H.injectScript({
2154
+ src: l,
2155
+ id: "gestureJs",
2156
+ async: !1
2157
+ });
2158
+ }
2159
+ static async loadSwiper() {
2160
+ const e = "https://cdn.jsdelivr.net/npm", t = `${e}/swiper@9/swiper-bundle.min.js`, a = `${e}/swiper@9/swiper-bundle.min.css`;
2161
+ await H.injectLink({ href: a, id: "swiperCss" }), await H.injectScript({ src: t, id: "swiperJs", async: !1 });
2162
+ }
2163
+ static async makeSearchFetchCall(e) {
2164
+ try {
2165
+ return (await fetch(e, {
2166
+ method: "GET",
2167
+ headers: { "Content-Type": "application/json" }
2168
+ })).json();
2169
+ } catch (t) {
2170
+ console.error("performSearch", t, { url: e });
2171
+ }
2172
+ return [];
2173
+ }
2174
+ static money(e, t = "", a = 0) {
2175
+ return e === null ? t : Intl ? new Intl.NumberFormat("en-US", {
2176
+ style: "currency",
2177
+ currency: "USD",
2178
+ minimumFractionDigits: a,
2179
+ maximumFractionDigits: a
2180
+ }).format(e) : e;
2181
+ }
2182
+ static number(e, t = "", a = 0) {
2183
+ return e === null ? t : Intl ? new Intl.NumberFormat("en-US", {
2184
+ minimumFractionDigits: a,
2185
+ maximumFractionDigits: a
2186
+ }).format(e) : e;
2187
+ }
2188
+ static objToQp(e) {
2189
+ const {
2190
+ name: t = null,
2191
+ first: a = null,
2192
+ middle: l = null,
2193
+ last: n = null,
2194
+ min: s = null,
2195
+ max: r = null,
2196
+ city: o = null,
2197
+ state: c = null,
2198
+ vin: h = null,
2199
+ license: p = null,
2200
+ token: f = null,
2201
+ phone: v = null
2202
+ } = e || {}, b = t && t !== "", C = s && s !== "" && s !== "18", u = r && r !== "" && s !== "99";
2203
+ let V = [];
2204
+ return t && t !== "" && V.push("name=" + t), b || (a && a !== "" && V.push("first=" + a), l && l !== "" && V.push("middle=" + l), n && n !== "" && V.push("last=" + n)), C && u ? parseInt(s) > parseInt(r) ? (V.push("min=" + r), V.push("max=" + s)) : (V.push("min=" + s), V.push("max=" + r)) : (C && V.push("min=" + s), u && V.push("max=" + r)), v && v !== "" && V.push("phone=" + v), o && o !== "" && V.push("city=" + o), p && p !== "" && V.push("license=" + p), h && h !== "" && V.push("vin=" + h), c && c !== "" && V.push("state=" + c), f && f !== "" && V.push("token=" + f), V.join("&");
2205
+ }
2206
+ static padTo2Digits(e) {
2207
+ return e.toString().padStart(2, "0");
2208
+ }
2209
+ static async performSearch(e = null, t = {}) {
2210
+ if (!e)
2211
+ return [];
2212
+ if (1 > e.trim().length)
2213
+ return [];
2214
+ const {
2215
+ addressesOnly: a = !1,
2216
+ useCitySearch: l = !1,
2217
+ useCityStateSearch: n = !1,
2218
+ useSearch: s = !1,
2219
+ useLocation: r = !0,
2220
+ state: o = ""
2221
+ } = t ?? {}, { tolken: c = null, ip: h = null } = await H.getHeaders(), f = [
2222
+ "query=" + encodeURIComponent(this.cleanupAddress(e)),
2223
+ "addressesOnly=" + a,
2224
+ "useSearch=" + s,
2225
+ "useCitySearch=" + l,
2226
+ "useCityStateSearch=" + n,
2227
+ "useLocation=" + r
2228
+ ];
2229
+ o && o !== "" && !n && f.push("state=" + o), c && c !== "" && f.push("tolken=" + c), h && h !== "" && f.push("ip=" + h);
2230
+ const v = f.join("&"), C = (l || n ? "/api/autocomplete-city" : "/api/autocomplete") + "?" + v;
2231
+ return await H.makeSearchFetchCall(C);
2232
+ }
2233
+ static removeElements(e) {
2234
+ document.querySelectorAll(e).forEach((t) => t == null ? void 0 : t.remove());
2235
+ }
2236
+ static removeNullFromObject(e) {
2237
+ return Object.keys(e).filter((t) => e[t]).reduce((t, a) => (t[a] = e[a], t), {});
2238
+ }
2239
+ static s(e) {
2240
+ return Math.round(e) > 1 ? "s" : "";
2241
+ }
2242
+ static scrollWheelZoom(e) {
2243
+ e.scrollWheelZoom.disable(), e.on("focus", () => {
2244
+ e.scrollWheelZoom.enable();
2245
+ }), e.on("blur", () => {
2246
+ e.scrollWheelZoom.disable();
2247
+ });
2248
+ }
2249
+ static searchInStates(e) {
2250
+ const t = H.getStates(), a = e.toLowerCase();
2251
+ let l = t.find((n) => n.short.toLowerCase() === a) ?? null;
2252
+ return l || (l = t.find((n) => n.name.toLowerCase() === a) ?? null), l;
2253
+ }
2254
+ static sendWoopraEvent(e, t) {
2255
+ typeof woopra == "object" && woopra.track(e, t);
2256
+ }
2257
+ static setBoundsEntries(e, t = "bounds") {
2258
+ const a = H.getBoundsEntries(t);
2259
+ a.push(e), localStorage.setItem(t, JSON.stringify(a));
2260
+ }
2261
+ static async setCityState(e = null) {
2262
+ let { cityState: t = null } = e ?? {};
2263
+ if (!t)
2264
+ return e;
2265
+ t = t.toLowerCase().replace(" usa", "").replace("city or state", "").replace(" state", "").trim();
2266
+ let [a = null, l = null] = t.split(",").map((n) => n.trim());
2267
+ if (H.getStates(), a && !l) {
2104
2268
  const n = this.searchInStates(a);
2105
- n && (a = null, r = n.short);
2269
+ n && (a = null, l = n.short);
2106
2270
  }
2107
- if (!r && a) {
2271
+ if (!l && a) {
2108
2272
  const n = this.searchInStates(a);
2109
- n && (r = n.short);
2273
+ n && (l = n.short);
2110
2274
  }
2111
- if (a && !r) {
2275
+ if (a && !l) {
2112
2276
  const n = a.split(" "), s = n[n.length - 1];
2113
2277
  if (s.length) {
2114
- const l = this.searchInStates(s);
2115
- l && (r = l.short, a = n.slice(0, -1).join(" "));
2278
+ const r = this.searchInStates(s);
2279
+ r && (l = r.short, a = n.slice(0, -1).join(" "));
2116
2280
  }
2117
2281
  }
2118
- return a && r && a.toLowerCase() === r.toLowerCase() && (a = null), t.city = a, t.state = r ? r.toUpperCase() : null, t;
2282
+ return a && l && a.toLowerCase() === l.toLowerCase() && (a = null), e.city = a, e.state = l ? l.toUpperCase() : null, e;
2119
2283
  }
2120
- static searchInStates(t) {
2121
- const e = m.getStates(), a = t.toLowerCase();
2122
- let r = e.find((n) => n.short.toLowerCase() === a) ?? null;
2123
- return r || (r = e.find((n) => n.name.toLowerCase() === a) ?? null), r;
2284
+ static async setSearchValueClient(e, t = "recsSearchValue") {
2285
+ localStorage.setItem(t, JSON.stringify(e)), await H.createData(`/api/cookie/create?name=${t}`, e);
2124
2286
  }
2125
- static findAncestor(t, e) {
2126
- let a = t.parentElement;
2127
- return a.tagName.toLowerCase() === e || (a = t.parentElement.parentElement, a.tagName.toLowerCase() === e) || (a = t.parentElement.parentElement.parentElement, a.tagName.toLowerCase() === e) ? a : null;
2287
+ static stickyHeader(e = ".nav") {
2288
+ const t = document.querySelector(e);
2289
+ if (!t)
2290
+ return;
2291
+ new IntersectionObserver(
2292
+ ([l]) => {
2293
+ l && (l.intersectionRatio < 1 ? t.classList.add("intersecting") : t.classList.remove("intersecting"));
2294
+ },
2295
+ { threshold: 1 }
2296
+ ).observe(t);
2128
2297
  }
2129
- static getFormUrl(t = null) {
2130
- const { name: e = null, isOptOut: a = !1 } = t ?? {};
2131
- if (!e || e === "address")
2132
- return a === !0 ? "/opt-out/address" : "/";
2133
- if (e === "background-check")
2134
- return "/report/background-check";
2135
- if (e === "background-check-search")
2136
- return a === !0 ? "/opt-out/records" : "/report/background-check/search";
2137
- if (e === "dmv-records")
2138
- return "/report/dmv-records";
2139
- if (e === "dmv-records-search")
2140
- return a === !0 ? "/opt-out/records" : "/report/dmv-records/search";
2141
- if (e === "phone")
2142
- return "/report/phone";
2143
- if (e === "phone-search")
2144
- return a === !0 ? "/opt-out/records" : "/report/phone/search";
2145
- if (e === "vin")
2146
- return "/report/vin";
2147
- if (e === "license" || e === "license-plate")
2148
- return "/report/license-plate";
2298
+ // Converts numeric degrees to radians
2299
+ static toRad(e) {
2300
+ return e * Math.PI / 180;
2301
+ }
2302
+ static toSlug(e) {
2303
+ return e.toString().trim().toLowerCase().split(":").join("-").split("'").join("").replace("‘", "");
2304
+ }
2305
+ static ucFirst(e = null) {
2306
+ if (!e)
2307
+ return null;
2308
+ const t = e.toLowerCase();
2309
+ return t.charAt(0).toUpperCase() + t.slice(1);
2310
+ }
2311
+ static useLayerTitle(e, t) {
2312
+ const a = H.getLayerTitle(e);
2313
+ L.tileLayer(a, {
2314
+ maxNativeZoom: 19,
2315
+ maxZoom: 25,
2316
+ subdomains: ["mt0", "mt1", "mt2", "mt3"],
2317
+ attribution: '&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a>'
2318
+ }).addTo(t);
2319
+ }
2320
+ static ucWords(e) {
2321
+ return e ? e.toString().split(" ").map((t) => H.ucFirst(t)).join(" ") : null;
2149
2322
  }
2150
2323
  }
2151
2324
  export {
2152
- a1 as Accordion,
2153
- n1 as Alert,
2154
- r1 as Autocomplete,
2155
- l1 as Badge,
2156
- s1 as Button,
2157
- i1 as ButtonGroup,
2158
- o1 as Card,
2159
- c1 as Checkbox,
2160
- m as Common,
2161
- d1 as Container,
2162
- h1 as Dialog,
2163
- u1 as Dots,
2325
+ u1 as Accordion,
2326
+ p1 as Alert,
2327
+ m1 as Autocomplete,
2328
+ V1 as Badge,
2329
+ H1 as Button,
2330
+ L1 as ButtonGroup,
2331
+ C1 as Card,
2332
+ f1 as Checkbox,
2333
+ H as Common,
2334
+ M1 as Container,
2335
+ g1 as Dialog,
2336
+ v1 as DialogOld,
2337
+ A1 as Dots,
2164
2338
  y as Icon,
2165
- p1 as LoadingBar,
2166
- m1 as Popover,
2167
- H1 as ProgressBar,
2168
- C1 as Radio,
2169
- L1 as Select,
2170
- M1 as Skeleton,
2171
- f1 as Slider,
2172
- V1 as Spinner,
2173
- g1 as Stars,
2174
- v1 as TextArea,
2175
- A1 as Textbox
2339
+ y1 as LoadingBar,
2340
+ w1 as Popover,
2341
+ x1 as ProgressBar,
2342
+ k1 as Radio,
2343
+ S1 as Select,
2344
+ z1 as Skeleton,
2345
+ Z1 as Slider,
2346
+ b1 as Spinner,
2347
+ N1 as Stars,
2348
+ D1 as TextArea,
2349
+ O1 as Textbox
2176
2350
  };