Files
2026-07-28 01:06:53 +03:00

102 lines
5.1 KiB
TypeScript

/* Metro module 6868; source: modules/spotify/SpotifyConstants.tsx; dependencies: [661, 4915, 477, 2] */
import Platforms from '../../lib/Platforms.tsx'; /* Metro dependency 4915 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../../Constants.tsx'; /* Metro dependency 661 */
function _fun54357(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#54357, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7046:6, offset: 0x01363a5c, size: 692 bytes, params: 8, frame: 27
let Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const PlatformTypes = (ConstantsModule).PlatformTypes;
let value = Platforms;
const get = value.get;
const SPOTIFY = PlatformTypes.SPOTIFY;
const name = Reflect.apply(get, value, [SPOTIFY]).name;
const closure = function(a0) {
return '?utm_source=discord&utm_medium=' + a0;
};
Object = global.Object;
const freeze = Object.freeze;
const object2 = {};
object2.PROFILE = '' + 'https://api.spotify.com/v1' + '/me';
object2.NOTIFICATIONS_PLAYER = '' + 'https://api.spotify.com/v1' + '/me/notifications/player';
object2.PLAYER = '' + 'https://api.spotify.com/v1' + '/me/player';
object2.PLAYER_DEVICES = '' + 'https://api.spotify.com/v1' + '/me/player/devices';
object2.PLAYER_PLAY = '' + 'https://api.spotify.com/v1' + '/me/player/play';
object2.PLAYER_PAUSE = '' + 'https://api.spotify.com/v1' + '/me/player/pause';
object2.PLAYER_REPEAT = '' + 'https://api.spotify.com/v1' + '/me/player/repeat';
object2.WEB_OPEN = function(a0, a1) {
var value = a2;
return 'https://open.spotify.com/' + (0, global.encodeURIComponent)(a0) + '/' + (0,
global.encodeURIComponent)(a1) + spotifyUtmParams(value !== undefined ? value : 'desktop');
};
object2.EMBED = EMBED;
object2.PLAYER_OPEN = function(a0, a1) {
var r1;
var r7;
var value = a2;
var value2 = a3;
r1 = !(value !== undefined) || value;
r7 = value2 !== undefined ? value2 : 'desktop';
value = (0, global.encodeURIComponent)(a0);
var value3 = (0, global.encodeURIComponent)(a1);
var value4 = '';
return value4 + 'spotify' + ':' + value + ':' + value3 + (r1 ? spotifyUtmParams(r7) : value4);
};
object2.PREMIUM_SITE = 'https://www.spotify.com/premium/' + closure('desktop');
object2.INSTALL_ATTRIBUTION = function(a0) {
return 'https://app.adjust.com/bdyga9?campaign=' + a0;
};
value = require(477) /* metro dependency 477: PlatformUtils */;
value = value.isAndroid();
let value2 = 'https://itunes.apple.com/us/app/spotify-music/id324684580?mt=8';
object2.APP_STORE = value ? 'https://play.google.com/store/apps/details?id=com.spotify.music&hl=en_US&gl=US' : value2;
object2.IOS_APP_STORE = value2;
value = Reflect.apply(freeze, Object, [object2]);
(FileImportTrackerModule).fileFinishedImporting('modules/spotify/SpotifyConstants.tsx');
exports.SPOTIFY_APP_PROTOCOL = 'spotify';
exports.SPOTIFY_PARTY_PREFIX = 'spotify:';
exports.SPOTIFY_PLATFORM_NAME = name;
exports.isSpotifyParty = function(a0) {
return a0 != null && a0.startsWith('spotify:');
};
exports.SpotifyResourceTypes = {TRACK: 'track', ARTIST: 'artist', ALBUM: 'album', PLAYLIST: 'playlist',
EPISODE: 'episode', SHOW: 'show'};
exports.SpotifyActionTypes = {USER_ACTIVITY_PLAY: 'user_activity_play', USER_ACTIVITY_SYNC: 'user_activity_sync',
EMBED_SYNC: 'embed_sync'};
exports.SPOTIFY_HOSTNAMES = ['open.spotify.com', 'www.spotify.com'];
exports.SpotifyEndpoints = value;
exports.getSpotifyResourceType = getSpotifyResourceType;
function EMBED(a0) { // fn#54360, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7046:932, offset: 0x01363d82, size: 55 bytes, params: 2, frame: 13
let value = a1;
value = spotifyUtmParams(value !== undefined ? value : 'desktop');
return 'https://open.spotify.com/embed' + a0 + value;
}
function getSpotifyResourceType(a0) { // fn#54364, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7046:1908, offset: 0x01363e6a, size: 170 bytes, params: 2, frame: 3
if (typeof a0 === 'string') {
if (a0 === 'track') {
return env0_0.TRACK;
}
if (a0 === 'artist') {
return env0_0.ARTIST;
}
if (a0 === 'album') {
return env0_0.ALBUM;
}
if (a0 === 'playlist') {
return env0_0.PLAYLIST;
}
if (a0 === 'episode') {
return env0_0.EPISODE;
}
if (a0 === 'show') {
return env0_0.SHOW;
}
}
return null;
}
}
global.__d(_fun54357, 6868, [661, 4915, 477, 2]) /* metro module 6868, dependencies: [661, 4915, 477, 2] */;