WordPress/wp-includes/js/dist/element.min.js
youknowriad 1de40f71be Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress. 
This includes features like:

 - DataViews.
 - Customization tools like box shadow, background size and repeat.
 - UI improvements in the site editor. 
 - Preferences sharing between the post and site editors.
 - Unified panels and editors between post and site editors.
 - Improved template mode in the post editor.
 - Iterations to multiple interactive blocks.
 - Preparing the blocks and UI for pattern overrides.
 - and a lot more.

Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377


git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 21:07:12 +00:00

9 lines
12 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},PureComponent:function(){return e.PureComponent},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 G},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,u;const a=/<(\/)?(\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=a.exec(t);if(null===e)return["no-more-tokens"];const n=e.index,[r,o,i,u]=e,s=r.length;if(u)return["self-closed",i,n,s];if(o)return["closer",i,n,s];return["opener",i,n,s]}(),[c,l,p,h]=r,m=u.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}=u.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 u.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:a,tokenStart:s,children:c}=u.pop(),l=n?t.substr(a,n-a):t.substr(a);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=u.pop(),a=t.substr(r.prevOffset,p-r.prevOffset);r.children.push(a),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:a,children:s}=n,c=u[u.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=a||o+i}var p=(n,r)=>{if(t=n,o=0,i=[],u=[],a.lastIndex=0,!c(r))throw new TypeError("The conversionMap provided is not valid. It must be an object with values that are React Elements");do{}while(l(r));return(0,e.createElement)(e.Fragment,null,...i)};function h(...t){return t.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 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 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"==typeof SuppressedError&&SuppressedError;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,u=t.transform,a=void 0===u?S:u,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(a).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({children:t,...n}){let r="";return e.Children.toArray(t).forEach((e=>{"string"==typeof e&&""!==e.trim()&&(r+=e)})),(0,e.createElement)("div",{dangerouslySetInnerHTML:{__html:r},...n})}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,r={}){if(null==t||!1===t)return"";if(Array.isArray(t))return Z(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 Z(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?function(e,t,n,r={}){const o=new e(t,r);"function"==typeof o.getChildContext&&Object.assign(r,o.getChildContext());const i=B(o.render(),n,r);return i}(o,i,n,r):B(o(i,r),n,r)}switch(o&&o.$$typeof){case M.$$typeof:return Z(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,r={}){let o="";if("textarea"===e&&t.hasOwnProperty("value")){o=Z(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=Z(t.children,n,r));if(!e)return o;const i=function(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 u=i||V(n,["data-","aria-"])||z.has(r);("boolean"!=typeof o||u)&&(t+=" "+r,i||("string"==typeof o&&(o=(0,T.escapeAttribute)(o)),t+='="'+o+'"'))}return t}(t);return j.has(e)?"<"+e+i+"/>":"<"+e+i+">"+o+"</"+e+">"}function Z(e,t,n={}){let r="";e=Array.isArray(e)?e:[e];for(let o=0;o<e.length;o++){r+=B(e[o],t,n)}return r}var G=B}(),(window.wp=window.wp||{}).element=r}();