@moontra/moonui-pro 3.4.25 → 3.4.27
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/cdn/index.global.js +128 -128
- package/dist/cdn/index.global.js.map +1 -1
- package/dist/index.mjs +450 -526
- package/package.json +3 -2
package/dist/index.mjs
CHANGED
|
@@ -37,6 +37,7 @@ import { useForm } from 'react-hook-form';
|
|
|
37
37
|
import confetti2 from 'canvas-confetti';
|
|
38
38
|
import { useReactTable, getCoreRowModel, getPaginationRowModel, getSortedRowModel, getFilteredRowModel, flexRender } from '@tanstack/react-table';
|
|
39
39
|
import NProgress from 'nprogress';
|
|
40
|
+
import { useTheme } from 'next-themes';
|
|
40
41
|
|
|
41
42
|
/**
|
|
42
43
|
* @moontra/moonui-pro v2.0.9
|
|
@@ -212,7 +213,7 @@ var require_core = __commonJS({
|
|
|
212
213
|
const pieces = name.split(".");
|
|
213
214
|
return [
|
|
214
215
|
`${prefix}${pieces.shift()}`,
|
|
215
|
-
...pieces.map((
|
|
216
|
+
...pieces.map((x, i) => `${x}${"_".repeat(i + 1)}`)
|
|
216
217
|
].join(" ");
|
|
217
218
|
}
|
|
218
219
|
return `${prefix}${name}`;
|
|
@@ -410,7 +411,7 @@ var require_core = __commonJS({
|
|
|
410
411
|
return concat2("(?:", re, ")?");
|
|
411
412
|
}
|
|
412
413
|
function concat2(...args) {
|
|
413
|
-
const joined = args.map((
|
|
414
|
+
const joined = args.map((x) => source2(x)).join("");
|
|
414
415
|
return joined;
|
|
415
416
|
}
|
|
416
417
|
function stripOptionsFromArgs2(args) {
|
|
@@ -424,7 +425,7 @@ var require_core = __commonJS({
|
|
|
424
425
|
}
|
|
425
426
|
function either2(...args) {
|
|
426
427
|
const opts = stripOptionsFromArgs2(args);
|
|
427
|
-
const joined = "(" + (opts.capture ? "" : "?:") + args.map((
|
|
428
|
+
const joined = "(" + (opts.capture ? "" : "?:") + args.map((x) => source2(x)).join("|") + ")";
|
|
428
429
|
return joined;
|
|
429
430
|
}
|
|
430
431
|
function countMatchGroups(re) {
|
|
@@ -765,7 +766,7 @@ var require_core = __commonJS({
|
|
|
765
766
|
return compiledKeywords;
|
|
766
767
|
function compileList(scopeName2, keywordList) {
|
|
767
768
|
if (caseInsensitive) {
|
|
768
|
-
keywordList = keywordList.map((
|
|
769
|
+
keywordList = keywordList.map((x) => x.toLowerCase());
|
|
769
770
|
}
|
|
770
771
|
keywordList.forEach(function(keyword) {
|
|
771
772
|
const pair = keyword.split("|");
|
|
@@ -4669,7 +4670,7 @@ function Calendar({
|
|
|
4669
4670
|
)) }),
|
|
4670
4671
|
/* @__PURE__ */ jsx("div", { className: cn(
|
|
4671
4672
|
numberOfMonths > 1 && "flex flex-col sm:flex-row gap-2 sm:gap-4"
|
|
4672
|
-
), children: Array.from({ length: numberOfMonths }).map((
|
|
4673
|
+
), children: Array.from({ length: numberOfMonths }).map((_, i) => /* @__PURE__ */ jsx("div", { className: "flex-1", children: renderCalendar(i) }, i)) })
|
|
4673
4674
|
] });
|
|
4674
4675
|
}
|
|
4675
4676
|
Calendar.displayName = "Calendar";
|
|
@@ -4868,9 +4869,9 @@ var MoonUICardPro = React71.forwardRef(
|
|
|
4868
4869
|
const rect = e.currentTarget.getBoundingClientRect();
|
|
4869
4870
|
const centerX = rect.left + rect.width / 2;
|
|
4870
4871
|
const centerY = rect.top + rect.height / 2;
|
|
4871
|
-
const
|
|
4872
|
+
const x = (e.clientX - centerX) / (rect.width / 2);
|
|
4872
4873
|
const y = (e.clientY - centerY) / (rect.height / 2);
|
|
4873
|
-
setMousePos({ x
|
|
4874
|
+
setMousePos({ x, y });
|
|
4874
4875
|
};
|
|
4875
4876
|
const handleMouseEnter = () => setIsHovered(true);
|
|
4876
4877
|
const handleMouseLeave2 = () => {
|
|
@@ -9993,7 +9994,7 @@ var reducer = (state, action) => {
|
|
|
9993
9994
|
return {
|
|
9994
9995
|
...state,
|
|
9995
9996
|
toasts: state.toasts.map(
|
|
9996
|
-
(
|
|
9997
|
+
(t) => t.id === action.toast.id ? { ...t, ...action.toast } : t
|
|
9997
9998
|
)
|
|
9998
9999
|
};
|
|
9999
10000
|
case "DISMISS_TOAST": {
|
|
@@ -10008,10 +10009,10 @@ var reducer = (state, action) => {
|
|
|
10008
10009
|
return {
|
|
10009
10010
|
...state,
|
|
10010
10011
|
toasts: state.toasts.map(
|
|
10011
|
-
(
|
|
10012
|
-
...
|
|
10012
|
+
(t) => t.id === toastId || toastId === void 0 ? {
|
|
10013
|
+
...t,
|
|
10013
10014
|
open: false
|
|
10014
|
-
} :
|
|
10015
|
+
} : t
|
|
10015
10016
|
)
|
|
10016
10017
|
};
|
|
10017
10018
|
}
|
|
@@ -10024,7 +10025,7 @@ var reducer = (state, action) => {
|
|
|
10024
10025
|
}
|
|
10025
10026
|
return {
|
|
10026
10027
|
...state,
|
|
10027
|
-
toasts: state.toasts.filter((
|
|
10028
|
+
toasts: state.toasts.filter((t) => t.id !== action.toastId)
|
|
10028
10029
|
};
|
|
10029
10030
|
default:
|
|
10030
10031
|
return state;
|
|
@@ -10498,7 +10499,7 @@ function getPaddingObject(padding) {
|
|
|
10498
10499
|
}
|
|
10499
10500
|
function rectToClientRect(rect) {
|
|
10500
10501
|
const {
|
|
10501
|
-
x
|
|
10502
|
+
x,
|
|
10502
10503
|
y,
|
|
10503
10504
|
width,
|
|
10504
10505
|
height
|
|
@@ -10507,10 +10508,10 @@ function rectToClientRect(rect) {
|
|
|
10507
10508
|
width,
|
|
10508
10509
|
height,
|
|
10509
10510
|
top: y,
|
|
10510
|
-
left:
|
|
10511
|
-
right:
|
|
10511
|
+
left: x,
|
|
10512
|
+
right: x + width,
|
|
10512
10513
|
bottom: y + height,
|
|
10513
|
-
x
|
|
10514
|
+
x,
|
|
10514
10515
|
y
|
|
10515
10516
|
};
|
|
10516
10517
|
}
|
|
@@ -10586,7 +10587,7 @@ var computePosition = async (reference, floating, config) => {
|
|
|
10586
10587
|
strategy
|
|
10587
10588
|
});
|
|
10588
10589
|
let {
|
|
10589
|
-
x
|
|
10590
|
+
x,
|
|
10590
10591
|
y
|
|
10591
10592
|
} = computeCoordsFromPlacement(rects, placement, rtl);
|
|
10592
10593
|
let statefulPlacement = placement;
|
|
@@ -10603,7 +10604,7 @@ var computePosition = async (reference, floating, config) => {
|
|
|
10603
10604
|
data,
|
|
10604
10605
|
reset: reset2
|
|
10605
10606
|
} = await fn({
|
|
10606
|
-
x
|
|
10607
|
+
x,
|
|
10607
10608
|
y,
|
|
10608
10609
|
initialPlacement: placement,
|
|
10609
10610
|
placement: statefulPlacement,
|
|
@@ -10616,7 +10617,7 @@ var computePosition = async (reference, floating, config) => {
|
|
|
10616
10617
|
floating
|
|
10617
10618
|
}
|
|
10618
10619
|
});
|
|
10619
|
-
|
|
10620
|
+
x = nextX != null ? nextX : x;
|
|
10620
10621
|
y = nextY != null ? nextY : y;
|
|
10621
10622
|
middlewareData = {
|
|
10622
10623
|
...middlewareData,
|
|
@@ -10639,7 +10640,7 @@ var computePosition = async (reference, floating, config) => {
|
|
|
10639
10640
|
}) : reset2.rects;
|
|
10640
10641
|
}
|
|
10641
10642
|
({
|
|
10642
|
-
x
|
|
10643
|
+
x,
|
|
10643
10644
|
y
|
|
10644
10645
|
} = computeCoordsFromPlacement(rects, statefulPlacement, rtl));
|
|
10645
10646
|
}
|
|
@@ -10647,7 +10648,7 @@ var computePosition = async (reference, floating, config) => {
|
|
|
10647
10648
|
}
|
|
10648
10649
|
}
|
|
10649
10650
|
return {
|
|
10650
|
-
x
|
|
10651
|
+
x,
|
|
10651
10652
|
y,
|
|
10652
10653
|
placement: statefulPlacement,
|
|
10653
10654
|
strategy,
|
|
@@ -10660,7 +10661,7 @@ async function detectOverflow(state, options) {
|
|
|
10660
10661
|
options = {};
|
|
10661
10662
|
}
|
|
10662
10663
|
const {
|
|
10663
|
-
x
|
|
10664
|
+
x,
|
|
10664
10665
|
y,
|
|
10665
10666
|
platform: platform2,
|
|
10666
10667
|
rects,
|
|
@@ -10684,7 +10685,7 @@ async function detectOverflow(state, options) {
|
|
|
10684
10685
|
strategy
|
|
10685
10686
|
}));
|
|
10686
10687
|
const rect = elementContext === "floating" ? {
|
|
10687
|
-
x
|
|
10688
|
+
x,
|
|
10688
10689
|
y,
|
|
10689
10690
|
width: rects.floating.width,
|
|
10690
10691
|
height: rects.floating.height
|
|
@@ -10715,7 +10716,7 @@ var arrow = (options) => ({
|
|
|
10715
10716
|
options,
|
|
10716
10717
|
async fn(state) {
|
|
10717
10718
|
const {
|
|
10718
|
-
x
|
|
10719
|
+
x,
|
|
10719
10720
|
y,
|
|
10720
10721
|
placement,
|
|
10721
10722
|
rects,
|
|
@@ -10732,7 +10733,7 @@ var arrow = (options) => ({
|
|
|
10732
10733
|
}
|
|
10733
10734
|
const paddingObject = getPaddingObject(padding);
|
|
10734
10735
|
const coords = {
|
|
10735
|
-
x
|
|
10736
|
+
x,
|
|
10736
10737
|
y
|
|
10737
10738
|
};
|
|
10738
10739
|
const axis = getAlignmentAxis(placement);
|
|
@@ -10989,7 +10990,7 @@ var offset = function(options) {
|
|
|
10989
10990
|
async fn(state) {
|
|
10990
10991
|
var _middlewareData$offse, _middlewareData$arrow;
|
|
10991
10992
|
const {
|
|
10992
|
-
x
|
|
10993
|
+
x,
|
|
10993
10994
|
y,
|
|
10994
10995
|
placement,
|
|
10995
10996
|
middlewareData
|
|
@@ -10999,7 +11000,7 @@ var offset = function(options) {
|
|
|
10999
11000
|
return {};
|
|
11000
11001
|
}
|
|
11001
11002
|
return {
|
|
11002
|
-
x:
|
|
11003
|
+
x: x + diffCoords.x,
|
|
11003
11004
|
y: y + diffCoords.y,
|
|
11004
11005
|
data: {
|
|
11005
11006
|
...diffCoords,
|
|
@@ -11018,7 +11019,7 @@ var shift = function(options) {
|
|
|
11018
11019
|
options,
|
|
11019
11020
|
async fn(state) {
|
|
11020
11021
|
const {
|
|
11021
|
-
x
|
|
11022
|
+
x,
|
|
11022
11023
|
y,
|
|
11023
11024
|
placement
|
|
11024
11025
|
} = state;
|
|
@@ -11028,11 +11029,11 @@ var shift = function(options) {
|
|
|
11028
11029
|
limiter = {
|
|
11029
11030
|
fn: (_ref) => {
|
|
11030
11031
|
let {
|
|
11031
|
-
x:
|
|
11032
|
+
x: x2,
|
|
11032
11033
|
y: y2
|
|
11033
11034
|
} = _ref;
|
|
11034
11035
|
return {
|
|
11035
|
-
x:
|
|
11036
|
+
x: x2,
|
|
11036
11037
|
y: y2
|
|
11037
11038
|
};
|
|
11038
11039
|
}
|
|
@@ -11040,7 +11041,7 @@ var shift = function(options) {
|
|
|
11040
11041
|
...detectOverflowOptions
|
|
11041
11042
|
} = evaluate(options, state);
|
|
11042
11043
|
const coords = {
|
|
11043
|
-
x
|
|
11044
|
+
x,
|
|
11044
11045
|
y
|
|
11045
11046
|
};
|
|
11046
11047
|
const overflow = await detectOverflow(state, detectOverflowOptions);
|
|
@@ -11070,7 +11071,7 @@ var shift = function(options) {
|
|
|
11070
11071
|
return {
|
|
11071
11072
|
...limitedCoords,
|
|
11072
11073
|
data: {
|
|
11073
|
-
x: limitedCoords.x -
|
|
11074
|
+
x: limitedCoords.x - x,
|
|
11074
11075
|
y: limitedCoords.y - y,
|
|
11075
11076
|
enabled: {
|
|
11076
11077
|
[mainAxis]: checkMainAxis,
|
|
@@ -11089,7 +11090,7 @@ var limitShift = function(options) {
|
|
|
11089
11090
|
options,
|
|
11090
11091
|
fn(state) {
|
|
11091
11092
|
const {
|
|
11092
|
-
x
|
|
11093
|
+
x,
|
|
11093
11094
|
y,
|
|
11094
11095
|
placement,
|
|
11095
11096
|
rects,
|
|
@@ -11101,7 +11102,7 @@ var limitShift = function(options) {
|
|
|
11101
11102
|
crossAxis: checkCrossAxis = true
|
|
11102
11103
|
} = evaluate(options, state);
|
|
11103
11104
|
const coords = {
|
|
11104
|
-
x
|
|
11105
|
+
x,
|
|
11105
11106
|
y
|
|
11106
11107
|
};
|
|
11107
11108
|
const crossAxis = getSideAxis(placement);
|
|
@@ -11412,16 +11413,16 @@ function getScale(element) {
|
|
|
11412
11413
|
height,
|
|
11413
11414
|
$
|
|
11414
11415
|
} = getCssDimensions(domElement);
|
|
11415
|
-
let
|
|
11416
|
+
let x = ($ ? round(rect.width) : rect.width) / width;
|
|
11416
11417
|
let y = ($ ? round(rect.height) : rect.height) / height;
|
|
11417
|
-
if (!
|
|
11418
|
-
|
|
11418
|
+
if (!x || !Number.isFinite(x)) {
|
|
11419
|
+
x = 1;
|
|
11419
11420
|
}
|
|
11420
11421
|
if (!y || !Number.isFinite(y)) {
|
|
11421
11422
|
y = 1;
|
|
11422
11423
|
}
|
|
11423
11424
|
return {
|
|
11424
|
-
x
|
|
11425
|
+
x,
|
|
11425
11426
|
y
|
|
11426
11427
|
};
|
|
11427
11428
|
}
|
|
@@ -11465,7 +11466,7 @@ function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetPar
|
|
|
11465
11466
|
}
|
|
11466
11467
|
}
|
|
11467
11468
|
const visualOffsets = shouldAddVisualOffsets(domElement, isFixedStrategy, offsetParent) ? getVisualOffsets(domElement) : createCoords(0);
|
|
11468
|
-
let
|
|
11469
|
+
let x = (clientRect2.left + visualOffsets.x) / scale.x;
|
|
11469
11470
|
let y = (clientRect2.top + visualOffsets.y) / scale.y;
|
|
11470
11471
|
let width = clientRect2.width / scale.x;
|
|
11471
11472
|
let height = clientRect2.height / scale.y;
|
|
@@ -11480,11 +11481,11 @@ function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetPar
|
|
|
11480
11481
|
const css2 = getComputedStyle2(currentIFrame);
|
|
11481
11482
|
const left = iframeRect.left + (currentIFrame.clientLeft + parseFloat(css2.paddingLeft)) * iframeScale.x;
|
|
11482
11483
|
const top = iframeRect.top + (currentIFrame.clientTop + parseFloat(css2.paddingTop)) * iframeScale.y;
|
|
11483
|
-
|
|
11484
|
+
x *= iframeScale.x;
|
|
11484
11485
|
y *= iframeScale.y;
|
|
11485
11486
|
width *= iframeScale.x;
|
|
11486
11487
|
height *= iframeScale.y;
|
|
11487
|
-
|
|
11488
|
+
x += left;
|
|
11488
11489
|
y += top;
|
|
11489
11490
|
currentWin = getWindow(currentIFrame);
|
|
11490
11491
|
currentIFrame = getFrameElement(currentWin);
|
|
@@ -11493,7 +11494,7 @@ function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetPar
|
|
|
11493
11494
|
return rectToClientRect({
|
|
11494
11495
|
width,
|
|
11495
11496
|
height,
|
|
11496
|
-
x
|
|
11497
|
+
x,
|
|
11497
11498
|
y
|
|
11498
11499
|
});
|
|
11499
11500
|
}
|
|
@@ -11506,10 +11507,10 @@ function getWindowScrollBarX(element, rect) {
|
|
|
11506
11507
|
}
|
|
11507
11508
|
function getHTMLOffset(documentElement, scroll) {
|
|
11508
11509
|
const htmlRect = documentElement.getBoundingClientRect();
|
|
11509
|
-
const
|
|
11510
|
+
const x = htmlRect.left + scroll.scrollLeft - getWindowScrollBarX(documentElement, htmlRect);
|
|
11510
11511
|
const y = htmlRect.top + scroll.scrollTop;
|
|
11511
11512
|
return {
|
|
11512
|
-
x
|
|
11513
|
+
x,
|
|
11513
11514
|
y
|
|
11514
11515
|
};
|
|
11515
11516
|
}
|
|
@@ -11561,15 +11562,15 @@ function getDocumentRect(element) {
|
|
|
11561
11562
|
const body = element.ownerDocument.body;
|
|
11562
11563
|
const width = max(html.scrollWidth, html.clientWidth, body.scrollWidth, body.clientWidth);
|
|
11563
11564
|
const height = max(html.scrollHeight, html.clientHeight, body.scrollHeight, body.clientHeight);
|
|
11564
|
-
let
|
|
11565
|
+
let x = -scroll.scrollLeft + getWindowScrollBarX(element);
|
|
11565
11566
|
const y = -scroll.scrollTop;
|
|
11566
11567
|
if (getComputedStyle2(body).direction === "rtl") {
|
|
11567
|
-
|
|
11568
|
+
x += max(html.clientWidth, body.clientWidth) - width;
|
|
11568
11569
|
}
|
|
11569
11570
|
return {
|
|
11570
11571
|
width,
|
|
11571
11572
|
height,
|
|
11572
|
-
x
|
|
11573
|
+
x,
|
|
11573
11574
|
y
|
|
11574
11575
|
};
|
|
11575
11576
|
}
|
|
@@ -11580,14 +11581,14 @@ function getViewportRect(element, strategy) {
|
|
|
11580
11581
|
const visualViewport = win.visualViewport;
|
|
11581
11582
|
let width = html.clientWidth;
|
|
11582
11583
|
let height = html.clientHeight;
|
|
11583
|
-
let
|
|
11584
|
+
let x = 0;
|
|
11584
11585
|
let y = 0;
|
|
11585
11586
|
if (visualViewport) {
|
|
11586
11587
|
width = visualViewport.width;
|
|
11587
11588
|
height = visualViewport.height;
|
|
11588
11589
|
const visualViewportBased = isWebKit();
|
|
11589
11590
|
if (!visualViewportBased || visualViewportBased && strategy === "fixed") {
|
|
11590
|
-
|
|
11591
|
+
x = visualViewport.offsetLeft;
|
|
11591
11592
|
y = visualViewport.offsetTop;
|
|
11592
11593
|
}
|
|
11593
11594
|
}
|
|
@@ -11607,7 +11608,7 @@ function getViewportRect(element, strategy) {
|
|
|
11607
11608
|
return {
|
|
11608
11609
|
width,
|
|
11609
11610
|
height,
|
|
11610
|
-
x
|
|
11611
|
+
x,
|
|
11611
11612
|
y
|
|
11612
11613
|
};
|
|
11613
11614
|
}
|
|
@@ -11619,12 +11620,12 @@ function getInnerBoundingClientRect(element, strategy) {
|
|
|
11619
11620
|
const scale = isHTMLElement(element) ? getScale(element) : createCoords(1);
|
|
11620
11621
|
const width = element.clientWidth * scale.x;
|
|
11621
11622
|
const height = element.clientHeight * scale.y;
|
|
11622
|
-
const
|
|
11623
|
+
const x = left * scale.x;
|
|
11623
11624
|
const y = top * scale.y;
|
|
11624
11625
|
return {
|
|
11625
11626
|
width,
|
|
11626
11627
|
height,
|
|
11627
|
-
x
|
|
11628
|
+
x,
|
|
11628
11629
|
y
|
|
11629
11630
|
};
|
|
11630
11631
|
}
|
|
@@ -11744,10 +11745,10 @@ function getRectRelativeToOffsetParent(element, offsetParent, strategy) {
|
|
|
11744
11745
|
setLeftRTLScrollbarOffset();
|
|
11745
11746
|
}
|
|
11746
11747
|
const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : createCoords(0);
|
|
11747
|
-
const
|
|
11748
|
+
const x = rect.left + scroll.scrollLeft - offsets.x - htmlOffset.x;
|
|
11748
11749
|
const y = rect.top + scroll.scrollTop - offsets.y - htmlOffset.y;
|
|
11749
11750
|
return {
|
|
11750
|
-
x
|
|
11751
|
+
x,
|
|
11751
11752
|
y,
|
|
11752
11753
|
width: rect.width,
|
|
11753
11754
|
height: rect.height
|
|
@@ -12187,12 +12188,12 @@ function useFloating(options) {
|
|
|
12187
12188
|
if (!elements.floating) {
|
|
12188
12189
|
return initialStyles;
|
|
12189
12190
|
}
|
|
12190
|
-
const
|
|
12191
|
+
const x = roundByDPR(elements.floating, data.x);
|
|
12191
12192
|
const y = roundByDPR(elements.floating, data.y);
|
|
12192
12193
|
if (transform) {
|
|
12193
12194
|
return {
|
|
12194
12195
|
...initialStyles,
|
|
12195
|
-
transform: "translate(" +
|
|
12196
|
+
transform: "translate(" + x + "px, " + y + "px)",
|
|
12196
12197
|
...getDPR(elements.floating) >= 1.5 && {
|
|
12197
12198
|
willChange: "transform"
|
|
12198
12199
|
}
|
|
@@ -12200,7 +12201,7 @@ function useFloating(options) {
|
|
|
12200
12201
|
}
|
|
12201
12202
|
return {
|
|
12202
12203
|
position: strategy,
|
|
12203
|
-
left:
|
|
12204
|
+
left: x,
|
|
12204
12205
|
top: y
|
|
12205
12206
|
};
|
|
12206
12207
|
}, [strategy, transform, elements.floating, data.x, data.y]);
|
|
@@ -12574,22 +12575,22 @@ var transformOrigin = (options) => ({
|
|
|
12574
12575
|
const noArrowAlign = { start: "0%", center: "50%", end: "100%" }[placedAlign];
|
|
12575
12576
|
const arrowXCenter = (middlewareData.arrow?.x ?? 0) + arrowWidth / 2;
|
|
12576
12577
|
const arrowYCenter = (middlewareData.arrow?.y ?? 0) + arrowHeight / 2;
|
|
12577
|
-
let
|
|
12578
|
+
let x = "";
|
|
12578
12579
|
let y = "";
|
|
12579
12580
|
if (placedSide === "bottom") {
|
|
12580
|
-
|
|
12581
|
+
x = isArrowHidden ? noArrowAlign : `${arrowXCenter}px`;
|
|
12581
12582
|
y = `${-arrowHeight}px`;
|
|
12582
12583
|
} else if (placedSide === "top") {
|
|
12583
|
-
|
|
12584
|
+
x = isArrowHidden ? noArrowAlign : `${arrowXCenter}px`;
|
|
12584
12585
|
y = `${rects.floating.height + arrowHeight}px`;
|
|
12585
12586
|
} else if (placedSide === "right") {
|
|
12586
|
-
|
|
12587
|
+
x = `${-arrowHeight}px`;
|
|
12587
12588
|
y = isArrowHidden ? noArrowAlign : `${arrowYCenter}px`;
|
|
12588
12589
|
} else if (placedSide === "left") {
|
|
12589
|
-
|
|
12590
|
+
x = `${rects.floating.width + arrowHeight}px`;
|
|
12590
12591
|
y = isArrowHidden ? noArrowAlign : `${arrowYCenter}px`;
|
|
12591
12592
|
}
|
|
12592
|
-
return { data: { x
|
|
12593
|
+
return { data: { x, y } };
|
|
12593
12594
|
}
|
|
12594
12595
|
});
|
|
12595
12596
|
function getSideAndAlignFromPlacement(placement) {
|
|
@@ -14331,9 +14332,9 @@ var MoonUIGestureDrawerProComponent = React71__default.forwardRef(({
|
|
|
14331
14332
|
const isVertical = position === "bottom" || position === "top";
|
|
14332
14333
|
useAnimation();
|
|
14333
14334
|
useAnimation();
|
|
14334
|
-
const
|
|
14335
|
+
const x = useMotionValue(0);
|
|
14335
14336
|
const y = useMotionValue(0);
|
|
14336
|
-
const motionValue = isVertical ? y :
|
|
14337
|
+
const motionValue = isVertical ? y : x;
|
|
14337
14338
|
const [currentSnapPoint, setCurrentSnapPoint] = useState(
|
|
14338
14339
|
defaultSnapPoint || (snapPoints.length > 0 ? snapPoints[0] : 50)
|
|
14339
14340
|
);
|
|
@@ -15180,9 +15181,9 @@ var MagneticButtonInternal = React71.forwardRef(
|
|
|
15180
15181
|
(e) => {
|
|
15181
15182
|
if (enableRipple && buttonRef.current) {
|
|
15182
15183
|
const rect = buttonRef.current.getBoundingClientRect();
|
|
15183
|
-
const
|
|
15184
|
+
const x = e.clientX - rect.left;
|
|
15184
15185
|
const y = e.clientY - rect.top;
|
|
15185
|
-
const newRipple = { id: Date.now(), x
|
|
15186
|
+
const newRipple = { id: Date.now(), x, y };
|
|
15186
15187
|
setRipples((prevRipples) => [...prevRipples, newRipple]);
|
|
15187
15188
|
setTimeout(() => {
|
|
15188
15189
|
setRipples((prevRipples) => prevRipples.filter((r2) => r2.id !== newRipple.id));
|
|
@@ -15702,7 +15703,7 @@ var MoonUIMediaGalleryPro = React71.forwardRef(({
|
|
|
15702
15703
|
className
|
|
15703
15704
|
),
|
|
15704
15705
|
style: layout === "masonry" ? { columnGap: "1rem" } : void 0,
|
|
15705
|
-
children: loadingState ? /* @__PURE__ */ jsx(Fragment, { children: Array.from({ length: skeletonCount }).map((
|
|
15706
|
+
children: loadingState ? /* @__PURE__ */ jsx(Fragment, { children: Array.from({ length: skeletonCount }).map((_, i) => /* @__PURE__ */ jsx(React71.Fragment, { children: renderSkeleton() }, i)) }) : sortedItems.length > 0 ? sortedItems.map((item, index2) => renderGalleryItem(item, index2)) : emptyState || /* @__PURE__ */ jsxs("div", { className: "col-span-full flex flex-col items-center justify-center py-12 text-center", children: [
|
|
15706
15707
|
/* @__PURE__ */ jsx(Image$1, { className: "h-12 w-12 text-muted-foreground mb-4" }),
|
|
15707
15708
|
/* @__PURE__ */ jsx("p", { className: "text-muted-foreground", children: "No media items found" })
|
|
15708
15709
|
] })
|
|
@@ -16308,16 +16309,16 @@ var GlowCardInternal = forwardRef(
|
|
|
16308
16309
|
if (!cardRef.current)
|
|
16309
16310
|
return;
|
|
16310
16311
|
const rect = cardRef.current.getBoundingClientRect();
|
|
16311
|
-
const
|
|
16312
|
+
const x = e.clientX - rect.left;
|
|
16312
16313
|
const y = e.clientY - rect.top;
|
|
16313
16314
|
if (mouseTrack) {
|
|
16314
|
-
setMousePosition({ x
|
|
16315
|
+
setMousePosition({ x, y });
|
|
16315
16316
|
}
|
|
16316
16317
|
if (tilt && !disableAnimations) {
|
|
16317
16318
|
const centerX = rect.width / 2;
|
|
16318
16319
|
const centerY = rect.height / 2;
|
|
16319
16320
|
const rotateX = (y - centerY) / centerY * tiltAngle;
|
|
16320
|
-
const rotateY = (
|
|
16321
|
+
const rotateY = (x - centerX) / centerX * -tiltAngle;
|
|
16321
16322
|
setTiltStyle({
|
|
16322
16323
|
transform: `perspective(1000px) rotateX(${rotateX}deg) rotateY(${rotateY}deg) scale3d(1.02, 1.02, 1.02)`,
|
|
16323
16324
|
transformStyle: "preserve-3d"
|
|
@@ -16520,10 +16521,10 @@ var MoonUIAnimatedButtonProInternal = React71__default.forwardRef(
|
|
|
16520
16521
|
return;
|
|
16521
16522
|
if (ripple) {
|
|
16522
16523
|
const rect = e.currentTarget.getBoundingClientRect();
|
|
16523
|
-
const
|
|
16524
|
+
const x = e.clientX - rect.left;
|
|
16524
16525
|
const y = e.clientY - rect.top;
|
|
16525
16526
|
const id = Date.now();
|
|
16526
|
-
setRipples([...ripples, { x
|
|
16527
|
+
setRipples([...ripples, { x, y, id }]);
|
|
16527
16528
|
setTimeout(() => {
|
|
16528
16529
|
setRipples((prev) => prev.filter((r2) => r2.id !== id));
|
|
16529
16530
|
}, 600);
|
|
@@ -17629,7 +17630,7 @@ var SplashCursorComponent = ({
|
|
|
17629
17630
|
const cleanupSplash = useCallback((splashId) => {
|
|
17630
17631
|
setSplashes((prev) => prev.filter((splash) => splash.id !== splashId));
|
|
17631
17632
|
}, []);
|
|
17632
|
-
const createSplash = useCallback((
|
|
17633
|
+
const createSplash = useCallback((x, y) => {
|
|
17633
17634
|
const now = Date.now();
|
|
17634
17635
|
if (now - lastSplashTimeRef.current < 16) {
|
|
17635
17636
|
return;
|
|
@@ -17637,7 +17638,7 @@ var SplashCursorComponent = ({
|
|
|
17637
17638
|
lastSplashTimeRef.current = now;
|
|
17638
17639
|
const newSplash = {
|
|
17639
17640
|
id: now + Math.random(),
|
|
17640
|
-
x
|
|
17641
|
+
x,
|
|
17641
17642
|
y,
|
|
17642
17643
|
timestamp: now
|
|
17643
17644
|
};
|
|
@@ -17666,13 +17667,13 @@ var SplashCursorComponent = ({
|
|
|
17666
17667
|
return;
|
|
17667
17668
|
rafIdRef.current = requestAnimationFrame(() => {
|
|
17668
17669
|
const container = containerRef?.current;
|
|
17669
|
-
let
|
|
17670
|
+
let x = e.clientX;
|
|
17670
17671
|
let y = e.clientY;
|
|
17671
17672
|
if (container) {
|
|
17672
17673
|
const rect = container.getBoundingClientRect();
|
|
17673
|
-
|
|
17674
|
+
x = e.clientX - rect.left;
|
|
17674
17675
|
y = e.clientY - rect.top;
|
|
17675
|
-
if (
|
|
17676
|
+
if (x < 0 || y < 0 || x > rect.width || y > rect.height) {
|
|
17676
17677
|
rafIdRef.current = null;
|
|
17677
17678
|
return;
|
|
17678
17679
|
}
|
|
@@ -17683,7 +17684,7 @@ var SplashCursorComponent = ({
|
|
|
17683
17684
|
const distance = calculateDistance(
|
|
17684
17685
|
lastPosRef.current.x,
|
|
17685
17686
|
lastPosRef.current.y,
|
|
17686
|
-
|
|
17687
|
+
x,
|
|
17687
17688
|
y
|
|
17688
17689
|
);
|
|
17689
17690
|
const speed = distance / timeDiff;
|
|
@@ -17691,37 +17692,37 @@ var SplashCursorComponent = ({
|
|
|
17691
17692
|
if (targetSelector) {
|
|
17692
17693
|
const target = e.target;
|
|
17693
17694
|
if (target?.closest(targetSelector)) {
|
|
17694
|
-
createSplash(
|
|
17695
|
+
createSplash(x, y);
|
|
17695
17696
|
}
|
|
17696
17697
|
} else {
|
|
17697
|
-
createSplash(
|
|
17698
|
+
createSplash(x, y);
|
|
17698
17699
|
}
|
|
17699
17700
|
}
|
|
17700
17701
|
}
|
|
17701
|
-
lastPosRef.current = { x
|
|
17702
|
+
lastPosRef.current = { x, y };
|
|
17702
17703
|
lastMoveTimeRef.current = now;
|
|
17703
17704
|
rafIdRef.current = null;
|
|
17704
17705
|
});
|
|
17705
17706
|
}, [threshold, targetSelector, createSplash, containerRef]);
|
|
17706
17707
|
const handleClick2 = useCallback((e) => {
|
|
17707
17708
|
const container = containerRef?.current;
|
|
17708
|
-
let
|
|
17709
|
+
let x = e.clientX;
|
|
17709
17710
|
let y = e.clientY;
|
|
17710
17711
|
if (container) {
|
|
17711
17712
|
const rect = container.getBoundingClientRect();
|
|
17712
|
-
|
|
17713
|
+
x = e.clientX - rect.left;
|
|
17713
17714
|
y = e.clientY - rect.top;
|
|
17714
|
-
if (
|
|
17715
|
+
if (x < 0 || y < 0 || x > rect.width || y > rect.height) {
|
|
17715
17716
|
return;
|
|
17716
17717
|
}
|
|
17717
17718
|
}
|
|
17718
17719
|
if (targetSelector) {
|
|
17719
17720
|
const target = e.target;
|
|
17720
17721
|
if (target?.closest(targetSelector)) {
|
|
17721
|
-
createSplash(
|
|
17722
|
+
createSplash(x, y);
|
|
17722
17723
|
}
|
|
17723
17724
|
} else {
|
|
17724
|
-
createSplash(
|
|
17725
|
+
createSplash(x, y);
|
|
17725
17726
|
}
|
|
17726
17727
|
}, [targetSelector, createSplash, containerRef]);
|
|
17727
17728
|
useEffect(() => {
|
|
@@ -17780,7 +17781,7 @@ var SplashCursorComponent = ({
|
|
|
17780
17781
|
const particleAngles = useMemo(() => {
|
|
17781
17782
|
if (!showParticles)
|
|
17782
17783
|
return [];
|
|
17783
|
-
return Array.from({ length: particleCount }).map((
|
|
17784
|
+
return Array.from({ length: particleCount }).map((_, i) => {
|
|
17784
17785
|
const angle = 360 / particleCount * i;
|
|
17785
17786
|
const radian = angle * Math.PI / 180;
|
|
17786
17787
|
return {
|
|
@@ -18007,7 +18008,7 @@ var MarqueeInternal = ({
|
|
|
18007
18008
|
!isPlaying && "animation-paused",
|
|
18008
18009
|
className
|
|
18009
18010
|
),
|
|
18010
|
-
children: Array.from({ length: repeatCount }).map((
|
|
18011
|
+
children: Array.from({ length: repeatCount }).map((_, i) => /* @__PURE__ */ jsx(
|
|
18011
18012
|
"div",
|
|
18012
18013
|
{
|
|
18013
18014
|
ref: i === 0 ? marqueeRef : void 0,
|
|
@@ -18536,9 +18537,9 @@ var HoverCard3DInternal = React71__default.forwardRef(
|
|
|
18536
18537
|
const [isFocused, setIsFocused] = useState(false);
|
|
18537
18538
|
const [mousePosition, setMousePosition] = useState({ x: 0, y: 0 });
|
|
18538
18539
|
const rotation = mergedProps.maxRotation || rotationIntensity || 15;
|
|
18539
|
-
const
|
|
18540
|
+
const x = useMotionValue(0);
|
|
18540
18541
|
const y = useMotionValue(0);
|
|
18541
|
-
const springX = useSpring(
|
|
18542
|
+
const springX = useSpring(x, {
|
|
18542
18543
|
...mergedProps.springConfig,
|
|
18543
18544
|
stiffness: mergedProps.springConfig.stiffness * animationSpeed,
|
|
18544
18545
|
damping: mergedProps.springConfig.damping / animationSpeed
|
|
@@ -18576,7 +18577,7 @@ var HoverCard3DInternal = React71__default.forwardRef(
|
|
|
18576
18577
|
}
|
|
18577
18578
|
const rotateXValue = (clientY - centerY) / (rect.height / 2);
|
|
18578
18579
|
const rotateYValue = (clientX - centerX) / (rect.width / 2);
|
|
18579
|
-
|
|
18580
|
+
x.set(rotateYValue);
|
|
18580
18581
|
y.set(rotateXValue);
|
|
18581
18582
|
if (mergedProps.enableShine) {
|
|
18582
18583
|
const normalizedX = (clientX - rect.left) / rect.width;
|
|
@@ -18586,22 +18587,22 @@ var HoverCard3DInternal = React71__default.forwardRef(
|
|
|
18586
18587
|
if (onRotationChange) {
|
|
18587
18588
|
onRotationChange(rotateX.get(), rotateY.get());
|
|
18588
18589
|
}
|
|
18589
|
-
}, [enableTouch,
|
|
18590
|
+
}, [enableTouch, x, y, rotateX, rotateY, onRotationChange, mergedProps.enableShine]);
|
|
18590
18591
|
const handleMouseEnter = useCallback(() => {
|
|
18591
18592
|
setIsHovered(true);
|
|
18592
18593
|
onHoverStart?.();
|
|
18593
18594
|
}, [onHoverStart]);
|
|
18594
18595
|
const handleMouseLeave2 = useCallback(() => {
|
|
18595
18596
|
setIsHovered(false);
|
|
18596
|
-
|
|
18597
|
+
x.set(0);
|
|
18597
18598
|
y.set(0);
|
|
18598
18599
|
onHoverEnd?.();
|
|
18599
|
-
}, [
|
|
18600
|
+
}, [x, y, onHoverEnd]);
|
|
18600
18601
|
const handleKeyDown3 = useCallback((e) => {
|
|
18601
18602
|
if (!enableKeyboard || !isFocused)
|
|
18602
18603
|
return;
|
|
18603
18604
|
const step = 0.1;
|
|
18604
|
-
let newX =
|
|
18605
|
+
let newX = x.get();
|
|
18605
18606
|
let newY = y.get();
|
|
18606
18607
|
switch (e.key) {
|
|
18607
18608
|
case "ArrowUp":
|
|
@@ -18616,12 +18617,12 @@ var HoverCard3DInternal = React71__default.forwardRef(
|
|
|
18616
18617
|
break;
|
|
18617
18618
|
case "ArrowLeft":
|
|
18618
18619
|
newX = Math.max(-0.5, newX - step);
|
|
18619
|
-
|
|
18620
|
+
x.set(newX);
|
|
18620
18621
|
e.preventDefault();
|
|
18621
18622
|
break;
|
|
18622
18623
|
case "ArrowRight":
|
|
18623
18624
|
newX = Math.min(0.5, newX + step);
|
|
18624
|
-
|
|
18625
|
+
x.set(newX);
|
|
18625
18626
|
e.preventDefault();
|
|
18626
18627
|
break;
|
|
18627
18628
|
case "Enter":
|
|
@@ -18635,7 +18636,7 @@ var HoverCard3DInternal = React71__default.forwardRef(
|
|
|
18635
18636
|
e.preventDefault();
|
|
18636
18637
|
break;
|
|
18637
18638
|
case "Escape":
|
|
18638
|
-
|
|
18639
|
+
x.set(0);
|
|
18639
18640
|
y.set(0);
|
|
18640
18641
|
setIsHovered(false);
|
|
18641
18642
|
onHoverEnd?.();
|
|
@@ -18645,7 +18646,7 @@ var HoverCard3DInternal = React71__default.forwardRef(
|
|
|
18645
18646
|
if (onRotationChange) {
|
|
18646
18647
|
onRotationChange(rotateX.get(), rotateY.get());
|
|
18647
18648
|
}
|
|
18648
|
-
}, [enableKeyboard, isFocused,
|
|
18649
|
+
}, [enableKeyboard, isFocused, x, y, isHovered, onHoverStart, onHoverEnd, rotateX, rotateY, onRotationChange]);
|
|
18649
18650
|
useEffect(() => {
|
|
18650
18651
|
if (autoFocus && cardRef.current) {
|
|
18651
18652
|
cardRef.current.focus();
|
|
@@ -18900,7 +18901,7 @@ var PinchZoomInternal = React71__default.forwardRef(
|
|
|
18900
18901
|
const [isHovered, setIsHovered] = useState(false);
|
|
18901
18902
|
const [isFullscreen, setIsFullscreen] = useState(false);
|
|
18902
18903
|
const scale = useMotionValue(initialZoom);
|
|
18903
|
-
const
|
|
18904
|
+
const x = useMotionValue(0);
|
|
18904
18905
|
const y = useMotionValue(0);
|
|
18905
18906
|
const constrainedScale = useTransform(scale, (value) => {
|
|
18906
18907
|
return Math.min(Math.max(value, minZoom), maxZoom);
|
|
@@ -18952,15 +18953,15 @@ var PinchZoomInternal = React71__default.forwardRef(
|
|
|
18952
18953
|
const centerX = (event.clientX - rect.left) / rect.width - 0.5;
|
|
18953
18954
|
const centerY = (event.clientY - rect.top) / rect.height - 0.5;
|
|
18954
18955
|
const scaleDiff = newScale - currentScale;
|
|
18955
|
-
const currentX =
|
|
18956
|
+
const currentX = x.get();
|
|
18956
18957
|
const currentY = y.get();
|
|
18957
18958
|
const newX = currentX - centerX * rect.width * scaleDiff;
|
|
18958
18959
|
const newY = currentY - centerY * rect.height * scaleDiff;
|
|
18959
18960
|
if (smoothZoom) {
|
|
18960
|
-
animate(
|
|
18961
|
+
animate(x, newX, { duration: 0.2 });
|
|
18961
18962
|
animate(y, newY, { duration: 0.2 });
|
|
18962
18963
|
} else {
|
|
18963
|
-
|
|
18964
|
+
x.set(newX);
|
|
18964
18965
|
y.set(newY);
|
|
18965
18966
|
}
|
|
18966
18967
|
}
|
|
@@ -18974,7 +18975,7 @@ var PinchZoomInternal = React71__default.forwardRef(
|
|
|
18974
18975
|
setShowZoomIndicator(true);
|
|
18975
18976
|
setTimeout(() => setShowZoomIndicator(false), 1500);
|
|
18976
18977
|
}
|
|
18977
|
-
}, [scale,
|
|
18978
|
+
}, [scale, x, y, minZoom, maxZoom, onZoomChange, wheelScaling, smoothZoom, showIndicator]);
|
|
18978
18979
|
const handleDoubleClick2 = useCallback((event) => {
|
|
18979
18980
|
event.preventDefault();
|
|
18980
18981
|
const currentScale = scale.get();
|
|
@@ -18989,7 +18990,7 @@ var PinchZoomInternal = React71__default.forwardRef(
|
|
|
18989
18990
|
const centerY = (event.clientY - rect.top) / rect.height - 0.5;
|
|
18990
18991
|
const targetX = -centerX * rect.width * (newScale - 1);
|
|
18991
18992
|
const targetY = -centerY * rect.height * (newScale - 1);
|
|
18992
|
-
animate(
|
|
18993
|
+
animate(x, targetX, {
|
|
18993
18994
|
duration: 0.3,
|
|
18994
18995
|
type: "spring",
|
|
18995
18996
|
stiffness: 300
|
|
@@ -19007,7 +19008,7 @@ var PinchZoomInternal = React71__default.forwardRef(
|
|
|
19007
19008
|
stiffness: 300
|
|
19008
19009
|
});
|
|
19009
19010
|
if (newScale === 1 || doubleTapBehavior === "reset") {
|
|
19010
|
-
animate(
|
|
19011
|
+
animate(x, 0, { duration: 0.3 });
|
|
19011
19012
|
animate(y, 0, { duration: 0.3 });
|
|
19012
19013
|
}
|
|
19013
19014
|
onZoomChange?.(newScale);
|
|
@@ -19015,7 +19016,7 @@ var PinchZoomInternal = React71__default.forwardRef(
|
|
|
19015
19016
|
setShowZoomIndicator(true);
|
|
19016
19017
|
setTimeout(() => setShowZoomIndicator(false), 1500);
|
|
19017
19018
|
}
|
|
19018
|
-
}, [scale,
|
|
19019
|
+
}, [scale, x, y, minZoom, maxZoom, initialZoom, onZoomChange, doubleTapBehavior, showIndicator]);
|
|
19019
19020
|
const handleTouchEnd = useCallback((event) => {
|
|
19020
19021
|
const now = Date.now();
|
|
19021
19022
|
const timeSinceLastTap = now - lastTap;
|
|
@@ -19037,7 +19038,7 @@ var PinchZoomInternal = React71__default.forwardRef(
|
|
|
19037
19038
|
type: "spring",
|
|
19038
19039
|
stiffness: 300
|
|
19039
19040
|
});
|
|
19040
|
-
animate(
|
|
19041
|
+
animate(x, 0, {
|
|
19041
19042
|
duration: 0.3,
|
|
19042
19043
|
type: "spring",
|
|
19043
19044
|
stiffness: 300
|
|
@@ -19048,7 +19049,7 @@ var PinchZoomInternal = React71__default.forwardRef(
|
|
|
19048
19049
|
stiffness: 300
|
|
19049
19050
|
});
|
|
19050
19051
|
onZoomChange?.(initialZoom);
|
|
19051
|
-
}, [scale,
|
|
19052
|
+
}, [scale, x, y, initialZoom, onZoomChange]);
|
|
19052
19053
|
const zoomIn = useCallback(() => {
|
|
19053
19054
|
const currentScale = scale.get();
|
|
19054
19055
|
const newScale = Math.min(currentScale + zoomStep, maxZoom);
|
|
@@ -19073,10 +19074,10 @@ var PinchZoomInternal = React71__default.forwardRef(
|
|
|
19073
19074
|
});
|
|
19074
19075
|
if (newScale < scale.get()) {
|
|
19075
19076
|
const constraints = calculateConstraints();
|
|
19076
|
-
const currentX =
|
|
19077
|
+
const currentX = x.get();
|
|
19077
19078
|
const currentY = y.get();
|
|
19078
19079
|
if (currentX < constraints.left || currentX > constraints.right) {
|
|
19079
|
-
animate(
|
|
19080
|
+
animate(x, 0, { duration: 0.3 });
|
|
19080
19081
|
}
|
|
19081
19082
|
if (currentY < constraints.top || currentY > constraints.bottom) {
|
|
19082
19083
|
animate(y, 0, { duration: 0.3 });
|
|
@@ -19087,7 +19088,7 @@ var PinchZoomInternal = React71__default.forwardRef(
|
|
|
19087
19088
|
setShowZoomIndicator(true);
|
|
19088
19089
|
setTimeout(() => setShowZoomIndicator(false), 1500);
|
|
19089
19090
|
}
|
|
19090
|
-
}, [scale, minZoom, zoomStep,
|
|
19091
|
+
}, [scale, minZoom, zoomStep, x, y, calculateConstraints, onZoomChange, showIndicator]);
|
|
19091
19092
|
useCallback(() => {
|
|
19092
19093
|
resetZoom();
|
|
19093
19094
|
}, [resetZoom]);
|
|
@@ -19149,11 +19150,11 @@ var PinchZoomInternal = React71__default.forwardRef(
|
|
|
19149
19150
|
useEffect(() => {
|
|
19150
19151
|
const unsubscribe = scale.onChange(() => {
|
|
19151
19152
|
const constraints = calculateConstraints();
|
|
19152
|
-
const currentX =
|
|
19153
|
+
const currentX = x.get();
|
|
19153
19154
|
const currentY = y.get();
|
|
19154
19155
|
if (boundaryConstraints) {
|
|
19155
19156
|
if (currentX < constraints.left || currentX > constraints.right) {
|
|
19156
|
-
animate(
|
|
19157
|
+
animate(x, Math.max(constraints.left, Math.min(constraints.right, currentX)), { duration: 0.2 });
|
|
19157
19158
|
}
|
|
19158
19159
|
if (currentY < constraints.top || currentY > constraints.bottom) {
|
|
19159
19160
|
animate(y, Math.max(constraints.top, Math.min(constraints.bottom, currentY)), { duration: 0.2 });
|
|
@@ -19161,7 +19162,7 @@ var PinchZoomInternal = React71__default.forwardRef(
|
|
|
19161
19162
|
}
|
|
19162
19163
|
});
|
|
19163
19164
|
return unsubscribe;
|
|
19164
|
-
}, [scale,
|
|
19165
|
+
}, [scale, x, y, calculateConstraints, boundaryConstraints]);
|
|
19165
19166
|
return /* @__PURE__ */ jsxs(
|
|
19166
19167
|
"div",
|
|
19167
19168
|
{
|
|
@@ -19191,7 +19192,7 @@ var PinchZoomInternal = React71__default.forwardRef(
|
|
|
19191
19192
|
onDragEnd: () => setIsDragging(false),
|
|
19192
19193
|
style: {
|
|
19193
19194
|
scale: constrainedScale,
|
|
19194
|
-
x
|
|
19195
|
+
x,
|
|
19195
19196
|
y
|
|
19196
19197
|
},
|
|
19197
19198
|
className: cn(
|
|
@@ -19432,7 +19433,7 @@ function EventDialog({
|
|
|
19432
19433
|
}
|
|
19433
19434
|
};
|
|
19434
19435
|
const handleTypeChange = (type) => {
|
|
19435
|
-
const selectedType = EVENT_TYPES.find((
|
|
19436
|
+
const selectedType = EVENT_TYPES.find((t) => t.value === type);
|
|
19436
19437
|
setFormData((prev) => ({
|
|
19437
19438
|
...prev,
|
|
19438
19439
|
type,
|
|
@@ -19946,7 +19947,7 @@ function CalendarInternal({
|
|
|
19946
19947
|
return dayOfWeek !== 0 && dayOfWeek !== 6;
|
|
19947
19948
|
});
|
|
19948
19949
|
const orderedDaysOfWeek = [...DAYS_OF_WEEK.slice(firstDayOfWeek), ...DAYS_OF_WEEK.slice(0, firstDayOfWeek)];
|
|
19949
|
-
const visibleDaysOfWeek = showWeekends ? orderedDaysOfWeek : orderedDaysOfWeek.filter((
|
|
19950
|
+
const visibleDaysOfWeek = showWeekends ? orderedDaysOfWeek : orderedDaysOfWeek.filter((_, index2) => {
|
|
19950
19951
|
const actualDay = (index2 + firstDayOfWeek) % 7;
|
|
19951
19952
|
return actualDay !== 0 && actualDay !== 6;
|
|
19952
19953
|
});
|
|
@@ -19988,7 +19989,7 @@ function CalendarInternal({
|
|
|
19988
19989
|
] }),
|
|
19989
19990
|
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-7 gap-1 text-xs", children: [
|
|
19990
19991
|
["S", "M", "T", "W", "T", "F", "S"].map((day, index2) => /* @__PURE__ */ jsx("div", { className: "text-center text-muted-foreground", children: day }, `mini-day-${index2}`)),
|
|
19991
|
-
Array.from({ length: 35 }, (
|
|
19992
|
+
Array.from({ length: 35 }, (_, i) => {
|
|
19992
19993
|
const date = new Date(miniCalendarDate.getFullYear(), miniCalendarDate.getMonth(), i - new Date(miniCalendarDate.getFullYear(), miniCalendarDate.getMonth(), 1).getDay() + 1);
|
|
19993
19994
|
const isCurrentMonth2 = date.getMonth() === miniCalendarDate.getMonth();
|
|
19994
19995
|
const isToday3 = date.toDateString() === today.toDateString();
|
|
@@ -20233,7 +20234,7 @@ function CalendarInternal({
|
|
|
20233
20234
|
view === "week" && /* @__PURE__ */ jsxs("div", { className: "flex-1 flex flex-col space-y-4", children: [
|
|
20234
20235
|
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-8 gap-2", children: [
|
|
20235
20236
|
/* @__PURE__ */ jsx("div", { className: "text-xs font-medium text-muted-foreground", children: "Time" }),
|
|
20236
|
-
Array.from({ length: 7 }, (
|
|
20237
|
+
Array.from({ length: 7 }, (_, i) => {
|
|
20237
20238
|
const date = new Date(currentDate);
|
|
20238
20239
|
date.setDate(date.getDate() - date.getDay() + i);
|
|
20239
20240
|
return /* @__PURE__ */ jsxs("div", { className: "text-center", children: [
|
|
@@ -20245,9 +20246,9 @@ function CalendarInternal({
|
|
|
20245
20246
|
] }, i);
|
|
20246
20247
|
})
|
|
20247
20248
|
] }),
|
|
20248
|
-
/* @__PURE__ */ jsx("div", { className: "border rounded-lg overflow-hidden flex-1 flex flex-col", children: /* @__PURE__ */ jsx("div", { className: "flex-1 overflow-y-auto", children: Array.from({ length: 24 }, (
|
|
20249
|
+
/* @__PURE__ */ jsx("div", { className: "border rounded-lg overflow-hidden flex-1 flex flex-col", children: /* @__PURE__ */ jsx("div", { className: "flex-1 overflow-y-auto", children: Array.from({ length: 24 }, (_, hour) => /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-8 border-b last:border-b-0", children: [
|
|
20249
20250
|
/* @__PURE__ */ jsx("div", { className: "p-2 text-xs text-muted-foreground border-r", children: formatTime2(`${hour.toString().padStart(2, "0")}:00`) }),
|
|
20250
|
-
Array.from({ length: 7 }, (
|
|
20251
|
+
Array.from({ length: 7 }, (_2, dayIndex) => {
|
|
20251
20252
|
const date = new Date(currentDate);
|
|
20252
20253
|
date.setDate(date.getDate() - date.getDay() + dayIndex);
|
|
20253
20254
|
const hourEvents = getEventsForDate(date).filter((event) => {
|
|
@@ -20292,7 +20293,7 @@ function CalendarInternal({
|
|
|
20292
20293
|
month: "long",
|
|
20293
20294
|
day: "numeric"
|
|
20294
20295
|
}) }) }),
|
|
20295
|
-
/* @__PURE__ */ jsx("div", { className: "border rounded-lg overflow-hidden flex-1 flex flex-col", children: /* @__PURE__ */ jsx("div", { className: "flex-1 overflow-y-auto", children: Array.from({ length: 24 }, (
|
|
20296
|
+
/* @__PURE__ */ jsx("div", { className: "border rounded-lg overflow-hidden flex-1 flex flex-col", children: /* @__PURE__ */ jsx("div", { className: "flex-1 overflow-y-auto", children: Array.from({ length: 24 }, (_, hour) => {
|
|
20296
20297
|
const hourEvents = getEventsForDate(currentDate).filter((event) => {
|
|
20297
20298
|
if (!event.startTime)
|
|
20298
20299
|
return false;
|
|
@@ -20355,7 +20356,7 @@ function CalendarInternal({
|
|
|
20355
20356
|
] }, hour);
|
|
20356
20357
|
}) }) })
|
|
20357
20358
|
] }),
|
|
20358
|
-
view === "agenda" && /* @__PURE__ */ jsx("div", { className: "flex-1 flex flex-col space-y-4", children: /* @__PURE__ */ jsx("div", { className: "flex-1 overflow-y-auto space-y-4", children: Array.from({ length: 30 }, (
|
|
20359
|
+
view === "agenda" && /* @__PURE__ */ jsx("div", { className: "flex-1 flex flex-col space-y-4", children: /* @__PURE__ */ jsx("div", { className: "flex-1 overflow-y-auto space-y-4", children: Array.from({ length: 30 }, (_, i) => {
|
|
20359
20360
|
const date = new Date(currentDate);
|
|
20360
20361
|
date.setDate(date.getDate() + i);
|
|
20361
20362
|
const dayEvents = getEventsForDate(date);
|
|
@@ -21237,7 +21238,7 @@ function AddCardModal({
|
|
|
21237
21238
|
setTagInput("");
|
|
21238
21239
|
}
|
|
21239
21240
|
};
|
|
21240
|
-
[...CARD_TEMPLATES.map((
|
|
21241
|
+
[...CARD_TEMPLATES.map((t) => ({ ...t.template, name: t.name, icon: t.icon })), ...templates];
|
|
21241
21242
|
return /* @__PURE__ */ jsx(MoonUIDialogPro, { open: isOpen, onOpenChange: onClose, children: /* @__PURE__ */ jsxs(MoonUIDialogContentPro, { className: "max-w-2xl", children: [
|
|
21242
21243
|
/* @__PURE__ */ jsx(MoonUIDialogHeaderPro, { children: /* @__PURE__ */ jsxs(MoonUIDialogTitlePro, { children: [
|
|
21243
21244
|
"Add Card to ",
|
|
@@ -21456,7 +21457,7 @@ function AddCardModal({
|
|
|
21456
21457
|
{
|
|
21457
21458
|
variant: "secondary",
|
|
21458
21459
|
className: "cursor-pointer",
|
|
21459
|
-
onClick: () => setTags(tags.filter((
|
|
21460
|
+
onClick: () => setTags(tags.filter((t) => t !== tag)),
|
|
21460
21461
|
children: [
|
|
21461
21462
|
tag,
|
|
21462
21463
|
/* @__PURE__ */ jsx("span", { className: "ml-1 hover:text-destructive", children: "\xD7" })
|
|
@@ -21714,7 +21715,7 @@ var KanbanCardComponent = ({
|
|
|
21714
21715
|
"dark:shadow-[2px_0_10px_rgba(139,92,246,0.3)]"
|
|
21715
21716
|
),
|
|
21716
21717
|
onPointerDown: (e) => dragControls.start(e),
|
|
21717
|
-
children: /* @__PURE__ */ jsx("div", { className: "absolute inset-y-0 left-1/2 -translate-x-1/2 flex flex-col justify-center gap-1 opacity-60", children: [...Array(3)].map((
|
|
21718
|
+
children: /* @__PURE__ */ jsx("div", { className: "absolute inset-y-0 left-1/2 -translate-x-1/2 flex flex-col justify-center gap-1 opacity-60", children: [...Array(3)].map((_, i) => /* @__PURE__ */ jsx("div", { className: "w-0.5 h-0.5 rounded-full bg-primary" }, i)) })
|
|
21718
21719
|
}
|
|
21719
21720
|
),
|
|
21720
21721
|
cardShowCoverImage && card.coverImage && /* @__PURE__ */ jsxs("div", { className: "relative h-32 -mx-px -mt-px rounded-t-lg overflow-hidden", children: [
|
|
@@ -22049,10 +22050,10 @@ function KanbanInternal({
|
|
|
22049
22050
|
if (!container)
|
|
22050
22051
|
return;
|
|
22051
22052
|
const rect = container.getBoundingClientRect();
|
|
22052
|
-
const
|
|
22053
|
-
if (
|
|
22053
|
+
const x = e.clientX;
|
|
22054
|
+
if (x < rect.left + 100) {
|
|
22054
22055
|
startAutoScroll("left");
|
|
22055
|
-
} else if (
|
|
22056
|
+
} else if (x > rect.right - 100) {
|
|
22056
22057
|
startAutoScroll("right");
|
|
22057
22058
|
} else {
|
|
22058
22059
|
stopAutoScroll();
|
|
@@ -23502,7 +23503,7 @@ var Mark = class {
|
|
|
23502
23503
|
*/
|
|
23503
23504
|
toJSON() {
|
|
23504
23505
|
let obj = { type: this.type.name };
|
|
23505
|
-
for (let
|
|
23506
|
+
for (let _ in this.attrs) {
|
|
23506
23507
|
obj.attrs = this.attrs;
|
|
23507
23508
|
break;
|
|
23508
23509
|
}
|
|
@@ -24450,7 +24451,7 @@ var Node2 = class {
|
|
|
24450
24451
|
*/
|
|
24451
24452
|
toJSON() {
|
|
24452
24453
|
let obj = { type: this.type.name };
|
|
24453
|
-
for (let
|
|
24454
|
+
for (let _ in this.attrs) {
|
|
24454
24455
|
obj.attrs = this.attrs;
|
|
24455
24456
|
break;
|
|
24456
24457
|
}
|
|
@@ -25179,7 +25180,7 @@ var NodeType = class {
|
|
|
25179
25180
|
throw new RangeError("Schema is missing its top node type ('" + topType + "')");
|
|
25180
25181
|
if (!result.text)
|
|
25181
25182
|
throw new RangeError("Every schema needs a 'text' type");
|
|
25182
|
-
for (let
|
|
25183
|
+
for (let _ in result.text.attrs)
|
|
25183
25184
|
throw new RangeError("The text node type should not have attributes");
|
|
25184
25185
|
return result;
|
|
25185
25186
|
}
|
|
@@ -28665,7 +28666,7 @@ var Transaction = class extends Transform {
|
|
|
28665
28666
|
and can thus safely be extended.
|
|
28666
28667
|
*/
|
|
28667
28668
|
get isGeneric() {
|
|
28668
|
-
for (let
|
|
28669
|
+
for (let _ in this.meta)
|
|
28669
28670
|
return false;
|
|
28670
28671
|
return true;
|
|
28671
28672
|
}
|
|
@@ -29106,17 +29107,17 @@ function deepActiveElement(doc3) {
|
|
|
29106
29107
|
elt = elt.shadowRoot.activeElement;
|
|
29107
29108
|
return elt;
|
|
29108
29109
|
}
|
|
29109
|
-
function caretFromPoint(doc3,
|
|
29110
|
+
function caretFromPoint(doc3, x, y) {
|
|
29110
29111
|
if (doc3.caretPositionFromPoint) {
|
|
29111
29112
|
try {
|
|
29112
|
-
let pos = doc3.caretPositionFromPoint(
|
|
29113
|
+
let pos = doc3.caretPositionFromPoint(x, y);
|
|
29113
29114
|
if (pos)
|
|
29114
29115
|
return { node: pos.offsetNode, offset: Math.min(nodeSize(pos.offsetNode), pos.offset) };
|
|
29115
|
-
} catch (
|
|
29116
|
+
} catch (_) {
|
|
29116
29117
|
}
|
|
29117
29118
|
}
|
|
29118
29119
|
if (doc3.caretRangeFromPoint) {
|
|
29119
|
-
let range = doc3.caretRangeFromPoint(
|
|
29120
|
+
let range = doc3.caretRangeFromPoint(x, y);
|
|
29120
29121
|
if (range)
|
|
29121
29122
|
return { node: range.startContainer, offset: Math.min(nodeSize(range.startContainer), range.startOffset) };
|
|
29122
29123
|
}
|
|
@@ -29215,8 +29216,8 @@ function scrollRectIntoView(view, rect, startDOM) {
|
|
|
29215
29216
|
function storeScrollPos(view) {
|
|
29216
29217
|
let rect = view.dom.getBoundingClientRect(), startY = Math.max(0, rect.top);
|
|
29217
29218
|
let refDOM, refTop;
|
|
29218
|
-
for (let
|
|
29219
|
-
let dom = view.root.elementFromPoint(
|
|
29219
|
+
for (let x = (rect.left + rect.right) / 2, y = startY + 1; y < Math.min(innerHeight, rect.bottom); y += 5) {
|
|
29220
|
+
let dom = view.root.elementFromPoint(x, y);
|
|
29220
29221
|
if (!dom || dom == view.dom || !view.dom.contains(dom))
|
|
29221
29222
|
continue;
|
|
29222
29223
|
let localRect = dom.getBoundingClientRect();
|
|
@@ -29512,8 +29513,8 @@ function coordsAtPos(view, pos, side) {
|
|
|
29512
29513
|
function flattenV(rect, left) {
|
|
29513
29514
|
if (rect.width == 0)
|
|
29514
29515
|
return rect;
|
|
29515
|
-
let
|
|
29516
|
-
return { top: rect.top, bottom: rect.bottom, left:
|
|
29516
|
+
let x = left ? rect.left : rect.right;
|
|
29517
|
+
return { top: rect.top, bottom: rect.bottom, left: x, right: x };
|
|
29517
29518
|
}
|
|
29518
29519
|
function flattenH(rect, top) {
|
|
29519
29520
|
if (rect.height == 0)
|
|
@@ -29591,7 +29592,7 @@ function endOfTextblockHorizontal(view, state, dir) {
|
|
|
29591
29592
|
sel.collapse(anchorNode, anchorOffset);
|
|
29592
29593
|
if (oldNode && (oldNode != anchorNode || oldOff != anchorOffset) && sel.extend)
|
|
29593
29594
|
sel.extend(oldNode, oldOff);
|
|
29594
|
-
} catch (
|
|
29595
|
+
} catch (_) {
|
|
29595
29596
|
}
|
|
29596
29597
|
if (oldBidiLevel != null)
|
|
29597
29598
|
sel.caretBidiLevel = oldBidiLevel;
|
|
@@ -29932,7 +29933,7 @@ var ViewDesc = class {
|
|
|
29932
29933
|
if (anchor != head)
|
|
29933
29934
|
domSel.extend(headDOM.node, headDOM.offset);
|
|
29934
29935
|
domSelExtended = true;
|
|
29935
|
-
} catch (
|
|
29936
|
+
} catch (_) {
|
|
29936
29937
|
}
|
|
29937
29938
|
}
|
|
29938
29939
|
if (!domSelExtended) {
|
|
@@ -31134,7 +31135,7 @@ function hasSelection(view) {
|
|
|
31134
31135
|
return false;
|
|
31135
31136
|
try {
|
|
31136
31137
|
return view.dom.contains(sel.anchorNode.nodeType == 3 ? sel.anchorNode.parentNode : sel.anchorNode) && (view.editable || view.dom.contains(sel.focusNode.nodeType == 3 ? sel.focusNode.parentNode : sel.focusNode));
|
|
31137
|
-
} catch (
|
|
31138
|
+
} catch (_) {
|
|
31138
31139
|
return false;
|
|
31139
31140
|
}
|
|
31140
31141
|
}
|
|
@@ -32311,7 +32312,7 @@ handlers.dragend = (view) => {
|
|
|
32311
32312
|
view.dragging = null;
|
|
32312
32313
|
}, 50);
|
|
32313
32314
|
};
|
|
32314
|
-
editHandlers.dragover = editHandlers.dragenter = (
|
|
32315
|
+
editHandlers.dragover = editHandlers.dragenter = (_, e) => e.preventDefault();
|
|
32315
32316
|
editHandlers.drop = (view, _event) => {
|
|
32316
32317
|
let event = _event;
|
|
32317
32318
|
let dragging = view.dragging;
|
|
@@ -32455,7 +32456,7 @@ var InlineType = class {
|
|
|
32455
32456
|
let to = mapping.map(span.to + oldOffset, this.spec.inclusiveEnd ? 1 : -1) - offset4;
|
|
32456
32457
|
return from2 >= to ? null : new Decoration(from2, to, this);
|
|
32457
32458
|
}
|
|
32458
|
-
valid(
|
|
32459
|
+
valid(_, span) {
|
|
32459
32460
|
return span.from < span.to;
|
|
32460
32461
|
}
|
|
32461
32462
|
eq(other) {
|
|
@@ -34138,7 +34139,7 @@ function changedNodeViews(a, b) {
|
|
|
34138
34139
|
return true;
|
|
34139
34140
|
nA++;
|
|
34140
34141
|
}
|
|
34141
|
-
for (let
|
|
34142
|
+
for (let _ in b)
|
|
34142
34143
|
nB++;
|
|
34143
34144
|
return nA != nB;
|
|
34144
34145
|
}
|
|
@@ -35748,7 +35749,7 @@ function removeDuplicates(array, by = JSON.stringify) {
|
|
|
35748
35749
|
function simplifyChangedRanges(changes) {
|
|
35749
35750
|
const uniqueChanges = removeDuplicates(changes);
|
|
35750
35751
|
return uniqueChanges.length === 1 ? uniqueChanges : uniqueChanges.filter((change, index2) => {
|
|
35751
|
-
const rest = uniqueChanges.filter((
|
|
35752
|
+
const rest = uniqueChanges.filter((_, i) => i !== index2);
|
|
35752
35753
|
return !rest.some((otherChange) => {
|
|
35753
35754
|
return change.oldRange.from >= otherChange.oldRange.from && change.oldRange.to <= otherChange.oldRange.to && change.newRange.from >= otherChange.newRange.from && change.newRange.to <= otherChange.newRange.to;
|
|
35754
35755
|
});
|
|
@@ -38193,7 +38194,7 @@ var Drop = Extension.create({
|
|
|
38193
38194
|
new Plugin({
|
|
38194
38195
|
key: new PluginKey("tiptapDrop"),
|
|
38195
38196
|
props: {
|
|
38196
|
-
handleDrop: (
|
|
38197
|
+
handleDrop: (_, e, slice2, moved) => {
|
|
38197
38198
|
this.editor.emit("drop", {
|
|
38198
38199
|
editor: this.editor,
|
|
38199
38200
|
event: e,
|
|
@@ -40735,7 +40736,7 @@ function registerGroup(name, groups) {
|
|
|
40735
40736
|
}
|
|
40736
40737
|
return groups[name];
|
|
40737
40738
|
}
|
|
40738
|
-
function addToGroups(
|
|
40739
|
+
function addToGroups(t, flags, groups) {
|
|
40739
40740
|
if (flags[numeric]) {
|
|
40740
40741
|
flags[asciinumeric] = true;
|
|
40741
40742
|
flags[alphanumeric] = true;
|
|
@@ -40758,15 +40759,15 @@ function addToGroups(t2, flags, groups) {
|
|
|
40758
40759
|
}
|
|
40759
40760
|
for (const k in flags) {
|
|
40760
40761
|
const group = registerGroup(k, groups);
|
|
40761
|
-
if (group.indexOf(
|
|
40762
|
-
group.push(
|
|
40762
|
+
if (group.indexOf(t) < 0) {
|
|
40763
|
+
group.push(t);
|
|
40763
40764
|
}
|
|
40764
40765
|
}
|
|
40765
40766
|
}
|
|
40766
|
-
function flagsForToken(
|
|
40767
|
+
function flagsForToken(t, groups) {
|
|
40767
40768
|
const result = {};
|
|
40768
40769
|
for (const c2 in groups) {
|
|
40769
|
-
if (groups[c2].indexOf(
|
|
40770
|
+
if (groups[c2].indexOf(t) >= 0) {
|
|
40770
40771
|
result[c2] = true;
|
|
40771
40772
|
}
|
|
40772
40773
|
}
|
|
@@ -40904,7 +40905,7 @@ State.prototype = {
|
|
|
40904
40905
|
state.j[input] = next;
|
|
40905
40906
|
return next;
|
|
40906
40907
|
}
|
|
40907
|
-
const
|
|
40908
|
+
const t = next;
|
|
40908
40909
|
let nextState, templateState = state.go(input);
|
|
40909
40910
|
if (templateState) {
|
|
40910
40911
|
nextState = new State();
|
|
@@ -40915,16 +40916,16 @@ State.prototype = {
|
|
|
40915
40916
|
} else {
|
|
40916
40917
|
nextState = new State();
|
|
40917
40918
|
}
|
|
40918
|
-
if (
|
|
40919
|
+
if (t) {
|
|
40919
40920
|
if (groups) {
|
|
40920
40921
|
if (nextState.t && typeof nextState.t === "string") {
|
|
40921
40922
|
const allFlags = Object.assign(flagsForToken(nextState.t, groups), flags);
|
|
40922
|
-
addToGroups(
|
|
40923
|
+
addToGroups(t, allFlags, groups);
|
|
40923
40924
|
} else if (flags) {
|
|
40924
|
-
addToGroups(
|
|
40925
|
+
addToGroups(t, flags, groups);
|
|
40925
40926
|
}
|
|
40926
40927
|
}
|
|
40927
|
-
nextState.t =
|
|
40928
|
+
nextState.t = t;
|
|
40928
40929
|
}
|
|
40929
40930
|
state.j[input] = nextState;
|
|
40930
40931
|
return nextState;
|
|
@@ -41279,7 +41280,7 @@ function stringToArray(str) {
|
|
|
41279
41280
|
}
|
|
41280
41281
|
return result;
|
|
41281
41282
|
}
|
|
41282
|
-
function fastts(state, input,
|
|
41283
|
+
function fastts(state, input, t, defaultt, jr) {
|
|
41283
41284
|
let next;
|
|
41284
41285
|
const len = input.length;
|
|
41285
41286
|
for (let i = 0; i < len - 1; i++) {
|
|
@@ -41293,7 +41294,7 @@ function fastts(state, input, t2, defaultt, jr) {
|
|
|
41293
41294
|
}
|
|
41294
41295
|
state = next;
|
|
41295
41296
|
}
|
|
41296
|
-
next = new State(
|
|
41297
|
+
next = new State(t);
|
|
41297
41298
|
next.jr = jr.slice();
|
|
41298
41299
|
state.j[input[len - 1]] = next;
|
|
41299
41300
|
return next;
|
|
@@ -41921,7 +41922,7 @@ function autolink(options) {
|
|
|
41921
41922
|
if (!lastWordBeforeSpace) {
|
|
41922
41923
|
return false;
|
|
41923
41924
|
}
|
|
41924
|
-
const linksBeforeSpace = tokenize(lastWordBeforeSpace).map((
|
|
41925
|
+
const linksBeforeSpace = tokenize(lastWordBeforeSpace).map((t) => t.toObject(options.defaultProtocol));
|
|
41925
41926
|
if (!isValidLinkStructure(linksBeforeSpace)) {
|
|
41926
41927
|
return false;
|
|
41927
41928
|
}
|
|
@@ -44181,7 +44182,7 @@ var TrailingNode = Extension.create({
|
|
|
44181
44182
|
return [
|
|
44182
44183
|
new Plugin({
|
|
44183
44184
|
key: plugin,
|
|
44184
|
-
appendTransaction: (
|
|
44185
|
+
appendTransaction: (_, __, state) => {
|
|
44185
44186
|
const { doc: doc3, tr: tr2, schema } = state;
|
|
44186
44187
|
const shouldInsertNodeAtEnd = plugin.getState(state);
|
|
44187
44188
|
const endPosition = doc3.content.size;
|
|
@@ -44192,7 +44193,7 @@ var TrailingNode = Extension.create({
|
|
|
44192
44193
|
return tr2.insert(endPosition, type.create());
|
|
44193
44194
|
},
|
|
44194
44195
|
state: {
|
|
44195
|
-
init: (
|
|
44196
|
+
init: (_, state) => {
|
|
44196
44197
|
const lastNode = state.tr.doc.lastChild;
|
|
44197
44198
|
return !nodeEqualsType({ node: lastNode, types: disabledNodes });
|
|
44198
44199
|
},
|
|
@@ -46266,7 +46267,7 @@ function handleTripleClick2(view, pos) {
|
|
|
46266
46267
|
view.dispatch(view.state.tr.setSelection(new CellSelection($cell)));
|
|
46267
46268
|
return true;
|
|
46268
46269
|
}
|
|
46269
|
-
function handlePaste(view,
|
|
46270
|
+
function handlePaste(view, _, slice2) {
|
|
46270
46271
|
if (!isInTable(view.state))
|
|
46271
46272
|
return false;
|
|
46272
46273
|
let cells = pastedCells(slice2);
|
|
@@ -46481,7 +46482,7 @@ function columnResizing({
|
|
|
46481
46482
|
const plugin = new Plugin({
|
|
46482
46483
|
key: columnResizingPluginKey,
|
|
46483
46484
|
state: {
|
|
46484
|
-
init(
|
|
46485
|
+
init(_, state) {
|
|
46485
46486
|
var _a2, _b;
|
|
46486
46487
|
const nodeViews = (_b = (_a2 = plugin.spec) == null ? void 0 : _a2.props) == null ? void 0 : _b.nodeViews;
|
|
46487
46488
|
const tableName = tableNodeTypes(state.schema).table.name;
|
|
@@ -46799,7 +46800,7 @@ function tableEditing({
|
|
|
46799
46800
|
handleKeyDown: handleKeyDown2,
|
|
46800
46801
|
handlePaste
|
|
46801
46802
|
},
|
|
46802
|
-
appendTransaction(
|
|
46803
|
+
appendTransaction(_, oldState, state) {
|
|
46803
46804
|
return normalizeSelection(
|
|
46804
46805
|
state,
|
|
46805
46806
|
fixTables(state, oldState),
|
|
@@ -47834,7 +47835,7 @@ function LowlightPlugin({
|
|
|
47834
47835
|
const lowlightPlugin = new Plugin({
|
|
47835
47836
|
key: new PluginKey("lowlight"),
|
|
47836
47837
|
state: {
|
|
47837
|
-
init: (
|
|
47838
|
+
init: (_, { doc: doc3 }) => getDecorations({
|
|
47838
47839
|
doc: doc3,
|
|
47839
47840
|
name,
|
|
47840
47841
|
lowlight: lowlight2,
|
|
@@ -51835,7 +51836,7 @@ var NUMERIC = {
|
|
|
51835
51836
|
function recurRegex(re, substitution, depth) {
|
|
51836
51837
|
if (depth === -1)
|
|
51837
51838
|
return "";
|
|
51838
|
-
return re.replace(substitution, (
|
|
51839
|
+
return re.replace(substitution, (_) => {
|
|
51839
51840
|
return recurRegex(re, substitution, depth - 1);
|
|
51840
51841
|
});
|
|
51841
51842
|
}
|
|
@@ -52549,7 +52550,7 @@ function javascript(hljs) {
|
|
|
52549
52550
|
...BUILT_IN_GLOBALS,
|
|
52550
52551
|
"super",
|
|
52551
52552
|
"import"
|
|
52552
|
-
].map((
|
|
52553
|
+
].map((x) => `${x}\\s*\\(`)),
|
|
52553
52554
|
IDENT_RE$1,
|
|
52554
52555
|
regex.lookahead(/\s*\(/)
|
|
52555
52556
|
),
|
|
@@ -58768,7 +58769,7 @@ function sql(hljs) {
|
|
|
58768
58769
|
illegal: /[{}]|<\//,
|
|
58769
58770
|
keywords: {
|
|
58770
58771
|
$pattern: /\b[\w\.]+/,
|
|
58771
|
-
keyword: reduceRelevancy(KEYWORDS3, { when: (
|
|
58772
|
+
keyword: reduceRelevancy(KEYWORDS3, { when: (x) => x.length < 3 }),
|
|
58772
58773
|
literal: LITERALS3,
|
|
58773
58774
|
type: TYPES3,
|
|
58774
58775
|
built_in: POSSIBLE_WITHOUT_PARENS
|
|
@@ -58803,7 +58804,7 @@ function lookahead(re) {
|
|
|
58803
58804
|
return concat("(?=", re, ")");
|
|
58804
58805
|
}
|
|
58805
58806
|
function concat(...args) {
|
|
58806
|
-
const joined = args.map((
|
|
58807
|
+
const joined = args.map((x) => source(x)).join("");
|
|
58807
58808
|
return joined;
|
|
58808
58809
|
}
|
|
58809
58810
|
function stripOptionsFromArgs(args) {
|
|
@@ -58817,7 +58818,7 @@ function stripOptionsFromArgs(args) {
|
|
|
58817
58818
|
}
|
|
58818
58819
|
function either(...args) {
|
|
58819
58820
|
const opts = stripOptionsFromArgs(args);
|
|
58820
|
-
const joined = "(" + (opts.capture ? "" : "?:") + args.map((
|
|
58821
|
+
const joined = "(" + (opts.capture ? "" : "?:") + args.map((x) => source(x)).join("|") + ")";
|
|
58821
58822
|
return joined;
|
|
58822
58823
|
}
|
|
58823
58824
|
var keywordWrapper = (keyword) => concat(
|
|
@@ -60157,7 +60158,7 @@ function javascript2(hljs) {
|
|
|
60157
60158
|
...BUILT_IN_GLOBALS2,
|
|
60158
60159
|
"super",
|
|
60159
60160
|
"import"
|
|
60160
|
-
].map((
|
|
60161
|
+
].map((x) => `${x}\\s*\\(`)),
|
|
60161
60162
|
IDENT_RE$1,
|
|
60162
60163
|
regex.lookahead(/\s*\(/)
|
|
60163
60164
|
),
|
|
@@ -64670,7 +64671,7 @@ function useVirtualList(items, initialConfig = {}) {
|
|
|
64670
64671
|
});
|
|
64671
64672
|
}, []);
|
|
64672
64673
|
const selectAll3 = useCallback(() => {
|
|
64673
|
-
setSelectedItems(new Set(Array.from({ length: items.length }, (
|
|
64674
|
+
setSelectedItems(new Set(Array.from({ length: items.length }, (_, i) => i)));
|
|
64674
64675
|
}, [items.length]);
|
|
64675
64676
|
const clearSelection = useCallback(() => {
|
|
64676
64677
|
setSelectedItems(/* @__PURE__ */ new Set());
|
|
@@ -64846,10 +64847,10 @@ var SwipeableCardInternal = React71__default.forwardRef(
|
|
|
64846
64847
|
style: style2,
|
|
64847
64848
|
...props
|
|
64848
64849
|
}, ref) => {
|
|
64849
|
-
const
|
|
64850
|
-
const rotate = useTransform(
|
|
64851
|
-
const likeOpacity = useTransform(
|
|
64852
|
-
const nopeOpacity = useTransform(
|
|
64850
|
+
const x = useMotionValue(0);
|
|
64851
|
+
const rotate = useTransform(x, [-200, 200], [-30, 30]);
|
|
64852
|
+
const likeOpacity = useTransform(x, [0, threshold], [0, 1]);
|
|
64853
|
+
const nopeOpacity = useTransform(x, [-threshold, 0], [1, 0]);
|
|
64853
64854
|
const handleDragStart = () => {
|
|
64854
64855
|
if (disabled)
|
|
64855
64856
|
return;
|
|
@@ -64862,14 +64863,14 @@ var SwipeableCardInternal = React71__default.forwardRef(
|
|
|
64862
64863
|
if (Math.abs(info.offset.x) > threshold) {
|
|
64863
64864
|
const direction = info.offset.x > 0 ? "right" : "left";
|
|
64864
64865
|
const exitX = info.offset.x > 0 ? 400 : -400;
|
|
64865
|
-
animate(
|
|
64866
|
+
animate(x, exitX, { duration: 0.3 });
|
|
64866
64867
|
if (direction === "right" && onSwipeRight) {
|
|
64867
64868
|
onSwipeRight();
|
|
64868
64869
|
} else if (direction === "left" && onSwipeLeft) {
|
|
64869
64870
|
onSwipeLeft();
|
|
64870
64871
|
}
|
|
64871
64872
|
} else {
|
|
64872
|
-
animate(
|
|
64873
|
+
animate(x, 0, { type: "spring", stiffness: 300, damping: 20 });
|
|
64873
64874
|
}
|
|
64874
64875
|
};
|
|
64875
64876
|
return /* @__PURE__ */ jsxs(
|
|
@@ -64878,7 +64879,7 @@ var SwipeableCardInternal = React71__default.forwardRef(
|
|
|
64878
64879
|
ref,
|
|
64879
64880
|
drag: disabled ? false : "x",
|
|
64880
64881
|
dragConstraints: { left: -300, right: 300 },
|
|
64881
|
-
style: { x
|
|
64882
|
+
style: { x, rotate, ...style2 },
|
|
64882
64883
|
onDragStart: handleDragStart,
|
|
64883
64884
|
onDragEnd: handleDragEnd,
|
|
64884
64885
|
className: cn(
|
|
@@ -66245,7 +66246,7 @@ var SparklinePreview = ({ data, dataKey, color }) => {
|
|
|
66245
66246
|
}
|
|
66246
66247
|
) });
|
|
66247
66248
|
};
|
|
66248
|
-
var ChartSkeleton = ({ height }) => /* @__PURE__ */ jsx("div", { className: "w-full", style: { height }, children: /* @__PURE__ */ jsx("div", { className: "flex items-end justify-center h-full gap-2 px-8", children: [...Array(8)].map((
|
|
66249
|
+
var ChartSkeleton = ({ height }) => /* @__PURE__ */ jsx("div", { className: "w-full", style: { height }, children: /* @__PURE__ */ jsx("div", { className: "flex items-end justify-center h-full gap-2 px-8", children: [...Array(8)].map((_, i) => /* @__PURE__ */ jsx(
|
|
66249
66250
|
motion.div,
|
|
66250
66251
|
{
|
|
66251
66252
|
initial: { height: 0 },
|
|
@@ -67248,9 +67249,9 @@ function MetricCard({
|
|
|
67248
67249
|
const min2 = Math.min(...data.sparkline);
|
|
67249
67250
|
const range = max2 - min2 || 1;
|
|
67250
67251
|
const points = data.sparkline.map((value, index2) => {
|
|
67251
|
-
const
|
|
67252
|
+
const x = index2 / (data.sparkline.length - 1) * 100;
|
|
67252
67253
|
const y = 100 - (value - min2) / range * 100;
|
|
67253
|
-
return `${
|
|
67254
|
+
return `${x},${y}`;
|
|
67254
67255
|
}).join(" ");
|
|
67255
67256
|
const gradientId = `gradient-${data.id}`;
|
|
67256
67257
|
return /* @__PURE__ */ jsx(
|
|
@@ -68075,7 +68076,7 @@ function ActivityFeed({
|
|
|
68075
68076
|
animate: { opacity: 1 },
|
|
68076
68077
|
exit: { opacity: 0 },
|
|
68077
68078
|
className: "space-y-3",
|
|
68078
|
-
children: [...Array(5)].map((
|
|
68079
|
+
children: [...Array(5)].map((_, i) => /* @__PURE__ */ jsxs("div", { className: "flex gap-3", children: [
|
|
68079
68080
|
/* @__PURE__ */ jsx("div", { className: "h-8 w-8 rounded-full bg-muted animate-pulse" }),
|
|
68080
68081
|
/* @__PURE__ */ jsxs("div", { className: "flex-1 space-y-2", children: [
|
|
68081
68082
|
/* @__PURE__ */ jsx("div", { className: "h-4 bg-muted rounded animate-pulse" }),
|
|
@@ -69087,13 +69088,13 @@ function MapWidget({
|
|
|
69087
69088
|
className: "relative w-full h-full",
|
|
69088
69089
|
style: { transform: `scale(${zoom})` },
|
|
69089
69090
|
children: locations.map((location, index2) => {
|
|
69090
|
-
const
|
|
69091
|
+
const x = (location.lng + 180) / 360 * 100;
|
|
69091
69092
|
const y = (90 - location.lat) / 180 * 100;
|
|
69092
69093
|
return /* @__PURE__ */ jsxs(
|
|
69093
69094
|
motion.div,
|
|
69094
69095
|
{
|
|
69095
69096
|
className: "absolute",
|
|
69096
|
-
style: { left: `${
|
|
69097
|
+
style: { left: `${x}%`, top: `${y}%` },
|
|
69097
69098
|
initial: { scale: 0 },
|
|
69098
69099
|
animate: { scale: 1 },
|
|
69099
69100
|
transition: { delay: index2 * 0.05 },
|
|
@@ -71182,7 +71183,7 @@ var AdvancedFormsInternal = ({
|
|
|
71182
71183
|
[fieldName]: newFiles
|
|
71183
71184
|
};
|
|
71184
71185
|
});
|
|
71185
|
-
setValue(fieldName, uploadedFiles[fieldName]?.filter((
|
|
71186
|
+
setValue(fieldName, uploadedFiles[fieldName]?.filter((_, i) => i !== index2) || []);
|
|
71186
71187
|
};
|
|
71187
71188
|
const renderField = (field, index2) => {
|
|
71188
71189
|
const error = errors[field.name];
|
|
@@ -72800,7 +72801,7 @@ var GitHubStarsInternal = ({
|
|
|
72800
72801
|
] }),
|
|
72801
72802
|
/* @__PURE__ */ jsx("div", { className: cn(
|
|
72802
72803
|
layout === "grid" ? "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4" : "space-y-4"
|
|
72803
|
-
), children: Array.from({ length: maxItems || 6 }).map((
|
|
72804
|
+
), children: Array.from({ length: maxItems || 6 }).map((_, index2) => /* @__PURE__ */ jsx(MoonUICardPro, { children: /* @__PURE__ */ jsx(MoonUICardContentPro, { className: "p-4", children: /* @__PURE__ */ jsxs("div", { className: "space-y-3", children: [
|
|
72804
72805
|
/* @__PURE__ */ jsx(MoonUISkeletonPro, { className: "h-5 w-3/4" }),
|
|
72805
72806
|
/* @__PURE__ */ jsx(MoonUISkeletonPro, { className: "h-4 w-full" }),
|
|
72806
72807
|
/* @__PURE__ */ jsx(MoonUISkeletonPro, { className: "h-4 w-2/3" }),
|
|
@@ -75531,7 +75532,7 @@ var MoonUIFileUploadPro = React71__default.forwardRef(
|
|
|
75531
75532
|
return `File type ${file.type} is not supported`;
|
|
75532
75533
|
}
|
|
75533
75534
|
if (accept !== "*") {
|
|
75534
|
-
const acceptTypes = accept.split(",").map((
|
|
75535
|
+
const acceptTypes = accept.split(",").map((t) => t.trim());
|
|
75535
75536
|
const isAccepted = acceptTypes.some((acceptType) => {
|
|
75536
75537
|
if (acceptType.includes("*")) {
|
|
75537
75538
|
return file.type.startsWith(acceptType.replace("*", ""));
|
|
@@ -76833,7 +76834,7 @@ function DataTableFilterDrawer({
|
|
|
76833
76834
|
setFilters(newFilters);
|
|
76834
76835
|
};
|
|
76835
76836
|
const removeFilter = (index2) => {
|
|
76836
|
-
setFilters(filters.filter((
|
|
76837
|
+
setFilters(filters.filter((_, i) => i !== index2));
|
|
76837
76838
|
};
|
|
76838
76839
|
const clearAllFilters = () => {
|
|
76839
76840
|
setFilters([]);
|
|
@@ -79141,9 +79142,13 @@ function NavbarInternal({
|
|
|
79141
79142
|
const [isSearchOpen, setIsSearchOpen] = useState(false);
|
|
79142
79143
|
const [isCommandOpen, setIsCommandOpen] = useState(false);
|
|
79143
79144
|
const [searchValue, setSearchValue] = useState("");
|
|
79144
|
-
const [
|
|
79145
|
-
const
|
|
79145
|
+
const [mounted, setMounted] = useState(false);
|
|
79146
|
+
const { theme: currentTheme, setTheme } = useTheme();
|
|
79147
|
+
const isDarkMode = mounted && currentTheme === "dark";
|
|
79146
79148
|
const navRef = useRef(null);
|
|
79149
|
+
useEffect(() => {
|
|
79150
|
+
setMounted(true);
|
|
79151
|
+
}, []);
|
|
79147
79152
|
const shouldPushContent = pushContent ?? (sticky && !overlayMode);
|
|
79148
79153
|
const { scrolled, hidden, scrollProgress, isMinimal } = useNavbarScroll({
|
|
79149
79154
|
sticky,
|
|
@@ -79177,27 +79182,6 @@ function NavbarInternal({
|
|
|
79177
79182
|
window.addEventListener("resize", checkMobile);
|
|
79178
79183
|
return () => window.removeEventListener("resize", checkMobile);
|
|
79179
79184
|
}, [mobileBreakpoint]);
|
|
79180
|
-
useEffect(() => {
|
|
79181
|
-
if (typeof window !== "undefined") {
|
|
79182
|
-
const root = window.document.documentElement;
|
|
79183
|
-
const isDark = root.classList.contains("dark");
|
|
79184
|
-
const currentDomTheme = isDark ? "dark" : "light";
|
|
79185
|
-
setCurrentTheme(theme || currentDomTheme);
|
|
79186
|
-
setIsDarkMode(isDark);
|
|
79187
|
-
const observer = new MutationObserver((mutations) => {
|
|
79188
|
-
mutations.forEach((mutation) => {
|
|
79189
|
-
if (mutation.attributeName === "class") {
|
|
79190
|
-
const isDark2 = root.classList.contains("dark");
|
|
79191
|
-
setIsDarkMode(isDark2);
|
|
79192
|
-
}
|
|
79193
|
-
});
|
|
79194
|
-
});
|
|
79195
|
-
observer.observe(root, { attributes: true });
|
|
79196
|
-
return () => observer.disconnect();
|
|
79197
|
-
} else {
|
|
79198
|
-
setCurrentTheme(theme);
|
|
79199
|
-
}
|
|
79200
|
-
}, [theme]);
|
|
79201
79185
|
useEffect(() => {
|
|
79202
79186
|
if (!keyboardShortcuts && !enableCommandAI)
|
|
79203
79187
|
return;
|
|
@@ -79218,9 +79202,9 @@ function NavbarInternal({
|
|
|
79218
79202
|
return null;
|
|
79219
79203
|
const isScrolled = framerScroll.isScrolled || scrolled;
|
|
79220
79204
|
const scrollLogo = isScrolled && branding.logoSmall ? branding.logoSmall : null;
|
|
79221
|
-
const themeLogo = isDarkMode ? branding.logoDark || null : branding.logoLight || null;
|
|
79205
|
+
const themeLogo = mounted ? isDarkMode ? branding.logoDark || null : branding.logoLight || null : null;
|
|
79222
79206
|
return scrollLogo || themeLogo || branding.logo;
|
|
79223
|
-
}, [branding, framerScroll.isScrolled, scrolled, isDarkMode]);
|
|
79207
|
+
}, [branding, framerScroll.isScrolled, scrolled, isDarkMode, mounted]);
|
|
79224
79208
|
const handleItemClick = useCallback(
|
|
79225
79209
|
(item) => {
|
|
79226
79210
|
if (item.action) {
|
|
@@ -79817,21 +79801,11 @@ function NavbarInternal({
|
|
|
79817
79801
|
size: getSizeClasses().buttonSize,
|
|
79818
79802
|
onClick: () => {
|
|
79819
79803
|
const newTheme = currentTheme === "dark" ? "light" : "dark";
|
|
79820
|
-
|
|
79804
|
+
setTheme(newTheme);
|
|
79821
79805
|
onThemeChange?.(newTheme);
|
|
79822
|
-
if (typeof window !== "undefined") {
|
|
79823
|
-
const root = window.document.documentElement;
|
|
79824
|
-
root.classList.remove(
|
|
79825
|
-
"light",
|
|
79826
|
-
"dark"
|
|
79827
|
-
);
|
|
79828
|
-
root.classList.add(
|
|
79829
|
-
newTheme
|
|
79830
|
-
);
|
|
79831
|
-
}
|
|
79832
79806
|
},
|
|
79833
79807
|
className: "relative overflow-hidden",
|
|
79834
|
-
children: /* @__PURE__ */ jsx(AnimatePresence, { mode: "wait", children: currentTheme === "dark" ? /* @__PURE__ */ jsx(
|
|
79808
|
+
children: /* @__PURE__ */ jsx(AnimatePresence, { mode: "wait", children: mounted && currentTheme === "dark" ? /* @__PURE__ */ jsx(
|
|
79835
79809
|
motion.div,
|
|
79836
79810
|
{
|
|
79837
79811
|
initial: {
|
|
@@ -79897,9 +79871,10 @@ function NavbarInternal({
|
|
|
79897
79871
|
variant: "ghost",
|
|
79898
79872
|
size: "icon",
|
|
79899
79873
|
children: [
|
|
79900
|
-
|
|
79901
|
-
currentTheme === "
|
|
79902
|
-
currentTheme === "
|
|
79874
|
+
!mounted && /* @__PURE__ */ jsx(Sun, { className: "h-5 w-5" }),
|
|
79875
|
+
mounted && currentTheme === "light" && /* @__PURE__ */ jsx(Sun, { className: "h-5 w-5" }),
|
|
79876
|
+
mounted && currentTheme === "dark" && /* @__PURE__ */ jsx(Moon, { className: "h-5 w-5" }),
|
|
79877
|
+
mounted && currentTheme === "system" && /* @__PURE__ */ jsx(Monitor, { className: "h-5 w-5" })
|
|
79903
79878
|
]
|
|
79904
79879
|
}
|
|
79905
79880
|
) }),
|
|
@@ -79908,12 +79883,8 @@ function NavbarInternal({
|
|
|
79908
79883
|
MoonUIDropdownMenuItemPro,
|
|
79909
79884
|
{
|
|
79910
79885
|
onClick: () => {
|
|
79911
|
-
|
|
79912
|
-
|
|
79913
|
-
);
|
|
79914
|
-
onThemeChange?.(
|
|
79915
|
-
"light"
|
|
79916
|
-
);
|
|
79886
|
+
setTheme("light");
|
|
79887
|
+
onThemeChange?.("light");
|
|
79917
79888
|
},
|
|
79918
79889
|
children: [
|
|
79919
79890
|
/* @__PURE__ */ jsx(Sun, { className: "mr-2 h-4 w-4" }),
|
|
@@ -79925,7 +79896,7 @@ function NavbarInternal({
|
|
|
79925
79896
|
MoonUIDropdownMenuItemPro,
|
|
79926
79897
|
{
|
|
79927
79898
|
onClick: () => {
|
|
79928
|
-
|
|
79899
|
+
setTheme("dark");
|
|
79929
79900
|
onThemeChange?.("dark");
|
|
79930
79901
|
},
|
|
79931
79902
|
children: [
|
|
@@ -79938,12 +79909,8 @@ function NavbarInternal({
|
|
|
79938
79909
|
MoonUIDropdownMenuItemPro,
|
|
79939
79910
|
{
|
|
79940
79911
|
onClick: () => {
|
|
79941
|
-
|
|
79942
|
-
|
|
79943
|
-
);
|
|
79944
|
-
onThemeChange?.(
|
|
79945
|
-
"system"
|
|
79946
|
-
);
|
|
79912
|
+
setTheme("system");
|
|
79913
|
+
onThemeChange?.("system");
|
|
79947
79914
|
},
|
|
79948
79915
|
children: [
|
|
79949
79916
|
/* @__PURE__ */ jsx(Monitor, { className: "mr-2 h-4 w-4" }),
|
|
@@ -80395,21 +80362,11 @@ function NavbarInternal({
|
|
|
80395
80362
|
size: getSizeClasses().buttonSize,
|
|
80396
80363
|
onClick: () => {
|
|
80397
80364
|
const newTheme = currentTheme === "dark" ? "light" : "dark";
|
|
80398
|
-
|
|
80365
|
+
setTheme(newTheme);
|
|
80399
80366
|
onThemeChange?.(newTheme);
|
|
80400
|
-
if (typeof window !== "undefined") {
|
|
80401
|
-
const root = window.document.documentElement;
|
|
80402
|
-
root.classList.remove(
|
|
80403
|
-
"light",
|
|
80404
|
-
"dark"
|
|
80405
|
-
);
|
|
80406
|
-
root.classList.add(
|
|
80407
|
-
newTheme
|
|
80408
|
-
);
|
|
80409
|
-
}
|
|
80410
80367
|
},
|
|
80411
80368
|
className: "relative overflow-hidden",
|
|
80412
|
-
children: /* @__PURE__ */ jsx(AnimatePresence, { mode: "wait", children: currentTheme === "dark" ? /* @__PURE__ */ jsx(
|
|
80369
|
+
children: /* @__PURE__ */ jsx(AnimatePresence, { mode: "wait", children: mounted && currentTheme === "dark" ? /* @__PURE__ */ jsx(
|
|
80413
80370
|
motion.div,
|
|
80414
80371
|
{
|
|
80415
80372
|
initial: {
|
|
@@ -80470,16 +80427,17 @@ function NavbarInternal({
|
|
|
80470
80427
|
}
|
|
80471
80428
|
) : /* @__PURE__ */ jsxs(MoonUIDropdownMenuPro, { children: [
|
|
80472
80429
|
/* @__PURE__ */ jsx(MoonUIDropdownMenuTriggerPro, { asChild: true, children: /* @__PURE__ */ jsxs(MoonUIButtonPro, { variant: "ghost", size: "icon", children: [
|
|
80473
|
-
|
|
80474
|
-
currentTheme === "
|
|
80475
|
-
currentTheme === "
|
|
80430
|
+
!mounted && /* @__PURE__ */ jsx(Sun, { className: "h-5 w-5" }),
|
|
80431
|
+
mounted && currentTheme === "light" && /* @__PURE__ */ jsx(Sun, { className: "h-5 w-5" }),
|
|
80432
|
+
mounted && currentTheme === "dark" && /* @__PURE__ */ jsx(Moon, { className: "h-5 w-5" }),
|
|
80433
|
+
mounted && currentTheme === "system" && /* @__PURE__ */ jsx(Monitor, { className: "h-5 w-5" })
|
|
80476
80434
|
] }) }),
|
|
80477
80435
|
/* @__PURE__ */ jsxs(MoonUIDropdownMenuContentPro, { align: "end", children: [
|
|
80478
80436
|
/* @__PURE__ */ jsxs(
|
|
80479
80437
|
MoonUIDropdownMenuItemPro,
|
|
80480
80438
|
{
|
|
80481
80439
|
onClick: () => {
|
|
80482
|
-
|
|
80440
|
+
setTheme("light");
|
|
80483
80441
|
onThemeChange?.("light");
|
|
80484
80442
|
},
|
|
80485
80443
|
children: [
|
|
@@ -80492,7 +80450,7 @@ function NavbarInternal({
|
|
|
80492
80450
|
MoonUIDropdownMenuItemPro,
|
|
80493
80451
|
{
|
|
80494
80452
|
onClick: () => {
|
|
80495
|
-
|
|
80453
|
+
setTheme("dark");
|
|
80496
80454
|
onThemeChange?.("dark");
|
|
80497
80455
|
},
|
|
80498
80456
|
children: [
|
|
@@ -80505,7 +80463,7 @@ function NavbarInternal({
|
|
|
80505
80463
|
MoonUIDropdownMenuItemPro,
|
|
80506
80464
|
{
|
|
80507
80465
|
onClick: () => {
|
|
80508
|
-
|
|
80466
|
+
setTheme("system");
|
|
80509
80467
|
onThemeChange?.("system");
|
|
80510
80468
|
},
|
|
80511
80469
|
children: [
|
|
@@ -81426,7 +81384,7 @@ var FormWizardProgress = ({
|
|
|
81426
81384
|
"flex items-center justify-center space-x-2",
|
|
81427
81385
|
className
|
|
81428
81386
|
),
|
|
81429
|
-
children: steps.map((
|
|
81387
|
+
children: steps.map((_, index2) => {
|
|
81430
81388
|
const isActive2 = index2 === currentStep;
|
|
81431
81389
|
const isCompleted = isStepCompleted(index2);
|
|
81432
81390
|
return /* @__PURE__ */ jsx(
|
|
@@ -82750,7 +82708,7 @@ var MoonUIQuizFormProInternal = React71__default.forwardRef(({
|
|
|
82750
82708
|
animate: { opacity: 1, y: 0 },
|
|
82751
82709
|
className: "space-y-4",
|
|
82752
82710
|
children: [
|
|
82753
|
-
/* @__PURE__ */ jsx("div", { className: "flex justify-center gap-2", children: Array.from({ length: maxRating }, (
|
|
82711
|
+
/* @__PURE__ */ jsx("div", { className: "flex justify-center gap-2", children: Array.from({ length: maxRating }, (_, i) => i + 1).map((rating) => /* @__PURE__ */ jsx(
|
|
82754
82712
|
"button",
|
|
82755
82713
|
{
|
|
82756
82714
|
onClick: () => saveAnswer(rating),
|
|
@@ -84691,9 +84649,9 @@ function ChartWidget2({
|
|
|
84691
84649
|
const chartWidth = 100 - padding * 2;
|
|
84692
84650
|
const chartHeight = 100 - padding * 2;
|
|
84693
84651
|
const points = values.map((value, index2) => {
|
|
84694
|
-
const
|
|
84652
|
+
const x = padding + index2 / (values.length - 1) * chartWidth;
|
|
84695
84653
|
const y = padding + (chartHeight - value / maxValue * chartHeight);
|
|
84696
|
-
return { x
|
|
84654
|
+
return { x, y, value, label: labels[index2] };
|
|
84697
84655
|
});
|
|
84698
84656
|
const pathData = points.map((point, index2) => `${index2 === 0 ? "M" : "L"} ${point.x} ${point.y}`).join(" ");
|
|
84699
84657
|
return /* @__PURE__ */ jsxs("div", { className: "relative h-full overflow-hidden", children: [
|
|
@@ -86748,12 +86706,12 @@ var ConfettiButtonInternal = ({
|
|
|
86748
86706
|
}) => {
|
|
86749
86707
|
const handleClick2 = (e) => {
|
|
86750
86708
|
const rect = e.currentTarget.getBoundingClientRect();
|
|
86751
|
-
const
|
|
86709
|
+
const x = (rect.left + rect.width / 2) / window.innerWidth;
|
|
86752
86710
|
const y = (rect.top + rect.height / 2) / window.innerHeight;
|
|
86753
86711
|
confetti2({
|
|
86754
86712
|
particleCount: 100,
|
|
86755
86713
|
spread: 70,
|
|
86756
|
-
origin: { x
|
|
86714
|
+
origin: { x, y },
|
|
86757
86715
|
...confettiOptions
|
|
86758
86716
|
});
|
|
86759
86717
|
onClick?.(e);
|
|
@@ -86978,11 +86936,11 @@ var CursorTrailInternal = ({
|
|
|
86978
86936
|
const [trails, setTrails] = useState([]);
|
|
86979
86937
|
const [isVisible, setIsVisible] = useState(false);
|
|
86980
86938
|
const idRef = useRef(0);
|
|
86981
|
-
const addTrailPoint = useCallback((
|
|
86939
|
+
const addTrailPoint = useCallback((x, y) => {
|
|
86982
86940
|
if (!enabled)
|
|
86983
86941
|
return;
|
|
86984
86942
|
const newPoint = {
|
|
86985
|
-
x
|
|
86943
|
+
x,
|
|
86986
86944
|
y,
|
|
86987
86945
|
id: idRef.current++,
|
|
86988
86946
|
timestamp: Date.now()
|
|
@@ -87112,7 +87070,7 @@ CursorTrail.displayName = "CursorTrail";
|
|
|
87112
87070
|
var GridPatternInternal = ({
|
|
87113
87071
|
width = 40,
|
|
87114
87072
|
height = 40,
|
|
87115
|
-
x
|
|
87073
|
+
x = -1,
|
|
87116
87074
|
y = -1,
|
|
87117
87075
|
squares = [],
|
|
87118
87076
|
strokeDasharray = "0",
|
|
@@ -87267,7 +87225,7 @@ var GridPatternInternal = ({
|
|
|
87267
87225
|
[hexCenterX - hexRadius, hexCenterY],
|
|
87268
87226
|
[hexCenterX - hexRadius / 2, hexCenterY - hexRadius * Math.sqrt(3) / 2],
|
|
87269
87227
|
[hexCenterX + hexRadius / 2, hexCenterY - hexRadius * Math.sqrt(3) / 2]
|
|
87270
|
-
].map(([
|
|
87228
|
+
].map(([x2, y2]) => `${x2},${y2}`).join(" L ");
|
|
87271
87229
|
return /* @__PURE__ */ jsx("path", { d: `M ${hexPath} Z`, ...baseProps });
|
|
87272
87230
|
case "triangle":
|
|
87273
87231
|
const triSize = Math.min(width, height) / 2;
|
|
@@ -87335,7 +87293,7 @@ var GridPatternInternal = ({
|
|
|
87335
87293
|
"pattern",
|
|
87336
87294
|
{
|
|
87337
87295
|
id: patternId,
|
|
87338
|
-
x
|
|
87296
|
+
x,
|
|
87339
87297
|
y,
|
|
87340
87298
|
width,
|
|
87341
87299
|
height,
|
|
@@ -87359,7 +87317,7 @@ var GridPatternInternal = ({
|
|
|
87359
87317
|
squares.map(([squareX, squareY], index2) => /* @__PURE__ */ jsx(
|
|
87360
87318
|
"rect",
|
|
87361
87319
|
{
|
|
87362
|
-
x: squareX * width +
|
|
87320
|
+
x: squareX * width + x,
|
|
87363
87321
|
y: squareY * height + y,
|
|
87364
87322
|
width,
|
|
87365
87323
|
height,
|
|
@@ -87662,7 +87620,7 @@ var MeteorsInternal = ({
|
|
|
87662
87620
|
),
|
|
87663
87621
|
children: [
|
|
87664
87622
|
children && /* @__PURE__ */ jsx("div", { className: "relative z-10", children }),
|
|
87665
|
-
autoPlay && meteors.map((
|
|
87623
|
+
autoPlay && meteors.map((_, idx) => {
|
|
87666
87624
|
const animationDelay = random(0, 5);
|
|
87667
87625
|
const animationDuration = random(duration.min, duration.max) * speedMultiplier;
|
|
87668
87626
|
const meteorOpacity = random(opacity.min, opacity.max);
|
|
@@ -87796,9 +87754,9 @@ var AuroraBackgroundInternal = ({
|
|
|
87796
87754
|
if (!interactive)
|
|
87797
87755
|
return;
|
|
87798
87756
|
const rect = e.currentTarget.getBoundingClientRect();
|
|
87799
|
-
const
|
|
87757
|
+
const x = (e.clientX - rect.left) / rect.width * 100;
|
|
87800
87758
|
const y = (e.clientY - rect.top) / rect.height * 100;
|
|
87801
|
-
setMousePosition({ x
|
|
87759
|
+
setMousePosition({ x, y });
|
|
87802
87760
|
}, [interactive]);
|
|
87803
87761
|
useEffect(() => {
|
|
87804
87762
|
if (!pauseWhenHidden)
|
|
@@ -87976,19 +87934,19 @@ var ParticlesInternal = ({
|
|
|
87976
87934
|
const outerRadius = particle.size;
|
|
87977
87935
|
const innerRadius = particle.size / 2;
|
|
87978
87936
|
let rot = Math.PI / 2 * 3;
|
|
87979
|
-
let
|
|
87937
|
+
let x = 0;
|
|
87980
87938
|
let y = 0;
|
|
87981
87939
|
const step = Math.PI / spikes;
|
|
87982
87940
|
ctx.beginPath();
|
|
87983
87941
|
ctx.moveTo(0, -outerRadius);
|
|
87984
87942
|
for (let i = 0; i < spikes; i++) {
|
|
87985
|
-
|
|
87943
|
+
x = Math.cos(rot) * outerRadius;
|
|
87986
87944
|
y = Math.sin(rot) * outerRadius;
|
|
87987
|
-
ctx.lineTo(
|
|
87945
|
+
ctx.lineTo(x, y);
|
|
87988
87946
|
rot += step;
|
|
87989
|
-
|
|
87947
|
+
x = Math.cos(rot) * innerRadius;
|
|
87990
87948
|
y = Math.sin(rot) * innerRadius;
|
|
87991
|
-
ctx.lineTo(
|
|
87949
|
+
ctx.lineTo(x, y);
|
|
87992
87950
|
rot += step;
|
|
87993
87951
|
}
|
|
87994
87952
|
ctx.lineTo(0, -outerRadius);
|
|
@@ -88372,9 +88330,9 @@ var StarfieldInternal = ({
|
|
|
88372
88330
|
rotationRef.current += spiralSpeed;
|
|
88373
88331
|
const cos = Math.cos(rotationRef.current);
|
|
88374
88332
|
const sin = Math.sin(rotationRef.current);
|
|
88375
|
-
const
|
|
88333
|
+
const x = star.x * cos - star.y * sin;
|
|
88376
88334
|
const y = star.x * sin + star.y * cos;
|
|
88377
|
-
star.x =
|
|
88335
|
+
star.x = x;
|
|
88378
88336
|
star.y = y;
|
|
88379
88337
|
star.z -= speed * (star.velocity || 1);
|
|
88380
88338
|
break;
|
|
@@ -88770,18 +88728,18 @@ var DotPatternInternal = ({
|
|
|
88770
88728
|
case "hex":
|
|
88771
88729
|
for (let row = 0; row < rows; row++) {
|
|
88772
88730
|
for (let col = 0; col < cols; col++) {
|
|
88773
|
-
const
|
|
88731
|
+
const x = col * spacing + (row % 2 === 1 ? spacing / 2 : 0);
|
|
88774
88732
|
const y = row * spacing * 0.866;
|
|
88775
|
-
dots.push({ x
|
|
88733
|
+
dots.push({ x, y });
|
|
88776
88734
|
}
|
|
88777
88735
|
}
|
|
88778
88736
|
break;
|
|
88779
88737
|
case "diagonal":
|
|
88780
88738
|
for (let row = 0; row < rows; row++) {
|
|
88781
88739
|
for (let col = 0; col < cols; col++) {
|
|
88782
|
-
const
|
|
88740
|
+
const x = col * spacing + row * spacing * 0.5;
|
|
88783
88741
|
const y = row * spacing;
|
|
88784
|
-
dots.push({ x
|
|
88742
|
+
dots.push({ x, y });
|
|
88785
88743
|
}
|
|
88786
88744
|
}
|
|
88787
88745
|
break;
|
|
@@ -88796,9 +88754,9 @@ var DotPatternInternal = ({
|
|
|
88796
88754
|
const dotsInRing = Math.max(1, Math.floor(circumference / spacing));
|
|
88797
88755
|
for (let i = 0; i < dotsInRing; i++) {
|
|
88798
88756
|
const angle = i / dotsInRing * 2 * Math.PI;
|
|
88799
|
-
const
|
|
88757
|
+
const x = centerX + radius * Math.cos(angle);
|
|
88800
88758
|
const y = centerY + radius * Math.sin(angle);
|
|
88801
|
-
dots.push({ x
|
|
88759
|
+
dots.push({ x, y });
|
|
88802
88760
|
}
|
|
88803
88761
|
}
|
|
88804
88762
|
break;
|
|
@@ -88826,9 +88784,9 @@ var DotPatternInternal = ({
|
|
|
88826
88784
|
if (patternRef.current) {
|
|
88827
88785
|
const dots = patternRef.current.querySelectorAll("circle");
|
|
88828
88786
|
dots.forEach((dot) => {
|
|
88829
|
-
const
|
|
88787
|
+
const x = parseFloat(dot.getAttribute("cx") || "0");
|
|
88830
88788
|
const y = parseFloat(dot.getAttribute("cy") || "0");
|
|
88831
|
-
const dx =
|
|
88789
|
+
const dx = x - mouseRef.current.x;
|
|
88832
88790
|
const dy = y - mouseRef.current.y;
|
|
88833
88791
|
const distance = Math.sqrt(dx * dx + dy * dy);
|
|
88834
88792
|
if (distance < hoverRadius) {
|
|
@@ -89144,12 +89102,12 @@ var GridDistortionInternal = ({
|
|
|
89144
89102
|
for (let row = 0; row <= rows; row++) {
|
|
89145
89103
|
const rowPoints = [];
|
|
89146
89104
|
for (let col = 0; col <= columns; col++) {
|
|
89147
|
-
const
|
|
89105
|
+
const x = col / columns;
|
|
89148
89106
|
const y = row / rows;
|
|
89149
89107
|
rowPoints.push({
|
|
89150
|
-
x
|
|
89108
|
+
x,
|
|
89151
89109
|
y,
|
|
89152
|
-
originalX:
|
|
89110
|
+
originalX: x,
|
|
89153
89111
|
originalY: y,
|
|
89154
89112
|
offsetX: 0,
|
|
89155
89113
|
offsetY: 0
|
|
@@ -89228,16 +89186,16 @@ var GridDistortionInternal = ({
|
|
|
89228
89186
|
}
|
|
89229
89187
|
}
|
|
89230
89188
|
}, [distortion, distortionType, amplitude, frequency, rows, columns, interactive, mouseRadius, mouseStrength]);
|
|
89231
|
-
const applyPerspective = useCallback((
|
|
89189
|
+
const applyPerspective = useCallback((x, y, width, height) => {
|
|
89232
89190
|
if (!perspective)
|
|
89233
|
-
return { x
|
|
89191
|
+
return { x, y };
|
|
89234
89192
|
const centerX = width / 2;
|
|
89235
89193
|
const centerY = height / 2;
|
|
89236
89194
|
const cosX = Math.cos(rotateX * Math.PI / 180);
|
|
89237
89195
|
const sinX = Math.sin(rotateX * Math.PI / 180);
|
|
89238
89196
|
const cosY = Math.cos(rotateY * Math.PI / 180);
|
|
89239
89197
|
const sinY = Math.sin(rotateY * Math.PI / 180);
|
|
89240
|
-
let px =
|
|
89198
|
+
let px = x - centerX;
|
|
89241
89199
|
let py = y - centerY;
|
|
89242
89200
|
const pz = -px * sinY;
|
|
89243
89201
|
px = px * cosY;
|
|
@@ -89275,9 +89233,9 @@ var GridDistortionInternal = ({
|
|
|
89275
89233
|
for (let row = 0; row <= rows; row++) {
|
|
89276
89234
|
for (let col = 0; col <= columns; col++) {
|
|
89277
89235
|
const point = points[row][col];
|
|
89278
|
-
const
|
|
89236
|
+
const x = point.x * width;
|
|
89279
89237
|
const y = point.y * height;
|
|
89280
|
-
const transformed = applyPerspective(
|
|
89238
|
+
const transformed = applyPerspective(x, y, width, height);
|
|
89281
89239
|
if (col === 0) {
|
|
89282
89240
|
ctx.moveTo(transformed.x, transformed.y);
|
|
89283
89241
|
} else {
|
|
@@ -89288,9 +89246,9 @@ var GridDistortionInternal = ({
|
|
|
89288
89246
|
for (let col = 0; col <= columns; col++) {
|
|
89289
89247
|
for (let row = 0; row <= rows; row++) {
|
|
89290
89248
|
const point = points[row][col];
|
|
89291
|
-
const
|
|
89249
|
+
const x = point.x * width;
|
|
89292
89250
|
const y = point.y * height;
|
|
89293
|
-
const transformed = applyPerspective(
|
|
89251
|
+
const transformed = applyPerspective(x, y, width, height);
|
|
89294
89252
|
if (row === 0) {
|
|
89295
89253
|
ctx.moveTo(transformed.x, transformed.y);
|
|
89296
89254
|
} else {
|
|
@@ -89521,24 +89479,24 @@ var WavesInternal = ({
|
|
|
89521
89479
|
}
|
|
89522
89480
|
waveLayersRef.current = waveLayers;
|
|
89523
89481
|
}, [layers, amplitude, frequency, speed, parallax, parallaxIntensity, colors]);
|
|
89524
|
-
const calculateWavePoint = (
|
|
89482
|
+
const calculateWavePoint = (x, layer, time, mouseEffect = 0) => {
|
|
89525
89483
|
let y = 0;
|
|
89526
89484
|
switch (waveStyle) {
|
|
89527
89485
|
case "smooth":
|
|
89528
|
-
y = Math.sin((
|
|
89486
|
+
y = Math.sin((x * layer.frequency + time * layer.speed + layer.phase) * 0.01) * layer.amplitude;
|
|
89529
89487
|
break;
|
|
89530
89488
|
case "sharp":
|
|
89531
|
-
const wave = (
|
|
89489
|
+
const wave = (x * layer.frequency + time * layer.speed + layer.phase) * 0.01;
|
|
89532
89490
|
y = (Math.sin(wave) > 0 ? 1 : -1) * layer.amplitude;
|
|
89533
89491
|
break;
|
|
89534
89492
|
case "turbulent":
|
|
89535
|
-
y = Math.sin((
|
|
89536
|
-
y += Math.sin((
|
|
89537
|
-
y += Math.sin((
|
|
89493
|
+
y = Math.sin((x * layer.frequency + time * layer.speed + layer.phase) * 0.01) * layer.amplitude;
|
|
89494
|
+
y += Math.sin((x * layer.frequency * 2.3 + time * layer.speed * 1.5) * 0.01) * layer.amplitude * 0.3;
|
|
89495
|
+
y += Math.sin((x * layer.frequency * 3.7 + time * layer.speed * 0.7) * 0.01) * layer.amplitude * 0.2;
|
|
89538
89496
|
break;
|
|
89539
89497
|
case "organic":
|
|
89540
|
-
y = Math.sin((
|
|
89541
|
-
y *= 1 + Math.sin(
|
|
89498
|
+
y = Math.sin((x * layer.frequency + time * layer.speed + layer.phase) * 0.01) * layer.amplitude;
|
|
89499
|
+
y *= 1 + Math.sin(x * 3e-3 + time * 1e-3) * 0.2;
|
|
89542
89500
|
break;
|
|
89543
89501
|
}
|
|
89544
89502
|
if (interactive && mouseEffect > 0) {
|
|
@@ -89601,8 +89559,8 @@ var WavesInternal = ({
|
|
|
89601
89559
|
ctx.moveTo(0, 0);
|
|
89602
89560
|
for (let y = 0; y <= canvas.height; y += 5) {
|
|
89603
89561
|
const mouseEffect = interactive ? getMouseEffect(canvas.width / 2, y) : 0;
|
|
89604
|
-
const
|
|
89605
|
-
ctx.lineTo(
|
|
89562
|
+
const x = canvas.width / 2 + calculateWavePoint(y, layer, time, mouseEffect);
|
|
89563
|
+
ctx.lineTo(x, y);
|
|
89606
89564
|
}
|
|
89607
89565
|
ctx.lineTo(canvas.width, canvas.height);
|
|
89608
89566
|
ctx.lineTo(canvas.width, 0);
|
|
@@ -89610,20 +89568,20 @@ var WavesInternal = ({
|
|
|
89610
89568
|
const diagonal = Math.sqrt(canvas.width * canvas.width + canvas.height * canvas.height);
|
|
89611
89569
|
ctx.moveTo(0, canvas.height);
|
|
89612
89570
|
for (let d = 0; d <= diagonal; d += 5) {
|
|
89613
|
-
const
|
|
89571
|
+
const x = d / diagonal * canvas.width;
|
|
89614
89572
|
const baseY = d / diagonal * canvas.height;
|
|
89615
|
-
const mouseEffect = interactive ? getMouseEffect(
|
|
89573
|
+
const mouseEffect = interactive ? getMouseEffect(x, baseY) : 0;
|
|
89616
89574
|
const waveY = calculateWavePoint(d, layer, time, mouseEffect);
|
|
89617
|
-
ctx.lineTo(
|
|
89575
|
+
ctx.lineTo(x, canvas.height - baseY + waveY);
|
|
89618
89576
|
}
|
|
89619
89577
|
ctx.lineTo(canvas.width, 0);
|
|
89620
89578
|
ctx.lineTo(canvas.width, canvas.height);
|
|
89621
89579
|
} else {
|
|
89622
89580
|
ctx.moveTo(0, canvas.height);
|
|
89623
|
-
for (let
|
|
89624
|
-
const mouseEffect = interactive ? getMouseEffect(
|
|
89625
|
-
const y = canvas.height / 2 + calculateWavePoint(
|
|
89626
|
-
ctx.lineTo(
|
|
89581
|
+
for (let x = 0; x <= canvas.width; x += 5) {
|
|
89582
|
+
const mouseEffect = interactive ? getMouseEffect(x, canvas.height / 2) : 0;
|
|
89583
|
+
const y = canvas.height / 2 + calculateWavePoint(x, layer, time, mouseEffect);
|
|
89584
|
+
ctx.lineTo(x, y);
|
|
89627
89585
|
}
|
|
89628
89586
|
ctx.lineTo(canvas.width, canvas.height);
|
|
89629
89587
|
}
|
|
@@ -89631,8 +89589,8 @@ var WavesInternal = ({
|
|
|
89631
89589
|
ctx.fill();
|
|
89632
89590
|
ctx.restore();
|
|
89633
89591
|
};
|
|
89634
|
-
const getMouseEffect = (
|
|
89635
|
-
const dx =
|
|
89592
|
+
const getMouseEffect = (x, y) => {
|
|
89593
|
+
const dx = x - mouseRef.current.x;
|
|
89636
89594
|
const dy = y - mouseRef.current.y;
|
|
89637
89595
|
const distance = Math.sqrt(dx * dx + dy * dy);
|
|
89638
89596
|
if (distance < mouseRadius) {
|
|
@@ -90141,40 +90099,6 @@ var GradientFlow = (props) => {
|
|
|
90141
90099
|
return /* @__PURE__ */ jsx(GradientFlowInternal, { ...props });
|
|
90142
90100
|
};
|
|
90143
90101
|
GradientFlow.displayName = "GradientFlow";
|
|
90144
|
-
var M = (e, i, s, u, m, a, l, h2) => {
|
|
90145
|
-
let d = document.documentElement, w = ["light", "dark"];
|
|
90146
|
-
function p(n) {
|
|
90147
|
-
(Array.isArray(e) ? e : [e]).forEach((y) => {
|
|
90148
|
-
let k = y === "class", S = k && a ? m.map((f) => a[f] || f) : m;
|
|
90149
|
-
k ? (d.classList.remove(...S), d.classList.add(a && a[n] ? a[n] : n)) : d.setAttribute(y, n);
|
|
90150
|
-
}), R(n);
|
|
90151
|
-
}
|
|
90152
|
-
function R(n) {
|
|
90153
|
-
h2 && w.includes(n) && (d.style.colorScheme = n);
|
|
90154
|
-
}
|
|
90155
|
-
function c2() {
|
|
90156
|
-
return window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
|
|
90157
|
-
}
|
|
90158
|
-
if (u)
|
|
90159
|
-
p(u);
|
|
90160
|
-
else
|
|
90161
|
-
try {
|
|
90162
|
-
let n = localStorage.getItem(i) || s, y = l && n === "system" ? c2() : n;
|
|
90163
|
-
p(y);
|
|
90164
|
-
} catch (n) {
|
|
90165
|
-
}
|
|
90166
|
-
};
|
|
90167
|
-
var x = React71.createContext(void 0);
|
|
90168
|
-
var U = { setTheme: (e) => {
|
|
90169
|
-
}, themes: [] };
|
|
90170
|
-
var z = () => {
|
|
90171
|
-
var e;
|
|
90172
|
-
return (e = React71.useContext(x)) != null ? e : U;
|
|
90173
|
-
};
|
|
90174
|
-
React71.memo(({ forcedTheme: e, storageKey: i, attribute: s, enableSystem: u, enableColorScheme: m, defaultTheme: a, value: l, themes: h2, nonce: d, scriptProps: w }) => {
|
|
90175
|
-
let p = JSON.stringify([s, i, a, e, h2, l, u, m]).slice(1, -1);
|
|
90176
|
-
return React71.createElement("script", { ...w, suppressHydrationWarning: true, nonce: typeof window == "undefined" ? d : "", dangerouslySetInnerHTML: { __html: `(${M.toString()})(${p})` } });
|
|
90177
|
-
});
|
|
90178
90102
|
var MeshGradientInternal = ({
|
|
90179
90103
|
children,
|
|
90180
90104
|
className,
|
|
@@ -90199,7 +90123,7 @@ var MeshGradientInternal = ({
|
|
|
90199
90123
|
fps = 60,
|
|
90200
90124
|
pauseWhenHidden = false
|
|
90201
90125
|
}) => {
|
|
90202
|
-
const { theme, resolvedTheme } =
|
|
90126
|
+
const { theme, resolvedTheme } = useTheme();
|
|
90203
90127
|
const currentTheme = theme === "system" ? resolvedTheme : theme;
|
|
90204
90128
|
const [isVisible, setIsVisible] = useState(true);
|
|
90205
90129
|
const observerTimeoutRef = useRef(null);
|
|
@@ -90351,14 +90275,14 @@ var MeshGradientInternal = ({
|
|
|
90351
90275
|
ctx.filter = `blur(${finalBlur}px)`;
|
|
90352
90276
|
}
|
|
90353
90277
|
points.forEach((point, i) => {
|
|
90354
|
-
const
|
|
90278
|
+
const x = isFinite(point.x) ? point.x : canvas.width / 2;
|
|
90355
90279
|
const y = isFinite(point.y) ? point.y : canvas.height / 2;
|
|
90356
90280
|
const radius = isFinite(point.radius) && point.radius > 0 ? point.radius : 100;
|
|
90357
90281
|
const gradient = ctx.createRadialGradient(
|
|
90358
|
-
|
|
90282
|
+
x,
|
|
90359
90283
|
y,
|
|
90360
90284
|
0,
|
|
90361
|
-
|
|
90285
|
+
x,
|
|
90362
90286
|
y,
|
|
90363
90287
|
radius
|
|
90364
90288
|
);
|
|
@@ -91602,12 +91526,12 @@ var FloatingElementsInternal = ({
|
|
|
91602
91526
|
ctx.beginPath();
|
|
91603
91527
|
for (let i = 0; i < 6; i++) {
|
|
91604
91528
|
const angle = Math.PI * 2 / 6 * i;
|
|
91605
|
-
const
|
|
91529
|
+
const x = Math.cos(angle) * actualSize / 2;
|
|
91606
91530
|
const y = Math.sin(angle) * actualSize / 2;
|
|
91607
91531
|
if (i === 0)
|
|
91608
|
-
ctx.moveTo(
|
|
91532
|
+
ctx.moveTo(x, y);
|
|
91609
91533
|
else
|
|
91610
|
-
ctx.lineTo(
|
|
91534
|
+
ctx.lineTo(x, y);
|
|
91611
91535
|
}
|
|
91612
91536
|
ctx.closePath();
|
|
91613
91537
|
ctx.fill();
|
|
@@ -91617,12 +91541,12 @@ var FloatingElementsInternal = ({
|
|
|
91617
91541
|
for (let i = 0; i < 10; i++) {
|
|
91618
91542
|
const radius = i % 2 === 0 ? actualSize / 2 : actualSize / 4;
|
|
91619
91543
|
const angle = Math.PI * 2 / 10 * i - Math.PI / 2;
|
|
91620
|
-
const
|
|
91544
|
+
const x = Math.cos(angle) * radius;
|
|
91621
91545
|
const y = Math.sin(angle) * radius;
|
|
91622
91546
|
if (i === 0)
|
|
91623
|
-
ctx.moveTo(
|
|
91547
|
+
ctx.moveTo(x, y);
|
|
91624
91548
|
else
|
|
91625
|
-
ctx.lineTo(
|
|
91549
|
+
ctx.lineTo(x, y);
|
|
91626
91550
|
}
|
|
91627
91551
|
ctx.closePath();
|
|
91628
91552
|
ctx.fill();
|
|
@@ -92511,12 +92435,12 @@ var GeometricPatternsInternal = ({
|
|
|
92511
92435
|
case "hexagons":
|
|
92512
92436
|
for (let i = 0; i < 6; i++) {
|
|
92513
92437
|
const angle = Math.PI * 2 / 6 * i - Math.PI / 2;
|
|
92514
|
-
const
|
|
92438
|
+
const x = Math.cos(angle) * size4 / 2;
|
|
92515
92439
|
const y = Math.sin(angle) * size4 / 2;
|
|
92516
92440
|
if (i === 0)
|
|
92517
|
-
path.moveTo(
|
|
92441
|
+
path.moveTo(x, y);
|
|
92518
92442
|
else
|
|
92519
|
-
path.lineTo(
|
|
92443
|
+
path.lineTo(x, y);
|
|
92520
92444
|
}
|
|
92521
92445
|
path.closePath();
|
|
92522
92446
|
break;
|
|
@@ -92566,12 +92490,12 @@ var GeometricPatternsInternal = ({
|
|
|
92566
92490
|
if (density < 1 && (row % skipFactor !== 0 || col % skipFactor !== 0)) {
|
|
92567
92491
|
continue;
|
|
92568
92492
|
}
|
|
92569
|
-
let
|
|
92493
|
+
let x = col * totalSpacing;
|
|
92570
92494
|
let y = row * totalSpacing;
|
|
92571
92495
|
if (pattern === "hexagons" && row % 2 === 1) {
|
|
92572
|
-
|
|
92496
|
+
x += totalSpacing / 2;
|
|
92573
92497
|
}
|
|
92574
|
-
allPositions.push({ x
|
|
92498
|
+
allPositions.push({ x, y });
|
|
92575
92499
|
}
|
|
92576
92500
|
}
|
|
92577
92501
|
for (let i = allPositions.length - 1; i > 0; i--) {
|
|
@@ -93231,7 +93155,7 @@ function CodeSnippets({
|
|
|
93231
93155
|
const allSnippets = useMemo(
|
|
93232
93156
|
() => Array.from(
|
|
93233
93157
|
{ length: multiplier },
|
|
93234
|
-
(
|
|
93158
|
+
(_, i) => snippets.map((snippet, j) => ({
|
|
93235
93159
|
...snippet,
|
|
93236
93160
|
id: `${i}-${j}-${snippet.language}`
|
|
93237
93161
|
}))
|
|
@@ -93397,7 +93321,7 @@ var BlurFadeInternal = ({
|
|
|
93397
93321
|
return { x: 0, y: 0 };
|
|
93398
93322
|
}
|
|
93399
93323
|
};
|
|
93400
|
-
const { x
|
|
93324
|
+
const { x, y } = getTransformValues();
|
|
93401
93325
|
return /* @__PURE__ */ jsxs(
|
|
93402
93326
|
"div",
|
|
93403
93327
|
{
|
|
@@ -93411,7 +93335,7 @@ var BlurFadeInternal = ({
|
|
|
93411
93335
|
["--blur-fade-delay"]: `${delay}ms`,
|
|
93412
93336
|
["--blur-fade-duration"]: `${duration}ms`,
|
|
93413
93337
|
["--blur-fade-blur"]: blur2,
|
|
93414
|
-
["--blur-fade-x"]: `${
|
|
93338
|
+
["--blur-fade-x"]: `${x}px`,
|
|
93415
93339
|
["--blur-fade-y"]: `${y}px`
|
|
93416
93340
|
},
|
|
93417
93341
|
children: [
|
|
@@ -93743,17 +93667,17 @@ var RippleInternal = (props) => {
|
|
|
93743
93667
|
if (disabled || !containerRef.current)
|
|
93744
93668
|
return;
|
|
93745
93669
|
const rect = containerRef.current.getBoundingClientRect();
|
|
93746
|
-
let
|
|
93670
|
+
let x, y, force = 1, velocity = 0;
|
|
93747
93671
|
if (customCenter) {
|
|
93748
|
-
|
|
93672
|
+
x = customCenter.x;
|
|
93749
93673
|
y = customCenter.y;
|
|
93750
93674
|
} else if (center) {
|
|
93751
|
-
|
|
93675
|
+
x = center.x;
|
|
93752
93676
|
y = center.y;
|
|
93753
93677
|
} else if (event) {
|
|
93754
93678
|
if ("touches" in event) {
|
|
93755
93679
|
const touch = event.touches[0];
|
|
93756
|
-
|
|
93680
|
+
x = touch.clientX - rect.left;
|
|
93757
93681
|
y = touch.clientY - rect.top;
|
|
93758
93682
|
if (pressureSensitive && "force" in touch) {
|
|
93759
93683
|
force = touch.force || 1;
|
|
@@ -93762,18 +93686,18 @@ var RippleInternal = (props) => {
|
|
|
93762
93686
|
const now = Date.now();
|
|
93763
93687
|
const timeDiff = now - lastTouchTime.current;
|
|
93764
93688
|
const distance = Math.sqrt(
|
|
93765
|
-
Math.pow(
|
|
93689
|
+
Math.pow(x - lastTouchPos.current.x, 2) + Math.pow(y - lastTouchPos.current.y, 2)
|
|
93766
93690
|
);
|
|
93767
93691
|
velocity = timeDiff > 0 ? distance / timeDiff : 0;
|
|
93768
93692
|
lastTouchTime.current = now;
|
|
93769
|
-
lastTouchPos.current = { x
|
|
93693
|
+
lastTouchPos.current = { x, y };
|
|
93770
93694
|
}
|
|
93771
93695
|
} else {
|
|
93772
|
-
|
|
93696
|
+
x = event.clientX - rect.left;
|
|
93773
93697
|
y = event.clientY - rect.top;
|
|
93774
93698
|
}
|
|
93775
93699
|
} else {
|
|
93776
|
-
|
|
93700
|
+
x = rect.width / 2;
|
|
93777
93701
|
y = rect.height / 2;
|
|
93778
93702
|
}
|
|
93779
93703
|
let rippleSize = getRippleSize();
|
|
@@ -93786,7 +93710,7 @@ var RippleInternal = (props) => {
|
|
|
93786
93710
|
}
|
|
93787
93711
|
const baseRipple = {
|
|
93788
93712
|
id: rippleIdRef.current++,
|
|
93789
|
-
x:
|
|
93713
|
+
x: x - rippleSize / 2,
|
|
93790
93714
|
y: y - rippleSize / 2,
|
|
93791
93715
|
size: rippleSize,
|
|
93792
93716
|
startTime: Date.now(),
|
|
@@ -93995,7 +93919,7 @@ var SparklesInternal = ({
|
|
|
93995
93919
|
return "0%";
|
|
93996
93920
|
}
|
|
93997
93921
|
};
|
|
93998
|
-
const createSparkle = (
|
|
93922
|
+
const createSparkle = (x, y) => {
|
|
93999
93923
|
if (!containerRef.current) {
|
|
94000
93924
|
return {
|
|
94001
93925
|
id: sparkleIdRef.current++,
|
|
@@ -94012,7 +93936,7 @@ var SparklesInternal = ({
|
|
|
94012
93936
|
const rect = containerRef.current.getBoundingClientRect();
|
|
94013
93937
|
return {
|
|
94014
93938
|
id: sparkleIdRef.current++,
|
|
94015
|
-
x:
|
|
93939
|
+
x: x ?? randomInt(0, rect.width),
|
|
94016
93940
|
y: y ?? randomInt(0, rect.height),
|
|
94017
93941
|
size: random(size4.min, size4.max),
|
|
94018
93942
|
color,
|
|
@@ -94022,10 +93946,10 @@ var SparklesInternal = ({
|
|
|
94022
93946
|
shape: getSparkleShape(shape)
|
|
94023
93947
|
};
|
|
94024
93948
|
};
|
|
94025
|
-
const addSparkle = (
|
|
93949
|
+
const addSparkle = (x, y) => {
|
|
94026
93950
|
if (!active)
|
|
94027
93951
|
return;
|
|
94028
|
-
const newSparkle = createSparkle(
|
|
93952
|
+
const newSparkle = createSparkle(x, y);
|
|
94029
93953
|
setSparkles((prev) => {
|
|
94030
93954
|
const updated = [...prev, newSparkle];
|
|
94031
93955
|
if (updated.length > count3) {
|
|
@@ -94065,9 +93989,9 @@ var SparklesInternal = ({
|
|
|
94065
93989
|
if (trigger === "click") {
|
|
94066
93990
|
const rect = containerRef.current?.getBoundingClientRect();
|
|
94067
93991
|
if (rect) {
|
|
94068
|
-
const
|
|
93992
|
+
const x = event.clientX - rect.left;
|
|
94069
93993
|
const y = event.clientY - rect.top;
|
|
94070
|
-
addSparkle(
|
|
93994
|
+
addSparkle(x, y);
|
|
94071
93995
|
}
|
|
94072
93996
|
}
|
|
94073
93997
|
};
|
|
@@ -94075,9 +93999,9 @@ var SparklesInternal = ({
|
|
|
94075
93999
|
if (interactive && trigger === "hover" && isHovered) {
|
|
94076
94000
|
const rect = containerRef.current?.getBoundingClientRect();
|
|
94077
94001
|
if (rect && Math.random() > 0.8) {
|
|
94078
|
-
const
|
|
94002
|
+
const x = event.clientX - rect.left;
|
|
94079
94003
|
const y = event.clientY - rect.top;
|
|
94080
|
-
addSparkle(
|
|
94004
|
+
addSparkle(x, y);
|
|
94081
94005
|
}
|
|
94082
94006
|
}
|
|
94083
94007
|
};
|
|
@@ -94246,9 +94170,9 @@ var SpotlightInternal = ({
|
|
|
94246
94170
|
if (!rect)
|
|
94247
94171
|
return;
|
|
94248
94172
|
const time = Date.now() / autoSpeed;
|
|
94249
|
-
const
|
|
94173
|
+
const x = (Math.sin(time) + 1) * 0.5 * rect.width;
|
|
94250
94174
|
const y = (Math.cos(time * 0.7) + 1) * 0.5 * rect.height;
|
|
94251
|
-
setAutoPosition({ x
|
|
94175
|
+
setAutoPosition({ x, y });
|
|
94252
94176
|
autoAnimationRef.current = requestAnimationFrame(animate4);
|
|
94253
94177
|
};
|
|
94254
94178
|
autoAnimationRef.current = requestAnimationFrame(animate4);
|
|
@@ -94348,7 +94272,7 @@ var SpotlightInternal = ({
|
|
|
94348
94272
|
clientX = event.clientX;
|
|
94349
94273
|
clientY = event.clientY;
|
|
94350
94274
|
}
|
|
94351
|
-
let
|
|
94275
|
+
let x = clientX - rect.left;
|
|
94352
94276
|
let y = clientY - rect.top;
|
|
94353
94277
|
if (magnetic && magneticElements.length > 0) {
|
|
94354
94278
|
magneticElements.forEach((element) => {
|
|
@@ -94356,28 +94280,28 @@ var SpotlightInternal = ({
|
|
|
94356
94280
|
const elementCenterX = elementRect.left + elementRect.width / 2 - rect.left;
|
|
94357
94281
|
const elementCenterY = elementRect.top + elementRect.height / 2 - rect.top;
|
|
94358
94282
|
const distance = Math.sqrt(
|
|
94359
|
-
Math.pow(
|
|
94283
|
+
Math.pow(x - elementCenterX, 2) + Math.pow(y - elementCenterY, 2)
|
|
94360
94284
|
);
|
|
94361
94285
|
if (distance < 100) {
|
|
94362
94286
|
const force = (100 - distance) / 100 * magneticStrength;
|
|
94363
|
-
|
|
94287
|
+
x += (elementCenterX - x) * force;
|
|
94364
94288
|
y += (elementCenterY - y) * force;
|
|
94365
94289
|
}
|
|
94366
94290
|
});
|
|
94367
94291
|
}
|
|
94368
|
-
setMousePosition({ x
|
|
94369
|
-
updatePosition({ x
|
|
94292
|
+
setMousePosition({ x, y });
|
|
94293
|
+
updatePosition({ x, y });
|
|
94370
94294
|
if (spotlights?.some((s) => s.trail) || spotlights?.length === 0 && trailPositions.length > 0) {
|
|
94371
94295
|
const timestamp = Date.now();
|
|
94372
94296
|
setTrailPositions((prev) => {
|
|
94373
|
-
const newTrail = [{ x
|
|
94297
|
+
const newTrail = [{ x, y, timestamp }, ...prev];
|
|
94374
94298
|
const maxLength = spotlights?.find((s) => s.trail)?.trail?.length || 10;
|
|
94375
94299
|
return newTrail.slice(0, maxLength);
|
|
94376
94300
|
});
|
|
94377
94301
|
}
|
|
94378
94302
|
if (interactiveZones) {
|
|
94379
94303
|
interactiveZones.forEach((zone, index2) => {
|
|
94380
|
-
const isInZone =
|
|
94304
|
+
const isInZone = x >= zone.bounds.x && x <= zone.bounds.x + zone.bounds.width && y >= zone.bounds.y && y <= zone.bounds.y + zone.bounds.height;
|
|
94381
94305
|
if (zone.trigger === "proximity" || zone.trigger === "hover") {
|
|
94382
94306
|
setInteractiveState((prev) => ({ ...prev, [index2]: isInZone }));
|
|
94383
94307
|
}
|
|
@@ -94426,13 +94350,13 @@ var SpotlightInternal = ({
|
|
|
94426
94350
|
return autoPosition;
|
|
94427
94351
|
return displayPosition;
|
|
94428
94352
|
};
|
|
94429
|
-
const interpolateHeatMap = (data,
|
|
94353
|
+
const interpolateHeatMap = (data, x, y) => {
|
|
94430
94354
|
if (!heatMap)
|
|
94431
94355
|
return 0;
|
|
94432
94356
|
let totalWeight = 0;
|
|
94433
94357
|
let weightedIntensity = 0;
|
|
94434
94358
|
data.forEach((point) => {
|
|
94435
|
-
const distance = Math.sqrt(Math.pow(
|
|
94359
|
+
const distance = Math.sqrt(Math.pow(x - point.x, 2) + Math.pow(y - point.y, 2));
|
|
94436
94360
|
const weight = 1 / (distance + 1);
|
|
94437
94361
|
totalWeight += weight;
|
|
94438
94362
|
weightedIntensity += point.intensity * weight;
|
|
@@ -94451,20 +94375,20 @@ var SpotlightInternal = ({
|
|
|
94451
94375
|
return shape2;
|
|
94452
94376
|
}
|
|
94453
94377
|
};
|
|
94454
|
-
const createWavePattern = (
|
|
94378
|
+
const createWavePattern = (x, y) => {
|
|
94455
94379
|
if (!waveAnimation)
|
|
94456
94380
|
return 1;
|
|
94457
94381
|
const { type, frequency, amplitude } = waveAnimation;
|
|
94458
94382
|
const offset4 = waveOffset * 0.01;
|
|
94459
94383
|
switch (type) {
|
|
94460
94384
|
case "ripple":
|
|
94461
|
-
const distance = Math.sqrt(Math.pow(
|
|
94385
|
+
const distance = Math.sqrt(Math.pow(x - 400, 2) + Math.pow(y - 300, 2));
|
|
94462
94386
|
return 1 + amplitude * Math.sin(distance * frequency + offset4);
|
|
94463
94387
|
case "sine":
|
|
94464
|
-
return 1 + amplitude * Math.sin(
|
|
94388
|
+
return 1 + amplitude * Math.sin(x * frequency + offset4);
|
|
94465
94389
|
case "spiral":
|
|
94466
|
-
const angle = Math.atan2(y - 300,
|
|
94467
|
-
const radius = Math.sqrt(Math.pow(
|
|
94390
|
+
const angle = Math.atan2(y - 300, x - 400);
|
|
94391
|
+
const radius = Math.sqrt(Math.pow(x - 400, 2) + Math.pow(y - 300, 2));
|
|
94468
94392
|
return 1 + amplitude * Math.sin(radius * frequency + angle * 3 + offset4);
|
|
94469
94393
|
default:
|
|
94470
94394
|
return 1;
|
|
@@ -94472,19 +94396,19 @@ var SpotlightInternal = ({
|
|
|
94472
94396
|
};
|
|
94473
94397
|
const createGradient = (spotlightData, position) => {
|
|
94474
94398
|
const pos = position || getSpotlightPosition();
|
|
94475
|
-
const { x
|
|
94399
|
+
const { x, y } = pos;
|
|
94476
94400
|
const currentColor = spotlightData?.color || color;
|
|
94477
94401
|
let currentSize = (spotlightData?.size || size4) * pulseScale;
|
|
94478
94402
|
const currentBlur = spotlightData?.blur || blur2;
|
|
94479
94403
|
const currentShape = spotlightData?.shape || shape;
|
|
94480
94404
|
if (waveAnimation) {
|
|
94481
|
-
currentSize *= createWavePattern(
|
|
94405
|
+
currentSize *= createWavePattern(x, y);
|
|
94482
94406
|
}
|
|
94483
94407
|
if (heatMap) {
|
|
94484
|
-
const heatIntensity = interpolateHeatMap(heatMap.data,
|
|
94408
|
+
const heatIntensity = interpolateHeatMap(heatMap.data, x, y);
|
|
94485
94409
|
const colorIndex = Math.floor(heatIntensity * (heatMap.colors.length - 1));
|
|
94486
94410
|
const heatColor = heatMap.colors[colorIndex] || currentColor;
|
|
94487
|
-
return `radial-gradient(circle ${currentSize * heatIntensity + currentBlur}px at ${
|
|
94411
|
+
return `radial-gradient(circle ${currentSize * heatIntensity + currentBlur}px at ${x}px ${y}px, ${heatColor} 0%, transparent 70%)`;
|
|
94488
94412
|
}
|
|
94489
94413
|
const gradientSize = currentSize / 2;
|
|
94490
94414
|
const blurSize = currentBlur;
|
|
@@ -94500,19 +94424,19 @@ var SpotlightInternal = ({
|
|
|
94500
94424
|
(col, idx) => `${col} ${idx / (gradientColors.length - 1) * 70}%`
|
|
94501
94425
|
).join(", ");
|
|
94502
94426
|
if (currentShape === "ellipse") {
|
|
94503
|
-
return `radial-gradient(ellipse ${gradientSize * 1.5}px ${gradientSize}px at ${
|
|
94427
|
+
return `radial-gradient(ellipse ${gradientSize * 1.5}px ${gradientSize}px at ${x}px ${y}px, ${colorStops}, transparent 70%)`;
|
|
94504
94428
|
}
|
|
94505
|
-
return `radial-gradient(circle ${gradientSize + blurSize}px at ${
|
|
94429
|
+
return `radial-gradient(circle ${gradientSize + blurSize}px at ${x}px ${y}px, ${colorStops}, transparent 70%)`;
|
|
94506
94430
|
}
|
|
94507
94431
|
if (direction !== void 0) {
|
|
94508
|
-
return `conic-gradient(from ${direction + rotation}deg at ${
|
|
94432
|
+
return `conic-gradient(from ${direction + rotation}deg at ${x}px ${y}px, transparent 0deg, ${currentColor} 30deg, transparent 60deg)`;
|
|
94509
94433
|
}
|
|
94510
94434
|
if (currentShape === "ellipse") {
|
|
94511
|
-
return `radial-gradient(ellipse ${gradientSize * 1.5}px ${gradientSize}px at ${
|
|
94435
|
+
return `radial-gradient(ellipse ${gradientSize * 1.5}px ${gradientSize}px at ${x}px ${y}px, ${currentColor} 0%, transparent 50%)`;
|
|
94512
94436
|
} else if (["polygon", "star", "heart"].includes(currentShape)) {
|
|
94513
|
-
return `radial-gradient(circle ${gradientSize + blurSize}px at ${
|
|
94437
|
+
return `radial-gradient(circle ${gradientSize + blurSize}px at ${x}px ${y}px, ${currentColor} 0%, transparent 70%)`;
|
|
94514
94438
|
}
|
|
94515
|
-
return `radial-gradient(circle ${gradientSize + blurSize}px at ${
|
|
94439
|
+
return `radial-gradient(circle ${gradientSize + blurSize}px at ${x}px ${y}px, ${currentColor} 0%, transparent 70%)`;
|
|
94516
94440
|
};
|
|
94517
94441
|
const createGridOverlay = () => {
|
|
94518
94442
|
if (!gridOverlay)
|
|
@@ -94971,9 +94895,9 @@ var GlowEffectInternal = ({
|
|
|
94971
94895
|
if (!mouseTracking || !containerRef.current)
|
|
94972
94896
|
return;
|
|
94973
94897
|
const rect = containerRef.current.getBoundingClientRect();
|
|
94974
|
-
const
|
|
94898
|
+
const x = e.clientX - rect.left;
|
|
94975
94899
|
const y = e.clientY - rect.top;
|
|
94976
|
-
setMousePosition({ x
|
|
94900
|
+
setMousePosition({ x, y });
|
|
94977
94901
|
}, [mouseTracking]);
|
|
94978
94902
|
const getMouseGlow = () => {
|
|
94979
94903
|
if (!mouseTracking || !shouldApplyEffect())
|
|
@@ -95824,30 +95748,30 @@ var NumberTickerInternal = ({
|
|
|
95824
95748
|
const elementRef = useRef(null);
|
|
95825
95749
|
const animationRef = useRef(null);
|
|
95826
95750
|
const hasAnimatedRef = useRef(false);
|
|
95827
|
-
const getEasingFunction = (
|
|
95751
|
+
const getEasingFunction = (t) => {
|
|
95828
95752
|
switch (easing) {
|
|
95829
95753
|
case "linear":
|
|
95830
|
-
return
|
|
95754
|
+
return t;
|
|
95831
95755
|
case "ease-in":
|
|
95832
|
-
return
|
|
95756
|
+
return t * t;
|
|
95833
95757
|
case "ease-out":
|
|
95834
|
-
return 1 - Math.pow(1 -
|
|
95758
|
+
return 1 - Math.pow(1 - t, 2);
|
|
95835
95759
|
case "ease-in-out":
|
|
95836
|
-
return
|
|
95760
|
+
return t < 0.5 ? 2 * t * t : 1 - Math.pow(-2 * t + 2, 2) / 2;
|
|
95837
95761
|
case "bounce":
|
|
95838
95762
|
const n1 = 7.5625;
|
|
95839
95763
|
const d1 = 2.75;
|
|
95840
|
-
if (
|
|
95841
|
-
return n1 *
|
|
95842
|
-
} else if (
|
|
95843
|
-
return n1 * (
|
|
95844
|
-
} else if (
|
|
95845
|
-
return n1 * (
|
|
95764
|
+
if (t < 1 / d1) {
|
|
95765
|
+
return n1 * t * t;
|
|
95766
|
+
} else if (t < 2 / d1) {
|
|
95767
|
+
return n1 * (t -= 1.5 / d1) * t + 0.75;
|
|
95768
|
+
} else if (t < 2.5 / d1) {
|
|
95769
|
+
return n1 * (t -= 2.25 / d1) * t + 0.9375;
|
|
95846
95770
|
} else {
|
|
95847
|
-
return n1 * (
|
|
95771
|
+
return n1 * (t -= 2.625 / d1) * t + 0.984375;
|
|
95848
95772
|
}
|
|
95849
95773
|
default:
|
|
95850
|
-
return
|
|
95774
|
+
return t;
|
|
95851
95775
|
}
|
|
95852
95776
|
};
|
|
95853
95777
|
const formatNumber2 = (num) => {
|
|
@@ -96961,9 +96885,9 @@ var MouseTrailInternal = ({
|
|
|
96961
96885
|
}
|
|
96962
96886
|
particlesRef.current = particles;
|
|
96963
96887
|
}, [length, size4, colors, lifetime]);
|
|
96964
|
-
const drawShape = useCallback((ctx, particle,
|
|
96888
|
+
const drawShape = useCallback((ctx, particle, x, y) => {
|
|
96965
96889
|
ctx.save();
|
|
96966
|
-
ctx.translate(
|
|
96890
|
+
ctx.translate(x, y);
|
|
96967
96891
|
if (rotate) {
|
|
96968
96892
|
ctx.rotate(particle.rotation);
|
|
96969
96893
|
}
|
|
@@ -97201,10 +97125,10 @@ var MouseTrailInternal = ({
|
|
|
97201
97125
|
if (!canvas)
|
|
97202
97126
|
return;
|
|
97203
97127
|
const rect = canvas.getBoundingClientRect();
|
|
97204
|
-
const
|
|
97128
|
+
const x = e.clientX - rect.left;
|
|
97205
97129
|
const y = e.clientY - rect.top;
|
|
97206
|
-
if (
|
|
97207
|
-
mouseRef.current = { x
|
|
97130
|
+
if (x >= 0 && x <= rect.width && y >= 0 && y <= rect.height) {
|
|
97131
|
+
mouseRef.current = { x, y, active: true };
|
|
97208
97132
|
if (!isActive2) {
|
|
97209
97133
|
setIsActive(true);
|
|
97210
97134
|
}
|
|
@@ -97220,10 +97144,10 @@ var MouseTrailInternal = ({
|
|
|
97220
97144
|
return;
|
|
97221
97145
|
const rect = canvas.getBoundingClientRect();
|
|
97222
97146
|
const touch = e.touches[0];
|
|
97223
|
-
const
|
|
97147
|
+
const x = touch.clientX - rect.left;
|
|
97224
97148
|
const y = touch.clientY - rect.top;
|
|
97225
|
-
if (
|
|
97226
|
-
mouseRef.current = { x
|
|
97149
|
+
if (x >= 0 && x <= rect.width && y >= 0 && y <= rect.height) {
|
|
97150
|
+
mouseRef.current = { x, y, active: true };
|
|
97227
97151
|
if (!isActive2) {
|
|
97228
97152
|
setIsActive(true);
|
|
97229
97153
|
}
|
|
@@ -97983,33 +97907,33 @@ var ScrollReveal = (props) => {
|
|
|
97983
97907
|
return /* @__PURE__ */ jsx(ScrollRevealInternal, { ...props });
|
|
97984
97908
|
};
|
|
97985
97909
|
ScrollReveal.displayName = "ScrollReveal";
|
|
97986
|
-
var getEasingValue = (
|
|
97910
|
+
var getEasingValue = (t, easing) => {
|
|
97987
97911
|
switch (easing) {
|
|
97988
97912
|
case "linear":
|
|
97989
|
-
return
|
|
97913
|
+
return t;
|
|
97990
97914
|
case "ease":
|
|
97991
|
-
return
|
|
97915
|
+
return t < 0.5 ? 2 * t * t : -1 + (4 - 2 * t) * t;
|
|
97992
97916
|
case "ease-in":
|
|
97993
|
-
return
|
|
97917
|
+
return t * t;
|
|
97994
97918
|
case "ease-out":
|
|
97995
|
-
return
|
|
97919
|
+
return t * (2 - t);
|
|
97996
97920
|
case "bounce":
|
|
97997
|
-
if (
|
|
97998
|
-
return 7.5625 *
|
|
97999
|
-
} else if (
|
|
98000
|
-
|
|
98001
|
-
return 7.5625 *
|
|
98002
|
-
} else if (
|
|
98003
|
-
|
|
98004
|
-
return 7.5625 *
|
|
97921
|
+
if (t < 0.363636) {
|
|
97922
|
+
return 7.5625 * t * t;
|
|
97923
|
+
} else if (t < 0.727272) {
|
|
97924
|
+
t -= 0.545454;
|
|
97925
|
+
return 7.5625 * t * t + 0.75;
|
|
97926
|
+
} else if (t < 0.90909) {
|
|
97927
|
+
t -= 0.818181;
|
|
97928
|
+
return 7.5625 * t * t + 0.9375;
|
|
98005
97929
|
} else {
|
|
98006
|
-
|
|
98007
|
-
return 7.5625 *
|
|
97930
|
+
t -= 0.954545;
|
|
97931
|
+
return 7.5625 * t * t + 0.984375;
|
|
98008
97932
|
}
|
|
98009
97933
|
case "elastic":
|
|
98010
|
-
return
|
|
97934
|
+
return t === 0 || t === 1 ? t : -Math.pow(2, 10 * (t - 1)) * Math.sin((t - 1.1) * 5 * Math.PI);
|
|
98011
97935
|
default:
|
|
98012
|
-
return
|
|
97936
|
+
return t;
|
|
98013
97937
|
}
|
|
98014
97938
|
};
|
|
98015
97939
|
var BounceEffectInternal = ({
|
|
@@ -98063,7 +97987,7 @@ var BounceEffectInternal = ({
|
|
|
98063
97987
|
const elapsed = time - startTimeRef.current;
|
|
98064
97988
|
const progress = Math.min(elapsed / duration, 1);
|
|
98065
97989
|
const easedProgress = getEasingValue(progress, easing);
|
|
98066
|
-
let
|
|
97990
|
+
let x = 0, y = 0;
|
|
98067
97991
|
switch (direction) {
|
|
98068
97992
|
case "up":
|
|
98069
97993
|
y = -distance * Math.sin(easedProgress * Math.PI * bounces) * Math.pow(elasticity, currentBounce);
|
|
@@ -98074,22 +97998,22 @@ var BounceEffectInternal = ({
|
|
|
98074
97998
|
y -= gravity * elapsed * elapsed / 1e4;
|
|
98075
97999
|
break;
|
|
98076
98000
|
case "left":
|
|
98077
|
-
|
|
98001
|
+
x = -distance * Math.sin(easedProgress * Math.PI * bounces) * Math.pow(elasticity, currentBounce);
|
|
98078
98002
|
break;
|
|
98079
98003
|
case "right":
|
|
98080
|
-
|
|
98004
|
+
x = distance * Math.sin(easedProgress * Math.PI * bounces) * Math.pow(elasticity, currentBounce);
|
|
98081
98005
|
break;
|
|
98082
98006
|
case "all":
|
|
98083
98007
|
const angle = elapsed * 0.01;
|
|
98084
|
-
|
|
98008
|
+
x = distance * Math.cos(angle) * Math.sin(easedProgress * Math.PI * bounces) * Math.pow(elasticity, currentBounce);
|
|
98085
98009
|
y = -Math.abs(distance * Math.sin(easedProgress * Math.PI * bounces) * Math.pow(elasticity, currentBounce));
|
|
98086
98010
|
y += gravity * elapsed * elapsed / 1e4;
|
|
98087
98011
|
break;
|
|
98088
98012
|
}
|
|
98089
|
-
|
|
98013
|
+
x *= friction;
|
|
98090
98014
|
y *= friction;
|
|
98091
98015
|
if (shake) {
|
|
98092
|
-
|
|
98016
|
+
x += (Math.random() - 0.5) * shakeIntensity * (1 - progress);
|
|
98093
98017
|
y += (Math.random() - 0.5) * shakeIntensity * (1 - progress);
|
|
98094
98018
|
}
|
|
98095
98019
|
if (rotate) {
|
|
@@ -98107,9 +98031,9 @@ var BounceEffectInternal = ({
|
|
|
98107
98031
|
}
|
|
98108
98032
|
if (jelly) {
|
|
98109
98033
|
const jellyOffset = Math.sin(elapsed * 0.02) * jellyIntensity * distance;
|
|
98110
|
-
|
|
98034
|
+
x += jellyOffset;
|
|
98111
98035
|
}
|
|
98112
|
-
setPosition({ x
|
|
98036
|
+
setPosition({ x, y });
|
|
98113
98037
|
if (progress >= 1) {
|
|
98114
98038
|
setCurrentBounce((prev) => prev + 1);
|
|
98115
98039
|
if (currentBounce >= bounces - 1) {
|
|
@@ -98241,7 +98165,7 @@ var BounceEffectInternal = ({
|
|
|
98241
98165
|
onMouseEnter: handleMouseEnter,
|
|
98242
98166
|
onClick: handleClick2,
|
|
98243
98167
|
children: [
|
|
98244
|
-
trail && animationState && Array.from({ length: trailCount }).map((
|
|
98168
|
+
trail && animationState && Array.from({ length: trailCount }).map((_, i) => /* @__PURE__ */ jsx(
|
|
98245
98169
|
"div",
|
|
98246
98170
|
{
|
|
98247
98171
|
className: "absolute inset-0 pointer-events-none",
|
|
@@ -98293,37 +98217,37 @@ var BounceEffect = (props) => {
|
|
|
98293
98217
|
return /* @__PURE__ */ jsx(BounceEffectInternal, { ...props });
|
|
98294
98218
|
};
|
|
98295
98219
|
BounceEffect.displayName = "BounceEffect";
|
|
98296
|
-
var getEasingValue2 = (
|
|
98220
|
+
var getEasingValue2 = (t, easing) => {
|
|
98297
98221
|
switch (easing) {
|
|
98298
98222
|
case "linear":
|
|
98299
|
-
return
|
|
98223
|
+
return t;
|
|
98300
98224
|
case "ease-in":
|
|
98301
|
-
return
|
|
98225
|
+
return t * t;
|
|
98302
98226
|
case "ease-out":
|
|
98303
|
-
return
|
|
98227
|
+
return t * (2 - t);
|
|
98304
98228
|
case "ease-in-out":
|
|
98305
|
-
return
|
|
98229
|
+
return t < 0.5 ? 2 * t * t : -1 + (4 - 2 * t) * t;
|
|
98306
98230
|
case "elastic":
|
|
98307
|
-
if (
|
|
98308
|
-
return
|
|
98231
|
+
if (t === 0 || t === 1)
|
|
98232
|
+
return t;
|
|
98309
98233
|
const p = 0.3;
|
|
98310
98234
|
const s = p / 4;
|
|
98311
|
-
return Math.pow(2, -10 *
|
|
98235
|
+
return Math.pow(2, -10 * t) * Math.sin((t - s) * (2 * Math.PI) / p) + 1;
|
|
98312
98236
|
case "bounce":
|
|
98313
|
-
if (
|
|
98314
|
-
return 7.5625 *
|
|
98315
|
-
} else if (
|
|
98316
|
-
|
|
98317
|
-
return 7.5625 *
|
|
98318
|
-
} else if (
|
|
98319
|
-
|
|
98320
|
-
return 7.5625 *
|
|
98237
|
+
if (t < 0.363636) {
|
|
98238
|
+
return 7.5625 * t * t;
|
|
98239
|
+
} else if (t < 0.727272) {
|
|
98240
|
+
t -= 0.545454;
|
|
98241
|
+
return 7.5625 * t * t + 0.75;
|
|
98242
|
+
} else if (t < 0.90909) {
|
|
98243
|
+
t -= 0.818181;
|
|
98244
|
+
return 7.5625 * t * t + 0.9375;
|
|
98321
98245
|
} else {
|
|
98322
|
-
|
|
98323
|
-
return 7.5625 *
|
|
98246
|
+
t -= 0.954545;
|
|
98247
|
+
return 7.5625 * t * t + 0.984375;
|
|
98324
98248
|
}
|
|
98325
98249
|
default:
|
|
98326
|
-
return
|
|
98250
|
+
return t;
|
|
98327
98251
|
}
|
|
98328
98252
|
};
|
|
98329
98253
|
var ElasticAnimationInternal = ({
|
|
@@ -98386,11 +98310,11 @@ var ElasticAnimationInternal = ({
|
|
|
98386
98310
|
const animationPhaseRef = useRef("main");
|
|
98387
98311
|
const calculateElasticMotion = useCallback((progress) => {
|
|
98388
98312
|
const elasticProgress = getEasingValue2(progress, easing);
|
|
98389
|
-
let
|
|
98313
|
+
let x = 0, y = 0, scale = 1, rotate = 0, skewX = 0, skewY = 0;
|
|
98390
98314
|
if (direction === "horizontal" || direction === "both") {
|
|
98391
|
-
|
|
98315
|
+
x = distance * elasticProgress * Math.cos(progress * Math.PI * 2 * oscillationCount);
|
|
98392
98316
|
if (oscillate) {
|
|
98393
|
-
|
|
98317
|
+
x *= Math.pow(1 - progress, damping);
|
|
98394
98318
|
}
|
|
98395
98319
|
}
|
|
98396
98320
|
if (direction === "vertical" || direction === "both") {
|
|
@@ -98401,17 +98325,17 @@ var ElasticAnimationInternal = ({
|
|
|
98401
98325
|
}
|
|
98402
98326
|
if (direction === "diagonal") {
|
|
98403
98327
|
const angle = progress * Math.PI * 2 * oscillationCount;
|
|
98404
|
-
|
|
98328
|
+
x = distance * elasticProgress * Math.cos(angle);
|
|
98405
98329
|
y = distance * elasticProgress * Math.sin(angle);
|
|
98406
98330
|
if (oscillate) {
|
|
98407
98331
|
const dampingFactor = Math.pow(1 - progress, damping);
|
|
98408
|
-
|
|
98332
|
+
x *= dampingFactor;
|
|
98409
98333
|
y *= dampingFactor;
|
|
98410
98334
|
}
|
|
98411
98335
|
}
|
|
98412
98336
|
if (rubberBand) {
|
|
98413
98337
|
const rubberProgress = Math.sin(progress * Math.PI);
|
|
98414
|
-
|
|
98338
|
+
x *= 1 + rubberProgress * rubberBandIntensity;
|
|
98415
98339
|
scale = 1 + rubberProgress * 0.1 * rubberBandIntensity;
|
|
98416
98340
|
}
|
|
98417
98341
|
if (jello) {
|
|
@@ -98421,7 +98345,7 @@ var ElasticAnimationInternal = ({
|
|
|
98421
98345
|
}
|
|
98422
98346
|
if (morph && morphTargets.length > 0) {
|
|
98423
98347
|
const target = morphTargets[morphIndex % morphTargets.length];
|
|
98424
|
-
|
|
98348
|
+
x += target.x * elasticProgress;
|
|
98425
98349
|
y += target.y * elasticProgress;
|
|
98426
98350
|
if (target.scale)
|
|
98427
98351
|
scale *= target.scale;
|
|
@@ -98436,12 +98360,12 @@ var ElasticAnimationInternal = ({
|
|
|
98436
98360
|
skewX += (stretchX - 1) * 10;
|
|
98437
98361
|
}
|
|
98438
98362
|
if (anticipation && animationPhaseRef.current === "anticipation") {
|
|
98439
|
-
|
|
98363
|
+
x -= anticipationDistance * (1 - progress * 4);
|
|
98440
98364
|
scale *= 0.95 + progress * 0.05;
|
|
98441
98365
|
}
|
|
98442
98366
|
if (followThrough && animationPhaseRef.current === "follow-through") {
|
|
98443
98367
|
const overshoot = Math.sin(progress * Math.PI) * followThroughOvershoot;
|
|
98444
|
-
|
|
98368
|
+
x *= overshoot;
|
|
98445
98369
|
y *= overshoot;
|
|
98446
98370
|
}
|
|
98447
98371
|
if (arcMotion) {
|
|
@@ -98456,10 +98380,10 @@ var ElasticAnimationInternal = ({
|
|
|
98456
98380
|
scale *= 1 + (pulseScale - 1) * pulseProgress * (1 - progress);
|
|
98457
98381
|
}
|
|
98458
98382
|
if (shake) {
|
|
98459
|
-
|
|
98383
|
+
x += (Math.random() - 0.5) * shakeIntensity * (1 - progress);
|
|
98460
98384
|
y += (Math.random() - 0.5) * shakeIntensity * (1 - progress);
|
|
98461
98385
|
}
|
|
98462
|
-
return { x
|
|
98386
|
+
return { x, y, scale, rotate, skewX, skewY };
|
|
98463
98387
|
}, [
|
|
98464
98388
|
easing,
|
|
98465
98389
|
direction,
|
|
@@ -98763,21 +98687,21 @@ var PathAnimationsInternal = ({
|
|
|
98763
98687
|
svgRef.current.removeChild(tempPath);
|
|
98764
98688
|
}
|
|
98765
98689
|
}, [getPathString]);
|
|
98766
|
-
const getEasingValue3 = (
|
|
98690
|
+
const getEasingValue3 = (t) => {
|
|
98767
98691
|
switch (easing) {
|
|
98768
98692
|
case "linear":
|
|
98769
|
-
return
|
|
98693
|
+
return t;
|
|
98770
98694
|
case "ease-in":
|
|
98771
|
-
return
|
|
98695
|
+
return t * t;
|
|
98772
98696
|
case "ease-out":
|
|
98773
|
-
return
|
|
98697
|
+
return t * (2 - t);
|
|
98774
98698
|
case "ease-in-out":
|
|
98775
|
-
return
|
|
98699
|
+
return t < 0.5 ? 2 * t * t : -1 + (4 - 2 * t) * t;
|
|
98776
98700
|
case "cubic-bezier":
|
|
98777
98701
|
const [x1, y1, x2, y2] = cubicBezier;
|
|
98778
|
-
return
|
|
98702
|
+
return t * (3 * (1 - t) * (1 - t) * y1 + 3 * (1 - t) * t * y2 + t * t);
|
|
98779
98703
|
default:
|
|
98780
|
-
return
|
|
98704
|
+
return t;
|
|
98781
98705
|
}
|
|
98782
98706
|
};
|
|
98783
98707
|
const calculatePathPosition = useCallback((progress) => {
|
|
@@ -99220,21 +99144,21 @@ var SVGAnimationsInternal = ({
|
|
|
99220
99144
|
});
|
|
99221
99145
|
}
|
|
99222
99146
|
}, [type, drawOptions.fadeIn]);
|
|
99223
|
-
const getEasingValue3 = (
|
|
99147
|
+
const getEasingValue3 = (t) => {
|
|
99224
99148
|
switch (easing) {
|
|
99225
99149
|
case "linear":
|
|
99226
|
-
return
|
|
99150
|
+
return t;
|
|
99227
99151
|
case "ease-in":
|
|
99228
|
-
return
|
|
99152
|
+
return t * t;
|
|
99229
99153
|
case "ease-out":
|
|
99230
|
-
return
|
|
99154
|
+
return t * (2 - t);
|
|
99231
99155
|
case "ease-in-out":
|
|
99232
|
-
return
|
|
99156
|
+
return t < 0.5 ? 2 * t * t : -1 + (4 - 2 * t) * t;
|
|
99233
99157
|
case "cubic-bezier":
|
|
99234
99158
|
const [x1, y1, x2, y2] = cubicBezier;
|
|
99235
|
-
return
|
|
99159
|
+
return t * (3 * (1 - t) * (1 - t) * y1 + 3 * (1 - t) * t * y2 + t * t);
|
|
99236
99160
|
default:
|
|
99237
|
-
return
|
|
99161
|
+
return t;
|
|
99238
99162
|
}
|
|
99239
99163
|
};
|
|
99240
99164
|
const animateDraw = useCallback((progress) => {
|
|
@@ -99982,10 +99906,10 @@ var TouchGesturesInternal = ({
|
|
|
99982
99906
|
const getAngle = (p1, p2) => {
|
|
99983
99907
|
return Math.atan2(p2.currentY - p1.currentY, p2.currentX - p1.currentX) * 180 / Math.PI;
|
|
99984
99908
|
};
|
|
99985
|
-
const applyBoundaries = useCallback((
|
|
99909
|
+
const applyBoundaries = useCallback((x, y) => {
|
|
99986
99910
|
if (!panBoundaries)
|
|
99987
|
-
return { x
|
|
99988
|
-
const bounded = { x
|
|
99911
|
+
return { x, y };
|
|
99912
|
+
const bounded = { x, y };
|
|
99989
99913
|
if (panBoundaries.left !== void 0) {
|
|
99990
99914
|
bounded.x = Math.max(panBoundaries.left, bounded.x);
|
|
99991
99915
|
}
|
|
@@ -100066,7 +99990,7 @@ var TouchGesturesInternal = ({
|
|
|
100066
99990
|
cancelAnimationFrame(momentumAnimationRef.current);
|
|
100067
99991
|
}
|
|
100068
99992
|
if (indicators) {
|
|
100069
|
-
setIndicatorPositions(touchArray.map((
|
|
99993
|
+
setIndicatorPositions(touchArray.map((t) => ({ x: t.clientX, y: t.clientY })));
|
|
100070
99994
|
}
|
|
100071
99995
|
};
|
|
100072
99996
|
const handleTouchMove = (e) => {
|
|
@@ -100124,7 +100048,7 @@ var TouchGesturesInternal = ({
|
|
|
100124
100048
|
clearTimeout(longPressTimerRef.current);
|
|
100125
100049
|
}
|
|
100126
100050
|
if (indicators) {
|
|
100127
|
-
setIndicatorPositions(touchArray.map((
|
|
100051
|
+
setIndicatorPositions(touchArray.map((t) => ({ x: t.clientX, y: t.clientY })));
|
|
100128
100052
|
}
|
|
100129
100053
|
};
|
|
100130
100054
|
const handleTouchEnd = (e) => {
|
|
@@ -100906,22 +100830,22 @@ var ClickAnimationsInternal = ({
|
|
|
100906
100830
|
setLongPressTimeout(null);
|
|
100907
100831
|
}
|
|
100908
100832
|
}, [longPressTimeout]);
|
|
100909
|
-
const getEasingFunction = useCallback((type,
|
|
100833
|
+
const getEasingFunction = useCallback((type, t) => {
|
|
100910
100834
|
switch (type) {
|
|
100911
100835
|
case "ease":
|
|
100912
|
-
return
|
|
100836
|
+
return t < 0.5 ? 2 * t * t : -1 + (4 - 2 * t) * t;
|
|
100913
100837
|
case "ease-in":
|
|
100914
|
-
return
|
|
100838
|
+
return t * t;
|
|
100915
100839
|
case "ease-out":
|
|
100916
|
-
return
|
|
100840
|
+
return t * (2 - t);
|
|
100917
100841
|
case "ease-in-out":
|
|
100918
|
-
return
|
|
100842
|
+
return t < 0.5 ? 2 * t * t : -1 + (4 - 2 * t) * t;
|
|
100919
100843
|
case "bounce":
|
|
100920
|
-
return 1 - Math.pow(1 -
|
|
100844
|
+
return 1 - Math.pow(1 - t, 3) * Math.cos(t * Math.PI * 4);
|
|
100921
100845
|
case "elastic":
|
|
100922
|
-
return
|
|
100846
|
+
return t === 0 ? 0 : t === 1 ? 1 : -Math.pow(2, 10 * (t - 1)) * Math.sin((t - 1.1) * 5 * Math.PI);
|
|
100923
100847
|
default:
|
|
100924
|
-
return
|
|
100848
|
+
return t;
|
|
100925
100849
|
}
|
|
100926
100850
|
}, []);
|
|
100927
100851
|
const getAnimationStyles = useCallback((animation) => {
|