wacomm 2.27.4 → 2.28.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/containers/Container.d.ts +2 -1
- package/dist/html/ClickableDiv.d.ts +2 -1
- package/dist/svgTags/GoBackTag.d.ts +2 -1
- package/dist/svgTags/GoForwardTag.d.ts +8 -0
- package/dist/svgTags/GoForwardTag.stories.d.ts +7 -0
- package/dist/svgTags/SvgTag.d.ts +2 -1
- package/dist/svgTags/index.d.ts +1 -0
- package/dist/wacomm.cjs.js +3 -3
- package/dist/wacomm.css +1 -1
- package/dist/wacomm.es.js +207 -185
- package/package.json +1 -1
package/dist/wacomm.es.js
CHANGED
|
@@ -15215,10 +15215,11 @@ function Qa({ items: e, itemRenderer: t, className: n = "", fallback: r = void 0
|
|
|
15215
15215
|
//#endregion
|
|
15216
15216
|
//#region src/html/ClickableDiv.tsx
|
|
15217
15217
|
var $a = "appearance-none bg-transparent p-0 m-0 text-left cursor-pointer focus:outline-none";
|
|
15218
|
-
function eo({ children: e, className: t = "", onClick: n = Yt }) {
|
|
15218
|
+
function eo({ children: e, className: t = "", onClick: n = Yt, disabled: r = !1 }) {
|
|
15219
15219
|
return /* @__PURE__ */ C("button", {
|
|
15220
15220
|
type: "button",
|
|
15221
|
-
|
|
15221
|
+
disabled: r,
|
|
15222
|
+
className: G("ClickableDiv", $a, r ? "cursor-not-allowed opacity-40" : "", t),
|
|
15222
15223
|
onClick: n,
|
|
15223
15224
|
children: e
|
|
15224
15225
|
});
|
|
@@ -15308,10 +15309,11 @@ function lo({ children: e, className: t = "", onClick: n = Yt }) {
|
|
|
15308
15309
|
}
|
|
15309
15310
|
//#endregion
|
|
15310
15311
|
//#region src/containers/Container.tsx
|
|
15311
|
-
function uo({ children: e, className: t = "", isVertical: n = !1, onClick: r }) {
|
|
15312
|
+
function uo({ children: e, className: t = "", isVertical: n = !1, onClick: r, disabled: i = !1 }) {
|
|
15312
15313
|
return /* @__PURE__ */ C(eo, {
|
|
15313
15314
|
className: G("gap-2 items-center flex ", n ? "flex-col" : "flex-row", t),
|
|
15314
15315
|
onClick: r,
|
|
15316
|
+
disabled: i,
|
|
15315
15317
|
children: e
|
|
15316
15318
|
});
|
|
15317
15319
|
}
|
|
@@ -16225,16 +16227,17 @@ var os = (e, t) => {
|
|
|
16225
16227
|
let n = "text-gray-600 text-sm";
|
|
16226
16228
|
return t && (n = "text-blue-500"), e && (n = G(n, "text-xs -mt-3")), n;
|
|
16227
16229
|
};
|
|
16228
|
-
function cs({ label: e = "", isVertical: t = !1, isHighlighted: n = !1,
|
|
16230
|
+
function cs({ label: e = "", isVertical: t = !1, isHighlighted: n = !1, disabled: r = !1, className: i = "", icon: { Svg: a, className: o = "", size: s = K.lg }, labelClassName: c = "", isLabelHidden: l = !1, onClick: u = Yt }) {
|
|
16229
16231
|
return /* @__PURE__ */ w(uo, {
|
|
16230
|
-
className: G(os(t, n),
|
|
16232
|
+
className: G(os(t, n), i),
|
|
16231
16233
|
isVertical: t,
|
|
16232
|
-
onClick:
|
|
16233
|
-
|
|
16234
|
-
|
|
16235
|
-
|
|
16236
|
-
|
|
16237
|
-
|
|
16234
|
+
onClick: u,
|
|
16235
|
+
disabled: r,
|
|
16236
|
+
children: [/* @__PURE__ */ C(a, {
|
|
16237
|
+
className: G(`${n ? "fill-blue-500 text-blue-500" : "fill-gray-600"}`, o),
|
|
16238
|
+
size: s
|
|
16239
|
+
}), !l && e && /* @__PURE__ */ C("div", {
|
|
16240
|
+
className: G(ss(t, n), c),
|
|
16238
16241
|
children: e
|
|
16239
16242
|
})]
|
|
16240
16243
|
});
|
|
@@ -34578,15 +34581,34 @@ function yk({ label: e = "Comment", onClick: t }) {
|
|
|
34578
34581
|
}
|
|
34579
34582
|
//#endregion
|
|
34580
34583
|
//#region src/svgTags/GoBackTag.tsx
|
|
34581
|
-
function bk({ isHighlighted: e = !1,
|
|
34584
|
+
function bk({ isHighlighted: e = !1, disabled: t = !1, onClick: n = Yt, className: r = "" }) {
|
|
34582
34585
|
return /* @__PURE__ */ C(cs, {
|
|
34583
34586
|
label: "Back",
|
|
34587
|
+
isLabelHidden: !0,
|
|
34588
|
+
disabled: t,
|
|
34584
34589
|
icon: {
|
|
34585
34590
|
Svg: ia,
|
|
34586
34591
|
size: K.sm,
|
|
34587
34592
|
className: "fill-blue-500"
|
|
34588
34593
|
},
|
|
34589
34594
|
labelClassName: "text-blue-500",
|
|
34595
|
+
onClick: n,
|
|
34596
|
+
className: G("gap-0.5", r),
|
|
34597
|
+
isHighlighted: e
|
|
34598
|
+
});
|
|
34599
|
+
}
|
|
34600
|
+
//#endregion
|
|
34601
|
+
//#region src/svgTags/GoForwardTag.tsx
|
|
34602
|
+
function xk({ isHighlighted: e = !1, onClick: t = Yt, className: n = "" }) {
|
|
34603
|
+
return /* @__PURE__ */ C(cs, {
|
|
34604
|
+
label: "Forward",
|
|
34605
|
+
isLabelHidden: !0,
|
|
34606
|
+
icon: {
|
|
34607
|
+
Svg: aa,
|
|
34608
|
+
size: K.sm,
|
|
34609
|
+
className: "fill-blue-500"
|
|
34610
|
+
},
|
|
34611
|
+
labelClassName: "text-blue-500",
|
|
34590
34612
|
onClick: t,
|
|
34591
34613
|
className: G("gap-0.5", n),
|
|
34592
34614
|
isHighlighted: e
|
|
@@ -34594,7 +34616,7 @@ function bk({ isHighlighted: e = !1, onClick: t = Yt, className: n = "" }) {
|
|
|
34594
34616
|
}
|
|
34595
34617
|
//#endregion
|
|
34596
34618
|
//#region src/svgTags/MessageTag.tsx
|
|
34597
|
-
function
|
|
34619
|
+
function Sk({ isHighlighted: e = !1, onClick: t = Yt, className: n = "" }) {
|
|
34598
34620
|
return /* @__PURE__ */ C(cs, {
|
|
34599
34621
|
label: "Message",
|
|
34600
34622
|
icon: {
|
|
@@ -34610,14 +34632,14 @@ function xk({ isHighlighted: e = !1, onClick: t = Yt, className: n = "" }) {
|
|
|
34610
34632
|
}
|
|
34611
34633
|
//#endregion
|
|
34612
34634
|
//#region src/svgTags/ReportTag.tsx
|
|
34613
|
-
var
|
|
34614
|
-
function
|
|
34635
|
+
var Ck = "#4b5563", wk = "#f87171";
|
|
34636
|
+
function Tk({ label: e = "Report", isHighlighted: t = !1, onClick: n = Yt, className: r = "" }) {
|
|
34615
34637
|
return /* @__PURE__ */ C(eo, {
|
|
34616
34638
|
className: G("ReportTag w-fit", r),
|
|
34617
34639
|
onClick: n,
|
|
34618
34640
|
children: /* @__PURE__ */ w("span", {
|
|
34619
34641
|
className: "flex flex-row items-center py-0.5 px-2 gap-2",
|
|
34620
|
-
style: { color: t ?
|
|
34642
|
+
style: { color: t ? wk : Ck },
|
|
34621
34643
|
children: [/* @__PURE__ */ C(Na, { size: K.sm }), /* @__PURE__ */ C("div", {
|
|
34622
34644
|
className: "text-sm",
|
|
34623
34645
|
children: e
|
|
@@ -34627,14 +34649,14 @@ function wk({ label: e = "Report", isHighlighted: t = !1, onClick: n = Yt, class
|
|
|
34627
34649
|
}
|
|
34628
34650
|
//#endregion
|
|
34629
34651
|
//#region src/svgTags/BlockTag.tsx
|
|
34630
|
-
var
|
|
34631
|
-
function
|
|
34652
|
+
var Ek = "#4b5563", Dk = "#f87171";
|
|
34653
|
+
function Ok({ label: e = "Block", isHighlighted: t = !1, onClick: n = Yt, className: r = "" }) {
|
|
34632
34654
|
return /* @__PURE__ */ C(eo, {
|
|
34633
34655
|
className: G("BlockTag w-fit", r),
|
|
34634
34656
|
onClick: n,
|
|
34635
34657
|
children: /* @__PURE__ */ w("span", {
|
|
34636
34658
|
className: "flex flex-row items-center py-0.5 px-2 gap-2",
|
|
34637
|
-
style: { color: t ?
|
|
34659
|
+
style: { color: t ? Dk : Ek },
|
|
34638
34660
|
children: [/* @__PURE__ */ C(Ma, { size: K.sm }), /* @__PURE__ */ C("div", {
|
|
34639
34661
|
className: "text-sm",
|
|
34640
34662
|
children: e
|
|
@@ -34644,7 +34666,7 @@ function Dk({ label: e = "Block", isHighlighted: t = !1, onClick: n = Yt, classN
|
|
|
34644
34666
|
}
|
|
34645
34667
|
//#endregion
|
|
34646
34668
|
//#region src/svgTags/SettingsTag.tsx
|
|
34647
|
-
function
|
|
34669
|
+
function kk({ label: e, onClick: t, className: n = "" }) {
|
|
34648
34670
|
return /* @__PURE__ */ C(cs, {
|
|
34649
34671
|
icon: {
|
|
34650
34672
|
Svg: Pa,
|
|
@@ -34658,7 +34680,7 @@ function Ok({ label: e, onClick: t, className: n = "" }) {
|
|
|
34658
34680
|
}
|
|
34659
34681
|
//#endregion
|
|
34660
34682
|
//#region src/svgTags/profiles/TeamTag.tsx
|
|
34661
|
-
function
|
|
34683
|
+
function Ak({ label: e = "", isHighlighted: t = !1, onClick: n = Yt, className: r = "", svgSize: i = K.md, labelClassName: a = "", svgClassName: o = "", isVertical: s = !1 }) {
|
|
34662
34684
|
return /* @__PURE__ */ C(cs, {
|
|
34663
34685
|
label: e || "Team",
|
|
34664
34686
|
icon: {
|
|
@@ -34675,7 +34697,7 @@ function kk({ label: e = "", isHighlighted: t = !1, onClick: n = Yt, className:
|
|
|
34675
34697
|
}
|
|
34676
34698
|
//#endregion
|
|
34677
34699
|
//#region src/svgTags/profiles/ArenaTag.tsx
|
|
34678
|
-
function
|
|
34700
|
+
function jk({ label: e = "", isHighlighted: t = !1, onClick: n = Yt, className: r = "", svgClassName: i = "", svgSize: a = K.md, labelClassName: o = "", isVertical: s = !1 }) {
|
|
34679
34701
|
return /* @__PURE__ */ C(cs, {
|
|
34680
34702
|
label: e || "Arena",
|
|
34681
34703
|
icon: {
|
|
@@ -34692,7 +34714,7 @@ function Ak({ label: e = "", isHighlighted: t = !1, onClick: n = Yt, className:
|
|
|
34692
34714
|
}
|
|
34693
34715
|
//#endregion
|
|
34694
34716
|
//#region src/svgTags/profiles/CollectionTag.tsx
|
|
34695
|
-
function
|
|
34717
|
+
function Mk({ label: e = "", isHighlighted: t = !1, onClick: n = Yt, className: r = "", labelClassName: i = "", svgClassName: a = "", svgSize: o = K.md, isVertical: s = !1 }) {
|
|
34696
34718
|
return /* @__PURE__ */ C(cs, {
|
|
34697
34719
|
label: e || "Collection",
|
|
34698
34720
|
icon: {
|
|
@@ -34709,7 +34731,7 @@ function jk({ label: e = "", isHighlighted: t = !1, onClick: n = Yt, className:
|
|
|
34709
34731
|
}
|
|
34710
34732
|
//#endregion
|
|
34711
34733
|
//#region src/svgTags/profiles/EventTag.tsx
|
|
34712
|
-
function
|
|
34734
|
+
function Nk({ label: e = "", isHighlighted: t = !1, onClick: n = Yt, className: r = "", svgSize: i = K.md, labelClassName: a = "", svgClassName: o = "", isVertical: s = !1 }) {
|
|
34713
34735
|
return /* @__PURE__ */ C(cs, {
|
|
34714
34736
|
label: e || "Event",
|
|
34715
34737
|
icon: {
|
|
@@ -34726,7 +34748,7 @@ function Mk({ label: e = "", isHighlighted: t = !1, onClick: n = Yt, className:
|
|
|
34726
34748
|
}
|
|
34727
34749
|
//#endregion
|
|
34728
34750
|
//#region src/svgTags/profiles/MarketTag.tsx
|
|
34729
|
-
function
|
|
34751
|
+
function Pk({ label: e = "", isHighlighted: t = !1, onClick: n = Yt, className: r = "", svgSize: i = K.md, labelClassName: a = "", svgClassName: o = "", isVertical: s = !1 }) {
|
|
34730
34752
|
return /* @__PURE__ */ C(cs, {
|
|
34731
34753
|
label: e,
|
|
34732
34754
|
icon: {
|
|
@@ -34743,7 +34765,7 @@ function Nk({ label: e = "", isHighlighted: t = !1, onClick: n = Yt, className:
|
|
|
34743
34765
|
}
|
|
34744
34766
|
//#endregion
|
|
34745
34767
|
//#region src/svgTags/profiles/UserTag.tsx
|
|
34746
|
-
function
|
|
34768
|
+
function Fk({ label: e, svgSize: t = K.md, labelClassName: n = "", svgClassName: r = "", isVertical: i = !1 }) {
|
|
34747
34769
|
return /* @__PURE__ */ C(cs, {
|
|
34748
34770
|
label: e,
|
|
34749
34771
|
icon: {
|
|
@@ -34757,7 +34779,7 @@ function Pk({ label: e, svgSize: t = K.md, labelClassName: n = "", svgClassName:
|
|
|
34757
34779
|
}
|
|
34758
34780
|
//#endregion
|
|
34759
34781
|
//#region src/svgTags/profiles/CoachTag.tsx
|
|
34760
|
-
function
|
|
34782
|
+
function Ik({ label: e, isHighlighted: t = !1, onClick: n = Yt, className: r = "", svgSize: i = K.md, labelClassName: a = "", isVertical: o = !1 }) {
|
|
34761
34783
|
return /* @__PURE__ */ C(cs, {
|
|
34762
34784
|
label: e,
|
|
34763
34785
|
icon: {
|
|
@@ -34774,7 +34796,7 @@ function Fk({ label: e, isHighlighted: t = !1, onClick: n = Yt, className: r = "
|
|
|
34774
34796
|
}
|
|
34775
34797
|
//#endregion
|
|
34776
34798
|
//#region src/svgTags/profiles/GameTag.tsx
|
|
34777
|
-
function
|
|
34799
|
+
function Lk({ label: e = "", isHighlighted: t = !1, onClick: n = Yt, className: r = "", svgClassName: i = "", svgSize: a = K.md, labelClassName: o = "", isVertical: s = !1 }) {
|
|
34778
34800
|
return /* @__PURE__ */ C(cs, {
|
|
34779
34801
|
label: e,
|
|
34780
34802
|
icon: {
|
|
@@ -34791,7 +34813,7 @@ function Ik({ label: e = "", isHighlighted: t = !1, onClick: n = Yt, className:
|
|
|
34791
34813
|
}
|
|
34792
34814
|
//#endregion
|
|
34793
34815
|
//#region src/svgTags/profiles/LeaderboardTag.tsx
|
|
34794
|
-
function
|
|
34816
|
+
function Rk({ label: e = "", isHighlighted: t = !1, onClick: n = Yt, className: r = "", svgClassName: i = "", svgSize: a = K.md, labelClassName: o = "", isVertical: s = !1 }) {
|
|
34795
34817
|
return /* @__PURE__ */ C(cs, {
|
|
34796
34818
|
label: e,
|
|
34797
34819
|
icon: {
|
|
@@ -34808,7 +34830,7 @@ function Lk({ label: e = "", isHighlighted: t = !1, onClick: n = Yt, className:
|
|
|
34808
34830
|
}
|
|
34809
34831
|
//#endregion
|
|
34810
34832
|
//#region src/svgTags/posts/ImageTag.tsx
|
|
34811
|
-
function
|
|
34833
|
+
function zk({ label: e = "", isHighlighted: t = !1, onClick: n = Yt, className: r = "", svgSize: i = K.md }) {
|
|
34812
34834
|
return /* @__PURE__ */ C(cs, {
|
|
34813
34835
|
label: e || "Images",
|
|
34814
34836
|
icon: {
|
|
@@ -34822,7 +34844,7 @@ function Rk({ label: e = "", isHighlighted: t = !1, onClick: n = Yt, className:
|
|
|
34822
34844
|
}
|
|
34823
34845
|
//#endregion
|
|
34824
34846
|
//#region src/svgTags/posts/PollTag.tsx
|
|
34825
|
-
function
|
|
34847
|
+
function Bk({ label: e = "", isHighlighted: t = !1, onClick: n = Yt, className: r = "", svgSize: i = K.md }) {
|
|
34826
34848
|
return /* @__PURE__ */ C(cs, {
|
|
34827
34849
|
label: e || "Polls",
|
|
34828
34850
|
icon: {
|
|
@@ -34837,7 +34859,7 @@ function zk({ label: e = "", isHighlighted: t = !1, onClick: n = Yt, className:
|
|
|
34837
34859
|
}
|
|
34838
34860
|
//#endregion
|
|
34839
34861
|
//#region src/svgTags/posts/CreatePostTag.tsx
|
|
34840
|
-
function
|
|
34862
|
+
function Vk({ label: e = "", isHighlighted: t = !1, onClick: n = Yt, className: r = "", svgSize: i = K.md }) {
|
|
34841
34863
|
return /* @__PURE__ */ C(cs, {
|
|
34842
34864
|
label: e,
|
|
34843
34865
|
icon: {
|
|
@@ -34852,7 +34874,7 @@ function Bk({ label: e = "", isHighlighted: t = !1, onClick: n = Yt, className:
|
|
|
34852
34874
|
}
|
|
34853
34875
|
//#endregion
|
|
34854
34876
|
//#region src/svgTags/posts/PostTag.tsx
|
|
34855
|
-
function
|
|
34877
|
+
function Hk({ isHighlighted: e = !1, onClick: t = Yt, className: n = "", labelClassName: r = "", svgClassName: i = "", svgSize: a = K.md, label: o = "", isVertical: s = !1 }) {
|
|
34856
34878
|
return /* @__PURE__ */ C(cs, {
|
|
34857
34879
|
label: o || "Post",
|
|
34858
34880
|
icon: {
|
|
@@ -34869,13 +34891,13 @@ function Vk({ isHighlighted: e = !1, onClick: t = Yt, className: n = "", labelCl
|
|
|
34869
34891
|
}
|
|
34870
34892
|
//#endregion
|
|
34871
34893
|
//#region src/svgTags/locations/CityTag.tsx
|
|
34872
|
-
function
|
|
34894
|
+
function Uk({ label: e, onClick: t = Yt }) {
|
|
34873
34895
|
return /* @__PURE__ */ C(cs, {
|
|
34874
34896
|
label: e,
|
|
34875
34897
|
icon: {
|
|
34876
34898
|
Svg: ha,
|
|
34877
34899
|
className: "fill-gray-500",
|
|
34878
|
-
size: K.
|
|
34900
|
+
size: K.xs
|
|
34879
34901
|
},
|
|
34880
34902
|
isVertical: !1,
|
|
34881
34903
|
onClick: t,
|
|
@@ -34884,13 +34906,13 @@ function Hk({ label: e, onClick: t = Yt }) {
|
|
|
34884
34906
|
}
|
|
34885
34907
|
//#endregion
|
|
34886
34908
|
//#region src/svgTags/locations/StreetTag.tsx
|
|
34887
|
-
function
|
|
34909
|
+
function Wk({ label: e, onClick: t = Yt }) {
|
|
34888
34910
|
return /* @__PURE__ */ C(cs, {
|
|
34889
34911
|
label: e,
|
|
34890
34912
|
icon: {
|
|
34891
34913
|
Svg: Ta,
|
|
34892
34914
|
className: "fill-gray-500",
|
|
34893
|
-
size: K.
|
|
34915
|
+
size: K.xs
|
|
34894
34916
|
},
|
|
34895
34917
|
isVertical: !1,
|
|
34896
34918
|
onClick: t,
|
|
@@ -34899,13 +34921,13 @@ function Uk({ label: e, onClick: t = Yt }) {
|
|
|
34899
34921
|
}
|
|
34900
34922
|
//#endregion
|
|
34901
34923
|
//#region src/svgTags/locations/LocationPointTag.tsx
|
|
34902
|
-
function
|
|
34924
|
+
function Gk({ label: e, onClick: t = Yt }) {
|
|
34903
34925
|
return /* @__PURE__ */ C(cs, {
|
|
34904
34926
|
label: e,
|
|
34905
34927
|
icon: {
|
|
34906
34928
|
Svg: wa,
|
|
34907
34929
|
className: "fill-gray-500",
|
|
34908
|
-
size: K.
|
|
34930
|
+
size: K.xs
|
|
34909
34931
|
},
|
|
34910
34932
|
isVertical: !1,
|
|
34911
34933
|
onClick: t,
|
|
@@ -34914,7 +34936,7 @@ function Wk({ label: e, onClick: t = Yt }) {
|
|
|
34914
34936
|
}
|
|
34915
34937
|
//#endregion
|
|
34916
34938
|
//#region src/likes/LikeSection.tsx
|
|
34917
|
-
function
|
|
34939
|
+
function Kk({ className: e = "", textClassName: t = "text-gray-500 text-xs", count: n = 0, isHighlighted: r = !1, onLike: i }) {
|
|
34918
34940
|
let a = G(t, r ? "text-blue-500" : "");
|
|
34919
34941
|
return /* @__PURE__ */ w(co, {
|
|
34920
34942
|
className: G("LikeSection -gap-1", e),
|
|
@@ -34927,7 +34949,7 @@ function Gk({ className: e = "", textClassName: t = "text-gray-500 text-xs", cou
|
|
|
34927
34949
|
}
|
|
34928
34950
|
//#endregion
|
|
34929
34951
|
//#region src/commentReply/CommentReplyCount.tsx
|
|
34930
|
-
function
|
|
34952
|
+
function qk({ singleLabel: e, pluralLabel: t, count: n = 0, onClick: r, className: i = "text-gray-500 text-sm" }) {
|
|
34931
34953
|
return /* @__PURE__ */ C(eo, {
|
|
34932
34954
|
onClick: r,
|
|
34933
34955
|
children: /* @__PURE__ */ C("span", {
|
|
@@ -34938,14 +34960,14 @@ function Kk({ singleLabel: e, pluralLabel: t, count: n = 0, onClick: r, classNam
|
|
|
34938
34960
|
}
|
|
34939
34961
|
//#endregion
|
|
34940
34962
|
//#region src/commentReply/CommentReplySection.tsx
|
|
34941
|
-
function
|
|
34963
|
+
function Jk({ singleLabel: e, pluralLabel: t, className: n = "", textClassName: r = "text-gray-500 text-xs", count: i = 0, onClick: a }) {
|
|
34942
34964
|
return /* @__PURE__ */ w(co, {
|
|
34943
34965
|
className: n,
|
|
34944
34966
|
onClick: a,
|
|
34945
34967
|
children: [/* @__PURE__ */ C(Za, {
|
|
34946
34968
|
className: r,
|
|
34947
34969
|
text: e
|
|
34948
|
-
}), i > 0 && /* @__PURE__ */ w(S, { children: [/* @__PURE__ */ C(Ym, { className: "text-gray-300" }), /* @__PURE__ */ C(
|
|
34970
|
+
}), i > 0 && /* @__PURE__ */ w(S, { children: [/* @__PURE__ */ C(Ym, { className: "text-gray-300" }), /* @__PURE__ */ C(qk, {
|
|
34949
34971
|
singleLabel: e,
|
|
34950
34972
|
pluralLabel: t,
|
|
34951
34973
|
count: i,
|
|
@@ -34956,8 +34978,8 @@ function qk({ singleLabel: e, pluralLabel: t, className: n = "", textClassName:
|
|
|
34956
34978
|
}
|
|
34957
34979
|
//#endregion
|
|
34958
34980
|
//#region src/commentReply/CommentsSection.tsx
|
|
34959
|
-
function
|
|
34960
|
-
return /* @__PURE__ */ C(
|
|
34981
|
+
function Yk({ className: e, textClassName: t, count: n, onClick: r }) {
|
|
34982
|
+
return /* @__PURE__ */ C(Jk, {
|
|
34961
34983
|
singleLabel: "Comment",
|
|
34962
34984
|
pluralLabel: "Comments",
|
|
34963
34985
|
className: e,
|
|
@@ -34968,8 +34990,8 @@ function Jk({ className: e, textClassName: t, count: n, onClick: r }) {
|
|
|
34968
34990
|
}
|
|
34969
34991
|
//#endregion
|
|
34970
34992
|
//#region src/commentReply/RepliesSection.tsx
|
|
34971
|
-
function
|
|
34972
|
-
return /* @__PURE__ */ C(
|
|
34993
|
+
function Xk({ className: e, textClassName: t, count: n, onClick: r }) {
|
|
34994
|
+
return /* @__PURE__ */ C(Jk, {
|
|
34973
34995
|
singleLabel: "Reply",
|
|
34974
34996
|
pluralLabel: "Replies",
|
|
34975
34997
|
className: e,
|
|
@@ -34980,7 +35002,7 @@ function Yk({ className: e, textClassName: t, count: n, onClick: r }) {
|
|
|
34980
35002
|
}
|
|
34981
35003
|
//#endregion
|
|
34982
35004
|
//#region src/success/SuccessMessage.tsx
|
|
34983
|
-
function
|
|
35005
|
+
function Zk({ label: e = "Success" }) {
|
|
34984
35006
|
return /* @__PURE__ */ C("div", {
|
|
34985
35007
|
className: "text-green-600",
|
|
34986
35008
|
children: e
|
|
@@ -34988,8 +35010,8 @@ function Xk({ label: e = "Success" }) {
|
|
|
34988
35010
|
}
|
|
34989
35011
|
//#endregion
|
|
34990
35012
|
//#region src/toaster/Toaster.tsx
|
|
34991
|
-
var
|
|
34992
|
-
function
|
|
35013
|
+
var Qk = 1e3;
|
|
35014
|
+
function $k({ message: e, isOpen: t, onClose: n = Yt, duration: r = 2e3, className: i = "" }) {
|
|
34993
35015
|
let [a, o] = x("hidden");
|
|
34994
35016
|
return g(() => {
|
|
34995
35017
|
if (!t) return;
|
|
@@ -35004,7 +35026,7 @@ function Qk({ message: e, isOpen: t, onClose: n = Yt, duration: r = 2e3, classNa
|
|
|
35004
35026
|
if (a !== "exiting") return;
|
|
35005
35027
|
let e = setTimeout(() => {
|
|
35006
35028
|
o("hidden"), n();
|
|
35007
|
-
},
|
|
35029
|
+
}, Qk);
|
|
35008
35030
|
return () => clearTimeout(e);
|
|
35009
35031
|
}, [a, n]), a === "hidden" ? null : /* @__PURE__ */ C("div", {
|
|
35010
35032
|
className: `fixed bottom-6 left-1/2 -translate-x-1/2 z-[100] px-4 py-2 rounded-md shadow-lg transition-all ease-out ${a === "visible" ? "duration-300 opacity-100 translate-y-0" : a === "exiting" ? "duration-1000 opacity-0 translate-y-4" : "duration-300 opacity-0 translate-y-4"} ${i}`,
|
|
@@ -35013,40 +35035,40 @@ function Qk({ message: e, isOpen: t, onClose: n = Yt, duration: r = 2e3, classNa
|
|
|
35013
35035
|
}
|
|
35014
35036
|
//#endregion
|
|
35015
35037
|
//#region src/tags/Tag.tsx
|
|
35016
|
-
var
|
|
35038
|
+
var eA = [
|
|
35017
35039
|
"text-lime-700 border border-lime-700 bg-white",
|
|
35018
35040
|
"text-violet-600 border border-violet-600 bg-white",
|
|
35019
35041
|
"text-blue-500 border border-blue-500 bg-white",
|
|
35020
35042
|
"text-slate-300 border border-slate-300 bg-white",
|
|
35021
35043
|
"text-cyan-600 border border-cyan-600 bg-white",
|
|
35022
35044
|
"text-yellow-700 border border-yellow-700 bg-white"
|
|
35023
|
-
],
|
|
35045
|
+
], tA = [
|
|
35024
35046
|
"bg-lime-700 text-white",
|
|
35025
35047
|
"bg-violet-600 text-white",
|
|
35026
35048
|
"bg-blue-500 text-white",
|
|
35027
35049
|
"bg-slate-300 text-white",
|
|
35028
35050
|
"bg-cyan-600 text-white",
|
|
35029
35051
|
"bg-yellow-700 text-white"
|
|
35030
|
-
],
|
|
35031
|
-
let n =
|
|
35032
|
-
return t ?
|
|
35052
|
+
], nA = 6, rA = (e) => (typeof e == "string" && (e = sn(e)), Math.abs(Math.floor(e)) % nA), iA = (e, t) => {
|
|
35053
|
+
let n = rA(e);
|
|
35054
|
+
return t ? tA[n] : eA[n];
|
|
35033
35055
|
};
|
|
35034
|
-
function
|
|
35056
|
+
function aA({ label: e, onClick: t = Yt, className: n = "", labelSize: r = "base", isHighlighted: i = !1, color: a = 0 }) {
|
|
35035
35057
|
return /* @__PURE__ */ C(eo, {
|
|
35036
35058
|
onClick: t,
|
|
35037
|
-
className: G("Tag w-fit h-fit px-1 rounded-full", n, `text-${r}`,
|
|
35059
|
+
className: G("Tag w-fit h-fit px-1 rounded-full", n, `text-${r}`, iA(a, i)),
|
|
35038
35060
|
children: e
|
|
35039
35061
|
});
|
|
35040
35062
|
}
|
|
35041
35063
|
//#endregion
|
|
35042
35064
|
//#region src/tags/Tags.tsx
|
|
35043
|
-
function
|
|
35065
|
+
function oA({ tags: e, highlightedTagIndex: t, className: n = "" }) {
|
|
35044
35066
|
return /* @__PURE__ */ C(Qa, {
|
|
35045
35067
|
className: G("Tags flex flex-wrap gap-1", n),
|
|
35046
35068
|
items: e,
|
|
35047
35069
|
itemRenderer: (e, n) => {
|
|
35048
35070
|
let r = typeof t == "number" ? n === t : void 0;
|
|
35049
|
-
return /* @__PURE__ */ C(
|
|
35071
|
+
return /* @__PURE__ */ C(aA, {
|
|
35050
35072
|
...e,
|
|
35051
35073
|
...r === void 0 ? {} : { isHighlighted: r }
|
|
35052
35074
|
}, n);
|
|
@@ -35055,7 +35077,7 @@ function aA({ tags: e, highlightedTagIndex: t, className: n = "" }) {
|
|
|
35055
35077
|
}
|
|
35056
35078
|
//#endregion
|
|
35057
35079
|
//#region src/ShowMore.tsx
|
|
35058
|
-
function
|
|
35080
|
+
function sA({ onClick: e = Yt, className: t = "" }) {
|
|
35059
35081
|
return /* @__PURE__ */ C(eo, {
|
|
35060
35082
|
onClick: e,
|
|
35061
35083
|
className: G("ShowMore font-bold text-gray-700", t),
|
|
@@ -35064,7 +35086,7 @@ function oA({ onClick: e = Yt, className: t = "" }) {
|
|
|
35064
35086
|
}
|
|
35065
35087
|
//#endregion
|
|
35066
35088
|
//#region src/carousel/Carousel.tsx
|
|
35067
|
-
function
|
|
35089
|
+
function cA({ children: e, className: t = "w-50" }) {
|
|
35068
35090
|
return /* @__PURE__ */ C("div", {
|
|
35069
35091
|
className: G("Carousel", t),
|
|
35070
35092
|
children: /* @__PURE__ */ C(Te, {
|
|
@@ -35084,7 +35106,7 @@ function sA({ children: e, className: t = "w-50" }) {
|
|
|
35084
35106
|
}
|
|
35085
35107
|
//#endregion
|
|
35086
35108
|
//#region src/avatar/LetterAvatar.tsx
|
|
35087
|
-
function
|
|
35109
|
+
function lA({ letter: e, className: t = "", onClick: n }) {
|
|
35088
35110
|
return /* @__PURE__ */ C(eo, {
|
|
35089
35111
|
onClick: n,
|
|
35090
35112
|
className: G("LetterAvatar flex items-center justify-center rounded-full w-full h-full bg-blue-300 text-white font-bold", t),
|
|
@@ -35112,14 +35134,14 @@ function cA({ letter: e, className: t = "", onClick: n }) {
|
|
|
35112
35134
|
}
|
|
35113
35135
|
//#endregion
|
|
35114
35136
|
//#region src/avatar/Avatar.tsx
|
|
35115
|
-
function
|
|
35137
|
+
function uA({ label: e = "N", className: t = "w-full h-full", imgSrc: n = "", fallbackImgSrc: r = "", onClick: i = Yt }) {
|
|
35116
35138
|
return n || r ? /* @__PURE__ */ C(Zo, {
|
|
35117
35139
|
className: G("Avatar rounded-full w-full h-full", t),
|
|
35118
35140
|
src: n,
|
|
35119
35141
|
fallbackSrc: r,
|
|
35120
35142
|
alt: e,
|
|
35121
35143
|
onClick: i
|
|
35122
|
-
}) : /* @__PURE__ */ C(
|
|
35144
|
+
}) : /* @__PURE__ */ C(lA, {
|
|
35123
35145
|
className: `LetterAvatar ${t}`,
|
|
35124
35146
|
onClick: i,
|
|
35125
35147
|
letter: e
|
|
@@ -35127,10 +35149,10 @@ function lA({ label: e = "N", className: t = "w-full h-full", imgSrc: n = "", fa
|
|
|
35127
35149
|
}
|
|
35128
35150
|
//#endregion
|
|
35129
35151
|
//#region src/avatar/AvatarTag.tsx
|
|
35130
|
-
function
|
|
35152
|
+
function dA({ label: e = "N", onClick: t = Yt, className: n = "", imgSrc: r = "", fallbackImgSrc: i = "", avatarClassName: a = "w-8 h-8" }) {
|
|
35131
35153
|
return /* @__PURE__ */ w(fo, {
|
|
35132
35154
|
className: G("AvatarTag shrink-0 bg-white rounded-lg py-1", n),
|
|
35133
|
-
children: [/* @__PURE__ */ C(
|
|
35155
|
+
children: [/* @__PURE__ */ C(uA, {
|
|
35134
35156
|
className: a,
|
|
35135
35157
|
onClick: t,
|
|
35136
35158
|
label: e?.charAt(0).toUpperCase(),
|
|
@@ -35144,12 +35166,12 @@ function uA({ label: e = "N", onClick: t = Yt, className: n = "", imgSrc: r = ""
|
|
|
35144
35166
|
}
|
|
35145
35167
|
//#endregion
|
|
35146
35168
|
//#region src/avatar/AvatarTimeTag.tsx
|
|
35147
|
-
function
|
|
35169
|
+
function fA({ label: e = "N", time: t, onClick: n = Yt, className: r = "", avatarClassName: i = "h-11 w-11", imgSrc: a = "", fallbackImgSrc: o }) {
|
|
35148
35170
|
return /* @__PURE__ */ w(fo, {
|
|
35149
35171
|
className: G("AvatarTimeTag bg-white rounded-lg py-1", r),
|
|
35150
35172
|
children: [/* @__PURE__ */ C("div", {
|
|
35151
35173
|
className: G("rounded-full overflow-hidden", i),
|
|
35152
|
-
children: /* @__PURE__ */ C(
|
|
35174
|
+
children: /* @__PURE__ */ C(uA, {
|
|
35153
35175
|
className: "w-full h-full",
|
|
35154
35176
|
onClick: n,
|
|
35155
35177
|
label: e?.charAt(0).toUpperCase(),
|
|
@@ -35171,7 +35193,7 @@ function dA({ label: e = "N", time: t, onClick: n = Yt, className: r = "", avata
|
|
|
35171
35193
|
}
|
|
35172
35194
|
//#endregion
|
|
35173
35195
|
//#region src/images/mediaUpload/MediaUploadPreview.tsx
|
|
35174
|
-
function
|
|
35196
|
+
function pA({ file: e, objectUrl: t, onRemove: n, className: r = "", imgClassName: i = "" }) {
|
|
35175
35197
|
return /* @__PURE__ */ w("div", {
|
|
35176
35198
|
className: G("relative flex-shrink-0", r),
|
|
35177
35199
|
children: [/* @__PURE__ */ C(Xo, {
|
|
@@ -35189,15 +35211,15 @@ function fA({ file: e, objectUrl: t, onRemove: n, className: r = "", imgClassNam
|
|
|
35189
35211
|
}
|
|
35190
35212
|
//#endregion
|
|
35191
35213
|
//#region src/images/useFileInput.tsx
|
|
35192
|
-
var
|
|
35214
|
+
var mA = "image/jpeg,image/png,image/webp,image/avif,image/bmp,image/svg+xml,image/tiff,image/heic,image/heif", hA = [
|
|
35193
35215
|
"video/",
|
|
35194
35216
|
"image/gif",
|
|
35195
35217
|
"image/apng"
|
|
35196
35218
|
];
|
|
35197
|
-
function
|
|
35198
|
-
return !
|
|
35219
|
+
function gA(e) {
|
|
35220
|
+
return !hA.some((t) => e.type === t || e.type.startsWith(t));
|
|
35199
35221
|
}
|
|
35200
|
-
function
|
|
35222
|
+
function _A({ onChange: e, accept: t = mA, multiple: n = !1 }) {
|
|
35201
35223
|
let r = b(null), i = b(e);
|
|
35202
35224
|
return i.current = e, {
|
|
35203
35225
|
inputElement: /* @__PURE__ */ C("input", {
|
|
@@ -35207,7 +35229,7 @@ function gA({ onChange: e, accept: t = pA, multiple: n = !1 }) {
|
|
|
35207
35229
|
multiple: n,
|
|
35208
35230
|
className: "hidden",
|
|
35209
35231
|
onChange: (e) => {
|
|
35210
|
-
let t = Array.from(e.target.files ?? []).filter(
|
|
35232
|
+
let t = Array.from(e.target.files ?? []).filter(gA);
|
|
35211
35233
|
e.target.value = "", t.length > 0 && i.current(t);
|
|
35212
35234
|
}
|
|
35213
35235
|
}),
|
|
@@ -35216,12 +35238,12 @@ function gA({ onChange: e, accept: t = pA, multiple: n = !1 }) {
|
|
|
35216
35238
|
}
|
|
35217
35239
|
//#endregion
|
|
35218
35240
|
//#region src/images/mediaUpload/MediaUpload.tsx
|
|
35219
|
-
function
|
|
35241
|
+
function vA({ onChange: e, multiple: t = !0, maxFiles: n = 9, className: r = "", accept: i = mA, loading: a = !1 }) {
|
|
35220
35242
|
let [o, s] = x([]), [c, l] = x("");
|
|
35221
35243
|
g(() => () => {
|
|
35222
35244
|
o.forEach((e) => URL.revokeObjectURL(e.objectUrl));
|
|
35223
35245
|
}, []);
|
|
35224
|
-
let { inputElement: u, trigger: d } =
|
|
35246
|
+
let { inputElement: u, trigger: d } = _A({
|
|
35225
35247
|
onChange: (e) => f(e),
|
|
35226
35248
|
accept: i,
|
|
35227
35249
|
multiple: t
|
|
@@ -35248,7 +35270,7 @@ function _A({ onChange: e, multiple: t = !0, maxFiles: n = 9, className: r = "",
|
|
|
35248
35270
|
children: [
|
|
35249
35271
|
/* @__PURE__ */ w(fo, {
|
|
35250
35272
|
className: "gap-2 items-end overflow-x-auto",
|
|
35251
|
-
children: [o.map((e, t) => /* @__PURE__ */ C(
|
|
35273
|
+
children: [o.map((e, t) => /* @__PURE__ */ C(pA, {
|
|
35252
35274
|
file: e.file,
|
|
35253
35275
|
objectUrl: e.objectUrl,
|
|
35254
35276
|
onRemove: () => p(t)
|
|
@@ -35269,7 +35291,7 @@ function _A({ onChange: e, multiple: t = !0, maxFiles: n = 9, className: r = "",
|
|
|
35269
35291
|
}
|
|
35270
35292
|
//#endregion
|
|
35271
35293
|
//#region src/images/imageGrid/ImageGridBase.tsx
|
|
35272
|
-
var
|
|
35294
|
+
var yA = 500, bA = {
|
|
35273
35295
|
background: "transparent",
|
|
35274
35296
|
border: "none",
|
|
35275
35297
|
boxShadow: "none",
|
|
@@ -35277,13 +35299,13 @@ var vA = 500, yA = {
|
|
|
35277
35299
|
width: "fit-content",
|
|
35278
35300
|
height: "fit-content"
|
|
35279
35301
|
};
|
|
35280
|
-
function
|
|
35302
|
+
function xA({ onSelect: e, selectedSrc: t, srcs: n, onDelete: r, className: i = "", isMobile: a = !1, extraCell: o }) {
|
|
35281
35303
|
let [s, c] = x(null), l = b(null), u = b(!1), d = () => {
|
|
35282
35304
|
l.current &&= (clearTimeout(l.current), null);
|
|
35283
35305
|
}, f = (e) => {
|
|
35284
35306
|
u.current = !1, d(), l.current = setTimeout(() => {
|
|
35285
35307
|
u.current = !0, c(e);
|
|
35286
|
-
},
|
|
35308
|
+
}, yA);
|
|
35287
35309
|
}, p = (t) => {
|
|
35288
35310
|
if (u.current) {
|
|
35289
35311
|
u.current = !1;
|
|
@@ -35293,13 +35315,13 @@ function bA({ onSelect: e, selectedSrc: t, srcs: n, onDelete: r, className: i =
|
|
|
35293
35315
|
}, m = {
|
|
35294
35316
|
overlay: { backgroundColor: "rgba(0, 0, 0, 0.75)" },
|
|
35295
35317
|
content: a ? {
|
|
35296
|
-
...
|
|
35318
|
+
...bA,
|
|
35297
35319
|
top: "0",
|
|
35298
35320
|
left: "0",
|
|
35299
35321
|
transform: "none",
|
|
35300
35322
|
width: "100vw"
|
|
35301
35323
|
} : {
|
|
35302
|
-
...
|
|
35324
|
+
...bA,
|
|
35303
35325
|
top: "50%",
|
|
35304
35326
|
left: "50%",
|
|
35305
35327
|
transform: "translate(-50%, -50%)"
|
|
@@ -35395,37 +35417,37 @@ function bA({ onSelect: e, selectedSrc: t, srcs: n, onDelete: r, className: i =
|
|
|
35395
35417
|
}
|
|
35396
35418
|
//#endregion
|
|
35397
35419
|
//#region src/images/imageGrid/ImageGrid.tsx
|
|
35398
|
-
function
|
|
35399
|
-
return /* @__PURE__ */ C(
|
|
35420
|
+
function SA(e) {
|
|
35421
|
+
return /* @__PURE__ */ C(xA, { ...e });
|
|
35400
35422
|
}
|
|
35401
35423
|
//#endregion
|
|
35402
35424
|
//#region src/images/imageGrid/ImageGridUpload.tsx
|
|
35403
|
-
var
|
|
35425
|
+
var CA = (e) => e.map((e) => ({
|
|
35404
35426
|
file: e,
|
|
35405
35427
|
objectUrl: URL.createObjectURL(e)
|
|
35406
|
-
})),
|
|
35407
|
-
function
|
|
35428
|
+
})), wA = (e) => e.forEach((e) => URL.revokeObjectURL(e.objectUrl));
|
|
35429
|
+
function TA({ onUpload: e, onChange: t, onDelete: n, isEditable: r = !1, maxImages: i = 9, uploadLabel: a = "Upload", loading: o = !1, isUploaded: s = !1, ...c }) {
|
|
35408
35430
|
let [l, u] = x([]), [d, f] = x(!1), [p, m] = x(""), h = b(l);
|
|
35409
|
-
h.current = l, g(() => () =>
|
|
35410
|
-
let _ = () => i - c.srcs.length - h.current.length, { inputElement: v, trigger: y } =
|
|
35431
|
+
h.current = l, g(() => () => wA(h.current), []);
|
|
35432
|
+
let _ = () => i - c.srcs.length - h.current.length, { inputElement: v, trigger: y } = _A({
|
|
35411
35433
|
onChange: (e) => {
|
|
35412
|
-
|
|
35434
|
+
wA(h.current);
|
|
35413
35435
|
let n = i - c.srcs.length, r = e.slice(0, n);
|
|
35414
|
-
m(e.length > n ? `You can only add ${i} images in total.` : ""), u(
|
|
35436
|
+
m(e.length > n ? `You can only add ${i} images in total.` : ""), u(CA(r)), t?.(r), f(!0);
|
|
35415
35437
|
},
|
|
35416
35438
|
multiple: !0
|
|
35417
|
-
}), { inputElement: T, trigger: E } =
|
|
35439
|
+
}), { inputElement: T, trigger: E } = _A({
|
|
35418
35440
|
onChange: (e) => {
|
|
35419
35441
|
let n = _(), r = e.slice(0, n);
|
|
35420
|
-
m(e.length > n ? `You can only add ${i} images in total.` : ""), u((e) => [...e, ...
|
|
35442
|
+
m(e.length > n ? `You can only add ${i} images in total.` : ""), u((e) => [...e, ...CA(r)]), t?.(r), f(!0);
|
|
35421
35443
|
},
|
|
35422
35444
|
multiple: !0
|
|
35423
35445
|
}), D = (e) => {
|
|
35424
35446
|
u((t) => (URL.revokeObjectURL(t[e].objectUrl), t.filter((t, n) => n !== e))), m("");
|
|
35425
35447
|
}, O = () => {
|
|
35426
|
-
e(l.map((e) => e.file)),
|
|
35448
|
+
e(l.map((e) => e.file)), wA(l), u([]), m("");
|
|
35427
35449
|
}, k = () => {
|
|
35428
|
-
|
|
35450
|
+
wA(l), u([]), f(!1), m("");
|
|
35429
35451
|
};
|
|
35430
35452
|
g(() => {
|
|
35431
35453
|
s && k();
|
|
@@ -35444,7 +35466,7 @@ function wA({ onUpload: e, onChange: t, onDelete: n, isEditable: r = !1, maxImag
|
|
|
35444
35466
|
return /* @__PURE__ */ w(S, { children: [
|
|
35445
35467
|
v,
|
|
35446
35468
|
T,
|
|
35447
|
-
/* @__PURE__ */ C(
|
|
35469
|
+
/* @__PURE__ */ C(xA, {
|
|
35448
35470
|
...c,
|
|
35449
35471
|
onDelete: r ? n : void 0,
|
|
35450
35472
|
extraCell: A
|
|
@@ -35460,7 +35482,7 @@ function wA({ onUpload: e, onChange: t, onDelete: n, isEditable: r = !1, maxImag
|
|
|
35460
35482
|
children: [
|
|
35461
35483
|
/* @__PURE__ */ C(fo, {
|
|
35462
35484
|
className: "overflow-x-auto gap-2",
|
|
35463
|
-
children: l.map((e, t) => /* @__PURE__ */ C(
|
|
35485
|
+
children: l.map((e, t) => /* @__PURE__ */ C(pA, {
|
|
35464
35486
|
file: e.file,
|
|
35465
35487
|
objectUrl: e.objectUrl,
|
|
35466
35488
|
onRemove: () => D(t),
|
|
@@ -35493,37 +35515,37 @@ function wA({ onUpload: e, onChange: t, onDelete: n, isEditable: r = !1, maxImag
|
|
|
35493
35515
|
}
|
|
35494
35516
|
//#endregion
|
|
35495
35517
|
//#region node_modules/tslib/tslib.es6.mjs
|
|
35496
|
-
var
|
|
35497
|
-
return
|
|
35518
|
+
var EA = function(e, t) {
|
|
35519
|
+
return EA = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(e, t) {
|
|
35498
35520
|
e.__proto__ = t;
|
|
35499
35521
|
} || function(e, t) {
|
|
35500
35522
|
for (var n in t) Object.prototype.hasOwnProperty.call(t, n) && (e[n] = t[n]);
|
|
35501
|
-
},
|
|
35523
|
+
}, EA(e, t);
|
|
35502
35524
|
};
|
|
35503
|
-
function
|
|
35525
|
+
function DA(e, t) {
|
|
35504
35526
|
if (typeof t != "function" && t !== null) throw TypeError("Class extends value " + String(t) + " is not a constructor or null");
|
|
35505
|
-
|
|
35527
|
+
EA(e, t);
|
|
35506
35528
|
function n() {
|
|
35507
35529
|
this.constructor = e;
|
|
35508
35530
|
}
|
|
35509
35531
|
e.prototype = t === null ? Object.create(t) : (n.prototype = t.prototype, new n());
|
|
35510
35532
|
}
|
|
35511
|
-
var
|
|
35512
|
-
return
|
|
35533
|
+
var OA = function() {
|
|
35534
|
+
return OA = Object.assign || function(e) {
|
|
35513
35535
|
for (var t, n = 1, r = arguments.length; n < r; n++) for (var i in t = arguments[n], t) Object.prototype.hasOwnProperty.call(t, i) && (e[i] = t[i]);
|
|
35514
35536
|
return e;
|
|
35515
|
-
},
|
|
35537
|
+
}, OA.apply(this, arguments);
|
|
35516
35538
|
};
|
|
35517
|
-
function
|
|
35518
|
-
return this instanceof
|
|
35539
|
+
function kA(e) {
|
|
35540
|
+
return this instanceof kA ? (this.v = e, this) : new kA(e);
|
|
35519
35541
|
}
|
|
35520
|
-
var
|
|
35521
|
-
return
|
|
35542
|
+
var AA = function(e) {
|
|
35543
|
+
return AA = Object.getOwnPropertyNames || function(e) {
|
|
35522
35544
|
var t = [];
|
|
35523
35545
|
for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && (t[t.length] = n);
|
|
35524
35546
|
return t;
|
|
35525
|
-
},
|
|
35526
|
-
},
|
|
35547
|
+
}, AA(e);
|
|
35548
|
+
}, jA = /* @__PURE__ */ t(((e, t) => {
|
|
35527
35549
|
var n = !1, r, i, a, o, s, c, l, u, d, f, p, m, h, g, _;
|
|
35528
35550
|
function v() {
|
|
35529
35551
|
if (!n) {
|
|
@@ -35594,7 +35616,7 @@ var kA = function(e) {
|
|
|
35594
35616
|
}
|
|
35595
35617
|
};
|
|
35596
35618
|
t.exports = y;
|
|
35597
|
-
})),
|
|
35619
|
+
})), MA = /* @__PURE__ */ t(((e, t) => {
|
|
35598
35620
|
var n = !!(typeof window < "u" && window.document && window.document.createElement);
|
|
35599
35621
|
t.exports = {
|
|
35600
35622
|
canUseDOM: n,
|
|
@@ -35603,8 +35625,8 @@ var kA = function(e) {
|
|
|
35603
35625
|
canUseViewport: n && !!window.screen,
|
|
35604
35626
|
isInWorker: !n
|
|
35605
35627
|
};
|
|
35606
|
-
})),
|
|
35607
|
-
var n =
|
|
35628
|
+
})), NA = /* @__PURE__ */ t(((e, t) => {
|
|
35629
|
+
var n = MA(), r;
|
|
35608
35630
|
n.canUseDOM && (r = document.implementation && document.implementation.hasFeature && document.implementation.hasFeature("", "") !== !0);
|
|
35609
35631
|
function i(e, t) {
|
|
35610
35632
|
if (!n.canUseDOM || t && !("addEventListener" in document)) return !1;
|
|
@@ -35616,8 +35638,8 @@ var kA = function(e) {
|
|
|
35616
35638
|
return !a && r && e === "wheel" && (a = document.implementation.hasFeature("Events.wheel", "3.0")), a;
|
|
35617
35639
|
}
|
|
35618
35640
|
t.exports = i;
|
|
35619
|
-
})),
|
|
35620
|
-
var n =
|
|
35641
|
+
})), PA = /* @__PURE__ */ t(((e, t) => {
|
|
35642
|
+
var n = jA(), r = NA(), i = 10, a = 40, o = 800;
|
|
35621
35643
|
function s(e) {
|
|
35622
35644
|
var t = 0, n = 0, r = 0, s = 0;
|
|
35623
35645
|
return "detail" in e && (n = e.detail), "wheelDelta" in e && (n = -e.wheelDelta / 120), "wheelDeltaY" in e && (n = -e.wheelDeltaY / 120), "wheelDeltaX" in e && (t = -e.wheelDeltaX / 120), "axis" in e && e.axis === e.HORIZONTAL_AXIS && (t = n, n = 0), r = t * i, s = n * i, "deltaY" in e && (s = e.deltaY), "deltaX" in e && (r = e.deltaX), (r || s) && e.deltaMode && (e.deltaMode == 1 ? (r *= a, s *= a) : (r *= o, s *= o)), r && !t && (t = r < 1 ? -1 : 1), s && !n && (n = s < 1 ? -1 : 1), {
|
|
@@ -35630,12 +35652,12 @@ var kA = function(e) {
|
|
|
35630
35652
|
s.getEventType = function() {
|
|
35631
35653
|
return n.firefox() ? "DOMMouseScroll" : r("wheel") ? "wheel" : "mousewheel";
|
|
35632
35654
|
}, t.exports = s;
|
|
35633
|
-
})),
|
|
35634
|
-
t.exports =
|
|
35655
|
+
})), FA = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
35656
|
+
t.exports = PA();
|
|
35635
35657
|
})))(), 1);
|
|
35636
|
-
function
|
|
35658
|
+
function IA(e, t, n, r, i, a) {
|
|
35637
35659
|
a === void 0 && (a = 0);
|
|
35638
|
-
var o =
|
|
35660
|
+
var o = XA(e, t, a), s = o.width, c = o.height, l = Math.min(s, n), u = Math.min(c, r);
|
|
35639
35661
|
return l > u * i ? {
|
|
35640
35662
|
width: u * i,
|
|
35641
35663
|
height: u
|
|
@@ -35644,30 +35666,30 @@ function FA(e, t, n, r, i, a) {
|
|
|
35644
35666
|
height: l / i
|
|
35645
35667
|
};
|
|
35646
35668
|
}
|
|
35647
|
-
function
|
|
35669
|
+
function LA(e) {
|
|
35648
35670
|
return e.width > e.height ? e.width / e.naturalWidth : e.height / e.naturalHeight;
|
|
35649
35671
|
}
|
|
35650
|
-
function
|
|
35672
|
+
function RA(e, t, n, r, i) {
|
|
35651
35673
|
i === void 0 && (i = 0);
|
|
35652
|
-
var a =
|
|
35674
|
+
var a = XA(t.width, t.height, i), o = a.width, s = a.height;
|
|
35653
35675
|
return {
|
|
35654
|
-
x:
|
|
35655
|
-
y:
|
|
35676
|
+
x: zA(e.x, o, n.width, r),
|
|
35677
|
+
y: zA(e.y, s, n.height, r)
|
|
35656
35678
|
};
|
|
35657
35679
|
}
|
|
35658
|
-
function
|
|
35680
|
+
function zA(e, t, n, r) {
|
|
35659
35681
|
var i = Math.abs(t * r / 2 - n / 2);
|
|
35660
|
-
return
|
|
35682
|
+
return ZA(e, -i, i);
|
|
35661
35683
|
}
|
|
35662
|
-
function
|
|
35684
|
+
function BA(e, t) {
|
|
35663
35685
|
return Math.sqrt((e.y - t.y) ** 2 + (e.x - t.x) ** 2);
|
|
35664
35686
|
}
|
|
35665
|
-
function
|
|
35687
|
+
function VA(e, t) {
|
|
35666
35688
|
return Math.atan2(t.y - e.y, t.x - e.x) * 180 / Math.PI;
|
|
35667
35689
|
}
|
|
35668
|
-
function
|
|
35690
|
+
function HA(e, t, n, r, i, a, o) {
|
|
35669
35691
|
a === void 0 && (a = 0), o === void 0 && (o = !0);
|
|
35670
|
-
var s = o ?
|
|
35692
|
+
var s = o ? UA : WA, c = XA(t.width, t.height, a), l = XA(t.naturalWidth, t.naturalHeight, a), u = {
|
|
35671
35693
|
x: s(100, ((c.width - n.width / i) / 2 - e.x / i) / c.width * 100),
|
|
35672
35694
|
y: s(100, ((c.height - n.height / i) / 2 - e.y / i) / c.height * 100),
|
|
35673
35695
|
width: s(100, n.width / c.width * 100 / i),
|
|
@@ -35681,20 +35703,20 @@ function VA(e, t, n, r, i, a, o) {
|
|
|
35681
35703
|
};
|
|
35682
35704
|
return {
|
|
35683
35705
|
croppedAreaPercentages: u,
|
|
35684
|
-
croppedAreaPixels:
|
|
35706
|
+
croppedAreaPixels: OA(OA({}, p), {
|
|
35685
35707
|
x: Math.round(s(l.width - p.width, u.x * l.width / 100)),
|
|
35686
35708
|
y: Math.round(s(l.height - p.height, u.y * l.height / 100))
|
|
35687
35709
|
})
|
|
35688
35710
|
};
|
|
35689
35711
|
}
|
|
35690
|
-
function
|
|
35712
|
+
function UA(e, t) {
|
|
35691
35713
|
return Math.min(e, Math.max(0, t));
|
|
35692
35714
|
}
|
|
35693
|
-
function
|
|
35715
|
+
function WA(e, t) {
|
|
35694
35716
|
return t;
|
|
35695
35717
|
}
|
|
35696
|
-
function
|
|
35697
|
-
var o =
|
|
35718
|
+
function GA(e, t, n, r, i, a) {
|
|
35719
|
+
var o = XA(t.width, t.height, n), s = ZA(r.width / o.width * (100 / e.width), i, a);
|
|
35698
35720
|
return {
|
|
35699
35721
|
crop: {
|
|
35700
35722
|
x: s * o.width / 2 - r.width / 2 - o.width * s * (e.x / 100),
|
|
@@ -35703,13 +35725,13 @@ function WA(e, t, n, r, i, a) {
|
|
|
35703
35725
|
zoom: s
|
|
35704
35726
|
};
|
|
35705
35727
|
}
|
|
35706
|
-
function
|
|
35707
|
-
var r =
|
|
35728
|
+
function KA(e, t, n) {
|
|
35729
|
+
var r = LA(t);
|
|
35708
35730
|
return n.height > n.width ? n.height / (e.height * r) : n.width / (e.width * r);
|
|
35709
35731
|
}
|
|
35710
|
-
function
|
|
35732
|
+
function qA(e, t, n, r, i, a) {
|
|
35711
35733
|
n === void 0 && (n = 0);
|
|
35712
|
-
var o =
|
|
35734
|
+
var o = XA(t.naturalWidth, t.naturalHeight, n), s = ZA(KA(e, t, r), i, a), c = r.height > r.width ? r.height / e.height : r.width / e.width;
|
|
35713
35735
|
return {
|
|
35714
35736
|
crop: {
|
|
35715
35737
|
x: ((o.width - e.width) / 2 - e.x) * c,
|
|
@@ -35718,32 +35740,32 @@ function KA(e, t, n, r, i, a) {
|
|
|
35718
35740
|
zoom: s
|
|
35719
35741
|
};
|
|
35720
35742
|
}
|
|
35721
|
-
function
|
|
35743
|
+
function JA(e, t) {
|
|
35722
35744
|
return {
|
|
35723
35745
|
x: (t.x + e.x) / 2,
|
|
35724
35746
|
y: (t.y + e.y) / 2
|
|
35725
35747
|
};
|
|
35726
35748
|
}
|
|
35727
|
-
function
|
|
35749
|
+
function YA(e) {
|
|
35728
35750
|
return e * Math.PI / 180;
|
|
35729
35751
|
}
|
|
35730
|
-
function
|
|
35731
|
-
var r =
|
|
35752
|
+
function XA(e, t, n) {
|
|
35753
|
+
var r = YA(n);
|
|
35732
35754
|
return {
|
|
35733
35755
|
width: Math.abs(Math.cos(r) * e) + Math.abs(Math.sin(r) * t),
|
|
35734
35756
|
height: Math.abs(Math.sin(r) * e) + Math.abs(Math.cos(r) * t)
|
|
35735
35757
|
};
|
|
35736
35758
|
}
|
|
35737
|
-
function
|
|
35759
|
+
function ZA(e, t, n) {
|
|
35738
35760
|
return Math.min(Math.max(e, t), n);
|
|
35739
35761
|
}
|
|
35740
|
-
function
|
|
35762
|
+
function QA() {
|
|
35741
35763
|
return [...arguments].filter(function(e) {
|
|
35742
35764
|
return typeof e == "string" && e.length > 0;
|
|
35743
35765
|
}).join(" ").trim();
|
|
35744
35766
|
}
|
|
35745
|
-
var
|
|
35746
|
-
|
|
35767
|
+
var $A = ".reactEasyCrop_Container {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n overflow: hidden;\n user-select: none;\n touch-action: none;\n cursor: move;\n display: flex;\n justify-content: center;\n align-items: center;\n}\n\n.reactEasyCrop_Image,\n.reactEasyCrop_Video {\n will-change: transform; /* this improves performances and prevent painting issues on iOS Chrome */\n}\n\n.reactEasyCrop_Contain {\n max-width: 100%;\n max-height: 100%;\n margin: auto;\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n}\n.reactEasyCrop_Cover_Horizontal {\n width: 100%;\n height: auto;\n}\n.reactEasyCrop_Cover_Vertical {\n width: auto;\n height: 100%;\n}\n\n.reactEasyCrop_CropArea {\n position: absolute;\n left: 50%;\n top: 50%;\n transform: translate(-50%, -50%);\n border: 1px solid rgba(255, 255, 255, 0.5);\n box-sizing: border-box;\n box-shadow: 0 0 0 9999em;\n color: rgba(0, 0, 0, 0.5);\n overflow: hidden;\n}\n\n.reactEasyCrop_CropAreaRound {\n border-radius: 50%;\n}\n\n.reactEasyCrop_CropAreaGrid::before {\n content: ' ';\n box-sizing: border-box;\n position: absolute;\n border: 1px solid rgba(255, 255, 255, 0.5);\n top: 0;\n bottom: 0;\n left: 33.33%;\n right: 33.33%;\n border-top: 0;\n border-bottom: 0;\n}\n\n.reactEasyCrop_CropAreaGrid::after {\n content: ' ';\n box-sizing: border-box;\n position: absolute;\n border: 1px solid rgba(255, 255, 255, 0.5);\n top: 33.33%;\n bottom: 33.33%;\n left: 0;\n right: 0;\n border-left: 0;\n border-right: 0;\n}\n", ej = 1, tj = 3, nj = 1, rj = function(e) {
|
|
35768
|
+
DA(t, e);
|
|
35747
35769
|
function t() {
|
|
35748
35770
|
var r = e !== null && e.apply(this, arguments) || this;
|
|
35749
35771
|
return r.cropperRef = n.createRef(), r.imageRef = n.createRef(), r.videoRef = n.createRef(), r.containerPosition = {
|
|
@@ -35786,10 +35808,10 @@ var QA = ".reactEasyCrop_Container {\n position: absolute;\n top: 0;\n left:
|
|
|
35786
35808
|
e && (r.previousCropSize = e, r.emitCropData(), r.setInitialCrop(e), r.isInitialized = !0), r.props.onMediaLoaded && r.props.onMediaLoaded(r.mediaSize);
|
|
35787
35809
|
}, r.setInitialCrop = function(e) {
|
|
35788
35810
|
if (r.props.initialCroppedAreaPercentages) {
|
|
35789
|
-
var t =
|
|
35811
|
+
var t = GA(r.props.initialCroppedAreaPercentages, r.mediaSize, r.props.rotation, e, r.props.minZoom, r.props.maxZoom), n = t.crop, i = t.zoom;
|
|
35790
35812
|
r.props.onCropChange(n), r.props.onZoomChange && r.props.onZoomChange(i);
|
|
35791
35813
|
} else if (r.props.initialCroppedAreaPixels) {
|
|
35792
|
-
var a =
|
|
35814
|
+
var a = qA(r.props.initialCroppedAreaPixels, r.mediaSize, r.props.rotation, e, r.props.minZoom, r.props.maxZoom), n = a.crop, i = a.zoom;
|
|
35793
35815
|
r.props.onCropChange(n), r.props.onZoomChange && r.props.onZoomChange(i);
|
|
35794
35816
|
}
|
|
35795
35817
|
}, r.computeSizes = function() {
|
|
@@ -35825,11 +35847,11 @@ var QA = ".reactEasyCrop_Container {\n position: absolute;\n top: 0;\n left:
|
|
|
35825
35847
|
width: e.offsetWidth,
|
|
35826
35848
|
height: e.offsetHeight
|
|
35827
35849
|
};
|
|
35828
|
-
r.mediaSize =
|
|
35850
|
+
r.mediaSize = OA(OA({}, s), {
|
|
35829
35851
|
naturalWidth: n,
|
|
35830
35852
|
naturalHeight: i
|
|
35831
35853
|
}), r.props.setMediaSize && r.props.setMediaSize(r.mediaSize);
|
|
35832
|
-
var c = r.props.cropSize ? r.props.cropSize :
|
|
35854
|
+
var c = r.props.cropSize ? r.props.cropSize : IA(r.mediaSize.width, r.mediaSize.height, r.containerRect.width, r.containerRect.height, r.props.aspect, r.props.rotation);
|
|
35833
35855
|
return (r.state.cropSize?.height !== c.height || r.state.cropSize?.width !== c.width) && r.props.onCropSizeChange && r.props.onCropSizeChange(c), r.setState({ cropSize: c }, r.recomputeCropPosition), r.props.setCropSize && r.props.setCropSize(c), c;
|
|
35834
35856
|
}
|
|
35835
35857
|
}, r.saveContainerPosition = function() {
|
|
@@ -35867,7 +35889,7 @@ var QA = ".reactEasyCrop_Container {\n position: absolute;\n top: 0;\n left:
|
|
|
35867
35889
|
r.dragStartPosition = {
|
|
35868
35890
|
x: e.x,
|
|
35869
35891
|
y: e.y
|
|
35870
|
-
}, r.dragStartCrop =
|
|
35892
|
+
}, r.dragStartCrop = OA({}, r.props.crop), (t = r.props).onInteractionStart?.call(t);
|
|
35871
35893
|
}, r.onDrag = function(e) {
|
|
35872
35894
|
var t = e.x, n = e.y;
|
|
35873
35895
|
r.currentWindow && (r.rafDragTimeout && r.currentWindow.cancelAnimationFrame(r.rafDragTimeout), r.rafDragTimeout = r.currentWindow.requestAnimationFrame(function() {
|
|
@@ -35875,7 +35897,7 @@ var QA = ".reactEasyCrop_Container {\n position: absolute;\n top: 0;\n left:
|
|
|
35875
35897
|
var e = t - r.dragStartPosition.x, i = n - r.dragStartPosition.y, a = {
|
|
35876
35898
|
x: r.dragStartCrop.x + e,
|
|
35877
35899
|
y: r.dragStartCrop.y + i
|
|
35878
|
-
}, o = r.props.restrictPosition ?
|
|
35900
|
+
}, o = r.props.restrictPosition ? RA(a, r.mediaSize, r.state.cropSize, r.props.zoom, r.props.rotation) : a;
|
|
35879
35901
|
r.props.onCropChange(o);
|
|
35880
35902
|
}
|
|
35881
35903
|
}));
|
|
@@ -35885,7 +35907,7 @@ var QA = ".reactEasyCrop_Container {\n position: absolute;\n top: 0;\n left:
|
|
|
35885
35907
|
}, r.onWheel = function(e) {
|
|
35886
35908
|
if (r.currentWindow && !(r.props.onWheelRequest && !r.props.onWheelRequest(e))) {
|
|
35887
35909
|
e.preventDefault();
|
|
35888
|
-
var n = t.getMousePoint(e), i = (0,
|
|
35910
|
+
var n = t.getMousePoint(e), i = (0, FA.default)(e).pixelY, a = r.props.zoom - i * r.props.zoomSpeed / 200;
|
|
35889
35911
|
r.setNewZoom(a, n, { shouldUpdatePosition: !0 }), r.state.hasWheelJustStarted || r.setState({ hasWheelJustStarted: !0 }, function() {
|
|
35890
35912
|
var e;
|
|
35891
35913
|
return (e = r.props).onInteractionStart?.call(e);
|
|
@@ -35912,18 +35934,18 @@ var QA = ".reactEasyCrop_Container {\n position: absolute;\n top: 0;\n left:
|
|
|
35912
35934
|
}, r.setNewZoom = function(e, t, n) {
|
|
35913
35935
|
var i = (n === void 0 ? {} : n).shouldUpdatePosition, a = i === void 0 || i;
|
|
35914
35936
|
if (!(!r.state.cropSize || !r.props.onZoomChange)) {
|
|
35915
|
-
var o =
|
|
35937
|
+
var o = ZA(e, r.props.minZoom, r.props.maxZoom);
|
|
35916
35938
|
if (a) {
|
|
35917
35939
|
var s = r.getPointOnContainer(t, r.containerPosition), c = r.getPointOnMedia(s), l = {
|
|
35918
35940
|
x: c.x * o - s.x,
|
|
35919
35941
|
y: c.y * o - s.y
|
|
35920
|
-
}, u = r.props.restrictPosition ?
|
|
35942
|
+
}, u = r.props.restrictPosition ? RA(l, r.mediaSize, r.state.cropSize, o, r.props.rotation) : l;
|
|
35921
35943
|
r.props.onCropChange(u);
|
|
35922
35944
|
}
|
|
35923
35945
|
r.props.onZoomChange(o);
|
|
35924
35946
|
}
|
|
35925
35947
|
}, r.getCropData = function() {
|
|
35926
|
-
return r.state.cropSize ?
|
|
35948
|
+
return r.state.cropSize ? HA(r.props.restrictPosition ? RA(r.props.crop, r.mediaSize, r.state.cropSize, r.props.zoom, r.props.rotation) : r.props.crop, r.mediaSize, r.state.cropSize, r.getAspect(), r.props.zoom, r.props.rotation, r.props.restrictPosition) : null;
|
|
35927
35949
|
}, r.emitCropData = function() {
|
|
35928
35950
|
var e = r.getCropData();
|
|
35929
35951
|
if (e) {
|
|
@@ -35946,14 +35968,14 @@ var QA = ".reactEasyCrop_Container {\n position: absolute;\n top: 0;\n left:
|
|
|
35946
35968
|
y: r.props.crop.y * n
|
|
35947
35969
|
};
|
|
35948
35970
|
}
|
|
35949
|
-
var i = r.props.restrictPosition ?
|
|
35971
|
+
var i = r.props.restrictPosition ? RA(e, r.mediaSize, r.state.cropSize, r.props.zoom, r.props.rotation) : e;
|
|
35950
35972
|
r.previousCropSize = r.state.cropSize, r.props.onCropChange(i), r.emitCropData();
|
|
35951
35973
|
}
|
|
35952
35974
|
}, r.onKeyDown = function(e) {
|
|
35953
35975
|
var t, n = r.props, i = n.crop, a = n.onCropChange, o = n.keyboardStep, s = n.zoom, c = n.rotation, l = o;
|
|
35954
35976
|
if (r.state.cropSize) {
|
|
35955
35977
|
e.shiftKey && (l *= .2);
|
|
35956
|
-
var u =
|
|
35978
|
+
var u = OA({}, i);
|
|
35957
35979
|
switch (e.key) {
|
|
35958
35980
|
case "ArrowUp":
|
|
35959
35981
|
u.y -= l, e.preventDefault();
|
|
@@ -35969,7 +35991,7 @@ var QA = ".reactEasyCrop_Container {\n position: absolute;\n top: 0;\n left:
|
|
|
35969
35991
|
break;
|
|
35970
35992
|
default: return;
|
|
35971
35993
|
}
|
|
35972
|
-
r.props.restrictPosition && (u =
|
|
35994
|
+
r.props.restrictPosition && (u = RA(u, r.mediaSize, r.state.cropSize, s, c)), e.repeat || (t = r.props).onInteractionStart?.call(t), a(u);
|
|
35973
35995
|
}
|
|
35974
35996
|
}, r.onKeyUp = function(e) {
|
|
35975
35997
|
var t;
|
|
@@ -35986,7 +36008,7 @@ var QA = ".reactEasyCrop_Container {\n position: absolute;\n top: 0;\n left:
|
|
|
35986
36008
|
}, r;
|
|
35987
36009
|
}
|
|
35988
36010
|
return t.prototype.componentDidMount = function() {
|
|
35989
|
-
!this.currentDoc || !this.currentWindow || (this.containerRef && (this.containerRef.ownerDocument && (this.currentDoc = this.containerRef.ownerDocument), this.currentDoc.defaultView && (this.currentWindow = this.currentDoc.defaultView), this.initResizeObserver(), window.ResizeObserver === void 0 && this.currentWindow.addEventListener("resize", this.computeSizes), this.props.zoomWithScroll && this.containerRef.addEventListener("wheel", this.onWheel, { passive: !1 }), this.containerRef.addEventListener("gesturestart", this.onGestureStart)), this.currentDoc.addEventListener("scroll", this.onScroll), this.props.disableAutomaticStylesInjection || (this.styleRef = this.currentDoc.createElement("style"), this.styleRef.setAttribute("type", "text/css"), this.props.nonce && this.styleRef.setAttribute("nonce", this.props.nonce), this.styleRef.innerHTML =
|
|
36011
|
+
!this.currentDoc || !this.currentWindow || (this.containerRef && (this.containerRef.ownerDocument && (this.currentDoc = this.containerRef.ownerDocument), this.currentDoc.defaultView && (this.currentWindow = this.currentDoc.defaultView), this.initResizeObserver(), window.ResizeObserver === void 0 && this.currentWindow.addEventListener("resize", this.computeSizes), this.props.zoomWithScroll && this.containerRef.addEventListener("wheel", this.onWheel, { passive: !1 }), this.containerRef.addEventListener("gesturestart", this.onGestureStart)), this.currentDoc.addEventListener("scroll", this.onScroll), this.props.disableAutomaticStylesInjection || (this.styleRef = this.currentDoc.createElement("style"), this.styleRef.setAttribute("type", "text/css"), this.props.nonce && this.styleRef.setAttribute("nonce", this.props.nonce), this.styleRef.innerHTML = $A, this.currentDoc.head.appendChild(this.styleRef)), this.imageRef.current && this.imageRef.current.complete && this.onMediaLoad(), this.props.setImageRef && this.props.setImageRef(this.imageRef), this.props.setVideoRef && this.props.setVideoRef(this.videoRef), this.props.setCropperRef && this.props.setCropperRef(this.cropperRef));
|
|
35990
36012
|
}, t.prototype.componentWillUnmount = function() {
|
|
35991
36013
|
!this.currentDoc || !this.currentWindow || (window.ResizeObserver === void 0 && this.currentWindow.removeEventListener("resize", this.computeSizes), this.resizeObserver?.disconnect(), this.containerRef && this.containerRef.removeEventListener("gesturestart", this.preventZoomSafari), this.styleRef && this.styleRef.parentNode?.removeChild(this.styleRef), this.cleanEvents(), this.props.zoomWithScroll && this.clearScrollEvent());
|
|
35992
36014
|
}, t.prototype.componentDidUpdate = function(e) {
|
|
@@ -36008,15 +36030,15 @@ var QA = ".reactEasyCrop_Container {\n position: absolute;\n top: 0;\n left:
|
|
|
36008
36030
|
return this.props.objectFit;
|
|
36009
36031
|
}, t.prototype.onPinchStart = function(e) {
|
|
36010
36032
|
var n = t.getTouchPoint(e.touches[0]), r = t.getTouchPoint(e.touches[1]);
|
|
36011
|
-
this.lastPinchDistance =
|
|
36033
|
+
this.lastPinchDistance = BA(n, r), this.lastPinchRotation = VA(n, r), this.onDragStart(JA(n, r));
|
|
36012
36034
|
}, t.prototype.onPinchMove = function(e) {
|
|
36013
36035
|
var n = this;
|
|
36014
36036
|
if (!(!this.currentDoc || !this.currentWindow)) {
|
|
36015
|
-
var r = t.getTouchPoint(e.touches[0]), i = t.getTouchPoint(e.touches[1]), a =
|
|
36037
|
+
var r = t.getTouchPoint(e.touches[0]), i = t.getTouchPoint(e.touches[1]), a = JA(r, i);
|
|
36016
36038
|
this.onDrag(a), this.rafPinchTimeout && this.currentWindow.cancelAnimationFrame(this.rafPinchTimeout), this.rafPinchTimeout = this.currentWindow.requestAnimationFrame(function() {
|
|
36017
|
-
var e =
|
|
36039
|
+
var e = BA(r, i), t = n.props.zoom * (e / n.lastPinchDistance);
|
|
36018
36040
|
n.setNewZoom(t, a, { shouldUpdatePosition: !1 }), n.lastPinchDistance = e;
|
|
36019
|
-
var o =
|
|
36041
|
+
var o = VA(r, i), s = n.props.rotation + (o - n.lastPinchRotation);
|
|
36020
36042
|
n.props.onRotationChange && n.props.onRotationChange(s), n.lastPinchRotation = o;
|
|
36021
36043
|
});
|
|
36022
36044
|
}
|
|
@@ -36030,31 +36052,31 @@ var QA = ".reactEasyCrop_Container {\n position: absolute;\n top: 0;\n left:
|
|
|
36030
36052
|
},
|
|
36031
36053
|
"data-testid": "container",
|
|
36032
36054
|
style: _,
|
|
36033
|
-
className:
|
|
36034
|
-
}, r ? n.createElement("img",
|
|
36055
|
+
className: QA("reactEasyCrop_Container", x)
|
|
36056
|
+
}, r ? n.createElement("img", OA({
|
|
36035
36057
|
alt: "",
|
|
36036
|
-
className:
|
|
36058
|
+
className: QA("reactEasyCrop_Image", w === "contain" && "reactEasyCrop_Contain", w === "horizontal-cover" && "reactEasyCrop_Cover_Horizontal", w === "vertical-cover" && "reactEasyCrop_Cover_Vertical", C)
|
|
36037
36059
|
}, a, {
|
|
36038
36060
|
src: r,
|
|
36039
36061
|
ref: this.imageRef,
|
|
36040
|
-
style:
|
|
36062
|
+
style: OA(OA({}, y), { transform: s || `translate(${l}px, ${u}px) rotate(${d}deg) scale(${f})` }),
|
|
36041
36063
|
onLoad: this.onMediaLoad
|
|
36042
|
-
})) : i && n.createElement("video",
|
|
36064
|
+
})) : i && n.createElement("video", OA({
|
|
36043
36065
|
autoPlay: !0,
|
|
36044
36066
|
playsInline: !0,
|
|
36045
36067
|
loop: !0,
|
|
36046
36068
|
muted: !0,
|
|
36047
|
-
className:
|
|
36069
|
+
className: QA("reactEasyCrop_Video", w === "contain" && "reactEasyCrop_Contain", w === "horizontal-cover" && "reactEasyCrop_Cover_Horizontal", w === "vertical-cover" && "reactEasyCrop_Cover_Vertical", C)
|
|
36048
36070
|
}, a, {
|
|
36049
36071
|
ref: this.videoRef,
|
|
36050
36072
|
onLoadedMetadata: this.onMediaLoad,
|
|
36051
|
-
style:
|
|
36073
|
+
style: OA(OA({}, y), { transform: s || `translate(${l}px, ${u}px) rotate(${d}deg) scale(${f})` }),
|
|
36052
36074
|
controls: !1
|
|
36053
36075
|
}), (Array.isArray(i) ? i : [{ src: i }]).map(function(e) {
|
|
36054
|
-
return n.createElement("source",
|
|
36055
|
-
})), this.state.cropSize && n.createElement("div",
|
|
36076
|
+
return n.createElement("source", OA({ key: e.src }, e));
|
|
36077
|
+
})), this.state.cropSize && n.createElement("div", OA({
|
|
36056
36078
|
ref: this.cropperRef,
|
|
36057
|
-
style:
|
|
36079
|
+
style: OA(OA({}, v), {
|
|
36058
36080
|
width: h ? Math.round(this.state.cropSize.width) : this.state.cropSize.width,
|
|
36059
36081
|
height: h ? Math.round(this.state.cropSize.height) : this.state.cropSize.height
|
|
36060
36082
|
}),
|
|
@@ -36062,14 +36084,14 @@ var QA = ".reactEasyCrop_Container {\n position: absolute;\n top: 0;\n left:
|
|
|
36062
36084
|
onKeyDown: this.onKeyDown,
|
|
36063
36085
|
onKeyUp: this.onKeyUp,
|
|
36064
36086
|
"data-testid": "cropper",
|
|
36065
|
-
className:
|
|
36087
|
+
className: QA("reactEasyCrop_CropArea", p === "round" && "reactEasyCrop_CropAreaRound", m && "reactEasyCrop_CropAreaGrid", S)
|
|
36066
36088
|
}, o)));
|
|
36067
36089
|
}, t.defaultProps = {
|
|
36068
36090
|
zoom: 1,
|
|
36069
36091
|
rotation: 0,
|
|
36070
36092
|
aspect: 4 / 3,
|
|
36071
|
-
maxZoom:
|
|
36072
|
-
minZoom:
|
|
36093
|
+
maxZoom: tj,
|
|
36094
|
+
minZoom: ej,
|
|
36073
36095
|
cropShape: "rect",
|
|
36074
36096
|
objectFit: "contain",
|
|
36075
36097
|
showGrid: !0,
|
|
@@ -36080,7 +36102,7 @@ var QA = ".reactEasyCrop_Container {\n position: absolute;\n top: 0;\n left:
|
|
|
36080
36102
|
zoomSpeed: 1,
|
|
36081
36103
|
restrictPosition: !0,
|
|
36082
36104
|
zoomWithScroll: !0,
|
|
36083
|
-
keyboardStep:
|
|
36105
|
+
keyboardStep: nj
|
|
36084
36106
|
}, t.getMousePoint = function(e) {
|
|
36085
36107
|
return {
|
|
36086
36108
|
x: Number(e.clientX),
|
|
@@ -36095,7 +36117,7 @@ var QA = ".reactEasyCrop_Container {\n position: absolute;\n top: 0;\n left:
|
|
|
36095
36117
|
}(n.Component);
|
|
36096
36118
|
//#endregion
|
|
36097
36119
|
//#region src/images/imageCropper/ImageCropper.tsx
|
|
36098
|
-
function
|
|
36120
|
+
function ij({ imageUrl: e, fallbackImageUrl: t, onSubmit: n, onSelect: r, error: i, isLoading: a, isCompleted: o, className: s = "" }) {
|
|
36099
36121
|
let c = y(() => e && `${e}${e.includes("?") ? "&" : "?"}t=${Date.now()}`, [e]), [l, u] = x(!1), [d, f] = x(c), [p, h] = x({
|
|
36100
36122
|
x: 0,
|
|
36101
36123
|
y: 0
|
|
@@ -36103,7 +36125,7 @@ function rj({ imageUrl: e, fallbackImageUrl: t, onSubmit: n, onSelect: r, error:
|
|
|
36103
36125
|
g(() => {
|
|
36104
36126
|
o && u(!1);
|
|
36105
36127
|
}, [o]);
|
|
36106
|
-
let { inputElement: E, trigger: D } =
|
|
36128
|
+
let { inputElement: E, trigger: D } = _A({ onChange: async (e) => {
|
|
36107
36129
|
let t = e[0];
|
|
36108
36130
|
if (!t) return;
|
|
36109
36131
|
let n = await r(t);
|
|
@@ -36153,7 +36175,7 @@ function rj({ imageUrl: e, fallbackImageUrl: t, onSubmit: n, onSelect: r, error:
|
|
|
36153
36175
|
children: [
|
|
36154
36176
|
d ? /* @__PURE__ */ C("div", {
|
|
36155
36177
|
className: "relative w-full h-64",
|
|
36156
|
-
children: /* @__PURE__ */ C(
|
|
36178
|
+
children: /* @__PURE__ */ C(rj, {
|
|
36157
36179
|
image: d,
|
|
36158
36180
|
crop: p,
|
|
36159
36181
|
zoom: _,
|
|
@@ -36199,4 +36221,4 @@ function rj({ imageUrl: e, fallbackImageUrl: t, onSubmit: n, onSelect: r, error:
|
|
|
36199
36221
|
})] });
|
|
36200
36222
|
}
|
|
36201
36223
|
//#endregion
|
|
36202
|
-
export { qa as A, Ka as ATarget, Go as AddButton, as as AlertWrapper,
|
|
36224
|
+
export { qa as A, Ka as ATarget, Go as AddButton, as as AlertWrapper, jk as ArenaTag, hs as Autocomplete, uA as Avatar, dA as AvatarTag, fA as AvatarTimeTag, Ok as BlockTag, dk as BuddyTag, So as Button, Po as CacheButton, pk as CalendarTag, cA as Carousel, us as ChatAlert, ys as CheckboxGroup, Uk as CityTag, eo as ClickableDiv, $o as CloseIcon, Ik as CoachTag, Mk as CollectionTag, lo as Column, gs as CommentEditor, yk as CommentTag, Yk as CommentsSection, uo as Container, ph as Coordinates, hh as CoordinatesUpdater, gk as CopyTag, yh as Copyright, Vk as CreatePostTag, mk as CreateTag, Zm as DashedLine, XE as DateDisplay, cE as DatePicker, YE as DateRange, JE as DateTimePicker, rs as Deletable, qm as DeletableSocialMediaLink, lh as DeletableSocialMediaLinks, qo as DeleteAccountButton, _s as DuelVersus, Qo as EditIcon, ns as EditableBlock, io as EmailInput, ah as ErrorBoundary, rh as ErrorMessage, Nk as EventTag, vh as ExpandableContainer, uk as ExploreTag, Yo as Form, Lk as GameTag, bk as GoBackTag, xk as GoForwardTag, Ja as Heading, ck as HomeTag, ij as ImageCropper, SA as ImageGrid, TA as ImageGridUpload, zk as ImageTag, Xo as Img, sh as LazyErrorBoundary, Rk as LeaderboardTag, Kk as LikeSection, Qa as List, _o as LoadingIcon, vo as LoadingIndicator, Gk as LocationPointTag, vk as LogoutTag, hk as MapTag, Pk as MarketTag, vA as MediaUpload, ak as MenuTooltip, ds as MessageAlert, Sk as MessageTag, Ym as MiddleDot, Vo as Modal, Wo as ModalButton, Uo as ModalItem, lE as MonthPicker, gh as MyGeolocationUpdater, ms as NavArrows, sk as Navbar, UD as NavigationControlPosition, lk as NearbyTag, fk as NewsfeedTag, oh as NotFound, ls as NotificationAlert, Xm as OrDivider, Vm as OrderLabels, Um as OrderPicker, HD as OsmMap, Ya as P, so as PasswordInput, ho as PasswordSetup, Bm as Picker, Bk as PollTag, Hk as PostTag, _k as PrivateTag, xs as RadioGroup, Ho as RedStar, ts as RedirectionArrowIcon, Xk as RepliesSection, Tk as ReportTag, co as Row, qs as SOCIAL_MEDIA_TYPES, Ko as SaveCancelButtons, is as SearchBar, es as SendIcon, kk as SettingsTag, sA as ShowMore, Zo as SmartImage, fh as SocialMediaEditor, Xs as SocialMediaIcon, Km as SocialMediaLink, dh as SocialMediaLinks, Gm as SocialMediaPicker, Zs as SocialMediaTag, Za as Span, po as StaticColumn, fo as StaticRow, Wk as StreetTag, Lo as StyledButton, Zk as SuccessMessage, To as SvgButton, K as SvgSize, cs as SvgTag, ik as SvgTooltip, fs as Tabs, aA as Tag, oA as Tags, Ak as TeamTag, Qm as Text, ro as TextInput, Ws as TextUpdater, Xa as Textarea, Us as TextareaAutosize, Ks as TimeAgo, FC as TimePicker, $k as Toaster, Mo as ToggleButton, rk as Tooltip, Fk as UserTag, Jm as VerticalLine, Js as getSocialMediaLabel };
|