import { createRequire } from "node:module";
var __create = Object.create;
var __getProtoOf = Object.getPrototypeOf;
var __defProp = Object.defineProperty;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __toESM = (mod, isNodeMode, target) => {
  target = mod != null ? __create(__getProtoOf(mod)) : {};
  const to = isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
  for (let key of __getOwnPropNames(mod))
    if (!__hasOwnProp.call(to, key))
      __defProp(to, key, {
        get: () => mod[key],
        enumerable: true
      });
  return to;
};
var __commonJS = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
var __export = (target, all) => {
  for (var name in all)
    __defProp(target, name, {
      get: all[name],
      enumerable: true,
      configurable: true,
      set: (newValue) => all[name] = () => newValue
    });
};
var __esm = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
var __require = /* @__PURE__ */ createRequire(import.meta.url);

// ../constants/src/achievements.ts
var ACHIEVEMENT_IDS, ACHIEVEMENT_DEFINITIONS;
var init_achievements = __esm(() => {
  ACHIEVEMENT_IDS = {
    PLAY_ANY_GAME_DAILY: "play_any_game_daily",
    DAILY_CHEST_OPEN: "daily_chest_open",
    LEADERBOARD_TOP3_DAILY: "leaderboard_top3_daily",
    LEADERBOARD_TOP3_WEEKLY: "leaderboard_top3_weekly",
    FIRST_SCORE_ANY_GAME: "first_score_any_game",
    PERSONAL_BEST_ANY_GAME: "personal_best_any_game"
  };
  ACHIEVEMENT_DEFINITIONS = [
    {
      id: ACHIEVEMENT_IDS.PLAY_ANY_GAME_DAILY,
      title: "Play any game",
      description: "Play any arcade game for at least 60 seconds in a single session.",
      scope: "daily",
      rewardCredits: 10,
      limit: 1,
      completionType: "time_played_session",
      completionConfig: { minSeconds: 60 },
      target: { anyArcadeGame: true },
      active: true
    },
    {
      id: ACHIEVEMENT_IDS.DAILY_CHEST_OPEN,
      title: "Opened the daily chest",
      description: "Find the chest on the map and open it to claim your reward.",
      scope: "daily",
      rewardCredits: 10,
      limit: 1,
      completionType: "interaction",
      completionConfig: { triggerId: "bunny_chest" },
      target: { map: "arcade" },
      active: true
    },
    {
      id: ACHIEVEMENT_IDS.LEADERBOARD_TOP3_DAILY,
      title: "Daily Champion",
      description: "Finish in the top 3 of any game leaderboard for the day.",
      scope: "daily",
      rewardCredits: 25,
      limit: 1,
      completionType: "leaderboard_rank",
      completionConfig: {
        rankRewards: [50, 30, 15]
      },
      target: { anyArcadeGame: true },
      active: true
    },
    {
      id: ACHIEVEMENT_IDS.LEADERBOARD_TOP3_WEEKLY,
      title: "Weekly Legend",
      description: "Finish in the top 3 of any game leaderboard for the week.",
      scope: "weekly",
      rewardCredits: 50,
      limit: 1,
      completionType: "leaderboard_rank",
      completionConfig: {
        rankRewards: [100, 60, 30]
      },
      target: { anyArcadeGame: true },
      active: true
    },
    {
      id: ACHIEVEMENT_IDS.FIRST_SCORE_ANY_GAME,
      title: "First Score",
      description: "Submit your first score in any arcade game.",
      scope: "game",
      rewardCredits: 5,
      limit: 1,
      completionType: "first_score",
      completionConfig: {},
      target: { anyArcadeGame: true },
      active: true
    },
    {
      id: ACHIEVEMENT_IDS.PERSONAL_BEST_ANY_GAME,
      title: "Personal Best",
      description: "Beat your personal best score in any arcade game.",
      scope: "daily",
      rewardCredits: 5,
      limit: 3,
      completionType: "personal_best",
      completionConfig: {},
      target: { anyArcadeGame: true },
      active: true
    }
  ];
});

