unframer 2.5.3 → 2.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esbuild.d.ts.map +1 -1
- package/dist/esbuild.js +4 -1
- package/dist/esbuild.js.map +1 -1
- package/dist/framer.d.ts +274 -67
- package/dist/framer.d.ts.map +1 -1
- package/dist/framer.js +1063 -893
- package/dist/framer.js.map +1 -1
- package/dist/react.d.ts +11 -1
- package/dist/react.d.ts.map +1 -1
- package/esm/esbuild.d.ts.map +1 -1
- package/esm/esbuild.js +4 -1
- package/esm/esbuild.js.map +1 -1
- package/esm/framer.d.ts +274 -67
- package/esm/framer.d.ts.map +1 -1
- package/esm/framer.js +1062 -892
- package/esm/framer.js.map +1 -1
- package/esm/react.d.ts +11 -1
- package/esm/react.d.ts.map +1 -1
- package/package.json +7 -2
- package/src/esbuild.ts +8 -1
- package/src/framer.d.ts +274 -67
- package/src/framer.js +831 -606
package/dist/framer.js
CHANGED
|
@@ -202,7 +202,7 @@ exports.SwitchLayoutGroupContext = SwitchLayoutGroupContext;
|
|
|
202
202
|
var LazyContext = (0, react_1.createContext)({
|
|
203
203
|
strict: false,
|
|
204
204
|
});
|
|
205
|
-
var Queue = class {
|
|
205
|
+
var Queue = /*#__PURE__*/ class {
|
|
206
206
|
constructor() {
|
|
207
207
|
this.order = [];
|
|
208
208
|
this.scheduled = /* @__PURE__ */ new Set();
|
|
@@ -1136,8 +1136,8 @@ function getSpringOptions(options) {
|
|
|
1136
1136
|
}
|
|
1137
1137
|
return springOptions;
|
|
1138
1138
|
}
|
|
1139
|
-
function spring(
|
|
1140
|
-
var { keyframes: keyframes2, restDelta, restSpeed } =
|
|
1139
|
+
function spring(_j) {
|
|
1140
|
+
var { keyframes: keyframes2, restDelta, restSpeed } = _j, options = __rest(_j, ["keyframes", "restDelta", "restSpeed"]);
|
|
1141
1141
|
const origin = keyframes2[0];
|
|
1142
1142
|
const target = keyframes2[keyframes2.length - 1];
|
|
1143
1143
|
const state = {
|
|
@@ -1580,7 +1580,7 @@ function flushKeyframeResolvers() {
|
|
|
1580
1580
|
readAllKeyframes();
|
|
1581
1581
|
measureAllKeyframes();
|
|
1582
1582
|
}
|
|
1583
|
-
var KeyframeResolver = class {
|
|
1583
|
+
var KeyframeResolver = /*#__PURE__*/ class {
|
|
1584
1584
|
constructor(unresolvedKeyframes, onComplete, name, motionValue2, element, isAsync = false) {
|
|
1585
1585
|
this.isComplete = false;
|
|
1586
1586
|
this.isAsync = false;
|
|
@@ -1835,9 +1835,9 @@ function getFinalKeyframe(keyframes2, { repeat, repeatType = 'loop', }, finalKey
|
|
|
1835
1835
|
const index = repeat && repeatType !== 'loop' && repeat % 2 === 1 ? 0 : resolvedKeyframes.length - 1;
|
|
1836
1836
|
return !index || finalKeyframe === void 0 ? resolvedKeyframes[index] : finalKeyframe;
|
|
1837
1837
|
}
|
|
1838
|
-
var BaseAnimation = class {
|
|
1839
|
-
constructor(
|
|
1840
|
-
var { autoplay = true, delay: delay2 = 0, type = 'keyframes', repeat = 0, repeatDelay = 0, repeatType = 'loop' } =
|
|
1838
|
+
var BaseAnimation = /*#__PURE__*/ class {
|
|
1839
|
+
constructor(_j) {
|
|
1840
|
+
var { autoplay = true, delay: delay2 = 0, type = 'keyframes', repeat = 0, repeatDelay = 0, repeatType = 'loop' } = _j, options = __rest(_j, ["autoplay", "delay", "type", "repeat", "repeatDelay", "repeatType"]);
|
|
1841
1841
|
this.isStopped = false;
|
|
1842
1842
|
this.hasAttemptedResolve = false;
|
|
1843
1843
|
this.options = Object.assign({ autoplay, delay: delay2, type,
|
|
@@ -1944,9 +1944,9 @@ var generators = {
|
|
|
1944
1944
|
spring,
|
|
1945
1945
|
};
|
|
1946
1946
|
var percentToProgress = (percent2) => percent2 / 100;
|
|
1947
|
-
var MainThreadAnimation = class extends BaseAnimation {
|
|
1948
|
-
constructor(
|
|
1949
|
-
var { KeyframeResolver: KeyframeResolver$1 = KeyframeResolver } =
|
|
1947
|
+
var MainThreadAnimation = /*#__PURE__*/ class extends BaseAnimation {
|
|
1948
|
+
constructor(_j) {
|
|
1949
|
+
var { KeyframeResolver: KeyframeResolver$1 = KeyframeResolver } = _j, options = __rest(_j, ["KeyframeResolver"]);
|
|
1950
1950
|
super(options);
|
|
1951
1951
|
this.holdTime = null;
|
|
1952
1952
|
this.startTime = null;
|
|
@@ -2368,7 +2368,7 @@ function makeNoneKeyframesAnimatable(unresolvedKeyframes, noneKeyframeIndexes, n
|
|
|
2368
2368
|
}
|
|
2369
2369
|
}
|
|
2370
2370
|
}
|
|
2371
|
-
var DOMKeyframesResolver = class extends KeyframeResolver {
|
|
2371
|
+
var DOMKeyframesResolver = /*#__PURE__*/ class extends KeyframeResolver {
|
|
2372
2372
|
constructor(unresolvedKeyframes, onComplete, name, motionValue2) {
|
|
2373
2373
|
super(unresolvedKeyframes, onComplete, name, motionValue2, motionValue2 === null || motionValue2 === void 0 ? void 0 : motionValue2.owner, true);
|
|
2374
2374
|
}
|
|
@@ -2550,7 +2550,7 @@ function pregenerateKeyframes(keyframes2, options) {
|
|
|
2550
2550
|
ease: 'linear',
|
|
2551
2551
|
};
|
|
2552
2552
|
}
|
|
2553
|
-
var AcceleratedAnimation = class extends BaseAnimation {
|
|
2553
|
+
var AcceleratedAnimation = /*#__PURE__*/ class extends BaseAnimation {
|
|
2554
2554
|
constructor(options) {
|
|
2555
2555
|
super(options);
|
|
2556
2556
|
const { name, motionValue: motionValue2, keyframes: keyframes2, } = this.options;
|
|
@@ -2564,7 +2564,7 @@ var AcceleratedAnimation = class extends BaseAnimation {
|
|
|
2564
2564
|
return false;
|
|
2565
2565
|
}
|
|
2566
2566
|
if (requiresPregeneratedKeyframes(this.options)) {
|
|
2567
|
-
const
|
|
2567
|
+
const _j = this.options, { onComplete, onUpdate, motionValue: motionValue3 } = _j, options = __rest(_j, ["onComplete", "onUpdate", "motionValue"]);
|
|
2568
2568
|
const pregeneratedAnimation = pregenerateKeyframes(keyframes2, options);
|
|
2569
2569
|
keyframes2 = pregeneratedAnimation.keyframes;
|
|
2570
2570
|
if (keyframes2.length === 1) {
|
|
@@ -2692,7 +2692,7 @@ var AcceleratedAnimation = class extends BaseAnimation {
|
|
|
2692
2692
|
return;
|
|
2693
2693
|
}
|
|
2694
2694
|
if (this.time) {
|
|
2695
|
-
const
|
|
2695
|
+
const _j = this.options, { motionValue: motionValue2, onUpdate, onComplete } = _j, options = __rest(_j, ["motionValue", "onUpdate", "onComplete"]);
|
|
2696
2696
|
const sampleAnimation = new MainThreadAnimation(Object.assign(Object.assign({}, options), { keyframes: keyframes2, duration,
|
|
2697
2697
|
type, ease: ease2, times, isGenerator: true }));
|
|
2698
2698
|
const sampleTime = secondsToMilliseconds(this.time);
|
|
@@ -2742,7 +2742,7 @@ function moveItem([...arr], fromIndex, toIndex) {
|
|
|
2742
2742
|
}
|
|
2743
2743
|
return arr;
|
|
2744
2744
|
}
|
|
2745
|
-
var SubscriptionManager = class {
|
|
2745
|
+
var SubscriptionManager = /*#__PURE__*/ class {
|
|
2746
2746
|
constructor() {
|
|
2747
2747
|
this.subscriptions = [];
|
|
2748
2748
|
}
|
|
@@ -2778,7 +2778,7 @@ var isFloat = (value) => {
|
|
|
2778
2778
|
var collectMotionValues = {
|
|
2779
2779
|
current: void 0,
|
|
2780
2780
|
};
|
|
2781
|
-
var MotionValue = class {
|
|
2781
|
+
var MotionValue = /*#__PURE__*/ class {
|
|
2782
2782
|
/**
|
|
2783
2783
|
* @param init - The initiating value
|
|
2784
2784
|
* @param config - Optional configuration options
|
|
@@ -3080,8 +3080,8 @@ var getDefaultTransition = (valueKey, { keyframes: keyframes2, }) => {
|
|
|
3080
3080
|
}
|
|
3081
3081
|
return ease;
|
|
3082
3082
|
};
|
|
3083
|
-
function isTransitionDefined(
|
|
3084
|
-
var { when, delay: _delay, delayChildren, staggerChildren, staggerDirection, repeat, repeatType, repeatDelay, from, elapsed } =
|
|
3083
|
+
function isTransitionDefined(_j) {
|
|
3084
|
+
var { when, delay: _delay, delayChildren, staggerChildren, staggerDirection, repeat, repeatType, repeatDelay, from, elapsed } = _j, transition = __rest(_j, ["when", "delay", "delayChildren", "staggerChildren", "staggerDirection", "repeat", "repeatType", "repeatDelay", "from", "elapsed"]);
|
|
3085
3085
|
return !!Object.keys(transition).length;
|
|
3086
3086
|
}
|
|
3087
3087
|
function getValueTransition(transition, key7) {
|
|
@@ -3102,7 +3102,7 @@ function observeTimeline(update, timeline) {
|
|
|
3102
3102
|
return () => cancelFrame(onFrame);
|
|
3103
3103
|
}
|
|
3104
3104
|
var supportsScrollTimeline = memo(() => window.ScrollTimeline !== void 0);
|
|
3105
|
-
var GroupPlaybackControls = class {
|
|
3105
|
+
var GroupPlaybackControls = /*#__PURE__*/ class {
|
|
3106
3106
|
constructor(animations2) {
|
|
3107
3107
|
this.stop = () => this.runAll('stop');
|
|
3108
3108
|
this.animations = animations2.filter(Boolean);
|
|
@@ -3242,7 +3242,7 @@ function setMotionValue(visualElement, key7, value) {
|
|
|
3242
3242
|
}
|
|
3243
3243
|
function setTarget(visualElement, definition) {
|
|
3244
3244
|
const resolved = resolveVariant(visualElement, definition);
|
|
3245
|
-
let
|
|
3245
|
+
let _j = resolved || {}, { transitionEnd = {}, transition = {} } = _j, target = __rest(_j, ["transitionEnd", "transition"]);
|
|
3246
3246
|
target = Object.assign(Object.assign({}, target), transitionEnd);
|
|
3247
3247
|
for (const key7 in target) {
|
|
3248
3248
|
const value = resolveFinalValueInKeyframes(target[key7]);
|
|
@@ -3565,14 +3565,14 @@ function createState() {
|
|
|
3565
3565
|
exit: createTypeState(),
|
|
3566
3566
|
};
|
|
3567
3567
|
}
|
|
3568
|
-
var Feature = class {
|
|
3568
|
+
var Feature = /*#__PURE__*/ class {
|
|
3569
3569
|
constructor(node) {
|
|
3570
3570
|
this.isMounted = false;
|
|
3571
3571
|
this.node = node;
|
|
3572
3572
|
}
|
|
3573
3573
|
update() { }
|
|
3574
3574
|
};
|
|
3575
|
-
var AnimationFeature = class extends Feature {
|
|
3575
|
+
var AnimationFeature = /*#__PURE__*/ class extends Feature {
|
|
3576
3576
|
/**
|
|
3577
3577
|
* We dynamically generate the AnimationState manager as it contains a reference
|
|
3578
3578
|
* to the underlying animation library. We only want to load that if we load this,
|
|
@@ -3605,7 +3605,7 @@ var AnimationFeature = class extends Feature {
|
|
|
3605
3605
|
unmount() { }
|
|
3606
3606
|
};
|
|
3607
3607
|
var id = 0;
|
|
3608
|
-
var ExitAnimationFeature = class extends Feature {
|
|
3608
|
+
var ExitAnimationFeature = /*#__PURE__*/ class extends Feature {
|
|
3609
3609
|
constructor() {
|
|
3610
3610
|
super(...arguments);
|
|
3611
3611
|
this.id = id++;
|
|
@@ -3723,7 +3723,7 @@ function isPresent(context) {
|
|
|
3723
3723
|
return context === null ? true : context.isPresent;
|
|
3724
3724
|
}
|
|
3725
3725
|
var compareByDepth = (a, b) => a.depth - b.depth;
|
|
3726
|
-
var FlatTree = class {
|
|
3726
|
+
var FlatTree = /*#__PURE__*/ class {
|
|
3727
3727
|
constructor() {
|
|
3728
3728
|
this.children = [];
|
|
3729
3729
|
this.isDirty = false;
|
|
@@ -3843,7 +3843,7 @@ function getClosestProjectingNode(visualElement) {
|
|
|
3843
3843
|
return void 0;
|
|
3844
3844
|
return visualElement.options.allowProjection !== false ? visualElement.projection : getClosestProjectingNode(visualElement.parent);
|
|
3845
3845
|
}
|
|
3846
|
-
var VisualElement = class {
|
|
3846
|
+
var VisualElement = /*#__PURE__*/ class {
|
|
3847
3847
|
/**
|
|
3848
3848
|
* This method takes React props and returns found MotionValues. For example, HTML
|
|
3849
3849
|
* MotionValues will be found within the style prop, whereas for Three.js within attribute arrays.
|
|
@@ -3897,7 +3897,7 @@ var VisualElement = class {
|
|
|
3897
3897
|
this.variantChildren = /* @__PURE__ */ new Set();
|
|
3898
3898
|
}
|
|
3899
3899
|
this.manuallyAnimateOnMount = Boolean(parent && parent.current);
|
|
3900
|
-
const
|
|
3900
|
+
const _j = this.scrapeMotionValuesFromProps(props, {}, this), { willChange } = _j, initialMotionValues = __rest(_j, ["willChange"]);
|
|
3901
3901
|
for (const key7 in initialMotionValues) {
|
|
3902
3902
|
const value = initialMotionValues[key7];
|
|
3903
3903
|
if (latestValues[key7] !== void 0 && isMotionValue(value)) {
|
|
@@ -3973,8 +3973,8 @@ var VisualElement = class {
|
|
|
3973
3973
|
}
|
|
3974
3974
|
return this.sortInstanceNodePosition(this.current, other.current);
|
|
3975
3975
|
}
|
|
3976
|
-
loadFeatures(
|
|
3977
|
-
var { children } =
|
|
3976
|
+
loadFeatures(_j, isStrict, preloadedFeatures2, initialLayoutGroupConfig) {
|
|
3977
|
+
var { children } = _j, renderedProps = __rest(_j, ["children"]);
|
|
3978
3978
|
let ProjectionNodeConstructor;
|
|
3979
3979
|
let MeasureLayout2;
|
|
3980
3980
|
if (false) {
|
|
@@ -4429,10 +4429,10 @@ function buildSVGPath(attrs, length, spacing = 1, offset = 0, useDashCase = true
|
|
|
4429
4429
|
const pathSpacing = px.transform(spacing);
|
|
4430
4430
|
attrs[keys23.array] = `${pathLength} ${pathSpacing}`;
|
|
4431
4431
|
}
|
|
4432
|
-
function buildSVGAttrs(state,
|
|
4433
|
-
var { attrX, attrY, attrScale, originX, originY, pathLength, pathSpacing = 1, pathOffset = 0 } =
|
|
4432
|
+
function buildSVGAttrs(state, _j, options, isSVGTag2, transformTemplate2) {
|
|
4433
|
+
var { attrX, attrY, attrScale, originX, originY, pathLength, pathSpacing = 1, pathOffset = 0 } = _j,
|
|
4434
4434
|
// This is object creation, which we try to avoid per-frame.
|
|
4435
|
-
latest = __rest(
|
|
4435
|
+
latest = __rest(_j, ["attrX", "attrY", "attrScale", "originX", "originY", "pathLength", "pathSpacing", "pathOffset"]);
|
|
4436
4436
|
buildHTMLStyles(state, latest, options, transformTemplate2);
|
|
4437
4437
|
if (isSVGTag2) {
|
|
4438
4438
|
if (state.style.viewBox) {
|
|
@@ -4608,13 +4608,13 @@ function addHoverEvent(node, isActive) {
|
|
|
4608
4608
|
passive: !node.getProps()[callbackName],
|
|
4609
4609
|
});
|
|
4610
4610
|
}
|
|
4611
|
-
var HoverGesture = class extends Feature {
|
|
4611
|
+
var HoverGesture = /*#__PURE__*/ class extends Feature {
|
|
4612
4612
|
mount() {
|
|
4613
4613
|
this.unmount = pipe(addHoverEvent(this.node, true), addHoverEvent(this.node, false));
|
|
4614
4614
|
}
|
|
4615
4615
|
unmount() { }
|
|
4616
4616
|
};
|
|
4617
|
-
var FocusGesture = class extends Feature {
|
|
4617
|
+
var FocusGesture = /*#__PURE__*/ class extends Feature {
|
|
4618
4618
|
constructor() {
|
|
4619
4619
|
super(...arguments);
|
|
4620
4620
|
this.isActive = false;
|
|
@@ -4660,7 +4660,7 @@ function fireSyntheticPointerEvent(name, handler) {
|
|
|
4660
4660
|
const syntheticPointerEvent = new PointerEvent('pointer' + name);
|
|
4661
4661
|
handler(syntheticPointerEvent, extractEventInfo(syntheticPointerEvent));
|
|
4662
4662
|
}
|
|
4663
|
-
var PressGesture = class extends Feature {
|
|
4663
|
+
var PressGesture = /*#__PURE__*/ class extends Feature {
|
|
4664
4664
|
constructor() {
|
|
4665
4665
|
super(...arguments);
|
|
4666
4666
|
this.removeStartListeners = noop;
|
|
@@ -4769,8 +4769,8 @@ var fireObserverCallback = (entry) => {
|
|
|
4769
4769
|
var fireAllObserverCallbacks = (entries) => {
|
|
4770
4770
|
entries.forEach(fireObserverCallback);
|
|
4771
4771
|
};
|
|
4772
|
-
function initIntersectionObserver(
|
|
4773
|
-
var { root } =
|
|
4772
|
+
function initIntersectionObserver(_j) {
|
|
4773
|
+
var { root } = _j, options = __rest(_j, ["root"]);
|
|
4774
4774
|
const lookupRoot = root || document;
|
|
4775
4775
|
if (!observers.has(lookupRoot)) {
|
|
4776
4776
|
observers.set(lookupRoot, {});
|
|
@@ -4795,7 +4795,7 @@ var thresholdNames = {
|
|
|
4795
4795
|
some: 0,
|
|
4796
4796
|
all: 1,
|
|
4797
4797
|
};
|
|
4798
|
-
var InViewFeature = class extends Feature {
|
|
4798
|
+
var InViewFeature = /*#__PURE__*/ class extends Feature {
|
|
4799
4799
|
constructor() {
|
|
4800
4800
|
super(...arguments);
|
|
4801
4801
|
this.hasEnteredView = false;
|
|
@@ -4861,7 +4861,7 @@ var gestureAnimations = {
|
|
|
4861
4861
|
Feature: HoverGesture,
|
|
4862
4862
|
},
|
|
4863
4863
|
};
|
|
4864
|
-
var PanSession = class {
|
|
4864
|
+
var PanSession = /*#__PURE__*/ class {
|
|
4865
4865
|
constructor(event, handlers, { transformPagePoint, contextWindow, dragSnapToOrigin = false, } = {}) {
|
|
4866
4866
|
this.startEvent = null;
|
|
4867
4867
|
this.lastMoveEvent = null;
|
|
@@ -5225,7 +5225,7 @@ var getContextWindow = ({ current, }) => {
|
|
|
5225
5225
|
return current ? current.ownerDocument.defaultView : null;
|
|
5226
5226
|
};
|
|
5227
5227
|
var elementDragControls = /* @__PURE__ */ new WeakMap();
|
|
5228
|
-
var VisualElementDragControls = class {
|
|
5228
|
+
var VisualElementDragControls = /*#__PURE__*/ class {
|
|
5229
5229
|
constructor(visualElement) {
|
|
5230
5230
|
this.openGlobalLock = null;
|
|
5231
5231
|
this.isDragging = false;
|
|
@@ -5582,7 +5582,7 @@ function getCurrentDirection(offset, lockThreshold = 10) {
|
|
|
5582
5582
|
}
|
|
5583
5583
|
return direction;
|
|
5584
5584
|
}
|
|
5585
|
-
var DragGesture = class extends Feature {
|
|
5585
|
+
var DragGesture = /*#__PURE__*/ class extends Feature {
|
|
5586
5586
|
constructor(node) {
|
|
5587
5587
|
super(node);
|
|
5588
5588
|
this.removeGroupControls = noop;
|
|
@@ -5606,7 +5606,7 @@ var asyncHandler = (handler) => (event, info) => {
|
|
|
5606
5606
|
frame.postRender(() => handler(event, info));
|
|
5607
5607
|
}
|
|
5608
5608
|
};
|
|
5609
|
-
var PanGesture = class extends Feature {
|
|
5609
|
+
var PanGesture = /*#__PURE__*/ class extends Feature {
|
|
5610
5610
|
constructor() {
|
|
5611
5611
|
super(...arguments);
|
|
5612
5612
|
this.removePointerDownListener = noop;
|
|
@@ -5696,7 +5696,7 @@ var correctBoxShadow = {
|
|
|
5696
5696
|
return template(shadow);
|
|
5697
5697
|
},
|
|
5698
5698
|
};
|
|
5699
|
-
var MeasureLayoutWithContext = class extends react_9.Component {
|
|
5699
|
+
var MeasureLayoutWithContext = /*#__PURE__*/ class extends react_9.Component {
|
|
5700
5700
|
/**
|
|
5701
5701
|
* This only mounts projection nodes for components that
|
|
5702
5702
|
* need measuring, we might want to do it for all components
|
|
@@ -5896,7 +5896,7 @@ function boxEqualsRounded(a, b) {
|
|
|
5896
5896
|
function aspectRatio(box) {
|
|
5897
5897
|
return calcLength(box.x) / calcLength(box.y);
|
|
5898
5898
|
}
|
|
5899
|
-
var NodeStack = class {
|
|
5899
|
+
var NodeStack = /*#__PURE__*/ class {
|
|
5900
5900
|
constructor() {
|
|
5901
5901
|
this.members = [];
|
|
5902
5902
|
}
|
|
@@ -6846,16 +6846,16 @@ function createProjectionNode({ attachResizeListener, defaultParent, measureScro
|
|
|
6846
6846
|
if (!this.isVisible) {
|
|
6847
6847
|
return hiddenVisibility;
|
|
6848
6848
|
}
|
|
6849
|
-
const
|
|
6849
|
+
const styles4 = {
|
|
6850
6850
|
visibility: '',
|
|
6851
6851
|
};
|
|
6852
6852
|
const transformTemplate2 = this.getTransformTemplate();
|
|
6853
6853
|
if (this.needsReset) {
|
|
6854
6854
|
this.needsReset = false;
|
|
6855
|
-
|
|
6856
|
-
|
|
6857
|
-
|
|
6858
|
-
return
|
|
6855
|
+
styles4.opacity = '';
|
|
6856
|
+
styles4.pointerEvents = resolveMotionValue(styleProp === null || styleProp === void 0 ? void 0 : styleProp.pointerEvents) || '';
|
|
6857
|
+
styles4.transform = transformTemplate2 ? transformTemplate2(this.latestValues, '') : 'none';
|
|
6858
|
+
return styles4;
|
|
6859
6859
|
}
|
|
6860
6860
|
const lead = this.getLead();
|
|
6861
6861
|
if (!this.projectionDelta || !this.layout || !lead.target) {
|
|
@@ -6873,14 +6873,14 @@ function createProjectionNode({ attachResizeListener, defaultParent, measureScro
|
|
|
6873
6873
|
}
|
|
6874
6874
|
const valuesToRender = lead.animationValues || lead.latestValues;
|
|
6875
6875
|
this.applyTransformsToTarget();
|
|
6876
|
-
|
|
6876
|
+
styles4.transform = buildProjectionTransform(this.projectionDeltaWithTransform, this.treeScale, valuesToRender);
|
|
6877
6877
|
if (transformTemplate2) {
|
|
6878
|
-
|
|
6878
|
+
styles4.transform = transformTemplate2(valuesToRender, styles4.transform);
|
|
6879
6879
|
}
|
|
6880
6880
|
const { x, y, } = this.projectionDelta;
|
|
6881
|
-
|
|
6881
|
+
styles4.transformOrigin = `${x.origin * 100}% ${y.origin * 100}% 0`;
|
|
6882
6882
|
if (lead.animationValues) {
|
|
6883
|
-
|
|
6883
|
+
styles4.opacity = lead === this
|
|
6884
6884
|
? (_b = (_a = valuesToRender.opacity) !== null && _a !== void 0 ? _a : this.latestValues.opacity) !== null && _b !== void 0
|
|
6885
6885
|
? _b
|
|
6886
6886
|
: 1
|
|
@@ -6889,7 +6889,7 @@ function createProjectionNode({ attachResizeListener, defaultParent, measureScro
|
|
|
6889
6889
|
: valuesToRender.opacityExit;
|
|
6890
6890
|
}
|
|
6891
6891
|
else {
|
|
6892
|
-
|
|
6892
|
+
styles4.opacity = lead === this
|
|
6893
6893
|
? valuesToRender.opacity !== void 0 ? valuesToRender.opacity : ''
|
|
6894
6894
|
: valuesToRender.opacityExit !== void 0
|
|
6895
6895
|
? valuesToRender.opacityExit
|
|
@@ -6899,23 +6899,23 @@ function createProjectionNode({ attachResizeListener, defaultParent, measureScro
|
|
|
6899
6899
|
if (valuesToRender[key7] === void 0)
|
|
6900
6900
|
continue;
|
|
6901
6901
|
const { correct, applyTo, } = scaleCorrectors[key7];
|
|
6902
|
-
const corrected =
|
|
6902
|
+
const corrected = styles4.transform === 'none' ? valuesToRender[key7] : correct(valuesToRender[key7], lead);
|
|
6903
6903
|
if (applyTo) {
|
|
6904
6904
|
const num = applyTo.length;
|
|
6905
6905
|
for (let i = 0; i < num; i++) {
|
|
6906
|
-
|
|
6906
|
+
styles4[applyTo[i]] = corrected;
|
|
6907
6907
|
}
|
|
6908
6908
|
}
|
|
6909
6909
|
else {
|
|
6910
|
-
|
|
6910
|
+
styles4[key7] = corrected;
|
|
6911
6911
|
}
|
|
6912
6912
|
}
|
|
6913
6913
|
if (this.options.layoutId) {
|
|
6914
|
-
|
|
6914
|
+
styles4.pointerEvents = lead === this
|
|
6915
6915
|
? resolveMotionValue(styleProp === null || styleProp === void 0 ? void 0 : styleProp.pointerEvents) || ''
|
|
6916
6916
|
: 'none';
|
|
6917
6917
|
}
|
|
6918
|
-
return
|
|
6918
|
+
return styles4;
|
|
6919
6919
|
}
|
|
6920
6920
|
clearSnapshot() {
|
|
6921
6921
|
this.resumeFrom = this.snapshot = void 0;
|
|
@@ -7130,7 +7130,7 @@ var drag = {
|
|
|
7130
7130
|
MeasureLayout,
|
|
7131
7131
|
},
|
|
7132
7132
|
};
|
|
7133
|
-
var DOMVisualElement = class extends VisualElement {
|
|
7133
|
+
var DOMVisualElement = /*#__PURE__*/ class extends VisualElement {
|
|
7134
7134
|
constructor() {
|
|
7135
7135
|
super(...arguments);
|
|
7136
7136
|
this.KeyframeResolver = DOMKeyframesResolver;
|
|
@@ -7149,7 +7149,7 @@ var DOMVisualElement = class extends VisualElement {
|
|
|
7149
7149
|
function getComputedStyle2(element) {
|
|
7150
7150
|
return window.getComputedStyle(element);
|
|
7151
7151
|
}
|
|
7152
|
-
var HTMLVisualElement = class extends DOMVisualElement {
|
|
7152
|
+
var HTMLVisualElement = /*#__PURE__*/ class extends DOMVisualElement {
|
|
7153
7153
|
constructor() {
|
|
7154
7154
|
super(...arguments);
|
|
7155
7155
|
this.type = 'html';
|
|
@@ -7191,7 +7191,7 @@ var HTMLVisualElement = class extends DOMVisualElement {
|
|
|
7191
7191
|
renderHTML(instance, renderState, styleProp, projection);
|
|
7192
7192
|
}
|
|
7193
7193
|
};
|
|
7194
|
-
var SVGVisualElement = class extends DOMVisualElement {
|
|
7194
|
+
var SVGVisualElement = /*#__PURE__*/ class extends DOMVisualElement {
|
|
7195
7195
|
constructor() {
|
|
7196
7196
|
super(...arguments);
|
|
7197
7197
|
this.type = 'svg';
|
|
@@ -7276,7 +7276,7 @@ function useUnmountEffect(callback) {
|
|
|
7276
7276
|
return (0, react_2.useEffect)(() => () => callback(), []);
|
|
7277
7277
|
}
|
|
7278
7278
|
exports.useUnmountEffect = useUnmountEffect;
|
|
7279
|
-
var PopChildMeasure = class extends React2.Component {
|
|
7279
|
+
var PopChildMeasure = /*#__PURE__*/ class extends React2.Component {
|
|
7280
7280
|
getSnapshotBeforeUpdate(prevProps) {
|
|
7281
7281
|
const element = this.props.childRef.current;
|
|
7282
7282
|
if (element && prevProps.isPresent && !this.props.isPresent) {
|
|
@@ -7502,8 +7502,8 @@ var AnimatePresence = ({ children, custom, initial = true, onExitComplete, exitB
|
|
|
7502
7502
|
});
|
|
7503
7503
|
};
|
|
7504
7504
|
exports.AnimatePresence = AnimatePresence;
|
|
7505
|
-
function MotionConfig(
|
|
7506
|
-
var { children, isValidProp } =
|
|
7505
|
+
function MotionConfig(_j) {
|
|
7506
|
+
var { children, isValidProp } = _j, config = __rest(_j, ["children", "isValidProp"]);
|
|
7507
7507
|
isValidProp && loadExternalIsValidProp(isValidProp);
|
|
7508
7508
|
config = Object.assign(Object.assign({}, (0, react_3.useContext)(MotionConfigContext)), config);
|
|
7509
7509
|
config.isStatic = useConstant(() => config.isStatic);
|
|
@@ -7524,8 +7524,8 @@ function LazyMotion({ children, features, strict = false, }) {
|
|
|
7524
7524
|
}
|
|
7525
7525
|
(0, react_2.useEffect)(() => {
|
|
7526
7526
|
if (isLazyBundle(features)) {
|
|
7527
|
-
features().then((
|
|
7528
|
-
var { renderer } =
|
|
7527
|
+
features().then((_j) => {
|
|
7528
|
+
var { renderer } = _j, loadedFeatures = __rest(_j, ["renderer"]);
|
|
7529
7529
|
loadFeatures(loadedFeatures);
|
|
7530
7530
|
loadedRenderer.current = renderer;
|
|
7531
7531
|
setIsLoaded(true);
|
|
@@ -7679,8 +7679,8 @@ function checkReorder(order, value, offset, velocity) {
|
|
|
7679
7679
|
}
|
|
7680
7680
|
return order;
|
|
7681
7681
|
}
|
|
7682
|
-
function ReorderGroup(
|
|
7683
|
-
var { children, as = 'ul', axis = 'y', onReorder, values } =
|
|
7682
|
+
function ReorderGroup(_j, externalRef) {
|
|
7683
|
+
var { children, as = 'ul', axis = 'y', onReorder, values } = _j, props = __rest(_j, ["children", "as", "axis", "onReorder", "values"]);
|
|
7684
7684
|
const Component33 = useConstant(() => motion(as));
|
|
7685
7685
|
const order = [];
|
|
7686
7686
|
const isReordering = (0, react_4.useRef)(false);
|
|
@@ -7728,8 +7728,8 @@ function compareMin(a, b) {
|
|
|
7728
7728
|
function useDefaultMotionValue(value, defaultValue = 0) {
|
|
7729
7729
|
return isMotionValue(value) ? value : useMotionValue(defaultValue);
|
|
7730
7730
|
}
|
|
7731
|
-
function ReorderItem(
|
|
7732
|
-
var { children, style = {}, value, as = 'li', onDrag, layout: layout2 = true } =
|
|
7731
|
+
function ReorderItem(_j, externalRef) {
|
|
7732
|
+
var { children, style = {}, value, as = 'li', onDrag, layout: layout2 = true } = _j, props = __rest(_j, ["children", "style", "value", "as", "onDrag", "layout"]);
|
|
7733
7733
|
const Component33 = useConstant(() => motion(as));
|
|
7734
7734
|
const context = (0, react_3.useContext)(ReorderContext);
|
|
7735
7735
|
const point2 = {
|
|
@@ -8163,8 +8163,8 @@ var scrollListeners = /* @__PURE__ */ new WeakMap();
|
|
|
8163
8163
|
var resizeListeners = /* @__PURE__ */ new WeakMap();
|
|
8164
8164
|
var onScrollHandlers = /* @__PURE__ */ new WeakMap();
|
|
8165
8165
|
var getEventTarget = (element) => element === document.documentElement ? window : element;
|
|
8166
|
-
function scrollInfo(onScroll,
|
|
8167
|
-
var { container = document.documentElement } =
|
|
8166
|
+
function scrollInfo(onScroll, _j = {}) {
|
|
8167
|
+
var { container = document.documentElement } = _j, options = __rest(_j, ["container"]);
|
|
8168
8168
|
let containerHandlers = onScrollHandlers.get(container);
|
|
8169
8169
|
if (!containerHandlers) {
|
|
8170
8170
|
containerHandlers = /* @__PURE__ */ new Set();
|
|
@@ -8234,8 +8234,8 @@ var createScrollMotionValues = () => ({
|
|
|
8234
8234
|
scrollXProgress: motionValue(0),
|
|
8235
8235
|
scrollYProgress: motionValue(0),
|
|
8236
8236
|
});
|
|
8237
|
-
function useScroll(
|
|
8238
|
-
var { container, target, layoutEffect = true } =
|
|
8237
|
+
function useScroll(_j = {}) {
|
|
8238
|
+
var { container, target, layoutEffect = true } = _j, options = __rest(_j, ["container", "target", "layoutEffect"]);
|
|
8239
8239
|
const values = useConstant(createScrollMotionValues);
|
|
8240
8240
|
const useLifecycleEffect = layoutEffect ? useIsomorphicLayoutEffect : react_2.useEffect;
|
|
8241
8241
|
useLifecycleEffect(() => {
|
|
@@ -8289,7 +8289,7 @@ function useTime() {
|
|
|
8289
8289
|
return time2;
|
|
8290
8290
|
}
|
|
8291
8291
|
exports.useTime = useTime;
|
|
8292
|
-
var WillChangeMotionValue = class extends MotionValue {
|
|
8292
|
+
var WillChangeMotionValue = /*#__PURE__*/ class extends MotionValue {
|
|
8293
8293
|
constructor() {
|
|
8294
8294
|
super(...arguments);
|
|
8295
8295
|
this.members = [];
|
|
@@ -8510,8 +8510,8 @@ function compareByTime(a, b) {
|
|
|
8510
8510
|
}
|
|
8511
8511
|
}
|
|
8512
8512
|
var defaultSegmentEasing = 'easeInOut';
|
|
8513
|
-
function createAnimationsFromSequence(sequence2,
|
|
8514
|
-
var { defaultTransition = {} } =
|
|
8513
|
+
function createAnimationsFromSequence(sequence2, _j = {}, scope) {
|
|
8514
|
+
var { defaultTransition = {} } = _j, sequenceTransition = __rest(_j, ["defaultTransition"]);
|
|
8515
8515
|
const defaultDuration = defaultTransition.duration || 0.3;
|
|
8516
8516
|
const animationDefinitions = /* @__PURE__ */ new Map();
|
|
8517
8517
|
const sequences = /* @__PURE__ */ new Map();
|
|
@@ -8786,7 +8786,7 @@ function useInView(ref, { root, margin, amount, once = false, } = {}) {
|
|
|
8786
8786
|
return isInView;
|
|
8787
8787
|
}
|
|
8788
8788
|
exports.useInView = useInView;
|
|
8789
|
-
var DragControls = class {
|
|
8789
|
+
var DragControls = /*#__PURE__*/ class {
|
|
8790
8790
|
constructor() {
|
|
8791
8791
|
this.componentControls = /* @__PURE__ */ new Set();
|
|
8792
8792
|
}
|
|
@@ -8988,7 +8988,7 @@ function startOptimizedAppearAnimation(element, name, keyframes2, options, onRea
|
|
|
8988
8988
|
}
|
|
8989
8989
|
exports.startOptimizedAppearAnimation = startOptimizedAppearAnimation;
|
|
8990
8990
|
var createObject = () => ({});
|
|
8991
|
-
var StateVisualElement = class extends VisualElement {
|
|
8991
|
+
var StateVisualElement = /*#__PURE__*/ class extends VisualElement {
|
|
8992
8992
|
build() { }
|
|
8993
8993
|
measureInstanceViewportBox() {
|
|
8994
8994
|
return createBox();
|
|
@@ -9145,7 +9145,7 @@ var cancelSync = stepsOrder.reduce((acc, key7) => {
|
|
|
9145
9145
|
return acc;
|
|
9146
9146
|
}, {});
|
|
9147
9147
|
exports.cancelSync = cancelSync;
|
|
9148
|
-
// https :https://app.framerstatic.com/framer.
|
|
9148
|
+
// https :https://app.framerstatic.com/framer.VEJ3JK5Y.js
|
|
9149
9149
|
const react_12 = __importDefault(require("react"));
|
|
9150
9150
|
const react_13 = require("react");
|
|
9151
9151
|
const react_14 = require("react");
|
|
@@ -9158,7 +9158,7 @@ var require_hsluv = __commonJS({
|
|
|
9158
9158
|
value: true,
|
|
9159
9159
|
});
|
|
9160
9160
|
exports.Hsluv = void 0;
|
|
9161
|
-
var Hsluv2 = class {
|
|
9161
|
+
var Hsluv2 = /*#__PURE__*/ class {
|
|
9162
9162
|
constructor() {
|
|
9163
9163
|
this.hex = '#000000';
|
|
9164
9164
|
this.rgb_r = 0;
|
|
@@ -10842,12 +10842,12 @@ function renderPage(Page4, defaultPageStyle) {
|
|
|
10842
10842
|
};
|
|
10843
10843
|
return react_12.default.isValidElement(Page4) ? react_12.default.cloneElement(Page4, style) : react_12.default.createElement(Page4, style);
|
|
10844
10844
|
}
|
|
10845
|
-
var NotFoundError = class extends Error {
|
|
10845
|
+
var NotFoundError = /*#__PURE__*/ class extends Error {
|
|
10846
10846
|
};
|
|
10847
10847
|
exports.NotFoundError = NotFoundError;
|
|
10848
|
-
var ErrorBoundaryCaughtError = class extends Error {
|
|
10848
|
+
var ErrorBoundaryCaughtError = /*#__PURE__*/ class extends Error {
|
|
10849
10849
|
};
|
|
10850
|
-
var ErrorBoundary = class extends react_9.Component {
|
|
10850
|
+
var ErrorBoundary = /*#__PURE__*/ class extends react_9.Component {
|
|
10851
10851
|
constructor(props) {
|
|
10852
10852
|
super(props);
|
|
10853
10853
|
this.state = {
|
|
@@ -11188,7 +11188,7 @@ function replacePathVariables(path, currentLocale, nextLocale, defaultLocale, co
|
|
|
11188
11188
|
};
|
|
11189
11189
|
});
|
|
11190
11190
|
}
|
|
11191
|
-
function getLocalizedNavigationPath(
|
|
11191
|
+
function getLocalizedNavigationPath(_j) {
|
|
11192
11192
|
return __awaiter(this, arguments, void 0, function* ({ currentLocale, nextLocale, defaultLocale, route, pathVariables, collectionUtils, preserveQueryParams, }) {
|
|
11193
11193
|
const { path, } = route;
|
|
11194
11194
|
let result = {
|
|
@@ -11203,7 +11203,7 @@ function getLocalizedNavigationPath(_f) {
|
|
|
11203
11203
|
const pathReplacement = yield replacePathVariables(path, currentLocale, nextLocale, defaultLocale, route.collectionId, pathVariables, collectionUtils);
|
|
11204
11204
|
result = pathReplacement;
|
|
11205
11205
|
}
|
|
11206
|
-
catch (
|
|
11206
|
+
catch (_k) { }
|
|
11207
11207
|
}
|
|
11208
11208
|
if (nextLocale.slug) {
|
|
11209
11209
|
result.path = '/' + nextLocale.slug + result.path;
|
|
@@ -11405,8 +11405,8 @@ function valuesToCSSKeyframes(values, progress2, page, maskGenerator) {
|
|
|
11405
11405
|
function getMaskGenerator(type) {
|
|
11406
11406
|
return type ? maskGenerators[type] : void 0;
|
|
11407
11407
|
}
|
|
11408
|
-
function createPageTransitionRules(page,
|
|
11409
|
-
var { transition } =
|
|
11408
|
+
function createPageTransitionRules(page, _j) {
|
|
11409
|
+
var { transition } = _j, values = __rest(_j, ["transition"]);
|
|
11410
11410
|
var _a;
|
|
11411
11411
|
const name = 'view-transition-' + page;
|
|
11412
11412
|
const settings = {
|
|
@@ -11580,7 +11580,7 @@ function pushRouteState(routeId, route, { currentRoutePath, currentPathVariables
|
|
|
11580
11580
|
localeId,
|
|
11581
11581
|
}, newPath);
|
|
11582
11582
|
}
|
|
11583
|
-
catch (
|
|
11583
|
+
catch (_j) { }
|
|
11584
11584
|
}
|
|
11585
11585
|
function isHistoryState(data2) {
|
|
11586
11586
|
const routeIdKey = 'routeId';
|
|
@@ -11737,7 +11737,7 @@ function switchLocale(options) {
|
|
|
11737
11737
|
paginationInfo: window.history.state.paginationInfo,
|
|
11738
11738
|
}, result.path);
|
|
11739
11739
|
}
|
|
11740
|
-
catch (
|
|
11740
|
+
catch (_j) { }
|
|
11741
11741
|
return result;
|
|
11742
11742
|
});
|
|
11743
11743
|
}
|
|
@@ -11749,7 +11749,7 @@ function pushLoadMoreHistory(hash2, paginationInfo) {
|
|
|
11749
11749
|
const newPaginationInfo = Object.assign(Object.assign({}, currentHistoryState.paginationInfo), { [hash2]: paginationInfo });
|
|
11750
11750
|
replaceHistoryState(Object.assign(Object.assign({}, currentHistoryState), { paginationInfo: newPaginationInfo }));
|
|
11751
11751
|
}
|
|
11752
|
-
catch (
|
|
11752
|
+
catch (_j) { }
|
|
11753
11753
|
}
|
|
11754
11754
|
exports.pushLoadMoreHistory = pushLoadMoreHistory;
|
|
11755
11755
|
function isSamePage(a, b) {
|
|
@@ -11920,7 +11920,7 @@ function RoutesProvider({ routes, children, }) {
|
|
|
11920
11920
|
children,
|
|
11921
11921
|
});
|
|
11922
11922
|
}
|
|
11923
|
-
var SuspenseErrorBoundary = class extends react_9.Component {
|
|
11923
|
+
var SuspenseErrorBoundary = /*#__PURE__*/ class extends react_9.Component {
|
|
11924
11924
|
constructor() {
|
|
11925
11925
|
super(...arguments);
|
|
11926
11926
|
this.state = {
|
|
@@ -12107,7 +12107,7 @@ function Router({ defaultPageStyle, disableHistory, initialPathVariables, initia
|
|
|
12107
12107
|
startViewTransition2(currentRouteRef.current, currentRouteId2, () => (0, react_13.startTransition)(forceUpdate));
|
|
12108
12108
|
monitorNextRender();
|
|
12109
12109
|
}
|
|
12110
|
-
catch (
|
|
12110
|
+
catch (_j) { }
|
|
12111
12111
|
}),
|
|
12112
12112
|
};
|
|
12113
12113
|
}, [activeLocale, collectionUtils, forceUpdate, locales, monitorNextRender, preserveQueryParams, routes, startViewTransition2,]);
|
|
@@ -12498,7 +12498,7 @@ function deprecationWarning(removedItem, removalVersion, replacement) {
|
|
|
12498
12498
|
const warningText = `Deprecation warning: ${removedItem} will be removed in version ${removalVersion}${replacementText}.`;
|
|
12499
12499
|
warnOnce2(warningText);
|
|
12500
12500
|
}
|
|
12501
|
-
var Observers = class {
|
|
12501
|
+
var Observers = /*#__PURE__*/ class {
|
|
12502
12502
|
constructor() {
|
|
12503
12503
|
__publicField(this, 'observers', /* @__PURE__ */ new Set());
|
|
12504
12504
|
__publicField(this, 'transactions', {});
|
|
@@ -12623,7 +12623,7 @@ function animatableInterpolation(value, currentInterpolation) {
|
|
|
12623
12623
|
},
|
|
12624
12624
|
};
|
|
12625
12625
|
}
|
|
12626
|
-
var AnimatableValue = class {
|
|
12626
|
+
var AnimatableValue = /*#__PURE__*/ class {
|
|
12627
12627
|
constructor(value) {
|
|
12628
12628
|
this.value = value;
|
|
12629
12629
|
__publicField(this, 'observers', new Observers());
|
|
@@ -12819,7 +12819,7 @@ function controlPointsForCurve(curve) {
|
|
|
12819
12819
|
return [0.42, 0, 0.58, 1,];
|
|
12820
12820
|
}
|
|
12821
12821
|
}
|
|
12822
|
-
var BezierAnimator = class {
|
|
12822
|
+
var BezierAnimator = /*#__PURE__*/ class {
|
|
12823
12823
|
constructor(options, interpolation) {
|
|
12824
12824
|
this.interpolation = interpolation;
|
|
12825
12825
|
__publicField(this, 'unitBezier');
|
|
@@ -12871,7 +12871,7 @@ var BezierAnimator = class {
|
|
|
12871
12871
|
}
|
|
12872
12872
|
};
|
|
12873
12873
|
exports.BezierAnimator = BezierAnimator;
|
|
12874
|
-
var UnitBezier = class {
|
|
12874
|
+
var UnitBezier = /*#__PURE__*/ class {
|
|
12875
12875
|
constructor(point1, point2) {
|
|
12876
12876
|
__publicField(this, 'a');
|
|
12877
12877
|
__publicField(this, 'b');
|
|
@@ -12924,7 +12924,7 @@ var UnitBezier = class {
|
|
|
12924
12924
|
return t2;
|
|
12925
12925
|
}
|
|
12926
12926
|
};
|
|
12927
|
-
var Integrator = class {
|
|
12927
|
+
var Integrator = /*#__PURE__*/ class {
|
|
12928
12928
|
constructor(accelerationFunction) {
|
|
12929
12929
|
__publicField(this, 'accelerationForState');
|
|
12930
12930
|
this.accelerationForState = accelerationFunction;
|
|
@@ -12959,7 +12959,7 @@ var Integrator = class {
|
|
|
12959
12959
|
return output;
|
|
12960
12960
|
}
|
|
12961
12961
|
};
|
|
12962
|
-
var FrictionAnimator = class {
|
|
12962
|
+
var FrictionAnimator = /*#__PURE__*/ class {
|
|
12963
12963
|
constructor(options) {
|
|
12964
12964
|
__publicField(this, 'options');
|
|
12965
12965
|
__publicField(this, 'state');
|
|
@@ -13139,7 +13139,7 @@ function isDampingDurationSpringOptions(options) {
|
|
|
13139
13139
|
}
|
|
13140
13140
|
return typeof options.dampingRatio === 'number' || typeof options.duration === 'number' || typeof options.mass === 'number';
|
|
13141
13141
|
}
|
|
13142
|
-
var SpringAnimator = class {
|
|
13142
|
+
var SpringAnimator = /*#__PURE__*/ class {
|
|
13143
13143
|
constructor(options, interpolation) {
|
|
13144
13144
|
this.interpolation = interpolation;
|
|
13145
13145
|
__publicField(this, 'options');
|
|
@@ -13222,7 +13222,7 @@ var Defaults = {
|
|
|
13222
13222
|
tolerance: 1,
|
|
13223
13223
|
},
|
|
13224
13224
|
};
|
|
13225
|
-
var InertialScrollAnimator = class {
|
|
13225
|
+
var InertialScrollAnimator = /*#__PURE__*/ class {
|
|
13226
13226
|
constructor(options) {
|
|
13227
13227
|
__publicField(this, 'options');
|
|
13228
13228
|
__publicField(this, 'current');
|
|
@@ -13792,7 +13792,7 @@ var matchers = /* @__PURE__ */ (() => {
|
|
|
13792
13792
|
};
|
|
13793
13793
|
})();
|
|
13794
13794
|
function stringToObject(inputColor) {
|
|
13795
|
-
var
|
|
13795
|
+
var _j, _k, _l, _m, _o, _p, _q, _t, _u, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14;
|
|
13796
13796
|
if (inputColor.includes('gradient('))
|
|
13797
13797
|
return false;
|
|
13798
13798
|
if (inputColor.includes('var('))
|
|
@@ -13816,9 +13816,9 @@ function stringToObject(inputColor) {
|
|
|
13816
13816
|
let match;
|
|
13817
13817
|
if (match = matchers.rgb.exec(color2)) {
|
|
13818
13818
|
return {
|
|
13819
|
-
r: parseInt((
|
|
13820
|
-
g: parseInt((
|
|
13821
|
-
b: parseInt((
|
|
13819
|
+
r: parseInt((_j = match[1]) !== null && _j !== void 0 ? _j : ''),
|
|
13820
|
+
g: parseInt((_k = match[2]) !== null && _k !== void 0 ? _k : ''),
|
|
13821
|
+
b: parseInt((_l = match[3]) !== null && _l !== void 0 ? _l : ''),
|
|
13822
13822
|
a: 1,
|
|
13823
13823
|
format: 'rgb',
|
|
13824
13824
|
/* RGB */
|
|
@@ -13826,19 +13826,19 @@ function stringToObject(inputColor) {
|
|
|
13826
13826
|
}
|
|
13827
13827
|
if (match = matchers.rgba.exec(color2)) {
|
|
13828
13828
|
return {
|
|
13829
|
-
r: parseInt((
|
|
13830
|
-
g: parseInt((
|
|
13831
|
-
b: parseInt((
|
|
13832
|
-
a: parseFloat((
|
|
13829
|
+
r: parseInt((_m = match[1]) !== null && _m !== void 0 ? _m : ''),
|
|
13830
|
+
g: parseInt((_o = match[2]) !== null && _o !== void 0 ? _o : ''),
|
|
13831
|
+
b: parseInt((_p = match[3]) !== null && _p !== void 0 ? _p : ''),
|
|
13832
|
+
a: parseFloat((_q = match[4]) !== null && _q !== void 0 ? _q : ''),
|
|
13833
13833
|
format: 'rgb',
|
|
13834
13834
|
/* RGB */
|
|
13835
13835
|
};
|
|
13836
13836
|
}
|
|
13837
13837
|
if (match = matchers.hsl.exec(color2)) {
|
|
13838
13838
|
return {
|
|
13839
|
-
h: parseInt((
|
|
13840
|
-
s: percentToFraction((
|
|
13841
|
-
l: percentToFraction((
|
|
13839
|
+
h: parseInt((_t = match[1]) !== null && _t !== void 0 ? _t : ''),
|
|
13840
|
+
s: percentToFraction((_u = match[2]) !== null && _u !== void 0 ? _u : ''),
|
|
13841
|
+
l: percentToFraction((_w = match[3]) !== null && _w !== void 0 ? _w : ''),
|
|
13842
13842
|
a: 1,
|
|
13843
13843
|
format: 'hsl',
|
|
13844
13844
|
/* HSL */
|
|
@@ -13846,19 +13846,19 @@ function stringToObject(inputColor) {
|
|
|
13846
13846
|
}
|
|
13847
13847
|
if (match = matchers.hsla.exec(color2)) {
|
|
13848
13848
|
return {
|
|
13849
|
-
h: parseInt((
|
|
13850
|
-
s: percentToFraction((
|
|
13851
|
-
l: percentToFraction((
|
|
13852
|
-
a: parseFloat((
|
|
13849
|
+
h: parseInt((_x = match[1]) !== null && _x !== void 0 ? _x : ''),
|
|
13850
|
+
s: percentToFraction((_y = match[2]) !== null && _y !== void 0 ? _y : ''),
|
|
13851
|
+
l: percentToFraction((_z = match[3]) !== null && _z !== void 0 ? _z : ''),
|
|
13852
|
+
a: parseFloat((_0 = match[4]) !== null && _0 !== void 0 ? _0 : ''),
|
|
13853
13853
|
format: 'hsl',
|
|
13854
13854
|
/* HSL */
|
|
13855
13855
|
};
|
|
13856
13856
|
}
|
|
13857
13857
|
if (match = matchers.hsv.exec(color2)) {
|
|
13858
13858
|
return {
|
|
13859
|
-
h: parseInt((
|
|
13860
|
-
s: percentToFraction((
|
|
13861
|
-
v: percentToFraction((
|
|
13859
|
+
h: parseInt((_1 = match[1]) !== null && _1 !== void 0 ? _1 : ''),
|
|
13860
|
+
s: percentToFraction((_2 = match[2]) !== null && _2 !== void 0 ? _2 : ''),
|
|
13861
|
+
v: percentToFraction((_3 = match[3]) !== null && _3 !== void 0 ? _3 : ''),
|
|
13862
13862
|
a: 1,
|
|
13863
13863
|
format: 'hsv',
|
|
13864
13864
|
/* HSV */
|
|
@@ -13866,29 +13866,29 @@ function stringToObject(inputColor) {
|
|
|
13866
13866
|
}
|
|
13867
13867
|
if (match = matchers.hsva.exec(color2)) {
|
|
13868
13868
|
return {
|
|
13869
|
-
h: parseInt((
|
|
13870
|
-
s: percentToFraction((
|
|
13871
|
-
v: percentToFraction((
|
|
13872
|
-
a: parseFloat((
|
|
13869
|
+
h: parseInt((_4 = match[1]) !== null && _4 !== void 0 ? _4 : ''),
|
|
13870
|
+
s: percentToFraction((_5 = match[2]) !== null && _5 !== void 0 ? _5 : ''),
|
|
13871
|
+
v: percentToFraction((_6 = match[3]) !== null && _6 !== void 0 ? _6 : ''),
|
|
13872
|
+
a: parseFloat((_7 = match[4]) !== null && _7 !== void 0 ? _7 : ''),
|
|
13873
13873
|
format: 'hsv',
|
|
13874
13874
|
/* HSV */
|
|
13875
13875
|
};
|
|
13876
13876
|
}
|
|
13877
13877
|
if (match = matchers.hex8.exec(color2)) {
|
|
13878
13878
|
return {
|
|
13879
|
-
r: parseIntFromHex((
|
|
13880
|
-
g: parseIntFromHex((
|
|
13881
|
-
b: parseIntFromHex((
|
|
13882
|
-
a: convertHexToDecimal((
|
|
13879
|
+
r: parseIntFromHex((_8 = match[1]) !== null && _8 !== void 0 ? _8 : ''),
|
|
13880
|
+
g: parseIntFromHex((_9 = match[2]) !== null && _9 !== void 0 ? _9 : ''),
|
|
13881
|
+
b: parseIntFromHex((_10 = match[3]) !== null && _10 !== void 0 ? _10 : ''),
|
|
13882
|
+
a: convertHexToDecimal((_11 = match[4]) !== null && _11 !== void 0 ? _11 : ''),
|
|
13883
13883
|
format: namedColor ? 'name' : 'hex',
|
|
13884
13884
|
/* HEX */
|
|
13885
13885
|
};
|
|
13886
13886
|
}
|
|
13887
13887
|
if (match = matchers.hex6.exec(color2)) {
|
|
13888
13888
|
return {
|
|
13889
|
-
r: parseIntFromHex((
|
|
13890
|
-
g: parseIntFromHex((
|
|
13891
|
-
b: parseIntFromHex((
|
|
13889
|
+
r: parseIntFromHex((_12 = match[1]) !== null && _12 !== void 0 ? _12 : ''),
|
|
13890
|
+
g: parseIntFromHex((_13 = match[2]) !== null && _13 !== void 0 ? _13 : ''),
|
|
13891
|
+
b: parseIntFromHex((_14 = match[3]) !== null && _14 !== void 0 ? _14 : ''),
|
|
13892
13892
|
a: 1,
|
|
13893
13893
|
format: namedColor ? 'name' : 'hex',
|
|
13894
13894
|
/* HEX */
|
|
@@ -14421,7 +14421,7 @@ var DefaultInterpolationOptions = {
|
|
|
14421
14421
|
colorModel: 'husl',
|
|
14422
14422
|
/* HUSL */
|
|
14423
14423
|
};
|
|
14424
|
-
var ValueInterpolation = class {
|
|
14424
|
+
var ValueInterpolation = /*#__PURE__*/ class {
|
|
14425
14425
|
/**
|
|
14426
14426
|
* @internal
|
|
14427
14427
|
*/
|
|
@@ -14477,7 +14477,7 @@ var Defaults2 = /* @__PURE__ */ (() => ({
|
|
|
14477
14477
|
delta: 1 / 60,
|
|
14478
14478
|
maxValues: 1e4,
|
|
14479
14479
|
}))();
|
|
14480
|
-
var PrecalculatedAnimator = class {
|
|
14480
|
+
var PrecalculatedAnimator = /*#__PURE__*/ class {
|
|
14481
14481
|
constructor(options) {
|
|
14482
14482
|
__publicField(this, 'animator');
|
|
14483
14483
|
__publicField(this, 'values');
|
|
@@ -14537,7 +14537,7 @@ var PrecalculatedAnimator = class {
|
|
|
14537
14537
|
}
|
|
14538
14538
|
};
|
|
14539
14539
|
var EventEmitter3 = /* @__PURE__ */ (() => require_eventemitter3().EventEmitter)();
|
|
14540
|
-
var EventEmitter = class {
|
|
14540
|
+
var EventEmitter = /*#__PURE__*/ class {
|
|
14541
14541
|
constructor() {
|
|
14542
14542
|
__publicField(this, '_emitter', new EventEmitter3());
|
|
14543
14543
|
}
|
|
@@ -14656,7 +14656,7 @@ var _raf = (f) => {
|
|
|
14656
14656
|
var __raf = /* @__PURE__ */ (() => safeWindow['requestAnimationFrame'] || _raf)();
|
|
14657
14657
|
var raf = (f) => __raf(f);
|
|
14658
14658
|
var LoopTimeStep = /* @__PURE__ */ (() => 1 / 60)();
|
|
14659
|
-
var Loop = class extends EventEmitter {
|
|
14659
|
+
var Loop = /*#__PURE__*/ class extends EventEmitter {
|
|
14660
14660
|
/**
|
|
14661
14661
|
* @internal
|
|
14662
14662
|
*/
|
|
@@ -14873,7 +14873,7 @@ var RenderTarget = {
|
|
|
14873
14873
|
},
|
|
14874
14874
|
};
|
|
14875
14875
|
exports.RenderTarget = RenderTarget;
|
|
14876
|
-
var AnimationDriver = class {
|
|
14876
|
+
var AnimationDriver = /*#__PURE__*/ class {
|
|
14877
14877
|
constructor(animator, updateCallback, finishedCallback) {
|
|
14878
14878
|
this.animator = animator;
|
|
14879
14879
|
this.updateCallback = updateCallback;
|
|
@@ -14900,7 +14900,7 @@ var AnimationDriver = class {
|
|
|
14900
14900
|
return this.animator.isFinished();
|
|
14901
14901
|
}
|
|
14902
14902
|
};
|
|
14903
|
-
var MainLoopAnimationDriver = class extends AnimationDriver {
|
|
14903
|
+
var MainLoopAnimationDriver = /*#__PURE__*/ class extends AnimationDriver {
|
|
14904
14904
|
play() {
|
|
14905
14905
|
if (RenderEnvironment.target !== RenderTarget.preview) {
|
|
14906
14906
|
this.finishedCallback && this.finishedCallback(false);
|
|
@@ -14921,7 +14921,7 @@ var DefaultDeprecatedAnimationOptions = {
|
|
|
14921
14921
|
colorModel: 'husl',
|
|
14922
14922
|
/* HUSL */
|
|
14923
14923
|
};
|
|
14924
|
-
var FramerAnimation = class {
|
|
14924
|
+
var FramerAnimation = /*#__PURE__*/ class {
|
|
14925
14925
|
/**
|
|
14926
14926
|
* @internal
|
|
14927
14927
|
*/
|
|
@@ -15242,7 +15242,7 @@ function assert(condition, ...msg) {
|
|
|
15242
15242
|
e.stack = lines.join('\n');
|
|
15243
15243
|
}
|
|
15244
15244
|
}
|
|
15245
|
-
catch (
|
|
15245
|
+
catch (_j) { }
|
|
15246
15246
|
}
|
|
15247
15247
|
throw e;
|
|
15248
15248
|
}
|
|
@@ -15299,7 +15299,7 @@ function LayoutIdProvider({ children, }) {
|
|
|
15299
15299
|
});
|
|
15300
15300
|
const usedIds = (0, react_4.useRef)(/* @__PURE__ */ new Set()).current;
|
|
15301
15301
|
const getLayoutId = (0, react_5.useCallback)(({ id: id3, name, duplicatedFrom, }) => {
|
|
15302
|
-
var
|
|
15302
|
+
var _j;
|
|
15303
15303
|
if (!id3)
|
|
15304
15304
|
return null;
|
|
15305
15305
|
const cacheKey = name ? 'byName' : 'byId';
|
|
@@ -15362,7 +15362,7 @@ function LayoutIdProvider({ children, }) {
|
|
|
15362
15362
|
}
|
|
15363
15363
|
const rootDuplicatedId = duplicatedFrom == null ? void 0 : duplicatedFrom[0];
|
|
15364
15364
|
const identifier = name || rootDuplicatedId || id3;
|
|
15365
|
-
const value = ((
|
|
15365
|
+
const value = ((_j = cache2.current.count[cacheKey][identifier]) !== null && _j !== void 0 ? _j : -1) + 1;
|
|
15366
15366
|
const { layoutId, value: nextValue, } = nextLayoutId(identifier, value, usedIds);
|
|
15367
15367
|
cache2.current.count[cacheKey][identifier] = nextValue;
|
|
15368
15368
|
screen.current[cacheKey][id3] = layoutId;
|
|
@@ -15440,8 +15440,8 @@ function nextLayoutId(identifier, initialValue, usedIds) {
|
|
|
15440
15440
|
value,
|
|
15441
15441
|
};
|
|
15442
15442
|
}
|
|
15443
|
-
function AutomaticLayoutIds(
|
|
15444
|
-
var { enabled = true } =
|
|
15443
|
+
function AutomaticLayoutIds(_j) {
|
|
15444
|
+
var { enabled = true } = _j, props = __rest(_j, ["enabled"]);
|
|
15445
15445
|
const context = (0, react_3.useContext)(LayoutIdContext);
|
|
15446
15446
|
const contextValue = (0, react_6.useMemo)(() => {
|
|
15447
15447
|
return Object.assign(Object.assign({}, context), { enabled });
|
|
@@ -15548,7 +15548,7 @@ function getColorsFromTheme(theme, type) {
|
|
|
15548
15548
|
screenColor: isDarkTheme ? '#333' : '#eee',
|
|
15549
15549
|
};
|
|
15550
15550
|
}
|
|
15551
|
-
var ErrorBoundary2 = class extends react_9.Component {
|
|
15551
|
+
var ErrorBoundary2 = /*#__PURE__*/ class extends react_9.Component {
|
|
15552
15552
|
constructor() {
|
|
15553
15553
|
super(...arguments);
|
|
15554
15554
|
__publicField(this, 'state', {});
|
|
@@ -15592,8 +15592,8 @@ var ErrorBoundary2 = class extends react_9.Component {
|
|
|
15592
15592
|
return this.props.children;
|
|
15593
15593
|
}
|
|
15594
15594
|
};
|
|
15595
|
-
function Device(
|
|
15596
|
-
var { canResize = false, children, ResizeObserver: ResizeObserver2 = safeWindow.ResizeObserver } =
|
|
15595
|
+
function Device(_j) {
|
|
15596
|
+
var { canResize = false, children, ResizeObserver: ResizeObserver2 = safeWindow.ResizeObserver } = _j, options = __rest(_j, ["canResize", "children", "ResizeObserver"]);
|
|
15597
15597
|
var _a, _b;
|
|
15598
15598
|
const optionsRef = react_12.default.useRef(void 0);
|
|
15599
15599
|
if (optionsRef.current === void 0)
|
|
@@ -15623,8 +15623,8 @@ function Device(_f) {
|
|
|
15623
15623
|
};
|
|
15624
15624
|
}, [scaleDataRef,]);
|
|
15625
15625
|
const updateScale = react_12.default.useCallback(() => {
|
|
15626
|
-
var
|
|
15627
|
-
const { deviceOptions, scaleTo, onScaleChange, } = (
|
|
15626
|
+
var _j;
|
|
15627
|
+
const { deviceOptions, scaleTo, onScaleChange, } = (_j = optionsRef.current) !== null && _j !== void 0 ? _j : {};
|
|
15628
15628
|
if (!deviceOptions || !scaleTo || scaleTo !== 'dynamic' || !containerRef.current)
|
|
15629
15629
|
return;
|
|
15630
15630
|
if (containerRef.current.offsetWidth === 0 || containerRef.current.offsetHeight === 0)
|
|
@@ -15722,7 +15722,7 @@ function getComponentSize(options) {
|
|
|
15722
15722
|
}
|
|
15723
15723
|
exports.getComponentSize = getComponentSize;
|
|
15724
15724
|
function getDeviceStyle({ scaleTo, deviceOptions, overrideTheme, } = {}) {
|
|
15725
|
-
var
|
|
15725
|
+
var _j, _k, _l;
|
|
15726
15726
|
const noDeviceStyle = {
|
|
15727
15727
|
containerStyle: {},
|
|
15728
15728
|
deviceStyle: {},
|
|
@@ -15747,9 +15747,9 @@ function getDeviceStyle({ scaleTo, deviceOptions, overrideTheme, } = {}) {
|
|
|
15747
15747
|
boxShadows.push(`inset 0 0 15px ${overriddenColors.bezelShadeColor || appearance.bezelShadeColor}`);
|
|
15748
15748
|
}
|
|
15749
15749
|
}
|
|
15750
|
-
const handOffsetLeft = (
|
|
15751
|
-
const handOffsetRight = (
|
|
15752
|
-
const handOffsetBottom = (
|
|
15750
|
+
const handOffsetLeft = (_j = (hand == null ? void 0 : hand.offsetLeft)) !== null && _j !== void 0 ? _j : 0;
|
|
15751
|
+
const handOffsetRight = (_k = (hand == null ? void 0 : hand.offsetRight)) !== null && _k !== void 0 ? _k : 0;
|
|
15752
|
+
const handOffsetBottom = (_l = (hand == null ? void 0 : hand.offsetBottom)) !== null && _l !== void 0 ? _l : 0;
|
|
15753
15753
|
const handScale = (deviceWidth - handOffsetLeft - handOffsetRight) / HAND_IMG_GAP_WIDTH;
|
|
15754
15754
|
return {
|
|
15755
15755
|
containerStyle: {
|
|
@@ -16734,11 +16734,11 @@ var ConstraintValues = {
|
|
|
16734
16734
|
},
|
|
16735
16735
|
// Returns a parent-relative rect given concrete ConstraintValues.
|
|
16736
16736
|
toRect: (values, parentSizeInfo = null, autoSize = null, pixelAlign = false, freeSpace = null) => {
|
|
16737
|
-
var
|
|
16737
|
+
var _j;
|
|
16738
16738
|
let x = values.left || 0;
|
|
16739
16739
|
let y = values.top || 0;
|
|
16740
16740
|
const { width, height, } = ConstraintValues.toSize(values, parentSizeInfo, autoSize, freeSpace);
|
|
16741
|
-
const parentSizeForPositioning = (
|
|
16741
|
+
const parentSizeForPositioning = (_j = (parentSizeInfo == null ? void 0 : parentSizeInfo.positioning)) !== null && _j !== void 0 ? _j : null;
|
|
16742
16742
|
const positioningParentWidth = parentSizeForPositioning ? Animatable.getNumber(parentSizeForPositioning.width) : null;
|
|
16743
16743
|
const positioningParentHeight = parentSizeForPositioning ? Animatable.getNumber(parentSizeForPositioning.height) : null;
|
|
16744
16744
|
if (values.left !== null) {
|
|
@@ -17084,6 +17084,9 @@ function useConstraints(props) {
|
|
|
17084
17084
|
const calculatedRect = calculateRect(props, parentSize, true);
|
|
17085
17085
|
return calculatedRect;
|
|
17086
17086
|
}
|
|
17087
|
+
function isAutoSized({ width, height, }) {
|
|
17088
|
+
return width === 'auto' || width === 'min-content' || height === 'auto' || height === 'min-content';
|
|
17089
|
+
}
|
|
17087
17090
|
var ControlType = /* @__PURE__ */ ((ControlType2) => {
|
|
17088
17091
|
ControlType2['Boolean'] = 'boolean';
|
|
17089
17092
|
ControlType2['Number'] = 'number';
|
|
@@ -17112,6 +17115,7 @@ var ControlType = /* @__PURE__ */ ((ControlType2) => {
|
|
|
17112
17115
|
ControlType2['Cursor'] = 'cursor';
|
|
17113
17116
|
ControlType2['Padding'] = 'padding';
|
|
17114
17117
|
ControlType2['BorderRadius'] = 'borderradius';
|
|
17118
|
+
ControlType2['CollectionReference'] = 'collectionreference';
|
|
17115
17119
|
return ControlType2;
|
|
17116
17120
|
})(ControlType || {});
|
|
17117
17121
|
exports.ControlType = ControlType;
|
|
@@ -17681,7 +17685,7 @@ function injectCSSRule(cssRule, sheet, cache2 = defaultCache) {
|
|
|
17681
17685
|
try {
|
|
17682
17686
|
sheet.insertRule(cssRule, sheet.cssRules.length);
|
|
17683
17687
|
}
|
|
17684
|
-
catch (
|
|
17688
|
+
catch (_j) { }
|
|
17685
17689
|
}
|
|
17686
17690
|
var componentCSSRules = [`[data-framer-component-type] { position: absolute; }`,];
|
|
17687
17691
|
var textAlignmentRule = `
|
|
@@ -17978,8 +17982,8 @@ function injectComponentCSSRules() {
|
|
|
17978
17982
|
if (didInject)
|
|
17979
17983
|
return;
|
|
17980
17984
|
didInject = true;
|
|
17981
|
-
const
|
|
17982
|
-
for (const rule of
|
|
17985
|
+
const styles4 = RenderTarget.current() === RenderTarget.preview ? combinedCSSRulesForPreview : exports.combinedCSSRules;
|
|
17986
|
+
for (const rule of styles4) {
|
|
17983
17987
|
injectCSSRule(rule, void 0, void 0);
|
|
17984
17988
|
}
|
|
17985
17989
|
}
|
|
@@ -18026,6 +18030,7 @@ function getControlDefaultValue(control) {
|
|
|
18026
18030
|
try {
|
|
18027
18031
|
switch (control.type) {
|
|
18028
18032
|
case 'string':
|
|
18033
|
+
case 'collectionreference':
|
|
18029
18034
|
case 'color':
|
|
18030
18035
|
case 'date':
|
|
18031
18036
|
case 'link':
|
|
@@ -18074,7 +18079,7 @@ function getControlDefaultValue(control) {
|
|
|
18074
18079
|
return void 0;
|
|
18075
18080
|
}
|
|
18076
18081
|
}
|
|
18077
|
-
catch (
|
|
18082
|
+
catch (_j) {
|
|
18078
18083
|
return void 0;
|
|
18079
18084
|
}
|
|
18080
18085
|
}
|
|
@@ -19247,8 +19252,8 @@ var devicePresetsMap = /* @__PURE__ */ devicePresets.reduce((map, preset) => {
|
|
|
19247
19252
|
return map;
|
|
19248
19253
|
}, {});
|
|
19249
19254
|
function getDevicePreset(presetId) {
|
|
19250
|
-
var
|
|
19251
|
-
return (
|
|
19255
|
+
var _j;
|
|
19256
|
+
return (_j = devicePresetsMap[presetId]) !== null && _j !== void 0 ? _j : devicePresetsMap[defaultPresetId];
|
|
19252
19257
|
}
|
|
19253
19258
|
exports.getDevicePreset = getDevicePreset;
|
|
19254
19259
|
var defaultDeviceProps = {
|
|
@@ -19271,7 +19276,7 @@ var defaultDeviceProps = {
|
|
|
19271
19276
|
};
|
|
19272
19277
|
exports.defaultDeviceProps = defaultDeviceProps;
|
|
19273
19278
|
function convertPropsToDeviceOptions(props, { forceOldClay = false, } = {}) {
|
|
19274
|
-
var
|
|
19279
|
+
var _j, _k, _l, _m, _o, _p;
|
|
19275
19280
|
var _a;
|
|
19276
19281
|
if (props.preset === 'no-device') {
|
|
19277
19282
|
return;
|
|
@@ -19319,10 +19324,10 @@ function convertPropsToDeviceOptions(props, { forceOldClay = false, } = {}) {
|
|
|
19319
19324
|
};
|
|
19320
19325
|
}
|
|
19321
19326
|
else {
|
|
19322
|
-
deviceWidth = preset.screenWidth + ((
|
|
19323
|
-
deviceHeight = preset.screenHeight + ((
|
|
19324
|
-
screenOffsetTop = (
|
|
19325
|
-
screenOffsetLeft = (
|
|
19327
|
+
deviceWidth = preset.screenWidth + ((_j = preset.clayBezelLeft) !== null && _j !== void 0 ? _j : 0) + ((_k = preset.clayBezelRight) !== null && _k !== void 0 ? _k : 0);
|
|
19328
|
+
deviceHeight = preset.screenHeight + ((_l = preset.clayBezelTop) !== null && _l !== void 0 ? _l : 0) + ((_m = preset.clayBezelBottom) !== null && _m !== void 0 ? _m : 0);
|
|
19329
|
+
screenOffsetTop = (_o = preset.clayBezelTop) !== null && _o !== void 0 ? _o : 0;
|
|
19330
|
+
screenOffsetLeft = (_p = preset.clayBezelLeft) !== null && _p !== void 0 ? _p : 0;
|
|
19326
19331
|
if (preset.externalClay && !forceOldClay) {
|
|
19327
19332
|
deviceWidth = preset.externalClay.width;
|
|
19328
19333
|
deviceHeight = preset.externalClay.height;
|
|
@@ -19446,8 +19451,8 @@ function usePrototypingMetaTags() {
|
|
|
19446
19451
|
});
|
|
19447
19452
|
}, []);
|
|
19448
19453
|
}
|
|
19449
|
-
function DeviceCodeComponentInner(
|
|
19450
|
-
var { children } =
|
|
19454
|
+
function DeviceCodeComponentInner(_j) {
|
|
19455
|
+
var { children } = _j, props = __rest(_j, ["children"]);
|
|
19451
19456
|
usePrototypingMetaTags();
|
|
19452
19457
|
const deviceOptions = convertPropsToDeviceOptions(props, {
|
|
19453
19458
|
forceOldClay: true,
|
|
@@ -19781,8 +19786,8 @@ var implementation = {
|
|
|
19781
19786
|
// We need a default implementation for useImageSource and useImageElement as it is used for rendering image backgrounds which would break otherwise.
|
|
19782
19787
|
// The default value is used for HTML export and when using the library without Framer.
|
|
19783
19788
|
useImageSource(image) {
|
|
19784
|
-
var
|
|
19785
|
-
return (
|
|
19789
|
+
var _j;
|
|
19790
|
+
return (_j = image.src) !== null && _j !== void 0 ? _j : '';
|
|
19786
19791
|
},
|
|
19787
19792
|
useImageElement(image, rect, nodeId) {
|
|
19788
19793
|
const element = new Image();
|
|
@@ -19817,10 +19822,10 @@ function _injectRuntime(injectedRuntime) {
|
|
|
19817
19822
|
}
|
|
19818
19823
|
exports._injectRuntime = _injectRuntime;
|
|
19819
19824
|
function minZoomForPixelatedImageRendering(image, containerSize, devicePixelRatio3 = 1) {
|
|
19820
|
-
var
|
|
19825
|
+
var _j, _k, _l, _m;
|
|
19821
19826
|
let { width: frameWidth, height: frameHeight, } = containerSize;
|
|
19822
|
-
const imageWidth = (
|
|
19823
|
-
const imageHeight = (
|
|
19827
|
+
const imageWidth = (_k = (_j = image.pixelWidth) !== null && _j !== void 0 ? _j : image.intrinsicWidth) !== null && _k !== void 0 ? _k : 0;
|
|
19828
|
+
const imageHeight = (_m = (_l = image.pixelHeight) !== null && _l !== void 0 ? _l : image.intrinsicHeight) !== null && _m !== void 0 ? _m : 0;
|
|
19824
19829
|
if (frameWidth < 1 || frameHeight < 1 || imageWidth < 1 || imageHeight < 1) {
|
|
19825
19830
|
return void 0;
|
|
19826
19831
|
}
|
|
@@ -19982,8 +19987,8 @@ function OptimizedCanvasImage({ nodeId, image, containerSize, }) {
|
|
|
19982
19987
|
},
|
|
19983
19988
|
});
|
|
19984
19989
|
}
|
|
19985
|
-
function BackgroundImageComponent(
|
|
19986
|
-
var { layoutId, image } =
|
|
19990
|
+
function BackgroundImageComponent(_j) {
|
|
19991
|
+
var { layoutId, image } = _j, props = __rest(_j, ["layoutId", "image"]);
|
|
19987
19992
|
if (layoutId) {
|
|
19988
19993
|
layoutId = layoutId + '-background';
|
|
19989
19994
|
}
|
|
@@ -20063,26 +20068,26 @@ function backgroundImageFromProps(props) {
|
|
|
20063
20068
|
}
|
|
20064
20069
|
exports.backgroundImageFromProps = backgroundImageFromProps;
|
|
20065
20070
|
function collectBorderStyleForProps(props, style, collapseEqualBorders = true) {
|
|
20066
|
-
const { borderWidth
|
|
20067
|
-
if (!
|
|
20071
|
+
const { borderWidth, borderStyle, borderColor, } = props;
|
|
20072
|
+
if (!borderWidth) {
|
|
20068
20073
|
return;
|
|
20069
20074
|
}
|
|
20070
20075
|
let borderTop;
|
|
20071
20076
|
let borderBottom;
|
|
20072
20077
|
let borderLeft;
|
|
20073
20078
|
let borderRight;
|
|
20074
|
-
if (typeof
|
|
20079
|
+
if (typeof borderWidth === 'number') {
|
|
20075
20080
|
borderTop =
|
|
20076
20081
|
borderBottom =
|
|
20077
20082
|
borderLeft =
|
|
20078
20083
|
borderRight =
|
|
20079
|
-
|
|
20084
|
+
borderWidth;
|
|
20080
20085
|
}
|
|
20081
20086
|
else {
|
|
20082
|
-
borderTop =
|
|
20083
|
-
borderBottom =
|
|
20084
|
-
borderLeft =
|
|
20085
|
-
borderRight =
|
|
20087
|
+
borderTop = borderWidth.top || 0;
|
|
20088
|
+
borderBottom = borderWidth.bottom || 0;
|
|
20089
|
+
borderLeft = borderWidth.left || 0;
|
|
20090
|
+
borderRight = borderWidth.right || 0;
|
|
20086
20091
|
}
|
|
20087
20092
|
if (borderTop === 0 && borderBottom === 0 && borderLeft === 0 && borderRight === 0) {
|
|
20088
20093
|
return;
|
|
@@ -20229,12 +20234,12 @@ function useForceUpdate3() {
|
|
|
20229
20234
|
}
|
|
20230
20235
|
var ResizeObserverPolyfill = /* @__PURE__ */ (() => require_resize_observer_umd().ResizeObserver)();
|
|
20231
20236
|
var DEFAULT_SIZE = 200;
|
|
20232
|
-
var SharedObserver = class {
|
|
20237
|
+
var SharedObserver = /*#__PURE__*/ class {
|
|
20233
20238
|
constructor() {
|
|
20234
|
-
var
|
|
20239
|
+
var _j;
|
|
20235
20240
|
__publicField(this, 'sharedResizeObserver');
|
|
20236
20241
|
__publicField(this, 'callbacks', /* @__PURE__ */ new WeakMap());
|
|
20237
|
-
const ResizeObserver2 = (
|
|
20242
|
+
const ResizeObserver2 = (_j = safeWindow.ResizeObserver) !== null && _j !== void 0 ? _j : ResizeObserverPolyfill;
|
|
20238
20243
|
this.sharedResizeObserver = new ResizeObserver2(this.updateResizedElements.bind(this));
|
|
20239
20244
|
}
|
|
20240
20245
|
updateResizedElements(entries) {
|
|
@@ -20299,20 +20304,20 @@ function useMeasuredSize(ref) {
|
|
|
20299
20304
|
}
|
|
20300
20305
|
var SIZE_COMPATIBILITY_WRAPPER_ATTRIBUTE = 'data-framer-size-compatibility-wrapper';
|
|
20301
20306
|
var withMeasuredSize = (Component15) => (props) => {
|
|
20302
|
-
var
|
|
20307
|
+
var _j, _k, _l, _m;
|
|
20303
20308
|
const ref = react_12.default.useRef(null);
|
|
20304
20309
|
const size = useMeasuredSize(ref);
|
|
20305
20310
|
const dataProps = {
|
|
20306
20311
|
[SIZE_COMPATIBILITY_WRAPPER_ATTRIBUTE]: true,
|
|
20307
20312
|
};
|
|
20308
20313
|
const shouldRender = Boolean(size);
|
|
20309
|
-
const fallbackWidth = (
|
|
20310
|
-
const fallbackHeight = (
|
|
20314
|
+
const fallbackWidth = (_j = props.width) !== null && _j !== void 0 ? _j : DEFAULT_SIZE;
|
|
20315
|
+
const fallbackHeight = (_k = props.height) !== null && _k !== void 0 ? _k : DEFAULT_SIZE;
|
|
20311
20316
|
return /* @__PURE__ */ (0, jsx_runtime_1.jsx)('div', Object.assign(Object.assign({ style: {
|
|
20312
20317
|
width: '100%',
|
|
20313
20318
|
height: '100%',
|
|
20314
20319
|
pointerEvents: 'none',
|
|
20315
|
-
}, ref }, dataProps), { children: shouldRender && /* @__PURE__ */ (0, jsx_runtime_1.jsx)(Component15, Object.assign(Object.assign({}, props), { width: (
|
|
20320
|
+
}, ref }, dataProps), { children: shouldRender && /* @__PURE__ */ (0, jsx_runtime_1.jsx)(Component15, Object.assign(Object.assign({}, props), { width: (_l = (size == null ? void 0 : size.width)) !== null && _l !== void 0 ? _l : fallbackWidth, height: (_m = (size == null ? void 0 : size.height)) !== null && _m !== void 0 ? _m : fallbackHeight })) }));
|
|
20316
20321
|
};
|
|
20317
20322
|
exports.withMeasuredSize = withMeasuredSize;
|
|
20318
20323
|
function getMeasurableCodeComponentChildren(element) {
|
|
@@ -20589,6 +20594,7 @@ function resetSetStyle(element, key7, toValue, microtask2 = true) {
|
|
|
20589
20594
|
}
|
|
20590
20595
|
}
|
|
20591
20596
|
var Layer = /* @__PURE__ */ (() => {
|
|
20597
|
+
/*#__PURE__*/
|
|
20592
20598
|
class Layer2 extends react_9.Component {
|
|
20593
20599
|
constructor() {
|
|
20594
20600
|
super(...arguments);
|
|
@@ -21038,7 +21044,7 @@ var defaultFrameRect = {
|
|
|
21038
21044
|
height: 200,
|
|
21039
21045
|
};
|
|
21040
21046
|
function useStyleAndRect(props) {
|
|
21041
|
-
var
|
|
21047
|
+
var _j, _k, _l;
|
|
21042
21048
|
react_12.default.useInsertionEffect(() => {
|
|
21043
21049
|
injectComponentCSSRules();
|
|
21044
21050
|
}, []);
|
|
@@ -21048,7 +21054,7 @@ function useStyleAndRect(props) {
|
|
|
21048
21054
|
const constraintsRect = useConstraints(unwrappedProps);
|
|
21049
21055
|
const defaultStyle = {
|
|
21050
21056
|
display: 'block',
|
|
21051
|
-
flex: (
|
|
21057
|
+
flex: (_j = (style == null ? void 0 : style.flex)) !== null && _j !== void 0 ? _j : '0 0 auto',
|
|
21052
21058
|
userSelect: RenderTarget.current() !== RenderTarget.preview ? 'none' : void 0,
|
|
21053
21059
|
};
|
|
21054
21060
|
if (!props.__fromCanvasComponent) {
|
|
@@ -21098,8 +21104,8 @@ function useStyleAndRect(props) {
|
|
|
21098
21104
|
}
|
|
21099
21105
|
Object.assign(defaultStyle, centerTextStyle, _initialStyle, propsStyle, constraintsStyle, style);
|
|
21100
21106
|
Object.assign(defaultStyle, {
|
|
21101
|
-
overflowX: (
|
|
21102
|
-
overflowY: (
|
|
21107
|
+
overflowX: (_k = defaultStyle.overflowX) !== null && _k !== void 0 ? _k : defaultStyle.overflow,
|
|
21108
|
+
overflowY: (_l = defaultStyle.overflowY) !== null && _l !== void 0 ? _l : defaultStyle.overflow,
|
|
21103
21109
|
overflow: void 0,
|
|
21104
21110
|
});
|
|
21105
21111
|
Layer.applyWillChange(props, defaultStyle, true);
|
|
@@ -21172,7 +21178,7 @@ function hasDataFramerName(props) {
|
|
|
21172
21178
|
return 'data-framer-name' in props;
|
|
21173
21179
|
}
|
|
21174
21180
|
var VisibleFrame = /* @__PURE__ */ (0, react_3.forwardRef)(function VisibleFrame2(props, forwardedRef) {
|
|
21175
|
-
var
|
|
21181
|
+
var _j, _k;
|
|
21176
21182
|
const { name, center, border, _border, __portal, } = props;
|
|
21177
21183
|
const { props: propsWithOverrides, children, } = processOverrideForwarding(props);
|
|
21178
21184
|
const motionProps = getMotionProps(propsWithOverrides);
|
|
@@ -21181,7 +21187,7 @@ var VisibleFrame = /* @__PURE__ */ (0, react_3.forwardRef)(function VisibleFrame
|
|
|
21181
21187
|
const fallbackRef = (0, react_4.useRef)(null);
|
|
21182
21188
|
const ref = forwardedRef !== null && forwardedRef !== void 0 ? forwardedRef : fallbackRef;
|
|
21183
21189
|
const dataProps = {
|
|
21184
|
-
'data-framer-component-type': (
|
|
21190
|
+
'data-framer-component-type': (_j = props.componentType) !== null && _j !== void 0 ? _j : 'Frame',
|
|
21185
21191
|
'data-framer-cursor': cursor,
|
|
21186
21192
|
'data-framer-highlight': cursor === 'pointer' ? true : void 0,
|
|
21187
21193
|
'data-layoutid': layoutId,
|
|
@@ -21210,7 +21216,7 @@ var VisibleFrame = /* @__PURE__ */ (0, react_3.forwardRef)(function VisibleFrame
|
|
|
21210
21216
|
children: [
|
|
21211
21217
|
backgroundImage
|
|
21212
21218
|
? /* @__PURE__ */ (0, jsx_runtime_1.jsx)(BackgroundImageComponent, {
|
|
21213
|
-
alt: (
|
|
21219
|
+
alt: (_k = props.alt) !== null && _k !== void 0 ? _k : '',
|
|
21214
21220
|
image: backgroundImage,
|
|
21215
21221
|
containerSize: rect !== null && rect !== void 0 ? rect : void 0,
|
|
21216
21222
|
nodeId: props.id && nodeIdFromString(props.id),
|
|
@@ -21277,9 +21283,6 @@ function resolveParentSize(props, unwrappedProps, rect, inCodeComponent) {
|
|
|
21277
21283
|
}
|
|
21278
21284
|
return 0;
|
|
21279
21285
|
}
|
|
21280
|
-
function isAutoSized({ width, height, }) {
|
|
21281
|
-
return width === 'auto' || width === 'min-content' || height === 'auto' || height === 'min-content';
|
|
21282
|
-
}
|
|
21283
21286
|
function EmptyState({ title = '', description = 'Click and drag the connector to any frame on the canvas \u2192', children, size, hide, insideUserCodeComponent = false, position = 'absolute', }) {
|
|
21284
21287
|
const { target, } = RenderEnvironment;
|
|
21285
21288
|
const childCount = react_12.default.Children.count(children);
|
|
@@ -21365,7 +21368,7 @@ var SharedLayoutContext = /* @__PURE__ */ react_12.default.createContext({
|
|
|
21365
21368
|
scheduleProjectionDidUpdate: () => { },
|
|
21366
21369
|
initLead: () => { },
|
|
21367
21370
|
});
|
|
21368
|
-
var SharedLayoutRoot = class extends react_9.Component {
|
|
21371
|
+
var SharedLayoutRoot = /*#__PURE__*/ class extends react_9.Component {
|
|
21369
21372
|
constructor() {
|
|
21370
21373
|
super(...arguments);
|
|
21371
21374
|
__publicField(this, 'shouldAnimate', false);
|
|
@@ -21451,7 +21454,7 @@ function MagicMotionCrossfadeRoot(props) {
|
|
|
21451
21454
|
children: props.children,
|
|
21452
21455
|
});
|
|
21453
21456
|
}
|
|
21454
|
-
var SharedIntersectionObserver = class {
|
|
21457
|
+
var SharedIntersectionObserver = /*#__PURE__*/ class {
|
|
21455
21458
|
constructor(options) {
|
|
21456
21459
|
__publicField(this, 'sharedIntersectionObserver');
|
|
21457
21460
|
__publicField(this, 'callbacks', /* @__PURE__ */ new WeakMap());
|
|
@@ -21514,11 +21517,11 @@ function useAppearEffect(ref, appearCallback, options) {
|
|
|
21514
21517
|
});
|
|
21515
21518
|
const { enabled, animateOnce, threshold, rootMargin = `0px 0px 0px 0px`, } = options;
|
|
21516
21519
|
const callback = react_12.default.useCallback(([entry,]) => {
|
|
21517
|
-
var
|
|
21520
|
+
var _j;
|
|
21518
21521
|
if (!entry)
|
|
21519
21522
|
return;
|
|
21520
21523
|
const { isInView, hasAnimatedOnce, } = internalState.current;
|
|
21521
|
-
const isIntersecting = isIntersectingWithThreshold(entry, (
|
|
21524
|
+
const isIntersecting = isIntersectingWithThreshold(entry, (_j = (threshold == null ? void 0 : threshold.y)) !== null && _j !== void 0 ? _j : 0);
|
|
21522
21525
|
if (isIntersecting && !isInView) {
|
|
21523
21526
|
if (animateOnce && hasAnimatedOnce)
|
|
21524
21527
|
return;
|
|
@@ -21587,7 +21590,7 @@ function pointForEvent(event, customTarget = null) {
|
|
|
21587
21590
|
};
|
|
21588
21591
|
return point2;
|
|
21589
21592
|
}
|
|
21590
|
-
var FramerEvent = class {
|
|
21593
|
+
var FramerEvent = /*#__PURE__*/ class {
|
|
21591
21594
|
/**
|
|
21592
21595
|
* @internal
|
|
21593
21596
|
*/
|
|
@@ -21697,7 +21700,7 @@ var DraggingContext = /* @__PURE__ */ react_12.default.createContext({
|
|
|
21697
21700
|
dragging: false,
|
|
21698
21701
|
});
|
|
21699
21702
|
function WithDragging(Component15) {
|
|
21700
|
-
const _WithDraggingHOC = class extends react_12.default.Component {
|
|
21703
|
+
const _WithDraggingHOC = /*#__PURE__*/ class extends react_12.default.Component {
|
|
21701
21704
|
constructor(props, defaultProps) {
|
|
21702
21705
|
super(props, defaultProps);
|
|
21703
21706
|
__publicField(this, 'state', {
|
|
@@ -22240,7 +22243,7 @@ function WithDragging(Component15) {
|
|
|
22240
22243
|
};
|
|
22241
22244
|
}
|
|
22242
22245
|
render() {
|
|
22243
|
-
const
|
|
22246
|
+
const _j = this.props, { onPanStart, onPan, onPanEnd, onMouseWheelStart, onMouseWheel, onMouseWheelEnd } = _j, attributes = __rest(_j, ["onPanStart", "onPan", "onPanEnd", "onMouseWheelStart", "onMouseWheel", "onMouseWheelEnd"]);
|
|
22244
22247
|
const originalProps = Object.assign({}, attributes);
|
|
22245
22248
|
Object.keys(_WithDraggingHOC.draggingDefaultProps).forEach((key7) => {
|
|
22246
22249
|
delete asRecord(originalProps)[key7];
|
|
@@ -22447,7 +22450,7 @@ var ObservableObject = /* @__PURE__ */ (() => {
|
|
|
22447
22450
|
return ObservableObject2;
|
|
22448
22451
|
})();
|
|
22449
22452
|
exports.ObservableObject = ObservableObject;
|
|
22450
|
-
var ObservableObjectProxyHandler = class {
|
|
22453
|
+
var ObservableObjectProxyHandler = /*#__PURE__*/ class {
|
|
22451
22454
|
constructor() {
|
|
22452
22455
|
__publicField(this, 'set', (target, key7, value, receiver) => {
|
|
22453
22456
|
if (key7 === $private) {
|
|
@@ -23104,7 +23107,7 @@ function applyLayoutProp(style, props, key7) {
|
|
|
23104
23107
|
}
|
|
23105
23108
|
}
|
|
23106
23109
|
var DeprecatedFrame = /* @__PURE__ */ (() => {
|
|
23107
|
-
const _DeprecatedFrameInner = class extends Layer {
|
|
23110
|
+
const _DeprecatedFrameInner = /*#__PURE__*/ class extends Layer {
|
|
23108
23111
|
constructor() {
|
|
23109
23112
|
super(...arguments);
|
|
23110
23113
|
__publicField(this, 'element', null);
|
|
@@ -23465,7 +23468,7 @@ var Frame = /* @__PURE__ */ (() => {
|
|
|
23465
23468
|
return FrameInner;
|
|
23466
23469
|
})();
|
|
23467
23470
|
exports.Frame = Frame;
|
|
23468
|
-
var LayoutTree = class extends react_9.Component {
|
|
23471
|
+
var LayoutTree = /*#__PURE__*/ class extends react_9.Component {
|
|
23469
23472
|
constructor() {
|
|
23470
23473
|
super(...arguments);
|
|
23471
23474
|
__publicField(this, 'layoutMaybeMutated');
|
|
@@ -23832,7 +23835,7 @@ var allAnimatableProperties = {
|
|
|
23832
23835
|
originZ: 0,
|
|
23833
23836
|
opacity: 1,
|
|
23834
23837
|
};
|
|
23835
|
-
var NavigatorMock = class {
|
|
23838
|
+
var NavigatorMock = /*#__PURE__*/ class {
|
|
23836
23839
|
constructor() {
|
|
23837
23840
|
__publicField(this, 'warning', () => {
|
|
23838
23841
|
warnOnce2('The Navigator API is only available inside of Framer: https://www.framer.com/');
|
|
@@ -24743,13 +24746,13 @@ function containerIsVisible(containerIndex, stackState) {
|
|
|
24743
24746
|
}
|
|
24744
24747
|
function containerContent(item) {
|
|
24745
24748
|
const content = react_12.default.Children.map(item.component, (child) => {
|
|
24746
|
-
var
|
|
24749
|
+
var _j;
|
|
24747
24750
|
var _a;
|
|
24748
24751
|
if (!isReactChild(child) || !isReactElement(child) || !child.props) {
|
|
24749
24752
|
return child;
|
|
24750
24753
|
}
|
|
24751
24754
|
const props = {
|
|
24752
|
-
style: (
|
|
24755
|
+
style: (_j = child.props.style) !== null && _j !== void 0 ? _j : {},
|
|
24753
24756
|
};
|
|
24754
24757
|
const position = (_a = item == null ? void 0 : item.transition) == null ? void 0 : _a.position;
|
|
24755
24758
|
const shouldStretchWidth = !position || position.left !== void 0 && position.right !== void 0;
|
|
@@ -24805,7 +24808,7 @@ var NavigationTransitionType = /* @__PURE__ */ ((NavigationTransitionType2) => {
|
|
|
24805
24808
|
})(NavigationTransitionType || {});
|
|
24806
24809
|
exports.NavigationTransitionType = NavigationTransitionType;
|
|
24807
24810
|
function WithNavigator(BaseComponent, navigationTransition, navigationTransitionDirection, NavigationTarget, navigationTransitionOptions) {
|
|
24808
|
-
const InternalWithNavigator = class extends react_12.default.Component {
|
|
24811
|
+
const InternalWithNavigator = /*#__PURE__*/ class extends react_12.default.Component {
|
|
24809
24812
|
render() {
|
|
24810
24813
|
return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(NavigationContext.Consumer, {
|
|
24811
24814
|
children: (navigation) => {
|
|
@@ -24846,7 +24849,7 @@ function WithNavigator(BaseComponent, navigationTransition, navigationTransition
|
|
|
24846
24849
|
break;
|
|
24847
24850
|
}
|
|
24848
24851
|
};
|
|
24849
|
-
const
|
|
24852
|
+
const _j = this.props, { onTap } = _j, props = __rest(_j, ["onTap"]);
|
|
24850
24853
|
if (onTap) {
|
|
24851
24854
|
props.onTap = (...args) => {
|
|
24852
24855
|
onTap.apply(this, args);
|
|
@@ -24902,8 +24905,8 @@ function useInfiniteScroll({ ref: elementRef, loadMore, rootMargin = '0px', thre
|
|
|
24902
24905
|
}, [elementRef, callback, rootMargin, threshold, paginationInfo.currentPage,]);
|
|
24903
24906
|
}
|
|
24904
24907
|
function withInfiniteScroll(Component15) {
|
|
24905
|
-
return react_12.default.forwardRef((
|
|
24906
|
-
var { __paginationInfo, __loadMore } =
|
|
24908
|
+
return react_12.default.forwardRef((_j, ref) => {
|
|
24909
|
+
var { __paginationInfo, __loadMore } = _j, props = __rest(_j, ["__paginationInfo", "__loadMore"]);
|
|
24907
24910
|
const backupRef = react_12.default.useRef(null);
|
|
24908
24911
|
const infiniteScrollRef = ref !== null && ref !== void 0 ? ref : backupRef;
|
|
24909
24912
|
useInfiniteScroll({
|
|
@@ -25073,7 +25076,7 @@ function useSafariGapFix(gap, ref, display) {
|
|
|
25073
25076
|
}
|
|
25074
25077
|
var Stack = /* @__PURE__ */ (() => {
|
|
25075
25078
|
const StackInner = react_12.default.forwardRef(function StackInner2(stackProps, forwardedRef) {
|
|
25076
|
-
var
|
|
25079
|
+
var _j, _k;
|
|
25077
25080
|
const { as = 'div', direction = 'vertical', distribution = 'start', alignment = 'center', gap = 10, wrap: wrap2 = false, useFlexboxGap: externalUseFlexboxGap = true, children, style: styleProp, className: className2, willChangeTransform, __fromCodeComponentNode, parentSize, __contentWrapperStyle } = stackProps, containerProps = __rest(stackProps, ["as", "direction", "distribution", "alignment", "gap", "wrap", "useFlexboxGap", "children", "style", "className", "willChangeTransform", "__fromCodeComponentNode", "parentSize", "__contentWrapperStyle"]);
|
|
25078
25081
|
const useFlexboxGap = Boolean(externalUseFlexboxGap || wrap2);
|
|
25079
25082
|
const stackRef = react_12.default.useRef(null);
|
|
@@ -25097,8 +25100,8 @@ var Stack = /* @__PURE__ */ (() => {
|
|
|
25097
25100
|
}
|
|
25098
25101
|
const layoutId = useLayoutId2(stackProps);
|
|
25099
25102
|
const { children: _children, props, } = processOverrideForwarding(containerProps, children);
|
|
25100
|
-
const widthType = (
|
|
25101
|
-
const heightType = (
|
|
25103
|
+
const widthType = (_j = containerProps.widthType) !== null && _j !== void 0 ? _j : (containerProps.width === 'auto' ? 2 : 0);
|
|
25104
|
+
const heightType = (_k = containerProps.heightType) !== null && _k !== void 0 ? _k : (containerProps.height === 'auto' ? 2 : 0);
|
|
25102
25105
|
const fractionChildren = handleFraction(_children, direction, widthType, heightType);
|
|
25103
25106
|
const gapChildren = wrapInGapElementForLegacyGap(fractionChildren, gap, flexDirection, justifyContent, useFlexboxGap, wrap2);
|
|
25104
25107
|
const content = useProvideParentSize(gapChildren, parentSize !== null && parentSize !== void 0 ? parentSize : 1);
|
|
@@ -25528,14 +25531,14 @@ var Page = /* @__PURE__ */ react_12.default.forwardRef(function Page2(props, for
|
|
|
25528
25531
|
if (hasMountedRef.current)
|
|
25529
25532
|
return;
|
|
25530
25533
|
requestAnimationFrame(() => {
|
|
25531
|
-
var
|
|
25534
|
+
var _j;
|
|
25532
25535
|
currentContentPageRef.current = currentPage;
|
|
25533
25536
|
const contentOffset = contentOffsetRef.current;
|
|
25534
25537
|
contentOffset.x.on('change', applyEffects);
|
|
25535
25538
|
contentOffset.y.on('change', applyEffects);
|
|
25536
25539
|
applyEffects();
|
|
25537
25540
|
hasMountedRef.current = true;
|
|
25538
|
-
const containerSize = (
|
|
25541
|
+
const containerSize = (_j = measureContainerSize()) !== null && _j !== void 0 ? _j : containerSizeRef.current;
|
|
25539
25542
|
updateMaxOffsetFromPageContents(containerSize);
|
|
25540
25543
|
updateAndSnapToPage(currentContentPageRef.current, true);
|
|
25541
25544
|
});
|
|
@@ -25639,7 +25642,7 @@ var Page = /* @__PURE__ */ react_12.default.forwardRef(function Page2(props, for
|
|
|
25639
25642
|
});
|
|
25640
25643
|
pageEffectValuesRef.current = [];
|
|
25641
25644
|
const childComponents = react_12.default.Children.map(children, (child, index) => {
|
|
25642
|
-
var
|
|
25645
|
+
var _j;
|
|
25643
25646
|
if (!isReactChild(child) || !isReactElement(child)) {
|
|
25644
25647
|
return child;
|
|
25645
25648
|
}
|
|
@@ -25653,7 +25656,7 @@ var Page = /* @__PURE__ */ react_12.default.forwardRef(function Page2(props, for
|
|
|
25653
25656
|
},
|
|
25654
25657
|
};
|
|
25655
25658
|
if (containerProps.__fromCanvasComponent) {
|
|
25656
|
-
update.style = (
|
|
25659
|
+
update.style = (_j = child.props.style) !== null && _j !== void 0 ? _j : {};
|
|
25657
25660
|
if (contentWidth === 'stretch')
|
|
25658
25661
|
update.style.width = '100%';
|
|
25659
25662
|
if (contentHeight === 'stretch')
|
|
@@ -26169,7 +26172,7 @@ function stateName(state) {
|
|
|
26169
26172
|
function containsBitmask(value, bitmask) {
|
|
26170
26173
|
return (value & bitmask) !== 0;
|
|
26171
26174
|
}
|
|
26172
|
-
var GestureRecognizer = class {
|
|
26175
|
+
var GestureRecognizer = /*#__PURE__*/ class {
|
|
26173
26176
|
constructor() {
|
|
26174
26177
|
__publicField(this, '_state', 2);
|
|
26175
26178
|
__publicField(this, 'handler');
|
|
@@ -26236,7 +26239,7 @@ var GestureRecognizer = class {
|
|
|
26236
26239
|
}
|
|
26237
26240
|
}
|
|
26238
26241
|
};
|
|
26239
|
-
var MouseWheelGestureRecognizer = class extends GestureRecognizer {
|
|
26242
|
+
var MouseWheelGestureRecognizer = /*#__PURE__*/ class extends GestureRecognizer {
|
|
26240
26243
|
constructor() {
|
|
26241
26244
|
super(...arguments);
|
|
26242
26245
|
__publicField(this, 'startEvent');
|
|
@@ -26269,7 +26272,7 @@ var MouseWheelGestureRecognizer = class extends GestureRecognizer {
|
|
|
26269
26272
|
this.onMouseWheelEnd(event);
|
|
26270
26273
|
}
|
|
26271
26274
|
};
|
|
26272
|
-
var PanGestureRecognizer = class extends GestureRecognizer {
|
|
26275
|
+
var PanGestureRecognizer = /*#__PURE__*/ class extends GestureRecognizer {
|
|
26273
26276
|
constructor() {
|
|
26274
26277
|
super(...arguments);
|
|
26275
26278
|
__publicField(this, 'startEvent');
|
|
@@ -26333,7 +26336,7 @@ var PanGestureRecognizer = class extends GestureRecognizer {
|
|
|
26333
26336
|
}
|
|
26334
26337
|
}
|
|
26335
26338
|
};
|
|
26336
|
-
var TapGestureRecognizer = class extends GestureRecognizer {
|
|
26339
|
+
var TapGestureRecognizer = /*#__PURE__*/ class extends GestureRecognizer {
|
|
26337
26340
|
constructor() {
|
|
26338
26341
|
super(...arguments);
|
|
26339
26342
|
__publicField(this, 'eventType', 'tap');
|
|
@@ -26362,7 +26365,7 @@ var TapGestureRecognizer = class extends GestureRecognizer {
|
|
|
26362
26365
|
}
|
|
26363
26366
|
}
|
|
26364
26367
|
};
|
|
26365
|
-
var FramerEventSession = class {
|
|
26368
|
+
var FramerEventSession = /*#__PURE__*/ class {
|
|
26366
26369
|
constructor(dispatcher, customOrigin) {
|
|
26367
26370
|
__publicField(this, 'events', []);
|
|
26368
26371
|
__publicField(this, 'recognizers', []);
|
|
@@ -26459,7 +26462,7 @@ var FramerEventSession = class {
|
|
|
26459
26462
|
* @param n - number of events to use for calculation
|
|
26460
26463
|
*/
|
|
26461
26464
|
velocity(t = Loop.TimeStep * 2) {
|
|
26462
|
-
var
|
|
26465
|
+
var _j;
|
|
26463
26466
|
if (!this.isStarted || this.events.length < 2) {
|
|
26464
26467
|
return {
|
|
26465
26468
|
x: 0,
|
|
@@ -26470,7 +26473,7 @@ var FramerEventSession = class {
|
|
|
26470
26473
|
let i = events.length - 1;
|
|
26471
26474
|
let event = null;
|
|
26472
26475
|
while (i >= 0) {
|
|
26473
|
-
event = (
|
|
26476
|
+
event = (_j = events[i]) !== null && _j !== void 0 ? _j : null;
|
|
26474
26477
|
if (!event || MainLoop.time - event.loopTime > t) {
|
|
26475
26478
|
break;
|
|
26476
26479
|
}
|
|
@@ -26525,7 +26528,7 @@ var FramerEventSession = class {
|
|
|
26525
26528
|
}
|
|
26526
26529
|
};
|
|
26527
26530
|
exports.FramerEventSession = FramerEventSession;
|
|
26528
|
-
var MouseEventListener = class extends react_9.Component {
|
|
26531
|
+
var MouseEventListener = /*#__PURE__*/ class extends react_9.Component {
|
|
26529
26532
|
constructor() {
|
|
26530
26533
|
super(...arguments);
|
|
26531
26534
|
__publicField(this, 'domMouseDown', (originalEvent) => {
|
|
@@ -26577,7 +26580,7 @@ var MouseEventListener = class extends react_9.Component {
|
|
|
26577
26580
|
safeWindow.removeEventListener('wheel', this.domMouseWheel);
|
|
26578
26581
|
}
|
|
26579
26582
|
};
|
|
26580
|
-
var TouchEventListener = class extends react_9.Component {
|
|
26583
|
+
var TouchEventListener = /*#__PURE__*/ class extends react_9.Component {
|
|
26581
26584
|
constructor() {
|
|
26582
26585
|
super(...arguments);
|
|
26583
26586
|
__publicField(this, 'domTouchStart', (originalEvent) => {
|
|
@@ -27559,7 +27562,7 @@ function useObserveData() {
|
|
|
27559
27562
|
return !isNaN(context.update);
|
|
27560
27563
|
}
|
|
27561
27564
|
exports.useObserveData = useObserveData;
|
|
27562
|
-
var DataObserver = class extends react_9.Component {
|
|
27565
|
+
var DataObserver = /*#__PURE__*/ class extends react_9.Component {
|
|
27563
27566
|
constructor() {
|
|
27564
27567
|
super(...arguments);
|
|
27565
27568
|
__publicField(this, 'observers', []);
|
|
@@ -27673,19 +27676,19 @@ var effectValuesKeys = [
|
|
|
27673
27676
|
'transformPerspective',
|
|
27674
27677
|
];
|
|
27675
27678
|
var makeFXValues = (defaults) => {
|
|
27676
|
-
var
|
|
27679
|
+
var _j, _k, _l, _m, _o, _p, _q, _t, _u, _w;
|
|
27677
27680
|
return {
|
|
27678
|
-
x: motionValue((
|
|
27679
|
-
y: motionValue((
|
|
27680
|
-
opacity: motionValue((
|
|
27681
|
-
scale: motionValue((
|
|
27682
|
-
rotate: motionValue((
|
|
27683
|
-
rotateX: motionValue((
|
|
27684
|
-
rotateY: motionValue((
|
|
27685
|
-
skewX: motionValue((
|
|
27686
|
-
skewY: motionValue((
|
|
27681
|
+
x: motionValue((_j = (defaults == null ? void 0 : defaults.x)) !== null && _j !== void 0 ? _j : 0),
|
|
27682
|
+
y: motionValue((_k = (defaults == null ? void 0 : defaults.y)) !== null && _k !== void 0 ? _k : 0),
|
|
27683
|
+
opacity: motionValue((_l = (defaults == null ? void 0 : defaults.opacity)) !== null && _l !== void 0 ? _l : 1),
|
|
27684
|
+
scale: motionValue((_m = (defaults == null ? void 0 : defaults.scale)) !== null && _m !== void 0 ? _m : 1),
|
|
27685
|
+
rotate: motionValue((_o = (defaults == null ? void 0 : defaults.rotate)) !== null && _o !== void 0 ? _o : 0),
|
|
27686
|
+
rotateX: motionValue((_p = (defaults == null ? void 0 : defaults.rotateX)) !== null && _p !== void 0 ? _p : 0),
|
|
27687
|
+
rotateY: motionValue((_q = (defaults == null ? void 0 : defaults.rotateY)) !== null && _q !== void 0 ? _q : 0),
|
|
27688
|
+
skewX: motionValue((_t = (defaults == null ? void 0 : defaults.skewX)) !== null && _t !== void 0 ? _t : 0),
|
|
27689
|
+
skewY: motionValue((_u = (defaults == null ? void 0 : defaults.skewY)) !== null && _u !== void 0 ? _u : 0),
|
|
27687
27690
|
/** @deprecated */
|
|
27688
|
-
transformPerspective: motionValue((
|
|
27691
|
+
transformPerspective: motionValue((_w = (defaults == null ? void 0 : defaults.transformPerspective)) !== null && _w !== void 0 ? _w : 0),
|
|
27689
27692
|
};
|
|
27690
27693
|
};
|
|
27691
27694
|
var defaultFXValues = {
|
|
@@ -27752,14 +27755,14 @@ function useLoop({ loopEffectEnabled, loopRepeatDelay, loopTransition, loopRepea
|
|
|
27752
27755
|
const from = mirror ? loop : defaultFXValues;
|
|
27753
27756
|
mirrorStateRef.current = !mirrorStateRef.current;
|
|
27754
27757
|
return Promise.all(effectValuesKeys.map((key7) => {
|
|
27755
|
-
var
|
|
27758
|
+
var _j;
|
|
27756
27759
|
if (shouldReduceMotion && key7 !== 'opacity')
|
|
27757
27760
|
return;
|
|
27758
|
-
effect.values[key7].set((
|
|
27761
|
+
effect.values[key7].set((_j = from[key7]) !== null && _j !== void 0 ? _j : defaultFXValues[key7]);
|
|
27759
27762
|
return new Promise((resolve) => {
|
|
27760
|
-
var
|
|
27763
|
+
var _j;
|
|
27761
27764
|
const opts = Object.assign(Object.assign({}, transition), { onComplete: () => resolve() });
|
|
27762
|
-
animate(effect.values[key7], (
|
|
27765
|
+
animate(effect.values[key7], (_j = to[key7]) !== null && _j !== void 0 ? _j : from[key7], opts);
|
|
27763
27766
|
});
|
|
27764
27767
|
}));
|
|
27765
27768
|
});
|
|
@@ -27810,9 +27813,9 @@ function useParallax(options, ref, visibilityStyle) {
|
|
|
27810
27813
|
}, [originalPosition, speed, offset, adjustPosition,]);
|
|
27811
27814
|
react_12.default.useLayoutEffect(() => {
|
|
27812
27815
|
frame.read(() => {
|
|
27813
|
-
var
|
|
27816
|
+
var _j;
|
|
27814
27817
|
var _a, _b;
|
|
27815
|
-
originalPosition.current = (
|
|
27818
|
+
originalPosition.current = (_j = ((_b = (_a = ref.current) == null ? void 0 : _a.getBoundingClientRect()) == null ? void 0 : _b.top)) !== null && _j !== void 0 ? _j : 0;
|
|
27816
27819
|
});
|
|
27817
27820
|
frame.update(() => {
|
|
27818
27821
|
parallaxY.set(transform2(scrollY.get()));
|
|
@@ -27846,12 +27849,12 @@ function runEffectAnimation(target, effect, shouldReduceMotion, ref, appearId, i
|
|
|
27846
27849
|
const transition = getTransition(target);
|
|
27847
27850
|
return Promise.all(effectValuesKeys.map((key7) => {
|
|
27848
27851
|
return new Promise((resolve) => {
|
|
27849
|
-
var
|
|
27852
|
+
var _j;
|
|
27850
27853
|
if (shouldReduceMotion && key7 !== 'opacity')
|
|
27851
27854
|
return resolve();
|
|
27852
27855
|
const motionValue2 = effect.values[key7];
|
|
27853
27856
|
motionValue2.stop();
|
|
27854
|
-
let value = !isObject2(target) ? defaultFXValues[key7] : (
|
|
27857
|
+
let value = !isObject2(target) ? defaultFXValues[key7] : (_j = (target == null ? void 0 : target[key7])) !== null && _j !== void 0 ? _j : defaultFXValues[key7];
|
|
27855
27858
|
if (isMotionValue(value))
|
|
27856
27859
|
value = value.get();
|
|
27857
27860
|
if (!isNumber2(value))
|
|
@@ -27884,7 +27887,6 @@ function usePresenceAnimation({ initial: motionInitial, animate: motionAnimate,
|
|
|
27884
27887
|
const [isPresent2, safeToRemove,] = usePresence();
|
|
27885
27888
|
const lastPresence = (0, react_4.useRef)(false);
|
|
27886
27889
|
const effect = useConstant2(() => {
|
|
27887
|
-
var _a;
|
|
27888
27890
|
const base = initial !== null && initial !== void 0 ? initial : style;
|
|
27889
27891
|
if (!isObject2(base)) {
|
|
27890
27892
|
return {
|
|
@@ -27893,7 +27895,7 @@ function usePresenceAnimation({ initial: motionInitial, animate: motionAnimate,
|
|
|
27893
27895
|
}
|
|
27894
27896
|
const defaults = {};
|
|
27895
27897
|
for (const key7 in base) {
|
|
27896
|
-
const value = isObject2(base) ?
|
|
27898
|
+
const value = isObject2(base) ? base[key7] : void 0;
|
|
27897
27899
|
if (!isNumber2(value))
|
|
27898
27900
|
continue;
|
|
27899
27901
|
defaults[key7] = value;
|
|
@@ -27961,17 +27963,17 @@ function calcOffsetTop(element, container) {
|
|
|
27961
27963
|
}
|
|
27962
27964
|
var scrollObserverOffset = 1;
|
|
27963
27965
|
function createTransformInputRange(transformTargets, threshold = 0, callback) {
|
|
27964
|
-
var
|
|
27966
|
+
var _j, _k;
|
|
27965
27967
|
var _a;
|
|
27966
27968
|
const starts = [];
|
|
27967
27969
|
const inputRange = [];
|
|
27968
27970
|
for (let index = transformTargets.length; index >= 0; index--) {
|
|
27969
|
-
const { ref: targetRef, offset, } = (
|
|
27971
|
+
const { ref: targetRef, offset, } = (_j = transformTargets[index]) !== null && _j !== void 0 ? _j : {};
|
|
27970
27972
|
if (!targetRef || !targetRef.current)
|
|
27971
27973
|
continue;
|
|
27972
27974
|
const offsetTop = calcOffsetTop(targetRef.current, document.documentElement);
|
|
27973
27975
|
const top = offsetTop - scrollObserverOffset - (offset !== null && offset !== void 0 ? offset : 0) - threshold;
|
|
27974
|
-
const height = (
|
|
27976
|
+
const height = (_k = ((_a = targetRef.current) == null ? void 0 : _a.clientHeight)) !== null && _k !== void 0 ? _k : 0;
|
|
27975
27977
|
const previousTop = starts[starts.length - 1];
|
|
27976
27978
|
const end = Math.max(top + height, 0);
|
|
27977
27979
|
starts.push(top);
|
|
@@ -28071,27 +28073,27 @@ function createInputOutputRange(targets, threshold, hasExit) {
|
|
|
28071
28073
|
};
|
|
28072
28074
|
}
|
|
28073
28075
|
function makeStyle(defaults) {
|
|
28074
|
-
var
|
|
28076
|
+
var _j, _k, _l, _m, _o, _p, _q, _t, _u, _w, _x;
|
|
28075
28077
|
return {
|
|
28076
|
-
x: (
|
|
28077
|
-
y: (
|
|
28078
|
-
scale: (
|
|
28079
|
-
opacity: (
|
|
28080
|
-
transformPerspective: (
|
|
28081
|
-
rotate: (
|
|
28082
|
-
rotateX: (
|
|
28083
|
-
rotateY: (
|
|
28084
|
-
skewX: (
|
|
28085
|
-
skewY: (
|
|
28086
|
-
transition: (
|
|
28087
|
-
};
|
|
28088
|
-
}
|
|
28089
|
-
function useAnimationVariants(
|
|
28090
|
-
var { opacity, targetOpacity, perspective: transformPerspective, enter, exit, animate: animateVariant2 } =
|
|
28078
|
+
x: (_j = (defaults == null ? void 0 : defaults.x)) !== null && _j !== void 0 ? _j : defaultFXValues.x,
|
|
28079
|
+
y: (_k = (defaults == null ? void 0 : defaults.y)) !== null && _k !== void 0 ? _k : defaultFXValues.y,
|
|
28080
|
+
scale: (_l = (defaults == null ? void 0 : defaults.scale)) !== null && _l !== void 0 ? _l : defaultFXValues.scale,
|
|
28081
|
+
opacity: (_m = (defaults == null ? void 0 : defaults.opacity)) !== null && _m !== void 0 ? _m : defaultFXValues.opacity,
|
|
28082
|
+
transformPerspective: (_o = (defaults == null ? void 0 : defaults.transformPerspective)) !== null && _o !== void 0 ? _o : defaultFXValues.transformPerspective,
|
|
28083
|
+
rotate: (_p = (defaults == null ? void 0 : defaults.rotate)) !== null && _p !== void 0 ? _p : defaultFXValues.rotate,
|
|
28084
|
+
rotateX: (_q = (defaults == null ? void 0 : defaults.rotateX)) !== null && _q !== void 0 ? _q : defaultFXValues.rotateX,
|
|
28085
|
+
rotateY: (_t = (defaults == null ? void 0 : defaults.rotateY)) !== null && _t !== void 0 ? _t : defaultFXValues.rotateY,
|
|
28086
|
+
skewX: (_u = (defaults == null ? void 0 : defaults.skewX)) !== null && _u !== void 0 ? _u : defaultFXValues.skewX,
|
|
28087
|
+
skewY: (_w = (defaults == null ? void 0 : defaults.skewY)) !== null && _w !== void 0 ? _w : defaultFXValues.skewY,
|
|
28088
|
+
transition: (_x = (defaults == null ? void 0 : defaults.transition)) !== null && _x !== void 0 ? _x : void 0,
|
|
28089
|
+
};
|
|
28090
|
+
}
|
|
28091
|
+
function useAnimationVariants(_j) {
|
|
28092
|
+
var { opacity, targetOpacity, perspective: transformPerspective, enter, exit, animate: animateVariant2 } = _j, defaultStyles = __rest(_j, ["opacity", "targetOpacity", "perspective", "enter", "exit", "animate"]);
|
|
28091
28093
|
return react_12.default.useMemo(() => {
|
|
28092
|
-
var
|
|
28094
|
+
var _j;
|
|
28093
28095
|
return ({
|
|
28094
|
-
initial: enter !== null && enter !== void 0 ? enter : makeStyle(Object.assign(Object.assign({}, defaultStyles), { opacity: (
|
|
28096
|
+
initial: enter !== null && enter !== void 0 ? enter : makeStyle(Object.assign(Object.assign({}, defaultStyles), { opacity: (_j = opacity !== null && opacity !== void 0 ? opacity : targetOpacity) !== null && _j !== void 0 ? _j : 1, transformPerspective })),
|
|
28095
28097
|
animate: animateVariant2 !== null && animateVariant2 !== void 0 ? animateVariant2 : makeStyle({
|
|
28096
28098
|
opacity: targetOpacity,
|
|
28097
28099
|
}),
|
|
@@ -28110,22 +28112,24 @@ function useStyleAppearEffect(options, ref) {
|
|
|
28110
28112
|
lastAppearState: !options.styleAppearEffectEnabled,
|
|
28111
28113
|
});
|
|
28112
28114
|
const animation = react_12.default.useRef();
|
|
28113
|
-
const runAnimation = react_12.default.useCallback((
|
|
28114
|
-
var
|
|
28115
|
-
var { transition } =
|
|
28116
|
-
const transitionWithFallback = (
|
|
28115
|
+
const runAnimation = react_12.default.useCallback((_j, fromInitial) => __awaiter(this, void 0, void 0, function* () {
|
|
28116
|
+
var _k;
|
|
28117
|
+
var { transition } = _j, target = __rest(_j, ["transition"]);
|
|
28118
|
+
const transitionWithFallback = (_k = transition !== null && transition !== void 0 ? transition : variants.animate.transition) !== null && _k !== void 0 ? _k : options.transition;
|
|
28117
28119
|
yield animation.current;
|
|
28118
28120
|
animation.current = Promise.all(effectValuesKeys.map((key7) => {
|
|
28119
|
-
var
|
|
28121
|
+
var _j, _k;
|
|
28120
28122
|
if (fromInitial)
|
|
28121
|
-
effect.values[key7].set((
|
|
28122
|
-
const toValue = (
|
|
28123
|
+
effect.values[key7].set((_j = variants.initial[key7]) !== null && _j !== void 0 ? _j : defaultFXValues[key7]);
|
|
28124
|
+
const toValue = (_k = target[key7]) !== null && _k !== void 0 ? _k : defaultFXValues[key7];
|
|
28123
28125
|
const visualElement = visualElementStore.get(ref.current);
|
|
28124
28126
|
if (visualElement && typeof toValue !== 'object') {
|
|
28125
28127
|
visualElement.setBaseTarget(key7, toValue);
|
|
28126
28128
|
}
|
|
28127
28129
|
return new Promise((resolve) => {
|
|
28128
28130
|
if (shouldReduceMotion && key7 !== 'opacity') {
|
|
28131
|
+
if (isNumber2(toValue))
|
|
28132
|
+
effect.values[key7].set(toValue);
|
|
28129
28133
|
resolve();
|
|
28130
28134
|
}
|
|
28131
28135
|
else {
|
|
@@ -28167,13 +28171,13 @@ function useStyleAppearEffect(options, ref) {
|
|
|
28167
28171
|
};
|
|
28168
28172
|
let lastVariant = 'initial';
|
|
28169
28173
|
return scrollInfo(({ y: scrollY, }) => {
|
|
28170
|
-
var
|
|
28174
|
+
var _j;
|
|
28171
28175
|
const { targets, } = options;
|
|
28172
28176
|
if (!targets)
|
|
28173
28177
|
return;
|
|
28174
28178
|
if (!targets[0] || targets[0].ref && !targets[0].ref.current)
|
|
28175
28179
|
return;
|
|
28176
|
-
const { inputRange, outputRange, } = createInputOutputRange(targets, ((
|
|
28180
|
+
const { inputRange, outputRange, } = createInputOutputRange(targets, ((_j = options.threshold) !== null && _j !== void 0 ? _j : 0) * scrollY.containerLength, !!options.exit);
|
|
28177
28181
|
if (inputRange.length === 0 || inputRange.length !== outputRange.length)
|
|
28178
28182
|
return;
|
|
28179
28183
|
const variant = transform(scrollY.current, inputRange, outputRange);
|
|
@@ -28203,12 +28207,12 @@ var styleTransformOptionsKeys = /* @__PURE__ */ new Set([
|
|
|
28203
28207
|
'transformTrigger',
|
|
28204
28208
|
]);
|
|
28205
28209
|
var defaultValues = (transformTargets, shouldReduceMotion) => {
|
|
28206
|
-
var
|
|
28210
|
+
var _j;
|
|
28207
28211
|
var _a;
|
|
28208
28212
|
const initial = (_a = transformTargets == null ? void 0 : transformTargets[0]) == null ? void 0 : _a.target;
|
|
28209
28213
|
return shouldReduceMotion
|
|
28210
28214
|
? {
|
|
28211
|
-
opacity: (
|
|
28215
|
+
opacity: (_j = (initial == null ? void 0 : initial.opacity)) !== null && _j !== void 0 ? _j : 1,
|
|
28212
28216
|
}
|
|
28213
28217
|
: initial;
|
|
28214
28218
|
};
|
|
@@ -28250,14 +28254,14 @@ function useAttachOptionalSpring(values, spring2) {
|
|
|
28250
28254
|
function createInputOutputRanges(transformTargets, threshold) {
|
|
28251
28255
|
const effectKeyOutputRange = defaultRanges2();
|
|
28252
28256
|
const inputRange = createTransformInputRange(transformTargets, threshold, (index) => {
|
|
28253
|
-
var
|
|
28257
|
+
var _j, _k;
|
|
28254
28258
|
var _a, _b, _c;
|
|
28255
28259
|
const previousTarget = (_a = transformTargets[index - 1]) == null ? void 0 : _a.target;
|
|
28256
28260
|
const currentTarget = (_b = transformTargets[index]) == null ? void 0 : _b.target;
|
|
28257
28261
|
for (const key7 of effectValuesKeys) {
|
|
28258
28262
|
(_c = effectKeyOutputRange[key7]) == null
|
|
28259
28263
|
? void 0
|
|
28260
|
-
: _c.unshift((
|
|
28264
|
+
: _c.unshift((_j = (previousTarget == null ? void 0 : previousTarget[key7])) !== null && _j !== void 0 ? _j : 0, (_k = (currentTarget == null ? void 0 : currentTarget[key7])) !== null && _k !== void 0 ? _k : 0);
|
|
28261
28265
|
}
|
|
28262
28266
|
});
|
|
28263
28267
|
return {
|
|
@@ -28279,7 +28283,7 @@ function useStyleTransform({ transformTrigger, styleTransformEffectEnabled, tran
|
|
|
28279
28283
|
const shouldReduceMotion = useReducedMotionConfig();
|
|
28280
28284
|
const effect = useFXValues(defaultValues(transformTargets, shouldReduceMotion), styleTransformEffectEnabled);
|
|
28281
28285
|
react_12.default.useLayoutEffect(() => {
|
|
28282
|
-
var
|
|
28286
|
+
var _j;
|
|
28283
28287
|
if (!styleTransformEffectEnabled || !transformTargets)
|
|
28284
28288
|
return;
|
|
28285
28289
|
if (transformTrigger !== 'onScrollTarget') {
|
|
@@ -28296,7 +28300,7 @@ function useStyleTransform({ transformTrigger, styleTransformEffectEnabled, tran
|
|
|
28296
28300
|
}
|
|
28297
28301
|
}, transformTrigger === 'onInView'
|
|
28298
28302
|
? {
|
|
28299
|
-
target: (
|
|
28303
|
+
target: (_j = ref.current) !== null && _j !== void 0 ? _j : void 0,
|
|
28300
28304
|
offset: [`start end`, `end end`,],
|
|
28301
28305
|
}
|
|
28302
28306
|
: void 0);
|
|
@@ -28487,9 +28491,9 @@ function ComponentPresetsProvider({ presets, children, }) {
|
|
|
28487
28491
|
}
|
|
28488
28492
|
exports.ComponentPresetsProvider = ComponentPresetsProvider;
|
|
28489
28493
|
function ComponentPresetsConsumer({ componentIdentifier, children, }) {
|
|
28490
|
-
var
|
|
28494
|
+
var _j;
|
|
28491
28495
|
const componentPresets = (0, react_3.useContext)(Context);
|
|
28492
|
-
const presetProps = (
|
|
28496
|
+
const presetProps = (_j = componentPresets[componentIdentifier]) !== null && _j !== void 0 ? _j : {};
|
|
28493
28497
|
return children(presetProps);
|
|
28494
28498
|
}
|
|
28495
28499
|
exports.ComponentPresetsConsumer = ComponentPresetsConsumer;
|
|
@@ -28605,8 +28609,8 @@ function useComponentViewport() {
|
|
|
28605
28609
|
return react_12.default.useContext(ComponentViewportContext);
|
|
28606
28610
|
}
|
|
28607
28611
|
exports.useComponentViewport = useComponentViewport;
|
|
28608
|
-
var ComponentViewportProvider = /* @__PURE__ */ react_12.default.forwardRef((
|
|
28609
|
-
var { width, children } =
|
|
28612
|
+
var ComponentViewportProvider = /* @__PURE__ */ react_12.default.forwardRef((_j, ref) => {
|
|
28613
|
+
var { width, children } = _j, rest = __rest(_j, ["width", "children"]);
|
|
28610
28614
|
const componentViewport = react_12.default.useMemo(() => {
|
|
28611
28615
|
return {
|
|
28612
28616
|
width,
|
|
@@ -28624,7 +28628,7 @@ var withGeneratedLayoutId = (Component15) => react_12.default.forwardRef((props,
|
|
|
28624
28628
|
return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(Component15, Object.assign(Object.assign({ layoutId }, props), { layoutIdKey: void 0, duplicatedFrom: void 0, ref }));
|
|
28625
28629
|
});
|
|
28626
28630
|
exports.withGeneratedLayoutId = withGeneratedLayoutId;
|
|
28627
|
-
var ContainerErrorBoundary = class extends react_9.Component {
|
|
28631
|
+
var ContainerErrorBoundary = /*#__PURE__*/ class extends react_9.Component {
|
|
28628
28632
|
constructor() {
|
|
28629
28633
|
super(...arguments);
|
|
28630
28634
|
__publicField(this, 'state', {
|
|
@@ -28643,8 +28647,8 @@ var ContainerErrorBoundary = class extends react_9.Component {
|
|
|
28643
28647
|
return hasError ? null : children;
|
|
28644
28648
|
}
|
|
28645
28649
|
};
|
|
28646
|
-
var Providers = /* @__PURE__ */ react_12.default.forwardRef((
|
|
28647
|
-
var { children, layoutId } =
|
|
28650
|
+
var Providers = /* @__PURE__ */ react_12.default.forwardRef((_j, ref) => {
|
|
28651
|
+
var { children, layoutId } = _j, props = __rest(_j, ["children", "layoutId"]);
|
|
28648
28652
|
const outerLayoutId = useConstant2(() => layoutId ? `${layoutId}-container` : void 0);
|
|
28649
28653
|
return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(motion.div, Object.assign(Object.assign({ layoutId: outerLayoutId }, props), { ref, children: /* @__PURE__ */ (0, jsx_runtime_1.jsx)(ComponentContainerContext.Provider, {
|
|
28650
28654
|
value: true,
|
|
@@ -28684,8 +28688,8 @@ var componentsWithServerRenderedStyles = /* @__PURE__ */ (() => {
|
|
|
28684
28688
|
var framerCSSMarker = 'data-framer-css-ssr';
|
|
28685
28689
|
exports.framerCSSMarker = framerCSSMarker;
|
|
28686
28690
|
var withCSS = (Component15, escapedCSS, componentSerializationId) => react_12.default.forwardRef((props, ref) => {
|
|
28687
|
-
var
|
|
28688
|
-
const { sheet, cache: cache2, } = (
|
|
28691
|
+
var _j;
|
|
28692
|
+
const { sheet, cache: cache2, } = (_j = react_12.default.useContext(StyleSheetContext)) !== null && _j !== void 0 ? _j : {};
|
|
28689
28693
|
if (!isBrowser2()) {
|
|
28690
28694
|
const concatenatedCSS = Array.isArray(escapedCSS) ? escapedCSS.join('\n') : escapedCSS;
|
|
28691
28695
|
return /* @__PURE__ */ (0, jsx_runtime_1.jsxs)(react_8.Fragment, {
|
|
@@ -28725,10 +28729,10 @@ var CustomCursorContextProvider = /* @__PURE__ */ react_12.default.memo(function
|
|
|
28725
28729
|
return () => events.delete(callback);
|
|
28726
28730
|
},
|
|
28727
28731
|
registerCursors: (cursors) => {
|
|
28728
|
-
var
|
|
28732
|
+
var _j;
|
|
28729
28733
|
const nextCursors = {};
|
|
28730
28734
|
for (const key7 in cursors) {
|
|
28731
|
-
const cursor = (
|
|
28735
|
+
const cursor = (_j = allCursors[key7]) !== null && _j !== void 0 ? _j : cursors[key7];
|
|
28732
28736
|
if (cursor)
|
|
28733
28737
|
nextCursors[key7] = cursor;
|
|
28734
28738
|
}
|
|
@@ -28793,7 +28797,7 @@ function getCenteringTransform(placement, alignment = 'center') {
|
|
|
28793
28797
|
}
|
|
28794
28798
|
var portalIdAttribute = 'data-framer-portal-id';
|
|
28795
28799
|
function getCursorHash(x, y) {
|
|
28796
|
-
var
|
|
28800
|
+
var _j;
|
|
28797
28801
|
let el = document.elementFromPoint(x, y);
|
|
28798
28802
|
while (el) {
|
|
28799
28803
|
if (el === document.body)
|
|
@@ -28805,7 +28809,7 @@ function getCursorHash(x, y) {
|
|
|
28805
28809
|
const id3 = el.getAttribute(portalIdAttribute);
|
|
28806
28810
|
el = el.parentElement;
|
|
28807
28811
|
if (id3)
|
|
28808
|
-
el = (
|
|
28812
|
+
el = (_j = document.getElementById(id3)) !== null && _j !== void 0 ? _j : el;
|
|
28809
28813
|
}
|
|
28810
28814
|
else {
|
|
28811
28815
|
el = el.parentElement;
|
|
@@ -28819,7 +28823,7 @@ function isEmptyObject(object) {
|
|
|
28819
28823
|
return true;
|
|
28820
28824
|
}
|
|
28821
28825
|
var CustomCursorComponent = /* @__PURE__ */ react_12.default.memo(function CustomCursorComponent2() {
|
|
28822
|
-
var
|
|
28826
|
+
var _j;
|
|
28823
28827
|
const { onRegisterCursors, } = (0, react_3.useContext)(CustomCursorContext);
|
|
28824
28828
|
const pointerX = useMotionValue(0);
|
|
28825
28829
|
const pointerY = useMotionValue(0);
|
|
@@ -28920,20 +28924,20 @@ var CustomCursorComponent = /* @__PURE__ */ react_12.default.memo(function Custo
|
|
|
28920
28924
|
document.body.classList.toggle(replaceCursorClassName, replaceNativeCursor);
|
|
28921
28925
|
}, [replaceNativeCursor,]);
|
|
28922
28926
|
const Cursor = cursor == null ? void 0 : cursor.component;
|
|
28923
|
-
const spring2 = (
|
|
28927
|
+
const spring2 = (_j = (cursor == null ? void 0 : cursor.transition)) !== null && _j !== void 0 ? _j : {
|
|
28924
28928
|
duration: 0,
|
|
28925
28929
|
};
|
|
28926
28930
|
const sprungX = useSpring(pointerX, spring2);
|
|
28927
28931
|
const sprungY = useSpring(pointerY, spring2);
|
|
28928
28932
|
const x = useTransform(() => {
|
|
28929
|
-
var
|
|
28933
|
+
var _j;
|
|
28930
28934
|
var _a;
|
|
28931
|
-
return sprungX.get() + ((
|
|
28935
|
+
return sprungX.get() + ((_j = ((_a = cursor == null ? void 0 : cursor.offset) == null ? void 0 : _a.x)) !== null && _j !== void 0 ? _j : 0);
|
|
28932
28936
|
});
|
|
28933
28937
|
const y = useTransform(() => {
|
|
28934
|
-
var
|
|
28938
|
+
var _j;
|
|
28935
28939
|
var _a;
|
|
28936
|
-
return sprungY.get() + ((
|
|
28940
|
+
return sprungY.get() + ((_j = ((_a = cursor == null ? void 0 : cursor.offset) == null ? void 0 : _a.y)) !== null && _j !== void 0 ? _j : 0);
|
|
28937
28941
|
});
|
|
28938
28942
|
const alignment = cursor == null ? void 0 : cursor.alignment;
|
|
28939
28943
|
const placement = cursor == null ? void 0 : cursor.placement;
|
|
@@ -29004,19 +29008,19 @@ var Polygon = {
|
|
|
29004
29008
|
* @internal
|
|
29005
29009
|
*/
|
|
29006
29010
|
containsPoint: (polygonPoints2, point2) => {
|
|
29007
|
-
var
|
|
29011
|
+
var _j, _k, _l, _m;
|
|
29008
29012
|
var _a, _b, _c, _d;
|
|
29009
29013
|
let sign = void 0;
|
|
29010
29014
|
for (let i = 0; i < polygonPoints2.length; i++) {
|
|
29011
29015
|
if (Point.isEqual(polygonPoints2[i], point2))
|
|
29012
29016
|
return true;
|
|
29013
|
-
const x1 = (
|
|
29014
|
-
const y1 = (
|
|
29017
|
+
const x1 = (_j = ((_a = polygonPoints2[i]) == null ? void 0 : _a.x)) !== null && _j !== void 0 ? _j : 0;
|
|
29018
|
+
const y1 = (_k = ((_b = polygonPoints2[i]) == null ? void 0 : _b.y)) !== null && _k !== void 0 ? _k : 0;
|
|
29015
29019
|
const i2 = (i + 1) % polygonPoints2.length;
|
|
29016
29020
|
if (Point.isEqual(polygonPoints2[i2], point2))
|
|
29017
29021
|
return true;
|
|
29018
|
-
const x2 = (
|
|
29019
|
-
const y2 = (
|
|
29022
|
+
const x2 = (_l = ((_c = polygonPoints2[i2]) == null ? void 0 : _c.x)) !== null && _l !== void 0 ? _l : 0;
|
|
29023
|
+
const y2 = (_m = ((_d = polygonPoints2[i2]) == null ? void 0 : _d.y)) !== null && _m !== void 0 ? _m : 0;
|
|
29020
29024
|
const d = (point2.x - x1) * (y2 - y1) - (point2.y - y1) * (x2 - x1);
|
|
29021
29025
|
if (d === 0)
|
|
29022
29026
|
continue;
|
|
@@ -29343,25 +29347,25 @@ function createUpdateSafeArea(safeAreaRef) {
|
|
|
29343
29347
|
let x = 0;
|
|
29344
29348
|
let y = 0;
|
|
29345
29349
|
return (anchorRect, calculatedRect, placement, event) => {
|
|
29346
|
-
var
|
|
29350
|
+
var _j, _k;
|
|
29347
29351
|
var _a;
|
|
29348
29352
|
if (!((_a = safeAreaRef.current) == null ? void 0 : _a.style))
|
|
29349
29353
|
return;
|
|
29350
|
-
x = (
|
|
29351
|
-
y = (
|
|
29354
|
+
x = (_j = (event == null ? void 0 : event.clientX)) !== null && _j !== void 0 ? _j : x;
|
|
29355
|
+
y = (_k = (event == null ? void 0 : event.clientY)) !== null && _k !== void 0 ? _k : y;
|
|
29352
29356
|
Object.assign(safeAreaRef.current.style, floatingPositionSafeAreaStyle(x, y, placement, anchorRect, calculatedRect));
|
|
29353
29357
|
};
|
|
29354
29358
|
}
|
|
29355
29359
|
function updatePosition(floatingPositionRef, position, rect) {
|
|
29356
|
-
var
|
|
29360
|
+
var _j, _k;
|
|
29357
29361
|
if (!floatingPositionRef.current)
|
|
29358
29362
|
return;
|
|
29359
29363
|
Object.assign(floatingPositionRef.current.style, {
|
|
29360
29364
|
position,
|
|
29361
29365
|
visibility: 'visible',
|
|
29362
29366
|
// Append "px" because we are assigning this object straight to style.
|
|
29363
|
-
left: ((
|
|
29364
|
-
top: ((
|
|
29367
|
+
left: ((_j = (rect == null ? void 0 : rect.x)) !== null && _j !== void 0 ? _j : 0) + (position === 'fixed' ? 0 : safeWindow.scrollX) + 'px',
|
|
29368
|
+
top: ((_k = (rect == null ? void 0 : rect.y)) !== null && _k !== void 0 ? _k : 0) + (position === 'fixed' ? 0 : safeWindow.scrollY) + 'px',
|
|
29365
29369
|
});
|
|
29366
29370
|
}
|
|
29367
29371
|
var FloatingStackingContext = /* @__PURE__ */ react_12.default.createContext(/* @__PURE__ */ new Set());
|
|
@@ -29455,9 +29459,9 @@ function childrenWithOrigin(child, { x, y, }) {
|
|
|
29455
29459
|
style,
|
|
29456
29460
|
});
|
|
29457
29461
|
}
|
|
29458
|
-
function Floating(
|
|
29459
|
-
var
|
|
29460
|
-
var { alignment, placement, safeArea, offsetX, offsetY, anchorRef, className: className2, children, portalSelector, zIndex, collisionDetection = false, collisionDetectionPadding, onDismiss } =
|
|
29462
|
+
function Floating(_j) {
|
|
29463
|
+
var _k;
|
|
29464
|
+
var { alignment, placement, safeArea, offsetX, offsetY, anchorRef, className: className2, children, portalSelector, zIndex, collisionDetection = false, collisionDetectionPadding, onDismiss } = _j, rest = __rest(_j, ["alignment", "placement", "safeArea", "offsetX", "offsetY", "anchorRef", "className", "children", "portalSelector", "zIndex", "collisionDetection", "collisionDetectionPadding", "onDismiss"]);
|
|
29461
29465
|
const floatingPositionRef = react_12.default.useRef(null);
|
|
29462
29466
|
const safeAreaRef = react_12.default.useRef(null);
|
|
29463
29467
|
const contentRef = react_12.default.useRef(null);
|
|
@@ -29559,12 +29563,12 @@ function Floating(_f) {
|
|
|
29559
29563
|
children: childrenWithOrigin(children, origin),
|
|
29560
29564
|
}),
|
|
29561
29565
|
}),
|
|
29562
|
-
] })), (
|
|
29566
|
+
] })), (_k = document.querySelector(portalSelector)) !== null && _k !== void 0 ? _k : document.body);
|
|
29563
29567
|
}
|
|
29564
29568
|
exports.Floating = Floating;
|
|
29565
29569
|
var GeneratedComponentContext = /* @__PURE__ */ react_12.default.createContext(void 0);
|
|
29566
29570
|
exports.GeneratedComponentContext = GeneratedComponentContext;
|
|
29567
|
-
var LazyValue = class {
|
|
29571
|
+
var LazyValue = /*#__PURE__*/ class {
|
|
29568
29572
|
constructor(resolver) {
|
|
29569
29573
|
this.resolver = resolver;
|
|
29570
29574
|
__publicField(this, 'status');
|
|
@@ -29682,7 +29686,7 @@ function parseFramerPageLink(link) {
|
|
|
29682
29686
|
collectionItem,
|
|
29683
29687
|
};
|
|
29684
29688
|
}
|
|
29685
|
-
catch (
|
|
29689
|
+
catch (_j) {
|
|
29686
29690
|
return;
|
|
29687
29691
|
}
|
|
29688
29692
|
}
|
|
@@ -29692,13 +29696,13 @@ function shouldOpenLinkInNewTab(link) {
|
|
|
29692
29696
|
}
|
|
29693
29697
|
exports.shouldOpenLinkInNewTab = shouldOpenLinkInNewTab;
|
|
29694
29698
|
function navigateFromAttributes(navigate, element, implicitPathVariables) {
|
|
29695
|
-
var
|
|
29699
|
+
var _j, _k;
|
|
29696
29700
|
var _a;
|
|
29697
29701
|
let routeId = element.getAttribute('data-framer-page-link-target');
|
|
29698
29702
|
let elementId;
|
|
29699
29703
|
let pathVariables;
|
|
29700
29704
|
if (routeId) {
|
|
29701
|
-
elementId = (
|
|
29705
|
+
elementId = (_j = element.getAttribute('data-framer-page-link-element')) !== null && _j !== void 0 ? _j : void 0;
|
|
29702
29706
|
const pathVariablesRaw = element.getAttribute('data-framer-page-link-path-variables');
|
|
29703
29707
|
if (pathVariablesRaw) {
|
|
29704
29708
|
pathVariables = Object.fromEntries(new URLSearchParams(pathVariablesRaw).entries());
|
|
@@ -29712,7 +29716,7 @@ function navigateFromAttributes(navigate, element, implicitPathVariables) {
|
|
|
29712
29716
|
if (!link || !link.target)
|
|
29713
29717
|
return false;
|
|
29714
29718
|
routeId = link.target;
|
|
29715
|
-
elementId = (
|
|
29719
|
+
elementId = (_k = link.element) !== null && _k !== void 0 ? _k : void 0;
|
|
29716
29720
|
pathVariables = (_a = link.collectionItem) == null ? void 0 : _a.pathVariables;
|
|
29717
29721
|
}
|
|
29718
29722
|
const smoothScroll = elementId ? element.dataset.framerSmoothScroll !== void 0 : void 0;
|
|
@@ -29772,7 +29776,7 @@ function getObserveRouteForPreloadingFn() {
|
|
|
29772
29776
|
});
|
|
29773
29777
|
}
|
|
29774
29778
|
function onPreloadIntersectionChange(entries) {
|
|
29775
|
-
var
|
|
29779
|
+
var _j;
|
|
29776
29780
|
var _a2;
|
|
29777
29781
|
for (const entry of entries) {
|
|
29778
29782
|
const target = entry.target;
|
|
@@ -29783,7 +29787,7 @@ function getObserveRouteForPreloadingFn() {
|
|
|
29783
29787
|
continue;
|
|
29784
29788
|
}
|
|
29785
29789
|
const nodes = routeToNodesInViewport.get(route);
|
|
29786
|
-
const amountOfNodesInViewport = (
|
|
29790
|
+
const amountOfNodesInViewport = (_j = ((_a2 = routeToNodesInViewport.get(route)) == null ? void 0 : _a2.size)) !== null && _j !== void 0 ? _j : 0;
|
|
29787
29791
|
if (entry.isIntersecting) {
|
|
29788
29792
|
if (activePreloadsAmount >= maxPreloadAmount)
|
|
29789
29793
|
continue;
|
|
@@ -29818,7 +29822,7 @@ var observeRouteForPreloading =
|
|
|
29818
29822
|
var noLocale = {};
|
|
29819
29823
|
var resolveSlugCache = /* @__PURE__ */ new WeakMap();
|
|
29820
29824
|
function resolveSlug(unresolvedSlug, utilsByCollectionId, activeLocale) {
|
|
29821
|
-
var
|
|
29825
|
+
var _j, _k;
|
|
29822
29826
|
var _a, _b;
|
|
29823
29827
|
const cache2 = (_b = (_a = resolveSlugCache == null ? void 0 : resolveSlugCache.get(activeLocale !== null && activeLocale !== void 0 ? activeLocale : noLocale)) == null
|
|
29824
29828
|
? void 0
|
|
@@ -29827,9 +29831,9 @@ function resolveSlug(unresolvedSlug, utilsByCollectionId, activeLocale) {
|
|
|
29827
29831
|
: _b.get(unresolvedSlug.collectionItemId);
|
|
29828
29832
|
if (cache2)
|
|
29829
29833
|
return cache2;
|
|
29830
|
-
const collectionCache = (
|
|
29834
|
+
const collectionCache = (_j = resolveSlugCache.get(activeLocale !== null && activeLocale !== void 0 ? activeLocale : noLocale)) !== null && _j !== void 0 ? _j : new Map();
|
|
29831
29835
|
resolveSlugCache.set(activeLocale !== null && activeLocale !== void 0 ? activeLocale : noLocale, collectionCache);
|
|
29832
|
-
const collectionItemCache = (
|
|
29836
|
+
const collectionItemCache = (_k = collectionCache.get(unresolvedSlug.collectionId)) !== null && _k !== void 0 ? _k : new Map();
|
|
29833
29837
|
collectionCache.set(unresolvedSlug.collectionId, collectionItemCache);
|
|
29834
29838
|
const lazyValue = new LazyValue(() => __awaiter(this, void 0, void 0, function* () {
|
|
29835
29839
|
try {
|
|
@@ -29927,7 +29931,7 @@ function isValidURL(href, isInternal) {
|
|
|
29927
29931
|
const url = new URL(href);
|
|
29928
29932
|
return Boolean(url.protocol);
|
|
29929
29933
|
}
|
|
29930
|
-
catch (
|
|
29934
|
+
catch (_j) { }
|
|
29931
29935
|
return isInternal;
|
|
29932
29936
|
}
|
|
29933
29937
|
var AnchorLinkTarget = /* @__PURE__ */ ((AnchorLinkTarget2) => {
|
|
@@ -30058,7 +30062,7 @@ function propsForRoutePath(href, openInNewTab, router, currentRoute, implicitPat
|
|
|
30058
30062
|
};
|
|
30059
30063
|
}
|
|
30060
30064
|
}
|
|
30061
|
-
catch (
|
|
30065
|
+
catch (_j) { }
|
|
30062
30066
|
return propsForLink(href, openInNewTab);
|
|
30063
30067
|
}
|
|
30064
30068
|
function getRouteFromPageLink(pageLink, router, currentRoute) {
|
|
@@ -30080,8 +30084,8 @@ function getRouteFromPageLink(pageLink, router, currentRoute) {
|
|
|
30080
30084
|
const { webPageId, } = pageLink;
|
|
30081
30085
|
return (_a = router.getRoute) == null ? void 0 : _a.call(router, webPageId);
|
|
30082
30086
|
}
|
|
30083
|
-
var Link = /* @__PURE__ */ (0, react_3.forwardRef)((
|
|
30084
|
-
var { children, href, openInNewTab, smoothScroll } =
|
|
30087
|
+
var Link = /* @__PURE__ */ (0, react_3.forwardRef)((_j, forwardedRef) => {
|
|
30088
|
+
var { children, href, openInNewTab, smoothScroll } = _j, restProps = __rest(_j, ["children", "href", "openInNewTab", "smoothScroll"]);
|
|
30085
30089
|
const router = useRouter();
|
|
30086
30090
|
const currentRoute = useCurrentRoute();
|
|
30087
30091
|
const implicitPathVariables = useImplicitPathVariables();
|
|
@@ -30189,7 +30193,227 @@ function resolvePageScope(pageLink, router) {
|
|
|
30189
30193
|
});
|
|
30190
30194
|
}
|
|
30191
30195
|
exports.resolvePageScope = resolvePageScope;
|
|
30192
|
-
|
|
30196
|
+
var salt = 'framer';
|
|
30197
|
+
var difficulty = 3;
|
|
30198
|
+
var tokenLength = 30;
|
|
30199
|
+
var maxTime = 3e3;
|
|
30200
|
+
function calculateProofOfWork() {
|
|
30201
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
30202
|
+
const target = '0'.repeat(difficulty);
|
|
30203
|
+
const startTime = Date.now();
|
|
30204
|
+
let processing = true;
|
|
30205
|
+
while (processing) {
|
|
30206
|
+
const timestamp = Date.now();
|
|
30207
|
+
if (timestamp - startTime > maxTime) {
|
|
30208
|
+
processing = false;
|
|
30209
|
+
return;
|
|
30210
|
+
}
|
|
30211
|
+
const nonce = randomCharacters(tokenLength);
|
|
30212
|
+
const secret = `${timestamp}:${nonce}`;
|
|
30213
|
+
const hash2 = yield sha256(salt + secret);
|
|
30214
|
+
if (hash2.startsWith(target)) {
|
|
30215
|
+
return {
|
|
30216
|
+
secret,
|
|
30217
|
+
hash: hash2,
|
|
30218
|
+
};
|
|
30219
|
+
}
|
|
30220
|
+
}
|
|
30221
|
+
return;
|
|
30222
|
+
});
|
|
30223
|
+
}
|
|
30224
|
+
function sha256(text) {
|
|
30225
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
30226
|
+
const buffer = new TextEncoder().encode(text);
|
|
30227
|
+
const hashBuffer = yield crypto.subtle.digest('SHA-256', buffer);
|
|
30228
|
+
return Array.from(new Uint8Array(hashBuffer)).map((b) => b.toString(16).padStart(2, '0')).join('');
|
|
30229
|
+
});
|
|
30230
|
+
}
|
|
30231
|
+
function randomCharacters(count) {
|
|
30232
|
+
const characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
|
|
30233
|
+
let result = '';
|
|
30234
|
+
const charactersLength = characters.length;
|
|
30235
|
+
for (let i = 0; i < count; i++) {
|
|
30236
|
+
result += characters.charAt(Math.floor(Math.random() * charactersLength));
|
|
30237
|
+
}
|
|
30238
|
+
return result;
|
|
30239
|
+
}
|
|
30240
|
+
function getEncodedFormFieldsHeader(data2) {
|
|
30241
|
+
return Array.from(data2.keys()).map(encodeURIComponent).join(',');
|
|
30242
|
+
}
|
|
30243
|
+
function formReducer({ state, }, { type, }) {
|
|
30244
|
+
switch (type) {
|
|
30245
|
+
case 'complete':
|
|
30246
|
+
case 'incomplete':
|
|
30247
|
+
if (state === 'error') {
|
|
30248
|
+
return {
|
|
30249
|
+
state: 'error',
|
|
30250
|
+
};
|
|
30251
|
+
}
|
|
30252
|
+
return {
|
|
30253
|
+
state: type,
|
|
30254
|
+
};
|
|
30255
|
+
case 'submit':
|
|
30256
|
+
return {
|
|
30257
|
+
state: 'pending',
|
|
30258
|
+
};
|
|
30259
|
+
case 'success':
|
|
30260
|
+
return {
|
|
30261
|
+
state: 'success',
|
|
30262
|
+
};
|
|
30263
|
+
case 'error':
|
|
30264
|
+
return {
|
|
30265
|
+
state: 'error',
|
|
30266
|
+
};
|
|
30267
|
+
default:
|
|
30268
|
+
assertNever(type);
|
|
30269
|
+
}
|
|
30270
|
+
}
|
|
30271
|
+
function stateCanSubmitForm(state) {
|
|
30272
|
+
return state.state === 'incomplete' || state.state === 'complete';
|
|
30273
|
+
}
|
|
30274
|
+
function preventDefault(e) {
|
|
30275
|
+
e.preventDefault();
|
|
30276
|
+
}
|
|
30277
|
+
var FormContext = react_12.default.createContext(void 0);
|
|
30278
|
+
var FormContainer = /* @__PURE__ */ react_12.default.forwardRef((_j, ref) => {
|
|
30279
|
+
var { action, children, redirectUrl, onSuccess, onError, onLoading } = _j, props = __rest(_j, ["action", "children", "redirectUrl", "onSuccess", "onError", "onLoading"]);
|
|
30280
|
+
const router = useRouter();
|
|
30281
|
+
const [state, dispatch,] = react_12.default.useReducer(formReducer, {
|
|
30282
|
+
state: 'incomplete',
|
|
30283
|
+
});
|
|
30284
|
+
const { activeLocale, } = useLocaleInfo();
|
|
30285
|
+
const projectHash = (0, react_3.useContext)(FormContext);
|
|
30286
|
+
const callbacks = react_12.default.useRef({
|
|
30287
|
+
onSuccess,
|
|
30288
|
+
onError,
|
|
30289
|
+
onLoading,
|
|
30290
|
+
});
|
|
30291
|
+
callbacks.current = {
|
|
30292
|
+
onSuccess,
|
|
30293
|
+
onError,
|
|
30294
|
+
onLoading,
|
|
30295
|
+
};
|
|
30296
|
+
function redirectTo(link) {
|
|
30297
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
30298
|
+
var _a, _b;
|
|
30299
|
+
if (isLinkToWebPage(link)) {
|
|
30300
|
+
if (!router)
|
|
30301
|
+
return;
|
|
30302
|
+
const route = (_a = router.getRoute) == null ? void 0 : _a.call(router, link.webPageId);
|
|
30303
|
+
if (!route)
|
|
30304
|
+
return;
|
|
30305
|
+
const { unresolvedHashSlugs, unresolvedPathSlugs, } = link;
|
|
30306
|
+
const resolvedSlugs = yield resolveSlugs(unresolvedPathSlugs, unresolvedHashSlugs, router.collectionUtils, activeLocale);
|
|
30307
|
+
const combinedPathVariables = Object.assign({}, router.currentPathVariables, link.pathVariables, resolvedSlugs == null ? void 0 : resolvedSlugs.path);
|
|
30308
|
+
const combinedHashVariables = Object.assign({}, router.currentPathVariables, link.pathVariables, link.hashVariables, resolvedSlugs == null ? void 0 : resolvedSlugs.hash);
|
|
30309
|
+
const element = getHashForRoute(link.hash, route, combinedHashVariables);
|
|
30310
|
+
(_b = router.navigate) == null ? void 0 : _b.call(router, link.webPageId, element, combinedPathVariables);
|
|
30311
|
+
return;
|
|
30312
|
+
}
|
|
30313
|
+
if (!safeWindow)
|
|
30314
|
+
return;
|
|
30315
|
+
safeWindow.open(link, '_blank');
|
|
30316
|
+
});
|
|
30317
|
+
}
|
|
30318
|
+
const handleSubmit = (event) => __awaiter(void 0, void 0, void 0, function* () {
|
|
30319
|
+
var _a, _b, _c, _d, _e, _f;
|
|
30320
|
+
event.preventDefault();
|
|
30321
|
+
if (!action || !projectHash)
|
|
30322
|
+
return;
|
|
30323
|
+
const data2 = new FormData(event.currentTarget);
|
|
30324
|
+
for (const [key7, value,] of data2) {
|
|
30325
|
+
if (value instanceof File)
|
|
30326
|
+
data2.delete(key7);
|
|
30327
|
+
}
|
|
30328
|
+
try {
|
|
30329
|
+
dispatch({
|
|
30330
|
+
type: 'submit',
|
|
30331
|
+
});
|
|
30332
|
+
(_b = (_a = callbacks.current).onLoading) == null ? void 0 : _b.call(_a);
|
|
30333
|
+
yield submitForm(action, data2, projectHash);
|
|
30334
|
+
dispatch({
|
|
30335
|
+
type: 'success',
|
|
30336
|
+
});
|
|
30337
|
+
(_d = (_c = callbacks.current).onSuccess) == null ? void 0 : _d.call(_c);
|
|
30338
|
+
if (redirectUrl) {
|
|
30339
|
+
yield redirectTo(redirectUrl);
|
|
30340
|
+
}
|
|
30341
|
+
}
|
|
30342
|
+
catch (error) {
|
|
30343
|
+
dispatch({
|
|
30344
|
+
type: 'error',
|
|
30345
|
+
});
|
|
30346
|
+
(_f = (_e = callbacks.current).onError) == null ? void 0 : _f.call(_e);
|
|
30347
|
+
console.error(error);
|
|
30348
|
+
}
|
|
30349
|
+
});
|
|
30350
|
+
const handleKeyDown = (event) => {
|
|
30351
|
+
const { target: input, currentTarget: form, key: key7, } = event;
|
|
30352
|
+
const isTextArea = input instanceof HTMLTextAreaElement;
|
|
30353
|
+
if (isTextArea)
|
|
30354
|
+
return;
|
|
30355
|
+
if (key7 === 'Enter' && form.checkValidity()) {
|
|
30356
|
+
event.preventDefault();
|
|
30357
|
+
void handleSubmit(event);
|
|
30358
|
+
}
|
|
30359
|
+
};
|
|
30360
|
+
const checkValidity = (e) => {
|
|
30361
|
+
dispatch({
|
|
30362
|
+
type: anyEmptyRequiredFields(e.currentTarget) ? 'incomplete' : 'complete',
|
|
30363
|
+
});
|
|
30364
|
+
};
|
|
30365
|
+
return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(motion.form, Object.assign(Object.assign({}, props), { onSubmit: stateCanSubmitForm(state) ? handleSubmit : preventDefault, onKeyDown: handleKeyDown, onChange: checkValidity, ref, children: children(state) }));
|
|
30366
|
+
});
|
|
30367
|
+
exports.FormContainer = FormContainer;
|
|
30368
|
+
function anyEmptyRequiredFields(element) {
|
|
30369
|
+
if (element.children.length === 0)
|
|
30370
|
+
return false;
|
|
30371
|
+
for (const child of element.children) {
|
|
30372
|
+
if (child instanceof HTMLInputElement || child instanceof HTMLTextAreaElement || child instanceof HTMLSelectElement) {
|
|
30373
|
+
if (child.required && child.value === '')
|
|
30374
|
+
return true;
|
|
30375
|
+
}
|
|
30376
|
+
else {
|
|
30377
|
+
const result = anyEmptyRequiredFields(child);
|
|
30378
|
+
if (result)
|
|
30379
|
+
return true;
|
|
30380
|
+
}
|
|
30381
|
+
}
|
|
30382
|
+
return false;
|
|
30383
|
+
}
|
|
30384
|
+
function submitForm(action, data2, projectHash) {
|
|
30385
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
30386
|
+
const proofOfWork = yield calculateProofOfWork();
|
|
30387
|
+
if (!proofOfWork) {
|
|
30388
|
+
throw new Error('Failed to calculate proof of work');
|
|
30389
|
+
}
|
|
30390
|
+
const response = yield fetch(action, {
|
|
30391
|
+
body: data2,
|
|
30392
|
+
method: 'POST',
|
|
30393
|
+
headers: {
|
|
30394
|
+
'Framer-Site-Id': projectHash,
|
|
30395
|
+
'Framer-POW': proofOfWork.secret,
|
|
30396
|
+
'Framer-Form-Fields': getEncodedFormFieldsHeader(data2),
|
|
30397
|
+
},
|
|
30398
|
+
});
|
|
30399
|
+
if (response.ok) {
|
|
30400
|
+
return response;
|
|
30401
|
+
}
|
|
30402
|
+
else {
|
|
30403
|
+
const body = yield response.json();
|
|
30404
|
+
const error = 'Failed to submit form';
|
|
30405
|
+
if (responseHasError(body)) {
|
|
30406
|
+
throw new Error(`${error} - ${body.error.message}`);
|
|
30407
|
+
}
|
|
30408
|
+
throw new Error(error);
|
|
30409
|
+
}
|
|
30410
|
+
});
|
|
30411
|
+
}
|
|
30412
|
+
function responseHasError(response) {
|
|
30413
|
+
return typeof response === 'object' && response !== null && 'error' in response && isObject2(response.error) &&
|
|
30414
|
+
'message' in response.error && typeof response.error.message === 'string';
|
|
30415
|
+
}
|
|
30416
|
+
function PageRoot({ RootComponent, isWebsite, routeId, framerSiteId, pathVariables, routes, collectionUtils, notFoundPage, isReducedMotion = false, includeDataObserver = false, localeId, locales, preserveQueryParams, enableImproveInpDuringHydration, addHydrationMarkers = false, }) {
|
|
30193
30417
|
react_12.default.useEffect(() => {
|
|
30194
30418
|
if (isWebsite)
|
|
30195
30419
|
return;
|
|
@@ -30199,21 +30423,24 @@ function PageRoot({ RootComponent, isWebsite, routeId, pathVariables, routes, co
|
|
|
30199
30423
|
return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(MotionConfig, {
|
|
30200
30424
|
reducedMotion: isReducedMotion ? 'user' : 'never',
|
|
30201
30425
|
children: /* @__PURE__ */ (0, jsx_runtime_1.jsx)(CustomCursorHost, {
|
|
30202
|
-
children: /* @__PURE__ */ (0, jsx_runtime_1.jsx)(
|
|
30203
|
-
|
|
30204
|
-
|
|
30205
|
-
|
|
30206
|
-
|
|
30207
|
-
|
|
30208
|
-
|
|
30209
|
-
|
|
30210
|
-
|
|
30211
|
-
|
|
30212
|
-
|
|
30213
|
-
|
|
30214
|
-
|
|
30215
|
-
|
|
30216
|
-
|
|
30426
|
+
children: /* @__PURE__ */ (0, jsx_runtime_1.jsx)(FormContext.Provider, {
|
|
30427
|
+
value: framerSiteId,
|
|
30428
|
+
children: /* @__PURE__ */ (0, jsx_runtime_1.jsx)(Router, {
|
|
30429
|
+
initialRoute: routeId,
|
|
30430
|
+
initialPathVariables: pathVariables,
|
|
30431
|
+
initialLocaleId: localeId,
|
|
30432
|
+
routes,
|
|
30433
|
+
collectionUtils,
|
|
30434
|
+
notFoundPage,
|
|
30435
|
+
locales,
|
|
30436
|
+
defaultPageStyle: {
|
|
30437
|
+
minHeight: '100vh',
|
|
30438
|
+
width: 'auto',
|
|
30439
|
+
},
|
|
30440
|
+
preserveQueryParams,
|
|
30441
|
+
enableImproveInpDuringHydration,
|
|
30442
|
+
addHydrationMarkers,
|
|
30443
|
+
}),
|
|
30217
30444
|
}),
|
|
30218
30445
|
}),
|
|
30219
30446
|
});
|
|
@@ -30325,8 +30552,8 @@ function renderBranchedChildrenFromPropertyOverrides(overrides, children, props,
|
|
|
30325
30552
|
],
|
|
30326
30553
|
});
|
|
30327
30554
|
}
|
|
30328
|
-
var SSRVariants = /* @__PURE__ */ react_12.default.forwardRef(function SSRVariants2(
|
|
30329
|
-
var { id: _nodeId, children } =
|
|
30555
|
+
var SSRVariants = /* @__PURE__ */ react_12.default.forwardRef(function SSRVariants2(_j, ref) {
|
|
30556
|
+
var { id: _nodeId, children } = _j, props = __rest(_j, ["id", "children"]);
|
|
30330
30557
|
const cloneWithRefs = useCloneChildrenWithPropsAndRef(ref);
|
|
30331
30558
|
if (isBrowser2()) {
|
|
30332
30559
|
return cloneWithRefs(children, props);
|
|
@@ -30366,8 +30593,8 @@ function propsForBreakpoint(variant, props, overrides) {
|
|
|
30366
30593
|
var noopSubscribe = () => () => { };
|
|
30367
30594
|
var returnTrue = () => true;
|
|
30368
30595
|
var returnFalse = () => false;
|
|
30369
|
-
var PropertyOverrides = /* @__PURE__ */ react_12.default.forwardRef(function PropertyOverrides2(
|
|
30370
|
-
var { breakpoint, overrides, children } =
|
|
30596
|
+
var PropertyOverrides = /* @__PURE__ */ react_12.default.forwardRef(function PropertyOverrides2(_j, ref) {
|
|
30597
|
+
var { breakpoint, overrides, children } = _j, props = __rest(_j, ["breakpoint", "overrides", "children"]);
|
|
30371
30598
|
const cloneWithRefs = useCloneChildrenWithPropsAndRef(ref);
|
|
30372
30599
|
const parentVariants = react_12.default.useContext(SSRParentVariantsContext);
|
|
30373
30600
|
const isHydrationOrSSR = react_12.default.useSyncExternalStore(noopSubscribe, returnFalse, returnTrue);
|
|
@@ -30406,8 +30633,8 @@ var PropertyOverrides = /* @__PURE__ */ react_12.default.forwardRef(function Pro
|
|
|
30406
30633
|
}
|
|
30407
30634
|
});
|
|
30408
30635
|
exports.PropertyOverrides = PropertyOverrides;
|
|
30409
|
-
var ResolveLinks = /* @__PURE__ */ React2.forwardRef(function ResolveLinksInner(
|
|
30410
|
-
var { links, children } =
|
|
30636
|
+
var ResolveLinks = /* @__PURE__ */ React2.forwardRef(function ResolveLinksInner(_j, ref) {
|
|
30637
|
+
var { links, children } = _j, rest = __rest(_j, ["links", "children"]);
|
|
30411
30638
|
const router = useRouter();
|
|
30412
30639
|
const { activeLocale, } = useLocaleInfo();
|
|
30413
30640
|
const cloneWithPropsAndRef = useCloneChildrenWithPropsAndRef(ref);
|
|
@@ -30498,7 +30725,7 @@ function getCollection(collection, locale) {
|
|
|
30498
30725
|
return collection;
|
|
30499
30726
|
});
|
|
30500
30727
|
}
|
|
30501
|
-
var CompatibilityDatabaseCollection = class {
|
|
30728
|
+
var CompatibilityDatabaseCollection = /*#__PURE__*/ class {
|
|
30502
30729
|
constructor(collection, locale) {
|
|
30503
30730
|
this.collection = collection;
|
|
30504
30731
|
this.locale = locale;
|
|
@@ -30763,14 +30990,14 @@ function compare(left, right, collation) {
|
|
|
30763
30990
|
}
|
|
30764
30991
|
}
|
|
30765
30992
|
var INDEX_IDENTIFIER = 'index';
|
|
30766
|
-
var ScalarExpression = class {
|
|
30993
|
+
var ScalarExpression = /*#__PURE__*/ class {
|
|
30767
30994
|
static from(expression, schema) {
|
|
30768
30995
|
return convertExpression(expression, schema, void 0);
|
|
30769
30996
|
}
|
|
30770
30997
|
};
|
|
30771
|
-
var ScalarIdentifier = class extends ScalarExpression {
|
|
30998
|
+
var ScalarIdentifier = /*#__PURE__*/ class extends ScalarExpression {
|
|
30772
30999
|
constructor(schema, name) {
|
|
30773
|
-
var
|
|
31000
|
+
var _j;
|
|
30774
31001
|
super();
|
|
30775
31002
|
this.schema = schema;
|
|
30776
31003
|
this.name = name;
|
|
@@ -30782,7 +31009,7 @@ var ScalarIdentifier = class extends ScalarExpression {
|
|
|
30782
31009
|
};
|
|
30783
31010
|
}
|
|
30784
31011
|
else {
|
|
30785
|
-
this.definition = (
|
|
31012
|
+
this.definition = (_j = schema[name]) !== null && _j !== void 0 ? _j : null;
|
|
30786
31013
|
}
|
|
30787
31014
|
}
|
|
30788
31015
|
stringify() {
|
|
@@ -30792,18 +31019,18 @@ var ScalarIdentifier = class extends ScalarExpression {
|
|
|
30792
31019
|
return other instanceof ScalarIdentifier && isEqual(this.definition, other.definition) && isEqual(other.name, this.name);
|
|
30793
31020
|
}
|
|
30794
31021
|
evaluate(item) {
|
|
30795
|
-
var
|
|
31022
|
+
var _j;
|
|
30796
31023
|
const name = this.name;
|
|
30797
31024
|
if (isUndefined(item) || name === INDEX_IDENTIFIER) {
|
|
30798
31025
|
throw new Error(`Can't evaluate identifier: ${name}`);
|
|
30799
31026
|
}
|
|
30800
|
-
return (
|
|
31027
|
+
return (_j = item.data[name]) !== null && _j !== void 0 ? _j : null;
|
|
30801
31028
|
}
|
|
30802
31029
|
canEvaluate() {
|
|
30803
31030
|
return false;
|
|
30804
31031
|
}
|
|
30805
31032
|
};
|
|
30806
|
-
var ScalarLiteralValue = class extends ScalarExpression {
|
|
31033
|
+
var ScalarLiteralValue = /*#__PURE__*/ class extends ScalarExpression {
|
|
30807
31034
|
constructor(definition, value) {
|
|
30808
31035
|
super();
|
|
30809
31036
|
this.definition = definition;
|
|
@@ -30870,7 +31097,7 @@ var ScalarLiteralValue = class extends ScalarExpression {
|
|
|
30870
31097
|
return true;
|
|
30871
31098
|
}
|
|
30872
31099
|
};
|
|
30873
|
-
var ScalarFunctionCall = class extends ScalarExpression {
|
|
31100
|
+
var ScalarFunctionCall = /*#__PURE__*/ class extends ScalarExpression {
|
|
30874
31101
|
constructor(argumentExpressions) {
|
|
30875
31102
|
super();
|
|
30876
31103
|
this.argumentExpressions = argumentExpressions;
|
|
@@ -30896,7 +31123,7 @@ var ScalarFunctionCall = class extends ScalarExpression {
|
|
|
30896
31123
|
});
|
|
30897
31124
|
}
|
|
30898
31125
|
};
|
|
30899
|
-
var ScalarFunctionCallContains = class extends ScalarFunctionCall {
|
|
31126
|
+
var ScalarFunctionCallContains = /*#__PURE__*/ class extends ScalarFunctionCall {
|
|
30900
31127
|
constructor() {
|
|
30901
31128
|
super(...arguments);
|
|
30902
31129
|
__publicField(this, 'definition', ScalarFunctionCallContains.getDefinition());
|
|
@@ -30934,7 +31161,7 @@ var ScalarFunctionCallContains = class extends ScalarFunctionCall {
|
|
|
30934
31161
|
};
|
|
30935
31162
|
}
|
|
30936
31163
|
};
|
|
30937
|
-
var ScalarFunctionCallStartsWith = class extends ScalarFunctionCall {
|
|
31164
|
+
var ScalarFunctionCallStartsWith = /*#__PURE__*/ class extends ScalarFunctionCall {
|
|
30938
31165
|
constructor() {
|
|
30939
31166
|
super(...arguments);
|
|
30940
31167
|
__publicField(this, 'definition', ScalarFunctionCallStartsWith.getDefinition());
|
|
@@ -30972,7 +31199,7 @@ var ScalarFunctionCallStartsWith = class extends ScalarFunctionCall {
|
|
|
30972
31199
|
};
|
|
30973
31200
|
}
|
|
30974
31201
|
};
|
|
30975
|
-
var ScalarFunctionCallEndsWith = class extends ScalarFunctionCall {
|
|
31202
|
+
var ScalarFunctionCallEndsWith = /*#__PURE__*/ class extends ScalarFunctionCall {
|
|
30976
31203
|
constructor() {
|
|
30977
31204
|
super(...arguments);
|
|
30978
31205
|
__publicField(this, 'definition', ScalarFunctionCallEndsWith.getDefinition());
|
|
@@ -31010,7 +31237,7 @@ var ScalarFunctionCallEndsWith = class extends ScalarFunctionCall {
|
|
|
31010
31237
|
};
|
|
31011
31238
|
}
|
|
31012
31239
|
};
|
|
31013
|
-
var ScalarCase = class extends ScalarExpression {
|
|
31240
|
+
var ScalarCase = /*#__PURE__*/ class extends ScalarExpression {
|
|
31014
31241
|
constructor(valueExpression, conditions, elseExpression) {
|
|
31015
31242
|
super();
|
|
31016
31243
|
this.valueExpression = valueExpression;
|
|
@@ -31031,7 +31258,7 @@ var ScalarCase = class extends ScalarExpression {
|
|
|
31031
31258
|
this.definition = ScalarCase.getDefinition(definitions);
|
|
31032
31259
|
}
|
|
31033
31260
|
static getDefinition(definitions) {
|
|
31034
|
-
var
|
|
31261
|
+
var _j;
|
|
31035
31262
|
let result = null;
|
|
31036
31263
|
let isNullable = false;
|
|
31037
31264
|
for (const definition of definitions) {
|
|
@@ -31039,7 +31266,7 @@ var ScalarCase = class extends ScalarExpression {
|
|
|
31039
31266
|
if (result && definition && result.type !== definition.type) {
|
|
31040
31267
|
throw new Error('Incompatible types in CASE expression');
|
|
31041
31268
|
}
|
|
31042
|
-
isNullable || (isNullable = (
|
|
31269
|
+
isNullable || (isNullable = (_j = (definition == null ? void 0 : definition.isNullable)) !== null && _j !== void 0 ? _j : true);
|
|
31043
31270
|
}
|
|
31044
31271
|
return result
|
|
31045
31272
|
? {
|
|
@@ -31067,16 +31294,16 @@ var ScalarCase = class extends ScalarExpression {
|
|
|
31067
31294
|
isEqual(this.conditions, other.conditions) && isEqual(this.elseExpression, other.elseExpression);
|
|
31068
31295
|
}
|
|
31069
31296
|
evaluate(item) {
|
|
31070
|
-
var
|
|
31297
|
+
var _j, _k;
|
|
31071
31298
|
var _a, _b;
|
|
31072
|
-
const value = (
|
|
31299
|
+
const value = (_j = ((_a = this.valueExpression) == null ? void 0 : _a.evaluate(item))) !== null && _j !== void 0 ? _j : null;
|
|
31073
31300
|
for (const { whenExpression, thenExpression, } of this.conditions) {
|
|
31074
31301
|
const when = whenExpression.evaluate(item);
|
|
31075
31302
|
const isMatching = this.valueExpression ? DatabaseValue.equal(when, value, this.collation) : convertToBoolean(when);
|
|
31076
31303
|
if (isMatching)
|
|
31077
31304
|
return thenExpression.evaluate(item);
|
|
31078
31305
|
}
|
|
31079
|
-
return (
|
|
31306
|
+
return (_k = ((_b = this.elseExpression) == null ? void 0 : _b.evaluate(item))) !== null && _k !== void 0 ? _k : null;
|
|
31080
31307
|
}
|
|
31081
31308
|
canEvaluate() {
|
|
31082
31309
|
const expressions = [];
|
|
@@ -31095,13 +31322,13 @@ var ScalarCase = class extends ScalarExpression {
|
|
|
31095
31322
|
});
|
|
31096
31323
|
}
|
|
31097
31324
|
};
|
|
31098
|
-
var ScalarCaseCondition = class {
|
|
31325
|
+
var ScalarCaseCondition = /*#__PURE__*/ class {
|
|
31099
31326
|
constructor(whenExpression, thenExpression) {
|
|
31100
31327
|
this.whenExpression = whenExpression;
|
|
31101
31328
|
this.thenExpression = thenExpression;
|
|
31102
31329
|
}
|
|
31103
31330
|
};
|
|
31104
|
-
var ScalarUnaryOperation = class extends ScalarExpression {
|
|
31331
|
+
var ScalarUnaryOperation = /*#__PURE__*/ class extends ScalarExpression {
|
|
31105
31332
|
constructor(valueExpression) {
|
|
31106
31333
|
super();
|
|
31107
31334
|
this.valueExpression = valueExpression;
|
|
@@ -31114,7 +31341,7 @@ var ScalarUnaryOperation = class extends ScalarExpression {
|
|
|
31114
31341
|
return this.valueExpression.canEvaluate();
|
|
31115
31342
|
}
|
|
31116
31343
|
};
|
|
31117
|
-
var ScalarUnaryOperationNot = class extends ScalarUnaryOperation {
|
|
31344
|
+
var ScalarUnaryOperationNot = /*#__PURE__*/ class extends ScalarUnaryOperation {
|
|
31118
31345
|
constructor() {
|
|
31119
31346
|
super(...arguments);
|
|
31120
31347
|
__publicField(this, 'definition', ScalarUnaryOperationNot.getDefinition());
|
|
@@ -31136,7 +31363,7 @@ var ScalarUnaryOperationNot = class extends ScalarUnaryOperation {
|
|
|
31136
31363
|
};
|
|
31137
31364
|
}
|
|
31138
31365
|
};
|
|
31139
|
-
var ScalarLogicalOperation = class extends ScalarExpression {
|
|
31366
|
+
var ScalarLogicalOperation = /*#__PURE__*/ class extends ScalarExpression {
|
|
31140
31367
|
constructor(operandExpressions) {
|
|
31141
31368
|
super();
|
|
31142
31369
|
this.operandExpressions = operandExpressions;
|
|
@@ -31161,7 +31388,7 @@ var ScalarLogicalOperation = class extends ScalarExpression {
|
|
|
31161
31388
|
});
|
|
31162
31389
|
}
|
|
31163
31390
|
};
|
|
31164
|
-
var ScalarLogicalOperationAnd = class extends ScalarLogicalOperation {
|
|
31391
|
+
var ScalarLogicalOperationAnd = /*#__PURE__*/ class extends ScalarLogicalOperation {
|
|
31165
31392
|
constructor() {
|
|
31166
31393
|
super(...arguments);
|
|
31167
31394
|
__publicField(this, 'operator', 'AND');
|
|
@@ -31177,7 +31404,7 @@ var ScalarLogicalOperationAnd = class extends ScalarLogicalOperation {
|
|
|
31177
31404
|
};
|
|
31178
31405
|
}
|
|
31179
31406
|
};
|
|
31180
|
-
var ScalarLogicalOperationOr = class extends ScalarLogicalOperation {
|
|
31407
|
+
var ScalarLogicalOperationOr = /*#__PURE__*/ class extends ScalarLogicalOperation {
|
|
31181
31408
|
constructor() {
|
|
31182
31409
|
super(...arguments);
|
|
31183
31410
|
__publicField(this, 'operator', 'OR');
|
|
@@ -31193,7 +31420,7 @@ var ScalarLogicalOperationOr = class extends ScalarLogicalOperation {
|
|
|
31193
31420
|
};
|
|
31194
31421
|
}
|
|
31195
31422
|
};
|
|
31196
|
-
var ScalarComparison = class extends ScalarExpression {
|
|
31423
|
+
var ScalarComparison = /*#__PURE__*/ class extends ScalarExpression {
|
|
31197
31424
|
constructor(leftExpression, rightExpression) {
|
|
31198
31425
|
super();
|
|
31199
31426
|
this.leftExpression = leftExpression;
|
|
@@ -31221,7 +31448,7 @@ var ScalarComparison = class extends ScalarExpression {
|
|
|
31221
31448
|
return this.leftExpression.canEvaluate() && this.rightExpression.canEvaluate();
|
|
31222
31449
|
}
|
|
31223
31450
|
};
|
|
31224
|
-
var ScalarComparisonEquals = class extends ScalarComparison {
|
|
31451
|
+
var ScalarComparisonEquals = /*#__PURE__*/ class extends ScalarComparison {
|
|
31225
31452
|
constructor() {
|
|
31226
31453
|
super(...arguments);
|
|
31227
31454
|
__publicField(this, 'operator', '=');
|
|
@@ -31235,7 +31462,7 @@ var ScalarComparisonEquals = class extends ScalarComparison {
|
|
|
31235
31462
|
};
|
|
31236
31463
|
}
|
|
31237
31464
|
};
|
|
31238
|
-
var ScalarComparisonNotEquals = class extends ScalarComparison {
|
|
31465
|
+
var ScalarComparisonNotEquals = /*#__PURE__*/ class extends ScalarComparison {
|
|
31239
31466
|
constructor() {
|
|
31240
31467
|
super(...arguments);
|
|
31241
31468
|
__publicField(this, 'operator', '!=');
|
|
@@ -31249,7 +31476,7 @@ var ScalarComparisonNotEquals = class extends ScalarComparison {
|
|
|
31249
31476
|
};
|
|
31250
31477
|
}
|
|
31251
31478
|
};
|
|
31252
|
-
var ScalarComparisonLessThan = class extends ScalarComparison {
|
|
31479
|
+
var ScalarComparisonLessThan = /*#__PURE__*/ class extends ScalarComparison {
|
|
31253
31480
|
constructor() {
|
|
31254
31481
|
super(...arguments);
|
|
31255
31482
|
__publicField(this, 'operator', '<');
|
|
@@ -31263,7 +31490,7 @@ var ScalarComparisonLessThan = class extends ScalarComparison {
|
|
|
31263
31490
|
};
|
|
31264
31491
|
}
|
|
31265
31492
|
};
|
|
31266
|
-
var ScalarComparisonLessThanOrEqual = class extends ScalarComparison {
|
|
31493
|
+
var ScalarComparisonLessThanOrEqual = /*#__PURE__*/ class extends ScalarComparison {
|
|
31267
31494
|
constructor() {
|
|
31268
31495
|
super(...arguments);
|
|
31269
31496
|
__publicField(this, 'operator', '<=');
|
|
@@ -31277,7 +31504,7 @@ var ScalarComparisonLessThanOrEqual = class extends ScalarComparison {
|
|
|
31277
31504
|
};
|
|
31278
31505
|
}
|
|
31279
31506
|
};
|
|
31280
|
-
var ScalarComparisonGreaterThan = class extends ScalarComparison {
|
|
31507
|
+
var ScalarComparisonGreaterThan = /*#__PURE__*/ class extends ScalarComparison {
|
|
31281
31508
|
constructor() {
|
|
31282
31509
|
super(...arguments);
|
|
31283
31510
|
__publicField(this, 'operator', '>');
|
|
@@ -31291,7 +31518,7 @@ var ScalarComparisonGreaterThan = class extends ScalarComparison {
|
|
|
31291
31518
|
};
|
|
31292
31519
|
}
|
|
31293
31520
|
};
|
|
31294
|
-
var ScalarComparisonGreaterThanOrEqual = class extends ScalarComparison {
|
|
31521
|
+
var ScalarComparisonGreaterThanOrEqual = /*#__PURE__*/ class extends ScalarComparison {
|
|
31295
31522
|
constructor() {
|
|
31296
31523
|
super(...arguments);
|
|
31297
31524
|
__publicField(this, 'operator', '>=');
|
|
@@ -31305,7 +31532,7 @@ var ScalarComparisonGreaterThanOrEqual = class extends ScalarComparison {
|
|
|
31305
31532
|
};
|
|
31306
31533
|
}
|
|
31307
31534
|
};
|
|
31308
|
-
var ScalarTypeCast = class extends ScalarExpression {
|
|
31535
|
+
var ScalarTypeCast = /*#__PURE__*/ class extends ScalarExpression {
|
|
31309
31536
|
constructor(valueExpression) {
|
|
31310
31537
|
super();
|
|
31311
31538
|
this.valueExpression = valueExpression;
|
|
@@ -31321,7 +31548,7 @@ var ScalarTypeCast = class extends ScalarExpression {
|
|
|
31321
31548
|
return this.valueExpression.canEvaluate();
|
|
31322
31549
|
}
|
|
31323
31550
|
};
|
|
31324
|
-
var ScalarTypeCastBoolean = class extends ScalarTypeCast {
|
|
31551
|
+
var ScalarTypeCastBoolean = /*#__PURE__*/ class extends ScalarTypeCast {
|
|
31325
31552
|
constructor() {
|
|
31326
31553
|
super(...arguments);
|
|
31327
31554
|
__publicField(this, 'dataType', 'BOOLEAN');
|
|
@@ -31351,7 +31578,7 @@ function convertToBoolean(value) {
|
|
|
31351
31578
|
}
|
|
31352
31579
|
return false;
|
|
31353
31580
|
}
|
|
31354
|
-
var ScalarTypeCastDate = class extends ScalarTypeCast {
|
|
31581
|
+
var ScalarTypeCastDate = /*#__PURE__*/ class extends ScalarTypeCast {
|
|
31355
31582
|
constructor() {
|
|
31356
31583
|
super(...arguments);
|
|
31357
31584
|
__publicField(this, 'dataType', 'DATE');
|
|
@@ -31389,7 +31616,7 @@ function convertToDate(value) {
|
|
|
31389
31616
|
}
|
|
31390
31617
|
return null;
|
|
31391
31618
|
}
|
|
31392
|
-
var ScalarTypeCastNumber = class extends ScalarTypeCast {
|
|
31619
|
+
var ScalarTypeCastNumber = /*#__PURE__*/ class extends ScalarTypeCast {
|
|
31393
31620
|
constructor() {
|
|
31394
31621
|
super(...arguments);
|
|
31395
31622
|
__publicField(this, 'dataType', 'NUMBER');
|
|
@@ -31426,7 +31653,7 @@ function convertToNumber(value) {
|
|
|
31426
31653
|
}
|
|
31427
31654
|
return null;
|
|
31428
31655
|
}
|
|
31429
|
-
var ScalarTypeCastString = class extends ScalarTypeCast {
|
|
31656
|
+
var ScalarTypeCastString = /*#__PURE__*/ class extends ScalarTypeCast {
|
|
31430
31657
|
constructor() {
|
|
31431
31658
|
super(...arguments);
|
|
31432
31659
|
__publicField(this, 'dataType', 'STRING');
|
|
@@ -31801,7 +32028,7 @@ function getFunctionCallType(expression) {
|
|
|
31801
32028
|
}
|
|
31802
32029
|
}
|
|
31803
32030
|
function getCaseType(expression, schema) {
|
|
31804
|
-
var
|
|
32031
|
+
var _j;
|
|
31805
32032
|
const definitions = [];
|
|
31806
32033
|
for (const condition of expression.conditions) {
|
|
31807
32034
|
const type = getExpressionType(condition.then, schema);
|
|
@@ -31813,7 +32040,7 @@ function getCaseType(expression, schema) {
|
|
|
31813
32040
|
if (!isUndefined(type))
|
|
31814
32041
|
definitions.push(type);
|
|
31815
32042
|
}
|
|
31816
|
-
return (
|
|
32043
|
+
return (_j = ScalarCase.getDefinition(definitions)) !== null && _j !== void 0 ? _j : void 0;
|
|
31817
32044
|
}
|
|
31818
32045
|
function getUnaryOperationType(expression) {
|
|
31819
32046
|
switch (expression.operator) {
|
|
@@ -31859,7 +32086,7 @@ function stringifyExecutionTime(self2, total) {
|
|
|
31859
32086
|
function stringifyItems(items) {
|
|
31860
32087
|
return `(items: ${items})`;
|
|
31861
32088
|
}
|
|
31862
|
-
var QueryPlan = class {
|
|
32089
|
+
var QueryPlan = /*#__PURE__*/ class {
|
|
31863
32090
|
constructor() {
|
|
31864
32091
|
__publicField(this, 'executionTime', 0);
|
|
31865
32092
|
__publicField(this, 'itemCount', 0);
|
|
@@ -31874,7 +32101,7 @@ var QueryPlan = class {
|
|
|
31874
32101
|
});
|
|
31875
32102
|
}
|
|
31876
32103
|
};
|
|
31877
|
-
var ScanCollectionPlan = class extends QueryPlan {
|
|
32104
|
+
var ScanCollectionPlan = /*#__PURE__*/ class extends QueryPlan {
|
|
31878
32105
|
constructor(collection) {
|
|
31879
32106
|
super();
|
|
31880
32107
|
this.collection = collection;
|
|
@@ -31890,7 +32117,7 @@ var ScanCollectionPlan = class extends QueryPlan {
|
|
|
31890
32117
|
});
|
|
31891
32118
|
}
|
|
31892
32119
|
};
|
|
31893
|
-
var LookupIndexPlan = class extends QueryPlan {
|
|
32120
|
+
var LookupIndexPlan = /*#__PURE__*/ class extends QueryPlan {
|
|
31894
32121
|
constructor(index, query) {
|
|
31895
32122
|
super();
|
|
31896
32123
|
this.index = index;
|
|
@@ -31934,13 +32161,13 @@ var LookupIndexPlan = class extends QueryPlan {
|
|
|
31934
32161
|
});
|
|
31935
32162
|
}
|
|
31936
32163
|
};
|
|
31937
|
-
var UnionPlan = class extends QueryPlan {
|
|
32164
|
+
var UnionPlan = /*#__PURE__*/ class extends QueryPlan {
|
|
31938
32165
|
constructor(childPlans) {
|
|
31939
32166
|
super();
|
|
31940
32167
|
this.childPlans = childPlans;
|
|
31941
32168
|
}
|
|
31942
32169
|
inspect() {
|
|
31943
|
-
const childPlansTime = Math.max(...this.childPlans.map((childPlan) => { var
|
|
32170
|
+
const childPlansTime = Math.max(...this.childPlans.map((childPlan) => { var _j; return (_j = childPlan.executionTime) !== null && _j !== void 0 ? _j : 0; }));
|
|
31944
32171
|
return {
|
|
31945
32172
|
label: `UnionPlan ${stringifyExecutionTime(this.executionTime - childPlansTime, this.executionTime)} ${stringifyItems(this.itemCount)}`,
|
|
31946
32173
|
nodes: this.childPlans.map((childPlan) => childPlan.inspect()),
|
|
@@ -31948,7 +32175,7 @@ var UnionPlan = class extends QueryPlan {
|
|
|
31948
32175
|
}
|
|
31949
32176
|
_execute() {
|
|
31950
32177
|
return __awaiter(this, void 0, void 0, function* () {
|
|
31951
|
-
var
|
|
32178
|
+
var _j;
|
|
31952
32179
|
const childItemMaps = yield Promise.all(this.childPlans.map((childPlan) => __awaiter(this, void 0, void 0, function* () {
|
|
31953
32180
|
const items = yield childPlan.execute();
|
|
31954
32181
|
return new DatabaseItemMap(items);
|
|
@@ -31962,17 +32189,17 @@ var UnionPlan = class extends QueryPlan {
|
|
|
31962
32189
|
result = itemMap;
|
|
31963
32190
|
}
|
|
31964
32191
|
}
|
|
31965
|
-
return (
|
|
32192
|
+
return (_j = (result == null ? void 0 : result.items())) !== null && _j !== void 0 ? _j : [];
|
|
31966
32193
|
});
|
|
31967
32194
|
}
|
|
31968
32195
|
};
|
|
31969
|
-
var IntersectionPlan = class extends QueryPlan {
|
|
32196
|
+
var IntersectionPlan = /*#__PURE__*/ class extends QueryPlan {
|
|
31970
32197
|
constructor(childPlans) {
|
|
31971
32198
|
super();
|
|
31972
32199
|
this.childPlans = childPlans;
|
|
31973
32200
|
}
|
|
31974
32201
|
inspect() {
|
|
31975
|
-
const childPlansTime = Math.max(...this.childPlans.map((childPlan) => { var
|
|
32202
|
+
const childPlansTime = Math.max(...this.childPlans.map((childPlan) => { var _j; return (_j = childPlan.executionTime) !== null && _j !== void 0 ? _j : 0; }));
|
|
31976
32203
|
return {
|
|
31977
32204
|
label: `IntersectionPlan ${stringifyExecutionTime(this.executionTime - childPlansTime, this.executionTime)} ${stringifyItems(this.itemCount)} ${stringifyItems(this.itemCount)}`,
|
|
31978
32205
|
nodes: this.childPlans.map((childPlan) => childPlan.inspect()),
|
|
@@ -31980,7 +32207,7 @@ var IntersectionPlan = class extends QueryPlan {
|
|
|
31980
32207
|
}
|
|
31981
32208
|
_execute() {
|
|
31982
32209
|
return __awaiter(this, void 0, void 0, function* () {
|
|
31983
|
-
var
|
|
32210
|
+
var _j;
|
|
31984
32211
|
const childItemMaps = yield Promise.all(this.childPlans.map((childPlan) => __awaiter(this, void 0, void 0, function* () {
|
|
31985
32212
|
const items = yield childPlan.execute();
|
|
31986
32213
|
return new DatabaseItemMap(items);
|
|
@@ -31994,11 +32221,11 @@ var IntersectionPlan = class extends QueryPlan {
|
|
|
31994
32221
|
result = itemMap;
|
|
31995
32222
|
}
|
|
31996
32223
|
}
|
|
31997
|
-
return (
|
|
32224
|
+
return (_j = (result == null ? void 0 : result.items())) !== null && _j !== void 0 ? _j : [];
|
|
31998
32225
|
});
|
|
31999
32226
|
}
|
|
32000
32227
|
};
|
|
32001
|
-
var ResolveItemsPlan = class extends QueryPlan {
|
|
32228
|
+
var ResolveItemsPlan = /*#__PURE__*/ class extends QueryPlan {
|
|
32002
32229
|
constructor(childPlan, collection, richTextResolver, select) {
|
|
32003
32230
|
super();
|
|
32004
32231
|
this.childPlan = childPlan;
|
|
@@ -32030,7 +32257,7 @@ var ResolveItemsPlan = class extends QueryPlan {
|
|
|
32030
32257
|
});
|
|
32031
32258
|
}
|
|
32032
32259
|
};
|
|
32033
|
-
var FilterItemsPlan = class extends QueryPlan {
|
|
32260
|
+
var FilterItemsPlan = /*#__PURE__*/ class extends QueryPlan {
|
|
32034
32261
|
constructor(childPlan, filterExpression) {
|
|
32035
32262
|
super();
|
|
32036
32263
|
this.childPlan = childPlan;
|
|
@@ -32052,7 +32279,7 @@ var FilterItemsPlan = class extends QueryPlan {
|
|
|
32052
32279
|
});
|
|
32053
32280
|
}
|
|
32054
32281
|
};
|
|
32055
|
-
var SortItemsPlan = class extends QueryPlan {
|
|
32282
|
+
var SortItemsPlan = /*#__PURE__*/ class extends QueryPlan {
|
|
32056
32283
|
constructor(childPlan, orderExpressions, collection) {
|
|
32057
32284
|
super();
|
|
32058
32285
|
this.childPlan = childPlan;
|
|
@@ -32095,14 +32322,14 @@ var SortItemsPlan = class extends QueryPlan {
|
|
|
32095
32322
|
});
|
|
32096
32323
|
}
|
|
32097
32324
|
};
|
|
32098
|
-
var ScalarOrderExpression = class {
|
|
32325
|
+
var ScalarOrderExpression = /*#__PURE__*/ class {
|
|
32099
32326
|
constructor(expression, direction, collation) {
|
|
32100
32327
|
this.expression = expression;
|
|
32101
32328
|
this.direction = direction;
|
|
32102
32329
|
this.collation = collation;
|
|
32103
32330
|
}
|
|
32104
32331
|
};
|
|
32105
|
-
var SliceItemsPlan = class extends QueryPlan {
|
|
32332
|
+
var SliceItemsPlan = /*#__PURE__*/ class extends QueryPlan {
|
|
32106
32333
|
constructor(childPlan, offsetExpression, limitExpression) {
|
|
32107
32334
|
super();
|
|
32108
32335
|
this.childPlan = childPlan;
|
|
@@ -32110,10 +32337,10 @@ var SliceItemsPlan = class extends QueryPlan {
|
|
|
32110
32337
|
this.limitExpression = limitExpression;
|
|
32111
32338
|
}
|
|
32112
32339
|
inspect() {
|
|
32113
|
-
var
|
|
32340
|
+
var _j, _k;
|
|
32114
32341
|
var _a, _b;
|
|
32115
32342
|
return {
|
|
32116
|
-
label: `SliceItemsPlan(LIMIT ${(
|
|
32343
|
+
label: `SliceItemsPlan(LIMIT ${(_j = ((_a = this.limitExpression) == null ? void 0 : _a.stringify())) !== null && _j !== void 0 ? _j : 'Infinity'}, OFFSET ${(_k = ((_b = this.offsetExpression) == null ? void 0 : _b.stringify())) !== null && _k !== void 0 ? _k : '0'}) ${stringifyExecutionTime(this.executionTime - this.childPlan.executionTime, this.executionTime)} ${stringifyItems(this.itemCount)}`,
|
|
32117
32344
|
nodes: [this.childPlan.inspect(),],
|
|
32118
32345
|
};
|
|
32119
32346
|
}
|
|
@@ -32133,15 +32360,15 @@ var SliceItemsPlan = class extends QueryPlan {
|
|
|
32133
32360
|
}
|
|
32134
32361
|
_execute() {
|
|
32135
32362
|
return __awaiter(this, void 0, void 0, function* () {
|
|
32136
|
-
var
|
|
32363
|
+
var _j, _k;
|
|
32137
32364
|
const childItems = yield this.childPlan.execute();
|
|
32138
|
-
const offset = (
|
|
32139
|
-
const limit = (
|
|
32365
|
+
const offset = (_j = this.getOffset()) !== null && _j !== void 0 ? _j : 0;
|
|
32366
|
+
const limit = (_k = this.getLimit()) !== null && _k !== void 0 ? _k : Infinity;
|
|
32140
32367
|
return childItems.slice(offset, offset + limit);
|
|
32141
32368
|
});
|
|
32142
32369
|
}
|
|
32143
32370
|
};
|
|
32144
|
-
var DatabaseItemMap = class extends Map {
|
|
32371
|
+
var DatabaseItemMap = /*#__PURE__*/ class extends Map {
|
|
32145
32372
|
constructor(items = []) {
|
|
32146
32373
|
super();
|
|
32147
32374
|
for (const item of items) {
|
|
@@ -32172,7 +32399,7 @@ var DatabaseItemMap = class extends Map {
|
|
|
32172
32399
|
return [...values,];
|
|
32173
32400
|
}
|
|
32174
32401
|
};
|
|
32175
|
-
var RichTextResolver = class {
|
|
32402
|
+
var RichTextResolver = /*#__PURE__*/ class {
|
|
32176
32403
|
constructor(collection) {
|
|
32177
32404
|
this.collection = collection;
|
|
32178
32405
|
__publicField(this, 'cache', /* @__PURE__ */ new Map());
|
|
@@ -32294,8 +32521,8 @@ function stringifyQuery(query) {
|
|
|
32294
32521
|
}
|
|
32295
32522
|
if (query.orderBy) {
|
|
32296
32523
|
queryString += ` ORDER BY ${query.orderBy.map((orderExpression) => {
|
|
32297
|
-
var
|
|
32298
|
-
return `${stringifyExpression(query.from.data, orderExpression)} ${(
|
|
32524
|
+
var _j;
|
|
32525
|
+
return `${stringifyExpression(query.from.data, orderExpression)} ${(_j = orderExpression.direction) !== null && _j !== void 0 ? _j : 'asc'}`;
|
|
32299
32526
|
}).join(', ')}`;
|
|
32300
32527
|
}
|
|
32301
32528
|
if (query.limit) {
|
|
@@ -32325,7 +32552,7 @@ function getDatabaseCollection({ data: data2, }, locale) {
|
|
|
32325
32552
|
}
|
|
32326
32553
|
assertNever(data2, 'Unsupported collection type');
|
|
32327
32554
|
}
|
|
32328
|
-
var QueryEngine = class {
|
|
32555
|
+
var QueryEngine = /*#__PURE__*/ class {
|
|
32329
32556
|
query(query, locale) {
|
|
32330
32557
|
return __awaiter(this, void 0, void 0, function* () {
|
|
32331
32558
|
const collection = getDatabaseCollection(query.from, locale);
|
|
@@ -32349,8 +32576,8 @@ ${(0, import_archy.default)(plan.inspect())}`);
|
|
|
32349
32576
|
const sortExpressions = (_a = query.orderBy) == null
|
|
32350
32577
|
? void 0
|
|
32351
32578
|
: _a.map((expression) => {
|
|
32352
|
-
var
|
|
32353
|
-
return new ScalarOrderExpression(ScalarExpression.from(expression, collection.schema), (
|
|
32579
|
+
var _j;
|
|
32580
|
+
return new ScalarOrderExpression(ScalarExpression.from(expression, collection.schema), (_j = expression.direction) !== null && _j !== void 0 ? _j : 'asc', {
|
|
32354
32581
|
type: 0,
|
|
32355
32582
|
/* CaseInsensitive */
|
|
32356
32583
|
});
|
|
@@ -32410,7 +32637,7 @@ function resolveValue(richTextResolver, value) {
|
|
|
32410
32637
|
});
|
|
32411
32638
|
}
|
|
32412
32639
|
function createPlanForWhereClause(collection, expression) {
|
|
32413
|
-
var
|
|
32640
|
+
var _j;
|
|
32414
32641
|
if (expression instanceof ScalarLogicalOperationAnd) {
|
|
32415
32642
|
const childPlans = expression.operandExpressions.map((expression2) => createPlanForWhereClause(collection, expression2));
|
|
32416
32643
|
return new IntersectionPlan(childPlans);
|
|
@@ -32419,7 +32646,7 @@ function createPlanForWhereClause(collection, expression) {
|
|
|
32419
32646
|
const childPlans = expression.operandExpressions.map((expression2) => createPlanForWhereClause(collection, expression2));
|
|
32420
32647
|
return new UnionPlan(childPlans);
|
|
32421
32648
|
}
|
|
32422
|
-
return (
|
|
32649
|
+
return (_j = findLookupIndexPlan(collection, expression)) !== null && _j !== void 0 ? _j : createScanCollectionPlan(collection, expression);
|
|
32423
32650
|
}
|
|
32424
32651
|
function findLookupIndexPlan(collection, expression) {
|
|
32425
32652
|
var _a, _b;
|
|
@@ -32545,7 +32772,7 @@ function createScanCollectionPlan(collection, expression) {
|
|
|
32545
32772
|
const plan = new ScanCollectionPlan(collection);
|
|
32546
32773
|
return new FilterItemsPlan(plan, expression);
|
|
32547
32774
|
}
|
|
32548
|
-
var AnimationCollector = class {
|
|
32775
|
+
var AnimationCollector = /*#__PURE__*/ class {
|
|
32549
32776
|
constructor() {
|
|
32550
32777
|
__publicField(this, 'entries', /* @__PURE__ */ new Map());
|
|
32551
32778
|
}
|
|
@@ -32715,9 +32942,9 @@ function activeBreakpointHashFromWindow(breakpoints) {
|
|
|
32715
32942
|
return (_a = breakpoints[0]) == null ? void 0 : _a.hash;
|
|
32716
32943
|
}
|
|
32717
32944
|
function useHydratedBreakpointVariants(initial, mediaQueries, hydratedWithInitial = true) {
|
|
32718
|
-
var
|
|
32945
|
+
var _j;
|
|
32719
32946
|
const isInitialNavigation = (0, react_3.useContext)(IsInitialNavigationContext);
|
|
32720
|
-
const baseVariant = (0, react_4.useRef)(isBrowser2() ? (
|
|
32947
|
+
const baseVariant = (0, react_4.useRef)(isBrowser2() ? (_j = activeMediaQueryFromWindow(mediaQueries)) !== null && _j !== void 0 ? _j : initial : initial);
|
|
32721
32948
|
const basePropsVariant = (0, react_4.useRef)(hydratedWithInitial && isInitialNavigation ? initial : baseVariant.current);
|
|
32722
32949
|
const forceUpdate = useForceUpdate3();
|
|
32723
32950
|
const instantTransition = useInstantTransition();
|
|
@@ -33212,7 +33439,7 @@ function usePrototypeNavigate({ preload, } = {}) {
|
|
|
33212
33439
|
});
|
|
33213
33440
|
}
|
|
33214
33441
|
exports.usePrototypeNavigate = usePrototypeNavigate;
|
|
33215
|
-
var QueryCache = class {
|
|
33442
|
+
var QueryCache = /*#__PURE__*/ class {
|
|
33216
33443
|
constructor(queryEngine2) {
|
|
33217
33444
|
this.queryEngine = queryEngine2;
|
|
33218
33445
|
__publicField(this, 'cache', /* @__PURE__ */ new Map());
|
|
@@ -33237,11 +33464,11 @@ function getCollectionId(collection) {
|
|
|
33237
33464
|
collectionIds.set(collection, id3);
|
|
33238
33465
|
return id3;
|
|
33239
33466
|
}
|
|
33240
|
-
function getCacheKey(
|
|
33241
|
-
var
|
|
33242
|
-
var { from } =
|
|
33467
|
+
function getCacheKey(_j, locale) {
|
|
33468
|
+
var _k;
|
|
33469
|
+
var { from } = _j, query = __rest(_j, ["from"]);
|
|
33243
33470
|
const fromId = getCollectionId(from.data);
|
|
33244
|
-
const localeId = (
|
|
33471
|
+
const localeId = (_k = (locale == null ? void 0 : locale.id)) !== null && _k !== void 0 ? _k : 'default';
|
|
33245
33472
|
return fromId + JSON.stringify(query) + localeId;
|
|
33246
33473
|
}
|
|
33247
33474
|
function use(promise) {
|
|
@@ -33305,16 +33532,16 @@ exports.getWhereExpressionFromPathVariables = getWhereExpressionFromPathVariable
|
|
|
33305
33532
|
function useLoadMorePaginatedQuery(query, pageSize, hash2) {
|
|
33306
33533
|
const count = useQueryCount(query);
|
|
33307
33534
|
const [paginationInfo, setPaginationInfo,] = (0, react_10.useState)(() => {
|
|
33308
|
-
var
|
|
33535
|
+
var _j;
|
|
33309
33536
|
var _a, _b, _c, _d;
|
|
33310
33537
|
const totalPages = Math.ceil(count / pageSize);
|
|
33311
|
-
const currentPage = (
|
|
33538
|
+
const currentPage = (_j = ((_d = (_c = (_b = (_a = globalThis == null ? void 0 : globalThis.history) == null ? void 0 : _a.state) == null
|
|
33312
33539
|
? void 0
|
|
33313
33540
|
: _b.paginationInfo) == null
|
|
33314
33541
|
? void 0
|
|
33315
33542
|
: _c[hash2]) == null
|
|
33316
33543
|
? void 0
|
|
33317
|
-
: _d.currentPage)) !== null &&
|
|
33544
|
+
: _d.currentPage)) !== null && _j !== void 0 ? _j : 1;
|
|
33318
33545
|
return {
|
|
33319
33546
|
currentPage,
|
|
33320
33547
|
totalPages,
|
|
@@ -33529,17 +33756,17 @@ function extractMappingFromInfo(info) {
|
|
|
33529
33756
|
try {
|
|
33530
33757
|
return JSON.parse(json);
|
|
33531
33758
|
}
|
|
33532
|
-
catch (
|
|
33759
|
+
catch (_j) {
|
|
33533
33760
|
return void 0;
|
|
33534
33761
|
}
|
|
33535
33762
|
}
|
|
33536
33763
|
function withMappedReactProps(Component15, info) {
|
|
33537
33764
|
return (rawProps) => {
|
|
33538
|
-
var
|
|
33765
|
+
var _j;
|
|
33539
33766
|
const props = {};
|
|
33540
33767
|
const mapping = extractMappingFromInfo(info);
|
|
33541
33768
|
for (const key7 in rawProps) {
|
|
33542
|
-
asRecord(props)[(
|
|
33769
|
+
asRecord(props)[(_j = (mapping == null ? void 0 : mapping[key7])) !== null && _j !== void 0 ? _j : key7] = rawProps[key7];
|
|
33543
33770
|
}
|
|
33544
33771
|
return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(Component15, Object.assign({}, props));
|
|
33545
33772
|
};
|
|
@@ -33624,7 +33851,7 @@ var withVariantAppearEffect = (Component15) => react_12.default.forwardRef((prop
|
|
|
33624
33851
|
const playedState = {};
|
|
33625
33852
|
let currentVariant = void 0;
|
|
33626
33853
|
return scrollInfo(({ y: scrollY, }) => {
|
|
33627
|
-
var
|
|
33854
|
+
var _j;
|
|
33628
33855
|
var _a;
|
|
33629
33856
|
if (!targets[0] || targets[0].ref && !targets[0].ref.current)
|
|
33630
33857
|
return;
|
|
@@ -33635,7 +33862,7 @@ var withVariantAppearEffect = (Component15) => react_12.default.forwardRef((prop
|
|
|
33635
33862
|
if (animateOnce && playedState[index])
|
|
33636
33863
|
return;
|
|
33637
33864
|
playedState[index] = true;
|
|
33638
|
-
const variant = (
|
|
33865
|
+
const variant = (_j = ((_a = targets[index]) == null ? void 0 : _a.target)) !== null && _j !== void 0 ? _j : void 0;
|
|
33639
33866
|
if (variant === currentVariant)
|
|
33640
33867
|
return;
|
|
33641
33868
|
currentVariant = variant;
|
|
@@ -33654,8 +33881,8 @@ var withVariantAppearEffect = (Component15) => react_12.default.forwardRef((prop
|
|
|
33654
33881
|
}
|
|
33655
33882
|
});
|
|
33656
33883
|
exports.withVariantAppearEffect = withVariantAppearEffect;
|
|
33657
|
-
var withVariantFX = (Component15) => react_12.default.forwardRef((
|
|
33658
|
-
var { initial, animate: animate3, exit } =
|
|
33884
|
+
var withVariantFX = (Component15) => react_12.default.forwardRef((_j, forwardedRef) => {
|
|
33885
|
+
var { initial, animate: animate3, exit } = _j, props = __rest(_j, ["initial", "animate", "exit"]);
|
|
33659
33886
|
const ref = (0, react_4.useRef)();
|
|
33660
33887
|
const effect = usePresenceAnimation({
|
|
33661
33888
|
initial,
|
|
@@ -34280,7 +34507,7 @@ var FontSourceNames = /* @__PURE__ */ ((FontSourceNames2) => {
|
|
|
34280
34507
|
exports.FontSourceNames = FontSourceNames;
|
|
34281
34508
|
var systemFontFamilyName = 'System Default';
|
|
34282
34509
|
exports.systemFontFamilyName = systemFontFamilyName;
|
|
34283
|
-
var LocalFontSource = class {
|
|
34510
|
+
var LocalFontSource = /*#__PURE__*/ class {
|
|
34284
34511
|
constructor() {
|
|
34285
34512
|
__publicField(this, 'name', 'local');
|
|
34286
34513
|
__publicField(this, 'fontFamilies', []);
|
|
@@ -34289,8 +34516,8 @@ var LocalFontSource = class {
|
|
|
34289
34516
|
__publicField(this, 'fontAliases', /* @__PURE__ */ new Map());
|
|
34290
34517
|
}
|
|
34291
34518
|
getFontFamilyByName(family) {
|
|
34292
|
-
var
|
|
34293
|
-
return (
|
|
34519
|
+
var _j;
|
|
34520
|
+
return (_j = this.byFamilyName.get(family)) !== null && _j !== void 0 ? _j : null;
|
|
34294
34521
|
}
|
|
34295
34522
|
// TODO: these are duplicated across implementations of FontSource
|
|
34296
34523
|
// When adding a third source, we should abstract them
|
|
@@ -34356,8 +34583,8 @@ var LocalFontSource = class {
|
|
|
34356
34583
|
};
|
|
34357
34584
|
const aliases = /* @__PURE__ */ new Map();
|
|
34358
34585
|
const weights = [400, 100, 200, 300, 500, 600, 700, 800, 900,];
|
|
34359
|
-
const
|
|
34360
|
-
for (const style of
|
|
34586
|
+
const styles4 = ['normal', 'italic',];
|
|
34587
|
+
for (const style of styles4) {
|
|
34361
34588
|
for (const weight of weights) {
|
|
34362
34589
|
const variant = createVariantName(weight, style);
|
|
34363
34590
|
const alias = `__SystemDefault-${weight}-${style}__`;
|
|
@@ -34420,7 +34647,7 @@ function getCustomFontName(fileName, properties) {
|
|
|
34420
34647
|
const variant = properties.font.preferredSubFamily === '' ? properties.font.fontSubFamily : properties.font.preferredSubFamily;
|
|
34421
34648
|
return `${fontFamily} ${variant}`;
|
|
34422
34649
|
}
|
|
34423
|
-
var CustomFontSource = class {
|
|
34650
|
+
var CustomFontSource = /*#__PURE__*/ class {
|
|
34424
34651
|
constructor() {
|
|
34425
34652
|
__publicField(this, 'name', 'custom');
|
|
34426
34653
|
__publicField(this, 'fontFamilies', []);
|
|
@@ -34532,7 +34759,7 @@ var CustomFontSource = class {
|
|
|
34532
34759
|
}
|
|
34533
34760
|
};
|
|
34534
34761
|
function getFontVariants(currentVariant, variants, parseVariant) {
|
|
34535
|
-
var
|
|
34762
|
+
var _j, _k, _l, _m, _o, _p, _q, _t, _u, _w, _x;
|
|
34536
34763
|
if (variants.length === 0)
|
|
34537
34764
|
return {};
|
|
34538
34765
|
const currentVariantInfo = parseVariant(currentVariant);
|
|
@@ -34554,20 +34781,20 @@ function getFontVariants(currentVariant, variants, parseVariant) {
|
|
|
34554
34781
|
}
|
|
34555
34782
|
});
|
|
34556
34783
|
let variantBold = boldVariantByStyle.get(currentStyle);
|
|
34557
|
-
let variantBoldItalic = (
|
|
34784
|
+
let variantBoldItalic = (_j = boldVariantByStyle.get('italic')) !== null && _j !== void 0 ? _j : boldVariantByStyle.get('oblique');
|
|
34558
34785
|
if (currentVariantInfo.weight <= 300) {
|
|
34559
|
-
variantBold = (
|
|
34560
|
-
variantBoldItalic = (
|
|
34786
|
+
variantBold = (_k = variantByWeightAndStyle.get(`400-${currentStyle}`)) !== null && _k !== void 0 ? _k : variantBold;
|
|
34787
|
+
variantBoldItalic = (_m = (_l = variantByWeightAndStyle.get('400-italic')) !== null && _l !== void 0 ? _l : variantByWeightAndStyle.get('400-oblique')) !== null && _m !== void 0 ? _m : variantBoldItalic;
|
|
34561
34788
|
}
|
|
34562
34789
|
else if (currentVariantInfo.weight <= 500) {
|
|
34563
|
-
variantBold = (
|
|
34564
|
-
variantBoldItalic = (
|
|
34790
|
+
variantBold = (_o = variantByWeightAndStyle.get(`700-${currentStyle}`)) !== null && _o !== void 0 ? _o : variantBold;
|
|
34791
|
+
variantBoldItalic = (_q = (_p = variantByWeightAndStyle.get('700-italic')) !== null && _p !== void 0 ? _p : variantByWeightAndStyle.get('700-oblique')) !== null && _q !== void 0 ? _q : variantBoldItalic;
|
|
34565
34792
|
}
|
|
34566
34793
|
else {
|
|
34567
|
-
variantBold = (
|
|
34568
|
-
variantBoldItalic = (
|
|
34794
|
+
variantBold = (_t = variantByWeightAndStyle.get(`900-${currentStyle}`)) !== null && _t !== void 0 ? _t : variantBold;
|
|
34795
|
+
variantBoldItalic = (_w = (_u = variantByWeightAndStyle.get('900-italic')) !== null && _u !== void 0 ? _u : variantByWeightAndStyle.get('900-oblique')) !== null && _w !== void 0 ? _w : variantBoldItalic;
|
|
34569
34796
|
}
|
|
34570
|
-
const variantItalic = (
|
|
34797
|
+
const variantItalic = (_x = variantByWeightAndStyle.get(`${currentWeight}-italic`)) !== null && _x !== void 0 ? _x : variantByWeightAndStyle.get(`${currentWeight}-oblique`);
|
|
34571
34798
|
return {
|
|
34572
34799
|
variantBold,
|
|
34573
34800
|
variantItalic,
|
|
@@ -34601,15 +34828,15 @@ var weightNameToNumber = {
|
|
|
34601
34828
|
};
|
|
34602
34829
|
var weightNames = /* @__PURE__ */ Object.keys(weightNameToNumber);
|
|
34603
34830
|
var allowedVariantsRegex = /* @__PURE__ */ (() => new RegExp(`^(?:${[...weightNames, 'italic',].join('|')})`, 'u'))();
|
|
34604
|
-
var FontshareSource = class {
|
|
34831
|
+
var FontshareSource = /*#__PURE__*/ class {
|
|
34605
34832
|
constructor() {
|
|
34606
34833
|
__publicField(this, 'name', 'fontshare');
|
|
34607
34834
|
__publicField(this, 'fontFamilies', []);
|
|
34608
34835
|
__publicField(this, 'byFamilyName', /* @__PURE__ */ new Map());
|
|
34609
34836
|
}
|
|
34610
34837
|
getFontFamilyByName(family) {
|
|
34611
|
-
var
|
|
34612
|
-
return (
|
|
34838
|
+
var _j;
|
|
34839
|
+
return (_j = this.byFamilyName.get(family)) !== null && _j !== void 0 ? _j : null;
|
|
34613
34840
|
}
|
|
34614
34841
|
/**
|
|
34615
34842
|
* Parses variant a string into a weight number and style, defaulting to a
|
|
@@ -34733,15 +34960,15 @@ var weightNameToNumber2 = {
|
|
|
34733
34960
|
ExtraBold: 800,
|
|
34734
34961
|
Black: 900,
|
|
34735
34962
|
};
|
|
34736
|
-
var FramerFontSource = class {
|
|
34963
|
+
var FramerFontSource = /*#__PURE__*/ class {
|
|
34737
34964
|
constructor() {
|
|
34738
34965
|
__publicField(this, 'name', 'framer');
|
|
34739
34966
|
__publicField(this, 'fontFamilies', []);
|
|
34740
34967
|
__publicField(this, 'byFamilyName', /* @__PURE__ */ new Map());
|
|
34741
34968
|
}
|
|
34742
34969
|
getFontFamilyByName(family) {
|
|
34743
|
-
var
|
|
34744
|
-
return (
|
|
34970
|
+
var _j;
|
|
34971
|
+
return (_j = this.byFamilyName.get(family)) !== null && _j !== void 0 ? _j : null;
|
|
34745
34972
|
}
|
|
34746
34973
|
addFontFamily(familyName) {
|
|
34747
34974
|
const fontFamily = {
|
|
@@ -34790,15 +35017,15 @@ var FramerFontSource = class {
|
|
|
34790
35017
|
}
|
|
34791
35018
|
};
|
|
34792
35019
|
var googleFontSelectorPrefix = 'GF;';
|
|
34793
|
-
var GoogleFontSource = class {
|
|
35020
|
+
var GoogleFontSource = /*#__PURE__*/ class {
|
|
34794
35021
|
constructor() {
|
|
34795
35022
|
__publicField(this, 'name', 'google');
|
|
34796
35023
|
__publicField(this, 'fontFamilies', []);
|
|
34797
35024
|
__publicField(this, 'byFamilyName', /* @__PURE__ */ new Map());
|
|
34798
35025
|
}
|
|
34799
35026
|
getFontFamilyByName(family) {
|
|
34800
|
-
var
|
|
34801
|
-
return (
|
|
35027
|
+
var _j;
|
|
35028
|
+
return (_j = this.byFamilyName.get(family)) !== null && _j !== void 0 ? _j : null;
|
|
34802
35029
|
}
|
|
34803
35030
|
static parseVariant(variant) {
|
|
34804
35031
|
if (variant === 'regular') {
|
|
@@ -34851,14 +35078,14 @@ var GoogleFontSource = class {
|
|
|
34851
35078
|
const fonts = [];
|
|
34852
35079
|
webFonts.forEach((webFont) => {
|
|
34853
35080
|
webFont.variants.forEach((variant) => {
|
|
34854
|
-
var
|
|
35081
|
+
var _j;
|
|
34855
35082
|
var _a;
|
|
34856
35083
|
const family = webFont.family;
|
|
34857
35084
|
let fontFamily = this.getFontFamilyByName(family);
|
|
34858
35085
|
if (!fontFamily) {
|
|
34859
35086
|
fontFamily = this.addFontFamily(family);
|
|
34860
35087
|
}
|
|
34861
|
-
const variantInfo = (
|
|
35088
|
+
const variantInfo = (_j = GoogleFontSource.parseVariant(variant)) !== null && _j !== void 0 ? _j : {};
|
|
34862
35089
|
const { weight, style, } = variantInfo;
|
|
34863
35090
|
const selector = GoogleFontSource.createSelector(family, variant);
|
|
34864
35091
|
const { variantBold, variantItalic, variantBoldItalic, } = getFontVariants(variant, webFont.variants, GoogleFontSource.parseVariant);
|
|
@@ -34896,7 +35123,7 @@ function mapToKnownCategory2(category) {
|
|
|
34896
35123
|
var import_fontfaceobserver = __toESM(require_fontfaceobserver_standalone(), 1);
|
|
34897
35124
|
var FONT_LOADING_TIMEOUT = 5e3;
|
|
34898
35125
|
var MAX_RETRIES = 3;
|
|
34899
|
-
var FontLoadingError = class extends Error {
|
|
35126
|
+
var FontLoadingError = /*#__PURE__*/ class extends Error {
|
|
34900
35127
|
constructor(message) {
|
|
34901
35128
|
super(message);
|
|
34902
35129
|
this.name = 'FontLoadingError';
|
|
@@ -34966,7 +35193,7 @@ function isFontReady(family, style, weight) {
|
|
|
34966
35193
|
}
|
|
34967
35194
|
});
|
|
34968
35195
|
}
|
|
34969
|
-
var FontStore = class {
|
|
35196
|
+
var FontStore = /*#__PURE__*/ class {
|
|
34970
35197
|
constructor() {
|
|
34971
35198
|
__publicField(this, 'enabled', false);
|
|
34972
35199
|
__publicField(this, 'bySelector', /* @__PURE__ */ new Map());
|
|
@@ -35388,174 +35615,6 @@ function isPageOrScroll(identifier) {
|
|
|
35388
35615
|
return true;
|
|
35389
35616
|
return false;
|
|
35390
35617
|
}
|
|
35391
|
-
var salt = 'framer';
|
|
35392
|
-
var difficulty = 3;
|
|
35393
|
-
var tokenLength = 30;
|
|
35394
|
-
var maxTime = 3e3;
|
|
35395
|
-
function calculateProofOfWork() {
|
|
35396
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
35397
|
-
const target = '0'.repeat(difficulty);
|
|
35398
|
-
const startTime = Date.now();
|
|
35399
|
-
let processing = true;
|
|
35400
|
-
while (processing) {
|
|
35401
|
-
const timestamp = Date.now();
|
|
35402
|
-
if (timestamp - startTime > maxTime) {
|
|
35403
|
-
processing = false;
|
|
35404
|
-
return;
|
|
35405
|
-
}
|
|
35406
|
-
const nonce = randomCharacters(tokenLength);
|
|
35407
|
-
const secret = `${timestamp}:${nonce}`;
|
|
35408
|
-
const hash2 = yield sha256(salt + secret);
|
|
35409
|
-
if (hash2.startsWith(target)) {
|
|
35410
|
-
return {
|
|
35411
|
-
secret,
|
|
35412
|
-
hash: hash2,
|
|
35413
|
-
};
|
|
35414
|
-
}
|
|
35415
|
-
}
|
|
35416
|
-
return;
|
|
35417
|
-
});
|
|
35418
|
-
}
|
|
35419
|
-
function sha256(text) {
|
|
35420
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
35421
|
-
const buffer = new TextEncoder().encode(text);
|
|
35422
|
-
const hashBuffer = yield crypto.subtle.digest('SHA-256', buffer);
|
|
35423
|
-
return Array.from(new Uint8Array(hashBuffer)).map((b) => b.toString(16).padStart(2, '0')).join('');
|
|
35424
|
-
});
|
|
35425
|
-
}
|
|
35426
|
-
function randomCharacters(count) {
|
|
35427
|
-
const characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
|
|
35428
|
-
let result = '';
|
|
35429
|
-
const charactersLength = characters.length;
|
|
35430
|
-
for (let i = 0; i < count; i++) {
|
|
35431
|
-
result += characters.charAt(Math.floor(Math.random() * charactersLength));
|
|
35432
|
-
}
|
|
35433
|
-
return result;
|
|
35434
|
-
}
|
|
35435
|
-
function formReducer(_state, { type, }) {
|
|
35436
|
-
switch (type) {
|
|
35437
|
-
case 'submit':
|
|
35438
|
-
return {
|
|
35439
|
-
state: 'pending',
|
|
35440
|
-
};
|
|
35441
|
-
case 'success':
|
|
35442
|
-
return {
|
|
35443
|
-
state: 'success',
|
|
35444
|
-
};
|
|
35445
|
-
case 'error':
|
|
35446
|
-
return {
|
|
35447
|
-
state: 'error',
|
|
35448
|
-
};
|
|
35449
|
-
default:
|
|
35450
|
-
assertNever(type);
|
|
35451
|
-
}
|
|
35452
|
-
}
|
|
35453
|
-
function preventDefault(e) {
|
|
35454
|
-
e.preventDefault();
|
|
35455
|
-
}
|
|
35456
|
-
var FormContainer = /* @__PURE__ */ react_12.default.forwardRef((_f, ref) => {
|
|
35457
|
-
var { action, formId, disabled, children, redirectUrl, onSuccess, onError } = _f, props = __rest(_f, ["action", "formId", "disabled", "children", "redirectUrl", "onSuccess", "onError"]);
|
|
35458
|
-
const [state, dispatch,] = react_12.default.useReducer(formReducer, {
|
|
35459
|
-
state: disabled ? 'disabled' : void 0,
|
|
35460
|
-
});
|
|
35461
|
-
const router = useRouter();
|
|
35462
|
-
const { activeLocale, } = useLocaleInfo();
|
|
35463
|
-
const isSubmitEnabled = state.state === void 0;
|
|
35464
|
-
function redirectTo(link) {
|
|
35465
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
35466
|
-
var _a, _b;
|
|
35467
|
-
if (isLinkToWebPage(link)) {
|
|
35468
|
-
if (!router)
|
|
35469
|
-
return;
|
|
35470
|
-
const route = (_a = router.getRoute) == null ? void 0 : _a.call(router, link.webPageId);
|
|
35471
|
-
if (!route)
|
|
35472
|
-
return;
|
|
35473
|
-
const { unresolvedHashSlugs, unresolvedPathSlugs, } = link;
|
|
35474
|
-
const resolvedSlugs = yield resolveSlugs(unresolvedPathSlugs, unresolvedHashSlugs, router.collectionUtils, activeLocale);
|
|
35475
|
-
const combinedPathVariables = Object.assign({}, router.currentPathVariables, link.pathVariables, resolvedSlugs == null ? void 0 : resolvedSlugs.path);
|
|
35476
|
-
const combinedHashVariables = Object.assign({}, router.currentPathVariables, link.pathVariables, link.hashVariables, resolvedSlugs == null ? void 0 : resolvedSlugs.hash);
|
|
35477
|
-
const element = getHashForRoute(link.hash, route, combinedHashVariables);
|
|
35478
|
-
(_b = router.navigate) == null ? void 0 : _b.call(router, link.webPageId, element, combinedPathVariables);
|
|
35479
|
-
return;
|
|
35480
|
-
}
|
|
35481
|
-
if (!safeWindow)
|
|
35482
|
-
return;
|
|
35483
|
-
safeWindow.open(link, '_blank');
|
|
35484
|
-
});
|
|
35485
|
-
}
|
|
35486
|
-
const handleSubmit = (event) => __awaiter(void 0, void 0, void 0, function* () {
|
|
35487
|
-
event.preventDefault();
|
|
35488
|
-
if (!action)
|
|
35489
|
-
return;
|
|
35490
|
-
const data2 = new FormData(event.currentTarget);
|
|
35491
|
-
for (const [key7, value,] of data2) {
|
|
35492
|
-
if (value instanceof File)
|
|
35493
|
-
data2.delete(key7);
|
|
35494
|
-
}
|
|
35495
|
-
try {
|
|
35496
|
-
dispatch({
|
|
35497
|
-
type: 'submit',
|
|
35498
|
-
});
|
|
35499
|
-
yield submitForm(action, data2);
|
|
35500
|
-
dispatch({
|
|
35501
|
-
type: 'success',
|
|
35502
|
-
});
|
|
35503
|
-
onSuccess == null ? void 0 : onSuccess();
|
|
35504
|
-
if (redirectUrl) {
|
|
35505
|
-
yield redirectTo(redirectUrl);
|
|
35506
|
-
}
|
|
35507
|
-
}
|
|
35508
|
-
catch (error) {
|
|
35509
|
-
dispatch({
|
|
35510
|
-
type: 'error',
|
|
35511
|
-
});
|
|
35512
|
-
onError == null ? void 0 : onError();
|
|
35513
|
-
}
|
|
35514
|
-
});
|
|
35515
|
-
const handleKeyDown = (event) => {
|
|
35516
|
-
const { target: input, currentTarget: form, key: key7, } = event;
|
|
35517
|
-
const isTextArea = input instanceof HTMLTextAreaElement;
|
|
35518
|
-
if (isTextArea)
|
|
35519
|
-
return;
|
|
35520
|
-
if (key7 === 'Enter' && form.checkValidity()) {
|
|
35521
|
-
event.preventDefault();
|
|
35522
|
-
void handleSubmit(event);
|
|
35523
|
-
}
|
|
35524
|
-
};
|
|
35525
|
-
return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(motion.form, Object.assign(Object.assign({}, props), { 'data-formid': formId, onSubmit: isSubmitEnabled ? handleSubmit : preventDefault, onKeyDown: handleKeyDown, ref, children: children(state) }));
|
|
35526
|
-
});
|
|
35527
|
-
exports.FormContainer = FormContainer;
|
|
35528
|
-
function submitForm(action, data2) {
|
|
35529
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
35530
|
-
const proofOfWork = yield calculateProofOfWork();
|
|
35531
|
-
if (!proofOfWork) {
|
|
35532
|
-
throw new Error('Failed to calculate proof of work');
|
|
35533
|
-
}
|
|
35534
|
-
const response = yield fetch(action, {
|
|
35535
|
-
body: data2,
|
|
35536
|
-
method: 'POST',
|
|
35537
|
-
headers: {
|
|
35538
|
-
'Framer-POW': proofOfWork.secret,
|
|
35539
|
-
'Framer-POW-Enforce': 'true',
|
|
35540
|
-
},
|
|
35541
|
-
});
|
|
35542
|
-
if (response.ok) {
|
|
35543
|
-
return response;
|
|
35544
|
-
}
|
|
35545
|
-
else {
|
|
35546
|
-
const body = yield response.json();
|
|
35547
|
-
const error = 'Failed to submit form';
|
|
35548
|
-
if (responseHasError(body)) {
|
|
35549
|
-
throw new Error(`${error} - ${body.error.message}`);
|
|
35550
|
-
}
|
|
35551
|
-
throw new Error(error);
|
|
35552
|
-
}
|
|
35553
|
-
});
|
|
35554
|
-
}
|
|
35555
|
-
function responseHasError(response) {
|
|
35556
|
-
return typeof response === 'object' && response !== null && 'error' in response && isObject2(response.error) &&
|
|
35557
|
-
'message' in response.error && typeof response.error.message === 'string';
|
|
35558
|
-
}
|
|
35559
35618
|
var FormInputStyleVariableNames = /* @__PURE__ */ ((FormInputStyleVariableNames2) => {
|
|
35560
35619
|
FormInputStyleVariableNames2['Padding'] = '--framer-input-padding';
|
|
35561
35620
|
FormInputStyleVariableNames2['BorderRadiusTopLeft'] = '--framer-input-border-radius-top-left';
|
|
@@ -35584,7 +35643,6 @@ var FormInputStyleVariableNames = /* @__PURE__ */ ((FormInputStyleVariableNames2
|
|
|
35584
35643
|
FormInputStyleVariableNames2['FocusedBackground'] = '--framer-input-focused-background';
|
|
35585
35644
|
FormInputStyleVariableNames2['FocusedBoxShadow'] = '--framer-input-focused-box-shadow';
|
|
35586
35645
|
FormInputStyleVariableNames2['FocusedTransition'] = '--framer-input-focused-transition';
|
|
35587
|
-
FormInputStyleVariableNames2['BooleanCheckedIconURL'] = '--framer-input-boolean-icon';
|
|
35588
35646
|
FormInputStyleVariableNames2['BooleanCheckedBackground'] = '--framer-input-boolean-checked-background';
|
|
35589
35647
|
FormInputStyleVariableNames2['BooleanCheckedBorderColor'] = '--framer-input-boolean-checked-border-color';
|
|
35590
35648
|
FormInputStyleVariableNames2['BooleanCheckedBorderWidth'] = '--framer-input-boolean-checked-border-width';
|
|
@@ -35592,14 +35650,17 @@ var FormInputStyleVariableNames = /* @__PURE__ */ ((FormInputStyleVariableNames2
|
|
|
35592
35650
|
FormInputStyleVariableNames2['BooleanCheckedBoxShadow'] = '--framer-input-boolean-checked-box-shadow';
|
|
35593
35651
|
FormInputStyleVariableNames2['BooleanCheckedTransition'] = '--framer-input-boolean-checked-transition';
|
|
35594
35652
|
FormInputStyleVariableNames2['InvalidTextColor'] = '--framer-input-invalid-text-color';
|
|
35653
|
+
FormInputStyleVariableNames2['IconBackgroundImage'] = '--framer-input-icon-image';
|
|
35654
|
+
FormInputStyleVariableNames2['IconMaskImage'] = '--framer-input-icon-mask-image';
|
|
35655
|
+
FormInputStyleVariableNames2['IconColor'] = '--framer-input-icon-color';
|
|
35595
35656
|
return FormInputStyleVariableNames2;
|
|
35596
35657
|
})(FormInputStyleVariableNames || {});
|
|
35597
35658
|
var Var = FormInputStyleVariableNames;
|
|
35598
|
-
var inputClassName =
|
|
35599
|
-
var inputWrapperClassName =
|
|
35600
|
-
var emptyValueClassName =
|
|
35601
|
-
var forcedFocusClassName =
|
|
35602
|
-
var forcedCheckedClassName =
|
|
35659
|
+
var inputClassName = 'framer-form-input';
|
|
35660
|
+
var inputWrapperClassName = 'framer-form-input-wrapper';
|
|
35661
|
+
var emptyValueClassName = 'framer-form-input-empty';
|
|
35662
|
+
var forcedFocusClassName = 'framer-form-input-forced-focus';
|
|
35663
|
+
var forcedCheckedClassName = 'framer-form-input-forced-checked';
|
|
35603
35664
|
function cssValue(value) {
|
|
35604
35665
|
if (typeof value === 'number')
|
|
35605
35666
|
return value;
|
|
@@ -35612,7 +35673,8 @@ function cssValue(value) {
|
|
|
35612
35673
|
function css(selector, declaration) {
|
|
35613
35674
|
let output = ' ';
|
|
35614
35675
|
for (const key7 in declaration) {
|
|
35615
|
-
|
|
35676
|
+
const value = declaration[key7];
|
|
35677
|
+
output += `${key7.replace(/([A-Z])/gu, '-$1').toLowerCase()}: ${cssValue(value)}; `;
|
|
35616
35678
|
}
|
|
35617
35679
|
return selector + ' {' + output + '}';
|
|
35618
35680
|
}
|
|
@@ -35628,51 +35690,33 @@ function css(selector, declaration) {
|
|
|
35628
35690
|
}
|
|
35629
35691
|
css2.variable = variable;
|
|
35630
35692
|
})(css || (css = {}));
|
|
35631
|
-
var sharedInputCSS = [
|
|
35632
|
-
|
|
35633
|
-
|
|
35634
|
-
|
|
35635
|
-
|
|
35636
|
-
|
|
35637
|
-
|
|
35638
|
-
|
|
35639
|
-
border: none
|
|
35640
|
-
|
|
35641
|
-
|
|
35642
|
-
overflow: hidden
|
|
35643
|
-
width: 100
|
|
35644
|
-
height: 100
|
|
35645
|
-
|
|
35646
|
-
|
|
35647
|
-
|
|
35648
|
-
|
|
35649
|
-
|
|
35650
|
-
|
|
35651
|
-
|
|
35652
|
-
|
|
35653
|
-
|
|
35654
|
-
|
|
35655
|
-
|
|
35656
|
-
|
|
35657
|
-
|
|
35658
|
-
`.${inputClassName}:focus, .${inputClassName}.${forcedFocusClassName} {
|
|
35659
|
-
background: ${css.variable(Var.FocusedBackground, Var.Background)};
|
|
35660
|
-
box-shadow: ${css.variable(Var.FocusedBoxShadow, Var.BoxShadow)};
|
|
35661
|
-
}`,
|
|
35662
|
-
`.${inputWrapperClassName}:focus-within::after, .${inputWrapperClassName}.${forcedFocusClassName}::after {
|
|
35663
|
-
border-color: ${css.variable(Var.FocusedBorderColor, Var.BorderColor)};
|
|
35664
|
-
border-style: ${css.variable(Var.FocusedBorderStyle, Var.BorderStyle)};
|
|
35665
|
-
border-top-width: ${css.variable(Var.FocusedBorderWidth, Var.BorderTopWidth)};
|
|
35666
|
-
border-right-width: ${css.variable(Var.FocusedBorderWidth, Var.BorderRightWidth)};
|
|
35667
|
-
border-bottom-width: ${css.variable(Var.FocusedBorderWidth, Var.BorderBottomWidth)};
|
|
35668
|
-
border-left-width: ${css.variable(Var.FocusedBorderWidth, Var.BorderLeftWidth)};
|
|
35669
|
-
}`,
|
|
35670
|
-
])();
|
|
35671
|
-
var inputBorderCSS = [
|
|
35672
|
-
`.${inputWrapperClassName} {
|
|
35673
|
-
position: relative;
|
|
35674
|
-
}`,
|
|
35675
|
-
`.${inputWrapperClassName}:after {
|
|
35693
|
+
var sharedInputCSS = [
|
|
35694
|
+
css(`.${inputClassName}`, {
|
|
35695
|
+
padding: css.variable(Var.Padding),
|
|
35696
|
+
background: 'transparent',
|
|
35697
|
+
fontFamily: css.variable(Var.FontFamily),
|
|
35698
|
+
fontWeight: css.variable(Var.FontWeight),
|
|
35699
|
+
fontSize: css.variable(Var.FontSize),
|
|
35700
|
+
color: css.variable(Var.FontColor),
|
|
35701
|
+
border: 'none',
|
|
35702
|
+
textOverflow: 'ellipsis',
|
|
35703
|
+
whiteSpace: 'nowrap',
|
|
35704
|
+
overflow: 'hidden',
|
|
35705
|
+
width: '100%',
|
|
35706
|
+
height: '100%',
|
|
35707
|
+
letterSpacing: css.variable(Var.FontLetterSpacing),
|
|
35708
|
+
textAlign: css.variable(Var.FontTextAlignment),
|
|
35709
|
+
lineHeight: css.variable(Var.FontLineHeight),
|
|
35710
|
+
}),
|
|
35711
|
+
css(`.${inputClassName}:focus-visible`, {
|
|
35712
|
+
outline: 'none',
|
|
35713
|
+
}),
|
|
35714
|
+
];
|
|
35715
|
+
var inputWrapperCSS = /* @__PURE__ */ (() => [css(`.${inputWrapperClassName}`, {
|
|
35716
|
+
overflow: 'hidden',
|
|
35717
|
+
}),])();
|
|
35718
|
+
var inputBorderAllSides = `var(${Var.BorderTopWidth}) var(${Var.BorderRightWidth}) var(${Var.BorderBottomWidth}) var(${Var.BorderLeftWidth})`;
|
|
35719
|
+
var inputBorderCSS = [`.${inputWrapperClassName}:after {
|
|
35676
35720
|
content: "";
|
|
35677
35721
|
pointer-events: none;
|
|
35678
35722
|
box-sizing: border-box;
|
|
@@ -35693,8 +35737,90 @@ var inputBorderCSS = [
|
|
|
35693
35737
|
border-style: var(${Var.BorderStyle});
|
|
35694
35738
|
transition: var(${Var.FocusedTransition});
|
|
35695
35739
|
transition-property: border-color, border-width, border-style, border-top-left-radius, border-top-right-radius, border-bottom-right-radius, border-bottom-left-radius;
|
|
35696
|
-
}`,
|
|
35697
|
-
|
|
35740
|
+
}`,];
|
|
35741
|
+
var customValidityKey = 'customError';
|
|
35742
|
+
var validKey = 'valid';
|
|
35743
|
+
function isRelevantValidityStateKey(key7) {
|
|
35744
|
+
return key7 !== customValidityKey && key7 !== validKey;
|
|
35745
|
+
}
|
|
35746
|
+
function isInvalid(validity) {
|
|
35747
|
+
for (const key7 in validity) {
|
|
35748
|
+
if (!isRelevantValidityStateKey(key7))
|
|
35749
|
+
continue;
|
|
35750
|
+
if ((validity == null ? void 0 : validity[key7]) === true)
|
|
35751
|
+
return true;
|
|
35752
|
+
}
|
|
35753
|
+
return false;
|
|
35754
|
+
}
|
|
35755
|
+
function useCustomValidity(onValid, onInvalid, onChange, onBlur, onFocus) {
|
|
35756
|
+
const isValidRef = react_12.default.useRef(null);
|
|
35757
|
+
const handleInvalid = react_12.default.useCallback((e) => {
|
|
35758
|
+
if (!onInvalid)
|
|
35759
|
+
return;
|
|
35760
|
+
if (isValidRef.current === false)
|
|
35761
|
+
return;
|
|
35762
|
+
isValidRef.current = false;
|
|
35763
|
+
e.currentTarget.setCustomValidity(' ');
|
|
35764
|
+
e.currentTarget.reportValidity();
|
|
35765
|
+
onInvalid(e);
|
|
35766
|
+
}, [onInvalid,]);
|
|
35767
|
+
const handleChange = react_12.default.useCallback((e) => {
|
|
35768
|
+
onChange == null ? void 0 : onChange(e);
|
|
35769
|
+
if (!onInvalid && !onValid)
|
|
35770
|
+
return;
|
|
35771
|
+
const validity = e.target.validity;
|
|
35772
|
+
if (isValidRef.current === false && !isInvalid(validity)) {
|
|
35773
|
+
e.currentTarget.setCustomValidity('');
|
|
35774
|
+
e.target.reportValidity();
|
|
35775
|
+
isValidRef.current = true;
|
|
35776
|
+
onValid == null ? void 0 : onValid();
|
|
35777
|
+
}
|
|
35778
|
+
}, [onInvalid, onValid, onChange,]);
|
|
35779
|
+
const handleBlur = react_12.default.useCallback((e) => {
|
|
35780
|
+
if (!onInvalid) {
|
|
35781
|
+
onBlur == null ? void 0 : onBlur(e);
|
|
35782
|
+
return;
|
|
35783
|
+
}
|
|
35784
|
+
if (isValidRef.current === false)
|
|
35785
|
+
return;
|
|
35786
|
+
const validity = e.currentTarget.validity;
|
|
35787
|
+
if (isInvalid(validity)) {
|
|
35788
|
+
handleInvalid(e);
|
|
35789
|
+
return;
|
|
35790
|
+
}
|
|
35791
|
+
onBlur == null ? void 0 : onBlur(e);
|
|
35792
|
+
}, [handleInvalid, onBlur, onInvalid,]);
|
|
35793
|
+
return react_12.default.useMemo(() => {
|
|
35794
|
+
return {
|
|
35795
|
+
onInvalid: handleInvalid,
|
|
35796
|
+
onChange: handleChange,
|
|
35797
|
+
onBlur: handleBlur,
|
|
35798
|
+
onFocus,
|
|
35799
|
+
};
|
|
35800
|
+
}, [handleInvalid, handleChange, handleBlur, onFocus,]);
|
|
35801
|
+
}
|
|
35802
|
+
var iconSpacing = 10;
|
|
35803
|
+
var iconSize = 16;
|
|
35804
|
+
var inputIconCSSDeclaration = {
|
|
35805
|
+
content: '',
|
|
35806
|
+
display: 'block',
|
|
35807
|
+
position: 'absolute',
|
|
35808
|
+
right: 0,
|
|
35809
|
+
top: 0,
|
|
35810
|
+
bottom: 0,
|
|
35811
|
+
width: `${iconSize}px`,
|
|
35812
|
+
boxSizing: 'content-box',
|
|
35813
|
+
// Offset the icon inwards by the padding.
|
|
35814
|
+
margin: css.variable(Var.Padding),
|
|
35815
|
+
marginLeft: 0,
|
|
35816
|
+
border: 'none',
|
|
35817
|
+
pointerEvents: 'none',
|
|
35818
|
+
backgroundRepeat: 'no-repeat',
|
|
35819
|
+
backgroundSize: `${iconSize}px`,
|
|
35820
|
+
maskRepeat: 'no-repeat',
|
|
35821
|
+
maskSize: `${iconSize}px`,
|
|
35822
|
+
backgroundColor: css.variable(Var.IconColor),
|
|
35823
|
+
};
|
|
35698
35824
|
var passwordManagerIgnoreDataProps = {
|
|
35699
35825
|
// 1Password
|
|
35700
35826
|
'data-1p-ignore': true,
|
|
@@ -35708,99 +35834,134 @@ var passwordManagerIgnoreDataProps = {
|
|
|
35708
35834
|
autocomplete: 'off',
|
|
35709
35835
|
};
|
|
35710
35836
|
var PlainTextInput = /* @__PURE__ */ react_12.default.forwardRef(function FormPlainTextInput(props, ref) {
|
|
35711
|
-
const { autoFocus, className: className2, inputName, max, min,
|
|
35712
|
-
|
|
35713
|
-
|
|
35714
|
-
|
|
35715
|
-
|
|
35716
|
-
|
|
35717
|
-
|
|
35718
|
-
|
|
35719
|
-
const onChange = react_12.default.useCallback((e) => {
|
|
35837
|
+
const { autoFocus, className: className2, inputName, max, min, placeholder, required, step: step2, style, type,
|
|
35838
|
+
// We use a defaultValue instead of a value so that the input remains
|
|
35839
|
+
// uncontrolled by React. This is important because we want the user
|
|
35840
|
+
// to be able to provide an initial value in the property panel, and for
|
|
35841
|
+
// the value to be editable by the user in the preview.
|
|
35842
|
+
defaultValue, autofillEnabled, onChange, onBlur, onInvalid, onFocus, onValid } = props, rest = __rest(props, ["autoFocus", "className", "inputName", "max", "min", "placeholder", "required", "step", "style", "type", "defaultValue", "autofillEnabled", "onChange", "onBlur", "onInvalid", "onFocus", "onValid"]);
|
|
35843
|
+
const [hasValue, setHasValue,] = react_12.default.useState(!!defaultValue);
|
|
35844
|
+
const handleChange = react_12.default.useCallback((e) => {
|
|
35720
35845
|
const newValue = e.target.value;
|
|
35846
|
+
onChange == null ? void 0 : onChange(e);
|
|
35721
35847
|
setHasValue(!!newValue);
|
|
35722
|
-
}, []);
|
|
35723
|
-
|
|
35724
|
-
|
|
35725
|
-
|
|
35726
|
-
|
|
35727
|
-
|
|
35728
|
-
|
|
35729
|
-
|
|
35730
|
-
|
|
35731
|
-
|
|
35732
|
-
|
|
35733
|
-
|
|
35734
|
-
default:
|
|
35735
|
-
return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(motion.div, Object.assign(Object.assign({ ref,
|
|
35736
|
-
style, className: cx(inputWrapperClassName, canvasPreviewClassName, className2) }, rest), { children: /* @__PURE__ */ (0, jsx_runtime_1.jsx)(motion.input, Object.assign(Object.assign(Object.assign({ id: inputName }, dataProps), eventProps), { type,
|
|
35737
|
-
required,
|
|
35738
|
-
autoFocus, name: inputName, placeholder, className: cx(inputClassName, canvasPreviewClassName, !hasValue && emptyValueClassName), onChange,
|
|
35739
|
-
value,
|
|
35740
|
-
min,
|
|
35741
|
-
max, step: step2 })) }));
|
|
35848
|
+
}, [onChange,]);
|
|
35849
|
+
const eventHandlers = useCustomValidity(onValid, onInvalid, handleChange, onBlur, onFocus);
|
|
35850
|
+
(0, react_2.useEffect)(() => {
|
|
35851
|
+
setHasValue(!!defaultValue);
|
|
35852
|
+
}, [defaultValue,]);
|
|
35853
|
+
const dataProps = autofillEnabled === false ? passwordManagerIgnoreDataProps : void 0;
|
|
35854
|
+
if (type === 'hidden') {
|
|
35855
|
+
return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(motion.input, {
|
|
35856
|
+
type: 'hidden',
|
|
35857
|
+
name: inputName,
|
|
35858
|
+
defaultValue,
|
|
35859
|
+
});
|
|
35742
35860
|
}
|
|
35861
|
+
return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(motion.div, Object.assign(Object.assign({ ref,
|
|
35862
|
+
style, className: cx(textInputWrapperClassName, inputWrapperClassName, className2) }, rest), { children: type === 'textarea'
|
|
35863
|
+
? /* @__PURE__ */ (0, react_8.createElement)(motion.textarea, Object.assign(Object.assign(Object.assign({}, dataProps), eventHandlers), { key: defaultValue, required,
|
|
35864
|
+
autoFocus, name: inputName, placeholder, className: inputClassName, defaultValue }))
|
|
35865
|
+
: /* @__PURE__ */ (0, react_8.createElement)(motion.input, Object.assign(Object.assign(Object.assign({}, dataProps), eventHandlers), { key: defaultValue, type,
|
|
35866
|
+
required,
|
|
35867
|
+
autoFocus, name: inputName, placeholder, className: cx(inputClassName, !hasValue && emptyValueClassName), defaultValue,
|
|
35868
|
+
min,
|
|
35869
|
+
max, step: step2 })) }));
|
|
35743
35870
|
});
|
|
35744
|
-
var
|
|
35745
|
-
var
|
|
35746
|
-
var
|
|
35747
|
-
|
|
35748
|
-
var
|
|
35749
|
-
/* @__PURE__ */ (() =>
|
|
35750
|
-
var FormPlainTextInput2 =
|
|
35751
|
-
/* @__PURE__ */ (() => withCSS(PlainTextInput, [
|
|
35871
|
+
var iconSize2 = 16;
|
|
35872
|
+
var textInputWrapperClassName = 'framer-form-text-input';
|
|
35873
|
+
var defaultTextareaResizerIcon = 'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14"><path d="m1.5 8 7-7M9 5.5l-3 3" stroke="%23999" stroke-width="1.5" stroke-linecap="round"></path></svg>';
|
|
35874
|
+
var defaultDateIconMaskImage = 'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16"><path fill="rgb(153, 153, 153)" d="M3 5a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v2H3Z" opacity=".3"/><path fill="transparent" stroke="rgb(153, 153, 153)" stroke-width="1.5" d="M3.25 5.25a2 2 0 0 1 2-2h5.5a2 2 0 0 1 2 2v5.5a2 2 0 0 1-2 2h-5.5a2 2 0 0 1-2-2ZM3 6.75h9.5"/></svg>';
|
|
35875
|
+
var defaultTimeIconMaskImage = 'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16"><path fill="transparent" stroke="rgb(153, 153, 153)" stroke-width="1.5" d="M2.5 8a5.5 5.5 0 1 1 11 0 5.5 5.5 0 1 1-11 0Z"/><path fill="transparent" stroke="rgb(153, 153, 153)" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M7.75 8.25v-3m0 3h2"/></svg>';
|
|
35876
|
+
var styles = /* @__PURE__ */ (() => [
|
|
35752
35877
|
...sharedInputCSS,
|
|
35753
|
-
...focusInputCSS,
|
|
35754
35878
|
...inputBorderCSS,
|
|
35755
|
-
|
|
35756
|
-
|
|
35757
|
-
|
|
35758
|
-
|
|
35759
|
-
|
|
35760
|
-
|
|
35761
|
-
|
|
35762
|
-
|
|
35763
|
-
|
|
35764
|
-
|
|
35765
|
-
|
|
35766
|
-
`.${
|
|
35767
|
-
|
|
35768
|
-
|
|
35769
|
-
|
|
35770
|
-
|
|
35771
|
-
|
|
35772
|
-
|
|
35773
|
-
|
|
35774
|
-
|
|
35775
|
-
|
|
35776
|
-
|
|
35777
|
-
|
|
35778
|
-
|
|
35779
|
-
|
|
35780
|
-
|
|
35781
|
-
|
|
35782
|
-
|
|
35783
|
-
|
|
35784
|
-
|
|
35785
|
-
|
|
35786
|
-
|
|
35787
|
-
|
|
35788
|
-
|
|
35789
|
-
}`,
|
|
35879
|
+
...inputWrapperCSS,
|
|
35880
|
+
css(`.${inputWrapperClassName}`, {
|
|
35881
|
+
boxShadow: css.variable('--framer-input-box-shadow'),
|
|
35882
|
+
borderTopLeftRadius: css.variable('--framer-input-border-radius-top-left'),
|
|
35883
|
+
borderTopRightRadius: css.variable('--framer-input-border-radius-top-right'),
|
|
35884
|
+
borderBottomRightRadius: css.variable('--framer-input-border-radius-bottom-right'),
|
|
35885
|
+
borderBottomLeftRadius: css.variable('--framer-input-border-radius-bottom-left'),
|
|
35886
|
+
background: css.variable('--framer-input-background'),
|
|
35887
|
+
transition: css.variable('--framer-input-focused-transition'),
|
|
35888
|
+
transitionProperty: 'background, box-shadow',
|
|
35889
|
+
}),
|
|
35890
|
+
css(`.${textInputWrapperClassName} .${inputClassName}::placeholder`, {
|
|
35891
|
+
color: css.variable('--framer-input-placeholder-color'),
|
|
35892
|
+
}),
|
|
35893
|
+
css(`.${textInputWrapperClassName} .${inputClassName}[type="date"], .${textInputWrapperClassName} .${inputClassName}[type="time"]`, {
|
|
35894
|
+
'-webkit-appearance': 'none',
|
|
35895
|
+
appearance: 'none',
|
|
35896
|
+
}),
|
|
35897
|
+
// iOS only fix for centered date & time inputs: https://github.com/tailwindlabs/tailwindcss-forms/pull/144
|
|
35898
|
+
css(`.${textInputWrapperClassName} .${inputClassName}::-webkit-date-and-time-value`, {
|
|
35899
|
+
textAlign: 'start',
|
|
35900
|
+
}),
|
|
35901
|
+
css(`.${textInputWrapperClassName} textarea`, {
|
|
35902
|
+
display: 'flex',
|
|
35903
|
+
resize: css.variable('--framer-textarea-resize'),
|
|
35904
|
+
overflowY: 'scroll',
|
|
35905
|
+
minHeight: 'inherit',
|
|
35906
|
+
maxHeight: 'inherit',
|
|
35907
|
+
whiteSpace: 'break-spaces',
|
|
35908
|
+
}),
|
|
35909
|
+
// This targets the resize handle in WebKit browsers. Unfortunately, it is not
|
|
35910
|
+
// possible in CSS to target the resize handle in Firefox, so FF will always
|
|
35911
|
+
// show the native resize handle.
|
|
35912
|
+
css(`.${textInputWrapperClassName} textarea::-webkit-resizer`, {
|
|
35913
|
+
background: `no-repeat url('${defaultTextareaResizerIcon}')`,
|
|
35914
|
+
}),
|
|
35915
|
+
css(`.${textInputWrapperClassName} textarea::-webkit-scrollbar`, {
|
|
35916
|
+
cursor: 'pointer',
|
|
35917
|
+
background: 'transparent',
|
|
35918
|
+
}),
|
|
35919
|
+
css(`.${textInputWrapperClassName} textarea::-webkit-scrollbar-thumb:window-inactive`, {
|
|
35920
|
+
opacity: 0,
|
|
35921
|
+
}),
|
|
35922
|
+
css(`.${textInputWrapperClassName} textarea::-webkit-scrollbar-corner`, {
|
|
35923
|
+
background: 'none',
|
|
35924
|
+
backgroundColor: 'transparent',
|
|
35925
|
+
outline: 'none',
|
|
35926
|
+
}),
|
|
35927
|
+
css(`.${textInputWrapperClassName} .${inputClassName}.${emptyValueClassName}::-webkit-datetime-edit`, {
|
|
35928
|
+
color: css.variable('--framer-input-placeholder-color'),
|
|
35929
|
+
// This tells safari to use the color for the shadow dom elements.
|
|
35930
|
+
'-webkit-text-fill-color': css.variable('--framer-input-placeholder-color'),
|
|
35931
|
+
}),
|
|
35932
|
+
css(`.${textInputWrapperClassName} .${inputClassName}[type="date"]::before, .${textInputWrapperClassName} .${inputClassName}[type="time"]::before`, Object.assign(Object.assign({}, inputIconCSSDeclaration), { paddingLeft: `${iconSpacing}px`, maskPosition: `${iconSpacing}px center`, backgroundPosition: `${iconSpacing}px center` })),
|
|
35933
|
+
css(`.${textInputWrapperClassName} .${inputClassName}[type="date"]::before`, {
|
|
35934
|
+
maskImage: css.variable('--framer-input-icon-mask-image', `url('${defaultDateIconMaskImage}')`),
|
|
35935
|
+
backgroundImage: css.variable('--framer-input-icon-image'),
|
|
35936
|
+
}),
|
|
35937
|
+
css(`.${textInputWrapperClassName} .${inputClassName}[type="time"]::before`, {
|
|
35938
|
+
maskImage: css.variable('--framer-input-icon-mask-image', `url('${defaultTimeIconMaskImage}')`),
|
|
35939
|
+
backgroundImage: css.variable('--framer-input-icon-image'),
|
|
35940
|
+
}),
|
|
35790
35941
|
// Hide the native date picker icon, but still allow the user to click it.
|
|
35791
|
-
`.${inputClassName}::-webkit-calendar-picker-indicator {
|
|
35792
|
-
|
|
35793
|
-
|
|
35794
|
-
|
|
35795
|
-
|
|
35796
|
-
|
|
35797
|
-
|
|
35798
|
-
|
|
35799
|
-
|
|
35942
|
+
css(`.${textInputWrapperClassName} .${inputClassName}::-webkit-calendar-picker-indicator`, {
|
|
35943
|
+
opacity: 0,
|
|
35944
|
+
padding: css.variable('--framer-input-padding'),
|
|
35945
|
+
paddingRight: 0,
|
|
35946
|
+
paddingLeft: `${iconSpacing}px`,
|
|
35947
|
+
width: `${iconSize2}px`,
|
|
35948
|
+
height: `${iconSize2}px`,
|
|
35949
|
+
}),
|
|
35950
|
+
css(`.${textInputWrapperClassName}:focus-within, .${textInputWrapperClassName}.${forcedFocusClassName}`, {
|
|
35951
|
+
boxShadow: css.variable('--framer-input-focused-box-shadow', '--framer-input-box-shadow'),
|
|
35952
|
+
background: css.variable('--framer-input-focused-background', '--framer-input-background'),
|
|
35953
|
+
}),
|
|
35954
|
+
css(`.${textInputWrapperClassName}:focus-within::after, .${textInputWrapperClassName}.${forcedFocusClassName}::after`, {
|
|
35955
|
+
borderColor: css.variable('--framer-input-focused-border-color', '--framer-input-border-color'),
|
|
35956
|
+
borderStyle: css.variable('--framer-input-focused-border-style', '--framer-input-border-style'),
|
|
35957
|
+
borderWidth: css.variable('--framer-input-focused-border-width', inputBorderAllSides),
|
|
35958
|
+
}),
|
|
35959
|
+
])();
|
|
35960
|
+
var FormPlainTextInput2 = /* @__PURE__ */ withCSS(PlainTextInput, styles);
|
|
35800
35961
|
exports.FormPlainTextInput = FormPlainTextInput2;
|
|
35801
35962
|
var className = 'framer-form-boolean-input';
|
|
35802
35963
|
var BooleanInput = /* @__PURE__ */ react_12.default.forwardRef(function FormPlainTextInput3(props, ref) {
|
|
35803
|
-
const { inputName, type = 'checkbox', defaultChecked,
|
|
35964
|
+
const { inputName, type = 'checkbox', defaultChecked, onValid } = props, rest = __rest(props, ["inputName", "type", "defaultChecked", "onValid"]);
|
|
35804
35965
|
const isCanvas = useIsOnFramerCanvas();
|
|
35805
35966
|
const attributes = isCanvas
|
|
35806
35967
|
? {
|
|
@@ -35809,12 +35970,13 @@ var BooleanInput = /* @__PURE__ */ react_12.default.forwardRef(function FormPlai
|
|
|
35809
35970
|
: {
|
|
35810
35971
|
defaultChecked,
|
|
35811
35972
|
};
|
|
35812
|
-
|
|
35973
|
+
const eventHandlers = useCustomValidity(onValid, props.onInvalid, props.onChange, props.onBlur, props.onFocus);
|
|
35974
|
+
return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(motion.input, Object.assign(Object.assign(Object.assign(Object.assign({}, rest), attributes), eventHandlers), { readOnly: isCanvas, ref,
|
|
35975
|
+
type, name: inputName, className: cx(className, props.className) }));
|
|
35813
35976
|
});
|
|
35814
|
-
var defaultCheckedIcon =
|
|
35815
|
-
var borderWidth = `var(${'--framer-input-border-top-width'}) var(${'--framer-input-border-right-width'}) var(${'--framer-input-border-bottom-width'}) var(${'--framer-input-border-left-width'})`;
|
|
35977
|
+
var defaultCheckedIcon = 'data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16"><path d="M 4 8 L 6.5 10.5 L 11.5 5.5" fill="transparent" stroke-width="2" stroke="rgb(255, 255, 255)" stroke-linecap="round" stroke-linejoin="round"></path></svg>';
|
|
35816
35978
|
var borderRadius = `var(${'--framer-input-border-radius-top-left'}) var(${'--framer-input-border-radius-top-right'}) var(${'--framer-input-border-radius-bottom-right'}) var(${'--framer-input-border-radius-bottom-left'})`;
|
|
35817
|
-
var
|
|
35979
|
+
var styles2 = /* @__PURE__ */ (() => [
|
|
35818
35980
|
css(`.${className}`, {
|
|
35819
35981
|
'-webkit-appearance': 'none',
|
|
35820
35982
|
// background-color: #fff; fixes a bug on iOS where the checkbox shows
|
|
@@ -35840,7 +36002,7 @@ var styles = /* @__PURE__ */ (() => [
|
|
|
35840
36002
|
borderColor: css.variable('--framer-input-border-color', 'transparent'),
|
|
35841
36003
|
borderRadius,
|
|
35842
36004
|
borderStyle: '--framer-input-border-style',
|
|
35843
|
-
borderWidth,
|
|
36005
|
+
borderWidth: inputBorderAllSides,
|
|
35844
36006
|
boxSizing: 'border-box',
|
|
35845
36007
|
content: '',
|
|
35846
36008
|
display: 'block',
|
|
@@ -35851,22 +36013,17 @@ var styles = /* @__PURE__ */ (() => [
|
|
|
35851
36013
|
}),
|
|
35852
36014
|
// The before element is used to display the check mark icon. It is
|
|
35853
36015
|
// faded in when the input is checked.
|
|
35854
|
-
css(`.${className}::before`, {
|
|
35855
|
-
|
|
35856
|
-
|
|
35857
|
-
|
|
35858
|
-
|
|
35859
|
-
backgroundImage: css.variable('--framer-input-
|
|
35860
|
-
|
|
35861
|
-
|
|
35862
|
-
|
|
35863
|
-
|
|
35864
|
-
|
|
35865
|
-
height: '100%',
|
|
35866
|
-
opacity: 0,
|
|
35867
|
-
transition: '--framer-input-boolean-checked-transition',
|
|
35868
|
-
transitionProperty: 'opacity',
|
|
35869
|
-
width: '100%',
|
|
36016
|
+
css(`.${className}::before`, Object.assign(Object.assign({}, inputIconCSSDeclaration), { backgroundPosition: 'center', backgroundSize: 'contain', maskPosition: 'center', maskSize: 'contain', height: '100%', opacity: 0, transition: '--framer-input-boolean-checked-transition', transitionProperty: 'opacity', width: '100%' })),
|
|
36017
|
+
// The BooleanInput component shows an svg check mark icon whenever an
|
|
36018
|
+
// image url isn't provided. That's not an intuitive system for radios
|
|
36019
|
+
// however, where we never want to show the default check mark.
|
|
36020
|
+
css(`.${className}[type="checkbox"]::before`, {
|
|
36021
|
+
backgroundImage: css.variable('--framer-input-icon-image'),
|
|
36022
|
+
maskImage: css.variable('--framer-input-icon-mask-image', `url('${defaultCheckedIcon}')`),
|
|
36023
|
+
}),
|
|
36024
|
+
css(`.${className}[type="radio"]::before`, {
|
|
36025
|
+
backgroundImage: css.variable('--framer-input-icon-image'),
|
|
36026
|
+
maskImage: css.variable('--framer-input-icon-mask-image'),
|
|
35870
36027
|
}),
|
|
35871
36028
|
css(`.${className}:checked, .${className}.${forcedCheckedClassName}`, {
|
|
35872
36029
|
// When not set, the styles when checked shouldn't clear the default
|
|
@@ -35882,7 +36039,7 @@ var styles = /* @__PURE__ */ (() => [
|
|
|
35882
36039
|
// styles.
|
|
35883
36040
|
borderColor: css.variable('--framer-input-boolean-checked-border-color', '--framer-input-border-color', 'transparent'),
|
|
35884
36041
|
borderStyle: css.variable('--framer-input-boolean-checked-border-style', '--framer-input-border-style', 'solid'),
|
|
35885
|
-
borderWidth: css.variable('--framer-input-boolean-checked-border-width',
|
|
36042
|
+
borderWidth: css.variable('--framer-input-boolean-checked-border-width', inputBorderAllSides),
|
|
35886
36043
|
}),
|
|
35887
36044
|
css(`.${className}:focus, .${className}.${forcedFocusClassName}`, {
|
|
35888
36045
|
backgroundColor: css.variable('--framer-input-focused-background', '--framer-input-background'),
|
|
@@ -35896,7 +36053,7 @@ var styles = /* @__PURE__ */ (() => [
|
|
|
35896
36053
|
// styles.
|
|
35897
36054
|
borderColor: css.variable('--framer-input-focused-border-color', '--framer-input-border-color', 'transparent'),
|
|
35898
36055
|
borderStyle: css.variable('--framer-input-focused-border-style', '--framer-input-border-style', 'solid'),
|
|
35899
|
-
borderWidth: css.variable('--framer-input-focused-border-width',
|
|
36056
|
+
borderWidth: css.variable('--framer-input-focused-border-width', inputBorderAllSides),
|
|
35900
36057
|
}),
|
|
35901
36058
|
css(`.${className}:focus:checked`, {
|
|
35902
36059
|
backgroundColor: css.variable('--framer-input-focused-background', '--framer-input-boolean-checked-background', '--framer-input-background'),
|
|
@@ -35904,69 +36061,82 @@ var styles = /* @__PURE__ */ (() => [
|
|
|
35904
36061
|
}),
|
|
35905
36062
|
css(`.${className}:focus:checked::after`, {
|
|
35906
36063
|
borderStyle: css.variable('--framer-input-focused-border-style', '--framer-input-boolean-checked-border-style', '--framer-input-border-style', 'solid'),
|
|
35907
|
-
borderWidth: css.variable('--framer-input-focused-border-width', '--framer-input-boolean-checked-border-width',
|
|
36064
|
+
borderWidth: css.variable('--framer-input-focused-border-width', '--framer-input-boolean-checked-border-width', inputBorderAllSides),
|
|
35908
36065
|
}),
|
|
35909
36066
|
])();
|
|
35910
|
-
var FormBooleanInput = /* @__PURE__ */ withCSS(BooleanInput,
|
|
36067
|
+
var FormBooleanInput = /* @__PURE__ */ withCSS(BooleanInput, styles2);
|
|
35911
36068
|
exports.FormBooleanInput = FormBooleanInput;
|
|
35912
36069
|
var Select = /* @__PURE__ */ react_12.default.forwardRef(function Select2(props, measureRef) {
|
|
35913
|
-
const { autoFocus, className: className2, inputName,
|
|
35914
|
-
|
|
35915
|
-
|
|
35916
|
-
|
|
35917
|
-
|
|
35918
|
-
|
|
35919
|
-
className: cx(inputClassName, canvasPreviewClassName),
|
|
35920
|
-
defaultValue: selectDefaultValue,
|
|
35921
|
-
onBlur,
|
|
35922
|
-
onFocus,
|
|
35923
|
-
onInvalid,
|
|
35924
|
-
children: selectOptions == null ? void 0 : selectOptions.map((option, index) => {
|
|
35925
|
-
var _f, _j;
|
|
36070
|
+
const { autoFocus, className: className2, inputName, required, defaultValue, selectOptions, style, onValid, onChange, onBlur, onInvalid, onFocus } = props, rest = __rest(props, ["autoFocus", "className", "inputName", "required", "defaultValue", "selectOptions", "style", "onValid", "onChange", "onBlur", "onInvalid", "onFocus"]);
|
|
36071
|
+
const eventHandlers = useCustomValidity(onValid, onInvalid, onChange, onBlur, onFocus);
|
|
36072
|
+
const key7 = Array.isArray(defaultValue) ? defaultValue[0] : defaultValue;
|
|
36073
|
+
return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(motion.div, Object.assign(Object.assign({ ref: measureRef, style, className: cx(inputWrapperClassName, selectWrapperClassName, className2) }, rest), { children: /* @__PURE__ */ (0, jsx_runtime_1.jsx)(motion.select, Object.assign(Object.assign({ name: inputName, autoFocus,
|
|
36074
|
+
required, className: inputClassName, defaultValue }, eventHandlers), { children: selectOptions == null ? void 0 : selectOptions.map((option, index) => {
|
|
36075
|
+
var _j, _k;
|
|
35926
36076
|
switch (option.type) {
|
|
35927
36077
|
case 'divider':
|
|
35928
36078
|
return /* @__PURE__ */ (0, jsx_runtime_1.jsx)('hr', {}, index);
|
|
35929
36079
|
case 'option':
|
|
35930
36080
|
return /* @__PURE__ */ (0, jsx_runtime_1.jsx)('option', {
|
|
35931
|
-
value: (
|
|
36081
|
+
value: (_j = option.value) !== null && _j !== void 0 ? _j : option.title,
|
|
35932
36082
|
disabled: option.disabled,
|
|
35933
|
-
children: (
|
|
36083
|
+
children: (_k = option.title) !== null && _k !== void 0 ? _k : option.value,
|
|
35934
36084
|
}, index);
|
|
35935
36085
|
}
|
|
35936
|
-
}),
|
|
35937
|
-
}, selectDefaultValue) }));
|
|
36086
|
+
}) }), key7) }));
|
|
35938
36087
|
});
|
|
35939
36088
|
var selectWrapperClassName = 'framer-form-select-wrapper';
|
|
35940
36089
|
var selectArrowSize = 16;
|
|
35941
|
-
var
|
|
36090
|
+
var defaultSelectCaretMaskImage =
|
|
36091
|
+
/* @__PURE__ */ (() => `data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="${selectArrowSize}" height="${selectArrowSize}"><path d="M 3.5 6 L 8 10.5 L 12.5 6" fill="transparent" stroke-width="1.5" stroke="rgb(153, 153, 153)" stroke-linecap="round" stroke-linejoin="round"></path></svg>`)();
|
|
36092
|
+
var styles3 = /* @__PURE__ */ (() => [
|
|
35942
36093
|
...sharedInputCSS,
|
|
35943
|
-
...focusInputCSS,
|
|
35944
36094
|
...inputBorderCSS,
|
|
35945
|
-
|
|
35946
|
-
|
|
35947
|
-
|
|
35948
|
-
|
|
35949
|
-
|
|
35950
|
-
|
|
35951
|
-
|
|
35952
|
-
|
|
35953
|
-
|
|
35954
|
-
|
|
35955
|
-
|
|
35956
|
-
|
|
35957
|
-
|
|
35958
|
-
|
|
35959
|
-
|
|
35960
|
-
|
|
35961
|
-
|
|
35962
|
-
|
|
35963
|
-
|
|
35964
|
-
|
|
35965
|
-
|
|
35966
|
-
|
|
35967
|
-
|
|
35968
|
-
|
|
35969
|
-
|
|
36095
|
+
...inputWrapperCSS,
|
|
36096
|
+
css(`.${selectWrapperClassName}`, {
|
|
36097
|
+
// First we use the complete padding string, which may be any valid
|
|
36098
|
+
// padding string (10px, 10px 10px, 10px 10px 10px, or 10px 10px
|
|
36099
|
+
// 10px 10px), and use it to set only the right padding. This pushes
|
|
36100
|
+
// the actual select away from the arrow by 1x.
|
|
36101
|
+
padding: css.variable('--framer-input-padding'),
|
|
36102
|
+
paddingTop: 0,
|
|
36103
|
+
paddingBottom: 0,
|
|
36104
|
+
paddingLeft: 0,
|
|
36105
|
+
background: css.variable('--framer-input-background'),
|
|
36106
|
+
borderTopLeftRadius: css.variable('--framer-input-border-radius-top-left'),
|
|
36107
|
+
borderTopRightRadius: css.variable('--framer-input-border-radius-top-right'),
|
|
36108
|
+
borderBottomRightRadius: css.variable('--framer-input-border-radius-bottom-right'),
|
|
36109
|
+
borderBottomLeftRadius: css.variable('--framer-input-border-radius-bottom-left'),
|
|
36110
|
+
boxShadow: css.variable('--framer-input-box-shadow'),
|
|
36111
|
+
transition: css.variable('--framer-input-focused-transition'),
|
|
36112
|
+
transitionProperty: 'background, box-shadow',
|
|
36113
|
+
}),
|
|
36114
|
+
css(`.${selectWrapperClassName} select`, {
|
|
36115
|
+
appearance: 'none',
|
|
36116
|
+
'-webkit-appearance': 'none',
|
|
36117
|
+
// Then we use the complete padding string again as the margin for
|
|
36118
|
+
// the select. This moves the select 2x the padding right away from
|
|
36119
|
+
// the arrow.
|
|
36120
|
+
padding: css.variable('--framer-input-padding'),
|
|
36121
|
+
// Overwrite the values inherited from .${inputClassName}. On a
|
|
36122
|
+
// select, these values are on the wrapper.
|
|
36123
|
+
background: 'transparent',
|
|
36124
|
+
}),
|
|
36125
|
+
css(`.${selectWrapperClassName}::before`, Object.assign(Object.assign({}, inputIconCSSDeclaration), { paddingLeft: `${iconSpacing}px`, backgroundPosition: `${iconSpacing}px center`, maskPosition: `${iconSpacing}px center`, backgroundImage: css.variable('--framer-input-icon-image'), maskImage: css.variable('--framer-input-icon-mask-image', `url('${defaultSelectCaretMaskImage}')`) })),
|
|
36126
|
+
css(`.${selectWrapperClassName} select:required:invalid`, {
|
|
36127
|
+
color: css.variable('--framer-input-invalid-text-color'),
|
|
36128
|
+
}),
|
|
36129
|
+
css(`.${selectWrapperClassName}:focus-within, .${selectWrapperClassName}.${forcedFocusClassName}`, {
|
|
36130
|
+
background: css.variable('--framer-input-focused-background', '--framer-input-background'),
|
|
36131
|
+
boxShadow: css.variable('--framer-input-focused-box-shadow', '--framer-input-box-shadow'),
|
|
36132
|
+
}),
|
|
36133
|
+
css(`.${selectWrapperClassName}:focus-within::after, .${selectWrapperClassName}.${forcedFocusClassName}::after`, {
|
|
36134
|
+
borderColor: css.variable('--framer-input-focused-border-color', '--framer-input-border-color'),
|
|
36135
|
+
borderStyle: css.variable('--framer-input-focused-border-style', '--framer-input-border-style'),
|
|
36136
|
+
borderWidth: css.variable('--framer-input-focused-border-width', inputBorderAllSides),
|
|
36137
|
+
}),
|
|
36138
|
+
])();
|
|
36139
|
+
var FormSelect = /* @__PURE__ */ withCSS(Select, styles3);
|
|
35970
36140
|
exports.FormSelect = FormSelect;
|
|
35971
36141
|
var Image2 = /* @__PURE__ */ react_12.default.forwardRef(function Image3(props, ref) {
|
|
35972
36142
|
const { background, children, alt } = props, rest = __rest(props, ["background", "children", "alt"]);
|
|
@@ -36048,7 +36218,7 @@ function convertCodeComponentContainer(componentDefinitionProvider, node, conver
|
|
|
36048
36218
|
converter(codeComponentPresentation, codeComponentPresentation.children.map((child) => convertPresentationTree(child, converter, componentDefinitionProvider, getCachedNode, skipCodeComponentPropsCache))),
|
|
36049
36219
|
];
|
|
36050
36220
|
}
|
|
36051
|
-
var CodeComponentPresentation = class {
|
|
36221
|
+
var CodeComponentPresentation = /*#__PURE__*/ class {
|
|
36052
36222
|
constructor(id3, componentIdentifier, packageVersion, props, children, codeOverrideIdentifier) {
|
|
36053
36223
|
this.id = id3;
|
|
36054
36224
|
this.componentIdentifier = componentIdentifier;
|
|
@@ -36081,7 +36251,7 @@ var escapeHTML = (str) => str.replace(htmlRegExp, (tag) => ({
|
|
|
36081
36251
|
var regex = /(<([a-z]+)(?:\s+(?!href[\s=])[^=\s]+=(?:'[^']*'|"[^"]*"))*)(?:(\s+href\s*=)(?:'([^']*)'|"([^"]*)"))?((?:\s+[^=\s]+=(?:'[^']*'|"[^"]*"))*>)/gi;
|
|
36082
36252
|
function replaceFramerPageLinks(rawHTML, getRoute, currentRoute, implicitPathVariables) {
|
|
36083
36253
|
return rawHTML.replace(regex, (original, pre1, tag, pre2, value1, value2, post) => {
|
|
36084
|
-
var
|
|
36254
|
+
var _j;
|
|
36085
36255
|
var _a, _b;
|
|
36086
36256
|
if (tag.toLowerCase() !== 'a')
|
|
36087
36257
|
return original;
|
|
@@ -36097,7 +36267,7 @@ function replaceFramerPageLinks(rawHTML, getRoute, currentRoute, implicitPathVar
|
|
|
36097
36267
|
if (!targetPath || !currentPath)
|
|
36098
36268
|
return original;
|
|
36099
36269
|
let attributes = ` ${'data-framer-page-link-target'}="${pageLink.target}"`;
|
|
36100
|
-
const elementId = getRouteElementId(targetRoute, (
|
|
36270
|
+
const elementId = getRouteElementId(targetRoute, (_j = pageLink.element) !== null && _j !== void 0 ? _j : void 0);
|
|
36101
36271
|
if (elementId) {
|
|
36102
36272
|
attributes += ` ${'data-framer-page-link-element'}="${pageLink.element}"`;
|
|
36103
36273
|
}
|
|
@@ -36130,12 +36300,12 @@ var htmlEscapes = {
|
|
|
36130
36300
|
var reUnescapedHtml = /[&<>"']/gu;
|
|
36131
36301
|
var reHasUnescapedHtml = /* @__PURE__ */ (() => new RegExp(reUnescapedHtml.source))();
|
|
36132
36302
|
function escapeHTML2(str) {
|
|
36133
|
-
return str && reHasUnescapedHtml.test(str) ? str.replace(reUnescapedHtml, (chr) => { var
|
|
36303
|
+
return str && reHasUnescapedHtml.test(str) ? str.replace(reUnescapedHtml, (chr) => { var _j; return (_j = htmlEscapes[chr]) !== null && _j !== void 0 ? _j : ''; }) : str || '';
|
|
36134
36304
|
}
|
|
36135
36305
|
var deprecatedRichTextPlaceholder = '{{ text-placeholder }}';
|
|
36136
36306
|
var richTextWrapperClassName = 'rich-text-wrapper';
|
|
36137
36307
|
var DeprecatedRichText = /* @__PURE__ */ React2.forwardRef(function Text(props, forwardedRef) {
|
|
36138
|
-
var
|
|
36308
|
+
var _j, _k;
|
|
36139
36309
|
const { id: id3, name, html, htmlFromDesign, text, textFromDesign, fonts = [], width, height, left, right, top, bottom, center, className: className2, stylesPresetsClassName, visible = true, opacity, rotation = 0, verticalAlignment = 'top', isEditable = false, willChangeTransform, environment: environment2 = RenderTarget.current, withExternalLayout = false, positionSticky, positionStickyTop, positionStickyRight, positionStickyBottom, positionStickyLeft, __htmlStructure, __fromCanvasComponent = false, _forwardedOverrideId, _forwardedOverrides, _usesDOMRect, children: _children } = props, rest = __rest(props, ["id", "name", "html", "htmlFromDesign", "text", "textFromDesign", "fonts", "width", "height", "left", "right", "top", "bottom", "center", "className", "stylesPresetsClassName", "visible", "opacity", "rotation", "verticalAlignment", "isEditable", "willChangeTransform", "environment", "withExternalLayout", "positionSticky", "positionStickyTop", "positionStickyRight", "positionStickyBottom", "positionStickyLeft", "__htmlStructure", "__fromCanvasComponent", "_forwardedOverrideId", "_forwardedOverrides", "_usesDOMRect", "children"]);
|
|
36140
36310
|
const parentSize = useParentSize();
|
|
36141
36311
|
const layoutId = useLayoutId2(props);
|
|
@@ -36143,7 +36313,7 @@ var DeprecatedRichText = /* @__PURE__ */ React2.forwardRef(function Text(props,
|
|
|
36143
36313
|
const layoutRef = forwardedRef !== null && forwardedRef !== void 0 ? forwardedRef : fallbackLayoutRef;
|
|
36144
36314
|
const { navigate, getRoute, } = useRouter();
|
|
36145
36315
|
const currentRoute = useCurrentRoute();
|
|
36146
|
-
useRoutePreloader((
|
|
36316
|
+
useRoutePreloader((_j = props.preload) !== null && _j !== void 0 ? _j : []);
|
|
36147
36317
|
useMeasureLayout(props, layoutRef);
|
|
36148
36318
|
const inCodeComponent = React2.useContext(ComponentContainerContext);
|
|
36149
36319
|
const isOnCanvas = useIsOnFramerCanvas();
|
|
@@ -36213,7 +36383,7 @@ var DeprecatedRichText = /* @__PURE__ */ React2.forwardRef(function Text(props,
|
|
|
36213
36383
|
const frame2 = calculateRect(props, parentSize || 0, false);
|
|
36214
36384
|
const isAutoSized2 = _usesDOMRect && (width === 'auto' || height === 'auto');
|
|
36215
36385
|
const hasTransformTemplate = !!props.transformTemplate || !frame2 || !restrictedRenderTarget || __fromCanvasComponent || isAutoSized2;
|
|
36216
|
-
const template = hasTransformTemplate ? (
|
|
36386
|
+
const template = hasTransformTemplate ? (_k = props.transformTemplate) !== null && _k !== void 0 ? _k : transformTemplate(center) : void 0;
|
|
36217
36387
|
if (!withExternalLayout) {
|
|
36218
36388
|
if (frame2 && restrictedRenderTarget && !isAutoSized2) {
|
|
36219
36389
|
const rotate = Animatable.getNumber(rotation).toFixed(4);
|
|
@@ -36280,8 +36450,8 @@ function useLoadFonts(fonts, fromCanvasComponent, containerRef) {
|
|
|
36280
36450
|
});
|
|
36281
36451
|
}
|
|
36282
36452
|
}
|
|
36283
|
-
var FitText = /* @__PURE__ */ (0, react_3.forwardRef)((
|
|
36284
|
-
var { viewBoxScale, viewBox, children } =
|
|
36453
|
+
var FitText = /* @__PURE__ */ (0, react_3.forwardRef)((_j, ref) => {
|
|
36454
|
+
var { viewBoxScale, viewBox, children } = _j, props = __rest(_j, ["viewBoxScale", "viewBox", "children"]);
|
|
36285
36455
|
return /* @__PURE__ */ (0, jsx_runtime_1.jsx)(motion.svg, Object.assign(Object.assign({ ref }, props), { viewBox, children: /* @__PURE__ */ (0, jsx_runtime_1.jsx)(motion.foreignObject, {
|
|
36286
36456
|
width: '100%',
|
|
36287
36457
|
height: '100%',
|
|
@@ -36295,7 +36465,7 @@ var FitText = /* @__PURE__ */ (0, react_3.forwardRef)((_f, ref) => {
|
|
|
36295
36465
|
}) }));
|
|
36296
36466
|
});
|
|
36297
36467
|
var RichTextContainer = /* @__PURE__ */ (0, react_3.forwardRef)((props, ref) => {
|
|
36298
|
-
var
|
|
36468
|
+
var _j;
|
|
36299
36469
|
const { __fromCanvasComponent = false, _forwardedOverrideId, _forwardedOverrides, _usesDOMRect, as: _as, bottom, center, children, environment: environment2 = RenderTarget.current, fonts = [], height, isEditable = false, left, name, opacity, positionSticky, positionStickyBottom, positionStickyLeft, positionStickyRight, positionStickyTop, right, rotation = 0, style, _initialStyle, stylesPresetsClassNames, text: plainText, top, verticalAlignment = 'top', visible = true, width, willChangeTransform, withExternalLayout = false, viewBox, viewBoxScale = 1 } = props, rest = __rest(props, ["__fromCanvasComponent", "_forwardedOverrideId", "_forwardedOverrides", "_usesDOMRect", "as", "bottom", "center", "children", "environment", "fonts", "height", "isEditable", "left", "name", "opacity", "positionSticky", "positionStickyBottom", "positionStickyLeft", "positionStickyRight", "positionStickyTop", "right", "rotation", "style", "_initialStyle", "stylesPresetsClassNames", "text", "top", "verticalAlignment", "visible", "width", "willChangeTransform", "withExternalLayout", "viewBox", "viewBoxScale"]);
|
|
36300
36470
|
const parentSize = useParentSize();
|
|
36301
36471
|
const isOnCanvas = useIsOnFramerCanvas();
|
|
@@ -36323,7 +36493,7 @@ var RichTextContainer = /* @__PURE__ */ (0, react_3.forwardRef)((props, ref) =>
|
|
|
36323
36493
|
const frame2 = calculateRect(props, parentSize || 0, false);
|
|
36324
36494
|
const isAutoSized2 = _usesDOMRect && (width === 'auto' || height === 'auto');
|
|
36325
36495
|
const hasTransformTemplate = !!props.transformTemplate || !frame2 || !restrictedRenderTarget || __fromCanvasComponent || isAutoSized2;
|
|
36326
|
-
const template = hasTransformTemplate ? (
|
|
36496
|
+
const template = hasTransformTemplate ? (_j = props.transformTemplate) !== null && _j !== void 0 ? _j : transformTemplate(center) : void 0;
|
|
36327
36497
|
if (!withExternalLayout) {
|
|
36328
36498
|
if (frame2 && restrictedRenderTarget && !isAutoSized2) {
|
|
36329
36499
|
containerStyle.x = frame2.x;
|
|
@@ -36401,7 +36571,7 @@ function styleRichTextChildren(element, stylesPresetsClassNames, plainText) {
|
|
|
36401
36571
|
}
|
|
36402
36572
|
return child;
|
|
36403
36573
|
});
|
|
36404
|
-
const
|
|
36574
|
+
const _j = element.props, { ['data-preset-tag']: dataPresetTag } = _j, props = __rest(_j, ['data-preset-tag']);
|
|
36405
36575
|
if (isString22(element.type) || isMotionComponent(element.type)) {
|
|
36406
36576
|
const tag = dataPresetTag || unwrapMotionComponent(element.type) || element.type;
|
|
36407
36577
|
const stylesPresetClassName = isString22(tag) ? stylesPresetsClassNames == null ? void 0 : stylesPresetsClassNames[tag] : void 0;
|
|
@@ -36409,8 +36579,8 @@ function styleRichTextChildren(element, stylesPresetsClassNames, plainText) {
|
|
|
36409
36579
|
}
|
|
36410
36580
|
return (0, react_11.cloneElement)(element, props, ...children);
|
|
36411
36581
|
}
|
|
36412
|
-
var RichText = /* @__PURE__ */ (0, react_3.forwardRef)((
|
|
36413
|
-
var { children, html, htmlFromDesign } =
|
|
36582
|
+
var RichText = /* @__PURE__ */ (0, react_3.forwardRef)((_j, ref) => {
|
|
36583
|
+
var { children, html, htmlFromDesign } = _j, props = __rest(_j, ["children", "html", "htmlFromDesign"]);
|
|
36414
36584
|
const content = html || children || htmlFromDesign;
|
|
36415
36585
|
if (isString22(content)) {
|
|
36416
36586
|
if (!props.stylesPresetsClassName && isObject2(props.stylesPresetsClassNames)) {
|
|
@@ -36470,12 +36640,12 @@ function linearGradientLine(angle) {
|
|
|
36470
36640
|
return Line(start, end);
|
|
36471
36641
|
}
|
|
36472
36642
|
function elementPropertiesForLinearGradient(gradient, id3) {
|
|
36473
|
-
var
|
|
36643
|
+
var _j, _k;
|
|
36474
36644
|
var _a, _b;
|
|
36475
36645
|
const line = linearGradientLine(gradient.angle);
|
|
36476
36646
|
const stops = gradientColorStops(gradient);
|
|
36477
|
-
const startPosition = (
|
|
36478
|
-
const endPosition = (
|
|
36647
|
+
const startPosition = (_j = ((_a = stops[0]) == null ? void 0 : _a.position)) !== null && _j !== void 0 ? _j : 0;
|
|
36648
|
+
const endPosition = (_k = ((_b = stops[stops.length - 1]) == null ? void 0 : _b.position)) !== null && _k !== void 0 ? _k : 1;
|
|
36479
36649
|
const startPoint = Line.pointAtPercentDistance(line, startPosition);
|
|
36480
36650
|
const endPoint = Line.pointAtPercentDistance(line, endPosition);
|
|
36481
36651
|
const interpolator = interpolate([startPosition, endPosition,], [0, 1,]);
|
|
@@ -36541,7 +36711,7 @@ function getPositionYFraction(positionY) {
|
|
|
36541
36711
|
return 0.5;
|
|
36542
36712
|
}
|
|
36543
36713
|
function imagePatternPropsForFill(fill, frame2, id3, includeTransform) {
|
|
36544
|
-
var
|
|
36714
|
+
var _j, _k, _l, _m;
|
|
36545
36715
|
fill = Animatable.get(fill, '#09F');
|
|
36546
36716
|
if (!BackgroundImage.isImageObject(fill))
|
|
36547
36717
|
return void 0;
|
|
@@ -36563,11 +36733,11 @@ function imagePatternPropsForFill(fill, frame2, id3, includeTransform) {
|
|
|
36563
36733
|
const validScaleX = realWidth / frame2.width;
|
|
36564
36734
|
const validScaleY = realHeight / frame2.height;
|
|
36565
36735
|
if (fit === 'tile') {
|
|
36566
|
-
(
|
|
36736
|
+
(_j = fill.backgroundSize) !== null && _j !== void 0 ? _j : (fill.backgroundSize = 1);
|
|
36567
36737
|
width = Math.round(fill.backgroundSize * (imageWidth / 2));
|
|
36568
36738
|
height = Math.round(fill.backgroundSize * (imageHeight / 2));
|
|
36569
|
-
const layerPositionX = (
|
|
36570
|
-
const layerPositionY = (
|
|
36739
|
+
const layerPositionX = (_k = frame2.x) !== null && _k !== void 0 ? _k : 0;
|
|
36740
|
+
const layerPositionY = (_l = frame2.y) !== null && _l !== void 0 ? _l : 0;
|
|
36571
36741
|
let extraOffsetX = 0;
|
|
36572
36742
|
let extraOffsetY = 0;
|
|
36573
36743
|
if (includeTransform) {
|
|
@@ -36593,7 +36763,7 @@ function imagePatternPropsForFill(fill, frame2, id3, includeTransform) {
|
|
|
36593
36763
|
const imageId = `id${id3}g${'-fillImage'}`;
|
|
36594
36764
|
return {
|
|
36595
36765
|
id: imageId,
|
|
36596
|
-
path: (
|
|
36766
|
+
path: (_m = fill.src) !== null && _m !== void 0 ? _m : '',
|
|
36597
36767
|
transform: transform2,
|
|
36598
36768
|
width,
|
|
36599
36769
|
height,
|
|
@@ -36607,7 +36777,7 @@ function isAssetReference(value) {
|
|
|
36607
36777
|
return value.startsWith(`data:${mediaType2}`);
|
|
36608
36778
|
}
|
|
36609
36779
|
function imageUrlForAsset(asset, pixelSize) {
|
|
36610
|
-
var
|
|
36780
|
+
var _j;
|
|
36611
36781
|
if (/^\w+:/.test(asset) && !isAssetReference(asset))
|
|
36612
36782
|
return asset;
|
|
36613
36783
|
if (typeof pixelSize !== 'number')
|
|
@@ -36621,10 +36791,10 @@ function imageUrlForAsset(asset, pixelSize) {
|
|
|
36621
36791
|
else
|
|
36622
36792
|
pixelSize = 4096;
|
|
36623
36793
|
const isExport = RenderTarget.current() === RenderTarget.export;
|
|
36624
|
-
return (
|
|
36794
|
+
return (_j = runtime.assetResolver(asset, {
|
|
36625
36795
|
pixelSize,
|
|
36626
36796
|
isExport,
|
|
36627
|
-
})) !== null &&
|
|
36797
|
+
})) !== null && _j !== void 0 ? _j : '';
|
|
36628
36798
|
}
|
|
36629
36799
|
exports.imageUrlForAsset = imageUrlForAsset;
|
|
36630
36800
|
var ImagePatternElement = ({ id: id3, path, transform: transform2, repeat, width, height, offsetX, offsetY, }) => {
|
|
@@ -36649,7 +36819,7 @@ var ImagePatternElement = ({ id: id3, path, transform: transform2, repeat, width
|
|
|
36649
36819
|
});
|
|
36650
36820
|
};
|
|
36651
36821
|
var useDOM = /* @__PURE__ */ isBrowser2();
|
|
36652
|
-
var SharedSVGEntry = class {
|
|
36822
|
+
var SharedSVGEntry = /*#__PURE__*/ class {
|
|
36653
36823
|
constructor(id3, svg, innerHTML, viewBox, count = 0) {
|
|
36654
36824
|
this.id = id3;
|
|
36655
36825
|
this.svg = svg;
|
|
@@ -36658,7 +36828,7 @@ var SharedSVGEntry = class {
|
|
|
36658
36828
|
this.count = count;
|
|
36659
36829
|
}
|
|
36660
36830
|
};
|
|
36661
|
-
var SharedSVGManager = class {
|
|
36831
|
+
var SharedSVGManager = /*#__PURE__*/ class {
|
|
36662
36832
|
constructor() {
|
|
36663
36833
|
__publicField(this, 'entries', /* @__PURE__ */ new Map());
|
|
36664
36834
|
}
|
|
@@ -36794,7 +36964,7 @@ function parseSVG(svg) {
|
|
|
36794
36964
|
throw Error('no svg element found');
|
|
36795
36965
|
return node;
|
|
36796
36966
|
}
|
|
36797
|
-
catch (
|
|
36967
|
+
catch (_j) {
|
|
36798
36968
|
return;
|
|
36799
36969
|
}
|
|
36800
36970
|
}
|
|
@@ -36895,12 +37065,12 @@ function hasBorderRadius(style) {
|
|
|
36895
37065
|
style.borderTopRightRadius);
|
|
36896
37066
|
}
|
|
36897
37067
|
function sizeSVG(container, props) {
|
|
36898
|
-
var
|
|
37068
|
+
var _j;
|
|
36899
37069
|
var _a, _b;
|
|
36900
37070
|
const div = container.current;
|
|
36901
37071
|
if (!div)
|
|
36902
37072
|
return;
|
|
36903
|
-
const localWindow = (
|
|
37073
|
+
const localWindow = (_j = props.providedWindow) !== null && _j !== void 0 ? _j : safeWindow;
|
|
36904
37074
|
const svg = div.firstElementChild;
|
|
36905
37075
|
if (!svg || !(svg instanceof localWindow.SVGSVGElement))
|
|
36906
37076
|
return;
|
|
@@ -37038,12 +37208,12 @@ var SVGComponent = /* @__PURE__ */ (() => {
|
|
|
37038
37208
|
}
|
|
37039
37209
|
}
|
|
37040
37210
|
render() {
|
|
37041
|
-
var
|
|
37211
|
+
var _j;
|
|
37042
37212
|
countNodeRender();
|
|
37043
|
-
const
|
|
37213
|
+
const _k = this.props, { id: id3, visible, style, fill, svg, intrinsicHeight, intrinsicWidth, title, description, layoutId, className: className2, variants, withExternalLayout, innerRef, svgContentId, height: _height, opacity: _opacity, width: _width } = _k, rest = __rest(_k, ["id", "visible", "style", "fill", "svg", "intrinsicHeight", "intrinsicWidth", "title", "description", "layoutId", "className", "variants", "withExternalLayout", "innerRef", "svgContentId", "height", "opacity", "width"]);
|
|
37044
37214
|
if (!withExternalLayout && (!visible || !id3))
|
|
37045
37215
|
return null;
|
|
37046
|
-
const identifier = (
|
|
37216
|
+
const identifier = (_j = id3 !== null && id3 !== void 0 ? id3 : layoutId) !== null && _j !== void 0 ? _j : 'svg';
|
|
37047
37217
|
const frame2 = this.frame;
|
|
37048
37218
|
const size = frame2 || {
|
|
37049
37219
|
width: intrinsicWidth || 100,
|
|
@@ -37229,21 +37399,21 @@ function TextStyleSheet() {
|
|
|
37229
37399
|
return null;
|
|
37230
37400
|
}
|
|
37231
37401
|
var Text2 = /* @__PURE__ */ react_12.default.forwardRef(function Text3(props, forwardedRef) {
|
|
37232
|
-
var
|
|
37402
|
+
var _j, _k;
|
|
37233
37403
|
const parentSize = useParentSize();
|
|
37234
37404
|
const layoutId = useLayoutId2(props);
|
|
37235
37405
|
const fallbackLayoutRef = (0, react_4.useRef)(null);
|
|
37236
37406
|
const layoutRef = forwardedRef !== null && forwardedRef !== void 0 ? forwardedRef : fallbackLayoutRef;
|
|
37237
37407
|
const { navigate, getRoute, } = useRouter();
|
|
37238
37408
|
const currentRoute = useCurrentRoute();
|
|
37239
|
-
useRoutePreloader((
|
|
37409
|
+
useRoutePreloader((_j = props.preload) !== null && _j !== void 0 ? _j : []);
|
|
37240
37410
|
const onCanvas = useIsOnFramerCanvas();
|
|
37241
37411
|
const matchesCurrentRoute = useLinkMatchesRoute(props.__link);
|
|
37242
37412
|
const fontLoadStatus = useFontLoadStatus(props.fonts);
|
|
37243
37413
|
useMeasureLayout(props, layoutRef);
|
|
37244
37414
|
const { fonts, __fromCanvasComponent, } = props;
|
|
37245
37415
|
const prevFontsRef = (0, react_4.useRef)([]);
|
|
37246
|
-
const fontsDidChange = !isShallowEqualArray((
|
|
37416
|
+
const fontsDidChange = !isShallowEqualArray((_k = prevFontsRef.current) !== null && _k !== void 0 ? _k : [], fonts !== null && fonts !== void 0 ? fonts : []);
|
|
37247
37417
|
prevFontsRef.current = fonts;
|
|
37248
37418
|
(0, react_2.useEffect)(() => {
|
|
37249
37419
|
if (!fontsDidChange || !fonts)
|
|
@@ -37298,7 +37468,7 @@ var TextComponent = /* @__PURE__ */ (() => {
|
|
|
37298
37468
|
});
|
|
37299
37469
|
__publicField(this, 'renderMain', (inCodeComponent) => {
|
|
37300
37470
|
countNodeRender();
|
|
37301
|
-
const
|
|
37471
|
+
const _j = this.props, { font, visible, alignment, willChangeTransform, opacity, id: id3, layoutId, className: className2, transition, variants, name, __fromCanvasComponent, _initialStyle, widthType: _widthType, heightType: _heightType, _usesDOMRect, autoSize, style: styleProp, fontLoadStatus, matchesCurrentRoute, preload: _preload, tabIndex } = _j, rest = __rest(_j, ["font", "visible", "alignment", "willChangeTransform", "opacity", "id", "layoutId", "className", "transition", "variants", "name", "__fromCanvasComponent", "_initialStyle", "widthType", "heightType", "_usesDOMRect", "autoSize", "style", "fontLoadStatus", "matchesCurrentRoute", "preload", "tabIndex"]);
|
|
37302
37472
|
if (!visible) {
|
|
37303
37473
|
return null;
|
|
37304
37474
|
}
|
|
@@ -37522,7 +37692,7 @@ function getTabIndexProps(tabIndex) {
|
|
|
37522
37692
|
};
|
|
37523
37693
|
}
|
|
37524
37694
|
var keys22 = /* @__PURE__ */ new Map();
|
|
37525
|
-
var InternalID = class {
|
|
37695
|
+
var InternalID = /*#__PURE__*/ class {
|
|
37526
37696
|
constructor(id3) {
|
|
37527
37697
|
this.id = id3;
|
|
37528
37698
|
__publicField(this, '_link', null);
|
|
@@ -37557,7 +37727,7 @@ var InternalID = class {
|
|
|
37557
37727
|
};
|
|
37558
37728
|
exports.InternalID = InternalID;
|
|
37559
37729
|
var PathSegmentOuter = /* @__PURE__ */ (() => {
|
|
37560
|
-
const _PathSegment = class {
|
|
37730
|
+
const _PathSegment = /*#__PURE__*/ class {
|
|
37561
37731
|
constructor(value) {
|
|
37562
37732
|
__publicField(this, '__class', 'PathSegment');
|
|
37563
37733
|
__publicField(this, 'x', 0);
|
|
@@ -37809,7 +37979,7 @@ function transformString(transform2) {
|
|
|
37809
37979
|
return result;
|
|
37810
37980
|
}
|
|
37811
37981
|
exports.transformString = transformString;
|
|
37812
|
-
var LinearGradientElement = class extends react_9.Component {
|
|
37982
|
+
var LinearGradientElement = /*#__PURE__*/ class extends react_9.Component {
|
|
37813
37983
|
render() {
|
|
37814
37984
|
const { id: id3, stops, x1, x2, y1, y2, } = this.props;
|
|
37815
37985
|
return /* @__PURE__ */ (0, jsx_runtime_1.jsx)('linearGradient', {
|
|
@@ -37828,7 +37998,7 @@ var LinearGradientElement = class extends react_9.Component {
|
|
|
37828
37998
|
});
|
|
37829
37999
|
}
|
|
37830
38000
|
};
|
|
37831
|
-
var RadialGradientElement = class extends react_9.Component {
|
|
38001
|
+
var RadialGradientElement = /*#__PURE__*/ class extends react_9.Component {
|
|
37832
38002
|
render() {
|
|
37833
38003
|
const { centerAnchorX, centerAnchorY, id: id3, widthFactor, heightFactor, stops, } = this.props;
|
|
37834
38004
|
return /* @__PURE__ */ (0, jsx_runtime_1.jsx)('radialGradient', {
|
|
@@ -37847,7 +38017,7 @@ var RadialGradientElement = class extends react_9.Component {
|
|
|
37847
38017
|
});
|
|
37848
38018
|
}
|
|
37849
38019
|
};
|
|
37850
|
-
var SVGRoot = class extends react_9.Component {
|
|
38020
|
+
var SVGRoot = /*#__PURE__*/ class extends react_9.Component {
|
|
37851
38021
|
render() {
|
|
37852
38022
|
const { children, frame: frame2, innerRef, } = this.props;
|
|
37853
38023
|
const { width, height, } = frame2;
|
|
@@ -37877,12 +38047,12 @@ var Vector = /* @__PURE__ */ (() => {
|
|
|
37877
38047
|
var _a;
|
|
37878
38048
|
return _a = class extends Layer {
|
|
37879
38049
|
render() {
|
|
37880
|
-
var
|
|
38050
|
+
var _j, _k;
|
|
37881
38051
|
countNodeRender();
|
|
37882
38052
|
const { opacity, calculatedPath, d, insideStroke, shapeId, strokeEnabled, strokeClipId, strokeWidth, idAttribute, rect, shadows, strokeAlpha, name, includeTransform, isRootVectorNode, rotation, id: id3, lineCap, lineJoin, strokeColor, strokeMiterLimit, strokeDashArray, strokeDashOffset, fill, variants, transition, } = this.props;
|
|
37883
38053
|
if (!id3 || !shapeId || !strokeClipId)
|
|
37884
38054
|
return null;
|
|
37885
|
-
const rotate = (
|
|
38055
|
+
const rotate = (_k = (_j = this.props.rotate) !== null && _j !== void 0 ? _j : rotation) !== null && _k !== void 0 ? _k : 0;
|
|
37886
38056
|
const { target, } = RenderEnvironment;
|
|
37887
38057
|
const transform2 = transformValues(rect, rotate, isRootVectorNode, includeTransform);
|
|
37888
38058
|
let vectorFill;
|
|
@@ -38028,9 +38198,9 @@ var Vector = /* @__PURE__ */ (() => {
|
|
|
38028
38198
|
}));
|
|
38029
38199
|
}
|
|
38030
38200
|
renderElement(element) {
|
|
38031
|
-
var
|
|
38201
|
+
var _j, _k;
|
|
38032
38202
|
const { isRootVectorNode, width, height, rect, willChangeTransform, includeTransform, } = this.props;
|
|
38033
|
-
const frame2 = (
|
|
38203
|
+
const frame2 = (_k = (_j = this.props.frame) !== null && _j !== void 0 ? _j : rect) !== null && _k !== void 0 ? _k : {
|
|
38034
38204
|
x: 0,
|
|
38035
38205
|
y: 0,
|
|
38036
38206
|
width: 100,
|