{"version":3,"file":"expo-document-picker.js","sourceRoot":"","sources":["../../../src/plugins/unversioned/expo-document-picker.ts"],"names":[],"mappings":";;;;;;;;;AAIA,wEAA0D;AAC1D,kDAAsD;AACtD,gDAAuD;AACvD,sDAAqD;AAErD,MAAM,WAAW,GAAG,sBAAsB,CAAC;AAE3C,MAAM,qBAAqB,GAA0C,CAAC,MAAM,EAAE,EAAE,WAAW,EAAE,EAAE,EAAE;IAC/F,OAAO,mCAAqB,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE;QAC5C,MAAM,CAAC,UAAU,GAAG,oBAAoB,CAAC,MAAM,EAAE,MAAM,CAAC,UAAU,EAAE,WAAW,CAAC,CAAC;QACjF,OAAO,MAAM,CAAC;IAChB,CAAC,CAAC,CAAC;AACL,CAAC,CAAC;AAEF,SAAS,oBAAoB,CAC3B,MAAkB,EAClB,iBAA6B,EAC7B,WAAmB;;IAEnB,UAAI,MAAM,CAAC,GAAG,0CAAE,iBAAiB,EAAE;QACjC,qDAAqD;QACrD,iBAAiB,CAAC,aAAa,CAC7B,uBAAuB,EACvB,wFAAwF;QACxF,0EAA0E;SAC3E,CAAC;KACH;IAED,OAAO,iBAAiB,CAAC;AAC3B,CAAC;AAED,MAAM,6BAA6B,GAAiB,kCAAmB,CAAC,MAAM,CAAC,EAAE;IAC/E,qCAAqC;IACrC,MAAM,GAAG,qBAAqB,CAAC,MAAM,EAAE,EAAE,WAAW,EAAE,wBAAwB,EAAE,CAAC,CAAC;IAClF,OAAO,MAAM,CAAC;AAChB,CAAC,EAAE,WAAW,CAAC,CAAC;AAEhB,MAAM,kBAAkB,GAAiB,MAAM,CAAC,EAAE;IAChD,OAAO,iCAAgB,CAAC,MAAM,EAAE;QAC9B,eAAe,EAAE,IAAI;QACrB,MAAM,EAAE,WAAW;QACnB,6DAA6D;QAC7D,QAAQ,EAAE,6BAA6B;KACxC,CAAC,CAAC;AACL,CAAC,CAAC;AAEF,kBAAe,kBAAkB,CAAC","sourcesContent":["import { ExpoConfig } from '@expo/config-types';\nimport { JSONObject } from '@expo/json-file';\n\nimport { ConfigPlugin } from '../../Plugin.types';\nimport * as WarningAggregator from '../../utils/warnings';\nimport { createRunOncePlugin } from '../core-plugins';\nimport { withEntitlementsPlist } from '../ios-plugins';\nimport { withStaticPlugin } from '../static-plugins';\n\nconst packageName = 'expo-document-picker';\n\nconst withICloudEntitlement: ConfigPlugin<{ appleTeamId: string }> = (config, { appleTeamId }) => {\n return withEntitlementsPlist(config, config => {\n config.modResults = setICloudEntitlement(config, config.modResults, appleTeamId);\n return config;\n });\n};\n\nfunction setICloudEntitlement(\n config: ExpoConfig,\n entitlementsPlist: JSONObject,\n appleTeamId: string\n): JSONObject {\n if (config.ios?.usesIcloudStorage) {\n // TODO: need access to the appleTeamId for this one!\n WarningAggregator.addWarningIOS(\n 'ios.usesIcloudStorage',\n 'Enable the iCloud Storage Entitlement from the Capabilities tab in your Xcode project.'\n // TODO: add a link to a docs page with more information on how to do this\n );\n }\n\n return entitlementsPlist;\n}\n\nconst withUnversionedDocumentPicker: ConfigPlugin = createRunOncePlugin(config => {\n // No mechanism to get Apple Team ID.\n config = withICloudEntitlement(config, { appleTeamId: 'TODO-GET-APPLE-TEAM-ID' });\n return config;\n}, packageName);\n\nconst withDocumentPicker: ConfigPlugin = config => {\n return withStaticPlugin(config, {\n _isLegacyPlugin: true,\n plugin: packageName,\n // If the static plugin isn't found, use the unversioned one.\n fallback: withUnversionedDocumentPicker,\n });\n};\n\nexport default withDocumentPicker;\n"]}