Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@contentful/live-preview

Package Overview
Dependencies
Maintainers
175
Versions
218
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@contentful/live-preview - npm Package Compare versions

Comparing version 2.13.0-alpha.8 to 2.13.0

dist/graphql/assets.d.ts

1

dist/constants.d.ts

@@ -0,2 +1,3 @@

export declare const MAX_DEPTH = 10;
export declare const LIVE_PREVIEW_EDITOR_SOURCE: "live-preview-editor";
export declare const LIVE_PREVIEW_SDK_SOURCE: "live-preview-sdk";

4

dist/helpers/index.d.ts
export * from './debug';
export * from './pollUrlChanges';
export * from './field';
export * from './utils';
export * from './uuid';
export * from './pollUrlChanges';
export * from './resolveReference';

@@ -1,13 +0,3 @@

import { DocumentNode, SelectionNode } from 'graphql';
import { PostMessageMethods } from '../messages';
import type { EditorMessage } from '../messages';
import { PostMessageMethods } from '../messages';
type Params = Map<string, {
alias: Map<string, string>;
fields: Set<string>;
}>;
type Generated = {
__typename: string;
alias?: string;
name: string;
};
/**

@@ -44,35 +34,5 @@ * Sends the given message to the editor

*/
export declare function clone<T extends Record<string, unknown> | Array<unknown>>(incoming: T): T;
export declare function clone<T extends Record<any, any> | Array<any>>(incoming: T): T;
/** Detects if the current page is shown inside an iframe */
export declare function isInsideIframe(): boolean;
/**
* Takes a list of graphql fields and extract the field names and aliases for the live update processing
*/
export declare function gatherFieldInformation(selections: Readonly<SelectionNode[]>, typename: string): Generated[];
/**
* Parses the GraphQL query information and extracts the information,
* we're using for processing the live updates (requested fields, alias)
*/
export declare function parseGraphQLParams(query: DocumentNode): Params;
/**
* Generates the typename for the next node
* If it's inside a collection it will provide the typename from the collection name
*/
export declare function getTypeName(selection: {
name: {
value: string;
};
}, prevTypeName: string): string;
/**
* Extract the name of an entry from the collection (e.g. "postCollection" => "Post")
* Returns undefined if the name doesn't has the collection suffix.
*/
export declare function extractNameFromCollectionName(collection: string): string | undefined;
/**
* Generates the type name by capitalizing the first letter of the content type ID.
*
* @param {string} contentTypeId - The content type ID.
* @return {string} The generated type name.
*/
export declare function generateTypeName(contentTypeId: string): string;
export {};

@@ -1,4 +0,4 @@

import { DocumentNode } from 'graphql';
import type { ContentfulSubscribeConfig } from '..';
import { Argument, SubscribeCallback } from '../types';
import { DocumentNode } from 'graphql';
type ValidatedConfig = {

@@ -5,0 +5,0 @@ data: Argument;

@@ -40,6 +40,6 @@ import { type DocumentNode } from 'graphql';

static subscribe(event: 'edit', config: ContentfulSubscribeConfig): VoidFunction;
static getProps({ fieldId, entryId, locale }: LivePreviewProps): InspectorModeTags;
static getProps(props: LivePreviewProps): InspectorModeTags;
static toggleInspectorMode(): boolean;
static toggleLiveUpdatesMode(): boolean;
static openEntryInEditor({ fieldId, entryId, locale }: LivePreviewProps): void;
static openEntryInEditor(props: LivePreviewProps): void;
/**

@@ -46,0 +46,0 @@ * Returns a list of tagged entries on the page

@@ -1,2 +0,2 @@

import { C as t, I as o, L as E, a, b as I, P as r, V as i, o as n } from "./index-wJ0I9KGd.js";
import { C as t, I as o, L as E, a, b as i, P as I, V as n, e as r, o as P } from "./index-_002o5N2.js";
export {

@@ -7,7 +7,8 @@ t as ContentfulLivePreview,

a as LIVE_PREVIEW_SDK_SOURCE,
I as LivePreviewPostMessageMethods,
r as StorePostMessageMethods,
i as VERSION,
n as openEntryInEditorUtility
i as LivePreviewPostMessageMethods,
I as StorePostMessageMethods,
n as VERSION,
r as openAssetInEditorUtility,
P as openEntryInEditorUtility
};
//# sourceMappingURL=index.js.map
import type { SetRequired } from 'type-fest';
export type InspectorModeTags = {
export type InspectorModeEntryTags = {
[InspectorModeDataAttributes.ENTRY_ID]: string;
[InspectorModeDataAttributes.FIELD_ID]: string;
[InspectorModeDataAttributes.LOCALE]?: string;
} | null;
};
export type InspectorModeAssetTags = {
[InspectorModeDataAttributes.ASSET_ID]: string;
[InspectorModeDataAttributes.FIELD_ID]: string;
[InspectorModeDataAttributes.LOCALE]?: string;
};
export type InspectorModeTags = InspectorModeEntryTags | InspectorModeAssetTags | null;
export declare const enum InspectorModeDataAttributes {
FIELD_ID = "data-contentful-field-id",
ENTRY_ID = "data-contentful-entry-id",
ASSET_ID = "data-contentful-asset-id",
LOCALE = "data-contentful-locale"

@@ -21,3 +28,3 @@ }

}
export type InspectorModeAttributes = {
export type InspectorModeEntryAttributes = {
entryId: string;

@@ -27,2 +34,8 @@ fieldId: string;

};
export type InspectorModeAssetAttributes = {
assetId: string;
fieldId: string;
locale: string;
};
export type InspectorModeAttributes = InspectorModeEntryAttributes | InspectorModeAssetAttributes;
export type InspectorModeElement = {

@@ -29,0 +42,0 @@ attributes?: InspectorModeAttributes | null;

@@ -1,2 +0,2 @@

import type { ContentfulSubscribeConfig, MessageFromEditor } from './index';
import type { ContentfulSubscribeConfig, MessageFromEditor } from '.';
/**

@@ -15,2 +15,13 @@ * LiveUpdates for the Contentful Live Preview mode

});
private mergeEntity;
/**
* Merges the `dataFromPreviewApp` together with the `updateFromEntryEditor`
* If there is not direct match, it will try to merge things together recursively
* caches the result if cache is enabled and the entity has a `sys.id`.
* Caching should not be enabled for every entry,
* because nested references could be merged differently together and this could solve to data loss.
*/
private mergeNestedReference;
private merge;
private isCfEntity;
/** Receives the data from the message event handler and calls the subscriptions */

@@ -17,0 +28,0 @@ receiveMessage(message: MessageFromEditor): Promise<void>;

@@ -6,4 +6,4 @@ import type { RequestEntitiesMessage, RequestedEntitiesMessage } from '@contentful/visual-sdk';

import type { LIVE_PREVIEW_EDITOR_SOURCE, LIVE_PREVIEW_SDK_SOURCE } from './constants';
import { InspectorModeEventMethods, type InspectorModeAttributes, type InspectorModeChangedMessage, type InspectorModeMouseMoveMessage, type InspectorModeResizeMessage, type InspectorModeScrollMessage, type InspectorModeTaggedElementsMessage } from './inspectorMode/types';
import type { Argument, ContentType, EntityReferenceMap } from './types';
import { type InspectorModeAttributes, type InspectorModeChangedMessage, InspectorModeEventMethods, type InspectorModeMouseMoveMessage, type InspectorModeResizeMessage, type InspectorModeScrollMessage, type InspectorModeTaggedElementsMessage } from './inspectorMode/types';
import type { ContentType, EntityReferenceMap } from './types';
declare enum LivePreviewPostMessageMethods {

@@ -32,3 +32,3 @@ CONNECTED = "CONNECTED",

}
export { InspectorModeEventMethods, LivePreviewPostMessageMethods, RequestEntitiesMessage, RequestedEntitiesMessage, StorePostMessageMethods, };
export { StorePostMessageMethods, LivePreviewPostMessageMethods, RequestEntitiesMessage, RequestedEntitiesMessage, InspectorModeEventMethods, };
export type PostMessageMethods = LivePreviewPostMessageMethods | StorePostMessageMethods | InspectorModeEventMethods;

@@ -69,4 +69,2 @@ export type ConnectedMessage = {

event: 'edit' | 'save';
id: string;
config: string;
};

@@ -79,3 +77,3 @@ export type ErrorMessage = {

/** Additional information that could be helpful about this error (e.g. entryId) */
payload: Record<string, unknown>;
payload: Record<string, any>;
};

@@ -95,4 +93,5 @@ export type EditorMessage = ConnectedMessage | TaggedFieldClickMessage | UnknownEntityMessage | UrlChangedMessage | SubscribedMessage | RequestEntitiesMessage | ErrorMessage | InspectorModeMouseMoveMessage | InspectorModeScrollMessage | InspectorModeResizeMessage | InspectorModeTaggedElementsMessage;

method: LivePreviewPostMessageMethods.ENTRY_UPDATED;
data: Entry | Asset;
entity: Entry | Asset;
contentType: ContentType;
entityReferenceMap: EntityReferenceMap;
};

