@wordpress/core-data 6.12.11 → 6.12.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/build/actions.js CHANGED
@@ -568,7 +568,7 @@ const saveEntityRecord = (kind, name, record, {
568
568
  ...record
569
569
  };
570
570
  data = Object.keys(data).reduce((acc, key) => {
571
- if (['title', 'excerpt', 'content'].includes(key)) {
571
+ if (['title', 'excerpt', 'content', 'meta'].includes(key)) {
572
572
  acc[key] = data[key];
573
573
  }
574
574
 
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/core-data/src/actions.js"],"names":["receiveUserQuery","queryID","users","type","Array","isArray","receiveCurrentUser","currentUser","addEntities","entities","receiveEntityRecords","kind","name","records","query","invalidateCache","edits","map","record","status","title","action","receiveCurrentTheme","currentTheme","__experimentalReceiveCurrentGlobalStylesId","currentGlobalStylesId","id","__experimentalReceiveThemeBaseGlobalStyles","stylesheet","globalStyles","__experimentalReceiveThemeGlobalStyleVariations","variations","receiveThemeSupports","since","receiveThemeGlobalStyleRevisions","currentId","revisions","receiveEmbedPreview","url","preview","deleteEntityRecord","recordId","__unstableFetch","apiFetch","throwOnError","dispatch","configs","entityConfig","find","config","error","deletedRecord","__experimentalNoFetch","lock","__unstableAcquireStoreLock","STORE_NAME","exclusive","hasError","path","baseURL","method","_error","__unstableReleaseStoreLock","editEntityRecord","options","select","getEntityConfig","Error","mergedEdits","getRawEntityRecord","editedRecord","getEditedEntityRecord","edit","Object","keys","reduce","acc","key","recordValue","editedRecordValue","value","undefined","meta","undo","undoIgnore","isCached","undoEdit","state","root","stackedEdits","redo","redoEdit","__unstableCreateUndoLevel","saveEntityRecord","isAutosave","resolveSelect","entityIdKey","DEFAULT_ENTITY_KEY","entries","evaluatedValue","updatedRecord","persistedRecord","getCurrentUser","currentUserId","autosavePost","getAutosave","data","includes","newRecord","receiveAutosaves","__unstablePrePersist","__experimentalBatch","requests","batch","api","add","saveEditedEntityRecord","resultPromises","request","results","Promise","all","run","hasEditsForEntityRecord","getEntityRecordNonTransientEdits","__experimentalSaveSpecifiedEntityEdits","itemsToSave","editsToSave","some","item","receiveUploadPermissions","hasUploadPermissions","alternative","receiveUserPermission","isAllowed","postId","autosaves","receiveNavigationFallbackId","fallbackId"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA;;AACA;;AAKA;;AACA;;AACA;;AAKA;;AACA;;AACA;;AACA;;AACA;;AApBA;AACA;AACA;;AAIA;AACA;AACA;;AAKA;AACA;AACA;;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASA,gBAAT,CAA2BC,OAA3B,EAAoCC,KAApC,EAA4C;AAClD,SAAO;AACNC,IAAAA,IAAI,EAAE,oBADA;AAEND,IAAAA,KAAK,EAAEE,KAAK,CAACC,OAAN,CAAeH,KAAf,IAAyBA,KAAzB,GAAiC,CAAEA,KAAF,CAFlC;AAGND,IAAAA;AAHM,GAAP;AAKA;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACO,SAASK,kBAAT,CAA6BC,WAA7B,EAA2C;AACjD,SAAO;AACNJ,IAAAA,IAAI,EAAE,sBADA;AAENI,IAAAA;AAFM,GAAP;AAIA;AAED;AACA;AACA;AACA;AACA;AACA;AACA;;;AACO,SAASC,WAAT,CAAsBC,QAAtB,EAAiC;AACvC,SAAO;AACNN,IAAAA,IAAI,EAAE,cADA;AAENM,IAAAA;AAFM,GAAP;AAIA;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACO,SAASC,oBAAT,CACNC,IADM,EAENC,IAFM,EAGNC,OAHM,EAINC,KAJM,EAKNC,eAAe,GAAG,KALZ,EAMNC,KANM,EAOL;AACD;AACA;AACA,MAAKL,IAAI,KAAK,UAAd,EAA2B;AAC1BE,IAAAA,OAAO,GAAG,CAAET,KAAK,CAACC,OAAN,CAAeQ,OAAf,IAA2BA,OAA3B,GAAqC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A,CAvBK;AAyBP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;AACO,SAASkE,wBAAT,CAAmCC,oBAAnC,EAA0D;AAChE,2BAAY,qDAAZ,EAAmE;AAClElG,IAAAA,KAAK,EAAE,KAD2D;AAElEmG,IAAAA,WAAW,EAAE;AAFqD,GAAnE;AAKA,SAAOC,qBAAqB,CAAE,cAAF,EAAkBF,oBAAlB,CAA5B;AACA;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACO,SAASE,qBAAT,CAAgCxD,GAAhC,EAAqCyD,SAArC,EAAiD;AACvD,SAAO;AACNnI,IAAAA,IAAI,EAAE,yBADA;AAEN0E,IAAAA,GAFM;AAGNyD,IAAAA;AAHM,GAAP;AAKA;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACO,SAASzB,gBAAT,CAA2B0B,MAA3B,EAAmCC,SAAnC,EAA+C;AACrD,SAAO;AACNrI,IAAAA,IAAI,EAAE,mBADA;AAENoI,IAAAA,MAFM;AAGNC,IAAAA,SAAS,EAAEpI,KAAK,CAACC,OAAN,CAAemI,SAAf,IAA6BA,SAA7B,GAAyC,CAAEA,SAAF;AAH9C,GAAP;AAKA;AAED;AACA;AACA;AACA;AACA;AACA;AACA;;;AACO,SAASC,2BAAT,CAAsCC,UAAtC,EAAmD;AACzD,SAAO;AACNvI,IAAAA,IAAI,EAAE,gCADA;AAENuI,IAAAA;AAFM,GAAP;AAIA","sourcesContent":["/**\n * External dependencies\n */\nimport fastDeepEqual from 'fast-deep-equal/es6';\nimport { v4 as uuid } from 'uuid';\n\n/**\n * WordPress dependencies\n */\nimport apiFetch from '@wordpress/api-fetch';\nimport { addQueryArgs } from '@wordpress/url';\nimport deprecated from '@wordpress/deprecated';\n\n/**\n * Internal dependencies\n */\nimport { receiveItems, removeItems, receiveQueriedItems } from './queried-data';\nimport { getOrLoadEntitiesConfig, DEFAULT_ENTITY_KEY } from './entities';\nimport { createBatch } from './batch';\nimport { STORE_NAME } from './name';\nimport { getUndoEdits, getRedoEdits } from './private-selectors';\n\n/**\n * Returns an action object used in signalling that authors have been received.\n * Ignored from documentation as it's internal to the data store.\n *\n * @ignore\n *\n * @param {string} queryID Query ID.\n * @param {Array|Object} users Users received.\n *\n * @return {Object} Action object.\n */\nexport function receiveUserQuery( queryID, users ) {\n\treturn {\n\t\ttype: 'RECEIVE_USER_QUERY',\n\t\tusers: Array.isArray( users ) ? users : [ users ],\n\t\tqueryID,\n\t};\n}\n\n/**\n * Returns an action used in signalling that the current user has been received.\n * Ignored from documentation as it's internal to the data store.\n *\n * @ignore\n *\n * @param {Object} currentUser Current user object.\n *\n * @return {Object} Action object.\n */\nexport function receiveCurrentUser( currentUser ) {\n\treturn {\n\t\ttype: 'RECEIVE_CURRENT_USER',\n\t\tcurrentUser,\n\t};\n}\n\n/**\n * Returns an action object used in adding new entities.\n *\n * @param {Array} entities Entities received.\n *\n * @return {Object} Action object.\n */\nexport function addEntities( entities ) {\n\treturn {\n\t\ttype: 'ADD_ENTITIES',\n\t\tentities,\n\t};\n}\n\n/**\n * Returns an action object used in signalling that entity records have been received.\n *\n * @param {string} kind Kind of the received entity record.\n * @param {string} name Name of the received entity record.\n * @param {Array|Object} records Records received.\n * @param {?Object} query Query Object.\n * @param {?boolean} invalidateCache Should invalidate query caches.\n * @param {?Object} edits Edits to reset.\n * @return {Object} Action object.\n */\nexport function receiveEntityRecords(\n\tkind,\n\tname,\n\trecords,\n\tquery,\n\tinvalidateCache = false,\n\tedits\n) {\n\t// Auto drafts should not have titles, but some plugins rely on them so we can't filter this\n\t// on the server.\n\tif ( kind === 'postType' ) {\n\t\trecords = ( Array.isArray( records ) ? records : [ records ] ).map(\n\t\t\t( record ) =>\n\t\t\t\trecord.status === 'auto-draft'\n\t\t\t\t\t? { ...record, title: '' }\n\t\t\t\t\t: record\n\t\t);\n\t}\n\tlet action;\n\tif ( query ) {\n\t\taction = receiveQueriedItems( records, query, edits );\n\t} else {\n\t\taction = receiveItems( records, edits );\n\t}\n\n\treturn {\n\t\t...action,\n\t\tkind,\n\t\tname,\n\t\tinvalidateCache,\n\t};\n}\n\n/**\n * Returns an action object used in signalling that the current theme has been received.\n * Ignored from documentation as it's internal to the data store.\n *\n * @ignore\n *\n * @param {Object} currentTheme The current theme.\n *\n * @return {Object} Action object.\n */\nexport function receiveCurrentTheme( currentTheme ) {\n\treturn {\n\t\ttype: 'RECEIVE_CURRENT_THEME',\n\t\tcurrentTheme,\n\t};\n}\n\n/**\n * Returns an action object used in signalling that the current global styles id has been received.\n * Ignored from documentation as it's internal to the data store.\n *\n * @ignore\n *\n * @param {string} currentGlobalStylesId The current global styles id.\n *\n * @return {Object} Action object.\n */\nexport function __experimentalReceiveCurrentGlobalStylesId(\n\tcurrentGlobalStylesId\n) {\n\treturn {\n\t\ttype: 'RECEIVE_CURRENT_GLOBAL_STYLES_ID',\n\t\tid: currentGlobalStylesId,\n\t};\n}\n\n/**\n * Returns an action object used in signalling that the theme base global styles have been received\n * Ignored from documentation as it's internal to the data store.\n *\n * @ignore\n *\n * @param {string} stylesheet The theme's identifier\n * @param {Object} globalStyles The global styles object.\n *\n * @return {Object} Action object.\n */\nexport function __experimentalReceiveThemeBaseGlobalStyles(\n\tstylesheet,\n\tglobalStyles\n) {\n\treturn {\n\t\ttype: 'RECEIVE_THEME_GLOBAL_STYLES',\n\t\tstylesheet,\n\t\tglobalStyles,\n\t};\n}\n\n/**\n * Returns an action object used in signalling that the theme global styles variations have been received.\n * Ignored from documentation as it's internal to the data store.\n *\n * @ignore\n *\n * @param {string} stylesheet The theme's identifier\n * @param {Array} variations The global styles variations.\n *\n * @return {Object} Action object.\n */\nexport function __experimentalReceiveThemeGlobalStyleVariations(\n\tstylesheet,\n\tvariations\n) {\n\treturn {\n\t\ttype: 'RECEIVE_THEME_GLOBAL_STYLE_VARIATIONS',\n\t\tstylesheet,\n\t\tvariations,\n\t};\n}\n\n/**\n * Returns an action object used in signalling that the index has been received.\n *\n * @deprecated since WP 5.9, this is not useful anymore, use the selector direclty.\n *\n * @return {Object} Action object.\n */\nexport function receiveThemeSupports() {\n\tdeprecated( \"wp.data.dispatch( 'core' ).receiveThemeSupports\", {\n\t\tsince: '5.9',\n\t} );\n\n\treturn {\n\t\ttype: 'DO_NOTHING',\n\t};\n}\n\n/**\n * Returns an action object used in signalling that the theme global styles CPT post revisions have been received.\n * Ignored from documentation as it's internal to the data store.\n *\n * @ignore\n *\n * @param {number} currentId The post id.\n * @param {Array} revisions The global styles revisions.\n *\n * @return {Object} Action object.\n */\nexport function receiveThemeGlobalStyleRevisions( currentId, revisions ) {\n\treturn {\n\t\ttype: 'RECEIVE_THEME_GLOBAL_STYLE_REVISIONS',\n\t\tcurrentId,\n\t\trevisions,\n\t};\n}\n\n/**\n * Returns an action object used in signalling that the preview data for\n * a given URl has been received.\n * Ignored from documentation as it's internal to the data store.\n *\n * @ignore\n *\n * @param {string} url URL to preview the embed for.\n * @param {*} preview Preview data.\n *\n * @return {Object} Action object.\n */\nexport function receiveEmbedPreview( url, preview ) {\n\treturn {\n\t\ttype: 'RECEIVE_EMBED_PREVIEW',\n\t\turl,\n\t\tpreview,\n\t};\n}\n\n/**\n * Action triggered to delete an entity record.\n *\n * @param {string} kind Kind of the deleted entity.\n * @param {string} name Name of the deleted entity.\n * @param {string} recordId Record ID of the deleted entity.\n * @param {?Object} query Special query parameters for the\n * DELETE API call.\n * @param {Object} [options] Delete options.\n * @param {Function} [options.__unstableFetch] Internal use only. Function to\n * call instead of `apiFetch()`.\n * Must return a promise.\n * @param {boolean} [options.throwOnError=false] If false, this action suppresses all\n * the exceptions. Defaults to false.\n */\nexport const deleteEntityRecord =\n\t(\n\t\tkind,\n\t\tname,\n\t\trecordId,\n\t\tquery,\n\t\t{ __unstableFetch = apiFetch, throwOnError = false } = {}\n\t) =>\n\tasync ( { dispatch } ) => {\n\t\tconst configs = await dispatch( getOrLoadEntitiesConfig( kind ) );\n\t\tconst entityConfig = configs.find(\n\t\t\t( config ) => config.kind === kind && config.name === name\n\t\t);\n\t\tlet error;\n\t\tlet deletedRecord = false;\n\t\tif ( ! entityConfig || entityConfig?.__experimentalNoFetch ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst lock = await dispatch.__unstableAcquireStoreLock(\n\t\t\tSTORE_NAME,\n\t\t\t[ 'entities', 'records', kind, name, recordId ],\n\t\t\t{ exclusive: true }\n\t\t);\n\n\t\ttry {\n\t\t\tdispatch( {\n\t\t\t\ttype: 'DELETE_ENTITY_RECORD_START',\n\t\t\t\tkind,\n\t\t\t\tname,\n\t\t\t\trecordId,\n\t\t\t} );\n\n\t\t\tlet hasError = false;\n\t\t\ttry {\n\t\t\t\tlet path = `${ entityConfig.baseURL }/${ recordId }`;\n\n\t\t\t\tif ( query ) {\n\t\t\t\t\tpath = addQueryArgs( path, query );\n\t\t\t\t}\n\n\t\t\t\tdeletedRecord = await __unstableFetch( {\n\t\t\t\t\tpath,\n\t\t\t\t\tmethod: 'DELETE',\n\t\t\t\t} );\n\n\t\t\t\tawait dispatch( removeItems( kind, name, recordId, true ) );\n\t\t\t} catch ( _error ) {\n\t\t\t\thasError = true;\n\t\t\t\terror = _error;\n\t\t\t}\n\n\t\t\tdispatch( {\n\t\t\t\ttype: 'DELETE_ENTITY_RECORD_FINISH',\n\t\t\t\tkind,\n\t\t\t\tname,\n\t\t\t\trecordId,\n\t\t\t\terror,\n\t\t\t} );\n\n\t\t\tif ( hasError && throwOnError ) {\n\t\t\t\tthrow error;\n\t\t\t}\n\n\t\t\treturn deletedRecord;\n\t\t} finally {\n\t\t\tdispatch.__unstableReleaseStoreLock( lock );\n\t\t}\n\t};\n\n/**\n * Returns an action object that triggers an\n * edit to an entity record.\n *\n * @param {string} kind Kind of the edited entity record.\n * @param {string} name Name of the edited entity record.\n * @param {number|string} recordId Record ID of the edited entity record.\n * @param {Object} edits The edits.\n * @param {Object} options Options for the edit.\n * @param {boolean} [options.undoIgnore] Whether to ignore the edit in undo history or not.\n *\n * @return {Object} Action object.\n */\nexport const editEntityRecord =\n\t( kind, name, recordId, edits, options = {} ) =>\n\t( { select, dispatch } ) => {\n\t\tconst entityConfig = select.getEntityConfig( kind, name );\n\t\tif ( ! entityConfig ) {\n\t\t\tthrow new Error(\n\t\t\t\t`The entity being edited (${ kind }, ${ name }) does not have a loaded config.`\n\t\t\t);\n\t\t}\n\t\tconst { mergedEdits = {} } = entityConfig;\n\t\tconst record = select.getRawEntityRecord( kind, name, recordId );\n\t\tconst editedRecord = select.getEditedEntityRecord(\n\t\t\tkind,\n\t\t\tname,\n\t\t\trecordId\n\t\t);\n\n\t\tconst edit = {\n\t\t\tkind,\n\t\t\tname,\n\t\t\trecordId,\n\t\t\t// Clear edits when they are equal to their persisted counterparts\n\t\t\t// so that the property is not considered dirty.\n\t\t\tedits: Object.keys( edits ).reduce( ( acc, key ) => {\n\t\t\t\tconst recordValue = record[ key ];\n\t\t\t\tconst editedRecordValue = editedRecord[ key ];\n\t\t\t\tconst value = mergedEdits[ key ]\n\t\t\t\t\t? { ...editedRecordValue, ...edits[ key ] }\n\t\t\t\t\t: edits[ key ];\n\t\t\t\tacc[ key ] = fastDeepEqual( recordValue, value )\n\t\t\t\t\t? undefined\n\t\t\t\t\t: value;\n\t\t\t\treturn acc;\n\t\t\t}, {} ),\n\t\t};\n\t\tdispatch( {\n\t\t\ttype: 'EDIT_ENTITY_RECORD',\n\t\t\t...edit,\n\t\t\tmeta: {\n\t\t\t\tundo: ! options.undoIgnore && {\n\t\t\t\t\t...edit,\n\t\t\t\t\t// Send the current values for things like the first undo stack entry.\n\t\t\t\t\tedits: Object.keys( edits ).reduce( ( acc, key ) => {\n\t\t\t\t\t\tacc[ key ] = editedRecord[ key ];\n\t\t\t\t\t\treturn acc;\n\t\t\t\t\t}, {} ),\n\t\t\t\t\tisCached: options.isCached,\n\t\t\t\t},\n\t\t\t},\n\t\t} );\n\t};\n\n/**\n * Action triggered to undo the last edit to\n * an entity record, if any.\n */\nexport const undo =\n\t() =>\n\t( { select, dispatch } ) => {\n\t\t// Todo: we shouldn't have to pass \"root\" here.\n\t\tconst undoEdit = select( ( state ) => getUndoEdits( state.root ) );\n\t\tif ( ! undoEdit ) {\n\t\t\treturn;\n\t\t}\n\t\tdispatch( {\n\t\t\ttype: 'UNDO',\n\t\t\tstackedEdits: undoEdit,\n\t\t} );\n\t};\n\n/**\n * Action triggered to redo the last undoed\n * edit to an entity record, if any.\n */\nexport const redo =\n\t() =>\n\t( { select, dispatch } ) => {\n\t\t// Todo: we shouldn't have to pass \"root\" here.\n\t\tconst redoEdit = select( ( state ) => getRedoEdits( state.root ) );\n\t\tif ( ! redoEdit ) {\n\t\t\treturn;\n\t\t}\n\t\tdispatch( {\n\t\t\ttype: 'REDO',\n\t\t\tstackedEdits: redoEdit,\n\t\t} );\n\t};\n\n/**\n * Forces the creation of a new undo level.\n *\n * @return {Object} Action object.\n */\nexport function __unstableCreateUndoLevel() {\n\treturn { type: 'CREATE_UNDO_LEVEL' };\n}\n\n/**\n * Action triggered to save an entity record.\n *\n * @param {string} kind Kind of the received entity.\n * @param {string} name Name of the received entity.\n * @param {Object} record Record to be saved.\n * @param {Object} options Saving options.\n * @param {boolean} [options.isAutosave=false] Whether this is an autosave.\n * @param {Function} [options.__unstableFetch] Internal use only. Function to\n * call instead of `apiFetch()`.\n * Must return a promise.\n * @param {boolean} [options.throwOnError=false] If false, this action suppresses all\n * the exceptions. Defaults to false.\n */\nexport const saveEntityRecord =\n\t(\n\t\tkind,\n\t\tname,\n\t\trecord,\n\t\t{\n\t\t\tisAutosave = false,\n\t\t\t__unstableFetch = apiFetch,\n\t\t\tthrowOnError = false,\n\t\t} = {}\n\t) =>\n\tasync ( { select, resolveSelect, dispatch } ) => {\n\t\tconst configs = await dispatch( getOrLoadEntitiesConfig( kind ) );\n\t\tconst entityConfig = configs.find(\n\t\t\t( config ) => config.kind === kind && config.name === name\n\t\t);\n\t\tif ( ! entityConfig || entityConfig?.__experimentalNoFetch ) {\n\t\t\treturn;\n\t\t}\n\t\tconst entityIdKey = entityConfig.key || DEFAULT_ENTITY_KEY;\n\t\tconst recordId = record[ entityIdKey ];\n\n\t\tconst lock = await dispatch.__unstableAcquireStoreLock(\n\t\t\tSTORE_NAME,\n\t\t\t[ 'entities', 'records', kind, name, recordId || uuid() ],\n\t\t\t{ exclusive: true }\n\t\t);\n\n\t\ttry {\n\t\t\t// Evaluate optimized edits.\n\t\t\t// (Function edits that should be evaluated on save to avoid expensive computations on every edit.)\n\t\t\tfor ( const [ key, value ] of Object.entries( record ) ) {\n\t\t\t\tif ( typeof value === 'function' ) {\n\t\t\t\t\tconst evaluatedValue = value(\n\t\t\t\t\t\tselect.getEditedEntityRecord( kind, name, recordId )\n\t\t\t\t\t);\n\t\t\t\t\tdispatch.editEntityRecord(\n\t\t\t\t\t\tkind,\n\t\t\t\t\t\tname,\n\t\t\t\t\t\trecordId,\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t[ key ]: evaluatedValue,\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{ undoIgnore: true }\n\t\t\t\t\t);\n\t\t\t\t\trecord[ key ] = evaluatedValue;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tdispatch( {\n\t\t\t\ttype: 'SAVE_ENTITY_RECORD_START',\n\t\t\t\tkind,\n\t\t\t\tname,\n\t\t\t\trecordId,\n\t\t\t\tisAutosave,\n\t\t\t} );\n\t\t\tlet updatedRecord;\n\t\t\tlet error;\n\t\t\tlet hasError = false;\n\t\t\ttry {\n\t\t\t\tconst path = `${ entityConfig.baseURL }${\n\t\t\t\t\trecordId ? '/' + recordId : ''\n\t\t\t\t}`;\n\t\t\t\tconst persistedRecord = select.getRawEntityRecord(\n\t\t\t\t\tkind,\n\t\t\t\t\tname,\n\t\t\t\t\trecordId\n\t\t\t\t);\n\n\t\t\t\tif ( isAutosave ) {\n\t\t\t\t\t// Most of this autosave logic is very specific to posts.\n\t\t\t\t\t// This is fine for now as it is the only supported autosave,\n\t\t\t\t\t// but ideally this should all be handled in the back end,\n\t\t\t\t\t// so the client just sends and receives objects.\n\t\t\t\t\tconst currentUser = select.getCurrentUser();\n\t\t\t\t\tconst currentUserId = currentUser\n\t\t\t\t\t\t? currentUser.id\n\t\t\t\t\t\t: undefined;\n\t\t\t\t\tconst autosavePost = await resolveSelect.getAutosave(\n\t\t\t\t\t\tpersistedRecord.type,\n\t\t\t\t\t\tpersistedRecord.id,\n\t\t\t\t\t\tcurrentUserId\n\t\t\t\t\t);\n\t\t\t\t\t// Autosaves need all expected fields to be present.\n\t\t\t\t\t// So we fallback to the previous autosave and then\n\t\t\t\t\t// to the actual persisted entity if the edits don't\n\t\t\t\t\t// have a value.\n\t\t\t\t\tlet data = {\n\t\t\t\t\t\t...persistedRecord,\n\t\t\t\t\t\t...autosavePost,\n\t\t\t\t\t\t...record,\n\t\t\t\t\t};\n\t\t\t\t\tdata = Object.keys( data ).reduce(\n\t\t\t\t\t\t( acc, key ) => {\n\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t[ 'title', 'excerpt', 'content' ].includes(\n\t\t\t\t\t\t\t\t\tkey\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\tacc[ key ] = data[ key ];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn acc;\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tstatus:\n\t\t\t\t\t\t\t\tdata.status === 'auto-draft'\n\t\t\t\t\t\t\t\t\t? 'draft'\n\t\t\t\t\t\t\t\t\t: data.status,\n\t\t\t\t\t\t}\n\t\t\t\t\t);\n\t\t\t\t\tupdatedRecord = await __unstableFetch( {\n\t\t\t\t\t\tpath: `${ path }/autosaves`,\n\t\t\t\t\t\tmethod: 'POST',\n\t\t\t\t\t\tdata,\n\t\t\t\t\t} );\n\n\t\t\t\t\t// An autosave may be processed by the server as a regular save\n\t\t\t\t\t// when its update is requested by the author and the post had\n\t\t\t\t\t// draft or auto-draft status.\n\t\t\t\t\tif ( persistedRecord.id === updatedRecord.id ) {\n\t\t\t\t\t\tlet newRecord = {\n\t\t\t\t\t\t\t...persistedRecord,\n\t\t\t\t\t\t\t...data,\n\t\t\t\t\t\t\t...updatedRecord,\n\t\t\t\t\t\t};\n\t\t\t\t\t\tnewRecord = Object.keys( newRecord ).reduce(\n\t\t\t\t\t\t\t( acc, key ) => {\n\t\t\t\t\t\t\t\t// These properties are persisted in autosaves.\n\t\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t\t[ 'title', 'excerpt', 'content' ].includes(\n\t\t\t\t\t\t\t\t\t\tkey\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\t\tacc[ key ] = newRecord[ key ];\n\t\t\t\t\t\t\t\t} else if ( key === 'status' ) {\n\t\t\t\t\t\t\t\t\t// Status is only persisted in autosaves when going from\n\t\t\t\t\t\t\t\t\t// \"auto-draft\" to \"draft\".\n\t\t\t\t\t\t\t\t\tacc[ key ] =\n\t\t\t\t\t\t\t\t\t\tpersistedRecord.status ===\n\t\t\t\t\t\t\t\t\t\t\t'auto-draft' &&\n\t\t\t\t\t\t\t\t\t\tnewRecord.status === 'draft'\n\t\t\t\t\t\t\t\t\t\t\t? newRecord.status\n\t\t\t\t\t\t\t\t\t\t\t: persistedRecord.status;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t// These properties are not persisted in autosaves.\n\t\t\t\t\t\t\t\t\tacc[ key ] = persistedRecord[ key ];\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\treturn acc;\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{}\n\t\t\t\t\t\t);\n\t\t\t\t\t\tdispatch.receiveEntityRecords(\n\t\t\t\t\t\t\tkind,\n\t\t\t\t\t\t\tname,\n\t\t\t\t\t\t\tnewRecord,\n\t\t\t\t\t\t\tundefined,\n\t\t\t\t\t\t\ttrue\n\t\t\t\t\t\t);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tdispatch.receiveAutosaves(\n\t\t\t\t\t\t\tpersistedRecord.id,\n\t\t\t\t\t\t\tupdatedRecord\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tlet edits = record;\n\t\t\t\t\tif ( entityConfig.__unstablePrePersist ) {\n\t\t\t\t\t\tedits = {\n\t\t\t\t\t\t\t...edits,\n\t\t\t\t\t\t\t...entityConfig.__unstablePrePersist(\n\t\t\t\t\t\t\t\tpersistedRecord,\n\t\t\t\t\t\t\t\tedits\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t};\n\t\t\t\t\t}\n\t\t\t\t\tupdatedRecord = await __unstableFetch( {\n\t\t\t\t\t\tpath,\n\t\t\t\t\t\tmethod: recordId ? 'PUT' : 'POST',\n\t\t\t\t\t\tdata: edits,\n\t\t\t\t\t} );\n\t\t\t\t\tdispatch.receiveEntityRecords(\n\t\t\t\t\t\tkind,\n\t\t\t\t\t\tname,\n\t\t\t\t\t\tupdatedRecord,\n\t\t\t\t\t\tundefined,\n\t\t\t\t\t\ttrue,\n\t\t\t\t\t\tedits\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t} catch ( _error ) {\n\t\t\t\thasError = true;\n\t\t\t\terror = _error;\n\t\t\t}\n\t\t\tdispatch( {\n\t\t\t\ttype: 'SAVE_ENTITY_RECORD_FINISH',\n\t\t\t\tkind,\n\t\t\t\tname,\n\t\t\t\trecordId,\n\t\t\t\terror,\n\t\t\t\tisAutosave,\n\t\t\t} );\n\n\t\t\tif ( hasError && throwOnError ) {\n\t\t\t\tthrow error;\n\t\t\t}\n\n\t\t\treturn updatedRecord;\n\t\t} finally {\n\t\t\tdispatch.__unstableReleaseStoreLock( lock );\n\t\t}\n\t};\n\n/**\n * Runs multiple core-data actions at the same time using one API request.\n *\n * Example:\n *\n * ```\n * const [ savedRecord, updatedRecord, deletedRecord ] =\n * await dispatch( 'core' ).__experimentalBatch( [\n * ( { saveEntityRecord } ) => saveEntityRecord( 'root', 'widget', widget ),\n * ( { saveEditedEntityRecord } ) => saveEntityRecord( 'root', 'widget', 123 ),\n * ( { deleteEntityRecord } ) => deleteEntityRecord( 'root', 'widget', 123, null ),\n * ] );\n * ```\n *\n * @param {Array} requests Array of functions which are invoked simultaneously.\n * Each function is passed an object containing\n * `saveEntityRecord`, `saveEditedEntityRecord`, and\n * `deleteEntityRecord`.\n *\n * @return {(thunkArgs: Object) => Promise} A promise that resolves to an array containing the return\n * values of each function given in `requests`.\n */\nexport const __experimentalBatch =\n\t( requests ) =>\n\tasync ( { dispatch } ) => {\n\t\tconst batch = createBatch();\n\t\tconst api = {\n\t\t\tsaveEntityRecord( kind, name, record, options ) {\n\t\t\t\treturn batch.add( ( add ) =>\n\t\t\t\t\tdispatch.saveEntityRecord( kind, name, record, {\n\t\t\t\t\t\t...options,\n\t\t\t\t\t\t__unstableFetch: add,\n\t\t\t\t\t} )\n\t\t\t\t);\n\t\t\t},\n\t\t\tsaveEditedEntityRecord( kind, name, recordId, options ) {\n\t\t\t\treturn batch.add( ( add ) =>\n\t\t\t\t\tdispatch.saveEditedEntityRecord( kind, name, recordId, {\n\t\t\t\t\t\t...options,\n\t\t\t\t\t\t__unstableFetch: add,\n\t\t\t\t\t} )\n\t\t\t\t);\n\t\t\t},\n\t\t\tdeleteEntityRecord( kind, name, recordId, query, options ) {\n\t\t\t\treturn batch.add( ( add ) =>\n\t\t\t\t\tdispatch.deleteEntityRecord( kind, name, recordId, query, {\n\t\t\t\t\t\t...options,\n\t\t\t\t\t\t__unstableFetch: add,\n\t\t\t\t\t} )\n\t\t\t\t);\n\t\t\t},\n\t\t};\n\t\tconst resultPromises = requests.map( ( request ) => request( api ) );\n\t\tconst [ , ...results ] = await Promise.all( [\n\t\t\tbatch.run(),\n\t\t\t...resultPromises,\n\t\t] );\n\t\treturn results;\n\t};\n\n/**\n * Action triggered to save an entity record's edits.\n *\n * @param {string} kind Kind of the entity.\n * @param {string} name Name of the entity.\n * @param {Object} recordId ID of the record.\n * @param {Object} options Saving options.\n */\nexport const saveEditedEntityRecord =\n\t( kind, name, recordId, options ) =>\n\tasync ( { select, dispatch } ) => {\n\t\tif ( ! select.hasEditsForEntityRecord( kind, name, recordId ) ) {\n\t\t\treturn;\n\t\t}\n\t\tconst configs = await dispatch( getOrLoadEntitiesConfig( kind ) );\n\t\tconst entityConfig = configs.find(\n\t\t\t( config ) => config.kind === kind && config.name === name\n\t\t);\n\t\tif ( ! entityConfig ) {\n\t\t\treturn;\n\t\t}\n\t\tconst entityIdKey = entityConfig.key || DEFAULT_ENTITY_KEY;\n\n\t\tconst edits = select.getEntityRecordNonTransientEdits(\n\t\t\tkind,\n\t\t\tname,\n\t\t\trecordId\n\t\t);\n\t\tconst record = { [ entityIdKey ]: recordId, ...edits };\n\t\treturn await dispatch.saveEntityRecord( kind, name, record, options );\n\t};\n\n/**\n * Action triggered to save only specified properties for the entity.\n *\n * @param {string} kind Kind of the entity.\n * @param {string} name Name of the entity.\n * @param {Object} recordId ID of the record.\n * @param {Array} itemsToSave List of entity properties to save.\n * @param {Object} options Saving options.\n */\nexport const __experimentalSaveSpecifiedEntityEdits =\n\t( kind, name, recordId, itemsToSave, options ) =>\n\tasync ( { select, dispatch } ) => {\n\t\tif ( ! select.hasEditsForEntityRecord( kind, name, recordId ) ) {\n\t\t\treturn;\n\t\t}\n\t\tconst edits = select.getEntityRecordNonTransientEdits(\n\t\t\tkind,\n\t\t\tname,\n\t\t\trecordId\n\t\t);\n\t\tconst editsToSave = {};\n\t\tfor ( const edit in edits ) {\n\t\t\tif ( itemsToSave.some( ( item ) => item === edit ) ) {\n\t\t\t\teditsToSave[ edit ] = edits[ edit ];\n\t\t\t}\n\t\t}\n\t\treturn await dispatch.saveEntityRecord(\n\t\t\tkind,\n\t\t\tname,\n\t\t\teditsToSave,\n\t\t\toptions\n\t\t);\n\t};\n\n/**\n * Returns an action object used in signalling that Upload permissions have been received.\n *\n * @deprecated since WP 5.9, use receiveUserPermission instead.\n *\n * @param {boolean} hasUploadPermissions Does the user have permission to upload files?\n *\n * @return {Object} Action object.\n */\nexport function receiveUploadPermissions( hasUploadPermissions ) {\n\tdeprecated( \"wp.data.dispatch( 'core' ).receiveUploadPermissions\", {\n\t\tsince: '5.9',\n\t\talternative: 'receiveUserPermission',\n\t} );\n\n\treturn receiveUserPermission( 'create/media', hasUploadPermissions );\n}\n\n/**\n * Returns an action object used in signalling that the current user has\n * permission to perform an action on a REST resource.\n * Ignored from documentation as it's internal to the data store.\n *\n * @ignore\n *\n * @param {string} key A key that represents the action and REST resource.\n * @param {boolean} isAllowed Whether or not the user can perform the action.\n *\n * @return {Object} Action object.\n */\nexport function receiveUserPermission( key, isAllowed ) {\n\treturn {\n\t\ttype: 'RECEIVE_USER_PERMISSION',\n\t\tkey,\n\t\tisAllowed,\n\t};\n}\n\n/**\n * Returns an action object used in signalling that the autosaves for a\n * post have been received.\n * Ignored from documentation as it's internal to the data store.\n *\n * @ignore\n *\n * @param {number} postId The id of the post that is parent to the autosave.\n * @param {Array|Object} autosaves An array of autosaves or singular autosave object.\n *\n * @return {Object} Action object.\n */\nexport function receiveAutosaves( postId, autosaves ) {\n\treturn {\n\t\ttype: 'RECEIVE_AUTOSAVES',\n\t\tpostId,\n\t\tautosaves: Array.isArray( autosaves ) ? autosaves : [ autosaves ],\n\t};\n}\n\n/**\n * Returns an action object signalling that the fallback Navigation\n * Menu id has been received.\n *\n * @param {integer} fallbackId the id of the fallback Navigation Menu\n * @return {Object} Action object.\n */\nexport function receiveNavigationFallbackId( fallbackId ) {\n\treturn {\n\t\ttype: 'RECEIVE_NAVIGATION_FALLBACK_ID',\n\t\tfallbackId,\n\t};\n}\n"]}
1
+ {"version":3,"sources":["@wordpress/core-data/src/actions.js"],"names":["receiveUserQuery","queryID","users","type","Array","isArray","receiveCurrentUser","currentUser","addEntities","entities","receiveEntityRecords","kind","name","records","query","invalidateCache","edits","map","record","status","title","action","receiveCurrentTheme","currentTheme","__experimentalReceiveCurrentGlobalStylesId","currentGlobalStylesId","id","__experimentalReceiveThemeBaseGlobalStyles","stylesheet","globalStyles","__experimentalReceiveThemeGlobalStyleVariations","variations","receiveThemeSupports","since","receiveThemeGlobalStyleRevisions","currentId","revisions","receiveEmbedPreview","url","preview","deleteEntityRecord","recordId","__unstableFetch","apiFetch","throwOnError","dispatch","configs","entityConfig","find","config","error","deletedRecord","__experimentalNoFetch","lock","__unstableAcquireStoreLock","STORE_NAME","exclusive","hasError","path","baseURL","method","_error","__unstableReleaseStoreLock","editEntityRecord","options","select","getEntityConfig","Error","mergedEdits","getRawEntityRecord","editedRecord","getEditedEntityRecord","edit","Object","keys","reduce","acc","key","recordValue","editedRecordValue","value","undefined","meta","undo","undoIgnore","isCached","undoEdit","state","root","stackedEdits","redo","redoEdit","__unstableCreateUndoLevel","saveEntityRecord","isAutosave","resolveSelect","entityIdKey","DEFAULT_ENTITY_KEY","entries","evaluatedValue","updatedRecord","persistedRecord","getCurrentUser","currentUserId","autosavePost","getAutosave","data","includes","newRecord","receiveAutosaves","__unstablePrePersist","__experimentalBatch","requests","batch","api","add","saveEditedEntityRecord","resultPromises","request","results","Promise","all","run","hasEditsForEntityRecord","getEntityRecordNonTransientEdits","__experimentalSaveSpecifiedEntityEdits","itemsToSave","editsToSave","some","item","receiveUploadPermissions","hasUploadPermissions","alternative","receiveUserPermission","isAllowed","postId","autosaves","receiveNavigationFallbackId","fallbackId"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA;;AACA;;AAKA;;AACA;;AACA;;AAKA;;AACA;;AACA;;AACA;;AACA;;AApBA;AACA;AACA;;AAIA;AACA;AACA;;AAKA;AACA;AACA;;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASA,gBAAT,CAA2BC,OAA3B,EAAoCC,KAApC,EAA4C;AAClD,SAAO;AACNC,IAAAA,IAAI,EAAE,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AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACO,SAASO,mBAAT,CAA8BC,YAA9B,EAA6C;AACnD,SAAO;AACNpB,IAAAA,IAAI,EAAE,uBADA;AAENoB,IAAAA;AAFM,GAAP;AAIA;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACO,SAASC,0CAAT,CACNC,qBADM,EAEL;AACD,SAAO;AACNtB,IAAAA,IAAI,EAAE,kCADA;AAENuB,IAAAA,EAAE,EAAED;AAFE,GAAP;AAIA;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACO,SAASE,0CAAT,CACNC,UADM,EAENC,YAFM,EAGL;AACD,SAAO;AACN1B,IAAAA,IAAI,EAAE,6BADA;AAENyB,IAAAA,UAFM;AAGNC,IAAAA;AAHM,GAAP;AAKA;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACO,SAASC,+CAAT,CACNF,UADM,EAENG,UAFM,EAGL;AACD,SAAO;AACN5B,IAAAA,IAAI,EAAE,uCADA;AAENyB,IAAAA,UAFM;AAGNG,IAAAA;AAHM,GAAP;AAKA;AAED;AACA;AACA;AACA;AACA;AACA;AACA;;;AACO,SAASC,oBAAT,GAAgC;AACtC,2BAAY,iDAAZ,EAA+D;AAC9DC,IAAAA,KAAK,EAAE;AADuD,GAA/D;AAIA,SAAO;AACN9B,IAAAA,IAAI,EAAE;AADA,GAAP;AAGA;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACO,SAAS+B,gCAAT,CAA2CC,SAA3C,EAAsDC,SAAtD,EAAkE;AACxE,SAAO;AACNjC,IAAAA,IAAI,EAAE,sCADA;AAENgC,IAAAA,SAFM;AAGNC,IAAAA;AAHM,GAAP;AAKA;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACO,SAASC,mBAAT,CAA8BC,GAA9B,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M,GAAP;AAKA;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACO,SAASzB,gBAAT,CAA2B0B,MAA3B,EAAmCC,SAAnC,EAA+C;AACrD,SAAO;AACNrI,IAAAA,IAAI,EAAE,mBADA;AAENoI,IAAAA,MAFM;AAGNC,IAAAA,SAAS,EAAEpI,KAAK,CAACC,OAAN,CAAemI,SAAf,IAA6BA,SAA7B,GAAyC,CAAEA,SAAF;AAH9C,GAAP;AAKA;AAED;AACA;AACA;AACA;AACA;AACA;AACA;;;AACO,SAASC,2BAAT,CAAsCC,UAAtC,EAAmD;AACzD,SAAO;AACNvI,IAAAA,IAAI,EAAE,gCADA;AAENuI,IAAAA;AAFM,GAAP;AAIA","sourcesContent":["/**\n * External dependencies\n */\nimport fastDeepEqual from 'fast-deep-equal/es6';\nimport { v4 as uuid } from 'uuid';\n\n/**\n * WordPress dependencies\n */\nimport apiFetch from '@wordpress/api-fetch';\nimport { addQueryArgs } from '@wordpress/url';\nimport deprecated from '@wordpress/deprecated';\n\n/**\n * Internal dependencies\n */\nimport { receiveItems, removeItems, receiveQueriedItems } from './queried-data';\nimport { getOrLoadEntitiesConfig, DEFAULT_ENTITY_KEY } from './entities';\nimport { createBatch } from './batch';\nimport { STORE_NAME } from './name';\nimport { getUndoEdits, getRedoEdits } from './private-selectors';\n\n/**\n * Returns an action object used in signalling that authors have been received.\n * Ignored from documentation as it's internal to the data store.\n *\n * @ignore\n *\n * @param {string} queryID Query ID.\n * @param {Array|Object} users Users received.\n *\n * @return {Object} Action object.\n */\nexport function receiveUserQuery( queryID, users ) {\n\treturn {\n\t\ttype: 'RECEIVE_USER_QUERY',\n\t\tusers: Array.isArray( users ) ? users : [ users ],\n\t\tqueryID,\n\t};\n}\n\n/**\n * Returns an action used in signalling that the current user has been received.\n * Ignored from documentation as it's internal to the data store.\n *\n * @ignore\n *\n * @param {Object} currentUser Current user object.\n *\n * @return {Object} Action object.\n */\nexport function receiveCurrentUser( currentUser ) {\n\treturn {\n\t\ttype: 'RECEIVE_CURRENT_USER',\n\t\tcurrentUser,\n\t};\n}\n\n/**\n * Returns an action object used in adding new entities.\n *\n * @param {Array} entities Entities received.\n *\n * @return {Object} Action object.\n */\nexport function addEntities( entities ) {\n\treturn {\n\t\ttype: 'ADD_ENTITIES',\n\t\tentities,\n\t};\n}\n\n/**\n * Returns an action object used in signalling that entity records have been received.\n *\n * @param {string} kind Kind of the received entity record.\n * @param {string} name Name of the received entity record.\n * @param {Array|Object} records Records received.\n * @param {?Object} query Query Object.\n * @param {?boolean} invalidateCache Should invalidate query caches.\n * @param {?Object} edits Edits to reset.\n * @return {Object} Action object.\n */\nexport function receiveEntityRecords(\n\tkind,\n\tname,\n\trecords,\n\tquery,\n\tinvalidateCache = false,\n\tedits\n) {\n\t// Auto drafts should not have titles, but some plugins rely on them so we can't filter this\n\t// on the server.\n\tif ( kind === 'postType' ) {\n\t\trecords = ( Array.isArray( records ) ? records : [ records ] ).map(\n\t\t\t( record ) =>\n\t\t\t\trecord.status === 'auto-draft'\n\t\t\t\t\t? { ...record, title: '' }\n\t\t\t\t\t: record\n\t\t);\n\t}\n\tlet action;\n\tif ( query ) {\n\t\taction = receiveQueriedItems( records, query, edits );\n\t} else {\n\t\taction = receiveItems( records, edits );\n\t}\n\n\treturn {\n\t\t...action,\n\t\tkind,\n\t\tname,\n\t\tinvalidateCache,\n\t};\n}\n\n/**\n * Returns an action object used in signalling that the current theme has been received.\n * Ignored from documentation as it's internal to the data store.\n *\n * @ignore\n *\n * @param {Object} currentTheme The current theme.\n *\n * @return {Object} Action object.\n */\nexport function receiveCurrentTheme( currentTheme ) {\n\treturn {\n\t\ttype: 'RECEIVE_CURRENT_THEME',\n\t\tcurrentTheme,\n\t};\n}\n\n/**\n * Returns an action object used in signalling that the current global styles id has been received.\n * Ignored from documentation as it's internal to the data store.\n *\n * @ignore\n *\n * @param {string} currentGlobalStylesId The current global styles id.\n *\n * @return {Object} Action object.\n */\nexport function __experimentalReceiveCurrentGlobalStylesId(\n\tcurrentGlobalStylesId\n) {\n\treturn {\n\t\ttype: 'RECEIVE_CURRENT_GLOBAL_STYLES_ID',\n\t\tid: currentGlobalStylesId,\n\t};\n}\n\n/**\n * Returns an action object used in signalling that the theme base global styles have been received\n * Ignored from documentation as it's internal to the data store.\n *\n * @ignore\n *\n * @param {string} stylesheet The theme's identifier\n * @param {Object} globalStyles The global styles object.\n *\n * @return {Object} Action object.\n */\nexport function __experimentalReceiveThemeBaseGlobalStyles(\n\tstylesheet,\n\tglobalStyles\n) {\n\treturn {\n\t\ttype: 'RECEIVE_THEME_GLOBAL_STYLES',\n\t\tstylesheet,\n\t\tglobalStyles,\n\t};\n}\n\n/**\n * Returns an action object used in signalling that the theme global styles variations have been received.\n * Ignored from documentation as it's internal to the data store.\n *\n * @ignore\n *\n * @param {string} stylesheet The theme's identifier\n * @param {Array} variations The global styles variations.\n *\n * @return {Object} Action object.\n */\nexport function __experimentalReceiveThemeGlobalStyleVariations(\n\tstylesheet,\n\tvariations\n) {\n\treturn {\n\t\ttype: 'RECEIVE_THEME_GLOBAL_STYLE_VARIATIONS',\n\t\tstylesheet,\n\t\tvariations,\n\t};\n}\n\n/**\n * Returns an action object used in signalling that the index has been received.\n *\n * @deprecated since WP 5.9, this is not useful anymore, use the selector direclty.\n *\n * @return {Object} Action object.\n */\nexport function receiveThemeSupports() {\n\tdeprecated( \"wp.data.dispatch( 'core' ).receiveThemeSupports\", {\n\t\tsince: '5.9',\n\t} );\n\n\treturn {\n\t\ttype: 'DO_NOTHING',\n\t};\n}\n\n/**\n * Returns an action object used in signalling that the theme global styles CPT post revisions have been received.\n * Ignored from documentation as it's internal to the data store.\n *\n * @ignore\n *\n * @param {number} currentId The post id.\n * @param {Array} revisions The global styles revisions.\n *\n * @return {Object} Action object.\n */\nexport function receiveThemeGlobalStyleRevisions( currentId, revisions ) {\n\treturn {\n\t\ttype: 'RECEIVE_THEME_GLOBAL_STYLE_REVISIONS',\n\t\tcurrentId,\n\t\trevisions,\n\t};\n}\n\n/**\n * Returns an action object used in signalling that the preview data for\n * a given URl has been received.\n * Ignored from documentation as it's internal to the data store.\n *\n * @ignore\n *\n * @param {string} url URL to preview the embed for.\n * @param {*} preview Preview data.\n *\n * @return {Object} Action object.\n */\nexport function receiveEmbedPreview( url, preview ) {\n\treturn {\n\t\ttype: 'RECEIVE_EMBED_PREVIEW',\n\t\turl,\n\t\tpreview,\n\t};\n}\n\n/**\n * Action triggered to delete an entity record.\n *\n * @param {string} kind Kind of the deleted entity.\n * @param {string} name Name of the deleted entity.\n * @param {string} recordId Record ID of the deleted entity.\n * @param {?Object} query Special query parameters for the\n * DELETE API call.\n * @param {Object} [options] Delete options.\n * @param {Function} [options.__unstableFetch] Internal use only. Function to\n * call instead of `apiFetch()`.\n * Must return a promise.\n * @param {boolean} [options.throwOnError=false] If false, this action suppresses all\n * the exceptions. Defaults to false.\n */\nexport const deleteEntityRecord =\n\t(\n\t\tkind,\n\t\tname,\n\t\trecordId,\n\t\tquery,\n\t\t{ __unstableFetch = apiFetch, throwOnError = false } = {}\n\t) =>\n\tasync ( { dispatch } ) => {\n\t\tconst configs = await dispatch( getOrLoadEntitiesConfig( kind ) );\n\t\tconst entityConfig = configs.find(\n\t\t\t( config ) => config.kind === kind && config.name === name\n\t\t);\n\t\tlet error;\n\t\tlet deletedRecord = false;\n\t\tif ( ! entityConfig || entityConfig?.__experimentalNoFetch ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst lock = await dispatch.__unstableAcquireStoreLock(\n\t\t\tSTORE_NAME,\n\t\t\t[ 'entities', 'records', kind, name, recordId ],\n\t\t\t{ exclusive: true }\n\t\t);\n\n\t\ttry {\n\t\t\tdispatch( {\n\t\t\t\ttype: 'DELETE_ENTITY_RECORD_START',\n\t\t\t\tkind,\n\t\t\t\tname,\n\t\t\t\trecordId,\n\t\t\t} );\n\n\t\t\tlet hasError = false;\n\t\t\ttry {\n\t\t\t\tlet path = `${ entityConfig.baseURL }/${ recordId }`;\n\n\t\t\t\tif ( query ) {\n\t\t\t\t\tpath = addQueryArgs( path, query );\n\t\t\t\t}\n\n\t\t\t\tdeletedRecord = await __unstableFetch( {\n\t\t\t\t\tpath,\n\t\t\t\t\tmethod: 'DELETE',\n\t\t\t\t} );\n\n\t\t\t\tawait dispatch( removeItems( kind, name, recordId, true ) );\n\t\t\t} catch ( _error ) {\n\t\t\t\thasError = true;\n\t\t\t\terror = _error;\n\t\t\t}\n\n\t\t\tdispatch( {\n\t\t\t\ttype: 'DELETE_ENTITY_RECORD_FINISH',\n\t\t\t\tkind,\n\t\t\t\tname,\n\t\t\t\trecordId,\n\t\t\t\terror,\n\t\t\t} );\n\n\t\t\tif ( hasError && throwOnError ) {\n\t\t\t\tthrow error;\n\t\t\t}\n\n\t\t\treturn deletedRecord;\n\t\t} finally {\n\t\t\tdispatch.__unstableReleaseStoreLock( lock );\n\t\t}\n\t};\n\n/**\n * Returns an action object that triggers an\n * edit to an entity record.\n *\n * @param {string} kind Kind of the edited entity record.\n * @param {string} name Name of the edited entity record.\n * @param {number|string} recordId Record ID of the edited entity record.\n * @param {Object} edits The edits.\n * @param {Object} options Options for the edit.\n * @param {boolean} [options.undoIgnore] Whether to ignore the edit in undo history or not.\n *\n * @return {Object} Action object.\n */\nexport const editEntityRecord =\n\t( kind, name, recordId, edits, options = {} ) =>\n\t( { select, dispatch } ) => {\n\t\tconst entityConfig = select.getEntityConfig( kind, name );\n\t\tif ( ! entityConfig ) {\n\t\t\tthrow new Error(\n\t\t\t\t`The entity being edited (${ kind }, ${ name }) does not have a loaded config.`\n\t\t\t);\n\t\t}\n\t\tconst { mergedEdits = {} } = entityConfig;\n\t\tconst record = select.getRawEntityRecord( kind, name, recordId );\n\t\tconst editedRecord = select.getEditedEntityRecord(\n\t\t\tkind,\n\t\t\tname,\n\t\t\trecordId\n\t\t);\n\n\t\tconst edit = {\n\t\t\tkind,\n\t\t\tname,\n\t\t\trecordId,\n\t\t\t// Clear edits when they are equal to their persisted counterparts\n\t\t\t// so that the property is not considered dirty.\n\t\t\tedits: Object.keys( edits ).reduce( ( acc, key ) => {\n\t\t\t\tconst recordValue = record[ key ];\n\t\t\t\tconst editedRecordValue = editedRecord[ key ];\n\t\t\t\tconst value = mergedEdits[ key ]\n\t\t\t\t\t? { ...editedRecordValue, ...edits[ key ] }\n\t\t\t\t\t: edits[ key ];\n\t\t\t\tacc[ key ] = fastDeepEqual( recordValue, value )\n\t\t\t\t\t? undefined\n\t\t\t\t\t: value;\n\t\t\t\treturn acc;\n\t\t\t}, {} ),\n\t\t};\n\t\tdispatch( {\n\t\t\ttype: 'EDIT_ENTITY_RECORD',\n\t\t\t...edit,\n\t\t\tmeta: {\n\t\t\t\tundo: ! options.undoIgnore && {\n\t\t\t\t\t...edit,\n\t\t\t\t\t// Send the current values for things like the first undo stack entry.\n\t\t\t\t\tedits: Object.keys( edits ).reduce( ( acc, key ) => {\n\t\t\t\t\t\tacc[ key ] = editedRecord[ key ];\n\t\t\t\t\t\treturn acc;\n\t\t\t\t\t}, {} ),\n\t\t\t\t\tisCached: options.isCached,\n\t\t\t\t},\n\t\t\t},\n\t\t} );\n\t};\n\n/**\n * Action triggered to undo the last edit to\n * an entity record, if any.\n */\nexport const undo =\n\t() =>\n\t( { select, dispatch } ) => {\n\t\t// Todo: we shouldn't have to pass \"root\" here.\n\t\tconst undoEdit = select( ( state ) => getUndoEdits( state.root ) );\n\t\tif ( ! undoEdit ) {\n\t\t\treturn;\n\t\t}\n\t\tdispatch( {\n\t\t\ttype: 'UNDO',\n\t\t\tstackedEdits: undoEdit,\n\t\t} );\n\t};\n\n/**\n * Action triggered to redo the last undoed\n * edit to an entity record, if any.\n */\nexport const redo =\n\t() =>\n\t( { select, dispatch } ) => {\n\t\t// Todo: we shouldn't have to pass \"root\" here.\n\t\tconst redoEdit = select( ( state ) => getRedoEdits( state.root ) );\n\t\tif ( ! redoEdit ) {\n\t\t\treturn;\n\t\t}\n\t\tdispatch( {\n\t\t\ttype: 'REDO',\n\t\t\tstackedEdits: redoEdit,\n\t\t} );\n\t};\n\n/**\n * Forces the creation of a new undo level.\n *\n * @return {Object} Action object.\n */\nexport function __unstableCreateUndoLevel() {\n\treturn { type: 'CREATE_UNDO_LEVEL' };\n}\n\n/**\n * Action triggered to save an entity record.\n *\n * @param {string} kind Kind of the received entity.\n * @param {string} name Name of the received entity.\n * @param {Object} record Record to be saved.\n * @param {Object} options Saving options.\n * @param {boolean} [options.isAutosave=false] Whether this is an autosave.\n * @param {Function} [options.__unstableFetch] Internal use only. Function to\n * call instead of `apiFetch()`.\n * Must return a promise.\n * @param {boolean} [options.throwOnError=false] If false, this action suppresses all\n * the exceptions. Defaults to false.\n */\nexport const saveEntityRecord =\n\t(\n\t\tkind,\n\t\tname,\n\t\trecord,\n\t\t{\n\t\t\tisAutosave = false,\n\t\t\t__unstableFetch = apiFetch,\n\t\t\tthrowOnError = false,\n\t\t} = {}\n\t) =>\n\tasync ( { select, resolveSelect, dispatch } ) => {\n\t\tconst configs = await dispatch( getOrLoadEntitiesConfig( kind ) );\n\t\tconst entityConfig = configs.find(\n\t\t\t( config ) => config.kind === kind && config.name === name\n\t\t);\n\t\tif ( ! entityConfig || entityConfig?.__experimentalNoFetch ) {\n\t\t\treturn;\n\t\t}\n\t\tconst entityIdKey = entityConfig.key || DEFAULT_ENTITY_KEY;\n\t\tconst recordId = record[ entityIdKey ];\n\n\t\tconst lock = await dispatch.__unstableAcquireStoreLock(\n\t\t\tSTORE_NAME,\n\t\t\t[ 'entities', 'records', kind, name, recordId || uuid() ],\n\t\t\t{ exclusive: true }\n\t\t);\n\n\t\ttry {\n\t\t\t// Evaluate optimized edits.\n\t\t\t// (Function edits that should be evaluated on save to avoid expensive computations on every edit.)\n\t\t\tfor ( const [ key, value ] of Object.entries( record ) ) {\n\t\t\t\tif ( typeof value === 'function' ) {\n\t\t\t\t\tconst evaluatedValue = value(\n\t\t\t\t\t\tselect.getEditedEntityRecord( kind, name, recordId )\n\t\t\t\t\t);\n\t\t\t\t\tdispatch.editEntityRecord(\n\t\t\t\t\t\tkind,\n\t\t\t\t\t\tname,\n\t\t\t\t\t\trecordId,\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t[ key ]: evaluatedValue,\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{ undoIgnore: true }\n\t\t\t\t\t);\n\t\t\t\t\trecord[ key ] = evaluatedValue;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tdispatch( {\n\t\t\t\ttype: 'SAVE_ENTITY_RECORD_START',\n\t\t\t\tkind,\n\t\t\t\tname,\n\t\t\t\trecordId,\n\t\t\t\tisAutosave,\n\t\t\t} );\n\t\t\tlet updatedRecord;\n\t\t\tlet error;\n\t\t\tlet hasError = false;\n\t\t\ttry {\n\t\t\t\tconst path = `${ entityConfig.baseURL }${\n\t\t\t\t\trecordId ? '/' + recordId : ''\n\t\t\t\t}`;\n\t\t\t\tconst persistedRecord = select.getRawEntityRecord(\n\t\t\t\t\tkind,\n\t\t\t\t\tname,\n\t\t\t\t\trecordId\n\t\t\t\t);\n\n\t\t\t\tif ( isAutosave ) {\n\t\t\t\t\t// Most of this autosave logic is very specific to posts.\n\t\t\t\t\t// This is fine for now as it is the only supported autosave,\n\t\t\t\t\t// but ideally this should all be handled in the back end,\n\t\t\t\t\t// so the client just sends and receives objects.\n\t\t\t\t\tconst currentUser = select.getCurrentUser();\n\t\t\t\t\tconst currentUserId = currentUser\n\t\t\t\t\t\t? currentUser.id\n\t\t\t\t\t\t: undefined;\n\t\t\t\t\tconst autosavePost = await resolveSelect.getAutosave(\n\t\t\t\t\t\tpersistedRecord.type,\n\t\t\t\t\t\tpersistedRecord.id,\n\t\t\t\t\t\tcurrentUserId\n\t\t\t\t\t);\n\t\t\t\t\t// Autosaves need all expected fields to be present.\n\t\t\t\t\t// So we fallback to the previous autosave and then\n\t\t\t\t\t// to the actual persisted entity if the edits don't\n\t\t\t\t\t// have a value.\n\t\t\t\t\tlet data = {\n\t\t\t\t\t\t...persistedRecord,\n\t\t\t\t\t\t...autosavePost,\n\t\t\t\t\t\t...record,\n\t\t\t\t\t};\n\t\t\t\t\tdata = Object.keys( data ).reduce(\n\t\t\t\t\t\t( acc, key ) => {\n\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t[\n\t\t\t\t\t\t\t\t\t'title',\n\t\t\t\t\t\t\t\t\t'excerpt',\n\t\t\t\t\t\t\t\t\t'content',\n\t\t\t\t\t\t\t\t\t'meta',\n\t\t\t\t\t\t\t\t].includes( key )\n\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\tacc[ key ] = data[ key ];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn acc;\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tstatus:\n\t\t\t\t\t\t\t\tdata.status === 'auto-draft'\n\t\t\t\t\t\t\t\t\t? 'draft'\n\t\t\t\t\t\t\t\t\t: data.status,\n\t\t\t\t\t\t}\n\t\t\t\t\t);\n\t\t\t\t\tupdatedRecord = await __unstableFetch( {\n\t\t\t\t\t\tpath: `${ path }/autosaves`,\n\t\t\t\t\t\tmethod: 'POST',\n\t\t\t\t\t\tdata,\n\t\t\t\t\t} );\n\n\t\t\t\t\t// An autosave may be processed by the server as a regular save\n\t\t\t\t\t// when its update is requested by the author and the post had\n\t\t\t\t\t// draft or auto-draft status.\n\t\t\t\t\tif ( persistedRecord.id === updatedRecord.id ) {\n\t\t\t\t\t\tlet newRecord = {\n\t\t\t\t\t\t\t...persistedRecord,\n\t\t\t\t\t\t\t...data,\n\t\t\t\t\t\t\t...updatedRecord,\n\t\t\t\t\t\t};\n\t\t\t\t\t\tnewRecord = Object.keys( newRecord ).reduce(\n\t\t\t\t\t\t\t( acc, key ) => {\n\t\t\t\t\t\t\t\t// These properties are persisted in autosaves.\n\t\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t\t[ 'title', 'excerpt', 'content' ].includes(\n\t\t\t\t\t\t\t\t\t\tkey\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\t\tacc[ key ] = newRecord[ key ];\n\t\t\t\t\t\t\t\t} else if ( key === 'status' ) {\n\t\t\t\t\t\t\t\t\t// Status is only persisted in autosaves when going from\n\t\t\t\t\t\t\t\t\t// \"auto-draft\" to \"draft\".\n\t\t\t\t\t\t\t\t\tacc[ key ] =\n\t\t\t\t\t\t\t\t\t\tpersistedRecord.status ===\n\t\t\t\t\t\t\t\t\t\t\t'auto-draft' &&\n\t\t\t\t\t\t\t\t\t\tnewRecord.status === 'draft'\n\t\t\t\t\t\t\t\t\t\t\t? newRecord.status\n\t\t\t\t\t\t\t\t\t\t\t: persistedRecord.status;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t// These properties are not persisted in autosaves.\n\t\t\t\t\t\t\t\t\tacc[ key ] = persistedRecord[ key ];\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\treturn acc;\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{}\n\t\t\t\t\t\t);\n\t\t\t\t\t\tdispatch.receiveEntityRecords(\n\t\t\t\t\t\t\tkind,\n\t\t\t\t\t\t\tname,\n\t\t\t\t\t\t\tnewRecord,\n\t\t\t\t\t\t\tundefined,\n\t\t\t\t\t\t\ttrue\n\t\t\t\t\t\t);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tdispatch.receiveAutosaves(\n\t\t\t\t\t\t\tpersistedRecord.id,\n\t\t\t\t\t\t\tupdatedRecord\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tlet edits = record;\n\t\t\t\t\tif ( entityConfig.__unstablePrePersist ) {\n\t\t\t\t\t\tedits = {\n\t\t\t\t\t\t\t...edits,\n\t\t\t\t\t\t\t...entityConfig.__unstablePrePersist(\n\t\t\t\t\t\t\t\tpersistedRecord,\n\t\t\t\t\t\t\t\tedits\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t};\n\t\t\t\t\t}\n\t\t\t\t\tupdatedRecord = await __unstableFetch( {\n\t\t\t\t\t\tpath,\n\t\t\t\t\t\tmethod: recordId ? 'PUT' : 'POST',\n\t\t\t\t\t\tdata: edits,\n\t\t\t\t\t} );\n\t\t\t\t\tdispatch.receiveEntityRecords(\n\t\t\t\t\t\tkind,\n\t\t\t\t\t\tname,\n\t\t\t\t\t\tupdatedRecord,\n\t\t\t\t\t\tundefined,\n\t\t\t\t\t\ttrue,\n\t\t\t\t\t\tedits\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t} catch ( _error ) {\n\t\t\t\thasError = true;\n\t\t\t\terror = _error;\n\t\t\t}\n\t\t\tdispatch( {\n\t\t\t\ttype: 'SAVE_ENTITY_RECORD_FINISH',\n\t\t\t\tkind,\n\t\t\t\tname,\n\t\t\t\trecordId,\n\t\t\t\terror,\n\t\t\t\tisAutosave,\n\t\t\t} );\n\n\t\t\tif ( hasError && throwOnError ) {\n\t\t\t\tthrow error;\n\t\t\t}\n\n\t\t\treturn updatedRecord;\n\t\t} finally {\n\t\t\tdispatch.__unstableReleaseStoreLock( lock );\n\t\t}\n\t};\n\n/**\n * Runs multiple core-data actions at the same time using one API request.\n *\n * Example:\n *\n * ```\n * const [ savedRecord, updatedRecord, deletedRecord ] =\n * await dispatch( 'core' ).__experimentalBatch( [\n * ( { saveEntityRecord } ) => saveEntityRecord( 'root', 'widget', widget ),\n * ( { saveEditedEntityRecord } ) => saveEntityRecord( 'root', 'widget', 123 ),\n * ( { deleteEntityRecord } ) => deleteEntityRecord( 'root', 'widget', 123, null ),\n * ] );\n * ```\n *\n * @param {Array} requests Array of functions which are invoked simultaneously.\n * Each function is passed an object containing\n * `saveEntityRecord`, `saveEditedEntityRecord`, and\n * `deleteEntityRecord`.\n *\n * @return {(thunkArgs: Object) => Promise} A promise that resolves to an array containing the return\n * values of each function given in `requests`.\n */\nexport const __experimentalBatch =\n\t( requests ) =>\n\tasync ( { dispatch } ) => {\n\t\tconst batch = createBatch();\n\t\tconst api = {\n\t\t\tsaveEntityRecord( kind, name, record, options ) {\n\t\t\t\treturn batch.add( ( add ) =>\n\t\t\t\t\tdispatch.saveEntityRecord( kind, name, record, {\n\t\t\t\t\t\t...options,\n\t\t\t\t\t\t__unstableFetch: add,\n\t\t\t\t\t} )\n\t\t\t\t);\n\t\t\t},\n\t\t\tsaveEditedEntityRecord( kind, name, recordId, options ) {\n\t\t\t\treturn batch.add( ( add ) =>\n\t\t\t\t\tdispatch.saveEditedEntityRecord( kind, name, recordId, {\n\t\t\t\t\t\t...options,\n\t\t\t\t\t\t__unstableFetch: add,\n\t\t\t\t\t} )\n\t\t\t\t);\n\t\t\t},\n\t\t\tdeleteEntityRecord( kind, name, recordId, query, options ) {\n\t\t\t\treturn batch.add( ( add ) =>\n\t\t\t\t\tdispatch.deleteEntityRecord( kind, name, recordId, query, {\n\t\t\t\t\t\t...options,\n\t\t\t\t\t\t__unstableFetch: add,\n\t\t\t\t\t} )\n\t\t\t\t);\n\t\t\t},\n\t\t};\n\t\tconst resultPromises = requests.map( ( request ) => request( api ) );\n\t\tconst [ , ...results ] = await Promise.all( [\n\t\t\tbatch.run(),\n\t\t\t...resultPromises,\n\t\t] );\n\t\treturn results;\n\t};\n\n/**\n * Action triggered to save an entity record's edits.\n *\n * @param {string} kind Kind of the entity.\n * @param {string} name Name of the entity.\n * @param {Object} recordId ID of the record.\n * @param {Object} options Saving options.\n */\nexport const saveEditedEntityRecord =\n\t( kind, name, recordId, options ) =>\n\tasync ( { select, dispatch } ) => {\n\t\tif ( ! select.hasEditsForEntityRecord( kind, name, recordId ) ) {\n\t\t\treturn;\n\t\t}\n\t\tconst configs = await dispatch( getOrLoadEntitiesConfig( kind ) );\n\t\tconst entityConfig = configs.find(\n\t\t\t( config ) => config.kind === kind && config.name === name\n\t\t);\n\t\tif ( ! entityConfig ) {\n\t\t\treturn;\n\t\t}\n\t\tconst entityIdKey = entityConfig.key || DEFAULT_ENTITY_KEY;\n\n\t\tconst edits = select.getEntityRecordNonTransientEdits(\n\t\t\tkind,\n\t\t\tname,\n\t\t\trecordId\n\t\t);\n\t\tconst record = { [ entityIdKey ]: recordId, ...edits };\n\t\treturn await dispatch.saveEntityRecord( kind, name, record, options );\n\t};\n\n/**\n * Action triggered to save only specified properties for the entity.\n *\n * @param {string} kind Kind of the entity.\n * @param {string} name Name of the entity.\n * @param {Object} recordId ID of the record.\n * @param {Array} itemsToSave List of entity properties to save.\n * @param {Object} options Saving options.\n */\nexport const __experimentalSaveSpecifiedEntityEdits =\n\t( kind, name, recordId, itemsToSave, options ) =>\n\tasync ( { select, dispatch } ) => {\n\t\tif ( ! select.hasEditsForEntityRecord( kind, name, recordId ) ) {\n\t\t\treturn;\n\t\t}\n\t\tconst edits = select.getEntityRecordNonTransientEdits(\n\t\t\tkind,\n\t\t\tname,\n\t\t\trecordId\n\t\t);\n\t\tconst editsToSave = {};\n\t\tfor ( const edit in edits ) {\n\t\t\tif ( itemsToSave.some( ( item ) => item === edit ) ) {\n\t\t\t\teditsToSave[ edit ] = edits[ edit ];\n\t\t\t}\n\t\t}\n\t\treturn await dispatch.saveEntityRecord(\n\t\t\tkind,\n\t\t\tname,\n\t\t\teditsToSave,\n\t\t\toptions\n\t\t);\n\t};\n\n/**\n * Returns an action object used in signalling that Upload permissions have been received.\n *\n * @deprecated since WP 5.9, use receiveUserPermission instead.\n *\n * @param {boolean} hasUploadPermissions Does the user have permission to upload files?\n *\n * @return {Object} Action object.\n */\nexport function receiveUploadPermissions( hasUploadPermissions ) {\n\tdeprecated( \"wp.data.dispatch( 'core' ).receiveUploadPermissions\", {\n\t\tsince: '5.9',\n\t\talternative: 'receiveUserPermission',\n\t} );\n\n\treturn receiveUserPermission( 'create/media', hasUploadPermissions );\n}\n\n/**\n * Returns an action object used in signalling that the current user has\n * permission to perform an action on a REST resource.\n * Ignored from documentation as it's internal to the data store.\n *\n * @ignore\n *\n * @param {string} key A key that represents the action and REST resource.\n * @param {boolean} isAllowed Whether or not the user can perform the action.\n *\n * @return {Object} Action object.\n */\nexport function receiveUserPermission( key, isAllowed ) {\n\treturn {\n\t\ttype: 'RECEIVE_USER_PERMISSION',\n\t\tkey,\n\t\tisAllowed,\n\t};\n}\n\n/**\n * Returns an action object used in signalling that the autosaves for a\n * post have been received.\n * Ignored from documentation as it's internal to the data store.\n *\n * @ignore\n *\n * @param {number} postId The id of the post that is parent to the autosave.\n * @param {Array|Object} autosaves An array of autosaves or singular autosave object.\n *\n * @return {Object} Action object.\n */\nexport function receiveAutosaves( postId, autosaves ) {\n\treturn {\n\t\ttype: 'RECEIVE_AUTOSAVES',\n\t\tpostId,\n\t\tautosaves: Array.isArray( autosaves ) ? autosaves : [ autosaves ],\n\t};\n}\n\n/**\n * Returns an action object signalling that the fallback Navigation\n * Menu id has been received.\n *\n * @param {integer} fallbackId the id of the fallback Navigation Menu\n * @return {Object} Action object.\n */\nexport function receiveNavigationFallbackId( fallbackId ) {\n\treturn {\n\t\ttype: 'RECEIVE_NAVIGATION_FALLBACK_ID',\n\t\tfallbackId,\n\t};\n}\n"]}
@@ -244,6 +244,11 @@ function useEntityBlockEditor(kind, name, {
244
244
  });
245
245
 
246
246
  function updateAttributes(attributes) {
247
+ // Only attempt to update attributes, if attributes is an object.
248
+ if (!attributes || Array.isArray(attributes) || typeof attributes !== 'object') {
249
+ return attributes;
250
+ }
251
+
247
252
  attributes = { ...attributes
248
253
  };
249
254
 
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/core-data/src/entity-provider.js"],"names":["EMPTY_ARRAY","oldFootnotes","entityContexts","rootEntitiesConfig","reduce","acc","loader","kind","name","context","undefined","additionalEntityConfigLoaders","getEntityContext","Error","EntityProvider","type","id","children","Provider","useEntityId","useEntityProp","prop","_id","providerId","value","fullValue","select","getEntityRecord","getEditedEntityRecord","STORE_NAME","record","editedRecord","editEntityRecord","setValue","newValue","useEntityBlockEditor","content","blocks","meta","__unstableCreateUndoLevel","parsedContent","undoIgnore","updateFootnotes","_blocks","output","footnotes","getRichTextValues","blockEditorPrivateApis","_content","join","newOrder","indexOf","regex","match","exec","push","JSON","parse","currentOrder","map","fn","newFootnotes","fnId","find","updateAttributes","attributes","key","Array","isArray","replace","opening","index","compatRegex","updateBlocksAttributes","__blocks","block","innerBlocks","newBlocks","includes","stringify","onChange","options","noChange","selection","edits","blocksForSerialization","isCached","onInput","footnotesChanges"],"mappings":";;;;;;;;;;AAGA;;AAMA;;AACA;;AACA;;AAKA;;AACA;;AAWA;;AA5BA;AACA;AACA;;AAWA;AACA;AACA;;AAIA;AAEA,MAAMA,WAAW,GAAG,EAApB;AAEA,IAAIC,YAAY,GAAG,EAAnB;AAEA;AACA;AACA;;AAGA,MAAMC,cAAc,GAAG,EACtB,GAAGC,6BAAmBC,MAAnB,CAA2B,CAAEC,GAAF,EAAOC,MAAP,KAAmB;AAChD,QAAK,CAAED,GAAG,CAAEC,MAAM,CAACC,IAAT,CAAV,EAA4B;AAC3BF,MAAAA,GAAG,CAAEC,MAAM,CAACC,IAAT,CAAH,GAAqB,EAArB;AACA;;AACDF,IAAAA,GAAG,CAAEC,MAAM,CAACC,IAAT,CAAH,CAAoBD,MAAM,CAACE,IAA3B,IAAoC;AACnCC,MAAAA,OAAO,EAAE,4BAAeC,SAAf;AAD0B,KAApC;AAGA,WAAOL,GAAP;AACA,GARE,EAQA,EARA,CADmB;AAUtB,KAAGM,wCAA8BP,MAA9B,CAAsC,CAAEC,GAAF,EAAOC,MAAP,KAAmB;AAC3DD,IAAAA,GAAG,CAAEC,MAAM,CAACC,IAAT,CAAH,GAAqB,EAArB;AACA,WAAOF,GAAP;AACA,GAHE,EAGA,EAHA;AAVmB,CAAvB;;AAeA,MAAMO,gBAAgB,GAAG,CAAEL,IAAF,EAAQC,IAAR,KAAkB;AAC1C,MAAK,CAAEN,cAAc,CAAEK,IAAF,CAArB,EAAgC;AAC/B,UAAM,IAAIM,KAAJ,CAAY,mCAAmCN,IAAM,GA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AAA,gBAAgB,CAAEzB,IAAF,EAAQC,IAAR,EAAcQ,EAAd,EAAkBoE,KAAlB,EAAyB;AAAEE,MAAAA,QAAQ,EAAE;AAAZ,KAAzB,CAAhB;AACA,GAnBe,EAoBhB,CACC/E,IADD,EAECC,IAFD,EAGCQ,EAHD,EAICqB,MAJD,EAKCK,eALD,EAMCH,yBAND,EAOCP,gBAPD,CApBgB,CAAjB;AA+BA,QAAMuD,OAAO,GAAG,0BACf,CAAEV,SAAF,EAAaI,OAAb,KAA0B;AACzB,UAAM;AAAEE,MAAAA;AAAF,QAAgBF,OAAtB;AACA,UAAMO,gBAAgB,GAAG9C,eAAe,CAAEmC,SAAF,CAAxC;AACA,UAAMO,KAAK,GAAG;AAAED,MAAAA,SAAF;AAAa,SAAGK;AAAhB,KAAd;AAEAxD,IAAAA,gBAAgB,CAAEzB,IAAF,EAAQC,IAAR,EAAcQ,EAAd,EAAkBoE,KAAlB,EAAyB;AAAEE,MAAAA,QAAQ,EAAE;AAAZ,KAAzB,CAAhB;AACA,GAPc,EAQf,CAAE/E,IAAF,EAAQC,IAAR,EAAcQ,EAAd,EAAkB0B,eAAlB,EAAmCV,gBAAnC,CARe,CAAhB;AAWA,SAAO,CAAEK,MAAF,aAAEA,MAAF,cAAEA,MAAF,GAAYrC,WAAZ,EAAyBuF,OAAzB,EAAkCP,QAAlC,CAAP;AACA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\tcreateContext,\n\tuseContext,\n\tuseCallback,\n\tuseEffect,\n} from '@wordpress/element';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { parse, __unstableSerializeAndClean } from '@wordpress/blocks';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport { STORE_NAME } from './name';\nimport { unlock } from './private-apis';\n\n/** @typedef {import('@wordpress/blocks').WPBlock} WPBlock */\n\nconst EMPTY_ARRAY = [];\n\nlet oldFootnotes = {};\n\n/**\n * Internal dependencies\n */\nimport { rootEntitiesConfig, additionalEntityConfigLoaders } from './entities';\n\nconst entityContexts = {\n\t...rootEntitiesConfig.reduce( ( acc, loader ) => {\n\t\tif ( ! acc[ loader.kind ] ) {\n\t\t\tacc[ loader.kind ] = {};\n\t\t}\n\t\tacc[ loader.kind ][ loader.name ] = {\n\t\t\tcontext: createContext( undefined ),\n\t\t};\n\t\treturn acc;\n\t}, {} ),\n\t...additionalEntityConfigLoaders.reduce( ( acc, loader ) => {\n\t\tacc[ loader.kind ] = {};\n\t\treturn acc;\n\t}, {} ),\n};\nconst getEntityContext = ( kind, name ) => {\n\tif ( ! entityContexts[ kind ] ) {\n\t\tthrow new Error( `Missing entity config for kind: ${ kind }.` );\n\t}\n\n\tif ( ! entityContexts[ kind ][ name ] ) {\n\t\tentityContexts[ kind ][ name ] = {\n\t\t\tcontext: createContext( undefined ),\n\t\t};\n\t}\n\n\treturn entityContexts[ kind ][ name ].context;\n};\n\n/**\n * Context provider component for providing\n * an entity for a specific entity.\n *\n * @param {Object} props The component's props.\n * @param {string} props.kind The entity kind.\n * @param {string} props.type The entity name.\n * @param {number} props.id The entity ID.\n * @param {*} props.children The children to wrap.\n *\n * @return {Object} The provided children, wrapped with\n * the entity's context provider.\n */\nexport default function EntityProvider( { kind, type: name, id, children } ) {\n\tconst Provider = getEntityContext( kind, name ).Provider;\n\treturn <Provider value={ id }>{ children }</Provider>;\n}\n\n/**\n * Hook that returns the ID for the nearest\n * provided entity of the specified type.\n *\n * @param {string} kind The entity kind.\n * @param {string} name The entity name.\n */\nexport function useEntityId( kind, name ) {\n\treturn useContext( getEntityContext( kind, name ) );\n}\n\n/**\n * Hook that returns the value and a setter for the\n * specified property of the nearest provided\n * entity of the specified type.\n *\n * @param {string} kind The entity kind.\n * @param {string} name The entity name.\n * @param {string} prop The property name.\n * @param {string} [_id] An entity ID to use instead of the context-provided one.\n *\n * @return {[*, Function, *]} An array where the first item is the\n * property value, the second is the\n * setter and the third is the full value\n * \t\t\t\t\t\t\t object from REST API containing more\n * \t\t\t\t\t\t\t information like `raw`, `rendered` and\n * \t\t\t\t\t\t\t `protected` props.\n */\nexport function useEntityProp( kind, name, prop, _id ) {\n\tconst providerId = useEntityId( kind, name );\n\tconst id = _id ?? providerId;\n\n\tconst { value, fullValue } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getEntityRecord, getEditedEntityRecord } =\n\t\t\t\tselect( STORE_NAME );\n\t\t\tconst record = getEntityRecord( kind, name, id ); // Trigger resolver.\n\t\t\tconst editedRecord = getEditedEntityRecord( kind, name, id );\n\t\t\treturn record && editedRecord\n\t\t\t\t? {\n\t\t\t\t\t\tvalue: editedRecord[ prop ],\n\t\t\t\t\t\tfullValue: record[ prop ],\n\t\t\t\t }\n\t\t\t\t: {};\n\t\t},\n\t\t[ kind, name, id, prop ]\n\t);\n\tconst { editEntityRecord } = useDispatch( STORE_NAME );\n\tconst setValue = useCallback(\n\t\t( newValue ) => {\n\t\t\teditEntityRecord( kind, name, id, {\n\t\t\t\t[ prop ]: newValue,\n\t\t\t} );\n\t\t},\n\t\t[ kind, name, id, prop ]\n\t);\n\n\treturn [ value, setValue, fullValue ];\n}\n\n/**\n * Hook that returns block content getters and setters for\n * the nearest provided entity of the specified type.\n *\n * The return value has the shape `[ blocks, onInput, onChange ]`.\n * `onInput` is for block changes that don't create undo levels\n * or dirty the post, non-persistent changes, and `onChange` is for\n * peristent changes. They map directly to the props of a\n * `BlockEditorProvider` and are intended to be used with it,\n * or similar components or hooks.\n *\n * @param {string} kind The entity kind.\n * @param {string} name The entity name.\n * @param {Object} options\n * @param {string} [options.id] An entity ID to use instead of the context-provided one.\n *\n * @return {[WPBlock[], Function, Function]} The block array and setters.\n */\nexport function useEntityBlockEditor( kind, name, { id: _id } = {} ) {\n\tconst providerId = useEntityId( kind, name );\n\tconst id = _id ?? providerId;\n\tconst { content, blocks, meta } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getEditedEntityRecord } = select( STORE_NAME );\n\t\t\tconst editedRecord = getEditedEntityRecord( kind, name, id );\n\t\t\treturn {\n\t\t\t\tblocks: editedRecord.blocks,\n\t\t\t\tcontent: editedRecord.content,\n\t\t\t\tmeta: editedRecord.meta,\n\t\t\t};\n\t\t},\n\t\t[ kind, name, id ]\n\t);\n\tconst { __unstableCreateUndoLevel, editEntityRecord } =\n\t\tuseDispatch( STORE_NAME );\n\n\tuseEffect( () => {\n\t\t// Load the blocks from the content if not already in state\n\t\t// Guard against other instances that might have\n\t\t// set content to a function already or the blocks are already in state.\n\t\tif ( content && typeof content !== 'function' && ! blocks ) {\n\t\t\tconst parsedContent = parse( content );\n\t\t\teditEntityRecord(\n\t\t\t\tkind,\n\t\t\t\tname,\n\t\t\t\tid,\n\t\t\t\t{\n\t\t\t\t\tblocks: parsedContent,\n\t\t\t\t},\n\t\t\t\t{ undoIgnore: true }\n\t\t\t);\n\t\t}\n\t}, [ content ] );\n\n\tconst updateFootnotes = useCallback(\n\t\t( _blocks ) => {\n\t\t\tconst output = { blocks: _blocks };\n\t\t\tif ( ! meta ) return output;\n\t\t\t// If meta.footnotes is empty, it means the meta is not registered.\n\t\t\tif ( meta.footnotes === undefined ) return output;\n\n\t\t\tconst { getRichTextValues } = unlock( blockEditorPrivateApis );\n\t\t\tconst _content = getRichTextValues( _blocks ).join( '' ) || '';\n\t\t\tconst newOrder = [];\n\n\t\t\t// This can be avoided when\n\t\t\t// https://github.com/WordPress/gutenberg/pull/43204 lands. We can then\n\t\t\t// get the order directly from the rich text values.\n\t\t\tif ( _content.indexOf( 'data-fn' ) !== -1 ) {\n\t\t\t\tconst regex = /data-fn=\"([^\"]+)\"/g;\n\t\t\t\tlet match;\n\t\t\t\twhile ( ( match = regex.exec( _content ) ) !== null ) {\n\t\t\t\t\tnewOrder.push( match[ 1 ] );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tconst footnotes = meta.footnotes\n\t\t\t\t? JSON.parse( meta.footnotes )\n\t\t\t\t: [];\n\t\t\tconst currentOrder = footnotes.map( ( fn ) => fn.id );\n\n\t\t\tif ( currentOrder.join( '' ) === newOrder.join( '' ) )\n\t\t\t\treturn output;\n\n\t\t\tconst newFootnotes = newOrder.map(\n\t\t\t\t( fnId ) =>\n\t\t\t\t\tfootnotes.find( ( fn ) => fn.id === fnId ) ||\n\t\t\t\t\toldFootnotes[ fnId ] || {\n\t\t\t\t\t\tid: fnId,\n\t\t\t\t\t\tcontent: '',\n\t\t\t\t\t}\n\t\t\t);\n\n\t\t\tfunction updateAttributes( attributes ) {\n\t\t\t\tattributes = { ...attributes };\n\n\t\t\t\tfor ( const key in attributes ) {\n\t\t\t\t\tconst value = attributes[ key ];\n\n\t\t\t\t\tif ( Array.isArray( value ) ) {\n\t\t\t\t\t\tattributes[ key ] = value.map( updateAttributes );\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( typeof value !== 'string' ) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( value.indexOf( 'data-fn' ) === -1 ) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\t// When we store rich text values, this would no longer\n\t\t\t\t\t// require a regex.\n\t\t\t\t\tconst regex =\n\t\t\t\t\t\t/(<sup[^>]+data-fn=\"([^\"]+)\"[^>]*><a[^>]*>)[\\d*]*<\\/a><\\/sup>/g;\n\n\t\t\t\t\tattributes[ key ] = value.replace(\n\t\t\t\t\t\tregex,\n\t\t\t\t\t\t( match, opening, fnId ) => {\n\t\t\t\t\t\t\tconst index = newOrder.indexOf( fnId );\n\t\t\t\t\t\t\treturn `${ opening }${ index + 1 }</a></sup>`;\n\t\t\t\t\t\t}\n\t\t\t\t\t);\n\n\t\t\t\t\tconst compatRegex =\n\t\t\t\t\t\t/<a[^>]+data-fn=\"([^\"]+)\"[^>]*>\\*<\\/a>/g;\n\n\t\t\t\t\tattributes[ key ] = attributes[ key ].replace(\n\t\t\t\t\t\tcompatRegex,\n\t\t\t\t\t\t( match, fnId ) => {\n\t\t\t\t\t\t\tconst index = newOrder.indexOf( fnId );\n\t\t\t\t\t\t\treturn `<sup data-fn=\"${ fnId }\" class=\"fn\"><a href=\"#${ fnId }\" id=\"${ fnId }-link\">${\n\t\t\t\t\t\t\t\tindex + 1\n\t\t\t\t\t\t\t}</a></sup>`;\n\t\t\t\t\t\t}\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\treturn attributes;\n\t\t\t}\n\n\t\t\tfunction updateBlocksAttributes( __blocks ) {\n\t\t\t\treturn __blocks.map( ( block ) => {\n\t\t\t\t\treturn {\n\t\t\t\t\t\t...block,\n\t\t\t\t\t\tattributes: updateAttributes( block.attributes ),\n\t\t\t\t\t\tinnerBlocks: updateBlocksAttributes(\n\t\t\t\t\t\t\tblock.innerBlocks\n\t\t\t\t\t\t),\n\t\t\t\t\t};\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\t// We need to go through all block attributs deeply and update the\n\t\t\t// footnote anchor numbering (textContent) to match the new order.\n\t\t\tconst newBlocks = updateBlocksAttributes( _blocks );\n\n\t\t\toldFootnotes = {\n\t\t\t\t...oldFootnotes,\n\t\t\t\t...footnotes.reduce( ( acc, fn ) => {\n\t\t\t\t\tif ( ! newOrder.includes( fn.id ) ) {\n\t\t\t\t\t\tacc[ fn.id ] = fn;\n\t\t\t\t\t}\n\t\t\t\t\treturn acc;\n\t\t\t\t}, {} ),\n\t\t\t};\n\n\t\t\treturn {\n\t\t\t\tmeta: {\n\t\t\t\t\t...meta,\n\t\t\t\t\tfootnotes: JSON.stringify( newFootnotes ),\n\t\t\t\t},\n\t\t\t\tblocks: newBlocks,\n\t\t\t};\n\t\t},\n\t\t[ meta ]\n\t);\n\n\tconst onChange = useCallback(\n\t\t( newBlocks, options ) => {\n\t\t\tconst noChange = blocks === newBlocks;\n\t\t\tif ( noChange ) {\n\t\t\t\treturn __unstableCreateUndoLevel( kind, name, id );\n\t\t\t}\n\t\t\tconst { selection } = options;\n\n\t\t\t// We create a new function here on every persistent edit\n\t\t\t// to make sure the edit makes the post dirty and creates\n\t\t\t// a new undo level.\n\t\t\tconst edits = {\n\t\t\t\tselection,\n\t\t\t\tcontent: ( { blocks: blocksForSerialization = [] } ) =>\n\t\t\t\t\t__unstableSerializeAndClean( blocksForSerialization ),\n\t\t\t\t...updateFootnotes( newBlocks ),\n\t\t\t};\n\n\t\t\teditEntityRecord( kind, name, id, edits, { isCached: false } );\n\t\t},\n\t\t[\n\t\t\tkind,\n\t\t\tname,\n\t\t\tid,\n\t\t\tblocks,\n\t\t\tupdateFootnotes,\n\t\t\t__unstableCreateUndoLevel,\n\t\t\teditEntityRecord,\n\t\t]\n\t);\n\n\tconst onInput = useCallback(\n\t\t( newBlocks, options ) => {\n\t\t\tconst { selection } = options;\n\t\t\tconst footnotesChanges = updateFootnotes( newBlocks );\n\t\t\tconst edits = { selection, ...footnotesChanges };\n\n\t\t\teditEntityRecord( kind, name, id, edits, { isCached: true } );\n\t\t},\n\t\t[ kind, name, id, updateFootnotes, editEntityRecord ]\n\t);\n\n\treturn [ blocks ?? EMPTY_ARRAY, onInput, onChange ];\n}\n"]}
1
+ {"version":3,"sources":["@wordpress/core-data/src/entity-provider.js"],"names":["EMPTY_ARRAY","oldFootnotes","entityContexts","rootEntitiesConfig","reduce","acc","loader","kind","name","context","undefined","additionalEntityConfigLoaders","getEntityContext","Error","EntityProvider","type","id","children","Provider","useEntityId","useEntityProp","prop","_id","providerId","value","fullValue","select","getEntityRecord","getEditedEntityRecord","STORE_NAME","record","editedRecord","editEntityRecord","setValue","newValue","useEntityBlockEditor","content","blocks","meta","__unstableCreateUndoLevel","parsedContent","undoIgnore","updateFootnotes","_blocks","output","footnotes","getRichTextValues","blockEditorPrivateApis","_content","join","newOrder","indexOf","regex","match","exec","push","JSON","parse","currentOrder","map","fn","newFootnotes","fnId","find","updateAttributes","attributes","Array","isArray","key","replace","opening","index","compatRegex","updateBlocksAttributes","__blocks","block","innerBlocks","newBlocks","includes","stringify","onChange","options","noChange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A,QAAQ,EAAE;AAAZ,KAAzB,CAAhB;AACA,GAnBe,EAoBhB,CACC/E,IADD,EAECC,IAFD,EAGCQ,EAHD,EAICqB,MAJD,EAKCK,eALD,EAMCH,yBAND,EAOCP,gBAPD,CApBgB,CAAjB;AA+BA,QAAMuD,OAAO,GAAG,0BACf,CAAEV,SAAF,EAAaI,OAAb,KAA0B;AACzB,UAAM;AAAEE,MAAAA;AAAF,QAAgBF,OAAtB;AACA,UAAMO,gBAAgB,GAAG9C,eAAe,CAAEmC,SAAF,CAAxC;AACA,UAAMO,KAAK,GAAG;AAAED,MAAAA,SAAF;AAAa,SAAGK;AAAhB,KAAd;AAEAxD,IAAAA,gBAAgB,CAAEzB,IAAF,EAAQC,IAAR,EAAcQ,EAAd,EAAkBoE,KAAlB,EAAyB;AAAEE,MAAAA,QAAQ,EAAE;AAAZ,KAAzB,CAAhB;AACA,GAPc,EAQf,CAAE/E,IAAF,EAAQC,IAAR,EAAcQ,EAAd,EAAkB0B,eAAlB,EAAmCV,gBAAnC,CARe,CAAhB;AAWA,SAAO,CAAEK,MAAF,aAAEA,MAAF,cAAEA,MAAF,GAAYrC,WAAZ,EAAyBuF,OAAzB,EAAkCP,QAAlC,CAAP;AACA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\tcreateContext,\n\tuseContext,\n\tuseCallback,\n\tuseEffect,\n} from '@wordpress/element';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { parse, __unstableSerializeAndClean } from '@wordpress/blocks';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport { STORE_NAME } from './name';\nimport { unlock } from './private-apis';\n\n/** @typedef {import('@wordpress/blocks').WPBlock} WPBlock */\n\nconst EMPTY_ARRAY = [];\n\nlet oldFootnotes = {};\n\n/**\n * Internal dependencies\n */\nimport { rootEntitiesConfig, additionalEntityConfigLoaders } from './entities';\n\nconst entityContexts = {\n\t...rootEntitiesConfig.reduce( ( acc, loader ) => {\n\t\tif ( ! acc[ loader.kind ] ) {\n\t\t\tacc[ loader.kind ] = {};\n\t\t}\n\t\tacc[ loader.kind ][ loader.name ] = {\n\t\t\tcontext: createContext( undefined ),\n\t\t};\n\t\treturn acc;\n\t}, {} ),\n\t...additionalEntityConfigLoaders.reduce( ( acc, loader ) => {\n\t\tacc[ loader.kind ] = {};\n\t\treturn acc;\n\t}, {} ),\n};\nconst getEntityContext = ( kind, name ) => {\n\tif ( ! entityContexts[ kind ] ) {\n\t\tthrow new Error( `Missing entity config for kind: ${ kind }.` );\n\t}\n\n\tif ( ! entityContexts[ kind ][ name ] ) {\n\t\tentityContexts[ kind ][ name ] = {\n\t\t\tcontext: createContext( undefined ),\n\t\t};\n\t}\n\n\treturn entityContexts[ kind ][ name ].context;\n};\n\n/**\n * Context provider component for providing\n * an entity for a specific entity.\n *\n * @param {Object} props The component's props.\n * @param {string} props.kind The entity kind.\n * @param {string} props.type The entity name.\n * @param {number} props.id The entity ID.\n * @param {*} props.children The children to wrap.\n *\n * @return {Object} The provided children, wrapped with\n * the entity's context provider.\n */\nexport default function EntityProvider( { kind, type: name, id, children } ) {\n\tconst Provider = getEntityContext( kind, name ).Provider;\n\treturn <Provider value={ id }>{ children }</Provider>;\n}\n\n/**\n * Hook that returns the ID for the nearest\n * provided entity of the specified type.\n *\n * @param {string} kind The entity kind.\n * @param {string} name The entity name.\n */\nexport function useEntityId( kind, name ) {\n\treturn useContext( getEntityContext( kind, name ) );\n}\n\n/**\n * Hook that returns the value and a setter for the\n * specified property of the nearest provided\n * entity of the specified type.\n *\n * @param {string} kind The entity kind.\n * @param {string} name The entity name.\n * @param {string} prop The property name.\n * @param {string} [_id] An entity ID to use instead of the context-provided one.\n *\n * @return {[*, Function, *]} An array where the first item is the\n * property value, the second is the\n * setter and the third is the full value\n * \t\t\t\t\t\t\t object from REST API containing more\n * \t\t\t\t\t\t\t information like `raw`, `rendered` and\n * \t\t\t\t\t\t\t `protected` props.\n */\nexport function useEntityProp( kind, name, prop, _id ) {\n\tconst providerId = useEntityId( kind, name );\n\tconst id = _id ?? providerId;\n\n\tconst { value, fullValue } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getEntityRecord, getEditedEntityRecord } =\n\t\t\t\tselect( STORE_NAME );\n\t\t\tconst record = getEntityRecord( kind, name, id ); // Trigger resolver.\n\t\t\tconst editedRecord = getEditedEntityRecord( kind, name, id );\n\t\t\treturn record && editedRecord\n\t\t\t\t? {\n\t\t\t\t\t\tvalue: editedRecord[ prop ],\n\t\t\t\t\t\tfullValue: record[ prop ],\n\t\t\t\t }\n\t\t\t\t: {};\n\t\t},\n\t\t[ kind, name, id, prop ]\n\t);\n\tconst { editEntityRecord } = useDispatch( STORE_NAME );\n\tconst setValue = useCallback(\n\t\t( newValue ) => {\n\t\t\teditEntityRecord( kind, name, id, {\n\t\t\t\t[ prop ]: newValue,\n\t\t\t} );\n\t\t},\n\t\t[ kind, name, id, prop ]\n\t);\n\n\treturn [ value, setValue, fullValue ];\n}\n\n/**\n * Hook that returns block content getters and setters for\n * the nearest provided entity of the specified type.\n *\n * The return value has the shape `[ blocks, onInput, onChange ]`.\n * `onInput` is for block changes that don't create undo levels\n * or dirty the post, non-persistent changes, and `onChange` is for\n * peristent changes. They map directly to the props of a\n * `BlockEditorProvider` and are intended to be used with it,\n * or similar components or hooks.\n *\n * @param {string} kind The entity kind.\n * @param {string} name The entity name.\n * @param {Object} options\n * @param {string} [options.id] An entity ID to use instead of the context-provided one.\n *\n * @return {[WPBlock[], Function, Function]} The block array and setters.\n */\nexport function useEntityBlockEditor( kind, name, { id: _id } = {} ) {\n\tconst providerId = useEntityId( kind, name );\n\tconst id = _id ?? providerId;\n\tconst { content, blocks, meta } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getEditedEntityRecord } = select( STORE_NAME );\n\t\t\tconst editedRecord = getEditedEntityRecord( kind, name, id );\n\t\t\treturn {\n\t\t\t\tblocks: editedRecord.blocks,\n\t\t\t\tcontent: editedRecord.content,\n\t\t\t\tmeta: editedRecord.meta,\n\t\t\t};\n\t\t},\n\t\t[ kind, name, id ]\n\t);\n\tconst { __unstableCreateUndoLevel, editEntityRecord } =\n\t\tuseDispatch( STORE_NAME );\n\n\tuseEffect( () => {\n\t\t// Load the blocks from the content if not already in state\n\t\t// Guard against other instances that might have\n\t\t// set content to a function already or the blocks are already in state.\n\t\tif ( content && typeof content !== 'function' && ! blocks ) {\n\t\t\tconst parsedContent = parse( content );\n\t\t\teditEntityRecord(\n\t\t\t\tkind,\n\t\t\t\tname,\n\t\t\t\tid,\n\t\t\t\t{\n\t\t\t\t\tblocks: parsedContent,\n\t\t\t\t},\n\t\t\t\t{ undoIgnore: true }\n\t\t\t);\n\t\t}\n\t}, [ content ] );\n\n\tconst updateFootnotes = useCallback(\n\t\t( _blocks ) => {\n\t\t\tconst output = { blocks: _blocks };\n\t\t\tif ( ! meta ) return output;\n\t\t\t// If meta.footnotes is empty, it means the meta is not registered.\n\t\t\tif ( meta.footnotes === undefined ) return output;\n\n\t\t\tconst { getRichTextValues } = unlock( blockEditorPrivateApis );\n\t\t\tconst _content = getRichTextValues( _blocks ).join( '' ) || '';\n\t\t\tconst newOrder = [];\n\n\t\t\t// This can be avoided when\n\t\t\t// https://github.com/WordPress/gutenberg/pull/43204 lands. We can then\n\t\t\t// get the order directly from the rich text values.\n\t\t\tif ( _content.indexOf( 'data-fn' ) !== -1 ) {\n\t\t\t\tconst regex = /data-fn=\"([^\"]+)\"/g;\n\t\t\t\tlet match;\n\t\t\t\twhile ( ( match = regex.exec( _content ) ) !== null ) {\n\t\t\t\t\tnewOrder.push( match[ 1 ] );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tconst footnotes = meta.footnotes\n\t\t\t\t? JSON.parse( meta.footnotes )\n\t\t\t\t: [];\n\t\t\tconst currentOrder = footnotes.map( ( fn ) => fn.id );\n\n\t\t\tif ( currentOrder.join( '' ) === newOrder.join( '' ) )\n\t\t\t\treturn output;\n\n\t\t\tconst newFootnotes = newOrder.map(\n\t\t\t\t( fnId ) =>\n\t\t\t\t\tfootnotes.find( ( fn ) => fn.id === fnId ) ||\n\t\t\t\t\toldFootnotes[ fnId ] || {\n\t\t\t\t\t\tid: fnId,\n\t\t\t\t\t\tcontent: '',\n\t\t\t\t\t}\n\t\t\t);\n\n\t\t\tfunction updateAttributes( attributes ) {\n\t\t\t\t// Only attempt to update attributes, if attributes is an object.\n\t\t\t\tif (\n\t\t\t\t\t! attributes ||\n\t\t\t\t\tArray.isArray( attributes ) ||\n\t\t\t\t\ttypeof attributes !== 'object'\n\t\t\t\t) {\n\t\t\t\t\treturn attributes;\n\t\t\t\t}\n\n\t\t\t\tattributes = { ...attributes };\n\n\t\t\t\tfor ( const key in attributes ) {\n\t\t\t\t\tconst value = attributes[ key ];\n\n\t\t\t\t\tif ( Array.isArray( value ) ) {\n\t\t\t\t\t\tattributes[ key ] = value.map( updateAttributes );\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( typeof value !== 'string' ) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( value.indexOf( 'data-fn' ) === -1 ) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\t// When we store rich text values, this would no longer\n\t\t\t\t\t// require a regex.\n\t\t\t\t\tconst regex =\n\t\t\t\t\t\t/(<sup[^>]+data-fn=\"([^\"]+)\"[^>]*><a[^>]*>)[\\d*]*<\\/a><\\/sup>/g;\n\n\t\t\t\t\tattributes[ key ] = value.replace(\n\t\t\t\t\t\tregex,\n\t\t\t\t\t\t( match, opening, fnId ) => {\n\t\t\t\t\t\t\tconst index = newOrder.indexOf( fnId );\n\t\t\t\t\t\t\treturn `${ opening }${ index + 1 }</a></sup>`;\n\t\t\t\t\t\t}\n\t\t\t\t\t);\n\n\t\t\t\t\tconst compatRegex =\n\t\t\t\t\t\t/<a[^>]+data-fn=\"([^\"]+)\"[^>]*>\\*<\\/a>/g;\n\n\t\t\t\t\tattributes[ key ] = attributes[ key ].replace(\n\t\t\t\t\t\tcompatRegex,\n\t\t\t\t\t\t( match, fnId ) => {\n\t\t\t\t\t\t\tconst index = newOrder.indexOf( fnId );\n\t\t\t\t\t\t\treturn `<sup data-fn=\"${ fnId }\" class=\"fn\"><a href=\"#${ fnId }\" id=\"${ fnId }-link\">${\n\t\t\t\t\t\t\t\tindex + 1\n\t\t\t\t\t\t\t}</a></sup>`;\n\t\t\t\t\t\t}\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\treturn attributes;\n\t\t\t}\n\n\t\t\tfunction updateBlocksAttributes( __blocks ) {\n\t\t\t\treturn __blocks.map( ( block ) => {\n\t\t\t\t\treturn {\n\t\t\t\t\t\t...block,\n\t\t\t\t\t\tattributes: updateAttributes( block.attributes ),\n\t\t\t\t\t\tinnerBlocks: updateBlocksAttributes(\n\t\t\t\t\t\t\tblock.innerBlocks\n\t\t\t\t\t\t),\n\t\t\t\t\t};\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\t// We need to go through all block attributs deeply and update the\n\t\t\t// footnote anchor numbering (textContent) to match the new order.\n\t\t\tconst newBlocks = updateBlocksAttributes( _blocks );\n\n\t\t\toldFootnotes = {\n\t\t\t\t...oldFootnotes,\n\t\t\t\t...footnotes.reduce( ( acc, fn ) => {\n\t\t\t\t\tif ( ! newOrder.includes( fn.id ) ) {\n\t\t\t\t\t\tacc[ fn.id ] = fn;\n\t\t\t\t\t}\n\t\t\t\t\treturn acc;\n\t\t\t\t}, {} ),\n\t\t\t};\n\n\t\t\treturn {\n\t\t\t\tmeta: {\n\t\t\t\t\t...meta,\n\t\t\t\t\tfootnotes: JSON.stringify( newFootnotes ),\n\t\t\t\t},\n\t\t\t\tblocks: newBlocks,\n\t\t\t};\n\t\t},\n\t\t[ meta ]\n\t);\n\n\tconst onChange = useCallback(\n\t\t( newBlocks, options ) => {\n\t\t\tconst noChange = blocks === newBlocks;\n\t\t\tif ( noChange ) {\n\t\t\t\treturn __unstableCreateUndoLevel( kind, name, id );\n\t\t\t}\n\t\t\tconst { selection } = options;\n\n\t\t\t// We create a new function here on every persistent edit\n\t\t\t// to make sure the edit makes the post dirty and creates\n\t\t\t// a new undo level.\n\t\t\tconst edits = {\n\t\t\t\tselection,\n\t\t\t\tcontent: ( { blocks: blocksForSerialization = [] } ) =>\n\t\t\t\t\t__unstableSerializeAndClean( blocksForSerialization ),\n\t\t\t\t...updateFootnotes( newBlocks ),\n\t\t\t};\n\n\t\t\teditEntityRecord( kind, name, id, edits, { isCached: false } );\n\t\t},\n\t\t[\n\t\t\tkind,\n\t\t\tname,\n\t\t\tid,\n\t\t\tblocks,\n\t\t\tupdateFootnotes,\n\t\t\t__unstableCreateUndoLevel,\n\t\t\teditEntityRecord,\n\t\t]\n\t);\n\n\tconst onInput = useCallback(\n\t\t( newBlocks, options ) => {\n\t\t\tconst { selection } = options;\n\t\t\tconst footnotesChanges = updateFootnotes( newBlocks );\n\t\t\tconst edits = { selection, ...footnotesChanges };\n\n\t\t\teditEntityRecord( kind, name, id, edits, { isCached: true } );\n\t\t},\n\t\t[ kind, name, id, updateFootnotes, editEntityRecord ]\n\t);\n\n\treturn [ blocks ?? EMPTY_ARRAY, onInput, onChange ];\n}\n"]}
@@ -506,7 +506,7 @@ export const saveEntityRecord = (kind, name, record, {
506
506
  ...record
507
507
  };
508
508
  data = Object.keys(data).reduce((acc, key) => {
509
- if (['title', 'excerpt', 'content'].includes(key)) {
509
+ if (['title', 'excerpt', 'content', 'meta'].includes(key)) {
510
510
  acc[key] = data[key];
511
511
  }
512
512
 
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/core-data/src/actions.js"],"names":["fastDeepEqual","v4","uuid","apiFetch","addQueryArgs","deprecated","receiveItems","removeItems","receiveQueriedItems","getOrLoadEntitiesConfig","DEFAULT_ENTITY_KEY","createBatch","STORE_NAME","getUndoEdits","getRedoEdits","receiveUserQuery","queryID","users","type","Array","isArray","receiveCurrentUser","currentUser","addEntities","entities","receiveEntityRecords","kind","name","records","query","invalidateCache","edits","map","record","status","title","action","receiveCurrentTheme","currentTheme","__experimentalReceiveCurrentGlobalStylesId","currentGlobalStylesId","id","__experimentalReceiveThemeBaseGlobalStyles","stylesheet","globalStyles","__experimentalReceiveThemeGlobalStyleVariations","variations","receiveThemeSupports","since","receiveThemeGlobalStyleRevisions","currentId","revisions","receiveEmbedPreview","url","preview","deleteEntityRecord","recordId","__unstableFetch","throwOnError","dispatch","configs","entityConfig","find","config","error","deletedRecord","__experimentalNoFetch","lock","__unstableAcquireStoreLock","exclusive","hasError","path","baseURL","method","_error","__unstableReleaseStoreLock","editEntityRecord","options","select","getEntityConfig","Error","mergedEdits","getRawEntityRecord","editedRecord","getEditedEntityRecord","edit","Object","keys","reduce","acc","key","recordValue","editedRecordValue","value","undefined","meta","undo","undoIgnore","isCached","undoEdit","state","root","stackedEdits","redo","redoEdit","__unstableCreateUndoLevel","saveEntityRecord","isAutosave","resolveSelect","entityIdKey","entries","evaluatedValue","updatedRecord","persistedRecord","getCurrentUser","currentUserId","autosavePost","getAutosave","data","includes","newRecord","receiveAutosaves","__unstablePrePersist","__experimentalBatch","requests","batch","api","add","saveEditedEntityRecord","resultPromises","request","results","Promise","all","run","hasEditsForEntityRecord","getEntityRecordNonTransientEdits","__experimentalSaveSpecifiedEntityEdits","itemsToSave","editsToSave","some","item","receiveUploadPermissions","hasUploadPermissions","alternative","receiveUserPermission","isAllowed","postId","autosaves","receiveNavigationFallbackId","fallbackId"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,aAAP,MAA0B,qBAA1B;AACA,SAASC,EAAE,IAAIC,IAAf,QAA2B,MAA3B;AAEA;AACA;AACA;;AACA,OAAOC,QAAP,MAAqB,sBAArB;AACA,SAASC,YAAT,QAA6B,gBAA7B;AACA,OAAOC,UAAP,MAAuB,uBAAvB;AAEA;AACA;AACA;;AACA,SAASC,YAAT,EAAuBC,WAAvB,EAAoCC,mBAApC,QAA+D,g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gH,WAHY,EAIZ9D,OAJY,CAAb;AAMA,CAvBK;AAyBP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,OAAO,SAASiE,wBAAT,CAAmCC,oBAAnC,EAA0D;AAChE1I,EAAAA,UAAU,CAAE,qDAAF,EAAyD;AAClE2C,IAAAA,KAAK,EAAE,KAD2D;AAElEgG,IAAAA,WAAW,EAAE;AAFqD,GAAzD,CAAV;AAKA,SAAOC,qBAAqB,CAAE,cAAF,EAAkBF,oBAAlB,CAA5B;AACA;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,OAAO,SAASE,qBAAT,CAAgCvD,GAAhC,EAAqCwD,SAArC,EAAiD;AACvD,SAAO;AACNhI,IAAAA,IAAI,EAAE,yBADA;AAENwE,IAAAA,GAFM;AAGNwD,IAAAA;AAHM,GAAP;AAKA;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,OAAO,SAASzB,gBAAT,CAA2B0B,MAA3B,EAAmCC,SAAnC,EAA+C;AACrD,SAAO;AACNlI,IAAAA,IAAI,EAAE,mBADA;AAENiI,IAAAA,MAFM;AAGNC,IAAAA,SAAS,EAAEjI,KAAK,CAACC,OAAN,CAAegI,SAAf,IAA6BA,SAA7B,GAAyC,CAAEA,SAAF;AAH9C,GAAP;AAKA;AAED;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,OAAO,SAASC,2BAAT,CAAsCC,UAAtC,EAAmD;AACzD,SAAO;AACNpI,IAAAA,IAAI,EAAE,gCADA;AAENoI,IAAAA;AAFM,GAAP;AAIA","sourcesContent":["/**\n * External dependencies\n */\nimport fastDeepEqual from 'fast-deep-equal/es6';\nimport { v4 as uuid } from 'uuid';\n\n/**\n * WordPress dependencies\n */\nimport apiFetch from '@wordpress/api-fetch';\nimport { addQueryArgs } from '@wordpress/url';\nimport deprecated from '@wordpress/deprecated';\n\n/**\n * Internal dependencies\n */\nimport { receiveItems, removeItems, receiveQueriedItems } from './queried-data';\nimport { getOrLoadEntitiesConfig, DEFAULT_ENTITY_KEY } from './entities';\nimport { createBatch } from './batch';\nimport { STORE_NAME } from './name';\nimport { getUndoEdits, getRedoEdits } from './private-selectors';\n\n/**\n * Returns an action object used in signalling that authors have been received.\n * Ignored from documentation as it's internal to the data store.\n *\n * @ignore\n *\n * @param {string} queryID Query ID.\n * @param {Array|Object} users Users received.\n *\n * @return {Object} Action object.\n */\nexport function receiveUserQuery( queryID, users ) {\n\treturn {\n\t\ttype: 'RECEIVE_USER_QUERY',\n\t\tusers: Array.isArray( users ) ? users : [ users ],\n\t\tqueryID,\n\t};\n}\n\n/**\n * Returns an action used in signalling that the current user has been received.\n * Ignored from documentation as it's internal to the data store.\n *\n * @ignore\n *\n * @param {Object} currentUser Current user object.\n *\n * @return {Object} Action object.\n */\nexport function receiveCurrentUser( currentUser ) {\n\treturn {\n\t\ttype: 'RECEIVE_CURRENT_USER',\n\t\tcurrentUser,\n\t};\n}\n\n/**\n * Returns an action object used in adding new entities.\n *\n * @param {Array} entities Entities received.\n *\n * @return {Object} Action object.\n */\nexport function addEntities( entities ) {\n\treturn {\n\t\ttype: 'ADD_ENTITIES',\n\t\tentities,\n\t};\n}\n\n/**\n * Returns an action object used in signalling that entity records have been received.\n *\n * @param {string} kind Kind of the received entity record.\n * @param {string} name Name of the received entity record.\n * @param {Array|Object} records Records received.\n * @param {?Object} query Query Object.\n * @param {?boolean} invalidateCache Should invalidate query caches.\n * @param {?Object} edits Edits to reset.\n * @return {Object} Action object.\n */\nexport function receiveEntityRecords(\n\tkind,\n\tname,\n\trecords,\n\tquery,\n\tinvalidateCache = false,\n\tedits\n) {\n\t// Auto drafts should not have titles, but some plugins rely on them so we can't filter this\n\t// on the server.\n\tif ( kind === 'postType' ) {\n\t\trecords = ( Array.isArray( records ) ? records : [ records ] ).map(\n\t\t\t( record ) =>\n\t\t\t\trecord.status === 'auto-draft'\n\t\t\t\t\t? { ...record, title: '' }\n\t\t\t\t\t: record\n\t\t);\n\t}\n\tlet action;\n\tif ( query ) {\n\t\taction = receiveQueriedItems( records, query, edits );\n\t} else {\n\t\taction = receiveItems( records, edits );\n\t}\n\n\treturn {\n\t\t...action,\n\t\tkind,\n\t\tname,\n\t\tinvalidateCache,\n\t};\n}\n\n/**\n * Returns an action object used in signalling that the current theme has been received.\n * Ignored from documentation as it's internal to the data store.\n *\n * @ignore\n *\n * @param {Object} currentTheme The current theme.\n *\n * @return {Object} Action object.\n */\nexport function receiveCurrentTheme( currentTheme ) {\n\treturn {\n\t\ttype: 'RECEIVE_CURRENT_THEME',\n\t\tcurrentTheme,\n\t};\n}\n\n/**\n * Returns an action object used in signalling that the current global styles id has been received.\n * Ignored from documentation as it's internal to the data store.\n *\n * @ignore\n *\n * @param {string} currentGlobalStylesId The current global styles id.\n *\n * @return {Object} Action object.\n */\nexport function __experimentalReceiveCurrentGlobalStylesId(\n\tcurrentGlobalStylesId\n) {\n\treturn {\n\t\ttype: 'RECEIVE_CURRENT_GLOBAL_STYLES_ID',\n\t\tid: currentGlobalStylesId,\n\t};\n}\n\n/**\n * Returns an action object used in signalling that the theme base global styles have been received\n * Ignored from documentation as it's internal to the data store.\n *\n * @ignore\n *\n * @param {string} stylesheet The theme's identifier\n * @param {Object} globalStyles The global styles object.\n *\n * @return {Object} Action object.\n */\nexport function __experimentalReceiveThemeBaseGlobalStyles(\n\tstylesheet,\n\tglobalStyles\n) {\n\treturn {\n\t\ttype: 'RECEIVE_THEME_GLOBAL_STYLES',\n\t\tstylesheet,\n\t\tglobalStyles,\n\t};\n}\n\n/**\n * Returns an action object used in signalling that the theme global styles variations have been received.\n * Ignored from documentation as it's internal to the data store.\n *\n * @ignore\n *\n * @param {string} stylesheet The theme's identifier\n * @param {Array} variations The global styles variations.\n *\n * @return {Object} Action object.\n */\nexport function __experimentalReceiveThemeGlobalStyleVariations(\n\tstylesheet,\n\tvariations\n) {\n\treturn {\n\t\ttype: 'RECEIVE_THEME_GLOBAL_STYLE_VARIATIONS',\n\t\tstylesheet,\n\t\tvariations,\n\t};\n}\n\n/**\n * Returns an action object used in signalling that the index has been received.\n *\n * @deprecated since WP 5.9, this is not useful anymore, use the selector direclty.\n *\n * @return {Object} Action object.\n */\nexport function receiveThemeSupports() {\n\tdeprecated( \"wp.data.dispatch( 'core' ).receiveThemeSupports\", {\n\t\tsince: '5.9',\n\t} );\n\n\treturn {\n\t\ttype: 'DO_NOTHING',\n\t};\n}\n\n/**\n * Returns an action object used in signalling that the theme global styles CPT post revisions have been received.\n * Ignored from documentation as it's internal to the data store.\n *\n * @ignore\n *\n * @param {number} currentId The post id.\n * @param {Array} revisions The global styles revisions.\n *\n * @return {Object} Action object.\n */\nexport function receiveThemeGlobalStyleRevisions( currentId, revisions ) {\n\treturn {\n\t\ttype: 'RECEIVE_THEME_GLOBAL_STYLE_REVISIONS',\n\t\tcurrentId,\n\t\trevisions,\n\t};\n}\n\n/**\n * Returns an action object used in signalling that the preview data for\n * a given URl has been received.\n * Ignored from documentation as it's internal to the data store.\n *\n * @ignore\n *\n * @param {string} url URL to preview the embed for.\n * @param {*} preview Preview data.\n *\n * @return {Object} Action object.\n */\nexport function receiveEmbedPreview( url, preview ) {\n\treturn {\n\t\ttype: 'RECEIVE_EMBED_PREVIEW',\n\t\turl,\n\t\tpreview,\n\t};\n}\n\n/**\n * Action triggered to delete an entity record.\n *\n * @param {string} kind Kind of the deleted entity.\n * @param {string} name Name of the deleted entity.\n * @param {string} recordId Record ID of the deleted entity.\n * @param {?Object} query Special query parameters for the\n * DELETE API call.\n * @param {Object} [options] Delete options.\n * @param {Function} [options.__unstableFetch] Internal use only. Function to\n * call instead of `apiFetch()`.\n * Must return a promise.\n * @param {boolean} [options.throwOnError=false] If false, this action suppresses all\n * the exceptions. Defaults to false.\n */\nexport const deleteEntityRecord =\n\t(\n\t\tkind,\n\t\tname,\n\t\trecordId,\n\t\tquery,\n\t\t{ __unstableFetch = apiFetch, throwOnError = false } = {}\n\t) =>\n\tasync ( { dispatch } ) => {\n\t\tconst configs = await dispatch( getOrLoadEntitiesConfig( kind ) );\n\t\tconst entityConfig = configs.find(\n\t\t\t( config ) => config.kind === kind && config.name === name\n\t\t);\n\t\tlet error;\n\t\tlet deletedRecord = false;\n\t\tif ( ! entityConfig || entityConfig?.__experimentalNoFetch ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst lock = await dispatch.__unstableAcquireStoreLock(\n\t\t\tSTORE_NAME,\n\t\t\t[ 'entities', 'records', kind, name, recordId ],\n\t\t\t{ exclusive: true }\n\t\t);\n\n\t\ttry {\n\t\t\tdispatch( {\n\t\t\t\ttype: 'DELETE_ENTITY_RECORD_START',\n\t\t\t\tkind,\n\t\t\t\tname,\n\t\t\t\trecordId,\n\t\t\t} );\n\n\t\t\tlet hasError = false;\n\t\t\ttry {\n\t\t\t\tlet path = `${ entityConfig.baseURL }/${ recordId }`;\n\n\t\t\t\tif ( query ) {\n\t\t\t\t\tpath = addQueryArgs( path, query );\n\t\t\t\t}\n\n\t\t\t\tdeletedRecord = await __unstableFetch( {\n\t\t\t\t\tpath,\n\t\t\t\t\tmethod: 'DELETE',\n\t\t\t\t} );\n\n\t\t\t\tawait dispatch( removeItems( kind, name, recordId, true ) );\n\t\t\t} catch ( _error ) {\n\t\t\t\thasError = true;\n\t\t\t\terror = _error;\n\t\t\t}\n\n\t\t\tdispatch( {\n\t\t\t\ttype: 'DELETE_ENTITY_RECORD_FINISH',\n\t\t\t\tkind,\n\t\t\t\tname,\n\t\t\t\trecordId,\n\t\t\t\terror,\n\t\t\t} );\n\n\t\t\tif ( hasError && throwOnError ) {\n\t\t\t\tthrow error;\n\t\t\t}\n\n\t\t\treturn deletedRecord;\n\t\t} finally {\n\t\t\tdispatch.__unstableReleaseStoreLock( lock );\n\t\t}\n\t};\n\n/**\n * Returns an action object that triggers an\n * edit to an entity record.\n *\n * @param {string} kind Kind of the edited entity record.\n * @param {string} name Name of the edited entity record.\n * @param {number|string} recordId Record ID of the edited entity record.\n * @param {Object} edits The edits.\n * @param {Object} options Options for the edit.\n * @param {boolean} [options.undoIgnore] Whether to ignore the edit in undo history or not.\n *\n * @return {Object} Action object.\n */\nexport const editEntityRecord =\n\t( kind, name, recordId, edits, options = {} ) =>\n\t( { select, dispatch } ) => {\n\t\tconst entityConfig = select.getEntityConfig( kind, name );\n\t\tif ( ! entityConfig ) {\n\t\t\tthrow new Error(\n\t\t\t\t`The entity being edited (${ kind }, ${ name }) does not have a loaded config.`\n\t\t\t);\n\t\t}\n\t\tconst { mergedEdits = {} } = entityConfig;\n\t\tconst record = select.getRawEntityRecord( kind, name, recordId );\n\t\tconst editedRecord = select.getEditedEntityRecord(\n\t\t\tkind,\n\t\t\tname,\n\t\t\trecordId\n\t\t);\n\n\t\tconst edit = {\n\t\t\tkind,\n\t\t\tname,\n\t\t\trecordId,\n\t\t\t// Clear edits when they are equal to their persisted counterparts\n\t\t\t// so that the property is not considered dirty.\n\t\t\tedits: Object.keys( edits ).reduce( ( acc, key ) => {\n\t\t\t\tconst recordValue = record[ key ];\n\t\t\t\tconst editedRecordValue = editedRecord[ key ];\n\t\t\t\tconst value = mergedEdits[ key ]\n\t\t\t\t\t? { ...editedRecordValue, ...edits[ key ] }\n\t\t\t\t\t: edits[ key ];\n\t\t\t\tacc[ key ] = fastDeepEqual( recordValue, value )\n\t\t\t\t\t? undefined\n\t\t\t\t\t: value;\n\t\t\t\treturn acc;\n\t\t\t}, {} ),\n\t\t};\n\t\tdispatch( {\n\t\t\ttype: 'EDIT_ENTITY_RECORD',\n\t\t\t...edit,\n\t\t\tmeta: {\n\t\t\t\tundo: ! options.undoIgnore && {\n\t\t\t\t\t...edit,\n\t\t\t\t\t// Send the current values for things like the first undo stack entry.\n\t\t\t\t\tedits: Object.keys( edits ).reduce( ( acc, key ) => {\n\t\t\t\t\t\tacc[ key ] = editedRecord[ key ];\n\t\t\t\t\t\treturn acc;\n\t\t\t\t\t}, {} ),\n\t\t\t\t\tisCached: options.isCached,\n\t\t\t\t},\n\t\t\t},\n\t\t} );\n\t};\n\n/**\n * Action triggered to undo the last edit to\n * an entity record, if any.\n */\nexport const undo =\n\t() =>\n\t( { select, dispatch } ) => {\n\t\t// Todo: we shouldn't have to pass \"root\" here.\n\t\tconst undoEdit = select( ( state ) => getUndoEdits( state.root ) );\n\t\tif ( ! undoEdit ) {\n\t\t\treturn;\n\t\t}\n\t\tdispatch( {\n\t\t\ttype: 'UNDO',\n\t\t\tstackedEdits: undoEdit,\n\t\t} );\n\t};\n\n/**\n * Action triggered to redo the last undoed\n * edit to an entity record, if any.\n */\nexport const redo =\n\t() =>\n\t( { select, dispatch } ) => {\n\t\t// Todo: we shouldn't have to pass \"root\" here.\n\t\tconst redoEdit = select( ( state ) => getRedoEdits( state.root ) );\n\t\tif ( ! redoEdit ) {\n\t\t\treturn;\n\t\t}\n\t\tdispatch( {\n\t\t\ttype: 'REDO',\n\t\t\tstackedEdits: redoEdit,\n\t\t} );\n\t};\n\n/**\n * Forces the creation of a new undo level.\n *\n * @return {Object} Action object.\n */\nexport function __unstableCreateUndoLevel() {\n\treturn { type: 'CREATE_UNDO_LEVEL' };\n}\n\n/**\n * Action triggered to save an entity record.\n *\n * @param {string} kind Kind of the received entity.\n * @param {string} name Name of the received entity.\n * @param {Object} record Record to be saved.\n * @param {Object} options Saving options.\n * @param {boolean} [options.isAutosave=false] Whether this is an autosave.\n * @param {Function} [options.__unstableFetch] Internal use only. Function to\n * call instead of `apiFetch()`.\n * Must return a promise.\n * @param {boolean} [options.throwOnError=false] If false, this action suppresses all\n * the exceptions. Defaults to false.\n */\nexport const saveEntityRecord =\n\t(\n\t\tkind,\n\t\tname,\n\t\trecord,\n\t\t{\n\t\t\tisAutosave = false,\n\t\t\t__unstableFetch = apiFetch,\n\t\t\tthrowOnError = false,\n\t\t} = {}\n\t) =>\n\tasync ( { select, resolveSelect, dispatch } ) => {\n\t\tconst configs = await dispatch( getOrLoadEntitiesConfig( kind ) );\n\t\tconst entityConfig = configs.find(\n\t\t\t( config ) => config.kind === kind && config.name === name\n\t\t);\n\t\tif ( ! entityConfig || entityConfig?.__experimentalNoFetch ) {\n\t\t\treturn;\n\t\t}\n\t\tconst entityIdKey = entityConfig.key || DEFAULT_ENTITY_KEY;\n\t\tconst recordId = record[ entityIdKey ];\n\n\t\tconst lock = await dispatch.__unstableAcquireStoreLock(\n\t\t\tSTORE_NAME,\n\t\t\t[ 'entities', 'records', kind, name, recordId || uuid() ],\n\t\t\t{ exclusive: true }\n\t\t);\n\n\t\ttry {\n\t\t\t// Evaluate optimized edits.\n\t\t\t// (Function edits that should be evaluated on save to avoid expensive computations on every edit.)\n\t\t\tfor ( const [ key, value ] of Object.entries( record ) ) {\n\t\t\t\tif ( typeof value === 'function' ) {\n\t\t\t\t\tconst evaluatedValue = value(\n\t\t\t\t\t\tselect.getEditedEntityRecord( kind, name, recordId )\n\t\t\t\t\t);\n\t\t\t\t\tdispatch.editEntityRecord(\n\t\t\t\t\t\tkind,\n\t\t\t\t\t\tname,\n\t\t\t\t\t\trecordId,\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t[ key ]: evaluatedValue,\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{ undoIgnore: true }\n\t\t\t\t\t);\n\t\t\t\t\trecord[ key ] = evaluatedValue;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tdispatch( {\n\t\t\t\ttype: 'SAVE_ENTITY_RECORD_START',\n\t\t\t\tkind,\n\t\t\t\tname,\n\t\t\t\trecordId,\n\t\t\t\tisAutosave,\n\t\t\t} );\n\t\t\tlet updatedRecord;\n\t\t\tlet error;\n\t\t\tlet hasError = false;\n\t\t\ttry {\n\t\t\t\tconst path = `${ entityConfig.baseURL }${\n\t\t\t\t\trecordId ? '/' + recordId : ''\n\t\t\t\t}`;\n\t\t\t\tconst persistedRecord = select.getRawEntityRecord(\n\t\t\t\t\tkind,\n\t\t\t\t\tname,\n\t\t\t\t\trecordId\n\t\t\t\t);\n\n\t\t\t\tif ( isAutosave ) {\n\t\t\t\t\t// Most of this autosave logic is very specific to posts.\n\t\t\t\t\t// This is fine for now as it is the only supported autosave,\n\t\t\t\t\t// but ideally this should all be handled in the back end,\n\t\t\t\t\t// so the client just sends and receives objects.\n\t\t\t\t\tconst currentUser = select.getCurrentUser();\n\t\t\t\t\tconst currentUserId = currentUser\n\t\t\t\t\t\t? currentUser.id\n\t\t\t\t\t\t: undefined;\n\t\t\t\t\tconst autosavePost = await resolveSelect.getAutosave(\n\t\t\t\t\t\tpersistedRecord.type,\n\t\t\t\t\t\tpersistedRecord.id,\n\t\t\t\t\t\tcurrentUserId\n\t\t\t\t\t);\n\t\t\t\t\t// Autosaves need all expected fields to be present.\n\t\t\t\t\t// So we fallback to the previous autosave and then\n\t\t\t\t\t// to the actual persisted entity if the edits don't\n\t\t\t\t\t// have a value.\n\t\t\t\t\tlet data = {\n\t\t\t\t\t\t...persistedRecord,\n\t\t\t\t\t\t...autosavePost,\n\t\t\t\t\t\t...record,\n\t\t\t\t\t};\n\t\t\t\t\tdata = Object.keys( data ).reduce(\n\t\t\t\t\t\t( acc, key ) => {\n\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t[ 'title', 'excerpt', 'content' ].includes(\n\t\t\t\t\t\t\t\t\tkey\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\tacc[ key ] = data[ key ];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn acc;\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tstatus:\n\t\t\t\t\t\t\t\tdata.status === 'auto-draft'\n\t\t\t\t\t\t\t\t\t? 'draft'\n\t\t\t\t\t\t\t\t\t: data.status,\n\t\t\t\t\t\t}\n\t\t\t\t\t);\n\t\t\t\t\tupdatedRecord = await __unstableFetch( {\n\t\t\t\t\t\tpath: `${ path }/autosaves`,\n\t\t\t\t\t\tmethod: 'POST',\n\t\t\t\t\t\tdata,\n\t\t\t\t\t} );\n\n\t\t\t\t\t// An autosave may be processed by the server as a regular save\n\t\t\t\t\t// when its update is requested by the author and the post had\n\t\t\t\t\t// draft or auto-draft status.\n\t\t\t\t\tif ( persistedRecord.id === updatedRecord.id ) {\n\t\t\t\t\t\tlet newRecord = {\n\t\t\t\t\t\t\t...persistedRecord,\n\t\t\t\t\t\t\t...data,\n\t\t\t\t\t\t\t...updatedRecord,\n\t\t\t\t\t\t};\n\t\t\t\t\t\tnewRecord = Object.keys( newRecord ).reduce(\n\t\t\t\t\t\t\t( acc, key ) => {\n\t\t\t\t\t\t\t\t// These properties are persisted in autosaves.\n\t\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t\t[ 'title', 'excerpt', 'content' ].includes(\n\t\t\t\t\t\t\t\t\t\tkey\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\t\tacc[ key ] = newRecord[ key ];\n\t\t\t\t\t\t\t\t} else if ( key === 'status' ) {\n\t\t\t\t\t\t\t\t\t// Status is only persisted in autosaves when going from\n\t\t\t\t\t\t\t\t\t// \"auto-draft\" to \"draft\".\n\t\t\t\t\t\t\t\t\tacc[ key ] =\n\t\t\t\t\t\t\t\t\t\tpersistedRecord.status ===\n\t\t\t\t\t\t\t\t\t\t\t'auto-draft' &&\n\t\t\t\t\t\t\t\t\t\tnewRecord.status === 'draft'\n\t\t\t\t\t\t\t\t\t\t\t? newRecord.status\n\t\t\t\t\t\t\t\t\t\t\t: persistedRecord.status;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t// These properties are not persisted in autosaves.\n\t\t\t\t\t\t\t\t\tacc[ key ] = persistedRecord[ key ];\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\treturn acc;\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{}\n\t\t\t\t\t\t);\n\t\t\t\t\t\tdispatch.receiveEntityRecords(\n\t\t\t\t\t\t\tkind,\n\t\t\t\t\t\t\tname,\n\t\t\t\t\t\t\tnewRecord,\n\t\t\t\t\t\t\tundefined,\n\t\t\t\t\t\t\ttrue\n\t\t\t\t\t\t);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tdispatch.receiveAutosaves(\n\t\t\t\t\t\t\tpersistedRecord.id,\n\t\t\t\t\t\t\tupdatedRecord\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tlet edits = record;\n\t\t\t\t\tif ( entityConfig.__unstablePrePersist ) {\n\t\t\t\t\t\tedits = {\n\t\t\t\t\t\t\t...edits,\n\t\t\t\t\t\t\t...entityConfig.__unstablePrePersist(\n\t\t\t\t\t\t\t\tpersistedRecord,\n\t\t\t\t\t\t\t\tedits\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t};\n\t\t\t\t\t}\n\t\t\t\t\tupdatedRecord = await __unstableFetch( {\n\t\t\t\t\t\tpath,\n\t\t\t\t\t\tmethod: recordId ? 'PUT' : 'POST',\n\t\t\t\t\t\tdata: edits,\n\t\t\t\t\t} );\n\t\t\t\t\tdispatch.receiveEntityRecords(\n\t\t\t\t\t\tkind,\n\t\t\t\t\t\tname,\n\t\t\t\t\t\tupdatedRecord,\n\t\t\t\t\t\tundefined,\n\t\t\t\t\t\ttrue,\n\t\t\t\t\t\tedits\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t} catch ( _error ) {\n\t\t\t\thasError = true;\n\t\t\t\terror = _error;\n\t\t\t}\n\t\t\tdispatch( {\n\t\t\t\ttype: 'SAVE_ENTITY_RECORD_FINISH',\n\t\t\t\tkind,\n\t\t\t\tname,\n\t\t\t\trecordId,\n\t\t\t\terror,\n\t\t\t\tisAutosave,\n\t\t\t} );\n\n\t\t\tif ( hasError && throwOnError ) {\n\t\t\t\tthrow error;\n\t\t\t}\n\n\t\t\treturn updatedRecord;\n\t\t} finally {\n\t\t\tdispatch.__unstableReleaseStoreLock( lock );\n\t\t}\n\t};\n\n/**\n * Runs multiple core-data actions at the same time using one API request.\n *\n * Example:\n *\n * ```\n * const [ savedRecord, updatedRecord, deletedRecord ] =\n * await dispatch( 'core' ).__experimentalBatch( [\n * ( { saveEntityRecord } ) => saveEntityRecord( 'root', 'widget', widget ),\n * ( { saveEditedEntityRecord } ) => saveEntityRecord( 'root', 'widget', 123 ),\n * ( { deleteEntityRecord } ) => deleteEntityRecord( 'root', 'widget', 123, null ),\n * ] );\n * ```\n *\n * @param {Array} requests Array of functions which are invoked simultaneously.\n * Each function is passed an object containing\n * `saveEntityRecord`, `saveEditedEntityRecord`, and\n * `deleteEntityRecord`.\n *\n * @return {(thunkArgs: Object) => Promise} A promise that resolves to an array containing the return\n * values of each function given in `requests`.\n */\nexport const __experimentalBatch =\n\t( requests ) =>\n\tasync ( { dispatch } ) => {\n\t\tconst batch = createBatch();\n\t\tconst api = {\n\t\t\tsaveEntityRecord( kind, name, record, options ) {\n\t\t\t\treturn batch.add( ( add ) =>\n\t\t\t\t\tdispatch.saveEntityRecord( kind, name, record, {\n\t\t\t\t\t\t...options,\n\t\t\t\t\t\t__unstableFetch: add,\n\t\t\t\t\t} )\n\t\t\t\t);\n\t\t\t},\n\t\t\tsaveEditedEntityRecord( kind, name, recordId, options ) {\n\t\t\t\treturn batch.add( ( add ) =>\n\t\t\t\t\tdispatch.saveEditedEntityRecord( kind, name, recordId, {\n\t\t\t\t\t\t...options,\n\t\t\t\t\t\t__unstableFetch: add,\n\t\t\t\t\t} )\n\t\t\t\t);\n\t\t\t},\n\t\t\tdeleteEntityRecord( kind, name, recordId, query, options ) {\n\t\t\t\treturn batch.add( ( add ) =>\n\t\t\t\t\tdispatch.deleteEntityRecord( kind, name, recordId, query, {\n\t\t\t\t\t\t...options,\n\t\t\t\t\t\t__unstableFetch: add,\n\t\t\t\t\t} )\n\t\t\t\t);\n\t\t\t},\n\t\t};\n\t\tconst resultPromises = requests.map( ( request ) => request( api ) );\n\t\tconst [ , ...results ] = await Promise.all( [\n\t\t\tbatch.run(),\n\t\t\t...resultPromises,\n\t\t] );\n\t\treturn results;\n\t};\n\n/**\n * Action triggered to save an entity record's edits.\n *\n * @param {string} kind Kind of the entity.\n * @param {string} name Name of the entity.\n * @param {Object} recordId ID of the record.\n * @param {Object} options Saving options.\n */\nexport const saveEditedEntityRecord =\n\t( kind, name, recordId, options ) =>\n\tasync ( { select, dispatch } ) => {\n\t\tif ( ! select.hasEditsForEntityRecord( kind, name, recordId ) ) {\n\t\t\treturn;\n\t\t}\n\t\tconst configs = await dispatch( getOrLoadEntitiesConfig( kind ) );\n\t\tconst entityConfig = configs.find(\n\t\t\t( config ) => config.kind === kind && config.name === name\n\t\t);\n\t\tif ( ! entityConfig ) {\n\t\t\treturn;\n\t\t}\n\t\tconst entityIdKey = entityConfig.key || DEFAULT_ENTITY_KEY;\n\n\t\tconst edits = select.getEntityRecordNonTransientEdits(\n\t\t\tkind,\n\t\t\tname,\n\t\t\trecordId\n\t\t);\n\t\tconst record = { [ entityIdKey ]: recordId, ...edits };\n\t\treturn await dispatch.saveEntityRecord( kind, name, record, options );\n\t};\n\n/**\n * Action triggered to save only specified properties for the entity.\n *\n * @param {string} kind Kind of the entity.\n * @param {string} name Name of the entity.\n * @param {Object} recordId ID of the record.\n * @param {Array} itemsToSave List of entity properties to save.\n * @param {Object} options Saving options.\n */\nexport const __experimentalSaveSpecifiedEntityEdits =\n\t( kind, name, recordId, itemsToSave, options ) =>\n\tasync ( { select, dispatch } ) => {\n\t\tif ( ! select.hasEditsForEntityRecord( kind, name, recordId ) ) {\n\t\t\treturn;\n\t\t}\n\t\tconst edits = select.getEntityRecordNonTransientEdits(\n\t\t\tkind,\n\t\t\tname,\n\t\t\trecordId\n\t\t);\n\t\tconst editsToSave = {};\n\t\tfor ( const edit in edits ) {\n\t\t\tif ( itemsToSave.some( ( item ) => item === edit ) ) {\n\t\t\t\teditsToSave[ edit ] = edits[ edit ];\n\t\t\t}\n\t\t}\n\t\treturn await dispatch.saveEntityRecord(\n\t\t\tkind,\n\t\t\tname,\n\t\t\teditsToSave,\n\t\t\toptions\n\t\t);\n\t};\n\n/**\n * Returns an action object used in signalling that Upload permissions have been received.\n *\n * @deprecated since WP 5.9, use receiveUserPermission instead.\n *\n * @param {boolean} hasUploadPermissions Does the user have permission to upload files?\n *\n * @return {Object} Action object.\n */\nexport function receiveUploadPermissions( hasUploadPermissions ) {\n\tdeprecated( \"wp.data.dispatch( 'core' ).receiveUploadPermissions\", {\n\t\tsince: '5.9',\n\t\talternative: 'receiveUserPermission',\n\t} );\n\n\treturn receiveUserPermission( 'create/media', hasUploadPermissions );\n}\n\n/**\n * Returns an action object used in signalling that the current user has\n * permission to perform an action on a REST resource.\n * Ignored from documentation as it's internal to the data store.\n *\n * @ignore\n *\n * @param {string} key A key that represents the action and REST resource.\n * @param {boolean} isAllowed Whether or not the user can perform the action.\n *\n * @return {Object} Action object.\n */\nexport function receiveUserPermission( key, isAllowed ) {\n\treturn {\n\t\ttype: 'RECEIVE_USER_PERMISSION',\n\t\tkey,\n\t\tisAllowed,\n\t};\n}\n\n/**\n * Returns an action object used in signalling that the autosaves for a\n * post have been received.\n * Ignored from documentation as it's internal to the data store.\n *\n * @ignore\n *\n * @param {number} postId The id of the post that is parent to the autosave.\n * @param {Array|Object} autosaves An array of autosaves or singular autosave object.\n *\n * @return {Object} Action object.\n */\nexport function receiveAutosaves( postId, autosaves ) {\n\treturn {\n\t\ttype: 'RECEIVE_AUTOSAVES',\n\t\tpostId,\n\t\tautosaves: Array.isArray( autosaves ) ? autosaves : [ autosaves ],\n\t};\n}\n\n/**\n * Returns an action object signalling that the fallback Navigation\n * Menu id has been received.\n *\n * @param {integer} fallbackId the id of the fallback Navigation Menu\n * @return {Object} Action object.\n */\nexport function receiveNavigationFallbackId( fallbackId ) {\n\treturn {\n\t\ttype: 'RECEIVE_NAVIGATION_FALLBACK_ID',\n\t\tfallbackId,\n\t};\n}\n"]}
1
+ {"version":3,"sources":["@wordpress/core-data/src/actions.js"],"names":["fastDeepEqual","v4","uuid","apiFetch","addQueryArgs","deprecated","receiveItems","removeItems","receiveQueriedItems","getOrLoadEntitiesConfig","DEFAULT_ENTITY_KEY","createBatch","STORE_NAME","getUndoEdits","getRedoEdits","receiveUserQuery","queryID","users","type","Array","isArray","receiveCurrentUser","currentUser","addEntities","entities","receiveEntityRecords","kind","name","records","query","invalidateCache","edits","map","record","status","title","action","receiveCurrentTheme","currentTheme","__experimentalReceiveCurrentGlobalStylesId","currentGlobalStylesId","id","__experimentalReceiveThemeBaseGlobalStyles","stylesheet","globalStyles","__experimentalReceiveThemeGlobalStyleVariations","variations","receiveThemeSupports","since","receiveThemeGlobalStyleRevisions","currentId","revisions","receiveEmbedPreview","url","preview","deleteEntityRecord","recordId","__unstableFetch","throwOnError","dispatch","configs","entityConfig","find","config","error","deletedRecord","__experimentalNoFetch","lock","__unstableAcquireStoreLock","exclusive","hasError","path","baseURL","method","_error","__unstableReleaseStoreLock","editEntityRecord","options","select","getEntityConfig","Error","mergedEdits","getRawEntityRecord","editedRecord","getEditedEntityRecord","edit","Object","keys","reduce","acc","key","recordValue","editedRecordValue","value","undefined","meta","undo","undoIgnore","isCached","undoEdit","state","root","stackedEdits","redo","redoEdit","__unstableCreateUndoLevel","saveEntityRecord","isAutosave","resolveSelect","entityIdKey","entries","evaluatedValue","updatedRecord","persistedRecord","getCurrentUser","currentUserId","autosavePost","getAutosave","data","includes","newRecord","receiveAutosaves","__unstablePrePersist","__experimentalBatch","requests","batch","api","add","saveEditedEntityRecord","resultPromises","request","results","Promise","all","run","hasEditsForEntityRecord","getEntityRecordNonTransientEdits","__experimentalSaveSpecifiedEntityEdits","itemsToSave","editsToSave","some","item","receiveUploadPermissions","hasUploadPermissions","alternative","receiveUserPermission","isAllowed","postId","autosaves","receiveNavigationFallbackId","fallbackId"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,aAAP,MAA0B,qBAA1B;AACA,SAASC,EAAE,IAAIC,IAAf,QAA2B,MAA3B;AAEA;AACA;AACA;;AACA,OAA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AqD;AACpDsD,MAAAA,WAAW,CAAEtD,IAAF,CAAX,GAAsBtD,KAAK,CAAEsD,IAAF,CAA3B;AACA;AACD;;AACD,SAAO,MAAM1B,QAAQ,CAAC+C,gBAAT,CACZhF,IADY,EAEZC,IAFY,EAGZgH,WAHY,EAIZ9D,OAJY,CAAb;AAMA,CAvBK;AAyBP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,OAAO,SAASiE,wBAAT,CAAmCC,oBAAnC,EAA0D;AAChE1I,EAAAA,UAAU,CAAE,qDAAF,EAAyD;AAClE2C,IAAAA,KAAK,EAAE,KAD2D;AAElEgG,IAAAA,WAAW,EAAE;AAFqD,GAAzD,CAAV;AAKA,SAAOC,qBAAqB,CAAE,cAAF,EAAkBF,oBAAlB,CAA5B;AACA;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,OAAO,SAASE,qBAAT,CAAgCvD,GAAhC,EAAqCwD,SAArC,EAAiD;AACvD,SAAO;AACNhI,IAAAA,IAAI,EAAE,yBADA;AAENwE,IAAAA,GAFM;AAGNwD,IAAAA;AAHM,GAAP;AAKA;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,OAAO,SAASzB,gBAAT,CAA2B0B,MAA3B,EAAmCC,SAAnC,EAA+C;AACrD,SAAO;AACNlI,IAAAA,IAAI,EAAE,mBADA;AAENiI,IAAAA,MAFM;AAGNC,IAAAA,SAAS,EAAEjI,KAAK,CAACC,OAAN,CAAegI,SAAf,IAA6BA,SAA7B,GAAyC,CAAEA,SAAF;AAH9C,GAAP;AAKA;AAED;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,OAAO,SAASC,2BAAT,CAAsCC,UAAtC,EAAmD;AACzD,SAAO;AACNpI,IAAAA,IAAI,EAAE,gCADA;AAENoI,IAAAA;AAFM,GAAP;AAIA","sourcesContent":["/**\n * External dependencies\n */\nimport fastDeepEqual from 'fast-deep-equal/es6';\nimport { v4 as uuid } from 'uuid';\n\n/**\n * WordPress dependencies\n */\nimport apiFetch from '@wordpress/api-fetch';\nimport { addQueryArgs } from '@wordpress/url';\nimport deprecated from '@wordpress/deprecated';\n\n/**\n * Internal dependencies\n */\nimport { receiveItems, removeItems, receiveQueriedItems } from './queried-data';\nimport { getOrLoadEntitiesConfig, DEFAULT_ENTITY_KEY } from './entities';\nimport { createBatch } from './batch';\nimport { STORE_NAME } from './name';\nimport { getUndoEdits, getRedoEdits } from './private-selectors';\n\n/**\n * Returns an action object used in signalling that authors have been received.\n * Ignored from documentation as it's internal to the data store.\n *\n * @ignore\n *\n * @param {string} queryID Query ID.\n * @param {Array|Object} users Users received.\n *\n * @return {Object} Action object.\n */\nexport function receiveUserQuery( queryID, users ) {\n\treturn {\n\t\ttype: 'RECEIVE_USER_QUERY',\n\t\tusers: Array.isArray( users ) ? users : [ users ],\n\t\tqueryID,\n\t};\n}\n\n/**\n * Returns an action used in signalling that the current user has been received.\n * Ignored from documentation as it's internal to the data store.\n *\n * @ignore\n *\n * @param {Object} currentUser Current user object.\n *\n * @return {Object} Action object.\n */\nexport function receiveCurrentUser( currentUser ) {\n\treturn {\n\t\ttype: 'RECEIVE_CURRENT_USER',\n\t\tcurrentUser,\n\t};\n}\n\n/**\n * Returns an action object used in adding new entities.\n *\n * @param {Array} entities Entities received.\n *\n * @return {Object} Action object.\n */\nexport function addEntities( entities ) {\n\treturn {\n\t\ttype: 'ADD_ENTITIES',\n\t\tentities,\n\t};\n}\n\n/**\n * Returns an action object used in signalling that entity records have been received.\n *\n * @param {string} kind Kind of the received entity record.\n * @param {string} name Name of the received entity record.\n * @param {Array|Object} records Records received.\n * @param {?Object} query Query Object.\n * @param {?boolean} invalidateCache Should invalidate query caches.\n * @param {?Object} edits Edits to reset.\n * @return {Object} Action object.\n */\nexport function receiveEntityRecords(\n\tkind,\n\tname,\n\trecords,\n\tquery,\n\tinvalidateCache = false,\n\tedits\n) {\n\t// Auto drafts should not have titles, but some plugins rely on them so we can't filter this\n\t// on the server.\n\tif ( kind === 'postType' ) {\n\t\trecords = ( Array.isArray( records ) ? records : [ records ] ).map(\n\t\t\t( record ) =>\n\t\t\t\trecord.status === 'auto-draft'\n\t\t\t\t\t? { ...record, title: '' }\n\t\t\t\t\t: record\n\t\t);\n\t}\n\tlet action;\n\tif ( query ) {\n\t\taction = receiveQueriedItems( records, query, edits );\n\t} else {\n\t\taction = receiveItems( records, edits );\n\t}\n\n\treturn {\n\t\t...action,\n\t\tkind,\n\t\tname,\n\t\tinvalidateCache,\n\t};\n}\n\n/**\n * Returns an action object used in signalling that the current theme has been received.\n * Ignored from documentation as it's internal to the data store.\n *\n * @ignore\n *\n * @param {Object} currentTheme The current theme.\n *\n * @return {Object} Action object.\n */\nexport function receiveCurrentTheme( currentTheme ) {\n\treturn {\n\t\ttype: 'RECEIVE_CURRENT_THEME',\n\t\tcurrentTheme,\n\t};\n}\n\n/**\n * Returns an action object used in signalling that the current global styles id has been received.\n * Ignored from documentation as it's internal to the data store.\n *\n * @ignore\n *\n * @param {string} currentGlobalStylesId The current global styles id.\n *\n * @return {Object} Action object.\n */\nexport function __experimentalReceiveCurrentGlobalStylesId(\n\tcurrentGlobalStylesId\n) {\n\treturn {\n\t\ttype: 'RECEIVE_CURRENT_GLOBAL_STYLES_ID',\n\t\tid: currentGlobalStylesId,\n\t};\n}\n\n/**\n * Returns an action object used in signalling that the theme base global styles have been received\n * Ignored from documentation as it's internal to the data store.\n *\n * @ignore\n *\n * @param {string} stylesheet The theme's identifier\n * @param {Object} globalStyles The global styles object.\n *\n * @return {Object} Action object.\n */\nexport function __experimentalReceiveThemeBaseGlobalStyles(\n\tstylesheet,\n\tglobalStyles\n) {\n\treturn {\n\t\ttype: 'RECEIVE_THEME_GLOBAL_STYLES',\n\t\tstylesheet,\n\t\tglobalStyles,\n\t};\n}\n\n/**\n * Returns an action object used in signalling that the theme global styles variations have been received.\n * Ignored from documentation as it's internal to the data store.\n *\n * @ignore\n *\n * @param {string} stylesheet The theme's identifier\n * @param {Array} variations The global styles variations.\n *\n * @return {Object} Action object.\n */\nexport function __experimentalReceiveThemeGlobalStyleVariations(\n\tstylesheet,\n\tvariations\n) {\n\treturn {\n\t\ttype: 'RECEIVE_THEME_GLOBAL_STYLE_VARIATIONS',\n\t\tstylesheet,\n\t\tvariations,\n\t};\n}\n\n/**\n * Returns an action object used in signalling that the index has been received.\n *\n * @deprecated since WP 5.9, this is not useful anymore, use the selector direclty.\n *\n * @return {Object} Action object.\n */\nexport function receiveThemeSupports() {\n\tdeprecated( \"wp.data.dispatch( 'core' ).receiveThemeSupports\", {\n\t\tsince: '5.9',\n\t} );\n\n\treturn {\n\t\ttype: 'DO_NOTHING',\n\t};\n}\n\n/**\n * Returns an action object used in signalling that the theme global styles CPT post revisions have been received.\n * Ignored from documentation as it's internal to the data store.\n *\n * @ignore\n *\n * @param {number} currentId The post id.\n * @param {Array} revisions The global styles revisions.\n *\n * @return {Object} Action object.\n */\nexport function receiveThemeGlobalStyleRevisions( currentId, revisions ) {\n\treturn {\n\t\ttype: 'RECEIVE_THEME_GLOBAL_STYLE_REVISIONS',\n\t\tcurrentId,\n\t\trevisions,\n\t};\n}\n\n/**\n * Returns an action object used in signalling that the preview data for\n * a given URl has been received.\n * Ignored from documentation as it's internal to the data store.\n *\n * @ignore\n *\n * @param {string} url URL to preview the embed for.\n * @param {*} preview Preview data.\n *\n * @return {Object} Action object.\n */\nexport function receiveEmbedPreview( url, preview ) {\n\treturn {\n\t\ttype: 'RECEIVE_EMBED_PREVIEW',\n\t\turl,\n\t\tpreview,\n\t};\n}\n\n/**\n * Action triggered to delete an entity record.\n *\n * @param {string} kind Kind of the deleted entity.\n * @param {string} name Name of the deleted entity.\n * @param {string} recordId Record ID of the deleted entity.\n * @param {?Object} query Special query parameters for the\n * DELETE API call.\n * @param {Object} [options] Delete options.\n * @param {Function} [options.__unstableFetch] Internal use only. Function to\n * call instead of `apiFetch()`.\n * Must return a promise.\n * @param {boolean} [options.throwOnError=false] If false, this action suppresses all\n * the exceptions. Defaults to false.\n */\nexport const deleteEntityRecord =\n\t(\n\t\tkind,\n\t\tname,\n\t\trecordId,\n\t\tquery,\n\t\t{ __unstableFetch = apiFetch, throwOnError = false } = {}\n\t) =>\n\tasync ( { dispatch } ) => {\n\t\tconst configs = await dispatch( getOrLoadEntitiesConfig( kind ) );\n\t\tconst entityConfig = configs.find(\n\t\t\t( config ) => config.kind === kind && config.name === name\n\t\t);\n\t\tlet error;\n\t\tlet deletedRecord = false;\n\t\tif ( ! entityConfig || entityConfig?.__experimentalNoFetch ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst lock = await dispatch.__unstableAcquireStoreLock(\n\t\t\tSTORE_NAME,\n\t\t\t[ 'entities', 'records', kind, name, recordId ],\n\t\t\t{ exclusive: true }\n\t\t);\n\n\t\ttry {\n\t\t\tdispatch( {\n\t\t\t\ttype: 'DELETE_ENTITY_RECORD_START',\n\t\t\t\tkind,\n\t\t\t\tname,\n\t\t\t\trecordId,\n\t\t\t} );\n\n\t\t\tlet hasError = false;\n\t\t\ttry {\n\t\t\t\tlet path = `${ entityConfig.baseURL }/${ recordId }`;\n\n\t\t\t\tif ( query ) {\n\t\t\t\t\tpath = addQueryArgs( path, query );\n\t\t\t\t}\n\n\t\t\t\tdeletedRecord = await __unstableFetch( {\n\t\t\t\t\tpath,\n\t\t\t\t\tmethod: 'DELETE',\n\t\t\t\t} );\n\n\t\t\t\tawait dispatch( removeItems( kind, name, recordId, true ) );\n\t\t\t} catch ( _error ) {\n\t\t\t\thasError = true;\n\t\t\t\terror = _error;\n\t\t\t}\n\n\t\t\tdispatch( {\n\t\t\t\ttype: 'DELETE_ENTITY_RECORD_FINISH',\n\t\t\t\tkind,\n\t\t\t\tname,\n\t\t\t\trecordId,\n\t\t\t\terror,\n\t\t\t} );\n\n\t\t\tif ( hasError && throwOnError ) {\n\t\t\t\tthrow error;\n\t\t\t}\n\n\t\t\treturn deletedRecord;\n\t\t} finally {\n\t\t\tdispatch.__unstableReleaseStoreLock( lock );\n\t\t}\n\t};\n\n/**\n * Returns an action object that triggers an\n * edit to an entity record.\n *\n * @param {string} kind Kind of the edited entity record.\n * @param {string} name Name of the edited entity record.\n * @param {number|string} recordId Record ID of the edited entity record.\n * @param {Object} edits The edits.\n * @param {Object} options Options for the edit.\n * @param {boolean} [options.undoIgnore] Whether to ignore the edit in undo history or not.\n *\n * @return {Object} Action object.\n */\nexport const editEntityRecord =\n\t( kind, name, recordId, edits, options = {} ) =>\n\t( { select, dispatch } ) => {\n\t\tconst entityConfig = select.getEntityConfig( kind, name );\n\t\tif ( ! entityConfig ) {\n\t\t\tthrow new Error(\n\t\t\t\t`The entity being edited (${ kind }, ${ name }) does not have a loaded config.`\n\t\t\t);\n\t\t}\n\t\tconst { mergedEdits = {} } = entityConfig;\n\t\tconst record = select.getRawEntityRecord( kind, name, recordId );\n\t\tconst editedRecord = select.getEditedEntityRecord(\n\t\t\tkind,\n\t\t\tname,\n\t\t\trecordId\n\t\t);\n\n\t\tconst edit = {\n\t\t\tkind,\n\t\t\tname,\n\t\t\trecordId,\n\t\t\t// Clear edits when they are equal to their persisted counterparts\n\t\t\t// so that the property is not considered dirty.\n\t\t\tedits: Object.keys( edits ).reduce( ( acc, key ) => {\n\t\t\t\tconst recordValue = record[ key ];\n\t\t\t\tconst editedRecordValue = editedRecord[ key ];\n\t\t\t\tconst value = mergedEdits[ key ]\n\t\t\t\t\t? { ...editedRecordValue, ...edits[ key ] }\n\t\t\t\t\t: edits[ key ];\n\t\t\t\tacc[ key ] = fastDeepEqual( recordValue, value )\n\t\t\t\t\t? undefined\n\t\t\t\t\t: value;\n\t\t\t\treturn acc;\n\t\t\t}, {} ),\n\t\t};\n\t\tdispatch( {\n\t\t\ttype: 'EDIT_ENTITY_RECORD',\n\t\t\t...edit,\n\t\t\tmeta: {\n\t\t\t\tundo: ! options.undoIgnore && {\n\t\t\t\t\t...edit,\n\t\t\t\t\t// Send the current values for things like the first undo stack entry.\n\t\t\t\t\tedits: Object.keys( edits ).reduce( ( acc, key ) => {\n\t\t\t\t\t\tacc[ key ] = editedRecord[ key ];\n\t\t\t\t\t\treturn acc;\n\t\t\t\t\t}, {} ),\n\t\t\t\t\tisCached: options.isCached,\n\t\t\t\t},\n\t\t\t},\n\t\t} );\n\t};\n\n/**\n * Action triggered to undo the last edit to\n * an entity record, if any.\n */\nexport const undo =\n\t() =>\n\t( { select, dispatch } ) => {\n\t\t// Todo: we shouldn't have to pass \"root\" here.\n\t\tconst undoEdit = select( ( state ) => getUndoEdits( state.root ) );\n\t\tif ( ! undoEdit ) {\n\t\t\treturn;\n\t\t}\n\t\tdispatch( {\n\t\t\ttype: 'UNDO',\n\t\t\tstackedEdits: undoEdit,\n\t\t} );\n\t};\n\n/**\n * Action triggered to redo the last undoed\n * edit to an entity record, if any.\n */\nexport const redo =\n\t() =>\n\t( { select, dispatch } ) => {\n\t\t// Todo: we shouldn't have to pass \"root\" here.\n\t\tconst redoEdit = select( ( state ) => getRedoEdits( state.root ) );\n\t\tif ( ! redoEdit ) {\n\t\t\treturn;\n\t\t}\n\t\tdispatch( {\n\t\t\ttype: 'REDO',\n\t\t\tstackedEdits: redoEdit,\n\t\t} );\n\t};\n\n/**\n * Forces the creation of a new undo level.\n *\n * @return {Object} Action object.\n */\nexport function __unstableCreateUndoLevel() {\n\treturn { type: 'CREATE_UNDO_LEVEL' };\n}\n\n/**\n * Action triggered to save an entity record.\n *\n * @param {string} kind Kind of the received entity.\n * @param {string} name Name of the received entity.\n * @param {Object} record Record to be saved.\n * @param {Object} options Saving options.\n * @param {boolean} [options.isAutosave=false] Whether this is an autosave.\n * @param {Function} [options.__unstableFetch] Internal use only. Function to\n * call instead of `apiFetch()`.\n * Must return a promise.\n * @param {boolean} [options.throwOnError=false] If false, this action suppresses all\n * the exceptions. Defaults to false.\n */\nexport const saveEntityRecord =\n\t(\n\t\tkind,\n\t\tname,\n\t\trecord,\n\t\t{\n\t\t\tisAutosave = false,\n\t\t\t__unstableFetch = apiFetch,\n\t\t\tthrowOnError = false,\n\t\t} = {}\n\t) =>\n\tasync ( { select, resolveSelect, dispatch } ) => {\n\t\tconst configs = await dispatch( getOrLoadEntitiesConfig( kind ) );\n\t\tconst entityConfig = configs.find(\n\t\t\t( config ) => config.kind === kind && config.name === name\n\t\t);\n\t\tif ( ! entityConfig || entityConfig?.__experimentalNoFetch ) {\n\t\t\treturn;\n\t\t}\n\t\tconst entityIdKey = entityConfig.key || DEFAULT_ENTITY_KEY;\n\t\tconst recordId = record[ entityIdKey ];\n\n\t\tconst lock = await dispatch.__unstableAcquireStoreLock(\n\t\t\tSTORE_NAME,\n\t\t\t[ 'entities', 'records', kind, name, recordId || uuid() ],\n\t\t\t{ exclusive: true }\n\t\t);\n\n\t\ttry {\n\t\t\t// Evaluate optimized edits.\n\t\t\t// (Function edits that should be evaluated on save to avoid expensive computations on every edit.)\n\t\t\tfor ( const [ key, value ] of Object.entries( record ) ) {\n\t\t\t\tif ( typeof value === 'function' ) {\n\t\t\t\t\tconst evaluatedValue = value(\n\t\t\t\t\t\tselect.getEditedEntityRecord( kind, name, recordId )\n\t\t\t\t\t);\n\t\t\t\t\tdispatch.editEntityRecord(\n\t\t\t\t\t\tkind,\n\t\t\t\t\t\tname,\n\t\t\t\t\t\trecordId,\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t[ key ]: evaluatedValue,\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{ undoIgnore: true }\n\t\t\t\t\t);\n\t\t\t\t\trecord[ key ] = evaluatedValue;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tdispatch( {\n\t\t\t\ttype: 'SAVE_ENTITY_RECORD_START',\n\t\t\t\tkind,\n\t\t\t\tname,\n\t\t\t\trecordId,\n\t\t\t\tisAutosave,\n\t\t\t} );\n\t\t\tlet updatedRecord;\n\t\t\tlet error;\n\t\t\tlet hasError = false;\n\t\t\ttry {\n\t\t\t\tconst path = `${ entityConfig.baseURL }${\n\t\t\t\t\trecordId ? '/' + recordId : ''\n\t\t\t\t}`;\n\t\t\t\tconst persistedRecord = select.getRawEntityRecord(\n\t\t\t\t\tkind,\n\t\t\t\t\tname,\n\t\t\t\t\trecordId\n\t\t\t\t);\n\n\t\t\t\tif ( isAutosave ) {\n\t\t\t\t\t// Most of this autosave logic is very specific to posts.\n\t\t\t\t\t// This is fine for now as it is the only supported autosave,\n\t\t\t\t\t// but ideally this should all be handled in the back end,\n\t\t\t\t\t// so the client just sends and receives objects.\n\t\t\t\t\tconst currentUser = select.getCurrentUser();\n\t\t\t\t\tconst currentUserId = currentUser\n\t\t\t\t\t\t? currentUser.id\n\t\t\t\t\t\t: undefined;\n\t\t\t\t\tconst autosavePost = await resolveSelect.getAutosave(\n\t\t\t\t\t\tpersistedRecord.type,\n\t\t\t\t\t\tpersistedRecord.id,\n\t\t\t\t\t\tcurrentUserId\n\t\t\t\t\t);\n\t\t\t\t\t// Autosaves need all expected fields to be present.\n\t\t\t\t\t// So we fallback to the previous autosave and then\n\t\t\t\t\t// to the actual persisted entity if the edits don't\n\t\t\t\t\t// have a value.\n\t\t\t\t\tlet data = {\n\t\t\t\t\t\t...persistedRecord,\n\t\t\t\t\t\t...autosavePost,\n\t\t\t\t\t\t...record,\n\t\t\t\t\t};\n\t\t\t\t\tdata = Object.keys( data ).reduce(\n\t\t\t\t\t\t( acc, key ) => {\n\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t[\n\t\t\t\t\t\t\t\t\t'title',\n\t\t\t\t\t\t\t\t\t'excerpt',\n\t\t\t\t\t\t\t\t\t'content',\n\t\t\t\t\t\t\t\t\t'meta',\n\t\t\t\t\t\t\t\t].includes( key )\n\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\tacc[ key ] = data[ key ];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn acc;\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tstatus:\n\t\t\t\t\t\t\t\tdata.status === 'auto-draft'\n\t\t\t\t\t\t\t\t\t? 'draft'\n\t\t\t\t\t\t\t\t\t: data.status,\n\t\t\t\t\t\t}\n\t\t\t\t\t);\n\t\t\t\t\tupdatedRecord = await __unstableFetch( {\n\t\t\t\t\t\tpath: `${ path }/autosaves`,\n\t\t\t\t\t\tmethod: 'POST',\n\t\t\t\t\t\tdata,\n\t\t\t\t\t} );\n\n\t\t\t\t\t// An autosave may be processed by the server as a regular save\n\t\t\t\t\t// when its update is requested by the author and the post had\n\t\t\t\t\t// draft or auto-draft status.\n\t\t\t\t\tif ( persistedRecord.id === updatedRecord.id ) {\n\t\t\t\t\t\tlet newRecord = {\n\t\t\t\t\t\t\t...persistedRecord,\n\t\t\t\t\t\t\t...data,\n\t\t\t\t\t\t\t...updatedRecord,\n\t\t\t\t\t\t};\n\t\t\t\t\t\tnewRecord = Object.keys( newRecord ).reduce(\n\t\t\t\t\t\t\t( acc, key ) => {\n\t\t\t\t\t\t\t\t// These properties are persisted in autosaves.\n\t\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t\t[ 'title', 'excerpt', 'content' ].includes(\n\t\t\t\t\t\t\t\t\t\tkey\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\t\tacc[ key ] = newRecord[ key ];\n\t\t\t\t\t\t\t\t} else if ( key === 'status' ) {\n\t\t\t\t\t\t\t\t\t// Status is only persisted in autosaves when going from\n\t\t\t\t\t\t\t\t\t// \"auto-draft\" to \"draft\".\n\t\t\t\t\t\t\t\t\tacc[ key ] =\n\t\t\t\t\t\t\t\t\t\tpersistedRecord.status ===\n\t\t\t\t\t\t\t\t\t\t\t'auto-draft' &&\n\t\t\t\t\t\t\t\t\t\tnewRecord.status === 'draft'\n\t\t\t\t\t\t\t\t\t\t\t? newRecord.status\n\t\t\t\t\t\t\t\t\t\t\t: persistedRecord.status;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t// These properties are not persisted in autosaves.\n\t\t\t\t\t\t\t\t\tacc[ key ] = persistedRecord[ key ];\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\treturn acc;\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{}\n\t\t\t\t\t\t);\n\t\t\t\t\t\tdispatch.receiveEntityRecords(\n\t\t\t\t\t\t\tkind,\n\t\t\t\t\t\t\tname,\n\t\t\t\t\t\t\tnewRecord,\n\t\t\t\t\t\t\tundefined,\n\t\t\t\t\t\t\ttrue\n\t\t\t\t\t\t);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tdispatch.receiveAutosaves(\n\t\t\t\t\t\t\tpersistedRecord.id,\n\t\t\t\t\t\t\tupdatedRecord\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tlet edits = record;\n\t\t\t\t\tif ( entityConfig.__unstablePrePersist ) {\n\t\t\t\t\t\tedits = {\n\t\t\t\t\t\t\t...edits,\n\t\t\t\t\t\t\t...entityConfig.__unstablePrePersist(\n\t\t\t\t\t\t\t\tpersistedRecord,\n\t\t\t\t\t\t\t\tedits\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t};\n\t\t\t\t\t}\n\t\t\t\t\tupdatedRecord = await __unstableFetch( {\n\t\t\t\t\t\tpath,\n\t\t\t\t\t\tmethod: recordId ? 'PUT' : 'POST',\n\t\t\t\t\t\tdata: edits,\n\t\t\t\t\t} );\n\t\t\t\t\tdispatch.receiveEntityRecords(\n\t\t\t\t\t\tkind,\n\t\t\t\t\t\tname,\n\t\t\t\t\t\tupdatedRecord,\n\t\t\t\t\t\tundefined,\n\t\t\t\t\t\ttrue,\n\t\t\t\t\t\tedits\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t} catch ( _error ) {\n\t\t\t\thasError = true;\n\t\t\t\terror = _error;\n\t\t\t}\n\t\t\tdispatch( {\n\t\t\t\ttype: 'SAVE_ENTITY_RECORD_FINISH',\n\t\t\t\tkind,\n\t\t\t\tname,\n\t\t\t\trecordId,\n\t\t\t\terror,\n\t\t\t\tisAutosave,\n\t\t\t} );\n\n\t\t\tif ( hasError && throwOnError ) {\n\t\t\t\tthrow error;\n\t\t\t}\n\n\t\t\treturn updatedRecord;\n\t\t} finally {\n\t\t\tdispatch.__unstableReleaseStoreLock( lock );\n\t\t}\n\t};\n\n/**\n * Runs multiple core-data actions at the same time using one API request.\n *\n * Example:\n *\n * ```\n * const [ savedRecord, updatedRecord, deletedRecord ] =\n * await dispatch( 'core' ).__experimentalBatch( [\n * ( { saveEntityRecord } ) => saveEntityRecord( 'root', 'widget', widget ),\n * ( { saveEditedEntityRecord } ) => saveEntityRecord( 'root', 'widget', 123 ),\n * ( { deleteEntityRecord } ) => deleteEntityRecord( 'root', 'widget', 123, null ),\n * ] );\n * ```\n *\n * @param {Array} requests Array of functions which are invoked simultaneously.\n * Each function is passed an object containing\n * `saveEntityRecord`, `saveEditedEntityRecord`, and\n * `deleteEntityRecord`.\n *\n * @return {(thunkArgs: Object) => Promise} A promise that resolves to an array containing the return\n * values of each function given in `requests`.\n */\nexport const __experimentalBatch =\n\t( requests ) =>\n\tasync ( { dispatch } ) => {\n\t\tconst batch = createBatch();\n\t\tconst api = {\n\t\t\tsaveEntityRecord( kind, name, record, options ) {\n\t\t\t\treturn batch.add( ( add ) =>\n\t\t\t\t\tdispatch.saveEntityRecord( kind, name, record, {\n\t\t\t\t\t\t...options,\n\t\t\t\t\t\t__unstableFetch: add,\n\t\t\t\t\t} )\n\t\t\t\t);\n\t\t\t},\n\t\t\tsaveEditedEntityRecord( kind, name, recordId, options ) {\n\t\t\t\treturn batch.add( ( add ) =>\n\t\t\t\t\tdispatch.saveEditedEntityRecord( kind, name, recordId, {\n\t\t\t\t\t\t...options,\n\t\t\t\t\t\t__unstableFetch: add,\n\t\t\t\t\t} )\n\t\t\t\t);\n\t\t\t},\n\t\t\tdeleteEntityRecord( kind, name, recordId, query, options ) {\n\t\t\t\treturn batch.add( ( add ) =>\n\t\t\t\t\tdispatch.deleteEntityRecord( kind, name, recordId, query, {\n\t\t\t\t\t\t...options,\n\t\t\t\t\t\t__unstableFetch: add,\n\t\t\t\t\t} )\n\t\t\t\t);\n\t\t\t},\n\t\t};\n\t\tconst resultPromises = requests.map( ( request ) => request( api ) );\n\t\tconst [ , ...results ] = await Promise.all( [\n\t\t\tbatch.run(),\n\t\t\t...resultPromises,\n\t\t] );\n\t\treturn results;\n\t};\n\n/**\n * Action triggered to save an entity record's edits.\n *\n * @param {string} kind Kind of the entity.\n * @param {string} name Name of the entity.\n * @param {Object} recordId ID of the record.\n * @param {Object} options Saving options.\n */\nexport const saveEditedEntityRecord =\n\t( kind, name, recordId, options ) =>\n\tasync ( { select, dispatch } ) => {\n\t\tif ( ! select.hasEditsForEntityRecord( kind, name, recordId ) ) {\n\t\t\treturn;\n\t\t}\n\t\tconst configs = await dispatch( getOrLoadEntitiesConfig( kind ) );\n\t\tconst entityConfig = configs.find(\n\t\t\t( config ) => config.kind === kind && config.name === name\n\t\t);\n\t\tif ( ! entityConfig ) {\n\t\t\treturn;\n\t\t}\n\t\tconst entityIdKey = entityConfig.key || DEFAULT_ENTITY_KEY;\n\n\t\tconst edits = select.getEntityRecordNonTransientEdits(\n\t\t\tkind,\n\t\t\tname,\n\t\t\trecordId\n\t\t);\n\t\tconst record = { [ entityIdKey ]: recordId, ...edits };\n\t\treturn await dispatch.saveEntityRecord( kind, name, record, options );\n\t};\n\n/**\n * Action triggered to save only specified properties for the entity.\n *\n * @param {string} kind Kind of the entity.\n * @param {string} name Name of the entity.\n * @param {Object} recordId ID of the record.\n * @param {Array} itemsToSave List of entity properties to save.\n * @param {Object} options Saving options.\n */\nexport const __experimentalSaveSpecifiedEntityEdits =\n\t( kind, name, recordId, itemsToSave, options ) =>\n\tasync ( { select, dispatch } ) => {\n\t\tif ( ! select.hasEditsForEntityRecord( kind, name, recordId ) ) {\n\t\t\treturn;\n\t\t}\n\t\tconst edits = select.getEntityRecordNonTransientEdits(\n\t\t\tkind,\n\t\t\tname,\n\t\t\trecordId\n\t\t);\n\t\tconst editsToSave = {};\n\t\tfor ( const edit in edits ) {\n\t\t\tif ( itemsToSave.some( ( item ) => item === edit ) ) {\n\t\t\t\teditsToSave[ edit ] = edits[ edit ];\n\t\t\t}\n\t\t}\n\t\treturn await dispatch.saveEntityRecord(\n\t\t\tkind,\n\t\t\tname,\n\t\t\teditsToSave,\n\t\t\toptions\n\t\t);\n\t};\n\n/**\n * Returns an action object used in signalling that Upload permissions have been received.\n *\n * @deprecated since WP 5.9, use receiveUserPermission instead.\n *\n * @param {boolean} hasUploadPermissions Does the user have permission to upload files?\n *\n * @return {Object} Action object.\n */\nexport function receiveUploadPermissions( hasUploadPermissions ) {\n\tdeprecated( \"wp.data.dispatch( 'core' ).receiveUploadPermissions\", {\n\t\tsince: '5.9',\n\t\talternative: 'receiveUserPermission',\n\t} );\n\n\treturn receiveUserPermission( 'create/media', hasUploadPermissions );\n}\n\n/**\n * Returns an action object used in signalling that the current user has\n * permission to perform an action on a REST resource.\n * Ignored from documentation as it's internal to the data store.\n *\n * @ignore\n *\n * @param {string} key A key that represents the action and REST resource.\n * @param {boolean} isAllowed Whether or not the user can perform the action.\n *\n * @return {Object} Action object.\n */\nexport function receiveUserPermission( key, isAllowed ) {\n\treturn {\n\t\ttype: 'RECEIVE_USER_PERMISSION',\n\t\tkey,\n\t\tisAllowed,\n\t};\n}\n\n/**\n * Returns an action object used in signalling that the autosaves for a\n * post have been received.\n * Ignored from documentation as it's internal to the data store.\n *\n * @ignore\n *\n * @param {number} postId The id of the post that is parent to the autosave.\n * @param {Array|Object} autosaves An array of autosaves or singular autosave object.\n *\n * @return {Object} Action object.\n */\nexport function receiveAutosaves( postId, autosaves ) {\n\treturn {\n\t\ttype: 'RECEIVE_AUTOSAVES',\n\t\tpostId,\n\t\tautosaves: Array.isArray( autosaves ) ? autosaves : [ autosaves ],\n\t};\n}\n\n/**\n * Returns an action object signalling that the fallback Navigation\n * Menu id has been received.\n *\n * @param {integer} fallbackId the id of the fallback Navigation Menu\n * @return {Object} Action object.\n */\nexport function receiveNavigationFallbackId( fallbackId ) {\n\treturn {\n\t\ttype: 'RECEIVE_NAVIGATION_FALLBACK_ID',\n\t\tfallbackId,\n\t};\n}\n"]}
@@ -226,6 +226,11 @@ export function useEntityBlockEditor(kind, name, {
226
226
  });
227
227
 
228
228
  function updateAttributes(attributes) {
229
+ // Only attempt to update attributes, if attributes is an object.
230
+ if (!attributes || Array.isArray(attributes) || typeof attributes !== 'object') {
231
+ return attributes;
232
+ }
233
+
229
234
  attributes = { ...attributes
230
235
  };
231
236
 
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/core-data/src/entity-provider.js"],"names":["createContext","useContext","useCallback","useEffect","useSelect","useDispatch","parse","__unstableSerializeAndClean","privateApis","blockEditorPrivateApis","STORE_NAME","unlock","EMPTY_ARRAY","oldFootnotes","rootEntitiesConfig","additionalEntityConfigLoaders","entityContexts","reduce","acc","loader","kind","name","context","undefined","getEntityContext","Error","EntityProvider","type","id","children","Provider","useEntityId","useEntityProp","prop","_id","providerId","value","fullValue","select","getEntityRecord","getEditedEntityRecord","record","editedRecord","editEntityRecord","setValue","newValue","useEntityBlockEditor","content","blocks","meta","__unstableCreateUndoLevel","parsedContent","undoIgnore","updateFootnotes","_blocks","output","footnotes","getRichTextValues","_content","join","newOrder","indexOf","regex","match","exec","push","JSON","currentOrder","map","fn","newFootnotes","fnId","find","updateAttributes","attributes","key","Array","isArray","replace","opening","index","compatRegex","updateBlocksAttributes","__blocks","block","innerBlocks","newBlocks","includes","stringify","onChange","options","noChange","selection","edits","blocksForSerialization","isCached","onInput","footnotesChanges"],"mappings":";;AAAA;AACA;AACA;AACA,SACCA,aADD,EAECC,UAFD,EAGCC,WAHD,EAICC,SAJD,QAKO,oBALP;AAMA,SAASC,SAAT,EAAoBC,WAApB,QAAuC,iBAAvC;AACA,SAASC,KAAT,EAAgBC,2BAAhB,QAAmD,mBAAnD;AAC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,EAAkBiE,KAAlB,EAAyB;AAAEE,MAAAA,QAAQ,EAAE;AAAZ,KAAzB,CAAhB;AACA,GAnB0B,EAoB3B,CACC3E,IADD,EAECC,IAFD,EAGCO,EAHD,EAICoB,MAJD,EAKCK,eALD,EAMCH,yBAND,EAOCP,gBAPD,CApB2B,CAA5B;AA+BA,QAAMqD,OAAO,GAAG9F,WAAW,CAC1B,CAAEoF,SAAF,EAAaI,OAAb,KAA0B;AACzB,UAAM;AAAEE,MAAAA;AAAF,QAAgBF,OAAtB;AACA,UAAMO,gBAAgB,GAAG5C,eAAe,CAAEiC,SAAF,CAAxC;AACA,UAAMO,KAAK,GAAG;AAAED,MAAAA,SAAF;AAAa,SAAGK;AAAhB,KAAd;AAEAtD,IAAAA,gBAAgB,CAAEvB,IAAF,EAAQC,IAAR,EAAcO,EAAd,EAAkBiE,KAAlB,EAAyB;AAAEE,MAAAA,QAAQ,EAAE;AAAZ,KAAzB,CAAhB;AACA,GAPyB,EAQ1B,CAAE3E,IAAF,EAAQC,IAAR,EAAcO,EAAd,EAAkByB,eAAlB,EAAmCV,gBAAnC,CAR0B,CAA3B;AAWA,SAAO,CAAEK,MAAF,aAAEA,MAAF,cAAEA,MAAF,GAAYpC,WAAZ,EAAyBoF,OAAzB,EAAkCP,QAAlC,CAAP;AACA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\tcreateContext,\n\tuseContext,\n\tuseCallback,\n\tuseEffect,\n} from '@wordpress/element';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { parse, __unstableSerializeAndClean } from '@wordpress/blocks';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport { STORE_NAME } from './name';\nimport { unlock } from './private-apis';\n\n/** @typedef {import('@wordpress/blocks').WPBlock} WPBlock */\n\nconst EMPTY_ARRAY = [];\n\nlet oldFootnotes = {};\n\n/**\n * Internal dependencies\n */\nimport { rootEntitiesConfig, additionalEntityConfigLoaders } from './entities';\n\nconst entityContexts = {\n\t...rootEntitiesConfig.reduce( ( acc, loader ) => {\n\t\tif ( ! acc[ loader.kind ] ) {\n\t\t\tacc[ loader.kind ] = {};\n\t\t}\n\t\tacc[ loader.kind ][ loader.name ] = {\n\t\t\tcontext: createContext( undefined ),\n\t\t};\n\t\treturn acc;\n\t}, {} ),\n\t...additionalEntityConfigLoaders.reduce( ( acc, loader ) => {\n\t\tacc[ loader.kind ] = {};\n\t\treturn acc;\n\t}, {} ),\n};\nconst getEntityContext = ( kind, name ) => {\n\tif ( ! entityContexts[ kind ] ) {\n\t\tthrow new Error( `Missing entity config for kind: ${ kind }.` );\n\t}\n\n\tif ( ! entityContexts[ kind ][ name ] ) {\n\t\tentityContexts[ kind ][ name ] = {\n\t\t\tcontext: createContext( undefined ),\n\t\t};\n\t}\n\n\treturn entityContexts[ kind ][ name ].context;\n};\n\n/**\n * Context provider component for providing\n * an entity for a specific entity.\n *\n * @param {Object} props The component's props.\n * @param {string} props.kind The entity kind.\n * @param {string} props.type The entity name.\n * @param {number} props.id The entity ID.\n * @param {*} props.children The children to wrap.\n *\n * @return {Object} The provided children, wrapped with\n * the entity's context provider.\n */\nexport default function EntityProvider( { kind, type: name, id, children } ) {\n\tconst Provider = getEntityContext( kind, name ).Provider;\n\treturn <Provider value={ id }>{ children }</Provider>;\n}\n\n/**\n * Hook that returns the ID for the nearest\n * provided entity of the specified type.\n *\n * @param {string} kind The entity kind.\n * @param {string} name The entity name.\n */\nexport function useEntityId( kind, name ) {\n\treturn useContext( getEntityContext( kind, name ) );\n}\n\n/**\n * Hook that returns the value and a setter for the\n * specified property of the nearest provided\n * entity of the specified type.\n *\n * @param {string} kind The entity kind.\n * @param {string} name The entity name.\n * @param {string} prop The property name.\n * @param {string} [_id] An entity ID to use instead of the context-provided one.\n *\n * @return {[*, Function, *]} An array where the first item is the\n * property value, the second is the\n * setter and the third is the full value\n * \t\t\t\t\t\t\t object from REST API containing more\n * \t\t\t\t\t\t\t information like `raw`, `rendered` and\n * \t\t\t\t\t\t\t `protected` props.\n */\nexport function useEntityProp( kind, name, prop, _id ) {\n\tconst providerId = useEntityId( kind, name );\n\tconst id = _id ?? providerId;\n\n\tconst { value, fullValue } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getEntityRecord, getEditedEntityRecord } =\n\t\t\t\tselect( STORE_NAME );\n\t\t\tconst record = getEntityRecord( kind, name, id ); // Trigger resolver.\n\t\t\tconst editedRecord = getEditedEntityRecord( kind, name, id );\n\t\t\treturn record && editedRecord\n\t\t\t\t? {\n\t\t\t\t\t\tvalue: editedRecord[ prop ],\n\t\t\t\t\t\tfullValue: record[ prop ],\n\t\t\t\t }\n\t\t\t\t: {};\n\t\t},\n\t\t[ kind, name, id, prop ]\n\t);\n\tconst { editEntityRecord } = useDispatch( STORE_NAME );\n\tconst setValue = useCallback(\n\t\t( newValue ) => {\n\t\t\teditEntityRecord( kind, name, id, {\n\t\t\t\t[ prop ]: newValue,\n\t\t\t} );\n\t\t},\n\t\t[ kind, name, id, prop ]\n\t);\n\n\treturn [ value, setValue, fullValue ];\n}\n\n/**\n * Hook that returns block content getters and setters for\n * the nearest provided entity of the specified type.\n *\n * The return value has the shape `[ blocks, onInput, onChange ]`.\n * `onInput` is for block changes that don't create undo levels\n * or dirty the post, non-persistent changes, and `onChange` is for\n * peristent changes. They map directly to the props of a\n * `BlockEditorProvider` and are intended to be used with it,\n * or similar components or hooks.\n *\n * @param {string} kind The entity kind.\n * @param {string} name The entity name.\n * @param {Object} options\n * @param {string} [options.id] An entity ID to use instead of the context-provided one.\n *\n * @return {[WPBlock[], Function, Function]} The block array and setters.\n */\nexport function useEntityBlockEditor( kind, name, { id: _id } = {} ) {\n\tconst providerId = useEntityId( kind, name );\n\tconst id = _id ?? providerId;\n\tconst { content, blocks, meta } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getEditedEntityRecord } = select( STORE_NAME );\n\t\t\tconst editedRecord = getEditedEntityRecord( kind, name, id );\n\t\t\treturn {\n\t\t\t\tblocks: editedRecord.blocks,\n\t\t\t\tcontent: editedRecord.content,\n\t\t\t\tmeta: editedRecord.meta,\n\t\t\t};\n\t\t},\n\t\t[ kind, name, id ]\n\t);\n\tconst { __unstableCreateUndoLevel, editEntityRecord } =\n\t\tuseDispatch( STORE_NAME );\n\n\tuseEffect( () => {\n\t\t// Load the blocks from the content if not already in state\n\t\t// Guard against other instances that might have\n\t\t// set content to a function already or the blocks are already in state.\n\t\tif ( content && typeof content !== 'function' && ! blocks ) {\n\t\t\tconst parsedContent = parse( content );\n\t\t\teditEntityRecord(\n\t\t\t\tkind,\n\t\t\t\tname,\n\t\t\t\tid,\n\t\t\t\t{\n\t\t\t\t\tblocks: parsedContent,\n\t\t\t\t},\n\t\t\t\t{ undoIgnore: true }\n\t\t\t);\n\t\t}\n\t}, [ content ] );\n\n\tconst updateFootnotes = useCallback(\n\t\t( _blocks ) => {\n\t\t\tconst output = { blocks: _blocks };\n\t\t\tif ( ! meta ) return output;\n\t\t\t// If meta.footnotes is empty, it means the meta is not registered.\n\t\t\tif ( meta.footnotes === undefined ) return output;\n\n\t\t\tconst { getRichTextValues } = unlock( blockEditorPrivateApis );\n\t\t\tconst _content = getRichTextValues( _blocks ).join( '' ) || '';\n\t\t\tconst newOrder = [];\n\n\t\t\t// This can be avoided when\n\t\t\t// https://github.com/WordPress/gutenberg/pull/43204 lands. We can then\n\t\t\t// get the order directly from the rich text values.\n\t\t\tif ( _content.indexOf( 'data-fn' ) !== -1 ) {\n\t\t\t\tconst regex = /data-fn=\"([^\"]+)\"/g;\n\t\t\t\tlet match;\n\t\t\t\twhile ( ( match = regex.exec( _content ) ) !== null ) {\n\t\t\t\t\tnewOrder.push( match[ 1 ] );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tconst footnotes = meta.footnotes\n\t\t\t\t? JSON.parse( meta.footnotes )\n\t\t\t\t: [];\n\t\t\tconst currentOrder = footnotes.map( ( fn ) => fn.id );\n\n\t\t\tif ( currentOrder.join( '' ) === newOrder.join( '' ) )\n\t\t\t\treturn output;\n\n\t\t\tconst newFootnotes = newOrder.map(\n\t\t\t\t( fnId ) =>\n\t\t\t\t\tfootnotes.find( ( fn ) => fn.id === fnId ) ||\n\t\t\t\t\toldFootnotes[ fnId ] || {\n\t\t\t\t\t\tid: fnId,\n\t\t\t\t\t\tcontent: '',\n\t\t\t\t\t}\n\t\t\t);\n\n\t\t\tfunction updateAttributes( attributes ) {\n\t\t\t\tattributes = { ...attributes };\n\n\t\t\t\tfor ( const key in attributes ) {\n\t\t\t\t\tconst value = attributes[ key ];\n\n\t\t\t\t\tif ( Array.isArray( value ) ) {\n\t\t\t\t\t\tattributes[ key ] = value.map( updateAttributes );\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( typeof value !== 'string' ) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( value.indexOf( 'data-fn' ) === -1 ) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\t// When we store rich text values, this would no longer\n\t\t\t\t\t// require a regex.\n\t\t\t\t\tconst regex =\n\t\t\t\t\t\t/(<sup[^>]+data-fn=\"([^\"]+)\"[^>]*><a[^>]*>)[\\d*]*<\\/a><\\/sup>/g;\n\n\t\t\t\t\tattributes[ key ] = value.replace(\n\t\t\t\t\t\tregex,\n\t\t\t\t\t\t( match, opening, fnId ) => {\n\t\t\t\t\t\t\tconst index = newOrder.indexOf( fnId );\n\t\t\t\t\t\t\treturn `${ opening }${ index + 1 }</a></sup>`;\n\t\t\t\t\t\t}\n\t\t\t\t\t);\n\n\t\t\t\t\tconst compatRegex =\n\t\t\t\t\t\t/<a[^>]+data-fn=\"([^\"]+)\"[^>]*>\\*<\\/a>/g;\n\n\t\t\t\t\tattributes[ key ] = attributes[ key ].replace(\n\t\t\t\t\t\tcompatRegex,\n\t\t\t\t\t\t( match, fnId ) => {\n\t\t\t\t\t\t\tconst index = newOrder.indexOf( fnId );\n\t\t\t\t\t\t\treturn `<sup data-fn=\"${ fnId }\" class=\"fn\"><a href=\"#${ fnId }\" id=\"${ fnId }-link\">${\n\t\t\t\t\t\t\t\tindex + 1\n\t\t\t\t\t\t\t}</a></sup>`;\n\t\t\t\t\t\t}\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\treturn attributes;\n\t\t\t}\n\n\t\t\tfunction updateBlocksAttributes( __blocks ) {\n\t\t\t\treturn __blocks.map( ( block ) => {\n\t\t\t\t\treturn {\n\t\t\t\t\t\t...block,\n\t\t\t\t\t\tattributes: updateAttributes( block.attributes ),\n\t\t\t\t\t\tinnerBlocks: updateBlocksAttributes(\n\t\t\t\t\t\t\tblock.innerBlocks\n\t\t\t\t\t\t),\n\t\t\t\t\t};\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\t// We need to go through all block attributs deeply and update the\n\t\t\t// footnote anchor numbering (textContent) to match the new order.\n\t\t\tconst newBlocks = updateBlocksAttributes( _blocks );\n\n\t\t\toldFootnotes = {\n\t\t\t\t...oldFootnotes,\n\t\t\t\t...footnotes.reduce( ( acc, fn ) => {\n\t\t\t\t\tif ( ! newOrder.includes( fn.id ) ) {\n\t\t\t\t\t\tacc[ fn.id ] = fn;\n\t\t\t\t\t}\n\t\t\t\t\treturn acc;\n\t\t\t\t}, {} ),\n\t\t\t};\n\n\t\t\treturn {\n\t\t\t\tmeta: {\n\t\t\t\t\t...meta,\n\t\t\t\t\tfootnotes: JSON.stringify( newFootnotes ),\n\t\t\t\t},\n\t\t\t\tblocks: newBlocks,\n\t\t\t};\n\t\t},\n\t\t[ meta ]\n\t);\n\n\tconst onChange = useCallback(\n\t\t( newBlocks, options ) => {\n\t\t\tconst noChange = blocks === newBlocks;\n\t\t\tif ( noChange ) {\n\t\t\t\treturn __unstableCreateUndoLevel( kind, name, id );\n\t\t\t}\n\t\t\tconst { selection } = options;\n\n\t\t\t// We create a new function here on every persistent edit\n\t\t\t// to make sure the edit makes the post dirty and creates\n\t\t\t// a new undo level.\n\t\t\tconst edits = {\n\t\t\t\tselection,\n\t\t\t\tcontent: ( { blocks: blocksForSerialization = [] } ) =>\n\t\t\t\t\t__unstableSerializeAndClean( blocksForSerialization ),\n\t\t\t\t...updateFootnotes( newBlocks ),\n\t\t\t};\n\n\t\t\teditEntityRecord( kind, name, id, edits, { isCached: false } );\n\t\t},\n\t\t[\n\t\t\tkind,\n\t\t\tname,\n\t\t\tid,\n\t\t\tblocks,\n\t\t\tupdateFootnotes,\n\t\t\t__unstableCreateUndoLevel,\n\t\t\teditEntityRecord,\n\t\t]\n\t);\n\n\tconst onInput = useCallback(\n\t\t( newBlocks, options ) => {\n\t\t\tconst { selection } = options;\n\t\t\tconst footnotesChanges = updateFootnotes( newBlocks );\n\t\t\tconst edits = { selection, ...footnotesChanges };\n\n\t\t\teditEntityRecord( kind, name, id, edits, { isCached: true } );\n\t\t},\n\t\t[ kind, name, id, updateFootnotes, editEntityRecord ]\n\t);\n\n\treturn [ blocks ?? EMPTY_ARRAY, onInput, onChange ];\n}\n"]}
1
+ {"version":3,"sources":["@wordpress/core-data/src/entity-provider.js"],"names":["createContext","useContext","useCallback","useEffect","useSelect","useDispatch","parse","__unstableSerializeAndClean","privateApis","blockEditorPrivateApis","STORE_NAME","unlock","EMPTY_ARRAY","oldFootnotes","rootEntitiesConfig","additionalEntityConfigLoaders","entityContexts","reduce","acc","loader","kind","name","context","undefined","getEntityContext","Error","EntityProvider","type","id","children","Provider","useEntityId","useEntityProp","prop","_id","providerId","value","fullValue","select","getEntityRecord","getEditedEntityRecord","record","editedRecord","editEntityRecord","setValue","newValue","useEntityBlockEditor","content","blocks","meta","__unstableCreateUndoLevel","parsedContent","undoIgnore","updateFootnotes","_blocks","output","footnotes","getRichTextValues","_content","join","newOrder","indexOf","regex","match","exec","push","JSON","currentOrder","map","fn","newFootnotes","fnId","find","updateAttributes","attributes","Array","isArray","key","replace","opening","index","compatRegex","updateBlocksAttributes","__blocks","block","innerBlocks","newBlocks","includes","stringify","onChange","options","noChange","selection","edits","blocksForSerialization","isCached","onInput","footnotesChanges"],"mappings":";;AAAA;AACA;AACA;AACA,SACCA,aADD,EAECC,UAFD,EAGCC,WAHD,EAICC,SAJD,QAKO,oBALP;AAMA,SAASC,SAAT,EAAoBC,WAApB,QAAuC,iBAAvC;AACA,SAASC,KAAT,EAAgBC,2BAAhB,QAAmD,mBAAnD;AACA,SAASC,WAAW,IAAIC,sBAAxB,QAAsD,yBAAtD;AAEA;AACA;AACA;;AACA,SAASC,UAAT,QAA2B,QAA3B;AACA,SAASC,MAAT,QAAuB,gBAAvB;AAEA;;AAEA,MAAMC,WAAW,GAAG,EAApB;AAEA,IAAIC,YAAY,GAAG,EAAnB;AAEA;AACA;AACA;;AACA,SAASC,kBAAT,EAA6BC,6BAA7B,QAAkE,YAAlE;AAEA,MAAMC,cAAc,GAAG,EACtB,GAAGF,kBAAkB,CAACG,MAAnB,CAA2B,CAAEC,GAAF,EAAOC,MAAP,KAAmB;AAChD,QAAK,CAAED,GAAG,CAAEC,MAAM,CAACC,IAAT,CAAV,EAA4B;AAC3BF,MAAAA,GAAG,CAAEC,MAAM,CAACC,IAAT,CAAH,GAAqB,EAArB;AACA;;AACDF,IAAAA,GAAG,CAAEC,MAAM,CAACC,IAAT,CAAH,CAAoBD,MAAM,CAACE,IAA3B,IAAoC;AACnCC,MAAAA,OAAO,EAAEtB,aAAa,CAAEuB,SAAF;AADa,KAApC;AAGA,WAAOL,GAAP;AACA,GARE,EAQA,EARA,CADmB;AAUtB,KAAGH,6BAA6B,CAACE,MAA9B,CAAsC,CAAEC,GAAF,EAAOC,MAAP,KAAmB;AAC3DD,IAAAA,GAAG,CAAEC,MAAM,CAACC,IAAT,CAAH,GAAqB,EAArB;AACA,WAAOF,GAAP;AACA,GAHE,EAGA,EAHA;AAVmB,CAAvB;;AAeA,MAAMM,gBAAgB,GAAG,CAAEJ,IAAF,EAAQC,IAAR,KAAkB;AAC1C,MAAK,CAAEL,cAAc,CAA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\n\tcreateContext,\n\tuseContext,\n\tuseCallback,\n\tuseEffect,\n} from '@wordpress/element';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { parse, __unstableSerializeAndClean } from '@wordpress/blocks';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport { STORE_NAME } from './name';\nimport { unlock } from './private-apis';\n\n/** @typedef {import('@wordpress/blocks').WPBlock} WPBlock */\n\nconst EMPTY_ARRAY = [];\n\nlet oldFootnotes = {};\n\n/**\n * Internal dependencies\n */\nimport { rootEntitiesConfig, additionalEntityConfigLoaders } from './entities';\n\nconst entityContexts = {\n\t...rootEntitiesConfig.reduce( ( acc, loader ) => {\n\t\tif ( ! acc[ loader.kind ] ) {\n\t\t\tacc[ loader.kind ] = {};\n\t\t}\n\t\tacc[ loader.kind ][ loader.name ] = {\n\t\t\tcontext: createContext( undefined ),\n\t\t};\n\t\treturn acc;\n\t}, {} ),\n\t...additionalEntityConfigLoaders.reduce( ( acc, loader ) => {\n\t\tacc[ loader.kind ] = {};\n\t\treturn acc;\n\t}, {} ),\n};\nconst getEntityContext = ( kind, name ) => {\n\tif ( ! entityContexts[ kind ] ) {\n\t\tthrow new Error( `Missing entity config for kind: ${ kind }.` );\n\t}\n\n\tif ( ! entityContexts[ kind ][ name ] ) {\n\t\tentityContexts[ kind ][ name ] = {\n\t\t\tcontext: createContext( undefined ),\n\t\t};\n\t}\n\n\treturn entityContexts[ kind ][ name ].context;\n};\n\n/**\n * Context provider component for providing\n * an entity for a specific entity.\n *\n * @param {Object} props The component's props.\n * @param {string} props.kind The entity kind.\n * @param {string} props.type The entity name.\n * @param {number} props.id The entity ID.\n * @param {*} props.children The children to wrap.\n *\n * @return {Object} The provided children, wrapped with\n * the entity's context provider.\n */\nexport default function EntityProvider( { kind, type: name, id, children } ) {\n\tconst Provider = getEntityContext( kind, name ).Provider;\n\treturn <Provider value={ id }>{ children }</Provider>;\n}\n\n/**\n * Hook that returns the ID for the nearest\n * provided entity of the specified type.\n *\n * @param {string} kind The entity kind.\n * @param {string} name The entity name.\n */\nexport function useEntityId( kind, name ) {\n\treturn useContext( getEntityContext( kind, name ) );\n}\n\n/**\n * Hook that returns the value and a setter for the\n * specified property of the nearest provided\n * entity of the specified type.\n *\n * @param {string} kind The entity kind.\n * @param {string} name The entity name.\n * @param {string} prop The property name.\n * @param {string} [_id] An entity ID to use instead of the context-provided one.\n *\n * @return {[*, Function, *]} An array where the first item is the\n * property value, the second is the\n * setter and the third is the full value\n * \t\t\t\t\t\t\t object from REST API containing more\n * \t\t\t\t\t\t\t information like `raw`, `rendered` and\n * \t\t\t\t\t\t\t `protected` props.\n */\nexport function useEntityProp( kind, name, prop, _id ) {\n\tconst providerId = useEntityId( kind, name );\n\tconst id = _id ?? providerId;\n\n\tconst { value, fullValue } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getEntityRecord, getEditedEntityRecord } =\n\t\t\t\tselect( STORE_NAME );\n\t\t\tconst record = getEntityRecord( kind, name, id ); // Trigger resolver.\n\t\t\tconst editedRecord = getEditedEntityRecord( kind, name, id );\n\t\t\treturn record && editedRecord\n\t\t\t\t? {\n\t\t\t\t\t\tvalue: editedRecord[ prop ],\n\t\t\t\t\t\tfullValue: record[ prop ],\n\t\t\t\t }\n\t\t\t\t: {};\n\t\t},\n\t\t[ kind, name, id, prop ]\n\t);\n\tconst { editEntityRecord } = useDispatch( STORE_NAME );\n\tconst setValue = useCallback(\n\t\t( newValue ) => {\n\t\t\teditEntityRecord( kind, name, id, {\n\t\t\t\t[ prop ]: newValue,\n\t\t\t} );\n\t\t},\n\t\t[ kind, name, id, prop ]\n\t);\n\n\treturn [ value, setValue, fullValue ];\n}\n\n/**\n * Hook that returns block content getters and setters for\n * the nearest provided entity of the specified type.\n *\n * The return value has the shape `[ blocks, onInput, onChange ]`.\n * `onInput` is for block changes that don't create undo levels\n * or dirty the post, non-persistent changes, and `onChange` is for\n * peristent changes. They map directly to the props of a\n * `BlockEditorProvider` and are intended to be used with it,\n * or similar components or hooks.\n *\n * @param {string} kind The entity kind.\n * @param {string} name The entity name.\n * @param {Object} options\n * @param {string} [options.id] An entity ID to use instead of the context-provided one.\n *\n * @return {[WPBlock[], Function, Function]} The block array and setters.\n */\nexport function useEntityBlockEditor( kind, name, { id: _id } = {} ) {\n\tconst providerId = useEntityId( kind, name );\n\tconst id = _id ?? providerId;\n\tconst { content, blocks, meta } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getEditedEntityRecord } = select( STORE_NAME );\n\t\t\tconst editedRecord = getEditedEntityRecord( kind, name, id );\n\t\t\treturn {\n\t\t\t\tblocks: editedRecord.blocks,\n\t\t\t\tcontent: editedRecord.content,\n\t\t\t\tmeta: editedRecord.meta,\n\t\t\t};\n\t\t},\n\t\t[ kind, name, id ]\n\t);\n\tconst { __unstableCreateUndoLevel, editEntityRecord } =\n\t\tuseDispatch( STORE_NAME );\n\n\tuseEffect( () => {\n\t\t// Load the blocks from the content if not already in state\n\t\t// Guard against other instances that might have\n\t\t// set content to a function already or the blocks are already in state.\n\t\tif ( content && typeof content !== 'function' && ! blocks ) {\n\t\t\tconst parsedContent = parse( content );\n\t\t\teditEntityRecord(\n\t\t\t\tkind,\n\t\t\t\tname,\n\t\t\t\tid,\n\t\t\t\t{\n\t\t\t\t\tblocks: parsedContent,\n\t\t\t\t},\n\t\t\t\t{ undoIgnore: true }\n\t\t\t);\n\t\t}\n\t}, [ content ] );\n\n\tconst updateFootnotes = useCallback(\n\t\t( _blocks ) => {\n\t\t\tconst output = { blocks: _blocks };\n\t\t\tif ( ! meta ) return output;\n\t\t\t// If meta.footnotes is empty, it means the meta is not registered.\n\t\t\tif ( meta.footnotes === undefined ) return output;\n\n\t\t\tconst { getRichTextValues } = unlock( blockEditorPrivateApis );\n\t\t\tconst _content = getRichTextValues( _blocks ).join( '' ) || '';\n\t\t\tconst newOrder = [];\n\n\t\t\t// This can be avoided when\n\t\t\t// https://github.com/WordPress/gutenberg/pull/43204 lands. We can then\n\t\t\t// get the order directly from the rich text values.\n\t\t\tif ( _content.indexOf( 'data-fn' ) !== -1 ) {\n\t\t\t\tconst regex = /data-fn=\"([^\"]+)\"/g;\n\t\t\t\tlet match;\n\t\t\t\twhile ( ( match = regex.exec( _content ) ) !== null ) {\n\t\t\t\t\tnewOrder.push( match[ 1 ] );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tconst footnotes = meta.footnotes\n\t\t\t\t? JSON.parse( meta.footnotes )\n\t\t\t\t: [];\n\t\t\tconst currentOrder = footnotes.map( ( fn ) => fn.id );\n\n\t\t\tif ( currentOrder.join( '' ) === newOrder.join( '' ) )\n\t\t\t\treturn output;\n\n\t\t\tconst newFootnotes = newOrder.map(\n\t\t\t\t( fnId ) =>\n\t\t\t\t\tfootnotes.find( ( fn ) => fn.id === fnId ) ||\n\t\t\t\t\toldFootnotes[ fnId ] || {\n\t\t\t\t\t\tid: fnId,\n\t\t\t\t\t\tcontent: '',\n\t\t\t\t\t}\n\t\t\t);\n\n\t\t\tfunction updateAttributes( attributes ) {\n\t\t\t\t// Only attempt to update attributes, if attributes is an object.\n\t\t\t\tif (\n\t\t\t\t\t! attributes ||\n\t\t\t\t\tArray.isArray( attributes ) ||\n\t\t\t\t\ttypeof attributes !== 'object'\n\t\t\t\t) {\n\t\t\t\t\treturn attributes;\n\t\t\t\t}\n\n\t\t\t\tattributes = { ...attributes };\n\n\t\t\t\tfor ( const key in attributes ) {\n\t\t\t\t\tconst value = attributes[ key ];\n\n\t\t\t\t\tif ( Array.isArray( value ) ) {\n\t\t\t\t\t\tattributes[ key ] = value.map( updateAttributes );\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( typeof value !== 'string' ) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( value.indexOf( 'data-fn' ) === -1 ) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\t// When we store rich text values, this would no longer\n\t\t\t\t\t// require a regex.\n\t\t\t\t\tconst regex =\n\t\t\t\t\t\t/(<sup[^>]+data-fn=\"([^\"]+)\"[^>]*><a[^>]*>)[\\d*]*<\\/a><\\/sup>/g;\n\n\t\t\t\t\tattributes[ key ] = value.replace(\n\t\t\t\t\t\tregex,\n\t\t\t\t\t\t( match, opening, fnId ) => {\n\t\t\t\t\t\t\tconst index = newOrder.indexOf( fnId );\n\t\t\t\t\t\t\treturn `${ opening }${ index + 1 }</a></sup>`;\n\t\t\t\t\t\t}\n\t\t\t\t\t);\n\n\t\t\t\t\tconst compatRegex =\n\t\t\t\t\t\t/<a[^>]+data-fn=\"([^\"]+)\"[^>]*>\\*<\\/a>/g;\n\n\t\t\t\t\tattributes[ key ] = attributes[ key ].replace(\n\t\t\t\t\t\tcompatRegex,\n\t\t\t\t\t\t( match, fnId ) => {\n\t\t\t\t\t\t\tconst index = newOrder.indexOf( fnId );\n\t\t\t\t\t\t\treturn `<sup data-fn=\"${ fnId }\" class=\"fn\"><a href=\"#${ fnId }\" id=\"${ fnId }-link\">${\n\t\t\t\t\t\t\t\tindex + 1\n\t\t\t\t\t\t\t}</a></sup>`;\n\t\t\t\t\t\t}\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\treturn attributes;\n\t\t\t}\n\n\t\t\tfunction updateBlocksAttributes( __blocks ) {\n\t\t\t\treturn __blocks.map( ( block ) => {\n\t\t\t\t\treturn {\n\t\t\t\t\t\t...block,\n\t\t\t\t\t\tattributes: updateAttributes( block.attributes ),\n\t\t\t\t\t\tinnerBlocks: updateBlocksAttributes(\n\t\t\t\t\t\t\tblock.innerBlocks\n\t\t\t\t\t\t),\n\t\t\t\t\t};\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\t// We need to go through all block attributs deeply and update the\n\t\t\t// footnote anchor numbering (textContent) to match the new order.\n\t\t\tconst newBlocks = updateBlocksAttributes( _blocks );\n\n\t\t\toldFootnotes = {\n\t\t\t\t...oldFootnotes,\n\t\t\t\t...footnotes.reduce( ( acc, fn ) => {\n\t\t\t\t\tif ( ! newOrder.includes( fn.id ) ) {\n\t\t\t\t\t\tacc[ fn.id ] = fn;\n\t\t\t\t\t}\n\t\t\t\t\treturn acc;\n\t\t\t\t}, {} ),\n\t\t\t};\n\n\t\t\treturn {\n\t\t\t\tmeta: {\n\t\t\t\t\t...meta,\n\t\t\t\t\tfootnotes: JSON.stringify( newFootnotes ),\n\t\t\t\t},\n\t\t\t\tblocks: newBlocks,\n\t\t\t};\n\t\t},\n\t\t[ meta ]\n\t);\n\n\tconst onChange = useCallback(\n\t\t( newBlocks, options ) => {\n\t\t\tconst noChange = blocks === newBlocks;\n\t\t\tif ( noChange ) {\n\t\t\t\treturn __unstableCreateUndoLevel( kind, name, id );\n\t\t\t}\n\t\t\tconst { selection } = options;\n\n\t\t\t// We create a new function here on every persistent edit\n\t\t\t// to make sure the edit makes the post dirty and creates\n\t\t\t// a new undo level.\n\t\t\tconst edits = {\n\t\t\t\tselection,\n\t\t\t\tcontent: ( { blocks: blocksForSerialization = [] } ) =>\n\t\t\t\t\t__unstableSerializeAndClean( blocksForSerialization ),\n\t\t\t\t...updateFootnotes( newBlocks ),\n\t\t\t};\n\n\t\t\teditEntityRecord( kind, name, id, edits, { isCached: false } );\n\t\t},\n\t\t[\n\t\t\tkind,\n\t\t\tname,\n\t\t\tid,\n\t\t\tblocks,\n\t\t\tupdateFootnotes,\n\t\t\t__unstableCreateUndoLevel,\n\t\t\teditEntityRecord,\n\t\t]\n\t);\n\n\tconst onInput = useCallback(\n\t\t( newBlocks, options ) => {\n\t\t\tconst { selection } = options;\n\t\t\tconst footnotesChanges = updateFootnotes( newBlocks );\n\t\t\tconst edits = { selection, ...footnotesChanges };\n\n\t\t\teditEntityRecord( kind, name, id, edits, { isCached: true } );\n\t\t},\n\t\t[ kind, name, id, updateFootnotes, editEntityRecord ]\n\t);\n\n\treturn [ blocks ?? EMPTY_ARRAY, onInput, onChange ];\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../src/actions.js"],"names":[],"mappings":"AAsBA;;;;;;;;;;GAUG;AACH,0CALW,MAAM,SACN,WAAY,OAUtB;AAED;;;;;;;;;GASG;AACH,0DAKC;AAED;;;;;;GAMG;AACH,kDAKC;AAED;;;;;;;;;;GAUG;AACH,2CARW,MAAM,QACN,MAAM,WACN,WAAY,0FAqCtB;AAED;;;;;;;;;GASG;AACH,4DAKC;AAED;;;;;;;;;GASG;AACH,kFAJW,MAAM,OAWhB;AAED;;;;;;;;;;GAUG;AACH,uEALW,MAAM,0BAchB;AAED;;;;;;;;;;GAUG;AACH,4EALW,MAAM,0BAchB;AAED;;;;;;GAMG;AACH,4CAQC;AAED;;;;;;;;;;GAUG;AACH,4DALW,MAAM,yBAWhB;AAED;;;;;;;;;;;GAWG;AACH,yCALW,MAAM,qBAWhB;AA4LD;;;;GAIG;AACH,iDAEC;AAkWD;;;;;;;;GAQG;AACH,+DAJW,OAAO,OAWjB;AAED;;;;;;;;;;;GAWG;AACH,2CALW,MAAM,aACN,OAAO,OAUjB;AAED;;;;;;;;;;;GAWG;AACH,yCALW,MAAM,aACN,WAAY,OAUtB;AAED;;;;;;GAMG;AACH,sEAKC;AA1lBM,yCAZI,MAAM,QACN,MAAM,YACN,MAAM;;;;;mCA8Ef;AAeK,uCATI,MAAM,QACN,MAAM,YACN,MAAM,GAAC,MAAM;IAGW,UAAU;QAsD3C;AAMK;;;WAYL;AAMK;;;WAYL;AAyBK,uCAXI,MAAM,QACN,MAAM;IAGa,UAAU;IACV,eAAe;IAGf,YAAY;;;;;mBAqNxC;AAwBK,uFAoCL;AAUK,6CALI,MAAM,QACN,MAAM;;;mBA0Bf;AAWK,6DANI,MAAM,QACN,MAAM;;;mBA4Bf"}
1
+ {"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../src/actions.js"],"names":[],"mappings":"AAsBA;;;;;;;;;;GAUG;AACH,0CALW,MAAM,SACN,WAAY,OAUtB;AAED;;;;;;;;;GASG;AACH,0DAKC;AAED;;;;;;GAMG;AACH,kDAKC;AAED;;;;;;;;;;GAUG;AACH,2CARW,MAAM,QACN,MAAM,WACN,WAAY,0FAqCtB;AAED;;;;;;;;;GASG;AACH,4DAKC;AAED;;;;;;;;;GASG;AACH,kFAJW,MAAM,OAWhB;AAED;;;;;;;;;;GAUG;AACH,uEALW,MAAM,0BAchB;AAED;;;;;;;;;;GAUG;AACH,4EALW,MAAM,0BAchB;AAED;;;;;;GAMG;AACH,4CAQC;AAED;;;;;;;;;;GAUG;AACH,4DALW,MAAM,yBAWhB;AAED;;;;;;;;;;;GAWG;AACH,yCALW,MAAM,qBAWhB;AA4LD;;;;GAIG;AACH,iDAEC;AAqWD;;;;;;;;GAQG;AACH,+DAJW,OAAO,OAWjB;AAED;;;;;;;;;;;GAWG;AACH,2CALW,MAAM,aACN,OAAO,OAUjB;AAED;;;;;;;;;;;GAWG;AACH,yCALW,MAAM,aACN,WAAY,OAUtB;AAED;;;;;;GAMG;AACH,sEAKC;AA7lBM,yCAZI,MAAM,QACN,MAAM,YACN,MAAM;;;;;mCA8Ef;AAeK,uCATI,MAAM,QACN,MAAM,YACN,MAAM,GAAC,MAAM;IAGW,UAAU;QAsD3C;AAMK;;;WAYL;AAMK;;;WAYL;AAyBK,uCAXI,MAAM,QACN,MAAM;IAGa,UAAU;IACV,eAAe;IAGf,YAAY;;;;;mBAwNxC;AAwBK,uFAoCL;AAUK,6CALI,MAAM,QACN,MAAM;;;mBA0Bf;AAWK,6DANI,MAAM,QACN,MAAM;;;mBA4Bf"}
@@ -1 +1 @@
1
- {"version":3,"file":"entity-provider.d.ts","sourceRoot":"","sources":["../src/entity-provider.js"],"names":[],"mappings":"AA2DA;;;;;;;;;;;;GAYG;AACH;IARyB,IAAI,EAAlB,MAAM;IACQ,IAAI,EAAlB,MAAM;IACQ,EAAE,EAAhB,MAAM;IACQ,QAAQ;QAQhC;AAED;;;;;;GAMG;AACH,kCAHW,MAAM,QACN,MAAM,OAIhB;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,oCAZW,MAAM,QACN,MAAM,QACN,MAAM,6BAGL,oBAAgB,CAqC3B;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,2CAPW,MAAM,QACN,MAAM;IAEW,EAAE;IAElB,CAAC,OAAO,EAAE,qBAAqB,CA8M1C"}
1
+ {"version":3,"file":"entity-provider.d.ts","sourceRoot":"","sources":["../src/entity-provider.js"],"names":[],"mappings":"AA2DA;;;;;;;;;;;;GAYG;AACH;IARyB,IAAI,EAAlB,MAAM;IACQ,IAAI,EAAlB,MAAM;IACQ,EAAE,EAAhB,MAAM;IACQ,QAAQ;QAQhC;AAED;;;;;;GAMG;AACH,kCAHW,MAAM,QACN,MAAM,OAIhB;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,oCAZW,MAAM,QACN,MAAM,QACN,MAAM,6BAGL,oBAAgB,CAqC3B;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,2CAPW,MAAM,QACN,MAAM;IAEW,EAAE;IAElB,CAAC,OAAO,EAAE,qBAAqB,CAuN1C"}
@@ -0,0 +1,2 @@
1
+ export function getSyncProvider(): any;
2
+ //# sourceMappingURL=sync.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sync.d.ts","sourceRoot":"","sources":["../src/sync.js"],"names":[],"mappings":"AAWA,uCAMC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wordpress/core-data",
3
- "version": "6.12.11",
3
+ "version": "6.12.13",
4
4
  "description": "Access to and manipulation of core WordPress entities.",
5
5
  "author": "The WordPress Contributors",
6
6
  "license": "GPL-2.0-or-later",
@@ -32,8 +32,8 @@
32
32
  "dependencies": {
33
33
  "@babel/runtime": "^7.16.0",
34
34
  "@wordpress/api-fetch": "^6.32.1",
35
- "@wordpress/block-editor": "^12.3.11",
36
- "@wordpress/blocks": "^12.12.6",
35
+ "@wordpress/block-editor": "^12.3.12",
36
+ "@wordpress/blocks": "^12.12.7",
37
37
  "@wordpress/compose": "^6.12.2",
38
38
  "@wordpress/data": "^9.5.5",
39
39
  "@wordpress/deprecated": "^3.35.1",
@@ -56,5 +56,5 @@
56
56
  "publishConfig": {
57
57
  "access": "public"
58
58
  },
59
- "gitHead": "a6c8348f0058e714c97df49b4025e5d7d1c9e437"
59
+ "gitHead": "cfdd2a100c5301e4b37123b21e3499f48a6fcbaf"
60
60
  }
package/src/actions.js CHANGED
@@ -554,9 +554,12 @@ export const saveEntityRecord =
554
554
  data = Object.keys( data ).reduce(
555
555
  ( acc, key ) => {
556
556
  if (
557
- [ 'title', 'excerpt', 'content' ].includes(
558
- key
559
- )
557
+ [
558
+ 'title',
559
+ 'excerpt',
560
+ 'content',
561
+ 'meta',
562
+ ].includes( key )
560
563
  ) {
561
564
  acc[ key ] = data[ key ];
562
565
  }
@@ -229,6 +229,15 @@ export function useEntityBlockEditor( kind, name, { id: _id } = {} ) {
229
229
  );
230
230
 
231
231
  function updateAttributes( attributes ) {
232
+ // Only attempt to update attributes, if attributes is an object.
233
+ if (
234
+ ! attributes ||
235
+ Array.isArray( attributes ) ||
236
+ typeof attributes !== 'object'
237
+ ) {
238
+ return attributes;
239
+ }
240
+
232
241
  attributes = { ...attributes };
233
242
 
234
243
  for ( const key in attributes ) {
@@ -1 +1 @@
1
- {"program":{"fileNames":["../../node_modules/typescript/lib/lib.es5.d.ts","../../node_modules/typescript/lib/lib.es2015.d.ts","../../node_modules/typescript/lib/lib.es2016.d.ts","../../node_modules/typescript/lib/lib.es2017.d.ts","../../node_modules/typescript/lib/lib.es2018.d.ts","../../node_modules/typescript/lib/lib.es2019.d.ts","../../node_modules/typescript/lib/lib.es2020.d.ts","../../node_modules/typescript/lib/lib.es2021.d.ts","../../node_modules/typescript/lib/lib.es2022.d.ts","../../node_modules/typescript/lib/lib.esnext.d.ts","../../node_modules/typescript/lib/lib.dom.d.ts","../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../node_modules/typescript/lib/lib.es2019.array.d.ts","../../node_modules/typescript/lib/lib.es2019.object.d.ts","../../node_modules/typescript/lib/lib.es2019.string.d.ts","../../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../node_modules/typescript/lib/lib.es2019.intl.d.ts","../../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../node_modules/typescript/lib/lib.es2020.date.d.ts","../../node_modules/typescript/lib/lib.es2020.promise.d.ts","../../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2020.string.d.ts","../../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../node_modules/typescript/lib/lib.es2020.intl.d.ts","../../node_modules/typescript/lib/lib.es2020.number.d.ts","../../node_modules/typescript/lib/lib.es2021.promise.d.ts","../../node_modules/typescript/lib/lib.es2021.string.d.ts","../../node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../node_modules/typescript/lib/lib.es2021.intl.d.ts","../../node_modules/typescript/lib/lib.es2022.array.d.ts","../../node_modules/typescript/lib/lib.es2022.error.d.ts","../../node_modules/typescript/lib/lib.es2022.intl.d.ts","../../node_modules/typescript/lib/lib.es2022.object.d.ts","../../node_modules/typescript/lib/lib.es2022.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2022.string.d.ts","../../node_modules/typescript/lib/lib.esnext.intl.d.ts","../../node_modules/fast-deep-equal/es6/index.d.ts","../../node_modules/@types/uuid/index.d.ts","../api-fetch/build-types/types.d.ts","../api-fetch/build-types/middlewares/nonce.d.ts","../api-fetch/build-types/middlewares/preloading.d.ts","../api-fetch/build-types/middlewares/root-url.d.ts","../api-fetch/build-types/middlewares/fetch-all-middleware.d.ts","../api-fetch/build-types/middlewares/media-upload.d.ts","../api-fetch/build-types/middlewares/theme-preview.d.ts","../api-fetch/build-types/index.d.ts","../url/build-types/is-url.d.ts","../url/build-types/is-email.d.ts","../url/build-types/get-protocol.d.ts","../url/build-types/is-valid-protocol.d.ts","../url/build-types/get-authority.d.ts","../url/build-types/is-valid-authority.d.ts","../url/build-types/get-path.d.ts","../url/build-types/is-valid-path.d.ts","../url/build-types/get-query-string.d.ts","../url/build-types/build-query-string.d.ts","../url/build-types/is-valid-query-string.d.ts","../url/build-types/get-path-and-query-string.d.ts","../url/build-types/get-fragment.d.ts","../url/build-types/is-valid-fragment.d.ts","../url/build-types/add-query-args.d.ts","../url/build-types/get-query-arg.d.ts","../url/build-types/get-query-args.d.ts","../url/build-types/has-query-arg.d.ts","../url/build-types/remove-query-args.d.ts","../url/build-types/prepend-http.d.ts","../url/build-types/safe-decode-uri.d.ts","../url/build-types/safe-decode-uri-component.d.ts","../url/build-types/filter-url-for-display.d.ts","../url/build-types/clean-for-slug.d.ts","../url/build-types/get-filename.d.ts","../url/build-types/normalize-path.d.ts","../url/build-types/prepend-https.d.ts","../url/build-types/index.d.ts","../../node_modules/utility-types/dist/aliases-and-guards.d.ts","../../node_modules/utility-types/dist/mapped-types.d.ts","../../node_modules/utility-types/dist/utility-types.d.ts","../../node_modules/utility-types/dist/functional-helpers.d.ts","../../node_modules/utility-types/dist/index.d.ts","../deprecated/build-types/index.d.ts","./src/queried-data/actions.js","../../node_modules/rememo/rememo.d.ts","./src/utils/conservative-map-item.js","./src/utils/get-normalized-comma-separable.js","./src/types.ts","./src/utils/if-matching-action.js","./src/utils/forward-resolver.js","./src/utils/on-sub-key.js","./src/utils/replace-action.js","./src/utils/with-weak-map-cache.js","./src/utils/is-raw-attribute.js","./src/utils/set-nested-value.js","./src/utils/index.js","./src/queried-data/get-query-parts.js","./src/queried-data/selectors.js","../element/node_modules/@types/react/global.d.ts","../../node_modules/csstype/index.d.ts","../../node_modules/@types/prop-types/index.d.ts","../../node_modules/@types/scheduler/tracing.d.ts","../element/node_modules/@types/react/index.d.ts","../element/build-types/react.d.ts","../element/build-types/create-interpolate-element.d.ts","../../node_modules/@types/react/index.d.ts","../../node_modules/@types/react-dom/index.d.ts","../../node_modules/@types/react-dom/client.d.ts","../element/build-types/react-platform.d.ts","../element/build-types/utils.d.ts","../element/build-types/platform.d.ts","../element/build-types/serialize.d.ts","../element/build-types/raw-html.d.ts","../element/build-types/index.d.ts","../data/build-types/components/with-select/index.d.ts","../data/build-types/components/with-dispatch/index.d.ts","../data/build-types/components/with-registry/index.d.ts","../../node_modules/redux/index.d.ts","../data/build-types/types.d.ts","../data/build-types/components/use-dispatch/use-dispatch.d.ts","../data/build-types/components/use-dispatch/use-dispatch-with-map.d.ts","../data/build-types/components/use-dispatch/index.d.ts","../data/build-types/components/async-mode-provider/use-async-mode.d.ts","../data/build-types/components/async-mode-provider/context.d.ts","../data/build-types/components/async-mode-provider/index.d.ts","../data/build-types/registry.d.ts","../data/build-types/controls.d.ts","../data/build-types/redux-store/index.d.ts","../data/build-types/dispatch.d.ts","../data/build-types/select.d.ts","../data/build-types/plugins/persistence/index.d.ts","../data/build-types/plugins/index.d.ts","../data/build-types/components/registry-provider/use-registry.d.ts","../data/build-types/components/registry-provider/context.d.ts","../data/build-types/components/registry-provider/index.d.ts","../data/build-types/components/use-select/index.d.ts","../data/build-types/factory.d.ts","../data/build-types/index.d.ts","../compose/build-types/utils/create-higher-order-component/index.d.ts","../compose/build-types/utils/debounce/index.d.ts","../compose/build-types/utils/throttle/index.d.ts","../compose/build-types/higher-order/compose.d.ts","../compose/build-types/higher-order/pipe.d.ts","../compose/build-types/higher-order/if-condition/index.d.ts","../compose/build-types/higher-order/pure/index.d.ts","../compose/build-types/higher-order/with-global-events/index.d.ts","../compose/build-types/higher-order/with-instance-id/index.d.ts","../compose/build-types/higher-order/with-safe-timeout/index.d.ts","../compose/build-types/higher-order/with-state/index.d.ts","../compose/build-types/hooks/use-constrained-tabbing/index.d.ts","../compose/build-types/hooks/use-copy-on-click/index.d.ts","../compose/build-types/hooks/use-copy-to-clipboard/index.d.ts","../compose/build-types/hooks/use-focus-on-mount/index.d.ts","../compose/build-types/hooks/use-focus-outside/index.d.ts","../compose/build-types/hooks/use-dialog/index.d.ts","../compose/build-types/hooks/use-disabled/index.d.ts","../compose/build-types/hooks/use-dragging/index.d.ts","../compose/build-types/hooks/use-focus-return/index.d.ts","../compose/build-types/hooks/use-instance-id/index.d.ts","../compose/build-types/hooks/use-isomorphic-layout-effect/index.d.ts","../../node_modules/@types/mousetrap/index.d.ts","../compose/build-types/hooks/use-keyboard-shortcut/index.d.ts","../compose/build-types/hooks/use-media-query/index.d.ts","../compose/build-types/hooks/use-previous/index.d.ts","../compose/build-types/hooks/use-reduced-motion/index.d.ts","../compose/build-types/hooks/use-viewport-match/index.d.ts","../compose/build-types/hooks/use-resize-observer/index.d.ts","../compose/build-types/hooks/use-async-list/index.d.ts","../compose/build-types/hooks/use-warn-on-change/index.d.ts","../compose/build-types/hooks/use-debounce/index.d.ts","../compose/build-types/hooks/use-throttle/index.d.ts","../compose/build-types/hooks/use-merge-refs/index.d.ts","../compose/build-types/hooks/use-ref-effect/index.d.ts","../compose/build-types/hooks/use-drop-zone/index.d.ts","../compose/build-types/hooks/use-focusable-iframe/index.d.ts","../compose/build-types/hooks/use-fixed-window-list/index.d.ts","../compose/build-types/index.d.ts","../../node_modules/no-case/dist/index.d.ts","../../node_modules/pascal-case/dist/index.d.ts","../../node_modules/camel-case/dist/index.d.ts","../../node_modules/capital-case/dist/index.d.ts","../../node_modules/constant-case/dist/index.d.ts","../../node_modules/dot-case/dist/index.d.ts","../../node_modules/header-case/dist/index.d.ts","../../node_modules/param-case/dist/index.d.ts","../../node_modules/path-case/dist/index.d.ts","../../node_modules/sentence-case/dist/index.d.ts","../../node_modules/snake-case/dist/index.d.ts","../../node_modules/change-case/dist/index.d.ts","../i18n/build-types/sprintf.d.ts","../hooks/build-types/createAddHook.d.ts","../hooks/build-types/createRemoveHook.d.ts","../hooks/build-types/createHasHook.d.ts","../hooks/build-types/createDoingHook.d.ts","../hooks/build-types/createDidHook.d.ts","../hooks/build-types/index.d.ts","../hooks/build-types/createHooks.d.ts","../i18n/build-types/create-i18n.d.ts","../i18n/build-types/default-i18n.d.ts","../i18n/build-types/index.d.ts","./src/entities.js","./src/queried-data/reducer.js","./src/queried-data/index.js","./src/batch/default-processor.js","./src/batch/create-batch.js","./src/batch/index.js","./src/name.js","./src/entity-types/helpers.ts","./src/entity-types/base-entity-records.ts","./src/entity-types/attachment.ts","./src/entity-types/comment.ts","./src/entity-types/menu-location.ts","./src/entity-types/nav-menu.ts","./src/entity-types/nav-menu-item.ts","./src/entity-types/page.ts","./src/entity-types/plugin.ts","./src/entity-types/post.ts","./src/entity-types/settings.ts","./src/entity-types/sidebar.ts","./src/entity-types/taxonomy.ts","./src/entity-types/theme.ts","./src/entity-types/user.ts","./src/entity-types/type.ts","./src/entity-types/widget.ts","./src/entity-types/widget-type.ts","./src/entity-types/wp-template.ts","./src/entity-types/wp-template-part.ts","./src/entity-types/index.ts","./src/selectors.ts","./src/private-selectors.ts","./src/actions.js","../private-apis/build-types/implementation.d.ts","../private-apis/build-types/index.d.ts","./src/private-apis.js","./src/entity-provider.js","../is-shallow-equal/build-types/objects.d.ts","../is-shallow-equal/build-types/arrays.d.ts","../is-shallow-equal/build-types/index.d.ts","./src/reducer.js","./src/resolvers.js","./src/locks/utils.js","./src/locks/reducer.js","./src/locks/selectors.js","./src/locks/engine.js","./src/locks/actions.js","../html-entities/build-types/index.d.ts","./src/fetch/__experimental-fetch-link-suggestions.js","./src/fetch/__experimental-fetch-url-data.js","./src/fetch/index.js","../../node_modules/memize/dist/index.d.ts","./src/hooks/memoize.js","./src/hooks/constants.ts","./src/hooks/use-query-select.ts","./src/hooks/use-entity-record.ts","./src/hooks/use-entity-records.ts","./src/hooks/use-resource-permissions.ts","./src/hooks/index.ts","./src/index.js","../../node_modules/@types/react/global.d.ts"],"fileInfos":[{"version":"8730f4bf322026ff5229336391a18bcaa1f94d4f82416c8b2f3954e2ccaae2ba","affectsGlobalScope":true},"dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6","7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467","8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9","5f4e733ced4e129482ae2186aae29fde948ab7182844c3a5a51dd346182c7b06","4b421cbfb3a38a27c279dec1e9112c3d1da296f77a1a85ddadf7e7a425d45d18","1fc5ab7a764205c68fa10d381b08417795fc73111d6dd16b5b1ed36badb743d9","746d62152361558ea6d6115cf0da4dd10ede041d14882ede3568bce5dc4b4f1f","d11a03592451da2d1065e09e61f4e2a9bf68f780f4f6623c18b57816a9679d17","aea179452def8a6152f98f63b191b84e7cbd69b0e248c91e61fb2e52328abe8c",{"version":"3aafcb693fe5b5c3bd277bd4c3a617b53db474fe498fc5df067c5603b1eebde7","affectsGlobalScope":true},{"version":"adb996790133eb33b33aadb9c09f15c2c575e71fb57a62de8bf74dbf59ec7dfb","affectsGlobalScope":true},{"version":"8cc8c5a3bac513368b0157f3d8b31cfdcfe78b56d3724f30f80ed9715e404af8","affectsGlobalScope":true},{"version":"cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a","affectsGlobalScope":true},{"version":"c5c05907c02476e4bde6b7e76a79ffcd948aedd14b6a8f56e4674221b0417398","affectsGlobalScope":true},{"version":"5f406584aef28a331c36523df688ca3650288d14f39c5d2e555c95f0d2ff8f6f","affectsGlobalScope":true},{"version":"22f230e544b35349cfb3bd9110b6ef37b41c6d6c43c3314a31bd0d9652fcec72","affectsGlobalScope":true},{"version":"7ea0b55f6b315cf9ac2ad622b0a7813315bb6e97bf4bb3fbf8f8affbca7dc695","affectsGlobalScope":true},{"version":"3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93","affectsGlobalScope":true},{"version":"eb26de841c52236d8222f87e9e6a235332e0788af8c87a71e9e210314300410a","affectsGlobalScope":true},{"version":"3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006","affectsGlobalScope":true},{"version":"17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a","affectsGlobalScope":true},{"version":"7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98","affectsGlobalScope":true},{"version":"6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577","affectsGlobalScope":true},{"version":"81cac4cbc92c0c839c70f8ffb94eb61e2d32dc1c3cf6d95844ca099463cf37ea","affectsGlobalScope":true},{"version":"b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e","affectsGlobalScope":true},{"version":"0eb85d6c590b0d577919a79e0084fa1744c1beba6fd0d4e951432fa1ede5510a","affectsGlobalScope":true},{"version":"da233fc1c8a377ba9e0bed690a73c290d843c2c3d23a7bd7ec5cd3d7d73ba1e0","affectsGlobalScope":true},{"version":"d154ea5bb7f7f9001ed9153e876b2d5b8f5c2bb9ec02b3ae0d239ec769f1f2ae","affectsGlobalScope":true},{"version":"bb2d3fb05a1d2ffbca947cc7cbc95d23e1d053d6595391bd325deb265a18d36c","affectsGlobalScope":true},{"version":"c80df75850fea5caa2afe43b9949338ce4e2de086f91713e9af1a06f973872b8","affectsGlobalScope":true},{"version":"9d57b2b5d15838ed094aa9ff1299eecef40b190722eb619bac4616657a05f951","affectsGlobalScope":true},{"version":"6c51b5dd26a2c31dbf37f00cfc32b2aa6a92e19c995aefb5b97a3a64f1ac99de","affectsGlobalScope":true},{"version":"6e7997ef61de3132e4d4b2250e75343f487903ddf5370e7ce33cf1b9db9a63ed","affectsGlobalScope":true},{"version":"2ad234885a4240522efccd77de6c7d99eecf9b4de0914adb9a35c0c22433f993","affectsGlobalScope":true},{"version":"5e5e095c4470c8bab227dbbc61374878ecead104c74ab9960d3adcccfee23205","affectsGlobalScope":true},{"version":"09aa50414b80c023553090e2f53827f007a301bc34b0495bfb2c3c08ab9ad1eb","affectsGlobalScope":true},{"version":"d7f680a43f8cd12a6b6122c07c54ba40952b0c8aa140dcfcf32eb9e6cb028596","affectsGlobalScope":true},{"version":"3787b83e297de7c315d55d4a7c546ae28e5f6c0a361b7a1dcec1f1f50a54ef11","affectsGlobalScope":true},{"version":"e7e8e1d368290e9295ef18ca23f405cf40d5456fa9f20db6373a61ca45f75f40","affectsGlobalScope":true},{"version":"faf0221ae0465363c842ce6aa8a0cbda5d9296940a8e26c86e04cc4081eea21e","affectsGlobalScope":true},{"version":"06393d13ea207a1bfe08ec8d7be562549c5e2da8983f2ee074e00002629d1871","affectsGlobalScope":true},{"version":"2768ef564cfc0689a1b76106c421a2909bdff0acbe87da010785adab80efdd5c","affectsGlobalScope":true},{"version":"b248e32ca52e8f5571390a4142558ae4f203ae2f94d5bac38a3084d529ef4e58","affectsGlobalScope":true},{"version":"6c55633c733c8378db65ac3da7a767c3cf2cf3057f0565a9124a16a3a2019e87","affectsGlobalScope":true},{"version":"fb4416144c1bf0323ccbc9afb0ab289c07312214e8820ad17d709498c865a3fe","affectsGlobalScope":true},{"version":"5b0ca94ec819d68d33da516306c15297acec88efeb0ae9e2b39f71dbd9685ef7","affectsGlobalScope":true},{"version":"34c839eaaa6d78c8674ae2c37af2236dee6831b13db7b4ef4df3ec889a04d4f2","affectsGlobalScope":true},{"version":"34478567f8a80171f88f2f30808beb7da15eac0538ae91282dd33dce928d98ed","affectsGlobalScope":true},{"version":"ab7d58e6161a550ff92e5aff755dc37fe896245348332cd5f1e1203479fe0ed1","affectsGlobalScope":true},{"version":"6bda95ea27a59a276e46043b7065b55bd4b316c25e70e29b572958fa77565d43","affectsGlobalScope":true},{"version":"aedb8de1abb2ff1095c153854a6df7deae4a5709c37297f9d6e9948b6806fa66","affectsGlobalScope":true},{"version":"a4da0551fd39b90ca7ce5f68fb55d4dc0c1396d589b612e1902f68ee090aaada","affectsGlobalScope":true},{"version":"11ffe3c281f375fff9ffdde8bbec7669b4dd671905509079f866f2354a788064","affectsGlobalScope":true},{"version":"52d1bb7ab7a3306fd0375c8bff560feed26ed676a5b0457fa8027b563aecb9a4","affectsGlobalScope":true},"d979def17dea97ee491c975f3d3cb31957b7970a791c1d5a3854ea6cd4cce91e","fab58e600970e66547644a44bc9918e3223aa2cbd9e8763cec004b2cfb48827e","c590af0064d3c4c10981a9d7b8033083e101e809bcd6677bbcad7592c18aaf85","6b3d3ecbf6958624910af080a873cd84b5b99d513eb52147f18fe04a51cb19ce","ea9b95f45cd90b16200134d1f79e36380d57b866300b479b3e5b62a6dbeb92bb","14bc80bd2cb4c72aaaf27cfcdb62377cf3e3366f9e9045fa8ca232629457aca9","ff164c4671955c882140da80d0a6a69552ba5c2ddce3969f74c5c9d63683744b","dca26c859f7b4b8cf118dc9b5e99d295a3031bbd980e488819ed830ba769b890","dd37fa6b595bc9d62e265a5c690ee4cce50892b350b8b88076d4983e6901e09f","ddd474fc68a47c90ee975ba16f64017356fcdd3e2890f945c125675d194eebab","91265e9c2705df9edc7d912afe177cb9dbe4bd4fe254cc43466885544c065013","81e7db9916d6ce0323656530cb9aba444450454e5a8f3d0108f04931abb36258","7858aa21ac91fef2c9cdf96b3ae00e025efed2920ffca40a75df452d4f5a9576","eb80dedcd92c17d93f403e736e1c3e2aef39379841070221a353a7c13b57369f","029f3a1e2534e85a7cd00f3e79781003e0bcf5147d96db93594ace839803c6cf","2eea9984a7ea08e576d2970ba65a65ebba02699bccdbd0d3a08bb141e15972a1","308246446616acc5397747f35fa8788de7e6ba6cd5dc0ec2752bd75eafefcdb9","9677ef56e52539a73f1d9b89c692cf866d05017b05d9d2fe8cd35a30b42c2d47","6048b5c50d6486b1084b036a7f7d6c76c032d90cc2186f79b344a12ceb488511","26885abe66e07fd38da599d5fc9b4fa8b2df803c56e9bba99a2505e0b982c042","507dc7647a71c90e8cce85259c624b355c22e0dee1833aa4ba20c15a4f5bd21a","c30aaf3d189be8c29b2d3a7761e94b5b532fec6ba0caa74d07a4c1056469acf0","454217fe7beba4cb5497d4bc7fd3116437ce85e5217eb66f3b367fbcbfd45861","65e1ffb7b2343a1814c5cb85164f7d26bce1477b2cf04e6736f37732bc4801d6","3f810d7cac3e3729241d52d667538dc4ca27687f5d40d91f4cb5bce955df5f94","a2bedf5636ce572e507823229c9b7d4e87d97830497822d76e95a971fee78c92","17ab13eba7cde42ca7c95110c7eda405ba6aba7471437d912078d67dfada98eb","f7e734ca25cb0e8c52247b9a7d98f81ffd6ac52485bf9d8938fdbd4d828f469c","5261283f0b521fc1f255a060dcd86986985bd516822b69bb5504392462962899","44e20ca481bcc2abec1f4fcf54139caa4389f1bc16e3ee9d19a10e522903e9ab","a31eda6fcbf86596f69f7c18e6d13af58191fdc9c9620bcc67595fd9e49043ab","c93085fa9e5e568c0a45f64caa05e713fd5438e93d32f5970753e44910bdd540","1e442333978b5864818023d54d4f2e2aa0cbdfb2b486a0d43c900a7a87d61d1d","f215ce6766668f37f5e4652d0facdf55816f24aa5fc6f68c5e33754dbe5219fb","e900ec60297a15c4de70ddaade026ea4fe635e27c286fedd82dd5e963daa1930","e4e975c7339a9579209f12246e95f95216aa3558b8e7719fea2fbadaf28c574b","f6ba45fc4f91ec75fa2b0841978666d497a0856bdefd60e30005265b8e23d3a0","ec0ccb9f611eb5d98a974590d631e4256eae34893a07037381f3d116fe9f31ee","bd0d80db12ef1aceefc4f9d3eb88517b9634fa747ae8475981da8655292feab8","55e68fb1618e3f55f7866b8c8415152159309a14b716370081ab0b7af96d876e","bf0491af2455f92282b61807be2be6e7ad7d532e47fac7b698019d3617c28ff7","5d874fb879ab8601c02549817dceb2d0a30729cb7e161625dd6f819bbff1ec0b","ee551a880882770c4f56a0964a9767c9feafe497a5be52652527d098c88d85cb","b192606574769a5566620f9bf19358a3994bc2726ecdeaad9c66f3333b2687c8",{"version":"09adfb20f411f337cadecc85c838fc0cfe849182ba7458219035ffa6ac82fb5b","signature":"4fe2a1e4d403427f84342da3bef274417bf9c066c4150873c2c137d5e81be7cf"},"d83d6ec306241a9a59716eadf007d405cbc9d77b688871089a02159087100d5c",{"version":"4eee1e9738d80edb6ff358a14b6821e036b0f44ee28c759a3186a339bddbee15","signature":"e0ec260a583d1f43b0b40d8ff084c0530fad82148dd22d598ed5851321891be2"},{"version":"0292552bfdda78ed1910905ea046a336186ce82d9fab516ea21616f47147ccdc","signature":"c5c64687e6d1b87cd09b5dcb1a7b19f6c81ee49f4a8b96ac0cd8118ca4cb26ad"},{"version":"78673ec3910aff07d76d2a24b460523c69d50afadfcd836cd9a022ad1a3ebfc2","signature":"8d228729747db25bf2ead19fb49a22043a9d4aea0bf22c158c04425775bf7da5"},{"version":"ff41da7aeac53e419a3a7eb792ea03c77cf05e44d379dfa2190920bfe6dde09b","signature":"aad27c6a175d8d51692aafc8ee4b44a68d2d5f0c742f682163067ba4531539b3"},{"version":"849507adfc66cfedda67c3384a1ec078c542263589413c5b31c195aee25dc1f2","signature":"7696b684936428916f6df4d6c5fd79832013b8b17b59e3ff4526f4ae85d2ea37"},{"version":"c30b952d25562463882bbbaac6242e2cb47cd342c27388f46e4b7b0c98a4b659","signature":"b25773451df3b8c7bab1831253175c79202fad8a68a8aaaa3133833157a14333"},{"version":"c32e26a53123519e9bcf0aa960cc0a5dfb3ecebcc27fe0ccc649702b45da1e2a","signature":"bd058b5fa63242cb9a3120e68e0c31ca4b76b44495e57830e0cd91a2cd244513"},{"version":"59688ffdb24f7f057e35f54280e90bda1e57efee745479a1bb98321b263870e8","signature":"6da01a778dc7873229c2bd8afc284f0747816ac9a25a46f20f08646a53b3fa54"},{"version":"95d027d78b9577e00f9d4e0eba816fd21f1b2927c801f89a1db8369b837471c3","signature":"14e76138d39edd49d980d91efc28e720241b9cdaf137f8cd233abf7acd0f890b"},{"version":"67abb822ccd022dad3502f533ba7442910fb517338eef8a5f795fe447c5a6167","signature":"13e26476d7c3fb35c32bd60f3931dea5d5503d802eb1ef08222723737717d72e"},{"version":"89cd89294b6369c40e06b1b0bb018f8df9cd7d74ae6e7534688b20511519bf34","signature":"3b37a425fb5e07467e79aa7954de2aa9617961982c2f7265c01ed16b482da977"},{"version":"91faeb8163ec860e5b5c02eda51cd16e64de95baaadfec34e0fbd9d39176ed8a","signature":"29e9de0601d40b7f34a82099b85bb19dfcfb8bae17a0521ac210fd3ffd1d756f"},{"version":"32dd0a374316655532fa70f75abe84157bbd1c5cecd290724a859a894f802d31","signature":"81282df2d2d5a68892cc7ede89b70facea9daece84ab8ae6cfeae36788511112"},{"version":"bbdf156fea2fabed31a569445835aeedcc33643d404fcbaa54541f06c109df3f","affectsGlobalScope":true},"381899b8d1d4c1be716f18cb5242ba39f66f4b1e31d45af62a32a99f8edcb39d","f7b46d22a307739c145e5fddf537818038fdfffd580d79ed717f4d4d37249380","f5a8b384f182b3851cec3596ccc96cb7464f8d3469f48c74bf2befb782a19de5",{"version":"5917af4ff931b050dba49a1dedd9c00f15f7b3dc4345ad8491bfacd2ec68ed32","affectsGlobalScope":true},"14ed49cb68f29e36dfb562b7c382ce70d467b7310e8e27cc587772d029f372b7","ab6f9c23c44e0b20c2be80af46ffc9d0e6681efa05ee1704bb4c9fcef8e61497",{"version":"5917af4ff931b050dba49a1dedd9c00f15f7b3dc4345ad8491bfacd2ec68ed32","affectsGlobalScope":true},"e4dd91dd4789a109aab51d8a0569a282369fcda9ba6f2b2297bc61bacfb1a042","83e27bbd7304ea67f9afa1535f1d4fdb15866089f0d893c784cbb5b1c6fb3386","c4b39848e2fb237507a7acae0b83a34271c9d72714faae6a6b9075527205111b","d2d9e98a2b167079474768593e1e7125fc3db055add8fbdb5977e3d05a8a3696","6462da67490105ba7d98cf312c2faf8794c425781128b161ea8394d66502eec8","62359da52b6c8d00c50c2e50738fac82e902f916fdf458d8159e7edb1c60c3a8","1e0ac21bc775686383ea8c8e48bd98b385e6195b25c85525a7affd08a2cd38b9","0449615e1ed03c7d54fc435a63b7ef0cb4e5cea5ac40c9a63280a46f7eeae0ff","f647358d9c48f01ca886cf4e022a31cbc9f84a5706cd85df656b0b8e3ec118eb","3e04bd7b52acb9c393909520bc6bf74989ed3cb8cee63c9ae88e20467a8f02d9","a958d081d81c1194d1878b28f081d0144d95f4e36c6b375e357cb982e8b40705",{"version":"8f19251323456195ec9236df857bac3b8f97b73b540ef06ead2ceccc3884954f","affectsGlobalScope":true},"161ae38e8fa5c0a1a8002eceba810f99734edd08493c15bdd0c0e3034ea13606","e3e12de1cc9a3f289b1ea267336edf625260cdaa50a3dbb33b61fc58e5a792c7","d23aeb9ad9955d3b6df7a972355dd465aaa0f7b8c223834f9499585b75f2ab04","cf000108177216c2ffd9962c785dfe0eb36306b14817894115be2d8f470552d6","61937532d01a86bc9f9847e016305cec9b5a716db5a630a0c37049a477d18f60","c792ecb733fc79337b7b497d3298dc31217f0f2b944ade255037dea871915353","61e8a34952f23c48deff3e85e982b1b3a600d15fb4d3b7c07a9096505ad2c35c","4fe57f4d9ea10f6069813ca18818838ce21258f42e79f898b4fb7860ce0c58ca","1e525db7ea2d7369211b74756f1034e4219134c3c99c0e147998caf43b10e017","e11c156803f0c4423e71cafc494033b48f1493b411acd77e50a769d551dafb7e","9e0a0be03e67f904274ee24bae9065c6239d347b27429ad1c087bec8a6e1c931","b16d8125f0987eeddb3cc3278272324e8f6a3d2608d92f5fbb20908c89bb1d71","d2c8976d6e6874ce159fc31c8511fffde72dcdf230394750ea4ef3c02a32e52e","fb6fa5434ecf7670f3dba36bced663afe875282d1231fb3ae95eeedae85ce4cf","e4cb6f9e4d40f538e26c72cc81ebd8ebae3317f940f39696e30d1381f36e5a0a","30289252a73fce7ff4b88369c829ed1f8533ccc028c55b264fc96fb576ffdd6a","3f473bb1c974b627227610013561332ea2f8e6eed0e86e87eaef96b6146d28c8","ce5bdb993fed19ff6f8a7a9ae3dd2fbe650c45c6552e7fe33e24bc4c51363b81","c8bd10b6cdcb527ce859b9c5b4b6168f270cec11cb051cc77eb4dead206b5e0f","5298c28f30d0a401464fccc5ea2e620c381a9b75bc4bbc0fb1557468ea077ead","773979fb94d64450b1567975ee28a630cae6f2c01c2c18e06563c744bb6fe0c4","8e3d399a59744e651362087da32211ed34c6e8dccee4002abb82ed2f9e4c7301","9a726679595a1e729708d633c114be758c8b4172029916456e3feab6f76e6e43","a0cf70217b68c414db6c4863831250c8a2d96469c8044b75edd3a460793c9887","8d7c0f64cebcc3690112c28a4861bd9385836b47e9d1c171e6362100b3cc32a8","17ba9202cb2a0e0deec28398f2ef6c95c7193cbe46b8b6eaf8f54f48aedd7139","2758842856646f2bebbeb5150707ca4b5ab8fa1d46d95b3386493e6d6b4221fc","f9523fca1617fd31e048afd09f08cca592a7bbaeca4d5ff1e1781ab0cd2ffe9b","881a6580fb531a8331bf04acd77bf935d81d92af0dc6b91996e4548cd6227429","997b40fb1aeb304b6d3bc9021361bd6c5a1ed3b1e1a1459533a9c854db4ac715","23d7a8b5d3297675007160f5cc75777e6eccf63ff6650bd3ed01eb0b3cdf2a38","8db59d5540f8bc033f35eb1a4a7903d202fbace0874b456e463af2675da2398b","c5a28d3d50c8edecc8cc87ae3a5dcfa34e630f970626bf30c552e681c7055fd0","5f8402dfce577684c2de40394f60628ffe6e44e6bc308dbeb1b643c527d758bf","daa0b5b58eab0c3dfc200cde4cc933084b908ede3aacdda1d2797f98c172142b","404cd1151ad5c08da06987950824a77194fc5e2c905e2b90252ad066d922614b","1d9af36f24bba0f0d3b80358e0b7fcccf8ea361d799adf0407e48b949fb3b82e","4807581687ad8a41a480f2f55a93eed33881d2c3a4bbcba14cd77fddd6c32f8c","32336f8d3f635d379eb6438dbbd2ead8deebda788e12062855815c0834a50720","af41d975fc8aa598ea03632ab9c78fc6e614f9627efd1ddd4342054979f1031b","592aa170bf0e1e4a71f473747252bf79d56e7d821d33b2e3cce16a7fd168bd9f","2cc143754ed238f214e763525cd4c11613409a643fdd602f4e0a2b19f1f2d397","96520a873073a2f39f922d0a422498cdcc28be9066a769000cdd07ecaba7b645","c7284023c5462180e492357aeb94551a20aa41eac8ac517606f3766359d08bb9","ed4ec3d435678a5703a016a801afc2cd7b543c53ab4615b3e214cac9c30f560a","e345f2ee8dd216e738840035224950764086f16e6ef75de310747b839a3dc14e","501be290436f06ae2182915329b01cfd0850961814802237b5c24749fd2afa0c","cc34c3c1590513cdb6374890f421c06ad969cfd99b28efb6003a6afc845c49f8",{"version":"b5b080e499df18235bac525ce43da935d1a068c5770f58b245d24b6ae8baa166","affectsGlobalScope":true},"7be4c510922d20d3946d7916b8a4c075429b179a3b143e3541bbbd4191e5988e","f295ab6b1bfd2b6b5b19ba621cca18c1b94b25c430c67fcb66c9594e89e3ff39","ea6c58f9711f6dc2f5609e085a1751d1284f1097b568852863bc24becf970831","f59327cd1c98362028d2d2b034b9bada17481ef7f12f13b046bc047ab4fc343c","d759d5a895085d1cfc89d1d1791c188c8170d933092db93e2b48676c49ee7310","23cdc008b29455b89f900f5667bbbb95df280deb7740e7a1d118f894118d8eb8","bc0ee5816f40067bef4972b88c81564d50b9aac01833a818a0528667730d7729","2c8e1d8fe99738fe377049c1baa8b074ac11bdbfad103881c6f012a09383e361","5fac858cb922fe34b898ddc12db441c878ec72bf6a1e3bcbe297f4da4bb6672a","7f119c8c5d4d145e6fcf668055a76f37ed273c24584d5bb90ff9f5520648b47d","b4e123af1af6049685c93073a15868b50aebdad666d422edc72fa2b585fa8a37","f86c04a744ebcede96bac376f9a2c90f2bd3c422740d91dda4ca6233199d4977","6ae1bddee5c790439bd992abd063b9b46e0cadd676c2a8562268d1869213ff60","606244fc97a6a74b877f2e924ba7e55b233bc6acb57d7bf40ba84a5be2d9adb0","4a1cabac71036b8a14f5db1b753b579f0c901c7d7b9227e6872dadf6efb104e8","062959a1d825b96639d87be35fe497cbd3f89544bf06fdad577bbfb85fcf604c","4c3672dc8f4e4fdd3d18525b22b31f1b5481f5a415db96550d3ac5163a6c3dd3","f9a69ca445010b91fe08f08c06e0f86d79c0d776905f9bdb828477cb2a1eb7fc","ad7fd0e7ee457d4884b3aaecbcbd2a80b6803407c4ce2540c296170d4c7918ef","a50ef21605f41c6acad6c3ef0307e5311b94963c846ca093c764b80cdb5318d6","74b4035dd26d09a417c44ca23ab5ee69b173f8c2f6b2e47350ab0795cf2d4a17","918f86ee2b19cc38cb8b1a4cf8f223eb228aaa39df3604c42f700fac2f0b3ea1","762bc52248d3fab9873c7af564caf622358312cb35de42a4393b71cc36e14621","d02ec79cefaf292fae64b3be5a4416e64b4e420a6429fd458fac6e1bb4c7950e","27abed653f600ea0d5c86e94181beb42824e0f3f16337e2f9e7e9e9c2c392edf","d7871e0e653aa7197fee88886db5678bee6d42164c1f36e4bce9421ddfa7ca49","11ed10bdb3bcc99893570507eac8fece4840add97ee1d4f5a7fbf41cbfdea0d4","429fb571d3db07d3eaa2e74d43eb4190ece3e0de832ed564aeeaf08873e598eb","406d52bf33d618d846aa0d831ee004290567e328edcd4517bbff2937cc977abf","d3060e0810fc0d0dc009e6f086ef413d3c8aeaaf07da25c8d25fd4e181646acf","023747bf4162d5f675dbee1acbfb409a33e70d2358fd218b6a1b22dee8706c1a","08f7e6ffa66c66a636aecc5acbeb998215d9d09ccba0c558afb7df7e218edeaf","f829eb39aea4487f0ff94a42c56a1a73bc5202bbdeb03f7a638e4ab3e290d017",{"version":"d602b4b9670fe275b6b1f9578b18bc3a5c46692f745623cd6551c69d284a88ee","signature":"03032743a86276922678411a754bd3319227aaa751e160b6390813af40c561db"},{"version":"22f91084b9e0b9f70b913d44f1959b1d3dc01c97d616c8b10656493c8c47111a","signature":"3334933683e0bed25376a865967d4d96a19e25bc7399b042c827a55ebc839dd6"},{"version":"87f792436b033580a1dcc908d15851e4a5d3d7aa68b1d1c6a142706ef8b154a3","signature":"a41ce7b1ae948a3b4b5f07173c5d7e1ab1cfd0718c0ecd2e8ae92c32a9389756"},{"version":"a6099f12a9f086aec74c8c7a40051a3ce11c89aa331a39002edcdf808a09d9dd","signature":"08a676d6a15e3e0bfc71dd6b438cedcda44c4b9a7e1bdc5d98913ff976ef426b"},{"version":"56a3aef852aa146f9fe362a1d09e13dae20f3794d33f66b371829348a8ee0e62","signature":"fd9b9b18e7076be2424765bf033de080a9877dc9b01899005199a5c0c458c21d"},{"version":"07c14b3359e3ed5607c690b9f421f84dd93887e06416d52f60889b4082030464","signature":"bf2162b8f3687c847f2e4f2f7a7411e30afe7b00322225bda934a43c5fcd26b6"},{"version":"063f439998b87e20f46fa82cb793c5aae5c2d714a26bb8221e07f5d4c82c989d","signature":"21b880bc61bdcb076c065b90dff22a6a4e1948c0e2a5b33b618d28e38361b9d6"},{"version":"a3dcfa473fb451f89860a5dc83f1994fccd151af55a87683cb6dffc0abba782b","signature":"aafa425abc6f6369bfc9665c4eaf3f771e300ecc3e45d9a531c136cbba3e5968"},{"version":"40b369b61fd0bede44a39611baae531e6d46a718b705b9b45c5add4711f19744","signature":"70310a3313771cf5c0aaabefd35bf3279db5fbbba31367a4958e32e6c9d8a0af"},{"version":"225a94e9b80d9ed325a5996ddf6e8e8ec1e35d0cc78ce63b4f7bc3109c41fcfd","signature":"d129698a0ca7b32daaf62a1836f3f4eb165f4e34572aeac677d9b126fd9f8199"},{"version":"220b6ba3c2274aada1b2a9ad69f6966c8d36de546e708fe2b42425a265a48e2a","signature":"0b5aa6750a08b8b69bb43170a86e8a48aa6a2ef296abcb65b6f1b670b697cd45"},{"version":"29733740a84bde4ceebd6415c3a47d36c9a956fdddeacec49a664665a54018b0","signature":"6ee1faea03f9dec6d7a18d8c625c5b54aec0ba6a8be129f816e692c41bc1d425"},{"version":"6e603a0983306db957764528f138c4897f0391799f876c4c1b46226c0dd8cef2","signature":"99ce9bcd0f2a0f1f8273963fc66b1a9941d19b6e16f68a7bde83ee10f1c25165"},{"version":"36d8781b9aa56efc6c8e0c6366ecdebf7327a2ac5b1e1490de1ad5a911457bb1","signature":"52ef9c1dc9a2a237e7da2cd27f3a506b916e79b44277472350fc9d9601fba810"},{"version":"e8184f498bb78351e6d6f9fe654279d9882d58dd822a9a1178a96e7570262502","signature":"80349e7fdbd0e6e910977a2257fada575d89a2ff660790fbecf519681ea3b285"},{"version":"ff0a6ed7e754b2cfb1a907578f1c335b4c5ace714a5adb956f94d6192b17f078","signature":"2abc7e0d9555c3af2658d473a994244dcf1aad194841704cf70e92ac3416330c"},{"version":"bd3086a825d96259e7a1c79ad1bb13749d41cb79ba4336ba813cc65cbd51fd74","signature":"6db2b3c555e604be487fd6d30f8d60e8c9fdecc756983398e74d2bdd3f748327"},{"version":"46adb1b5ccc5123a4592a20c1c56c8c7ef34d9b2ea43b16a271587ac2076728f","signature":"56a9cae143cc2d7121795f53b436799f2c0c3bdf9364a7b55aa2c9bf5d9fa8c7"},{"version":"a32f1f8649b0e898d4a54e1860effc7f48dd285bc99f83dc35ccf85203736b3b","signature":"b57cb32c00cb413d449dc886765c39ed0d82ac830a441ed9f93651d595271487"},{"version":"beacf8337f15a959b6e4d95d7b55432af842b0484da0f0d342a0dd75beab8fe3","signature":"5a39985c8d52beb45be11e35ccf7a9bbdee769e1adfd4ad1891e55a6a5372067"},{"version":"8800447dd5175024126c56daa37ee888e507a5b4cb010790ccc86530a46424fb","signature":"54c7600eb52d16711ef53e384c5e2ba16624dc8f78bf2597d5d478434b981d38"},{"version":"cd04b594271be8b8eca1453116f1591ba60ce64d80183b07765a4b5e811966ea","signature":"1dd725e5e9260a0f77821e2ce227dce28d8745fd5e4e273b5fd9d6919bbf8602"},{"version":"c2c2c6c7ab6fd08050cc906a2230657bd7ae25365a38db7a4c2f84980133d0cf","signature":"ffa3caca7cd00c83855db4212fa8e6c9092c52935533a5c6d286479a72a9b562"},{"version":"8199ff7448213d4633834954dad4e5a5e7ed2e14fcfd3f5a1b53d156a1cd9972","signature":"ddcf3b8de10baa5df4931e0054b1e4ef58e38164236deac6f50bfc3dee758cea"},{"version":"327bc1d7e826f1be1b18c51b3444a2dfc66d3f810b43ff5f32b26587db3ea1d2","signature":"608da779a8bbb36435da5d3a9e74ffe39d8d2589aa67edc38d1b6c9aed587ae4"},{"version":"53dbe2ccb36c68a62512d3f3ddb0b5b0c7c19fcfc93795210c5145e0b4f94ff6","signature":"16189e6e3d71ce7a6dd75162c4da380285947d35ba619de299815a533f3e7744"},{"version":"d461fc73e0721ae92652f11a61cd1014a0698fb7ddb81beac1aa7d09aa139abb","signature":"6bbecc58e9e16db39800f6f632fd7fbec5fb3106768e12cbc172428d5f42a55f"},{"version":"83ff1f6f71ab0ea7a2a725a864d70672acadada85bba149552c8d815684d90ea","signature":"3675111095ae945a942611e8206a3535f2d19e9d82e4aa73c18e91db714a3076"},{"version":"db20f91a589c9cde7c5c110fbc24dbd2577b28673098388bd114126c394fb55e","signature":"73af4d0a8f95722f927af272d152cbb395407c70888046aa8b44e1886307ff23"},{"version":"d0b60172a9c516c1869899e1d4ff36332c8023393355215f559872dc7407b1ae","signature":"a352d2a8d7025725aa59cf4649058cfee61791139b209727a8cbe44d02551c09"},{"version":"34b6d8c14e4dfbbb8a02c21633e94ea0786f49e2711ce69c1b04fde0d393387d","signature":"f7a94cebe838cda45b04a9cada5095b74545e408603dd3a253153424e22f7a74"},"eda83eb5ad3e0dab986107adbe50ebc6a2a832e20331770341263d82446369a4","7aad58c3b214bfb7e53ea867e8c34181c0458780b999e448fe953919b4401780",{"version":"7cc837e5ef1c3262bff305f712f9a8798ff835e640266e437af3bfa8875e0162","signature":"64fa5d796f6f8071c5e5282d751646e1863a20756814c232f3ac7656c39070a6"},{"version":"4509713a1fca7b89a18a9a28c40e5696104a19a6fbbf2dc64946b2f42739049e","signature":"f9808c356979e4a96ad796fd333e329386e9b92d8112389c34e22429fcf7cd44"},"5190f1a110a789c2f8ed8dcf2da6ce122dcb74249d0c01d19d1ed0b1c6bb02a1","3650bbe137c9c44bc6b8f44a56353b00eba9654e41a9355e6228f7f0f464c648","eb467c4dcea39773409e7cf23dce1c65991ce3d31c86a0a7e1dfd73b880fc986",{"version":"7d3547ebba721de480b407e001410add23daa6d97386723ab622ea6c6c1701e3","signature":"e6e50852f3a5bac16df941549e31fdfe6f1dc36e4dd11ee3a02e6e62dfcc7aab"},{"version":"3a30d723c270107520dae4e5925fb87b3422115002eae497bca0d1d801bf6fdf","signature":"2f3468aed3a2fad4effd95814786077454364acbefbc396b21db7443519d5fa9"},{"version":"b5f5bbc6d622c252fc13b512ed42cafd65019768e3f0430637e517d9be69547f","signature":"7f7f6bec76eeeed705a59301e0f94596c5451dfa8f466d1013bb23a9939b7b82"},{"version":"71fce7a0dc64feb145e0f58842f43984a2e9ecd79861d8ad7315c0d272575275","signature":"197f5cddfeb650144db705fa2b555878afb78b6cf6b1a8123bf9d49b61a2f728"},{"version":"066db40ccd6c90d1e57e9f163458713463d4e2771c156acf9ffb7f258646946e","signature":"2cdefde7a30dd4a46bae386772de54e70fc22d84c567bc54241fd24f9d86e55a"},{"version":"2366b3f634513f748f1cc92ba9a5b015b39cf0195e25c942e3d844721f0e233d","signature":"5f0944f4f8d3230421c4e73b91fbe49085f9275b36db098eae5b57bce4c2593d"},{"version":"667a5fe656b9e0bf163b829ad74d679c56e82c83456a7c5387ffca0d1f901e5e","signature":"50a30e129772a920ca0ce3581c8d9f6ba1f11f3d3abfff6f0ea82c3183bb654f"},"d93931264950da279434192bb043f8e379b4a0959bcd294ca89c8b89e1a6772b",{"version":"3a1cab834f4a3ceedd0dfe8c00b9ca84431454cad8730eef0d0a18d1c0f7a7aa","signature":"47581fdabdf5c471a08b24a9bda43cdafd504c632f25b64b407b325474013997"},{"version":"8d8b84756b85d1dd9d3a60d54f4410b892f931d46560f60ddc44a4decb8f9ee4","signature":"be7aeea23d9d1ee7cb52b00e44983b6e4d8624c2c81ea1b3b5fee229b136bb31"},{"version":"902abf1b6aeb2908452ad206db72b0d39029e000a28dff529751585a4e7e5f07","signature":"8a9f7353fe52ce71dc66cf00091463c27bfb213052b60d5af4c89357d9415436"},"e824690c25b4d469af83e8fe10d15811d06d588c1b31eae795390b98b888dfc3",{"version":"691a13dbde331d5bcce65e1463f924b78ad046c0c05ec57bca010e6435de8905","signature":"337a54c2c3e3bd84801f4476df30537784817b2a7994b79be7c0461858bce017"},{"version":"0f112494322a7ecb5dda1823f0f84255451a51d2ad862a0ae1014d361f0257de","signature":"c223f8c662d0c154a62a019af49c095b94042102886cf7f0427cec0346a7d626"},{"version":"bca410625e15b9622626f7ae8aa445153232e0d45e46f0e8dbcd632d735c8e47","signature":"693e3c01cf16a1aceba63b8b0652cc8ffc6eb5c2a6ac7a32aaa7923005378f5b"},{"version":"b17b040353ae186f68c2e173f268eb378c3c60ffa390107f6a727fa94e627560","signature":"459ab81441c14763bc66ff4f72dd8d225ef1939ecd528963a320a19c08f9dc93"},{"version":"32fdfaf68928cc5f3a0185843543667cdd3f895139717a30a35a7218f5eb2cc0","signature":"d52cbd2e75ccdcf74dfae08d0bbb40474055e074570a607fe1c5bcd4edb38560"},{"version":"2acb4ac0e18abb828c78cf8b61941f37e8ff3a8eb4705da3f38c1aa458273619","signature":"1d0cb883692d5e5fbf56a1bc8077cee13a268bf4fcfea9d91b7dca2dc8997ec8"},{"version":"a1473225afc48a471cde6656263736febf2dc83543ad10ef66936f7ed71b2fe3","signature":"83762b92cb1d09bf414c9cbdb3c9704d2b68694abef328425d3870a86a53ef08"},{"version":"9b560f257e620b1b8ec2d1a1b87a017986465fd95a2ed2460cc97e8effb6b7da","signature":"2d4fc440682e261a12ea4dd9730667bbda29fbdc42f608c832ebd8709af6142e"}],"options":{"allowSyntheticDefaultImports":true,"composite":true,"declaration":true,"declarationDir":"./build-types","declarationMap":true,"emitDeclarationOnly":true,"esModuleInterop":false,"importsNotUsedAsValues":2,"jsx":1,"module":99,"noFallthroughCasesInSwitch":true,"noImplicitAny":false,"noImplicitReturns":true,"noUnusedLocals":true,"noUnusedParameters":false,"rootDir":"./src","strict":true,"target":99},"fileIdsList":[[119],[116,117,118,275],[195],[194],[194,195,196,197,198,199,200,201,202,203,204],[197],[199],[94,95,96,97],[94],[95],[58,59,60,61,62,63,64],[58],[155],[119,155],[156],[119,169,170],[120],[119,177],[130],[156,157],[155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192],[56,57,65,93,99,217,219,222,223,246],[220],[65],[220,221],[65,205,216,247],[130,154,217,223,250],[224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243],[244],[65,93,216,262],[65,93],[263,264],[270,271,272],[266],[99,130,154,268,269,274],[93,99,268,269,270,274],[154,267,268],[99,268,269,274],[154,217,223,244,245,246,247,250,251,255,256,261,265,273],[260],[258,259],[257],[249],[245],[93,112],[100,114,218],[112,113,154,193,217],[101,112,113],[56,104,112,154,193,217,219,254],[65,93,112,205,217,223],[93,99,101,112,154,217,219,223,244,246],[56],[104],[102,103,105,106,107,108,109,110,111],[139,140],[119,142],[149,150],[136,137],[135],[131,132,133,135,138,141,142,143,144,145,146,148,151,152,153],[147],[142],[134],[98],[120,121,125,126,127,128,129],[123,124],[119,120],[115,116,117,118],[212],[207,208,209,210,211,212],[207,208,209,210,211,213],[212,213],[214],[206,214,215],[252,253],[254],[248],[81],[66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92],[268],[268,270],[101,135,244],[101],[104,134],[101,244]],"referencedMap":[[124,1],[123,1],[122,2],[196,3],[197,4],[205,5],[198,4],[199,4],[200,6],[201,7],[195,4],[202,7],[203,4],[204,7],[98,8],[95,9],[96,10],[65,11],[62,12],[63,12],[59,12],[60,12],[61,12],[64,12],[160,1],[161,1],[163,13],[164,14],[166,1],[167,1],[168,1],[186,15],[171,16],[173,1],[190,1],[192,1],[169,1],[170,1],[174,1],[191,1],[176,17],[178,18],[188,1],[189,1],[183,19],[187,20],[182,1],[193,21],[155,1],[247,22],[221,23],[220,24],[222,25],[217,26],[251,27],[226,28],[227,28],[224,29],[244,28],[228,28],[230,28],[229,28],[231,28],[232,28],[233,28],[234,28],[235,28],[236,28],[237,28],[239,28],[238,28],[241,28],[240,28],[243,28],[242,28],[263,30],[264,31],[265,32],[273,33],[267,34],[270,35],[271,36],[269,37],[272,38],[274,39],[261,40],[260,41],[258,42],[259,42],[250,43],[246,44],[113,45],[219,46],[218,47],[114,48],[255,49],[256,50],[245,51],[102,52],[105,53],[112,54],[107,53],[108,53],[140,1],[141,55],[150,56],[151,57],[138,58],[136,59],[152,59],[132,19],[133,1],[131,19],[143,59],[145,59],[154,60],[148,61],[147,62],[144,59],[142,59],[146,59],[135,63],[99,64],[121,17],[130,65],[129,1],[125,66],[120,1],[128,67],[119,68],[207,69],[211,69],[210,69],[209,69],[213,70],[208,69],[212,71],[214,72],[215,73],[216,74],[254,75],[252,76],[249,77],[82,78],[93,79]],"exportedModulesMap":[[124,1],[123,1],[122,2],[196,3],[197,4],[205,5],[198,4],[199,4],[200,6],[201,7],[195,4],[202,7],[203,4],[204,7],[98,8],[95,9],[96,10],[65,11],[62,12],[63,12],[59,12],[60,12],[61,12],[64,12],[160,1],[161,1],[163,13],[164,14],[166,1],[167,1],[168,1],[186,15],[171,16],[173,1],[190,1],[192,1],[169,1],[170,1],[174,1],[191,1],[176,17],[178,18],[188,1],[189,1],[183,19],[187,20],[182,1],[193,21],[155,1],[226,28],[227,28],[224,29],[244,28],[228,28],[230,28],[229,28],[231,28],[232,28],[233,28],[234,28],[235,28],[236,28],[237,28],[239,28],[238,28],[241,28],[240,28],[243,28],[242,28],[273,33],[270,80],[271,81],[272,80],[274,82],[246,44],[218,63],[114,83],[255,84],[245,85],[105,53],[107,53],[108,53],[140,1],[141,55],[150,56],[151,57],[138,58],[136,59],[152,59],[132,19],[133,1],[131,19],[143,59],[145,59],[154,60],[148,61],[147,62],[144,59],[142,59],[146,59],[135,63],[99,64],[121,17],[130,65],[129,1],[125,66],[120,1],[128,67],[119,68],[207,69],[211,69],[210,69],[209,69],[213,70],[208,69],[212,71],[214,72],[215,73],[216,74],[254,75],[252,76],[249,77],[82,78],[93,79]],"semanticDiagnosticsPerFile":[177,117,124,123,122,118,57,196,197,205,198,116,199,56,200,266,194,201,195,202,134,101,203,204,11,13,12,2,14,15,16,17,18,19,20,21,3,4,25,22,23,24,26,27,28,5,29,30,31,32,6,36,33,34,35,37,7,38,43,44,39,40,41,42,8,48,45,46,47,49,9,50,51,52,53,54,1,10,55,94,97,98,95,96,65,62,63,59,60,61,64,58,158,160,159,161,162,163,164,165,184,166,167,168,186,171,172,173,190,192,169,170,174,191,175,176,178,179,188,180,181,189,183,187,182,185,193,155,156,157,247,221,220,222,217,251,226,225,227,224,244,228,230,229,231,232,233,234,235,236,237,239,238,241,240,243,242,263,264,265,268,273,267,270,271,269,272,274,261,260,258,259,257,223,250,246,100,113,219,218,114,255,256,245,104,102,106,103,105,112,110,107,108,111,109,140,141,139,150,151,149,138,137,136,152,132,133,131,143,145,153,154,148,147,144,142,146,135,99,121,130,127,129,125,120,128,126,115,119,207,211,210,209,213,208,212,262,214,215,216,206,253,254,252,248,249,80,75,89,88,70,90,78,77,72,68,81,82,74,83,93,67,66,71,79,73,69,76,91,85,92,84,87,86],"latestChangedDtsFile":"./build-types/index.d.ts"},"version":"4.9.5"}
1
+ {"program":{"fileNames":["../../node_modules/typescript/lib/lib.es5.d.ts","../../node_modules/typescript/lib/lib.es2015.d.ts","../../node_modules/typescript/lib/lib.es2016.d.ts","../../node_modules/typescript/lib/lib.es2017.d.ts","../../node_modules/typescript/lib/lib.es2018.d.ts","../../node_modules/typescript/lib/lib.es2019.d.ts","../../node_modules/typescript/lib/lib.es2020.d.ts","../../node_modules/typescript/lib/lib.es2021.d.ts","../../node_modules/typescript/lib/lib.es2022.d.ts","../../node_modules/typescript/lib/lib.esnext.d.ts","../../node_modules/typescript/lib/lib.dom.d.ts","../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../node_modules/typescript/lib/lib.es2019.array.d.ts","../../node_modules/typescript/lib/lib.es2019.object.d.ts","../../node_modules/typescript/lib/lib.es2019.string.d.ts","../../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../node_modules/typescript/lib/lib.es2019.intl.d.ts","../../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../node_modules/typescript/lib/lib.es2020.date.d.ts","../../node_modules/typescript/lib/lib.es2020.promise.d.ts","../../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2020.string.d.ts","../../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../node_modules/typescript/lib/lib.es2020.intl.d.ts","../../node_modules/typescript/lib/lib.es2020.number.d.ts","../../node_modules/typescript/lib/lib.es2021.promise.d.ts","../../node_modules/typescript/lib/lib.es2021.string.d.ts","../../node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../node_modules/typescript/lib/lib.es2021.intl.d.ts","../../node_modules/typescript/lib/lib.es2022.array.d.ts","../../node_modules/typescript/lib/lib.es2022.error.d.ts","../../node_modules/typescript/lib/lib.es2022.intl.d.ts","../../node_modules/typescript/lib/lib.es2022.object.d.ts","../../node_modules/typescript/lib/lib.es2022.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2022.string.d.ts","../../node_modules/typescript/lib/lib.esnext.intl.d.ts","../../node_modules/fast-deep-equal/es6/index.d.ts","../../node_modules/@types/uuid/index.d.ts","../api-fetch/build-types/types.d.ts","../api-fetch/build-types/middlewares/nonce.d.ts","../api-fetch/build-types/middlewares/preloading.d.ts","../api-fetch/build-types/middlewares/root-url.d.ts","../api-fetch/build-types/middlewares/fetch-all-middleware.d.ts","../api-fetch/build-types/middlewares/media-upload.d.ts","../api-fetch/build-types/middlewares/theme-preview.d.ts","../api-fetch/build-types/index.d.ts","../url/build-types/is-url.d.ts","../url/build-types/is-email.d.ts","../url/build-types/get-protocol.d.ts","../url/build-types/is-valid-protocol.d.ts","../url/build-types/get-authority.d.ts","../url/build-types/is-valid-authority.d.ts","../url/build-types/get-path.d.ts","../url/build-types/is-valid-path.d.ts","../url/build-types/get-query-string.d.ts","../url/build-types/build-query-string.d.ts","../url/build-types/is-valid-query-string.d.ts","../url/build-types/get-path-and-query-string.d.ts","../url/build-types/get-fragment.d.ts","../url/build-types/is-valid-fragment.d.ts","../url/build-types/add-query-args.d.ts","../url/build-types/get-query-arg.d.ts","../url/build-types/get-query-args.d.ts","../url/build-types/has-query-arg.d.ts","../url/build-types/remove-query-args.d.ts","../url/build-types/prepend-http.d.ts","../url/build-types/safe-decode-uri.d.ts","../url/build-types/safe-decode-uri-component.d.ts","../url/build-types/filter-url-for-display.d.ts","../url/build-types/clean-for-slug.d.ts","../url/build-types/get-filename.d.ts","../url/build-types/normalize-path.d.ts","../url/build-types/prepend-https.d.ts","../url/build-types/index.d.ts","../../node_modules/utility-types/dist/aliases-and-guards.d.ts","../../node_modules/utility-types/dist/mapped-types.d.ts","../../node_modules/utility-types/dist/utility-types.d.ts","../../node_modules/utility-types/dist/functional-helpers.d.ts","../../node_modules/utility-types/dist/index.d.ts","../deprecated/build-types/index.d.ts","./src/queried-data/actions.js","../../node_modules/rememo/rememo.d.ts","./src/utils/conservative-map-item.js","./src/utils/get-normalized-comma-separable.js","./src/types.ts","./src/utils/if-matching-action.js","./src/utils/forward-resolver.js","./src/utils/on-sub-key.js","./src/utils/replace-action.js","./src/utils/with-weak-map-cache.js","./src/utils/is-raw-attribute.js","./src/utils/set-nested-value.js","./src/utils/index.js","./src/queried-data/get-query-parts.js","./src/queried-data/selectors.js","../element/node_modules/@types/react/global.d.ts","../../node_modules/csstype/index.d.ts","../../node_modules/@types/prop-types/index.d.ts","../../node_modules/@types/scheduler/tracing.d.ts","../element/node_modules/@types/react/index.d.ts","../element/build-types/react.d.ts","../element/build-types/create-interpolate-element.d.ts","../../node_modules/@types/react/index.d.ts","../../node_modules/@types/react-dom/index.d.ts","../../node_modules/@types/react-dom/client.d.ts","../element/build-types/react-platform.d.ts","../element/build-types/utils.d.ts","../element/build-types/platform.d.ts","../element/build-types/serialize.d.ts","../element/build-types/raw-html.d.ts","../element/build-types/index.d.ts","../data/build-types/components/with-select/index.d.ts","../data/build-types/components/with-dispatch/index.d.ts","../data/build-types/components/with-registry/index.d.ts","../../node_modules/redux/index.d.ts","../data/build-types/types.d.ts","../data/build-types/components/use-dispatch/use-dispatch.d.ts","../data/build-types/components/use-dispatch/use-dispatch-with-map.d.ts","../data/build-types/components/use-dispatch/index.d.ts","../data/build-types/components/async-mode-provider/use-async-mode.d.ts","../data/build-types/components/async-mode-provider/context.d.ts","../data/build-types/components/async-mode-provider/index.d.ts","../data/build-types/registry.d.ts","../data/build-types/controls.d.ts","../data/build-types/redux-store/index.d.ts","../data/build-types/dispatch.d.ts","../data/build-types/select.d.ts","../data/build-types/plugins/persistence/index.d.ts","../data/build-types/plugins/index.d.ts","../data/build-types/components/registry-provider/use-registry.d.ts","../data/build-types/components/registry-provider/context.d.ts","../data/build-types/components/registry-provider/index.d.ts","../data/build-types/components/use-select/index.d.ts","../data/build-types/factory.d.ts","../data/build-types/index.d.ts","../compose/build-types/utils/create-higher-order-component/index.d.ts","../compose/build-types/utils/debounce/index.d.ts","../compose/build-types/utils/throttle/index.d.ts","../compose/build-types/higher-order/compose.d.ts","../compose/build-types/higher-order/pipe.d.ts","../compose/build-types/higher-order/if-condition/index.d.ts","../compose/build-types/higher-order/pure/index.d.ts","../compose/build-types/higher-order/with-global-events/index.d.ts","../compose/build-types/higher-order/with-instance-id/index.d.ts","../compose/build-types/higher-order/with-safe-timeout/index.d.ts","../compose/build-types/higher-order/with-state/index.d.ts","../compose/build-types/hooks/use-constrained-tabbing/index.d.ts","../compose/build-types/hooks/use-copy-on-click/index.d.ts","../compose/build-types/hooks/use-copy-to-clipboard/index.d.ts","../compose/build-types/hooks/use-focus-on-mount/index.d.ts","../compose/build-types/hooks/use-focus-outside/index.d.ts","../compose/build-types/hooks/use-dialog/index.d.ts","../compose/build-types/hooks/use-disabled/index.d.ts","../compose/build-types/hooks/use-dragging/index.d.ts","../compose/build-types/hooks/use-focus-return/index.d.ts","../compose/build-types/hooks/use-instance-id/index.d.ts","../compose/build-types/hooks/use-isomorphic-layout-effect/index.d.ts","../../node_modules/@types/mousetrap/index.d.ts","../compose/build-types/hooks/use-keyboard-shortcut/index.d.ts","../compose/build-types/hooks/use-media-query/index.d.ts","../compose/build-types/hooks/use-previous/index.d.ts","../compose/build-types/hooks/use-reduced-motion/index.d.ts","../compose/build-types/hooks/use-viewport-match/index.d.ts","../compose/build-types/hooks/use-resize-observer/index.d.ts","../compose/build-types/hooks/use-async-list/index.d.ts","../compose/build-types/hooks/use-warn-on-change/index.d.ts","../compose/build-types/hooks/use-debounce/index.d.ts","../compose/build-types/hooks/use-throttle/index.d.ts","../compose/build-types/hooks/use-merge-refs/index.d.ts","../compose/build-types/hooks/use-ref-effect/index.d.ts","../compose/build-types/hooks/use-drop-zone/index.d.ts","../compose/build-types/hooks/use-focusable-iframe/index.d.ts","../compose/build-types/hooks/use-fixed-window-list/index.d.ts","../compose/build-types/index.d.ts","../../node_modules/no-case/dist/index.d.ts","../../node_modules/pascal-case/dist/index.d.ts","../../node_modules/camel-case/dist/index.d.ts","../../node_modules/capital-case/dist/index.d.ts","../../node_modules/constant-case/dist/index.d.ts","../../node_modules/dot-case/dist/index.d.ts","../../node_modules/header-case/dist/index.d.ts","../../node_modules/param-case/dist/index.d.ts","../../node_modules/path-case/dist/index.d.ts","../../node_modules/sentence-case/dist/index.d.ts","../../node_modules/snake-case/dist/index.d.ts","../../node_modules/change-case/dist/index.d.ts","../i18n/build-types/sprintf.d.ts","../hooks/build-types/createaddhook.d.ts","../hooks/build-types/createremovehook.d.ts","../hooks/build-types/createhashook.d.ts","../hooks/build-types/createdoinghook.d.ts","../hooks/build-types/createdidhook.d.ts","../hooks/build-types/index.d.ts","../hooks/build-types/createhooks.d.ts","../i18n/build-types/create-i18n.d.ts","../i18n/build-types/default-i18n.d.ts","../i18n/build-types/index.d.ts","./src/entities.js","./src/queried-data/reducer.js","./src/queried-data/index.js","./src/batch/default-processor.js","./src/batch/create-batch.js","./src/batch/index.js","./src/name.js","./src/entity-types/helpers.ts","./src/entity-types/base-entity-records.ts","./src/entity-types/attachment.ts","./src/entity-types/comment.ts","./src/entity-types/menu-location.ts","./src/entity-types/nav-menu.ts","./src/entity-types/nav-menu-item.ts","./src/entity-types/page.ts","./src/entity-types/plugin.ts","./src/entity-types/post.ts","./src/entity-types/settings.ts","./src/entity-types/sidebar.ts","./src/entity-types/taxonomy.ts","./src/entity-types/theme.ts","./src/entity-types/user.ts","./src/entity-types/type.ts","./src/entity-types/widget.ts","./src/entity-types/widget-type.ts","./src/entity-types/wp-template.ts","./src/entity-types/wp-template-part.ts","./src/entity-types/index.ts","./src/selectors.ts","./src/private-selectors.ts","./src/actions.js","../private-apis/build-types/implementation.d.ts","../private-apis/build-types/index.d.ts","./src/private-apis.js","./src/entity-provider.js","../is-shallow-equal/build-types/objects.d.ts","../is-shallow-equal/build-types/arrays.d.ts","../is-shallow-equal/build-types/index.d.ts","./src/reducer.js","./src/resolvers.js","./src/locks/utils.js","./src/locks/reducer.js","./src/locks/selectors.js","./src/locks/engine.js","./src/locks/actions.js","../html-entities/build-types/index.d.ts","./src/fetch/__experimental-fetch-link-suggestions.js","./src/fetch/__experimental-fetch-url-data.js","./src/fetch/index.js","../../node_modules/memize/dist/index.d.ts","./src/hooks/memoize.js","./src/hooks/constants.ts","./src/hooks/use-query-select.ts","./src/hooks/use-entity-record.ts","./src/hooks/use-entity-records.ts","./src/hooks/use-resource-permissions.ts","./src/hooks/index.ts","./src/index.js","../../node_modules/@types/react/global.d.ts"],"fileInfos":[{"version":"8730f4bf322026ff5229336391a18bcaa1f94d4f82416c8b2f3954e2ccaae2ba","affectsGlobalScope":true},"dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6","7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467","8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9","5f4e733ced4e129482ae2186aae29fde948ab7182844c3a5a51dd346182c7b06","4b421cbfb3a38a27c279dec1e9112c3d1da296f77a1a85ddadf7e7a425d45d18","1fc5ab7a764205c68fa10d381b08417795fc73111d6dd16b5b1ed36badb743d9","746d62152361558ea6d6115cf0da4dd10ede041d14882ede3568bce5dc4b4f1f","d11a03592451da2d1065e09e61f4e2a9bf68f780f4f6623c18b57816a9679d17","aea179452def8a6152f98f63b191b84e7cbd69b0e248c91e61fb2e52328abe8c",{"version":"3aafcb693fe5b5c3bd277bd4c3a617b53db474fe498fc5df067c5603b1eebde7","affectsGlobalScope":true},{"version":"adb996790133eb33b33aadb9c09f15c2c575e71fb57a62de8bf74dbf59ec7dfb","affectsGlobalScope":true},{"version":"8cc8c5a3bac513368b0157f3d8b31cfdcfe78b56d3724f30f80ed9715e404af8","affectsGlobalScope":true},{"version":"cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a","affectsGlobalScope":true},{"version":"c5c05907c02476e4bde6b7e76a79ffcd948aedd14b6a8f56e4674221b0417398","affectsGlobalScope":true},{"version":"5f406584aef28a331c36523df688ca3650288d14f39c5d2e555c95f0d2ff8f6f","affectsGlobalScope":true},{"version":"22f230e544b35349cfb3bd9110b6ef37b41c6d6c43c3314a31bd0d9652fcec72","affectsGlobalScope":true},{"version":"7ea0b55f6b315cf9ac2ad622b0a7813315bb6e97bf4bb3fbf8f8affbca7dc695","affectsGlobalScope":true},{"version":"3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93","affectsGlobalScope":true},{"version":"eb26de841c52236d8222f87e9e6a235332e0788af8c87a71e9e210314300410a","affectsGlobalScope":true},{"version":"3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006","affectsGlobalScope":true},{"version":"17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a","affectsGlobalScope":true},{"version":"7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98","affectsGlobalScope":true},{"version":"6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577","affectsGlobalScope":true},{"version":"81cac4cbc92c0c839c70f8ffb94eb61e2d32dc1c3cf6d95844ca099463cf37ea","affectsGlobalScope":true},{"version":"b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e","affectsGlobalScope":true},{"version":"0eb85d6c590b0d577919a79e0084fa1744c1beba6fd0d4e951432fa1ede5510a","affectsGlobalScope":true},{"version":"da233fc1c8a377ba9e0bed690a73c290d843c2c3d23a7bd7ec5cd3d7d73ba1e0","affectsGlobalScope":true},{"version":"d154ea5bb7f7f9001ed9153e876b2d5b8f5c2bb9ec02b3ae0d239ec769f1f2ae","affectsGlobalScope":true},{"version":"bb2d3fb05a1d2ffbca947cc7cbc95d23e1d053d6595391bd325deb265a18d36c","affectsGlobalScope":true},{"version":"c80df75850fea5caa2afe43b9949338ce4e2de086f91713e9af1a06f973872b8","affectsGlobalScope":true},{"version":"9d57b2b5d15838ed094aa9ff1299eecef40b190722eb619bac4616657a05f951","affectsGlobalScope":true},{"version":"6c51b5dd26a2c31dbf37f00cfc32b2aa6a92e19c995aefb5b97a3a64f1ac99de","affectsGlobalScope":true},{"version":"6e7997ef61de3132e4d4b2250e75343f487903ddf5370e7ce33cf1b9db9a63ed","affectsGlobalScope":true},{"version":"2ad234885a4240522efccd77de6c7d99eecf9b4de0914adb9a35c0c22433f993","affectsGlobalScope":true},{"version":"5e5e095c4470c8bab227dbbc61374878ecead104c74ab9960d3adcccfee23205","affectsGlobalScope":true},{"version":"09aa50414b80c023553090e2f53827f007a301bc34b0495bfb2c3c08ab9ad1eb","affectsGlobalScope":true},{"version":"d7f680a43f8cd12a6b6122c07c54ba40952b0c8aa140dcfcf32eb9e6cb028596","affectsGlobalScope":true},{"version":"3787b83e297de7c315d55d4a7c546ae28e5f6c0a361b7a1dcec1f1f50a54ef11","affectsGlobalScope":true},{"version":"e7e8e1d368290e9295ef18ca23f405cf40d5456fa9f20db6373a61ca45f75f40","affectsGlobalScope":true},{"version":"faf0221ae0465363c842ce6aa8a0cbda5d9296940a8e26c86e04cc4081eea21e","affectsGlobalScope":true},{"version":"06393d13ea207a1bfe08ec8d7be562549c5e2da8983f2ee074e00002629d1871","affectsGlobalScope":true},{"version":"2768ef564cfc0689a1b76106c421a2909bdff0acbe87da010785adab80efdd5c","affectsGlobalScope":true},{"version":"b248e32ca52e8f5571390a4142558ae4f203ae2f94d5bac38a3084d529ef4e58","affectsGlobalScope":true},{"version":"6c55633c733c8378db65ac3da7a767c3cf2cf3057f0565a9124a16a3a2019e87","affectsGlobalScope":true},{"version":"fb4416144c1bf0323ccbc9afb0ab289c07312214e8820ad17d709498c865a3fe","affectsGlobalScope":true},{"version":"5b0ca94ec819d68d33da516306c15297acec88efeb0ae9e2b39f71dbd9685ef7","affectsGlobalScope":true},{"version":"34c839eaaa6d78c8674ae2c37af2236dee6831b13db7b4ef4df3ec889a04d4f2","affectsGlobalScope":true},{"version":"34478567f8a80171f88f2f30808beb7da15eac0538ae91282dd33dce928d98ed","affectsGlobalScope":true},{"version":"ab7d58e6161a550ff92e5aff755dc37fe896245348332cd5f1e1203479fe0ed1","affectsGlobalScope":true},{"version":"6bda95ea27a59a276e46043b7065b55bd4b316c25e70e29b572958fa77565d43","affectsGlobalScope":true},{"version":"aedb8de1abb2ff1095c153854a6df7deae4a5709c37297f9d6e9948b6806fa66","affectsGlobalScope":true},{"version":"a4da0551fd39b90ca7ce5f68fb55d4dc0c1396d589b612e1902f68ee090aaada","affectsGlobalScope":true},{"version":"11ffe3c281f375fff9ffdde8bbec7669b4dd671905509079f866f2354a788064","affectsGlobalScope":true},{"version":"52d1bb7ab7a3306fd0375c8bff560feed26ed676a5b0457fa8027b563aecb9a4","affectsGlobalScope":true},"d979def17dea97ee491c975f3d3cb31957b7970a791c1d5a3854ea6cd4cce91e","fab58e600970e66547644a44bc9918e3223aa2cbd9e8763cec004b2cfb48827e","c590af0064d3c4c10981a9d7b8033083e101e809bcd6677bbcad7592c18aaf85","6b3d3ecbf6958624910af080a873cd84b5b99d513eb52147f18fe04a51cb19ce","ea9b95f45cd90b16200134d1f79e36380d57b866300b479b3e5b62a6dbeb92bb","14bc80bd2cb4c72aaaf27cfcdb62377cf3e3366f9e9045fa8ca232629457aca9","ff164c4671955c882140da80d0a6a69552ba5c2ddce3969f74c5c9d63683744b","dca26c859f7b4b8cf118dc9b5e99d295a3031bbd980e488819ed830ba769b890","dd37fa6b595bc9d62e265a5c690ee4cce50892b350b8b88076d4983e6901e09f","ddd474fc68a47c90ee975ba16f64017356fcdd3e2890f945c125675d194eebab","91265e9c2705df9edc7d912afe177cb9dbe4bd4fe254cc43466885544c065013","81e7db9916d6ce0323656530cb9aba444450454e5a8f3d0108f04931abb36258","7858aa21ac91fef2c9cdf96b3ae00e025efed2920ffca40a75df452d4f5a9576","eb80dedcd92c17d93f403e736e1c3e2aef39379841070221a353a7c13b57369f","029f3a1e2534e85a7cd00f3e79781003e0bcf5147d96db93594ace839803c6cf","2eea9984a7ea08e576d2970ba65a65ebba02699bccdbd0d3a08bb141e15972a1","308246446616acc5397747f35fa8788de7e6ba6cd5dc0ec2752bd75eafefcdb9","9677ef56e52539a73f1d9b89c692cf866d05017b05d9d2fe8cd35a30b42c2d47","6048b5c50d6486b1084b036a7f7d6c76c032d90cc2186f79b344a12ceb488511","26885abe66e07fd38da599d5fc9b4fa8b2df803c56e9bba99a2505e0b982c042","507dc7647a71c90e8cce85259c624b355c22e0dee1833aa4ba20c15a4f5bd21a","c30aaf3d189be8c29b2d3a7761e94b5b532fec6ba0caa74d07a4c1056469acf0","454217fe7beba4cb5497d4bc7fd3116437ce85e5217eb66f3b367fbcbfd45861","65e1ffb7b2343a1814c5cb85164f7d26bce1477b2cf04e6736f37732bc4801d6","3f810d7cac3e3729241d52d667538dc4ca27687f5d40d91f4cb5bce955df5f94","a2bedf5636ce572e507823229c9b7d4e87d97830497822d76e95a971fee78c92","17ab13eba7cde42ca7c95110c7eda405ba6aba7471437d912078d67dfada98eb","f7e734ca25cb0e8c52247b9a7d98f81ffd6ac52485bf9d8938fdbd4d828f469c","5261283f0b521fc1f255a060dcd86986985bd516822b69bb5504392462962899","44e20ca481bcc2abec1f4fcf54139caa4389f1bc16e3ee9d19a10e522903e9ab","a31eda6fcbf86596f69f7c18e6d13af58191fdc9c9620bcc67595fd9e49043ab","c93085fa9e5e568c0a45f64caa05e713fd5438e93d32f5970753e44910bdd540","1e442333978b5864818023d54d4f2e2aa0cbdfb2b486a0d43c900a7a87d61d1d","f215ce6766668f37f5e4652d0facdf55816f24aa5fc6f68c5e33754dbe5219fb","e900ec60297a15c4de70ddaade026ea4fe635e27c286fedd82dd5e963daa1930","e4e975c7339a9579209f12246e95f95216aa3558b8e7719fea2fbadaf28c574b","f6ba45fc4f91ec75fa2b0841978666d497a0856bdefd60e30005265b8e23d3a0","ec0ccb9f611eb5d98a974590d631e4256eae34893a07037381f3d116fe9f31ee","bd0d80db12ef1aceefc4f9d3eb88517b9634fa747ae8475981da8655292feab8","55e68fb1618e3f55f7866b8c8415152159309a14b716370081ab0b7af96d876e","bf0491af2455f92282b61807be2be6e7ad7d532e47fac7b698019d3617c28ff7","5d874fb879ab8601c02549817dceb2d0a30729cb7e161625dd6f819bbff1ec0b","ee551a880882770c4f56a0964a9767c9feafe497a5be52652527d098c88d85cb","b192606574769a5566620f9bf19358a3994bc2726ecdeaad9c66f3333b2687c8",{"version":"09adfb20f411f337cadecc85c838fc0cfe849182ba7458219035ffa6ac82fb5b","signature":"4fe2a1e4d403427f84342da3bef274417bf9c066c4150873c2c137d5e81be7cf"},"d83d6ec306241a9a59716eadf007d405cbc9d77b688871089a02159087100d5c",{"version":"4eee1e9738d80edb6ff358a14b6821e036b0f44ee28c759a3186a339bddbee15","signature":"e0ec260a583d1f43b0b40d8ff084c0530fad82148dd22d598ed5851321891be2"},{"version":"0292552bfdda78ed1910905ea046a336186ce82d9fab516ea21616f47147ccdc","signature":"c5c64687e6d1b87cd09b5dcb1a7b19f6c81ee49f4a8b96ac0cd8118ca4cb26ad"},{"version":"78673ec3910aff07d76d2a24b460523c69d50afadfcd836cd9a022ad1a3ebfc2","signature":"8d228729747db25bf2ead19fb49a22043a9d4aea0bf22c158c04425775bf7da5"},{"version":"ff41da7aeac53e419a3a7eb792ea03c77cf05e44d379dfa2190920bfe6dde09b","signature":"aad27c6a175d8d51692aafc8ee4b44a68d2d5f0c742f682163067ba4531539b3"},{"version":"849507adfc66cfedda67c3384a1ec078c542263589413c5b31c195aee25dc1f2","signature":"7696b684936428916f6df4d6c5fd79832013b8b17b59e3ff4526f4ae85d2ea37"},{"version":"c30b952d25562463882bbbaac6242e2cb47cd342c27388f46e4b7b0c98a4b659","signature":"b25773451df3b8c7bab1831253175c79202fad8a68a8aaaa3133833157a14333"},{"version":"c32e26a53123519e9bcf0aa960cc0a5dfb3ecebcc27fe0ccc649702b45da1e2a","signature":"bd058b5fa63242cb9a3120e68e0c31ca4b76b44495e57830e0cd91a2cd244513"},{"version":"59688ffdb24f7f057e35f54280e90bda1e57efee745479a1bb98321b263870e8","signature":"6da01a778dc7873229c2bd8afc284f0747816ac9a25a46f20f08646a53b3fa54"},{"version":"95d027d78b9577e00f9d4e0eba816fd21f1b2927c801f89a1db8369b837471c3","signature":"14e76138d39edd49d980d91efc28e720241b9cdaf137f8cd233abf7acd0f890b"},{"version":"67abb822ccd022dad3502f533ba7442910fb517338eef8a5f795fe447c5a6167","signature":"13e26476d7c3fb35c32bd60f3931dea5d5503d802eb1ef08222723737717d72e"},{"version":"89cd89294b6369c40e06b1b0bb018f8df9cd7d74ae6e7534688b20511519bf34","signature":"3b37a425fb5e07467e79aa7954de2aa9617961982c2f7265c01ed16b482da977"},{"version":"91faeb8163ec860e5b5c02eda51cd16e64de95baaadfec34e0fbd9d39176ed8a","signature":"29e9de0601d40b7f34a82099b85bb19dfcfb8bae17a0521ac210fd3ffd1d756f"},{"version":"32dd0a374316655532fa70f75abe84157bbd1c5cecd290724a859a894f802d31","signature":"81282df2d2d5a68892cc7ede89b70facea9daece84ab8ae6cfeae36788511112"},{"version":"bbdf156fea2fabed31a569445835aeedcc33643d404fcbaa54541f06c109df3f","affectsGlobalScope":true},"381899b8d1d4c1be716f18cb5242ba39f66f4b1e31d45af62a32a99f8edcb39d","f7b46d22a307739c145e5fddf537818038fdfffd580d79ed717f4d4d37249380","f5a8b384f182b3851cec3596ccc96cb7464f8d3469f48c74bf2befb782a19de5",{"version":"5917af4ff931b050dba49a1dedd9c00f15f7b3dc4345ad8491bfacd2ec68ed32","affectsGlobalScope":true},"14ed49cb68f29e36dfb562b7c382ce70d467b7310e8e27cc587772d029f372b7","ab6f9c23c44e0b20c2be80af46ffc9d0e6681efa05ee1704bb4c9fcef8e61497",{"version":"5917af4ff931b050dba49a1dedd9c00f15f7b3dc4345ad8491bfacd2ec68ed32","affectsGlobalScope":true},"e4dd91dd4789a109aab51d8a0569a282369fcda9ba6f2b2297bc61bacfb1a042","83e27bbd7304ea67f9afa1535f1d4fdb15866089f0d893c784cbb5b1c6fb3386","c4b39848e2fb237507a7acae0b83a34271c9d72714faae6a6b9075527205111b","d2d9e98a2b167079474768593e1e7125fc3db055add8fbdb5977e3d05a8a3696","6462da67490105ba7d98cf312c2faf8794c425781128b161ea8394d66502eec8","62359da52b6c8d00c50c2e50738fac82e902f916fdf458d8159e7edb1c60c3a8","1e0ac21bc775686383ea8c8e48bd98b385e6195b25c85525a7affd08a2cd38b9","0449615e1ed03c7d54fc435a63b7ef0cb4e5cea5ac40c9a63280a46f7eeae0ff","f647358d9c48f01ca886cf4e022a31cbc9f84a5706cd85df656b0b8e3ec118eb","3e04bd7b52acb9c393909520bc6bf74989ed3cb8cee63c9ae88e20467a8f02d9","a958d081d81c1194d1878b28f081d0144d95f4e36c6b375e357cb982e8b40705",{"version":"8f19251323456195ec9236df857bac3b8f97b73b540ef06ead2ceccc3884954f","affectsGlobalScope":true},"161ae38e8fa5c0a1a8002eceba810f99734edd08493c15bdd0c0e3034ea13606","e3e12de1cc9a3f289b1ea267336edf625260cdaa50a3dbb33b61fc58e5a792c7","d23aeb9ad9955d3b6df7a972355dd465aaa0f7b8c223834f9499585b75f2ab04","cf000108177216c2ffd9962c785dfe0eb36306b14817894115be2d8f470552d6","61937532d01a86bc9f9847e016305cec9b5a716db5a630a0c37049a477d18f60","c792ecb733fc79337b7b497d3298dc31217f0f2b944ade255037dea871915353","61e8a34952f23c48deff3e85e982b1b3a600d15fb4d3b7c07a9096505ad2c35c","4fe57f4d9ea10f6069813ca18818838ce21258f42e79f898b4fb7860ce0c58ca","1e525db7ea2d7369211b74756f1034e4219134c3c99c0e147998caf43b10e017","e11c156803f0c4423e71cafc494033b48f1493b411acd77e50a769d551dafb7e","9e0a0be03e67f904274ee24bae9065c6239d347b27429ad1c087bec8a6e1c931","b16d8125f0987eeddb3cc3278272324e8f6a3d2608d92f5fbb20908c89bb1d71","d2c8976d6e6874ce159fc31c8511fffde72dcdf230394750ea4ef3c02a32e52e","fb6fa5434ecf7670f3dba36bced663afe875282d1231fb3ae95eeedae85ce4cf","e4cb6f9e4d40f538e26c72cc81ebd8ebae3317f940f39696e30d1381f36e5a0a","30289252a73fce7ff4b88369c829ed1f8533ccc028c55b264fc96fb576ffdd6a","3f473bb1c974b627227610013561332ea2f8e6eed0e86e87eaef96b6146d28c8","ce5bdb993fed19ff6f8a7a9ae3dd2fbe650c45c6552e7fe33e24bc4c51363b81","c8bd10b6cdcb527ce859b9c5b4b6168f270cec11cb051cc77eb4dead206b5e0f","5298c28f30d0a401464fccc5ea2e620c381a9b75bc4bbc0fb1557468ea077ead","773979fb94d64450b1567975ee28a630cae6f2c01c2c18e06563c744bb6fe0c4","8e3d399a59744e651362087da32211ed34c6e8dccee4002abb82ed2f9e4c7301","9a726679595a1e729708d633c114be758c8b4172029916456e3feab6f76e6e43","a0cf70217b68c414db6c4863831250c8a2d96469c8044b75edd3a460793c9887","8d7c0f64cebcc3690112c28a4861bd9385836b47e9d1c171e6362100b3cc32a8","17ba9202cb2a0e0deec28398f2ef6c95c7193cbe46b8b6eaf8f54f48aedd7139","2758842856646f2bebbeb5150707ca4b5ab8fa1d46d95b3386493e6d6b4221fc","f9523fca1617fd31e048afd09f08cca592a7bbaeca4d5ff1e1781ab0cd2ffe9b","881a6580fb531a8331bf04acd77bf935d81d92af0dc6b91996e4548cd6227429","997b40fb1aeb304b6d3bc9021361bd6c5a1ed3b1e1a1459533a9c854db4ac715","23d7a8b5d3297675007160f5cc75777e6eccf63ff6650bd3ed01eb0b3cdf2a38","8db59d5540f8bc033f35eb1a4a7903d202fbace0874b456e463af2675da2398b","c5a28d3d50c8edecc8cc87ae3a5dcfa34e630f970626bf30c552e681c7055fd0","5f8402dfce577684c2de40394f60628ffe6e44e6bc308dbeb1b643c527d758bf","daa0b5b58eab0c3dfc200cde4cc933084b908ede3aacdda1d2797f98c172142b","404cd1151ad5c08da06987950824a77194fc5e2c905e2b90252ad066d922614b","1d9af36f24bba0f0d3b80358e0b7fcccf8ea361d799adf0407e48b949fb3b82e","4807581687ad8a41a480f2f55a93eed33881d2c3a4bbcba14cd77fddd6c32f8c","32336f8d3f635d379eb6438dbbd2ead8deebda788e12062855815c0834a50720","af41d975fc8aa598ea03632ab9c78fc6e614f9627efd1ddd4342054979f1031b","592aa170bf0e1e4a71f473747252bf79d56e7d821d33b2e3cce16a7fd168bd9f","2cc143754ed238f214e763525cd4c11613409a643fdd602f4e0a2b19f1f2d397","96520a873073a2f39f922d0a422498cdcc28be9066a769000cdd07ecaba7b645","c7284023c5462180e492357aeb94551a20aa41eac8ac517606f3766359d08bb9","ed4ec3d435678a5703a016a801afc2cd7b543c53ab4615b3e214cac9c30f560a","e345f2ee8dd216e738840035224950764086f16e6ef75de310747b839a3dc14e","501be290436f06ae2182915329b01cfd0850961814802237b5c24749fd2afa0c","cc34c3c1590513cdb6374890f421c06ad969cfd99b28efb6003a6afc845c49f8",{"version":"b5b080e499df18235bac525ce43da935d1a068c5770f58b245d24b6ae8baa166","affectsGlobalScope":true},"7be4c510922d20d3946d7916b8a4c075429b179a3b143e3541bbbd4191e5988e","f295ab6b1bfd2b6b5b19ba621cca18c1b94b25c430c67fcb66c9594e89e3ff39","ea6c58f9711f6dc2f5609e085a1751d1284f1097b568852863bc24becf970831","f59327cd1c98362028d2d2b034b9bada17481ef7f12f13b046bc047ab4fc343c","d759d5a895085d1cfc89d1d1791c188c8170d933092db93e2b48676c49ee7310","23cdc008b29455b89f900f5667bbbb95df280deb7740e7a1d118f894118d8eb8","bc0ee5816f40067bef4972b88c81564d50b9aac01833a818a0528667730d7729","2c8e1d8fe99738fe377049c1baa8b074ac11bdbfad103881c6f012a09383e361","5fac858cb922fe34b898ddc12db441c878ec72bf6a1e3bcbe297f4da4bb6672a","7f119c8c5d4d145e6fcf668055a76f37ed273c24584d5bb90ff9f5520648b47d","b4e123af1af6049685c93073a15868b50aebdad666d422edc72fa2b585fa8a37","f86c04a744ebcede96bac376f9a2c90f2bd3c422740d91dda4ca6233199d4977","6ae1bddee5c790439bd992abd063b9b46e0cadd676c2a8562268d1869213ff60","606244fc97a6a74b877f2e924ba7e55b233bc6acb57d7bf40ba84a5be2d9adb0","4a1cabac71036b8a14f5db1b753b579f0c901c7d7b9227e6872dadf6efb104e8","062959a1d825b96639d87be35fe497cbd3f89544bf06fdad577bbfb85fcf604c","4c3672dc8f4e4fdd3d18525b22b31f1b5481f5a415db96550d3ac5163a6c3dd3","f9a69ca445010b91fe08f08c06e0f86d79c0d776905f9bdb828477cb2a1eb7fc","ad7fd0e7ee457d4884b3aaecbcbd2a80b6803407c4ce2540c296170d4c7918ef","a50ef21605f41c6acad6c3ef0307e5311b94963c846ca093c764b80cdb5318d6","74b4035dd26d09a417c44ca23ab5ee69b173f8c2f6b2e47350ab0795cf2d4a17","918f86ee2b19cc38cb8b1a4cf8f223eb228aaa39df3604c42f700fac2f0b3ea1","762bc52248d3fab9873c7af564caf622358312cb35de42a4393b71cc36e14621","d02ec79cefaf292fae64b3be5a4416e64b4e420a6429fd458fac6e1bb4c7950e","27abed653f600ea0d5c86e94181beb42824e0f3f16337e2f9e7e9e9c2c392edf","d7871e0e653aa7197fee88886db5678bee6d42164c1f36e4bce9421ddfa7ca49","11ed10bdb3bcc99893570507eac8fece4840add97ee1d4f5a7fbf41cbfdea0d4","429fb571d3db07d3eaa2e74d43eb4190ece3e0de832ed564aeeaf08873e598eb","406d52bf33d618d846aa0d831ee004290567e328edcd4517bbff2937cc977abf","d3060e0810fc0d0dc009e6f086ef413d3c8aeaaf07da25c8d25fd4e181646acf","023747bf4162d5f675dbee1acbfb409a33e70d2358fd218b6a1b22dee8706c1a","08f7e6ffa66c66a636aecc5acbeb998215d9d09ccba0c558afb7df7e218edeaf","f829eb39aea4487f0ff94a42c56a1a73bc5202bbdeb03f7a638e4ab3e290d017",{"version":"d602b4b9670fe275b6b1f9578b18bc3a5c46692f745623cd6551c69d284a88ee","signature":"03032743a86276922678411a754bd3319227aaa751e160b6390813af40c561db"},{"version":"22f91084b9e0b9f70b913d44f1959b1d3dc01c97d616c8b10656493c8c47111a","signature":"3334933683e0bed25376a865967d4d96a19e25bc7399b042c827a55ebc839dd6"},{"version":"87f792436b033580a1dcc908d15851e4a5d3d7aa68b1d1c6a142706ef8b154a3","signature":"a41ce7b1ae948a3b4b5f07173c5d7e1ab1cfd0718c0ecd2e8ae92c32a9389756"},{"version":"a6099f12a9f086aec74c8c7a40051a3ce11c89aa331a39002edcdf808a09d9dd","signature":"08a676d6a15e3e0bfc71dd6b438cedcda44c4b9a7e1bdc5d98913ff976ef426b"},{"version":"56a3aef852aa146f9fe362a1d09e13dae20f3794d33f66b371829348a8ee0e62","signature":"fd9b9b18e7076be2424765bf033de080a9877dc9b01899005199a5c0c458c21d"},{"version":"07c14b3359e3ed5607c690b9f421f84dd93887e06416d52f60889b4082030464","signature":"bf2162b8f3687c847f2e4f2f7a7411e30afe7b00322225bda934a43c5fcd26b6"},{"version":"063f439998b87e20f46fa82cb793c5aae5c2d714a26bb8221e07f5d4c82c989d","signature":"21b880bc61bdcb076c065b90dff22a6a4e1948c0e2a5b33b618d28e38361b9d6"},{"version":"a3dcfa473fb451f89860a5dc83f1994fccd151af55a87683cb6dffc0abba782b","signature":"aafa425abc6f6369bfc9665c4eaf3f771e300ecc3e45d9a531c136cbba3e5968"},{"version":"40b369b61fd0bede44a39611baae531e6d46a718b705b9b45c5add4711f19744","signature":"70310a3313771cf5c0aaabefd35bf3279db5fbbba31367a4958e32e6c9d8a0af"},{"version":"225a94e9b80d9ed325a5996ddf6e8e8ec1e35d0cc78ce63b4f7bc3109c41fcfd","signature":"d129698a0ca7b32daaf62a1836f3f4eb165f4e34572aeac677d9b126fd9f8199"},{"version":"220b6ba3c2274aada1b2a9ad69f6966c8d36de546e708fe2b42425a265a48e2a","signature":"0b5aa6750a08b8b69bb43170a86e8a48aa6a2ef296abcb65b6f1b670b697cd45"},{"version":"29733740a84bde4ceebd6415c3a47d36c9a956fdddeacec49a664665a54018b0","signature":"6ee1faea03f9dec6d7a18d8c625c5b54aec0ba6a8be129f816e692c41bc1d425"},{"version":"6e603a0983306db957764528f138c4897f0391799f876c4c1b46226c0dd8cef2","signature":"99ce9bcd0f2a0f1f8273963fc66b1a9941d19b6e16f68a7bde83ee10f1c25165"},{"version":"36d8781b9aa56efc6c8e0c6366ecdebf7327a2ac5b1e1490de1ad5a911457bb1","signature":"52ef9c1dc9a2a237e7da2cd27f3a506b916e79b44277472350fc9d9601fba810"},{"version":"e8184f498bb78351e6d6f9fe654279d9882d58dd822a9a1178a96e7570262502","signature":"80349e7fdbd0e6e910977a2257fada575d89a2ff660790fbecf519681ea3b285"},{"version":"ff0a6ed7e754b2cfb1a907578f1c335b4c5ace714a5adb956f94d6192b17f078","signature":"2abc7e0d9555c3af2658d473a994244dcf1aad194841704cf70e92ac3416330c"},{"version":"bd3086a825d96259e7a1c79ad1bb13749d41cb79ba4336ba813cc65cbd51fd74","signature":"6db2b3c555e604be487fd6d30f8d60e8c9fdecc756983398e74d2bdd3f748327"},{"version":"46adb1b5ccc5123a4592a20c1c56c8c7ef34d9b2ea43b16a271587ac2076728f","signature":"56a9cae143cc2d7121795f53b436799f2c0c3bdf9364a7b55aa2c9bf5d9fa8c7"},{"version":"a32f1f8649b0e898d4a54e1860effc7f48dd285bc99f83dc35ccf85203736b3b","signature":"b57cb32c00cb413d449dc886765c39ed0d82ac830a441ed9f93651d595271487"},{"version":"beacf8337f15a959b6e4d95d7b55432af842b0484da0f0d342a0dd75beab8fe3","signature":"5a39985c8d52beb45be11e35ccf7a9bbdee769e1adfd4ad1891e55a6a5372067"},{"version":"8800447dd5175024126c56daa37ee888e507a5b4cb010790ccc86530a46424fb","signature":"54c7600eb52d16711ef53e384c5e2ba16624dc8f78bf2597d5d478434b981d38"},{"version":"cd04b594271be8b8eca1453116f1591ba60ce64d80183b07765a4b5e811966ea","signature":"1dd725e5e9260a0f77821e2ce227dce28d8745fd5e4e273b5fd9d6919bbf8602"},{"version":"c2c2c6c7ab6fd08050cc906a2230657bd7ae25365a38db7a4c2f84980133d0cf","signature":"ffa3caca7cd00c83855db4212fa8e6c9092c52935533a5c6d286479a72a9b562"},{"version":"8199ff7448213d4633834954dad4e5a5e7ed2e14fcfd3f5a1b53d156a1cd9972","signature":"ddcf3b8de10baa5df4931e0054b1e4ef58e38164236deac6f50bfc3dee758cea"},{"version":"327bc1d7e826f1be1b18c51b3444a2dfc66d3f810b43ff5f32b26587db3ea1d2","signature":"608da779a8bbb36435da5d3a9e74ffe39d8d2589aa67edc38d1b6c9aed587ae4"},{"version":"53dbe2ccb36c68a62512d3f3ddb0b5b0c7c19fcfc93795210c5145e0b4f94ff6","signature":"16189e6e3d71ce7a6dd75162c4da380285947d35ba619de299815a533f3e7744"},{"version":"d461fc73e0721ae92652f11a61cd1014a0698fb7ddb81beac1aa7d09aa139abb","signature":"6bbecc58e9e16db39800f6f632fd7fbec5fb3106768e12cbc172428d5f42a55f"},{"version":"83ff1f6f71ab0ea7a2a725a864d70672acadada85bba149552c8d815684d90ea","signature":"3675111095ae945a942611e8206a3535f2d19e9d82e4aa73c18e91db714a3076"},{"version":"db20f91a589c9cde7c5c110fbc24dbd2577b28673098388bd114126c394fb55e","signature":"73af4d0a8f95722f927af272d152cbb395407c70888046aa8b44e1886307ff23"},{"version":"d0b60172a9c516c1869899e1d4ff36332c8023393355215f559872dc7407b1ae","signature":"a352d2a8d7025725aa59cf4649058cfee61791139b209727a8cbe44d02551c09"},{"version":"e21d3eaa1a9d6c7cd2107ec2b89b0a872dfaf98be7cca61ab4db427af6c37e7c","signature":"f7a94cebe838cda45b04a9cada5095b74545e408603dd3a253153424e22f7a74"},"eda83eb5ad3e0dab986107adbe50ebc6a2a832e20331770341263d82446369a4","7aad58c3b214bfb7e53ea867e8c34181c0458780b999e448fe953919b4401780",{"version":"7cc837e5ef1c3262bff305f712f9a8798ff835e640266e437af3bfa8875e0162","signature":"64fa5d796f6f8071c5e5282d751646e1863a20756814c232f3ac7656c39070a6"},{"version":"8231991ed8e111207399f51f30afd2c9dbf1ce2aa0bca4db5f36517fad85a824","signature":"f9808c356979e4a96ad796fd333e329386e9b92d8112389c34e22429fcf7cd44"},"5190f1a110a789c2f8ed8dcf2da6ce122dcb74249d0c01d19d1ed0b1c6bb02a1","3650bbe137c9c44bc6b8f44a56353b00eba9654e41a9355e6228f7f0f464c648","eb467c4dcea39773409e7cf23dce1c65991ce3d31c86a0a7e1dfd73b880fc986",{"version":"7d3547ebba721de480b407e001410add23daa6d97386723ab622ea6c6c1701e3","signature":"e6e50852f3a5bac16df941549e31fdfe6f1dc36e4dd11ee3a02e6e62dfcc7aab"},{"version":"3a30d723c270107520dae4e5925fb87b3422115002eae497bca0d1d801bf6fdf","signature":"2f3468aed3a2fad4effd95814786077454364acbefbc396b21db7443519d5fa9"},{"version":"b5f5bbc6d622c252fc13b512ed42cafd65019768e3f0430637e517d9be69547f","signature":"7f7f6bec76eeeed705a59301e0f94596c5451dfa8f466d1013bb23a9939b7b82"},{"version":"71fce7a0dc64feb145e0f58842f43984a2e9ecd79861d8ad7315c0d272575275","signature":"197f5cddfeb650144db705fa2b555878afb78b6cf6b1a8123bf9d49b61a2f728"},{"version":"066db40ccd6c90d1e57e9f163458713463d4e2771c156acf9ffb7f258646946e","signature":"2cdefde7a30dd4a46bae386772de54e70fc22d84c567bc54241fd24f9d86e55a"},{"version":"2366b3f634513f748f1cc92ba9a5b015b39cf0195e25c942e3d844721f0e233d","signature":"5f0944f4f8d3230421c4e73b91fbe49085f9275b36db098eae5b57bce4c2593d"},{"version":"667a5fe656b9e0bf163b829ad74d679c56e82c83456a7c5387ffca0d1f901e5e","signature":"50a30e129772a920ca0ce3581c8d9f6ba1f11f3d3abfff6f0ea82c3183bb654f"},"d93931264950da279434192bb043f8e379b4a0959bcd294ca89c8b89e1a6772b",{"version":"3a1cab834f4a3ceedd0dfe8c00b9ca84431454cad8730eef0d0a18d1c0f7a7aa","signature":"47581fdabdf5c471a08b24a9bda43cdafd504c632f25b64b407b325474013997"},{"version":"8d8b84756b85d1dd9d3a60d54f4410b892f931d46560f60ddc44a4decb8f9ee4","signature":"be7aeea23d9d1ee7cb52b00e44983b6e4d8624c2c81ea1b3b5fee229b136bb31"},{"version":"902abf1b6aeb2908452ad206db72b0d39029e000a28dff529751585a4e7e5f07","signature":"8a9f7353fe52ce71dc66cf00091463c27bfb213052b60d5af4c89357d9415436"},"e824690c25b4d469af83e8fe10d15811d06d588c1b31eae795390b98b888dfc3",{"version":"691a13dbde331d5bcce65e1463f924b78ad046c0c05ec57bca010e6435de8905","signature":"337a54c2c3e3bd84801f4476df30537784817b2a7994b79be7c0461858bce017"},{"version":"0f112494322a7ecb5dda1823f0f84255451a51d2ad862a0ae1014d361f0257de","signature":"c223f8c662d0c154a62a019af49c095b94042102886cf7f0427cec0346a7d626"},{"version":"bca410625e15b9622626f7ae8aa445153232e0d45e46f0e8dbcd632d735c8e47","signature":"693e3c01cf16a1aceba63b8b0652cc8ffc6eb5c2a6ac7a32aaa7923005378f5b"},{"version":"b17b040353ae186f68c2e173f268eb378c3c60ffa390107f6a727fa94e627560","signature":"459ab81441c14763bc66ff4f72dd8d225ef1939ecd528963a320a19c08f9dc93"},{"version":"32fdfaf68928cc5f3a0185843543667cdd3f895139717a30a35a7218f5eb2cc0","signature":"d52cbd2e75ccdcf74dfae08d0bbb40474055e074570a607fe1c5bcd4edb38560"},{"version":"2acb4ac0e18abb828c78cf8b61941f37e8ff3a8eb4705da3f38c1aa458273619","signature":"1d0cb883692d5e5fbf56a1bc8077cee13a268bf4fcfea9d91b7dca2dc8997ec8"},{"version":"a1473225afc48a471cde6656263736febf2dc83543ad10ef66936f7ed71b2fe3","signature":"83762b92cb1d09bf414c9cbdb3c9704d2b68694abef328425d3870a86a53ef08"},{"version":"9b560f257e620b1b8ec2d1a1b87a017986465fd95a2ed2460cc97e8effb6b7da","signature":"2d4fc440682e261a12ea4dd9730667bbda29fbdc42f608c832ebd8709af6142e"}],"options":{"allowSyntheticDefaultImports":true,"composite":true,"declaration":true,"declarationDir":"./build-types","declarationMap":true,"emitDeclarationOnly":true,"esModuleInterop":false,"importsNotUsedAsValues":2,"jsx":1,"module":99,"noFallthroughCasesInSwitch":true,"noImplicitAny":false,"noImplicitReturns":true,"noUnusedLocals":true,"noUnusedParameters":false,"rootDir":"./src","strict":true,"target":99},"fileIdsList":[[119],[116,117,118,275],[195],[194],[194,195,196,197,198,199,200,201,202,203,204],[197],[199],[94,95,96,97],[94],[95],[58,59,60,61,62,63,64],[58],[155],[119,155],[156],[119,169,170],[120],[119,177],[130],[156,157],[155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192],[56,57,65,93,99,217,219,222,223,246],[220],[65],[220,221],[65,205,216,247],[130,154,217,223,250],[224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243],[244],[65,93,216,262],[65,93],[263,264],[270,271,272],[266],[99,130,154,268,269,274],[93,99,268,269,270,274],[154,267,268],[99,268,269,274],[154,217,223,244,245,246,247,250,251,255,256,261,265,273],[260],[258,259],[257],[249],[245],[93,112],[100,114,218],[112,113,154,193,217],[101,112,113],[56,104,112,154,193,217,219,254],[65,93,112,205,217,223],[93,99,101,112,154,217,219,223,244,246],[56],[104],[102,103,105,106,107,108,109,110,111],[139,140],[119,142],[149,150],[136,137],[135],[131,132,133,135,138,141,142,143,144,145,146,148,151,152,153],[147],[142],[134],[98],[120,121,125,126,127,128,129],[123,124],[119,120],[115,116,117,118],[212],[207,208,209,210,211,212],[207,208,209,210,211,213],[212,213],[214],[206,214,215],[252,253],[254],[248],[81],[66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92],[268],[268,270],[101,135,244],[101],[104,134],[101,244]],"referencedMap":[[124,1],[123,1],[122,2],[196,3],[197,4],[205,5],[198,4],[199,4],[200,6],[201,7],[195,4],[202,7],[203,4],[204,7],[98,8],[95,9],[96,10],[65,11],[62,12],[63,12],[59,12],[60,12],[61,12],[64,12],[160,1],[161,1],[163,13],[164,14],[166,1],[167,1],[168,1],[186,15],[171,16],[173,1],[190,1],[192,1],[169,1],[170,1],[174,1],[191,1],[176,17],[178,18],[188,1],[189,1],[183,19],[187,20],[182,1],[193,21],[155,1],[247,22],[221,23],[220,24],[222,25],[217,26],[251,27],[226,28],[227,28],[224,29],[244,28],[228,28],[230,28],[229,28],[231,28],[232,28],[233,28],[234,28],[235,28],[236,28],[237,28],[239,28],[238,28],[241,28],[240,28],[243,28],[242,28],[263,30],[264,31],[265,32],[273,33],[267,34],[270,35],[271,36],[269,37],[272,38],[274,39],[261,40],[260,41],[258,42],[259,42],[250,43],[246,44],[113,45],[219,46],[218,47],[114,48],[255,49],[256,50],[245,51],[102,52],[105,53],[112,54],[107,53],[108,53],[140,1],[141,55],[150,56],[151,57],[138,58],[136,59],[152,59],[132,19],[133,1],[131,19],[143,59],[145,59],[154,60],[148,61],[147,62],[144,59],[142,59],[146,59],[135,63],[99,64],[121,17],[130,65],[129,1],[125,66],[120,1],[128,67],[119,68],[207,69],[211,69],[210,69],[209,69],[213,70],[208,69],[212,71],[214,72],[215,73],[216,74],[254,75],[252,76],[249,77],[82,78],[93,79]],"exportedModulesMap":[[124,1],[123,1],[122,2],[196,3],[197,4],[205,5],[198,4],[199,4],[200,6],[201,7],[195,4],[202,7],[203,4],[204,7],[98,8],[95,9],[96,10],[65,11],[62,12],[63,12],[59,12],[60,12],[61,12],[64,12],[160,1],[161,1],[163,13],[164,14],[166,1],[167,1],[168,1],[186,15],[171,16],[173,1],[190,1],[192,1],[169,1],[170,1],[174,1],[191,1],[176,17],[178,18],[188,1],[189,1],[183,19],[187,20],[182,1],[193,21],[155,1],[226,28],[227,28],[224,29],[244,28],[228,28],[230,28],[229,28],[231,28],[232,28],[233,28],[234,28],[235,28],[236,28],[237,28],[239,28],[238,28],[241,28],[240,28],[243,28],[242,28],[273,33],[270,80],[271,81],[272,80],[274,82],[246,44],[218,63],[114,83],[255,84],[245,85],[105,53],[107,53],[108,53],[140,1],[141,55],[150,56],[151,57],[138,58],[136,59],[152,59],[132,19],[133,1],[131,19],[143,59],[145,59],[154,60],[148,61],[147,62],[144,59],[142,59],[146,59],[135,63],[99,64],[121,17],[130,65],[129,1],[125,66],[120,1],[128,67],[119,68],[207,69],[211,69],[210,69],[209,69],[213,70],[208,69],[212,71],[214,72],[215,73],[216,74],[254,75],[252,76],[249,77],[82,78],[93,79]],"semanticDiagnosticsPerFile":[177,117,124,123,122,118,57,196,197,205,198,116,199,56,200,266,194,201,195,202,134,101,203,204,11,13,12,2,14,15,16,17,18,19,20,21,3,4,25,22,23,24,26,27,28,5,29,30,31,32,6,36,33,34,35,37,7,38,43,44,39,40,41,42,8,48,45,46,47,49,9,50,51,52,53,54,1,10,55,94,97,98,95,96,65,62,63,59,60,61,64,58,158,160,159,161,162,163,164,165,184,166,167,168,186,171,172,173,190,192,169,170,174,191,175,176,178,179,188,180,181,189,183,187,182,185,193,155,156,157,247,221,220,222,217,251,226,225,227,224,244,228,230,229,231,232,233,234,235,236,237,239,238,241,240,243,242,263,264,265,268,273,267,270,271,269,272,274,261,260,258,259,257,223,250,246,100,113,219,218,114,255,256,245,104,102,106,103,105,112,110,107,108,111,109,140,141,139,150,151,149,138,137,136,152,132,133,131,143,145,153,154,148,147,144,142,146,135,99,121,130,127,129,125,120,128,126,115,119,207,211,210,209,213,208,212,262,214,215,216,206,253,254,252,248,249,80,75,89,88,70,90,78,77,72,68,81,82,74,83,93,67,66,71,79,73,69,76,91,85,92,84,87,86],"latestChangedDtsFile":"./build-types/index.d.ts"},"version":"4.9.5"}