[ Index ]

PHP Cross Reference of WordPress Trunk (Updated Daily)

title

Body

[close]

/wp-includes/js/dist/ -> rich-text.js (summary)

(no description)

File Size: 5293 lines (166 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 118 functions

  __webpack_require__()
  getDefault()
  getModuleExports()
  _defineProperty()
  _defineProperties()
  _createClass()
  _classCallCheck()
  _possibleConstructorReturn()
  _getPrototypeOf()
  _setPrototypeOf()
  _inherits()
  classNames()
  _arrayWithoutHoles()
  _nonIterableSpread()
  _toConsumableArray()
  _extends()
  _objectWithoutPropertiesLoose()
  _objectWithoutProperties()
  _iterableToArray()
  _typeof2()
  _typeof()
  reducer_formatTypes()
  getFormatType()
  getFormatTypeForBareElement()
  getFormatTypeForClassName()
  addFormatTypes()
  removeFormatTypes()
  isFormatEqual()
  normaliseFormats()
  replace()
  applyFormat()
  createElement()
  createEmptyValue()
  simpleFindKey()
  toFormat()
  create()
  accumulateSelection()
  filterRange()
  filterString()
  createFromElement()
  createFromMultilineElement()
  getAttributes()
  mergePair()
  concat()
  getActiveFormats()
  getActiveFormat()
  getActiveObject()
  getTextContent()
  getLineIndex()
  isListRootSelected()
  isActiveListType()
  isCollapsed()
  isEmpty()
  isEmptyLine()
  join()
  registerFormatType()
  removeFormat()
  filterFormats()
  insert()
  remove_remove()
  replace_replace()
  insertLineSeparator()
  removeLineSeparator()
  insertObject()
  slice()
  split()
  splitAtSelection()
  get_format_type_getFormatType()
  fromFormat()
  toTree()
  createPathToNode()
  getNodeByPath()
  to_dom_append()
  to_dom_appendText()
  to_dom_getLastChild()
  to_dom_getParent()
  to_dom_isText()
  to_dom_getText()
  to_dom_remove()
  toDom()
  apply()
  applyValue()
  isRangeEqual()
  applySelection()
  toHTMLString()
  to_html_string_createEmpty()
  to_html_string_getLastChild()
  to_html_string_append()
  to_html_string_appendText()
  to_html_string_getParent()
  to_html_string_isText()
  to_html_string_getText()
  to_html_string_remove()
  createElementHTML()
  createChildrenHTML()
  toggleFormat()
  unregisterFormatType()
  getTargetLevelLineIndex()
  indentListItems()
  getParentLineIndex()
  getLastChildIndex()
  outdentListItems()
  changeListType()
  Editable()
  updateFormats()
  createPrepareEditableTree()
  fixPlaceholderSelection()
  RichText()
  arrayOf()
  isObjectLike()
  createCache()
  isShallowEqual()
  getRootCache()
  getWeakMapCache()
  clear()
  callSelector()
  _assertThisInitialized()
  _objectSpread()

Functions
Functions that are not part of a class:

__webpack_require__(moduleId)   X-Ref
No description

getDefault()   X-Ref
No description

getModuleExports()   X-Ref
No description

_defineProperty(obj, key, value)   X-Ref
No description

_defineProperties(target, props)   X-Ref
No description

_createClass(Constructor, protoProps, staticProps)   X-Ref
No description

_classCallCheck(instance, Constructor)   X-Ref
No description

_possibleConstructorReturn(self, call)   X-Ref
No description

_getPrototypeOf(o)   X-Ref
No description

_setPrototypeOf(o, p)   X-Ref
No description

_inherits(subClass, superClass)   X-Ref
No description

classNames()   X-Ref
No description

_arrayWithoutHoles(arr)   X-Ref
No description

_nonIterableSpread()   X-Ref
No description

_toConsumableArray(arr)   X-Ref
No description

_extends()   X-Ref
No description

_objectWithoutPropertiesLoose(source, excluded)   X-Ref
No description

_objectWithoutProperties(source, excluded)   X-Ref
No description

_iterableToArray(iter)   X-Ref
No description

_typeof2(obj)   X-Ref
No description

_typeof(obj)   X-Ref
No description

reducer_formatTypes()   X-Ref
Reducer managing the format types

param: {Object} state  Current state.
param: {Object} action Dispatched action.
return: {Object} Updated state.

getFormatType(state, name)   X-Ref
Returns a format type by name.

param: {Object} state Data state.
param: {string} name Format type name.
return: {Object?} Format type.

getFormatTypeForBareElement(state, bareElementTagName)   X-Ref
Gets the format type, if any, that can handle a bare element (without a
data-format-type attribute), given the tag name of this element.

param: {Object} state              Data state.
param: {string} bareElementTagName The tag name of the element to find a
return: {?Object} Format type.

getFormatTypeForClassName(state, elementClassName)   X-Ref
Gets the format type, if any, that can handle an element, given its classes.

param: {Object} state            Data state.
param: {string} elementClassName The classes of the element to find a format
return: {?Object} Format type.

addFormatTypes(formatTypes)   X-Ref
Returns an action object used in signalling that format types have been
added.

param: {Array|Object} formatTypes Format types received.
return: {Object} Action object.

removeFormatTypes(names)   X-Ref
Returns an action object used to remove a registered format type.

param: {string|Array} names Format name.
return: {Object} Action object.

isFormatEqual(format1, format2)   X-Ref
Optimised equality check for format objects.

param: {?Object} format1 Format to compare.
param: {?Object} format2 Format to compare.
return: {boolean} True if formats are equal, false if not.

normaliseFormats(value)   X-Ref
Normalises formats: ensures subsequent adjacent equal formats have the same
reference.

param: {Object} value Value to normalise formats of.
return: {Object} New value with normalised formats.

replace(array, index, value)   X-Ref
No description

applyFormat(value, format)   X-Ref
Apply a format object to a Rich Text value from the given `startIndex` to the
given `endIndex`. Indices are retrieved from the selection if none are
provided.

param: {Object} value        Value to modify.
param: {Object} format       Format to apply.
param: {number} [startIndex] Start index.
param: {number} [endIndex]   End index.
return: {Object} A new value with the format applied.

createElement(_ref, html)   X-Ref
Parse the given HTML into a body element.

Note: The current implementation will return a shared reference, reset on
each call to `createElement`. Therefore, you should not hold a reference to
the value to operate upon asynchronously, as it may have unexpected results.

param: {HTMLDocument} document The HTML document to use to parse.
param: {string}       html     The HTML to parse.
return: {HTMLBodyElement} Body element with parsed HTML.

createEmptyValue()   X-Ref
No description

simpleFindKey(object, value)   X-Ref
No description

toFormat(_ref)   X-Ref
No description

create()   X-Ref
Create a RichText value from an `Element` tree (DOM), an HTML string or a
plain text string, with optionally a `Range` object to set the selection. If
called without any input, an empty value will be created. If
`multilineTag` is provided, any content of direct children whose type matches
`multilineTag` will be separated by two newlines. The optional functions can
be used to filter out content.

A value will have the following shape, which you are strongly encouraged not
to modify without the use of helper functions:

```js
{
text: string,
formats: Array,
replacements: Array,
?start: number,
?end: number,
}
```

As you can see, text and formatting are separated. `text` holds the text,
including any replacement characters for objects and lines. `formats`,
`objects` and `lines` are all sparse arrays of the same length as `text`. It
holds information about the formatting at the relevant text indices. Finally
`start` and `end` state which text indices are selected. They are only
provided if a `Range` was given.

param: {Object}  [$1]                      Optional named arguments.
param: {Element} [$1.element]              Element to create value from.
param: {string}  [$1.text]                 Text to create value from.
param: {string}  [$1.html]                 HTML to create value from.
param: {Range}   [$1.range]                Range to create value from.
param: {string}  [$1.multilineTag]         Multiline tag if the structure is
param: {Array}   [$1.multilineWrapperTags] Tags where lines can be found if
return: {Object} A rich text value.

accumulateSelection(accumulator, node, range, value)   X-Ref
Helper to accumulate the value's selection start and end from the current
node and range.

param: {Object} accumulator Object to accumulate into.
param: {Node}   node        Node to create value with.
param: {Range}  range       Range to create value with.
param: {Object} value       Value that is being accumulated.

filterRange(node, range, filter)   X-Ref
Adjusts the start and end offsets from a range based on a text filter.

param: {Node}     node   Node of which the text should be filtered.
param: {Range}    range  The range to filter.
param: {Function} filter Function to use to filter the text.
return: {?Object} Object containing range properties.

filterString(string)   X-Ref
No description

createFromElement(_ref3)   X-Ref
Creates a Rich Text value from a DOM element and range.

param: {Object}    $1                      Named argements.
param: {?Element}  $1.element              Element to create value from.
param: {?Range}    $1.range                Range to create value from.
param: {?string}   $1.multilineTag         Multiline tag if the structure is
param: {?Array}    $1.multilineWrapperTags Tags where lines can be found if
return: {Object} A rich text value.

createFromMultilineElement(_ref4)   X-Ref
Creates a rich text value from a DOM element and range that should be
multiline.

param: {Object}    $1                      Named argements.
param: {?Element}  $1.element              Element to create value from.
param: {?Range}    $1.range                Range to create value from.
param: {?string}   $1.multilineTag         Multiline tag if the structure is
param: {?Array}    $1.multilineWrapperTags Tags where lines can be found if
param: {boolean}   $1.currentWrapperTags   Whether to prepend a line
return: {Object} A rich text value.

getAttributes(_ref5)   X-Ref
Gets the attributes of an element in object shape.

param: {Object}    $1                 Named argements.
param: {Element}   $1.element         Element to get attributes from.
return: {?Object} Attribute object or `undefined` if the element has no

mergePair(a, b)   X-Ref
Concats a pair of rich text values. Not that this mutates `a` and does NOT
normalise formats!

param: {Object} a Value to mutate.
param: {Object} b Value to add read from.
return: {Object} `a`, mutated.

concat()   X-Ref
Combine all Rich Text values into one. This is similar to
`String.prototype.concat`.

param: {...Object} values Objects to combine.
return: {Object} A new value combining all given records.

getActiveFormats(_ref)   X-Ref
Gets the all format objects at the start of the selection.

param: {Object} value Value to inspect.
return: {?Object} Active format objects.

getActiveFormat(value, formatType)   X-Ref
Gets the format object by type at the start of the selection. This can be
used to get e.g. the URL of a link format at the current selection, but also
to check if a format is active at the selection. Returns undefined if there
is no format at the selection.

param: {Object} value      Value to inspect.
param: {string} formatType Format type to look for.
return: {Object|undefined} Active format object of the specified type, or undefined.

getActiveObject(_ref)   X-Ref
Gets the active object, if there is any.

param: {Object} value Value to inspect.
return: {?Object} Active object, or undefined.

getTextContent(_ref)   X-Ref
Get the textual content of a Rich Text value. This is similar to
`Element.textContent`.

param: {Object} value Value to use.
return: {string} The text content.

getLineIndex(_ref)   X-Ref
Gets the currently selected line index, or the first line index if the
selection spans over multiple items.

param: {Object}  value      Value to get the line index from.
param: {boolean} startIndex Optional index that should be contained by the
return: {?boolean} The line index. Undefined if not found.

isListRootSelected(value)   X-Ref
Whether or not the root list is selected.

param: {Object} value The value to check.
return: {boolean} True if the root list or nothing is selected, false if an

isActiveListType(value, type, rootType)   X-Ref
Wether or not the selected list has the given tag name.

param: {Object}  value    The value to check.
param: {string}  type     The tag name the list should have.
param: {string}  rootType The current root tag name, to compare with in case
return: {boolean} True if the current list type matches `type`, false if not.

isCollapsed(_ref)   X-Ref
Check if the selection of a Rich Text value is collapsed or not. Collapsed
means that no characters are selected, but there is a caret present. If there
is no selection, `undefined` will be returned. This is similar to
`window.getSelection().isCollapsed()`.

param: {Object} value The rich text value to check.
return: {boolean|undefined} True if the selection is collapsed, false if not,

isEmpty(_ref)   X-Ref
Check if a Rich Text value is Empty, meaning it contains no text or any
objects (such as images).

param: {Object} value Value to use.
return: {boolean} True if the value is empty, false if not.

isEmptyLine(_ref2)   X-Ref
Check if the current collapsed selection is on an empty line in case of a
multiline value.

param: {Object} value Value te check.
return: {boolean} True if the line is empty, false if not.

join(values)   X-Ref
Combine an array of Rich Text values into one, optionally separated by
`separator`, which can be a Rich Text value, HTML string, or plain text
string. This is similar to `Array.prototype.join`.

param: {Array<Object>} values      An array of values to join.
param: {string|Object} [separator] Separator string or value.
return: {Object} A new combined value.

registerFormatType(name, settings)   X-Ref
Registers a new format provided a unique name and an object defining its
behavior.

param: {string}   name                 Format name.
param: {Object}   settings             Format settings.
param: {string}   settings.tagName     The HTML tag this format will wrap the selection with.
param: {string}   [settings.className] A class to match the format.
param: {string}   settings.title       Name of the format.
param: {Function} settings.edit        Should return a component for the user to interact with the new registered format.
return: {WPFormat|undefined} The format, if it has been successfully registered;

removeFormat(value, formatType)   X-Ref
Remove any format object from a Rich Text value by type from the given
`startIndex` to the given `endIndex`. Indices are retrieved from the
selection if none are provided.

param: {Object} value        Value to modify.
param: {string} formatType   Format type to remove.
param: {number} [startIndex] Start index.
param: {number} [endIndex]   End index.
return: {Object} A new value with the format applied.

filterFormats(formats, index, formatType)   X-Ref
No description

insert(value, valueToInsert)   X-Ref
Insert a Rich Text value, an HTML string, or a plain text string, into a
Rich Text value at the given `startIndex`. Any content between `startIndex`
and `endIndex` will be removed. Indices are retrieved from the selection if
none are provided.

param: {Object}        value         Value to modify.
param: {Object|string} valueToInsert Value to insert.
param: {number}        [startIndex]  Start index.
param: {number}        [endIndex]    End index.
return: {Object} A new value with the value inserted.

remove_remove(value, startIndex, endIndex)   X-Ref
Remove content from a Rich Text value between the given `startIndex` and
`endIndex`. Indices are retrieved from the selection if none are provided.

param: {Object} value        Value to modify.
param: {number} [startIndex] Start index.
param: {number} [endIndex]   End index.
return: {Object} A new value with the content removed.

replace_replace(_ref, pattern, replacement)   X-Ref
Search a Rich Text value and replace the match(es) with `replacement`. This
is similar to `String.prototype.replace`.

param: {Object}         value        The value to modify.
param: {RegExp|string}  pattern      A RegExp object or literal. Can also be
param: {Function|string} replacement The match or matches are replaced with
return: {Object} A new value with replacements applied.

insertLineSeparator(value)   X-Ref
Insert a line break character into a Rich Text value at the given
`startIndex`. Any content between `startIndex` and `endIndex` will be
removed. Indices are retrieved from the selection if none are provided.

param: {Object} value        Value to modify.
param: {number} [startIndex] Start index.
param: {number} [endIndex]   End index.
return: {Object} A new value with the value inserted.

removeLineSeparator(value)   X-Ref
Removes a line separator character, if existing, from a Rich Text value at the current
indices. If no line separator exists on the indices it will return undefined.

param: {Object} value Value to modify.
param: {boolean} backward indicates if are removing from the start index or the end index.
return: {Object|undefined} A new value with the line separator removed. Or undefined if no line separator is found on the position.

insertObject(value, formatToInsert, startIndex, endIndex)   X-Ref
Insert a format as an object into a Rich Text value at the given
`startIndex`. Any content between `startIndex` and `endIndex` will be
removed. Indices are retrieved from the selection if none are provided.

param: {Object} value          Value to modify.
param: {Object} formatToInsert Format to insert as object.
param: {number} [startIndex]   Start index.
param: {number} [endIndex]     End index.
return: {Object} A new value with the object inserted.

slice(value)   X-Ref
Slice a Rich Text value from `startIndex` to `endIndex`. Indices are
retrieved from the selection if none are provided. This is similar to
`String.prototype.slice`.

param: {Object} value        Value to modify.
param: {number} [startIndex] Start index.
param: {number} [endIndex]   End index.
return: {Object} A new extracted value.

split(_ref, string)   X-Ref
Split a Rich Text value in two at the given `startIndex` and `endIndex`, or
split at the given separator. This is similar to `String.prototype.split`.
Indices are retrieved from the selection if none are provided.

param: {Object}        value
param: {Object[]}      value.formats
param: {Object[]}      value.replacements
param: {string}        value.text
param: {number}        value.start
param: {number}        value.end
param: {number|string} [string] Start index, or string at which to split.
return: {Array} An array of new values.

splitAtSelection(_ref2)   X-Ref
No description

get_format_type_getFormatType(name)   X-Ref
Returns a registered format type.

param: {string} name Format name.
return: {?Object} Format type.

fromFormat(_ref)   X-Ref
Converts a format object to information that can be used to create an element
from (type, attributes and object).

param: {Object}  $1                        Named parameters.
param: {string}  $1.type                   The format type.
param: {Object}  $1.attributes             The format attributes.
param: {Object}  $1.unregisteredAttributes The unregistered format
param: {boolean} $1.object                 Wether or not it is an object
param: {boolean} $1.boundaryClass          Wether or not to apply a boundary
return: {Object}                            Information to be used for

toTree(_ref2)   X-Ref
No description

createPathToNode(node, rootNode, path)   X-Ref
Creates a path as an array of indices from the given root node to the given
node.

param: {Node}        node     Node to find the path of.
param: {HTMLElement} rootNode Root node to find the path from.
param: {Array}       path     Initial path to build on.
return: {Array} The path from the root node to the node.

getNodeByPath(node, path)   X-Ref
Gets a node given a path (array of indices) from the given node.

param: {HTMLElement} node Root node to find the wanted node in.
param: {Array}       path Path (indices) to the wanted node.
return: {Object} Object with the found node and the remaining offset (if any).

to_dom_append(element, child)   X-Ref
No description

to_dom_appendText(node, text)   X-Ref
No description

to_dom_getLastChild(_ref)   X-Ref
No description

to_dom_getParent(_ref2)   X-Ref
No description

to_dom_isText(_ref3)   X-Ref
No description

to_dom_getText(_ref4)   X-Ref
No description

to_dom_remove(node)   X-Ref
No description

toDom(_ref5)   X-Ref
No description

apply(_ref6)   X-Ref
Create an `Element` tree from a Rich Text value and applies the difference to
the `Element` tree contained by `current`. If a `multilineTag` is provided,
text separated by two new lines will be wrapped in an `Element` of that type.

param: {Object}      $1                        Named arguments.
param: {Object}      $1.value                  Value to apply.
param: {HTMLElement} $1.current                The live root node to apply the element tree to.
param: {string}      [$1.multilineTag]         Multiline tag.
param: {Array}       [$1.multilineWrapperTags] Tags where lines can be found if nesting is possible.

applyValue(future, current)   X-Ref
No description

isRangeEqual(a, b)   X-Ref
Returns true if two ranges are equal, or false otherwise. Ranges are
considered equal if their start and end occur in the same container and
offset.

param: {Range} a First range object to test.
param: {Range} b First range object to test.
return: {boolean} Whether the two ranges are equal.

applySelection(_ref7, current)   X-Ref
No description

toHTMLString(_ref)   X-Ref
Create an HTML string from a Rich Text value. If a `multilineTag` is
provided, text separated by a line separator will be wrapped in it.

param: {Object} $1                        Named argements.
param: {Object} $1.value                  Rich text value.
param: {string} [$1.multilineTag]         Multiline tag.
return: {string} HTML string.

to_html_string_createEmpty()   X-Ref
No description

to_html_string_getLastChild(_ref2)   X-Ref
No description

to_html_string_append(parent, object)   X-Ref
No description

to_html_string_appendText(object, text)   X-Ref
No description

to_html_string_getParent(_ref3)   X-Ref
No description

to_html_string_isText(_ref4)   X-Ref
No description

to_html_string_getText(_ref5)   X-Ref
No description

to_html_string_remove(object)   X-Ref
No description

createElementHTML(_ref6)   X-Ref
No description

createChildrenHTML()   X-Ref
No description

toggleFormat(value, format)   X-Ref
Toggles a format object to a Rich Text value at the current selection.

param: {Object} value  Value to modify.
param: {Object} format Format to apply or remove.
return: {Object} A new value with the format applied or removed.

unregisterFormatType(name)   X-Ref
Unregisters a format.

param: {string} name Format name.
return: {WPFormat|undefined} The previous format value, if it has been successfully

getTargetLevelLineIndex(_ref, lineIndex)   X-Ref
Gets the line index of the first previous list item with higher indentation.

param: {Object} value      Value to search.
param: {number} lineIndex  Line index of the list item to compare with.
return: {boolean} The line index.

indentListItems(value, rootFormat)   X-Ref
Indents any selected list items if possible.

param: {Object} value      Value to change.
param: {Object} rootFormat Root format.
return: {Object} The changed value.

getParentLineIndex(_ref, lineIndex)   X-Ref
Gets the index of the first parent list. To get the parent list formats, we
go through every list item until we find one with exactly one format type
less.

param: {Object} value     Value to search.
param: {number} lineIndex Line index of a child list item.
return: {Array} The parent list line index.

getLastChildIndex(_ref, lineIndex)   X-Ref
Gets the line index of the last child in the list.

param: {Object} value     Value to search.
param: {number} lineIndex Line index of a list item in the list.
return: {Array} The index of the last child.

outdentListItems(value)   X-Ref
Outdents any selected list items if possible.

param: {Object} value Value to change.
return: {Object} The changed value.

changeListType(value, newFormat)   X-Ref
Changes the list type of the selected indented list, if any. Looks at the
currently selected list item and takes the parent list, then changes the list
type of this list. When multiple lines are selected, the parent lists are
takes and changed.

param: {Object} value     Value to change.
param: {Object} newFormat The new list format object. Choose between
return: {Object} The changed value.

Editable()   X-Ref
No description

updateFormats(_ref)   X-Ref
Efficiently updates all the formats from `start` (including) until `end`
(excluding) with the active formats. Mutates `value`.

param: {Object} $1         Named paramentes.
param: {Object} $1.value   Value te update.
param: {number} $1.start   Index to update from.
param: {number} $1.end     Index to update until.
param: {Array}  $1.formats Replacement formats.
return: {Object} Mutated value.

createPrepareEditableTree(props, prefix)   X-Ref
No description

fixPlaceholderSelection()   X-Ref
If the selection is set on the placeholder element, collapse the selection to
the start (before the placeholder).


RichText(_ref)   X-Ref
No description

arrayOf( value )   X-Ref
Returns the first argument as the sole entry in an array.

param: {*} value Value to return.
return: {Array} Value returned as entry in array.

isObjectLike( value )   X-Ref
Returns true if the value passed is object-like, or false otherwise. A value
is object-like if it can support property assignment, e.g. object or array.

param: {*} value Value to test.
return: {boolean} Whether value is object-like.

createCache()   X-Ref
Creates and returns a new cache object.

return: {Object} Cache object.

isShallowEqual( a, b, fromIndex )   X-Ref
Returns true if entries within the two arrays are strictly equal by
reference from a starting index.

param: {Array}  a         First array.
param: {Array}  b         Second array.
param: {number} fromIndex Index from which to start comparison.
return: {boolean} Whether arrays are shallowly equal.

getRootCache()   X-Ref
Returns the root cache. If WeakMap is supported, this is assigned to the
root WeakMap cache set, otherwise it is a shared instance of the default
cache object.

return: {(WeakMap|Object)} Root cache object.

getWeakMapCache( dependants )   X-Ref
Returns the cache for a given dependants array. When possible, a WeakMap
will be used to create a unique cache for each set of dependants. This
is feasible due to the nature of WeakMap in allowing garbage collection
to occur on entries where the key object is no longer referenced. Since
WeakMap requires the key to be an object, this is only possible when the
dependant is object-like. The root cache is created as a hierarchy where
each top-level key is the first entry in a dependants set, the value a
WeakMap where each key is the next dependant, and so on. This continues
so long as the dependants are object-like. If no dependants are object-
like, then the cache is shared across all invocations.

param: {Array} dependants Selector dependants.
return: {Object} Cache object.

clear()   X-Ref
Resets root memoization cache.


callSelector( )   X-Ref
The augmented selector call, considering first whether dependants have
changed before passing it to underlying memoize function.

param: {Object} source    Source object for derivation.
param: {...*}   extraArgs Additional arguments to pass to selector.
return: {*} Selector result.

_assertThisInitialized(self)   X-Ref
No description

_objectSpread(target)   X-Ref
No description



Generated: Sat Nov 23 20:47:33 2019 Cross-referenced by PHPXref 0.7