@@ -103,2 +102,3 @@ export type EntrySavedMessage = {

contentType: ContentType;
entityReferenceMap: EntityReferenceMap;
};

@@ -118,3 +118,2 @@ /** @deprecated use RequestEntitiesMessage instead */

export type MessageFromEditor = (EntryUpdatedMessage | EntrySavedMessage | UnknownReferenceLoaded | InspectorModeChangedMessage | DebugModeEnabledMessage | RequestedEntitiesMessage) & {
data: Argument;
method: PostMessageMethods;

@@ -126,1 +125,2 @@ /** @deprecated use source instead */

export declare function openEntryInEditorUtility(fieldId: string, entryId: string, locale: string, targetOrigin: string[]): void;
export declare function openAssetInEditorUtility(fieldId: string, assetId: string, locale: string, targetOrigin: string[]): void;

@@ -5,3 +5,3 @@ import { useEffect, type PropsWithChildren, type ReactElement } from 'react';

import type { InspectorModeTags } from './inspectorMode/types';
import { Argument, LivePreviewProps } from './types';
import { Argument, LivePreviewAssetProps, LivePreviewEntryProps, LivePreviewProps } from './types';
type UseEffectParams = Parameters<typeof useEffect>;

@@ -30,10 +30,12 @@ type EffectCallback = UseEffectParams[0];

type GetInspectorModeProps<T> = (props: {
[K in Exclude<keyof LivePreviewProps, keyof T | 'locale'>]: LivePreviewProps[K];
[K in Exclude<keyof LivePreviewEntryProps, keyof T | 'locale'>]: LivePreviewEntryProps[K];
} | ({
[K in Exclude<keyof LivePreviewAssetProps, keyof T | 'locale'>]: LivePreviewAssetProps[K];
} & {
locale?: LivePreviewProps['locale'];
}) => InspectorModeTags;
})) => InspectorModeTags;
/**
* Generates the function to build the required properties for the inspector mode (field tagging)
*/
export declare function useContentfulInspectorMode<T = undefined | Pick<LivePreviewProps, 'entryId'> | Pick<LivePreviewProps, 'entryId' | 'fieldId'>>(sharedProps?: T): GetInspectorModeProps<T>;
export declare function useContentfulInspectorMode<T = undefined | Pick<LivePreviewEntryProps, 'entryId'> | Pick<LivePreviewEntryProps, 'entryId' | 'fieldId'> | Pick<LivePreviewAssetProps, 'assetId'> | Pick<LivePreviewAssetProps, 'assetId' | 'fieldId'>>(sharedProps?: T): GetInspectorModeProps<T>;
export {};

@@ -1,7 +0,3 @@

import Zr, { createContext as xt, useRef as mr, useMemo as $r, useEffect as jt, useState as Dt, useContext as Qr, useCallback as It } from "react";
import { C as Ur, d as Ft } from "./index-wJ0I9KGd.js";
var Er = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
function Lt(f) {
return f && f.__esModule && Object.prototype.hasOwnProperty.call(f, "default") ? f.default : f;
}
import Zr, { createContext as At, useRef as mr, useMemo as $r, useEffect as jt, useState as Dt, useContext as Qr, useCallback as It } from "react";
import { c as Er, g as Ft, C as Ur, d as Lt } from "./index-_002o5N2.js";
var Mr = { exports: {} }, Me = {};

