diff options
Diffstat (limited to '')
-rw-r--r-- | wp-includes/js/dist/router.min.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/wp-includes/js/dist/router.min.js b/wp-includes/js/dist/router.min.js index 05b9d55..48ab2a7 100644 --- a/wp-includes/js/dist/router.min.js +++ b/wp-includes/js/dist/router.min.js @@ -1,2 +1,2 @@ /*! This file is auto-generated */ -!function(){"use strict";var e={d:function(t,n){for(var r in n)e.o(n,r)&&!e.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:n[r]})},o:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r:function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};e.r(t),e.d(t,{privateApis:function(){return A}});var n,r=window.wp.element;function o(){return o=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},o.apply(this,arguments)}!function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"}(n||(n={}));var a=function(e){return e};var u="beforeunload",i="popstate";function c(e){e.preventDefault(),e.returnValue=""}function s(){var e=[];return{get length(){return e.length},push:function(t){return e.push(t),function(){e=e.filter((function(e){return e!==t}))}},call:function(t){e.forEach((function(e){return e&&e(t)}))}}}function l(){return Math.random().toString(36).substr(2,8)}function f(e){var t=e.pathname,n=void 0===t?"/":t,r=e.search,o=void 0===r?"":r,a=e.hash,u=void 0===a?"":a;return o&&"?"!==o&&(n+="?"===o.charAt(0)?o:"?"+o),u&&"#"!==u&&(n+="#"===u.charAt(0)?u:"#"+u),n}function h(e){var t={};if(e){var n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));var r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}var p=window.wp.url;const d=function(e){void 0===e&&(e={});var t=e.window,r=void 0===t?document.defaultView:t,p=r.history;function d(){var e=r.location,t=e.pathname,n=e.search,o=e.hash,u=p.state||{};return[u.idx,a({pathname:t,search:n,hash:o,state:u.usr||null,key:u.key||"default"})]}var v=null;r.addEventListener(i,(function(){if(v)P.call(v),v=null;else{var e=n.Pop,t=d(),r=t[0],o=t[1];if(P.length){if(null!=r){var a=w-r;a&&(v={action:e,location:o,retry:function(){x(-1*a)}},x(a))}}else j(e)}}));var y=n.Pop,g=d(),w=g[0],b=g[1],m=s(),P=s();function O(e){return"string"==typeof e?e:f(e)}function k(e,t){return void 0===t&&(t=null),a(o({pathname:b.pathname,hash:"",search:""},"string"==typeof e?h(e):e,{state:t,key:l()}))}function A(e,t){return[{usr:e.state,key:e.key,idx:t},O(e)]}function S(e,t,n){return!P.length||(P.call({action:e,location:t,retry:n}),!1)}function j(e){y=e;var t=d();w=t[0],b=t[1],m.call({action:y,location:b})}function x(e){p.go(e)}null==w&&(w=0,p.replaceState(o({},p.state,{idx:w}),""));var E={get action(){return y},get location(){return b},createHref:O,push:function e(t,o){var a=n.Push,u=k(t,o);if(S(a,u,(function(){e(t,o)}))){var i=A(u,w+1),c=i[0],s=i[1];try{p.pushState(c,"",s)}catch(e){r.location.assign(s)}j(a)}},replace:function e(t,r){var o=n.Replace,a=k(t,r);if(S(o,a,(function(){e(t,r)}))){var u=A(a,w),i=u[0],c=u[1];p.replaceState(i,"",c),j(o)}},go:x,back:function(){x(-1)},forward:function(){x(1)},listen:function(e){return m.push(e)},block:function(e){var t=P.push(e);return 1===P.length&&r.addEventListener(u,c),function(){t(),P.length||r.removeEventListener(u,c)}}};return E}(),v=d.push,y=d.replace;d.push=function(e,t){const n=(0,p.getQueryArgs)(window.location.href),r=(0,p.removeQueryArgs)(window.location.href,...Object.keys(n)),o=(0,p.addQueryArgs)(r,e);return v.call(d,o,t)},d.replace=function(e,t){const n=(0,p.getQueryArgs)(window.location.href),r=(0,p.removeQueryArgs)(window.location.href,...Object.keys(n)),o=(0,p.addQueryArgs)(r,e);return y.call(d,o,t)};var g=d;const w=(0,r.createContext)(),b=(0,r.createContext)();function m(e){const t=new URLSearchParams(e.search);return{...e,params:Object.fromEntries(t.entries())}}var P=window.wp.privateApis;const{lock:O,unlock:k}=(0,P.__dangerousOptInToUnstableAPIsOnlyForCoreModules)("I know using unstable features means my theme or plugin will inevitably break in the next version of WordPress.","@wordpress/router"),A={};O(A,{useHistory:function(){return(0,r.useContext)(b)},useLocation:function(){return(0,r.useContext)(w)},RouterProvider:function({children:e}){const[t,n]=(0,r.useState)((()=>m(g.location)));return(0,r.useEffect)((()=>g.listen((({location:e})=>{n(m(e))}))),[]),(0,r.createElement)(b.Provider,{value:g},(0,r.createElement)(w.Provider,{value:t},e))}}),(window.wp=window.wp||{}).router=t}();
\ No newline at end of file +(()=>{"use strict";var e={d:(t,n)=>{for(var r in n)e.o(n,r)&&!e.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:n[r]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};e.r(t),e.d(t,{privateApis:()=>S});const n=window.React,r=window.wp.element;function o(){return o=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},o.apply(this,arguments)}var a;!function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"}(a||(a={}));var u=function(e){return e};var i="beforeunload",c="popstate";function s(e){e.preventDefault(),e.returnValue=""}function l(){var e=[];return{get length(){return e.length},push:function(t){return e.push(t),function(){e=e.filter((function(e){return e!==t}))}},call:function(t){e.forEach((function(e){return e&&e(t)}))}}}function f(){return Math.random().toString(36).substr(2,8)}function h(e){var t=e.pathname,n=void 0===t?"/":t,r=e.search,o=void 0===r?"":r,a=e.hash,u=void 0===a?"":a;return o&&"?"!==o&&(n+="?"===o.charAt(0)?o:"?"+o),u&&"#"!==u&&(n+="#"===u.charAt(0)?u:"#"+u),n}function d(e){var t={};if(e){var n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));var r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}const p=window.wp.url,v=function(e){void 0===e&&(e={});var t=e.window,n=void 0===t?document.defaultView:t,r=n.history;function p(){var e=n.location,t=e.pathname,o=e.search,a=e.hash,i=r.state||{};return[i.idx,u({pathname:t,search:o,hash:a,state:i.usr||null,key:i.key||"default"})]}var v=null;n.addEventListener(c,(function(){if(v)P.call(v),v=null;else{var e=a.Pop,t=p(),n=t[0],r=t[1];if(P.length){if(null!=n){var o=g-n;o&&(v={action:e,location:r,retry:function(){x(-1*o)}},x(o))}}else j(e)}}));var w=a.Pop,y=p(),g=y[0],b=y[1],m=l(),P=l();function O(e){return"string"==typeof e?e:h(e)}function k(e,t){return void 0===t&&(t=null),u(o({pathname:b.pathname,hash:"",search:""},"string"==typeof e?d(e):e,{state:t,key:f()}))}function A(e,t){return[{usr:e.state,key:e.key,idx:t},O(e)]}function S(e,t,n){return!P.length||(P.call({action:e,location:t,retry:n}),!1)}function j(e){w=e;var t=p();g=t[0],b=t[1],m.call({action:w,location:b})}function x(e){r.go(e)}null==g&&(g=0,r.replaceState(o({},r.state,{idx:g}),""));var E={get action(){return w},get location(){return b},createHref:O,push:function e(t,o){var u=a.Push,i=k(t,o);if(S(u,i,(function(){e(t,o)}))){var c=A(i,g+1),s=c[0],l=c[1];try{r.pushState(s,"",l)}catch(e){n.location.assign(l)}j(u)}},replace:function e(t,n){var o=a.Replace,u=k(t,n);if(S(o,u,(function(){e(t,n)}))){var i=A(u,g),c=i[0],s=i[1];r.replaceState(c,"",s),j(o)}},go:x,back:function(){x(-1)},forward:function(){x(1)},listen:function(e){return m.push(e)},block:function(e){var t=P.push(e);return 1===P.length&&n.addEventListener(i,s),function(){t(),P.length||n.removeEventListener(i,s)}}};return E}(),w=v.push,y=v.replace;v.push=function(e,t){const n=(0,p.getQueryArgs)(window.location.href),r=(0,p.removeQueryArgs)(window.location.href,...Object.keys(n)),o=(0,p.addQueryArgs)(r,e);return w.call(v,o,t)},v.replace=function(e,t){const n=(0,p.getQueryArgs)(window.location.href),r=(0,p.removeQueryArgs)(window.location.href,...Object.keys(n)),o=(0,p.addQueryArgs)(r,e);return y.call(v,o,t)};const g=v,b=(0,r.createContext)(),m=(0,r.createContext)();function P(e){const t=new URLSearchParams(e.search);return{...e,params:Object.fromEntries(t.entries())}}const O=window.wp.privateApis,{lock:k,unlock:A}=(0,O.__dangerousOptInToUnstableAPIsOnlyForCoreModules)("I know using unstable features means my theme or plugin will inevitably break in the next version of WordPress.","@wordpress/router"),S={};k(S,{useHistory:function(){return(0,r.useContext)(m)},useLocation:function(){return(0,r.useContext)(b)},RouterProvider:function({children:e}){const[t,o]=(0,r.useState)((()=>P(g.location)));return(0,r.useEffect)((()=>g.listen((({location:e})=>{o(P(e))}))),[]),(0,n.createElement)(m.Provider,{value:g},(0,n.createElement)(b.Provider,{value:t},e))}}),(window.wp=window.wp||{}).router=t})();
\ No newline at end of file |