@everymatrix/player-challenges 0.1.13 → 0.1.15
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-D0LpsufV.cjs +1 -0
- package/components/ArrowLeftIcon-De_oE6VJ.js +26 -0
- package/components/{Badge-C2wt4e90.js → Badge-C2_vCRtE.js} +47 -42
- package/components/Badge-r78wWqnE.cjs +7 -0
- package/components/Button-CU8n8iLn.cjs +3 -0
- package/components/{Button--XqKsOFn.js → Button-CqWi35Id.js} +37 -34
- package/components/ChallengeBanner-CBWAGiMi.cjs +4 -0
- package/components/ChallengeBanner-oDSEjGGf.js +57 -0
- package/components/ChallengeBreadcrumbs-0C1qzQmn.js +41 -0
- package/components/ChallengeBreadcrumbs-B1QPZ9Ub.cjs +1 -0
- package/components/ChallengeCard-3915Vdd8.cjs +1 -0
- package/components/{ChallengeCard-B6CuOUjR.js → ChallengeCard-yUSt6Ocz.js} +59 -54
- package/components/ChallengeClaimCode-BUD6Bszw.cjs +1 -0
- package/components/{ChallengeClaimCode-CHjR7wvj.js → ChallengeClaimCode-D-skzCq6.js} +21 -17
- package/components/ChallengeDetails-C5WUrhPo.js +116 -0
- package/components/ChallengeDetails-D74Ki1Uz.cjs +1 -0
- package/components/ChallengeEvents-CXxvU73L.js +34 -0
- package/components/ChallengeEvents-U5YbNMZ6.cjs +1 -0
- package/components/ChallengeGames-BVIMhW8b.cjs +11 -0
- package/components/ChallengeGames-CLISWWUl.js +133 -0
- package/components/{ChallengeHistory-BGGX8pSa.js → ChallengeHistory-BveIKX6m.js} +35 -30
- package/components/ChallengeHistory-DDWHc60D.cjs +1 -0
- package/components/ChallengeLevels-Dqz1Jroz.cjs +8 -0
- package/components/ChallengeLevels-EESudJez.js +292 -0
- package/components/ChallengeList-Bby_g4Z8.cjs +20 -0
- package/components/{ChallengeList-CVeq75Nw.js → ChallengeList-P4I4Dp10.js} +610 -635
- package/components/ChallengeProgress-BpkQJwJK.cjs +1 -0
- package/components/ChallengeProgress-BxkeK6qN.js +95 -0
- package/components/ChallengeProgressItem-DHghH0Re.js +417 -0
- package/components/ChallengeProgressItem-YsHk5ITp.cjs +68 -0
- package/components/ChallengeRules-CoGa-G4a.cjs +1 -0
- package/components/ChallengeRules-D7Q6JUd5.js +173 -0
- package/components/ChallengeSummary-Bu4cCk0T.js +222 -0
- package/components/ChallengeSummary-CcneZ-_H.cjs +1 -0
- package/components/ChallengeTabContent--jk6IZ9p.js +794 -0
- package/components/ChallengeTabContent-D3ghO0QX.cjs +12 -0
- package/components/ChallengeTabPanel-Rci3HLu2.js +137 -0
- package/components/ChallengeTabPanel-wgd02Iii.cjs +1 -0
- package/components/ChallengeTabSkeleton-B-MQHvwC.js +91 -0
- package/components/ChallengeTabSkeleton-CuGIFm8O.cjs +15 -0
- package/components/ChallengeTabs-BtbgPMyA.cjs +14 -0
- package/components/{ChallengeTabs-B6_2WSU0.js → ChallengeTabs-nR_tQGbd.js} +3714 -3214
- package/components/CheckIcon-CxbYr1xp.cjs +1 -0
- package/components/{CheckIcon-Bh-pkq9I.js → CheckIcon-D4lHKEA2.js} +19 -14
- package/components/ChevronIcon-BAMpEJGd.cjs +1 -0
- package/components/{ChevronIcon-D9cP6u1l.js → ChevronIcon-CRAlhZkw.js} +18 -13
- package/components/ExistIcon-Dto-bbDy.cjs +1 -0
- package/components/{ExistIcon--D18_Qhm.js → ExistIcon-MA116zUI.js} +23 -18
- package/components/GiftIcon-Cd5b3K-t.cjs +1 -0
- package/components/{GiftIcon-B0Ax8oOy.js → GiftIcon-Co84y9Go.js} +17 -12
- package/components/LinkIcon-Bwgy8Luj.cjs +1 -0
- package/components/{LinkIcon-Bui5HZdD.js → LinkIcon-pV2v0CrL.js} +19 -14
- package/components/LockIcon-BYYuZI1_.cjs +1 -0
- package/components/{LockIcon-C8tR8voO.js → LockIcon-CzobKbeF.js} +20 -15
- package/components/{Pagination-_6zMfbPi.js → Pagination-BgeAkkYm.js} +60 -60
- package/components/Pagination-vup1vCrG.cjs +12 -0
- package/components/PlayerChallenges-C703Qu2L.cjs +1 -0
- package/components/PlayerChallenges-htqi9P1E.js +395 -0
- package/components/{StarIcon-Dns8s0G7.js → StarIcon-D_ixyTtO.js} +21 -16
- package/components/StarIcon-tdfCGCXl.cjs +1 -0
- package/components/TargetIcon-BGcVQbCs.cjs +1 -0
- package/components/{TargetIcon-TJPVnCek.js → TargetIcon-Cw-ZoTaW.js} +19 -14
- package/esnext/player-challenges.cjs +1 -1
- package/esnext/player-challenges.js +8 -3
- package/package.json +1 -1
- package/components/ArrowLeftIcon-BRaj1LmB.js +0 -21
- package/components/ArrowLeftIcon-DDLFT41L.cjs +0 -1
- package/components/Badge-DAKtct6K.cjs +0 -7
- package/components/Button-D-VBD0Q3.cjs +0 -3
- package/components/ChallengeBanner-CBpmtUBF.cjs +0 -4
- package/components/ChallengeBanner-Cmpj8DEM.js +0 -59
- package/components/ChallengeBreadcrumbs-2wbaNU9B.js +0 -38
- package/components/ChallengeBreadcrumbs-CI85tqGz.cjs +0 -1
- package/components/ChallengeCard-3mRYB8cV.cjs +0 -1
- package/components/ChallengeClaimCode-CbvBupc_.cjs +0 -1
- package/components/ChallengeDetails-D8ZWkzvs.cjs +0 -1
- package/components/ChallengeDetails-kST_L2H6.js +0 -91
- package/components/ChallengeEvents-CQ6STVwu.js +0 -57
- package/components/ChallengeEvents-Cs53agnU.cjs +0 -1
- package/components/ChallengeGames-B0HjqvW0.cjs +0 -11
- package/components/ChallengeGames-Cba0U_35.js +0 -136
- package/components/ChallengeHistory-VT3TVd3m.cjs +0 -1
- package/components/ChallengeLevels-BGZpw1ET.js +0 -297
- package/components/ChallengeLevels-iQPTsHa6.cjs +0 -4
- package/components/ChallengeList-CFGrG4th.cjs +0 -23
- package/components/ChallengeProgress-CFLdRZji.cjs +0 -1
- package/components/ChallengeProgress-DP3VVpVT.js +0 -81
- package/components/ChallengeProgressItem-D8RsRZvE.cjs +0 -68
- package/components/ChallengeProgressItem-DTB7cV5H.js +0 -412
- package/components/ChallengeRules-DcFk9naV.cjs +0 -1
- package/components/ChallengeRules-DhjdAEuR.js +0 -153
- package/components/ChallengeSummary-CLGCOtRQ.cjs +0 -3
- package/components/ChallengeSummary-DiE9D1bF.js +0 -219
- package/components/ChallengeTabContent-BWahIpTH.js +0 -833
- package/components/ChallengeTabContent-DROK-E8d.cjs +0 -13
- package/components/ChallengeTabPanel-Cpm0azOu.js +0 -164
- package/components/ChallengeTabPanel-DRfYUk0O.cjs +0 -1
- package/components/ChallengeTabSkeleton-BpCRuAwx.cjs +0 -15
- package/components/ChallengeTabSkeleton-Ch33vV8a.js +0 -112
- package/components/ChallengeTabs-CEYwcPlJ.cjs +0 -14
- package/components/CheckIcon-Co2f_WCA.cjs +0 -1
- package/components/ChevronIcon-DM0lqt14.cjs +0 -1
- package/components/ExistIcon-mCUINSW_.cjs +0 -1
- package/components/GiftIcon-Dqfja7-X.cjs +0 -1
- package/components/LinkIcon-BrRosQTW.cjs +0 -1
- package/components/LockIcon-DtM1_YzG.cjs +0 -1
- package/components/Pagination-Bx6K50Vt.cjs +0 -12
- package/components/PlayerChallenges-DVzU_6kl.js +0 -328
- package/components/PlayerChallenges-QYR3YEzs.cjs +0 -1
- package/components/StarIcon-DH0eCmcS.cjs +0 -1
- package/components/TargetIcon-DG4XwqL4.cjs +0 -1
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
"use strict";const ro="5";typeof window<"u"&&((window.__svelte??={}).v??=new Set).add(ro);const io=1,so=2,ss=4,ao=8,oo=16,uo=1,lo=4,fo=8,co=16,ho=1,po=2,as="[",er="[!",qr="]",en={},_e=Symbol(),vo="http://www.w3.org/1999/xhtml",Tr=!1;var os=Array.isArray,go=Array.prototype.indexOf,tr=Array.from,Un=Object.keys,Cn=Object.defineProperty,Lt=Object.getOwnPropertyDescriptor,mo=Object.getOwnPropertyDescriptors,_o=Object.prototype,bo=Array.prototype,us=Object.getPrototypeOf,Oi=Object.isExtensible;const xt=()=>{};function ls(e){for(var t=0;t<e.length;t++)e[t]()}function fs(){var e,t,n=new Promise((r,i)=>{e=r,t=i});return{promise:n,resolve:e,reject:t}}const be=2,jn=4,$n=8,cs=1<<24,gt=16,mt=32,Pt=64,Zr=128,Ve=512,Ee=1024,Ie=2048,_t=4096,Ge=8192,ht=16384,nr=32768,tn=65536,Ni=1<<17,hs=1<<18,Xt=1<<19,ds=1<<20,ft=1<<25,Vt=32768,Ar=1<<21,Jr=1<<22,wt=1<<23,xn=Symbol("$state"),ps=Symbol("legacy props"),yo=Symbol(""),Kt=new class extends Error{name="StaleReactionError";message="The reaction that called `getAbortSignal()` was re-run or destroyed"},Qr=3,cn=8;function vs(e){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}function Eo(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function xo(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function wo(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function So(e){throw new Error("https://svelte.dev/e/effect_orphan")}function Co(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function To(){throw new Error("https://svelte.dev/e/hydration_failed")}function Ao(e){throw new Error("https://svelte.dev/e/props_invalid_value")}function Io(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function Po(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function $o(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function Oo(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}function rr(e){console.warn("https://svelte.dev/e/hydration_mismatch")}function No(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}let J=!1;function ct(e){J=e}let Q;function Me(e){if(e===null)throw rr(),en;return Q=e}function ir(){return Me(nt(Q))}function Tn(e){if(J){if(nt(Q)!==null)throw rr(),en;Q=e}}function gs(e=1){if(J){for(var t=e,n=Q;t--;)n=nt(n);Q=n}}function Vn(e=!0){for(var t=0,n=Q;;){if(n.nodeType===cn){var r=n.data;if(r===qr){if(t===0)return n;t-=1}else(r===as||r===er)&&(t+=1)}var i=nt(n);e&&n.remove(),n=i}}function ms(e){if(!e||e.nodeType!==cn)throw rr(),en;return e.data}function _s(e){return e===this.v}function bs(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function ys(e){return!bs(e,this.v)}let Mo=!1,He=null;function nn(e){He=e}function sr(e,t=!1,n){He={p:He,i:!1,c:null,e:null,s:e,x:null,l:null}}function ar(e){var t=He,n=t.e;if(n!==null){t.e=null;for(var r of n)Vs(r)}return e!==void 0&&(t.x=e),t.i=!0,He=t.p,e??{}}function Es(){return!0}let Bt=[];function xs(){var e=Bt;Bt=[],ls(e)}function hn(e){if(Bt.length===0&&!wn){var t=Bt;queueMicrotask(()=>{t===Bt&&xs()})}Bt.push(e)}function Ho(){for(;Bt.length>0;)xs()}function ws(e){var t=K;if(t===null)return Y.f|=wt,e;if(t.f&nr)rn(e,t);else{if(!(t.f&Zr))throw e;t.b.error(e)}}function rn(e,t){for(;t!==null;){if(t.f&Zr)try{t.b.error(e);return}catch(n){e=n}t=t.parent}throw e}const Bo=-7169;function ge(e,t){e.f=e.f&Bo|t}function Kr(e){e.f&Ve||e.deps===null?ge(e,Ee):ge(e,_t)}function Ss(e){if(e!==null)for(const t of e)!(t.f&be)||!(t.f&Vt)||(t.f^=Vt,Ss(t.deps))}function Cs(e,t,n){e.f&Ie?t.add(e):e.f&_t&&n.add(e),Ss(e.deps),ge(e,Ee)}const Hn=new Set;let ue=null,We=null,Ue=[],or=null,Ir=!1,wn=!1;class qe{committed=!1;current=new Map;previous=new Map;#e=new Set;#t=new Set;#n=0;#i=0;#a=null;#s=new Set;#r=new Set;skipped_effects=new Set;is_fork=!1;is_deferred(){return this.is_fork||this.#i>0}process(t){Ue=[],this.apply();var n=[],r=[];for(const i of t)this.#o(i,n,r);this.is_fork||this.#l(),this.is_deferred()?(this.#u(r),this.#u(n)):(ue=null,Mi(r),Mi(n),this.#a?.resolve()),We=null}#o(t,n,r){t.f^=Ee;for(var i=t.first,s=null;i!==null;){var a=i.f,o=(a&(mt|Pt))!==0,u=o&&(a&Ee)!==0,l=u||(a&Ge)!==0||this.skipped_effects.has(i);if(!l&&i.fn!==null){o?i.f^=Ee:s!==null&&a&(jn|$n|cs)?s.b.defer_effect(i):a&jn?n.push(i):On(i)&&(a>&&this.#s.add(i),An(i));var f=i.first;if(f!==null){i=f;continue}}var h=i.parent;for(i=i.next;i===null&&h!==null;)h===s&&(s=null),i=h.next,h=h.parent}}#u(t){for(var n=0;n<t.length;n+=1)Cs(t[n],this.#s,this.#r)}capture(t,n){n!==_e&&!this.previous.has(t)&&this.previous.set(t,n),t.f&wt||(this.current.set(t,t.v),We?.set(t,t.v))}activate(){ue=this,this.apply()}deactivate(){ue===this&&(ue=null,We=null)}flush(){if(this.activate(),Ue.length>0){if(Ts(),ue!==null&&ue!==this)return}else this.#n===0&&this.process([]);this.deactivate()}discard(){for(const t of this.#t)t(this);this.#t.clear()}#l(){if(this.#i===0){for(const t of this.#e)t();this.#e.clear()}this.#n===0&&this.#f()}#f(){if(Hn.size>1){this.previous.clear();var t=We,n=!0;for(const i of Hn){if(i===this){n=!1;continue}const s=[];for(const[o,u]of this.current){if(i.current.has(o))if(n&&u!==i.current.get(o))i.current.set(o,u);else continue;s.push(o)}if(s.length===0)continue;const a=[...i.current.keys()].filter(o=>!this.current.has(o));if(a.length>0){var r=Ue;Ue=[];const o=new Set,u=new Map;for(const l of s)As(l,a,o,u);if(Ue.length>0){ue=i,i.apply();for(const l of Ue)i.#o(l,[],[]);i.deactivate()}Ue=r}}ue=null,We=t}this.committed=!0,Hn.delete(this)}increment(t){this.#n+=1,t&&(this.#i+=1)}decrement(t){this.#n-=1,t&&(this.#i-=1),this.revive()}revive(){for(const t of this.#s)this.#r.delete(t),ge(t,Ie),pt(t);for(const t of this.#r)ge(t,_t),pt(t);this.flush()}oncommit(t){this.#e.add(t)}ondiscard(t){this.#t.add(t)}settled(){return(this.#a??=fs()).promise}static ensure(){if(ue===null){const t=ue=new qe;Hn.add(ue),wn||qe.enqueue(()=>{ue===t&&t.flush()})}return ue}static enqueue(t){hn(t)}apply(){}}function St(e){var t=wn;wn=!0;try{for(var n;;){if(Ho(),Ue.length===0&&(ue?.flush(),Ue.length===0))return or=null,n;Ts()}}finally{wn=t}}function Ts(){var e=Ft;Ir=!0;var t=null;try{var n=0;for(Xn(!0);Ue.length>0;){var r=qe.ensure();if(n++>1e3){var i,s;Do()}r.process(Ue),Ct.clear()}}finally{Ir=!1,Xn(e),or=null}}function Do(){try{Co()}catch(e){rn(e,or)}}let lt=null;function Mi(e){var t=e.length;if(t!==0){for(var n=0;n<t;){var r=e[n++];if(!(r.f&(ht|Ge))&&On(r)&&(lt=new Set,An(r),r.deps===null&&r.first===null&&r.nodes===null&&(r.teardown===null&&r.ac===null?Ys(r):r.fn=null),lt?.size>0)){Ct.clear();for(const i of lt){if(i.f&(ht|Ge))continue;const s=[i];let a=i.parent;for(;a!==null;)lt.has(a)&&(lt.delete(a),s.push(a)),a=a.parent;for(let o=s.length-1;o>=0;o--){const u=s[o];u.f&(ht|Ge)||An(u)}}lt.clear()}}lt=null}}function As(e,t,n,r){if(!n.has(e)&&(n.add(e),e.reactions!==null))for(const i of e.reactions){const s=i.f;s&be?As(i,t,n,r):s&(Jr|gt)&&!(s&Ie)&&Is(i,t,r)&&(ge(i,Ie),pt(i))}}function Is(e,t,n){const r=n.get(e);if(r!==void 0)return r;if(e.deps!==null)for(const i of e.deps){if(t.includes(i))return!0;if(i.f&be&&Is(i,t,n))return n.set(i,!0),!0}return n.set(e,!1),!1}function pt(e){for(var t=or=e;t.parent!==null;){t=t.parent;var n=t.f;if(Ir&&t===K&&n>&&!(n&hs))return;if(n&(Pt|mt)){if(!(n&Ee))return;t.f^=Ee}}Ue.push(t)}function Lo(e){let t=0,n=zt(0),r;return()=>{ii()&&(D(n),ai(()=>(t===0&&(r=$t(()=>e(()=>Sn(n)))),t+=1,()=>{hn(()=>{t-=1,t===0&&(r?.(),r=void 0,Sn(n))})})))}}var Ro=tn|Xt|Zr;function Fo(e,t,n){new Go(e,t,n)}class Go{parent;is_pending=!1;#e;#t=J?Q:null;#n;#i;#a;#s=null;#r=null;#o=null;#u=null;#l=null;#f=0;#c=0;#d=!1;#p=new Set;#v=new Set;#h=null;#y=Lo(()=>(this.#h=zt(this.#f),()=>{this.#h=null}));constructor(t,n,r){this.#e=t,this.#n=n,this.#i=r,this.parent=K.b,this.is_pending=!!this.#n.pending,this.#a=ui(()=>{if(K.b=this,J){const s=this.#t;ir(),s.nodeType===cn&&s.data===er?this.#x():(this.#E(),this.#c===0&&(this.is_pending=!1))}else{var i=this.#_();try{this.#s=je(()=>r(i))}catch(s){this.error(s)}this.#c>0?this.#m():this.is_pending=!1}return()=>{this.#l?.remove()}},Ro),J&&(this.#e=Q)}#E(){try{this.#s=je(()=>this.#i(this.#e))}catch(t){this.error(t)}}#x(){const t=this.#n.pending;t&&(this.#r=je(()=>t(this.#e)),qe.enqueue(()=>{var n=this.#_();this.#s=this.#g(()=>(qe.ensure(),je(()=>this.#i(n)))),this.#c>0?this.#m():(Rt(this.#r,()=>{this.#r=null}),this.is_pending=!1)}))}#_(){var t=this.#e;return this.is_pending&&(this.#l=ze(),this.#e.before(this.#l),t=this.#l),t}defer_effect(t){Cs(t,this.#p,this.#v)}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!this.#n.pending}#g(t){var n=K,r=Y,i=He;tt(this.#a),Ne(this.#a),nn(this.#a.ctx);try{return t()}catch(s){return ws(s),null}finally{tt(n),Ne(r),nn(i)}}#m(){const t=this.#n.pending;this.#s!==null&&(this.#u=document.createDocumentFragment(),this.#u.append(this.#l),Zs(this.#s,this.#u)),this.#r===null&&(this.#r=je(()=>t(this.#e)))}#b(t){if(!this.has_pending_snippet()){this.parent&&this.parent.#b(t);return}if(this.#c+=t,this.#c===0){this.is_pending=!1;for(const n of this.#p)ge(n,Ie),pt(n);for(const n of this.#v)ge(n,_t),pt(n);this.#p.clear(),this.#v.clear(),this.#r&&Rt(this.#r,()=>{this.#r=null}),this.#u&&(this.#e.before(this.#u),this.#u=null)}}update_pending_count(t){this.#b(t),this.#f+=t,this.#h&&sn(this.#h,this.#f)}get_effect_pending(){return this.#y(),D(this.#h)}error(t){var n=this.#n.onerror;let r=this.#n.failed;if(this.#d||!n&&!r)throw t;this.#s&&(Ae(this.#s),this.#s=null),this.#r&&(Ae(this.#r),this.#r=null),this.#o&&(Ae(this.#o),this.#o=null),J&&(Me(this.#t),gs(),Me(Vn()));var i=!1,s=!1;const a=()=>{if(i){No();return}i=!0,s&&Oo(),qe.ensure(),this.#f=0,this.#o!==null&&Rt(this.#o,()=>{this.#o=null}),this.is_pending=this.has_pending_snippet(),this.#s=this.#g(()=>(this.#d=!1,je(()=>this.#i(this.#e)))),this.#c>0?this.#m():this.is_pending=!1};var o=Y;try{Ne(null),s=!0,n?.(t,a),s=!1}catch(u){rn(u,this.#a&&this.#a.parent)}finally{Ne(o)}r&&hn(()=>{this.#o=this.#g(()=>{qe.ensure(),this.#d=!0;try{return je(()=>{r(this.#e,()=>t,()=>a)})}catch(u){return rn(u,this.#a.parent),null}finally{this.#d=!1}})})}}function ko(e,t,n,r){const i=ur;if(n.length===0&&e.length===0){r(t.map(i));return}var s=ue,a=K,o=Uo();function u(){Promise.all(n.map(l=>jo(l))).then(l=>{o();try{r([...t.map(i),...l])}catch(f){a.f&ht||rn(f,a)}s?.deactivate(),zn()}).catch(l=>{rn(l,a)})}e.length>0?Promise.all(e).then(()=>{o();try{return u()}finally{s?.deactivate(),zn()}}):u()}function Uo(){var e=K,t=Y,n=He,r=ue;return function(s=!0){tt(e),Ne(t),nn(n),s&&r?.activate()}}function zn(){tt(null),Ne(null),nn(null)}function ur(e){var t=be|Ie,n=Y!==null&&Y.f&be?Y:null;return K!==null&&(K.f|=Xt),{ctx:He,deps:null,effects:null,equals:_s,f:t,fn:e,reactions:null,rv:0,v:_e,wv:0,parent:n??K,ac:null}}function jo(e,t,n){let r=K;r===null&&Eo();var i=r.b,s=void 0,a=zt(_e),o=!Y,u=new Map;return Qo(()=>{var l=fs();s=l.promise;try{Promise.resolve(e()).then(l.resolve,l.reject).then(()=>{f===ue&&f.committed&&f.deactivate(),zn()})}catch(d){l.reject(d),zn()}var f=ue;if(o){var h=i.is_rendered();i.update_pending_count(1),f.increment(h),u.get(f)?.reject(Kt),u.delete(f),u.set(f,l)}const c=(d,g=void 0)=>{if(f.activate(),g)g!==Kt&&(a.f|=wt,sn(a,g));else{a.f&wt&&(a.f^=wt),sn(a,d);for(const[$,m]of u){if(u.delete($),$===f)break;m.reject(Kt)}}o&&(i.update_pending_count(-1),f.decrement(h))};l.promise.then(c,d=>c(null,d||"unknown"))}),Us(()=>{for(const l of u.values())l.reject(Kt)}),new Promise(l=>{function f(h){function c(){h===s?l(a):f(s)}h.then(c,c)}f(s)})}function ei(e){const t=ur(e);return Js(t),t}function Ps(e){const t=ur(e);return t.equals=ys,t}function $s(e){var t=e.effects;if(t!==null){e.effects=null;for(var n=0;n<t.length;n+=1)Ae(t[n])}}function Vo(e){for(var t=e.parent;t!==null;){if(!(t.f&be))return t.f&ht?null:t;t=t.parent}return null}function ti(e){var t,n=K;tt(Vo(e));try{e.f&=~Vt,$s(e),t=ta(e)}finally{tt(n)}return t}function Os(e){var t=ti(e);if(!e.equals(t)&&(e.wv=Ks(),(!ue?.is_fork||e.deps===null)&&(e.v=t,e.deps===null))){ge(e,Ee);return}At||(We!==null?(ii()||ue?.is_fork)&&We.set(e,t):Kr(e))}let Pr=new Set;const Ct=new Map;let Ns=!1;function zt(e,t){var n={f:0,v:e,reactions:null,equals:_s,rv:0,wv:0};return n}function Te(e,t){const n=zt(e);return Js(n),n}function ni(e,t=!1,n=!0){const r=zt(e);return t||(r.equals=ys),r}function re(e,t,n=!1){Y!==null&&(!Ze||Y.f&Ni)&&Es()&&Y.f&(be|gt|Jr|Ni)&&!dt?.includes(e)&&$o();let r=n?Fe(t):t;return sn(e,r)}function sn(e,t){if(!e.equals(t)){var n=e.v;At?Ct.set(e,t):Ct.set(e,n),e.v=t;var r=qe.ensure();if(r.capture(e,n),e.f&be){const i=e;e.f&Ie&&ti(i),Kr(i)}e.wv=Ks(),Ms(e,Ie),K!==null&&K.f&Ee&&!(K.f&(mt|Pt))&&(ke===null?tu([e]):ke.push(e)),!r.is_fork&&Pr.size>0&&!Ns&&zo()}return t}function zo(){Ns=!1;var e=Ft;Xn(!0);const t=Array.from(Pr);try{for(const n of t)n.f&Ee&&ge(n,_t),On(n)&&An(n)}finally{Xn(e)}Pr.clear()}function Sn(e){re(e,e.v+1)}function Ms(e,t){var n=e.reactions;if(n!==null)for(var r=n.length,i=0;i<r;i++){var s=n[i],a=s.f,o=(a&Ie)===0;if(o&&ge(s,t),a&be){var u=s;We?.delete(u),a&Vt||(a&Ve&&(s.f|=Vt),Ms(u,_t))}else o&&(a>&<!==null&<.add(s),pt(s))}}function Fe(e){if(typeof e!="object"||e===null||xn in e)return e;const t=us(e);if(t!==_o&&t!==bo)return e;var n=new Map,r=os(e),i=Te(0),s=Gt,a=o=>{if(Gt===s)return o();var u=Y,l=Gt;Ne(null),Li(s);var f=o();return Ne(u),Li(l),f};return r&&n.set("length",Te(e.length)),new Proxy(e,{defineProperty(o,u,l){(!("value"in l)||l.configurable===!1||l.enumerable===!1||l.writable===!1)&&Io();var f=n.get(u);return f===void 0?f=a(()=>{var h=Te(l.value);return n.set(u,h),h}):re(f,l.value,!0),!0},deleteProperty(o,u){var l=n.get(u);if(l===void 0){if(u in o){const f=a(()=>Te(_e));n.set(u,f),Sn(i)}}else re(l,_e),Sn(i);return!0},get(o,u,l){if(u===xn)return e;var f=n.get(u),h=u in o;if(f===void 0&&(!h||Lt(o,u)?.writable)&&(f=a(()=>{var d=Fe(h?o[u]:_e),g=Te(d);return g}),n.set(u,f)),f!==void 0){var c=D(f);return c===_e?void 0:c}return Reflect.get(o,u,l)},getOwnPropertyDescriptor(o,u){var l=Reflect.getOwnPropertyDescriptor(o,u);if(l&&"value"in l){var f=n.get(u);f&&(l.value=D(f))}else if(l===void 0){var h=n.get(u),c=h?.v;if(h!==void 0&&c!==_e)return{enumerable:!0,configurable:!0,value:c,writable:!0}}return l},has(o,u){if(u===xn)return!0;var l=n.get(u),f=l!==void 0&&l.v!==_e||Reflect.has(o,u);if(l!==void 0||K!==null&&(!f||Lt(o,u)?.writable)){l===void 0&&(l=a(()=>{var c=f?Fe(o[u]):_e,d=Te(c);return d}),n.set(u,l));var h=D(l);if(h===_e)return!1}return f},set(o,u,l,f){var h=n.get(u),c=u in o;if(r&&u==="length")for(var d=l;d<h.v;d+=1){var g=n.get(d+"");g!==void 0?re(g,_e):d in o&&(g=a(()=>Te(_e)),n.set(d+"",g))}if(h===void 0)(!c||Lt(o,u)?.writable)&&(h=a(()=>Te(void 0)),re(h,Fe(l)),n.set(u,h));else{c=h.v!==_e;var $=a(()=>Fe(l));re(h,$)}var m=Reflect.getOwnPropertyDescriptor(o,u);if(m?.set&&m.set.call(f,l),!c){if(r&&typeof u=="string"){var O=n.get("length"),k=Number(u);Number.isInteger(k)&&k>=O.v&&re(O,k+1)}Sn(i)}return!0},ownKeys(o){D(i);var u=Reflect.ownKeys(o).filter(h=>{var c=n.get(h);return c===void 0||c.v!==_e});for(var[l,f]of n)f.v!==_e&&!(l in o)&&u.push(l);return u},setPrototypeOf(){Po()}})}var Hi,Hs,Bs,Ds;function $r(){if(Hi===void 0){Hi=window,Hs=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,n=Text.prototype;Bs=Lt(t,"firstChild").get,Ds=Lt(t,"nextSibling").get,Oi(e)&&(e.__click=void 0,e.__className=void 0,e.__attributes=null,e.__style=void 0,e.__e=void 0),Oi(n)&&(n.__t=void 0)}}function ze(e=""){return document.createTextNode(e)}function vt(e){return Bs.call(e)}function nt(e){return Ds.call(e)}function ri(e,t){if(!J)return vt(e);var n=vt(Q);if(n===null)n=Q.appendChild(ze());else if(t&&n.nodeType!==Qr){var r=ze();return n?.before(r),Me(r),r}return Me(n),n}function Xo(e,t=!1){if(!J){var n=vt(e);return n instanceof Comment&&n.data===""?nt(n):n}if(t&&Q?.nodeType!==Qr){var r=ze();return Q?.before(r),Me(r),r}return Q}function Ls(e,t=1,n=!1){let r=J?Q:e;for(var i;t--;)i=r,r=nt(r);if(!J)return r;if(n&&r?.nodeType!==Qr){var s=ze();return r===null?i?.after(s):r.before(s),Me(s),s}return Me(r),r}function Rs(e){e.textContent=""}function Fs(){return!1}let Bi=!1;function Yo(){Bi||(Bi=!0,document.addEventListener("reset",e=>{Promise.resolve().then(()=>{if(!e.defaultPrevented)for(const t of e.target.elements)t.__on_r?.()})},{capture:!0}))}function Gs(e){var t=Y,n=K;Ne(null),tt(null);try{return e()}finally{Ne(t),tt(n)}}function ks(e){K===null&&(Y===null&&So(),wo()),At&&xo()}function Wo(e,t){var n=t.last;n===null?t.last=t.first=e:(n.next=e,e.prev=n,t.last=e)}function Je(e,t,n){var r=K;r!==null&&r.f&Ge&&(e|=Ge);var i={ctx:He,deps:null,nodes:null,f:e|Ie|Ve,first:null,fn:t,last:null,next:null,parent:r,b:r&&r.b,prev:null,teardown:null,wv:0,ac:null};if(n)try{An(i),i.f|=nr}catch(o){throw Ae(i),o}else t!==null&&pt(i);var s=i;if(n&&s.deps===null&&s.teardown===null&&s.nodes===null&&s.first===s.last&&!(s.f&Xt)&&(s=s.first,e>&&e&tn&&s!==null&&(s.f|=tn)),s!==null&&(s.parent=r,r!==null&&Wo(s,r),Y!==null&&Y.f&be&&!(e&Pt))){var a=Y;(a.effects??=[]).push(s)}return i}function ii(){return Y!==null&&!Ze}function Us(e){const t=Je($n,null,!1);return ge(t,Ee),t.teardown=e,t}function js(e){ks();var t=K.f,n=!Y&&(t&mt)!==0&&(t&nr)===0;if(n){var r=He;(r.e??=[]).push(e)}else return Vs(e)}function Vs(e){return Je(jn|ds,e,!1)}function qo(e){return ks(),Je($n|ds,e,!0)}function Zo(e){qe.ensure();const t=Je(Pt|Xt,e,!0);return()=>{Ae(t)}}function Jo(e){qe.ensure();const t=Je(Pt|Xt,e,!0);return(n={})=>new Promise(r=>{n.outro?Rt(t,()=>{Ae(t),r(void 0)}):(Ae(t),r(void 0))})}function si(e){return Je(jn,e,!1)}function Qo(e){return Je(Jr|Xt,e,!0)}function ai(e,t=0){return Je($n|t,e,!0)}function oi(e,t=[],n=[],r=[]){ko(r,t,n,i=>{Je($n,()=>e(...i.map(D)),!0)})}function ui(e,t=0){var n=Je(gt|t,e,!0);return n}function je(e){return Je(mt|Xt,e,!0)}function zs(e){var t=e.teardown;if(t!==null){const n=At,r=Y;Di(!0),Ne(null);try{t.call(null)}finally{Di(n),Ne(r)}}}function Xs(e,t=!1){var n=e.first;for(e.first=e.last=null;n!==null;){const i=n.ac;i!==null&&Gs(()=>{i.abort(Kt)});var r=n.next;n.f&Pt?n.parent=null:Ae(n,t),n=r}}function Ko(e){for(var t=e.first;t!==null;){var n=t.next;t.f&mt||Ae(t),t=n}}function Ae(e,t=!0){var n=!1;(t||e.f&hs)&&e.nodes!==null&&e.nodes.end!==null&&(eu(e.nodes.start,e.nodes.end),n=!0),Xs(e,t&&!n),Yn(e,0),ge(e,ht);var r=e.nodes&&e.nodes.t;if(r!==null)for(const s of r)s.stop();zs(e);var i=e.parent;i!==null&&i.first!==null&&Ys(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=null}function eu(e,t){for(;e!==null;){var n=e===t?null:nt(e);e.remove(),e=n}}function Ys(e){var t=e.parent,n=e.prev,r=e.next;n!==null&&(n.next=r),r!==null&&(r.prev=n),t!==null&&(t.first===e&&(t.first=r),t.last===e&&(t.last=n))}function Rt(e,t,n=!0){var r=[];Ws(e,r,!0);var i=()=>{n&&Ae(e),t&&t()},s=r.length;if(s>0){var a=()=>--s||i();for(var o of r)o.out(a)}else i()}function Ws(e,t,n){if(!(e.f&Ge)){e.f^=Ge;var r=e.nodes&&e.nodes.t;if(r!==null)for(const o of r)(o.is_global||n)&&t.push(o);for(var i=e.first;i!==null;){var s=i.next,a=(i.f&tn)!==0||(i.f&mt)!==0&&(e.f>)!==0;Ws(i,t,a?n:!1),i=s}}}function li(e){qs(e,!0)}function qs(e,t){if(e.f&Ge){e.f^=Ge,e.f&Ee||(ge(e,Ie),pt(e));for(var n=e.first;n!==null;){var r=n.next,i=(n.f&tn)!==0||(n.f&mt)!==0;qs(n,i?t:!1),n=r}var s=e.nodes&&e.nodes.t;if(s!==null)for(const a of s)(a.is_global||t)&&a.in()}}function Zs(e,t){if(e.nodes)for(var n=e.nodes.start,r=e.nodes.end;n!==null;){var i=n===r?null:nt(n);t.append(n),n=i}}let Ft=!1;function Xn(e){Ft=e}let At=!1;function Di(e){At=e}let Y=null,Ze=!1;function Ne(e){Y=e}let K=null;function tt(e){K=e}let dt=null;function Js(e){Y!==null&&(dt===null?dt=[e]:dt.push(e))}let Oe=null,Re=0,ke=null;function tu(e){ke=e}let Qs=1,Dt=0,Gt=Dt;function Li(e){Gt=e}function Ks(){return++Qs}function On(e){var t=e.f;if(t&Ie)return!0;if(t&be&&(e.f&=~Vt),t&_t){for(var n=e.deps,r=n.length,i=0;i<r;i++){var s=n[i];if(On(s)&&Os(s),s.wv>e.wv)return!0}t&Ve&&We===null&&ge(e,Ee)}return!1}function ea(e,t,n=!0){var r=e.reactions;if(r!==null&&!dt?.includes(e))for(var i=0;i<r.length;i++){var s=r[i];s.f&be?ea(s,t,!1):t===s&&(n?ge(s,Ie):s.f&Ee&&ge(s,_t),pt(s))}}function ta(e){var t=Oe,n=Re,r=ke,i=Y,s=dt,a=He,o=Ze,u=Gt,l=e.f;Oe=null,Re=0,ke=null,Y=l&(mt|Pt)?null:e,dt=null,nn(e.ctx),Ze=!1,Gt=++Dt,e.ac!==null&&(Gs(()=>{e.ac.abort(Kt)}),e.ac=null);try{e.f|=Ar;var f=e.fn,h=f(),c=e.deps;if(Oe!==null){var d;if(Yn(e,Re),c!==null&&Re>0)for(c.length=Re+Oe.length,d=0;d<Oe.length;d++)c[Re+d]=Oe[d];else e.deps=c=Oe;if(ii()&&e.f&Ve)for(d=Re;d<c.length;d++)(c[d].reactions??=[]).push(e)}else c!==null&&Re<c.length&&(Yn(e,Re),c.length=Re);if(Es()&&ke!==null&&!Ze&&c!==null&&!(e.f&(be|_t|Ie)))for(d=0;d<ke.length;d++)ea(ke[d],e);if(i!==null&&i!==e){if(Dt++,i.deps!==null)for(let g=0;g<n;g+=1)i.deps[g].rv=Dt;if(t!==null)for(const g of t)g.rv=Dt;ke!==null&&(r===null?r=ke:r.push(...ke))}return e.f&wt&&(e.f^=wt),h}catch(g){return ws(g)}finally{e.f^=Ar,Oe=t,Re=n,ke=r,Y=i,dt=s,nn(a),Ze=o,Gt=u}}function nu(e,t){let n=t.reactions;if(n!==null){var r=go.call(n,e);if(r!==-1){var i=n.length-1;i===0?n=t.reactions=null:(n[r]=n[i],n.pop())}}if(n===null&&t.f&be&&(Oe===null||!Oe.includes(t))){var s=t;s.f&Ve&&(s.f^=Ve,s.f&=~Vt),Kr(s),$s(s),Yn(s,0)}}function Yn(e,t){var n=e.deps;if(n!==null)for(var r=t;r<n.length;r++)nu(e,n[r])}function An(e){var t=e.f;if(!(t&ht)){ge(e,Ee);var n=K,r=Ft;K=e,Ft=!0;try{t&(gt|cs)?Ko(e):Xs(e),zs(e);var i=ta(e);e.teardown=typeof i=="function"?i:null,e.wv=Qs;var s;Tr&&Mo&&e.f&Ie&&e.deps}finally{Ft=r,K=n}}}function D(e){var t=e.f,n=(t&be)!==0;if(Y!==null&&!Ze){var r=K!==null&&(K.f&ht)!==0;if(!r&&!dt?.includes(e)){var i=Y.deps;if(Y.f&Ar)e.rv<Dt&&(e.rv=Dt,Oe===null&&i!==null&&i[Re]===e?Re++:Oe===null?Oe=[e]:Oe.push(e));else{(Y.deps??=[]).push(e);var s=e.reactions;s===null?e.reactions=[Y]:s.includes(Y)||s.push(Y)}}}if(At&&Ct.has(e))return Ct.get(e);if(n){var a=e;if(At){var o=a.v;return(!(a.f&Ee)&&a.reactions!==null||ra(a))&&(o=ti(a)),Ct.set(a,o),o}var u=(a.f&Ve)===0&&!Ze&&Y!==null&&(Ft||(Y.f&Ve)!==0),l=a.deps===null;On(a)&&(u&&(a.f|=Ve),Os(a)),u&&!l&&na(a)}if(We?.has(e))return We.get(e);if(e.f&wt)throw e.v;return e.v}function na(e){if(e.deps!==null){e.f|=Ve;for(const t of e.deps)(t.reactions??=[]).push(e),t.f&be&&!(t.f&Ve)&&na(t)}}function ra(e){if(e.v===_e)return!0;if(e.deps===null)return!1;for(const t of e.deps)if(Ct.has(t)||t.f&be&&ra(t))return!0;return!1}function $t(e){var t=Ze;try{return Ze=!0,e()}finally{Ze=t}}const ia=new Set,Or=new Set;function fi(e){for(var t=0;t<e.length;t++)ia.add(e[t]);for(var n of Or)n(e)}let Ri=null;function Bn(e){var t=this,n=t.ownerDocument,r=e.type,i=e.composedPath?.()||[],s=i[0]||e.target;Ri=e;var a=0,o=Ri===e&&e.__root;if(o){var u=i.indexOf(o);if(u!==-1&&(t===document||t===window)){e.__root=t;return}var l=i.indexOf(t);if(l===-1)return;u<=l&&(a=u)}if(s=i[a]||e.target,s!==t){Cn(e,"currentTarget",{configurable:!0,get(){return s||n}});var f=Y,h=K;Ne(null),tt(null);try{for(var c,d=[];s!==null;){var g=s.assignedSlot||s.parentNode||s.host||null;try{var $=s["__"+r];$!=null&&(!s.disabled||e.target===s)&&$.call(s,e)}catch(m){c?d.push(m):c=m}if(e.cancelBubble||g===t||g===null)break;s=g}if(c){for(let m of d)queueMicrotask(()=>{throw m});throw c}}finally{e.__root=t,delete e.currentTarget,Ne(f),tt(h)}}}function sa(e){var t=document.createElement("template");return t.innerHTML=e.replaceAll("<!>","<!---->"),t.content}function Tt(e,t){var n=K;n.nodes===null&&(n.nodes={start:e,end:t,a:null,t:null})}function dn(e,t){var n=(t&ho)!==0,r=(t&po)!==0,i,s=!e.startsWith("<!>");return()=>{if(J)return Tt(Q,null),Q;i===void 0&&(i=sa(s?e:"<!>"+e),n||(i=vt(i)));var a=r||Hs?document.importNode(i,!0):i.cloneNode(!0);if(n){var o=vt(a),u=a.lastChild;Tt(o,u)}else Tt(a,a);return a}}function ru(e,t,n="svg"){var r=!e.startsWith("<!>"),i=`<${n}>${r?e:"<!>"+e}</${n}>`,s;return()=>{if(J)return Tt(Q,null),Q;if(!s){var a=sa(i),o=vt(a);s=vt(o)}var u=s.cloneNode(!0);return Tt(u,u),u}}function iu(e,t){return ru(e,t,"svg")}function su(){if(J)return Tt(Q,null),Q;var e=document.createDocumentFragment(),t=document.createComment(""),n=ze();return e.append(t,n),Tt(t,n),e}function kt(e,t){if(J){var n=K;(!(n.f&nr)||n.nodes.end===null)&&(n.nodes.end=Q),ir();return}e!==null&&e.before(t)}const au=["touchstart","touchmove"];function ou(e){return au.includes(e)}function ci(e,t){var n=t==null?"":typeof t=="object"?t+"":t;n!==(e.__t??=e.nodeValue)&&(e.__t=n,e.nodeValue=n+"")}function aa(e,t){return oa(e,t)}function uu(e,t){$r(),t.intro=t.intro??!1;const n=t.target,r=J,i=Q;try{for(var s=vt(n);s&&(s.nodeType!==cn||s.data!==as);)s=nt(s);if(!s)throw en;ct(!0),Me(s);const a=oa(e,{...t,anchor:s});return ct(!1),a}catch(a){if(a instanceof Error&&a.message.split(`
|
|
2
|
-
`).some(o=>o.startsWith("https://svelte.dev/e/")))throw a;return a!==en&&console.warn("Failed to hydrate: ",a),t.recover===!1&&To(),$r(),Rs(n),ct(!1),aa(e,t)}finally{ct(r),Me(i)}}const Jt=new Map;function oa(e,{target:t,anchor:n,props:r={},events:i,context:s,intro:a=!0}){$r();var o=new Set,u=h=>{for(var c=0;c<h.length;c++){var d=h[c];if(!o.has(d)){o.add(d);var g=ou(d);t.addEventListener(d,Bn,{passive:g});var $=Jt.get(d);$===void 0?(document.addEventListener(d,Bn,{passive:g}),Jt.set(d,1)):Jt.set(d,$+1)}}};u(tr(ia)),Or.add(u);var l=void 0,f=Jo(()=>{var h=n??t.appendChild(ze());return Fo(h,{pending:()=>{}},c=>{if(s){sr({});var d=He;d.c=s}if(i&&(r.$$events=i),J&&Tt(c,null),l=e(c,r)||{},J&&(K.nodes.end=Q,Q===null||Q.nodeType!==cn||Q.data!==qr))throw rr(),en;s&&ar()}),()=>{for(var c of o){t.removeEventListener(c,Bn);var d=Jt.get(c);--d===0?(document.removeEventListener(c,Bn),Jt.delete(c)):Jt.set(c,d)}Or.delete(u),h!==n&&h.parentNode?.removeChild(h)}});return Nr.set(l,f),l}let Nr=new WeakMap;function lu(e,t){const n=Nr.get(e);return n?(Nr.delete(e),n(t)):Promise.resolve()}class fu{anchor;#e=new Map;#t=new Map;#n=new Map;#i=new Set;#a=!0;constructor(t,n=!0){this.anchor=t,this.#a=n}#s=()=>{var t=ue;if(this.#e.has(t)){var n=this.#e.get(t),r=this.#t.get(n);if(r)li(r),this.#i.delete(n);else{var i=this.#n.get(n);i&&(this.#t.set(n,i.effect),this.#n.delete(n),i.fragment.lastChild.remove(),this.anchor.before(i.fragment),r=i.effect)}for(const[s,a]of this.#e){if(this.#e.delete(s),s===t)break;const o=this.#n.get(a);o&&(Ae(o.effect),this.#n.delete(a))}for(const[s,a]of this.#t){if(s===n||this.#i.has(s))continue;const o=()=>{if(Array.from(this.#e.values()).includes(s)){var l=document.createDocumentFragment();Zs(a,l),l.append(ze()),this.#n.set(s,{effect:a,fragment:l})}else Ae(a);this.#i.delete(s),this.#t.delete(s)};this.#a||!r?(this.#i.add(s),Rt(a,o,!1)):o()}}};#r=t=>{this.#e.delete(t);const n=Array.from(this.#e.values());for(const[r,i]of this.#n)n.includes(r)||(Ae(i.effect),this.#n.delete(r))};ensure(t,n){var r=ue,i=Fs();if(n&&!this.#t.has(t)&&!this.#n.has(t))if(i){var s=document.createDocumentFragment(),a=ze();s.append(a),this.#n.set(t,{effect:je(()=>n(a)),fragment:s})}else this.#t.set(t,je(()=>n(this.anchor)));if(this.#e.set(r,t),i){for(const[o,u]of this.#t)o===t?r.skipped_effects.delete(u):r.skipped_effects.add(u);for(const[o,u]of this.#n)o===t?r.skipped_effects.delete(u.effect):r.skipped_effects.add(u.effect);r.oncommit(this.#s),r.ondiscard(this.#r)}else J&&(this.anchor=Q),this.#s()}}function cu(e){He===null&&vs(),js(()=>{const t=$t(e);if(typeof t=="function")return t})}function hu(e){He===null&&vs(),cu(()=>()=>$t(e))}function ua(e,t,n=!1){J&&ir();var r=new fu(e),i=n?tn:0;function s(a,o){if(J){const l=ms(e)===er;if(a===l){var u=Vn();Me(u),r.anchor=u,ct(!1),r.ensure(a,o),ct(!0);return}}r.ensure(a,o)}ui(()=>{var a=!1;t((o,u=!0)=>{a=!0,s(u,o)}),a||s(!1,null)},i)}function la(e,t){return t}function du(e,t,n){for(var r=[],i=t.length,s,a=t.length,o=0;o<i;o++){let h=t[o];Rt(h,()=>{if(s){if(s.pending.delete(h),s.done.add(h),s.pending.size===0){var c=e.outrogroups;Mr(tr(s.done)),c.delete(s),c.size===0&&(e.outrogroups=null)}}else a-=1},!1)}if(a===0){var u=r.length===0&&n!==null;if(u){var l=n,f=l.parentNode;Rs(f),f.append(l),e.items.clear()}Mr(t,!u)}else s={pending:new Set(t),done:new Set},(e.outrogroups??=new Set).add(s)}function Mr(e,t=!0){for(var n=0;n<e.length;n++)Ae(e[n],t)}var Fi;function hi(e,t,n,r,i,s=null){var a=e,o=new Map,u=(t&ss)!==0;if(u){var l=e;a=J?Me(vt(l)):l.appendChild(ze())}J&&ir();var f=null,h=Ps(()=>{var O=n();return os(O)?O:O==null?[]:tr(O)}),c,d=!0;function g(){m.fallback=f,pu(m,c,a,t,r),f!==null&&(c.length===0?f.f&ft?(f.f^=ft,yn(f,null,a)):li(f):Rt(f,()=>{f=null}))}var $=ui(()=>{c=D(h);var O=c.length;let k=!1;if(J){var N=ms(a)===er;N!==(O===0)&&(a=Vn(),Me(a),ct(!1),k=!0)}for(var j=new Set,ee=ue,B=Fs(),S=0;S<O;S+=1){J&&Q.nodeType===cn&&Q.data===qr&&(a=Q,k=!0,ct(!1));var p=c[S],T=r(p,S),_=d?null:o.get(T);_?(_.v&&sn(_.v,p),_.i&&sn(_.i,S),B&&ee.skipped_effects.delete(_.e)):(_=vu(o,d?a:Fi??=ze(),p,T,S,i,t,n),d||(_.e.f|=ft),o.set(T,_)),j.add(T)}if(O===0&&s&&!f&&(d?f=je(()=>s(a)):(f=je(()=>s(Fi??=ze())),f.f|=ft)),J&&O>0&&Me(Vn()),!d)if(B){for(const[y,H]of o)j.has(y)||ee.skipped_effects.add(H.e);ee.oncommit(g),ee.ondiscard(()=>{})}else g();k&&ct(!0),D(h)}),m={effect:$,items:o,outrogroups:null,fallback:f};d=!1,J&&(a=Q)}function pu(e,t,n,r,i){var s=(r&ao)!==0,a=t.length,o=e.items,u=e.effect.first,l,f=null,h,c=[],d=[],g,$,m,O;if(s)for(O=0;O<a;O+=1)g=t[O],$=i(g,O),m=o.get($).e,m.f&ft||(m.nodes?.a?.measure(),(h??=new Set).add(m));for(O=0;O<a;O+=1){if(g=t[O],$=i(g,O),m=o.get($).e,e.outrogroups!==null)for(const _ of e.outrogroups)_.pending.delete(m),_.done.delete(m);if(m.f&ft)if(m.f^=ft,m===u)yn(m,null,n);else{var k=f?f.next:u;m===e.effect.last&&(e.effect.last=m.prev),m.prev&&(m.prev.next=m.next),m.next&&(m.next.prev=m.prev),yt(e,f,m),yt(e,m,k),yn(m,k,n),f=m,c=[],d=[],u=f.next;continue}if(m.f&Ge&&(li(m),s&&(m.nodes?.a?.unfix(),(h??=new Set).delete(m))),m!==u){if(l!==void 0&&l.has(m)){if(c.length<d.length){var N=d[0],j;f=N.prev;var ee=c[0],B=c[c.length-1];for(j=0;j<c.length;j+=1)yn(c[j],N,n);for(j=0;j<d.length;j+=1)l.delete(d[j]);yt(e,ee.prev,B.next),yt(e,f,ee),yt(e,B,N),u=N,f=B,O-=1,c=[],d=[]}else l.delete(m),yn(m,u,n),yt(e,m.prev,m.next),yt(e,m,f===null?e.effect.first:f.next),yt(e,f,m),f=m;continue}for(c=[],d=[];u!==null&&u!==m;)(l??=new Set).add(u),d.push(u),u=u.next;if(u===null)continue}m.f&ft||c.push(m),f=m,u=m.next}if(e.outrogroups!==null){for(const _ of e.outrogroups)_.pending.size===0&&(Mr(tr(_.done)),e.outrogroups?.delete(_));e.outrogroups.size===0&&(e.outrogroups=null)}if(u!==null||l!==void 0){var S=[];if(l!==void 0)for(m of l)m.f&Ge||S.push(m);for(;u!==null;)!(u.f&Ge)&&u!==e.fallback&&S.push(u),u=u.next;var p=S.length;if(p>0){var T=r&ss&&a===0?n:null;if(s){for(O=0;O<p;O+=1)S[O].nodes?.a?.measure();for(O=0;O<p;O+=1)S[O].nodes?.a?.fix()}du(e,S,T)}}s&&hn(()=>{if(h!==void 0)for(m of h)m.nodes?.a?.apply()})}function vu(e,t,n,r,i,s,a,o){var u=a&io?a&oo?zt(n):ni(n,!1,!1):null,l=a&so?zt(i):null;return{v:u,i:l,e:je(()=>(s(t,u??n,l??i,o),()=>{e.delete(r)}))}}function yn(e,t,n){if(e.nodes)for(var r=e.nodes.start,i=e.nodes.end,s=t&&!(t.f&ft)?t.nodes.start:n;r!==null;){var a=nt(r);if(s.before(r),r===i)return;r=a}}function yt(e,t,n){t===null?e.effect.first=n:t.next=n,n===null?e.effect.last=t:n.prev=t}function di(e,t){si(()=>{var n=e.getRootNode(),r=n.host?n:n.head??n.ownerDocument.head;if(!r.querySelector("#"+t.hash)){const i=document.createElement("style");i.id=t.hash,i.textContent=t.code,r.appendChild(i)}})}function fa(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=fa(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function gu(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=fa(e))&&(r&&(r+=" "),r+=t);return r}function mu(e){return typeof e=="object"?gu(e):e??""}const Gi=[...`
|
|
3
|
-
\r\f \v\uFEFF`];function _u(e,t,n){var r=e==null?"":""+e;if(t&&(r=r?r+" "+t:t),n){for(var i in n)if(n[i])r=r?r+" "+i:i;else if(r.length)for(var s=i.length,a=0;(a=r.indexOf(i,a))>=0;){var o=a+s;(a===0||Gi.includes(r[a-1]))&&(o===r.length||Gi.includes(r[o]))?r=(a===0?"":r.substring(0,a))+r.substring(o+1):a=o}}return r===""?null:r}function bu(e,t){return e==null?null:String(e)}function pi(e,t,n,r,i,s){var a=e.__className;if(J||a!==n||a===void 0){var o=_u(n,r,s);(!J||o!==e.getAttribute("class"))&&(o==null?e.removeAttribute("class"):e.className=o),e.__className=n}else if(s&&i!==s)for(var u in s){var l=!!s[u];(i==null||l!==!!i[u])&&e.classList.toggle(u,l)}return s}function yu(e,t,n,r){var i=e.__style;if(J||i!==t){var s=bu(t);(!J||s!==e.getAttribute("style"))&&(s==null?e.removeAttribute("style"):e.style.cssText=s),e.__style=t}return r}const Eu=Symbol("is custom element"),xu=Symbol("is html");function wu(e){if(J){var t=!1,n=()=>{if(!t){if(t=!0,e.hasAttribute("value")){var r=e.value;Wn(e,"value",null),e.value=r}if(e.hasAttribute("checked")){var i=e.checked;Wn(e,"checked",null),e.checked=i}}};e.__on_r=n,hn(n),Yo()}}function Su(e,t){var n=ca(e);n.value===(n.value=t??void 0)||e.value===t&&(t!==0||e.nodeName!=="PROGRESS")||(e.value=t??"")}function Wn(e,t,n,r){var i=ca(e);J&&(i[t]=e.getAttribute(t),t==="src"||t==="srcset"||t==="href"&&e.nodeName==="LINK")||i[t]!==(i[t]=n)&&(t==="loading"&&(e[yo]=n),n==null?e.removeAttribute(t):typeof n!="string"&&Cu(e).includes(t)?e[t]=n:e.setAttribute(t,n))}function ca(e){return e.__attributes??={[Eu]:e.nodeName.includes("-"),[xu]:e.namespaceURI===vo}}var ki=new Map;function Cu(e){var t=e.getAttribute("is")||e.nodeName,n=ki.get(t);if(n)return n;ki.set(t,n=[]);for(var r,i=e,s=Element.prototype;s!==i;){r=mo(i);for(var a in r)r[a].set&&n.push(a);i=us(i)}return n}class vi{#e=new WeakMap;#t;#n;static entries=new WeakMap;constructor(t){this.#n=t}observe(t,n){var r=this.#e.get(t)||new Set;return r.add(n),this.#e.set(t,r),this.#i().observe(t,this.#n),()=>{var i=this.#e.get(t);i.delete(n),i.size===0&&(this.#e.delete(t),this.#t.unobserve(t))}}#i(){return this.#t??(this.#t=new ResizeObserver(t=>{for(var n of t){vi.entries.set(n.target,n);for(var r of this.#e.get(n.target)||[])r(n)}}))}}var Tu=new vi({box:"border-box"});function Au(e,t,n){var r=Tu.observe(e,()=>n(e[t]));si(()=>($t(()=>n(e[t])),r))}function Ui(e,t){return e===t||e?.[xn]===t}function Iu(e={},t,n,r){return si(()=>{var i,s;return ai(()=>{i=s,s=r?.()||[],$t(()=>{e!==n(...s)&&(t(e,...s),i&&Ui(n(...i),e)&&t(null,...i))})}),()=>{hn(()=>{s&&Ui(n(...s),e)&&t(null,...s)})}}),e}function gi(e,t,n){if(e==null)return t(void 0),n&&n(void 0),xt;const r=$t(()=>e.subscribe(t,n));return r.unsubscribe?()=>r.unsubscribe():r}const Qt=[];function Pu(e,t){return{subscribe:lr(e,t).subscribe}}function lr(e,t=xt){let n=null;const r=new Set;function i(o){if(bs(e,o)&&(e=o,n)){const u=!Qt.length;for(const l of r)l[1](),Qt.push(l,e);if(u){for(let l=0;l<Qt.length;l+=2)Qt[l][0](Qt[l+1]);Qt.length=0}}}function s(o){i(o(e))}function a(o,u=xt){const l=[o,u];return r.add(l),r.size===1&&(n=t(i,s)||xt),o(e),()=>{r.delete(l),r.size===0&&n&&(n(),n=null)}}return{set:i,update:s,subscribe:a}}function pn(e,t,n){const r=!Array.isArray(e),i=r?[e]:e;if(!i.every(Boolean))throw new Error("derived() expects stores as input, got a falsy value");const s=t.length<2;return Pu(n,(a,o)=>{let u=!1;const l=[];let f=0,h=xt;const c=()=>{if(f)return;h();const g=t(r?l[0]:l,a,o);s?a(g):h=typeof g=="function"?g:xt},d=i.map((g,$)=>gi(g,m=>{l[$]=m,f&=~(1<<$),u&&c()},()=>{f|=1<<$}));return u=!0,c(),function(){ls(d),h(),u=!1}})}function $u(e){let t;return gi(e,n=>t=n)(),t}let Dn=!1,Hr=Symbol();function mi(e,t,n){const r=n[t]??={store:null,source:ni(void 0),unsubscribe:xt};if(r.store!==e&&!(Hr in n))if(r.unsubscribe(),r.store=e??null,e==null)r.source.v=void 0,r.unsubscribe=xt;else{var i=!0;r.unsubscribe=gi(e,s=>{i?r.source.v=s:re(r.source,s)}),i=!1}return e&&Hr in n?$u(e):D(r.source)}function _i(){const e={};function t(){Us(()=>{for(var n in e)e[n].unsubscribe();Cn(e,Hr,{enumerable:!1,value:!0})})}return[e,t]}function Ou(e){var t=Dn;try{return Dn=!1,[e(),Dn]}finally{Dn=t}}function Ut(e,t,n,r){var i=(n&fo)!==0,s=(n&co)!==0,a=r,o=!0,u=()=>(o&&(o=!1,a=s?$t(r):r),a),l;if(i){var f=xn in e||ps in e;l=Lt(e,t)?.set??(f&&t in e?k=>e[t]=k:void 0)}var h,c=!1;i?[h,c]=Ou(()=>e[t]):h=e[t],h===void 0&&r!==void 0&&(h=u(),l&&(Ao(),l(h)));var d;if(d=()=>{var k=e[t];return k===void 0?u():(o=!0,k)},!(n&lo))return d;if(l){var g=e.$$legacy;return function(k,N){return arguments.length>0?((!N||g||c)&&l(N?d():k),k):d()}}var $=!1,m=(n&uo?ur:Ps)(()=>($=!1,d()));i&&D(m);var O=K;return function(k,N){if(arguments.length>0){const j=N?D(m):i?Fe(k):k;return re(m,j),$=!0,a!==void 0&&(a=j),k}return At&&$||O.f&ht?m.v:D(m)}}function Nu(e){return new Mu(e)}class Mu{#e;#t;constructor(t){var n=new Map,r=(s,a)=>{var o=ni(a,!1,!1);return n.set(s,o),o};const i=new Proxy({...t.props||{},$$events:{}},{get(s,a){return D(n.get(a)??r(a,Reflect.get(s,a)))},has(s,a){return a===ps?!0:(D(n.get(a)??r(a,Reflect.get(s,a))),Reflect.has(s,a))},set(s,a,o){return re(n.get(a)??r(a,o),o),Reflect.set(s,a,o)}});this.#t=(t.hydrate?uu:aa)(t.component,{target:t.target,anchor:t.anchor,props:i,context:t.context,intro:t.intro??!1,recover:t.recover}),(!t?.props?.$$host||t.sync===!1)&&St(),this.#e=i.$$events;for(const s of Object.keys(this.#t))s==="$set"||s==="$destroy"||s==="$on"||Cn(this,s,{get(){return this.#t[s]},set(a){this.#t[s]=a},enumerable:!0});this.#t.$set=s=>{Object.assign(i,s)},this.#t.$destroy=()=>{lu(this.#t)}}$set(t){this.#t.$set(t)}$on(t,n){this.#e[t]=this.#e[t]||[];const r=(...i)=>n.call(this,...i);return this.#e[t].push(r),()=>{this.#e[t]=this.#e[t].filter(i=>i!==r)}}$destroy(){this.#t.$destroy()}}let ha;typeof HTMLElement=="function"&&(ha=class extends HTMLElement{$$ctor;$$s;$$c;$$cn=!1;$$d={};$$r=!1;$$p_d={};$$l={};$$l_u=new Map;$$me;constructor(e,t,n){super(),this.$$ctor=e,this.$$s=t,n&&this.attachShadow({mode:"open"})}addEventListener(e,t,n){if(this.$$l[e]=this.$$l[e]||[],this.$$l[e].push(t),this.$$c){const r=this.$$c.$on(e,t);this.$$l_u.set(t,r)}super.addEventListener(e,t,n)}removeEventListener(e,t,n){if(super.removeEventListener(e,t,n),this.$$c){const r=this.$$l_u.get(t);r&&(r(),this.$$l_u.delete(t))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let e=function(r){return i=>{const s=document.createElement("slot");r!=="default"&&(s.name=r),kt(i,s)}};if(await Promise.resolve(),!this.$$cn||this.$$c)return;const t={},n=Hu(this);for(const r of this.$$s)r in n&&(r==="default"&&!this.$$d.children?(this.$$d.children=e(r),t.default=!0):t[r]=e(r));for(const r of this.attributes){const i=this.$$g_p(r.name);i in this.$$d||(this.$$d[i]=Fn(i,r.value,this.$$p_d,"toProp"))}for(const r in this.$$p_d)!(r in this.$$d)&&this[r]!==void 0&&(this.$$d[r]=this[r],delete this[r]);this.$$c=Nu({component:this.$$ctor,target:this.shadowRoot||this,props:{...this.$$d,$$slots:t,$$host:this}}),this.$$me=Zo(()=>{ai(()=>{this.$$r=!0;for(const r of Un(this.$$c)){if(!this.$$p_d[r]?.reflect)continue;this.$$d[r]=this.$$c[r];const i=Fn(r,this.$$d[r],this.$$p_d,"toAttribute");i==null?this.removeAttribute(this.$$p_d[r].attribute||r):this.setAttribute(this.$$p_d[r].attribute||r,i)}this.$$r=!1})});for(const r in this.$$l)for(const i of this.$$l[r]){const s=this.$$c.$on(r,i);this.$$l_u.set(i,s)}this.$$l={}}}attributeChangedCallback(e,t,n){this.$$r||(e=this.$$g_p(e),this.$$d[e]=Fn(e,n,this.$$p_d,"toProp"),this.$$c?.$set({[e]:this.$$d[e]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$me(),this.$$c=void 0)})}$$g_p(e){return Un(this.$$p_d).find(t=>this.$$p_d[t].attribute===e||!this.$$p_d[t].attribute&&t.toLowerCase()===e)||e}});function Fn(e,t,n,r){const i=n[e]?.type;if(t=i==="Boolean"&&typeof t!="boolean"?t!=null:t,!r||!n[e])return t;if(r==="toAttribute")switch(i){case"Object":case"Array":return t==null?null:JSON.stringify(t);case"Boolean":return t?"":null;case"Number":return t??null;default:return t}else switch(i){case"Object":case"Array":return t&&JSON.parse(t);case"Boolean":return t;case"Number":return t!=null?+t:t;default:return t}}function Hu(e){const t={};return e.childNodes.forEach(n=>{t[n.slot||"default"]=!0}),t}function bi(e,t,n,r,i,s){let a=class extends ha{constructor(){super(e,n,i),this.$$p_d=t}static get observedAttributes(){return Un(t).map(o=>(t[o].attribute||o).toLowerCase())}};return Un(t).forEach(o=>{Cn(a.prototype,o,{get(){return this.$$c&&o in this.$$c?this.$$c[o]:this.$$d[o]},set(u){u=Fn(o,u,t),this.$$d[o]=u;var l=this.$$c;if(l){var f=Lt(l,o)?.get;f?l[o]=u:l.$set({[o]:u})}}})}),r.forEach(o=>{Cn(a.prototype,o,{get(){return this.$$c?.[o]}})}),e.element=a,a}const Pe=(e,t)=>{window.postMessage({type:`Challenges:${e}`,...t},window.location.href)},Bu=e=>{Pe("ChallengeTabClicked",{tabName:e})},Du=e=>{Pe("OptInClicked",{challengeId:e})},Lu=e=>{Pe("OptOutClicked",{challengeId:e})},Ru=e=>{Pe("ChallengeDetailClicked",{challengeId:e})},Fu=e=>{Pe("ChallengeLevelsClicked",{challengeId:e})},Gu=e=>{Pe("ChallengeGamesClicked",{challengeId:e})},ku=e=>{Pe("ChallengeEventsClicked",{challengeId:e})},Uu=e=>{Pe("ChallengeRulesClicked",{challengeId:e})},ju=e=>{Pe("PauseChallengeClicked",{challengeId:e})},Vu=e=>{Pe("ResumeChallengeClicked",{challengeId:e})},Br=e=>{Pe("ChallengeActionSuccess",{action:e})},Dr=(e,t,n)=>{Pe("ChallengeActionFail",{action:e,errorMessage:t,errorCode:n})},zu=(e,t=!1)=>{window.postMessage({type:t?"OpenIntegratedGameFrame":"GameClick",gameId:e.CasinoGameId,ClientCompatibility:e.ClientCompatibility,GameId:e.GameId,GameName:e.GameName,GameLaunchUrl:e.GameLaunchUrl,RestrictedCountries:e.RestrictedCountries,Vendor:e.Vendor},window.location.href)},Xu=()=>{Pe("GoToDeposit")},da=()=>{Pe("LoginClicked")},Yu=e=>{Pe("PromoChallengeClicked",{type:e})},Wu="Challenges:OptoutConfirmed";var En=(e=>(e[e.Accumulative=0]="Accumulative",e[e.SingleBet=1]="SingleBet",e[e.MultipleOneBetSize=2]="MultipleOneBetSize",e[e.BetMultiplier=3]="BetMultiplier",e))(En||{}),pa=(e=>(e[e.Single=0]="Single",e[e.Daily=1]="Daily",e[e.Weekly=2]="Weekly",e[e.Monthly=3]="Monthly",e))(pa||{}),Lr=(e=>(e[e.Draft=0]="Draft",e[e.Enabled=1]="Enabled",e[e.Paused=2]="Paused",e[e.Closed=3]="Closed",e[e.Deleted=4]="Deleted",e))(Lr||{}),U=(e=>(e[e.Started=0]="Started",e[e.InProgress=1]="InProgress",e[e.PendingLevelReward=2]="PendingLevelReward",e[e.Completed=3]="Completed",e[e.Expired=4]="Expired",e[e.Forfeited=5]="Forfeited",e[e.Awaiting=6]="Awaiting",e[e.Paused=7]="Paused",e))(U||{}),va=(e=>(e[e.Completed=0]="Completed",e[e.Expired=1]="Expired",e[e.Forfeited=2]="Forfeited",e))(va||{}),et=(e=>(e[e.Closed=0]="Closed",e[e.InProgress=1]="InProgress",e[e.Fillup=2]="Fillup",e[e.Completed=3]="Completed",e))(et||{}),ga=(e=>(e[e.RealCash=0]="RealCash",e[e.BonusMoney=1]="BonusMoney",e[e.Mixed=2]="Mixed",e))(ga||{}),fr=(e=>(e[e.GameLaunch=0]="GameLaunch",e[e.Reward=1]="Reward",e[e.Manual=2]="Manual",e[e.Claim=3]="Claim",e[e.Event=4]="Event",e[e.Deposit=5]="Deposit",e[e.ClaimByButton=6]="ClaimByButton",e))(fr||{}),qn=(e=>(e[e.Casino=0]="Casino",e[e.Any=1]="Any",e[e.Sportsbook=2]="Sportsbook",e))(qn||{}),Ht=(e=>(e.OptIn="optIn",e.OptOut="optOut",e.Pause="pause",e.Resume="resume",e.Claim="claim",e))(Ht||{});const an=0,cr=20,qu=10,Zu=7,Ju=4;class ma extends Error{constructor(t,n){super(n??"Challenge API Error"),this.errorCode=t,this.name="ChallengeApiError"}}const Qu=(e,t)=>new URL(`${e}/challenge/${t}`),Qe=async(e,t,n,r=i=>i?.ErrorMessage??null)=>{const s=await(await fetch(Qu(e,t).href,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)})).json();if(!s?.Success)throw new ma(s?.ErrorCode??null,r(s));return s},yi=({domainId:e,locale:t="en",pageNumber:n=an,pageSize:r=cr,sessionId:i,isFutureAvailable:s=!1})=>({DomainId:String(e),PlayerLanguage:t,PageNumber:n,PageSize:r,...i&&{PlayerSession:i,IsFutureAvailable:s}}),_a=({domainId:e,locale:t="en",pageNumber:n=an,pageSize:r=cr,challengeId:i,sessionId:s})=>({DomainId:String(e),PlayerLanguage:t,PageNumber:n,PageSize:r,ChallengeId:i,...s&&{PlayerSession:s}}),_r=e=>Qe(e.endpoint,"GetChallengesInfo",yi(e)),Ku=async({challengeId:e,...t})=>{const n={..._a({...t,challengeId:e})};return(await Qe(t.endpoint,"GetChallengesInfo",n)).Data?.[0]},el=e=>Qe(e.endpoint,"DisplayableWidgetChallenges",yi({...e,isFutureAvailable:e.isFutureAvailable??!0})),tl=async({challengeId:e,...t})=>{const n={..._a({...t,challengeId:e})};return(await Qe(t.endpoint,"DisplayableWidgetChallenges",n)).Data?.[0]},ba=({userId:e,...t})=>{const n={...yi(t),...e&&{UserId:String(e)}};return Qe(t.endpoint,"PlayerHistory",n)},nl=({domainId:e,code:t,sessionId:n,endpoint:r})=>{const i={DomainId:String(e),ActivationCode:t,PlayerSession:n};return Qe(r,"GrantChallengeByCode",i)},rl=async({challengeId:e,sessionId:t,endpoint:n})=>{const r={ChallengeId:e,...t&&{PlayerSession:t}};return(await Qe(n,"GetChallengeGames",r)).ChallengeGames},il=({endpoint:e,domainId:t,sessionId:n,userId:r,progressTo:i,isPause:s=!1})=>{const a={DomainId:String(t),...n&&{PlayerSession:n},...r&&{InternalUserId:String(r)},...s?{ProgressToDeactivate:i}:{ProgressToActivate:i}};return Qe(e,"ChangeProgressStatus",a)},sl=({endpoint:e,domainId:t,challengeProgressId:n})=>{const r={DomainId:String(t),ChallengeProgressId:n};return Qe(e,"ChangeProgressIsNewStatus",r)},al=({endpoint:e,domainId:t,sessionId:n,userId:r,challengeId:i})=>{const s={DomainId:String(t),...n&&{PlayerSession:n},ChallengeId:i,OperatorUserId:String(r)};return Qe(e,"ChallengeForfeit",s,a=>a?.Message??a?.ErrorMessage??null)},ol=({endpoint:e,domainId:t,sessionId:n,challengeId:r})=>{const i={DomainId:String(t),...n&&{PlayerSession:n},ChallengeId:r};return Qe(e,"ChallengePlayerClaimByButtonGrant",i)};var Ei=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function xi(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Rr={exports:{}};/** @license
|
|
4
|
-
* eventsource.js
|
|
5
|
-
* Available under MIT License (MIT)
|
|
6
|
-
* https://github.com/Yaffle/EventSource/
|
|
7
|
-
*/(function(e,t){(function(n){var r=n.setTimeout,i=n.clearTimeout,s=n.XMLHttpRequest,a=n.XDomainRequest,o=n.ActiveXObject,u=n.EventSource,l=n.document,f=n.Promise,h=n.fetch,c=n.Response,d=n.TextDecoder,g=n.TextEncoder,$=n.AbortController;if(typeof window<"u"&&typeof l<"u"&&!("readyState"in l)&&l.body==null&&(l.readyState="loading",window.addEventListener("load",function(v){l.readyState="complete"},!1)),s==null&&o!=null&&(s=function(){return new o("Microsoft.XMLHTTP")}),Object.create==null&&(Object.create=function(v){function C(){}return C.prototype=v,new C}),Date.now||(Date.now=function(){return new Date().getTime()}),$==null){var m=h;h=function(v,C){var P=C.signal;return m(v,{headers:C.headers,credentials:C.credentials,cache:C.cache}).then(function(w){var F=w.body.getReader();return P._reader=F,P._aborted&&P._reader.cancel(),{status:w.status,statusText:w.statusText,headers:w.headers,body:{getReader:function(){return F}}}})},$=function(){this.signal={_reader:null,_aborted:!1},this.abort=function(){this.signal._reader!=null&&this.signal._reader.cancel(),this.signal._aborted=!0}}}function O(){this.bitsNeeded=0,this.codePoint=0}O.prototype.decode=function(v){function C(te,ne,G){if(G===1)return te>=128>>ne&&te<<ne<=2047;if(G===2)return te>=2048>>ne&&te<<ne<=55295||te>=57344>>ne&&te<<ne<=65535;if(G===3)return te>=65536>>ne&&te<<ne<=1114111;throw new Error}function P(te,ne){if(te===6*1)return ne>>6>15?3:ne>31?2:1;if(te===6*2)return ne>15?3:2;if(te===6*3)return 3;throw new Error}for(var w=65533,F="",M=this.bitsNeeded,V=this.codePoint,ae=0;ae<v.length;ae+=1){var W=v[ae];M!==0&&(W<128||W>191||!C(V<<6|W&63,M-6,P(M,V)))&&(M=0,V=w,F+=String.fromCharCode(V)),M===0?(W>=0&&W<=127?(M=0,V=W):W>=192&&W<=223?(M=6*1,V=W&31):W>=224&&W<=239?(M=6*2,V=W&15):W>=240&&W<=247?(M=6*3,V=W&7):(M=0,V=w),M!==0&&!C(V,M,P(M,V))&&(M=0,V=w)):(M-=6,V=V<<6|W&63),M===0&&(V<=65535?F+=String.fromCharCode(V):(F+=String.fromCharCode(55296+(V-65535-1>>10)),F+=String.fromCharCode(56320+(V-65535-1&1023))))}return this.bitsNeeded=M,this.codePoint=V,F};var k=function(){try{return new d().decode(new g().encode("test"),{stream:!0})==="test"}catch(v){console.debug("TextDecoder does not support streaming option. Using polyfill instead: "+v)}return!1};(d==null||g==null||!k())&&(d=O);var N=function(){};function j(v){this.withCredentials=!1,this.readyState=0,this.status=0,this.statusText="",this.responseText="",this.onprogress=N,this.onload=N,this.onerror=N,this.onreadystatechange=N,this._contentType="",this._xhr=v,this._sendTimeout=0,this._abort=N}j.prototype.open=function(v,C){this._abort(!0);var P=this,w=this._xhr,F=1,M=0;this._abort=function(G){P._sendTimeout!==0&&(i(P._sendTimeout),P._sendTimeout=0),(F===1||F===2||F===3)&&(F=4,w.onload=N,w.onerror=N,w.onabort=N,w.onprogress=N,w.onreadystatechange=N,w.abort(),M!==0&&(i(M),M=0),G||(P.readyState=4,P.onabort(null),P.onreadystatechange())),F=0};var V=function(){if(F===1){var G=0,oe="",st=void 0;if("contentType"in w)G=200,oe="OK",st=w.contentType;else try{G=w.status,oe=w.statusText,st=w.getResponseHeader("Content-Type")}catch{G=0,oe="",st=void 0}G!==0&&(F=2,P.readyState=2,P.status=G,P.statusText=oe,P._contentType=st,P.onreadystatechange())}},ae=function(){if(V(),F===2||F===3){F=3;var G="";try{G=w.responseText}catch{}P.readyState=3,P.responseText=G,P.onprogress()}},W=function(G,oe){if((oe==null||oe.preventDefault==null)&&(oe={preventDefault:N}),ae(),F===1||F===2||F===3){if(F=4,M!==0&&(i(M),M=0),P.readyState=4,G==="load")P.onload(oe);else if(G==="error")P.onerror(oe);else if(G==="abort")P.onabort(oe);else throw new TypeError;P.onreadystatechange()}},te=function(G){w!=null&&(w.readyState===4?(!("onload"in w)||!("onerror"in w)||!("onabort"in w))&&W(w.responseText===""?"error":"load",G):w.readyState===3?"onprogress"in w||ae():w.readyState===2&&V())},ne=function(){M=r(function(){ne()},500),w.readyState===3&&ae()};"onload"in w&&(w.onload=function(G){W("load",G)}),"onerror"in w&&(w.onerror=function(G){W("error",G)}),"onabort"in w&&(w.onabort=function(G){W("abort",G)}),"onprogress"in w&&(w.onprogress=ae),"onreadystatechange"in w&&(w.onreadystatechange=function(G){te(G)}),("contentType"in w||!("ontimeout"in s.prototype))&&(C+=(C.indexOf("?")===-1?"?":"&")+"padding=true"),w.open(v,C,!0),"readyState"in w&&(M=r(function(){ne()},0))},j.prototype.abort=function(){this._abort(!1)},j.prototype.getResponseHeader=function(v){return this._contentType},j.prototype.setRequestHeader=function(v,C){var P=this._xhr;"setRequestHeader"in P&&P.setRequestHeader(v,C)},j.prototype.getAllResponseHeaders=function(){return this._xhr.getAllResponseHeaders!=null&&this._xhr.getAllResponseHeaders()||""},j.prototype.send=function(){if((!("ontimeout"in s.prototype)||!("sendAsBinary"in s.prototype)&&!("mozAnon"in s.prototype))&&l!=null&&l.readyState!=null&&l.readyState!=="complete"){var v=this;v._sendTimeout=r(function(){v._sendTimeout=0,v.send()},4);return}var C=this._xhr;"withCredentials"in C&&(C.withCredentials=this.withCredentials);try{C.send(void 0)}catch(P){throw P}};function ee(v){return v.replace(/[A-Z]/g,function(C){return String.fromCharCode(C.charCodeAt(0)+32)})}function B(v){for(var C=Object.create(null),P=v.split(`\r
|
|
8
|
-
`),w=0;w<P.length;w+=1){var F=P[w],M=F.split(": "),V=M.shift(),ae=M.join(": ");C[ee(V)]=ae}this._map=C}B.prototype.get=function(v){return this._map[ee(v)]},s!=null&&s.HEADERS_RECEIVED==null&&(s.HEADERS_RECEIVED=2);function S(){}S.prototype.open=function(v,C,P,w,F,M,V){v.open("GET",F);var ae=0;v.onprogress=function(){var te=v.responseText,ne=te.slice(ae);ae+=ne.length,P(ne)},v.onerror=function(te){te.preventDefault(),w(new Error("NetworkError"))},v.onload=function(){w(null)},v.onabort=function(){w(null)},v.onreadystatechange=function(){if(v.readyState===s.HEADERS_RECEIVED){var te=v.status,ne=v.statusText,G=v.getResponseHeader("Content-Type"),oe=v.getAllResponseHeaders();C(te,ne,G,new B(oe))}},v.withCredentials=M;for(var W in V)Object.prototype.hasOwnProperty.call(V,W)&&v.setRequestHeader(W,V[W]);return v.send(),v};function p(v){this._headers=v}p.prototype.get=function(v){return this._headers.get(v)};function T(){}T.prototype.open=function(v,C,P,w,F,M,V){var ae=null,W=new $,te=W.signal,ne=new d;return h(F,{headers:V,credentials:M?"include":"same-origin",signal:te,cache:"no-store"}).then(function(G){return ae=G.body.getReader(),C(G.status,G.statusText,G.headers.get("Content-Type"),new p(G.headers)),new f(function(oe,st){var mn=function(){ae.read().then(function(Be){if(Be.done)oe(void 0);else{var xe=ne.decode(Be.value,{stream:!0});P(xe),mn()}}).catch(function(Be){st(Be)})};mn()})}).catch(function(G){if(G.name!=="AbortError")return G}).then(function(G){w(G)}),{abort:function(){ae?.cancel(),W.abort()}}};function _(){this._listeners=Object.create(null)}function y(v){r(function(){throw v},0)}_.prototype.dispatchEvent=function(v){v.target=this;var C=this._listeners[v.type];if(C!=null)for(var P=C.length,w=0;w<P;w+=1){var F=C[w];try{typeof F.handleEvent=="function"?F.handleEvent(v):F.call(this,v)}catch(M){y(M)}}},_.prototype.addEventListener=function(v,C){v=String(v);var P=this._listeners,w=P[v];w==null&&(w=[],P[v]=w);for(var F=!1,M=0;M<w.length;M+=1)w[M]===C&&(F=!0);F||w.push(C)},_.prototype.removeEventListener=function(v,C){v=String(v);var P=this._listeners,w=P[v];if(w!=null){for(var F=[],M=0;M<w.length;M+=1)w[M]!==C&&F.push(w[M]);F.length===0?delete P[v]:P[v]=F}};function H(v){this.type=v,this.target=void 0}function Z(v,C){H.call(this,v),this.data=C.data,this.lastEventId=C.lastEventId}Z.prototype=Object.create(H.prototype);function I(v,C){H.call(this,v),this.status=C.status,this.statusText=C.statusText,this.headers=C.headers}I.prototype=Object.create(H.prototype);function x(v,C){H.call(this,v),this.error=C.error}x.prototype=Object.create(H.prototype);var b=-1,A=0,E=1,L=2,R=-1,z=0,ie=1,fe=2,pe=3,$e=/^text\/event\-stream(;.*)?$/i,bt=1e3,rt=18e6,it=function(v,C){var P=v==null?C:parseInt(v,10);return P!==P&&(P=C),Xe(P)},Xe=function(v){return Math.min(Math.max(v,bt),rt)},ce=function(v,C,P){try{typeof C=="function"&&C.call(v,P)}catch(w){y(w)}};function he(v,C){_.call(this),C=C||{},this.onopen=void 0,this.onmessage=void 0,this.onerror=void 0,this.url=void 0,this.readyState=void 0,this.withCredentials=void 0,this.headers=void 0,this._close=void 0,eo(this,v,C)}function Ot(){return s!=null&&"withCredentials"in s.prototype||a==null?new s:new a}var Wt=h!=null&&c!=null&&"body"in c.prototype;function eo(v,C,P){C=String(C);var w=!!P.withCredentials,F=P.lastEventIdQueryParameterName||"lastEventId",M=Xe(1e3),V=it(P.heartbeatTimeout,45e3),ae="",W=M,te=!1,ne=0,G=P.headers||{},oe=P.Transport,st=Wt&&oe==null?void 0:new j(oe!=null?new oe:Ot()),mn=oe!=null&&typeof oe!="string"?new oe:st==null?new T:new S,Be=void 0,xe=0,Ye=b,qt="",Nn="",at="",Mn="",we=z,gr=0,Nt=0,to=function(ve,de,De,Le){if(Ye===A)if(ve===200&&De!=null&&$e.test(De)){Ye=E,te=Date.now(),W=M,v.readyState=E;var Se=new I("open",{status:ve,statusText:de,headers:Le});v.dispatchEvent(Se),ce(v,v.onopen,Se)}else{var me="";ve!==200?(de&&(de=de.replace(/\s+/g," ")),me="EventSource's response has a status "+ve+" "+de+" that is not 200. Aborting the connection."):me="EventSource's response has a Content-Type specifying an unsupported type: "+(De==null?"-":De.replace(/\s+/g," "))+". Aborting the connection.",mr();var Se=new I("error",{status:ve,statusText:de,headers:Le});v.dispatchEvent(Se),ce(v,v.onerror,Se),console.error(me)}},no=function(ve){if(Ye===E){for(var de=-1,De=0;De<ve.length;De+=1){var Le=ve.charCodeAt(De);(Le===10||Le===13)&&(de=De)}var Se=(de!==-1?Mn:"")+ve.slice(0,de+1);Mn=(de===-1?Mn:"")+ve.slice(de+1),ve!==""&&(te=Date.now(),ne+=ve.length);for(var me=0;me<Se.length;me+=1){var Le=Se.charCodeAt(me);if(we===R&&Le===10)we=z;else if(we===R&&(we=z),Le===13||Le===10){if(we!==z){we===ie&&(Nt=me+1);var ot=Se.slice(gr,Nt-1),ut=Se.slice(Nt+(Nt<me&&Se.charCodeAt(Nt)===32?1:0),me);ot==="data"?(qt+=`
|
|
9
|
-
`,qt+=ut):ot==="id"?Nn=ut:ot==="event"?at=ut:ot==="retry"?(M=it(ut,M),W=M):ot==="heartbeatTimeout"&&(V=it(ut,V),xe!==0&&(i(xe),xe=r(function(){_n()},V)))}if(we===z){if(qt!==""){ae=Nn,at===""&&(at="message");var Zt=new Z(at,{data:qt.slice(1),lastEventId:Nn});if(v.dispatchEvent(Zt),at==="open"?ce(v,v.onopen,Zt):at==="message"?ce(v,v.onmessage,Zt):at==="error"&&ce(v,v.onerror,Zt),Ye===L)return}qt="",at=""}we=Le===13?R:z}else we===z&&(gr=me,we=ie),we===ie?Le===58&&(Nt=me+1,we=fe):we===fe&&(we=pe)}}},$i=function(ve){if(Ye===E||Ye===A){Ye=b,xe!==0&&(i(xe),xe=0),xe=r(function(){_n()},W),W=Xe(Math.min(M*16,W*2)),v.readyState=A;var de=new x("error",{error:ve});v.dispatchEvent(de),ce(v,v.onerror,de),ve!=null&&console.error(ve)}},mr=function(){Ye=L,Be!=null&&(Be.abort(),Be=void 0),xe!==0&&(i(xe),xe=0),v.readyState=L},_n=function(){if(xe=0,Ye!==b){if(!te&&Be!=null)$i(new Error("No activity within "+V+" milliseconds. "+(Ye===A?"No response received.":ne+" chars received.")+" Reconnecting.")),Be!=null&&(Be.abort(),Be=void 0);else{var ve=Math.max((te||Date.now())+V-Date.now(),1);te=!1,xe=r(function(){_n()},ve)}return}te=!1,ne=0,xe=r(function(){_n()},V),Ye=A,qt="",at="",Nn=ae,Mn="",gr=0,Nt=0,we=z;var de=C;if(C.slice(0,5)!=="data:"&&C.slice(0,5)!=="blob:"&&ae!==""){var De=C.indexOf("?");de=De===-1?C:C.slice(0,De+1)+C.slice(De+1).replace(/(?:^|&)([^=&]*)(?:=[^&]*)?/g,function(ut,Zt){return Zt===F?"":ut}),de+=(C.indexOf("?")===-1?"?":"&")+F+"="+encodeURIComponent(ae)}var Le=v.withCredentials,Se={};Se.Accept="text/event-stream";var me=v.headers;if(me!=null)for(var ot in me)Object.prototype.hasOwnProperty.call(me,ot)&&(Se[ot]=me[ot]);try{Be=mn.open(st,to,no,$i,de,Le,Se)}catch(ut){throw mr(),ut}};v.url=C,v.readyState=A,v.withCredentials=w,v.headers=G,v._close=mr,_n()}he.prototype=Object.create(_.prototype),he.prototype.CONNECTING=A,he.prototype.OPEN=E,he.prototype.CLOSED=L,he.prototype.close=function(){this._close()},he.CONNECTING=A,he.OPEN=E,he.CLOSED=L,he.prototype.withCredentials=void 0;var Pi=u;s!=null&&(u==null||!("withCredentials"in u.prototype))&&(Pi=he),function(v){{var C=v(t);C!==void 0&&(e.exports=C)}}(function(v){v.EventSourcePolyfill=he,v.NativeEventSource=u,v.EventSource=Pi})})(typeof globalThis>"u"?typeof window<"u"?window:typeof self<"u"?self:Ei:globalThis)})(Rr,Rr.exports);var ji=Rr.exports;const Vi=(e,t)=>{try{return JSON.parse(e?.data)}catch(n){console.error(`Exception when parsing challenges ${t} live update`,n);return}},ul=e=>{const{endpoint:t,userId:n,sessionId:r,onNewProgress:i,onSessionExpired:s,onChallengeEnabledChange:a,onProgressForfeited:o}=e;let u,l;const f=()=>{u?.close(),l?.close(),u=void 0,l=void 0};return typeof EventSource>"u"||!t?{close:f}:(n&&r&&(u=new ji.EventSourcePolyfill(`${t}/v2/player/${n}/information/updates`,{headers:{"X-SessionId":r}}),u.addEventListener("message",h=>{const c=Vi(h,"player");if(!c)return;if(c.type==="SESSION_EXPIRATION"){f(),s?.();return}const d=c.body;if(d?.messageType==="newProgressNotification"){const g=d.challengeProgress;g&&String(g.InternalUserId)===String(n)&&i?.(g)}})),l=new ji.EventSourcePolyfill(`${t}/v1/encoder/challenges/*/update`),l.addEventListener("message",h=>{const d=Vi(h,"status")?.data;if(d)switch(d.messageType){case"disabledChallengeNotification":a?.(String(d.challengeId),!1);break;case"enabledChallengeNotification":a?.(String(d.challengeId),!0);break;case"forfeitedChallengeProgressNotification":o?.(String(d.challengeProgressId));break}}),{close:f})};var ya={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(Ei,function(){var n=1e3,r=6e4,i=36e5,s="millisecond",a="second",o="minute",u="hour",l="day",f="week",h="month",c="quarter",d="year",g="date",$="Invalid Date",m=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,O=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,k={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(I){var x=["th","st","nd","rd"],b=I%100;return"["+I+(x[(b-20)%10]||x[b]||x[0])+"]"}},N=function(I,x,b){var A=String(I);return!A||A.length>=x?I:""+Array(x+1-A.length).join(b)+I},j={s:N,z:function(I){var x=-I.utcOffset(),b=Math.abs(x),A=Math.floor(b/60),E=b%60;return(x<=0?"+":"-")+N(A,2,"0")+":"+N(E,2,"0")},m:function I(x,b){if(x.date()<b.date())return-I(b,x);var A=12*(b.year()-x.year())+(b.month()-x.month()),E=x.clone().add(A,h),L=b-E<0,R=x.clone().add(A+(L?-1:1),h);return+(-(A+(b-E)/(L?E-R:R-E))||0)},a:function(I){return I<0?Math.ceil(I)||0:Math.floor(I)},p:function(I){return{M:h,y:d,w:f,d:l,D:g,h:u,m:o,s:a,ms:s,Q:c}[I]||String(I||"").toLowerCase().replace(/s$/,"")},u:function(I){return I===void 0}},ee="en",B={};B[ee]=k;var S="$isDayjsObject",p=function(I){return I instanceof H||!(!I||!I[S])},T=function I(x,b,A){var E;if(!x)return ee;if(typeof x=="string"){var L=x.toLowerCase();B[L]&&(E=L),b&&(B[L]=b,E=L);var R=x.split("-");if(!E&&R.length>1)return I(R[0])}else{var z=x.name;B[z]=x,E=z}return!A&&E&&(ee=E),E||!A&&ee},_=function(I,x){if(p(I))return I.clone();var b=typeof x=="object"?x:{};return b.date=I,b.args=arguments,new H(b)},y=j;y.l=T,y.i=p,y.w=function(I,x){return _(I,{locale:x.$L,utc:x.$u,x:x.$x,$offset:x.$offset})};var H=function(){function I(b){this.$L=T(b.locale,null,!0),this.parse(b),this.$x=this.$x||b.x||{},this[S]=!0}var x=I.prototype;return x.parse=function(b){this.$d=function(A){var E=A.date,L=A.utc;if(E===null)return new Date(NaN);if(y.u(E))return new Date;if(E instanceof Date)return new Date(E);if(typeof E=="string"&&!/Z$/i.test(E)){var R=E.match(m);if(R){var z=R[2]-1||0,ie=(R[7]||"0").substring(0,3);return L?new Date(Date.UTC(R[1],z,R[3]||1,R[4]||0,R[5]||0,R[6]||0,ie)):new Date(R[1],z,R[3]||1,R[4]||0,R[5]||0,R[6]||0,ie)}}return new Date(E)}(b),this.init()},x.init=function(){var b=this.$d;this.$y=b.getFullYear(),this.$M=b.getMonth(),this.$D=b.getDate(),this.$W=b.getDay(),this.$H=b.getHours(),this.$m=b.getMinutes(),this.$s=b.getSeconds(),this.$ms=b.getMilliseconds()},x.$utils=function(){return y},x.isValid=function(){return this.$d.toString()!==$},x.isSame=function(b,A){var E=_(b);return this.startOf(A)<=E&&E<=this.endOf(A)},x.isAfter=function(b,A){return _(b)<this.startOf(A)},x.isBefore=function(b,A){return this.endOf(A)<_(b)},x.$g=function(b,A,E){return y.u(b)?this[A]:this.set(E,b)},x.unix=function(){return Math.floor(this.valueOf()/1e3)},x.valueOf=function(){return this.$d.getTime()},x.startOf=function(b,A){var E=this,L=!!y.u(A)||A,R=y.p(b),z=function(Xe,ce){var he=y.w(E.$u?Date.UTC(E.$y,ce,Xe):new Date(E.$y,ce,Xe),E);return L?he:he.endOf(l)},ie=function(Xe,ce){return y.w(E.toDate()[Xe].apply(E.toDate("s"),(L?[0,0,0,0]:[23,59,59,999]).slice(ce)),E)},fe=this.$W,pe=this.$M,$e=this.$D,bt="set"+(this.$u?"UTC":"");switch(R){case d:return L?z(1,0):z(31,11);case h:return L?z(1,pe):z(0,pe+1);case f:var rt=this.$locale().weekStart||0,it=(fe<rt?fe+7:fe)-rt;return z(L?$e-it:$e+(6-it),pe);case l:case g:return ie(bt+"Hours",0);case u:return ie(bt+"Minutes",1);case o:return ie(bt+"Seconds",2);case a:return ie(bt+"Milliseconds",3);default:return this.clone()}},x.endOf=function(b){return this.startOf(b,!1)},x.$set=function(b,A){var E,L=y.p(b),R="set"+(this.$u?"UTC":""),z=(E={},E[l]=R+"Date",E[g]=R+"Date",E[h]=R+"Month",E[d]=R+"FullYear",E[u]=R+"Hours",E[o]=R+"Minutes",E[a]=R+"Seconds",E[s]=R+"Milliseconds",E)[L],ie=L===l?this.$D+(A-this.$W):A;if(L===h||L===d){var fe=this.clone().set(g,1);fe.$d[z](ie),fe.init(),this.$d=fe.set(g,Math.min(this.$D,fe.daysInMonth())).$d}else z&&this.$d[z](ie);return this.init(),this},x.set=function(b,A){return this.clone().$set(b,A)},x.get=function(b){return this[y.p(b)]()},x.add=function(b,A){var E,L=this;b=Number(b);var R=y.p(A),z=function(pe){var $e=_(L);return y.w($e.date($e.date()+Math.round(pe*b)),L)};if(R===h)return this.set(h,this.$M+b);if(R===d)return this.set(d,this.$y+b);if(R===l)return z(1);if(R===f)return z(7);var ie=(E={},E[o]=r,E[u]=i,E[a]=n,E)[R]||1,fe=this.$d.getTime()+b*ie;return y.w(fe,this)},x.subtract=function(b,A){return this.add(-1*b,A)},x.format=function(b){var A=this,E=this.$locale();if(!this.isValid())return E.invalidDate||$;var L=b||"YYYY-MM-DDTHH:mm:ssZ",R=y.z(this),z=this.$H,ie=this.$m,fe=this.$M,pe=E.weekdays,$e=E.months,bt=E.meridiem,rt=function(ce,he,Ot,Wt){return ce&&(ce[he]||ce(A,L))||Ot[he].slice(0,Wt)},it=function(ce){return y.s(z%12||12,ce,"0")},Xe=bt||function(ce,he,Ot){var Wt=ce<12?"AM":"PM";return Ot?Wt.toLowerCase():Wt};return L.replace(O,function(ce,he){return he||function(Ot){switch(Ot){case"YY":return String(A.$y).slice(-2);case"YYYY":return y.s(A.$y,4,"0");case"M":return fe+1;case"MM":return y.s(fe+1,2,"0");case"MMM":return rt(E.monthsShort,fe,$e,3);case"MMMM":return rt($e,fe);case"D":return A.$D;case"DD":return y.s(A.$D,2,"0");case"d":return String(A.$W);case"dd":return rt(E.weekdaysMin,A.$W,pe,2);case"ddd":return rt(E.weekdaysShort,A.$W,pe,3);case"dddd":return pe[A.$W];case"H":return String(z);case"HH":return y.s(z,2,"0");case"h":return it(1);case"hh":return it(2);case"a":return Xe(z,ie,!0);case"A":return Xe(z,ie,!1);case"m":return String(ie);case"mm":return y.s(ie,2,"0");case"s":return String(A.$s);case"ss":return y.s(A.$s,2,"0");case"SSS":return y.s(A.$ms,3,"0");case"Z":return R}return null}(ce)||R.replace(":","")})},x.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},x.diff=function(b,A,E){var L,R=this,z=y.p(A),ie=_(b),fe=(ie.utcOffset()-this.utcOffset())*r,pe=this-ie,$e=function(){return y.m(R,ie)};switch(z){case d:L=$e()/12;break;case h:L=$e();break;case c:L=$e()/3;break;case f:L=(pe-fe)/6048e5;break;case l:L=(pe-fe)/864e5;break;case u:L=pe/i;break;case o:L=pe/r;break;case a:L=pe/n;break;default:L=pe}return E?L:y.a(L)},x.daysInMonth=function(){return this.endOf(h).$D},x.$locale=function(){return B[this.$L]},x.locale=function(b,A){if(!b)return this.$L;var E=this.clone(),L=T(b,A,!0);return L&&(E.$L=L),E},x.clone=function(){return y.w(this.$d,this)},x.toDate=function(){return new Date(this.valueOf())},x.toJSON=function(){return this.isValid()?this.toISOString():null},x.toISOString=function(){return this.$d.toISOString()},x.toString=function(){return this.$d.toUTCString()},I}(),Z=H.prototype;return _.prototype=Z,[["$ms",s],["$s",a],["$m",o],["$H",u],["$W",l],["$M",h],["$y",d],["$D",g]].forEach(function(I){Z[I[1]]=function(x){return this.$g(x,I[0],I[1])}}),_.extend=function(I,x){return I.$i||(I(x,H,_),I.$i=!0),_},_.locale=T,_.isDayjs=p,_.unix=function(I){return _(1e3*I)},_.en=B[ee],_.Ls=B,_.p={},_})})(ya);var ll=ya.exports;const jt=xi(ll);var Ea={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(Ei,function(){var n,r,i=1e3,s=6e4,a=36e5,o=864e5,u=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,l=31536e6,f=2628e6,h=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,c={years:l,months:f,days:o,hours:a,minutes:s,seconds:i,milliseconds:1,weeks:6048e5},d=function(B){return B instanceof j},g=function(B,S,p){return new j(B,p,S.$l)},$=function(B){return r.p(B)+"s"},m=function(B){return B<0},O=function(B){return m(B)?Math.ceil(B):Math.floor(B)},k=function(B){return Math.abs(B)},N=function(B,S){return B?m(B)?{negative:!0,format:""+k(B)+S}:{negative:!1,format:""+B+S}:{negative:!1,format:""}},j=function(){function B(p,T,_){var y=this;if(this.$d={},this.$l=_,p===void 0&&(this.$ms=0,this.parseFromMilliseconds()),T)return g(p*c[$(T)],this);if(typeof p=="number")return this.$ms=p,this.parseFromMilliseconds(),this;if(typeof p=="object")return Object.keys(p).forEach(function(I){y.$d[$(I)]=p[I]}),this.calMilliseconds(),this;if(typeof p=="string"){var H=p.match(h);if(H){var Z=H.slice(2).map(function(I){return I!=null?Number(I):0});return this.$d.years=Z[0],this.$d.months=Z[1],this.$d.weeks=Z[2],this.$d.days=Z[3],this.$d.hours=Z[4],this.$d.minutes=Z[5],this.$d.seconds=Z[6],this.calMilliseconds(),this}}return this}var S=B.prototype;return S.calMilliseconds=function(){var p=this;this.$ms=Object.keys(this.$d).reduce(function(T,_){return T+(p.$d[_]||0)*c[_]},0)},S.parseFromMilliseconds=function(){var p=this.$ms;this.$d.years=O(p/l),p%=l,this.$d.months=O(p/f),p%=f,this.$d.days=O(p/o),p%=o,this.$d.hours=O(p/a),p%=a,this.$d.minutes=O(p/s),p%=s,this.$d.seconds=O(p/i),p%=i,this.$d.milliseconds=p},S.toISOString=function(){var p=N(this.$d.years,"Y"),T=N(this.$d.months,"M"),_=+this.$d.days||0;this.$d.weeks&&(_+=7*this.$d.weeks);var y=N(_,"D"),H=N(this.$d.hours,"H"),Z=N(this.$d.minutes,"M"),I=this.$d.seconds||0;this.$d.milliseconds&&(I+=this.$d.milliseconds/1e3,I=Math.round(1e3*I)/1e3);var x=N(I,"S"),b=p.negative||T.negative||y.negative||H.negative||Z.negative||x.negative,A=H.format||Z.format||x.format?"T":"",E=(b?"-":"")+"P"+p.format+T.format+y.format+A+H.format+Z.format+x.format;return E==="P"||E==="-P"?"P0D":E},S.toJSON=function(){return this.toISOString()},S.format=function(p){var T=p||"YYYY-MM-DDTHH:mm:ss",_={Y:this.$d.years,YY:r.s(this.$d.years,2,"0"),YYYY:r.s(this.$d.years,4,"0"),M:this.$d.months,MM:r.s(this.$d.months,2,"0"),D:this.$d.days,DD:r.s(this.$d.days,2,"0"),H:this.$d.hours,HH:r.s(this.$d.hours,2,"0"),m:this.$d.minutes,mm:r.s(this.$d.minutes,2,"0"),s:this.$d.seconds,ss:r.s(this.$d.seconds,2,"0"),SSS:r.s(this.$d.milliseconds,3,"0")};return T.replace(u,function(y,H){return H||String(_[y])})},S.as=function(p){return this.$ms/c[$(p)]},S.get=function(p){var T=this.$ms,_=$(p);return _==="milliseconds"?T%=1e3:T=_==="weeks"?O(T/c[_]):this.$d[_],T||0},S.add=function(p,T,_){var y;return y=T?p*c[$(T)]:d(p)?p.$ms:g(p,this).$ms,g(this.$ms+y*(_?-1:1),this)},S.subtract=function(p,T){return this.add(p,T,!0)},S.locale=function(p){var T=this.clone();return T.$l=p,T},S.clone=function(){return g(this.$ms,this)},S.humanize=function(p){return n().add(this.$ms,"ms").locale(this.$l).fromNow(!p)},S.valueOf=function(){return this.asMilliseconds()},S.milliseconds=function(){return this.get("milliseconds")},S.asMilliseconds=function(){return this.as("milliseconds")},S.seconds=function(){return this.get("seconds")},S.asSeconds=function(){return this.as("seconds")},S.minutes=function(){return this.get("minutes")},S.asMinutes=function(){return this.as("minutes")},S.hours=function(){return this.get("hours")},S.asHours=function(){return this.as("hours")},S.days=function(){return this.get("days")},S.asDays=function(){return this.as("days")},S.weeks=function(){return this.get("weeks")},S.asWeeks=function(){return this.as("weeks")},S.months=function(){return this.get("months")},S.asMonths=function(){return this.as("months")},S.years=function(){return this.get("years")},S.asYears=function(){return this.as("years")},B}(),ee=function(B,S,p){return B.add(S.years()*p,"y").add(S.months()*p,"M").add(S.days()*p,"d").add(S.hours()*p,"h").add(S.minutes()*p,"m").add(S.seconds()*p,"s").add(S.milliseconds()*p,"ms")};return function(B,S,p){n=p,r=p().$utils(),p.duration=function(y,H){var Z=p.locale();return g(y,{$l:Z},H)},p.isDuration=d;var T=S.prototype.add,_=S.prototype.subtract;S.prototype.add=function(y,H){return d(y)?ee(this,y,1):T.bind(this)(y,H)},S.prototype.subtract=function(y,H){return d(y)?ee(this,y,-1):_.bind(this)(y,H)}}})})(Ea);var fl=Ea.exports;const cl=xi(fl);jt.extend(cl);const hl=e=>e.toString().padStart(2,"0"),zi=(e,t=jt().valueOf())=>{const n=jt(e).valueOf()-t;if(n<=0)return null;const r=jt.duration(n);return[Math.floor(r.asDays()),r.hours(),r.minutes(),r.seconds()].map(hl).join(" : ")},xa=(e,t="DD/MM/YYYY")=>jt(e).format(t),dl=(e,t,n=jt().valueOf())=>{if(!t)return null;switch(e){case U.Expired:case U.Forfeited:case U.Completed:return{date:xa(t)};case U.Started:return{label:"startsIn",countdownTime:zi(t,n)};default:return{label:"endsIn",countdownTime:zi(t,n)}}},pl=(e,t=!1)=>{if(t)return"new";switch(e){case U.Started:case U.Awaiting:return"scheduled";case U.InProgress:case U.PendingLevelReward:return"ongoing";case U.Paused:return"paused";case U.Completed:return"completed";case U.Expired:return"expired";case U.Forfeited:return"rejected";default:return e}},wa=-1,Sa=(e,t=[])=>e.Status===U.Started&&(e.LevelProgresses?.[0]?.ProgressPercentage??0)>0||t.includes(e.ChallengeId),vl=(e,t=[])=>{if(e.Status===U.Completed)return 100;if(!(Sa(e,t)||e.Status===U.PendingLevelReward||e.Status===U.InProgress))return wa;const r=e.LevelProgresses??[],i=r.find(a=>a.ProgressStatus===et.InProgress);return i?i.ProgressPercentage:r.filter(a=>a.ProgressStatus===et.Fillup||a.ProgressStatus===et.Completed).at(-1)?.ProgressPercentage??0},wi=(e,t)=>!!e.Triggers?.includes(t),Si=e=>wi(e,fr.Deposit),Ca=e=>!Si(e)&&wi(e,fr.ClaimByButton),gl=e=>!Si(e)&&!Ca(e)&&wi(e,fr.GameLaunch),br={kind:"viewDetails",labelKey:"viewDetails",variant:"secondary"},ml={kind:"login",labelKey:"login",variant:"primary"},_l=(e,t={})=>{const{isPromo:n=!1,isPaused:r=!1,isAuthorized:i=!1}=t;if(!i)return ml;if(r||Sa(e,[])||e.Status===U.Expired)return br;if(n)return Si(e)?{kind:"deposit",labelKey:"deposit",variant:"primary"}:Ca(e)?{kind:"claim",labelKey:"claim",variant:"primary"}:gl(e)?{kind:"launchGame",labelKey:"launchGame",variant:"primary"}:br;switch(e.Status){case U.Started:return{kind:"optIn",labelKey:"optIn",variant:"primary"};case U.Paused:return{kind:"resume",labelKey:"resume",variant:"secondary"};case U.InProgress:case U.PendingLevelReward:return{kind:"pause",labelKey:"pause",variant:"secondary"};default:return br}};var bl=function(t){return yl(t)&&!El(t)};function yl(e){return!!e&&typeof e=="object"}function El(e){var t=Object.prototype.toString.call(e);return t==="[object RegExp]"||t==="[object Date]"||Sl(e)}var xl=typeof Symbol=="function"&&Symbol.for,wl=xl?Symbol.for("react.element"):60103;function Sl(e){return e.$$typeof===wl}function Cl(e){return Array.isArray(e)?[]:{}}function In(e,t){return t.clone!==!1&&t.isMergeableObject(e)?on(Cl(e),e,t):e}function Tl(e,t,n){return e.concat(t).map(function(r){return In(r,n)})}function Al(e,t){if(!t.customMerge)return on;var n=t.customMerge(e);return typeof n=="function"?n:on}function Il(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[]}function Xi(e){return Object.keys(e).concat(Il(e))}function Ta(e,t){try{return t in e}catch{return!1}}function Pl(e,t){return Ta(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))}function $l(e,t,n){var r={};return n.isMergeableObject(e)&&Xi(e).forEach(function(i){r[i]=In(e[i],n)}),Xi(t).forEach(function(i){Pl(e,i)||(Ta(e,i)&&n.isMergeableObject(t[i])?r[i]=Al(i,n)(e[i],t[i],n):r[i]=In(t[i],n))}),r}function on(e,t,n){n=n||{},n.arrayMerge=n.arrayMerge||Tl,n.isMergeableObject=n.isMergeableObject||bl,n.cloneUnlessOtherwiseSpecified=In;var r=Array.isArray(t),i=Array.isArray(e),s=r===i;return s?r?n.arrayMerge(e,t,n):$l(e,t,n):In(t,n)}on.all=function(t,n){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce(function(r,i){return on(r,i,n)},{})};var Ol=on,Nl=Ol;const Ml=xi(Nl);var Fr=function(e,t){return Fr=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},Fr(e,t)};function hr(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Fr(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var Ke=function(){return Ke=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])}return t},Ke.apply(this,arguments)};function Hl(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function yr(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,s;r<i;r++)(s||!(r in t))&&(s||(s=Array.prototype.slice.call(t,0,r)),s[r]=t[r]);return e.concat(s||Array.prototype.slice.call(t))}function Er(e,t){var n=t&&t.cache?t.cache:kl,r=t&&t.serializer?t.serializer:Fl,i=t&&t.strategy?t.strategy:Ll;return i(e,{cache:n,serializer:r})}function Bl(e){return e==null||typeof e=="number"||typeof e=="boolean"}function Dl(e,t,n,r){var i=Bl(r)?r:n(r),s=t.get(i);return typeof s>"u"&&(s=e.call(this,r),t.set(i,s)),s}function Aa(e,t,n){var r=Array.prototype.slice.call(arguments,3),i=n(r),s=t.get(i);return typeof s>"u"&&(s=e.apply(this,r),t.set(i,s)),s}function Ia(e,t,n,r,i){return n.bind(t,e,r,i)}function Ll(e,t){var n=e.length===1?Dl:Aa;return Ia(e,this,n,t.cache.create(),t.serializer)}function Rl(e,t){return Ia(e,this,Aa,t.cache.create(),t.serializer)}var Fl=function(){return JSON.stringify(arguments)},Gl=function(){function e(){this.cache=Object.create(null)}return e.prototype.get=function(t){return this.cache[t]},e.prototype.set=function(t,n){this.cache[t]=n},e}(),kl={create:function(){return new Gl}},xr={variadic:Rl},Zn=function(){return Zn=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])}return t},Zn.apply(this,arguments)};var X;(function(e){e[e.EXPECT_ARGUMENT_CLOSING_BRACE=1]="EXPECT_ARGUMENT_CLOSING_BRACE",e[e.EMPTY_ARGUMENT=2]="EMPTY_ARGUMENT",e[e.MALFORMED_ARGUMENT=3]="MALFORMED_ARGUMENT",e[e.EXPECT_ARGUMENT_TYPE=4]="EXPECT_ARGUMENT_TYPE",e[e.INVALID_ARGUMENT_TYPE=5]="INVALID_ARGUMENT_TYPE",e[e.EXPECT_ARGUMENT_STYLE=6]="EXPECT_ARGUMENT_STYLE",e[e.INVALID_NUMBER_SKELETON=7]="INVALID_NUMBER_SKELETON",e[e.INVALID_DATE_TIME_SKELETON=8]="INVALID_DATE_TIME_SKELETON",e[e.EXPECT_NUMBER_SKELETON=9]="EXPECT_NUMBER_SKELETON",e[e.EXPECT_DATE_TIME_SKELETON=10]="EXPECT_DATE_TIME_SKELETON",e[e.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE=11]="UNCLOSED_QUOTE_IN_ARGUMENT_STYLE",e[e.EXPECT_SELECT_ARGUMENT_OPTIONS=12]="EXPECT_SELECT_ARGUMENT_OPTIONS",e[e.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE=13]="EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE",e[e.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE=14]="INVALID_PLURAL_ARGUMENT_OFFSET_VALUE",e[e.EXPECT_SELECT_ARGUMENT_SELECTOR=15]="EXPECT_SELECT_ARGUMENT_SELECTOR",e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR=16]="EXPECT_PLURAL_ARGUMENT_SELECTOR",e[e.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT=17]="EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT",e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT=18]="EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT",e[e.INVALID_PLURAL_ARGUMENT_SELECTOR=19]="INVALID_PLURAL_ARGUMENT_SELECTOR",e[e.DUPLICATE_PLURAL_ARGUMENT_SELECTOR=20]="DUPLICATE_PLURAL_ARGUMENT_SELECTOR",e[e.DUPLICATE_SELECT_ARGUMENT_SELECTOR=21]="DUPLICATE_SELECT_ARGUMENT_SELECTOR",e[e.MISSING_OTHER_CLAUSE=22]="MISSING_OTHER_CLAUSE",e[e.INVALID_TAG=23]="INVALID_TAG",e[e.INVALID_TAG_NAME=25]="INVALID_TAG_NAME",e[e.UNMATCHED_CLOSING_TAG=26]="UNMATCHED_CLOSING_TAG",e[e.UNCLOSED_TAG=27]="UNCLOSED_TAG"})(X||(X={}));var se;(function(e){e[e.literal=0]="literal",e[e.argument=1]="argument",e[e.number=2]="number",e[e.date=3]="date",e[e.time=4]="time",e[e.select=5]="select",e[e.plural=6]="plural",e[e.pound=7]="pound",e[e.tag=8]="tag"})(se||(se={}));var un;(function(e){e[e.number=0]="number",e[e.dateTime=1]="dateTime"})(un||(un={}));function Yi(e){return e.type===se.literal}function Ul(e){return e.type===se.argument}function Pa(e){return e.type===se.number}function $a(e){return e.type===se.date}function Oa(e){return e.type===se.time}function Na(e){return e.type===se.select}function Ma(e){return e.type===se.plural}function jl(e){return e.type===se.pound}function Ha(e){return e.type===se.tag}function Ba(e){return!!(e&&typeof e=="object"&&e.type===un.number)}function Gr(e){return!!(e&&typeof e=="object"&&e.type===un.dateTime)}var Da=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/,Vl=/(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g;function zl(e){var t={};return e.replace(Vl,function(n){var r=n.length;switch(n[0]){case"G":t.era=r===4?"long":r===5?"narrow":"short";break;case"y":t.year=r===2?"2-digit":"numeric";break;case"Y":case"u":case"U":case"r":throw new RangeError("`Y/u/U/r` (year) patterns are not supported, use `y` instead");case"q":case"Q":throw new RangeError("`q/Q` (quarter) patterns are not supported");case"M":case"L":t.month=["numeric","2-digit","short","long","narrow"][r-1];break;case"w":case"W":throw new RangeError("`w/W` (week) patterns are not supported");case"d":t.day=["numeric","2-digit"][r-1];break;case"D":case"F":case"g":throw new RangeError("`D/F/g` (day) patterns are not supported, use `d` instead");case"E":t.weekday=r===4?"long":r===5?"narrow":"short";break;case"e":if(r<4)throw new RangeError("`e..eee` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][r-4];break;case"c":if(r<4)throw new RangeError("`c..ccc` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][r-4];break;case"a":t.hour12=!0;break;case"b":case"B":throw new RangeError("`b/B` (period) patterns are not supported, use `a` instead");case"h":t.hourCycle="h12",t.hour=["numeric","2-digit"][r-1];break;case"H":t.hourCycle="h23",t.hour=["numeric","2-digit"][r-1];break;case"K":t.hourCycle="h11",t.hour=["numeric","2-digit"][r-1];break;case"k":t.hourCycle="h24",t.hour=["numeric","2-digit"][r-1];break;case"j":case"J":case"C":throw new RangeError("`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead");case"m":t.minute=["numeric","2-digit"][r-1];break;case"s":t.second=["numeric","2-digit"][r-1];break;case"S":case"A":throw new RangeError("`S/A` (second) patterns are not supported, use `s` instead");case"z":t.timeZoneName=r<4?"short":"long";break;case"Z":case"O":case"v":case"V":case"X":case"x":throw new RangeError("`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead")}return""}),t}var le=function(){return le=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])}return t},le.apply(this,arguments)};var Xl=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i;function Yl(e){if(e.length===0)throw new Error("Number skeleton cannot be empty");for(var t=e.split(Xl).filter(function(c){return c.length>0}),n=[],r=0,i=t;r<i.length;r++){var s=i[r],a=s.split("/");if(a.length===0)throw new Error("Invalid number skeleton");for(var o=a[0],u=a.slice(1),l=0,f=u;l<f.length;l++){var h=f[l];if(h.length===0)throw new Error("Invalid number skeleton")}n.push({stem:o,options:u})}return n}function Wl(e){return e.replace(/^(.*?)-/,"")}var Wi=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,La=/^(@+)?(\+|#+)?[rs]?$/g,ql=/(\*)(0+)|(#+)(0+)|(0+)/g,Ra=/^(0+)$/;function qi(e){var t={};return e[e.length-1]==="r"?t.roundingPriority="morePrecision":e[e.length-1]==="s"&&(t.roundingPriority="lessPrecision"),e.replace(La,function(n,r,i){return typeof i!="string"?(t.minimumSignificantDigits=r.length,t.maximumSignificantDigits=r.length):i==="+"?t.minimumSignificantDigits=r.length:r[0]==="#"?t.maximumSignificantDigits=r.length:(t.minimumSignificantDigits=r.length,t.maximumSignificantDigits=r.length+(typeof i=="string"?i.length:0)),""}),t}function Fa(e){switch(e){case"sign-auto":return{signDisplay:"auto"};case"sign-accounting":case"()":return{currencySign:"accounting"};case"sign-always":case"+!":return{signDisplay:"always"};case"sign-accounting-always":case"()!":return{signDisplay:"always",currencySign:"accounting"};case"sign-except-zero":case"+?":return{signDisplay:"exceptZero"};case"sign-accounting-except-zero":case"()?":return{signDisplay:"exceptZero",currencySign:"accounting"};case"sign-never":case"+_":return{signDisplay:"never"}}}function Zl(e){var t;if(e[0]==="E"&&e[1]==="E"?(t={notation:"engineering"},e=e.slice(2)):e[0]==="E"&&(t={notation:"scientific"},e=e.slice(1)),t){var n=e.slice(0,2);if(n==="+!"?(t.signDisplay="always",e=e.slice(2)):n==="+?"&&(t.signDisplay="exceptZero",e=e.slice(2)),!Ra.test(e))throw new Error("Malformed concise eng/scientific notation");t.minimumIntegerDigits=e.length}return t}function Zi(e){var t={},n=Fa(e);return n||t}function Jl(e){for(var t={},n=0,r=e;n<r.length;n++){var i=r[n];switch(i.stem){case"percent":case"%":t.style="percent";continue;case"%x100":t.style="percent",t.scale=100;continue;case"currency":t.style="currency",t.currency=i.options[0];continue;case"group-off":case",_":t.useGrouping=!1;continue;case"precision-integer":case".":t.maximumFractionDigits=0;continue;case"measure-unit":case"unit":t.style="unit",t.unit=Wl(i.options[0]);continue;case"compact-short":case"K":t.notation="compact",t.compactDisplay="short";continue;case"compact-long":case"KK":t.notation="compact",t.compactDisplay="long";continue;case"scientific":t=le(le(le({},t),{notation:"scientific"}),i.options.reduce(function(u,l){return le(le({},u),Zi(l))},{}));continue;case"engineering":t=le(le(le({},t),{notation:"engineering"}),i.options.reduce(function(u,l){return le(le({},u),Zi(l))},{}));continue;case"notation-simple":t.notation="standard";continue;case"unit-width-narrow":t.currencyDisplay="narrowSymbol",t.unitDisplay="narrow";continue;case"unit-width-short":t.currencyDisplay="code",t.unitDisplay="short";continue;case"unit-width-full-name":t.currencyDisplay="name",t.unitDisplay="long";continue;case"unit-width-iso-code":t.currencyDisplay="symbol";continue;case"scale":t.scale=parseFloat(i.options[0]);continue;case"rounding-mode-floor":t.roundingMode="floor";continue;case"rounding-mode-ceiling":t.roundingMode="ceil";continue;case"rounding-mode-down":t.roundingMode="trunc";continue;case"rounding-mode-up":t.roundingMode="expand";continue;case"rounding-mode-half-even":t.roundingMode="halfEven";continue;case"rounding-mode-half-down":t.roundingMode="halfTrunc";continue;case"rounding-mode-half-up":t.roundingMode="halfExpand";continue;case"integer-width":if(i.options.length>1)throw new RangeError("integer-width stems only accept a single optional option");i.options[0].replace(ql,function(u,l,f,h,c,d){if(l)t.minimumIntegerDigits=f.length;else{if(h&&c)throw new Error("We currently do not support maximum integer digits");if(d)throw new Error("We currently do not support exact integer digits")}return""});continue}if(Ra.test(i.stem)){t.minimumIntegerDigits=i.stem.length;continue}if(Wi.test(i.stem)){if(i.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");i.stem.replace(Wi,function(u,l,f,h,c,d){return f==="*"?t.minimumFractionDigits=l.length:h&&h[0]==="#"?t.maximumFractionDigits=h.length:c&&d?(t.minimumFractionDigits=c.length,t.maximumFractionDigits=c.length+d.length):(t.minimumFractionDigits=l.length,t.maximumFractionDigits=l.length),""});var s=i.options[0];s==="w"?t=le(le({},t),{trailingZeroDisplay:"stripIfInteger"}):s&&(t=le(le({},t),qi(s)));continue}if(La.test(i.stem)){t=le(le({},t),qi(i.stem));continue}var a=Fa(i.stem);a&&(t=le(le({},t),a));var o=Zl(i.stem);o&&(t=le(le({},t),o))}return t}var Ln={"001":["H","h"],419:["h","H","hB","hb"],AC:["H","h","hb","hB"],AD:["H","hB"],AE:["h","hB","hb","H"],AF:["H","hb","hB","h"],AG:["h","hb","H","hB"],AI:["H","h","hb","hB"],AL:["h","H","hB"],AM:["H","hB"],AO:["H","hB"],AR:["h","H","hB","hb"],AS:["h","H"],AT:["H","hB"],AU:["h","hb","H","hB"],AW:["H","hB"],AX:["H"],AZ:["H","hB","h"],BA:["H","hB","h"],BB:["h","hb","H","hB"],BD:["h","hB","H"],BE:["H","hB"],BF:["H","hB"],BG:["H","hB","h"],BH:["h","hB","hb","H"],BI:["H","h"],BJ:["H","hB"],BL:["H","hB"],BM:["h","hb","H","hB"],BN:["hb","hB","h","H"],BO:["h","H","hB","hb"],BQ:["H"],BR:["H","hB"],BS:["h","hb","H","hB"],BT:["h","H"],BW:["H","h","hb","hB"],BY:["H","h"],BZ:["H","h","hb","hB"],CA:["h","hb","H","hB"],CC:["H","h","hb","hB"],CD:["hB","H"],CF:["H","h","hB"],CG:["H","hB"],CH:["H","hB","h"],CI:["H","hB"],CK:["H","h","hb","hB"],CL:["h","H","hB","hb"],CM:["H","h","hB"],CN:["H","hB","hb","h"],CO:["h","H","hB","hb"],CP:["H"],CR:["h","H","hB","hb"],CU:["h","H","hB","hb"],CV:["H","hB"],CW:["H","hB"],CX:["H","h","hb","hB"],CY:["h","H","hb","hB"],CZ:["H"],DE:["H","hB"],DG:["H","h","hb","hB"],DJ:["h","H"],DK:["H"],DM:["h","hb","H","hB"],DO:["h","H","hB","hb"],DZ:["h","hB","hb","H"],EA:["H","h","hB","hb"],EC:["h","H","hB","hb"],EE:["H","hB"],EG:["h","hB","hb","H"],EH:["h","hB","hb","H"],ER:["h","H"],ES:["H","hB","h","hb"],ET:["hB","hb","h","H"],FI:["H"],FJ:["h","hb","H","hB"],FK:["H","h","hb","hB"],FM:["h","hb","H","hB"],FO:["H","h"],FR:["H","hB"],GA:["H","hB"],GB:["H","h","hb","hB"],GD:["h","hb","H","hB"],GE:["H","hB","h"],GF:["H","hB"],GG:["H","h","hb","hB"],GH:["h","H"],GI:["H","h","hb","hB"],GL:["H","h"],GM:["h","hb","H","hB"],GN:["H","hB"],GP:["H","hB"],GQ:["H","hB","h","hb"],GR:["h","H","hb","hB"],GT:["h","H","hB","hb"],GU:["h","hb","H","hB"],GW:["H","hB"],GY:["h","hb","H","hB"],HK:["h","hB","hb","H"],HN:["h","H","hB","hb"],HR:["H","hB"],HU:["H","h"],IC:["H","h","hB","hb"],ID:["H"],IE:["H","h","hb","hB"],IL:["H","hB"],IM:["H","h","hb","hB"],IN:["h","H"],IO:["H","h","hb","hB"],IQ:["h","hB","hb","H"],IR:["hB","H"],IS:["H"],IT:["H","hB"],JE:["H","h","hb","hB"],JM:["h","hb","H","hB"],JO:["h","hB","hb","H"],JP:["H","K","h"],KE:["hB","hb","H","h"],KG:["H","h","hB","hb"],KH:["hB","h","H","hb"],KI:["h","hb","H","hB"],KM:["H","h","hB","hb"],KN:["h","hb","H","hB"],KP:["h","H","hB","hb"],KR:["h","H","hB","hb"],KW:["h","hB","hb","H"],KY:["h","hb","H","hB"],KZ:["H","hB"],LA:["H","hb","hB","h"],LB:["h","hB","hb","H"],LC:["h","hb","H","hB"],LI:["H","hB","h"],LK:["H","h","hB","hb"],LR:["h","hb","H","hB"],LS:["h","H"],LT:["H","h","hb","hB"],LU:["H","h","hB"],LV:["H","hB","hb","h"],LY:["h","hB","hb","H"],MA:["H","h","hB","hb"],MC:["H","hB"],MD:["H","hB"],ME:["H","hB","h"],MF:["H","hB"],MG:["H","h"],MH:["h","hb","H","hB"],MK:["H","h","hb","hB"],ML:["H"],MM:["hB","hb","H","h"],MN:["H","h","hb","hB"],MO:["h","hB","hb","H"],MP:["h","hb","H","hB"],MQ:["H","hB"],MR:["h","hB","hb","H"],MS:["H","h","hb","hB"],MT:["H","h"],MU:["H","h"],MV:["H","h"],MW:["h","hb","H","hB"],MX:["h","H","hB","hb"],MY:["hb","hB","h","H"],MZ:["H","hB"],NA:["h","H","hB","hb"],NC:["H","hB"],NE:["H"],NF:["H","h","hb","hB"],NG:["H","h","hb","hB"],NI:["h","H","hB","hb"],NL:["H","hB"],NO:["H","h"],NP:["H","h","hB"],NR:["H","h","hb","hB"],NU:["H","h","hb","hB"],NZ:["h","hb","H","hB"],OM:["h","hB","hb","H"],PA:["h","H","hB","hb"],PE:["h","H","hB","hb"],PF:["H","h","hB"],PG:["h","H"],PH:["h","hB","hb","H"],PK:["h","hB","H"],PL:["H","h"],PM:["H","hB"],PN:["H","h","hb","hB"],PR:["h","H","hB","hb"],PS:["h","hB","hb","H"],PT:["H","hB"],PW:["h","H"],PY:["h","H","hB","hb"],QA:["h","hB","hb","H"],RE:["H","hB"],RO:["H","hB"],RS:["H","hB","h"],RU:["H"],RW:["H","h"],SA:["h","hB","hb","H"],SB:["h","hb","H","hB"],SC:["H","h","hB"],SD:["h","hB","hb","H"],SE:["H"],SG:["h","hb","H","hB"],SH:["H","h","hb","hB"],SI:["H","hB"],SJ:["H"],SK:["H"],SL:["h","hb","H","hB"],SM:["H","h","hB"],SN:["H","h","hB"],SO:["h","H"],SR:["H","hB"],SS:["h","hb","H","hB"],ST:["H","hB"],SV:["h","H","hB","hb"],SX:["H","h","hb","hB"],SY:["h","hB","hb","H"],SZ:["h","hb","H","hB"],TA:["H","h","hb","hB"],TC:["h","hb","H","hB"],TD:["h","H","hB"],TF:["H","h","hB"],TG:["H","hB"],TH:["H","h"],TJ:["H","h"],TL:["H","hB","hb","h"],TM:["H","h"],TN:["h","hB","hb","H"],TO:["h","H"],TR:["H","hB"],TT:["h","hb","H","hB"],TW:["hB","hb","h","H"],TZ:["hB","hb","H","h"],UA:["H","hB","h"],UG:["hB","hb","H","h"],UM:["h","hb","H","hB"],US:["h","hb","H","hB"],UY:["h","H","hB","hb"],UZ:["H","hB","h"],VA:["H","h","hB"],VC:["h","hb","H","hB"],VE:["h","H","hB","hb"],VG:["h","hb","H","hB"],VI:["h","hb","H","hB"],VN:["H","h"],VU:["h","H"],WF:["H","hB"],WS:["h","H"],XK:["H","hB","h"],YE:["h","hB","hb","H"],YT:["H","hB"],ZA:["H","h","hb","hB"],ZM:["h","hb","H","hB"],ZW:["H","h"],"af-ZA":["H","h","hB","hb"],"ar-001":["h","hB","hb","H"],"ca-ES":["H","h","hB"],"en-001":["h","hb","H","hB"],"en-HK":["h","hb","H","hB"],"en-IL":["H","h","hb","hB"],"en-MY":["h","hb","H","hB"],"es-BR":["H","h","hB","hb"],"es-ES":["H","h","hB","hb"],"es-GQ":["H","h","hB","hb"],"fr-CA":["H","h","hB"],"gl-ES":["H","h","hB"],"gu-IN":["hB","hb","h","H"],"hi-IN":["hB","h","H"],"it-CH":["H","h","hB"],"it-IT":["H","h","hB"],"kn-IN":["hB","h","H"],"ml-IN":["hB","h","H"],"mr-IN":["hB","hb","h","H"],"pa-IN":["hB","hb","h","H"],"ta-IN":["hB","h","hb","H"],"te-IN":["hB","h","H"],"zu-ZA":["H","hB","hb","h"]};function Ql(e,t){for(var n="",r=0;r<e.length;r++){var i=e.charAt(r);if(i==="j"){for(var s=0;r+1<e.length&&e.charAt(r+1)===i;)s++,r++;var a=1+(s&1),o=s<2?1:3+(s>>1),u="a",l=Kl(t);for((l=="H"||l=="k")&&(o=0);o-- >0;)n+=u;for(;a-- >0;)n=l+n}else i==="J"?n+="H":n+=i}return n}function Kl(e){var t=e.hourCycle;if(t===void 0&&e.hourCycles&&e.hourCycles.length&&(t=e.hourCycles[0]),t)switch(t){case"h24":return"k";case"h23":return"H";case"h12":return"h";case"h11":return"K";default:throw new Error("Invalid hourCycle")}var n=e.language,r;n!=="root"&&(r=e.maximize().region);var i=Ln[r||""]||Ln[n||""]||Ln["".concat(n,"-001")]||Ln["001"];return i[0]}var wr,ef=new RegExp("^".concat(Da.source,"*")),tf=new RegExp("".concat(Da.source,"*$"));function q(e,t){return{start:e,end:t}}var nf=!!String.prototype.startsWith&&"_a".startsWith("a",1),rf=!!String.fromCodePoint,sf=!!Object.fromEntries,af=!!String.prototype.codePointAt,of=!!String.prototype.trimStart,uf=!!String.prototype.trimEnd,lf=!!Number.isSafeInteger,ff=lf?Number.isSafeInteger:function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e&&Math.abs(e)<=9007199254740991},kr=!0;try{var cf=ka("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");kr=((wr=cf.exec("a"))===null||wr===void 0?void 0:wr[0])==="a"}catch{kr=!1}var Ji=nf?function(t,n,r){return t.startsWith(n,r)}:function(t,n,r){return t.slice(r,r+n.length)===n},Ur=rf?String.fromCodePoint:function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];for(var r="",i=t.length,s=0,a;i>s;){if(a=t[s++],a>1114111)throw RangeError(a+" is not a valid code point");r+=a<65536?String.fromCharCode(a):String.fromCharCode(((a-=65536)>>10)+55296,a%1024+56320)}return r},Qi=sf?Object.fromEntries:function(t){for(var n={},r=0,i=t;r<i.length;r++){var s=i[r],a=s[0],o=s[1];n[a]=o}return n},Ga=af?function(t,n){return t.codePointAt(n)}:function(t,n){var r=t.length;if(!(n<0||n>=r)){var i=t.charCodeAt(n),s;return i<55296||i>56319||n+1===r||(s=t.charCodeAt(n+1))<56320||s>57343?i:(i-55296<<10)+(s-56320)+65536}},hf=of?function(t){return t.trimStart()}:function(t){return t.replace(ef,"")},df=uf?function(t){return t.trimEnd()}:function(t){return t.replace(tf,"")};function ka(e,t){return new RegExp(e,t)}var jr;if(kr){var Ki=ka("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");jr=function(t,n){var r;Ki.lastIndex=n;var i=Ki.exec(t);return(r=i[1])!==null&&r!==void 0?r:""}}else jr=function(t,n){for(var r=[];;){var i=Ga(t,n);if(i===void 0||Ua(i)||mf(i))break;r.push(i),n+=i>=65536?2:1}return Ur.apply(void 0,r)};var pf=function(){function e(t,n){n===void 0&&(n={}),this.message=t,this.position={offset:0,line:1,column:1},this.ignoreTag=!!n.ignoreTag,this.locale=n.locale,this.requiresOtherClause=!!n.requiresOtherClause,this.shouldParseSkeletons=!!n.shouldParseSkeletons}return e.prototype.parse=function(){if(this.offset()!==0)throw Error("parser can only be used once");return this.parseMessage(0,"",!1)},e.prototype.parseMessage=function(t,n,r){for(var i=[];!this.isEOF();){var s=this.char();if(s===123){var a=this.parseArgument(t,r);if(a.err)return a;i.push(a.val)}else{if(s===125&&t>0)break;if(s===35&&(n==="plural"||n==="selectordinal")){var o=this.clonePosition();this.bump(),i.push({type:se.pound,location:q(o,this.clonePosition())})}else if(s===60&&!this.ignoreTag&&this.peek()===47){if(r)break;return this.error(X.UNMATCHED_CLOSING_TAG,q(this.clonePosition(),this.clonePosition()))}else if(s===60&&!this.ignoreTag&&Vr(this.peek()||0)){var a=this.parseTag(t,n);if(a.err)return a;i.push(a.val)}else{var a=this.parseLiteral(t,n);if(a.err)return a;i.push(a.val)}}}return{val:i,err:null}},e.prototype.parseTag=function(t,n){var r=this.clonePosition();this.bump();var i=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))return{val:{type:se.literal,value:"<".concat(i,"/>"),location:q(r,this.clonePosition())},err:null};if(this.bumpIf(">")){var s=this.parseMessage(t+1,n,!0);if(s.err)return s;var a=s.val,o=this.clonePosition();if(this.bumpIf("</")){if(this.isEOF()||!Vr(this.char()))return this.error(X.INVALID_TAG,q(o,this.clonePosition()));var u=this.clonePosition(),l=this.parseTagName();return i!==l?this.error(X.UNMATCHED_CLOSING_TAG,q(u,this.clonePosition())):(this.bumpSpace(),this.bumpIf(">")?{val:{type:se.tag,value:i,children:a,location:q(r,this.clonePosition())},err:null}:this.error(X.INVALID_TAG,q(o,this.clonePosition())))}else return this.error(X.UNCLOSED_TAG,q(r,this.clonePosition()))}else return this.error(X.INVALID_TAG,q(r,this.clonePosition()))},e.prototype.parseTagName=function(){var t=this.offset();for(this.bump();!this.isEOF()&&gf(this.char());)this.bump();return this.message.slice(t,this.offset())},e.prototype.parseLiteral=function(t,n){for(var r=this.clonePosition(),i="";;){var s=this.tryParseQuote(n);if(s){i+=s;continue}var a=this.tryParseUnquoted(t,n);if(a){i+=a;continue}var o=this.tryParseLeftAngleBracket();if(o){i+=o;continue}break}var u=q(r,this.clonePosition());return{val:{type:se.literal,value:i,location:u},err:null}},e.prototype.tryParseLeftAngleBracket=function(){return!this.isEOF()&&this.char()===60&&(this.ignoreTag||!vf(this.peek()||0))?(this.bump(),"<"):null},e.prototype.tryParseQuote=function(t){if(this.isEOF()||this.char()!==39)return null;switch(this.peek()){case 39:return this.bump(),this.bump(),"'";case 123:case 60:case 62:case 125:break;case 35:if(t==="plural"||t==="selectordinal")break;return null;default:return null}this.bump();var n=[this.char()];for(this.bump();!this.isEOF();){var r=this.char();if(r===39)if(this.peek()===39)n.push(39),this.bump();else{this.bump();break}else n.push(r);this.bump()}return Ur.apply(void 0,n)},e.prototype.tryParseUnquoted=function(t,n){if(this.isEOF())return null;var r=this.char();return r===60||r===123||r===35&&(n==="plural"||n==="selectordinal")||r===125&&t>0?null:(this.bump(),Ur(r))},e.prototype.parseArgument=function(t,n){var r=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(X.EXPECT_ARGUMENT_CLOSING_BRACE,q(r,this.clonePosition()));if(this.char()===125)return this.bump(),this.error(X.EMPTY_ARGUMENT,q(r,this.clonePosition()));var i=this.parseIdentifierIfPossible().value;if(!i)return this.error(X.MALFORMED_ARGUMENT,q(r,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(X.EXPECT_ARGUMENT_CLOSING_BRACE,q(r,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:se.argument,value:i,location:q(r,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(X.EXPECT_ARGUMENT_CLOSING_BRACE,q(r,this.clonePosition())):this.parseArgumentOptions(t,n,i,r);default:return this.error(X.MALFORMED_ARGUMENT,q(r,this.clonePosition()))}},e.prototype.parseIdentifierIfPossible=function(){var t=this.clonePosition(),n=this.offset(),r=jr(this.message,n),i=n+r.length;this.bumpTo(i);var s=this.clonePosition(),a=q(t,s);return{value:r,location:a}},e.prototype.parseArgumentOptions=function(t,n,r,i){var s,a=this.clonePosition(),o=this.parseIdentifierIfPossible().value,u=this.clonePosition();switch(o){case"":return this.error(X.EXPECT_ARGUMENT_TYPE,q(a,u));case"number":case"date":case"time":{this.bumpSpace();var l=null;if(this.bumpIf(",")){this.bumpSpace();var f=this.clonePosition(),h=this.parseSimpleArgStyleIfPossible();if(h.err)return h;var c=df(h.val);if(c.length===0)return this.error(X.EXPECT_ARGUMENT_STYLE,q(this.clonePosition(),this.clonePosition()));var d=q(f,this.clonePosition());l={style:c,styleLocation:d}}var g=this.tryParseArgumentClose(i);if(g.err)return g;var $=q(i,this.clonePosition());if(l&&Ji(l?.style,"::",0)){var m=hf(l.style.slice(2));if(o==="number"){var h=this.parseNumberSkeletonFromString(m,l.styleLocation);return h.err?h:{val:{type:se.number,value:r,location:$,style:h.val},err:null}}else{if(m.length===0)return this.error(X.EXPECT_DATE_TIME_SKELETON,$);var O=m;this.locale&&(O=Ql(m,this.locale));var c={type:un.dateTime,pattern:O,location:l.styleLocation,parsedOptions:this.shouldParseSkeletons?zl(O):{}},k=o==="date"?se.date:se.time;return{val:{type:k,value:r,location:$,style:c},err:null}}}return{val:{type:o==="number"?se.number:o==="date"?se.date:se.time,value:r,location:$,style:(s=l?.style)!==null&&s!==void 0?s:null},err:null}}case"plural":case"selectordinal":case"select":{var N=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(X.EXPECT_SELECT_ARGUMENT_OPTIONS,q(N,Zn({},N)));this.bumpSpace();var j=this.parseIdentifierIfPossible(),ee=0;if(o!=="select"&&j.value==="offset"){if(!this.bumpIf(":"))return this.error(X.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,q(this.clonePosition(),this.clonePosition()));this.bumpSpace();var h=this.tryParseDecimalInteger(X.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,X.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);if(h.err)return h;this.bumpSpace(),j=this.parseIdentifierIfPossible(),ee=h.val}var B=this.tryParsePluralOrSelectOptions(t,o,n,j);if(B.err)return B;var g=this.tryParseArgumentClose(i);if(g.err)return g;var S=q(i,this.clonePosition());return o==="select"?{val:{type:se.select,value:r,options:Qi(B.val),location:S},err:null}:{val:{type:se.plural,value:r,options:Qi(B.val),offset:ee,pluralType:o==="plural"?"cardinal":"ordinal",location:S},err:null}}default:return this.error(X.INVALID_ARGUMENT_TYPE,q(a,u))}},e.prototype.tryParseArgumentClose=function(t){return this.isEOF()||this.char()!==125?this.error(X.EXPECT_ARGUMENT_CLOSING_BRACE,q(t,this.clonePosition())):(this.bump(),{val:!0,err:null})},e.prototype.parseSimpleArgStyleIfPossible=function(){for(var t=0,n=this.clonePosition();!this.isEOF();){var r=this.char();switch(r){case 39:{this.bump();var i=this.clonePosition();if(!this.bumpUntil("'"))return this.error(X.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,q(i,this.clonePosition()));this.bump();break}case 123:{t+=1,this.bump();break}case 125:{if(t>0)t-=1;else return{val:this.message.slice(n.offset,this.offset()),err:null};break}default:this.bump();break}}return{val:this.message.slice(n.offset,this.offset()),err:null}},e.prototype.parseNumberSkeletonFromString=function(t,n){var r=[];try{r=Yl(t)}catch{return this.error(X.INVALID_NUMBER_SKELETON,n)}return{val:{type:un.number,tokens:r,location:n,parsedOptions:this.shouldParseSkeletons?Jl(r):{}},err:null}},e.prototype.tryParsePluralOrSelectOptions=function(t,n,r,i){for(var s,a=!1,o=[],u=new Set,l=i.value,f=i.location;;){if(l.length===0){var h=this.clonePosition();if(n!=="select"&&this.bumpIf("=")){var c=this.tryParseDecimalInteger(X.EXPECT_PLURAL_ARGUMENT_SELECTOR,X.INVALID_PLURAL_ARGUMENT_SELECTOR);if(c.err)return c;f=q(h,this.clonePosition()),l=this.message.slice(h.offset,this.offset())}else break}if(u.has(l))return this.error(n==="select"?X.DUPLICATE_SELECT_ARGUMENT_SELECTOR:X.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,f);l==="other"&&(a=!0),this.bumpSpace();var d=this.clonePosition();if(!this.bumpIf("{"))return this.error(n==="select"?X.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:X.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,q(this.clonePosition(),this.clonePosition()));var g=this.parseMessage(t+1,n,r);if(g.err)return g;var $=this.tryParseArgumentClose(d);if($.err)return $;o.push([l,{value:g.val,location:q(d,this.clonePosition())}]),u.add(l),this.bumpSpace(),s=this.parseIdentifierIfPossible(),l=s.value,f=s.location}return o.length===0?this.error(n==="select"?X.EXPECT_SELECT_ARGUMENT_SELECTOR:X.EXPECT_PLURAL_ARGUMENT_SELECTOR,q(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!a?this.error(X.MISSING_OTHER_CLAUSE,q(this.clonePosition(),this.clonePosition())):{val:o,err:null}},e.prototype.tryParseDecimalInteger=function(t,n){var r=1,i=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(r=-1);for(var s=!1,a=0;!this.isEOF();){var o=this.char();if(o>=48&&o<=57)s=!0,a=a*10+(o-48),this.bump();else break}var u=q(i,this.clonePosition());return s?(a*=r,ff(a)?{val:a,err:null}:this.error(n,u)):this.error(t,u)},e.prototype.offset=function(){return this.position.offset},e.prototype.isEOF=function(){return this.offset()===this.message.length},e.prototype.clonePosition=function(){return{offset:this.position.offset,line:this.position.line,column:this.position.column}},e.prototype.char=function(){var t=this.position.offset;if(t>=this.message.length)throw Error("out of bound");var n=Ga(this.message,t);if(n===void 0)throw Error("Offset ".concat(t," is at invalid UTF-16 code unit boundary"));return n},e.prototype.error=function(t,n){return{val:null,err:{kind:t,message:this.message,location:n}}},e.prototype.bump=function(){if(!this.isEOF()){var t=this.char();t===10?(this.position.line+=1,this.position.column=1,this.position.offset+=1):(this.position.column+=1,this.position.offset+=t<65536?1:2)}},e.prototype.bumpIf=function(t){if(Ji(this.message,t,this.offset())){for(var n=0;n<t.length;n++)this.bump();return!0}return!1},e.prototype.bumpUntil=function(t){var n=this.offset(),r=this.message.indexOf(t,n);return r>=0?(this.bumpTo(r),!0):(this.bumpTo(this.message.length),!1)},e.prototype.bumpTo=function(t){if(this.offset()>t)throw Error("targetOffset ".concat(t," must be greater than or equal to the current offset ").concat(this.offset()));for(t=Math.min(t,this.message.length);;){var n=this.offset();if(n===t)break;if(n>t)throw Error("targetOffset ".concat(t," is at invalid UTF-16 code unit boundary"));if(this.bump(),this.isEOF())break}},e.prototype.bumpSpace=function(){for(;!this.isEOF()&&Ua(this.char());)this.bump()},e.prototype.peek=function(){if(this.isEOF())return null;var t=this.char(),n=this.offset(),r=this.message.charCodeAt(n+(t>=65536?2:1));return r??null},e}();function Vr(e){return e>=97&&e<=122||e>=65&&e<=90}function vf(e){return Vr(e)||e===47}function gf(e){return e===45||e===46||e>=48&&e<=57||e===95||e>=97&&e<=122||e>=65&&e<=90||e==183||e>=192&&e<=214||e>=216&&e<=246||e>=248&&e<=893||e>=895&&e<=8191||e>=8204&&e<=8205||e>=8255&&e<=8256||e>=8304&&e<=8591||e>=11264&&e<=12271||e>=12289&&e<=55295||e>=63744&&e<=64975||e>=65008&&e<=65533||e>=65536&&e<=983039}function Ua(e){return e>=9&&e<=13||e===32||e===133||e>=8206&&e<=8207||e===8232||e===8233}function mf(e){return e>=33&&e<=35||e===36||e>=37&&e<=39||e===40||e===41||e===42||e===43||e===44||e===45||e>=46&&e<=47||e>=58&&e<=59||e>=60&&e<=62||e>=63&&e<=64||e===91||e===92||e===93||e===94||e===96||e===123||e===124||e===125||e===126||e===161||e>=162&&e<=165||e===166||e===167||e===169||e===171||e===172||e===174||e===176||e===177||e===182||e===187||e===191||e===215||e===247||e>=8208&&e<=8213||e>=8214&&e<=8215||e===8216||e===8217||e===8218||e>=8219&&e<=8220||e===8221||e===8222||e===8223||e>=8224&&e<=8231||e>=8240&&e<=8248||e===8249||e===8250||e>=8251&&e<=8254||e>=8257&&e<=8259||e===8260||e===8261||e===8262||e>=8263&&e<=8273||e===8274||e===8275||e>=8277&&e<=8286||e>=8592&&e<=8596||e>=8597&&e<=8601||e>=8602&&e<=8603||e>=8604&&e<=8607||e===8608||e>=8609&&e<=8610||e===8611||e>=8612&&e<=8613||e===8614||e>=8615&&e<=8621||e===8622||e>=8623&&e<=8653||e>=8654&&e<=8655||e>=8656&&e<=8657||e===8658||e===8659||e===8660||e>=8661&&e<=8691||e>=8692&&e<=8959||e>=8960&&e<=8967||e===8968||e===8969||e===8970||e===8971||e>=8972&&e<=8991||e>=8992&&e<=8993||e>=8994&&e<=9e3||e===9001||e===9002||e>=9003&&e<=9083||e===9084||e>=9085&&e<=9114||e>=9115&&e<=9139||e>=9140&&e<=9179||e>=9180&&e<=9185||e>=9186&&e<=9254||e>=9255&&e<=9279||e>=9280&&e<=9290||e>=9291&&e<=9311||e>=9472&&e<=9654||e===9655||e>=9656&&e<=9664||e===9665||e>=9666&&e<=9719||e>=9720&&e<=9727||e>=9728&&e<=9838||e===9839||e>=9840&&e<=10087||e===10088||e===10089||e===10090||e===10091||e===10092||e===10093||e===10094||e===10095||e===10096||e===10097||e===10098||e===10099||e===10100||e===10101||e>=10132&&e<=10175||e>=10176&&e<=10180||e===10181||e===10182||e>=10183&&e<=10213||e===10214||e===10215||e===10216||e===10217||e===10218||e===10219||e===10220||e===10221||e===10222||e===10223||e>=10224&&e<=10239||e>=10240&&e<=10495||e>=10496&&e<=10626||e===10627||e===10628||e===10629||e===10630||e===10631||e===10632||e===10633||e===10634||e===10635||e===10636||e===10637||e===10638||e===10639||e===10640||e===10641||e===10642||e===10643||e===10644||e===10645||e===10646||e===10647||e===10648||e>=10649&&e<=10711||e===10712||e===10713||e===10714||e===10715||e>=10716&&e<=10747||e===10748||e===10749||e>=10750&&e<=11007||e>=11008&&e<=11055||e>=11056&&e<=11076||e>=11077&&e<=11078||e>=11079&&e<=11084||e>=11085&&e<=11123||e>=11124&&e<=11125||e>=11126&&e<=11157||e===11158||e>=11159&&e<=11263||e>=11776&&e<=11777||e===11778||e===11779||e===11780||e===11781||e>=11782&&e<=11784||e===11785||e===11786||e===11787||e===11788||e===11789||e>=11790&&e<=11798||e===11799||e>=11800&&e<=11801||e===11802||e===11803||e===11804||e===11805||e>=11806&&e<=11807||e===11808||e===11809||e===11810||e===11811||e===11812||e===11813||e===11814||e===11815||e===11816||e===11817||e>=11818&&e<=11822||e===11823||e>=11824&&e<=11833||e>=11834&&e<=11835||e>=11836&&e<=11839||e===11840||e===11841||e===11842||e>=11843&&e<=11855||e>=11856&&e<=11857||e===11858||e>=11859&&e<=11903||e>=12289&&e<=12291||e===12296||e===12297||e===12298||e===12299||e===12300||e===12301||e===12302||e===12303||e===12304||e===12305||e>=12306&&e<=12307||e===12308||e===12309||e===12310||e===12311||e===12312||e===12313||e===12314||e===12315||e===12316||e===12317||e>=12318&&e<=12319||e===12320||e===12336||e===64830||e===64831||e>=65093&&e<=65094}function zr(e){e.forEach(function(t){if(delete t.location,Na(t)||Ma(t))for(var n in t.options)delete t.options[n].location,zr(t.options[n].value);else Pa(t)&&Ba(t.style)||($a(t)||Oa(t))&&Gr(t.style)?delete t.style.location:Ha(t)&&zr(t.children)})}function _f(e,t){t===void 0&&(t={}),t=Zn({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var n=new pf(e,t).parse();if(n.err){var r=SyntaxError(X[n.err.kind]);throw r.location=n.err.location,r.originalMessage=n.err.message,r}return t?.captureLocation||zr(n.val),n.val}var ln;(function(e){e.MISSING_VALUE="MISSING_VALUE",e.INVALID_VALUE="INVALID_VALUE",e.MISSING_INTL_API="MISSING_INTL_API"})(ln||(ln={}));var dr=function(e){hr(t,e);function t(n,r,i){var s=e.call(this,n)||this;return s.code=r,s.originalMessage=i,s}return t.prototype.toString=function(){return"[formatjs Error: ".concat(this.code,"] ").concat(this.message)},t}(Error),es=function(e){hr(t,e);function t(n,r,i,s){return e.call(this,'Invalid values for "'.concat(n,'": "').concat(r,'". Options are "').concat(Object.keys(i).join('", "'),'"'),ln.INVALID_VALUE,s)||this}return t}(dr),bf=function(e){hr(t,e);function t(n,r,i){return e.call(this,'Value for "'.concat(n,'" must be of type ').concat(r),ln.INVALID_VALUE,i)||this}return t}(dr),yf=function(e){hr(t,e);function t(n,r){return e.call(this,'The intl string context variable "'.concat(n,'" was not provided to the string "').concat(r,'"'),ln.MISSING_VALUE,r)||this}return t}(dr),Ce;(function(e){e[e.literal=0]="literal",e[e.object=1]="object"})(Ce||(Ce={}));function Ef(e){return e.length<2?e:e.reduce(function(t,n){var r=t[t.length-1];return!r||r.type!==Ce.literal||n.type!==Ce.literal?t.push(n):r.value+=n.value,t},[])}function xf(e){return typeof e=="function"}function Gn(e,t,n,r,i,s,a){if(e.length===1&&Yi(e[0]))return[{type:Ce.literal,value:e[0].value}];for(var o=[],u=0,l=e;u<l.length;u++){var f=l[u];if(Yi(f)){o.push({type:Ce.literal,value:f.value});continue}if(jl(f)){typeof s=="number"&&o.push({type:Ce.literal,value:n.getNumberFormat(t).format(s)});continue}var h=f.value;if(!(i&&h in i))throw new yf(h,a);var c=i[h];if(Ul(f)){(!c||typeof c=="string"||typeof c=="number")&&(c=typeof c=="string"||typeof c=="number"?String(c):""),o.push({type:typeof c=="string"?Ce.literal:Ce.object,value:c});continue}if($a(f)){var d=typeof f.style=="string"?r.date[f.style]:Gr(f.style)?f.style.parsedOptions:void 0;o.push({type:Ce.literal,value:n.getDateTimeFormat(t,d).format(c)});continue}if(Oa(f)){var d=typeof f.style=="string"?r.time[f.style]:Gr(f.style)?f.style.parsedOptions:r.time.medium;o.push({type:Ce.literal,value:n.getDateTimeFormat(t,d).format(c)});continue}if(Pa(f)){var d=typeof f.style=="string"?r.number[f.style]:Ba(f.style)?f.style.parsedOptions:void 0;d&&d.scale&&(c=c*(d.scale||1)),o.push({type:Ce.literal,value:n.getNumberFormat(t,d).format(c)});continue}if(Ha(f)){var g=f.children,$=f.value,m=i[$];if(!xf(m))throw new bf($,"function",a);var O=Gn(g,t,n,r,i,s),k=m(O.map(function(ee){return ee.value}));Array.isArray(k)||(k=[k]),o.push.apply(o,k.map(function(ee){return{type:typeof ee=="string"?Ce.literal:Ce.object,value:ee}}))}if(Na(f)){var N=f.options[c]||f.options.other;if(!N)throw new es(f.value,c,Object.keys(f.options),a);o.push.apply(o,Gn(N.value,t,n,r,i));continue}if(Ma(f)){var N=f.options["=".concat(c)];if(!N){if(!Intl.PluralRules)throw new dr(`Intl.PluralRules is not available in this environment.
|
|
10
|
-
Try polyfilling it using "@formatjs/intl-pluralrules"
|
|
11
|
-
`,ln.MISSING_INTL_API,a);var j=n.getPluralRules(t,{type:f.pluralType}).select(c-(f.offset||0));N=f.options[j]||f.options.other}if(!N)throw new es(f.value,c,Object.keys(f.options),a);o.push.apply(o,Gn(N.value,t,n,r,i,c-(f.offset||0)));continue}}return Ef(o)}function wf(e,t){return t?Ke(Ke(Ke({},e||{}),t||{}),Object.keys(e).reduce(function(n,r){return n[r]=Ke(Ke({},e[r]),t[r]||{}),n},{})):e}function Sf(e,t){return t?Object.keys(e).reduce(function(n,r){return n[r]=wf(e[r],t[r]),n},Ke({},e)):e}function Sr(e){return{create:function(){return{get:function(t){return e[t]},set:function(t,n){e[t]=n}}}}}function Cf(e){return e===void 0&&(e={number:{},dateTime:{},pluralRules:{}}),{getNumberFormat:Er(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.NumberFormat).bind.apply(t,yr([void 0],n,!1)))},{cache:Sr(e.number),strategy:xr.variadic}),getDateTimeFormat:Er(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.DateTimeFormat).bind.apply(t,yr([void 0],n,!1)))},{cache:Sr(e.dateTime),strategy:xr.variadic}),getPluralRules:Er(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.PluralRules).bind.apply(t,yr([void 0],n,!1)))},{cache:Sr(e.pluralRules),strategy:xr.variadic})}}var Tf=function(){function e(t,n,r,i){n===void 0&&(n=e.defaultLocale);var s=this;if(this.formatterCache={number:{},dateTime:{},pluralRules:{}},this.format=function(u){var l=s.formatToParts(u);if(l.length===1)return l[0].value;var f=l.reduce(function(h,c){return!h.length||c.type!==Ce.literal||typeof h[h.length-1]!="string"?h.push(c.value):h[h.length-1]+=c.value,h},[]);return f.length<=1?f[0]||"":f},this.formatToParts=function(u){return Gn(s.ast,s.locales,s.formatters,s.formats,u,void 0,s.message)},this.resolvedOptions=function(){var u;return{locale:((u=s.resolvedLocale)===null||u===void 0?void 0:u.toString())||Intl.NumberFormat.supportedLocalesOf(s.locales)[0]}},this.getAst=function(){return s.ast},this.locales=n,this.resolvedLocale=e.resolveLocale(n),typeof t=="string"){if(this.message=t,!e.__parse)throw new TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`");var a=i||{};a.formatters;var o=Hl(a,["formatters"]);this.ast=e.__parse(t,Ke(Ke({},o),{locale:this.resolvedLocale}))}else this.ast=t;if(!Array.isArray(this.ast))throw new TypeError("A message must be provided as a String or AST.");this.formats=Sf(e.formats,r),this.formatters=i&&i.formatters||Cf(this.formatterCache)}return Object.defineProperty(e,"defaultLocale",{get:function(){return e.memoizedDefaultLocale||(e.memoizedDefaultLocale=new Intl.NumberFormat().resolvedOptions().locale),e.memoizedDefaultLocale},enumerable:!1,configurable:!0}),e.memoizedDefaultLocale=null,e.resolveLocale=function(t){if(!(typeof Intl.Locale>"u")){var n=Intl.NumberFormat.supportedLocalesOf(t);return n.length>0?new Intl.Locale(n[0]):new Intl.Locale(typeof t=="string"?t:t[0])}},e.__parse=_f,e.formats={number:{integer:{maximumFractionDigits:0},currency:{style:"currency"},percent:{style:"percent"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}},e}();function Af(e,t){if(t==null)return;if(t in e)return e[t];const n=t.split(".");let r=e;for(let i=0;i<n.length;i++)if(typeof r=="object"){if(i>0){const s=n.slice(i,n.length).join(".");if(s in r){r=r[s];break}}r=r[n[i]]}else r=void 0;return r}const Et={},If=(e,t,n)=>n&&(t in Et||(Et[t]={}),e in Et[t]||(Et[t][e]=n),n),ja=(e,t)=>{if(t==null)return;if(t in Et&&e in Et[t])return Et[t][e];const n=pr(t);for(let r=0;r<n.length;r++){const i=n[r],s=$f(i,e);if(s)return If(e,t,s)}};let Ci;const vn=lr({});function Pf(e){return Ci[e]||null}function Va(e){return e in Ci}function $f(e,t){if(!Va(e))return null;const n=Pf(e);return Af(n,t)}function Of(e){if(e==null)return;const t=pr(e);for(let n=0;n<t.length;n++){const r=t[n];if(Va(r))return r}}function za(e,...t){delete Et[e],vn.update(n=>(n[e]=Ml.all([n[e]||{},...t]),n))}pn([vn],([e])=>Object.keys(e));vn.subscribe(e=>Ci=e);const kn={};function Nf(e,t){kn[e].delete(t),kn[e].size===0&&delete kn[e]}function Xa(e){return kn[e]}function Mf(e){return pr(e).map(t=>{const n=Xa(t);return[t,n?[...n]:[]]}).filter(([,t])=>t.length>0)}function Xr(e){return e==null?!1:pr(e).some(t=>{var n;return(n=Xa(t))==null?void 0:n.size})}function Hf(e,t){return Promise.all(t.map(r=>(Nf(e,r),r().then(i=>i.default||i)))).then(r=>za(e,...r))}const bn={};function Ya(e){if(!Xr(e))return e in bn?bn[e]:Promise.resolve();const t=Mf(e);return bn[e]=Promise.all(t.map(([n,r])=>Hf(n,r))).then(()=>{if(Xr(e))return Ya(e);delete bn[e]}),bn[e]}const Bf={number:{scientific:{notation:"scientific"},engineering:{notation:"engineering"},compactLong:{notation:"compact",compactDisplay:"long"},compactShort:{notation:"compact",compactDisplay:"short"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}},Df={fallbackLocale:null,loadingDelay:200,formats:Bf,warnOnMissingMessages:!0,handleMissingMessage:void 0,ignoreTag:!0},Lf=Df;function fn(){return Lf}const Cr=lr(!1);var Rf=Object.defineProperty,Ff=Object.defineProperties,Gf=Object.getOwnPropertyDescriptors,ts=Object.getOwnPropertySymbols,kf=Object.prototype.hasOwnProperty,Uf=Object.prototype.propertyIsEnumerable,ns=(e,t,n)=>t in e?Rf(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,jf=(e,t)=>{for(var n in t||(t={}))kf.call(t,n)&&ns(e,n,t[n]);if(ts)for(var n of ts(t))Uf.call(t,n)&&ns(e,n,t[n]);return e},Vf=(e,t)=>Ff(e,Gf(t));let Yr;const Jn=lr(null);function rs(e){return e.split("-").map((t,n,r)=>r.slice(0,n+1).join("-")).reverse()}function pr(e,t=fn().fallbackLocale){const n=rs(e);return t?[...new Set([...n,...rs(t)])]:n}function Yt(){return Yr??void 0}Jn.subscribe(e=>{Yr=e??void 0,typeof window<"u"&&e!=null&&document.documentElement.setAttribute("lang",e)});const zf=e=>{if(e&&Of(e)&&Xr(e)){const{loadingDelay:t}=fn();let n;return typeof window<"u"&&Yt()!=null&&t?n=window.setTimeout(()=>Cr.set(!0),t):Cr.set(!0),Ya(e).then(()=>{Jn.set(e)}).finally(()=>{clearTimeout(n),Cr.set(!1)})}return Jn.set(e)},It=Vf(jf({},Jn),{set:zf}),vr=e=>{const t=Object.create(null);return r=>{const i=JSON.stringify(r);return i in t?t[i]:t[i]=e(r)}};var Xf=Object.defineProperty,Qn=Object.getOwnPropertySymbols,Wa=Object.prototype.hasOwnProperty,qa=Object.prototype.propertyIsEnumerable,is=(e,t,n)=>t in e?Xf(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ti=(e,t)=>{for(var n in t||(t={}))Wa.call(t,n)&&is(e,n,t[n]);if(Qn)for(var n of Qn(t))qa.call(t,n)&&is(e,n,t[n]);return e},gn=(e,t)=>{var n={};for(var r in e)Wa.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Qn)for(var r of Qn(e))t.indexOf(r)<0&&qa.call(e,r)&&(n[r]=e[r]);return n};const Pn=(e,t)=>{const{formats:n}=fn();if(e in n&&t in n[e])return n[e][t];throw new Error(`[svelte-i18n] Unknown "${t}" ${e} format.`)},Yf=vr(e=>{var t=e,{locale:n,format:r}=t,i=gn(t,["locale","format"]);if(n==null)throw new Error('[svelte-i18n] A "locale" must be set to format numbers');return r&&(i=Pn("number",r)),new Intl.NumberFormat(n,i)}),Wf=vr(e=>{var t=e,{locale:n,format:r}=t,i=gn(t,["locale","format"]);if(n==null)throw new Error('[svelte-i18n] A "locale" must be set to format dates');return r?i=Pn("date",r):Object.keys(i).length===0&&(i=Pn("date","short")),new Intl.DateTimeFormat(n,i)}),qf=vr(e=>{var t=e,{locale:n,format:r}=t,i=gn(t,["locale","format"]);if(n==null)throw new Error('[svelte-i18n] A "locale" must be set to format time values');return r?i=Pn("time",r):Object.keys(i).length===0&&(i=Pn("time","short")),new Intl.DateTimeFormat(n,i)}),Zf=(e={})=>{var t=e,{locale:n=Yt()}=t,r=gn(t,["locale"]);return Yf(Ti({locale:n},r))},Jf=(e={})=>{var t=e,{locale:n=Yt()}=t,r=gn(t,["locale"]);return Wf(Ti({locale:n},r))},Qf=(e={})=>{var t=e,{locale:n=Yt()}=t,r=gn(t,["locale"]);return qf(Ti({locale:n},r))},Kf=vr((e,t=Yt())=>new Tf(e,t,fn().formats,{ignoreTag:fn().ignoreTag})),ec=(e,t={})=>{var n,r,i,s;let a=t;typeof e=="object"&&(a=e,e=a.id);const{values:o,locale:u=Yt(),default:l}=a;if(u==null)throw new Error("[svelte-i18n] Cannot format a message without first setting the initial locale.");let f=ja(e,u);if(!f)f=(s=(i=(r=(n=fn()).handleMissingMessage)==null?void 0:r.call(n,{locale:u,id:e,defaultValue:l}))!=null?i:l)!=null?s:e;else if(typeof f!="string")return console.warn(`[svelte-i18n] Message with id "${e}" must be of type "string", found: "${typeof f}". Gettin its value through the "$format" method is deprecated; use the "json" method instead.`),f;if(!o)return f;let h=f;try{h=Kf(f,u).format(o)}catch(c){c instanceof Error&&console.warn(`[svelte-i18n] Message "${e}" has syntax error:`,c.message)}return h},tc=(e,t)=>Qf(t).format(e),nc=(e,t)=>Jf(t).format(e),rc=(e,t)=>Zf(t).format(e),ic=(e,t=Yt())=>ja(e,t),Ai=pn([It,vn],()=>ec);pn([It],()=>tc);pn([It],()=>nc);pn([It],()=>rc);pn([It,vn],()=>ic);const sc={en:{new:"New",scheduled:"Scheduled",onGoing:"Ongoing",paused:"Paused",completed:"Completed",expired:"Expired",rejected:"Rejected",failed:"Failed",forfeited:"Forfeited",endsIn:"Ends in",startsIn:"Starts in",promo:"Promo",active:"Active",claim:"Claim",pending:"Pending",finished:"Finished",optIn:"Opt In",login:"Login",resume:"Resume",pause:"Pause",levels:"Levels",level:"Level",events:"Events",rules:"Rules",games:"Games",status:"Status",time:"Time",viewDetails:"View Details",details:"Details",get:"Get",Condition:"Condition",termsAndConditions:"Terms & Conditions",allChallenges:"All Challenges",all:"All",placeBetsOf:"Place bets of",place:"Place",bet:"bet",bets:"bets",betTime:"time",betTimes:"times",minBet:"min bet",winStakeRatio:"Win/stake ratio"},tr:{new:"Yeni",scheduled:"Planlandı",onGoing:"Devam Ediyor",paused:"Duraklatıldı",completed:"Tamamlandı",expired:"Süresi Doldu",rejected:"Reddedildi",failed:"Başarısız",forfeited:"Vazgeçildi",endsIn:"Bitiş",startsIn:"Başlangıç",promo:"Promosyon",active:"Aktif",claim:"Al",pending:"Beklemede",finished:"Bitti",optIn:"Katıl",login:"Giriş Yap",resume:"Devam Et",pause:"Duraklat",levels:"Seviyeler",level:"Seviye",events:"Etkinlikler",rules:"Kurallar",games:"Oyunlar",viewDetails:"Detayları Gör",details:"Detayları",get:"Al",Condition:"Koşul",termsAndConditions:"Şartlar ve Koşullar",allChallenges:"Tüm Meydan Okumalar",all:"Tümü"},da:{new:"Ny",scheduled:"Planlagt",onGoing:"I gang",paused:"Sat på pause",completed:"Gennemført",expired:"Udløbet",rejected:"Afvist",failed:"Mislykket",forfeited:"Opgivet",endsIn:"Slutter om",startsIn:"Starter om",promo:"Promo",active:"Aktiv",claim:"Hent",pending:"Afventer",finished:"Færdig",optIn:"Tilmeld",login:"Log ind",resume:"Fortsæt",pause:"Pause",levels:"Niveauer",level:"Niveau",events:"Begivenheder",rules:"Regler",games:"Spil",viewDetails:"Se detaljer",details:"Detaljer",get:"Få",Condition:"Betingelse",termsAndConditions:"Vilkår og betingelser",allChallenges:"Alle udfordringer",all:"Alle"},de:{new:"Neu",scheduled:"Geplant",onGoing:"Läuft",paused:"Pausiert",completed:"Abgeschlossen",expired:"Abgelaufen",rejected:"Abgelehnt",failed:"Fehlgeschlagen",forfeited:"Aufgegeben",endsIn:"Endet in",startsIn:"Startet in",promo:"Promo",active:"Aktiv",claim:"Abholen",pending:"Ausstehend",finished:"Beendet",optIn:"Teilnehmen",login:"Anmelden",resume:"Fortsetzen",pause:"Pausieren",levels:"Stufen",level:"Stufe",events:"Events",rules:"Regeln",games:"Spiele",viewDetails:"Details anzeigen",details:"Details",get:"Erhalten",Condition:"Bedingung",termsAndConditions:"Allgemeine Geschäftsbedingungen",allChallenges:"Alle Challenges",all:"Alle"},nl:{new:"Nieuw",scheduled:"Gepland",onGoing:"Bezig",paused:"Gepauzeerd",completed:"Voltooid",expired:"Verlopen",rejected:"Afgewezen",failed:"Mislukt",forfeited:"Opgegeven",endsIn:"Eindigt over",startsIn:"Begint over",promo:"Promo",active:"Actief",claim:"Ophalen",pending:"In afwachting",finished:"Voltooid",optIn:"Deelnemen",login:"Inloggen",resume:"Hervatten",pause:"Pauzeren",levels:"Niveaus",level:"Niveau",events:"Evenementen",rules:"Regels",games:"Spellen",viewDetails:"Details bekijken",details:"Details",get:"Ontvang",Condition:"Voorwaarde",termsAndConditions:"Algemene voorwaarden",allChallenges:"Alle Challenges",all:"Alle"},fr:{new:"Nouveau",scheduled:"Planifié",onGoing:"En cours",paused:"En pause",completed:"Terminé",expired:"Expiré",rejected:"Rejeté",failed:"Échoué",forfeited:"Abandonné",endsIn:"Se termine dans",startsIn:"Commence dans",promo:"Promo",active:"Actif",claim:"Réclamer",pending:"En attente",finished:"Terminé",optIn:"Participer",login:"Connexion",resume:"Reprendre",pause:"Pause",levels:"Niveaux",level:"Niveau",events:"Événements",rules:"Règles",games:"Jeux",viewDetails:"Voir les détails",details:"Détails",get:"Obtenir",Condition:"Condition",termsAndConditions:"Conditions générales",allChallenges:"Tous les challenges",all:"Tous"},hu:{new:"Új",scheduled:"Ütemezett",onGoing:"Folyamatban",paused:"Szüneteltetve",completed:"Befejezve",expired:"Lejárt",rejected:"Elutasítva",failed:"Sikertelen",forfeited:"Feladva",endsIn:"Vége:",startsIn:"Kezdés:",promo:"Promóció",active:"Aktív",claim:"Átvétel",pending:"Függőben",finished:"Befejezve",optIn:"Csatlakozás",login:"Bejelentkezés",resume:"Folytatás",pause:"Szünet",levels:"Szintek",level:"Szint",events:"Események",rules:"Szabályok",games:"Játékok",viewDetails:"Részletek megtekintése",details:"Részletek",get:"Megszerez",Condition:"Feltétel",termsAndConditions:"Felhasználási feltételek",allChallenges:"Összes kihívás",all:"Összes"}},ac=({withLocale:e,translations:t})=>{It.subscribe(n=>{n==null&&(vn.set(t),It.set(e))})},oc=(e,t)=>{za(e,t)},uc=e=>{It.set(e)},Wr=e=>{Object.entries(e).forEach(([t,n])=>{oc(t,n)})},lc=(e,...t)=>{ac({withLocale:e,translations:{}}),Wr(sc),t.forEach(Wr)},fc=(e,t)=>{const n=new URL(e,window.location.href);fetch(n.href).then(r=>r.json()).then(r=>Wr(r)).catch(r=>{console.log(`${t} translation url err:`,r)})},cc=[U.Started,U.InProgress,U.PendingLevelReward,U.Completed],Kn=e=>cc.includes(e),Ii=e=>e.ProgressStatus===et.Completed,hc=(e,t)=>Ii(e)?!1:e.ProgressStatus===et.InProgress&&Kn(t),dc=(e,t)=>Ii(e)&&Kn(t)?"completed":hc(e,t)?"current":e.ProgressStatus===et.InProgress&&!Kn(t)?"locked-in-progress":"locked",pc=e=>e?e.CustomRewardMessage?e.CustomRewardMessage:(e.Rewards??[]).map(t=>t?.RewardDescription).filter(t=>!!t).join(" + "):"",vc=(e,t,n)=>{if(!e)return"";const r=s=>`${t}${s}`,i=s=>s?`, ${n("minBet")} ${r(s)}`:"";switch(e.LevelTargetType){case En.Accumulative:return`${n("placeBetsOf")} ${r(e.DisplayCurrencyTargetTurnover)}${i(e.BetRange?.MinBet)}`;case En.SingleBet:return`${n("place")} ${r(e.DisplayCurrencyTargetTurnover)} ${n("bet")}`;case En.MultipleOneBetSize:return`${n("place")} ${e.TargetBetCount} ${n("bets")}${i(e.DisplayCurrencyTargetTurnover)}`;case En.BetMultiplier:{const s=`${e.TargetBetCount} ${n(e.TargetBetCount===1?"betTime":"betTimes")}`;return`${n("winStakeRatio")} x${e.Multiplier} ${s}${i(e.BetRange?.MinBet)}`}default:return""}},gc=[U.InProgress,U.PendingLevelReward,U.Paused,U.Completed,U.Expired,U.Forfeited,U.Paused],Za=e=>gc.includes(e.Status),mc=e=>e.ProgressStatus===et.Fillup||e.ProgressStatus===et.Completed,Ja=e=>{if(!e.length)return 0;const t=e.findIndex(n=>n.ProgressStatus===et.InProgress);return t>=0?t+1:Math.min(e.filter(mc).length+1,e.length)},_c=e=>{const t=e.LevelProgresses??[];if(t.length)return Za(e)?t[Ja(t)-1]:t[0]},bc=e=>e!=="history",Rn=()=>({loading:!1,error:void 0,pageNumber:an,hasMore:!1,totalCount:0}),yc=e=>{let t=Te(Fe([])),n=Te(Fe([])),r=Te(Fe([])),i=Te(Fe([])),s=Te(Fe([]));const a=Fe({promo:Rn(),active:Rn(),pending:Rn(),history:Rn()}),o=p=>a[p];let u;const l=p=>{switch(p){case"promo":return D(t);case"pending":return D(r);default:return D(n)}},f=(p,T)=>{re(p==="promo"?t:p==="pending"?r:n,T,!0)},h=p=>{re(t,p(D(t)),!0),re(n,p(D(n)),!0),re(r,p(D(r)),!0)},c=(p,T)=>{h(_=>_.map(y=>y.Id===p?{...y,...T}:y))},d=(p,T)=>{h(_=>_.map(y=>y.ChallengeId===p?{...y,...T}:y))},g=p=>{if(p)return[...D(n),...D(r),...D(t)].find(T=>T.ChallengeId===p)},$=p=>{h(T=>T.filter(_=>_.Id!==p))},m=async(p,T,_)=>{const{endpoint:y,domainId:H,userSession:Z,userId:I,locale:x,pageSize:b=cr}=e();if(!y)throw new Error("challenges: endpoint is missing. Please provide a valid endpoint URL.");const A={endpoint:y,domainId:H,sessionId:Z,locale:x,pageNumber:_,pageSize:b};if(T)return _r({endpoint:y,domainId:H,locale:x,pageNumber:_,pageSize:b});switch(p){case"promo":return el(A);case"pending":return _r({...A,isFutureAvailable:!0});case"history":return ba({...A,userId:I??"",isFutureAvailable:!0});default:return _r({...A,isFutureAvailable:!1})}},O=(p,T,_)=>{const y=a[p];if(y.pageNumber=T.PageNumber??an,!bc(p)){const I=T.Data??[];re(i,_?[...D(i),...I]:I,!0),y.totalCount=T.TotalItem??D(i).length,y.hasMore=D(i).length<y.totalCount;return}const H=T.Data??[],Z=_?[...l(p),...H]:H;f(p,Z),y.totalCount=T.TotalCount??Z.length,y.hasMore=Z.length<y.totalCount},k=async(p,T,{append:_=!1,page:y}={})=>{const H=a[p];H.loading=!0,H.error=void 0;try{const Z=y??(_?H.pageNumber+1:an),I=await m(p,T,Z);O(p,I,_)}catch(Z){H.error=Z,e().onError?.(Z)}finally{H.loading=!1}},N=(p,T)=>{const _=a[p];return _.hasMore&&!_.loading?k(p,T,{append:!0}):Promise.resolve()},j=(p,T,_)=>a[p].loading?Promise.resolve():k(p,T,{page:_}),ee=(p,T)=>{const _=D(s).includes(p);T&&!_?re(s,[...D(s),p],!0):!T&&_&&re(s,D(s).filter(y=>y!==p),!0)},B=()=>{const{endpoint:p,userId:T,userSession:_,liveUpdates:y=!0}=e();!y||u||(u=ul({endpoint:p,userId:T,sessionId:_,onNewProgress:H=>{H.Status===U.Started?re(n,[H,...D(n)],!0):H.Status===U.Awaiting&&re(r,[H,...D(r)],!0)},onSessionExpired:()=>S(),onChallengeEnabledChange:(H,Z)=>{ee(H,!Z),d(H,{ChallengeStatus:Z?Lr.Enabled:Lr.Paused})},onProgressForfeited:H=>{c(H,{Status:U.Forfeited})}}))},S=()=>{u?.close(),u=void 0};return{get promoChallenges(){return D(t)},get activeChallenges(){return D(n)},get pendingChallenges(){return D(r)},get playerHistory(){return D(i)},get pausedChallengeIds(){return D(s)},getState:o,getList:l,findChallenge:g,load:k,loadMore:N,loadPage:j,setPaused:ee,patchProgress:c,patchChallenge:d,removeProgress:$,connect:B,disconnect:S}},Ec=e=>{let t=Te(!1);const n=async(s,a,o)=>{const{endpoint:u,domainId:l,userSession:f,userId:h,onStatusChange:c}=e();re(t,!0);try{await il({endpoint:u,domainId:l,sessionId:f,userId:h??"",progressTo:s.Id,isPause:a}),c?.(s.Id,a?U.Paused:U.InProgress),Br(o)}catch(d){Dr(o,d instanceof Error?d.message:String(d))}finally{re(t,!1)}},r=async s=>{const{endpoint:a,domainId:o,userSession:u,onClaimed:l}=e();re(t,!0);try{await ol({endpoint:a,domainId:o,sessionId:u,challengeId:s.Id}),l?.(s.ChallengeId),Br(Ht.Claim)}catch(f){Dr(Ht.Claim,f instanceof Error?f.message:String(f))}finally{re(t,!1)}};return{get loading(){return D(t)},run:(s,a)=>{switch(s){case"login":da();break;case"deposit":Xu();break;case"claim":r(a);break;case"optIn":Du(a.ChallengeId),n(a,!1,Ht.OptIn);break;case"resume":Vu(a.ChallengeId),n(a,!1,Ht.Resume);break;case"pause":ju(a.ChallengeId),n(a,!0,Ht.Pause);break}}}},ye={Promo:0,Active:1,Pending:2,Finished:3,Code:4},xc={[ye.Promo]:"promo",[ye.Active]:"active",[ye.Pending]:"pending",[ye.Finished]:"finished",[ye.Code]:"claim"},wc={[ye.Promo]:"promo",[ye.Active]:"active",[ye.Pending]:"pending",[ye.Finished]:"history",[ye.Code]:void 0};var Sc=dn('<span class="player-challenges__tab-dot svelte-1jf237k" aria-hidden="true"></span>'),Cc=dn('<button type="button" role="tab"> <!></button>'),Tc=dn('<div class="player-challenges__tabs svelte-1jf237k" role="tablist"></div>');const Ac={hash:"svelte-1jf237k",code:`.player-challenges__tabs.svelte-1jf237k {box-sizing:border-box;display:flex;flex-direction:row;justify-content:space-between;align-items:center;padding:6px 8px;gap:4px;background:var(--bg-overlay-neutral-level-2, rgba(251, 251, 251, 0.1));border:1px solid var(--border-subtle, rgba(251, 251, 251, 0.05));border-radius:100px;width:fit-content;max-width:100%;overflow-x:auto;scrollbar-width:none;-ms-overflow-style:none;&::-webkit-scrollbar {display:none;}}.player-challenges__tab.svelte-1jf237k {box-sizing:border-box;display:inline-flex;align-items:center;gap:4px;padding:6px 47px;border:0;border-radius:36px;background:transparent;color:var(--text-subtle, rgba(223, 227, 232, 1));font-size:10px;font-weight:500;white-space:nowrap;cursor:pointer;line-height:145%;appearance:none;-webkit-appearance:none;-webkit-tap-highlight-color:transparent;&:focus-visible {outline:none;}&.active {background:var(--tabs-bg-selected, rgba(251, 251, 251, 0.2));color:var(--text-default, rgba(223, 227, 232, 1));}&:hover:not(.active) {background:var(--bg-tabs-hover, rgba(251, 251, 251, 0.1));}}.player-challenges__tab-dot.svelte-1jf237k {width:6px;height:6px;border-radius:50%;flex-shrink:0;background:var(--semantic-success-400, rgba(45, 223, 0, 1));}
|
|
12
|
-
|
|
13
|
-
@media (max-width: 767px) {.player-challenges__tabs.svelte-1jf237k {width:100%;justify-content:flex-start;gap:2px;padding:6px 8px;}.player-challenges__tab.svelte-1jf237k {flex:1 0 auto;justify-content:center;padding:6px 12px;}
|
|
14
|
-
}`};function Qa(e,t){sr(t,!0),di(e,Ac);const n=()=>mi(Ai,"$_",r),[r,i]=_i(),s=Ut(t,"activeTab",7),a=Ut(t,"onTabChange",7),o=Ut(t,"notifyTabs",23,()=>[]),u=ei(()=>[{id:ye.Promo,label:n()("promo")},{id:ye.Active,label:n()("active")},{id:ye.Code,label:n()("claim")},{id:ye.Pending,label:n()("pending")},{id:ye.Finished,label:n()("finished")}]);var l={get activeTab(){return s()},set activeTab(c){s(c),St()},get onTabChange(){return a()},set onTabChange(c){a(c),St()},get notifyTabs(){return o()},set notifyTabs(c=[]){o(c),St()}},f=Tc();hi(f,21,()=>D(u),c=>c.id,(c,d)=>{var g=Cc();let $;g.__click=()=>a()?.(D(d).id);var m=ri(g),O=Ls(m);{var k=N=>{var j=Sc();kt(N,j)};ua(O,N=>{o().includes(D(d).id)&&N(k)})}Tn(g),oi(()=>{$=pi(g,1,"player-challenges__tab svelte-1jf237k",null,$,{active:s()===D(d).id}),Wn(g,"aria-selected",s()===D(d).id),ci(m,`${D(d).label??""} `)}),kt(c,g)}),Tn(f),kt(e,f);var h=ar(l);return i(),h}fi(["click"]);bi(Qa,{activeTab:{},onTabChange:{},notifyTabs:{}},[],[],!0);const Mt={Levels:"levels",Games:"games",Events:"events",Rules:"rules"};var Ic=dn('<button type="button"> </button>'),Pc=dn('<div class="challenge-details__tabs svelte-lloeg4"></div>');const $c={hash:"svelte-lloeg4",code:".challenge-details__tabs.svelte-lloeg4 {border:none;border-bottom:1px solid var(--border-default, rgba(251, 251, 251, 0.15));display:flex;flex-direction:row;justify-content:center;align-items:center;background-color:transparent;}.challenge-details__tab.svelte-lloeg4 {border:none;padding:12px 10px;gap:10px;height:36px;position:relative;flex:none;order:1;flex-grow:1;color:var(--text-super-subtle, rgba(251, 251, 251, 0.5));font-size:12px;font-weight:700;background-color:transparent;text-transform:uppercase;&.active {color:var(--text-brand, rgba(255, 204, 0, 1));&::after {content:'';position:absolute;left:0;right:0;bottom:-3px;height:2px;background:var(--pagination-bg-selected, rgba(255, 204, 0, 1));}}}"};function Ka(e,t){sr(t,!0),di(e,$c);const n=()=>mi(Ai,"$_",r),[r,i]=_i(),s=Ut(t,"challengeItem",7),a=Ut(t,"activeTab",15),o=Ut(t,"onTabChange",7),u=ei(()=>{switch(s().ContributedFrom){case qn.Casino:return[{id:Mt.Levels,label:n()("levels")},{id:Mt.Games,label:n()("games")},{id:Mt.Rules,label:n()("rules")}];case qn.Sportsbook:return[{id:Mt.Levels,label:n()("levels")},{id:Mt.Events,label:n()("events")},{id:Mt.Rules,label:n()("rules")}];default:return[]}});var l={get challengeItem(){return s()},set challengeItem(c){s(c),St()},get activeTab(){return a()},set activeTab(c){a(c),St()},get onTabChange(){return o()},set onTabChange(c){o(c),St()}},f=Pc();hi(f,21,()=>D(u),la,(c,d)=>{var g=Ic();let $;g.__click=()=>o()?.(D(d).id);var m=ri(g,!0);Tn(g),oi(()=>{$=pi(g,1,"challenge-details__tab svelte-lloeg4",null,$,{active:a()===D(d).id}),ci(m,D(d).label)}),kt(c,g)}),Tn(f),kt(e,f);var h=ar(l);return i(),h}fi(["click"]);bi(Ka,{challengeItem:{},activeTab:{},onTabChange:{}},[],[],!0);exports.$format=Ai;exports.CHALLENGES_TAB_LIST_KIND=wc;exports.CHALLENGES_TAB_NAMES=xc;exports.ChallengeAction=Ht;exports.ChallengeApiError=ma;exports.ChallengeDetailsTab=Mt;exports.ChallengeHistoryLevelStatus=va;exports.ChallengeRecurrenceType=pa;exports.ChallengeTabs=Ka;exports.ChallengeTabs$1=Qa;exports.ChallengesTab=ye;exports.ContributedFrom=qn;exports.LIMIT_DEFAULT=cr;exports.LIMIT_ITEMS_DEFAULT=qu;exports.NO_PROGRESS=wa;exports.OPT_OUT_CONFIRMED_MESSAGE=Wu;exports.PAGE_NUMBER_DEFAULT=an;exports.PAGINATION_VISIBLE_PAGE=Zu;exports.PAGINATION_VISIBLE_PAGE_MOBILE=Ju;exports.WalletType=ga;exports.append=kt;exports.append_styles=di;exports.bind_element_size=Au;exports.bind_this=Iu;exports.child=ri;exports.clsx=mu;exports.comment=su;exports.createChallengeActions=Ec;exports.createChallengesData=yc;exports.create_custom_element=bi;exports.dayjs=jt;exports.delegate=fi;exports.each=hi;exports.first_child=Xo;exports.flushSync=St;exports.formatDisplayDate=xa;exports.from_html=dn;exports.from_svg=iu;exports.get=D;exports.getBadgeContent=dl;exports.getChallengeAction=_l;exports.getChallengeById=Ku;exports.getChallengeGames=rl;exports.getChallengeHistory=ba;exports.getChallengeProgress=vl;exports.getCurrentLevelNumber=Ja;exports.getDisplayLevel=_c;exports.getLevelCondition=vc;exports.getLevelDisplayStatus=dc;exports.getLevelRewardText=pc;exports.getPromoChallengeById=tl;exports.grantChallengeByCode=nl;exports.if_block=ua;exports.index=la;exports.initI18n=lc;exports.isChallengeActive=Kn;exports.isLevelCompleted=Ii;exports.isOptedIn=Za;exports.loadTranslationUrl=fc;exports.mapChallengeStatus=pl;exports.next=gs;exports.onDestroy=hu;exports.optOutChallenge=al;exports.pop=ar;exports.prop=Ut;exports.proxy=Fe;exports.push=sr;exports.remove_input_defaults=wu;exports.reset=Tn;exports.sendChallengeActionFail=Dr;exports.sendChallengeActionSuccess=Br;exports.sendChallengeDetailClicked=Ru;exports.sendChallengeEventsClicked=ku;exports.sendChallengeGamesClicked=Gu;exports.sendChallengeLevelClicked=Fu;exports.sendChallengeLoginClicked=da;exports.sendChallengeRulesClicked=Uu;exports.sendChallengeTabClicked=Bu;exports.sendGameClicked=zu;exports.sendOptOutClicked=Lu;exports.sendPromoChallengeClicked=Yu;exports.set=re;exports.setLocale=uc;exports.set_attribute=Wn;exports.set_class=pi;exports.set_style=yu;exports.set_text=ci;exports.set_value=Su;exports.setup_stores=_i;exports.sibling=Ls;exports.state=Te;exports.store_get=mi;exports.template_effect=oi;exports.untrack=$t;exports.updateChallengeIsNewStatus=sl;exports.user_derived=ei;exports.user_effect=js;exports.user_pre_effect=qo;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const e=require("./ChallengeTabs-CEYwcPlJ.cjs");var c=e.from_svg('<svg viewBox="0 0 15 15" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M6.45 10.95L11.7375 5.6625L10.6875 4.6125L6.45 8.85L4.3125 6.7125L3.2625 7.7625L6.45 10.95ZM7.5 15C6.4625 15 5.4875 14.803 4.575 14.409C3.6625 14.0155 2.86875 13.4813 2.19375 12.8063C1.51875 12.1313 0.984502 11.3375 0.591 10.425C0.197 9.51248 0 8.53747 0 7.5C0 6.4625 0.197 5.4875 0.591 4.575C0.984502 3.6625 1.51875 2.86875 2.19375 2.19375C2.86875 1.51875 3.6625 0.984248 4.575 0.59025C5.4875 0.19675 6.4625 0 7.5 0C8.53747 0 9.51248 0.19675 10.425 0.59025C11.3375 0.984248 12.1313 1.51875 12.8063 2.19375C13.4813 2.86875 14.0155 3.6625 14.409 4.575C14.803 5.4875 15 6.4625 15 7.5C15 8.53747 14.803 9.51248 14.409 10.425C14.0155 11.3375 13.4813 12.1313 12.8063 12.8063C12.1313 13.4813 11.3375 14.0155 10.425 14.409C9.51248 14.803 8.53747 15 7.5 15Z" fill="currentColor"></path></svg>');function C(n,s){e.push(s,!0);let t=e.prop(s,"size",7,15);var o={get size(){return t()},set size(i=15){t(i),e.flushSync()}},r=c();return e.template_effect(()=>{e.set_attribute(r,"width",t()),e.set_attribute(r,"height",t())}),e.append(n,r),e.pop(o)}e.create_custom_element(C,{size:{}},[],[],!0);exports.CheckIcon=C;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const e=require("./ChallengeTabs-CEYwcPlJ.cjs");var u=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="M6.35884 8.75147C6.58387 8.5265 6.88904 8.40012 7.20724 8.40012C7.52544 8.40012 7.83061 8.5265 8.05564 8.75147L12.0072 12.7031L15.9588 8.75147C16.1852 8.53288 16.4883 8.41192 16.8029 8.41466C17.1176 8.41739 17.4185 8.54359 17.641 8.76608C17.8635 8.98857 17.9897 9.28955 17.9924 9.60419C17.9952 9.91882 17.8742 10.2219 17.6556 10.4483L12.8556 15.2483C12.6306 15.4732 12.3254 15.5996 12.0072 15.5996C11.689 15.5996 11.3839 15.4732 11.1588 15.2483L6.35884 10.4483C6.13387 10.2232 6.00749 9.91806 6.00749 9.59986C6.00749 9.28167 6.13387 8.9765 6.35884 8.75147Z" fill="currentColor"></path></svg>');function s(o,n){e.push(n,!0);let t=e.prop(n,"size",7,24);var i={get size(){return t()},set size(l=24){t(l),e.flushSync()}},r=u();return e.template_effect(()=>{e.set_attribute(r,"width",t()),e.set_attribute(r,"height",t())}),e.append(o,r),e.pop(i)}e.create_custom_element(s,{size:{}},[],[],!0);exports.ChevronIcon=s;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const t=require("./ChallengeTabs-CEYwcPlJ.cjs");var g=t.from_svg('<svg viewBox="0 0 13 14" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M1.46 13.14C1.0585 13.14 0.714911 12.9971 0.42924 12.7115C0.143569 12.4258 0.0004891 12.082 0 11.68V1.46C0 1.0585 0.14308 0.714911 0.42924 0.42924C0.7154 0.143569 1.05899 0.0004891 1.46 0H5.84C6.04681 0 6.22033 0.0700801 6.36049 0.21024C6.50065 0.3504 6.57051 0.523651 6.57 0.73C6.56949 0.936349 6.49941 1.10984 6.35976 1.25049C6.22011 1.39114 6.04681 1.46097 5.84 1.46H1.46V11.68H5.84C6.04681 11.68 6.22033 11.7501 6.36049 11.8902C6.50065 12.0304 6.57051 12.2036 6.57 12.41C6.56949 12.6164 6.49941 12.7898 6.35976 12.9305C6.22011 13.0712 6.04681 13.141 5.84 13.14H1.46ZM10.3478 7.3H5.11C4.90317 7.3 4.72991 7.22992 4.59024 7.08976C4.45057 6.9496 4.38049 6.77637 4.38 6.57C4.37951 6.36363 4.44959 6.1904 4.59024 6.05024C4.73089 5.91008 4.90414 5.84 5.11 5.84H10.3478L8.979 4.47125C8.84519 4.33742 8.77825 4.17317 8.77825 3.9785C8.77825 3.78383 8.84519 3.6135 8.979 3.4675C9.11281 3.3215 9.28319 3.24534 9.49 3.23901C9.69681 3.23268 9.87325 3.30276 10.0193 3.44925L12.629 6.059C12.775 6.205 12.848 6.37531 12.848 6.57C12.848 6.76469 12.775 6.935 12.629 7.081L10.0193 9.69075C9.87325 9.83675 9.70002 9.90683 9.49949 9.90099C9.29896 9.89515 9.12551 9.81901 8.979 9.6725C8.84519 9.5265 8.78139 9.35327 8.78774 9.15274C8.79409 8.95221 8.86388 8.78482 8.99725 8.6505L10.3478 7.3Z" fill="currentColor"></path></svg>');function s(n,e){t.push(e,!0);let C=t.prop(e,"width",7,13),h=t.prop(e,"height",7,14);var o={get width(){return C()},set width(i=13){C(i),t.flushSync()},get height(){return h()},set height(i=14){h(i),t.flushSync()}},r=g();return t.template_effect(()=>{t.set_attribute(r,"width",C()),t.set_attribute(r,"height",h())}),t.append(n,r),t.pop(o)}t.create_custom_element(s,{width:{},height:{}},[],[],!0);exports.ExistIcon=s;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const e=require("./ChallengeTabs-CEYwcPlJ.cjs");var h=e.from_svg('<svg viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#clip0_3193_42929)"><path fill-rule="evenodd" clip-rule="evenodd" d="M11.3334 6.94735V10.1053C11.3334 10.6078 11.1226 11.0897 10.7476 11.445C10.3725 11.8004 9.86375 12 9.33335 12H6.66665V6.94735H11.3334ZM5.33335 6.94735V12H2.66666C2.13623 12 1.62753 11.8004 1.25246 11.445C0.877379 11.0897 0.666665 10.6078 0.666665 10.1053V6.94735H5.33335ZM4 3.00859e-09C4.37834 -1.74869e-05 4.75231 0.0762209 5.09717 0.223666C5.44197 0.371106 5.74972 0.586372 6 0.855156C6.25028 0.586372 6.55803 0.371106 6.90283 0.223666C7.24769 0.0762209 7.62166 -1.74869e-05 8 3.00859e-09H8.33335C8.59852 3.00859e-09 8.85292 0.0998089 9.04043 0.277477C9.228 0.455145 9.33335 0.696109 9.33335 0.947369V1.26316C9.33335 1.72358 9.20332 2.15495 8.97668 2.52631H10.6666C11.0203 2.52631 11.3594 2.65939 11.6095 2.89628C11.8595 3.13317 12 3.45446 12 3.78947V5.05261C12 5.28255 11.9353 5.49855 11.8214 5.68423H6.66665V3.78947C6.66665 3.62197 6.59643 3.46132 6.47139 3.34288C6.3464 3.22443 6.1768 3.1579 6 3.1579C5.8232 3.1579 5.6536 3.22443 5.52862 3.34288C5.40357 3.46132 5.33335 3.62197 5.33335 3.78947V5.68423H0.178665C0.0616307 5.49219 1.23077e-05 5.27438 0 5.05261V3.78947C0 3.45446 0.140474 3.13317 0.390523 2.89628C0.640572 2.65939 0.979711 2.52631 1.33334 2.52631H3.02334C2.7895 2.14221 2.66649 1.70657 2.66666 1.26316V0.947369C2.66666 0.696109 2.77202 0.455145 2.95956 0.277477C3.1471 0.0998089 3.40145 3.00859e-09 3.66666 3.00859e-09H4ZM4 1.26316C4 1.59817 4.14047 1.91946 4.39052 2.15635C4.64055 2.39323 4.97969 2.52631 5.33335 2.52631C5.33335 2.19131 5.19286 1.87002 4.94283 1.63313C4.69274 1.39624 4.3536 1.26316 4 1.26316ZM8 1.26316C7.6464 1.26316 7.30726 1.39624 7.05717 1.63313C6.80714 1.87002 6.66665 2.19131 6.66665 2.52631C7.02031 2.52631 7.35945 2.39323 7.60948 2.15635C7.85951 1.91946 8 1.59817 8 1.26316Z" fill="currentColor"></path></g><defs><clipPath id="clip0_3193_42929"><rect fill="currentColor"></rect></clipPath></defs></svg>');function c(a,i){e.push(i,!0);let t=e.prop(i,"size",7,12);var n={get size(){return t()},set size(o=12){t(o),e.flushSync()}},r=h(),C=e.sibling(e.child(r)),l=e.child(C),s=e.child(l);return e.reset(l),e.reset(C),e.reset(r),e.template_effect(()=>{e.set_attribute(r,"width",t()),e.set_attribute(r,"height",t()),e.set_attribute(s,"width",t()),e.set_attribute(s,"height",t())}),e.append(a,r),e.pop(n)}e.create_custom_element(c,{size:{}},[],[],!0);exports.GiftIcon=c;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const e=require("./ChallengeTabs-CEYwcPlJ.cjs");var l=e.from_svg('<svg viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M4.51555 2.5L5.3 2.5C5.4933 2.5 5.65 2.6567 5.65 2.85C5.65 3.0433 5.4933 3.2 5.3 3.2H4.53C4.2302 3.2 4.02639 3.20027 3.86886 3.21314C3.71542 3.22568 3.63695 3.2484 3.58221 3.2763C3.45049 3.34341 3.34341 3.45049 3.2763 3.58221C3.2484 3.63695 3.22568 3.71542 3.21314 3.86886C3.20027 4.02639 3.2 4.2302 3.2 4.53V7.47C3.2 7.7698 3.20027 7.97361 3.21314 8.13114C3.22568 8.28458 3.2484 8.36305 3.2763 8.41779C3.34341 8.54951 3.45049 8.65659 3.58221 8.7237C3.63695 8.7516 3.71542 8.77432 3.86886 8.78686C4.02639 8.79973 4.2302 8.8 4.53 8.8H7.47C7.7698 8.8 7.97361 8.79973 8.13114 8.78686C8.28458 8.77432 8.36305 8.7516 8.41779 8.7237C8.54951 8.65659 8.65659 8.54951 8.7237 8.41779C8.7516 8.36305 8.77432 8.28458 8.78686 8.13114C8.79973 7.97361 8.8 7.7698 8.8 7.47V6.7C8.8 6.5067 8.9567 6.35 9.15 6.35C9.3433 6.35 9.5 6.5067 9.5 6.7V7.48446C9.5 7.7662 9.50001 7.99872 9.48453 8.18814C9.46846 8.38487 9.43396 8.56572 9.34741 8.73559C9.21319 8.99901 8.99901 9.21319 8.73559 9.34741C8.56572 9.43396 8.38487 9.46846 8.18814 9.48453C7.99872 9.50001 7.7662 9.5 7.48446 9.5H4.51554C4.2338 9.5 4.00128 9.50001 3.81186 9.48453C3.61513 9.46846 3.43428 9.43396 3.26441 9.34741C3.00099 9.21319 2.78681 8.99901 2.65259 8.73559C2.56604 8.56572 2.53154 8.38487 2.51547 8.18814C2.49999 7.99872 2.5 7.76619 2.5 7.48445V4.51555C2.5 4.23381 2.49999 4.00128 2.51547 3.81186C2.53154 3.61513 2.56604 3.43428 2.65259 3.26441C2.78681 3.00099 3.00099 2.78681 3.26441 2.65259C3.43428 2.56604 3.61513 2.53154 3.81186 2.51547C4.00128 2.49999 4.23381 2.5 4.51555 2.5ZM6.69999 2.85C6.69999 2.6567 6.85669 2.5 7.04999 2.5H9.14999C9.34329 2.5 9.49999 2.6567 9.49999 2.85L9.49999 4.95C9.49999 5.1433 9.34329 5.3 9.14999 5.3C8.95669 5.3 8.79999 5.1433 8.79999 4.95L8.79999 3.69498L6.24749 6.24749C6.1108 6.38417 5.8892 6.38417 5.75251 6.24749C5.61583 6.1108 5.61583 5.8892 5.75251 5.75251L8.30502 3.2H7.04999C6.85669 3.2 6.69999 3.0433 6.69999 2.85Z" fill="currentColor"></path></svg>');function s(n,r){e.push(r,!0);let C=e.prop(r,"size",7,12);var i={get size(){return C()},set size(o=12){C(o),e.flushSync()}},t=l();return e.template_effect(()=>{e.set_attribute(t,"width",C()),e.set_attribute(t,"height",C())}),e.append(n,t),e.pop(i)}e.create_custom_element(s,{size:{}},[],[],!0);exports.LinkIcon=s;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const C=require("./ChallengeTabs-CEYwcPlJ.cjs");var c=C.from_svg('<svg viewBox="0 0 13 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M6.5 8.8C6.25263 8.79715 6.01032 8.86899 5.80567 9.00584C5.60102 9.14269 5.44387 9.33799 5.35536 9.56544C5.26685 9.7929 5.25124 10.0416 5.31062 10.278C5.37 10.5145 5.50153 10.7274 5.6875 10.888V12C5.6875 12.2122 5.7731 12.4157 5.92548 12.5657C6.07785 12.7157 6.28451 12.8 6.5 12.8C6.71549 12.8 6.92215 12.7157 7.07452 12.5657C7.2269 12.4157 7.3125 12.2122 7.3125 12V10.888C7.49847 10.7274 7.63 10.5145 7.68938 10.278C7.74876 10.0416 7.73315 9.7929 7.64464 9.56544C7.55613 9.33799 7.39898 9.14269 7.19433 9.00584C6.98968 8.86899 6.74737 8.79715 6.5 8.8ZM10.5625 5.6V4C10.5625 2.93913 10.1345 1.92172 9.37262 1.17157C8.61075 0.421427 7.57744 0 6.5 0C5.42256 0 4.38925 0.421427 3.62738 1.17157C2.86551 1.92172 2.4375 2.93913 2.4375 4V5.6C1.79103 5.6 1.17105 5.85286 0.713927 6.30294C0.256807 6.75303 0 7.36348 0 8V13.6C0 14.2365 0.256807 14.847 0.713927 15.2971C1.17105 15.7471 1.79103 16 2.4375 16H10.5625C11.209 16 11.829 15.7471 12.2861 15.2971C12.7432 14.847 13 14.2365 13 13.6V8C13 7.36348 12.7432 6.75303 12.2861 6.30294C11.829 5.85286 11.209 5.6 10.5625 5.6ZM4.0625 4C4.0625 3.36348 4.31931 2.75303 4.77643 2.30294C5.23355 1.85286 5.85353 1.6 6.5 1.6C7.14647 1.6 7.76645 1.85286 8.22357 2.30294C8.68069 2.75303 8.9375 3.36348 8.9375 4V5.6H4.0625V4ZM11.375 13.6C11.375 13.8122 11.2894 14.0157 11.137 14.1657C10.9847 14.3157 10.778 14.4 10.5625 14.4H2.4375C2.22201 14.4 2.01535 14.3157 1.86298 14.1657C1.7106 14.0157 1.625 13.8122 1.625 13.6V8C1.625 7.78783 1.7106 7.58434 1.86298 7.43431C2.01535 7.28429 2.22201 7.2 2.4375 7.2H10.5625C10.778 7.2 10.9847 7.28429 11.137 7.43431C11.2894 7.58434 11.375 7.78783 11.375 8V13.6Z" fill="currentColor"></path></svg>');function s(o,r){C.push(r,!0);let e=C.prop(r,"size",7,20);var n={get size(){return e()},set size(i=20){e(i),C.flushSync()}},t=c();return C.template_effect(()=>{C.set_attribute(t,"width",e()),C.set_attribute(t,"height",e())}),C.append(o,t),C.pop(n)}C.create_custom_element(s,{size:{}},[],[],!0);exports.LockIcon=s;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";const e=require("./ChallengeTabs-CEYwcPlJ.cjs");var J=e.from_html('<span class="challenge-pagination__ellipsis svelte-n87wfa" aria-hidden="true">...</span>'),K=e.from_html('<button type="button"> </button>'),Q=e.from_html('<div class="challenge-pagination__pages svelte-n87wfa"><button class="challenge-pagination__btn challenge-pagination__btn--prev svelte-n87wfa" type="button"> </button> <!> <button class="challenge-pagination__btn challenge-pagination__btn--next svelte-n87wfa" type="button"> </button></div>'),R=e.from_html('<div class="challenge-pagination svelte-n87wfa"><!></div>');const W={hash:"svelte-n87wfa",code:`
|
|
2
|
-
@layer challenge-pagination-component {.challenge-pagination.svelte-n87wfa {display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:12px;box-sizing:border-box;width:100%;}
|
|
3
|
-
|
|
4
|
-
@media (min-width: 768px) {.challenge-pagination.svelte-n87wfa {width:auto;margin-left:auto;justify-content:flex-end;padding-right:10px;}.challenge-pagination__pages.svelte-n87wfa {justify-content:flex-end;}
|
|
5
|
-
}.challenge-pagination__pages.svelte-n87wfa {display:flex;flex-wrap:wrap;align-items:center;gap:8px;justify-content:flex-start;}.challenge-pagination__ellipsis.svelte-n87wfa {display:inline-flex;align-items:center;justify-content:center;color:var(--text-default, #dfe3e8);font-size:13px;width:24px;}.challenge-pagination__btn.svelte-n87wfa {min-width:30px;height:30px;padding:4px 8px;border:none;border-radius:4px;background:var(--bg-overlay-neutral-level-1, rgba(251, 251, 251, 0.05));color:var(--text-subtle, #dfe3e8);font-size:13px;font-weight:400;cursor:pointer;}.challenge-pagination__btn--active.svelte-n87wfa {background:var(--accent, #ffcc00);color:var(--text-on-color, #261d00);}.challenge-pagination__btn.svelte-n87wfa:disabled {cursor:default;color:var(--text-muted, rgba(251, 251, 251, 0.15));}.challenge-pagination__btn--prev.svelte-n87wfa,
|
|
6
|
-
.challenge-pagination__btn--next.svelte-n87wfa {width:95px;}
|
|
7
|
-
|
|
8
|
-
@media (max-width: 767px) {.challenge-pagination__btn--prev.svelte-n87wfa,
|
|
9
|
-
.challenge-pagination__btn--next.svelte-n87wfa {width:90px;}
|
|
10
|
-
}.challenge-pagination__btn--prev.svelte-n87wfa:not(:disabled),
|
|
11
|
-
.challenge-pagination__btn--next.svelte-n87wfa:not(:disabled) {color:var(--text-default, #dfe3e8);}
|
|
12
|
-
}`};function E(y,a){e.push(a,!0),e.append_styles(y,W);const I=()=>e.store_get(e.$format,"$_",N),[N,S]=e.setup_stores(),u=e.prop(a,"offset",7,0),v=e.prop(a,"limit",7,e.LIMIT_ITEMS_DEFAULT),b=e.prop(a,"total",7,0),c=e.prop(a,"onPageChange",7,t=>{}),f=e.prop(a,"locale",7,"en"),x=e.prop(a,"isMobile",7,!0);e.initI18n(f()),e.user_effect(()=>{e.setLocale(f()??"en")});const A=e.user_derived(()=>Number(u())||0),o=e.user_derived(()=>Number(v())||e.LIMIT_ITEMS_DEFAULT),L=e.user_derived(()=>Number(b())||0),d=e.user_derived(()=>Math.max(1,Math.ceil(e.get(L)/Math.max(1,e.get(o))))),s=e.user_derived(()=>e.get(o)>0?Math.floor(e.get(A)/e.get(o)):0),k=(t,n,l)=>{const w=e.PAGINATION_VISIBLE_PAGE_MOBILE,h=e.PAGINATION_VISIBLE_PAGE;return t<=(l?w:h)?Array.from({length:t},(M,p)=>p):n<=1||n>=t-2?[0,1,"ellipsis",t-2,t-1]:[0,"ellipsis",n,"ellipsis",t-1]},C=e.user_derived(()=>k(e.get(d),e.get(s),x())),j=t=>c()(t*e.get(o)),G=()=>c()(Math.max(0,e.get(s)-1)*e.get(o)),z=()=>c()(Math.min(e.get(d)-1,e.get(s)+1)*e.get(o));var B={get offset(){return u()},set offset(t=0){u(t),e.flushSync()},get limit(){return v()},set limit(t=e.LIMIT_ITEMS_DEFAULT){v(t),e.flushSync()},get total(){return b()},set total(t=0){b(t),e.flushSync()},get onPageChange(){return c()},set onPageChange(t=n=>{}){c(t),e.flushSync()},get locale(){return f()},set locale(t="en"){f(t),e.flushSync()},get isMobile(){return x()},set isMobile(t=!0){x(t),e.flushSync()}},m=R(),D=e.child(m);{var F=t=>{var n=Q(),l=e.child(n);l.__click=G;var w=e.child(l,!0);e.reset(l);var h=e.sibling(l,2);e.each(h,17,()=>e.get(C),e.index,(p,r)=>{var T=e.comment(),U=e.first_child(T);{var V=g=>{var i=J();e.append(g,i)},q=g=>{var i=K();let P;i.__click=()=>j(e.get(r));var H=e.child(i,!0);e.reset(i),e.template_effect(()=>{P=e.set_class(i,1,"challenge-pagination__btn svelte-n87wfa",null,P,{"challenge-pagination__btn--active":e.get(r)===e.get(s)}),e.set_text(H,e.get(r)+1)}),e.append(g,i)};e.if_block(U,g=>{e.get(r)==="ellipsis"?g(V):g(q,!1)})}e.append(p,T)});var _=e.sibling(h,2);_.__click=z;var M=e.child(_,!0);e.reset(_),e.reset(n),e.template_effect((p,r)=>{l.disabled=e.get(s)<=0,e.set_text(w,p),_.disabled=e.get(s)>=e.get(d)-1,e.set_text(M,r)},[()=>I()("prev"),()=>I()("next")]),e.append(t,n)};e.if_block(D,t=>{e.get(d)>1&&t(F)})}e.reset(m),e.append(y,m);var O=e.pop(B);return S(),O}e.delegate(["click"]);e.create_custom_element(E,{offset:{},limit:{},total:{},onPageChange:{},locale:{},isMobile:{}},[],[],!0);exports.Pagination=E;
|