Area restrita - Questionario
This commit is contained in:
+4
-4
@@ -1,7 +1,7 @@
|
||||
"use client";
|
||||
import {
|
||||
Presence
|
||||
} from "./chunk-INCCO7S4.js";
|
||||
} from "./chunk-THQIQPZA.js";
|
||||
import {
|
||||
Combination_default,
|
||||
DismissableLayer,
|
||||
@@ -9,7 +9,7 @@ import {
|
||||
Portal,
|
||||
hideOthers,
|
||||
useFocusGuards
|
||||
} from "./chunk-LIWCVBQK.js";
|
||||
} from "./chunk-AFOUPPSL.js";
|
||||
import {
|
||||
Primitive,
|
||||
composeEventHandlers,
|
||||
@@ -17,12 +17,12 @@ import {
|
||||
createContextScope,
|
||||
useControllableState,
|
||||
useId
|
||||
} from "./chunk-MOFDO34C.js";
|
||||
} from "./chunk-VURJIDBW.js";
|
||||
import "./chunk-YF4B4G2L.js";
|
||||
import {
|
||||
composeRefs,
|
||||
useComposedRefs
|
||||
} from "./chunk-2VUH7NEY.js";
|
||||
import "./chunk-YF4B4G2L.js";
|
||||
import {
|
||||
require_jsx_runtime
|
||||
} from "./chunk-2YVA4HRZ.js";
|
||||
|
||||
+1
-1
@@ -2,10 +2,10 @@
|
||||
import {
|
||||
createSlot
|
||||
} from "./chunk-YWBEB5PG.js";
|
||||
import "./chunk-2VUH7NEY.js";
|
||||
import {
|
||||
require_react_dom
|
||||
} from "./chunk-YF4B4G2L.js";
|
||||
import "./chunk-2VUH7NEY.js";
|
||||
import {
|
||||
require_jsx_runtime
|
||||
} from "./chunk-2YVA4HRZ.js";
|
||||
|
||||
+4
-4
@@ -1,13 +1,13 @@
|
||||
"use client";
|
||||
import {
|
||||
Presence
|
||||
} from "./chunk-INCCO7S4.js";
|
||||
} from "./chunk-THQIQPZA.js";
|
||||
import {
|
||||
createCollection,
|
||||
useDirection,
|
||||
usePrevious,
|
||||
useSize
|
||||
} from "./chunk-L2OGOWTU.js";
|
||||
} from "./chunk-BZDTGYB5.js";
|
||||
import {
|
||||
Primitive,
|
||||
composeEventHandlers,
|
||||
@@ -15,11 +15,11 @@ import {
|
||||
useCallbackRef,
|
||||
useControllableState,
|
||||
useId
|
||||
} from "./chunk-MOFDO34C.js";
|
||||
} from "./chunk-VURJIDBW.js";
|
||||
import "./chunk-YF4B4G2L.js";
|
||||
import {
|
||||
useComposedRefs
|
||||
} from "./chunk-2VUH7NEY.js";
|
||||
import "./chunk-YF4B4G2L.js";
|
||||
import {
|
||||
require_jsx_runtime
|
||||
} from "./chunk-2YVA4HRZ.js";
|
||||
|
||||
+6
-6
@@ -6,13 +6,13 @@ import {
|
||||
Portal,
|
||||
hideOthers,
|
||||
useFocusGuards
|
||||
} from "./chunk-LIWCVBQK.js";
|
||||
} from "./chunk-AFOUPPSL.js";
|
||||
import {
|
||||
createCollection,
|
||||
useDirection,
|
||||
usePrevious,
|
||||
useSize
|
||||
} from "./chunk-L2OGOWTU.js";
|
||||
} from "./chunk-BZDTGYB5.js";
|
||||
import {
|
||||
Primitive,
|
||||
composeEventHandlers,
|
||||
@@ -21,14 +21,14 @@ import {
|
||||
useControllableState,
|
||||
useId,
|
||||
useLayoutEffect2
|
||||
} from "./chunk-MOFDO34C.js";
|
||||
} from "./chunk-VURJIDBW.js";
|
||||
import {
|
||||
require_react_dom
|
||||
} from "./chunk-YF4B4G2L.js";
|
||||
import {
|
||||
composeRefs,
|
||||
useComposedRefs
|
||||
} from "./chunk-2VUH7NEY.js";
|
||||
import {
|
||||
require_react_dom
|
||||
} from "./chunk-YF4B4G2L.js";
|
||||
import {
|
||||
require_jsx_runtime
|
||||
} from "./chunk-2YVA4HRZ.js";
|
||||
|
||||
+73
-34
@@ -1,143 +1,182 @@
|
||||
{
|
||||
"hash": "bef2a67d",
|
||||
"configHash": "eccf13b4",
|
||||
"lockfileHash": "c4c8a51c",
|
||||
"browserHash": "e7109be1",
|
||||
"hash": "3027357f",
|
||||
"configHash": "79477533",
|
||||
"lockfileHash": "cc556dfa",
|
||||
"browserHash": "a4d0689f",
|
||||
"optimized": {
|
||||
"react": {
|
||||
"src": "../../react/index.js",
|
||||
"file": "react.js",
|
||||
"fileHash": "dd97ceba",
|
||||
"fileHash": "554f9983",
|
||||
"needsInterop": true
|
||||
},
|
||||
"react-dom": {
|
||||
"src": "../../react-dom/index.js",
|
||||
"file": "react-dom.js",
|
||||
"fileHash": "8becf687",
|
||||
"fileHash": "ad984ce0",
|
||||
"needsInterop": true
|
||||
},
|
||||
"react/jsx-dev-runtime": {
|
||||
"src": "../../react/jsx-dev-runtime.js",
|
||||
"file": "react_jsx-dev-runtime.js",
|
||||
"fileHash": "2c7217d2",
|
||||
"fileHash": "4d4232e1",
|
||||
"needsInterop": true
|
||||
},
|
||||
"react/jsx-runtime": {
|
||||
"src": "../../react/jsx-runtime.js",
|
||||
"file": "react_jsx-runtime.js",
|
||||
"fileHash": "e28ec614",
|
||||
"fileHash": "4eeb30cd",
|
||||
"needsInterop": true
|
||||
},
|
||||
"@radix-ui/react-dialog": {
|
||||
"src": "../../@radix-ui/react-dialog/dist/index.mjs",
|
||||
"file": "@radix-ui_react-dialog.js",
|
||||
"fileHash": "22041c72",
|
||||
"fileHash": "e7cdc883",
|
||||
"needsInterop": false
|
||||
},
|
||||
"@radix-ui/react-label": {
|
||||
"src": "../../@radix-ui/react-label/dist/index.mjs",
|
||||
"file": "@radix-ui_react-label.js",
|
||||
"fileHash": "d33ac0ed",
|
||||
"fileHash": "d639f3af",
|
||||
"needsInterop": false
|
||||
},
|
||||
"@radix-ui/react-radio-group": {
|
||||
"src": "../../@radix-ui/react-radio-group/dist/index.mjs",
|
||||
"file": "@radix-ui_react-radio-group.js",
|
||||
"fileHash": "2be9d4b7",
|
||||
"fileHash": "af0ec47d",
|
||||
"needsInterop": false
|
||||
},
|
||||
"@radix-ui/react-select": {
|
||||
"src": "../../@radix-ui/react-select/dist/index.mjs",
|
||||
"file": "@radix-ui_react-select.js",
|
||||
"fileHash": "51dd47da",
|
||||
"fileHash": "abaf0a20",
|
||||
"needsInterop": false
|
||||
},
|
||||
"@radix-ui/react-slot": {
|
||||
"src": "../../@radix-ui/react-slot/dist/index.mjs",
|
||||
"file": "@radix-ui_react-slot.js",
|
||||
"fileHash": "32dfa860",
|
||||
"fileHash": "ebd9dde0",
|
||||
"needsInterop": false
|
||||
},
|
||||
"@tanstack/react-query": {
|
||||
"src": "../../@tanstack/react-query/build/modern/index.js",
|
||||
"file": "@tanstack_react-query.js",
|
||||
"fileHash": "a13ea524",
|
||||
"needsInterop": false
|
||||
},
|
||||
"@trpc/client": {
|
||||
"src": "../../@trpc/client/dist/index.mjs",
|
||||
"file": "@trpc_client.js",
|
||||
"fileHash": "c7aefcb2",
|
||||
"needsInterop": false
|
||||
},
|
||||
"@trpc/react-query": {
|
||||
"src": "../../@trpc/react-query/dist/index.mjs",
|
||||
"file": "@trpc_react-query.js",
|
||||
"fileHash": "a5734117",
|
||||
"needsInterop": false
|
||||
},
|
||||
"class-variance-authority": {
|
||||
"src": "../../class-variance-authority/dist/index.mjs",
|
||||
"file": "class-variance-authority.js",
|
||||
"fileHash": "f4a8c6f4",
|
||||
"fileHash": "77515f47",
|
||||
"needsInterop": false
|
||||
},
|
||||
"clsx": {
|
||||
"src": "../../clsx/dist/clsx.mjs",
|
||||
"file": "clsx.js",
|
||||
"fileHash": "e5a299ae",
|
||||
"fileHash": "f3033bff",
|
||||
"needsInterop": false
|
||||
},
|
||||
"gsap": {
|
||||
"src": "../../gsap/index.js",
|
||||
"file": "gsap.js",
|
||||
"fileHash": "76791308",
|
||||
"fileHash": "c80894df",
|
||||
"needsInterop": false
|
||||
},
|
||||
"gsap/ScrollTrigger": {
|
||||
"src": "../../gsap/ScrollTrigger.js",
|
||||
"file": "gsap_ScrollTrigger.js",
|
||||
"fileHash": "187ec0aa",
|
||||
"fileHash": "e62c79bc",
|
||||
"needsInterop": false
|
||||
},
|
||||
"lucide-react": {
|
||||
"src": "../../lucide-react/dist/esm/lucide-react.js",
|
||||
"file": "lucide-react.js",
|
||||
"fileHash": "58304198",
|
||||
"fileHash": "42086d0d",
|
||||
"needsInterop": false
|
||||
},
|
||||
"react-dom/client": {
|
||||
"src": "../../react-dom/client.js",
|
||||
"file": "react-dom_client.js",
|
||||
"fileHash": "b30625c8",
|
||||
"fileHash": "d8b51de0",
|
||||
"needsInterop": true
|
||||
},
|
||||
"react-helmet-async": {
|
||||
"src": "../../react-helmet-async/lib/index.esm.js",
|
||||
"file": "react-helmet-async.js",
|
||||
"fileHash": "79a82144",
|
||||
"fileHash": "71acdb41",
|
||||
"needsInterop": false
|
||||
},
|
||||
"react-router": {
|
||||
"src": "../../react-router/dist/development/index.mjs",
|
||||
"file": "react-router.js",
|
||||
"fileHash": "d5b54b72",
|
||||
"needsInterop": false
|
||||
},
|
||||
"react-router-dom": {
|
||||
"src": "../../react-router-dom/dist/index.mjs",
|
||||
"file": "react-router-dom.js",
|
||||
"fileHash": "4427109e",
|
||||
"fileHash": "2b8d6b0b",
|
||||
"needsInterop": false
|
||||
},
|
||||
"superjson": {
|
||||
"src": "../../superjson/dist/index.js",
|
||||
"file": "superjson.js",
|
||||
"fileHash": "c81c6cdc",
|
||||
"needsInterop": false
|
||||
},
|
||||
"tailwind-merge": {
|
||||
"src": "../../tailwind-merge/dist/bundle-mjs.mjs",
|
||||
"file": "tailwind-merge.js",
|
||||
"fileHash": "9511be49",
|
||||
"fileHash": "10519efc",
|
||||
"needsInterop": false
|
||||
}
|
||||
},
|
||||
"chunks": {
|
||||
"chunk-PXXDNLPL": {
|
||||
"file": "chunk-PXXDNLPL.js"
|
||||
},
|
||||
"chunk-MD5BUWWK": {
|
||||
"file": "chunk-MD5BUWWK.js"
|
||||
},
|
||||
"chunk-U7P2NEEE": {
|
||||
"file": "chunk-U7P2NEEE.js"
|
||||
},
|
||||
"chunk-5M2SSBTA": {
|
||||
"file": "chunk-5M2SSBTA.js"
|
||||
},
|
||||
"chunk-THQIQPZA": {
|
||||
"file": "chunk-THQIQPZA.js"
|
||||
},
|
||||
"chunk-YWBEB5PG": {
|
||||
"file": "chunk-YWBEB5PG.js"
|
||||
},
|
||||
"chunk-INCCO7S4": {
|
||||
"file": "chunk-INCCO7S4.js"
|
||||
"chunk-AFOUPPSL": {
|
||||
"file": "chunk-AFOUPPSL.js"
|
||||
},
|
||||
"chunk-LIWCVBQK": {
|
||||
"file": "chunk-LIWCVBQK.js"
|
||||
"chunk-BZDTGYB5": {
|
||||
"file": "chunk-BZDTGYB5.js"
|
||||
},
|
||||
"chunk-L2OGOWTU": {
|
||||
"file": "chunk-L2OGOWTU.js"
|
||||
},
|
||||
"chunk-MOFDO34C": {
|
||||
"file": "chunk-MOFDO34C.js"
|
||||
},
|
||||
"chunk-2VUH7NEY": {
|
||||
"file": "chunk-2VUH7NEY.js"
|
||||
"chunk-VURJIDBW": {
|
||||
"file": "chunk-VURJIDBW.js"
|
||||
},
|
||||
"chunk-YF4B4G2L": {
|
||||
"file": "chunk-YF4B4G2L.js"
|
||||
},
|
||||
"chunk-2VUH7NEY": {
|
||||
"file": "chunk-2VUH7NEY.js"
|
||||
},
|
||||
"chunk-2YVA4HRZ": {
|
||||
"file": "chunk-2YVA4HRZ.js"
|
||||
},
|
||||
|
||||
-143
@@ -1,143 +0,0 @@
|
||||
import {
|
||||
useLayoutEffect2
|
||||
} from "./chunk-MOFDO34C.js";
|
||||
import {
|
||||
useComposedRefs
|
||||
} from "./chunk-2VUH7NEY.js";
|
||||
import {
|
||||
require_react
|
||||
} from "./chunk-WUR7D6NS.js";
|
||||
import {
|
||||
__toESM
|
||||
} from "./chunk-G3PMV62Z.js";
|
||||
|
||||
// node_modules/@radix-ui/react-presence/dist/index.mjs
|
||||
var React2 = __toESM(require_react(), 1);
|
||||
var React = __toESM(require_react(), 1);
|
||||
function useStateMachine(initialState, machine) {
|
||||
return React.useReducer((state, event) => {
|
||||
const nextState = machine[state][event];
|
||||
return nextState ?? state;
|
||||
}, initialState);
|
||||
}
|
||||
var Presence = (props) => {
|
||||
const { present, children } = props;
|
||||
const presence = usePresence(present);
|
||||
const child = typeof children === "function" ? children({ present: presence.isPresent }) : React2.Children.only(children);
|
||||
const ref = useComposedRefs(presence.ref, getElementRef(child));
|
||||
const forceMount = typeof children === "function";
|
||||
return forceMount || presence.isPresent ? React2.cloneElement(child, { ref }) : null;
|
||||
};
|
||||
Presence.displayName = "Presence";
|
||||
function usePresence(present) {
|
||||
const [node, setNode] = React2.useState();
|
||||
const stylesRef = React2.useRef(null);
|
||||
const prevPresentRef = React2.useRef(present);
|
||||
const prevAnimationNameRef = React2.useRef("none");
|
||||
const initialState = present ? "mounted" : "unmounted";
|
||||
const [state, send] = useStateMachine(initialState, {
|
||||
mounted: {
|
||||
UNMOUNT: "unmounted",
|
||||
ANIMATION_OUT: "unmountSuspended"
|
||||
},
|
||||
unmountSuspended: {
|
||||
MOUNT: "mounted",
|
||||
ANIMATION_END: "unmounted"
|
||||
},
|
||||
unmounted: {
|
||||
MOUNT: "mounted"
|
||||
}
|
||||
});
|
||||
React2.useEffect(() => {
|
||||
const currentAnimationName = getAnimationName(stylesRef.current);
|
||||
prevAnimationNameRef.current = state === "mounted" ? currentAnimationName : "none";
|
||||
}, [state]);
|
||||
useLayoutEffect2(() => {
|
||||
const styles = stylesRef.current;
|
||||
const wasPresent = prevPresentRef.current;
|
||||
const hasPresentChanged = wasPresent !== present;
|
||||
if (hasPresentChanged) {
|
||||
const prevAnimationName = prevAnimationNameRef.current;
|
||||
const currentAnimationName = getAnimationName(styles);
|
||||
if (present) {
|
||||
send("MOUNT");
|
||||
} else if (currentAnimationName === "none" || styles?.display === "none") {
|
||||
send("UNMOUNT");
|
||||
} else {
|
||||
const isAnimating = prevAnimationName !== currentAnimationName;
|
||||
if (wasPresent && isAnimating) {
|
||||
send("ANIMATION_OUT");
|
||||
} else {
|
||||
send("UNMOUNT");
|
||||
}
|
||||
}
|
||||
prevPresentRef.current = present;
|
||||
}
|
||||
}, [present, send]);
|
||||
useLayoutEffect2(() => {
|
||||
if (node) {
|
||||
let timeoutId;
|
||||
const ownerWindow = node.ownerDocument.defaultView ?? window;
|
||||
const handleAnimationEnd = (event) => {
|
||||
const currentAnimationName = getAnimationName(stylesRef.current);
|
||||
const isCurrentAnimation = currentAnimationName.includes(CSS.escape(event.animationName));
|
||||
if (event.target === node && isCurrentAnimation) {
|
||||
send("ANIMATION_END");
|
||||
if (!prevPresentRef.current) {
|
||||
const currentFillMode = node.style.animationFillMode;
|
||||
node.style.animationFillMode = "forwards";
|
||||
timeoutId = ownerWindow.setTimeout(() => {
|
||||
if (node.style.animationFillMode === "forwards") {
|
||||
node.style.animationFillMode = currentFillMode;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
const handleAnimationStart = (event) => {
|
||||
if (event.target === node) {
|
||||
prevAnimationNameRef.current = getAnimationName(stylesRef.current);
|
||||
}
|
||||
};
|
||||
node.addEventListener("animationstart", handleAnimationStart);
|
||||
node.addEventListener("animationcancel", handleAnimationEnd);
|
||||
node.addEventListener("animationend", handleAnimationEnd);
|
||||
return () => {
|
||||
ownerWindow.clearTimeout(timeoutId);
|
||||
node.removeEventListener("animationstart", handleAnimationStart);
|
||||
node.removeEventListener("animationcancel", handleAnimationEnd);
|
||||
node.removeEventListener("animationend", handleAnimationEnd);
|
||||
};
|
||||
} else {
|
||||
send("ANIMATION_END");
|
||||
}
|
||||
}, [node, send]);
|
||||
return {
|
||||
isPresent: ["mounted", "unmountSuspended"].includes(state),
|
||||
ref: React2.useCallback((node2) => {
|
||||
stylesRef.current = node2 ? getComputedStyle(node2) : null;
|
||||
setNode(node2);
|
||||
}, [])
|
||||
};
|
||||
}
|
||||
function getAnimationName(styles) {
|
||||
return styles?.animationName || "none";
|
||||
}
|
||||
function getElementRef(element) {
|
||||
let getter = Object.getOwnPropertyDescriptor(element.props, "ref")?.get;
|
||||
let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
||||
if (mayWarn) {
|
||||
return element.ref;
|
||||
}
|
||||
getter = Object.getOwnPropertyDescriptor(element, "ref")?.get;
|
||||
mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
||||
if (mayWarn) {
|
||||
return element.props.ref;
|
||||
}
|
||||
return element.props.ref || element.ref;
|
||||
}
|
||||
|
||||
export {
|
||||
Presence
|
||||
};
|
||||
//# sourceMappingURL=chunk-INCCO7S4.js.map
|
||||
-7
File diff suppressed because one or more lines are too long
-248
@@ -1,248 +0,0 @@
|
||||
import {
|
||||
createContextScope,
|
||||
useLayoutEffect2
|
||||
} from "./chunk-MOFDO34C.js";
|
||||
import {
|
||||
composeRefs,
|
||||
useComposedRefs
|
||||
} from "./chunk-2VUH7NEY.js";
|
||||
import {
|
||||
require_jsx_runtime
|
||||
} from "./chunk-2YVA4HRZ.js";
|
||||
import {
|
||||
require_react
|
||||
} from "./chunk-WUR7D6NS.js";
|
||||
import {
|
||||
__toESM
|
||||
} from "./chunk-G3PMV62Z.js";
|
||||
|
||||
// node_modules/@radix-ui/react-collection/dist/index.mjs
|
||||
var import_react = __toESM(require_react(), 1);
|
||||
|
||||
// node_modules/@radix-ui/react-collection/node_modules/@radix-ui/react-slot/dist/index.mjs
|
||||
var React = __toESM(require_react(), 1);
|
||||
var import_jsx_runtime = __toESM(require_jsx_runtime(), 1);
|
||||
function createSlot(ownerName) {
|
||||
const SlotClone = createSlotClone(ownerName);
|
||||
const Slot2 = React.forwardRef((props, forwardedRef) => {
|
||||
const { children, ...slotProps } = props;
|
||||
const childrenArray = React.Children.toArray(children);
|
||||
const slottable = childrenArray.find(isSlottable);
|
||||
if (slottable) {
|
||||
const newElement = slottable.props.children;
|
||||
const newChildren = childrenArray.map((child) => {
|
||||
if (child === slottable) {
|
||||
if (React.Children.count(newElement) > 1) return React.Children.only(null);
|
||||
return React.isValidElement(newElement) ? newElement.props.children : null;
|
||||
} else {
|
||||
return child;
|
||||
}
|
||||
});
|
||||
return (0, import_jsx_runtime.jsx)(SlotClone, { ...slotProps, ref: forwardedRef, children: React.isValidElement(newElement) ? React.cloneElement(newElement, void 0, newChildren) : null });
|
||||
}
|
||||
return (0, import_jsx_runtime.jsx)(SlotClone, { ...slotProps, ref: forwardedRef, children });
|
||||
});
|
||||
Slot2.displayName = `${ownerName}.Slot`;
|
||||
return Slot2;
|
||||
}
|
||||
var Slot = createSlot("Slot");
|
||||
function createSlotClone(ownerName) {
|
||||
const SlotClone = React.forwardRef((props, forwardedRef) => {
|
||||
const { children, ...slotProps } = props;
|
||||
if (React.isValidElement(children)) {
|
||||
const childrenRef = getElementRef(children);
|
||||
const props2 = mergeProps(slotProps, children.props);
|
||||
if (children.type !== React.Fragment) {
|
||||
props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;
|
||||
}
|
||||
return React.cloneElement(children, props2);
|
||||
}
|
||||
return React.Children.count(children) > 1 ? React.Children.only(null) : null;
|
||||
});
|
||||
SlotClone.displayName = `${ownerName}.SlotClone`;
|
||||
return SlotClone;
|
||||
}
|
||||
var SLOTTABLE_IDENTIFIER = /* @__PURE__ */ Symbol("radix.slottable");
|
||||
function createSlottable(ownerName) {
|
||||
const Slottable2 = ({ children }) => {
|
||||
return (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, { children });
|
||||
};
|
||||
Slottable2.displayName = `${ownerName}.Slottable`;
|
||||
Slottable2.__radixId = SLOTTABLE_IDENTIFIER;
|
||||
return Slottable2;
|
||||
}
|
||||
var Slottable = createSlottable("Slottable");
|
||||
function isSlottable(child) {
|
||||
return React.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;
|
||||
}
|
||||
function mergeProps(slotProps, childProps) {
|
||||
const overrideProps = { ...childProps };
|
||||
for (const propName in childProps) {
|
||||
const slotPropValue = slotProps[propName];
|
||||
const childPropValue = childProps[propName];
|
||||
const isHandler = /^on[A-Z]/.test(propName);
|
||||
if (isHandler) {
|
||||
if (slotPropValue && childPropValue) {
|
||||
overrideProps[propName] = (...args) => {
|
||||
const result = childPropValue(...args);
|
||||
slotPropValue(...args);
|
||||
return result;
|
||||
};
|
||||
} else if (slotPropValue) {
|
||||
overrideProps[propName] = slotPropValue;
|
||||
}
|
||||
} else if (propName === "style") {
|
||||
overrideProps[propName] = { ...slotPropValue, ...childPropValue };
|
||||
} else if (propName === "className") {
|
||||
overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(" ");
|
||||
}
|
||||
}
|
||||
return { ...slotProps, ...overrideProps };
|
||||
}
|
||||
function getElementRef(element) {
|
||||
let getter = Object.getOwnPropertyDescriptor(element.props, "ref")?.get;
|
||||
let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
||||
if (mayWarn) {
|
||||
return element.ref;
|
||||
}
|
||||
getter = Object.getOwnPropertyDescriptor(element, "ref")?.get;
|
||||
mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
||||
if (mayWarn) {
|
||||
return element.props.ref;
|
||||
}
|
||||
return element.props.ref || element.ref;
|
||||
}
|
||||
|
||||
// node_modules/@radix-ui/react-collection/dist/index.mjs
|
||||
var import_jsx_runtime2 = __toESM(require_jsx_runtime(), 1);
|
||||
var import_react2 = __toESM(require_react(), 1);
|
||||
var import_jsx_runtime3 = __toESM(require_jsx_runtime(), 1);
|
||||
function createCollection(name) {
|
||||
const PROVIDER_NAME = name + "CollectionProvider";
|
||||
const [createCollectionContext, createCollectionScope] = createContextScope(PROVIDER_NAME);
|
||||
const [CollectionProviderImpl, useCollectionContext] = createCollectionContext(
|
||||
PROVIDER_NAME,
|
||||
{ collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map() }
|
||||
);
|
||||
const CollectionProvider = (props) => {
|
||||
const { scope, children } = props;
|
||||
const ref = import_react.default.useRef(null);
|
||||
const itemMap = import_react.default.useRef(/* @__PURE__ */ new Map()).current;
|
||||
return (0, import_jsx_runtime2.jsx)(CollectionProviderImpl, { scope, itemMap, collectionRef: ref, children });
|
||||
};
|
||||
CollectionProvider.displayName = PROVIDER_NAME;
|
||||
const COLLECTION_SLOT_NAME = name + "CollectionSlot";
|
||||
const CollectionSlotImpl = createSlot(COLLECTION_SLOT_NAME);
|
||||
const CollectionSlot = import_react.default.forwardRef(
|
||||
(props, forwardedRef) => {
|
||||
const { scope, children } = props;
|
||||
const context = useCollectionContext(COLLECTION_SLOT_NAME, scope);
|
||||
const composedRefs = useComposedRefs(forwardedRef, context.collectionRef);
|
||||
return (0, import_jsx_runtime2.jsx)(CollectionSlotImpl, { ref: composedRefs, children });
|
||||
}
|
||||
);
|
||||
CollectionSlot.displayName = COLLECTION_SLOT_NAME;
|
||||
const ITEM_SLOT_NAME = name + "CollectionItemSlot";
|
||||
const ITEM_DATA_ATTR = "data-radix-collection-item";
|
||||
const CollectionItemSlotImpl = createSlot(ITEM_SLOT_NAME);
|
||||
const CollectionItemSlot = import_react.default.forwardRef(
|
||||
(props, forwardedRef) => {
|
||||
const { scope, children, ...itemData } = props;
|
||||
const ref = import_react.default.useRef(null);
|
||||
const composedRefs = useComposedRefs(forwardedRef, ref);
|
||||
const context = useCollectionContext(ITEM_SLOT_NAME, scope);
|
||||
import_react.default.useEffect(() => {
|
||||
context.itemMap.set(ref, { ref, ...itemData });
|
||||
return () => void context.itemMap.delete(ref);
|
||||
});
|
||||
return (0, import_jsx_runtime2.jsx)(CollectionItemSlotImpl, { ...{ [ITEM_DATA_ATTR]: "" }, ref: composedRefs, children });
|
||||
}
|
||||
);
|
||||
CollectionItemSlot.displayName = ITEM_SLOT_NAME;
|
||||
function useCollection(scope) {
|
||||
const context = useCollectionContext(name + "CollectionConsumer", scope);
|
||||
const getItems = import_react.default.useCallback(() => {
|
||||
const collectionNode = context.collectionRef.current;
|
||||
if (!collectionNode) return [];
|
||||
const orderedNodes = Array.from(collectionNode.querySelectorAll(`[${ITEM_DATA_ATTR}]`));
|
||||
const items = Array.from(context.itemMap.values());
|
||||
const orderedItems = items.sort(
|
||||
(a, b) => orderedNodes.indexOf(a.ref.current) - orderedNodes.indexOf(b.ref.current)
|
||||
);
|
||||
return orderedItems;
|
||||
}, [context.collectionRef, context.itemMap]);
|
||||
return getItems;
|
||||
}
|
||||
return [
|
||||
{ Provider: CollectionProvider, Slot: CollectionSlot, ItemSlot: CollectionItemSlot },
|
||||
useCollection,
|
||||
createCollectionScope
|
||||
];
|
||||
}
|
||||
|
||||
// node_modules/@radix-ui/react-direction/dist/index.mjs
|
||||
var React3 = __toESM(require_react(), 1);
|
||||
var import_jsx_runtime4 = __toESM(require_jsx_runtime(), 1);
|
||||
var DirectionContext = React3.createContext(void 0);
|
||||
function useDirection(localDir) {
|
||||
const globalDir = React3.useContext(DirectionContext);
|
||||
return localDir || globalDir || "ltr";
|
||||
}
|
||||
|
||||
// node_modules/@radix-ui/react-use-size/dist/index.mjs
|
||||
var React4 = __toESM(require_react(), 1);
|
||||
function useSize(element) {
|
||||
const [size, setSize] = React4.useState(void 0);
|
||||
useLayoutEffect2(() => {
|
||||
if (element) {
|
||||
setSize({ width: element.offsetWidth, height: element.offsetHeight });
|
||||
const resizeObserver = new ResizeObserver((entries) => {
|
||||
if (!Array.isArray(entries)) {
|
||||
return;
|
||||
}
|
||||
if (!entries.length) {
|
||||
return;
|
||||
}
|
||||
const entry = entries[0];
|
||||
let width;
|
||||
let height;
|
||||
if ("borderBoxSize" in entry) {
|
||||
const borderSizeEntry = entry["borderBoxSize"];
|
||||
const borderSize = Array.isArray(borderSizeEntry) ? borderSizeEntry[0] : borderSizeEntry;
|
||||
width = borderSize["inlineSize"];
|
||||
height = borderSize["blockSize"];
|
||||
} else {
|
||||
width = element.offsetWidth;
|
||||
height = element.offsetHeight;
|
||||
}
|
||||
setSize({ width, height });
|
||||
});
|
||||
resizeObserver.observe(element, { box: "border-box" });
|
||||
return () => resizeObserver.unobserve(element);
|
||||
} else {
|
||||
setSize(void 0);
|
||||
}
|
||||
}, [element]);
|
||||
return size;
|
||||
}
|
||||
|
||||
// node_modules/@radix-ui/react-use-previous/dist/index.mjs
|
||||
var React5 = __toESM(require_react(), 1);
|
||||
function usePrevious(value) {
|
||||
const ref = React5.useRef({ value, previous: value });
|
||||
return React5.useMemo(() => {
|
||||
if (ref.current.value !== value) {
|
||||
ref.current.previous = ref.current.value;
|
||||
ref.current.value = value;
|
||||
}
|
||||
return ref.current.previous;
|
||||
}, [value]);
|
||||
}
|
||||
|
||||
export {
|
||||
createCollection,
|
||||
useDirection,
|
||||
useSize,
|
||||
usePrevious
|
||||
};
|
||||
//# sourceMappingURL=chunk-L2OGOWTU.js.map
|
||||
-7
File diff suppressed because one or more lines are too long
-1352
File diff suppressed because it is too large
Load Diff
-7
File diff suppressed because one or more lines are too long
-354
@@ -1,354 +0,0 @@
|
||||
import {
|
||||
composeRefs
|
||||
} from "./chunk-2VUH7NEY.js";
|
||||
import {
|
||||
require_react_dom
|
||||
} from "./chunk-YF4B4G2L.js";
|
||||
import {
|
||||
require_jsx_runtime
|
||||
} from "./chunk-2YVA4HRZ.js";
|
||||
import {
|
||||
require_react
|
||||
} from "./chunk-WUR7D6NS.js";
|
||||
import {
|
||||
__toESM
|
||||
} from "./chunk-G3PMV62Z.js";
|
||||
|
||||
// node_modules/@radix-ui/primitive/dist/index.mjs
|
||||
var canUseDOM = !!(typeof window !== "undefined" && window.document && window.document.createElement);
|
||||
function composeEventHandlers(originalEventHandler, ourEventHandler, { checkForDefaultPrevented = true } = {}) {
|
||||
return function handleEvent(event) {
|
||||
originalEventHandler?.(event);
|
||||
if (checkForDefaultPrevented === false || !event.defaultPrevented) {
|
||||
return ourEventHandler?.(event);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
// node_modules/@radix-ui/react-context/dist/index.mjs
|
||||
var React = __toESM(require_react(), 1);
|
||||
var import_jsx_runtime = __toESM(require_jsx_runtime(), 1);
|
||||
function createContext2(rootComponentName, defaultContext) {
|
||||
const Context = React.createContext(defaultContext);
|
||||
const Provider = (props) => {
|
||||
const { children, ...context } = props;
|
||||
const value = React.useMemo(() => context, Object.values(context));
|
||||
return (0, import_jsx_runtime.jsx)(Context.Provider, { value, children });
|
||||
};
|
||||
Provider.displayName = rootComponentName + "Provider";
|
||||
function useContext2(consumerName) {
|
||||
const context = React.useContext(Context);
|
||||
if (context) return context;
|
||||
if (defaultContext !== void 0) return defaultContext;
|
||||
throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``);
|
||||
}
|
||||
return [Provider, useContext2];
|
||||
}
|
||||
function createContextScope(scopeName, createContextScopeDeps = []) {
|
||||
let defaultContexts = [];
|
||||
function createContext3(rootComponentName, defaultContext) {
|
||||
const BaseContext = React.createContext(defaultContext);
|
||||
const index = defaultContexts.length;
|
||||
defaultContexts = [...defaultContexts, defaultContext];
|
||||
const Provider = (props) => {
|
||||
const { scope, children, ...context } = props;
|
||||
const Context = scope?.[scopeName]?.[index] || BaseContext;
|
||||
const value = React.useMemo(() => context, Object.values(context));
|
||||
return (0, import_jsx_runtime.jsx)(Context.Provider, { value, children });
|
||||
};
|
||||
Provider.displayName = rootComponentName + "Provider";
|
||||
function useContext2(consumerName, scope) {
|
||||
const Context = scope?.[scopeName]?.[index] || BaseContext;
|
||||
const context = React.useContext(Context);
|
||||
if (context) return context;
|
||||
if (defaultContext !== void 0) return defaultContext;
|
||||
throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``);
|
||||
}
|
||||
return [Provider, useContext2];
|
||||
}
|
||||
const createScope = () => {
|
||||
const scopeContexts = defaultContexts.map((defaultContext) => {
|
||||
return React.createContext(defaultContext);
|
||||
});
|
||||
return function useScope(scope) {
|
||||
const contexts = scope?.[scopeName] || scopeContexts;
|
||||
return React.useMemo(
|
||||
() => ({ [`__scope${scopeName}`]: { ...scope, [scopeName]: contexts } }),
|
||||
[scope, contexts]
|
||||
);
|
||||
};
|
||||
};
|
||||
createScope.scopeName = scopeName;
|
||||
return [createContext3, composeContextScopes(createScope, ...createContextScopeDeps)];
|
||||
}
|
||||
function composeContextScopes(...scopes) {
|
||||
const baseScope = scopes[0];
|
||||
if (scopes.length === 1) return baseScope;
|
||||
const createScope = () => {
|
||||
const scopeHooks = scopes.map((createScope2) => ({
|
||||
useScope: createScope2(),
|
||||
scopeName: createScope2.scopeName
|
||||
}));
|
||||
return function useComposedScopes(overrideScopes) {
|
||||
const nextScopes = scopeHooks.reduce((nextScopes2, { useScope, scopeName }) => {
|
||||
const scopeProps = useScope(overrideScopes);
|
||||
const currentScope = scopeProps[`__scope${scopeName}`];
|
||||
return { ...nextScopes2, ...currentScope };
|
||||
}, {});
|
||||
return React.useMemo(() => ({ [`__scope${baseScope.scopeName}`]: nextScopes }), [nextScopes]);
|
||||
};
|
||||
};
|
||||
createScope.scopeName = baseScope.scopeName;
|
||||
return createScope;
|
||||
}
|
||||
|
||||
// node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs
|
||||
var React2 = __toESM(require_react(), 1);
|
||||
var useLayoutEffect2 = globalThis?.document ? React2.useLayoutEffect : () => {
|
||||
};
|
||||
|
||||
// node_modules/@radix-ui/react-id/dist/index.mjs
|
||||
var React3 = __toESM(require_react(), 1);
|
||||
var useReactId = React3[" useId ".trim().toString()] || (() => void 0);
|
||||
var count = 0;
|
||||
function useId(deterministicId) {
|
||||
const [id, setId] = React3.useState(useReactId());
|
||||
useLayoutEffect2(() => {
|
||||
if (!deterministicId) setId((reactId) => reactId ?? String(count++));
|
||||
}, [deterministicId]);
|
||||
return deterministicId || (id ? `radix-${id}` : "");
|
||||
}
|
||||
|
||||
// node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs
|
||||
var React5 = __toESM(require_react(), 1);
|
||||
var React22 = __toESM(require_react(), 1);
|
||||
|
||||
// node_modules/@radix-ui/react-use-effect-event/dist/index.mjs
|
||||
var React4 = __toESM(require_react(), 1);
|
||||
var useReactEffectEvent = React4[" useEffectEvent ".trim().toString()];
|
||||
var useReactInsertionEffect = React4[" useInsertionEffect ".trim().toString()];
|
||||
|
||||
// node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs
|
||||
var useInsertionEffect = React5[" useInsertionEffect ".trim().toString()] || useLayoutEffect2;
|
||||
function useControllableState({
|
||||
prop,
|
||||
defaultProp,
|
||||
onChange = () => {
|
||||
},
|
||||
caller
|
||||
}) {
|
||||
const [uncontrolledProp, setUncontrolledProp, onChangeRef] = useUncontrolledState({
|
||||
defaultProp,
|
||||
onChange
|
||||
});
|
||||
const isControlled = prop !== void 0;
|
||||
const value = isControlled ? prop : uncontrolledProp;
|
||||
if (true) {
|
||||
const isControlledRef = React5.useRef(prop !== void 0);
|
||||
React5.useEffect(() => {
|
||||
const wasControlled = isControlledRef.current;
|
||||
if (wasControlled !== isControlled) {
|
||||
const from = wasControlled ? "controlled" : "uncontrolled";
|
||||
const to = isControlled ? "controlled" : "uncontrolled";
|
||||
console.warn(
|
||||
`${caller} is changing from ${from} to ${to}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`
|
||||
);
|
||||
}
|
||||
isControlledRef.current = isControlled;
|
||||
}, [isControlled, caller]);
|
||||
}
|
||||
const setValue = React5.useCallback(
|
||||
(nextValue) => {
|
||||
if (isControlled) {
|
||||
const value2 = isFunction(nextValue) ? nextValue(prop) : nextValue;
|
||||
if (value2 !== prop) {
|
||||
onChangeRef.current?.(value2);
|
||||
}
|
||||
} else {
|
||||
setUncontrolledProp(nextValue);
|
||||
}
|
||||
},
|
||||
[isControlled, prop, setUncontrolledProp, onChangeRef]
|
||||
);
|
||||
return [value, setValue];
|
||||
}
|
||||
function useUncontrolledState({
|
||||
defaultProp,
|
||||
onChange
|
||||
}) {
|
||||
const [value, setValue] = React5.useState(defaultProp);
|
||||
const prevValueRef = React5.useRef(value);
|
||||
const onChangeRef = React5.useRef(onChange);
|
||||
useInsertionEffect(() => {
|
||||
onChangeRef.current = onChange;
|
||||
}, [onChange]);
|
||||
React5.useEffect(() => {
|
||||
if (prevValueRef.current !== value) {
|
||||
onChangeRef.current?.(value);
|
||||
prevValueRef.current = value;
|
||||
}
|
||||
}, [value, prevValueRef]);
|
||||
return [value, setValue, onChangeRef];
|
||||
}
|
||||
function isFunction(value) {
|
||||
return typeof value === "function";
|
||||
}
|
||||
|
||||
// node_modules/@radix-ui/react-primitive/dist/index.mjs
|
||||
var React7 = __toESM(require_react(), 1);
|
||||
var ReactDOM = __toESM(require_react_dom(), 1);
|
||||
|
||||
// node_modules/@radix-ui/react-primitive/node_modules/@radix-ui/react-slot/dist/index.mjs
|
||||
var React6 = __toESM(require_react(), 1);
|
||||
var import_jsx_runtime2 = __toESM(require_jsx_runtime(), 1);
|
||||
function createSlot(ownerName) {
|
||||
const SlotClone = createSlotClone(ownerName);
|
||||
const Slot2 = React6.forwardRef((props, forwardedRef) => {
|
||||
const { children, ...slotProps } = props;
|
||||
const childrenArray = React6.Children.toArray(children);
|
||||
const slottable = childrenArray.find(isSlottable);
|
||||
if (slottable) {
|
||||
const newElement = slottable.props.children;
|
||||
const newChildren = childrenArray.map((child) => {
|
||||
if (child === slottable) {
|
||||
if (React6.Children.count(newElement) > 1) return React6.Children.only(null);
|
||||
return React6.isValidElement(newElement) ? newElement.props.children : null;
|
||||
} else {
|
||||
return child;
|
||||
}
|
||||
});
|
||||
return (0, import_jsx_runtime2.jsx)(SlotClone, { ...slotProps, ref: forwardedRef, children: React6.isValidElement(newElement) ? React6.cloneElement(newElement, void 0, newChildren) : null });
|
||||
}
|
||||
return (0, import_jsx_runtime2.jsx)(SlotClone, { ...slotProps, ref: forwardedRef, children });
|
||||
});
|
||||
Slot2.displayName = `${ownerName}.Slot`;
|
||||
return Slot2;
|
||||
}
|
||||
var Slot = createSlot("Slot");
|
||||
function createSlotClone(ownerName) {
|
||||
const SlotClone = React6.forwardRef((props, forwardedRef) => {
|
||||
const { children, ...slotProps } = props;
|
||||
if (React6.isValidElement(children)) {
|
||||
const childrenRef = getElementRef(children);
|
||||
const props2 = mergeProps(slotProps, children.props);
|
||||
if (children.type !== React6.Fragment) {
|
||||
props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;
|
||||
}
|
||||
return React6.cloneElement(children, props2);
|
||||
}
|
||||
return React6.Children.count(children) > 1 ? React6.Children.only(null) : null;
|
||||
});
|
||||
SlotClone.displayName = `${ownerName}.SlotClone`;
|
||||
return SlotClone;
|
||||
}
|
||||
var SLOTTABLE_IDENTIFIER = /* @__PURE__ */ Symbol("radix.slottable");
|
||||
function createSlottable(ownerName) {
|
||||
const Slottable2 = ({ children }) => {
|
||||
return (0, import_jsx_runtime2.jsx)(import_jsx_runtime2.Fragment, { children });
|
||||
};
|
||||
Slottable2.displayName = `${ownerName}.Slottable`;
|
||||
Slottable2.__radixId = SLOTTABLE_IDENTIFIER;
|
||||
return Slottable2;
|
||||
}
|
||||
var Slottable = createSlottable("Slottable");
|
||||
function isSlottable(child) {
|
||||
return React6.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;
|
||||
}
|
||||
function mergeProps(slotProps, childProps) {
|
||||
const overrideProps = { ...childProps };
|
||||
for (const propName in childProps) {
|
||||
const slotPropValue = slotProps[propName];
|
||||
const childPropValue = childProps[propName];
|
||||
const isHandler = /^on[A-Z]/.test(propName);
|
||||
if (isHandler) {
|
||||
if (slotPropValue && childPropValue) {
|
||||
overrideProps[propName] = (...args) => {
|
||||
const result = childPropValue(...args);
|
||||
slotPropValue(...args);
|
||||
return result;
|
||||
};
|
||||
} else if (slotPropValue) {
|
||||
overrideProps[propName] = slotPropValue;
|
||||
}
|
||||
} else if (propName === "style") {
|
||||
overrideProps[propName] = { ...slotPropValue, ...childPropValue };
|
||||
} else if (propName === "className") {
|
||||
overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(" ");
|
||||
}
|
||||
}
|
||||
return { ...slotProps, ...overrideProps };
|
||||
}
|
||||
function getElementRef(element) {
|
||||
let getter = Object.getOwnPropertyDescriptor(element.props, "ref")?.get;
|
||||
let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
||||
if (mayWarn) {
|
||||
return element.ref;
|
||||
}
|
||||
getter = Object.getOwnPropertyDescriptor(element, "ref")?.get;
|
||||
mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
||||
if (mayWarn) {
|
||||
return element.props.ref;
|
||||
}
|
||||
return element.props.ref || element.ref;
|
||||
}
|
||||
|
||||
// node_modules/@radix-ui/react-primitive/dist/index.mjs
|
||||
var import_jsx_runtime3 = __toESM(require_jsx_runtime(), 1);
|
||||
var NODES = [
|
||||
"a",
|
||||
"button",
|
||||
"div",
|
||||
"form",
|
||||
"h2",
|
||||
"h3",
|
||||
"img",
|
||||
"input",
|
||||
"label",
|
||||
"li",
|
||||
"nav",
|
||||
"ol",
|
||||
"p",
|
||||
"select",
|
||||
"span",
|
||||
"svg",
|
||||
"ul"
|
||||
];
|
||||
var Primitive = NODES.reduce((primitive, node) => {
|
||||
const Slot2 = createSlot(`Primitive.${node}`);
|
||||
const Node = React7.forwardRef((props, forwardedRef) => {
|
||||
const { asChild, ...primitiveProps } = props;
|
||||
const Comp = asChild ? Slot2 : node;
|
||||
if (typeof window !== "undefined") {
|
||||
window[/* @__PURE__ */ Symbol.for("radix-ui")] = true;
|
||||
}
|
||||
return (0, import_jsx_runtime3.jsx)(Comp, { ...primitiveProps, ref: forwardedRef });
|
||||
});
|
||||
Node.displayName = `Primitive.${node}`;
|
||||
return { ...primitive, [node]: Node };
|
||||
}, {});
|
||||
function dispatchDiscreteCustomEvent(target, event) {
|
||||
if (target) ReactDOM.flushSync(() => target.dispatchEvent(event));
|
||||
}
|
||||
|
||||
// node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs
|
||||
var React8 = __toESM(require_react(), 1);
|
||||
function useCallbackRef(callback) {
|
||||
const callbackRef = React8.useRef(callback);
|
||||
React8.useEffect(() => {
|
||||
callbackRef.current = callback;
|
||||
});
|
||||
return React8.useMemo(() => (...args) => callbackRef.current?.(...args), []);
|
||||
}
|
||||
|
||||
export {
|
||||
composeEventHandlers,
|
||||
createContext2,
|
||||
createContextScope,
|
||||
useLayoutEffect2,
|
||||
useId,
|
||||
useControllableState,
|
||||
Primitive,
|
||||
dispatchDiscreteCustomEvent,
|
||||
useCallbackRef
|
||||
};
|
||||
//# sourceMappingURL=chunk-MOFDO34C.js.map
|
||||
-7
File diff suppressed because one or more lines are too long
+30
-43
@@ -1056,24 +1056,6 @@ var _invertEase = function _invertEase2(ease) {
|
||||
return 1 - ease(1 - p);
|
||||
};
|
||||
};
|
||||
var _propagateYoyoEase = function _propagateYoyoEase2(timeline2, isYoyo) {
|
||||
var child = timeline2._first, ease;
|
||||
while (child) {
|
||||
if (child instanceof Timeline) {
|
||||
_propagateYoyoEase2(child, isYoyo);
|
||||
} else if (child.vars.yoyoEase && (!child._yoyo || !child._repeat) && child._yoyo !== isYoyo) {
|
||||
if (child.timeline) {
|
||||
_propagateYoyoEase2(child.timeline, isYoyo);
|
||||
} else {
|
||||
ease = child._ease;
|
||||
child._ease = child._yEase;
|
||||
child._yEase = ease;
|
||||
child._yoyo = isYoyo;
|
||||
}
|
||||
}
|
||||
child = child._next;
|
||||
}
|
||||
};
|
||||
var _parseEase = function _parseEase2(ease, defaultEase) {
|
||||
return !ease ? defaultEase : (_isFunction(ease) ? ease : _easeMap[ease] || _configEaseFromString(ease)) || defaultEase;
|
||||
};
|
||||
@@ -1579,7 +1561,6 @@ var Timeline = (function(_Animation) {
|
||||
if (!this._ts && !prevPaused) {
|
||||
return this;
|
||||
}
|
||||
_propagateYoyoEase(this, isYoyo);
|
||||
}
|
||||
}
|
||||
if (this._hasPause && !this._forcing && this._lock < 2) {
|
||||
@@ -1590,7 +1571,7 @@ var Timeline = (function(_Animation) {
|
||||
}
|
||||
this._tTime = tTime;
|
||||
this._time = time;
|
||||
this._act = !timeScale;
|
||||
this._act = !!timeScale;
|
||||
if (!this._initted) {
|
||||
this._onUpdate = this.vars.onUpdate;
|
||||
this._initted = 1;
|
||||
@@ -2038,16 +2019,12 @@ var _checkPlugin = function _checkPlugin2(property, vars, tween, index, target,
|
||||
var _overwritingTween;
|
||||
var _forceAllPropTweens;
|
||||
var _initTween = function _initTween2(tween, time, tTime) {
|
||||
var vars = tween.vars, ease = vars.ease, startAt = vars.startAt, immediateRender = vars.immediateRender, lazy = vars.lazy, onUpdate = vars.onUpdate, runBackwards = vars.runBackwards, yoyoEase = vars.yoyoEase, keyframes = vars.keyframes, autoRevert = vars.autoRevert, dur = tween._dur, prevStartAt = tween._startAt, targets = tween._targets, parent = tween.parent, fullTargets = parent && parent.data === "nested" ? parent.vars.targets : targets, autoOverwrite = tween._overwrite === "auto" && !_suppressOverwrites, tl = tween.timeline, cleanVars, i, p, pt, target, hasPriority, gsData, harness, plugin, ptLookup, index, harnessVars, overwritten;
|
||||
var vars = tween.vars, ease = vars.ease, startAt = vars.startAt, immediateRender = vars.immediateRender, lazy = vars.lazy, onUpdate = vars.onUpdate, runBackwards = vars.runBackwards, yoyoEase = vars.yoyoEase, keyframes = vars.keyframes, autoRevert = vars.autoRevert, dur = tween._dur, prevStartAt = tween._startAt, targets = tween._targets, parent = tween.parent, fullTargets = parent && parent.data === "nested" ? parent.vars.targets : targets, autoOverwrite = tween._overwrite === "auto" && !_suppressOverwrites, tl = tween.timeline, reverseEase = vars.easeReverse || yoyoEase, cleanVars, i, p, pt, target, hasPriority, gsData, harness, plugin, ptLookup, index, harnessVars, overwritten;
|
||||
tl && (!keyframes || !ease) && (ease = "none");
|
||||
tween._ease = _parseEase(ease, _defaults.ease);
|
||||
tween._yEase = yoyoEase ? _invertEase(_parseEase(yoyoEase === true ? ease : yoyoEase, _defaults.ease)) : 0;
|
||||
if (yoyoEase && tween._yoyo && !tween._repeat) {
|
||||
yoyoEase = tween._yEase;
|
||||
tween._yEase = tween._ease;
|
||||
tween._ease = yoyoEase;
|
||||
}
|
||||
tween._rEase = reverseEase && (_parseEase(reverseEase) || tween._ease);
|
||||
tween._from = !tl && !!vars.runBackwards;
|
||||
if (tween._from) tween.ratio = 1;
|
||||
if (!tl || keyframes && !vars.stagger) {
|
||||
harness = targets[0] ? _getCache(targets[0]).harness : 0;
|
||||
harnessVars = harness && vars[harness.prop];
|
||||
@@ -2166,7 +2143,7 @@ var _updatePropTweens = function _updatePropTweens2(tween, property, value, star
|
||||
tween.vars[property] = "+=0";
|
||||
_initTween(tween, time);
|
||||
_forceAllPropTweens = 0;
|
||||
return skipRecursion ? _warn(property + " not eligible for reset") : 1;
|
||||
return skipRecursion ? _warn(property + " not eligible for reset. Try splitting into individual properties") : 1;
|
||||
}
|
||||
ptCache.push(pt);
|
||||
}
|
||||
@@ -2223,7 +2200,7 @@ var _parseKeyframe = function _parseKeyframe2(prop, obj, allProps, easeEach) {
|
||||
var _parseFuncOrString = function _parseFuncOrString2(value, tween, i, target, targets) {
|
||||
return _isFunction(value) ? value.call(tween, i, target, targets) : _isString(value) && ~value.indexOf("random(") ? _replaceRandom(value) : value;
|
||||
};
|
||||
var _staggerTweenProps = _callbackNames + "repeat,repeatDelay,yoyo,repeatRefresh,yoyoEase,autoRevert";
|
||||
var _staggerTweenProps = _callbackNames + "repeat,repeatDelay,yoyo,repeatRefresh,yoyoEase,easeReverse,autoRevert";
|
||||
var _staggerPropsToSkip = {};
|
||||
_forEachName(_staggerTweenProps + ",id,stagger,delay,duration,paused,scrollTrigger", function(name) {
|
||||
return _staggerPropsToSkip[name] = 1;
|
||||
@@ -2238,12 +2215,13 @@ var Tween = (function(_Animation2) {
|
||||
position = null;
|
||||
}
|
||||
_this3 = _Animation2.call(this, skipInherit ? vars : _inheritDefaults(vars)) || this;
|
||||
var _this3$vars = _this3.vars, duration = _this3$vars.duration, delay = _this3$vars.delay, immediateRender = _this3$vars.immediateRender, stagger = _this3$vars.stagger, overwrite = _this3$vars.overwrite, keyframes = _this3$vars.keyframes, defaults2 = _this3$vars.defaults, scrollTrigger = _this3$vars.scrollTrigger, yoyoEase = _this3$vars.yoyoEase, parent = vars.parent || _globalTimeline, parsedTargets = (_isArray(targets) || _isTypedArray(targets) ? _isNumber(targets[0]) : "length" in vars) ? [targets] : toArray(targets), tl, i, copy, l, p, curTarget, staggerFunc, staggerVarsToMerge;
|
||||
var _this3$vars = _this3.vars, duration = _this3$vars.duration, delay = _this3$vars.delay, immediateRender = _this3$vars.immediateRender, stagger = _this3$vars.stagger, overwrite = _this3$vars.overwrite, keyframes = _this3$vars.keyframes, defaults2 = _this3$vars.defaults, scrollTrigger = _this3$vars.scrollTrigger, parent = vars.parent || _globalTimeline, parsedTargets = (_isArray(targets) || _isTypedArray(targets) ? _isNumber(targets[0]) : "length" in vars) ? [targets] : toArray(targets), tl, i, copy, l, p, curTarget, staggerFunc, staggerVarsToMerge;
|
||||
_this3._targets = parsedTargets.length ? _harness(parsedTargets) : _warn("GSAP target " + targets + " not found. https://gsap.com", !_config.nullTargetWarn) || [];
|
||||
_this3._ptLookup = [];
|
||||
_this3._overwrite = overwrite;
|
||||
if (keyframes || stagger || _isFuncOrString(duration) || _isFuncOrString(delay)) {
|
||||
vars = _this3.vars;
|
||||
var easeReverse = vars.easeReverse || vars.yoyoEase;
|
||||
tl = _this3.timeline = new Timeline({
|
||||
data: "nested",
|
||||
defaults: defaults2 || {},
|
||||
@@ -2266,7 +2244,7 @@ var Tween = (function(_Animation2) {
|
||||
for (i = 0; i < l; i++) {
|
||||
copy = _copyExcluding(vars, _staggerPropsToSkip);
|
||||
copy.stagger = 0;
|
||||
yoyoEase && (copy.yoyoEase = yoyoEase);
|
||||
easeReverse && (copy.easeReverse = easeReverse);
|
||||
staggerVarsToMerge && _merge(copy, staggerVarsToMerge);
|
||||
curTarget = parsedTargets[i];
|
||||
copy.duration = +_parseFuncOrString(duration, _assertThisInitialized(_this3), i, curTarget, parsedTargets);
|
||||
@@ -2338,7 +2316,7 @@ var Tween = (function(_Animation2) {
|
||||
}
|
||||
var _proto3 = Tween2.prototype;
|
||||
_proto3.render = function render3(totalTime, suppressEvents, force) {
|
||||
var prevTime = this._time, tDur = this._tDur, dur = this._dur, isNegative = totalTime < 0, tTime = totalTime > tDur - _tinyNum && !isNegative ? tDur : totalTime < _tinyNum ? 0 : totalTime, time, pt, iteration, cycleDuration, prevIteration, isYoyo, ratio, timeline2, yoyoEase;
|
||||
var prevTime = this._time, tDur = this._tDur, dur = this._dur, isNegative = totalTime < 0, tTime = totalTime > tDur - _tinyNum && !isNegative ? tDur : totalTime < _tinyNum ? 0 : totalTime, time, pt, iteration, cycleDuration, prevIteration, isYoyo, ratio, timeline2;
|
||||
if (!dur) {
|
||||
_renderZeroDurationTween(this, totalTime, suppressEvents, force);
|
||||
} else if (tTime !== this._tTime || !totalTime || force || !this._initted && this._tTime || this._startAt && this._zTime < 0 !== isNegative || this._lazy) {
|
||||
@@ -2364,17 +2342,13 @@ var Tween = (function(_Animation2) {
|
||||
}
|
||||
}
|
||||
isYoyo = this._yoyo && iteration & 1;
|
||||
if (isYoyo) {
|
||||
yoyoEase = this._yEase;
|
||||
time = dur - time;
|
||||
}
|
||||
if (isYoyo) time = dur - time;
|
||||
prevIteration = _animationCycle(this._tTime, cycleDuration);
|
||||
if (time === prevTime && !force && this._initted && iteration === prevIteration) {
|
||||
this._tTime = tTime;
|
||||
return this;
|
||||
}
|
||||
if (iteration !== prevIteration) {
|
||||
timeline2 && this._yEase && _propagateYoyoEase(timeline2, isYoyo);
|
||||
if (this.vars.repeatRefresh && !isYoyo && !this._lock && time !== cycleDuration && this._initted) {
|
||||
this._lock = force = 1;
|
||||
this.render(_roundPrecise(cycleDuration * iteration), true).invalidate()._lock = 0;
|
||||
@@ -2393,16 +2367,29 @@ var Tween = (function(_Animation2) {
|
||||
return this.render(totalTime, suppressEvents, force);
|
||||
}
|
||||
}
|
||||
if (this._rEase) {
|
||||
var inv = time < prevTime;
|
||||
if (inv !== this._inv) {
|
||||
var segDur = inv ? prevTime : dur - prevTime;
|
||||
this._inv = inv;
|
||||
if (this._from) this.ratio = 1 - this.ratio;
|
||||
this._invRatio = this.ratio;
|
||||
this._invTime = prevTime;
|
||||
this._invRecip = segDur ? (inv ? -1 : 1) / segDur : 0;
|
||||
this._invScale = inv ? -this.ratio : 1 - this.ratio;
|
||||
this._invEase = inv ? this._rEase : this._ease;
|
||||
}
|
||||
this.ratio = ratio = this._invRatio + this._invScale * this._invEase((time - this._invTime) * this._invRecip);
|
||||
} else {
|
||||
this.ratio = ratio = this._ease(time / dur);
|
||||
}
|
||||
if (this._from) this.ratio = ratio = 1 - ratio;
|
||||
this._tTime = tTime;
|
||||
this._time = time;
|
||||
if (!this._act && this._ts) {
|
||||
this._act = 1;
|
||||
this._lazy = 0;
|
||||
}
|
||||
this.ratio = ratio = (yoyoEase || this._ease)(time / dur);
|
||||
if (this._from) {
|
||||
this.ratio = ratio = 1 - ratio;
|
||||
}
|
||||
if (!prevTime && tTime && !suppressEvents && !prevIteration) {
|
||||
_callback(this, "onStart");
|
||||
if (this._tTime !== tTime) {
|
||||
@@ -2674,7 +2661,7 @@ var PropTween = (function() {
|
||||
};
|
||||
return PropTween2;
|
||||
})();
|
||||
_forEachName(_callbackNames + "parent,duration,ease,delay,overwrite,runBackwards,startAt,yoyo,immediateRender,repeat,repeatDelay,data,paused,reversed,lazy,callbackScope,stringFilter,id,yoyoEase,stagger,inherit,repeatRefresh,keyframes,autoRevert,scrollTrigger", function(name) {
|
||||
_forEachName(_callbackNames + "parent,duration,ease,delay,overwrite,runBackwards,startAt,yoyo,immediateRender,repeat,repeatDelay,data,paused,reversed,lazy,callbackScope,stringFilter,id,yoyoEase,stagger,inherit,repeatRefresh,keyframes,autoRevert,scrollTrigger,easeReverse", function(name) {
|
||||
return _reservedProps[name] = 1;
|
||||
});
|
||||
_globals.TweenMax = _globals.TweenLite = Tween;
|
||||
@@ -3146,7 +3133,7 @@ var gsap = _gsap.registerPlugin({
|
||||
}
|
||||
}
|
||||
}, _buildModifierPlugin("roundProps", _roundModifier), _buildModifierPlugin("modifiers"), _buildModifierPlugin("snap", snap)) || _gsap;
|
||||
Tween.version = Timeline.version = gsap.version = "3.14.2";
|
||||
Tween.version = Timeline.version = gsap.version = "3.15.0";
|
||||
_coreReady = 1;
|
||||
_windowExists() && _wake();
|
||||
var Power0 = _easeMap.Power0;
|
||||
|
||||
+3
-3
File diff suppressed because one or more lines are too long
+19
-13
@@ -168,7 +168,7 @@ var _getVelocityProp = function _getVelocityProp2(value, minTimeRefresh, useDelt
|
||||
};
|
||||
};
|
||||
var _getEvent = function _getEvent2(e, preventDefault) {
|
||||
preventDefault && !e._gsapAllow && e.preventDefault();
|
||||
preventDefault && !e._gsapAllow && e.cancelable !== false && e.preventDefault();
|
||||
return e.changedTouches ? e.changedTouches[0] : e;
|
||||
};
|
||||
var _getAbsoluteMax = function _getAbsoluteMax2(a) {
|
||||
@@ -196,9 +196,9 @@ var _initCore = function _initCore2(core) {
|
||||
setTimeout(function() {
|
||||
return _startup = 0;
|
||||
}, 500);
|
||||
_setScrollTrigger();
|
||||
_coreInitted = 1;
|
||||
}
|
||||
ScrollTrigger || _setScrollTrigger();
|
||||
return _coreInitted;
|
||||
};
|
||||
_horizontal.op = _vertical;
|
||||
@@ -468,7 +468,7 @@ var Observer = (function() {
|
||||
}]);
|
||||
return Observer2;
|
||||
})();
|
||||
Observer.version = "3.14.2";
|
||||
Observer.version = "3.15.0";
|
||||
Observer.create = function(vars) {
|
||||
return new Observer(vars);
|
||||
};
|
||||
@@ -604,11 +604,11 @@ var _isObject = function _isObject2(value) {
|
||||
var _endAnimation = function _endAnimation2(animation, reversed, pause) {
|
||||
return animation && animation.progress(reversed ? 0 : 1) && pause && animation.pause();
|
||||
};
|
||||
var _callback = function _callback2(self, func) {
|
||||
var _callback = function _callback2(self, func, extraParam) {
|
||||
if (self.enabled) {
|
||||
var result = self._ctx ? self._ctx.add(function() {
|
||||
return func(self);
|
||||
}) : func(self);
|
||||
return func(self, extraParam);
|
||||
}) : func(self, extraParam);
|
||||
result && result.totalTime && (self.callbackAnimation = result);
|
||||
}
|
||||
};
|
||||
@@ -629,7 +629,7 @@ var _Width = "Width";
|
||||
var _Height = "Height";
|
||||
var _px = "px";
|
||||
var _getComputedStyle = function _getComputedStyle2(element) {
|
||||
return _win2.getComputedStyle(element);
|
||||
return _win2.getComputedStyle(element.nodeType === Node.DOCUMENT_NODE ? element.scrollingElement : element);
|
||||
};
|
||||
var _makePositionable = function _makePositionable2(element) {
|
||||
var position = _getComputedStyle(element).position;
|
||||
@@ -653,7 +653,7 @@ var _getBounds = function _getBounds2(element, withoutTransforms) {
|
||||
scale: 1,
|
||||
skewX: 0,
|
||||
skewY: 0
|
||||
}).progress(1), bounds = element.getBoundingClientRect();
|
||||
}).progress(1), bounds = element.getBoundingClientRect ? element.getBoundingClientRect() : element.scrollingElement.getBoundingClientRect();
|
||||
tween && tween.progress(0).kill();
|
||||
return bounds;
|
||||
};
|
||||
@@ -768,7 +768,7 @@ var _offsetToPx = function _offsetToPx2(value, size) {
|
||||
};
|
||||
var _createMarker = function _createMarker2(type, name, container, direction, _ref4, offset, matchWidthEl, containerAnimation) {
|
||||
var startColor = _ref4.startColor, endColor = _ref4.endColor, fontSize = _ref4.fontSize, indent = _ref4.indent, fontWeight = _ref4.fontWeight;
|
||||
var e = _doc2.createElement("div"), useFixedPosition = _isViewport3(container) || _getProxyProp(container, "pinType") === "fixed", isScroller = type.indexOf("scroller") !== -1, parent = useFixedPosition ? _body2 : container, isStart = type.indexOf("start") !== -1, color = isStart ? startColor : endColor, css = "border-color:" + color + ";font-size:" + fontSize + ";color:" + color + ";font-weight:" + fontWeight + ";pointer-events:none;white-space:nowrap;font-family:sans-serif,Arial;z-index:1000;padding:4px 8px;border-width:0;border-style:solid;";
|
||||
var e = _doc2.createElement("div"), useFixedPosition = _isViewport3(container) || _getProxyProp(container, "pinType") === "fixed", isScroller = type.indexOf("scroller") !== -1, parent = useFixedPosition ? _body2 : container.tagName === "IFRAME" ? container.contentDocument.body : container, isStart = type.indexOf("start") !== -1, color = isStart ? startColor : endColor, css = "border-color:" + color + ";font-size:" + fontSize + ";color:" + color + ";font-weight:" + fontWeight + ";pointer-events:none;white-space:nowrap;font-family:sans-serif,Arial;z-index:1000;padding:4px 8px;border-width:0;border-style:solid;";
|
||||
css += "position:" + ((isScroller || containerAnimation) && useFixedPosition ? "fixed;" : "absolute;");
|
||||
(isScroller || containerAnimation || !useFixedPosition) && (css += (direction === _vertical ? _right : _bottom) + ":" + (offset + parseFloat(indent)) + "px;");
|
||||
matchWidthEl && (css += "box-sizing:border-box;text-align:left;width:" + matchWidthEl.offsetWidth + "px;");
|
||||
@@ -1293,7 +1293,7 @@ var ScrollTrigger2 = (function() {
|
||||
data: _abs(endScroll - scroll),
|
||||
// record the distance so that if another snap tween occurs (conflict) we can prioritize the closest snap.
|
||||
onInterrupt: function onInterrupt() {
|
||||
return snapDelayedCall.restart(true) && _onInterrupt && _onInterrupt(self);
|
||||
return snapDelayedCall.restart(true) && _onInterrupt && _callback(self, _onInterrupt);
|
||||
},
|
||||
onComplete: function onComplete() {
|
||||
self.update();
|
||||
@@ -1303,10 +1303,10 @@ var ScrollTrigger2 = (function() {
|
||||
}
|
||||
snap1 = snap2 = animation && !isToggle ? animation.totalProgress() : self.progress;
|
||||
onSnapComplete && onSnapComplete(self);
|
||||
_onComplete && _onComplete(self);
|
||||
_onComplete && _callback(self, _onComplete);
|
||||
}
|
||||
}, scroll, change1 * change, endScroll - scroll - change1 * change);
|
||||
onStart && onStart(self, tweenTo.tween);
|
||||
onStart && _callback(self, onStart, tweenTo.tween);
|
||||
}
|
||||
} else if (self.isActive && lastSnap !== scroll) {
|
||||
snapDelayedCall.restart(true);
|
||||
@@ -2000,6 +2000,12 @@ var ScrollTrigger2 = (function() {
|
||||
_wheelListener(_removeListener3, _scrollers[i], _scrollers[i + 1]);
|
||||
_wheelListener(_removeListener3, _scrollers[i], _scrollers[i + 2]);
|
||||
}
|
||||
} else if (_doc2) {
|
||||
var onLoad = function onLoad2() {
|
||||
ScrollTrigger3.enable();
|
||||
_doc2.removeEventListener("DOMContentLoaded", onLoad2);
|
||||
};
|
||||
_doc2.addEventListener("DOMContentLoaded", onLoad);
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -2050,7 +2056,7 @@ var ScrollTrigger2 = (function() {
|
||||
};
|
||||
return ScrollTrigger3;
|
||||
})();
|
||||
ScrollTrigger2.version = "3.14.2";
|
||||
ScrollTrigger2.version = "3.15.0";
|
||||
ScrollTrigger2.saveStyles = function(targets) {
|
||||
return targets ? _toArray(targets).forEach(function(target) {
|
||||
if (target && target.style) {
|
||||
|
||||
+3
-3
File diff suppressed because one or more lines are too long
+156
-13985
File diff suppressed because it is too large
Load Diff
+4
-4
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user