// ../constants/src/auth.ts
var AUTH_PROVIDER_IDS, DEMO_DISPLAY_NAME_PLACEHOLDER = "Demo Player";
var init_auth = __esm(() => {
  AUTH_PROVIDER_IDS = {
    TIMEBACK: "timeback",
    TIMEBACK_LTI: "timeback-lti"
  };
});

// ../constants/src/typescript.ts
var TypeScriptPackages, TYPESCRIPT_RUNNER;
var init_typescript = __esm(() => {
  TypeScriptPackages = {
    tsc: "tsc",
    nativePreview: "@typescript/native-preview",
    nativePreviewBeta: "@typescript/native-preview@beta"
  };
  TYPESCRIPT_RUNNER = {
    package: TypeScriptPackages.nativePreviewBeta,
    bin: "tsgo"
  };
});

// ../constants/src/character.ts
var ACCESSORY_SLOTS, VALID_SLOT_TYPES;
var init_character = __esm(() => {
  ACCESSORY_SLOTS = [
    { type: "head", unlockLevel: 1, displayName: "Head", maxItems: 1 },
    { type: "face", unlockLevel: 2, displayName: "Face", maxItems: 1 },
    { type: "hands", unlockLevel: 10, displayName: "Hands", maxItems: 1 },
    { type: "back", unlockLevel: 15, displayName: "Back", maxItems: 1 }
  ];
  VALID_SLOT_TYPES = ["head", "face", "hands", "back"];
});

// ../constants/src/domains.ts
var PLAYCADEMY_BASE_URLS, GAME_WORKER_DOMAINS;
var init_domains = __esm(() => {
  PLAYCADEMY_BASE_URLS = {
    production: "https://hub.playcademy.net",
    staging: "https://hub.dev.playcademy.net",
    local: "http://localhost:5174"
  };
  GAME_WORKER_DOMAINS = {
    production: "playcademy.gg",
    staging: "staging.playcademy.gg"
  };
});

// ../constants/src/env-vars.ts
var init_env_vars = () => {};

// ../constants/src/overworld.ts
var MAX_LEVEL = 100, ITEM_SLUGS, CURRENCIES, CURRENCY_SYMBOLS, BADGES, TOAST_DURATION, CORE_GAME_UUIDS;
var init_overworld = __esm(() => {
  ITEM_SLUGS = {
    PLAYCADEMY_CREDITS: "PLAYCADEMY_CREDITS",
    PLAYCADEMY_XP: "PLAYCADEMY_XP",
    FOUNDING_MEMBER_BADGE: "FOUNDING_MEMBER_BADGE",
    EARLY_ADOPTER_BADGE: "EARLY_ADOPTER_BADGE",
    FIRST_GAME_BADGE: "FIRST_GAME_BADGE",
    COMMON_SWORD: "COMMON_SWORD",
    SMALL_HEALTH_POTION: "SMALL_HEALTH_POTION",
    SMALL_BACKPACK: "SMALL_BACKPACK",
    LAVA_LAMP: "LAVA_LAMP",
    BOOMBOX: "BOOMBOX",
    CABIN_BED: "CABIN_BED"
  };
  CURRENCIES = {
    PRIMARY: ITEM_SLUGS.PLAYCADEMY_CREDITS,
    XP: ITEM_SLUGS.PLAYCADEMY_XP
  };
  CURRENCY_SYMBOLS = {
    PLAYCADEMY_CREDITS: "PC",
    PLAYCADEMY_XP: "XP",
    DEFAULT: "¤"
  };
  BADGES = {
    FOUNDING_MEMBER: ITEM_SLUGS.FOUNDING_MEMBER_BADGE,
    EARLY_ADOPTER: ITEM_SLUGS.EARLY_ADOPTER_BADGE,
    FIRST_GAME: ITEM_SLUGS.FIRST_GAME_BADGE
  };
  TOAST_DURATION = {
    SHORT: 3000,
    STANDARD: 5000,
    LONG: 8000,
    ERROR: 4000
  };
  CORE_GAME_UUIDS = {
    PLAYGROUND: "00000000-0000-0000-0000-000000000001",
    DEMO: "00000000-0000-0000-0000-000000000002"
  };
});

