WordPress/wp-includes/js/dist/element.min.js
gziolo 2b08f8960b 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: [1e2b2f680c 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 13:09:42 +00:00

9 lines
13 KiB
JavaScript

/*! This file is auto-generated */
!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.push(l),c.children.push((0,e.cloneElement)(r,null,...s)),c.prevOffset=u||o+i}var p=(n,r)=>{if(t=n,o=0,i=[],a=[],u.lastIndex=0,!c(r))throw new TypeError("The conversionMap provided is not valid. It must be an object with values that are WPElements");do{}while(l(r));return(0,e.createElement)(e.Fragment,null,...i)};function h(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return n.reduce(((t,n,r)=>(e.Children.forEach(n,((n,o)=>{n&&"string"!=typeof n&&(n=(0,e.cloneElement)(n,{key:[r,o].join()})),t.push(n)})),t)),[])}function m(t,n){return t&&e.Children.map(t,((t,r)=>{if("string"==typeof(null==t?void 0:t.valueOf()))return(0,e.createElement)(n,{key:r},t);const{children:o,...i}=t.props;return(0,e.createElement)(n,{key:r,...i},o)}))}var g=n(1850),y=n(4470);const v=e=>"number"!=typeof e&&("string"==typeof(null==e?void 0:e.valueOf())||Array.isArray(e)?!e.length:!e);var b={OS:"web",select:e=>"web"in e?e.web:e.default,isWeb:!0};
/*!
* 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"].reduce(((e,t)=>(e[t.toLowerCase()]=t,e)),{}),N=["allowReorder","attributeName","attributeType","autoReverse","baseFrequency","baseProfile","calcMode","clipPathUnits","contentScriptType","contentStyleType","diffuseConstant","edgeMode","externalResourcesRequired","filterRes","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","suppressContentEditableWarning","suppressHydrationWarning","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector"].reduce(((e,t)=>(e[t.toLowerCase()]=t,e)),{}),U=["xlink:actuate","xlink:arcrole","xlink:href","xlink:role","xlink:show","xlink:title","xlink:type","xml:base","xml:lang","xml:space","xmlns:xlink"].reduce(((e,t)=>(e[t.replace(":","").toLowerCase()]=t,e)),{});function $(e){switch(e){case"htmlFor":return"for";case"className":return"class"}const t=e.toLowerCase();return N[t]?N[t]:F[t]?R(F[t]):U[t]?U[t]:t}function q(e){return e.startsWith("--")?e:V(e,["ms","O","Moz","Webkit"])?"-"+R(e):R(e)}function X(e,t){return"number"!=typeof t||0===t||D.has(e)?t:t+"px"}function B(t,n){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(null==t||!1===t)return"";if(Array.isArray(t))return G(t,n,r);switch(typeof t){case"string":return(0,T.escapeHTML)(t);case"number":return t.toString()}const{type:o,props:i}=t;switch(o){case e.StrictMode:case e.Fragment:return G(i.children,n,r);case A:const{children:t,...o}=i;return Y(Object.keys(o).length?"div":null,{...o,dangerouslySetInnerHTML:{__html:t}},n,r)}switch(typeof o){case"string":return Y(o,i,n,r);case"function":return o.prototype&&"function"==typeof o.prototype.render?Z(o,i,n,r):B(o(i,r),n,r)}switch(o&&o.$$typeof){case M.$$typeof:return G(i.children,i.value,r);case I.$$typeof:return B(i.children(n||o._currentValue),n,r);case L.$$typeof:return B(o.render(i),n,r)}return""}function Y(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o="";if("textarea"===e&&t.hasOwnProperty("value")){o=G(t.value,n,r);const{value:e,...i}=t;t=i}else t.dangerouslySetInnerHTML&&"string"==typeof t.dangerouslySetInnerHTML.__html?o=t.dangerouslySetInnerHTML.__html:void 0!==t.children&&(o=G(t.children,n,r));if(!e)return o;const i=J(t);return j.has(e)?"<"+e+i+"/>":"<"+e+i+">"+o+"</"+e+">"}function Z(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const o=new e(t,r);"function"==typeof o.getChildContext&&Object.assign(r,o.getChildContext());const i=B(o.render(),n,r);return i}function G(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r="";e=Array.isArray(e)?e:[e];for(let o=0;o<e.length;o++){r+=B(e[o],t,n)}return r}function J(e){let t="";for(const n in e){const r=$(n);if(!(0,T.isValidAttributeName)(r))continue;let o=_(n,e[n]);if(!P.has(typeof o))continue;if(W(n))continue;const i=H.has(r);if(i&&!1===o)continue;const a=i||V(n,["data-","aria-"])||z.has(r);("boolean"!=typeof o||a)&&(t+=" "+r,i||("string"==typeof o&&(o=(0,T.escapeAttribute)(o)),t+='="'+o+'"'))}return t}var K=B}(),(window.wp=window.wp||{}).element=r}();