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

2 lines
48 KiB
JavaScript
Raw Normal View History

/*! This file is auto-generated */
(()=>{"use strict";var e,t,n={},r={};function o(e){var t=r[e];if(void 0!==t)return t.exports;var a=r[e]={exports:{}};return n[e](a,a.exports,o),a.exports}t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,o.t=function(n,r){if(1&r&&(n=this(n)),8&r)return n;if("object"==typeof n&&n){if(4&r&&n.__esModule)return n;if(16&r&&"function"==typeof n.then)return n}var a=Object.create(null);o.r(a);var c={};e=e||[null,t({}),t([]),t(t)];for(var u=2&r&&n;"object"==typeof u&&!~e.indexOf(u);u=t(u))Object.getOwnPropertyNames(u).forEach((e=>c[e]=()=>n[e]));return c.default=()=>n,o.d(a,c),a},o.d=(e,t)=>{for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.nc=void 0;var a={};o.r(a),o.d(a,{CommandMenu:()=>Zn,privateApis:()=>Jn,store:()=>qn,useCommand:()=>Qn,useCommandLoader:()=>er});var c={};o.r(c),o.d(c,{close:()=>In,open:()=>Pn,registerCommand:()=>Mn,registerCommandLoader:()=>Tn,unregisterCommand:()=>_n,unregisterCommandLoader:()=>Dn});var u={};o.r(u),o.d(u,{getCommandLoaders:()=>Fn,getCommands:()=>jn,getContext:()=>Un,isOpen:()=>Wn});var i={};o.r(i),o.d(i,{setContext:()=>$n});var l=1,s=.9,d=.8,f=.17,m=.1,v=.999,p=.9999,h=.99,g=/[\\\/_+.#"@\[\(\{&]/,b=/[\\\/_+.#"@\[\(\{&]/g,E=/[\s-]/,y=/[\s-]/g;function w(e,t,n,r,o,a,c){if(a===t.length)return o===e.length?l:h;var u=`${o},${a}`;if(void 0!==c[u])return c[u];for(var i,C,S,x,O=r.charAt(a),R=n.indexOf(O,o),k=0;R>=0;)(i=w(e,t,n,r,R+1,a+1,c))>k&&(R===o?i*=l:g.test(e.charAt(R-1))?(i*=d,(S=e.slice(o,R-1).match(b))&&o>0&&(i*=Math.pow(v,S.length))):E.test(e.charAt(R-1))?(i*=s,(x=e.slice(o,R-1).match(y))&&o>0&&(i*=Math.pow(v,x.length))):(i*=f,o>0&&(i*=Math.pow(v,R-o))),e.charAt(R)!==t.charAt(a)&&(i*=p)),(i<m&&n.charAt(R-1)===r.charAt(a+1)||r.charAt(a+1)===r.charAt(a)&&n.charAt(R-1)!==r.charAt(a))&&((C=w(e,t,n,r,R+1,a+2,c))*m>i&&(i=C*m)),i>k&&(k=i),R=n.indexOf(O,R+1);return c[u]=k,k}function C(e){return e.toLowerCase().replace(y," ")}function S(e,t,n){return w(e=n&&n.length>0?""+(e+" "+n.join(" ")):e,t,C(e),C(t),0,0,{})}function x(){return x=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},x.apply(this,arguments)}const O=window.React;var R=o.t(O,2);function k(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(null==e||e(r),!1===n||!r.defaultPrevented)return null==t?void 0:t(r)}}function A(...e){return t=>e.forEach((e=>function(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}(e,t)))}function N(...e){return(0,O.useCallback)(A(...e),e)}function L(...e){const t=e[0];if(1===e.length)return t;const n=()=>{const n=e.map((e=>({useScope:e(),scopeName:e.scopeName})));return function(e){const r=n.reduce(((t,{useScope:n,scopeName:r})=>({...t,...n(e)[`__scope${r}`]})),{});return(0,O.useMemo)((()=>({[`__scope${t.scopeName}`]:r})),[r])}};return n.scopeName=t.scopeName,n}const M=Boolean(null===globalThis||void 0===globalThis?void 0:globalThis.document)?O.useLayoutEffect:()=>{},_=R["useId".toString()]||(()=>{});let T=0;function D(e){const[t,n]=O.useState(_());return M((()=>{e||n((e=>null!=e?e:String(T++)))}),[e]),e||(t?`radix-${t}`:"")}function P(e){const t=(0,O.useRef)(e);return(0,O.useEffect)((()=>{t.current=e})),(0,O.useMemo)((()=>(...e)=>{var n;return null===(n=t.current)||void 0===n?void 0:n.call(t,...e)}),[])}function I({prop:e,defaultProp:t,onChange:n=(()=>{})}){const[r,o]=function({defaultProp:e,onChange:t}){const n=(0,O.useState)(e),[r]=n,o=(0,O.useRef)(r),a=P(t);return(0,O.useEffect)((()=>{o.current!==r&&(a(r),o.current=r)}),[r,o,a]),n}({defaultProp:t,onChange:n}),a=void 0!==e,c=a?e:r,u=P(n);return[c,(0,O.useCallback)((t=>{if(a){const n="function"==typeof t?t(e):t;n!==e&&u(n)}else o(t)}),[a,e,o,u])]}const j=window.ReactDOM,F=(0,O.forwardRef)(((e,t)=>{const{children:n,...r}=e,o=O.Children.toArr