{
  "version": 3,
  "sources": ["../../../src/utils/media-finalize/index.js"],
  "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport apiFetch from '@wordpress/api-fetch';\nimport { transformAttachment } from '@wordpress/media-utils';\n\nexport default async function mediaFinalize( id, subSizes = [] ) {\n\tconst response = await apiFetch( {\n\t\tpath: `/wp/v2/media/${ id }/finalize`,\n\t\tmethod: 'POST',\n\t\tdata: { sub_sizes: subSizes },\n\t} );\n\n\t// Returning the post-finalize attachment lets callers refresh the block\n\t// URL (via onChange) so it points at the scaled file and srcset matches.\n\treturn response ? transformAttachment( response ) : undefined;\n}\n"],
  "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,uBAAqB;AACrB,yBAAoC;AAEpC,eAAO,cAAsC,IAAI,WAAW,CAAC,GAAI;AAChE,QAAM,WAAW,UAAM,iBAAAA,SAAU;AAAA,IAChC,MAAM,gBAAiB,EAAG;AAAA,IAC1B,QAAQ;AAAA,IACR,MAAM,EAAE,WAAW,SAAS;AAAA,EAC7B,CAAE;AAIF,SAAO,eAAW,wCAAqB,QAAS,IAAI;AACrD;",
  "names": ["apiFetch"]
}