@@ -20,3 +16,3 @@ /**

return Jr || (Jr = 1, process.env.NODE_ENV !== "production" && function() {
var f = Zr, v = Symbol.for("react.element"), P = Symbol.for("react.portal"), A = Symbol.for("react.fragment"), x = Symbol.for("react.strict_mode"), I = Symbol.for("react.profiler"), U = Symbol.for("react.provider"), j = Symbol.for("react.context"), _ = Symbol.for("react.forward_ref"), Y = Symbol.for("react.suspense"), R = Symbol.for("react.suspense_list"), F = Symbol.for("react.memo"), H = Symbol.for("react.lazy"), ie = Symbol.for("react.offscreen"), Ue = Symbol.iterator, de = "@@iterator";
var d = Zr, v = Symbol.for("react.element"), P = Symbol.for("react.portal"), x = Symbol.for("react.fragment"), A = Symbol.for("react.strict_mode"), I = Symbol.for("react.profiler"), U = Symbol.for("react.provider"), j = Symbol.for("react.context"), _ = Symbol.for("react.forward_ref"), Y = Symbol.for("react.suspense"), w = Symbol.for("react.suspense_list"), F = Symbol.for("react.memo"), H = Symbol.for("react.lazy"), ie = Symbol.for("react.offscreen"), Ue = Symbol.iterator, de = "@@iterator";
function Ne(r) {

@@ -28,7 +24,7 @@ if (r === null || typeof r != "object")

}
var X = f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
var X = d.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
function E(r) {
{
for (var a = arguments.length, i = new Array(a > 1 ? a - 1 : 0), u = 1; u < a; u++)
i[u - 1] = arguments[u];
for (var a = arguments.length, i = new Array(a > 1 ? a - 1 : 0), s = 1; s < a; s++)
i[s - 1] = arguments[s];
We("error", r, i);

@@ -39,14 +35,14 @@ }

{
var u = X.ReactDebugCurrentFrame, p = u.getStackAddendum();
var s = X.ReactDebugCurrentFrame, p = s.getStackAddendum();
p !== "" && (a += "%s", i = i.concat([p]));
var c = i.map(function(d) {
return String(d);
var l = i.map(function(c) {
return String(c);
});
c.unshift("Warning: " + a), Function.prototype.apply.call(console[r], console, c);
l.unshift("Warning: " + a), Function.prototype.apply.call(console[r], console, l);
}
}
var wr = !1, Ye = !1, pe = !1, ze = !1, Rr = !1, Be;
var Rr = !1, Ye = !1, pe = !1, ze = !1, wr = !1, Be;
Be = Symbol.for("react.module.reference");
function Re(r) {
return !!(typeof r == "string" || typeof r == "function" || r === A || r === I || Rr || r === x || r === Y || r === R || ze || r === ie || wr || Ye || pe || typeof r == "object" && r !== null && (r.$$typeof === H || r.$$typeof === F || r.$$typeof === U || r.$$typeof === j || r.$$typeof === _ || // This needs to include all possible module reference object
function we(r) {
return !!(typeof r == "string" || typeof r == "function" || r === x || r === I || wr || r === A || r === Y || r === w || ze || r === ie || Rr || Ye || pe || typeof r == "object" && r !== null && (r.$$typeof === H || r.$$typeof === F || r.$$typeof === U || r.$$typeof === j || r.$$typeof === _ || // This needs to include all possible module reference object
// types supported by any Flight configuration anywhere since

@@ -58,5 +54,5 @@ // we don't know which Flight build this will end up being used

function Ge(r, a, i) {
var u = r.displayName;
if (u)
return u;
var s = r.displayName;
if (s)
return s;
var p = a.displayName || a.name || "";

@@ -76,3 +72,3 @@ return p !== "" ? i + "(" + p + ")" : i;

switch (r) {
case A:
case x:
return "Fragment";

@@ -83,7 +79,7 @@ case P:

return "Profiler";
case x:
case A:
return "StrictMode";
case Y:
return "Suspense";
case R:
case w:
return "SuspenseList";

@@ -102,8 +98,8 @@ }

case F:
var u = r.displayName || null;
return u !== null ? u : z(r.type) || "Memo";
var s = r.displayName || null;
return s !== null ? s : z(r.type) || "Memo";
case H: {
var p = r, c = p._payload, d = p._init;
var p = r, l = p._payload, c = p._init;
try {
return z(d(c));
return z(c(l));
} catch {

@@ -116,3 +112,3 @@ return null;

}
var k = Object.assign, ue = 0, qe, He, Ke, ke, Ve, Je, Xe;
var k = Object.assign, se = 0, qe, He, Ke, ke, Ve, Je, Xe;
function Ze() {

@@ -123,3 +119,3 @@ }

{
if (ue === 0) {
if (se === 0) {
qe = console.log, He = console.info, Ke = console.warn, ke = console.error, Ve = console.group, Je = console.groupCollapsed, Xe = console.groupEnd;

@@ -142,3 +138,3 @@ var r = {

}
ue++;
se++;
}

@@ -148,3 +144,3 @@ }

{
if (ue--, ue === 0) {
if (se--, se === 0) {
var r = {

@@ -179,3 +175,3 @@ configurable: !0,

}
ue < 0 && E("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
se < 0 && E("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
}

@@ -190,4 +186,4 @@ }

} catch (p) {
var u = p.stack.trim().match(/\n( *(at )?)/);
Ce = u && u[1] || "";
var s = p.stack.trim().match(/\n( *(at )?)/);
Ce = s && s[1] || "";
}

@@ -198,6 +194,6 @@ return `

}
var ge = !1, se;
var ge = !1, ue;
{
var Qe = typeof WeakMap == "function" ? WeakMap : Map;
se = new Qe();
ue = new Qe();
}

@@ -208,18 +204,18 @@ function _e(r, a) {

{
var i = se.get(r);
var i = ue.get(r);
if (i !== void 0)
return i;
}
var u;
var s;
ge = !0;
var p = Error.prepareStackTrace;
Error.prepareStackTrace = void 0;
var c;
c = ve.current, ve.current = null, Cr();
var l;
l = ve.current, ve.current = null, Cr();
try {
if (a) {
var d = function() {
var c = function() {
throw Error();
};
if (Object.defineProperty(d.prototype, "props", {
if (Object.defineProperty(c.prototype, "props", {
set: function() {

@@ -230,14 +226,14 @@ throw Error();

try {
Reflect.construct(d, []);
Reflect.construct(c, []);
} catch (G) {
u = G;
s = G;
}
Reflect.construct(r, [], d);
Reflect.construct(r, [], c);
} else {
try {
d.call();
c.call();
} catch (G) {
u = G;
s = G;
}
r.call(d.prototype);
r.call(c.prototype);
}

@@ -248,3 +244,3 @@ } else {

} catch (G) {
u = G;
s = G;
}

@@ -254,15 +250,15 @@ r();

} catch (G) {
if (G && u && typeof G.stack == "string") {
for (var l = G.stack.split(`
`), S = u.stack.split(`
`), y = l.length - 1, m = S.length - 1; y >= 1 && m >= 0 && l[y] !== S[m]; )
if (G && s && typeof G.stack == "string") {
for (var f = G.stack.split(`
`), S = s.stack.split(`
`), y = f.length - 1, m = S.length - 1; y >= 1 && m >= 0 && f[y] !== S[m]; )
m--;
for (; y >= 1 && m >= 0; y--, m--)
if (l[y] !== S[m]) {
if (f[y] !== S[m]) {
if (y !== 1 || m !== 1)
do
if (y--, m--, m < 0 || l[y] !== S[m]) {
var w = `
` + l[y].replace(" at new ", " at ");
return r.displayName && w.includes("<anonymous>") && (w = w.replace("<anonymous>", r.displayName)), typeof r == "function" && se.set(r, w), w;
if (y--, m--, m < 0 || f[y] !== S[m]) {
var R = `
` + f[y].replace(" at new ", " at ");
return r.displayName && R.includes("<anonymous>") && (R = R.replace("<anonymous>", r.displayName)), typeof r == "function" && ue.set(r, R), R;
}

@@ -274,6 +270,6 @@ while (y >= 1 && m >= 0);

} finally {
ge = !1, ve.current = c, g(), Error.prepareStackTrace = p;
ge = !1, ve.current = l, g(), Error.prepareStackTrace = p;
}
var re = r ? r.displayName || r.name : "", pr = re ? L(re) : "";
return typeof r == "function" && se.set(r, pr), pr;
return typeof r == "function" && ue.set(r, pr), pr;
}

@@ -297,3 +293,3 @@ function er(r, a, i) {

return L("Suspense");
case R:
case w:
return L("SuspenseList");

@@ -308,5 +304,5 @@ }

case H: {
var u = r, p = u._payload, c = u._init;
var s = r, p = s._payload, l = s._init;
try {
return he(c(p), a, i);
return he(l(p), a, i);
} catch {

@@ -326,18 +322,18 @@ }

}
function Sr(r, a, i, u, p) {
function Sr(r, a, i, s, p) {
{
var c = Function.call.bind(ye);
for (var d in r)
if (c(r, d)) {
var l = void 0;
var l = Function.call.bind(ye);
for (var c in r)
if (l(r, c)) {
var f = void 0;
try {
if (typeof r[d] != "function") {
var S = Error((u || "React class") + ": " + i + " type `" + d + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof r[d] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
if (typeof r[c] != "function") {
var S = Error((s || "React class") + ": " + i + " type `" + c + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof r[c] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
throw S.name = "Invariant Violation", S;
}
l = r[d](a, d, u, i, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
f = r[c](a, c, s, i, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
} catch (y) {
l = y;
f = y;
}
l && !(l instanceof Error) && (be(p), E("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", u || "React class", i, d, typeof l), be(null)), l instanceof Error && !(l.message in tr) && (tr[l.message] = !0, be(p), E("Failed %s type: %s", i, l.message), be(null));
f && !(f instanceof Error) && (be(p), E("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", s || "React class", i, c, typeof f), be(null)), f instanceof Error && !(f.message in tr) && (tr[f.message] = !0, be(p), E("Failed %s type: %s", i, f.message), be(null));
}

@@ -356,3 +352,3 @@ }

}
function Ar(r) {
function xr(r) {
try {

@@ -368,3 +364,3 @@ return ar(r), !1;

function ir(r) {
if (Ar(r))
if (xr(r))
return E("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Pr(r)), ar(r);

@@ -387,3 +383,3 @@ }

}
function xr(r) {
function Ar(r) {
if (ye.call(r, "key")) {

@@ -396,3 +392,3 @@ var a = Object.getOwnPropertyDescriptor(r, "key").get;

}
function ur(r, a) {
function sr(r, a) {
if (typeof r.ref == "string" && K.current && a && K.current.stateNode !== a) {

@@ -414,3 +410,3 @@ var i = z(K.current.type);

}
function sr(r, a) {
function ur(r, a) {
{

@@ -426,4 +422,4 @@ var i = function() {

}
var fr = function(r, a, i, u, p, c, d) {
var l = {
var fr = function(r, a, i, s, p, l, c) {
var f = {
// This tag allows us to uniquely identify this as a React Element

@@ -435,7 +431,7 @@ $$typeof: v,

ref: i,
props: d,
props: c,
// Record the component responsible for creating this element.
_owner: c
_owner: l
};
return l._store = {}, Object.defineProperty(l._store, "validated", {
return f._store = {}, Object.defineProperty(f._store, "validated", {
configurable: !1,

@@ -445,8 +441,8 @@ enumerable: !1,

value: !1
}), Object.defineProperty(l, "_self", {
}), Object.defineProperty(f, "_self", {
configurable: !1,
enumerable: !1,
writable: !1,
value: u
}), Object.defineProperty(l, "_source", {
value: s
}), Object.defineProperty(f, "_source", {
configurable: !1,

@@ -456,32 +452,32 @@ enumerable: !1,

value: p
}), Object.freeze && (Object.freeze(l.props), Object.freeze(l)), l;
}), Object.freeze && (Object.freeze(f.props), Object.freeze(f)), f;
};
function jr(r, a, i, u, p) {
function jr(r, a, i, s, p) {
{
var c, d = {}, l = null, S = null;
i !== void 0 && (ir(i), l = "" + i), xr(a) && (ir(a.key), l = "" + a.key), or(a) && (S = a.ref, ur(a, p));
for (c in a)
ye.call(a, c) && !Oe.hasOwnProperty(c) && (d[c] = a[c]);
var l, c = {}, f = null, S = null;
i !== void 0 && (ir(i), f = "" + i), Ar(a) && (ir(a.key), f = "" + a.key), or(a) && (S = a.ref, sr(a, p));
for (l in a)
ye.call(a, l) && !Oe.hasOwnProperty(l) && (c[l] = a[l]);
if (r && r.defaultProps) {
var y = r.defaultProps;
for (c in y)
d[c] === void 0 && (d[c] = y[c]);
for (l in y)
c[l] === void 0 && (c[l] = y[l]);
}
if (l || S) {
if (f || S) {
var m = typeof r == "function" ? r.displayName || r.name || "Unknown" : r;
l && me(d, m), S && sr(d, m);
f && me(c, m), S && ur(c, m);
}
return fr(r, l, S, p, u, K.current, d);
return fr(r, f, S, p, s, K.current, c);
}
}
var B = X.ReactCurrentOwner, Ae = X.ReactDebugCurrentFrame;
var B = X.ReactCurrentOwner, xe = X.ReactDebugCurrentFrame;
function Z(r) {
if (r) {
var a = r._owner, i = he(r.type, r._source, a ? a.type : null);
Ae.setExtraStackFrame(i);
xe.setExtraStackFrame(i);
} else
Ae.setExtraStackFrame(null);
xe.setExtraStackFrame(null);
}
var xe;
xe = !1;
var Ae;
Ae = !1;
function fe(r) {

@@ -535,4 +531,4 @@ return typeof r == "object" && r !== null && r.$$typeof === v;

Te[i] = !0;
var u = "";
r && r._owner && r._owner !== B.current && (u = " It was passed a child from " + z(r._owner.type) + "."), Z(r), E('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', i, u), Z(null);
var s = "";
r && r._owner && r._owner !== B.current && (s = " It was passed a child from " + z(r._owner.type) + "."), Z(r), E('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', i, s), Z(null);
}

@@ -546,4 +542,4 @@ }

for (var i = 0; i < r.length; i++) {
var u = r[i];
fe(u) && ee(u, a);
var s = r[i];
fe(s) && ee(s, a);
}

@@ -555,4 +551,4 @@ else if (fe(r))

if (typeof p == "function" && p !== r.entries)
for (var c = p.call(r), d; !(d = c.next()).done; )
fe(d.value) && ee(d.value, a);
for (var l = p.call(r), c; !(c = l.next()).done; )
fe(c.value) && ee(c.value, a);
}

@@ -576,6 +572,6 @@ }

if (i) {
var u = z(a);
Sr(i, r.props, "prop", u, r);
} else if (a.PropTypes !== void 0 && !xe) {
xe = !0;
var s = z(a);
Sr(i, r.props, "prop", s, r);
} else if (a.PropTypes !== void 0 && !Ae) {
Ae = !0;
var p = z(a);

@@ -590,5 +586,5 @@ E("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", p || "Unknown");

for (var a = Object.keys(r.props), i = 0; i < a.length; i++) {
var u = a[i];
if (u !== "children" && u !== "key") {
Z(r), E("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", u), Z(null);
var s = a[i];
if (s !== "children" && s !== "key") {
Z(r), E("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", s), Z(null);
break;

@@ -600,30 +596,30 @@ }

}
function cr(r, a, i, u, p, c) {
function cr(r, a, i, s, p, l) {
{
var d = Re(r);
if (!d) {
var l = "";
(r === void 0 || typeof r == "object" && r !== null && Object.keys(r).length === 0) && (l += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
var c = we(r);
if (!c) {
var f = "";
(r === void 0 || typeof r == "object" && r !== null && Object.keys(r).length === 0) && (f += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
var S = je(p);
S ? l += S : l += Q();
S ? f += S : f += Q();
var y;
r === null ? y = "null" : Se(r) ? y = "array" : r !== void 0 && r.$$typeof === v ? (y = "<" + (z(r.type) || "Unknown") + " />", l = " Did you accidentally export a JSX literal instead of a component?") : y = typeof r, E("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", y, l);
r === null ? y = "null" : Se(r) ? y = "array" : r !== void 0 && r.$$typeof === v ? (y = "<" + (z(r.type) || "Unknown") + " />", f = " Did you accidentally export a JSX literal instead of a component?") : y = typeof r, E("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", y, f);
}
var m = jr(r, a, i, p, c);
var m = jr(r, a, i, p, l);
if (m == null)
return m;
if (d) {
var w = a.children;
if (w !== void 0)
if (u)
if (Se(w)) {
for (var re = 0; re < w.length; re++)
lr(w[re], r);
Object.freeze && Object.freeze(w);
if (c) {
var R = a.children;
if (R !== void 0)
if (s)
if (Se(R)) {
for (var re = 0; re < R.length; re++)
lr(R[re], r);
Object.freeze && Object.freeze(R);
} else
E("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
else
lr(w, r);
lr(R, r);
}
return r === A ? Ir(m) : Dr(m), m;
return r === x ? Ir(m) : Dr(m), m;
}

@@ -638,3 +634,3 @@ }

var Ie = dr, V = Fr;
Me.Fragment = A, Me.jsx = Ie, Me.jsxs = V;
Me.Fragment = x, Me.jsx = Ie, Me.jsxs = V;
}()), Me;

@@ -657,12 +653,12 @@ }

Xr = 1;
var f = Zr, v = Symbol.for("react.element"), P = Symbol.for("react.fragment"), A = Object.prototype.hasOwnProperty, x = f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, I = { key: !0, ref: !0, __self: !0, __source: !0 };
var d = Zr, v = Symbol.for("react.element"), P = Symbol.for("react.fragment"), x = Object.prototype.hasOwnProperty, A = d.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, I = { key: !0, ref: !0, __self: !0, __source: !0 };
function U(j, _, Y) {
var R, F = {}, H = null, ie = null;
var w, F = {}, H = null, ie = null;
Y !== void 0 && (H = "" + Y), _.key !== void 0 && (H = "" + _.key), _.ref !== void 0 && (ie = _.ref);
for (R in _)
A.call(_, R) && !I.hasOwnProperty(R) && (F[R] = _[R]);
for (w in _)
x.call(_, w) && !I.hasOwnProperty(w) && (F[w] = _[w]);
if (j && j.defaultProps)
for (R in _ = j.defaultProps, _)
F[R] === void 0 && (F[R] = _[R]);
return { $$typeof: v, type: j, key: H, ref: ie, props: F, _owner: x.current };
for (w in _ = j.defaultProps, _)
F[w] === void 0 && (F[w] = _[w]);
return { $$typeof: v, type: j, key: H, ref: ie, props: F, _owner: A.current };
}

@@ -674,6 +670,6 @@ return $e.Fragment = P, $e.jsx = U, $e.jsxs = U, $e;

Tr.exports;
(function(f, v) {
var P = 200, A = "__lodash_hash_undefined__", x = 1, I = 2, U = 9007199254740991, j = "[object Arguments]", _ = "[object Array]", Y = "[object AsyncFunction]", R = "[object Boolean]", F = "[object Date]", H = "[object Error]", ie = "[object Function]", Ue = "[object GeneratorFunction]", de = "[object Map]", Ne = "[object Number]", X = "[object Null]", E = "[object Object]", We = "[object Promise]", wr = "[object Proxy]", Ye = "[object RegExp]", pe = "[object Set]", ze = "[object String]", Rr = "[object Symbol]", Be = "[object Undefined]", Re = "[object WeakMap]", Ge = "[object ArrayBuffer]", oe = "[object DataView]", z = "[object Float32Array]", k = "[object Float64Array]", ue = "[object Int8Array]", qe = "[object Int16Array]", He = "[object Int32Array]", Ke = "[object Uint8Array]", ke = "[object Uint8ClampedArray]", Ve = "[object Uint16Array]", Je = "[object Uint32Array]", Xe = /[\\^$.*+?()[\]{}|]/g, Ze = /^\[object .+?Constructor\]$/, Cr = /^(?:0|[1-9]\d*)$/, g = {};
g[z] = g[k] = g[ue] = g[qe] = g[He] = g[Ke] = g[ke] = g[Ve] = g[Je] = !0, g[j] = g[_] = g[Ge] = g[R] = g[oe] = g[F] = g[H] = g[ie] = g[de] = g[Ne] = g[E] = g[Ye] = g[pe] = g[ze] = g[Re] = !1;
var ve = typeof Er == "object" && Er && Er.Object === Object && Er, Ce = typeof self == "object" && self && self.Object === Object && self, L = ve || Ce || Function("return this")(), ge = v && !v.nodeType && v, se = ge && !0 && f && !f.nodeType && f, Qe = se && se.exports === ge, _e = Qe && ve.process, er = function() {
(function(d, v) {
var P = 200, x = "__lodash_hash_undefined__", A = 1, I = 2, U = 9007199254740991, j = "[object Arguments]", _ = "[object Array]", Y = "[object AsyncFunction]", w = "[object Boolean]", F = "[object Date]", H = "[object Error]", ie = "[object Function]", Ue = "[object GeneratorFunction]", de = "[object Map]", Ne = "[object Number]", X = "[object Null]", E = "[object Object]", We = "[object Promise]", Rr = "[object Proxy]", Ye = "[object RegExp]", pe = "[object Set]", ze = "[object String]", wr = "[object Symbol]", Be = "[object Undefined]", we = "[object WeakMap]", Ge = "[object ArrayBuffer]", oe = "[object DataView]", z = "[object Float32Array]", k = "[object Float64Array]", se = "[object Int8Array]", qe = "[object Int16Array]", He = "[object Int32Array]", Ke = "[object Uint8Array]", ke = "[object Uint8ClampedArray]", Ve = "[object Uint16Array]", Je = "[object Uint32Array]", Xe = /[\\^$.*+?()[\]{}|]/g, Ze = /^\[object .+?Constructor\]$/, Cr = /^(?:0|[1-9]\d*)$/, g = {};
g[z] = g[k] = g[se] = g[qe] = g[He] = g[Ke] = g[ke] = g[Ve] = g[Je] = !0, g[j] = g[_] = g[Ge] = g[w] = g[oe] = g[F] = g[H] = g[ie] = g[de] = g[Ne] = g[E] = g[Ye] = g[pe] = g[ze] = g[we] = !1;
var ve = typeof Er == "object" && Er && Er.Object === Object && Er, Ce = typeof self == "object" && self && self.Object === Object && self, L = ve || Ce || Function("return this")(), ge = v && !v.nodeType && v, ue = ge && !0 && d && !d.nodeType && d, Qe = ue && ue.exports === ge, _e = Qe && ve.process, er = function() {
try {

@@ -685,7 +681,7 @@ return _e && _e.binding && _e.binding("util");

function he(e, t) {
for (var n = -1, o = e == null ? 0 : e.length, h = 0, s = []; ++n < o; ) {
for (var n = -1, o = e == null ? 0 : e.length, h = 0, u = []; ++n < o; ) {
var T = e[n];
t(T, n, e) && (s[h++] = T);
t(T, n, e) && (u[h++] = T);
}
return s;
return u;
}

@@ -730,3 +726,3 @@ function ye(e, t) {

}
function Ar(e) {
function xr(e) {
var t = -1, n = Array(e.size);

@@ -740,5 +736,5 @@ return e.forEach(function(o) {

return e ? "Symbol(src)_1." + e : "";
}(), or = K.toString, xr = RegExp(
}(), or = K.toString, Ar = RegExp(
"^" + Pe.call(M).replace(Xe, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
), ur = Qe ? L.Buffer : void 0, me = L.Symbol, sr = L.Uint8Array, fr = K.propertyIsEnumerable, jr = ar.splice, B = me ? me.toStringTag : void 0, Ae = Object.getOwnPropertySymbols, Z = ur ? ur.isBuffer : void 0, xe = Pr(Object.keys, Object), fe = we(L, "DataView"), Q = we(L, "Map"), je = we(L, "Promise"), Te = we(L, "Set"), De = we(L, "WeakMap"), ee = we(Object, "create"), lr = le(fe), Dr = le(Q), Ir = le(je), cr = le(Te), Fr = le(De), dr = me ? me.prototype : void 0, Ie = dr ? dr.valueOf : void 0;
), sr = Qe ? L.Buffer : void 0, me = L.Symbol, ur = L.Uint8Array, fr = K.propertyIsEnumerable, jr = ar.splice, B = me ? me.toStringTag : void 0, xe = Object.getOwnPropertySymbols, Z = sr ? sr.isBuffer : void 0, Ae = Pr(Object.keys, Object), fe = Re(L, "DataView"), Q = Re(L, "Map"), je = Re(L, "Promise"), Te = Re(L, "Set"), De = Re(L, "WeakMap"), ee = Re(Object, "create"), lr = le(fe), Dr = le(Q), Ir = le(je), cr = le(Te), Fr = le(De), dr = me ? me.prototype : void 0, Ie = dr ? dr.valueOf : void 0;
function V(e) {

@@ -762,7 +758,7 @@ var t = -1, n = e == null ? 0 : e.length;

var n = t[e];
return n === A ? void 0 : n;
return n === x ? void 0 : n;
}
return M.call(t, e) ? t[e] : void 0;
}
function u(e) {
function s(e) {
var t = this.__data__;

@@ -773,6 +769,6 @@ return ee ? t[e] !== void 0 : M.call(t, e);

var n = this.__data__;
return this.size += this.has(e) ? 0 : 1, n[e] = ee && t === void 0 ? A : t, this;
return this.size += this.has(e) ? 0 : 1, n[e] = ee && t === void 0 ? x : t, this;
}
V.prototype.clear = r, V.prototype.delete = a, V.prototype.get = i, V.prototype.has = u, V.prototype.set = p;
function c(e) {
V.prototype.clear = r, V.prototype.delete = a, V.prototype.get = i, V.prototype.has = s, V.prototype.set = p;
function l(e) {
var t = -1, n = e == null ? 0 : e.length;

@@ -784,6 +780,6 @@ for (this.clear(); ++t < n; ) {

}
function d() {
function c() {
this.__data__ = [], this.size = 0;
}
function l(e) {
function f(e) {
var t = this.__data__, n = gr(t, e);

@@ -806,4 +802,4 @@ if (n < 0)

}
c.prototype.clear = d, c.prototype.delete = l, c.prototype.get = S, c.prototype.has = y, c.prototype.set = m;
function w(e) {
l.prototype.clear = c, l.prototype.delete = f, l.prototype.get = S, l.prototype.has = y, l.prototype.set = m;
function R(e) {
var t = -1, n = e == null ? 0 : e.length;

@@ -818,3 +814,3 @@ for (this.clear(); ++t < n; ) {

hash: new V(),
map: new (Q || c)(),
map: new (Q || l)(),
string: new V()

@@ -837,10 +833,10 @@ };

}
w.prototype.clear = re, w.prototype.delete = pr, w.prototype.get = G, w.prototype.has = et, w.prototype.set = rt;
R.prototype.clear = re, R.prototype.delete = pr, R.prototype.get = G, R.prototype.has = et, R.prototype.set = rt;
function vr(e) {
var t = -1, n = e == null ? 0 : e.length;
for (this.__data__ = new w(); ++t < n; )
for (this.__data__ = new R(); ++t < n; )
this.add(e[t]);
}
function tt(e) {
return this.__data__.set(e, A), this;
return this.__data__.set(e, x), this;
}

@@ -852,7 +848,7 @@ function nt(e) {

function te(e) {
var t = this.__data__ = new c(e);
var t = this.__data__ = new l(e);
this.size = t.size;
}
function at() {
this.__data__ = new c(), this.size = 0;
this.__data__ = new l(), this.size = 0;
}

@@ -866,18 +862,18 @@ function it(e) {

}
function ut(e) {
function st(e) {
return this.__data__.has(e);
}
function st(e, t) {
function ut(e, t) {
var n = this.__data__;
if (n instanceof c) {
if (n instanceof l) {
var o = n.__data__;
if (!Q || o.length < P - 1)
return o.push([e, t]), this.size = ++n.size, this;
n = this.__data__ = new w(o);
n = this.__data__ = new R(o);
}
return n.set(e, t), this.size = n.size, this;
}
te.prototype.clear = at, te.prototype.delete = it, te.prototype.get = ot, te.prototype.has = ut, te.prototype.set = st;
te.prototype.clear = at, te.prototype.delete = it, te.prototype.get = ot, te.prototype.has = st, te.prototype.set = ut;
function ft(e, t) {
var n = hr(e), o = !n && Rt(e), h = !n && !o && Lr(e), s = !n && !o && !h && kr(e), T = n || o || h || s, C = T ? nr(e.length, String) : [], O = C.length;
var n = hr(e), o = !n && wt(e), h = !n && !o && Lr(e), u = !n && !o && !h && kr(e), T = n || o || h || u, C = T ? nr(e.length, String) : [], O = C.length;
for (var b in e)

@@ -887,3 +883,3 @@ (t || M.call(e, b)) && !(T && // Safari 9 has enumerable `arguments.length` in strict mode.

h && (b == "offset" || b == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays.
s && (b == "buffer" || b == "byteLength" || b == "byteOffset") || // Skip index properties.
u && (b == "buffer" || b == "byteLength" || b == "byteOffset") || // Skip index properties.
bt(b, O))) && C.push(b);

@@ -903,3 +899,3 @@ return C;

function Fe(e) {
return e == null ? e === void 0 ? Be : X : B && B in Object(e) ? ht(e) : wt(e);
return e == null ? e === void 0 ? Be : X : B && B in Object(e) ? ht(e) : Rt(e);
}

@@ -912,3 +908,3 @@ function Wr(e) {

}
function ct(e, t, n, o, h, s) {
function ct(e, t, n, o, h, u) {
var T = hr(e), C = hr(t), O = T ? _ : ne(e), b = C ? _ : ne(t);

@@ -923,11 +919,11 @@ O = O == j ? E : O, b = b == j ? E : b;

if (D && !$)
return s || (s = new te()), T || kr(e) ? zr(e, t, n, o, h, s) : gt(e, t, O, n, o, h, s);
if (!(n & x)) {
return u || (u = new te()), T || kr(e) ? zr(e, t, n, o, h, u) : gt(e, t, O, n, o, h, u);
if (!(n & A)) {
var N = $ && M.call(e, "__wrapped__"), W = q && M.call(t, "__wrapped__");
if (N || W) {
var ae = N ? e.value() : e, J = W ? t.value() : t;
return s || (s = new te()), h(ae, J, n, o, s);
return u || (u = new te()), h(ae, J, n, o, u);
}
}
return D ? (s || (s = new te()), _t(e, t, n, o, h, s)) : !1;
return D ? (u || (u = new te()), _t(e, t, n, o, h, u)) : !1;
}

@@ -937,3 +933,3 @@ function dt(e) {

return !1;
var t = qr(e) ? xr : Ze;
var t = qr(e) ? Ar : Ze;
return t.test(le(e));

@@ -946,3 +942,3 @@ }

if (!Tt(e))
return xe(e);
return Ae(e);
var t = [];

@@ -953,14 +949,14 @@ for (var n in Object(e))

}
function zr(e, t, n, o, h, s) {
var T = n & x, C = e.length, O = t.length;
function zr(e, t, n, o, h, u) {
var T = n & A, C = e.length, O = t.length;
if (C != O && !(T && O > C))
return !1;
var b = s.get(e);
if (b && s.get(t))
var b = u.get(e);
if (b && u.get(t))
return b == t;
var $ = -1, q = !0, D = n & I ? new vr() : void 0;
for (s.set(e, t), s.set(t, e); ++$ < C; ) {
for (u.set(e, t), u.set(t, e); ++$ < C; ) {
var N = e[$], W = t[$];
if (o)
var ae = T ? o(W, N, $, t, e, s) : o(N, W, $, e, t, s);
var ae = T ? o(W, N, $, t, e, u) : o(N, W, $, e, t, u);
if (ae !== void 0) {

@@ -974,3 +970,3 @@ if (ae)

if (!tr(t, function(J, ce) {
if (!Sr(D, ce) && (N === J || h(N, J, n, o, s)))
if (!Sr(D, ce) && (N === J || h(N, J, n, o, u)))
return D.push(ce);

@@ -981,3 +977,3 @@ })) {

}
} else if (!(N === W || h(N, W, n, o, s))) {
} else if (!(N === W || h(N, W, n, o, u))) {
q = !1;

@@ -987,5 +983,5 @@ break;

}
return s.delete(e), s.delete(t), q;
return u.delete(e), u.delete(t), q;
}
function gt(e, t, n, o, h, s, T) {
function gt(e, t, n, o, h, u, T) {
switch (n) {

@@ -997,4 +993,4 @@ case oe:

case Ge:
return !(e.byteLength != t.byteLength || !s(new sr(e), new sr(t)));
case R:
return !(e.byteLength != t.byteLength || !u(new ur(e), new ur(t)));
case w:
case F:

@@ -1011,4 +1007,4 @@ case Ne:

case pe:
var O = o & x;
if (C || (C = Ar), e.size != t.size && !O)
var O = o & A;
if (C || (C = xr), e.size != t.size && !O)
return !1;

@@ -1019,5 +1015,5 @@ var b = T.get(e);

o |= I, T.set(e, t);
var $ = zr(C(e), C(t), o, h, s, T);
var $ = zr(C(e), C(t), o, h, u, T);
return T.delete(e), $;
case Rr:
case wr:
if (Ie)

@@ -1028,4 +1024,4 @@ return Ie.call(e) == Ie.call(t);

}
function _t(e, t, n, o, h, s) {
var T = n & x, C = Br(e), O = C.length, b = Br(t), $ = b.length;
function _t(e, t, n, o, h, u) {
var T = n & A, C = Br(e), O = C.length, b = Br(t), $ = b.length;
if (O != $ && !T)

@@ -1038,7 +1034,7 @@ return !1;

}
var N = s.get(e);
if (N && s.get(t))
var N = u.get(e);
if (N && u.get(t))
return N == t;
var W = !0;
s.set(e, t), s.set(t, e);
u.set(e, t), u.set(t, e);
for (var ae = T; ++q < O; ) {

@@ -1048,4 +1044,4 @@ D = C[q];

if (o)
var Vr = T ? o(ce, J, D, t, e, s) : o(J, ce, D, e, t, s);
if (!(Vr === void 0 ? J === ce || h(J, ce, n, o, s) : Vr)) {
var Vr = T ? o(ce, J, D, t, e, u) : o(J, ce, D, e, t, u);
if (!(Vr === void 0 ? J === ce || h(J, ce, n, o, u) : Vr)) {
W = !1;

@@ -1060,3 +1056,3 @@ break;

}
return s.delete(e), s.delete(t), W;
return u.delete(e), u.delete(t), W;
}

@@ -1070,3 +1066,3 @@ function Br(e) {

}
function we(e, t) {
function Re(e, t) {
var n = Or(e, t);

@@ -1085,8 +1081,8 @@ return dt(n) ? n : void 0;

}
var yt = Ae ? function(e) {
return e == null ? [] : (e = Object(e), he(Ae(e), function(t) {
var yt = xe ? function(e) {
return e == null ? [] : (e = Object(e), he(xe(e), function(t) {
return fr.call(e, t);
}));
} : Pt, ne = Fe;
(fe && ne(new fe(new ArrayBuffer(1))) != oe || Q && ne(new Q()) != de || je && ne(je.resolve()) != We || Te && ne(new Te()) != pe || De && ne(new De()) != Re) && (ne = function(e) {
(fe && ne(new fe(new ArrayBuffer(1))) != oe || Q && ne(new Q()) != de || je && ne(je.resolve()) != We || Te && ne(new Te()) != pe || De && ne(new De()) != we) && (ne = function(e) {
var t = Fe(e), n = t == E ? e.constructor : void 0, o = n ? le(n) : "";

@@ -1104,3 +1100,3 @@ if (o)

case Fr:
return Re;
return we;
}

@@ -1123,3 +1119,3 @@ return t;

}
function wt(e) {
function Rt(e) {
return or.call(e);

@@ -1143,3 +1139,3 @@ }

}
var Rt = Wr(/* @__PURE__ */ function() {
var wt = Wr(/* @__PURE__ */ function() {
return arguments;

@@ -1152,3 +1148,3 @@ }()) ? Wr : function(e) {

}
var Lr = Z || At;
var Lr = Z || xt;
function St(e, t) {

@@ -1161,3 +1157,3 @@ return Yr(e, t);

var t = Fe(e);
return t == ie || t == Ue || t == Y || t == wr;
return t == ie || t == Ue || t == Y || t == Rr;
}

@@ -1181,23 +1177,23 @@ function Hr(e) {

}
function At() {
function xt() {
return !1;
}
f.exports = St;
d.exports = St;
})(Tr, Tr.exports);
var Nt = Tr.exports;
const Wt = /* @__PURE__ */ Lt(Nt);
function Yt(f) {
const v = mr(f), P = mr(0);
return Wt(f, v.current) || (v.current = f, P.current += 1), $r(() => v.current, [P.current]);
const Wt = /* @__PURE__ */ Ft(Nt);
function Yt(d) {
const v = mr(d), P = mr(0);
return Wt(d, v.current) || (v.current = d, P.current += 1), $r(() => v.current, [P.current]);
}
function zt(f, v) {
return jt(f, Yt(v));
function zt(d, v) {
return jt(d, Yt(v));
}
const Nr = xt(null);
const Nr = At(null);
function qt({
children: f,
children: d,
locale: v,
debugMode: P = !1,
enableInspectorMode: A = !0,
enableLiveUpdates: x = !0,
enableInspectorMode: x = !0,
enableLiveUpdates: A = !0,
targetOrigin: I

@@ -1212,31 +1208,31 @@ }) {

debugMode: P,
enableInspectorMode: A,
enableLiveUpdates: x,
enableInspectorMode: x,
enableLiveUpdates: A,
targetOrigin: I
});
const U = $r(
() => ({ locale: v, debugMode: P, enableInspectorMode: A, enableLiveUpdates: x, targetOrigin: I }),
[v, P, A, x, I]
() => ({ locale: v, debugMode: P, enableInspectorMode: x, enableLiveUpdates: A, targetOrigin: I }),
[v, P, x, A, I]
);
return /* @__PURE__ */ Ut.jsx(Nr.Provider, { value: U, children: f });
return /* @__PURE__ */ Ut.jsx(Nr.Provider, { value: U, children: d });
}
function Ht(f, v, P = !1) {
const [A, x] = Dt({ data: f, version: 1 }), I = mr(f), U = mr(Ft(x)), j = Qr(Nr), _ = typeof v == "object" ? v : { locale: v, skip: P }, Y = $r(() => j && !j.enableLiveUpdates || _.skip ? !1 : !!(Array.isArray(f) && f.length || f && typeof f == "object" && Object.keys(f).length), [j, _.skip, f]);
function Ht(d, v, P = !1) {
const [x, A] = Dt({ data: d, version: 1 }), I = mr(d), U = mr(Lt(A)), j = Qr(Nr), _ = typeof v == "object" ? v : { locale: v, skip: P }, Y = $r(() => j && !j.enableLiveUpdates || _.skip ? !1 : !!(Array.isArray(d) && d.length || d && typeof d == "object" && Object.keys(d).length), [j, _.skip, d]);
return zt(() => {
if (I.current !== f && (x({ data: f, version: 1 }), I.current = f), !!Y)
if (I.current !== d && (A({ data: d, version: 1 }), I.current = d), !!Y)
return Ur.subscribe("edit", {
data: f,
data: d,
locale: _.locale,
query: _.query,
callback: (R) => {
U.current((F) => ({ data: R, version: F.version + 1 }));
callback: (w) => {
U.current((F) => ({ data: w, version: F.version + 1 }));
}
});
}, [f, Y, _.locale, _.query]), A.data;
}, [d, Y, _.locale, _.query]), x.data;
}
function Kt(f) {
function Kt(d) {
const v = Qr(Nr);
return It(
(P) => v != null && v.enableInspectorMode ? Ur.getProps({ ...f, ...P }) : null,
[v == null ? void 0 : v.enableInspectorMode, f]
(P) => v != null && v.enableInspectorMode ? Ur.getProps({ ...d, ...P }) : null,
[v == null ? void 0 : v.enableInspectorMode, d]
);

@@ -1243,0 +1239,0 @@ }

@@ -1,2 +0,2 @@

import { EntrySavedMessage, MessageFromEditor } from './messages';
import { MessageFromEditor } from './messages';
import { SubscribeCallback } from './types';

@@ -10,3 +10,3 @@ export declare class SaveEvent {

subscribe(cb: SubscribeCallback): VoidFunction;
receiveMessage(message: Omit<MessageFromEditor, 'from' | 'source'> | EntrySavedMessage): void;
receiveMessage(message: Omit<MessageFromEditor, 'from' | 'source'>): void;
}
import type { Asset, Entry } from 'contentful';
import type { ContentTypeProps } from 'contentful-management';
import { SendMessage } from './helpers';
export type ContentType = ContentTypeProps;
export declare const ASSET_TYPENAME = "Asset";
export type LivePreviewProps = {
export type LivePreviewEntryProps = {
fieldId: string;

@@ -10,2 +11,12 @@ entryId: string;

};
export type LivePreviewAssetProps = {
fieldId: string;
assetId: string;
locale?: string;
};
export type LivePreviewProps = (LivePreviewEntryProps & {
assetId?: never;
}) | (LivePreviewAssetProps & {
entryId?: never;
});
export interface SysProps {

@@ -38,2 +49,3 @@ id: string;

gqlParams?: GraphQLParams;
sendMessage: SendMessage;
};

@@ -47,2 +59,3 @@ export type UpdateFieldProps = {

gqlParams?: GraphQLParams;
sendMessage: SendMessage;
};

@@ -59,2 +72,3 @@ export type UpdateReferenceFieldProps = {

gqlParams?: GraphQLParams;
sendMessage: SendMessage;
};

@@ -61,0 +75,0 @@ /**

{
"name": "@contentful/live-preview",
"version": "2.13.0-alpha.8",
"version": "2.13.0",
"author": "Contentful GmbH",

@@ -14,3 +14,4 @@ "license": "MIT",

"dist",
"react"
"react",
"style.css"
],

@@ -27,2 +28,6 @@ "exports": {

"types": "./dist/react.d.ts"
},
"./style.css": {
"import": "./dist/style.css",
"require": "./dist/style.css"
}

@@ -50,4 +55,3 @@ },

"@contentful/rich-text-types": "^16.2.0",
"@contentful/visual-sdk": "^1.0.0-alpha.36",
"flatted": "^3.2.9",
"@contentful/visual-sdk": "^1.0.0-alpha.34",
"graphql-tag": "^2.12.6",

@@ -79,3 +83,3 @@ "lodash.isequal": "^4.5.0"

},
"gitHead": "f76f19b01c48fb776453cc5ddf61376214b3a828"
"gitHead": "cb285f2570a69c0017dd2a5b7a7e5f513d85ad42"
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc