{
  "version": 3,
  "sources": ["../src/if-viewport-matches.js"],
  "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport {\n\tifCondition,\n\tcompose,\n\tcreateHigherOrderComponent,\n} from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport withViewportMatch from './with-viewport-match';\n\n/**\n * Higher-order component creator, creating a new component which renders if\n * the viewport query is satisfied.\n *\n * @see withViewportMatches\n *\n * @param {string} query Viewport query.\n *\n * @example\n *\n * ```jsx\n * function MyMobileComponent() {\n * \treturn <div>I'm only rendered on mobile viewports!</div>;\n * }\n *\n * MyMobileComponent = ifViewportMatches( '< small' )( MyMobileComponent );\n * ```\n *\n * @return {Function} Higher-order component.\n */\nconst ifViewportMatches = ( query ) =>\n\tcreateHigherOrderComponent(\n\t\tcompose( [\n\t\t\twithViewportMatch( {\n\t\t\t\tisViewportMatch: query,\n\t\t\t} ),\n\t\t\tifCondition( ( props ) => props.isViewportMatch ),\n\t\t] ),\n\t\t'ifViewportMatches'\n\t);\n\nexport default ifViewportMatches;\n"],
  "mappings": ";AAGA;AAAA,EACC;AAAA,EACA;AAAA,EACA;AAAA,OACM;AAKP,OAAO,uBAAuB;AAsB9B,IAAM,oBAAoB,CAAE,UAC3B;AAAA,EACC,QAAS;AAAA,IACR,kBAAmB;AAAA,MAClB,iBAAiB;AAAA,IAClB,CAAE;AAAA,IACF,YAAa,CAAE,UAAW,MAAM,eAAgB;AAAA,EACjD,CAAE;AAAA,EACF;AACD;AAED,IAAO,8BAAQ;",
  "names": []
}
