@everymatrix/player-challenges 0.1.29 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/{ArrowLeftIcon-CN8fnRp8.js → ArrowLeftIcon-3qrKAvdj.js} +1 -1
- package/components/{ArrowLeftIcon-CZ3gGRB3.cjs → ArrowLeftIcon-DfIi_ild.cjs} +1 -1
- package/components/{Badge-CoQkNOLz.cjs → Badge-DFveO0N2.cjs} +1 -1
- package/components/{Badge-f3CAHZz-.js → Badge-UAilzVOG.js} +1 -1
- package/components/{Button-CDZljoNz.js → Button-CzKbnOcC.js} +1 -1
- package/components/{Button-DC3uGF37.cjs → Button-DYIKg1bw.cjs} +1 -1
- package/components/{ChallengeBanner-1-AkmUgP.cjs → ChallengeBanner-CLOInO3g.cjs} +1 -1
- package/components/{ChallengeBanner-DCn4hf4t.js → ChallengeBanner-IgIai24t.js} +2 -2
- package/components/{ChallengeBreadcrumbs-CacWSV7H.cjs → ChallengeBreadcrumbs-BTbBzzQ7.cjs} +1 -1
- package/components/{ChallengeBreadcrumbs-DUmyey3m.js → ChallengeBreadcrumbs-CJtVYxk1.js} +2 -2
- package/components/{ChallengeCard-BV24m-Jd.cjs → ChallengeCard-Bgbcplkq.cjs} +1 -1
- package/components/{ChallengeCard-C6X1e4Qz.js → ChallengeCard-eycA-QQR.js} +11 -11
- package/components/{ChallengeClaimCode-CNt8hEwc.js → ChallengeClaimCode-7_t0VrV1.js} +1 -1
- package/components/{ChallengeClaimCode-CubjEAcf.cjs → ChallengeClaimCode-_w823IPm.cjs} +1 -1
- package/components/ChallengeDetails-DG09x6Eu.cjs +5 -0
- package/components/ChallengeDetails-DIlswoao.js +455 -0
- package/components/{ChallengeDetailsSkeleton-Bbi5XeY4.cjs → ChallengeDetailsSkeleton--laE6pYH.cjs} +1 -1
- package/components/{ChallengeDetailsSkeleton-vgCYWjlo.js → ChallengeDetailsSkeleton-M5rC4gwT.js} +1 -1
- package/components/{ChallengeEvents-Cjz4tswW.js → ChallengeEvents-B3Bzqtoo.js} +2 -2
- package/components/{ChallengeEvents-xYQkjebV.cjs → ChallengeEvents-eIpuL6Yk.cjs} +1 -1
- package/components/ChallengeGames-B8Vm2L5G.cjs +14 -0
- package/components/ChallengeGames-L5TQ1wVu.js +164 -0
- package/components/{ChallengeHistory-BbxTXHG4.cjs → ChallengeHistory-CfySyCJf.cjs} +1 -1
- package/components/{ChallengeHistory-BOj5whNg.js → ChallengeHistory-Cpr3ZtU1.js} +6 -6
- package/components/{ChallengeLevels-BCgo1i-P.js → ChallengeLevels-BcKvLTo3.js} +7 -7
- package/components/{ChallengeLevels-D3LWKkQS.cjs → ChallengeLevels-h_sq1iMg.cjs} +1 -1
- package/components/{ChallengeList-SN9hvo6q.cjs → ChallengeList-BdM811gO.cjs} +1 -1
- package/components/{ChallengeList-CHz5ZFfn.js → ChallengeList-DynA4UU9.js} +3 -3
- package/components/{ChallengeProgress-DMfpLlh1.cjs → ChallengeProgress-Dg6HSNMv.cjs} +1 -1
- package/components/{ChallengeProgress-Bod6fqEG.js → ChallengeProgress-NWAKjOv2.js} +2 -2
- package/components/{ChallengeProgressItem--DFpxTS8.cjs → ChallengeProgressItem-Cxzfd65S.cjs} +1 -1
- package/components/{ChallengeProgressItem-DVzUDYfl.js → ChallengeProgressItem-D44UERwx.js} +4 -4
- package/components/{ChallengeRules-BsTHkcok.cjs → ChallengeRules-CoSSDWCX.cjs} +1 -1
- package/components/{ChallengeRules-DNTBzq1F.js → ChallengeRules-CyKZ9sRh.js} +3 -3
- package/components/{ChallengeSummary-CdvUiACN.cjs → ChallengeSummary-B4Vp1cu8.cjs} +1 -1
- package/components/{ChallengeSummary-Cx9h7OMj.js → ChallengeSummary-BoDIsHBs.js} +6 -6
- package/components/{ChallengeTabContent-DWV_gXFX.js → ChallengeTabContent-DjqSySNS.js} +4 -4
- package/components/{ChallengeTabContent-DR6EJPzq.cjs → ChallengeTabContent-qwpLkxSQ.cjs} +1 -1
- package/components/{ChallengeTabPanel-jE8C4Q5r.js → ChallengeTabPanel-DFXF6VqV.js} +54 -44
- package/components/ChallengeTabPanel-DYPhrVRz.cjs +1 -0
- package/components/ChallengeTabs-B5g-SF2b.cjs +16 -0
- package/components/{ChallengeTabs-BYF7WY5P.js → ChallengeTabs-_vjQrF0A.js} +2573 -2547
- package/components/{CheckIcon-C2GpI-L5.cjs → CheckIcon-0LtHk7fE.cjs} +1 -1
- package/components/{CheckIcon-Bl4pZuZP.js → CheckIcon-BfH-d7h_.js} +1 -1
- package/components/{ChevronIcon-CX6qrx3X.cjs → ChevronIcon-BfZDLe6C.cjs} +1 -1
- package/components/{ChevronIcon-AmqjeKSO.js → ChevronIcon-D-mzPrXJ.js} +1 -1
- package/components/{ChipIcon-B7uOkRi1.js → ChipIcon-BAasRRs4.js} +1 -1
- package/components/{ChipIcon-B2yaPI-s.cjs → ChipIcon-ChCUc7Ro.cjs} +1 -1
- package/components/{ChipShineIcon-DBJlgZQk.cjs → ChipShineIcon-BiuHUnXR.cjs} +1 -1
- package/components/{ChipShineIcon-Ds9EEhmb.js → ChipShineIcon-CoeUovBC.js} +1 -1
- package/components/{ExistIcon-CWyY8R3Y.cjs → ExistIcon-CfsNk2my.cjs} +1 -1
- package/components/{ExistIcon-DgXqZa1S.js → ExistIcon-Dv8paf_U.js} +1 -1
- package/components/{GiftIcon-Z9tIE34i.cjs → GiftIcon-BH735MXR.cjs} +1 -1
- package/components/{GiftIcon-BjXXGhso.js → GiftIcon-Mnb_Nxbd.js} +1 -1
- package/components/{LinkIcon-Q21sEvwx.js → LinkIcon-DiVYY9ci.js} +1 -1
- package/components/{LinkIcon-CtURiIc0.cjs → LinkIcon-Du4_pcZZ.cjs} +1 -1
- package/components/{LockIcon-B04vlajd.js → LockIcon-KP_pUGJo.js} +1 -1
- package/components/{LockIcon-CnUh5OJU.cjs → LockIcon-QA92rEFW.cjs} +1 -1
- package/components/{Pagination-DHDCvM8U.js → Pagination-DQklVx0w.js} +1 -1
- package/components/{Pagination-DKoBrsEV.cjs → Pagination-DfqNdchM.cjs} +1 -1
- package/components/PlayerChallenges-BVshv0hR.cjs +1 -0
- package/components/{PlayerChallenges-sVHaxkEo.js → PlayerChallenges-Cj6-v75C.js} +167 -154
- package/components/{StarIcon-DvSZN2ZN.js → StarIcon-DTSu1OOQ.js} +1 -1
- package/components/{StarIcon-CsFTNsW6.cjs → StarIcon-DturCxI3.cjs} +1 -1
- package/components/{TargetIcon-Bar3gCh5.cjs → TargetIcon-BlVaf2Xr.cjs} +1 -1
- package/components/{TargetIcon-DZRz2KNP.js → TargetIcon-CJJKDeVK.js} +1 -1
- package/components/{helpers-jidkTB_0.js → helpers-B2y_AV0y.js} +1 -1
- package/components/{helpers-D0ruQkxz.cjs → helpers-BmTQLAcy.cjs} +1 -1
- package/esnext/player-challenges.cjs +1 -1
- package/esnext/player-challenges.js +2 -2
- package/package.json +1 -1
- package/components/ChallengeDetails-6jIXM6l5.cjs +0 -5
- package/components/ChallengeDetails-CohHYoAu.js +0 -445
- package/components/ChallengeGames-BMzPkFEG.cjs +0 -14
- package/components/ChallengeGames-Bb9-sCGS.js +0 -153
- package/components/ChallengeTabPanel-CrOPWNMt.cjs +0 -1
- package/components/ChallengeTabs-CW3EEpFo.cjs +0 -16
- package/components/PlayerChallenges-DRa1KyWF.cjs +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as i, p as n, t as f, a as p, b as d, f as u, d as h, e as g, s as a } from "./ChallengeTabs-
|
|
1
|
+
import { c as i, p as n, t as f, a as p, b as d, f as u, d as h, e as g, s as a } from "./ChallengeTabs-_vjQrF0A.js";
|
|
2
2
|
typeof globalThis.HTMLElement > "u" && (globalThis.HTMLElement = class {
|
|
3
3
|
}, globalThis.customElements = { define() {
|
|
4
4
|
}, get() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
typeof globalThis.HTMLElement>"u"&&(globalThis.HTMLElement=class{},globalThis.customElements={define(){},get(){},whenDefined(){}});const e=require("./ChallengeTabs-
|
|
1
|
+
typeof globalThis.HTMLElement>"u"&&(globalThis.HTMLElement=class{},globalThis.customElements={define(){},get(){},whenDefined(){}});const e=require("./ChallengeTabs-B5g-SF2b.cjs");var a=e.from_svg('<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" aria-hidden="true"><path fill-rule="evenodd" clip-rule="evenodd" d="M19 11H7.83l4.88-4.88a1 1 0 10-1.42-1.42l-6.59 6.59a1 1 0 000 1.42l6.59 6.59a1 1 0 001.42-1.42L7.83 13H19a1 1 0 000-2z" fill="currentColor"></path></svg>');function r(s,n){e.push(n,!0);let t=e.prop(n,"size",7,24);var o={get size(){return t()},set size(i=24){t(i),e.flushSync()}},l=a();return e.template_effect(()=>{e.set_attribute(l,"width",t()),e.set_attribute(l,"height",t())}),e.append(s,l),e.pop(o)}e.create_custom_element(r,{size:{}},[],[],{mode:"open"});exports.ArrowLeftIcon=r;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
typeof globalThis.HTMLElement>"u"&&(globalThis.HTMLElement=class{},globalThis.customElements={define(){},get(){},whenDefined(){}});const e=require("./ChallengeTabs-
|
|
1
|
+
typeof globalThis.HTMLElement>"u"&&(globalThis.HTMLElement=class{},globalThis.customElements={define(){},get(){},whenDefined(){}});const e=require("./ChallengeTabs-B5g-SF2b.cjs");var A=e.from_html('<span class="timer-date svelte-tfkqbj"> </span>'),F=e.from_html('<span class="timer-label svelte-tfkqbj"> </span> <span class="timer-dash svelte-tfkqbj"></span> <span class="timer-countdown"> </span>',1),J=e.from_html('<div class="timer svelte-tfkqbj"><!> <!></div>'),K=e.from_html('<div class="challenge-badge svelte-tfkqbj"><div class="status-pill svelte-tfkqbj"><span></span> <span class="status-label svelte-tfkqbj"> </span></div> <!></div>');const O={hash:"svelte-tfkqbj",code:`.challenge-badge.svelte-tfkqbj {box-sizing:border-box;display:flex;flex-direction:row;align-items:center;padding:2px 8px 2px 2px;gap:6px;position:relative;background-color:var(--alpha-white-10, rgba(0, 0, 0, 0.3));border:1px solid var(--alpha-white-25, rgba(251, 251, 251, 0.2));backdrop-filter:blur(10px);border-radius:100px;width:fit-content;height:25px;&[data-status='scheduled'],
|
|
2
2
|
&[data-status='ongoing'],
|
|
3
3
|
&[data-status='paused'] {background-color:var(--alpha-white-10, rgba(251, 251, 251, 0.1));}.status-pill:where(.svelte-tfkqbj) {box-sizing:border-box;display:flex;align-items:center;gap:4px;padding:2px 8px 2px 6px;border-radius:20px;border:0.8px solid var(--alpha-white-25, rgba(251, 251, 251, 0.2));box-shadow:0px 0.83px 1.66px 0px rgba(16, 24, 40, 0.05);background-color:var(--alpha-black-20, rgba(0, 0, 0, 0.2));height:21px;.dot-status:where(.svelte-tfkqbj) {width:5px;height:5px;border-radius:50%;flex-shrink:0;transition:background 0.2s ease,
|
|
4
4
|
box-shadow 0.2s ease;&.new,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as Z, d as ee, h as ae, p as d, w as te, x as se, y as re, z as ne, A as j, t as q, B as e, s as D, D as oe, i as v, a as h, b as le, k as x, l as de, $ as ie, E as y, n as T, F as f, e as i, m as ce, G as pe, H as ue, I as ge, o as c, r as E, J as be, K as ve } from "./ChallengeTabs-
|
|
1
|
+
import { c as Z, d as ee, h as ae, p as d, w as te, x as se, y as re, z as ne, A as j, t as q, B as e, s as D, D as oe, i as v, a as h, b as le, k as x, l as de, $ as ie, E as y, n as T, F as f, e as i, m as ce, G as pe, H as ue, I as ge, o as c, r as E, J as be, K as ve } from "./ChallengeTabs-_vjQrF0A.js";
|
|
2
2
|
typeof globalThis.HTMLElement > "u" && (globalThis.HTMLElement = class {
|
|
3
3
|
}, globalThis.customElements = { define() {
|
|
4
4
|
}, get() {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { g as y, c as v, d as m, h, p as r, w as k, x as _, y as w, G as T, t as E, s as L, i as j, j as z, a as B, b as H, k as M, l as $, $ as D, F, e as o, m as G } from "./ChallengeTabs-
|
|
1
|
+
import { g as y, c as v, d as m, h, p as r, w as k, x as _, y as w, G as T, t as E, s as L, i as j, j as z, a as B, b as H, k as M, l as $, $ as D, F, e as o, m as G } from "./ChallengeTabs-_vjQrF0A.js";
|
|
2
2
|
typeof globalThis.HTMLElement > "u" && (globalThis.HTMLElement = class {
|
|
3
3
|
}, globalThis.customElements = { define() {
|
|
4
4
|
}, get() {
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
typeof globalThis.HTMLElement>"u"&&(globalThis.HTMLElement=class{},globalThis.customElements={define(){},get(){},whenDefined(){}});const e=require("./ChallengeTabs-
|
|
1
|
+
typeof globalThis.HTMLElement>"u"&&(globalThis.HTMLElement=class{},globalThis.customElements={define(){},get(){},whenDefined(){}});const e=require("./ChallengeTabs-B5g-SF2b.cjs");var x=e.from_html('<button class="challenge-button svelte-166ic7y"> </button>');const v={hash:"svelte-166ic7y",code:`.challenge-button.svelte-166ic7y {box-sizing:border-box;&:disabled {opacity:0.5;cursor:default;}display:flex;flex-direction:row;justify-content:center;align-items:center;padding:8px 16px;gap:10px;width:80px;height:37px;border-radius:6px;font-size:13px;font-weight:600;line-height:1;cursor:pointer;transition:background 0.15s ease,
|
|
2
2
|
border-color 0.15s ease,
|
|
3
3
|
opacity 0.15s ease;flex:none;order:1;flex-grow:0;&:hover {opacity:0.9;}&:active {opacity:0.8;}&:disabled {opacity:0.4;cursor:not-allowed;}&[data-variant='primary'] {background:var(--button-primary-bg-default, #ffcc00);border:none;color:var(--button-primary-text-default, rgba(38, 29, 0, 1));}&[data-variant='secondary'] {background:var(--button-secondary-bg-default, rgba(251, 251, 251, 0.1));border:1px solid var(--button-secondary-border-default, rgba(251, 251, 251, 0.05));backdrop-filter:blur(16.15px);color:var(--button-secondary-text-default, rgba(255, 255, 255, 1));align-self:stretch;}&[data-variant='accent'] {background:var(--button-primary-icon-disabled, rgba(251, 251, 251, 0.15));border:1px solid var(--button-primary-bg-default, #ffcc00);backdrop-filter:blur(16.15px);color:var(--button-secondary-text-default, rgba(255, 255, 255, 1));}}`};function d(s,a){e.push(a,!0),e.append_styles(s,v);const u=()=>e.store_get(e.$format,"$_",b),[b,p]=e.setup_stores(),n=e.prop(a,"variant",7,"primary"),l=e.prop(a,"text",7),o=e.prop(a,"locale",7,""),c=e.prop(a,"disabled",7,!1),i=e.prop(a,"onclick",7);e.untrack(()=>e.initI18n(o())),e.user_effect(()=>{e.setLocale(o()||"en")});var f={get variant(){return n()},set variant(t="primary"){n(t),e.flushSync()},get text(){return l()},set text(t){l(t),e.flushSync()},get locale(){return o()},set locale(t=""){o(t),e.flushSync()},get disabled(){return c()},set disabled(t=!1){c(t),e.flushSync()},get onclick(){return i()},set onclick(t){i(t),e.flushSync()}},r=x(),g=e.only_child(r,!0);e.template_effect(t=>{e.set_attribute(r,"data-variant",n()),r.disabled=c(),e.set_text(g,t)},[()=>u()(l())]),e.delegated("click",r,function(...t){i()?.apply(this,t)}),e.append(s,r);var y=e.pop(f);return p(),y}e.delegate(["click"]);e.create_custom_element(d,{variant:{},text:{},locale:{},disabled:{},onclick:{}},[],[],{mode:"open"});exports.Button=d;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
typeof globalThis.HTMLElement>"u"&&(globalThis.HTMLElement=class{},globalThis.customElements={define(){},get(){},whenDefined(){}});const e=require("./ChallengeTabs-
|
|
1
|
+
typeof globalThis.HTMLElement>"u"&&(globalThis.HTMLElement=class{},globalThis.customElements={define(){},get(){},whenDefined(){}});const e=require("./ChallengeTabs-B5g-SF2b.cjs"),U=require("./Badge-DFveO0N2.cjs"),D=require("./img-placeholder-DhbIx3rU.cjs");var H=e.from_html('<div class="challenge-details__banner--scrim svelte-178u6lo" aria-hidden="true"></div>'),M=e.from_html('<div class="challenge-details__banner--new-icon svelte-178u6lo"><img alt="" aria-hidden="true" class="svelte-178u6lo"/></div>'),z=e.from_html('<div class="challenge-details__banner svelte-178u6lo"><div class="challenge-details__banner--overlay svelte-178u6lo"><!></div> <!> <!> <img/></div>');const F={hash:"svelte-178u6lo",code:`.challenge-details__banner.svelte-178u6lo {position:relative;width:100%;border-radius:12px;overflow:hidden;.challenge-details__banner--overlay:where(.svelte-178u6lo) {position:absolute;top:12px;left:12px;z-index:1;}.challenge-details__banner--image:where(.svelte-178u6lo) {display:block;width:100%;height:340px;object-fit:cover;}.challenge-details__banner--inactive:where(.svelte-178u6lo) {filter:grayscale(1) brightness(0.45);}.challenge-details__banner--scrim:where(.svelte-178u6lo) {position:absolute;inset:0;pointer-events:none;background:linear-gradient(180deg, rgba(10, 12, 24, 0) 50%, #0a0c18 100%),
|
|
2
2
|
linear-gradient(0deg, rgba(10, 12, 24, 0.6), rgba(10, 12, 24, 0.6));backdrop-filter:blur(2px);-webkit-backdrop-filter:blur(2px);}.challenge-details__banner--placeholder:where(.svelte-178u6lo) {object-fit:contain;background:var(--bg-overlay-neutral-level-1, rgba(251, 251, 251, 0.05));}
|
|
3
3
|
|
|
4
4
|
@media (max-width: 767px) {.challenge-details__banner--image:where(.svelte-178u6lo) {height:140px;}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { c as J, d as K, h as V, p as v, L as W, w as X, B as e, A as N, t as E, M as Y, a as _, b as Z, k as f, E as t, N as L, O as $, n as j, e as b, r as D, o as p, D as ee, s as m, P as ae, Q as te, R as le, H as se, F as ne, S as re } from "./ChallengeTabs-
|
|
2
|
-
import { B as ie } from "./Badge-
|
|
1
|
+
import { c as J, d as K, h as V, p as v, L as W, w as X, B as e, A as N, t as E, M as Y, a as _, b as Z, k as f, E as t, N as L, O as $, n as j, e as b, r as D, o as p, D as ee, s as m, P as ae, Q as te, R as le, H as se, F as ne, S as re } from "./ChallengeTabs-_vjQrF0A.js";
|
|
2
|
+
import { B as ie } from "./Badge-UAilzVOG.js";
|
|
3
3
|
import { P as oe } from "./img-placeholder-BP1dw7Jq.js";
|
|
4
4
|
typeof globalThis.HTMLElement > "u" && (globalThis.HTMLElement = class {
|
|
5
5
|
}, globalThis.customElements = { define() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
typeof globalThis.HTMLElement>"u"&&(globalThis.HTMLElement=class{},globalThis.customElements={define(){},get(){},whenDefined(){}});const e=require("./ChallengeTabs-
|
|
1
|
+
typeof globalThis.HTMLElement>"u"&&(globalThis.HTMLElement=class{},globalThis.customElements={define(){},get(){},whenDefined(){}});const e=require("./ChallengeTabs-B5g-SF2b.cjs"),v=require("./ArrowLeftIcon-DfIi_ild.cjs");var m=e.from_html('<nav class="player-challenges__breadcrumbs svelte-ca3bk6"><button type="button" class="player-challenges__breadcrumb-back svelte-ca3bk6"><span class="player-challenges__breadcrumb-back-icon svelte-ca3bk6" aria-hidden="true"><!></span> </button></nav>');const _={hash:"svelte-ca3bk6",code:".player-challenges__breadcrumbs.svelte-ca3bk6 {display:flex;align-items:center;gap:13px;font-size:12px;min-width:0;padding:8px 12px;border-radius:6px;background:var(--app-container-default, rgba(2, 38, 82, 1));}.player-challenges__breadcrumb-back.svelte-ca3bk6 {display:inline-flex;align-items:center;gap:4px;padding:0;border:0;background:transparent;color:var(--text-default, rgba(255, 255, 255, 1));font-size:14px;font-weight:500;cursor:pointer;&:hover {color:var(--text-default, rgba(223, 227, 232, 1));}&:focus-visible {outline:2px solid var(--border-info, rgba(110, 181, 255, 1));outline-offset:2px;}}.player-challenges__breadcrumb-back-icon.svelte-ca3bk6 {display:flex;border-radius:100%;background:var(--bg-overlay-neutral-level-1, rgba(251, 251, 251, 0.15));width:24px;height:24px;align-items:center;justify-content:center;color:var(--icon-default, rgba(255, 255, 255, 1));font-weight:500;}"};function i(s,c){e.push(c,!0),e.append_styles(s,_);const o=()=>e.store_get(e.$format,"$_",b),[b,p]=e.setup_stores(),r=e.prop(c,"onBack",7);var d={get onBack(){return r()},set onBack(a){r(a),e.flushSync()}},t=m(),l=e.child(t),n=e.child(l),u=e.child(n);v.ArrowLeftIcon(u,{size:16}),e.reset(n);var g=e.sibling(n);e.reset(l),e.reset(t),e.template_effect((a,f)=>{e.set_attribute(t,"aria-label",a),e.set_text(g,` ${f??""}`)},[()=>o()("allChallenges"),()=>o()("allChallenges")]),e.delegated("click",l,function(...a){r()?.apply(this,a)}),e.append(s,t);var h=e.pop(d);return p(),h}e.delegate(["click"]);e.create_custom_element(i,{onBack:{}},[],[],{mode:"open"});exports.ChallengeBreadcrumbs=i;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { g as v, c as m, d as _, h as k, p as x, t as y, s as $, i as w, j as B, a as T, b as C, k as z, l as E, e as L, m as j, $ as A, n as l, r as n, o as H } from "./ChallengeTabs-
|
|
2
|
-
import { A as M } from "./ArrowLeftIcon-
|
|
1
|
+
import { g as v, c as m, d as _, h as k, p as x, t as y, s as $, i as w, j as B, a as T, b as C, k as z, l as E, e as L, m as j, $ as A, n as l, r as n, o as H } from "./ChallengeTabs-_vjQrF0A.js";
|
|
2
|
+
import { A as M } from "./ArrowLeftIcon-3qrKAvdj.js";
|
|
3
3
|
typeof globalThis.HTMLElement > "u" && (globalThis.HTMLElement = class {
|
|
4
4
|
}, globalThis.customElements = { define() {
|
|
5
5
|
}, get() {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
typeof globalThis.HTMLElement>"u"&&(globalThis.HTMLElement=class{},globalThis.customElements={define(){},get(){},whenDefined(){}});const e=require("./ChallengeTabs-
|
|
1
|
+
typeof globalThis.HTMLElement>"u"&&(globalThis.HTMLElement=class{},globalThis.customElements={define(){},get(){},whenDefined(){}});const e=require("./ChallengeTabs-B5g-SF2b.cjs"),bt=require("./Badge-DFveO0N2.cjs"),ft=require("./Button-DYIKg1bw.cjs"),xt=require("./ChevronIcon-BfZDLe6C.cjs"),yt=require("./GiftIcon-BH735MXR.cjs"),mt=require("./LinkIcon-Du4_pcZZ.cjs"),wt=require("./StarIcon-DturCxI3.cjs"),zt=require("./TargetIcon-BlVaf2Xr.cjs"),Ct=require("./ChallengeDetails-DG09x6Eu.cjs"),St=require("./helpers-BmTQLAcy.cjs"),kt=require("./ChallengeProgress-Dg6HSNMv.cjs"),It=require("./translations-FyoqR3gH.cjs");var Pt=e.from_html('<div class="challenge-card__image-scrim svelte-1g1ytgz" aria-hidden="true"></div>'),Dt=e.from_html('<div class="challenge-card__new-icon svelte-1g1ytgz"><img alt="" aria-hidden="true" class="svelte-1g1ytgz"/></div>'),Tt=e.from_html("<img/>"),Nt=e.from_html('<li class="challenge-card__info-row svelte-1g1ytgz"><span class="challenge-card__info-icon svelte-1g1ytgz" aria-hidden="true"><!></span> <span class="challenge-card__info-label svelte-1g1ytgz"> </span> <span class="challenge-card__info-value svelte-1g1ytgz"> </span></li>'),qt=e.from_html('<div class="challenge-card__details-expanded svelte-1g1ytgz"><!></div>'),Lt=e.from_html('<div class="challenge-card svelte-1g1ytgz"><div class="challenge-card__header svelte-1g1ytgz"><!> <div><div class="challenge-card__badge svelte-1g1ytgz"><!></div></div> <!> <img/></div> <div class="challenge-card__content svelte-1g1ytgz"><div class="challenge-card__content--header svelte-1g1ytgz"><!> <h3 class="challenge-card__title svelte-1g1ytgz"> </h3></div> <ul class="challenge-card__info-list svelte-1g1ytgz"><li class="challenge-card__info-row svelte-1g1ytgz"><span class="challenge-card__info-icon svelte-1g1ytgz" aria-hidden="true"><!></span> <span class="challenge-card__info-label svelte-1g1ytgz"> </span> <span class="challenge-card__info-value svelte-1g1ytgz"> </span></li> <!> <li class="challenge-card__info-row svelte-1g1ytgz"><span class="challenge-card__info-icon svelte-1g1ytgz" aria-hidden="true"><!></span> <span class="challenge-card__info-label svelte-1g1ytgz"> </span> <span class="challenge-card__info-value svelte-1g1ytgz"> </span></li></ul> <p class="challenge-card__terms svelte-1g1ytgz"><a target="_blank" rel="noopener noreferrer" class="challenge-card__terms--link svelte-1g1ytgz"> <span class="challenge-card__terms--icon svelte-1g1ytgz" aria-hidden="true"><!></span></a> </p></div> <div class="challenge-card__challenge--progress svelte-1g1ytgz"><!></div> <div class="challenge-card__footer svelte-1g1ytgz"><div class="challenge-card__footer-action-button svelte-1g1ytgz"><button><span class="svelte-1g1ytgz"> </span> <span><!></span></button> <!></div> <!></div></div>');const Ut={hash:"svelte-1g1ytgz",code:`.challenge-card.svelte-1g1ytgz {box-sizing:border-box;width:100%;max-width:340px;display:flex;flex-direction:column;background:var(--bg-surface-level-1, rgba(2, 38, 82, 1));border:1px solid var(--border-subtle, rgba(251, 251, 251, 0.05));border-radius:8px;padding:12px;gap:16px;:where(.svelte-1g1ytgz) {box-sizing:border-box;}.challenge-card__header:where(.svelte-1g1ytgz) {position:relative;}.challenge-card__overlay:where(.svelte-1g1ytgz) {position:absolute;inset:8px 8px 16px 8px;z-index:2;display:flex;justify-content:space-between;align-items:flex-start;}.challenge-card__badge:where(.svelte-1g1ytgz) {min-width:0;max-width:100%;}.challenge-card__new-icon:where(.svelte-1g1ytgz) {position:absolute;right:8px;top:8px;& img:where(.svelte-1g1ytgz) {width:24px;height:24px;}}.challenge-card__overlay--tagged:where(.svelte-1g1ytgz) {right:48px;}.challenge-card__image:where(.svelte-1g1ytgz) {display:block;width:100%;aspect-ratio:21 / 9;object-fit:cover;height:120px;border:1px solid var(--border-strong, rgba(251, 251, 251, 0.2));border-radius:13px;box-shadow:0px 4px 12.5px 0px rgba(255, 255, 255, 0.15);box-sizing:border-box;}.challenge-card__image--inactive:where(.svelte-1g1ytgz) {filter:grayscale(1) brightness(0.45);}.challenge-card__image--placeholder:where(.svelte-1g1ytgz) {object-fit:contain;background:var(--bg-overlay-neutral-level-1, rgba(251, 251, 251, 0.05));}.challenge-card__image-scrim:where(.svelte-1g1ytgz) {position:absolute;inset:0;border-radius:13px;pointer-events:none;background:linear-gradient(180deg, rgba(10, 12, 24, 0) 50%, #0a0c18 100%),
|
|
2
2
|
linear-gradient(0deg, rgba(10, 12, 24, 0.6), rgba(10, 12, 24, 0.6));box-shadow:0px 4px 12.5px 0px rgba(255, 255, 255, 0.15);backdrop-filter:blur(2px);-webkit-backdrop-filter:blur(2px);}.challenge-card__content:where(.svelte-1g1ytgz) {display:flex;flex-direction:column;gap:12px;}.challenge-card__content--header:where(.svelte-1g1ytgz) {display:flex;justify-content:space-between;align-items:flex-start;gap:8px;}.challenge-card__content--header:where(.svelte-1g1ytgz) img:where(.svelte-1g1ytgz) {flex-shrink:0;}.challenge-card__title:where(.svelte-1g1ytgz) {margin:0;font-size:16px;font-weight:700;font-size:bold;color:var(--text-default, rgba(255, 255, 255, 1));flex:1;}.challenge-card__info-list:where(.svelte-1g1ytgz) {list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:4px;}.challenge-card__info-row:where(.svelte-1g1ytgz) {display:flex;gap:8px;font-size:14px;line-height:1.4;}.challenge-card__info-icon:where(.svelte-1g1ytgz) {display:flex;flex-shrink:0;color:var(--text-subtle, rgba(223, 227, 232, 1));}.challenge-card__info-label:where(.svelte-1g1ytgz) {font-size:12px;font-weight:400;color:var(--text-subtle, rgba(223, 227, 232, 1));flex-shrink:0;}.challenge-card__info-value:where(.svelte-1g1ytgz) {font-size:12px;font-weight:400;color:var(--text-brand, rgba(255, 204, 0, 1));}.challenge-card__terms:where(.svelte-1g1ytgz) {margin:0;font-size:12px;font-weight:400;color:var(--text-subtle, rgba(223, 227, 232, 1));}.challenge-card__terms--link:where(.svelte-1g1ytgz) {display:inline-flex;align-items:center;gap:4px;color:var(--border-info, rgba(110, 181, 255, 1));text-decoration:none;margin-right:4px;border-bottom:1px solid currentColor;}.challenge-card__terms--icon:where(.svelte-1g1ytgz) {display:block;}.challenge-card__details-expanded:where(.svelte-1g1ytgz) {box-sizing:border-box;padding:12px 10px 16px;display:flex;flex-direction:column;align-items:flex-start;gap:16px;background:var(--bg-overlay-neutral-level-1, rgba(251, 251, 251, 0.05));border:1px solid var(--border-subtle, rgba(251, 251, 251, 0.05));border-radius:0px 6px 6px 6px;align-self:stretch;}.challenge-card__footer:where(.svelte-1g1ytgz) {width:100%;}.challenge-card__footer-action-button:where(.svelte-1g1ytgz) {width:100%;display:flex;align-items:stretch;display:flex;gap:8px;}.challenge-card__view-details--button:where(.svelte-1g1ytgz) {flex:1;display:flex;align-items:center;justify-content:space-between;padding:8px 16px 8px 16px;background:var(--button-secondary-bg-default, rgba(251, 251, 251, 0.1));border:1px solid var(--button-secondary-border-default, rgba(251, 251, 251, 0.05));border-radius:6px;color:var(--button-secondary-text-default, rgba(255, 255, 255, 1));font-size:12px;cursor:pointer;backdrop-filter:blur(33px);font-weight:400;height:37px;appearance:none;-webkit-appearance:none;-webkit-tap-highlight-color:transparent;&:focus:not(:focus-visible) {outline:none;}&:active {background:var(--button-secondary-bg-default, rgba(251, 251, 251, 0.1));}}.challenge-card__view-details--button.expanded:where(.svelte-1g1ytgz) {border-width:1px, 1px, 0px, 1px;border-style:solid;border-color:var(--button-secondary-border-default, rgba(251, 251, 251, 0.05));border-radius:6px 6px 0 0;background:var(--bg-overlay-neutral-level-1, rgba(251, 251, 251, 0.05));height:45px;border-bottom:none;}.challenge-card__view-details-icon:where(.svelte-1g1ytgz) {display:flex;transition:transform 0.2s ease;fill:var(--icon-brand, rgba(255, 204, 0, 1));color:var(--icon-brand, rgba(255, 204, 0, 1));}.challenge-card__view-details-icon.expanded:where(.svelte-1g1ytgz) {transform:rotate(180deg);}.challenge-card__challenge--progress:where(.svelte-1g1ytgz) {width:100%;display:flex;
|
|
3
3
|
/* Holds the rail against the footer so it lines up across cards of unequal text height. */margin-top:auto;}}
|
|
4
4
|
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { g as Ba, c as Ma, d as Oa, h as Va, p as g, w as Ve, x as ja, au as Ea, aB as Fa, y as Ga, G as Ra, L as Ha, C as je, A as m, o as r, B as e, t as Q, _ as Qa, D as L, s as y, i as c, M as qa, P as q, j as Ka, a as P, b as Xa, k, n as l, E as t, O as Ya, l as Za, $ as Ja, a2 as Wa, R as de, aN as $a, F as _, V as et, aO as at, ak as tt, aP as Ee, e as d, m as rt, N as lt, X as nt, H as st, r as n, Q as it, Y as ot, Z as gt, a0 as dt, a1 as ct, U as vt, a3 as ut, S as ht, aQ as _t, a4 as pt, af as bt, aR as ft } from "./ChallengeTabs-
|
|
2
|
-
import { B as xt } from "./Badge-
|
|
3
|
-
import { B as mt } from "./Button-
|
|
4
|
-
import { C as yt } from "./ChevronIcon-
|
|
5
|
-
import { G as wt } from "./GiftIcon-
|
|
6
|
-
import { L as zt } from "./LinkIcon-
|
|
7
|
-
import { S as Ct } from "./StarIcon-
|
|
8
|
-
import { T as St } from "./TargetIcon-
|
|
9
|
-
import { C as Pt } from "./ChallengeDetails-
|
|
10
|
-
import { e as kt } from "./helpers-
|
|
11
|
-
import { C as It } from "./ChallengeProgress-
|
|
1
|
+
import { g as Ba, c as Ma, d as Oa, h as Va, p as g, w as Ve, x as ja, au as Ea, aB as Fa, y as Ga, G as Ra, L as Ha, C as je, A as m, o as r, B as e, t as Q, _ as Qa, D as L, s as y, i as c, M as qa, P as q, j as Ka, a as P, b as Xa, k, n as l, E as t, O as Ya, l as Za, $ as Ja, a2 as Wa, R as de, aN as $a, F as _, V as et, aO as at, ak as tt, aP as Ee, e as d, m as rt, N as lt, X as nt, H as st, r as n, Q as it, Y as ot, Z as gt, a0 as dt, a1 as ct, U as vt, a3 as ut, S as ht, aQ as _t, a4 as pt, af as bt, aR as ft } from "./ChallengeTabs-_vjQrF0A.js";
|
|
2
|
+
import { B as xt } from "./Badge-UAilzVOG.js";
|
|
3
|
+
import { B as mt } from "./Button-CzKbnOcC.js";
|
|
4
|
+
import { C as yt } from "./ChevronIcon-D-mzPrXJ.js";
|
|
5
|
+
import { G as wt } from "./GiftIcon-Mnb_Nxbd.js";
|
|
6
|
+
import { L as zt } from "./LinkIcon-DiVYY9ci.js";
|
|
7
|
+
import { S as Ct } from "./StarIcon-DTSu1OOQ.js";
|
|
8
|
+
import { T as St } from "./TargetIcon-CJJKDeVK.js";
|
|
9
|
+
import { C as Pt } from "./ChallengeDetails-DIlswoao.js";
|
|
10
|
+
import { e as kt } from "./helpers-B2y_AV0y.js";
|
|
11
|
+
import { C as It } from "./ChallengeProgress-NWAKjOv2.js";
|
|
12
12
|
import { c as Dt } from "./translations-BSuAza-E.js";
|
|
13
13
|
typeof globalThis.HTMLElement > "u" && (globalThis.HTMLElement = class {
|
|
14
14
|
}, globalThis.customElements = { define() {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { g as pe, c as ue, d as ge, h as ve, p, w as me, x as he, au as fe, aB as _e, y as xe, G as be, aF as ke, A as ye, t as F, a as D, b as we, k as H, e as u, m as Ce, n as L, B as t, r as N, D as U, E as g, F as x, o as z, aG as Ee, i as b, aH as Te, s as M, j as B, l as Ie, $ as Se, R as k, P as n, aI as Ae, an as Fe, ao as K, ap as De, aq as Le } from "./ChallengeTabs-
|
|
1
|
+
import { g as pe, c as ue, d as ge, h as ve, p, w as me, x as he, au as fe, aB as _e, y as xe, G as be, aF as ke, A as ye, t as F, a as D, b as we, k as H, e as u, m as Ce, n as L, B as t, r as N, D as U, E as g, F as x, o as z, aG as Ee, i as b, aH as Te, s as M, j as B, l as Ie, $ as Se, R as k, P as n, aI as Ae, an as Fe, ao as K, ap as De, aq as Le } from "./ChallengeTabs-_vjQrF0A.js";
|
|
2
2
|
import { a as Ne } from "./translations-BSuAza-E.js";
|
|
3
3
|
import { C as Q, b as Ue, c as ze, P as Me } from "./constants-BcSpy2nX.js";
|
|
4
4
|
typeof globalThis.HTMLElement > "u" && (globalThis.HTMLElement = class {
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
typeof globalThis.HTMLElement>"u"&&(globalThis.HTMLElement=class{},globalThis.customElements={define(){},get(){},whenDefined(){}});const e=require("./ChallengeTabs-
|
|
1
|
+
typeof globalThis.HTMLElement>"u"&&(globalThis.HTMLElement=class{},globalThis.customElements={define(){},get(){},whenDefined(){}});const e=require("./ChallengeTabs-B5g-SF2b.cjs"),Q=require("./translations-FyoqR3gH.cjs"),d=require("./constants-DjpdyteO.cjs");var W=e.from_html('<div class="challenge-claim-code__container svelte-19pv5fk"><p class="challenge-claim-code__title svelte-19pv5fk"> </p> <div class="challenge-claim-code__content svelte-19pv5fk"><input id="challenge-claim-code-input" name="claimCode" type="text"/> <p> </p></div> <button class="challenge-claim-code__button svelte-19pv5fk"> </button></div>'),Y=e.from_html('<p class="challenge-claim-code__anonymous svelte-19pv5fk"> </p>'),Z=e.from_html("<div><!></div>");const $={hash:"svelte-19pv5fk",code:`.challenge-claim-code.svelte-19pv5fk {width:100%;display:flex;justify-content:center;margin-top:100px;.challenge-claim-code__container:where(.svelte-19pv5fk) {width:281px;display:flex;justify-content:center;flex-direction:column;gap:28px;.challenge-claim-code__title:where(.svelte-19pv5fk) {font-size:16px;font-weight:400;line-height:24px;color:var(--text-subtle, rgba(255, 255, 255, 1));text-align:center;margin:0;}.challenge-claim-code__content:where(.svelte-19pv5fk) {display:flex;align-items:center;text-align:center;flex-direction:column;gap:12px;width:100%;.challenge-claim-code__input:where(.svelte-19pv5fk) {box-sizing:border-box;border-radius:6px;border:1px solid var(--input-border-hover, rgba(251, 251, 251, 0.05));background-color:var(--bg-overlay-neutral-level-3, rgba(251, 251, 251, 0.15));color:var(--input-text-active, rgba(255, 255, 255, 1));font-size:14px;font-weight:400;padding:12px 16px;line-height:125%;width:100%;text-align:center;}.challenge-claim-code__input:where(.svelte-19pv5fk)::placeholder {color:var(--color-text-input, rgba(251, 251, 251, 0.25));text-transform:uppercase;}.challenge-claim-code__input:where(.svelte-19pv5fk):focus {outline:none;}.challenge-claim-code__input.errored:where(.svelte-19pv5fk) {border-color:var(--semantic-error-500, rgba(235, 0, 0, 1));}.challenge-claim-code__rule:where(.svelte-19pv5fk) {font-weight:400;font-size:12px;line-height:24px;color:var(--text-subtle, rgba(255, 255, 255, 1));width:100%;margin:0;}.challenge-claim-code__rule.errored:where(.svelte-19pv5fk) {color:var(--semantic-error-500, rgba(235, 0, 0, 1));}}.challenge-claim-code__button:where(.svelte-19pv5fk) {background-color:var(--button-primary-bg-default, rgba(255, 204, 0, 1));display:flex;flex-direction:row;justify-content:center;align-items:center;padding:8px 16px;height:33px;border-radius:6px;border:none;font-weight:700;font-size:12px;color:var(--button-primary-text-default, #FFFFFF);}.challenge-claim-code__button:where(.svelte-19pv5fk):disabled {opacity:50%;cursor:not-allowed;}.challenge-claim-code__button:where(.svelte-19pv5fk):hover {background-color:var(--button-primary-bg-hover, rgba(199, 158, 0, 1));}}.challenge-claim-code__anonymous:where(.svelte-19pv5fk) {margin:0;text-align:center;font-size:13px;color:var(--text-subtle, rgba(251, 251, 251, 0.5));}}
|
|
2
2
|
@media (max-width: 767px) {.challenge-claim-code.svelte-19pv5fk {margin-top:20px;}
|
|
3
3
|
}.challenge-claim-code.anonymous.svelte-19pv5fk {padding:32px 12px;text-align:center;margin:0;}`};function F(w,o){e.push(o,!0),e.append_styles(w,$);const i=()=>e.store_get(e.$format,"$_",M),[M,U]=e.setup_stores(),p=e.prop(o,"endpoint",7),s=e.prop(o,"userSession",7),g=e.prop(o,"locale",7,"en"),u=e.prop(o,"translationUrl",7),v=e.prop(o,"domainId",7);e.untrack(()=>e.initI18n(g(),Q.TRANSLATIONS$1)),e.user_pre_effect(()=>{u()&&e.loadTranslationUrl(u(),"challenge-claim-code")}),e.user_effect(()=>{e.setLocale(g()||"en")});let a=e.state(""),c=e.state(null),h=e.state(!1),m=e.state(!1),f;const E=t=>t.length>=d.CODE_MIN_LENGTH&&t.length<=d.CODE_MAX_LENGTH&&d.PRINTABLE_ASCII.test(t),z=e.user_derived(()=>E(e.get(a))),x=e.user_derived(()=>e.get(m)||!!e.get(c)),O=e.user_derived(()=>!!p()&&!!s()&&!!v()),S=e.user_derived(()=>e.get(z)&&!e.get(h)&&e.get(O)),T=e.user_derived(()=>!s()),H=t=>{const l=t.target;e.set(a,l.value,!0),e.set(c,null),clearTimeout(f),f=setTimeout(()=>{e.set(m,!!e.get(a)&&!E(e.get(a)),!0)},d.CODE_DEBOUNCE_MS)},I=async()=>{if(e.get(S)){e.set(h,!0),e.set(c,null);try{await e.grantChallengeByCode({endpoint:p(),domainId:v(),sessionId:s(),code:e.get(a)}),e.set(a,""),e.set(m,!1),e.sendChallengeActionSuccess(e.ChallengeAction.Claim)}catch(t){const l=t instanceof e.ChallengeApiError?t.errorCode:null,r=t instanceof Error?t.message:String(t);e.set(c,r,!0),e.sendChallengeActionFail(e.ChallengeAction.Claim,r,l??void 0)}finally{e.set(h,!1)}}};e.onDestroy(()=>clearTimeout(f));var j={get endpoint(){return p()},set endpoint(t){p(t),e.flushSync()},get userSession(){return s()},set userSession(t){s(t),e.flushSync()},get locale(){return g()},set locale(t="en"){g(t),e.flushSync()},get translationUrl(){return u()},set translationUrl(t){u(t),e.flushSync()},get domainId(){return v()},set domainId(t){v(t),e.flushSync()}},_=Z();let A;var q=e.child(_);{var B=t=>{var l=W(),r=e.child(l),b=e.only_child(r,!0),y=e.sibling(r,2),n=e.child(y);e.remove_input_defaults(n);let L;var N=e.sibling(n,2);let D;var V=e.only_child(N,!0);e.reset(y);var k=e.sibling(y,2),P=e.only_child(k,!0);e.reset(l),e.template_effect((C,X,J,K)=>{e.set_text(b,C),L=e.set_class(n,1,"challenge-claim-code__input svelte-19pv5fk",null,L,{errored:e.get(x)}),e.set_value(n,e.get(a)),e.set_attribute(n,"maxlength",d.CODE_MAX_LENGTH),e.set_attribute(n,"placeholder",X),e.set_attribute(n,"aria-invalid",e.get(x)),D=e.set_class(N,1,"challenge-claim-code__rule svelte-19pv5fk",null,D,{errored:e.get(x)}),e.set_text(V,J),k.disabled=!e.get(S),e.set_text(P,K)},[()=>i()("claimCodeTitle"),()=>i()("claimCodePlaceholder"),()=>e.get(c)??i()("claimCodeRuleText"),()=>i()("applyCode")]),e.delegated("input",n,H),e.delegated("keydown",n,C=>C.key==="Enter"&&I()),e.delegated("click",k,I),e.append(t,l)},G=t=>{var l=Y(),r=e.only_child(l,!0);e.template_effect(b=>e.set_text(r,b),[()=>i()("claimCodeAnonymous")]),e.append(t,l)};e.if_block(q,t=>{e.get(T)?t(G,-1):t(B)})}e.reset(_),e.template_effect(()=>A=e.set_class(_,1,"challenge-claim-code svelte-19pv5fk",null,A,{anonymous:e.get(T)})),e.append(w,_);var R=e.pop(j);return U(),R}e.delegate(["input","keydown","click"]);e.create_custom_element(F,{endpoint:{},userSession:{},locale:{},translationUrl:{},domainId:{}},[],[],{mode:"open"});exports.ChallengeClaimCode=F;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
typeof globalThis.HTMLElement>"u"&&(globalThis.HTMLElement=class{},globalThis.customElements={define(){},get(){},whenDefined(){}});const e=require("./ChallengeTabs-B5g-SF2b.cjs"),de=require("./translations-FyoqR3gH.cjs"),H=require("./types-BS-x0LbR.cjs"),M=require("./helpers-BmTQLAcy.cjs"),ge=require("./ChallengeBanner-CLOInO3g.cjs"),oe=require("./ChallengeSummary-B4Vp1cu8.cjs"),ue=require("./ChallengeTabPanel-DYPhrVRz.cjs"),O=require("./ChallengeDetailsSkeleton--laE6pYH.cjs");var W=e.from_html('<aside class="challenge-details__aside svelte-sqd80r"><!></aside>'),ce=e.from_html('<div><!> <div class="challenge-details__body svelte-sqd80r"><!> <div class="challenge-details__main svelte-sqd80r"><!></div></div></div>'),he=e.from_html('<div><!> <div class="challenge-details__body svelte-sqd80r"><!> <div class="challenge-details__main svelte-sqd80r"><!> <!></div></div></div>');const fe={hash:"svelte-sqd80r",code:`.challenge-details.svelte-sqd80r {display:flex;flex-direction:column;gap:22px;width:100%;box-sizing:border-box;padding:24px;background:var(--bg-surface-level-1, rgba(2, 38, 82, 1));border:1px solid var(--border-subtle, rgba(251, 251, 251, 0.05));border-radius:8px;.challenge-details__body:where(.svelte-sqd80r) {display:grid;grid-template-columns:minmax(240px, 30%) 1fr;gap:32px;align-items:start;}.challenge-details__aside:where(.svelte-sqd80r),
|
|
2
|
+
.challenge-details__main:where(.svelte-sqd80r) {min-width:0;}.challenge-details__main:where(.svelte-sqd80r) {display:flex;flex-direction:column;gap:16px;}}.challenge-details--bare.svelte-sqd80r .challenge-details__body:where(.svelte-sqd80r) {grid-template-columns:1fr;gap:0;}
|
|
3
|
+
|
|
4
|
+
@media (max-width: 767px) {.challenge-details.svelte-sqd80r .challenge-details__body:where(.svelte-sqd80r) {grid-template-columns:1fr;gap:16px;}.challenge-details.svelte-sqd80r {padding:0;background:transparent;border:none;}
|
|
5
|
+
}`};function X(z,n){e.push(n,!0),e.append_styles(z,fe);const d=e.prop(n,"challengeId",7),o=e.prop(n,"endpoint",7),p=e.prop(n,"userSession",7),_=e.prop(n,"userId",7),u=e.prop(n,"domainId",7),h=e.prop(n,"locale",7,"en"),T=e.prop(n,"translationUrl",7),P=e.prop(n,"isPromo",7,!1),b=e.prop(n,"isPaused",7,!1),k=e.prop(n,"isPending",7,!1),q=e.prop(n,"status",7),f=e.prop(n,"progress",7),F=e.prop(n,"initialGames",7),D=e.prop(n,"liveUpdates",7,!1),c=e.prop(n,"hideSummary",7,!1),x=e.prop(n,"activeTab",7),L=e.prop(n,"onStatusChange",7),E=e.prop(n,"onClaimed",7),G=e.prop(n,"onViewed",7),A=e.prop(n,"onUnavailable",7),Y=e.user_derived(()=>!p()&&!_());e.untrack(()=>e.initI18n(h(),de.TRANSLATIONS)),e.user_pre_effect(()=>{T()&&e.loadTranslationUrl(T(),"challenge-details")}),e.user_effect(()=>{e.setLocale(h()||"en")});let m=e.state(e.proxy(e.untrack(()=>H.toChallengeDetailsTab(x())??H.ChallengeDetailsTab.Levels))),a=e.state(e.proxy(e.untrack(()=>f()?.ChallengeId===d()?f():void 0))),w=e.state(!1);const Z=e.createLiveChallengeStatus(()=>e.get(a)),v=e.user_derived(()=>e.get(a)&&{...e.get(a),Status:Z.status??e.get(a).Status}),R=e.user_derived(()=>e.get(v)?.Status===e.ChallengeProgressStatus.Expired),$=e.user_derived(()=>e.get(v)?.ChallengeStatus===e.ChallengeStatus.Paused);e.user_effect(()=>{const t=H.toChallengeDetailsTab(x());if(!t)return;const s=e.get(a)?M.getAvailableTabs(e.get(a).ContributedFrom):[];(!s.length||s.includes(t))&&e.set(m,t,!0)}),e.user_effect(()=>{const t=e.get(a)?M.getAvailableTabs(e.get(a).ContributedFrom):[];t.length&&!t.includes(e.get(m))&&e.set(m,t[0],!0)});const j=(t,s)=>{e.get(a)?.Id===t&&e.set(a,e.stampFinishedTime(e.get(a),{...e.get(a),Status:s}),!0),L()?.(t,s)};let N=e.state(e.proxy(e.untrack(()=>q())));e.user_effect(()=>{const t=q();e.untrack(()=>{const s=e.get(N)!==void 0&&t!==void 0&&t!==e.get(N);e.set(N,t,!0),s&&e.get(a)&&e.get(a).Status!==t&&e.set(a,e.stampFinishedTime(e.get(a),{...e.get(a),Status:t}),!0)})});const ee=t=>{!t||!e.get(a)||e.get(a).Id!==t.Id||e.set(a,e.stampFinishedTime(e.get(a),{...e.get(a),Status:t.Status??e.get(a).Status,ChallengeStatus:t.ChallengeStatus??e.get(a).ChallengeStatus,LevelProgresses:t.LevelProgresses??e.get(a).LevelProgresses,FinishedTime:t.FinishedTime??e.get(a).FinishedTime}),!0)};e.user_effect(()=>{const t=f();e.untrack(()=>ee(t))}),e.user_effect(()=>{if(!D())return;const t=e.listenChallengeHostUpdates({onProgressUpdate:s=>{e.get(a)?.Id===s.ProgressId&&e.set(a,e.stampFinishedTime(e.get(a),e.applyProgressUpdate(e.get(a),s)),!0)},onProgressStatusChange:(s,i)=>{e.get(a)?.Id===s&&e.set(a,e.stampFinishedTime(e.get(a),{...e.get(a),Status:i}),!0)},onChallengeForfeited:s=>{e.get(a)?.ChallengeId===s&&e.set(a,e.stampFinishedTime(e.get(a),{...e.get(a),Status:e.ChallengeProgressStatus.Forfeited}),!0)},onChallengeEnabledChange:(s,i)=>{e.get(a)?.ChallengeId===s&&e.set(a,{...e.get(a),ChallengeStatus:i?e.ChallengeStatus.Enabled:e.ChallengeStatus.Paused},!0)}});return()=>t.close()});const J=t=>{e.get(a)&&e.sendChallengeDetailTabClicked(e.get(a).ChallengeId,e.get(a).ChallengePresentation?.PresentationName??"",e.getChallengeStatusName(e.get(a)),t),e.set(m,t,!0)},te=()=>{const t=e.get(a)&&M.getGamesTab(e.get(a).ContributedFrom);t&&J(t)},ae=t=>{!t.IsNew||!o()||!u()||e.updateChallengeIsNewStatus({endpoint:o(),domainId:u(),challengeProgressId:t.Id}).then(()=>{e.get(a)?.Id===t.Id&&e.set(a,{...e.get(a),IsNew:!1},!0),G()?.(t.Id)}).catch(s=>{console.log("challenge-details viewed err:",s)})},K=t=>{e.set(a,void 0),e.sendChallengeUnavailable(d(),t),A()?.(d())};e.user_effect(()=>{if(!d()||!o()||!u()){e.set(a,void 0),e.set(w,!1);return}let t=!1;const s=P()&&!e.get(Y)?e.getPromoChallengeById:e.getChallengeById,i=e.untrack(()=>{const l=f()?.ChallengeId===d()?f():void 0;return e.get(a)?.ChallengeId!==d()&&e.set(a,l,!0),e.set(w,!e.get(a)),l});return s({endpoint:o(),domainId:u(),challengeId:d(),sessionId:p()||"",locale:h(),isFutureAvailable:k()}).then(l=>{if(!t){if(l){e.set(a,l,!0),ae(l);return}i||K("unavailable")}}).catch(l=>{t||(i||K("error"),console.log("challenge-details err:",l))}).finally(()=>{t||e.set(w,!1)}),()=>{t=!0}});var se={get challengeId(){return d()},set challengeId(t){d(t),e.flushSync()},get endpoint(){return o()},set endpoint(t){o(t),e.flushSync()},get userSession(){return p()},set userSession(t){p(t),e.flushSync()},get userId(){return _()},set userId(t){_(t),e.flushSync()},get domainId(){return u()},set domainId(t){u(t),e.flushSync()},get locale(){return h()},set locale(t="en"){h(t),e.flushSync()},get translationUrl(){return T()},set translationUrl(t){T(t),e.flushSync()},get isPromo(){return P()},set isPromo(t=!1){P(t),e.flushSync()},get isPaused(){return b()},set isPaused(t=!1){b(t),e.flushSync()},get isPending(){return k()},set isPending(t=!1){k(t),e.flushSync()},get status(){return q()},set status(t){q(t),e.flushSync()},get progress(){return f()},set progress(t){f(t),e.flushSync()},get initialGames(){return F()},set initialGames(t){F(t),e.flushSync()},get liveUpdates(){return D()},set liveUpdates(t=!1){D(t),e.flushSync()},get hideSummary(){return c()},set hideSummary(t=!1){c(t),e.flushSync()},get activeTab(){return x()},set activeTab(t){x(t),e.flushSync()},get onStatusChange(){return L()},set onStatusChange(t){L(t),e.flushSync()},get onClaimed(){return E()},set onClaimed(t){E(t),e.flushSync()},get onViewed(){return G()},set onViewed(t){G(t),e.flushSync()},get onUnavailable(){return A()},set onUnavailable(t){A(t),e.flushSync()}},Q=e.comment(),ne=e.first_child(Q);{var le=t=>{var s=ce();let i;var l=e.child(s);{var V=g=>{O.ChallengeDetailsSkeleton(g,{part:"banner"})};e.if_block(l,g=>{c()||g(V)})}var S=e.sibling(l,2),C=e.child(S);{var B=g=>{var r=W(),y=e.child(r);O.ChallengeDetailsSkeleton(y,{part:"summary"}),e.reset(r),e.append(g,r)};e.if_block(C,g=>{c()||g(B)})}var I=e.sibling(C,2),U=e.child(I);O.ChallengeDetailsSkeleton(U,{get activeTab(){return e.get(m)}}),e.reset(I),e.reset(S),e.reset(s),e.template_effect(()=>i=e.set_class(s,1,"challenge-details svelte-sqd80r",null,i,{"challenge-details--bare":c()})),e.append(t,s)},re=t=>{var s=he();let i;var l=e.child(s);{var V=r=>{ge.ChallengeBanner(r,{get challengeItem(){return e.get(v)},get isPaused(){return b()},get locale(){return h()}})};e.if_block(l,r=>{c()||r(V)})}var S=e.sibling(l,2),C=e.child(S);{var B=r=>{var y=W(),ie=e.child(y);oe.ChallengeSummary(ie,{get challengeItem(){return e.get(v)},get endpoint(){return o()},get domainId(){return u()},get userSession(){return p()},get userId(){return _()},get locale(){return h()},get isPromo(){return P()},get isPaused(){return b()},get isExpired(){return e.get(R)},onStatusChange:j,get onClaimed(){return E()},onLaunchGame:te}),e.reset(y),e.append(r,y)};e.if_block(C,r=>{c()||r(B)})}var I=e.sibling(C,2),U=e.child(I);e.ChallengeTabs(U,{get challengeItem(){return e.get(v)},get activeTab(){return e.get(m)},onTabChange:J});var g=e.sibling(U,2);{let r=e.user_derived(()=>b()||e.get($));ue.ChallengeTabPanel(g,{get activeTab(){return e.get(m)},get challengeItem(){return e.get(v)},get endpoint(){return o()},get domainId(){return u()},get userSession(){return p()},get userId(){return _()},get initialGames(){return F()},get isPaused(){return e.get(r)},get isExpired(){return e.get(R)},onStatusChange:j})}e.reset(I),e.reset(S),e.reset(s),e.template_effect(()=>i=e.set_class(s,1,"challenge-details svelte-sqd80r",null,i,{"challenge-details--bare":c()})),e.append(t,s)};e.if_block(ne,t=>{e.get(w)?t(le):e.get(v)&&t(re,1)})}return e.append(z,Q),e.pop(se)}e.create_custom_element(X,{challengeId:{},endpoint:{},userSession:{},userId:{},domainId:{},locale:{},translationUrl:{},isPromo:{},isPaused:{},isPending:{},status:{},progress:{},initialGames:{},liveUpdates:{},hideSummary:{},activeTab:{},onStatusChange:{},onClaimed:{},onViewed:{},onUnavailable:{}},[],[],{mode:"open"});exports.ChallengeDetails=X;
|