// ../constants/src/system.ts
var PLATFORM_TIMEZONE = "America/New_York";

// ../constants/src/timeback.ts
var TIMEBACK_ROUTES, TIMEBACK_ORG_SOURCED_ID = "PLAYCADEMY", TIMEBACK_ORG_NAME = "Playcademy Studios", TIMEBACK_ORG_TYPE = "department", TIMEBACK_COURSE_DEFAULTS, TIMEBACK_RESOURCE_DEFAULTS, TIMEBACK_COMPONENT_DEFAULTS, TIMEBACK_COMPONENT_RESOURCE_DEFAULTS;
var init_timeback = __esm(() => {
  TIMEBACK_ROUTES = {
    END_ACTIVITY: "/integrations/timeback/end-activity",
    GET_XP: "/integrations/timeback/xp",
    HEARTBEAT: "/integrations/timeback/heartbeat",
    ADVANCE_COURSE: "/integrations/timeback/advance-course"
  };
  TIMEBACK_COURSE_DEFAULTS = {
    gradingScheme: "STANDARD",
    level: {
      elementary: "Elementary",
      middle: "Middle",
      high: "High",
      ap: "AP"
    },
    goals: {
      dailyXp: 50,
      dailyLessons: 3
    },
    metrics: {
      totalXp: 1000,
      totalLessons: 50
    }
  };
  TIMEBACK_RESOURCE_DEFAULTS = {
    vendorId: "playcademy",
    roles: ["primary"],
    importance: "primary",
    metadata: {
      type: "interactive",
      toolProvider: "Playcademy",
      instructionalMethod: "exploratory",
      language: "en-US"
    }
  };
  TIMEBACK_COMPONENT_DEFAULTS = {
    sortOrder: 1,
    prerequisiteCriteria: "ALL"
  };
  TIMEBACK_COMPONENT_RESOURCE_DEFAULTS = {
    sortOrder: 1,
    lessonType: "quiz"
  };
});

// ../constants/src/workers.ts
var WORKER_NAMING, SECRETS_PREFIX = "secrets_", CLOUDFLARE_COMPATIBILITY_DATE = "2025-10-11";
var init_workers = __esm(() => {
  WORKER_NAMING = {
    STAGING_PREFIX: "staging-",
    STAGING_SUFFIX: "-staging",
    LOCAL_PREFIX: "local-"
  };
});

// ../constants/src/index.ts
var init_src = __esm(() => {
  init_achievements();
  init_auth();
  init_typescript();
  init_character();
  init_domains();
  init_env_vars();
  init_overworld();
  init_timeback();
  init_workers();
});

