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

9 lines
13 KiB
JavaScript
Raw Normal View History

/*! This file is auto-generated */
Update the WP packages with fixes prior to WP 6.2 beta 3 Includes the following changes: - Upgrade Playwright to 1.30.0 - [Block Editor - Inserter]: preload media categories empty check - client side - Navigation: Fixes undo and redo for nesting operations in the navigation block's inspector - Fix: OffCanvasEditor does not inserts submenu on collapsed items. - OffCanvasEditor: Only allow some blocks to be converted to submenus - Navigation: Updates "Add Submenu item" text to "Add Submenu link" - Update: Make OffCanvasEditor use LeafMoreMenu by default. - Template Part: Performance: Replace usage of wp_get_theme()->get_stylesheet() with get_stylesheet() - Widget Editor: Fix a problem with 'Move to Widget Area' button not working - Reusable Blocks: Use React 18 rendering for import dropdown - useAsyncList: flush state updates when processing queue - Refactor the site editor URLs for better backward compatibility - Template editor: only disable the save button if no changes rather than hiding it - [Quote]: Fix deprectated large style specificity rule - Style Book: Allow button text labels for style book icon - List View: Scroll selected block into view when single block selection changes - Post editor: revert iframed editor for WP core only - Fix the Publish region position and focus style. - Remove "& Shadow" from the Border ScreenHeader title - Site editor: specify focus state color for template navigation button References: [https://github.com/WordPress/gutenberg/commit/1e2b2f680c6378f789d6660bc04b30e35e3a33a3 Gutenberg's commit for publishing the packages] Props ntsekouras, ellatrix. See #57471. Built from https://develop.svn.wordpress.org/trunk@55392 git-svn-id: http://core.svn.wordpress.org/trunk@54925 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-21 08:09:42 -05:00
!function(){"use strict";var e={4470:function(e,t,n){var r=n(1850);t.s=r.createRoot,t.a=r.hydrateRoot},1850:function(e){e.exports=window.ReactDOM}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r](i,i.exports,n),i.exports}n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};!function(){n.r(r),n.d(r,{Children:function(){return e.Children},Component:function(){return e.Component},Fragment:function(){return e.Fragment},Platform:function(){return b},RawHTML:function(){return A},StrictMode:function(){return e.StrictMode},Suspense:function(){return e.Suspense},cloneElement:function(){return e.cloneElement},concatChildren:function(){return h},createContext:function(){return e.createContext},createElement:function(){return e.createElement},createInterpolateElement:function(){return p},createPortal:function(){return g.createPortal},createRef:function(){return e.createRef},createRoot:function(){return y.s},findDOMNode:function(){return g.findDOMNode},flushSync:function(){return g.flushSync},forwardRef:function(){return e.forwardRef},hydrate:function(){return g.hydrate},hydrateRoot:function(){return y.a},isEmptyElement:function(){return v},isValidElement:function(){return e.isValidElement},lazy:function(){return e.lazy},memo:function(){return e.memo},render:function(){return g.render},renderToString:function(){return K},startTransition:function(){return e.startTransition},switchChildrenNodeName:function(){return m},unmountComponentAtNode:function(){return g.unmountComponentAtNode},useCallback:function(){return e.useCallback},useContext:function(){return e.useContext},useDebugValue:function(){return e.useDebugValue},useDeferredValue:function(){return e.useDeferredValue},useEffect:function(){return e.useEffect},useId:function(){return e.useId},useImperativeHandle:function(){return e.useImperativeHandle},useInsertionEffect:function(){return e.useInsertionEffect},useLayoutEffect:function(){return e.useLayoutEffect},useMemo:function(){return e.useMemo},useReducer:function(){return e.useReducer},useRef:function(){return e.useRef},useState:function(){return e.useState},useSyncExternalStore:function(){return e.useSyncExternalStore},useTransition:function(){return e.useTransition}});var e=window.React;let t,o,i,a;const u=/<(\/)?(\w+)\s*(\/)?>/g;function s(e,t,n,r,o){return{element:e,tokenStart:t,tokenLength:n,prevOffset:r,leadingTextStart:o,children:[]}}const c=t=>{const n="object"==typeof t,r=n&&Object.values(t);return n&&r.length&&r.every((t=>(0,e.isValidElement)(t)))};function l(n){const r=function(){const e=u.exec(t);if(null===e)return["no-more-tokens"];const n=e.index,[r,o,i,a]=e,s=r.length;if(a)return["self-closed",i,n,s];if(o)return["closer",i,n,s];return["opener",i,n,s]}(),[c,l,p,h]=r,m=a.length,g=p>o?o:null;if(!n[l])return f(),!1;switch(c){case"no-more-tokens":if(0!==m){const{leadingTextStart:e,tokenStart:n}=a.pop();i.push(t.substr(e,n))}return f(),!1;case"self-closed":return 0===m?(null!==g&&i.push(t.substr(g,p-g)),i.push(n[l]),o=p+h,!0):(d(s(n[l],p,h)),o=p+h,!0);case"opener":return a.push(s(n[l],p,h,p+h,g)),o=p+h,!0;case"closer":if(1===m)return function(n){const{element:r,leadingTextStart:o,prevOffset:u,tokenStart:s,children:c}=a.pop(),l=n?t.substr(u,n-u):t.substr(u);l&&c.push(l);null!==o&&i.push(t.substr(o,s-o));i.push((0,e.cloneElement)(r,null,...c))}(p),o=p+h,!0;const r=a.pop(),u=t.substr(r.prevOffset,p-r.prevOffset);r.children.push(u),r.prevOffset=p+h;const c=s(r.element,r.tokenStart,r.tokenLength,p+h);return c.children=r.children,d(c),o=p+h,!0;default:return f(),!1}}function f(){const e=t.length-o;0!==e&&i.push(t.substr(o,e))}function d(n){const{element:r,tokenStart:o,tokenLength:i,prevOffset:u,children:s}=n,c=a[a.length-1],l=t.substr(c.prevOffset,o-c.prevOffset);l&&c.children
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 11:43:29 -04:00
/*!
* is-plain-object <https://github.com/jonschlinkert/is-plain-object>
*
* Copyright (c) 2014-2017, Jon Schlinkert.
* Released under the MIT License.
*/
function k(e){return"[object Object]"===Object.prototype.toString.call(e)}var w=function(){return w=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},w.apply(this,arguments)};Object.create;Object.create;function S(e){return e.toLowerCase()}var x=[/([a-z0-9])([A-Z])/g,/([A-Z])([A-Z][a-z])/g],O=/[^A-Z0-9]+/gi;function C(e,t,n){return t instanceof RegExp?e.replace(t,n):t.reduce((function(e,t){return e.replace(t,n)}),e)}function E(e,t){return void 0===t&&(t={}),function(e,t){void 0===t&&(t={});for(var n=t.splitRegexp,r=void 0===n?x:n,o=t.stripRegexp,i=void 0===o?O:o,a=t.transform,u=void 0===a?S:a,s=t.delimiter,c=void 0===s?" ":s,l=C(C(e,r,"$1\0$2"),i,"\0"),f=0,d=l.length;"\0"===l.charAt(f);)f++;for(;"\0"===l.charAt(d-1);)d--;return l.slice(f,d).split("\0").map(u).join(c)}(e,w({delimiter:"."},t))}function R(e,t){return void 0===t&&(t={}),E(e,w({delimiter:"-"},t))}var T=window.wp.escapeHtml;function A(t){let{children:n,...r}=t,o="";return e.Children.toArray(n).forEach((e=>{"string"==typeof e&&""!==e.trim()&&(o+=e)})),(0,e.createElement)("div",{dangerouslySetInnerHTML:{__html:o},...r})}const{Provider:M,Consumer:I}=(0,e.createContext)(void 0),L=(0,e.forwardRef)((()=>null)),P=new Set(["string","boolean","number"]),j=new Set(["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"]),H=new Set(["allowfullscreen","allowpaymentrequest","allowusermedia","async","autofocus","autoplay","checked","controls","default","defer","disabled","download","formnovalidate","hidden","ismap","itemscope","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","selected","typemustmatch"]),z=new Set(["autocapitalize","autocomplete","charset","contenteditable","crossorigin","decoding","dir","draggable","enctype","formenctype","formmethod","http-equiv","inputmode","kind","method","preload","scope","shape","spellcheck","translate","type","wrap"]),D=new Set(["animation","animationIterationCount","baselineShift","borderImageOutset","borderImageSlice","borderImageWidth","columnCount","cx","cy","fillOpacity","flexGrow","flexShrink","floodOpacity","fontWeight","gridColumnEnd","gridColumnStart","gridRowEnd","gridRowStart","lineHeight","opacity","order","orphans","r","rx","ry","shapeImageThreshold","stopOpacity","strokeDasharray","strokeDashoffset","strokeMiterlimit","strokeOpacity","strokeWidth","tabSize","widows","x","y","zIndex","zoom"]);function V(e,t){return t.some((t=>0===e.indexOf(t)))}function W(e){return"key"===e||"children"===e}function _(e,t){return"style"===e?function(e){if(t=e,!1===k(t)||void 0!==(n=t.constructor)&&(!1===k(r=n.prototype)||!1===r.hasOwnProperty("isPrototypeOf")))return e;var t,n,r;let o;for(const t in e){const n=e[t];if(null==n)continue;o?o+=";":o="";o+=q(t)+":"+X(t,n)}return o}(t):t}const F=["accentHeight","alignmentBaseline","arabicForm","baselineShift","capHeight","clipPath","clipRule","colorInterpolation","colorInterpolationFilters","colorProfile","colorRendering","dominantBaseline","enableBackground","fillOpacity","fillRule","floodColor","floodOpacity","fontFamily","fontSize","fontSizeAdjust","fontStretch","fontStyle","fontVariant","fontWeight","glyphName","glyphOrientationHorizontal","glyphOrientationVertical","horizAdvX","horizOriginX","imageRendering","letterSpacing","lightingColor","markerEnd","markerMid","markerStart","overlinePosition","overlineThickness","paintOrder","panose1","pointerEvents","renderingIntent","shapeRendering","stopColor","stopOpacity","strikethroughPosition","strikethroughThickness","strokeDasharray","strokeDashoffset","strokeLinecap","strokeLinejoin","strokeMiterlimit","strokeOpacity","strokeWidth","textAnchor","textDecoration","textRendering","underlinePosition","underlineThickness","unicodeBidi","unicodeRange","unitsPerEm","vAlphabetic","vHanging","vIdeographic","vMathematical","vectorEffect","vertAdvY","vertOriginX","vertOriginY","wordSpacing","writingMode","xmlnsXlink","xHeight"].red