{
  "version": 3,
  "sources": ["../../../src/components/block-editor/viewport.js"],
  "sourcesContent": ["export const DEFAULT_DEVICE_TYPE = 'Desktop';\n\n/*\n * Lowercase in the URL, PascalCase in the editor store. Duplicated in\n * packages/boot/src/components/canvas/viewport.ts, in the editor's\n * preview-dropdown choices, and in the block editor's block-visibility\n * constants. Update all four when adding a viewport type.\n */\nconst VALID_VIEWPORTS = [ 'desktop', 'tablet', 'mobile' ];\n\n/**\n * Whether a viewport is one an entity can be asked to be edited at.\n *\n * @param {string} [viewport] Viewport, as written in the URL.\n * @return {boolean} Whether the editor has a width for it.\n */\nexport function isValidViewport( viewport ) {\n\treturn !! viewport && VALID_VIEWPORTS.includes( viewport.toLowerCase() );\n}\n\n/**\n * The device type a `viewport` query param names.\n *\n * @param {string} [viewport] Viewport, as written in the URL.\n * @return {string} Device type, Desktop for a viewport the editor has no width for.\n */\nexport function getDeviceType( viewport ) {\n\tif ( ! isValidViewport( viewport ) ) {\n\t\treturn DEFAULT_DEVICE_TYPE;\n\t}\n\n\tconst value = viewport.toLowerCase();\n\treturn value.charAt( 0 ).toUpperCase() + value.slice( 1 );\n}\n"],
  "mappings": ";AAAO,IAAM,sBAAsB;AAQnC,IAAM,kBAAkB,CAAE,WAAW,UAAU,QAAS;AAQjD,SAAS,gBAAiB,UAAW;AAC3C,SAAO,CAAC,CAAE,YAAY,gBAAgB,SAAU,SAAS,YAAY,CAAE;AACxE;AAQO,SAAS,cAAe,UAAW;AACzC,MAAK,CAAE,gBAAiB,QAAS,GAAI;AACpC,WAAO;AAAA,EACR;AAEA,QAAM,QAAQ,SAAS,YAAY;AACnC,SAAO,MAAM,OAAQ,CAAE,EAAE,YAAY,IAAI,MAAM,MAAO,CAAE;AACzD;",
  "names": []
}
