Edit File by line

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/sportsfever/public_html/filemanger/function.php on line 93

Warning: Undefined array key "page_file_edit_line" in /home/sportsfever/public_html/filemanger/edit_text_line.php on line 32
/home/sportsfe.../httpdocs/clone/wp-inclu.../js/dist
File: components.js
[21000] Fix | Delete
[21001] Fix | Delete
[21002] Fix | Delete
[21003] Fix | Delete
[21004] Fix | Delete
[21005] Fix | Delete
[21006] Fix | Delete
[21007] Fix | Delete
[21008] Fix | Delete
[21009] Fix | Delete
const animateMotionValue = (name, value, target, transition = {}, element, isHandoff) => (onComplete) => {
[21010] Fix | Delete
const valueTransition = getValueTransition(transition, name) || {};
[21011] Fix | Delete
/**
[21012] Fix | Delete
* Most transition values are currently completely overwritten by value-specific
[21013] Fix | Delete
* transitions. In the future it'd be nicer to blend these transitions. But for now
[21014] Fix | Delete
* delay actually does inherit from the root transition if not value-specific.
[21015] Fix | Delete
*/
[21016] Fix | Delete
const delay = valueTransition.delay || transition.delay || 0;
[21017] Fix | Delete
/**
[21018] Fix | Delete
* Elapsed isn't a public transition option but can be passed through from
[21019] Fix | Delete
* optimized appear effects in milliseconds.
[21020] Fix | Delete
*/
[21021] Fix | Delete
let { elapsed = 0 } = transition;
[21022] Fix | Delete
elapsed = elapsed - secondsToMilliseconds(delay);
[21023] Fix | Delete
let options = {
[21024] Fix | Delete
keyframes: Array.isArray(target) ? target : [null, target],
[21025] Fix | Delete
ease: "easeOut",
[21026] Fix | Delete
velocity: value.getVelocity(),
[21027] Fix | Delete
...valueTransition,
[21028] Fix | Delete
delay: -elapsed,
[21029] Fix | Delete
onUpdate: (v) => {
[21030] Fix | Delete
value.set(v);
[21031] Fix | Delete
valueTransition.onUpdate && valueTransition.onUpdate(v);
[21032] Fix | Delete
},
[21033] Fix | Delete
onComplete: () => {
[21034] Fix | Delete
onComplete();
[21035] Fix | Delete
valueTransition.onComplete && valueTransition.onComplete();
[21036] Fix | Delete
},
[21037] Fix | Delete
name,
[21038] Fix | Delete
motionValue: value,
[21039] Fix | Delete
element: isHandoff ? undefined : element,
[21040] Fix | Delete
};
[21041] Fix | Delete
/**
[21042] Fix | Delete
* If there's no transition defined for this value, we can generate
[21043] Fix | Delete
* unqiue transition settings for this value.
[21044] Fix | Delete
*/
[21045] Fix | Delete
if (!isTransitionDefined(valueTransition)) {
[21046] Fix | Delete
options = {
[21047] Fix | Delete
...options,
[21048] Fix | Delete
...getDefaultTransition(name, options),
[21049] Fix | Delete
};
[21050] Fix | Delete
}
[21051] Fix | Delete
/**
[21052] Fix | Delete
* Both WAAPI and our internal animation functions use durations
[21053] Fix | Delete
* as defined by milliseconds, while our external API defines them
[21054] Fix | Delete
* as seconds.
[21055] Fix | Delete
*/
[21056] Fix | Delete
if (options.duration) {
[21057] Fix | Delete
options.duration = secondsToMilliseconds(options.duration);
[21058] Fix | Delete
}
[21059] Fix | Delete
if (options.repeatDelay) {
[21060] Fix | Delete
options.repeatDelay = secondsToMilliseconds(options.repeatDelay);
[21061] Fix | Delete
}
[21062] Fix | Delete
if (options.from !== undefined) {
[21063] Fix | Delete
options.keyframes[0] = options.from;
[21064] Fix | Delete
}
[21065] Fix | Delete
let shouldSkip = false;
[21066] Fix | Delete
if (options.type === false ||
[21067] Fix | Delete
(options.duration === 0 && !options.repeatDelay)) {
[21068] Fix | Delete
options.duration = 0;
[21069] Fix | Delete
if (options.delay === 0) {
[21070] Fix | Delete
shouldSkip = true;
[21071] Fix | Delete
}
[21072] Fix | Delete
}
[21073] Fix | Delete
if (instantAnimationState.current ||
[21074] Fix | Delete
MotionGlobalConfig.skipAnimations) {
[21075] Fix | Delete
shouldSkip = true;
[21076] Fix | Delete
options.duration = 0;
[21077] Fix | Delete
options.delay = 0;
[21078] Fix | Delete
}
[21079] Fix | Delete
/**
[21080] Fix | Delete
* If we can or must skip creating the animation, and apply only
[21081] Fix | Delete
* the final keyframe, do so. We also check once keyframes are resolved but
[21082] Fix | Delete
* this early check prevents the need to create an animation at all.
[21083] Fix | Delete
*/
[21084] Fix | Delete
if (shouldSkip && !isHandoff && value.get() !== undefined) {
[21085] Fix | Delete
const finalKeyframe = getFinalKeyframe(options.keyframes, valueTransition);
[21086] Fix | Delete
if (finalKeyframe !== undefined) {
[21087] Fix | Delete
frame_frame.update(() => {
[21088] Fix | Delete
options.onUpdate(finalKeyframe);
[21089] Fix | Delete
options.onComplete();
[21090] Fix | Delete
});
[21091] Fix | Delete
return;
[21092] Fix | Delete
}
[21093] Fix | Delete
}
[21094] Fix | Delete
/**
[21095] Fix | Delete
* Animate via WAAPI if possible. If this is a handoff animation, the optimised animation will be running via
[21096] Fix | Delete
* WAAPI. Therefore, this animation must be JS to ensure it runs "under" the
[21097] Fix | Delete
* optimised animation.
[21098] Fix | Delete
*/
[21099] Fix | Delete
if (!isHandoff && AcceleratedAnimation.supports(options)) {
[21100] Fix | Delete
return new AcceleratedAnimation(options);
[21101] Fix | Delete
}
[21102] Fix | Delete
else {
[21103] Fix | Delete
return new MainThreadAnimation(options);
[21104] Fix | Delete
}
[21105] Fix | Delete
};
[21106] Fix | Delete
[21107] Fix | Delete
[21108] Fix | Delete
[21109] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/value/use-will-change/is.mjs
[21110] Fix | Delete
[21111] Fix | Delete
[21112] Fix | Delete
function isWillChangeMotionValue(value) {
[21113] Fix | Delete
return Boolean(isMotionValue(value) && value.add);
[21114] Fix | Delete
}
[21115] Fix | Delete
[21116] Fix | Delete
[21117] Fix | Delete
[21118] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/utils/array.mjs
[21119] Fix | Delete
function addUniqueItem(arr, item) {
[21120] Fix | Delete
if (arr.indexOf(item) === -1)
[21121] Fix | Delete
arr.push(item);
[21122] Fix | Delete
}
[21123] Fix | Delete
function removeItem(arr, item) {
[21124] Fix | Delete
const index = arr.indexOf(item);
[21125] Fix | Delete
if (index > -1)
[21126] Fix | Delete
arr.splice(index, 1);
[21127] Fix | Delete
}
[21128] Fix | Delete
// Adapted from array-move
[21129] Fix | Delete
function moveItem([...arr], fromIndex, toIndex) {
[21130] Fix | Delete
const startIndex = fromIndex < 0 ? arr.length + fromIndex : fromIndex;
[21131] Fix | Delete
if (startIndex >= 0 && startIndex < arr.length) {
[21132] Fix | Delete
const endIndex = toIndex < 0 ? arr.length + toIndex : toIndex;
[21133] Fix | Delete
const [item] = arr.splice(fromIndex, 1);
[21134] Fix | Delete
arr.splice(endIndex, 0, item);
[21135] Fix | Delete
}
[21136] Fix | Delete
return arr;
[21137] Fix | Delete
}
[21138] Fix | Delete
[21139] Fix | Delete
[21140] Fix | Delete
[21141] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/utils/subscription-manager.mjs
[21142] Fix | Delete
[21143] Fix | Delete
[21144] Fix | Delete
class SubscriptionManager {
[21145] Fix | Delete
constructor() {
[21146] Fix | Delete
this.subscriptions = [];
[21147] Fix | Delete
}
[21148] Fix | Delete
add(handler) {
[21149] Fix | Delete
addUniqueItem(this.subscriptions, handler);
[21150] Fix | Delete
return () => removeItem(this.subscriptions, handler);
[21151] Fix | Delete
}
[21152] Fix | Delete
notify(a, b, c) {
[21153] Fix | Delete
const numSubscriptions = this.subscriptions.length;
[21154] Fix | Delete
if (!numSubscriptions)
[21155] Fix | Delete
return;
[21156] Fix | Delete
if (numSubscriptions === 1) {
[21157] Fix | Delete
/**
[21158] Fix | Delete
* If there's only a single handler we can just call it without invoking a loop.
[21159] Fix | Delete
*/
[21160] Fix | Delete
this.subscriptions[0](a, b, c);
[21161] Fix | Delete
}
[21162] Fix | Delete
else {
[21163] Fix | Delete
for (let i = 0; i < numSubscriptions; i++) {
[21164] Fix | Delete
/**
[21165] Fix | Delete
* Check whether the handler exists before firing as it's possible
[21166] Fix | Delete
* the subscriptions were modified during this loop running.
[21167] Fix | Delete
*/
[21168] Fix | Delete
const handler = this.subscriptions[i];
[21169] Fix | Delete
handler && handler(a, b, c);
[21170] Fix | Delete
}
[21171] Fix | Delete
}
[21172] Fix | Delete
}
[21173] Fix | Delete
getSize() {
[21174] Fix | Delete
return this.subscriptions.length;
[21175] Fix | Delete
}
[21176] Fix | Delete
clear() {
[21177] Fix | Delete
this.subscriptions.length = 0;
[21178] Fix | Delete
}
[21179] Fix | Delete
}
[21180] Fix | Delete
[21181] Fix | Delete
[21182] Fix | Delete
[21183] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/value/index.mjs
[21184] Fix | Delete
[21185] Fix | Delete
[21186] Fix | Delete
[21187] Fix | Delete
[21188] Fix | Delete
[21189] Fix | Delete
[21190] Fix | Delete
/**
[21191] Fix | Delete
* Maximum time between the value of two frames, beyond which we
[21192] Fix | Delete
* assume the velocity has since been 0.
[21193] Fix | Delete
*/
[21194] Fix | Delete
const MAX_VELOCITY_DELTA = 30;
[21195] Fix | Delete
const isFloat = (value) => {
[21196] Fix | Delete
return !isNaN(parseFloat(value));
[21197] Fix | Delete
};
[21198] Fix | Delete
const collectMotionValues = {
[21199] Fix | Delete
current: undefined,
[21200] Fix | Delete
};
[21201] Fix | Delete
/**
[21202] Fix | Delete
* `MotionValue` is used to track the state and velocity of motion values.
[21203] Fix | Delete
*
[21204] Fix | Delete
* @public
[21205] Fix | Delete
*/
[21206] Fix | Delete
class MotionValue {
[21207] Fix | Delete
/**
[21208] Fix | Delete
* @param init - The initiating value
[21209] Fix | Delete
* @param config - Optional configuration options
[21210] Fix | Delete
*
[21211] Fix | Delete
* - `transformer`: A function to transform incoming values with.
[21212] Fix | Delete
*
[21213] Fix | Delete
* @internal
[21214] Fix | Delete
*/
[21215] Fix | Delete
constructor(init, options = {}) {
[21216] Fix | Delete
/**
[21217] Fix | Delete
* This will be replaced by the build step with the latest version number.
[21218] Fix | Delete
* When MotionValues are provided to motion components, warn if versions are mixed.
[21219] Fix | Delete
*/
[21220] Fix | Delete
this.version = "11.2.6";
[21221] Fix | Delete
/**
[21222] Fix | Delete
* Tracks whether this value can output a velocity. Currently this is only true
[21223] Fix | Delete
* if the value is numerical, but we might be able to widen the scope here and support
[21224] Fix | Delete
* other value types.
[21225] Fix | Delete
*
[21226] Fix | Delete
* @internal
[21227] Fix | Delete
*/
[21228] Fix | Delete
this.canTrackVelocity = null;
[21229] Fix | Delete
/**
[21230] Fix | Delete
* An object containing a SubscriptionManager for each active event.
[21231] Fix | Delete
*/
[21232] Fix | Delete
this.events = {};
[21233] Fix | Delete
this.updateAndNotify = (v, render = true) => {
[21234] Fix | Delete
const currentTime = time.now();
[21235] Fix | Delete
/**
[21236] Fix | Delete
* If we're updating the value during another frame or eventloop
[21237] Fix | Delete
* than the previous frame, then the we set the previous frame value
[21238] Fix | Delete
* to current.
[21239] Fix | Delete
*/
[21240] Fix | Delete
if (this.updatedAt !== currentTime) {
[21241] Fix | Delete
this.setPrevFrameValue();
[21242] Fix | Delete
}
[21243] Fix | Delete
this.prev = this.current;
[21244] Fix | Delete
this.setCurrent(v);
[21245] Fix | Delete
// Update update subscribers
[21246] Fix | Delete
if (this.current !== this.prev && this.events.change) {
[21247] Fix | Delete
this.events.change.notify(this.current);
[21248] Fix | Delete
}
[21249] Fix | Delete
// Update render subscribers
[21250] Fix | Delete
if (render && this.events.renderRequest) {
[21251] Fix | Delete
this.events.renderRequest.notify(this.current);
[21252] Fix | Delete
}
[21253] Fix | Delete
};
[21254] Fix | Delete
this.hasAnimated = false;
[21255] Fix | Delete
this.setCurrent(init);
[21256] Fix | Delete
this.owner = options.owner;
[21257] Fix | Delete
}
[21258] Fix | Delete
setCurrent(current) {
[21259] Fix | Delete
this.current = current;
[21260] Fix | Delete
this.updatedAt = time.now();
[21261] Fix | Delete
if (this.canTrackVelocity === null && current !== undefined) {
[21262] Fix | Delete
this.canTrackVelocity = isFloat(this.current);
[21263] Fix | Delete
}
[21264] Fix | Delete
}
[21265] Fix | Delete
setPrevFrameValue(prevFrameValue = this.current) {
[21266] Fix | Delete
this.prevFrameValue = prevFrameValue;
[21267] Fix | Delete
this.prevUpdatedAt = this.updatedAt;
[21268] Fix | Delete
}
[21269] Fix | Delete
/**
[21270] Fix | Delete
* Adds a function that will be notified when the `MotionValue` is updated.
[21271] Fix | Delete
*
[21272] Fix | Delete
* It returns a function that, when called, will cancel the subscription.
[21273] Fix | Delete
*
[21274] Fix | Delete
* When calling `onChange` inside a React component, it should be wrapped with the
[21275] Fix | Delete
* `useEffect` hook. As it returns an unsubscribe function, this should be returned
[21276] Fix | Delete
* from the `useEffect` function to ensure you don't add duplicate subscribers..
[21277] Fix | Delete
*
[21278] Fix | Delete
* ```jsx
[21279] Fix | Delete
* export const MyComponent = () => {
[21280] Fix | Delete
* const x = useMotionValue(0)
[21281] Fix | Delete
* const y = useMotionValue(0)
[21282] Fix | Delete
* const opacity = useMotionValue(1)
[21283] Fix | Delete
*
[21284] Fix | Delete
* useEffect(() => {
[21285] Fix | Delete
* function updateOpacity() {
[21286] Fix | Delete
* const maxXY = Math.max(x.get(), y.get())
[21287] Fix | Delete
* const newOpacity = transform(maxXY, [0, 100], [1, 0])
[21288] Fix | Delete
* opacity.set(newOpacity)
[21289] Fix | Delete
* }
[21290] Fix | Delete
*
[21291] Fix | Delete
* const unsubscribeX = x.on("change", updateOpacity)
[21292] Fix | Delete
* const unsubscribeY = y.on("change", updateOpacity)
[21293] Fix | Delete
*
[21294] Fix | Delete
* return () => {
[21295] Fix | Delete
* unsubscribeX()
[21296] Fix | Delete
* unsubscribeY()
[21297] Fix | Delete
* }
[21298] Fix | Delete
* }, [])
[21299] Fix | Delete
*
[21300] Fix | Delete
* return <motion.div style={{ x }} />
[21301] Fix | Delete
* }
[21302] Fix | Delete
* ```
[21303] Fix | Delete
*
[21304] Fix | Delete
* @param subscriber - A function that receives the latest value.
[21305] Fix | Delete
* @returns A function that, when called, will cancel this subscription.
[21306] Fix | Delete
*
[21307] Fix | Delete
* @deprecated
[21308] Fix | Delete
*/
[21309] Fix | Delete
onChange(subscription) {
[21310] Fix | Delete
if (false) {}
[21311] Fix | Delete
return this.on("change", subscription);
[21312] Fix | Delete
}
[21313] Fix | Delete
on(eventName, callback) {
[21314] Fix | Delete
if (!this.events[eventName]) {
[21315] Fix | Delete
this.events[eventName] = new SubscriptionManager();
[21316] Fix | Delete
}
[21317] Fix | Delete
const unsubscribe = this.events[eventName].add(callback);
[21318] Fix | Delete
if (eventName === "change") {
[21319] Fix | Delete
return () => {
[21320] Fix | Delete
unsubscribe();
[21321] Fix | Delete
/**
[21322] Fix | Delete
* If we have no more change listeners by the start
[21323] Fix | Delete
* of the next frame, stop active animations.
[21324] Fix | Delete
*/
[21325] Fix | Delete
frame_frame.read(() => {
[21326] Fix | Delete
if (!this.events.change.getSize()) {
[21327] Fix | Delete
this.stop();
[21328] Fix | Delete
}
[21329] Fix | Delete
});
[21330] Fix | Delete
};
[21331] Fix | Delete
}
[21332] Fix | Delete
return unsubscribe;
[21333] Fix | Delete
}
[21334] Fix | Delete
clearListeners() {
[21335] Fix | Delete
for (const eventManagers in this.events) {
[21336] Fix | Delete
this.events[eventManagers].clear();
[21337] Fix | Delete
}
[21338] Fix | Delete
}
[21339] Fix | Delete
/**
[21340] Fix | Delete
* Attaches a passive effect to the `MotionValue`.
[21341] Fix | Delete
*
[21342] Fix | Delete
* @internal
[21343] Fix | Delete
*/
[21344] Fix | Delete
attach(passiveEffect, stopPassiveEffect) {
[21345] Fix | Delete
this.passiveEffect = passiveEffect;
[21346] Fix | Delete
this.stopPassiveEffect = stopPassiveEffect;
[21347] Fix | Delete
}
[21348] Fix | Delete
/**
[21349] Fix | Delete
* Sets the state of the `MotionValue`.
[21350] Fix | Delete
*
[21351] Fix | Delete
* @remarks
[21352] Fix | Delete
*
[21353] Fix | Delete
* ```jsx
[21354] Fix | Delete
* const x = useMotionValue(0)
[21355] Fix | Delete
* x.set(10)
[21356] Fix | Delete
* ```
[21357] Fix | Delete
*
[21358] Fix | Delete
* @param latest - Latest value to set.
[21359] Fix | Delete
* @param render - Whether to notify render subscribers. Defaults to `true`
[21360] Fix | Delete
*
[21361] Fix | Delete
* @public
[21362] Fix | Delete
*/
[21363] Fix | Delete
set(v, render = true) {
[21364] Fix | Delete
if (!render || !this.passiveEffect) {
[21365] Fix | Delete
this.updateAndNotify(v, render);
[21366] Fix | Delete
}
[21367] Fix | Delete
else {
[21368] Fix | Delete
this.passiveEffect(v, this.updateAndNotify);
[21369] Fix | Delete
}
[21370] Fix | Delete
}
[21371] Fix | Delete
setWithVelocity(prev, current, delta) {
[21372] Fix | Delete
this.set(current);
[21373] Fix | Delete
this.prev = undefined;
[21374] Fix | Delete
this.prevFrameValue = prev;
[21375] Fix | Delete
this.prevUpdatedAt = this.updatedAt - delta;
[21376] Fix | Delete
}
[21377] Fix | Delete
/**
[21378] Fix | Delete
* Set the state of the `MotionValue`, stopping any active animations,
[21379] Fix | Delete
* effects, and resets velocity to `0`.
[21380] Fix | Delete
*/
[21381] Fix | Delete
jump(v, endAnimation = true) {
[21382] Fix | Delete
this.updateAndNotify(v);
[21383] Fix | Delete
this.prev = v;
[21384] Fix | Delete
this.prevUpdatedAt = this.prevFrameValue = undefined;
[21385] Fix | Delete
endAnimation && this.stop();
[21386] Fix | Delete
if (this.stopPassiveEffect)
[21387] Fix | Delete
this.stopPassiveEffect();
[21388] Fix | Delete
}
[21389] Fix | Delete
/**
[21390] Fix | Delete
* Returns the latest state of `MotionValue`
[21391] Fix | Delete
*
[21392] Fix | Delete
* @returns - The latest state of `MotionValue`
[21393] Fix | Delete
*
[21394] Fix | Delete
* @public
[21395] Fix | Delete
*/
[21396] Fix | Delete
get() {
[21397] Fix | Delete
if (collectMotionValues.current) {
[21398] Fix | Delete
collectMotionValues.current.push(this);
[21399] Fix | Delete
}
[21400] Fix | Delete
return this.current;
[21401] Fix | Delete
}
[21402] Fix | Delete
/**
[21403] Fix | Delete
* @public
[21404] Fix | Delete
*/
[21405] Fix | Delete
getPrevious() {
[21406] Fix | Delete
return this.prev;
[21407] Fix | Delete
}
[21408] Fix | Delete
/**
[21409] Fix | Delete
* Returns the latest velocity of `MotionValue`
[21410] Fix | Delete
*
[21411] Fix | Delete
* @returns - The latest velocity of `MotionValue`. Returns `0` if the state is non-numerical.
[21412] Fix | Delete
*
[21413] Fix | Delete
* @public
[21414] Fix | Delete
*/
[21415] Fix | Delete
getVelocity() {
[21416] Fix | Delete
const currentTime = time.now();
[21417] Fix | Delete
if (!this.canTrackVelocity ||
[21418] Fix | Delete
this.prevFrameValue === undefined ||
[21419] Fix | Delete
currentTime - this.updatedAt > MAX_VELOCITY_DELTA) {
[21420] Fix | Delete
return 0;
[21421] Fix | Delete
}
[21422] Fix | Delete
const delta = Math.min(this.updatedAt - this.prevUpdatedAt, MAX_VELOCITY_DELTA);
[21423] Fix | Delete
// Casts because of parseFloat's poor typing
[21424] Fix | Delete
return velocityPerSecond(parseFloat(this.current) -
[21425] Fix | Delete
parseFloat(this.prevFrameValue), delta);
[21426] Fix | Delete
}
[21427] Fix | Delete
/**
[21428] Fix | Delete
* Registers a new animation to control this `MotionValue`. Only one
[21429] Fix | Delete
* animation can drive a `MotionValue` at one time.
[21430] Fix | Delete
*
[21431] Fix | Delete
* ```jsx
[21432] Fix | Delete
* value.start()
[21433] Fix | Delete
* ```
[21434] Fix | Delete
*
[21435] Fix | Delete
* @param animation - A function that starts the provided animation
[21436] Fix | Delete
*
[21437] Fix | Delete
* @internal
[21438] Fix | Delete
*/
[21439] Fix | Delete
start(startAnimation) {
[21440] Fix | Delete
this.stop();
[21441] Fix | Delete
return new Promise((resolve) => {
[21442] Fix | Delete
this.hasAnimated = true;
[21443] Fix | Delete
this.animation = startAnimation(resolve);
[21444] Fix | Delete
if (this.events.animationStart) {
[21445] Fix | Delete
this.events.animationStart.notify();
[21446] Fix | Delete
}
[21447] Fix | Delete
}).then(() => {
[21448] Fix | Delete
if (this.events.animationComplete) {
[21449] Fix | Delete
this.events.animationComplete.notify();
[21450] Fix | Delete
}
[21451] Fix | Delete
this.clearAnimation();
[21452] Fix | Delete
});
[21453] Fix | Delete
}
[21454] Fix | Delete
/**
[21455] Fix | Delete
* Stop the currently active animation.
[21456] Fix | Delete
*
[21457] Fix | Delete
* @public
[21458] Fix | Delete
*/
[21459] Fix | Delete
stop() {
[21460] Fix | Delete
if (this.animation) {
[21461] Fix | Delete
this.animation.stop();
[21462] Fix | Delete
if (this.events.animationCancel) {
[21463] Fix | Delete
this.events.animationCancel.notify();
[21464] Fix | Delete
}
[21465] Fix | Delete
}
[21466] Fix | Delete
this.clearAnimation();
[21467] Fix | Delete
}
[21468] Fix | Delete
/**
[21469] Fix | Delete
* Returns `true` if this value is currently animating.
[21470] Fix | Delete
*
[21471] Fix | Delete
* @public
[21472] Fix | Delete
*/
[21473] Fix | Delete
isAnimating() {
[21474] Fix | Delete
return !!this.animation;
[21475] Fix | Delete
}
[21476] Fix | Delete
clearAnimation() {
[21477] Fix | Delete
delete this.animation;
[21478] Fix | Delete
}
[21479] Fix | Delete
/**
[21480] Fix | Delete
* Destroy and clean up subscribers to this `MotionValue`.
[21481] Fix | Delete
*
[21482] Fix | Delete
* The `MotionValue` hooks like `useMotionValue` and `useTransform` automatically
[21483] Fix | Delete
* handle the lifecycle of the returned `MotionValue`, so this method is only necessary if you've manually
[21484] Fix | Delete
* created a `MotionValue` via the `motionValue` function.
[21485] Fix | Delete
*
[21486] Fix | Delete
* @public
[21487] Fix | Delete
*/
[21488] Fix | Delete
destroy() {
[21489] Fix | Delete
this.clearListeners();
[21490] Fix | Delete
this.stop();
[21491] Fix | Delete
if (this.stopPassiveEffect) {
[21492] Fix | Delete
this.stopPassiveEffect();
[21493] Fix | Delete
}
[21494] Fix | Delete
}
[21495] Fix | Delete
}
[21496] Fix | Delete
function motionValue(init, options) {
[21497] Fix | Delete
return new MotionValue(init, options);
[21498] Fix | Delete
}
[21499] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function