import { S as dt, b as ht, s as ke, f as $, d as vt, n as Re, e as k, x as be, g as B, p as r, l as p, h as C, m as c, w as wt, o as bt, r as et, E as j, N as me, G as tt, y as At, z as it, q as ce, F as z, j as De, C as We, D as Le, A as yt, B as st, k as u, L as Be, M as nt, t as Ce, i as Ie, I as kt, J as Bt, K as Ct, c as Mt } from "./CasinoGameOverlay-BPPzj3qo.js";
import { f as Rt, a as Me } from "./LotteryProgramWof-CfqijiFp.js";
import { $ as Te, a as Ht, b as Qt, i as Tt, c as zt } from "./CasinoMysteryChestContainer-BLcBHE6I.js";
import "../stencil/ui-skeleton-W50o8tfg.js";
const je = {
  en: {
    NoContent: "You don't have any lottery programs available now.",
    NoNext: `You don't have any spins available. Please check <a href="javascript:void(0)">Terms and Conditions</a>`,
    NoHistories: "No histories",
    Program: "Program",
    History: "History",
    ActiveTickets: "Active Tickets",
    ImplicitTickets: "Implicit Tickets",
    RemainingTimes: "Remaining Times",
    Retry: "Network is a bit busy now, please click OK to re-spin",
    ShowNext: "{name} will be available on<br /> <strong>{startTime}</strong> <br />Please wait till it is open.",
    DrawFailed: "The prize assignment may be failed, please contact customer support for more details",
    Timeout: "Network is a bit busy now, please try again later.",
    ErrorNetwork: "You are offline, please check your network settings",
    ErrorJSON: "Unexpected Data Response, please contact customer support",
    Congratulation: "Congratulations!",
    Continue: "Continue",
    NoPrizeTitle: "Not This Time!",
    NoPrize: "Don't Worry! Your turn might come next. Try Again!",
    Success: "You won a {prize}!",
    OK: "OK",
    Rewards: "Rewards",
    Status: "Status",
    Time: "Time",
    Loss: "OOPs! You are close to a prize!",
    Fulfilled: "Successful",
    Drawn: "Failed",
    Rules: "Rules",
    LuckyWheels: "Lucky Wheels",
    InfoTooltip: "Luckywheel tooltips",
    RulesDescription: "Lucky Wheel is a particularly interesting game, will bring you a lot of surprises; When you obtained the Lucky Wheel, means you got a chance to spin the Lucky Wheel, and if you are lucky, you can get the surprise prize.",
    Terms: "Terms&Conditions",
    PrizeAgenda: "Prize agenda",
    TournamentTicket: "Tournament ticket",
    FreeSpins: "Free spins",
    BonusMoney: "Bonus Money",
    LoyaltyPoints: "Loyalty Points&Coins",
    LuckyWheel: "LuckyWheel",
    CoinRoyale: "Coin Royale",
    MysteryChest: "Mystery Chest",
    CustomRewards: "Custom Rewards",
    Play: "Play",
    Spin: "Spin",
    FlipCoin: "Flip Coin",
    OpenChest: "Open Chest",
    AvailablePeriod: "Available Period",
    Recurrence: "Recurrence",
    TopRewards: "Top Rewards",
    AreYouSure: "Are you sure",
    RejectWarningText: "Once rejected, this prize will be lost<br/>and cannot be recovered.<br/>Please confirm your decision",
    KeepPrize: "No, I want to keep prize",
    RejectPrize: "Yes, I reject prize",
    Accept: "Accept",
    Reject: "Reject",
    RewardIssued: "Your reward has issued successfully",
    BackToGame: "Back to Game",
    Spins: "Spins",
    Every: "every",
    Minute: "minute",
    Minutes: "minutes",
    Day: "day",
    Days: "days",
    Week: "week",
    Weeks: "weeks",
    Month: "month",
    Months: "months",
    InThisPeriod: "in this period",
    From: "from",
    To: "to",
    EveryWeek: "every week",
    EachMonth: "of each month",
    Monday: "Monday",
    Tuesday: "Tuesday",
    Wednesday: "Wednesday",
    Thursday: "Thursday",
    Friday: "Friday",
    Saturday: "Saturday",
    Sunday: "Sunday"
  }
};
function Dt({ withLocale: A, translations: e }) {
  Te.subscribe((t) => {
    t == null && (Qt.set(e), Te.set(A));
  });
}
function ze(A, e) {
  Ht(A, e);
}
function Wt(A) {
  Te.set(A);
}
const Lt = () => {
  Dt({ withLocale: "en", translations: {} }), Object.keys(je).forEach((A) => {
    ze(A, je[A]);
  });
};
if (typeof window < "u") {
  let A = function(e) {
    return function(...t) {
      try {
        return e.apply(this, t);
      } catch (i) {
        if (i instanceof DOMException && i.message.includes("has already been used with this registry") || i.message.includes("Cannot define multiple custom elements with the same tag name"))
          return !1;
        throw i;
      }
    };
  };
  customElements.define = A(customElements.define), import("./PrizeEngineChest-iVOVTyhL.js").then(({ default: e }) => {
    !customElements.get("prize-engine-chest") && customElements.define("prize-engine-chest", e.element);
  });
}
if (typeof window < "u") {
  let A = function(e) {
    return function(...t) {
      try {
        return e.apply(this, t);
      } catch (i) {
        if (i instanceof DOMException && i.message.includes("has already been used with this registry") || i.message.includes("Cannot define multiple custom elements with the same tag name"))
          return !1;
        throw i;
      }
    };
  };
  customElements.define = A(customElements.define), import("./PrizeEngineCoin-C1ybd5zt.js").then(({ default: e }) => {
    !customElements.get("prize-engine-coin") && customElements.define("prize-engine-coin", e.element);
  });
}
if (typeof window < "u") {
  let A = function(e) {
    return function(...t) {
      try {
        return e.apply(this, t);
      } catch (i) {
        if (i instanceof DOMException && i.message.includes("has already been used with this registry") || i.message.includes("Cannot define multiple custom elements with the same tag name"))
          return !1;
        throw i;
      }
    };
  };
  customElements.define = A(customElements.define), import("./PrizeEngineLuckywheel-CpsgX8J1.js").then(({ default: e }) => {
    !customElements.get("prize-engine-luckywheel") && customElements.define("prize-engine-luckywheel", e.element);
  });
}
const Pt = "data:image/webp;base64, ", It = "data:image/webp;base64, ", jt = "data:image/webp;base64, ", xt = "data:image/webp;base64, ", Xt = "data:image/webp;base64, ", Zt = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAACXBIWXMAABCcAAAQnAEmzTo0AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAMVSURBVHgBbVTNThNRGD3fnSmYYNLizhVl4ZriC9AhcUFcWDYmbsQuiCsT0aioJJRogrJhacJC0MSwMsALMIUHsDQxYSeDCVspiWA7befz3Jm2AnGSm7k/3+85517Bf75F9fMOoikXjTzHkIO6OAgrnFcdNLaK8mjzso+cX5S0kk2h9ZHGeUNnOtY4MlzDRVjjP801DBpBG83xorwMur6mO3ml33MCqSg0r4h2Beo9kduDCtDYHDyUKc5lPAI+03z4CvTbFy3lLgSa1f2sC9dngWk6HjbQLjyTW+VOyb2qp2W6LGg95rRGu0EX2F7X2WwvkEG/z0oyHCesJNuHlF9SP2PPNA6hcbBVXeWeTQh7FgiiwRS344Sv9ehOhMami+aag7MZ/n3iMGLQrKZw4hloxUFTB3B2k7j4BD5HvPZa+O0NoL1BEsYitMdNC1qQOLP5VJLRWgunHtdVZssp+ivEbYhVDocwv2hGTEzQguMVpVSL+WExKeh9kxxK7a3ciDEpicdgraLGTant3zoEBHm30+NQF7O78mbHQI6ZKC/P9UjdmN7mgYM/pDxU0svew7QgXHgqEwvW6YOuUhoh2w6HDMJD6+PEo06iQvp3ACXl5p+4RJN9rXaDGBjLKiuUAIh6NCQfhcGKWEkzvSjZa93t97pbYFYC2ThwUd/heYGZM8wcOEiNFqVY69p+1RfHBDww7K9saZzT/XxH3ZkIMt+xGya4U8yYkViYFrNTf1WXY2ms6xx9lNqTPWPgrHFCEJ15G4RZfbY2wsL3BIaB9CfPgz7oKH33OEZctBmsxKsjUzxjDnfLLMp1Iq87QDtPx4plMSI2Z6R4RiaCJAlg23HQ5zFwlUlyV5D6Qck8YNJgUpY2Y4BTkCI3KHvN8n8c4qpnZYCeqhPwE2xangWccA/y7JgBvN4VKclwYBKD+A7143R5SbfHOhxq94qs6Ar33A3ECVFjB+OT8i5ImD73LfIZiXgNqKMsWeo+HZlEJ3XOwzTX9nkpU3fFe+eekQuBLtFfsHeOziNO/DaRYkqB/zU+bOXLPn8BG6xnv5+RMCQAAAAASUVORK5CYII=";
function Nt(A) {
  vt(A, "svelte-1m851ap", `:host{display:block;height:100%;width:100%;flex-grow:1}.PrizeDetailsContent.svelte-1m851ap.svelte-1m851ap{width:100%;height:100%;display:flex;flex-direction:column;position:relative;overflow:hidden;font-family:var(--emw--font-family-primary, "Ubuntu", sans-serif);background:transparent}.ViewLayer.svelte-1m851ap.svelte-1m851ap{width:100%;height:100%;display:flex;flex-direction:column;background:transparent}.ViewLayer.hidden.svelte-1m851ap.svelte-1m851ap{visibility:hidden}.GameLayer.svelte-1m851ap.svelte-1m851ap{position:relative;z-index:1;padding:40px 80px;box-sizing:border-box}.GameLayer.Mobile.svelte-1m851ap.svelte-1m851ap{padding:0}.GameLayer.Mobile.svelte-1m851ap .Header.svelte-1m851ap{height:auto;padding:32px 36px}.GameLayer.Mobile.svelte-1m851ap .HeaderTitle.svelte-1m851ap{font-size:var(--emw--font-size-medium, 16px);font-weight:500;line-height:1}.GameLayer.Mobile.svelte-1m851ap .IconButton.svelte-1m851ap{width:24px;height:24px}.GameLayer.Mobile.svelte-1m851ap .GameComponentContainer.svelte-1m851ap{height:370px;flex-grow:0;padding-top:20px}.GameLayer.Mobile.svelte-1m851ap .InfoSection.svelte-1m851ap{height:196px;flex-grow:0;margin:0;padding:20px 0;justify-content:flex-start;box-sizing:border-box;gap:12px}.GameLayer.Mobile.svelte-1m851ap .ActionButton.svelte-1m851ap{width:170px;height:48px;font-size:16px;box-shadow:0px 8px 12px 6px rgba(0, 0, 0, 0.15), 0px 4px 4px 0px rgba(0, 0, 0, 0.3);gap:4px;margin-bottom:8px}.GameLayer.Mobile.svelte-1m851ap .ActionButton .ButtonBase.svelte-1m851ap{text-transform:capitalize}.GameLayer.Mobile.svelte-1m851ap .ActionButton .ButtonCross.svelte-1m851ap{font-size:12px}.GameLayer.Mobile.svelte-1m851ap .ActionButton .ButtonCount.svelte-1m851ap{font-size:14px}.GameLayer.Mobile.svelte-1m851ap .InfoItem.svelte-1m851ap{font-size:12px;color:#a9ccbd;gap:4px;margin-bottom:12px}.GameLayer.Mobile.svelte-1m851ap .RulesToggle.svelte-1m851ap{position:relative;bottom:auto;left:auto;transform:none;opacity:0.5;font-size:12px;padding:8px;margin-top:auto}.RulesLayer.svelte-1m851ap.svelte-1m851ap{position:absolute;inset:0;z-index:100;padding:40px 80px;box-sizing:border-box;display:flex;flex-direction:column}.RulesLayer.Mobile.svelte-1m851ap.svelte-1m851ap{padding:20px 28px}.RulesLayer.Mobile.svelte-1m851ap .Header.svelte-1m851ap{padding:12px 8px 24px}.RulesLayer.Mobile.svelte-1m851ap .IconButton.svelte-1m851ap{width:24px;height:24px}.RulesLayer.svelte-1m851ap .HeaderPlaceholder.svelte-1m851ap{width:30px}.MessageLayer.svelte-1m851ap.svelte-1m851ap{position:absolute;inset:0;z-index:100;background:var(--emw--color-gray-transparency-30, rgba(13, 27, 29, 0.92))}.LayerContent.svelte-1m851ap.svelte-1m851ap{flex-grow:1;overflow-y:auto;display:flex;flex-direction:column;padding:0 24px}.LayerContent.Center.svelte-1m851ap.svelte-1m851ap{justify-content:center;align-items:center;text-align:center}.Header.svelte-1m851ap.svelte-1m851ap{display:flex;justify-content:space-between;align-items:center;padding:12px 8px 24px;flex-shrink:0;position:relative}.Header.svelte-1m851ap .HeaderTitle.svelte-1m851ap{color:var(--emw--color-primary, #d3ffed);font-size:var(--emw--font-size-large, 22px);font-weight:700;text-align:center;flex-grow:1}.ViewWrapper.svelte-1m851ap.svelte-1m851ap{flex-grow:1;display:flex;flex-direction:column;overflow:hidden}.GameComponentContainer.svelte-1m851ap.svelte-1m851ap{flex-grow:1;display:flex;flex-direction:column;min-height:0;justify-content:center;align-items:center}.InfoSection.svelte-1m851ap.svelte-1m851ap{display:flex;flex-direction:column;align-items:center;gap:16px;margin-top:16px;margin-bottom:48px;flex-shrink:0}.InfoItem.svelte-1m851ap.svelte-1m851ap{display:flex;align-items:center;gap:8px;color:var(--emw--color-primary, #d3ffed);font-size:var(--emw--font-size-medium, 16px)}.SmallIcon.svelte-1m851ap.svelte-1m851ap{width:20px;height:20px;background-size:contain;background-repeat:no-repeat;background-position:center;display:flex;align-items:center;justify-content:center;color:var(--emw--color-secondary-variant, #729787)}.IconButton.svelte-1m851ap.svelte-1m851ap{width:30px;height:30px;border:0;cursor:pointer;background-color:transparent;background-size:100%;background-repeat:no-repeat;padding:0}.IconButton.Back.svelte-1m851ap.svelte-1m851ap{background:center/100% url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none"><path d="M10.3579 5.26604C10.0032 4.91132 9.42806 4.91132 9.07334 5.26604L5.26604 9.07334C4.91132 9.42806 4.91132 10.0032 5.26604 10.3579L9.07334 14.1652C9.42806 14.5199 10.0032 14.5199 10.3579 14.1652C10.7126 13.8105 10.7126 13.2354 10.3579 12.8806L8.10118 10.6239H10.7817C12.0761 10.6239 12.9922 10.6246 13.7085 10.6832C14.4142 10.7408 14.8455 10.85 15.1847 11.0229C15.8735 11.3738 16.4335 11.9338 16.7844 12.6226C16.9573 12.9618 17.0665 13.3931 17.1241 14.0989C17.1827 14.8151 17.1834 15.7312 17.1834 17.0256V18.0917C17.1834 18.5933 17.59 19 18.0917 19C18.5933 19 19 18.5933 19 18.0917V16.9854C19 15.74 19 14.7498 18.9347 13.9509C18.8679 13.1329 18.7281 12.4359 18.403 11.7978C17.8779 10.7673 17.04 9.92938 16.0095 9.40427C15.3714 9.07918 14.6744 8.9394 13.8564 8.87257C13.0575 8.80729 12.0673 8.8073 10.8219 8.8073H8.10118L10.3579 6.55059C10.7126 6.19587 10.7126 5.62076 10.3579 5.26604Z" fill="%23729787"/></svg>') no-repeat}.IconButton.Close.svelte-1m851ap.svelte-1m851ap{background-image:url('data:image/svg+xml,<svg width="24" height="24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M18 6 6 18M6 6l12 12" stroke="%23729787" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>')}.GameDescription.svelte-1m851ap.svelte-1m851ap{margin-bottom:32px;font-size:var(--emw--font-size-small, 14px);color:var(--emw--color-primary-variant, #a9ccbe);line-height:1.6}.TermsLink.svelte-1m851ap.svelte-1m851ap{display:inline-flex;align-items:center;gap:6px;background:linear-gradient(90deg, var(--emw--color-teal, #75ffe9) 0%, var(--emw--color-green, #b2ff6d) 100%);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent;text-decoration:none;font-weight:700;margin-bottom:32px}.TermsLink.svelte-1m851ap .ExternalIcon.svelte-1m851ap{width:16px;height:16px;background:center/contain no-repeat url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none"><path d="M18 13V19C18 19.5304 17.7893 20.0391 17.4142 20.4142C17.0391 20.7893 16.5304 21 16 21H5C4.46957 21 3.96086 20.7893 3.58579 20.4142C3.21071 20.0391 3 19.5304 3 19V8C3 7.46957 3.21071 6.96086 3.58579 6.58579C3.96086 6.21071 4.46957 6 5 6H11M15 3H21M21 3V9M21 3L10 13" stroke="%2375FFE9" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>')}.DetailsGrid.svelte-1m851ap.svelte-1m851ap{display:flex;flex-direction:column;gap:32px}.DetailItem.svelte-1m851ap.svelte-1m851ap{display:flex;gap:12px;align-items:flex-start}.DetailItem.svelte-1m851ap .Icon.svelte-1m851ap{width:20px;height:20px;flex-shrink:0}.DetailItem.svelte-1m851ap .Icon.History.svelte-1m851ap{background:center/contain no-repeat url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none"><path d="M12 8V12L15 14M21 12C21 16.9706 16.9706 21 12 21C7.02944 21 3 16.9706 3 12C3 7.02944 7.02944 3 12 3C16.9706 3 21 7.02944 21 12Z" stroke="%23ffffff" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>')}.DetailItem.svelte-1m851ap .Icon.Cup.svelte-1m851ap{background:center/contain no-repeat url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none"><path d="M6 9H4.5C3.67157 9 3 8.32843 3 7.5V6.5C3 5.67157 3.67157 5 4.5 5H6M18 9H19.5C20.3284 9 21 8.32843 21 7.5V6.5C21 5.67157 20.3284 5 19.5 5H18M18 22H6M12 15V22M18 5V12C18 15.3137 15.3137 18 12 18C8.68629 18 6 15.3137 6 12V5H18Z" stroke="%23ffffff" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>')}.DetailItem.svelte-1m851ap .DetailText strong.svelte-1m851ap{color:var(--emw--color-white, #ffffff);font-weight:700;font-size:var(--emw--font-size-small-plus, 15px);display:block;margin-bottom:4px}.DetailItem.svelte-1m851ap .DetailText span.svelte-1m851ap{color:var(--emw--color-secondary-variant, #a9ccbe);line-height:1.5}.RewardList.svelte-1m851ap.svelte-1m851ap{display:flex;flex-wrap:wrap;gap:8px;margin-top:8px}.RewardItem.svelte-1m851ap.svelte-1m851ap{color:var(--emw--color-secondary-variant, #a9ccbe)}.RewardItem.svelte-1m851ap .RewardIcon.svelte-1m851ap{width:24px;height:24px;object-fit:contain}.ImageWrapper.svelte-1m851ap.svelte-1m851ap{position:relative;display:flex;justify-content:center;align-items:center;width:100px;height:100px;margin-bottom:24px}.ImageWrapper.svelte-1m851ap.svelte-1m851ap::before{content:"";position:absolute;width:160px;height:160px;background:radial-gradient(circle, var(--emw--color-teal-10, rgba(117, 255, 233, 0.1019607843)) 0%, transparent 50%);border-radius:50%;z-index:0;filter:blur(10px)}.ImageWrapper.svelte-1m851ap .GiftImage.svelte-1m851ap{height:100px;object-fit:contain;position:relative;z-index:1}.ViewDataContainer.svelte-1m851ap.svelte-1m851ap{display:grid;width:100%;min-height:200px;align-items:center;justify-items:center;transition:transform 0.4s cubic-bezier(0.4, 0, 0.2, 1)}.ViewDataContainer.shifted.svelte-1m851ap.svelte-1m851ap{transform:translateY(-16px)}.ViewDataContainer.svelte-1m851ap .ViewDataContent.svelte-1m851ap{grid-area:1/1;display:flex;flex-direction:column;align-items:center}.MessageTitle.svelte-1m851ap.svelte-1m851ap{font-size:var(--emw--size-medium-2x-minus, 32px);font-weight:700;margin:0 0 16px;color:var(--emw--color-white, white);line-height:1.2}.MessageText.svelte-1m851ap.svelte-1m851ap{font-size:var(--emw--font-size-medium, 16px);color:var(--emw--color-primary-variant, #a9ccbe);max-width:320px;line-height:1.5;margin:0 0 24px}.ButtonGroup.svelte-1m851ap.svelte-1m851ap{display:flex;flex-direction:column;gap:16px;width:100%;align-items:center;margin-top:8px}.ButtonGroup.wide-buttons.svelte-1m851ap .ActionButton.svelte-1m851ap{width:280px}.ActionButton.svelte-1m851ap.svelte-1m851ap{cursor:pointer;height:60px;width:240px;border-radius:54px;font-weight:700;font-size:var(--emw--font-size-medium-plus, 18px);transition:all 0.3s cubic-bezier(0.4, 0, 0.2, 1);display:flex;align-items:center;justify-content:center;padding:0}.ActionButton.svelte-1m851ap .ButtonTextWrapper.svelte-1m851ap{display:grid;place-items:center}.ActionButton.svelte-1m851ap .ButtonTextWrapper span.svelte-1m851ap{grid-area:1/1}.ActionButton.primary.svelte-1m851ap.svelte-1m851ap{border:none;background:linear-gradient(90deg, var(--emw--color-teal, #75ffe9) 0%, var(--emw--color-green, #b2ff6d) 100%);color:var(--emw--color-background-secondary, #152b30)}.ActionButton.outline.svelte-1m851ap.svelte-1m851ap{background:transparent;border:1px solid var(--emw--color-teal, #75ffe9);color:var(--emw--color-white, white)}.ActionButton.svelte-1m851ap.svelte-1m851ap:disabled{opacity:0.5;cursor:not-allowed}.SkeletonWrapper.svelte-1m851ap.svelte-1m851ap{display:flex;flex-direction:column;align-items:center;width:100%;gap:32px}.SkeletonWrapper.svelte-1m851ap .SkeletonContent.svelte-1m851ap{display:flex;flex-direction:column;align-items:center;gap:24px;justify-content:center}.RulesToggle.svelte-1m851ap.svelte-1m851ap{position:absolute;bottom:20px;left:50%;transform:translateX(-50%);background:transparent;border:none;color:var(--emw--color-secondary-variant, #729787);font-size:var(--emw--font-size-small, 14px);display:flex;align-items:center;gap:4px;cursor:pointer;padding:8px}.RulesToggle.svelte-1m851ap .ChevronUp.svelte-1m851ap{width:12px;height:12px;background-color:currentColor;mask:center/contain no-repeat url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M18 15L12 9L6 15" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" fill="none"/></svg>')}`);
}
function xe(A, e, t) {
  const i = A.slice();
  return i[57] = e[t], i;
}
function Xe(A, e, t) {
  const i = A.slice();
  return i[60] = e[t], i;
}
function Ze(A) {
  let e, t, i, s, l, n = (
    /*activeGame*/
    (A[10].program.name[
      /*lang*/
      A[2]
    ] || /*activeGame*/
    A[10].program.name["*"]) + ""
  ), o, a, f, g, d, v, w, M, E, ee, W, q, ie = (
    /*$_*/
    A[16]("Rules") + ""
  ), re, U, y, N, se, S, D;
  function J(b, P) {
    if (
      /*gameType*/
      b[15] === "wheelOfFortune"
    )
      return Et;
    if (
      /*gameType*/
      b[15] === "flipCoin"
    )
      return Jt;
    if (
      /*gameType*/
      b[15] === "mysteryChest"
    )
      return St;
  }
  let X = J(A), Q = X && X(A);
  function G(b, P) {
    return (
      /*gameType*/
      b[15] !== "wheelOfFortune" || /*themeIndex*/
      b[22] === 7 ? Ot : Ft
    );
  }
  let te = G(A), x = te(A), L = (
    /*displayExpiry*/
    A[23] && Ne(A)
  ), T = (
    /*showRulesOverlay*/
    A[19] && Se(A)
  );
  return {
    c() {
      e = p("div"), t = p("div"), i = p("button"), s = C(), l = p("div"), o = z(n), a = C(), f = p("button"), g = C(), d = p("div"), v = p("div"), Q && Q.c(), w = C(), M = p("div"), x.c(), E = C(), L && L.c(), ee = C(), W = p("button"), q = p("span"), re = z(ie), U = C(), y = p("span"), N = C(), T && T.c(), se = De(), c(i, "type", "button"), c(i, "class", "IconButton Back svelte-1m851ap"), c(l, "class", "HeaderTitle svelte-1m851ap"), c(f, "type", "button"), c(f, "class", "IconButton Close svelte-1m851ap"), c(t, "class", "Header svelte-1m851ap"), c(v, "class", "GameComponentContainer svelte-1m851ap"), c(y, "class", "ChevronUp svelte-1m851ap"), c(W, "type", "button"), c(W, "class", "RulesToggle svelte-1m851ap"), c(M, "class", "InfoSection svelte-1m851ap"), c(d, "class", "ViewWrapper svelte-1m851ap"), c(e, "class", "ViewLayer GameLayer svelte-1m851ap"), me(
        e,
        "Mobile",
        /*mobileView*/
        A[24]
      ), me(
        e,
        "hidden",
        /*showRulesOverlay*/
        A[19] || /*isMessageShown*/
        A[12]
      );
    },
    m(b, P) {
      B(b, e, P), r(e, t), r(t, i), r(t, s), r(t, l), r(l, o), r(t, a), r(t, f), r(e, g), r(e, d), r(d, v), Q && Q.m(v, null), r(d, w), r(d, M), x.m(M, null), r(M, E), L && L.m(M, null), r(M, ee), r(M, W), r(W, q), r(q, re), r(W, U), r(W, y), B(b, N, P), T && T.m(b, P), B(b, se, P), S || (D = [
        ce(
          i,
          "click",
          /*onBack*/
          A[29]
        ),
        ce(
          f,
          "click",
          /*onClose*/
          A[30]
        ),
        ce(
          W,
          "click",
          /*click_handler*/
          A[37]
        )
      ], S = !0);
    },
    p(b, P) {
      P[0] & /*activeGame, lang*/
      1028 && n !== (n = /*activeGame*/
      (b[10].program.name[
        /*lang*/
        b[2]
      ] || /*activeGame*/
      b[10].program.name["*"]) + "") && j(o, n), X === (X = J(b)) && Q ? Q.p(b, P) : (Q && Q.d(1), Q = X && X(b), Q && (Q.c(), Q.m(v, null))), te === (te = G(b)) && x ? x.p(b, P) : (x.d(1), x = te(b), x && (x.c(), x.m(M, E))), /*displayExpiry*/
      b[23] ? L ? L.p(b, P) : (L = Ne(b), L.c(), L.m(M, ee)) : L && (L.d(1), L = null), P[0] & /*$_*/
      65536 && ie !== (ie = /*$_*/
      b[16]("Rules") + "") && j(re, ie), P[0] & /*showRulesOverlay, isMessageShown*/
      528384 && me(
        e,
        "hidden",
        /*showRulesOverlay*/
        b[19] || /*isMessageShown*/
        b[12]
      ), /*showRulesOverlay*/
      b[19] ? T ? (T.p(b, P), P[0] & /*showRulesOverlay*/
      524288 && be(T, 1)) : (T = Se(b), T.c(), be(T, 1), T.m(se.parentNode, se)) : T && (tt(), At(T, 1, 1, () => {
        T = null;
      }), it());
    },
    d(b) {
      b && (k(e), k(N), k(se)), Q && Q.d(), x.d(), L && L.d(), T && T.d(b), S = !1, et(D);
    }
  };
}
function St(A) {
  let e;
  return {
    c() {
      e = p("prize-engine-chest"), u(
        e,
        "data",
        /*activeGame*/
        A[10]
      ), u(
        e,
        "endpoint",
        /*endpoint*/
        A[0]
      ), u(
        e,
        "session",
        /*session*/
        A[1]
      ), u(
        e,
        "lang",
        /*lang*/
        A[2]
      ), u(
        e,
        "clientstyling",
        /*clientstyling*/
        A[3]
      ), u(
        e,
        "clientstylingurl",
        /*clientstylingurl*/
        A[4]
      ), u(
        e,
        "translationurl",
        /*translationurl*/
        A[5]
      ), u(
        e,
        "mbsource",
        /*mbsource*/
        A[6]
      ), u(e, "isdrawer", "false");
    },
    m(t, i) {
      B(t, e, i);
    },
    p(t, i) {
      i[0] & /*activeGame*/
      1024 && u(
        e,
        "data",
        /*activeGame*/
        t[10]
      ), i[0] & /*endpoint*/
      1 && u(
        e,
        "endpoint",
        /*endpoint*/
        t[0]
      ), i[0] & /*session*/
      2 && u(
        e,
        "session",
        /*session*/
        t[1]
      ), i[0] & /*lang*/
      4 && u(
        e,
        "lang",
        /*lang*/
        t[2]
      ), i[0] & /*clientstyling*/
      8 && u(
        e,
        "clientstyling",
        /*clientstyling*/
        t[3]
      ), i[0] & /*clientstylingurl*/
      16 && u(
        e,
        "clientstylingurl",
        /*clientstylingurl*/
        t[4]
      ), i[0] & /*translationurl*/
      32 && u(
        e,
        "translationurl",
        /*translationurl*/
        t[5]
      ), i[0] & /*mbsource*/
      64 && u(
        e,
        "mbsource",
        /*mbsource*/
        t[6]
      );
    },
    d(t) {
      t && k(e);
    }
  };
}
function Jt(A) {
  let e;
  return {
    c() {
      e = p("prize-engine-coin"), u(
        e,
        "data",
        /*activeGame*/
        A[10]
      ), u(
        e,
        "endpoint",
        /*endpoint*/
        A[0]
      ), u(
        e,
        "session",
        /*session*/
        A[1]
      ), u(
        e,
        "lang",
        /*lang*/
        A[2]
      ), u(
        e,
        "clientstyling",
        /*clientstyling*/
        A[3]
      ), u(
        e,
        "clientstylingurl",
        /*clientstylingurl*/
        A[4]
      ), u(
        e,
        "translationurl",
        /*translationurl*/
        A[5]
      ), u(
        e,
        "mbsource",
        /*mbsource*/
        A[6]
      ), u(e, "isdrawer", "false");
    },
    m(t, i) {
      B(t, e, i);
    },
    p(t, i) {
      i[0] & /*activeGame*/
      1024 && u(
        e,
        "data",
        /*activeGame*/
        t[10]
      ), i[0] & /*endpoint*/
      1 && u(
        e,
        "endpoint",
        /*endpoint*/
        t[0]
      ), i[0] & /*session*/
      2 && u(
        e,
        "session",
        /*session*/
        t[1]
      ), i[0] & /*lang*/
      4 && u(
        e,
        "lang",
        /*lang*/
        t[2]
      ), i[0] & /*clientstyling*/
      8 && u(
        e,
        "clientstyling",
        /*clientstyling*/
        t[3]
      ), i[0] & /*clientstylingurl*/
      16 && u(
        e,
        "clientstylingurl",
        /*clientstylingurl*/
        t[4]
      ), i[0] & /*translationurl*/
      32 && u(
        e,
        "translationurl",
        /*translationurl*/
        t[5]
      ), i[0] & /*mbsource*/
      64 && u(
        e,
        "mbsource",
        /*mbsource*/
        t[6]
      );
    },
    d(t) {
      t && k(e);
    }
  };
}
function Et(A) {
  let e;
  return {
    c() {
      e = p("prize-engine-luckywheel"), u(
        e,
        "data",
        /*activeGame*/
        A[10]
      ), u(
        e,
        "endpoint",
        /*endpoint*/
        A[0]
      ), u(
        e,
        "session",
        /*session*/
        A[1]
      ), u(
        e,
        "lang",
        /*lang*/
        A[2]
      ), u(
        e,
        "clientstyling",
        /*clientstyling*/
        A[3]
      ), u(
        e,
        "clientstylingurl",
        /*clientstylingurl*/
        A[4]
      ), u(
        e,
        "translationurl",
        /*translationurl*/
        A[5]
      ), u(
        e,
        "mbsource",
        /*mbsource*/
        A[6]
      ), u(
        e,
        "size",
        /*luckywheelsize*/
        A[8]
      ), u(
        e,
        "mobilesize",
        /*luckywheelmobilesize*/
        A[9]
      ), u(e, "isdrawer", "false");
    },
    m(t, i) {
      B(t, e, i);
    },
    p(t, i) {
      i[0] & /*activeGame*/
      1024 && u(
        e,
        "data",
        /*activeGame*/
        t[10]
      ), i[0] & /*endpoint*/
      1 && u(
        e,
        "endpoint",
        /*endpoint*/
        t[0]
      ), i[0] & /*session*/
      2 && u(
        e,
        "session",
        /*session*/
        t[1]
      ), i[0] & /*lang*/
      4 && u(
        e,
        "lang",
        /*lang*/
        t[2]
      ), i[0] & /*clientstyling*/
      8 && u(
        e,
        "clientstyling",
        /*clientstyling*/
        t[3]
      ), i[0] & /*clientstylingurl*/
      16 && u(
        e,
        "clientstylingurl",
        /*clientstylingurl*/
        t[4]
      ), i[0] & /*translationurl*/
      32 && u(
        e,
        "translationurl",
        /*translationurl*/
        t[5]
      ), i[0] & /*mbsource*/
      64 && u(
        e,
        "mbsource",
        /*mbsource*/
        t[6]
      ), i[0] & /*luckywheelsize*/
      256 && u(
        e,
        "size",
        /*luckywheelsize*/
        t[8]
      ), i[0] & /*luckywheelmobilesize*/
      512 && u(
        e,
        "mobilesize",
        /*luckywheelmobilesize*/
        t[9]
      );
    },
    d(t) {
      t && k(e);
    }
  };
}
function Ft(A) {
  let e, t, i = (
    /*$_*/
    A[16]("RemainingTimes") + ""
  ), s, l, n, o, a, f, g = (
    /*activeGame*/
    A[10].current.remainingTimes + ""
  ), d;
  return {
    c() {
      e = p("div"), t = p("span"), s = z(i), l = z(":"), n = C(), o = p("span"), o.innerHTML = `<img src="${Zt}" alt="Key"/>`, a = C(), f = p("span"), d = z(g), c(o, "class", "SmallIcon svelte-1m851ap"), c(e, "class", "InfoItem svelte-1m851ap");
    },
    m(v, w) {
      B(v, e, w), r(e, t), r(t, s), r(t, l), r(e, n), r(e, o), r(e, a), r(e, f), r(f, d);
    },
    p(v, w) {
      w[0] & /*$_*/
      65536 && i !== (i = /*$_*/
      v[16]("RemainingTimes") + "") && j(s, i), w[0] & /*activeGame*/
      1024 && g !== (g = /*activeGame*/
      v[10].current.remainingTimes + "") && j(d, g);
    },
    d(v) {
      v && k(e);
    }
  };
}
function Ot(A) {
  let e, t, i = (
    /*buttonTextParts*/
    A[20].base + ""
  ), s, l, n, o, a, f = (
    /*buttonTextParts*/
    A[20].count + ""
  ), g, d, v, w;
  return {
    c() {
      e = p("button"), t = p("span"), s = z(i), l = C(), n = p("span"), n.textContent = "×", o = C(), a = p("span"), g = z(f), c(t, "class", "ButtonBase svelte-1m851ap"), c(n, "class", "ButtonCross svelte-1m851ap"), c(a, "class", "ButtonCount svelte-1m851ap"), c(e, "type", "button"), c(e, "class", "ActionButton primary svelte-1m851ap"), e.disabled = d = /*isDrawing*/
      A[18] || !/*activeGame*/
      A[10].current?.remainingTimes;
    },
    m(M, E) {
      B(M, e, E), r(e, t), r(t, s), r(e, l), r(e, n), r(e, o), r(e, a), r(a, g), v || (w = ce(
        e,
        "click",
        /*performDraw*/
        A[27]
      ), v = !0);
    },
    p(M, E) {
      E[0] & /*buttonTextParts*/
      1048576 && i !== (i = /*buttonTextParts*/
      M[20].base + "") && j(s, i), E[0] & /*buttonTextParts*/
      1048576 && f !== (f = /*buttonTextParts*/
      M[20].count + "") && j(g, f), E[0] & /*isDrawing, activeGame*/
      263168 && d !== (d = /*isDrawing*/
      M[18] || !/*activeGame*/
      M[10].current?.remainingTimes) && (e.disabled = d);
    },
    d(M) {
      M && k(e), v = !1, w();
    }
  };
}
function Ne(A) {
  let e, t, i, s, l;
  return {
    c() {
      e = p("div"), t = p("span"), t.innerHTML = '<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><circle cx="12" cy="14" r="7" stroke="currentColor" stroke-width="1.5"></circle><path d="M12 11V14L14 16" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M12 4V7" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M9 4H15" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M17 7L18 8" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M7 7L6 8" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path></svg>', i = C(), s = p("span"), l = z(
        /*displayExpiry*/
        A[23]
      ), c(t, "class", "SmallIcon Timer svelte-1m851ap"), c(e, "class", "InfoItem svelte-1m851ap");
    },
    m(n, o) {
      B(n, e, o), r(e, t), r(e, i), r(e, s), r(s, l);
    },
    p(n, o) {
      o[0] & /*displayExpiry*/
      8388608 && j(
        l,
        /*displayExpiry*/
        n[23]
      );
    },
    d(n) {
      n && k(e);
    }
  };
}
function Se(A) {
  let e, t, i, s, l, n = (
    /*$_*/
    A[16]("Rules") + ""
  ), o, a, f, g, d, v, w = (
    /*$_*/
    A[16]("RulesDescription") + ""
  ), M, E, ee, W, q, ie, re, U, y, N = (
    /*$_*/
    A[16]("AvailablePeriod") + ""
  ), se, S, D, J = (
    /*formatDateTime*/
    A[31](
      /*activeGame*/
      A[10].program.trigger?.startTime
    ) + ""
  ), X, Q, G = (
    /*formatDateTime*/
    A[31](
      /*activeGame*/
      A[10].program.trigger?.endTime
    ) + ""
  ), te, x, L, T, b, P, le, de, he = (
    /*$_*/
    A[16]("TopRewards") + ""
  ), Y, pe, fe, ue, oe, V, ve, ge, F = (
    /*terms*/
    A[7] && Je(A)
  ), O = (
    /*activeGame*/
    A[10]?.program?.trigger?.periods && Ee(A)
  ), Z = (
    /*activeGame*/
    A[10].program.wheelOfFortune?.partitions && Oe(A)
  );
  return {
    c() {
      e = p("div"), t = p("div"), i = p("div"), s = C(), l = p("div"), o = z(n), a = C(), f = p("button"), g = C(), d = p("div"), v = p("div"), M = z(w), E = C(), F && F.c(), ee = C(), W = p("div"), q = p("div"), ie = p("span"), re = C(), U = p("div"), y = p("strong"), se = z(N), S = C(), D = p("span"), X = z(J), Q = z(" ~ "), te = z(G), x = C(), O && O.c(), L = C(), T = p("div"), b = p("span"), P = C(), le = p("div"), de = p("strong"), Y = z(he), pe = C(), fe = p("span"), Z && Z.c(), c(i, "class", "HeaderPlaceholder svelte-1m851ap"), c(l, "class", "HeaderTitle svelte-1m851ap"), c(f, "type", "button"), c(f, "class", "IconButton Close svelte-1m851ap"), c(t, "class", "Header svelte-1m851ap"), c(v, "class", "GameDescription svelte-1m851ap"), c(ie, "class", "Icon History svelte-1m851ap"), c(y, "class", "svelte-1m851ap"), c(D, "class", "svelte-1m851ap"), c(U, "class", "DetailText"), c(q, "class", "DetailItem svelte-1m851ap"), c(b, "class", "Icon Cup svelte-1m851ap"), c(de, "class", "svelte-1m851ap"), c(fe, "class", "RewardList svelte-1m851ap"), c(le, "class", "DetailText"), c(T, "class", "DetailItem Rewards svelte-1m851ap"), c(W, "class", "DetailsGrid svelte-1m851ap"), c(d, "class", "LayerContent svelte-1m851ap"), c(e, "class", "ViewLayer RulesLayer svelte-1m851ap"), me(
        e,
        "Mobile",
        /*mobileView*/
        A[24]
      );
    },
    m(H, K) {
      B(H, e, K), r(e, t), r(t, i), r(t, s), r(t, l), r(l, o), r(t, a), r(t, f), r(e, g), r(e, d), r(d, v), r(v, M), r(d, E), F && F.m(d, null), r(d, ee), r(d, W), r(W, q), r(q, ie), r(q, re), r(q, U), r(U, y), r(y, se), r(U, S), r(U, D), r(D, X), r(D, Q), r(D, te), r(W, x), O && O.m(W, null), r(W, L), r(W, T), r(T, b), r(T, P), r(T, le), r(le, de), r(de, Y), r(le, pe), r(le, fe), Z && Z.m(fe, null), V = !0, ve || (ge = ce(
        f,
        "click",
        /*click_handler_1*/
        A[38]
      ), ve = !0);
    },
    p(H, K) {
      (!V || K[0] & /*$_*/
      65536) && n !== (n = /*$_*/
      H[16]("Rules") + "") && j(o, n), (!V || K[0] & /*$_*/
      65536) && w !== (w = /*$_*/
      H[16]("RulesDescription") + "") && j(M, w), /*terms*/
      H[7] ? F ? F.p(H, K) : (F = Je(H), F.c(), F.m(d, ee)) : F && (F.d(1), F = null), (!V || K[0] & /*$_*/
      65536) && N !== (N = /*$_*/
      H[16]("AvailablePeriod") + "") && j(se, N), (!V || K[0] & /*activeGame*/
      1024) && J !== (J = /*formatDateTime*/
      H[31](
        /*activeGame*/
        H[10].program.trigger?.startTime
      ) + "") && j(X, J), (!V || K[0] & /*activeGame*/
      1024) && G !== (G = /*formatDateTime*/
      H[31](
        /*activeGame*/
        H[10].program.trigger?.endTime
      ) + "") && j(te, G), /*activeGame*/
      H[10]?.program?.trigger?.periods ? O ? O.p(H, K) : (O = Ee(H), O.c(), O.m(W, L)) : O && (O.d(1), O = null), (!V || K[0] & /*$_*/
      65536) && he !== (he = /*$_*/
      H[16]("TopRewards") + "") && j(Y, he), /*activeGame*/
      H[10].program.wheelOfFortune?.partitions ? Z ? Z.p(H, K) : (Z = Oe(H), Z.c(), Z.m(fe, null)) : Z && (Z.d(1), Z = null);
    },
    i(H) {
      V || (H && We(() => {
        V && (oe && oe.end(1), ue = Le(e, Me, { y: "100%", duration: 400 }), ue.start());
      }), V = !0);
    },
    o(H) {
      ue && ue.invalidate(), H && (oe = st(e, Me, { y: "100%", duration: 400 })), V = !1;
    },
    d(H) {
      H && k(e), F && F.d(), O && O.d(), Z && Z.d(), H && oe && oe.end(), ve = !1, ge();
    }
  };
}
function Je(A) {
  let e, t, i = (
    /*$_*/
    A[16]("Terms") + ""
  ), s, l, n;
  return {
    c() {
      e = p("a"), t = p("span"), s = z(i), l = C(), n = p("span"), c(n, "class", "ExternalIcon svelte-1m851ap"), c(e, "class", "TermsLink svelte-1m851ap"), c(
        e,
        "href",
        /*terms*/
        A[7]
      ), c(e, "target", "_blank");
    },
    m(o, a) {
      B(o, e, a), r(e, t), r(t, s), r(e, l), r(e, n);
    },
    p(o, a) {
      a[0] & /*$_*/
      65536 && i !== (i = /*$_*/
      o[16]("Terms") + "") && j(s, i), a[0] & /*terms*/
      128 && c(
        e,
        "href",
        /*terms*/
        o[7]
      );
    },
    d(o) {
      o && k(e);
    }
  };
}
function Ee(A) {
  let e, t = Be(
    /*activeGame*/
    A[10].program.trigger.periods
  ), i = [];
  for (let s = 0; s < t.length; s += 1)
    i[s] = Fe(Xe(A, t, s));
  return {
    c() {
      for (let s = 0; s < i.length; s += 1)
        i[s].c();
      e = De();
    },
    m(s, l) {
      for (let n = 0; n < i.length; n += 1)
        i[n] && i[n].m(s, l);
      B(s, e, l);
    },
    p(s, l) {
      if (l[0] & /*getRecurrenceText, activeGame, $_*/
      33620992) {
        t = Be(
          /*activeGame*/
          s[10].program.trigger.periods
        );
        let n;
        for (n = 0; n < t.length; n += 1) {
          const o = Xe(s, t, n);
          i[n] ? i[n].p(o, l) : (i[n] = Fe(o), i[n].c(), i[n].m(e.parentNode, e));
        }
        for (; n < i.length; n += 1)
          i[n].d(1);
        i.length = t.length;
      }
    },
    d(s) {
      s && k(e), nt(i, s);
    }
  };
}
function Fe(A) {
  let e, t, i, s, l, n = (
    /*$_*/
    A[16]("Recurrence") + ""
  ), o, a, f, g = (
    /*getRecurrenceText*/
    A[25](
      /*period*/
      A[60]
    ) + ""
  ), d, v;
  return {
    c() {
      e = p("div"), t = p("span"), i = C(), s = p("div"), l = p("strong"), o = z(n), a = C(), f = p("span"), d = z(g), v = C(), c(t, "class", "Icon History svelte-1m851ap"), c(l, "class", "svelte-1m851ap"), c(f, "class", "svelte-1m851ap"), c(s, "class", "DetailText"), c(e, "class", "DetailItem svelte-1m851ap");
    },
    m(w, M) {
      B(w, e, M), r(e, t), r(e, i), r(e, s), r(s, l), r(l, o), r(s, a), r(s, f), r(f, d), r(e, v);
    },
    p(w, M) {
      M[0] & /*$_*/
      65536 && n !== (n = /*$_*/
      w[16]("Recurrence") + "") && j(o, n), M[0] & /*activeGame*/
      1024 && g !== (g = /*getRecurrenceText*/
      w[25](
        /*period*/
        w[60]
      ) + "") && j(d, g);
    },
    d(w) {
      w && k(e);
    }
  };
}
function Oe(A) {
  let e, t = Be(
    /*activeGame*/
    A[10].program.wheelOfFortune.partitions
  ), i = [];
  for (let s = 0; s < t.length; s += 1)
    i[s] = Ge(xe(A, t, s));
  return {
    c() {
      for (let s = 0; s < i.length; s += 1)
        i[s].c();
      e = De();
    },
    m(s, l) {
      for (let n = 0; n < i.length; n += 1)
        i[n] && i[n].m(s, l);
      B(s, e, l);
    },
    p(s, l) {
      if (l[0] & /*activeGame, lang*/
      1028) {
        t = Be(
          /*activeGame*/
          s[10].program.wheelOfFortune.partitions
        );
        let n;
        for (n = 0; n < t.length; n += 1) {
          const o = xe(s, t, n);
          i[n] ? i[n].p(o, l) : (i[n] = Ge(o), i[n].c(), i[n].m(e.parentNode, e));
        }
        for (; n < i.length; n += 1)
          i[n].d(1);
        i.length = t.length;
      }
    },
    d(s) {
      s && k(e), nt(i, s);
    }
  };
}
function Gt(A) {
  let e, t;
  return {
    c() {
      e = p("img"), c(e, "class", "RewardIcon svelte-1m851ap"), Ce(e.src, t = /*partition*/
      A[57].image1[
        /*lang*/
        A[2]
      ] || /*partition*/
      A[57].image1["*"]) || c(e, "src", t), c(e, "alt", "");
    },
    m(i, s) {
      B(i, e, s);
    },
    p(i, s) {
      s[0] & /*activeGame, lang*/
      1028 && !Ce(e.src, t = /*partition*/
      i[57].image1[
        /*lang*/
        i[2]
      ] || /*partition*/
      i[57].image1["*"]) && c(e, "src", t);
    },
    d(i) {
      i && k(e);
    }
  };
}
function Yt(A) {
  let e, t = (
    /*partition*/
    (A[57].name[
      /*lang*/
      A[2]
    ] || /*partition*/
    A[57].name["*"]) + ""
  ), i;
  return {
    c() {
      e = p("span"), i = z(t), c(e, "class", "svelte-1m851ap");
    },
    m(s, l) {
      B(s, e, l), r(e, i);
    },
    p(s, l) {
      l[0] & /*activeGame, lang*/
      1028 && t !== (t = /*partition*/
      (s[57].name[
        /*lang*/
        s[2]
      ] || /*partition*/
      s[57].name["*"]) + "") && j(i, t);
    },
    d(s) {
      s && k(e);
    }
  };
}
function Ge(A) {
  let e, t;
  function i(n, o) {
    if (
      /*partition*/
      n[57].name[
        /*lang*/
        n[2]
      ] || /*partition*/
      n[57].name["*"]
    )
      return Yt;
    if (
      /*partition*/
      n[57].image1
    )
      return Gt;
  }
  let s = i(A), l = s && s(A);
  return {
    c() {
      e = p("span"), l && l.c(), t = C(), c(e, "class", "RewardItem svelte-1m851ap");
    },
    m(n, o) {
      B(n, e, o), l && l.m(e, null), r(e, t);
    },
    p(n, o) {
      s === (s = i(n)) && l ? l.p(n, o) : (l && l.d(1), l = s && s(n), l && (l.c(), l.m(e, t)));
    },
    d(n) {
      n && k(e), l && l.d();
    }
  };
}
function Ye(A) {
  let e, t, i;
  function s(o, a) {
    if (
      /*internalLoading*/
      o[17]
    )
      return qt;
    if (
      /*viewData*/
      o[21]
    )
      return Vt;
  }
  let l = s(A), n = l && l(A);
  return {
    c() {
      e = p("div"), t = p("div"), n && n.c(), c(t, "class", "LayerContent Center svelte-1m851ap"), c(e, "class", "ViewLayer MessageLayer svelte-1m851ap");
    },
    m(o, a) {
      B(o, e, a), r(e, t), n && n.m(t, null);
    },
    p(o, a) {
      l === (l = s(o)) && n ? n.p(o, a) : (n && n.d(1), n = l && l(o), n && (n.c(), n.m(t, null)));
    },
    i(o) {
      o && (i || We(() => {
        i = Le(e, Rt, { duration: 250 }), i.start();
      }));
    },
    o: Re,
    d(o) {
      o && k(e), n && n.d();
    }
  };
}
function Vt(A) {
  let e, t = (
    /*viewData*/
    A[21].key
  ), i, s, l = Ke(A);
  function n(f, g) {
    return (
      /*messageMode*/
      f[13] === "gift" ? Kt : Ut
    );
  }
  let o = n(A), a = o(A);
  return {
    c() {
      e = p("div"), l.c(), i = C(), s = p("div"), a.c(), c(e, "class", "ViewDataContainer svelte-1m851ap"), me(
        e,
        "shifted",
        /*internalMode*/
        A[14] === "confirmReject"
      ), c(s, "class", "ButtonGroup svelte-1m851ap"), me(
        s,
        "wide-buttons",
        /*internalMode*/
        A[14] === "confirmReject"
      );
    },
    m(f, g) {
      B(f, e, g), l.m(e, null), B(f, i, g), B(f, s, g), a.m(s, null);
    },
    p(f, g) {
      g[0] & /*viewData*/
      2097152 && ke(t, t = /*viewData*/
      f[21].key) ? (tt(), At(l, 1, 1, Re), it(), l = Ke(f), l.c(), be(l, 1), l.m(e, null)) : l.p(f, g), g[0] & /*internalMode*/
      16384 && me(
        e,
        "shifted",
        /*internalMode*/
        f[14] === "confirmReject"
      ), o === (o = n(f)) && a ? a.p(f, g) : (a.d(1), a = o(f), a && (a.c(), a.m(s, null))), g[0] & /*internalMode*/
      16384 && me(
        s,
        "wide-buttons",
        /*internalMode*/
        f[14] === "confirmReject"
      );
    },
    d(f) {
      f && (k(e), k(i), k(s)), l.d(f), a.d();
    }
  };
}
function qt(A) {
  let e;
  return {
    c() {
      e = p("div"), e.innerHTML = '<div class="SkeletonContent svelte-1m851ap"><ui-skeleton structure="rectangle" width="100px" height="100px" border-radius="20px"></ui-skeleton> <ui-skeleton structure="text" width="240px" height="24px"></ui-skeleton></div> <div class="SkeletonFooter"><ui-skeleton structure="rectangle" width="240px" height="60px" border-radius="54px"></ui-skeleton></div>', c(e, "class", "SkeletonWrapper svelte-1m851ap");
    },
    m(t, i) {
      B(t, e, i);
    },
    p: Re,
    d(t) {
      t && k(e);
    }
  };
}
function Ve(A) {
  let e, t, i;
  return {
    c() {
      e = p("div"), t = p("img"), Ce(t.src, i = /*viewData*/
      A[21].image) || c(t, "src", i), c(t, "alt", ""), c(t, "class", "GiftImage svelte-1m851ap"), c(e, "class", "ImageWrapper svelte-1m851ap");
    },
    m(s, l) {
      B(s, e, l), r(e, t);
    },
    p(s, l) {
      l[0] & /*viewData*/
      2097152 && !Ce(t.src, i = /*viewData*/
      s[21].image) && c(t, "src", i);
    },
    d(s) {
      s && k(e);
    }
  };
}
function qe(A) {
  let e, t = (
    /*viewData*/
    A[21].title + ""
  );
  return {
    c() {
      e = p("p"), c(e, "class", "MessageTitle svelte-1m851ap");
    },
    m(i, s) {
      B(i, e, s), e.innerHTML = t;
    },
    p(i, s) {
      s[0] & /*viewData*/
      2097152 && t !== (t = /*viewData*/
      i[21].title + "") && (e.innerHTML = t);
    },
    d(i) {
      i && k(e);
    }
  };
}
function Ue(A) {
  let e, t = (
    /*viewData*/
    A[21].text + ""
  );
  return {
    c() {
      e = p("p"), c(e, "class", "MessageText svelte-1m851ap");
    },
    m(i, s) {
      B(i, e, s), e.innerHTML = t;
    },
    p(i, s) {
      s[0] & /*viewData*/
      2097152 && t !== (t = /*viewData*/
      i[21].text + "") && (e.innerHTML = t);
    },
    d(i) {
      i && k(e);
    }
  };
}
function Ke(A) {
  let e, t, i, s, l, n, o = (
    /*viewData*/
    A[21].image && Ve(A)
  ), a = (
    /*viewData*/
    A[21].title && qe(A)
  ), f = (
    /*viewData*/
    A[21].text && Ue(A)
  );
  return {
    c() {
      e = p("div"), o && o.c(), t = C(), a && a.c(), i = C(), f && f.c(), c(e, "class", "ViewDataContent svelte-1m851ap");
    },
    m(g, d) {
      B(g, e, d), o && o.m(e, null), r(e, t), a && a.m(e, null), r(e, i), f && f.m(e, null), n = !0;
    },
    p(g, d) {
      A = g, /*viewData*/
      A[21].image ? o ? o.p(A, d) : (o = Ve(A), o.c(), o.m(e, t)) : o && (o.d(1), o = null), /*viewData*/
      A[21].title ? a ? a.p(A, d) : (a = qe(A), a.c(), a.m(e, i)) : a && (a.d(1), a = null), /*viewData*/
      A[21].text ? f ? f.p(A, d) : (f = Ue(A), f.c(), f.m(e, null)) : f && (f.d(1), f = null);
    },
    i(g) {
      n || (g && We(() => {
        n && (l && l.end(1), s = Le(e, Me, {
          y: (
            /*internalMode*/
            A[14] === "confirmReject" ? 10 : -10
          ),
          duration: 300,
          delay: 100
        }), s.start());
      }), n = !0);
    },
    o(g) {
      s && s.invalidate(), g && (l = st(e, Me, {
        y: (
          /*internalMode*/
          A[14] === "confirmReject" ? -10 : 10
        ),
        duration: 150
      })), n = !1;
    },
    d(g) {
      g && k(e), o && o.d(), a && a.d(), f && f.d(), g && l && l.end();
    }
  };
}
function Ut(A) {
  let e, t, i;
  function s(o, a) {
    return (
      /*messageMode*/
      o[13] === "success" ? eA : (
        /*messageMode*/
        o[13] === "noprize" ? $t : _t
      )
    );
  }
  let l = s(A), n = l(A);
  return {
    c() {
      e = p("button"), n.c(), c(e, "type", "button"), c(e, "class", "ActionButton primary svelte-1m851ap");
    },
    m(o, a) {
      B(o, e, a), n.m(e, null), t || (i = ce(
        e,
        "click",
        /*click_handler_6*/
        A[43]
      ), t = !0);
    },
    p(o, a) {
      l === (l = s(o)) && n ? n.p(o, a) : (n.d(1), n = l(o), n && (n.c(), n.m(e, null)));
    },
    d(o) {
      o && k(e), n.d(), t = !1, i();
    }
  };
}
function Kt(A) {
  let e, t, i = (
    /*internalMode*/
    A[14]
  ), s, l, n, o = (
    /*internalMode*/
    A[14]
  ), a, f, g = _e(A), d = $e(A);
  return {
    c() {
      e = p("button"), t = p("div"), g.c(), s = C(), l = p("button"), n = p("div"), d.c(), c(t, "class", "ButtonTextWrapper svelte-1m851ap"), c(e, "type", "button"), c(e, "class", "ActionButton primary svelte-1m851ap"), e.disabled = /*internalLoading*/
      A[17], c(n, "class", "ButtonTextWrapper svelte-1m851ap"), c(l, "type", "button"), c(l, "class", "ActionButton outline svelte-1m851ap"), l.disabled = /*internalLoading*/
      A[17];
    },
    m(v, w) {
      B(v, e, w), r(e, t), g.m(t, null), B(v, s, w), B(v, l, w), r(l, n), d.m(n, null), a || (f = [
        ce(e, "click", function() {
          Ie(
            /*internalMode*/
            A[14] === "confirmReject" ? (
              /*click_handler_2*/
              A[39]
            ) : (
              /*click_handler_3*/
              A[40]
            )
          ) && /*internalMode*/
          (A[14] === "confirmReject" ? (
            /*click_handler_2*/
            A[39]
          ) : (
            /*click_handler_3*/
            A[40]
          )).apply(this, arguments);
        }),
        ce(l, "click", function() {
          Ie(
            /*internalMode*/
            A[14] === "confirmReject" ? (
              /*click_handler_4*/
              A[41]
            ) : (
              /*click_handler_5*/
              A[42]
            )
          ) && /*internalMode*/
          (A[14] === "confirmReject" ? (
            /*click_handler_4*/
            A[41]
          ) : (
            /*click_handler_5*/
            A[42]
          )).apply(this, arguments);
        })
      ], a = !0);
    },
    p(v, w) {
      A = v, w[0] & /*internalMode*/
      16384 && ke(i, i = /*internalMode*/
      A[14]) ? (g.d(1), g = _e(A), g.c(), g.m(t, null)) : g.p(A, w), w[0] & /*internalLoading*/
      131072 && (e.disabled = /*internalLoading*/
      A[17]), w[0] & /*internalMode*/
      16384 && ke(o, o = /*internalMode*/
      A[14]) ? (d.d(1), d = $e(A), d.c(), d.m(n, null)) : d.p(A, w), w[0] & /*internalLoading*/
      131072 && (l.disabled = /*internalLoading*/
      A[17]);
    },
    d(v) {
      v && (k(e), k(s), k(l)), g.d(v), d.d(v), a = !1, et(f);
    }
  };
}
function _t(A) {
  let e = (
    /*$_*/
    A[16]("OK") + ""
  ), t;
  return {
    c() {
      t = z(e);
    },
    m(i, s) {
      B(i, t, s);
    },
    p(i, s) {
      s[0] & /*$_*/
      65536 && e !== (e = /*$_*/
      i[16]("OK") + "") && j(t, e);
    },
    d(i) {
      i && k(t);
    }
  };
}
function $t(A) {
  let e = (
    /*$_*/
    A[16]("Continue") + ""
  ), t;
  return {
    c() {
      t = z(e);
    },
    m(i, s) {
      B(i, t, s);
    },
    p(i, s) {
      s[0] & /*$_*/
      65536 && e !== (e = /*$_*/
      i[16]("Continue") + "") && j(t, e);
    },
    d(i) {
      i && k(t);
    }
  };
}
function eA(A) {
  let e = (
    /*$_*/
    A[16]("BackToGame") + ""
  ), t;
  return {
    c() {
      t = z(e);
    },
    m(i, s) {
      B(i, t, s);
    },
    p(i, s) {
      s[0] & /*$_*/
      65536 && e !== (e = /*$_*/
      i[16]("BackToGame") + "") && j(t, e);
    },
    d(i) {
      i && k(t);
    }
  };
}
function _e(A) {
  let e, t = (
    /*internalMode*/
    (A[14] === "confirmReject" ? (
      /*$_*/
      A[16]("KeepPrize")
    ) : (
      /*$_*/
      A[16]("Accept")
    )) + ""
  ), i;
  return {
    c() {
      e = p("span"), i = z(t), c(e, "class", "svelte-1m851ap");
    },
    m(s, l) {
      B(s, e, l), r(e, i);
    },
    p(s, l) {
      l[0] & /*internalMode, $_*/
      81920 && t !== (t = /*internalMode*/
      (s[14] === "confirmReject" ? (
        /*$_*/
        s[16]("KeepPrize")
      ) : (
        /*$_*/
        s[16]("Accept")
      )) + "") && j(i, t);
    },
    d(s) {
      s && k(e);
    }
  };
}
function $e(A) {
  let e, t = (
    /*internalMode*/
    (A[14] === "confirmReject" ? (
      /*$_*/
      A[16]("RejectPrize")
    ) : (
      /*$_*/
      A[16]("Reject")
    )) + ""
  ), i;
  return {
    c() {
      e = p("span"), i = z(t), c(e, "class", "svelte-1m851ap");
    },
    m(s, l) {
      B(s, e, l), r(e, i);
    },
    p(s, l) {
      l[0] & /*internalMode, $_*/
      81920 && t !== (t = /*internalMode*/
      (s[14] === "confirmReject" ? (
        /*$_*/
        s[16]("RejectPrize")
      ) : (
        /*$_*/
        s[16]("Reject")
      )) + "") && j(i, t);
    },
    d(s) {
      s && k(e);
    }
  };
}
function tA(A) {
  let e, t, i = (
    /*activeGame*/
    A[10] && Ze(A)
  ), s = (
    /*isMessageShown*/
    A[12] && Ye(A)
  );
  return {
    c() {
      e = p("div"), i && i.c(), t = C(), s && s.c(), c(e, "class", "PrizeDetailsContent svelte-1m851ap");
    },
    m(l, n) {
      B(l, e, n), i && i.m(e, null), r(e, t), s && s.m(e, null), A[44](e);
    },
    p(l, n) {
      /*activeGame*/
      l[10] ? i ? i.p(l, n) : (i = Ze(l), i.c(), i.m(e, t)) : i && (i.d(1), i = null), /*isMessageShown*/
      l[12] ? s ? (s.p(l, n), n[0] & /*isMessageShown*/
      4096 && be(s, 1)) : (s = Ye(l), s.c(), be(s, 1), s.m(e, null)) : s && (s.d(1), s = null);
    },
    i(l) {
      be(s);
    },
    o: Re,
    d(l) {
      l && k(e), i && i.d(), s && s.d(), A[44](null);
    }
  };
}
let AA = null;
function iA(A, e, t) {
  let i, s, l, n, o, a;
  wt(A, zt, (m) => t(16, a = m));
  let { data: f = null } = e, { endpoint: g = "" } = e, { session: d = "" } = e, { lang: v = "en" } = e, { clientstyling: w = "" } = e, { clientstylingurl: M = "" } = e, { translationurl: E = "" } = e, { mbsource: ee = "" } = e, { twostepdraw: W = "false" } = e, { terms: q = "" } = e, { luckywheelsize: ie = 324 } = e, { luckywheelmobilesize: re = 240 } = e, { programs: U = [] } = e, y = null, N;
  const se = Tt(window.navigator.userAgent);
  let S = !1, D = "", J = null, X = !1, Q = !1, G = "", te = "", x = !1, L = Date.now(), T = null;
  const b = (m, h) => {
    if (!m)
      return "";
    const I = new Date(m).getTime() - h;
    if (I <= 0)
      return "00d:00h:00m";
    const _ = Math.floor(I / (1e3 * 60 * 60 * 24)), ae = Math.floor(I % (1e3 * 60 * 60 * 24) / (1e3 * 60 * 60)), ye = Math.floor(I % (1e3 * 60 * 60) / (1e3 * 60));
    return `${_.toString().padStart(2, "0")}d:${ae.toString().padStart(2, "0")}h:${ye.toString().padStart(2, "0")}m`;
  }, P = (m) => [
    "",
    a("Monday"),
    a("Tuesday"),
    a("Wednesday"),
    a("Thursday"),
    a("Friday"),
    a("Saturday"),
    a("Sunday")
  ][m] || "", le = (m) => {
    const h = ["th", "st", "nd", "rd"], R = m % 100;
    return m + (h[(R - 20) % 10] || h[R] || h[0]);
  }, de = (m) => {
    if (!m)
      return "";
    const { recurrenceType: h, frequency: R, dayFrom: I, dayTo: _, maxImplicitTickets: ae, startTime: ye, endTime: He } = m, Pe = ae || 0, ft = Pe > 1 ? a("Spins") : a("Spin");
    let ne = `${Pe} ${ft}`;
    const we = a("Every"), Ae = R || 1;
    switch (h?.toLowerCase()) {
      case "single":
        ne += ` ${a("InThisPeriod")}`;
        break;
      case "minute":
        const ut = Ae > 1 ? a("Minutes") : a("Minute");
        ne += ` ${we} ${Ae > 1 ? Ae + " " : ""}${ut}`;
        break;
      case "day":
        const gt = Ae > 1 ? a("Days") : a("Day");
        ne += ` ${we} ${Ae > 1 ? Ae + " " : ""}${gt}`;
        break;
      case "week":
        if (I && _)
          I === _ ? ne += ` ${we} ${P(I)}` : ne += ` ${a("From")} ${P(I)} ${a("To")} ${P(_)} ${a("EveryWeek")}`;
        else {
          const Qe = Ae > 1 ? a("Weeks") : a("Week");
          ne += ` ${we} ${Ae > 1 ? Ae + " " : ""}${Qe}`;
        }
        break;
      case "month":
        if (I && _)
          I === _ ? ne += ` ${we} ${le(I)} ${a("EachMonth")}` : ne += ` ${a("From")} ${le(I)} ${a("To")} ${le(_)} ${a("EachMonth")}`;
        else {
          const Qe = Ae > 1 ? a("Months") : a("Month");
          ne += ` ${we} ${Ae > 1 ? Ae + " " : ""}${Qe}`;
        }
        break;
      default:
        ne += ` ${a("InThisPeriod")}`;
    }
    return `${ne} [${Z(ye)} ~ ${Z(He)}]`;
  };
  Lt();
  const he = async (m) => {
    try {
      const R = await (await fetch(m)).json();
      Object.keys(R).forEach((I) => {
        ze(I, R[I]);
      });
    } catch (h) {
      console.error("[PrizeDetails] Failed to load translations", h);
    }
  };
  var Y;
  (function(m) {
    m[m.Assign = 0] = "Assign", m[m.Reward = 1] = "Reward", m[m.Reject = 2] = "Reject";
  })(Y || (Y = {}));
  const pe = async (m, h = {}) => {
    const R = new URL(g + "/v1" + m);
    h.params && Object.keys(h.params).forEach((ae) => R.searchParams.append(ae, h.params[ae]));
    const _ = await (await fetch(R.toString(), {
      method: h.method || "GET",
      headers: {
        "Content-Type": "application/json",
        Accept: "text/plain",
        ...d ? { "x-SessionId": d } : {},
        ...h.headers
      },
      body: h.body
    })).text();
    try {
      return JSON.parse(_);
    } catch {
      return _;
    }
  }, fe = () => "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, (m) => {
    const h = Math.random() * 16 | 0;
    return (m === "x" ? h : h & 3 | 8).toString(16);
  }), ue = async () => {
    if (!y)
      return;
    const m = await pe("/wof/remainingTimes", {
      params: {
        filter: `ProgramId[]=${y.program.id}`
      }
    });
    let h = 0;
    if (m?.items?.length > 0) {
      const R = m.items.find((I) => I.programId === y.program.id);
      R && (h = +R.remainingTimes || 0);
    }
    t(10, y.current.remainingTimes = h, y), t(10, y = { ...y }), t(32, f = JSON.stringify(y));
  }, oe = async () => {
    if (!y)
      return;
    let m = U;
    if (!m || m.length === 0)
      try {
        m = (await pe("/wof/lotteries"))?.items || [];
      } catch (R) {
        console.error("[PrizeDetails] Check next program failed", R);
      }
    const h = m?.find((R) => R.program.id === y.program.id);
    h && h.current ? (t(13, D = "show-next"), t(35, J = {
      startTime: Z(h.current.startTime),
      name: h.program.name[v] || h.program.name["*"]
    })) : t(13, D = "no-next"), t(12, S = !0);
  }, V = async () => {
    if (!(!y || X || Q || S) && y.current?.remainingTimes !== 0) {
      te = fe(), t(17, X = !0), t(18, Q = !0), t(19, x = !1), window.postMessage({ type: "PrizeGameStartAnimation" }, "*");
      try {
        const m = W === "true" ? Y.Reward : Y.Assign, h = await pe(`/wof/draw/${y.program.id}`, {
          method: "PUT",
          body: JSON.stringify({ guid: te, action: m })
        });
        ve(h, m);
      } catch {
        window.postMessage(
          {
            type: "PrizeGameResult",
            data: { error: !0 }
          },
          "*"
        ), t(13, D = "error"), t(12, S = !0), t(17, X = !1), t(18, Q = !1);
      }
    }
  }, ve = (m, h) => {
    if (t(17, X = !1), m?.item?.state === "fulfilled" || m?.item?.state === "drawn") {
      window.postMessage({ type: "PrizeGameResult", data: m }, "*");
      const R = y.program.wheelOfFortune.partitions[m.item.result.wheelOfFortunePartitionIndex], I = R?.prizeText[v] || R?.prizeText["*"] || "", _ = R?.name[v] || R?.name["*"] || "", ae = R?.prizeImage[v] || R?.prizeImage["*"] || "";
      m.item.result.outcomes.some((He) => He.action?.type === "noprize") ? (t(13, D = "noprize"), t(35, J = { text: I, image: ae })) : (h === Y.Assign && D === "gift" ? t(13, D = "success") : t(13, D = h === Y.Reward ? "gift" : "success-draw"), t(35, J = {
        text: I,
        image: ae,
        bold: _
      })), t(14, G = ""), h !== Y.Reward && ue();
    } else
      window.postMessage(
        {
          type: "PrizeGameResult",
          data: { error: !0 }
        },
        "*"
      ), t(13, D = "error"), t(12, S = !0), t(18, Q = !1);
  }, ge = async (m) => {
    if (!y || X)
      return;
    t(17, X = !0);
    const h = m === "Assign" ? Y.Assign : Y.Reject;
    try {
      const R = await pe(`/wof/draw/${y.program.id}`, {
        method: "PUT",
        body: JSON.stringify({ guid: te, action: h })
      });
      h === Y.Assign ? ve(R, Y.Assign) : (t(12, S = !1), t(18, Q = !1), await ue(), y.current?.remainingTimes === 0 && oe());
    } catch {
      window.postMessage(
        {
          type: "PrizeGameResult",
          data: { error: !0 }
        },
        "*"
      ), t(13, D = "error"), t(12, S = !0), t(17, X = !1), t(18, Q = !1);
    }
  }, F = () => window.postMessage({ type: "BackToList" }, "*"), O = () => window.postMessage({ type: "ClosePrizeEngineDrawer" }, "*"), Z = (m) => m ? new Date(m).toISOString().replace("T", " ").substring(0, 19).replace(/-/g, "/") : "", H = (m) => {
    const { type: h, action: R } = m.data;
    h === "PrizeGameRequestDraw" ? V() : h === "PrizeResultAction" ? ge(R) : h === "PrizeResultClose" ? (t(12, S = !1), t(18, Q = !1), t(14, G = "")) : h === "PrizeGameToggleRules" ? t(19, x = !x) : h === "PrizeGameSpinEnd" && (t(12, S = !0), t(18, Q = !1));
  };
  bt(() => (T = setInterval(
    () => {
      t(36, L = Date.now());
    },
    6e4
  ), window.addEventListener("message", H), () => {
    window.removeEventListener("message", H), T && clearInterval(T);
  }));
  const K = () => t(19, x = !0), lt = () => t(19, x = !1), at = () => t(14, G = ""), rt = () => ge("Assign"), ot = () => ge("Reject"), mt = () => t(14, G = "confirmReject"), ct = () => {
    y?.current?.remainingTimes === 0 && ["success", "noprize", "success-draw"].includes(D) ? oe() : (t(12, S = !1), t(14, G = ""), window.postMessage({ type: "PrizeResultClose" }, "*"));
  };
  function pt(m) {
    yt[m ? "unshift" : "push"](() => {
      N = m, t(11, N);
    });
  }
  return A.$$set = (m) => {
    "data" in m && t(32, f = m.data), "endpoint" in m && t(0, g = m.endpoint), "session" in m && t(1, d = m.session), "lang" in m && t(2, v = m.lang), "clientstyling" in m && t(3, w = m.clientstyling), "clientstylingurl" in m && t(4, M = m.clientstylingurl), "translationurl" in m && t(5, E = m.translationurl), "mbsource" in m && t(6, ee = m.mbsource), "twostepdraw" in m && t(33, W = m.twostepdraw), "terms" in m && t(7, q = m.terms), "luckywheelsize" in m && t(8, ie = m.luckywheelsize), "luckywheelmobilesize" in m && t(9, re = m.luckywheelmobilesize), "programs" in m && t(34, U = m.programs);
  }, A.$$.update = () => {
    if (A.$$.dirty[1] & /*data*/
    2)
      if (typeof f == "string")
        try {
          t(10, y = JSON.parse(f));
        } catch (m) {
          console.error("[PrizeDetails] Parse failed", m);
        }
      else
        t(10, y = f);
    A.$$.dirty[0] & /*activeGame*/
    1024 | A.$$.dirty[1] & /*now*/
    32 && t(23, i = y?.current?.expiryTime ? b(y.current.expiryTime, L) : ""), A.$$.dirty[0] & /*translationurl*/
    32 && E && he(E), A.$$.dirty[0] & /*lang*/
    4 && v && Wt(v), A.$$.dirty[0] & /*activeGame*/
    1024 && y?.translations && Object.keys(y.translations).forEach((m) => {
      ze(m, y.translations[m]);
    }), A.$$.dirty[0] & /*clientstyling, rootContainer*/
    2056 && w && N && kt(N, w), A.$$.dirty[0] & /*clientstylingurl, rootContainer*/
    2064 && M && N && Bt(N, M), A.$$.dirty[0] & /*mbsource, rootContainer*/
    2112 && ee && N && Ct(N, `${ee}.Style`, AA), A.$$.dirty[0] & /*activeGame*/
    1024 && t(15, s = y?.program?.type), A.$$.dirty[0] & /*activeGame*/
    1024 && t(22, l = Number(y?.program?.metadata?.template) || 0), A.$$.dirty[0] & /*isMessageShown, internalMode, $_, messageMode*/
    94208 | A.$$.dirty[1] & /*messageValue*/
    16 && t(21, n = (() => {
      if (!S)
        return null;
      if (G === "confirmReject")
        return {
          key: "confirmReject",
          image: xt,
          title: a("AreYouSure"),
          text: a("RejectWarningText")
        };
      switch (D) {
        case "error":
          return {
            key: "error",
            image: jt,
            title: a("DrawFailed")
          };
        case "noprize":
          return {
            key: "noprize",
            image: It,
            title: a("NoPrizeTitle"),
            text: J?.text || a("NoPrize")
          };
        case "gift":
        case "success-draw":
          return {
            key: D,
            image: J?.image || Pt,
            title: a("Congratulation"),
            text: J?.text || a("Success", {
              values: { prize: J?.bold || "" }
            })
          };
        case "success":
          return {
            key: "success",
            image: Xt,
            text: a("RewardIssued")
          };
        case "show-next":
          return {
            key: "show-next",
            text: a("ShowNext", {
              values: {
                startTime: J?.startTime,
                name: J?.name
              }
            })
          };
        case "no-next":
          return { key: "no-next", text: a("NoNext") };
        default:
          return null;
      }
    })()), A.$$.dirty[0] & /*$_, gameType, activeGame*/
    99328 && t(20, o = (() => {
      let m = a("Play");
      return s === "wheelOfFortune" ? m = a("Spin") : s === "flipCoin" ? m = a("FlipCoin") : s === "mysteryChest" && (m = a("OpenChest")), {
        base: m,
        count: y?.current?.remainingTimes || 0
      };
    })());
  }, [
    g,
    d,
    v,
    w,
    M,
    E,
    ee,
    q,
    ie,
    re,
    y,
    N,
    S,
    D,
    G,
    s,
    a,
    X,
    Q,
    x,
    o,
    n,
    l,
    i,
    se,
    de,
    oe,
    V,
    ge,
    F,
    O,
    Z,
    f,
    W,
    U,
    J,
    L,
    K,
    lt,
    at,
    rt,
    ot,
    mt,
    ct,
    pt
  ];
}
class sA extends dt {
  constructor(e) {
    super(), ht(
      this,
      e,
      iA,
      tA,
      ke,
      {
        data: 32,
        endpoint: 0,
        session: 1,
        lang: 2,
        clientstyling: 3,
        clientstylingurl: 4,
        translationurl: 5,
        mbsource: 6,
        twostepdraw: 33,
        terms: 7,
        luckywheelsize: 8,
        luckywheelmobilesize: 9,
        programs: 34
      },
      Nt,
      [-1, -1, -1]
    );
  }
  get data() {
    return this.$$.ctx[32];
  }
  set data(e) {
    this.$$set({ data: e }), $();
  }
  get endpoint() {
    return this.$$.ctx[0];
  }
  set endpoint(e) {
    this.$$set({ endpoint: e }), $();
  }
  get session() {
    return this.$$.ctx[1];
  }
  set session(e) {
    this.$$set({ session: e }), $();
  }
  get lang() {
    return this.$$.ctx[2];
  }
  set lang(e) {
    this.$$set({ lang: e }), $();
  }
  get clientstyling() {
    return this.$$.ctx[3];
  }
  set clientstyling(e) {
    this.$$set({ clientstyling: e }), $();
  }
  get clientstylingurl() {
    return this.$$.ctx[4];
  }
  set clientstylingurl(e) {
    this.$$set({ clientstylingurl: e }), $();
  }
  get translationurl() {
    return this.$$.ctx[5];
  }
  set translationurl(e) {
    this.$$set({ translationurl: e }), $();
  }
  get mbsource() {
    return this.$$.ctx[6];
  }
  set mbsource(e) {
    this.$$set({ mbsource: e }), $();
  }
  get twostepdraw() {
    return this.$$.ctx[33];
  }
  set twostepdraw(e) {
    this.$$set({ twostepdraw: e }), $();
  }
  get terms() {
    return this.$$.ctx[7];
  }
  set terms(e) {
    this.$$set({ terms: e }), $();
  }
  get luckywheelsize() {
    return this.$$.ctx[8];
  }
  set luckywheelsize(e) {
    this.$$set({ luckywheelsize: e }), $();
  }
  get luckywheelmobilesize() {
    return this.$$.ctx[9];
  }
  set luckywheelmobilesize(e) {
    this.$$set({ luckywheelmobilesize: e }), $();
  }
  get programs() {
    return this.$$.ctx[34];
  }
  set programs(e) {
    this.$$set({ programs: e }), $();
  }
}
customElements.define("prize-engine-details", Mt(sA, { data: {}, endpoint: {}, session: {}, lang: {}, clientstyling: {}, clientstylingurl: {}, translationurl: {}, mbsource: {}, twostepdraw: {}, terms: {}, luckywheelsize: {}, luckywheelmobilesize: {}, programs: {} }, [], [], !0));
export {
  sA as default
};
