WordPress/wp-includes/js/dist/data.min.js

9 lines
26 KiB
JavaScript
Raw Normal View History

/*! This file is auto-generated */
!function(){var e={2167:function(e){"use strict";function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t(e)}function r(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function n(e,t){var r=e._map,n=e._arrayTreeMap,o=e._objectTreeMap;if(r.has(t))return r.get(t);for(var u=Object.keys(t).sort(),s=Array.isArray(t)?n:o,i=0;i<u.length;i++){var c=u[i];if(void 0===(s=s.get(c)))return;var a=t[c];if(void 0===(s=s.get(a)))return}var l=s.get("_ekm_value");return l?(r.delete(l[0]),l[0]=t,s.set("_ekm_value",l),r.set(t,l),l):void 0}var o=function(){function e(t){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.clear(),t instanceof e){var r=[];t.forEach((function(e,t){r.push([t,e])})),t=r}if(null!=t)for(var n=0;n<t.length;n++)this.set(t[n][0],t[n][1])}var o,u,s;return o=e,u=[{key:"set",value:function(r,n){if(null===r||"object"!==t(r))return this._map.set(r,n),this;for(var o=Object.keys(r).sort(),u=[r,n],s=Array.isArray(r)?this._arrayTreeMap:this._objectTreeMap,i=0;i<o.length;i++){var c=o[i];s.has(c)||s.set(c,new e),s=s.get(c);var a=r[c];s.has(a)||s.set(a,new e),s=s.get(a)}var l=s.get("_ekm_value");return l&&this._map.delete(l[0]),s.set("_ekm_value",u),this._map.set(r,u),this}},{key:"get",value:function(e){if(null===e||"object"!==t(e))return this._map.get(e);var r=n(this,e);return r?r[1]:void 0}},{key:"has",value:function(e){return null===e||"object"!==t(e)?this._map.has(e):void 0!==n(this,e)}},{key:"delete",value:function(e){return!!this.has(e)&&(this.set(e,void 0),!0)}},{key:"forEach",value:function(e){var r=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this;this._map.forEach((function(o,u){null!==u&&"object"===t(u)&&(o=o[1]),e.call(n,o,u,r)}))}},{key:"clear",value:function(){this._map=new Map,this._arrayTreeMap=new Map,this._objectTreeMap=new Map}},{key:"size",get:function(){return this._map.size}}],u&&r(o.prototype,u),s&&r(o,s),e}();e.exports=o},9125:function(e){e.exports=function(e){var t,r=Object.keys(e);return t=function(){var e,t,n;for(e="return {",t=0;t<r.length;t++)e+=(n=JSON.stringify(r[t]))+":r["+n+"](s["+n+"],a),";return e+="}",new Function("r,s,a",e)}(),function(n,o){var u,s,i;if(void 0===n)return t(e,{},o);for(u=t(e,n,o),s=r.length;s--;)if(n[i=r[s]]!==u[i])return u;return n}}}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var u=t[n]={exports:{}};return e[n](u,u.exports,r),u.exports}r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,{a:t}),t},r.d=function(e,t){for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};!function(){"use strict";r.r(n),r.d(n,{AsyncModeProvider:function(){return Me},RegistryConsumer:function(){return Ce},RegistryProvider:function(){return Fe},combineReducers:function(){return ze},controls:function(){return j},createReduxStore:function(){return se},createRegistry:function(){return le},createRegistryControl:function(){return I},createRegistrySelector:function(){return _},dispatch:function(){return et},plugins:function(){return o},register:function(){return ut},registerGenericStore:function(){return rt},registerStore:function(){return nt},resolveSelect:function(){return Ye},select:function(){return Qe},subscribe:function(){return tt},suspendSelect:function(){return Ze},use:function(){return ot},useDispatch:function(){return $e},useRegistry:function(){return Ue},useSelect:function(){return Ke},useSuspenseSelect:function(){return We},withDispatch:function(){return Be},withRegistry:function(){return Je},withSel
Editor: Sync changes from the Gutenberg plugin 14.1 release Updated WordPress packages necessary for releasing WordPress 6.1 Beta 1: - @wordpress/a11y@3.17.1 - @wordpress/annotations@2.17.2 - @wordpress/api-fetch@6.14.1 - @wordpress/autop@3.17.1 - @wordpress/babel-plugin-import-jsx-pragma@4.0.1 - @wordpress/babel-plugin-makepot@5.1.1 - @wordpress/babel-preset-default@7.1.1 - @wordpress/base-styles@4.8.1 - @wordpress/blob@3.17.1 - @wordpress/block-directory@3.15.2 - @wordpress/block-editor@10.0.2 - @wordpress/block-library@7.14.2 - @wordpress/block-serialization-default-parser@4.17.1 - @wordpress/block-serialization-spec-parser@4.17.1 - @wordpress/blocks@11.16.2 - @wordpress/browserslist-config@5.0.1 - @wordpress/components@21.0.2 - @wordpress/compose@5.15.2 - @wordpress/core-data@5.0.2 - @wordpress/create-block-tutorial-template@2.5.1 - @wordpress/create-block@4.1.1 - @wordpress/custom-templated-path-webpack-plugin@2.1.3 - @wordpress/customize-widgets@3.14.2 - @wordpress/data-controls@2.17.2 - @wordpress/data@7.1.2 - @wordpress/date@4.17.1 - @wordpress/dependency-extraction-webpack-plugin@4.0.2 - @wordpress/deprecated@3.17.1 - @wordpress/docgen@1.26.1 - @wordpress/dom-ready@3.17.1 - @wordpress/dom@3.17.2 - @wordpress/e2e-test-utils@8.1.1 - @wordpress/e2e-tests@5.1.2 - @wordpress/edit-post@6.14.2 - @wordpress/edit-site@4.14.2 - @wordpress/edit-widgets@4.14.2 - @wordpress/editor@12.16.2 - @wordpress/element@4.15.1 - @wordpress/env@5.2.1 - @wordpress/escape-html@2.17.1 - @wordpress/eslint-plugin@13.1.1 - @wordpress/format-library@3.15.2 - @wordpress/hooks@3.17.1 - @wordpress/html-entities@3.17.1 - @wordpress/i18n@4.17.1 - @wordpress/icons@9.8.1 - @wordpress/interface@4.16.2 - @wordpress/is-shallow-equal@4.17.1 - @wordpress/jest-console@6.0.1 - @wordpress/jest-preset-default@9.0.1 - @wordpress/jest-puppeteer-axe@5.0.1 - @wordpress/keyboard-shortcuts@3.15.2 - @wordpress/keycodes@3.17.1 - @wordpress/lazy-import@1.4.3 - @wordpress/library-export-default-webpack-plugin@2.3.3 - @wordpress/list-reusable-blocks@3.15.2 - @wordpress/media-utils@4.8.1 - @wordpress/notices@3.17.2 - @wordpress/npm-package-json-lint-config@4.2.1 - @wordpress/nux@5.15.2 - @wordpress/plugins@4.15.2 - @wordpress/postcss-plugins-preset@4.1.1 - @wordpress/postcss-themes@5.0.1 - @wordpress/preferences-persistence@1.9.1 - @wordpress/preferences@2.9.2 - @wordpress/prettier-config@2.0.1 - @wordpress/primitives@3.15.1 - @wordpress/priority-queue@2.17.2 - @wordpress/project-management-automation@1.16.1 - @wordpress/react-i18n@3.15.1 - @wordpress/readable-js-assets-webpack-plugin@2.0.1 - @wordpress/redux-routine@4.17.1 - @wordpress/reusable-blocks@3.15.2 - @wordpress/rich-text@5.15.2 - @wordpress/scripts@24.1.2 - @wordpress/server-side-render@3.15.2 - @wordpress/shortcode@3.17.1 - @wordpress/style-engine@1.0.1 - @wordpress/stylelint-config@21.0.1 - @wordpress/token-list@2.17.1 - @wordpress/url@3.18.1 - @wordpress/viewport@4.15.2 - @wordpress/warning@2.17.1 - @wordpress/widgets@2.15.2 - @wordpress/wordcount@3.17.1 Props bernhard-reiter, cbravobernal, czapla, oandregal, isabel_brison, andrewserong, mciampini. See #56467. Built from https://develop.svn.wordpress.org/trunk@54257 git-svn-id: http://core.svn.wordpress.org/trunk@53816 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-09-20 17:43:29 +02:00
/*!
* is-plain-object <https://github.com/jonschlinkert/is-plain-object>
*
* Copyright (c) 2014-2017, Jon Schlinkert.
* Released under the MIT License.
*/
function pe(e){return"[object Object]"===Object.prototype.toString.call(e)}function de(e){var t,r;return!1!==pe(e)&&(void 0===(t=e.constructor)||!1!==pe(r=t.prototype)&&!1!==r.hasOwnProperty("isPrototypeOf"))}let ge;const he={getItem(e){return ge&&ge[e]?ge[e]:null},setItem(e,t){ge||he.clear(),ge[e]=String(t)},clear(){ge=Object.create(null)}};var ve=he;let ye;try{ye=window.localStorage,ye.setItem("__wpDataTestLocalStorage",""),ye.removeItem("__wpDataTestLocalStorage")}catch(e){ye=ve}const Se=ye,be="WP_DATA";function Re(e,t){const r=function(e){const{storage:t=Se,storageKey:r=be}=e;let n;return{get:function(){if(void 0===n){const e=t.getItem(r);if(null===e)n={};else try{n=JSON.parse(e)}catch(e){n={}}}return n},set:function(e,o){n={...n,[e]:o},t.setItem(r,JSON.stringify(n))}}}(t);return{registerStore(t,n){if(!n.persist)return e.registerStore(t,n);const o=r.get()[t];if(void 0!==o){let e=n.reducer(n.initialState,{type:"@@WP/PERSISTENCE_RESTORE"});e=de(e)&&de(o)?(0,i.merge)({},e,o):o,n={...n,initialState:e}}const u=e.registerStore(t,n);return u.subscribe(function(e,t,n){let o;if(Array.isArray(n)){const e=n.reduce(((e,t)=>Object.assign(e,{[t]:(e,r)=>r.nextState[t]})),{});u=ze(e),o=(e,t)=>t.nextState===e?e:u(e,t)}else o=(e,t)=>t.nextState;var u;let s=o(void 0,{nextState:e()});return()=>{const n=o(s,{nextState:e()});n!==s&&(r.set(t,n),s=n)}}(u.getState,t,n.persist)),u}}}Re.__unstableMigrate=()=>{};var me=Re;function Oe(){return Oe=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Oe.apply(this,arguments)}var we=window.wp.element,Ee=window.wp.compose,_e=window.React;function Ie(e,t){var r=(0,_e.useState)((function(){return{inputs:t,result:e()}}))[0],n=(0,_e.useRef)(!0),o=(0,_e.useRef)(r),u=n.current||Boolean(t&&o.current.inputs&&function(e,t){if(e.length!==t.length)return!1;for(var r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}(t,o.current.inputs))?o.current:{inputs:t,result:e()};return(0,_e.useEffect)((function(){n.current=!1,o.current=u}),[u]),u.result}var Te=window.wp.priorityQueue,Ne=window.wp.isShallowEqual,Ae=r.n(Ne);const Le=(0,we.createContext)(fe),{Consumer:je,Provider:Pe}=Le,Ce=je;var Fe=Pe;function Ue(){return(0,we.useContext)(Le)}const ke=(0,we.createContext)(!1),{Consumer:xe,Provider:De}=ke;var Me=De;function Ve(){return(0,we.useContext)(ke)}const Ge=()=>{},He=(0,Te.createQueue)();function Ke(e,t){const r="function"==typeof e;r||(t=[]);const n=(0,we.useCallback)(r?e:Ge,t),o=r?n:null,u=Ue(),s=Ve(),i=(0,we.useRef)(u),c=(0,we.useRef)(),a=(0,we.useRef)(s),l=(0,we.useRef)(),f=(0,we.useRef)(),p=(0,we.useRef)([]),d=(0,we.useCallback)((e=>u.__unstableMarkListeningStores((()=>e(u.select,u)),p)),[u]),g=(0,we.useMemo)((()=>({})),t||[]);let h;if(o){h=l.current;const e=i.current!==u,t=c.current!==o,r=a.current&&!s,n=!!f.current;if(e||t||r||n)try{h=d(o)}catch(e){let t=`An error occurred while running 'mapSelect': ${e.message}`;f.current&&(t+="\nThe error may be correlated with this previous error:\n",t+=`${f.current.stack}\n\n`,t+="Original stack trace:"),console.error(t)}}(0,Ee.useIsomorphicLayoutEffect)((()=>{r&&(i.current=u,c.current=o,a.current=s,l.current=h,f.current=void 0)}));const v=Ie((()=>({queue:!0})),[u]),[,y]=(0,we.useReducer)((e=>e+1),0),S=(0,we.useRef)(!1);return(0,Ee.useIsomorphicLayoutEffect)((()=>{if(!r)return;const e=()=>{try{const e=d(c.current);if(Ae()(l.current,e))return;l.current=e}catch(e){f.current=e}y()},t=()=>{S.current&&(a.current?He.add(v,e):e())};e();const n=p.current.map((e=>u.__unstableSubscribeStore(e,t)));return S.current=!0,()=>{n.forEach((e=>null==e?void 0:e())),He.cancel(v),S.current=!1}}),[u,d,r,g]),(0,we.useDebugValue)(h),r?h:u.select(e)}function We(e,t){const r=(0,we.useCallback)(e,t),n=Ue(),o=Ve(),u=(0,we.useRef)(n),s=(0,we.useRef)(),i=(0,we.useRef)(o),c=(0,we.useRef)(),a=(0,we.useRef)(),l=(0,we.useRef)([]),f=(0,we.useCallback)((e=>n.__unstableMarkListeningStores((()=>e(n.suspendSelect,n)),l)),[n]),p=(0,we.useMemo)((()=>({})),t||[]);let d=c.current,g=a.cu