WordPress/wp-includes/js/dist/viewport.min.js
Peter Wilson abde9678b4 Build tools: Use hashed module IDs for minified files.
Further improves webpack configuration for editor files to use hashed module IDs in the compressed (`*.min.js`) production files.

Follow up to [50940].

Props gziolo, peterwilsoncc.
Fixes #53192.


Built from https://develop.svn.wordpress.org/trunk@51035


git-svn-id: http://core.svn.wordpress.org/trunk@50644 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-27 00:17:06 +00:00

2 lines
3.0 KiB
JavaScript

/*! This file is auto-generated */
this.wp=this.wp||{},this.wp.viewport=function(t){var e={};function r(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)r.d(n,o,function(e){return t[e]}.bind(null,o));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s="PR0u")}({"1ZqX":function(t,e){t.exports=window.wp.data},GRId:function(t,e){t.exports=window.wp.element},K9lf:function(t,e){t.exports=window.wp.compose},PR0u:function(t,e,r){"use strict";r.r(e),r.d(e,"store",(function(){return p})),r.d(e,"ifViewportMatches",(function(){return h})),r.d(e,"withViewportMatch",(function(){return b}));var n={};r.r(n),r.d(n,"setIsMatching",(function(){return a}));var o={};r.r(o),r.d(o,"isViewportMatch",(function(){return s}));var i=r("YLtl"),c=r("1ZqX");var u=function(t={},e){switch(e.type){case"SET_IS_MATCHING":return e.values}return t};function a(t){return{type:"SET_IS_MATCHING",values:t}}function s(t,e){return-1===e.indexOf(" ")&&(e=">= "+e),!!t[e]}const p=Object(c.createReduxStore)("core/viewport",{reducer:u,actions:n,selectors:o});Object(c.register)(p);var d=(t,e)=>{const r=Object(i.debounce)(()=>{const t=Object(i.mapValues)(n,t=>t.matches);Object(c.dispatch)(p).setIsMatching(t)},{leading:!0}),n=Object(i.reduce)(t,(t,n,o)=>(Object(i.forEach)(e,(e,i)=>{const c=window.matchMedia(`(${e}: ${n}px)`);c.addListener(r);const u=[i,o].join(" ");t[u]=c}),t),{});window.addEventListener("orientationchange",r),r(),r.flush()},f=r("K9lf"),l=r("wx14"),w=r("GRId");var b=t=>Object(f.createHigherOrderComponent)(e=>Object(f.pure)(r=>{const n=Object(i.mapValues)(t,t=>{let[e,r]=t.split(" ");return void 0===r&&(r=e,e=">="),Object(f.useViewportMatch)(r,e)});return Object(w.createElement)(e,Object(l.a)({},r,n))}),"withViewportMatch");var h=t=>Object(f.createHigherOrderComponent)(Object(f.compose)([b({isViewportMatch:t}),Object(f.ifCondition)(t=>t.isViewportMatch)]),"ifViewportMatches");d({huge:1440,wide:1280,large:960,medium:782,small:600,mobile:480},{"<":"max-width",">=":"min-width"})},YLtl:function(t,e){t.exports=window.lodash},wx14:function(t,e,r){"use strict";function n(){return(n=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t}).apply(this,arguments)}r.d(e,"a",(function(){return n}))}});