: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
function resetSkewAndRotation(node) {
node.resetSkewAndRotation();
function removeLeadSnapshots(stack) {
stack.removeLeadSnapshot();
function mixAxisDelta(output, delta, p) {
output.translate = mixNumber(delta.translate, 0, p);
output.scale = mixNumber(delta.scale, 1, p);
output.origin = delta.origin;
output.originPoint = delta.originPoint;
function mixAxis(output, from, to, p) {
output.min = mixNumber(from.min, to.min, p);
output.max = mixNumber(from.max, to.max, p);
function mixBox(output, from, to, p) {
mixAxis(output.x, from.x, to.x, p);
mixAxis(output.y, from.y, to.y, p);
function hasOpacityCrossfade(node) {
return (node.animationValues && node.animationValues.opacityExit !== undefined);
const defaultLayoutTransition = {
const userAgentContains = (string) => typeof navigator !== "undefined" &&
navigator.userAgent.toLowerCase().includes(string);
* Measured bounding boxes must be rounded in Safari and
* left untouched in Chrome, otherwise non-integer layouts within scaled-up elements
const roundPoint = userAgentContains("applewebkit/") && !userAgentContains("chrome/")
function roundAxis(axis) {
// Round to the nearest .5 pixels to support subpixel layouts
axis.min = roundPoint(axis.min);
axis.max = roundPoint(axis.max);
function shouldAnimatePositionOnly(animationType, snapshot, layout) {
return (animationType === "position" ||
(animationType === "preserve-aspect" &&
!isNear(aspectRatio(snapshot), aspectRatio(layout), 0.2)));
;// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/projection/node/DocumentProjectionNode.mjs
const DocumentProjectionNode = createProjectionNode({
attachResizeListener: (ref, notify) => addDomEvent(ref, "resize", notify),
x: document.documentElement.scrollLeft || document.body.scrollLeft,
y: document.documentElement.scrollTop || document.body.scrollTop,
checkIsScrollRoot: () => true,
;// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/projection/node/HTMLProjectionNode.mjs
const rootProjectionNode = {
const HTMLProjectionNode = createProjectionNode({
measureScroll: (instance) => ({
if (!rootProjectionNode.current) {
const documentNode = new DocumentProjectionNode({});
documentNode.mount(window);
documentNode.setOptions({ layoutScroll: true });
rootProjectionNode.current = documentNode;
return rootProjectionNode.current;
resetTransform: (instance, value) => {
instance.style.transform = value !== undefined ? value : "none";
checkIsScrollRoot: (instance) => Boolean(window.getComputedStyle(instance).position === "fixed"),
;// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/motion/features/drag.mjs
ProjectionNode: HTMLProjectionNode,
MeasureLayout: MeasureLayout,
;// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/utils/reduced-motion/state.mjs
// Does this device prefer reduced motion? Returns `null` server-side.
const prefersReducedMotion = { current: null };
const hasReducedMotionListener = { current: false };
;// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/utils/reduced-motion/index.mjs
function initPrefersReducedMotion() {
hasReducedMotionListener.current = true;
if (!is_browser_isBrowser)
const motionMediaQuery = window.matchMedia("(prefers-reduced-motion)");
const setReducedMotionPreferences = () => (prefersReducedMotion.current = motionMediaQuery.matches);
motionMediaQuery.addListener(setReducedMotionPreferences);
setReducedMotionPreferences();
prefersReducedMotion.current = false;
;// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/render/utils/motion-values.mjs
function updateMotionValuesFromProps(element, next, prev) {
const { willChange } = next;
for (const key in next) {
const nextValue = next[key];
const prevValue = prev[key];
if (isMotionValue(nextValue)) {
* If this is a motion value found in props or style, we want to add it
* to our visual element's motion value map.
element.addValue(key, nextValue);
if (isWillChangeMotionValue(willChange)) {
* Check the version of the incoming motion value with this version
* and warn against mismatches.
else if (isMotionValue(prevValue)) {
* If we're swapping from a motion value to a static value,
* create a new motion value from that
element.addValue(key, motionValue(nextValue, { owner: element }));
if (isWillChangeMotionValue(willChange)) {
else if (prevValue !== nextValue) {
* If this is a flat value that has changed, update the motion value
* or create one if it doesn't exist. We only want to do this if we're
* not handling the value with our animation state.
if (element.hasValue(key)) {
const existingValue = element.getValue(key);
if (existingValue.liveStyle === true) {
existingValue.jump(nextValue);
else if (!existingValue.hasAnimated) {
existingValue.set(nextValue);
const latestValue = element.getStaticValue(key);
element.addValue(key, motionValue(latestValue !== undefined ? latestValue : nextValue, { owner: element }));
for (const key in prev) {
if (next[key] === undefined)
element.removeValue(key);
;// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/render/store.mjs
const visualElementStore = new WeakMap();
;// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/render/dom/value-types/find.mjs
* A list of all ValueTypes
const valueTypes = [...dimensionValueTypes, color, complex];
* Tests a value against the list of ValueTypes
const findValueType = (v) => valueTypes.find(testValueType(v));
;// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/render/VisualElement.mjs
const featureNames = Object.keys(featureDefinitions);
const numFeatures = featureNames.length;
const propEventHandlers = [
"LayoutAnimationComplete",
const numVariantProps = variantProps.length;
function getClosestProjectingNode(visualElement) {
return visualElement.options.allowProjection !== false
? visualElement.projection
: getClosestProjectingNode(visualElement.parent);
* A VisualElement is an imperative abstraction around UI elements such as
* HTMLElement, SVGElement, Three.Object3D etc.
* This method takes React props and returns found MotionValues. For example, HTML
* MotionValues will be found within the style prop, whereas for Three.js within attribute arrays.
* This isn't an abstract method as it needs calling in the constructor, but it is
scrapeMotionValuesFromProps(_props, _prevProps, _visualElement) {
constructor({ parent, props, presenceContext, reducedMotionConfig, blockInitialAnimation, visualState, }, options = {}) {
this.resolveKeyframes = (keyframes,
// We use an onComplete callback here rather than a Promise as a Promise
// resolution is a microtask and we want to retain the ability to force
// the resolution of keyframes synchronously.
onComplete, name, value) => {
return new this.KeyframeResolver(keyframes, onComplete, name, value, this);
* A reference to the current underlying Instance, e.g. a HTMLElement
* A set containing references to this VisualElement's children.
this.children = new Set();
* Determine what role this visual element should take in the variant tree.
this.isVariantNode = false;
this.isControllingVariants = false;
* Decides whether this VisualElement should animate in reduced motion
* TODO: This is currently set on every individual VisualElement but feels
* like it could be set globally.
this.shouldReduceMotion = null;
* A map of all motion values attached to this visual element. Motion
* values are source of truth for any given animated value. A motion
* value might be provided externally by the component via props.
this.KeyframeResolver = KeyframeResolver;
* Cleanup functions for active features (hover/tap/exit etc)
* A map of every subscription that binds the provided or generated
* motion values onChange listeners to this visual element.
this.valueSubscriptions = new Map();
* A reference to the previously-provided motion values as returned
* from scrapeMotionValuesFromProps. We use the keys in here to determine
* if any motion values need to be removed after props are updated.
this.prevMotionValues = {};
* An object containing a SubscriptionManager for each active event.
* An object containing an unsubscribe function for each prop event subscription.
* For example, every "Update" event can have multiple subscribers via
* VisualElement.on(), but only one of those can be defined via the onUpdate prop.
this.propEventSubscriptions = {};
this.notifyUpdate = () => this.notify("Update", this.latestValues);
this.renderInstance(this.current, this.renderState, this.props.style, this.projection);
this.scheduleRender = () => frame_frame.render(this.render, false, true);
const { latestValues, renderState } = visualState;
this.latestValues = latestValues;
this.baseTarget = { ...latestValues };
this.initialValues = props.initial ? { ...latestValues } : {};
this.renderState = renderState;
this.presenceContext = presenceContext;
this.depth = parent ? parent.depth + 1 : 0;
this.reducedMotionConfig = reducedMotionConfig;
this.blockInitialAnimation = Boolean(blockInitialAnimation);
this.isControllingVariants = isControllingVariants(props);
this.isVariantNode = isVariantNode(props);
if (this.isVariantNode) {
this.variantChildren = new Set();
this.manuallyAnimateOnMount = Boolean(parent && parent.current);
* Any motion values that are provided to the element when created
* aren't yet bound to the element, as this would technically be impure.
* However, we iterate through the motion values and set them to the
* initial values for this component.
* TODO: This is impure and we should look at changing this to run on mount.
* Doing so will break some tests but this isn't neccessarily a breaking change,
* more a reflection of the test.
const { willChange, ...initialMotionValues } = this.scrapeMotionValuesFromProps(props, {}, this);
for (const key in initialMotionValues) {
const value = initialMotionValues[key];
if (latestValues[key] !== undefined && isMotionValue(value)) {
value.set(latestValues[key], false);
if (isWillChangeMotionValue(willChange)) {
visualElementStore.set(instance, this);
if (this.projection && !this.projection.instance) {
this.projection.mount(instance);
if (this.parent && this.isVariantNode && !this.isControllingVariants) {
this.removeFromVariantTree = this.parent.addVariantChild(this);
this.values.forEach((value, key) => this.bindToMotionValue(key, value));
if (!hasReducedMotionListener.current) {
initPrefersReducedMotion();
this.shouldReduceMotion =
this.reducedMotionConfig === "never"
: this.reducedMotionConfig === "always"
: prefersReducedMotion.current;
this.parent.children.add(this);
this.update(this.props, this.presenceContext);
visualElementStore.delete(this.current);
this.projection && this.projection.unmount();
cancelFrame(this.notifyUpdate);
cancelFrame(this.render);
this.valueSubscriptions.forEach((remove) => remove());
this.removeFromVariantTree && this.removeFromVariantTree();
this.parent && this.parent.children.delete(this);
for (const key in this.events) {
this.events[key].clear();
for (const key in this.features) {
(_a = this.features[key]) === null || _a === void 0 ? void 0 : _a.unmount();
bindToMotionValue(key, value) {
const valueIsTransform = transformProps.has(key);
const removeOnChange = value.on("change", (latestValue) => {
this.latestValues[key] = latestValue;
this.props.onUpdate && frame_frame.preRender(this.notifyUpdate);
if (valueIsTransform && this.projection) {
this.projection.isTransformDirty = true;
const removeOnRenderRequest = value.on("renderRequest", this.scheduleRender);
this.valueSubscriptions.set(key, () => {
sortNodePosition(other) {
* If these nodes aren't even of the same type we can't compare their depth.
!this.sortInstanceNodePosition ||
this.type !== other.type) {
return this.sortInstanceNodePosition(this.current, other.current);
loadFeatures({ children, ...renderedProps }, isStrict, preloadedFeatures, initialLayoutGroupConfig) {
let ProjectionNodeConstructor;
* If we're in development mode, check to make sure we're not rendering a motion component
* as a child of LazyMotion, as this will break the file-size benefits of using it.
for (let i = 0; i < numFeatures; i++) {
const name = featureNames[i];
const { isEnabled, Feature: FeatureConstructor, ProjectionNode, MeasureLayout: MeasureLayoutComponent, } = featureDefinitions[name];
ProjectionNodeConstructor = ProjectionNode;
if (isEnabled(renderedProps)) {
if (!this.features[name] && FeatureConstructor) {
this.features[name] = new FeatureConstructor(this);
if (MeasureLayoutComponent) {
MeasureLayout = MeasureLayoutComponent;
if ((this.type === "html" || this.type === "svg") &&
ProjectionNodeConstructor) {