// src/constants/demo-users.ts
var now, DEMO_USER_IDS, DEMO_USERS, DEMO_USER;
var init_demo_users = __esm(() => {
  init_src();
  now = new Date;
  DEMO_USER_IDS = {
    player: "00000000-0000-0000-0000-000000000001",
    developer: "00000000-0000-0000-0000-000000000002",
    admin: "00000000-0000-0000-0000-000000000003",
    pendingDeveloper: "00000000-0000-0000-0000-000000000004",
    unverifiedPlayer: "00000000-0000-0000-0000-000000000005",
    anonymousPlayer: "00000000-0000-0000-0000-000000000006"
  };
  DEMO_USERS = {
    admin: {
      id: DEMO_USER_IDS.admin,
      name: "Admin User",
      username: "admin_user",
      email: "admin@playcademy.com",
      emailVerified: true,
      image: null,
      role: "admin",
      developerStatus: "approved",
      createdAt: now,
      updatedAt: now
    },
    player: {
      id: DEMO_USER_IDS.player,
      name: "Player User",
      username: "player_user",
      email: "player@playcademy.com",
      emailVerified: true,
      image: null,
      role: "player",
      developerStatus: "none",
      createdAt: now,
      updatedAt: now
    },
    developer: {
      id: DEMO_USER_IDS.developer,
      name: "Developer User",
      username: "developer_user",
      email: "developer@playcademy.com",
      emailVerified: true,
      image: null,
      role: "developer",
      developerStatus: "approved",
      createdAt: now,
      updatedAt: now
    },
    pendingDeveloper: {
      id: DEMO_USER_IDS.pendingDeveloper,
      name: "Pending Developer",
      username: "pending_dev",
      email: "pending@playcademy.com",
      emailVerified: true,
      image: null,
      role: "developer",
      developerStatus: "pending",
      createdAt: now,
      updatedAt: now
    },
    unverifiedPlayer: {
      id: DEMO_USER_IDS.unverifiedPlayer,
      name: "Unverified Player",
      username: "unverified_player",
      email: "unverified@playcademy.com",
      emailVerified: false,
      image: null,
      role: "player",
      developerStatus: "none",
      createdAt: now,
      updatedAt: now
    },
    anonymousPlayer: {
      id: DEMO_USER_IDS.anonymousPlayer,
      name: DEMO_DISPLAY_NAME_PLACEHOLDER,
      username: "anonymous_demo_player",
      email: "player@anon.demo.playcademy.gg",
      emailVerified: false,
      image: null,
      isAnonymous: true,
      role: "player",
      developerStatus: "none",
      createdAt: now,
      updatedAt: now
    }
  };
  DEMO_USER = DEMO_USERS.player;
});

// src/constants/demo-tokens.ts
var DEMO_TOKENS, SANDBOX_TOKENS, DEMO_TOKEN = "sandbox-demo-token", MOCK_GAME_ID = "mock-game-id-from-template";
var init_demo_tokens = __esm(() => {
  init_demo_users();
  DEMO_TOKENS = {
    "sandbox-demo-token": DEMO_USERS.player,
    "sandbox-admin-token": DEMO_USERS.admin,
    "sandbox-player-token": DEMO_USERS.player,
    "sandbox-anonymous-token": DEMO_USERS.anonymousPlayer,
    "sandbox-developer-token": DEMO_USERS.developer,
    "sandbox-pending-dev-token": DEMO_USERS.pendingDeveloper,
    "sandbox-unverified-token": DEMO_USERS.unverifiedPlayer,
    "mock-game-token-for-local-dev": DEMO_USERS.player,
    "sandbox-game-backend-token": DEMO_USERS.developer
  };
  SANDBOX_TOKENS = {
    player: "sandbox-player-token",
    anonymous: "sandbox-anonymous-token",
    developer: "sandbox-developer-token",
    admin: "sandbox-admin-token",
    pendingDeveloper: "sandbox-pending-dev-token",
    unverified: "sandbox-unverified-token"
  };
});

