WordPress/wp-includes/js/dist/annotations.js.map
danielbachhuber 0fb5da94e6 Block Editor: Update @WordPress dependencies to match Gutenberg 4.5.1.
Updates packages: annotations,
api-fetch,
block-library,
blocks,
components,
core-data,
data,
dom, edit-post,
editor,
format-library,
jest-console,
jest-preset-default,
keycodes,
html-entities,
list-reusable-blocks,
notices,
nux,
rich-text,
scripts,
token-list, url,
viewport

Fixes undefined notices in some blocks. Removes incorrect `'gutenberg'` textdomain too.

See #45145

Built from https://develop.svn.wordpress.org/branches/5.0@43919


git-svn-id: http://core.svn.wordpress.org/branches/5.0@43751 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-11-21 15:09:57 +00:00

1 line
52 KiB
Plaintext

{"version":3,"sources":["webpack://wp.[name]/webpack/bootstrap","webpack://wp.[name]/./node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js","webpack://wp.[name]/./node_modules/@babel/runtime/helpers/esm/defineProperty.js","webpack://wp.[name]/./node_modules/@babel/runtime/helpers/esm/iterableToArray.js","webpack://wp.[name]/./node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js","webpack://wp.[name]/./node_modules/@babel/runtime/helpers/esm/objectSpread.js","webpack://wp.[name]/./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js","webpack://wp.[name]/./node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js","webpack://wp.[name]/./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/annotations/src/block/index.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/annotations/src/format/annotation.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/annotations/src/format/index.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/annotations/src/index.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/annotations/src/store/actions.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/annotations/src/store/index.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/annotations/src/store/reducer.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/annotations/src/store/selectors.js","webpack://wp.[name]/./node_modules/memize/index.js","webpack://wp.[name]/./node_modules/rememo/es/rememo.js","webpack://wp.[name]/./node_modules/uuid/lib/bytesToUuid.js","webpack://wp.[name]/./node_modules/uuid/lib/rng-browser.js","webpack://wp.[name]/./node_modules/uuid/v4.js","webpack://wp.[name]/external {\"this\":[\"wp\",\"data\"]}","webpack://wp.[name]/external {\"this\":[\"wp\",\"hooks\"]}","webpack://wp.[name]/external {\"this\":[\"wp\",\"i18n\"]}","webpack://wp.[name]/external {\"this\":[\"wp\",\"richText\"]}","webpack://wp.[name]/external \"lodash\""],"names":["addAnnotationClassName","OriginalComponent","withSelect","select","clientId","annotations","__experimentalGetAnnotationsForBlock","className","map","annotation","source","addFilter","FORMAT_NAME","ANNOTATION_ATTRIBUTE_PREFIX","STORE_KEY","applyAnnotations","record","forEach","start","end","text","length","id","applyFormat","type","attributes","removeAnnotations","removeFormat","retrieveAnnotationPositions","formats","positions","characterFormats","i","filter","format","replace","hasOwnProperty","updateAnnotationsWithPositions","removeAnnotation","updateAnnotationRange","currentAnnotation","position","createPrepareEditableTree","memize","props","getAnnotationObject","name","title","__","tagName","edit","__experimentalGetPropsForEditableTreePreparation","richTextIdentifier","blockClientId","__experimentalGetAnnotationsForRichText","__experimentalCreatePrepareEditableTree","__experimentalGetPropsForEditableTreeChangeHandler","dispatch","__experimentalRemoveAnnotation","__experimentalUpdateAnnotationRange","__experimentalCreateOnChangeEditableValue","settings","registerFormatType","__experimentalAddAnnotation","range","selector","uuid","action","annotationId","__experimentalRemoveAnnotationsBySource","MODULE_KEY","store","registerStore","reducer","selectors","actions","filterWithReference","collection","predicate","filteredCollection","isValidAnnotationRange","isNumber","state","newAnnotation","previousAnnotationsForBlock","get","mapValues","annotationsForBlock","hasChangedRange","newAnnotations","EMPTY_ARRAY","createSelector","__experimentalGetAllAnnotationsForBlock","other","__experimentalGetAnnotations","flatMap"],"mappings":";;AAAA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,kDAA0C,gCAAgC;AAC1E;AACA;;AAEA;AACA;AACA;AACA,gEAAwD,kBAAkB;AAC1E;AACA,yDAAiD,cAAc;AAC/D;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAyC,iCAAiC;AAC1E,wHAAgH,mBAAmB,EAAE;AACrI;AACA;;AAEA;AACA;AACA;AACA,mCAA2B,0BAA0B,EAAE;AACvD,yCAAiC,eAAe;AAChD;AACA;AACA;;AAEA;AACA,8DAAsD,+DAA+D;;AAErH;AACA;;;AAGA;AACA;;;;;;;;;;;;;AClFA;AAAA;AAAe;AACf;AACA,iDAAiD,gBAAgB;AACjE;AACA;;AAEA;AACA;AACA,C;;;;;;;;;;;;ACRA;AAAA;AAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;;AAEA;AACA,C;;;;;;;;;;;;ACbA;AAAA;AAAe;AACf;AACA,C;;;;;;;;;;;;ACFA;AAAA;AAAe;AACf;AACA,C;;;;;;;;;;;;ACFA;AAAA;AAAA;AAA8C;AAC/B;AACf,iBAAiB,sBAAsB;AACvC;AACA;;AAEA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA,MAAM,+DAAc;AACpB,KAAK;AACL;;AAEA;AACA,C;;;;;;;;;;;;AClBA;AAAA;AAAA;AAA0E;AAC3D;AACf;AACA,eAAe,6EAA4B;AAC3C;;AAEA;AACA;;AAEA,eAAe,6BAA6B;AAC5C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,C;;;;;;;;;;;;AClBA;AAAA;AAAe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,WAAP;AACA,GAFa,CAAd;AAGA;;;;;;;;;;;;ACjFD;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,eAAe,SAAS;AACxB;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,cAAc,SAAS;AACvB;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,MAAM,KAA+B,GAAG,EAMtC;;AAEF;AACA;;;;;;;;;;;;;ACpHA;AAAa;;AAEb;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;;AAEA;AACA;AACA;AACA,WAAW,EAAE;AACb;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,EAAE;AACb;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,MAAM;AACjB,WAAW,OAAO;AAClB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;;AAEA;AACA;AACA;;AAEA,qBAAqB,cAAc;AACnC;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,SAAS;AACpB,WAAW,SAAS;AACpB;AACA;AACA;AACA,YAAY,SAAS;AACrB;AACe;AACf;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa,iBAAiB;AAC9B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,MAAM;AAClB;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;;AAEA,cAAc,uBAAuB;AACrC;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,YAAY,OAAO;AACnB,YAAY,KAAK;AACjB;AACA,aAAa,EAAE;AACf;AACA;AACA;AACA;;AAEA;AACA;AACA,cAAc,SAAS;AACvB;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,CAAC;;;;;;;;;;;;ACjRD;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACvBA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,iCAAiC;;AAEjC;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;;AAEA;AACA,sBAAsB,QAAQ;AAC9B;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;;;;;ACjCA,UAAU,mBAAO,CAAC,yDAAW;AAC7B,kBAAkB,mBAAO,CAAC,iEAAmB;;AAE7C;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,oBAAoB,SAAS;AAC7B;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC5BA,aAAa,qCAAqC,EAAE,I;;;;;;;;;;;ACApD,aAAa,sCAAsC,EAAE,I;;;;;;;;;;;ACArD,aAAa,qCAAqC,EAAE,I;;;;;;;;;;;ACApD,aAAa,yCAAyC,EAAE,I;;;;;;;;;;;ACAxD,aAAa,iCAAiC,EAAE,I","file":"annotations.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = \"./node_modules/@wordpress/annotations/build-module/index.js\");\n","export default function _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) {\n for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n }\n}","export default function _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}","export default function _iterableToArray(iter) {\n if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === \"[object Arguments]\") return Array.from(iter);\n}","export default function _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance\");\n}","import defineProperty from \"./defineProperty\";\nexport default function _objectSpread(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n var ownKeys = Object.keys(source);\n\n if (typeof Object.getOwnPropertySymbols === 'function') {\n ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) {\n return Object.getOwnPropertyDescriptor(source, sym).enumerable;\n }));\n }\n\n ownKeys.forEach(function (key) {\n defineProperty(target, key, source[key]);\n });\n }\n\n return target;\n}","import objectWithoutPropertiesLoose from \"./objectWithoutPropertiesLoose\";\nexport default function _objectWithoutProperties(source, excluded) {\n if (source == null) return {};\n var target = objectWithoutPropertiesLoose(source, excluded);\n var key, i;\n\n if (Object.getOwnPropertySymbols) {\n var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n\n for (i = 0; i < sourceSymbolKeys.length; i++) {\n key = sourceSymbolKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n target[key] = source[key];\n }\n }\n\n return target;\n}","export default function _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n return target;\n}","import arrayWithoutHoles from \"./arrayWithoutHoles\";\nimport iterableToArray from \"./iterableToArray\";\nimport nonIterableSpread from \"./nonIterableSpread\";\nexport default function _toConsumableArray(arr) {\n return arrayWithoutHoles(arr) || iterableToArray(arr) || nonIterableSpread();\n}","/**\n * WordPress dependencies\n */\nimport { addFilter } from '@wordpress/hooks';\nimport { withSelect } from '@wordpress/data';\n\n/**\n * Adds annotation className to the block-list-block component.\n *\n * @param {Object} OriginalComponent The original BlockListBlock component.\n * @return {Object} The enhanced component.\n */\nconst addAnnotationClassName = ( OriginalComponent ) => {\n\treturn withSelect( ( select, { clientId } ) => {\n\t\tconst annotations = select( 'core/annotations' ).__experimentalGetAnnotationsForBlock( clientId );\n\n\t\treturn {\n\t\t\tclassName: annotations.map( ( annotation ) => {\n\t\t\t\treturn 'is-annotated-by-' + annotation.source;\n\t\t\t} ),\n\t\t};\n\t} )( OriginalComponent );\n};\n\naddFilter( 'editor.BlockListBlock', 'core/annotations', addAnnotationClassName );\n","/**\n * External dependencies\n */\nimport memize from 'memize';\n\n/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { applyFormat, removeFormat } from '@wordpress/rich-text';\n\nconst FORMAT_NAME = 'core/annotation';\n\nconst ANNOTATION_ATTRIBUTE_PREFIX = 'annotation-text-';\nconst STORE_KEY = 'core/annotations';\n\n/**\n * Applies given annotations to the given record.\n *\n * @param {Object} record The record to apply annotations to.\n * @param {Array} annotations The annotation to apply.\n * @return {Object} A record with the annotations applied.\n */\nexport function applyAnnotations( record, annotations = [] ) {\n\tannotations.forEach( ( annotation ) => {\n\t\tlet { start, end } = annotation;\n\n\t\tif ( start > record.text.length ) {\n\t\t\tstart = record.text.length;\n\t\t}\n\n\t\tif ( end > record.text.length ) {\n\t\t\tend = record.text.length;\n\t\t}\n\n\t\tconst className = ANNOTATION_ATTRIBUTE_PREFIX + annotation.source;\n\t\tconst id = ANNOTATION_ATTRIBUTE_PREFIX + annotation.id;\n\n\t\trecord = applyFormat(\n\t\t\trecord,\n\t\t\t{\n\t\t\t\ttype: FORMAT_NAME, attributes: {\n\t\t\t\t\tclassName,\n\t\t\t\t\tid,\n\t\t\t\t},\n\t\t\t},\n\t\t\tstart,\n\t\t\tend\n\t\t);\n\t} );\n\n\treturn record;\n}\n\n/**\n * Removes annotations from the given record.\n *\n * @param {Object} record Record to remove annotations from.\n * @return {Object} The cleaned record.\n */\nexport function removeAnnotations( record ) {\n\treturn removeFormat( record, 'core/annotation', 0, record.text.length );\n}\n\n/**\n * Retrieves the positions of annotations inside an array of formats.\n *\n * @param {Array} formats Formats with annotations in there.\n * @return {Object} ID keyed positions of annotations.\n */\nfunction retrieveAnnotationPositions( formats ) {\n\tconst positions = {};\n\n\tformats.forEach( ( characterFormats, i ) => {\n\t\tcharacterFormats = characterFormats || [];\n\t\tcharacterFormats = characterFormats.filter( ( format ) => format.type === FORMAT_NAME );\n\t\tcharacterFormats.forEach( ( format ) => {\n\t\t\tlet { id } = format.attributes;\n\t\t\tid = id.replace( ANNOTATION_ATTRIBUTE_PREFIX, '' );\n\n\t\t\tif ( ! positions.hasOwnProperty( id ) ) {\n\t\t\t\tpositions[ id ] = {\n\t\t\t\t\tstart: i,\n\t\t\t\t};\n\t\t\t}\n\n\t\t\t// Annotations refer to positions between characters.\n\t\t\t// Formats refer to the character themselves.\n\t\t\t// So we need to adjust for that here.\n\t\t\tpositions[ id ].end = i + 1;\n\t\t} );\n\t} );\n\n\treturn positions;\n}\n\n/**\n * Updates annotations in the state based on positions retrieved from RichText.\n *\n * @param {Array} annotations The annotations that are currently applied.\n * @param {Array} positions The current positions of the given annotations.\n * @param {Function} removeAnnotation Function to remove an annotation from the state.\n * @param {Function} updateAnnotationRange Function to update an annotation range in the state.\n */\nfunction updateAnnotationsWithPositions( annotations, positions, { removeAnnotation, updateAnnotationRange } ) {\n\tannotations.forEach( ( currentAnnotation ) => {\n\t\tconst position = positions[ currentAnnotation.id ];\n\t\t// If we cannot find an annotation, delete it.\n\t\tif ( ! position ) {\n\t\t\t// Apparently the annotation has been removed, so remove it from the state:\n\t\t\t// Remove...\n\t\t\tremoveAnnotation( currentAnnotation.id );\n\t\t\treturn;\n\t\t}\n\n\t\tconst { start, end } = currentAnnotation;\n\t\tif ( start !== position.start || end !== position.end ) {\n\t\t\tupdateAnnotationRange( currentAnnotation.id, position.start, position.end );\n\t\t}\n\t} );\n}\n\n/**\n * Create prepareEditableTree memoized based on the annotation props.\n *\n * @param {Object} The props with annotations in them.\n *\n * @return {Function} The prepareEditableTree.\n */\nconst createPrepareEditableTree = memize( ( props ) => {\n\tconst { annotations } = props;\n\n\treturn ( formats, text ) => {\n\t\tif ( annotations.length === 0 ) {\n\t\t\treturn formats;\n\t\t}\n\n\t\tlet record = { formats, text };\n\t\trecord = applyAnnotations( record, annotations );\n\t\treturn record.formats;\n\t};\n} );\n\n/**\n * Returns the annotations as a props object. Memoized to prevent re-renders.\n *\n * @param {Array} The annotations to put in the object.\n *\n * @return {Object} The annotations props object.\n */\nconst getAnnotationObject = memize( ( annotations ) => {\n\treturn {\n\t\tannotations,\n\t};\n} );\n\nexport const annotation = {\n\tname: FORMAT_NAME,\n\ttitle: __( 'Annotation' ),\n\ttagName: 'mark',\n\tclassName: 'annotation-text',\n\tattributes: {\n\t\tclassName: 'class',\n\t\tid: 'id',\n\t},\n\tedit() {\n\t\treturn null;\n\t},\n\t__experimentalGetPropsForEditableTreePreparation( select, { richTextIdentifier, blockClientId } ) {\n\t\treturn getAnnotationObject( select( STORE_KEY ).__experimentalGetAnnotationsForRichText( blockClientId, richTextIdentifier ) );\n\t},\n\t__experimentalCreatePrepareEditableTree: createPrepareEditableTree,\n\t__experimentalGetPropsForEditableTreeChangeHandler( dispatch ) {\n\t\treturn {\n\t\t\tremoveAnnotation: dispatch( STORE_KEY ).__experimentalRemoveAnnotation,\n\t\t\tupdateAnnotationRange: dispatch( STORE_KEY ).__experimentalUpdateAnnotationRange,\n\t\t};\n\t},\n\t__experimentalCreateOnChangeEditableValue( props ) {\n\t\treturn ( formats ) => {\n\t\t\tconst positions = retrieveAnnotationPositions( formats );\n\t\t\tconst { removeAnnotation, updateAnnotationRange, annotations } = props;\n\n\t\t\tupdateAnnotationsWithPositions( annotations, positions, { removeAnnotation, updateAnnotationRange } );\n\t\t};\n\t},\n};\n","/**\n * WordPress dependencies\n */\nimport {\n\tregisterFormatType,\n} from '@wordpress/rich-text';\n\n/**\n * Internal dependencies\n */\nimport { annotation } from './annotation';\n\nconst { name, ...settings } = annotation;\n\nregisterFormatType( name, settings );\n","/**\n * Internal dependencies\n */\nimport './store';\nimport './format';\nimport './block';\n\n","/**\n * External dependencies\n */\nimport uuid from 'uuid/v4';\n\n/**\n * Adds an annotation to a block.\n *\n * The `block` attribute refers to a block ID that needs to be annotated.\n * `isBlockAnnotation` controls whether or not the annotation is a block\n * annotation. The `source` is the source of the annotation, this will be used\n * to identity groups of annotations.\n *\n * The `range` property is only relevant if the selector is 'range'.\n *\n * @param {Object} annotation The annotation to add.\n * @param {string} blockClientId The blockClientId to add the annotation to.\n * @param {string} richTextIdentifier Identifier for the RichText instance the annotation applies to.\n * @param {Object} range The range at which to apply this annotation.\n * @param {number} range.start The offset where the annotation should start.\n * @param {number} range.end The offset where the annotation should end.\n * @param {string} [selector=\"range\"] The way to apply this annotation.\n * @param {string} [source=\"default\"] The source that added the annotation.\n * @param {string} [id=uuid()] The ID the annotation should have.\n * Generates a UUID by default.\n *\n * @return {Object} Action object.\n */\nexport function __experimentalAddAnnotation( { blockClientId, richTextIdentifier = null, range = null, selector = 'range', source = 'default', id = uuid() } ) {\n\tconst action = {\n\t\ttype: 'ANNOTATION_ADD',\n\t\tid,\n\t\tblockClientId,\n\t\trichTextIdentifier,\n\t\tsource,\n\t\tselector,\n\t};\n\n\tif ( selector === 'range' ) {\n\t\taction.range = range;\n\t}\n\n\treturn action;\n}\n\n/**\n * Removes an annotation with a specific ID.\n *\n * @param {string} annotationId The annotation to remove.\n *\n * @return {Object} Action object.\n */\nexport function __experimentalRemoveAnnotation( annotationId ) {\n\treturn {\n\t\ttype: 'ANNOTATION_REMOVE',\n\t\tannotationId,\n\t};\n}\n\n/**\n * Updates the range of an annotation.\n *\n * @param {string} annotationId ID of the annotation to update.\n * @param {number} start The start of the new range.\n * @param {number} end The end of the new range.\n *\n * @return {Object} Action object.\n */\nexport function __experimentalUpdateAnnotationRange( annotationId, start, end ) {\n\treturn {\n\t\ttype: 'ANNOTATION_UPDATE_RANGE',\n\t\tannotationId,\n\t\tstart,\n\t\tend,\n\t};\n}\n\n/**\n * Removes all annotations of a specific source.\n *\n * @param {string} source The source to remove.\n *\n * @return {Object} Action object.\n */\nexport function __experimentalRemoveAnnotationsBySource( source ) {\n\treturn {\n\t\ttype: 'ANNOTATION_REMOVE_SOURCE',\n\t\tsource,\n\t};\n}\n","/**\n * WordPress Dependencies\n */\nimport { registerStore } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport reducer from './reducer';\nimport * as selectors from './selectors';\nimport * as actions from './actions';\n\n/**\n * Module Constants\n */\nconst MODULE_KEY = 'core/annotations';\n\nconst store = registerStore( MODULE_KEY, {\n\treducer,\n\tselectors,\n\tactions,\n} );\n\nexport default store;\n","/**\n * External dependencies\n */\nimport { get, isNumber, mapValues } from 'lodash';\n\n/**\n * Filters an array based on the predicate, but keeps the reference the same if\n * the array hasn't changed.\n *\n * @param {Array} collection The collection to filter.\n * @param {Function} predicate Function that determines if the item should stay\n * in the array.\n * @return {Array} Filtered array.\n */\nfunction filterWithReference( collection, predicate ) {\n\tconst filteredCollection = collection.filter( predicate );\n\n\treturn collection.length === filteredCollection.length ? collection : filteredCollection;\n}\n\n/**\n * Verifies whether the given annotations is a valid annotation.\n *\n * @param {Object} annotation The annotation to verify.\n * @return {boolean} Whether the given annotation is valid.\n */\nfunction isValidAnnotationRange( annotation ) {\n\treturn isNumber( annotation.start ) &&\n\t\tisNumber( annotation.end ) &&\n\t\tannotation.start <= annotation.end;\n}\n\n/**\n * Reducer managing annotations.\n *\n * @param {Array} state The annotations currently shown in the editor.\n * @param {Object} action Dispatched action.\n *\n * @return {Array} Updated state.\n */\nexport function annotations( state = {}, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'ANNOTATION_ADD':\n\t\t\tconst blockClientId = action.blockClientId;\n\t\t\tconst newAnnotation = {\n\t\t\t\tid: action.id,\n\t\t\t\tblockClientId,\n\t\t\t\trichTextIdentifier: action.richTextIdentifier,\n\t\t\t\tsource: action.source,\n\t\t\t\tselector: action.selector,\n\t\t\t\trange: action.range,\n\t\t\t};\n\n\t\t\tif ( newAnnotation.selector === 'range' && ! isValidAnnotationRange( newAnnotation.range ) ) {\n\t\t\t\treturn state;\n\t\t\t}\n\n\t\t\tconst previousAnnotationsForBlock = get( state, blockClientId, [] );\n\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\t[ blockClientId ]: [ ...previousAnnotationsForBlock, newAnnotation ],\n\t\t\t};\n\n\t\tcase 'ANNOTATION_REMOVE':\n\t\t\treturn mapValues( state, ( annotationsForBlock ) => {\n\t\t\t\treturn filterWithReference( annotationsForBlock, ( annotation ) => {\n\t\t\t\t\treturn annotation.id !== action.annotationId;\n\t\t\t\t} );\n\t\t\t} );\n\n\t\tcase 'ANNOTATION_UPDATE_RANGE':\n\t\t\treturn mapValues( state, ( annotationsForBlock ) => {\n\t\t\t\tlet hasChangedRange = false;\n\n\t\t\t\tconst newAnnotations = annotationsForBlock.map( ( annotation ) => {\n\t\t\t\t\tif ( annotation.id === action.annotationId ) {\n\t\t\t\t\t\thasChangedRange = true;\n\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t...annotation,\n\t\t\t\t\t\t\trange: {\n\t\t\t\t\t\t\t\tstart: action.start,\n\t\t\t\t\t\t\t\tend: action.end,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t};\n\t\t\t\t\t}\n\n\t\t\t\t\treturn annotation;\n\t\t\t\t} );\n\n\t\t\t\treturn hasChangedRange ? newAnnotations : annotationsForBlock;\n\t\t\t} );\n\n\t\tcase 'ANNOTATION_REMOVE_SOURCE':\n\t\t\treturn mapValues( state, ( annotationsForBlock ) => {\n\t\t\t\treturn filterWithReference( annotationsForBlock, ( annotation ) => {\n\t\t\t\t\treturn annotation.source !== action.source;\n\t\t\t\t} );\n\t\t\t} );\n\t}\n\n\treturn state;\n}\n\nexport default annotations;\n","/**\n * External dependencies\n */\nimport createSelector from 'rememo';\nimport { get, flatMap } from 'lodash';\n\n/**\n * Shared reference to an empty array for cases where it is important to avoid\n * returning a new array reference on every invocation, as in a connected or\n * other pure component which performs `shouldComponentUpdate` check on props.\n * This should be used as a last resort, since the normalized data should be\n * maintained by the reducer result in state.\n *\n * @type {Array}\n */\nconst EMPTY_ARRAY = [];\n\n/**\n * Returns the annotations for a specific client ID.\n *\n * @param {Object} state Editor state.\n * @param {string} clientId The ID of the block to get the annotations for.\n *\n * @return {Array} The annotations applicable to this block.\n */\nexport const __experimentalGetAnnotationsForBlock = createSelector(\n\t( state, blockClientId ) => {\n\t\treturn get( state, blockClientId, [] ).filter( ( annotation ) => {\n\t\t\treturn annotation.selector === 'block';\n\t\t} );\n\t},\n\t( state, blockClientId ) => [\n\t\tget( state, blockClientId, EMPTY_ARRAY ),\n\t]\n);\n\nexport const __experimentalGetAllAnnotationsForBlock = function( state, blockClientId ) {\n\treturn get( state, blockClientId, EMPTY_ARRAY );\n};\n\n/**\n * Returns the annotations that apply to the given RichText instance.\n *\n * Both a blockClientId and a richTextIdentifier are required. This is because\n * a block might have multiple `RichText` components. This does mean that every\n * block needs to implement annotations itself.\n *\n * @param {Object} state Editor state.\n * @param {string} blockClientId The client ID for the block.\n * @param {string} richTextIdentifier Unique identifier that identifies the given RichText.\n * @return {Array} All the annotations relevant for the `RichText`.\n */\nexport const __experimentalGetAnnotationsForRichText = createSelector(\n\t( state, blockClientId, richTextIdentifier ) => {\n\t\treturn get( state, blockClientId, [] ).filter( ( annotation ) => {\n\t\t\treturn annotation.selector === 'range' &&\n\t\t\t\trichTextIdentifier === annotation.richTextIdentifier;\n\t\t} ).map( ( annotation ) => {\n\t\t\tconst { range, ...other } = annotation;\n\n\t\t\treturn {\n\t\t\t\t...range,\n\t\t\t\t...other,\n\t\t\t};\n\t\t} );\n\t},\n\t( state, blockClientId ) => [\n\t\tget( state, blockClientId, EMPTY_ARRAY ),\n\t]\n);\n\n/**\n * Returns all annotations in the editor state.\n *\n * @param {Object} state Editor state.\n * @return {Array} All annotations currently applied.\n */\nexport function __experimentalGetAnnotations( state ) {\n\treturn flatMap( state, ( annotations ) => {\n\t\treturn annotations;\n\t} );\n}\n","module.exports = function memize( fn, options ) {\n\tvar size = 0,\n\t\tmaxSize, head, tail;\n\n\tif ( options && options.maxSize ) {\n\t\tmaxSize = options.maxSize;\n\t}\n\n\tfunction memoized( /* ...args */ ) {\n\t\tvar node = head,\n\t\t\tlen = arguments.length,\n\t\t\targs, i;\n\n\t\tsearchCache: while ( node ) {\n\t\t\t// Perform a shallow equality test to confirm that whether the node\n\t\t\t// under test is a candidate for the arguments passed. Two arrays\n\t\t\t// are shallowly equal if their length matches and each entry is\n\t\t\t// strictly equal between the two sets. Avoid abstracting to a\n\t\t\t// function which could incur an arguments leaking deoptimization.\n\n\t\t\t// Check whether node arguments match arguments length\n\t\t\tif ( node.args.length !== arguments.length ) {\n\t\t\t\tnode = node.next;\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// Check whether node arguments match arguments values\n\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\tif ( node.args[ i ] !== arguments[ i ] ) {\n\t\t\t\t\tnode = node.next;\n\t\t\t\t\tcontinue searchCache;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// At this point we can assume we've found a match\n\n\t\t\t// Surface matched node to head if not already\n\t\t\tif ( node !== head ) {\n\t\t\t\t// As tail, shift to previous. Must only shift if not also\n\t\t\t\t// head, since if both head and tail, there is no previous.\n\t\t\t\tif ( node === tail ) {\n\t\t\t\t\ttail = node.prev;\n\t\t\t\t}\n\n\t\t\t\t// Adjust siblings to point to each other. If node was tail,\n\t\t\t\t// this also handles new tail's empty `next` assignment.\n\t\t\t\tnode.prev.next = node.next;\n\t\t\t\tif ( node.next ) {\n\t\t\t\t\tnode.next.prev = node.prev;\n\t\t\t\t}\n\n\t\t\t\tnode.next = head;\n\t\t\t\tnode.prev = null;\n\t\t\t\thead.prev = node;\n\t\t\t\thead = node;\n\t\t\t}\n\n\t\t\t// Return immediately\n\t\t\treturn node.val;\n\t\t}\n\n\t\t// No cached value found. Continue to insertion phase:\n\n\t\t// Create a copy of arguments (avoid leaking deoptimization)\n\t\targs = new Array( len );\n\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\targs[ i ] = arguments[ i ];\n\t\t}\n\n\t\tnode = {\n\t\t\targs: args,\n\n\t\t\t// Generate the result from original function\n\t\t\tval: fn.apply( null, args )\n\t\t};\n\n\t\t// Don't need to check whether node is already head, since it would\n\t\t// have been returned above already if it was\n\n\t\t// Shift existing head down list\n\t\tif ( head ) {\n\t\t\thead.prev = node;\n\t\t\tnode.next = head;\n\t\t} else {\n\t\t\t// If no head, follows that there's no tail (at initial or reset)\n\t\t\ttail = node;\n\t\t}\n\n\t\t// Trim tail if we're reached max size and are pending cache insertion\n\t\tif ( size === maxSize ) {\n\t\t\ttail = tail.prev;\n\t\t\ttail.next = null;\n\t\t} else {\n\t\t\tsize++;\n\t\t}\n\n\t\thead = node;\n\n\t\treturn node.val;\n\t}\n\n\tmemoized.clear = function() {\n\t\thead = null;\n\t\ttail = null;\n\t\tsize = 0;\n\t};\n\n\tif ( process.env.NODE_ENV === 'test' ) {\n\t\t// Cache is not exposed in the public API, but used in tests to ensure\n\t\t// expected list progression\n\t\tmemoized.getCache = function() {\n\t\t\treturn [ head, tail, size ];\n\t\t};\n\t}\n\n\treturn memoized;\n};\n","'use strict';\n\nvar LEAF_KEY, hasWeakMap;\n\n/**\n * Arbitrary value used as key for referencing cache object in WeakMap tree.\n *\n * @type {Object}\n */\nLEAF_KEY = {};\n\n/**\n * Whether environment supports WeakMap.\n *\n * @type {boolean}\n */\nhasWeakMap = typeof WeakMap !== 'undefined';\n\n/**\n * Returns the first argument as the sole entry in an array.\n *\n * @param {*} value Value to return.\n *\n * @return {Array} Value returned as entry in array.\n */\nfunction arrayOf( value ) {\n\treturn [ value ];\n}\n\n/**\n * Returns true if the value passed is object-like, or false otherwise. A value\n * is object-like if it can support property assignment, e.g. object or array.\n *\n * @param {*} value Value to test.\n *\n * @return {boolean} Whether value is object-like.\n */\nfunction isObjectLike( value ) {\n\treturn !! value && 'object' === typeof value;\n}\n\n/**\n * Creates and returns a new cache object.\n *\n * @return {Object} Cache object.\n */\nfunction createCache() {\n\tvar cache = {\n\t\tclear: function() {\n\t\t\tcache.head = null;\n\t\t},\n\t};\n\n\treturn cache;\n}\n\n/**\n * Returns true if entries within the two arrays are strictly equal by\n * reference from a starting index.\n *\n * @param {Array} a First array.\n * @param {Array} b Second array.\n * @param {number} fromIndex Index from which to start comparison.\n *\n * @return {boolean} Whether arrays are shallowly equal.\n */\nfunction isShallowEqual( a, b, fromIndex ) {\n\tvar i;\n\n\tif ( a.length !== b.length ) {\n\t\treturn false;\n\t}\n\n\tfor ( i = fromIndex; i < a.length; i++ ) {\n\t\tif ( a[ i ] !== b[ i ] ) {\n\t\t\treturn false;\n\t\t}\n\t}\n\n\treturn true;\n}\n\n/**\n * Returns a memoized selector function. The getDependants function argument is\n * called before the memoized selector and is expected to return an immutable\n * reference or array of references on which the selector depends for computing\n * its own return value. The memoize cache is preserved only as long as those\n * dependant references remain the same. If getDependants returns a different\n * reference(s), the cache is cleared and the selector value regenerated.\n *\n * @param {Function} selector Selector function.\n * @param {Function} getDependants Dependant getter returning an immutable\n * reference or array of reference used in\n * cache bust consideration.\n *\n * @return {Function} Memoized selector.\n */\nexport default function( selector, getDependants ) {\n\tvar rootCache, getCache;\n\n\t// Use object source as dependant if getter not provided\n\tif ( ! getDependants ) {\n\t\tgetDependants = arrayOf;\n\t}\n\n\t/**\n\t * Returns the root cache. If WeakMap is supported, this is assigned to the\n\t * root WeakMap cache set, otherwise it is a shared instance of the default\n\t * cache object.\n\t *\n\t * @return {(WeakMap|Object)} Root cache object.\n\t */\n\tfunction getRootCache() {\n\t\treturn rootCache;\n\t}\n\n\t/**\n\t * Returns the cache for a given dependants array. When possible, a WeakMap\n\t * will be used to create a unique cache for each set of dependants. This\n\t * is feasible due to the nature of WeakMap in allowing garbage collection\n\t * to occur on entries where the key object is no longer referenced. Since\n\t * WeakMap requires the key to be an object, this is only possible when the\n\t * dependant is object-like. The root cache is created as a hierarchy where\n\t * each top-level key is the first entry in a dependants set, the value a\n\t * WeakMap where each key is the next dependant, and so on. This continues\n\t * so long as the dependants are object-like. If no dependants are object-\n\t * like, then the cache is shared across all invocations.\n\t *\n\t * @see isObjectLike\n\t *\n\t * @param {Array} dependants Selector dependants.\n\t *\n\t * @return {Object} Cache object.\n\t */\n\tfunction getWeakMapCache( dependants ) {\n\t\tvar caches = rootCache,\n\t\t\tisUniqueByDependants = true,\n\t\t\ti, dependant, map, cache;\n\n\t\tfor ( i = 0; i < dependants.length; i++ ) {\n\t\t\tdependant = dependants[ i ];\n\n\t\t\t// Can only compose WeakMap from object-like key.\n\t\t\tif ( ! isObjectLike( dependant ) ) {\n\t\t\t\tisUniqueByDependants = false;\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t// Does current segment of cache already have a WeakMap?\n\t\t\tif ( caches.has( dependant ) ) {\n\t\t\t\t// Traverse into nested WeakMap.\n\t\t\t\tcaches = caches.get( dependant );\n\t\t\t} else {\n\t\t\t\t// Create, set, and traverse into a new one.\n\t\t\t\tmap = new WeakMap();\n\t\t\t\tcaches.set( dependant, map );\n\t\t\t\tcaches = map;\n\t\t\t}\n\t\t}\n\n\t\t// We use an arbitrary (but consistent) object as key for the last item\n\t\t// in the WeakMap to serve as our running cache.\n\t\tif ( ! caches.has( LEAF_KEY ) ) {\n\t\t\tcache = createCache();\n\t\t\tcache.isUniqueByDependants = isUniqueByDependants;\n\t\t\tcaches.set( LEAF_KEY, cache );\n\t\t}\n\n\t\treturn caches.get( LEAF_KEY );\n\t}\n\n\t// Assign cache handler by availability of WeakMap\n\tgetCache = hasWeakMap ? getWeakMapCache : getRootCache;\n\n\t/**\n\t * Resets root memoization cache.\n\t */\n\tfunction clear() {\n\t\trootCache = hasWeakMap ? new WeakMap() : createCache();\n\t}\n\n\t// eslint-disable-next-line jsdoc/check-param-names\n\t/**\n\t * The augmented selector call, considering first whether dependants have\n\t * changed before passing it to underlying memoize function.\n\t *\n\t * @param {Object} source Source object for derivation.\n\t * @param {...*} extraArgs Additional arguments to pass to selector.\n\t *\n\t * @return {*} Selector result.\n\t */\n\tfunction callSelector( /* source, ...extraArgs */ ) {\n\t\tvar len = arguments.length,\n\t\t\tcache, node, i, args, dependants;\n\n\t\t// Create copy of arguments (avoid leaking deoptimization).\n\t\targs = new Array( len );\n\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\targs[ i ] = arguments[ i ];\n\t\t}\n\n\t\tdependants = getDependants.apply( null, args );\n\t\tcache = getCache( dependants );\n\n\t\t// If not guaranteed uniqueness by dependants (primitive type or lack\n\t\t// of WeakMap support), shallow compare against last dependants and, if\n\t\t// references have changed, destroy cache to recalculate result.\n\t\tif ( ! cache.isUniqueByDependants ) {\n\t\t\tif ( cache.lastDependants && ! isShallowEqual( dependants, cache.lastDependants, 0 ) ) {\n\t\t\t\tcache.clear();\n\t\t\t}\n\n\t\t\tcache.lastDependants = dependants;\n\t\t}\n\n\t\tnode = cache.head;\n\t\twhile ( node ) {\n\t\t\t// Check whether node arguments match arguments\n\t\t\tif ( ! isShallowEqual( node.args, args, 1 ) ) {\n\t\t\t\tnode = node.next;\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// At this point we can assume we've found a match\n\n\t\t\t// Surface matched node to head if not already\n\t\t\tif ( node !== cache.head ) {\n\t\t\t\t// Adjust siblings to point to each other.\n\t\t\t\tnode.prev.next = node.next;\n\t\t\t\tif ( node.next ) {\n\t\t\t\t\tnode.next.prev = node.prev;\n\t\t\t\t}\n\n\t\t\t\tnode.next = cache.head;\n\t\t\t\tnode.prev = null;\n\t\t\t\tcache.head.prev = node;\n\t\t\t\tcache.head = node;\n\t\t\t}\n\n\t\t\t// Return immediately\n\t\t\treturn node.val;\n\t\t}\n\n\t\t// No cached value found. Continue to insertion phase:\n\n\t\tnode = {\n\t\t\t// Generate the result from original function\n\t\t\tval: selector.apply( null, args ),\n\t\t};\n\n\t\t// Avoid including the source object in the cache.\n\t\targs[ 0 ] = null;\n\t\tnode.args = args;\n\n\t\t// Don't need to check whether node is already head, since it would\n\t\t// have been returned above already if it was\n\n\t\t// Shift existing head down list\n\t\tif ( cache.head ) {\n\t\t\tcache.head.prev = node;\n\t\t\tnode.next = cache.head;\n\t\t}\n\n\t\tcache.head = node;\n\n\t\treturn node.val;\n\t}\n\n\tcallSelector.getDependants = getDependants;\n\tcallSelector.clear = clear;\n\tclear();\n\n\treturn callSelector;\n}\n","/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\nvar byteToHex = [];\nfor (var i = 0; i < 256; ++i) {\n byteToHex[i] = (i + 0x100).toString(16).substr(1);\n}\n\nfunction bytesToUuid(buf, offset) {\n var i = offset || 0;\n var bth = byteToHex;\n // join used to fix memory issue caused by concatenation: https://bugs.chromium.org/p/v8/issues/detail?id=3175#c4\n return ([bth[buf[i++]], bth[buf[i++]], \n\tbth[buf[i++]], bth[buf[i++]], '-',\n\tbth[buf[i++]], bth[buf[i++]], '-',\n\tbth[buf[i++]], bth[buf[i++]], '-',\n\tbth[buf[i++]], bth[buf[i++]], '-',\n\tbth[buf[i++]], bth[buf[i++]],\n\tbth[buf[i++]], bth[buf[i++]],\n\tbth[buf[i++]], bth[buf[i++]]]).join('');\n}\n\nmodule.exports = bytesToUuid;\n","// Unique ID creation requires a high quality random # generator. In the\n// browser this is a little complicated due to unknown quality of Math.random()\n// and inconsistent support for the `crypto` API. We do the best we can via\n// feature-detection\n\n// getRandomValues needs to be invoked in a context where \"this\" is a Crypto\n// implementation. Also, find the complete implementation of crypto on IE11.\nvar getRandomValues = (typeof(crypto) != 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto)) ||\n (typeof(msCrypto) != 'undefined' && typeof window.msCrypto.getRandomValues == 'function' && msCrypto.getRandomValues.bind(msCrypto));\n\nif (getRandomValues) {\n // WHATWG crypto RNG - http://wiki.whatwg.org/wiki/Crypto\n var rnds8 = new Uint8Array(16); // eslint-disable-line no-undef\n\n module.exports = function whatwgRNG() {\n getRandomValues(rnds8);\n return rnds8;\n };\n} else {\n // Math.random()-based (RNG)\n //\n // If all else fails, use Math.random(). It's fast, but is of unspecified\n // quality.\n var rnds = new Array(16);\n\n module.exports = function mathRNG() {\n for (var i = 0, r; i < 16; i++) {\n if ((i & 0x03) === 0) r = Math.random() * 0x100000000;\n rnds[i] = r >>> ((i & 0x03) << 3) & 0xff;\n }\n\n return rnds;\n };\n}\n","var rng = require('./lib/rng');\nvar bytesToUuid = require('./lib/bytesToUuid');\n\nfunction v4(options, buf, offset) {\n var i = buf && offset || 0;\n\n if (typeof(options) == 'string') {\n buf = options === 'binary' ? new Array(16) : null;\n options = null;\n }\n options = options || {};\n\n var rnds = options.random || (options.rng || rng)();\n\n // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n rnds[6] = (rnds[6] & 0x0f) | 0x40;\n rnds[8] = (rnds[8] & 0x3f) | 0x80;\n\n // Copy bytes to buffer, if provided\n if (buf) {\n for (var ii = 0; ii < 16; ++ii) {\n buf[i + ii] = rnds[ii];\n }\n }\n\n return buf || bytesToUuid(rnds);\n}\n\nmodule.exports = v4;\n","(function() { module.exports = this[\"wp\"][\"data\"]; }());","(function() { module.exports = this[\"wp\"][\"hooks\"]; }());","(function() { module.exports = this[\"wp\"][\"i18n\"]; }());","(function() { module.exports = this[\"wp\"][\"richText\"]; }());","(function() { module.exports = this[\"lodash\"]; }());"],"sourceRoot":""}