// src/constants/demo-items.ts
var DEMO_ITEM_IDS, PLAYCADEMY_CREDITS_ID, SAMPLE_ITEMS, SAMPLE_INVENTORY;
var init_demo_items = __esm(() => {
  init_demo_users();
  DEMO_ITEM_IDS = {
    playcademyCredits: "10000000-0000-0000-0000-000000000001",
    foundingMemberBadge: "10000000-0000-0000-0000-000000000002",
    earlyAdopterBadge: "10000000-0000-0000-0000-000000000003",
    firstGameBadge: "10000000-0000-0000-0000-000000000004",
    commonSword: "10000000-0000-0000-0000-000000000005",
    smallHealthPotion: "10000000-0000-0000-0000-000000000006",
    smallBackpack: "10000000-0000-0000-0000-000000000007"
  };
  PLAYCADEMY_CREDITS_ID = DEMO_ITEM_IDS.playcademyCredits;
  SAMPLE_ITEMS = [
    {
      id: PLAYCADEMY_CREDITS_ID,
      slug: "PLAYCADEMY_CREDITS",
      gameId: null,
      displayName: "PLAYCADEMY credits",
      description: "The main currency used across PLAYCADEMY.",
      type: "currency",
      isPlaceable: false,
      imageUrl: "http://playcademy-sandbox.local/playcademy-credit.png",
      metadata: {
        rarity: "common"
      }
    },
    {
      id: DEMO_ITEM_IDS.foundingMemberBadge,
      slug: "FOUNDING_MEMBER_BADGE",
      gameId: null,
      displayName: "Founding Member Badge",
      description: "Reserved for founding core team of the PLAYCADEMY platform.",
      type: "badge",
      isPlaceable: false,
      imageUrl: null,
      metadata: {
        rarity: "legendary"
      }
    },
    {
      id: DEMO_ITEM_IDS.earlyAdopterBadge,
      slug: "EARLY_ADOPTER_BADGE",
      gameId: null,
      displayName: "Early Adopter Badge",
      description: "Awarded to users who joined during the beta phase.",
      type: "badge",
      isPlaceable: false,
      imageUrl: null,
      metadata: {
        rarity: "epic"
      }
    },
    {
      id: DEMO_ITEM_IDS.firstGameBadge,
      slug: "FIRST_GAME_BADGE",
      gameId: null,
      displayName: "First Game Played",
      description: "Awarded for playing your first game in the Playcademy platform.",
      type: "badge",
      isPlaceable: false,
      imageUrl: "http://playcademy-sandbox.local/first-game-badge.png",
      metadata: {
        rarity: "uncommon"
      }
    },
    {
      id: DEMO_ITEM_IDS.commonSword,
      slug: "COMMON_SWORD",
      gameId: null,
      displayName: "Common Sword",
      description: "A basic sword, good for beginners.",
      type: "unlock",
      isPlaceable: false,
      imageUrl: "http://playcademy-sandbox.local/common-sword.png",
      metadata: undefined
    },
    {
      id: DEMO_ITEM_IDS.smallHealthPotion,
      slug: "SMALL_HEALTH_POTION",
      gameId: null,
      displayName: "Small Health Potion",
      description: "Restores a small amount of health.",
      type: "other",
      isPlaceable: false,
      imageUrl: "http://playcademy-sandbox.local/small-health-potion.png",
      metadata: undefined
    },
    {
      id: DEMO_ITEM_IDS.smallBackpack,
      slug: "SMALL_BACKPACK",
      gameId: null,
      displayName: "Small Backpack",
      description: "Increases your inventory capacity by 5 slots.",
      type: "upgrade",
      isPlaceable: false,
      imageUrl: "http://playcademy-sandbox.local/small-backpack.png",
      metadata: undefined
    }
  ];
  SAMPLE_INVENTORY = [
    {
      id: "20000000-0000-0000-0000-000000000001",
      userId: DEMO_USER.id,
      itemId: PLAYCADEMY_CREDITS_ID,
      quantity: 1000
    }
  ];
});

// src/constants/index.ts
var init_constants = __esm(() => {
  init_src();
  init_demo_users();
  init_demo_tokens();
  init_demo_items();
});
init_constants();

export {
  SANDBOX_TOKENS,
  SAMPLE_ITEMS,
  SAMPLE_INVENTORY,
  PLAYCADEMY_CREDITS_ID,
  MOCK_GAME_ID,
  DEMO_USER_IDS,
  DEMO_USERS,
  DEMO_USER,
  DEMO_TOKENS,
  DEMO_TOKEN,
  ACHIEVEMENT_IDS,
  ACHIEVEMENT_DEFINITIONS
};
