@everymatrix/loyalty-level 0.1.4 → 0.1.6
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.
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
"use strict";const Ms="5";typeof window<"u"&&((window.__svelte??={}).v??=new Set).add(Ms);const Cs=1,Rs=2,Qn=4,$s=8,Ds=16,Us=1,Fs=4,Gs=8,ks=16,js=1,Vs=2,Jn="[",xr="[!",cn="]",ft={},j=Symbol(),Xs="http://www.w3.org/1999/xhtml",zr=!1;var Kn=Array.isArray,Ws=Array.prototype.indexOf,wr=Array.from,dr=Object.keys,Vt=Object.defineProperty,at=Object.getOwnPropertyDescriptor,zs=Object.getOwnPropertyDescriptors,qs=Object.prototype,Zs=Array.prototype,ei=Object.getPrototypeOf,An=Object.isExtensible;const We=()=>{};function ti(e){for(var t=0;t<e.length;t++)e[t]()}function ri(){var e,t,r=new Promise((n,i)=>{e=n,t=i});return{promise:r,resolve:e,reject:t}}const V=2,vr=4,Tr=8,ni=1<<24,Ue=16,Fe=32,Je=64,dn=128,ce=512,W=1024,ee=2048,Ge=4096,ae=8192,Re=16384,Sr=32768,wt=65536,Hn=1<<17,ii=1<<18,dt=1<<19,Ys=1<<20,Me=1<<25,ht=32768,qr=1<<21,vn=1<<22,ze=1<<23,Gt=Symbol("$state"),si=Symbol("legacy props"),Qs=Symbol(""),xt=new class extends Error{name="StaleReactionError";message="The reaction that called `getAbortSignal()` was re-run or destroyed"},pn=3,vt=8;function Js(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function Ks(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function ea(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function ta(e){throw new Error("https://svelte.dev/e/effect_orphan")}function ra(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function na(){throw new Error("https://svelte.dev/e/hydration_failed")}function ia(e){throw new Error("https://svelte.dev/e/props_invalid_value")}function sa(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function aa(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function oa(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function la(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}function qt(e){console.warn("https://svelte.dev/e/hydration_mismatch")}function ua(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}let P=!1;function Ce(e){P=e}let H;function J(e){if(e===null)throw qt(),ft;return H=e}function Tt(){return J(Ee(H))}function M(e){if(P){if(Ee(H)!==null)throw qt(),ft;H=e}}function fa(e=1){if(P){for(var t=e,r=H;t--;)r=Ee(r);H=r}}function pr(e=!0){for(var t=0,r=H;;){if(r.nodeType===vt){var n=r.data;if(n===cn){if(t===0)return r;t-=1}else(n===Jn||n===xr)&&(t+=1)}var i=Ee(r);e&&r.remove(),r=i}}function ai(e){if(!e||e.nodeType!==vt)throw qt(),ft;return e.data}function oi(e){return e===this.v}function li(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function ui(e){return!li(e,this.v)}let ha=!1,ve=null;function St(e){ve=e}function Ar(e,t=!1,r){ve={p:ve,i:!1,c:null,e:null,s:e,x:null,l:null}}function Hr(e){var t=ve,r=t.e;if(r!==null){t.e=null;for(var n of r)Ii(n)}return e!==void 0&&(t.x=e),t.i=!0,ve=t.p,e??{}}function fi(){return!0}let nt=[];function hi(){var e=nt;nt=[],ti(e)}function Zt(e){if(nt.length===0&&!kt){var t=nt;queueMicrotask(()=>{t===nt&&hi()})}nt.push(e)}function ca(){for(;nt.length>0;)hi()}function ci(e){var t=L;if(t===null)return T.f|=ze,e;if(t.f&Sr)At(e,t);else{if(!(t.f&dn))throw e;t.b.error(e)}}function At(e,t){for(;t!==null;){if(t.f&dn)try{t.b.error(e);return}catch(r){e=r}t=t.parent}throw e}const da=-7169;function G(e,t){e.f=e.f&da|t}function _n(e){e.f&ce||e.deps===null?G(e,W):G(e,Ge)}function di(e){if(e!==null)for(const t of e)!(t.f&V)||!(t.f&ht)||(t.f^=ht,di(t.deps))}function vi(e,t,r){e.f&ee?t.add(e):e.f&Ge&&r.add(e),di(e.deps),G(e,W)}const sr=new Set;let D=null,me=null,fe=[],Lr=null,Zr=!1,kt=!1;class ge{committed=!1;current=new Map;previous=new Map;#e=new Set;#t=new Set;#r=0;#s=0;#a=null;#i=new Set;#n=new Set;skipped_effects=new Set;is_fork=!1;is_deferred(){return this.is_fork||this.#s>0}process(t){fe=[],this.apply();var r=[],n=[];for(const i of t)this.#o(i,r,n);this.is_fork||this.#u(),this.is_deferred()?(this.#l(n),this.#l(r)):(D=null,Ln(n),Ln(r),this.#a?.resolve()),me=null}#o(t,r,n){t.f^=W;for(var i=t.first,s=null;i!==null;){var a=i.f,o=(a&(Fe|Je))!==0,l=o&&(a&W)!==0,u=l||(a&ae)!==0||this.skipped_effects.has(i);if(!u&&i.fn!==null){o?i.f^=W:s!==null&&a&(vr|Tr|ni)?s.b.defer_effect(i):a&vr?r.push(i):Yt(i)&&(a&Ue&&this.#i.add(i),Xt(i));var f=i.first;if(f!==null){i=f;continue}}var c=i.parent;for(i=i.next;i===null&&c!==null;)c===s&&(s=null),i=c.next,c=c.parent}}#l(t){for(var r=0;r<t.length;r+=1)vi(t[r],this.#i,this.#n)}capture(t,r){r!==j&&!this.previous.has(t)&&this.previous.set(t,r),t.f&ze||(this.current.set(t,t.v),me?.set(t,t.v))}activate(){D=this,this.apply()}deactivate(){D===this&&(D=null,me=null)}flush(){if(this.activate(),fe.length>0){if(pi(),D!==null&&D!==this)return}else this.#r===0&&this.process([]);this.deactivate()}discard(){for(const t of this.#t)t(this);this.#t.clear()}#u(){if(this.#s===0){for(const t of this.#e)t();this.#e.clear()}this.#r===0&&this.#f()}#f(){if(sr.size>1){this.previous.clear();var t=me,r=!0;for(const i of sr){if(i===this){r=!1;continue}const s=[];for(const[o,l]of this.current){if(i.current.has(o))if(r&&l!==i.current.get(o))i.current.set(o,l);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 n=fe;fe=[];const o=new Set,l=new Map;for(const u of s)_i(u,a,o,l);if(fe.length>0){D=i,i.apply();for(const u of fe)i.#o(u,[],[]);i.deactivate()}fe=n}}D=null,me=t}this.committed=!0,sr.delete(this)}increment(t){this.#r+=1,t&&(this.#s+=1)}decrement(t){this.#r-=1,t&&(this.#s-=1),this.revive()}revive(){for(const t of this.#i)this.#n.delete(t),G(t,ee),De(t);for(const t of this.#n)G(t,Ge),De(t);this.flush()}oncommit(t){this.#e.add(t)}ondiscard(t){this.#t.add(t)}settled(){return(this.#a??=ri()).promise}static ensure(){if(D===null){const t=D=new ge;sr.add(D),kt||ge.enqueue(()=>{D===t&&t.flush()})}return D}static enqueue(t){Zt(t)}apply(){}}function rt(e){var t=kt;kt=!0;try{for(var r;;){if(ca(),fe.length===0&&(D?.flush(),fe.length===0))return Lr=null,r;pi()}}finally{kt=t}}function pi(){var e=lt;Zr=!0;var t=null;try{var r=0;for(mr(!0);fe.length>0;){var n=ge.ensure();if(r++>1e3){var i,s;va()}n.process(fe),qe.clear()}}finally{Zr=!1,mr(e),Lr=null}}function va(){try{ra()}catch(e){At(e,Lr)}}let Be=null;function Ln(e){var t=e.length;if(t!==0){for(var r=0;r<t;){var n=e[r++];if(!(n.f&(Re|ae))&&Yt(n)&&(Be=new Set,Xt(n),n.deps===null&&n.first===null&&n.nodes===null&&(n.teardown===null&&n.ac===null?Ci(n):n.fn=null),Be?.size>0)){qe.clear();for(const i of Be){if(i.f&(Re|ae))continue;const s=[i];let a=i.parent;for(;a!==null;)Be.has(a)&&(Be.delete(a),s.push(a)),a=a.parent;for(let o=s.length-1;o>=0;o--){const l=s[o];l.f&(Re|ae)||Xt(l)}}Be.clear()}}Be=null}}function _i(e,t,r,n){if(!r.has(e)&&(r.add(e),e.reactions!==null))for(const i of e.reactions){const s=i.f;s&V?_i(i,t,r,n):s&(vn|Ue)&&!(s&ee)&&mi(i,t,n)&&(G(i,ee),De(i))}}function mi(e,t,r){const n=r.get(e);if(n!==void 0)return n;if(e.deps!==null)for(const i of e.deps){if(t.includes(i))return!0;if(i.f&V&&mi(i,t,r))return r.set(i,!0),!0}return r.set(e,!1),!1}function De(e){for(var t=Lr=e;t.parent!==null;){t=t.parent;var r=t.f;if(Zr&&t===L&&r&Ue&&!(r&ii))return;if(r&(Je|Fe)){if(!(r&W))return;t.f^=W}}fe.push(t)}function pa(e){let t=0,r=ct(0),n;return()=>{bn()&&(v(r),yn(()=>(t===0&&(n=Nr(()=>e(()=>jt(r)))),t+=1,()=>{Zt(()=>{t-=1,t===0&&(n?.(),n=void 0,jt(r))})})))}}var _a=wt|dt|dn;function ma(e,t,r){new ga(e,t,r)}class ga{parent;is_pending=!1;#e;#t=P?H:null;#r;#s;#a;#i=null;#n=null;#o=null;#l=null;#u=null;#f=0;#h=0;#d=!1;#v=new Set;#p=new Set;#c=null;#y=pa(()=>(this.#c=ct(this.#f),()=>{this.#c=null}));constructor(t,r,n){this.#e=t,this.#r=r,this.#s=n,this.parent=L.b,this.is_pending=!!this.#r.pending,this.#a=En(()=>{if(L.b=this,P){const s=this.#t;Tt(),s.nodeType===vt&&s.data===xr?this.#x():(this.#E(),this.#h===0&&(this.is_pending=!1))}else{var i=this.#g();try{this.#i=he(()=>n(i))}catch(s){this.error(s)}this.#h>0?this.#m():this.is_pending=!1}return()=>{this.#u?.remove()}},_a),P&&(this.#e=H)}#E(){try{this.#i=he(()=>this.#s(this.#e))}catch(t){this.error(t)}}#x(){const t=this.#r.pending;t&&(this.#n=he(()=>t(this.#e)),ge.enqueue(()=>{var r=this.#g();this.#i=this.#_(()=>(ge.ensure(),he(()=>this.#s(r)))),this.#h>0?this.#m():(ot(this.#n,()=>{this.#n=null}),this.is_pending=!1)}))}#g(){var t=this.#e;return this.is_pending&&(this.#u=de(),this.#e.before(this.#u),t=this.#u),t}defer_effect(t){vi(t,this.#v,this.#p)}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!this.#r.pending}#_(t){var r=L,n=T,i=ve;Ae(this.#a),re(this.#a),St(this.#a.ctx);try{return t()}catch(s){return ci(s),null}finally{Ae(r),re(n),St(i)}}#m(){const t=this.#r.pending;this.#i!==null&&(this.#l=document.createDocumentFragment(),this.#l.append(this.#u),Di(this.#i,this.#l)),this.#n===null&&(this.#n=he(()=>t(this.#e)))}#b(t){if(!this.has_pending_snippet()){this.parent&&this.parent.#b(t);return}if(this.#h+=t,this.#h===0){this.is_pending=!1;for(const r of this.#v)G(r,ee),De(r);for(const r of this.#p)G(r,Ge),De(r);this.#v.clear(),this.#p.clear(),this.#n&&ot(this.#n,()=>{this.#n=null}),this.#l&&(this.#e.before(this.#l),this.#l=null)}}update_pending_count(t){this.#b(t),this.#f+=t,this.#c&&Ht(this.#c,this.#f)}get_effect_pending(){return this.#y(),v(this.#c)}error(t){var r=this.#r.onerror;let n=this.#r.failed;if(this.#d||!r&&!n)throw t;this.#i&&(K(this.#i),this.#i=null),this.#n&&(K(this.#n),this.#n=null),this.#o&&(K(this.#o),this.#o=null),P&&(J(this.#t),fa(),J(pr()));var i=!1,s=!1;const a=()=>{if(i){ua();return}i=!0,s&&la(),ge.ensure(),this.#f=0,this.#o!==null&&ot(this.#o,()=>{this.#o=null}),this.is_pending=this.has_pending_snippet(),this.#i=this.#_(()=>(this.#d=!1,he(()=>this.#s(this.#e)))),this.#h>0?this.#m():this.is_pending=!1};var o=T;try{re(null),s=!0,r?.(t,a),s=!1}catch(l){At(l,this.#a&&this.#a.parent)}finally{re(o)}n&&Zt(()=>{this.#o=this.#_(()=>{ge.ensure(),this.#d=!0;try{return he(()=>{n(this.#e,()=>t,()=>a)})}catch(l){return At(l,this.#a.parent),null}finally{this.#d=!1}})})}}function ba(e,t,r,n){const i=Pr;if(r.length===0&&e.length===0){n(t.map(i));return}var s=D,a=L,o=ya();function l(){Promise.all(r.map(u=>Ea(u))).then(u=>{o();try{n([...t.map(i),...u])}catch(f){a.f&Re||At(f,a)}s?.deactivate(),_r()}).catch(u=>{At(u,a)})}e.length>0?Promise.all(e).then(()=>{o();try{return l()}finally{s?.deactivate(),_r()}}):l()}function ya(){var e=L,t=T,r=ve,n=D;return function(s=!0){Ae(e),re(t),St(r),s&&n?.activate()}}function _r(){Ae(null),re(null),St(null)}function Pr(e){var t=V|ee,r=T!==null&&T.f&V?T:null;return L!==null&&(L.f|=dt),{ctx:ve,deps:null,effects:null,equals:oi,f:t,fn:e,reactions:null,rv:0,v:j,wv:0,parent:r??L,ac:null}}function Ea(e,t,r){let n=L;n===null&&Js();var i=n.b,s=void 0,a=ct(j),o=!T,l=new Map;return Pa(()=>{var u=ri();s=u.promise;try{Promise.resolve(e()).then(u.resolve,u.reject).then(()=>{f===D&&f.committed&&f.deactivate(),_r()})}catch(d){u.reject(d),_r()}var f=D;if(o){var c=i.is_rendered();i.update_pending_count(1),f.increment(c),l.get(f)?.reject(xt),l.delete(f),l.set(f,u)}const h=(d,_=void 0)=>{if(f.activate(),_)_!==xt&&(a.f|=ze,Ht(a,_));else{a.f&ze&&(a.f^=ze),Ht(a,d);for(const[g,p]of l){if(l.delete(g),g===f)break;p.reject(xt)}}o&&(i.update_pending_count(-1),f.decrement(c))};u.promise.then(h,d=>h(null,d||"unknown"))}),Ni(()=>{for(const u of l.values())u.reject(xt)}),new Promise(u=>{function f(c){function h(){c===s?u(a):f(s)}c.then(h,h)}f(s)})}function xe(e){const t=Pr(e);return Ui(t),t}function gi(e){const t=Pr(e);return t.equals=ui,t}function bi(e){var t=e.effects;if(t!==null){e.effects=null;for(var r=0;r<t.length;r+=1)K(t[r])}}function xa(e){for(var t=e.parent;t!==null;){if(!(t.f&V))return t.f&Re?null:t;t=t.parent}return null}function mn(e){var t,r=L;Ae(xa(e));try{e.f&=~ht,bi(e),t=ji(e)}finally{Ae(r)}return t}function yi(e){var t=mn(e);if(!e.equals(t)&&(e.wv=Gi(),(!D?.is_fork||e.deps===null)&&(e.v=t,e.deps===null))){G(e,W);return}Ye||(me!==null?(bn()||D?.is_fork)&&me.set(e,t):_n(e))}let Yr=new Set;const qe=new Map;let Ei=!1;function ct(e,t){var r={f:0,v:e,reactions:null,equals:oi,rv:0,wv:0};return r}function F(e,t){const r=ct(e);return Ui(r),r}function gn(e,t=!1,r=!0){const n=ct(e);return t||(n.equals=ui),n}function I(e,t,r=!1){T!==null&&(!ye||T.f&Hn)&&fi()&&T.f&(V|Ue|vn|Hn)&&!$e?.includes(e)&&oa();let n=r?it(t):t;return Ht(e,n)}function Ht(e,t){if(!e.equals(t)){var r=e.v;Ye?qe.set(e,t):qe.set(e,r),e.v=t;var n=ge.ensure();if(n.capture(e,r),e.f&V){const i=e;e.f&ee&&mn(i),_n(i)}e.wv=Gi(),xi(e,ee),L!==null&&L.f&W&&!(L.f&(Fe|Je))&&(ue===null?Ia([e]):ue.push(e)),!n.is_fork&&Yr.size>0&&!Ei&&wa()}return t}function wa(){Ei=!1;var e=lt;mr(!0);const t=Array.from(Yr);try{for(const r of t)r.f&W&&G(r,Ge),Yt(r)&&Xt(r)}finally{mr(e)}Yr.clear()}function jt(e){I(e,e.v+1)}function xi(e,t){var r=e.reactions;if(r!==null)for(var n=r.length,i=0;i<n;i++){var s=r[i],a=s.f,o=(a&ee)===0;if(o&&G(s,t),a&V){var l=s;me?.delete(l),a&ht||(a&ce&&(s.f|=ht),xi(l,Ge))}else o&&(a&Ue&&Be!==null&&Be.add(s),De(s))}}function it(e){if(typeof e!="object"||e===null||Gt in e)return e;const t=ei(e);if(t!==qs&&t!==Zs)return e;var r=new Map,n=Kn(e),i=F(0),s=ut,a=o=>{if(ut===s)return o();var l=T,u=ut;re(null),In(s);var f=o();return re(l),In(u),f};return n&&r.set("length",F(e.length)),new Proxy(e,{defineProperty(o,l,u){(!("value"in u)||u.configurable===!1||u.enumerable===!1||u.writable===!1)&&sa();var f=r.get(l);return f===void 0?f=a(()=>{var c=F(u.value);return r.set(l,c),c}):I(f,u.value,!0),!0},deleteProperty(o,l){var u=r.get(l);if(u===void 0){if(l in o){const f=a(()=>F(j));r.set(l,f),jt(i)}}else I(u,j),jt(i);return!0},get(o,l,u){if(l===Gt)return e;var f=r.get(l),c=l in o;if(f===void 0&&(!c||at(o,l)?.writable)&&(f=a(()=>{var d=it(c?o[l]:j),_=F(d);return _}),r.set(l,f)),f!==void 0){var h=v(f);return h===j?void 0:h}return Reflect.get(o,l,u)},getOwnPropertyDescriptor(o,l){var u=Reflect.getOwnPropertyDescriptor(o,l);if(u&&"value"in u){var f=r.get(l);f&&(u.value=v(f))}else if(u===void 0){var c=r.get(l),h=c?.v;if(c!==void 0&&h!==j)return{enumerable:!0,configurable:!0,value:h,writable:!0}}return u},has(o,l){if(l===Gt)return!0;var u=r.get(l),f=u!==void 0&&u.v!==j||Reflect.has(o,l);if(u!==void 0||L!==null&&(!f||at(o,l)?.writable)){u===void 0&&(u=a(()=>{var h=f?it(o[l]):j,d=F(h);return d}),r.set(l,u));var c=v(u);if(c===j)return!1}return f},set(o,l,u,f){var c=r.get(l),h=l in o;if(n&&l==="length")for(var d=u;d<c.v;d+=1){var _=r.get(d+"");_!==void 0?I(_,j):d in o&&(_=a(()=>F(j)),r.set(d+"",_))}if(c===void 0)(!h||at(o,l)?.writable)&&(c=a(()=>F(void 0)),I(c,it(u)),r.set(l,c));else{h=c.v!==j;var g=a(()=>it(u));I(c,g)}var p=Reflect.getOwnPropertyDescriptor(o,l);if(p?.set&&p.set.call(f,u),!h){if(n&&typeof l=="string"){var b=r.get("length"),y=Number(l);Number.isInteger(y)&&y>=b.v&&I(b,y+1)}jt(i)}return!0},ownKeys(o){v(i);var l=Reflect.ownKeys(o).filter(c=>{var h=r.get(c);return h===void 0||h.v!==j});for(var[u,f]of r)f.v!==j&&!(u in o)&&l.push(u);return l},setPrototypeOf(){aa()}})}var Pn,wi,Ti,Si;function Qr(){if(Pn===void 0){Pn=window,wi=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,r=Text.prototype;Ti=at(t,"firstChild").get,Si=at(t,"nextSibling").get,An(e)&&(e.__click=void 0,e.__className=void 0,e.__attributes=null,e.__style=void 0,e.__e=void 0),An(r)&&(r.__t=void 0)}}function de(e=""){return document.createTextNode(e)}function be(e){return Ti.call(e)}function Ee(e){return Si.call(e)}function C(e,t){if(!P)return be(e);var r=be(H);if(r===null)r=H.appendChild(de());else if(t&&r.nodeType!==pn){var n=de();return r?.before(n),J(n),n}return J(r),r}function Ai(e,t=!1){if(!P){var r=be(e);return r instanceof Comment&&r.data===""?Ee(r):r}if(t&&H?.nodeType!==pn){var n=de();return H?.before(n),J(n),n}return H}function Z(e,t=1,r=!1){let n=P?H:e;for(var i;t--;)i=n,n=Ee(n);if(!P)return n;if(r&&n?.nodeType!==pn){var s=de();return n===null?i?.after(s):n.before(s),J(s),s}return J(n),n}function Hi(e){e.textContent=""}function Li(){return!1}function Pi(e){var t=T,r=L;re(null),Ae(null);try{return e()}finally{re(t),Ae(r)}}function Ta(e){L===null&&(T===null&&ta(),ea()),Ye&&Ks()}function Sa(e,t){var r=t.last;r===null?t.last=t.first=e:(r.next=e,e.prev=r,t.last=e)}function He(e,t,r){var n=L;n!==null&&n.f&ae&&(e|=ae);var i={ctx:ve,deps:null,nodes:null,f:e|ee|ce,first:null,fn:t,last:null,next:null,parent:n,b:n&&n.b,prev:null,teardown:null,wv:0,ac:null};if(r)try{Xt(i),i.f|=Sr}catch(o){throw K(i),o}else t!==null&&De(i);var s=i;if(r&&s.deps===null&&s.teardown===null&&s.nodes===null&&s.first===s.last&&!(s.f&dt)&&(s=s.first,e&Ue&&e&wt&&s!==null&&(s.f|=wt)),s!==null&&(s.parent=n,n!==null&&Sa(s,n),T!==null&&T.f&V&&!(e&Je))){var a=T;(a.effects??=[]).push(s)}return i}function bn(){return T!==null&&!ye}function Ni(e){const t=He(Tr,null,!1);return G(t,W),t.teardown=e,t}function Te(e){Ta();var t=L.f,r=!T&&(t&Fe)!==0&&(t&Sr)===0;if(r){var n=ve;(n.e??=[]).push(e)}else return Ii(e)}function Ii(e){return He(vr|Ys,e,!1)}function Aa(e){ge.ensure();const t=He(Je|dt,e,!0);return()=>{K(t)}}function Ha(e){ge.ensure();const t=He(Je|dt,e,!0);return(r={})=>new Promise(n=>{r.outro?ot(t,()=>{K(t),n(void 0)}):(K(t),n(void 0))})}function La(e){return He(vr,e,!1)}function Pa(e){return He(vn|dt,e,!0)}function yn(e,t=0){return He(Tr|t,e,!0)}function Oe(e,t=[],r=[],n=[]){ba(n,t,r,i=>{He(Tr,()=>e(...i.map(v)),!0)})}function En(e,t=0){var r=He(Ue|t,e,!0);return r}function he(e){return He(Fe|dt,e,!0)}function Bi(e){var t=e.teardown;if(t!==null){const r=Ye,n=T;Nn(!0),re(null);try{t.call(null)}finally{Nn(r),re(n)}}}function Oi(e,t=!1){var r=e.first;for(e.first=e.last=null;r!==null;){const i=r.ac;i!==null&&Pi(()=>{i.abort(xt)});var n=r.next;r.f&Je?r.parent=null:K(r,t),r=n}}function Na(e){for(var t=e.first;t!==null;){var r=t.next;t.f&Fe||K(t),t=r}}function K(e,t=!0){var r=!1;(t||e.f&ii)&&e.nodes!==null&&e.nodes.end!==null&&(Mi(e.nodes.start,e.nodes.end),r=!0),Oi(e,t&&!r),gr(e,0),G(e,Re);var n=e.nodes&&e.nodes.t;if(n!==null)for(const s of n)s.stop();Bi(e);var i=e.parent;i!==null&&i.first!==null&&Ci(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=null}function Mi(e,t){for(;e!==null;){var r=e===t?null:Ee(e);e.remove(),e=r}}function Ci(e){var t=e.parent,r=e.prev,n=e.next;r!==null&&(r.next=n),n!==null&&(n.prev=r),t!==null&&(t.first===e&&(t.first=n),t.last===e&&(t.last=r))}function ot(e,t,r=!0){var n=[];Ri(e,n,!0);var i=()=>{r&&K(e),t&&t()},s=n.length;if(s>0){var a=()=>--s||i();for(var o of n)o.out(a)}else i()}function Ri(e,t,r){if(!(e.f&ae)){e.f^=ae;var n=e.nodes&&e.nodes.t;if(n!==null)for(const o of n)(o.is_global||r)&&t.push(o);for(var i=e.first;i!==null;){var s=i.next,a=(i.f&wt)!==0||(i.f&Fe)!==0&&(e.f&Ue)!==0;Ri(i,t,a?r:!1),i=s}}}function xn(e){$i(e,!0)}function $i(e,t){if(e.f&ae){e.f^=ae,e.f&W||(G(e,ee),De(e));for(var r=e.first;r!==null;){var n=r.next,i=(r.f&wt)!==0||(r.f&Fe)!==0;$i(r,i?t:!1),r=n}var s=e.nodes&&e.nodes.t;if(s!==null)for(const a of s)(a.is_global||t)&&a.in()}}function Di(e,t){if(e.nodes)for(var r=e.nodes.start,n=e.nodes.end;r!==null;){var i=r===n?null:Ee(r);t.append(r),r=i}}let lt=!1;function mr(e){lt=e}let Ye=!1;function Nn(e){Ye=e}let T=null,ye=!1;function re(e){T=e}let L=null;function Ae(e){L=e}let $e=null;function Ui(e){T!==null&&($e===null?$e=[e]:$e.push(e))}let te=null,se=0,ue=null;function Ia(e){ue=e}let Fi=1,st=0,ut=st;function In(e){ut=e}function Gi(){return++Fi}function Yt(e){var t=e.f;if(t&ee)return!0;if(t&V&&(e.f&=~ht),t&Ge){for(var r=e.deps,n=r.length,i=0;i<n;i++){var s=r[i];if(Yt(s)&&yi(s),s.wv>e.wv)return!0}t&ce&&me===null&&G(e,W)}return!1}function ki(e,t,r=!0){var n=e.reactions;if(n!==null&&!$e?.includes(e))for(var i=0;i<n.length;i++){var s=n[i];s.f&V?ki(s,t,!1):t===s&&(r?G(s,ee):s.f&W&&G(s,Ge),De(s))}}function ji(e){var t=te,r=se,n=ue,i=T,s=$e,a=ve,o=ye,l=ut,u=e.f;te=null,se=0,ue=null,T=u&(Fe|Je)?null:e,$e=null,St(e.ctx),ye=!1,ut=++st,e.ac!==null&&(Pi(()=>{e.ac.abort(xt)}),e.ac=null);try{e.f|=qr;var f=e.fn,c=f(),h=e.deps;if(te!==null){var d;if(gr(e,se),h!==null&&se>0)for(h.length=se+te.length,d=0;d<te.length;d++)h[se+d]=te[d];else e.deps=h=te;if(bn()&&e.f&ce)for(d=se;d<h.length;d++)(h[d].reactions??=[]).push(e)}else h!==null&&se<h.length&&(gr(e,se),h.length=se);if(fi()&&ue!==null&&!ye&&h!==null&&!(e.f&(V|Ge|ee)))for(d=0;d<ue.length;d++)ki(ue[d],e);if(i!==null&&i!==e){if(st++,i.deps!==null)for(let _=0;_<r;_+=1)i.deps[_].rv=st;if(t!==null)for(const _ of t)_.rv=st;ue!==null&&(n===null?n=ue:n.push(...ue))}return e.f&ze&&(e.f^=ze),c}catch(_){return ci(_)}finally{e.f^=qr,te=t,se=r,ue=n,T=i,$e=s,St(a),ye=o,ut=l}}function Ba(e,t){let r=t.reactions;if(r!==null){var n=Ws.call(r,e);if(n!==-1){var i=r.length-1;i===0?r=t.reactions=null:(r[n]=r[i],r.pop())}}if(r===null&&t.f&V&&(te===null||!te.includes(t))){var s=t;s.f&ce&&(s.f^=ce,s.f&=~ht),_n(s),bi(s),gr(s,0)}}function gr(e,t){var r=e.deps;if(r!==null)for(var n=t;n<r.length;n++)Ba(e,r[n])}function Xt(e){var t=e.f;if(!(t&Re)){G(e,W);var r=L,n=lt;L=e,lt=!0;try{t&(Ue|ni)?Na(e):Oi(e),Bi(e);var i=ji(e);e.teardown=typeof i=="function"?i:null,e.wv=Fi;var s;zr&&ha&&e.f&ee&&e.deps}finally{lt=n,L=r}}}async function Oa(){await Promise.resolve(),rt()}function v(e){var t=e.f,r=(t&V)!==0;if(T!==null&&!ye){var n=L!==null&&(L.f&Re)!==0;if(!n&&!$e?.includes(e)){var i=T.deps;if(T.f&qr)e.rv<st&&(e.rv=st,te===null&&i!==null&&i[se]===e?se++:te===null?te=[e]:te.push(e));else{(T.deps??=[]).push(e);var s=e.reactions;s===null?e.reactions=[T]:s.includes(T)||s.push(T)}}}if(Ye&&qe.has(e))return qe.get(e);if(r){var a=e;if(Ye){var o=a.v;return(!(a.f&W)&&a.reactions!==null||Xi(a))&&(o=mn(a)),qe.set(a,o),o}var l=(a.f&ce)===0&&!ye&&T!==null&&(lt||(T.f&ce)!==0),u=a.deps===null;Yt(a)&&(l&&(a.f|=ce),yi(a)),l&&!u&&Vi(a)}if(me?.has(e))return me.get(e);if(e.f&ze)throw e.v;return e.v}function Vi(e){if(e.deps!==null){e.f|=ce;for(const t of e.deps)(t.reactions??=[]).push(e),t.f&V&&!(t.f&ce)&&Vi(t)}}function Xi(e){if(e.v===j)return!0;if(e.deps===null)return!1;for(const t of e.deps)if(qe.has(t)||t.f&V&&Xi(t))return!0;return!1}function Nr(e){var t=ye;try{return ye=!0,e()}finally{ye=t}}const Wi=new Set,Jr=new Set;function zi(e){for(var t=0;t<e.length;t++)Wi.add(e[t]);for(var r of Jr)r(e)}let Bn=null;function ar(e){var t=this,r=t.ownerDocument,n=e.type,i=e.composedPath?.()||[],s=i[0]||e.target;Bn=e;var a=0,o=Bn===e&&e.__root;if(o){var l=i.indexOf(o);if(l!==-1&&(t===document||t===window)){e.__root=t;return}var u=i.indexOf(t);if(u===-1)return;l<=u&&(a=l)}if(s=i[a]||e.target,s!==t){Vt(e,"currentTarget",{configurable:!0,get(){return s||r}});var f=T,c=L;re(null),Ae(null);try{for(var h,d=[];s!==null;){var _=s.assignedSlot||s.parentNode||s.host||null;try{var g=s["__"+n];g!=null&&(!s.disabled||e.target===s)&&g.call(s,e)}catch(p){h?d.push(p):h=p}if(e.cancelBubble||_===t||_===null)break;s=_}if(h){for(let p of d)queueMicrotask(()=>{throw p});throw h}}finally{e.__root=t,delete e.currentTarget,re(f),Ae(c)}}}function qi(e){var t=document.createElement("template");return t.innerHTML=e.replaceAll("<!>","<!---->"),t.content}function Ze(e,t){var r=L;r.nodes===null&&(r.nodes={start:e,end:t,a:null,t:null})}function ne(e,t){var r=(t&js)!==0,n=(t&Vs)!==0,i,s=!e.startsWith("<!>");return()=>{if(P)return Ze(H,null),H;i===void 0&&(i=qi(s?e:"<!>"+e),r||(i=be(i)));var a=n||wi?document.importNode(i,!0):i.cloneNode(!0);if(r){var o=be(a),l=a.lastChild;Ze(o,l)}else Ze(a,a);return a}}function Ma(){if(P)return Ze(H,null),H;var e=document.createDocumentFragment(),t=document.createComment(""),r=de();return e.append(t,r),Ze(t,r),e}function X(e,t){if(P){var r=L;(!(r.f&Sr)||r.nodes.end===null)&&(r.nodes.end=H),Tt();return}e!==null&&e.before(t)}const Ca=["touchstart","touchmove"];function Ra(e){return Ca.includes(e)}function we(e,t){var r=t==null?"":typeof t=="object"?t+"":t;r!==(e.__t??=e.nodeValue)&&(e.__t=r,e.nodeValue=r+"")}function Zi(e,t){return Yi(e,t)}function $a(e,t){Qr(),t.intro=t.intro??!1;const r=t.target,n=P,i=H;try{for(var s=be(r);s&&(s.nodeType!==vt||s.data!==Jn);)s=Ee(s);if(!s)throw ft;Ce(!0),J(s);const a=Yi(e,{...t,anchor:s});return Ce(!1),a}catch(a){if(a instanceof Error&&a.message.split(`
|
|
2
|
+
`).some(o=>o.startsWith("https://svelte.dev/e/")))throw a;return a!==ft&&console.warn("Failed to hydrate: ",a),t.recover===!1&&na(),Qr(),Hi(r),Ce(!1),Zi(e,t)}finally{Ce(n),J(i)}}const yt=new Map;function Yi(e,{target:t,anchor:r,props:n={},events:i,context:s,intro:a=!0}){Qr();var o=new Set,l=c=>{for(var h=0;h<c.length;h++){var d=c[h];if(!o.has(d)){o.add(d);var _=Ra(d);t.addEventListener(d,ar,{passive:_});var g=yt.get(d);g===void 0?(document.addEventListener(d,ar,{passive:_}),yt.set(d,1)):yt.set(d,g+1)}}};l(wr(Wi)),Jr.add(l);var u=void 0,f=Ha(()=>{var c=r??t.appendChild(de());return ma(c,{pending:()=>{}},h=>{if(s){Ar({});var d=ve;d.c=s}if(i&&(n.$$events=i),P&&Ze(h,null),u=e(h,n)||{},P&&(L.nodes.end=H,H===null||H.nodeType!==vt||H.data!==cn))throw qt(),ft;s&&Hr()}),()=>{for(var h of o){t.removeEventListener(h,ar);var d=yt.get(h);--d===0?(document.removeEventListener(h,ar),yt.delete(h)):yt.set(h,d)}Jr.delete(l),c!==r&&c.parentNode?.removeChild(c)}});return Kr.set(u,f),u}let Kr=new WeakMap;function Da(e,t){const r=Kr.get(e);return r?(Kr.delete(e),r(t)):Promise.resolve()}class Ua{anchor;#e=new Map;#t=new Map;#r=new Map;#s=new Set;#a=!0;constructor(t,r=!0){this.anchor=t,this.#a=r}#i=()=>{var t=D;if(this.#e.has(t)){var r=this.#e.get(t),n=this.#t.get(r);if(n)xn(n),this.#s.delete(r);else{var i=this.#r.get(r);i&&(this.#t.set(r,i.effect),this.#r.delete(r),i.fragment.lastChild.remove(),this.anchor.before(i.fragment),n=i.effect)}for(const[s,a]of this.#e){if(this.#e.delete(s),s===t)break;const o=this.#r.get(a);o&&(K(o.effect),this.#r.delete(a))}for(const[s,a]of this.#t){if(s===r||this.#s.has(s))continue;const o=()=>{if(Array.from(this.#e.values()).includes(s)){var u=document.createDocumentFragment();Di(a,u),u.append(de()),this.#r.set(s,{effect:a,fragment:u})}else K(a);this.#s.delete(s),this.#t.delete(s)};this.#a||!n?(this.#s.add(s),ot(a,o,!1)):o()}}};#n=t=>{this.#e.delete(t);const r=Array.from(this.#e.values());for(const[n,i]of this.#r)r.includes(n)||(K(i.effect),this.#r.delete(n))};ensure(t,r){var n=D,i=Li();if(r&&!this.#t.has(t)&&!this.#r.has(t))if(i){var s=document.createDocumentFragment(),a=de();s.append(a),this.#r.set(t,{effect:he(()=>r(a)),fragment:s})}else this.#t.set(t,he(()=>r(this.anchor)));if(this.#e.set(n,t),i){for(const[o,l]of this.#t)o===t?n.skipped_effects.delete(l):n.skipped_effects.add(l);for(const[o,l]of this.#r)o===t?n.skipped_effects.delete(l.effect):n.skipped_effects.add(l.effect);n.oncommit(this.#i),n.ondiscard(this.#n)}else P&&(this.anchor=H),this.#i()}}function _e(e,t,r=!1){P&&Tt();var n=new Ua(e),i=r?wt:0;function s(a,o){if(P){const u=ai(e)===xr;if(a===u){var l=pr();J(l),n.anchor=l,Ce(!1),n.ensure(a,o),Ce(!0);return}}n.ensure(a,o)}En(()=>{var a=!1;t((o,l=!0)=>{a=!0,s(l,o)}),a||s(!1,null)},i)}function Fa(e,t){return t}function Ga(e,t,r){for(var n=[],i=t.length,s,a=t.length,o=0;o<i;o++){let c=t[o];ot(c,()=>{if(s){if(s.pending.delete(c),s.done.add(c),s.pending.size===0){var h=e.outrogroups;en(wr(s.done)),h.delete(s),h.size===0&&(e.outrogroups=null)}}else a-=1},!1)}if(a===0){var l=n.length===0&&r!==null;if(l){var u=r,f=u.parentNode;Hi(f),f.append(u),e.items.clear()}en(t,!l)}else s={pending:new Set(t),done:new Set},(e.outrogroups??=new Set).add(s)}function en(e,t=!0){for(var r=0;r<e.length;r++)K(e[r],t)}var On;function Qi(e,t,r,n,i,s=null){var a=e,o=new Map,l=(t&Qn)!==0;if(l){var u=e;a=P?J(be(u)):u.appendChild(de())}P&&Tt();var f=null,c=gi(()=>{var b=r();return Kn(b)?b:b==null?[]:wr(b)}),h,d=!0;function _(){p.fallback=f,ka(p,h,a,t,n),f!==null&&(h.length===0?f.f&Me?(f.f^=Me,Ft(f,null,a)):xn(f):ot(f,()=>{f=null}))}var g=En(()=>{h=v(c);var b=h.length;let y=!1;if(P){var N=ai(a)===xr;N!==(b===0)&&(a=pr(),J(a),Ce(!1),y=!0)}for(var O=new Set,E=D,x=Li(),B=0;B<b;B+=1){P&&H.nodeType===vt&&H.data===cn&&(a=H,y=!0,Ce(!1));var oe=h[B],le=n(oe,B),R=d?null:o.get(le);R?(R.v&&Ht(R.v,oe),R.i&&Ht(R.i,B),x&&E.skipped_effects.delete(R.e)):(R=ja(o,d?a:On??=de(),oe,le,B,i,t,r),d||(R.e.f|=Me),o.set(le,R)),O.add(le)}if(b===0&&s&&!f&&(d?f=he(()=>s(a)):(f=he(()=>s(On??=de())),f.f|=Me)),P&&b>0&&J(pr()),!d)if(x){for(const[ke,Le]of o)O.has(ke)||E.skipped_effects.add(Le.e);E.oncommit(_),E.ondiscard(()=>{})}else _();y&&Ce(!0),v(c)}),p={effect:g,items:o,outrogroups:null,fallback:f};d=!1,P&&(a=H)}function ka(e,t,r,n,i){var s=(n&$s)!==0,a=t.length,o=e.items,l=e.effect.first,u,f=null,c,h=[],d=[],_,g,p,b;if(s)for(b=0;b<a;b+=1)_=t[b],g=i(_,b),p=o.get(g).e,p.f&Me||(p.nodes?.a?.measure(),(c??=new Set).add(p));for(b=0;b<a;b+=1){if(_=t[b],g=i(_,b),p=o.get(g).e,e.outrogroups!==null)for(const R of e.outrogroups)R.pending.delete(p),R.done.delete(p);if(p.f&Me)if(p.f^=Me,p===l)Ft(p,null,r);else{var y=f?f.next:l;p===e.effect.last&&(e.effect.last=p.prev),p.prev&&(p.prev.next=p.next),p.next&&(p.next.prev=p.prev),Ve(e,f,p),Ve(e,p,y),Ft(p,y,r),f=p,h=[],d=[],l=f.next;continue}if(p.f&ae&&(xn(p),s&&(p.nodes?.a?.unfix(),(c??=new Set).delete(p))),p!==l){if(u!==void 0&&u.has(p)){if(h.length<d.length){var N=d[0],O;f=N.prev;var E=h[0],x=h[h.length-1];for(O=0;O<h.length;O+=1)Ft(h[O],N,r);for(O=0;O<d.length;O+=1)u.delete(d[O]);Ve(e,E.prev,x.next),Ve(e,f,E),Ve(e,x,N),l=N,f=x,b-=1,h=[],d=[]}else u.delete(p),Ft(p,l,r),Ve(e,p.prev,p.next),Ve(e,p,f===null?e.effect.first:f.next),Ve(e,f,p),f=p;continue}for(h=[],d=[];l!==null&&l!==p;)(u??=new Set).add(l),d.push(l),l=l.next;if(l===null)continue}p.f&Me||h.push(p),f=p,l=p.next}if(e.outrogroups!==null){for(const R of e.outrogroups)R.pending.size===0&&(en(wr(R.done)),e.outrogroups?.delete(R));e.outrogroups.size===0&&(e.outrogroups=null)}if(l!==null||u!==void 0){var B=[];if(u!==void 0)for(p of u)p.f&ae||B.push(p);for(;l!==null;)!(l.f&ae)&&l!==e.fallback&&B.push(l),l=l.next;var oe=B.length;if(oe>0){var le=n&Qn&&a===0?r:null;if(s){for(b=0;b<oe;b+=1)B[b].nodes?.a?.measure();for(b=0;b<oe;b+=1)B[b].nodes?.a?.fix()}Ga(e,B,le)}}s&&Zt(()=>{if(c!==void 0)for(p of c)p.nodes?.a?.apply()})}function ja(e,t,r,n,i,s,a,o){var l=a&Cs?a&Ds?ct(r):gn(r,!1,!1):null,u=a&Rs?ct(i):null;return{v:l,i:u,e:he(()=>(s(t,l??r,u??i,o),()=>{e.delete(n)}))}}function Ft(e,t,r){if(e.nodes)for(var n=e.nodes.start,i=e.nodes.end,s=t&&!(t.f&Me)?t.nodes.start:r;n!==null;){var a=Ee(n);if(s.before(n),n===i)return;n=a}}function Ve(e,t,r){t===null?e.effect.first=r:t.next=r,r===null?e.effect.last=t:r.prev=t}function Mn(e,t,r=!1,n=!1,i=!1){var s=e,a="";Oe(()=>{var o=L;if(a===(a=t()??"")){P&&Tt();return}if(o.nodes!==null&&(Mi(o.nodes.start,o.nodes.end),o.nodes=null),a!==""){if(P){H.data;for(var l=Tt(),u=l;l!==null&&(l.nodeType!==vt||l.data!=="");)u=l,l=Ee(l);if(l===null)throw qt(),ft;Ze(H,u),s=J(l);return}var f=a+"";r?f=`<svg>${f}</svg>`:n&&(f=`<math>${f}</math>`);var c=qi(f);if((r||n)&&(c=be(c)),Ze(be(c),c.lastChild),r||n)for(;be(c);)s.before(be(c));else s.before(c)}})}const Cn=[...`
|
|
3
|
+
\r\f \v\uFEFF`];function Va(e,t,r){var n=e==null?"":""+e;if(r){for(var i in r)if(r[i])n=n?n+" "+i:i;else if(n.length)for(var s=i.length,a=0;(a=n.indexOf(i,a))>=0;){var o=a+s;(a===0||Cn.includes(n[a-1]))&&(o===n.length||Cn.includes(n[o]))?n=(a===0?"":n.substring(0,a))+n.substring(o+1):a=o}}return n===""?null:n}function Ji(e,t,r,n,i,s){var a=e.__className;if(P||a!==r||a===void 0){var o=Va(r,n,s);(!P||o!==e.getAttribute("class"))&&(o==null?e.removeAttribute("class"):e.className=o),e.__className=r}else if(s&&i!==s)for(var l in s){var u=!!s[l];(i==null||u!==!!i[l])&&e.classList.toggle(l,u)}return s}const Xa=Symbol("is custom element"),Wa=Symbol("is html");function or(e,t,r,n){var i=za(e);P&&(i[t]=e.getAttribute(t),t==="src"||t==="srcset"||t==="href"&&e.nodeName==="LINK")||i[t]!==(i[t]=r)&&(t==="loading"&&(e[Qs]=r),r==null?e.removeAttribute(t):typeof r!="string"&&qa(e).includes(t)?e[t]=r:e.setAttribute(t,r))}function za(e){return e.__attributes??={[Xa]:e.nodeName.includes("-"),[Wa]:e.namespaceURI===Xs}}var Rn=new Map;function qa(e){var t=e.getAttribute("is")||e.nodeName,r=Rn.get(t);if(r)return r;Rn.set(t,r=[]);for(var n,i=e,s=Element.prototype;s!==i;){n=zs(i);for(var a in n)n[a].set&&r.push(a);i=ei(i)}return r}function $n(e,t){return e===t||e?.[Gt]===t}function Za(e={},t,r,n){return La(()=>{var i,s;return yn(()=>{i=s,s=[],Nr(()=>{e!==r(...s)&&(t(e,...s),i&&$n(r(...i),e)&&t(null,...i))})}),()=>{Zt(()=>{s&&$n(r(...s),e)&&t(null,...s)})}}),e}function wn(e,t,r){if(e==null)return t(void 0),r&&r(void 0),We;const n=Nr(()=>e.subscribe(t,r));return n.unsubscribe?()=>n.unsubscribe():n}const Et=[];function Ya(e,t){return{subscribe:Ir(e,t).subscribe}}function Ir(e,t=We){let r=null;const n=new Set;function i(o){if(li(e,o)&&(e=o,r)){const l=!Et.length;for(const u of n)u[1](),Et.push(u,e);if(l){for(let u=0;u<Et.length;u+=2)Et[u][0](Et[u+1]);Et.length=0}}}function s(o){i(o(e))}function a(o,l=We){const u=[o,l];return n.add(u),n.size===1&&(r=t(i,s)||We),o(e),()=>{n.delete(u),n.size===0&&r&&(r(),r=null)}}return{set:i,update:s,subscribe:a}}function Bt(e,t,r){const n=!Array.isArray(e),i=n?[e]:e;if(!i.every(Boolean))throw new Error("derived() expects stores as input, got a falsy value");const s=t.length<2;return Ya(r,(a,o)=>{let l=!1;const u=[];let f=0,c=We;const h=()=>{if(f)return;c();const _=t(n?u[0]:u,a,o);s?a(_):c=typeof _=="function"?_:We},d=i.map((_,g)=>wn(_,p=>{u[g]=p,f&=~(1<<g),l&&h()},()=>{f|=1<<g}));return l=!0,h(),function(){ti(d),c(),l=!1}})}function Qa(e){let t;return wn(e,r=>t=r)(),t}let lr=!1,tn=Symbol();function Ki(e,t,r){const n=r[t]??={store:null,source:gn(void 0),unsubscribe:We};if(n.store!==e&&!(tn in r))if(n.unsubscribe(),n.store=e??null,e==null)n.source.v=void 0,n.unsubscribe=We;else{var i=!0;n.unsubscribe=wn(e,s=>{i?n.source.v=s:I(n.source,s)}),i=!1}return e&&tn in r?Qa(e):v(n.source)}function es(){const e={};function t(){Ni(()=>{for(var r in e)e[r].unsubscribe();Vt(e,tn,{enumerable:!1,value:!0})})}return[e,t]}function Ja(e){var t=lr;try{return lr=!1,[e(),lr]}finally{lr=t}}function Q(e,t,r,n){var i=(r&Gs)!==0,s=(r&ks)!==0,a=n,o=!0,l=()=>(o&&(o=!1,a=s?Nr(n):n),a),u;if(i){var f=Gt in e||si in e;u=at(e,t)?.set??(f&&t in e?y=>e[t]=y:void 0)}var c,h=!1;i?[c,h]=Ja(()=>e[t]):c=e[t],c===void 0&&n!==void 0&&(c=l(),u&&(ia(),u(c)));var d;if(d=()=>{var y=e[t];return y===void 0?l():(o=!0,y)},!(r&Fs))return d;if(u){var _=e.$$legacy;return function(y,N){return arguments.length>0?((!N||_||h)&&u(N?d():y),y):d()}}var g=!1,p=(r&Us?Pr:gi)(()=>(g=!1,d()));i&&v(p);var b=L;return function(y,N){if(arguments.length>0){const O=N?v(p):i?it(y):y;return I(p,O),g=!0,a!==void 0&&(a=O),y}return Ye&&g||b.f&Re?p.v:v(p)}}function Ka(e){return new eo(e)}class eo{#e;#t;constructor(t){var r=new Map,n=(s,a)=>{var o=gn(a,!1,!1);return r.set(s,o),o};const i=new Proxy({...t.props||{},$$events:{}},{get(s,a){return v(r.get(a)??n(a,Reflect.get(s,a)))},has(s,a){return a===si?!0:(v(r.get(a)??n(a,Reflect.get(s,a))),Reflect.has(s,a))},set(s,a,o){return I(r.get(a)??n(a,o),o),Reflect.set(s,a,o)}});this.#t=(t.hydrate?$a:Zi)(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)&&rt(),this.#e=i.$$events;for(const s of Object.keys(this.#t))s==="$set"||s==="$destroy"||s==="$on"||Vt(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=()=>{Da(this.#t)}}$set(t){this.#t.$set(t)}$on(t,r){this.#e[t]=this.#e[t]||[];const n=(...i)=>r.call(this,...i);return this.#e[t].push(n),()=>{this.#e[t]=this.#e[t].filter(i=>i!==n)}}$destroy(){this.#t.$destroy()}}let ts;typeof HTMLElement=="function"&&(ts=class extends HTMLElement{$$ctor;$$s;$$c;$$cn=!1;$$d={};$$r=!1;$$p_d={};$$l={};$$l_u=new Map;$$me;constructor(e,t,r){super(),this.$$ctor=e,this.$$s=t,r&&this.attachShadow({mode:"open"})}addEventListener(e,t,r){if(this.$$l[e]=this.$$l[e]||[],this.$$l[e].push(t),this.$$c){const n=this.$$c.$on(e,t);this.$$l_u.set(t,n)}super.addEventListener(e,t,r)}removeEventListener(e,t,r){if(super.removeEventListener(e,t,r),this.$$c){const n=this.$$l_u.get(t);n&&(n(),this.$$l_u.delete(t))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let e=function(n){return i=>{const s=document.createElement("slot");n!=="default"&&(s.name=n),X(i,s)}};if(await Promise.resolve(),!this.$$cn||this.$$c)return;const t={},r=to(this);for(const n of this.$$s)n in r&&(n==="default"&&!this.$$d.children?(this.$$d.children=e(n),t.default=!0):t[n]=e(n));for(const n of this.attributes){const i=this.$$g_p(n.name);i in this.$$d||(this.$$d[i]=fr(i,n.value,this.$$p_d,"toProp"))}for(const n in this.$$p_d)!(n in this.$$d)&&this[n]!==void 0&&(this.$$d[n]=this[n],delete this[n]);this.$$c=Ka({component:this.$$ctor,target:this.shadowRoot||this,props:{...this.$$d,$$slots:t,$$host:this}}),this.$$me=Aa(()=>{yn(()=>{this.$$r=!0;for(const n of dr(this.$$c)){if(!this.$$p_d[n]?.reflect)continue;this.$$d[n]=this.$$c[n];const i=fr(n,this.$$d[n],this.$$p_d,"toAttribute");i==null?this.removeAttribute(this.$$p_d[n].attribute||n):this.setAttribute(this.$$p_d[n].attribute||n,i)}this.$$r=!1})});for(const n in this.$$l)for(const i of this.$$l[n]){const s=this.$$c.$on(n,i);this.$$l_u.set(i,s)}this.$$l={}}}attributeChangedCallback(e,t,r){this.$$r||(e=this.$$g_p(e),this.$$d[e]=fr(e,r,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 dr(this.$$p_d).find(t=>this.$$p_d[t].attribute===e||!this.$$p_d[t].attribute&&t.toLowerCase()===e)||e}});function fr(e,t,r,n){const i=r[e]?.type;if(t=i==="Boolean"&&typeof t!="boolean"?t!=null:t,!n||!r[e])return t;if(n==="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 to(e){const t={};return e.childNodes.forEach(r=>{t[r.slot||"default"]=!0}),t}function ro(e,t,r,n,i,s){let a=class extends ts{constructor(){super(e,r,i),this.$$p_d=t}static get observedAttributes(){return dr(t).map(o=>(t[o].attribute||o).toLowerCase())}};return dr(t).forEach(o=>{Vt(a.prototype,o,{get(){return this.$$c&&o in this.$$c?this.$$c[o]:this.$$d[o]},set(l){l=fr(o,l,t),this.$$d[o]=l;var u=this.$$c;if(u){var f=at(u,o)?.get;f?u[o]=l:u.$set({[o]:l})}}})}),n.forEach(o=>{Vt(a.prototype,o,{get(){return this.$$c?.[o]}})}),e.element=a,a}class no extends Error{constructor(t,r){super(r),this.code=t,this.name="ElevateApiError"}}const io=async e=>{const t=new URL(`${e.apiEndpoint}/elevate/playerInfo?language=${e.locale??""}`),r=new Headers({"Content-Type":"application/json"});e.userSession&&r.append("X-SessionId",e.userSession);const i=await(await fetch(t.href,{method:"GET",headers:r})).json();if(!i.success)throw new no(i.errorCode,i.errorMessage);return i.data},so=async e=>{const t=new URL(`${e.apiEndpoint}/elevate/levels?language=${e.locale??""}`);return(await(await fetch(t.href,{method:"GET"})).json()).data},Fr=10,ao=(e,t)=>{const r=[...e].sort((i,s)=>i.firstEntryPoints>s.firstEntryPoints?1:-1);let n=0;return r.forEach((i,s)=>{t>i.firstEntryPoints&&(n=s)}),n},oo=e=>{window.postMessage({type:"GamificationXpUpdated",points:e},window.location.href)},lo=e=>{let t=F(void 0),r=F(void 0),n=F(void 0),i=F(void 0),s=F(!1),a=F(void 0);const o=async()=>{const{apiEndpoint:l,userSession:u,locale:f,loadLevels:c,onLevelLoaded:h}=e();if(!(!l||!u)){I(s,!0),I(a,void 0);try{const d=[io({apiEndpoint:l,userSession:u,locale:f}).then(_=>{oo(_.level?.loyaltyPoints);const g=_.level;g.name=g.presentation?.displayName||g.name,g.spendablePoints=_.spendableWallet?.total.points||0,I(t,g,!0),I(n,_.loyaltyWallet?.total,!0),I(i,_.spendableWallet?.total,!0),h?.({elevateLevel:g}),h?.({elevateLevelWalletTotal:_.spendableWallet?.total,loyaltyWalletTotal:_.loyaltyWallet?.total})})];c&&d.push(so({apiEndpoint:l,userSession:u,locale:f}).then(_=>{I(r,_,!0)})),await Promise.all(d),await Oa(),v(r)&&v(t)&&h?.({calculatedLevelFlag:ao(v(r),v(t).loyaltyPoints??0)})}catch(d){I(a,d,!0),console.error("Failed to load elevate info:",d)}finally{I(s,!1)}}};return Te(()=>{const{apiEndpoint:l,userSession:u,locale:f,loadLevels:c}=e();o()}),Te(()=>{const l=()=>{o()};return window.addEventListener("redeemRewardButton",l),()=>window.removeEventListener("redeemRewardButton",l)}),{get playerElevateLevel(){return v(t)},get levels(){return v(r)},get loyaltyWalletTotal(){return v(n)},get spendableWalletTotal(){return v(i)},get loading(){return v(s)},get error(){return v(a)},reload:o}};function uo(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var fo=function(t){return ho(t)&&!co(t)};function ho(e){return!!e&&typeof e=="object"}function co(e){var t=Object.prototype.toString.call(e);return t==="[object RegExp]"||t==="[object Date]"||_o(e)}var vo=typeof Symbol=="function"&&Symbol.for,po=vo?Symbol.for("react.element"):60103;function _o(e){return e.$$typeof===po}function mo(e){return Array.isArray(e)?[]:{}}function Wt(e,t){return t.clone!==!1&&t.isMergeableObject(e)?Lt(mo(e),e,t):e}function go(e,t,r){return e.concat(t).map(function(n){return Wt(n,r)})}function bo(e,t){if(!t.customMerge)return Lt;var r=t.customMerge(e);return typeof r=="function"?r:Lt}function yo(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[]}function Dn(e){return Object.keys(e).concat(yo(e))}function rs(e,t){try{return t in e}catch{return!1}}function Eo(e,t){return rs(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))}function xo(e,t,r){var n={};return r.isMergeableObject(e)&&Dn(e).forEach(function(i){n[i]=Wt(e[i],r)}),Dn(t).forEach(function(i){Eo(e,i)||(rs(e,i)&&r.isMergeableObject(t[i])?n[i]=bo(i,r)(e[i],t[i],r):n[i]=Wt(t[i],r))}),n}function Lt(e,t,r){r=r||{},r.arrayMerge=r.arrayMerge||go,r.isMergeableObject=r.isMergeableObject||fo,r.cloneUnlessOtherwiseSpecified=Wt;var n=Array.isArray(t),i=Array.isArray(e),s=n===i;return s?n?r.arrayMerge(e,t,r):xo(e,t,r):Wt(t,r)}Lt.all=function(t,r){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce(function(n,i){return Lt(n,i,r)},{})};var wo=Lt,To=wo;const So=uo(To);var rn=function(e,t){return rn=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},rn(e,t)};function Br(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");rn(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var Se=function(){return Se=Object.assign||function(t){for(var r,n=1,i=arguments.length;n<i;n++){r=arguments[n];for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&(t[s]=r[s])}return t},Se.apply(this,arguments)};function Ao(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r}function Gr(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,s;n<i;n++)(s||!(n in t))&&(s||(s=Array.prototype.slice.call(t,0,n)),s[n]=t[n]);return e.concat(s||Array.prototype.slice.call(t))}function kr(e,t){var r=t&&t.cache?t.cache:Oo,n=t&&t.serializer?t.serializer:Io,i=t&&t.strategy?t.strategy:Po;return i(e,{cache:r,serializer:n})}function Ho(e){return e==null||typeof e=="number"||typeof e=="boolean"}function Lo(e,t,r,n){var i=Ho(n)?n:r(n),s=t.get(i);return typeof s>"u"&&(s=e.call(this,n),t.set(i,s)),s}function ns(e,t,r){var n=Array.prototype.slice.call(arguments,3),i=r(n),s=t.get(i);return typeof s>"u"&&(s=e.apply(this,n),t.set(i,s)),s}function is(e,t,r,n,i){return r.bind(t,e,n,i)}function Po(e,t){var r=e.length===1?Lo:ns;return is(e,this,r,t.cache.create(),t.serializer)}function No(e,t){return is(e,this,ns,t.cache.create(),t.serializer)}var Io=function(){return JSON.stringify(arguments)},Bo=function(){function e(){this.cache=Object.create(null)}return e.prototype.get=function(t){return this.cache[t]},e.prototype.set=function(t,r){this.cache[t]=r},e}(),Oo={create:function(){return new Bo}},jr={variadic:No},br=function(){return br=Object.assign||function(t){for(var r,n=1,i=arguments.length;n<i;n++){r=arguments[n];for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&(t[s]=r[s])}return t},br.apply(this,arguments)};var w;(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"})(w||(w={}));var $;(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"})($||($={}));var Pt;(function(e){e[e.number=0]="number",e[e.dateTime=1]="dateTime"})(Pt||(Pt={}));function Un(e){return e.type===$.literal}function Mo(e){return e.type===$.argument}function ss(e){return e.type===$.number}function as(e){return e.type===$.date}function os(e){return e.type===$.time}function ls(e){return e.type===$.select}function us(e){return e.type===$.plural}function Co(e){return e.type===$.pound}function fs(e){return e.type===$.tag}function hs(e){return!!(e&&typeof e=="object"&&e.type===Pt.number)}function nn(e){return!!(e&&typeof e=="object"&&e.type===Pt.dateTime)}var cs=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/,Ro=/(?:[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 $o(e){var t={};return e.replace(Ro,function(r){var n=r.length;switch(r[0]){case"G":t.era=n===4?"long":n===5?"narrow":"short";break;case"y":t.year=n===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"][n-1];break;case"w":case"W":throw new RangeError("`w/W` (week) patterns are not supported");case"d":t.day=["numeric","2-digit"][n-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=n===4?"long":n===5?"narrow":"short";break;case"e":if(n<4)throw new RangeError("`e..eee` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][n-4];break;case"c":if(n<4)throw new RangeError("`c..ccc` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][n-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"][n-1];break;case"H":t.hourCycle="h23",t.hour=["numeric","2-digit"][n-1];break;case"K":t.hourCycle="h11",t.hour=["numeric","2-digit"][n-1];break;case"k":t.hourCycle="h24",t.hour=["numeric","2-digit"][n-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"][n-1];break;case"s":t.second=["numeric","2-digit"][n-1];break;case"S":case"A":throw new RangeError("`S/A` (second) patterns are not supported, use `s` instead");case"z":t.timeZoneName=n<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 U=function(){return U=Object.assign||function(t){for(var r,n=1,i=arguments.length;n<i;n++){r=arguments[n];for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&(t[s]=r[s])}return t},U.apply(this,arguments)};var Do=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i;function Uo(e){if(e.length===0)throw new Error("Number skeleton cannot be empty");for(var t=e.split(Do).filter(function(h){return h.length>0}),r=[],n=0,i=t;n<i.length;n++){var s=i[n],a=s.split("/");if(a.length===0)throw new Error("Invalid number skeleton");for(var o=a[0],l=a.slice(1),u=0,f=l;u<f.length;u++){var c=f[u];if(c.length===0)throw new Error("Invalid number skeleton")}r.push({stem:o,options:l})}return r}function Fo(e){return e.replace(/^(.*?)-/,"")}var Fn=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,ds=/^(@+)?(\+|#+)?[rs]?$/g,Go=/(\*)(0+)|(#+)(0+)|(0+)/g,vs=/^(0+)$/;function Gn(e){var t={};return e[e.length-1]==="r"?t.roundingPriority="morePrecision":e[e.length-1]==="s"&&(t.roundingPriority="lessPrecision"),e.replace(ds,function(r,n,i){return typeof i!="string"?(t.minimumSignificantDigits=n.length,t.maximumSignificantDigits=n.length):i==="+"?t.minimumSignificantDigits=n.length:n[0]==="#"?t.maximumSignificantDigits=n.length:(t.minimumSignificantDigits=n.length,t.maximumSignificantDigits=n.length+(typeof i=="string"?i.length:0)),""}),t}function ps(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 ko(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 r=e.slice(0,2);if(r==="+!"?(t.signDisplay="always",e=e.slice(2)):r==="+?"&&(t.signDisplay="exceptZero",e=e.slice(2)),!vs.test(e))throw new Error("Malformed concise eng/scientific notation");t.minimumIntegerDigits=e.length}return t}function kn(e){var t={},r=ps(e);return r||t}function jo(e){for(var t={},r=0,n=e;r<n.length;r++){var i=n[r];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=Fo(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=U(U(U({},t),{notation:"scientific"}),i.options.reduce(function(l,u){return U(U({},l),kn(u))},{}));continue;case"engineering":t=U(U(U({},t),{notation:"engineering"}),i.options.reduce(function(l,u){return U(U({},l),kn(u))},{}));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(Go,function(l,u,f,c,h,d){if(u)t.minimumIntegerDigits=f.length;else{if(c&&h)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(vs.test(i.stem)){t.minimumIntegerDigits=i.stem.length;continue}if(Fn.test(i.stem)){if(i.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");i.stem.replace(Fn,function(l,u,f,c,h,d){return f==="*"?t.minimumFractionDigits=u.length:c&&c[0]==="#"?t.maximumFractionDigits=c.length:h&&d?(t.minimumFractionDigits=h.length,t.maximumFractionDigits=h.length+d.length):(t.minimumFractionDigits=u.length,t.maximumFractionDigits=u.length),""});var s=i.options[0];s==="w"?t=U(U({},t),{trailingZeroDisplay:"stripIfInteger"}):s&&(t=U(U({},t),Gn(s)));continue}if(ds.test(i.stem)){t=U(U({},t),Gn(i.stem));continue}var a=ps(i.stem);a&&(t=U(U({},t),a));var o=ko(i.stem);o&&(t=U(U({},t),o))}return t}var ur={"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 Vo(e,t){for(var r="",n=0;n<e.length;n++){var i=e.charAt(n);if(i==="j"){for(var s=0;n+1<e.length&&e.charAt(n+1)===i;)s++,n++;var a=1+(s&1),o=s<2?1:3+(s>>1),l="a",u=Xo(t);for((u=="H"||u=="k")&&(o=0);o-- >0;)r+=l;for(;a-- >0;)r=u+r}else i==="J"?r+="H":r+=i}return r}function Xo(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 r=e.language,n;r!=="root"&&(n=e.maximize().region);var i=ur[n||""]||ur[r||""]||ur["".concat(r,"-001")]||ur["001"];return i[0]}var Vr,Wo=new RegExp("^".concat(cs.source,"*")),zo=new RegExp("".concat(cs.source,"*$"));function A(e,t){return{start:e,end:t}}var qo=!!String.prototype.startsWith&&"_a".startsWith("a",1),Zo=!!String.fromCodePoint,Yo=!!Object.fromEntries,Qo=!!String.prototype.codePointAt,Jo=!!String.prototype.trimStart,Ko=!!String.prototype.trimEnd,el=!!Number.isSafeInteger,tl=el?Number.isSafeInteger:function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e&&Math.abs(e)<=9007199254740991},sn=!0;try{var rl=ms("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");sn=((Vr=rl.exec("a"))===null||Vr===void 0?void 0:Vr[0])==="a"}catch{sn=!1}var jn=qo?function(t,r,n){return t.startsWith(r,n)}:function(t,r,n){return t.slice(n,n+r.length)===r},an=Zo?String.fromCodePoint:function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];for(var n="",i=t.length,s=0,a;i>s;){if(a=t[s++],a>1114111)throw RangeError(a+" is not a valid code point");n+=a<65536?String.fromCharCode(a):String.fromCharCode(((a-=65536)>>10)+55296,a%1024+56320)}return n},Vn=Yo?Object.fromEntries:function(t){for(var r={},n=0,i=t;n<i.length;n++){var s=i[n],a=s[0],o=s[1];r[a]=o}return r},_s=Qo?function(t,r){return t.codePointAt(r)}:function(t,r){var n=t.length;if(!(r<0||r>=n)){var i=t.charCodeAt(r),s;return i<55296||i>56319||r+1===n||(s=t.charCodeAt(r+1))<56320||s>57343?i:(i-55296<<10)+(s-56320)+65536}},nl=Jo?function(t){return t.trimStart()}:function(t){return t.replace(Wo,"")},il=Ko?function(t){return t.trimEnd()}:function(t){return t.replace(zo,"")};function ms(e,t){return new RegExp(e,t)}var on;if(sn){var Xn=ms("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");on=function(t,r){var n;Xn.lastIndex=r;var i=Xn.exec(t);return(n=i[1])!==null&&n!==void 0?n:""}}else on=function(t,r){for(var n=[];;){var i=_s(t,r);if(i===void 0||gs(i)||ll(i))break;n.push(i),r+=i>=65536?2:1}return an.apply(void 0,n)};var sl=function(){function e(t,r){r===void 0&&(r={}),this.message=t,this.position={offset:0,line:1,column:1},this.ignoreTag=!!r.ignoreTag,this.locale=r.locale,this.requiresOtherClause=!!r.requiresOtherClause,this.shouldParseSkeletons=!!r.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,r,n){for(var i=[];!this.isEOF();){var s=this.char();if(s===123){var a=this.parseArgument(t,n);if(a.err)return a;i.push(a.val)}else{if(s===125&&t>0)break;if(s===35&&(r==="plural"||r==="selectordinal")){var o=this.clonePosition();this.bump(),i.push({type:$.pound,location:A(o,this.clonePosition())})}else if(s===60&&!this.ignoreTag&&this.peek()===47){if(n)break;return this.error(w.UNMATCHED_CLOSING_TAG,A(this.clonePosition(),this.clonePosition()))}else if(s===60&&!this.ignoreTag&&ln(this.peek()||0)){var a=this.parseTag(t,r);if(a.err)return a;i.push(a.val)}else{var a=this.parseLiteral(t,r);if(a.err)return a;i.push(a.val)}}}return{val:i,err:null}},e.prototype.parseTag=function(t,r){var n=this.clonePosition();this.bump();var i=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))return{val:{type:$.literal,value:"<".concat(i,"/>"),location:A(n,this.clonePosition())},err:null};if(this.bumpIf(">")){var s=this.parseMessage(t+1,r,!0);if(s.err)return s;var a=s.val,o=this.clonePosition();if(this.bumpIf("</")){if(this.isEOF()||!ln(this.char()))return this.error(w.INVALID_TAG,A(o,this.clonePosition()));var l=this.clonePosition(),u=this.parseTagName();return i!==u?this.error(w.UNMATCHED_CLOSING_TAG,A(l,this.clonePosition())):(this.bumpSpace(),this.bumpIf(">")?{val:{type:$.tag,value:i,children:a,location:A(n,this.clonePosition())},err:null}:this.error(w.INVALID_TAG,A(o,this.clonePosition())))}else return this.error(w.UNCLOSED_TAG,A(n,this.clonePosition()))}else return this.error(w.INVALID_TAG,A(n,this.clonePosition()))},e.prototype.parseTagName=function(){var t=this.offset();for(this.bump();!this.isEOF()&&ol(this.char());)this.bump();return this.message.slice(t,this.offset())},e.prototype.parseLiteral=function(t,r){for(var n=this.clonePosition(),i="";;){var s=this.tryParseQuote(r);if(s){i+=s;continue}var a=this.tryParseUnquoted(t,r);if(a){i+=a;continue}var o=this.tryParseLeftAngleBracket();if(o){i+=o;continue}break}var l=A(n,this.clonePosition());return{val:{type:$.literal,value:i,location:l},err:null}},e.prototype.tryParseLeftAngleBracket=function(){return!this.isEOF()&&this.char()===60&&(this.ignoreTag||!al(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 r=[this.char()];for(this.bump();!this.isEOF();){var n=this.char();if(n===39)if(this.peek()===39)r.push(39),this.bump();else{this.bump();break}else r.push(n);this.bump()}return an.apply(void 0,r)},e.prototype.tryParseUnquoted=function(t,r){if(this.isEOF())return null;var n=this.char();return n===60||n===123||n===35&&(r==="plural"||r==="selectordinal")||n===125&&t>0?null:(this.bump(),an(n))},e.prototype.parseArgument=function(t,r){var n=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(w.EXPECT_ARGUMENT_CLOSING_BRACE,A(n,this.clonePosition()));if(this.char()===125)return this.bump(),this.error(w.EMPTY_ARGUMENT,A(n,this.clonePosition()));var i=this.parseIdentifierIfPossible().value;if(!i)return this.error(w.MALFORMED_ARGUMENT,A(n,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(w.EXPECT_ARGUMENT_CLOSING_BRACE,A(n,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:$.argument,value:i,location:A(n,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(w.EXPECT_ARGUMENT_CLOSING_BRACE,A(n,this.clonePosition())):this.parseArgumentOptions(t,r,i,n);default:return this.error(w.MALFORMED_ARGUMENT,A(n,this.clonePosition()))}},e.prototype.parseIdentifierIfPossible=function(){var t=this.clonePosition(),r=this.offset(),n=on(this.message,r),i=r+n.length;this.bumpTo(i);var s=this.clonePosition(),a=A(t,s);return{value:n,location:a}},e.prototype.parseArgumentOptions=function(t,r,n,i){var s,a=this.clonePosition(),o=this.parseIdentifierIfPossible().value,l=this.clonePosition();switch(o){case"":return this.error(w.EXPECT_ARGUMENT_TYPE,A(a,l));case"number":case"date":case"time":{this.bumpSpace();var u=null;if(this.bumpIf(",")){this.bumpSpace();var f=this.clonePosition(),c=this.parseSimpleArgStyleIfPossible();if(c.err)return c;var h=il(c.val);if(h.length===0)return this.error(w.EXPECT_ARGUMENT_STYLE,A(this.clonePosition(),this.clonePosition()));var d=A(f,this.clonePosition());u={style:h,styleLocation:d}}var _=this.tryParseArgumentClose(i);if(_.err)return _;var g=A(i,this.clonePosition());if(u&&jn(u?.style,"::",0)){var p=nl(u.style.slice(2));if(o==="number"){var c=this.parseNumberSkeletonFromString(p,u.styleLocation);return c.err?c:{val:{type:$.number,value:n,location:g,style:c.val},err:null}}else{if(p.length===0)return this.error(w.EXPECT_DATE_TIME_SKELETON,g);var b=p;this.locale&&(b=Vo(p,this.locale));var h={type:Pt.dateTime,pattern:b,location:u.styleLocation,parsedOptions:this.shouldParseSkeletons?$o(b):{}},y=o==="date"?$.date:$.time;return{val:{type:y,value:n,location:g,style:h},err:null}}}return{val:{type:o==="number"?$.number:o==="date"?$.date:$.time,value:n,location:g,style:(s=u?.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(w.EXPECT_SELECT_ARGUMENT_OPTIONS,A(N,br({},N)));this.bumpSpace();var O=this.parseIdentifierIfPossible(),E=0;if(o!=="select"&&O.value==="offset"){if(!this.bumpIf(":"))return this.error(w.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,A(this.clonePosition(),this.clonePosition()));this.bumpSpace();var c=this.tryParseDecimalInteger(w.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,w.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);if(c.err)return c;this.bumpSpace(),O=this.parseIdentifierIfPossible(),E=c.val}var x=this.tryParsePluralOrSelectOptions(t,o,r,O);if(x.err)return x;var _=this.tryParseArgumentClose(i);if(_.err)return _;var B=A(i,this.clonePosition());return o==="select"?{val:{type:$.select,value:n,options:Vn(x.val),location:B},err:null}:{val:{type:$.plural,value:n,options:Vn(x.val),offset:E,pluralType:o==="plural"?"cardinal":"ordinal",location:B},err:null}}default:return this.error(w.INVALID_ARGUMENT_TYPE,A(a,l))}},e.prototype.tryParseArgumentClose=function(t){return this.isEOF()||this.char()!==125?this.error(w.EXPECT_ARGUMENT_CLOSING_BRACE,A(t,this.clonePosition())):(this.bump(),{val:!0,err:null})},e.prototype.parseSimpleArgStyleIfPossible=function(){for(var t=0,r=this.clonePosition();!this.isEOF();){var n=this.char();switch(n){case 39:{this.bump();var i=this.clonePosition();if(!this.bumpUntil("'"))return this.error(w.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,A(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(r.offset,this.offset()),err:null};break}default:this.bump();break}}return{val:this.message.slice(r.offset,this.offset()),err:null}},e.prototype.parseNumberSkeletonFromString=function(t,r){var n=[];try{n=Uo(t)}catch{return this.error(w.INVALID_NUMBER_SKELETON,r)}return{val:{type:Pt.number,tokens:n,location:r,parsedOptions:this.shouldParseSkeletons?jo(n):{}},err:null}},e.prototype.tryParsePluralOrSelectOptions=function(t,r,n,i){for(var s,a=!1,o=[],l=new Set,u=i.value,f=i.location;;){if(u.length===0){var c=this.clonePosition();if(r!=="select"&&this.bumpIf("=")){var h=this.tryParseDecimalInteger(w.EXPECT_PLURAL_ARGUMENT_SELECTOR,w.INVALID_PLURAL_ARGUMENT_SELECTOR);if(h.err)return h;f=A(c,this.clonePosition()),u=this.message.slice(c.offset,this.offset())}else break}if(l.has(u))return this.error(r==="select"?w.DUPLICATE_SELECT_ARGUMENT_SELECTOR:w.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,f);u==="other"&&(a=!0),this.bumpSpace();var d=this.clonePosition();if(!this.bumpIf("{"))return this.error(r==="select"?w.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:w.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,A(this.clonePosition(),this.clonePosition()));var _=this.parseMessage(t+1,r,n);if(_.err)return _;var g=this.tryParseArgumentClose(d);if(g.err)return g;o.push([u,{value:_.val,location:A(d,this.clonePosition())}]),l.add(u),this.bumpSpace(),s=this.parseIdentifierIfPossible(),u=s.value,f=s.location}return o.length===0?this.error(r==="select"?w.EXPECT_SELECT_ARGUMENT_SELECTOR:w.EXPECT_PLURAL_ARGUMENT_SELECTOR,A(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!a?this.error(w.MISSING_OTHER_CLAUSE,A(this.clonePosition(),this.clonePosition())):{val:o,err:null}},e.prototype.tryParseDecimalInteger=function(t,r){var n=1,i=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(n=-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 l=A(i,this.clonePosition());return s?(a*=n,tl(a)?{val:a,err:null}:this.error(r,l)):this.error(t,l)},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 r=_s(this.message,t);if(r===void 0)throw Error("Offset ".concat(t," is at invalid UTF-16 code unit boundary"));return r},e.prototype.error=function(t,r){return{val:null,err:{kind:t,message:this.message,location:r}}},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(jn(this.message,t,this.offset())){for(var r=0;r<t.length;r++)this.bump();return!0}return!1},e.prototype.bumpUntil=function(t){var r=this.offset(),n=this.message.indexOf(t,r);return n>=0?(this.bumpTo(n),!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 r=this.offset();if(r===t)break;if(r>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()&&gs(this.char());)this.bump()},e.prototype.peek=function(){if(this.isEOF())return null;var t=this.char(),r=this.offset(),n=this.message.charCodeAt(r+(t>=65536?2:1));return n??null},e}();function ln(e){return e>=97&&e<=122||e>=65&&e<=90}function al(e){return ln(e)||e===47}function ol(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 gs(e){return e>=9&&e<=13||e===32||e===133||e>=8206&&e<=8207||e===8232||e===8233}function ll(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 un(e){e.forEach(function(t){if(delete t.location,ls(t)||us(t))for(var r in t.options)delete t.options[r].location,un(t.options[r].value);else ss(t)&&hs(t.style)||(as(t)||os(t))&&nn(t.style)?delete t.style.location:fs(t)&&un(t.children)})}function ul(e,t){t===void 0&&(t={}),t=br({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var r=new sl(e,t).parse();if(r.err){var n=SyntaxError(w[r.err.kind]);throw n.location=r.err.location,n.originalMessage=r.err.message,n}return t?.captureLocation||un(r.val),r.val}var Nt;(function(e){e.MISSING_VALUE="MISSING_VALUE",e.INVALID_VALUE="INVALID_VALUE",e.MISSING_INTL_API="MISSING_INTL_API"})(Nt||(Nt={}));var Or=function(e){Br(t,e);function t(r,n,i){var s=e.call(this,r)||this;return s.code=n,s.originalMessage=i,s}return t.prototype.toString=function(){return"[formatjs Error: ".concat(this.code,"] ").concat(this.message)},t}(Error),Wn=function(e){Br(t,e);function t(r,n,i,s){return e.call(this,'Invalid values for "'.concat(r,'": "').concat(n,'". Options are "').concat(Object.keys(i).join('", "'),'"'),Nt.INVALID_VALUE,s)||this}return t}(Or),fl=function(e){Br(t,e);function t(r,n,i){return e.call(this,'Value for "'.concat(r,'" must be of type ').concat(n),Nt.INVALID_VALUE,i)||this}return t}(Or),hl=function(e){Br(t,e);function t(r,n){return e.call(this,'The intl string context variable "'.concat(r,'" was not provided to the string "').concat(n,'"'),Nt.MISSING_VALUE,n)||this}return t}(Or),Y;(function(e){e[e.literal=0]="literal",e[e.object=1]="object"})(Y||(Y={}));function cl(e){return e.length<2?e:e.reduce(function(t,r){var n=t[t.length-1];return!n||n.type!==Y.literal||r.type!==Y.literal?t.push(r):n.value+=r.value,t},[])}function dl(e){return typeof e=="function"}function hr(e,t,r,n,i,s,a){if(e.length===1&&Un(e[0]))return[{type:Y.literal,value:e[0].value}];for(var o=[],l=0,u=e;l<u.length;l++){var f=u[l];if(Un(f)){o.push({type:Y.literal,value:f.value});continue}if(Co(f)){typeof s=="number"&&o.push({type:Y.literal,value:r.getNumberFormat(t).format(s)});continue}var c=f.value;if(!(i&&c in i))throw new hl(c,a);var h=i[c];if(Mo(f)){(!h||typeof h=="string"||typeof h=="number")&&(h=typeof h=="string"||typeof h=="number"?String(h):""),o.push({type:typeof h=="string"?Y.literal:Y.object,value:h});continue}if(as(f)){var d=typeof f.style=="string"?n.date[f.style]:nn(f.style)?f.style.parsedOptions:void 0;o.push({type:Y.literal,value:r.getDateTimeFormat(t,d).format(h)});continue}if(os(f)){var d=typeof f.style=="string"?n.time[f.style]:nn(f.style)?f.style.parsedOptions:n.time.medium;o.push({type:Y.literal,value:r.getDateTimeFormat(t,d).format(h)});continue}if(ss(f)){var d=typeof f.style=="string"?n.number[f.style]:hs(f.style)?f.style.parsedOptions:void 0;d&&d.scale&&(h=h*(d.scale||1)),o.push({type:Y.literal,value:r.getNumberFormat(t,d).format(h)});continue}if(fs(f)){var _=f.children,g=f.value,p=i[g];if(!dl(p))throw new fl(g,"function",a);var b=hr(_,t,r,n,i,s),y=p(b.map(function(E){return E.value}));Array.isArray(y)||(y=[y]),o.push.apply(o,y.map(function(E){return{type:typeof E=="string"?Y.literal:Y.object,value:E}}))}if(ls(f)){var N=f.options[h]||f.options.other;if(!N)throw new Wn(f.value,h,Object.keys(f.options),a);o.push.apply(o,hr(N.value,t,r,n,i));continue}if(us(f)){var N=f.options["=".concat(h)];if(!N){if(!Intl.PluralRules)throw new Or(`Intl.PluralRules is not available in this environment.
|
|
4
|
+
Try polyfilling it using "@formatjs/intl-pluralrules"
|
|
5
|
+
`,Nt.MISSING_INTL_API,a);var O=r.getPluralRules(t,{type:f.pluralType}).select(h-(f.offset||0));N=f.options[O]||f.options.other}if(!N)throw new Wn(f.value,h,Object.keys(f.options),a);o.push.apply(o,hr(N.value,t,r,n,i,h-(f.offset||0)));continue}}return cl(o)}function vl(e,t){return t?Se(Se(Se({},e||{}),t||{}),Object.keys(e).reduce(function(r,n){return r[n]=Se(Se({},e[n]),t[n]||{}),r},{})):e}function pl(e,t){return t?Object.keys(e).reduce(function(r,n){return r[n]=vl(e[n],t[n]),r},Se({},e)):e}function Xr(e){return{create:function(){return{get:function(t){return e[t]},set:function(t,r){e[t]=r}}}}}function _l(e){return e===void 0&&(e={number:{},dateTime:{},pluralRules:{}}),{getNumberFormat:kr(function(){for(var t,r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return new((t=Intl.NumberFormat).bind.apply(t,Gr([void 0],r,!1)))},{cache:Xr(e.number),strategy:jr.variadic}),getDateTimeFormat:kr(function(){for(var t,r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return new((t=Intl.DateTimeFormat).bind.apply(t,Gr([void 0],r,!1)))},{cache:Xr(e.dateTime),strategy:jr.variadic}),getPluralRules:kr(function(){for(var t,r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return new((t=Intl.PluralRules).bind.apply(t,Gr([void 0],r,!1)))},{cache:Xr(e.pluralRules),strategy:jr.variadic})}}var ml=function(){function e(t,r,n,i){r===void 0&&(r=e.defaultLocale);var s=this;if(this.formatterCache={number:{},dateTime:{},pluralRules:{}},this.format=function(l){var u=s.formatToParts(l);if(u.length===1)return u[0].value;var f=u.reduce(function(c,h){return!c.length||h.type!==Y.literal||typeof c[c.length-1]!="string"?c.push(h.value):c[c.length-1]+=h.value,c},[]);return f.length<=1?f[0]||"":f},this.formatToParts=function(l){return hr(s.ast,s.locales,s.formatters,s.formats,l,void 0,s.message)},this.resolvedOptions=function(){var l;return{locale:((l=s.resolvedLocale)===null||l===void 0?void 0:l.toString())||Intl.NumberFormat.supportedLocalesOf(s.locales)[0]}},this.getAst=function(){return s.ast},this.locales=r,this.resolvedLocale=e.resolveLocale(r),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=Ao(a,["formatters"]);this.ast=e.__parse(t,Se(Se({},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=pl(e.formats,n),this.formatters=i&&i.formatters||_l(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 r=Intl.NumberFormat.supportedLocalesOf(t);return r.length>0?new Intl.Locale(r[0]):new Intl.Locale(typeof t=="string"?t:t[0])}},e.__parse=ul,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 gl(e,t){if(t==null)return;if(t in e)return e[t];const r=t.split(".");let n=e;for(let i=0;i<r.length;i++)if(typeof n=="object"){if(i>0){const s=r.slice(i,r.length).join(".");if(s in n){n=n[s];break}}n=n[r[i]]}else n=void 0;return n}const Xe={},bl=(e,t,r)=>r&&(t in Xe||(Xe[t]={}),e in Xe[t]||(Xe[t][e]=r),r),bs=(e,t)=>{if(t==null)return;if(t in Xe&&e in Xe[t])return Xe[t][e];const r=Mr(t);for(let n=0;n<r.length;n++){const i=r[n],s=El(i,e);if(s)return bl(e,t,s)}};let Tn;const Ot=Ir({});function yl(e){return Tn[e]||null}function ys(e){return e in Tn}function El(e,t){if(!ys(e))return null;const r=yl(e);return gl(r,t)}function xl(e){if(e==null)return;const t=Mr(e);for(let r=0;r<t.length;r++){const n=t[r];if(ys(n))return n}}function Es(e,...t){delete Xe[e],Ot.update(r=>(r[e]=So.all([r[e]||{},...t]),r))}Bt([Ot],([e])=>Object.keys(e));Ot.subscribe(e=>Tn=e);const cr={};function wl(e,t){cr[e].delete(t),cr[e].size===0&&delete cr[e]}function xs(e){return cr[e]}function Tl(e){return Mr(e).map(t=>{const r=xs(t);return[t,r?[...r]:[]]}).filter(([,t])=>t.length>0)}function fn(e){return e==null?!1:Mr(e).some(t=>{var r;return(r=xs(t))==null?void 0:r.size})}function Sl(e,t){return Promise.all(t.map(n=>(wl(e,n),n().then(i=>i.default||i)))).then(n=>Es(e,...n))}const Ut={};function ws(e){if(!fn(e))return e in Ut?Ut[e]:Promise.resolve();const t=Tl(e);return Ut[e]=Promise.all(t.map(([r,n])=>Sl(r,n))).then(()=>{if(fn(e))return ws(e);delete Ut[e]}),Ut[e]}const Al={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"}}},Hl={fallbackLocale:null,loadingDelay:200,formats:Al,warnOnMissingMessages:!0,handleMissingMessage:void 0,ignoreTag:!0},Ll=Hl;function It(){return Ll}const Wr=Ir(!1);var Pl=Object.defineProperty,Nl=Object.defineProperties,Il=Object.getOwnPropertyDescriptors,zn=Object.getOwnPropertySymbols,Bl=Object.prototype.hasOwnProperty,Ol=Object.prototype.propertyIsEnumerable,qn=(e,t,r)=>t in e?Pl(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Ml=(e,t)=>{for(var r in t||(t={}))Bl.call(t,r)&&qn(e,r,t[r]);if(zn)for(var r of zn(t))Ol.call(t,r)&&qn(e,r,t[r]);return e},Cl=(e,t)=>Nl(e,Il(t));let hn;const yr=Ir(null);function Zn(e){return e.split("-").map((t,r,n)=>n.slice(0,r+1).join("-")).reverse()}function Mr(e,t=It().fallbackLocale){const r=Zn(e);return t?[...new Set([...r,...Zn(t)])]:r}function pt(){return hn??void 0}yr.subscribe(e=>{hn=e??void 0,typeof window<"u"&&e!=null&&document.documentElement.setAttribute("lang",e)});const Rl=e=>{if(e&&xl(e)&&fn(e)){const{loadingDelay:t}=It();let r;return typeof window<"u"&&pt()!=null&&t?r=window.setTimeout(()=>Wr.set(!0),t):Wr.set(!0),ws(e).then(()=>{yr.set(e)}).finally(()=>{clearTimeout(r),Wr.set(!1)})}return yr.set(e)},Qe=Cl(Ml({},yr),{set:Rl}),Cr=e=>{const t=Object.create(null);return n=>{const i=JSON.stringify(n);return i in t?t[i]:t[i]=e(n)}};var $l=Object.defineProperty,Er=Object.getOwnPropertySymbols,Ts=Object.prototype.hasOwnProperty,Ss=Object.prototype.propertyIsEnumerable,Yn=(e,t,r)=>t in e?$l(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Sn=(e,t)=>{for(var r in t||(t={}))Ts.call(t,r)&&Yn(e,r,t[r]);if(Er)for(var r of Er(t))Ss.call(t,r)&&Yn(e,r,t[r]);return e},Mt=(e,t)=>{var r={};for(var n in e)Ts.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Er)for(var n of Er(e))t.indexOf(n)<0&&Ss.call(e,n)&&(r[n]=e[n]);return r};const zt=(e,t)=>{const{formats:r}=It();if(e in r&&t in r[e])return r[e][t];throw new Error(`[svelte-i18n] Unknown "${t}" ${e} format.`)},Dl=Cr(e=>{var t=e,{locale:r,format:n}=t,i=Mt(t,["locale","format"]);if(r==null)throw new Error('[svelte-i18n] A "locale" must be set to format numbers');return n&&(i=zt("number",n)),new Intl.NumberFormat(r,i)}),Ul=Cr(e=>{var t=e,{locale:r,format:n}=t,i=Mt(t,["locale","format"]);if(r==null)throw new Error('[svelte-i18n] A "locale" must be set to format dates');return n?i=zt("date",n):Object.keys(i).length===0&&(i=zt("date","short")),new Intl.DateTimeFormat(r,i)}),Fl=Cr(e=>{var t=e,{locale:r,format:n}=t,i=Mt(t,["locale","format"]);if(r==null)throw new Error('[svelte-i18n] A "locale" must be set to format time values');return n?i=zt("time",n):Object.keys(i).length===0&&(i=zt("time","short")),new Intl.DateTimeFormat(r,i)}),Gl=(e={})=>{var t=e,{locale:r=pt()}=t,n=Mt(t,["locale"]);return Dl(Sn({locale:r},n))},kl=(e={})=>{var t=e,{locale:r=pt()}=t,n=Mt(t,["locale"]);return Ul(Sn({locale:r},n))},jl=(e={})=>{var t=e,{locale:r=pt()}=t,n=Mt(t,["locale"]);return Fl(Sn({locale:r},n))},Vl=Cr((e,t=pt())=>new ml(e,t,It().formats,{ignoreTag:It().ignoreTag})),Xl=(e,t={})=>{var r,n,i,s;let a=t;typeof e=="object"&&(a=e,e=a.id);const{values:o,locale:l=pt(),default:u}=a;if(l==null)throw new Error("[svelte-i18n] Cannot format a message without first setting the initial locale.");let f=bs(e,l);if(!f)f=(s=(i=(n=(r=It()).handleMissingMessage)==null?void 0:n.call(r,{locale:l,id:e,defaultValue:u}))!=null?i:u)!=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 c=f;try{c=Vl(f,l).format(o)}catch(h){h instanceof Error&&console.warn(`[svelte-i18n] Message "${e}" has syntax error:`,h.message)}return c},Wl=(e,t)=>jl(t).format(e),zl=(e,t)=>kl(t).format(e),ql=(e,t)=>Gl(t).format(e),Zl=(e,t=pt())=>bs(e,t),As=Bt([Qe,Ot],()=>Xl);Bt([Qe],()=>Wl);Bt([Qe],()=>zl);Bt([Qe],()=>ql);Bt([Qe,Ot],()=>Zl);function Hs({withLocale:e,translations:t}){Qe.subscribe(r=>{r==null&&(Ot.set(t),Qe.set(e))})}function Ls(e,t){Es(e,t)}function Ps(e){Qe.set(e)}const Yl={en:{prev:"Previous",next:"Next"},tr:{prev:"Önceki",next:"Sonraki"}},Ql=10,Jl=7,Kl=4;var eu=ne('<span class="loyalty-pagination__ellipsis svelte-10d3cwj" aria-hidden="true">...</span>'),tu=ne('<button type="button"> </button>'),ru=ne('<div class="loyalty-pagination__pages svelte-10d3cwj"><button class="loyalty-pagination__btn loyalty-pagination__btn--prev svelte-10d3cwj" type="button"> </button> <!> <button class="loyalty-pagination__btn loyalty-pagination__btn--next svelte-10d3cwj" type="button"> </button></div>'),nu=ne('<div class="loyalty-pagination svelte-10d3cwj"><!></div>');function iu(e,t){Ar(t,!0);const r=()=>Ki(As,"$_",n),[n,i]=es(),s=Q(t,"offset",3,0),a=Q(t,"limit",3,Ql),o=Q(t,"total",3,0),l=Q(t,"onPageChange",3,E=>{}),u=Q(t,"locale",3,"en");Hs({withLocale:u(),translations:{}}),Object.entries(Yl).forEach(([E,x])=>{Ls(E,x)}),Te(()=>{Ps(u()??"en")});const f=xe(()=>Math.max(1,Math.ceil(o()/Math.max(1,a())))),c=xe(()=>a()>0?Math.floor(s()/a()):0);let h=F(!1);Te(()=>{const E=window.matchMedia("(max-width: 767px)"),x=B=>{I(h,B.matches,!0)};return I(h,E.matches,!0),E.addEventListener("change",x),()=>E.removeEventListener("change",x)});const d=(E,x,B)=>E<=(B?Kl:Jl)?Array.from({length:E},(ke,Le)=>Le):x<=1||x>=E-2?[0,1,"ellipsis",E-2,E-1]:[0,"ellipsis",x,"ellipsis",E-1],_=xe(()=>d(v(f),v(c),v(h))),g=E=>l()(E*a()),p=()=>l()(Math.max(0,v(c)-1)*a()),b=()=>l()(Math.min(v(f)-1,v(c)+1)*a());var y=nu(),N=C(y);{var O=E=>{var x=ru(),B=C(x);B.__click=p;var oe=C(B,!0);M(B);var le=Z(B,2);Qi(le,17,()=>v(_),Fa,(Le,je)=>{var Qt=Ma(),Jt=Ai(Qt);{var Ct=Pe=>{var Ne=eu();X(Pe,Ne)},Rt=Pe=>{var Ne=tu();let Kt;Ne.__click=()=>g(v(je));var Rr=C(Ne,!0);M(Ne),Oe(()=>{Kt=Ji(Ne,1,"loyalty-pagination__btn svelte-10d3cwj",null,Kt,{"loyalty-pagination__btn--active":v(je)===v(c)}),we(Rr,v(je)+1)}),X(Pe,Ne)};_e(Jt,Pe=>{v(je)==="ellipsis"?Pe(Ct):Pe(Rt,!1)})}X(Le,Qt)});var R=Z(le,2);R.__click=b;var ke=C(R,!0);M(R),M(x),Oe((Le,je)=>{B.disabled=v(c)<=0,we(oe,Le),R.disabled=v(c)>=v(f)-1,we(ke,je)},[()=>r()("prev"),()=>r()("next")]),X(E,x)};_e(N,E=>{v(f)>1&&E(O)})}M(y),X(e,y),Hr(),i()}zi(["click"]);const su={en:{startingLevel:"Starting Level: {points} points",seeMore:"See More",seeLess:"See Less",current:"Current",next:"Next"},tr:{startingLevel:"Başlangıç Seviyesi: {points} puan",seeMore:"Daha Fazla",seeLess:"Daha Az",current:"Mevcut",next:"Sonraki"}},Ie=12;var au=ne('<img class="loyalty-level__badge svelte-acx6c7"/>'),ou=ne('<span class="loyalty-level__tag svelte-acx6c7"> </span>'),lu=ne('<div class="loyalty-level__benefits svelte-acx6c7"><!></div>'),uu=ne('<article><header class="loyalty-level__head svelte-acx6c7"><!> <div class="loyalty-level__headings svelte-acx6c7"><div class="loyalty-level__title-row svelte-acx6c7"><span class="loyalty-level__name svelte-acx6c7"> </span> <!></div> <span class="loyalty-level__starting svelte-acx6c7"> </span></div></header> <!> <button class="loyalty-level__action svelte-acx6c7" type="button"> </button></article>'),fu=ne('<div class="loyalty-level__sentinel svelte-acx6c7" aria-hidden="true"></div>'),hu=ne('<img class="loyalty-level__badge svelte-acx6c7"/>'),cu=ne('<span class="loyalty-level__tag svelte-acx6c7"> </span>'),du=ne('<div class="loyalty-level__benefits svelte-acx6c7"><!></div>'),vu=ne('<div class="loyalty-level__modal-overlay svelte-acx6c7" role="presentation"><div class="loyalty-level__modal svelte-acx6c7" role="dialog" aria-modal="true" tabindex="-1"><div class="loyalty-level__modal-close-wrapper svelte-acx6c7"><button class="loyalty-level__modal-close svelte-acx6c7" type="button" aria-label="close">×</button></div> <header class="loyalty-level__modal-head svelte-acx6c7"><!> <div class="loyalty-level__headings svelte-acx6c7"><div class="loyalty-level__title-row svelte-acx6c7"><span class="loyalty-level__name svelte-acx6c7"> </span> <!></div> <span class="loyalty-level__starting svelte-acx6c7"> </span></div></header> <!></div></div>'),pu=ne('<div class="loyalty-level svelte-acx6c7"><div class="loyalty-level__grid svelte-acx6c7"></div> <!> <!></div> <!>',1);function _u(e,t){Ar(t,!0);const r=()=>Ki(As,"$_",n),[n,i]=es(),s=Q(t,"apiEndpoint",3,""),a=Q(t,"userSession",3,""),o=Q(t,"locale",3,""),l=Q(t,"onLevelLoaded",3,m=>{}),u=Q(t,"onSeeMore",3,m=>{});Hs({withLocale:o(),translations:{}}),Object.entries(su).forEach(([m,S])=>{Ls(m,S)}),Te(()=>{Ps(o()??"en")});const f=m=>{l()(m)},c=lo(()=>({apiEndpoint:s(),userSession:a(),locale:o(),loadLevels:!0,onLevelLoaded:f})),h=xe(()=>c.playerElevateLevel?.id),d=xe(()=>[...c.levels??[]].sort((m,S)=>m.firstEntryPoints<S.firstEntryPoints?-1:1)),_=xe(()=>v(d).findIndex(m=>m.id===v(h))),g=m=>m.presentation?.displayName??m.displayName??String(m.id),p=m=>v(_)>=0&&m<v(_);let b=F(0),y=F(!1),N=F(it(Fr)),O=F(void 0),E=F(void 0),x=F(void 0);const B=xe(()=>Math.max(1,Math.ceil(v(d).length/Ie))),oe=xe(()=>v(y)?v(d).slice(0,v(N)):v(d).slice(v(b)*Ie,v(b)*Ie+Ie));Te(()=>{v(b)>v(B)-1&&I(b,0)}),Te(()=>{I(N,v(y)?Fr:Ie,!0)}),Te(()=>{if(!v(y)||!v(O))return;const m=new IntersectionObserver(S=>{S.some(pe=>pe.isIntersecting)&&I(N,Math.min(v(d).length,v(N)+Fr),!0)},{rootMargin:"200px"});return m.observe(v(O)),()=>m.disconnect()});const le=m=>{I(b,Math.floor(m/Ie),!0)};Te(()=>{const m=window.matchMedia("(max-width: 767px)"),S=pe=>{I(y,pe.matches,!0)};return I(y,m.matches,!0),m.addEventListener("change",S),()=>m.removeEventListener("change",S)});const R=m=>{u()(m),v(y)?I(E,v(E)===m.id?void 0:m.id,!0):I(x,m,!0)},ke=()=>{I(x,void 0)},Le=m=>{m.target===m.currentTarget&&ke()},je=m=>{m.key==="Escape"&&ke()};Te(()=>{if(!v(x))return;const m=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=m}});const Qt=(m,S)=>!!m.presentation?.description&&(!p(S)||v(E)===m.id);var Jt=pu(),Ct=Ai(Jt),Rt=C(Ct);Qi(Rt,23,()=>v(oe),m=>m.id,(m,S,pe)=>{const $t=xe(()=>v(y)?v(pe):v(b)*Ie+v(pe));var _t=uu();let mt;var gt=C(_t),er=C(gt);{var tr=q=>{var ie=au();Oe(tt=>{or(ie,"src",v(S).presentation.asset),or(ie,"alt",tt)},[()=>g(v(S))]),X(q,ie)};_e(er,q=>{v(S).presentation?.asset&&q(tr)})}var bt=Z(er,2),Ke=C(bt),Dt=C(Ke),$r=C(Dt,!0);M(Dt);var Dr=Z(Dt,2);{var rr=q=>{var ie=ou(),tt=C(ie,!0);M(ie),Oe(Os=>we(tt,Os),[()=>r()("current")]),X(q,ie)};_e(Dr,q=>{v(S).id===v(h)&&q(rr)})}M(Ke);var nr=Z(Ke,2),Ur=C(nr,!0);M(nr),M(bt),M(gt);var ir=Z(gt,2);{var z=q=>{var ie=lu(),tt=C(ie);Mn(tt,()=>v(S).presentation?.description),M(ie),X(q,ie)};_e(ir,q=>{Qt(v(S),v($t))&&q(z)})}var k=Z(ir,2);k.__click=()=>R(v(S));var et=C(k,!0);M(k),M(_t),Oe((q,ie,tt)=>{mt=Ji(_t,1,"loyalty-level__card svelte-acx6c7",null,mt,{"loyalty-level__card--current":v(S).id===v(h),"loyalty-level__card--expanded":v(E)===v(S).id}),we($r,q),we(Ur,ie),we(et,tt)},[()=>g(v(S)),()=>r()("startingLevel",{values:{points:v(S).firstEntryPoints.toLocaleString()}}),()=>v(E)===v(S).id?r()("seeLess"):r()("seeMore")]),X(m,_t)}),M(Rt);var Pe=Z(Rt,2);{var Ne=m=>{{let S=xe(()=>v(b)*Ie);iu(m,{get offset(){return v(S)},get limit(){return Ie},get total(){return v(d).length},onPageChange:le,get locale(){return o()}})}};_e(Pe,m=>{v(y)||m(Ne)})}var Kt=Z(Pe,2);{var Rr=m=>{var S=fu();Za(S,pe=>I(O,pe),()=>v(O)),X(m,S)};_e(Kt,m=>{v(y)&&v(N)<v(d).length&&m(Rr)})}M(Ct);var Is=Z(Ct,2);{var Bs=m=>{var S=vu();S.__click=Le,S.__keydown=je;var pe=C(S),$t=C(pe),_t=C($t);_t.__click=ke,M($t);var mt=Z($t,2),gt=C(mt);{var er=z=>{var k=hu();Oe(et=>{or(k,"src",v(x).presentation.asset),or(k,"alt",et)},[()=>g(v(x))]),X(z,k)};_e(gt,z=>{v(x).presentation?.asset&&z(er)})}var tr=Z(gt,2),bt=C(tr),Ke=C(bt),Dt=C(Ke,!0);M(Ke);var $r=Z(Ke,2);{var Dr=z=>{var k=cu(),et=C(k,!0);M(k),Oe(q=>we(et,q),[()=>r()("current")]),X(z,k)};_e($r,z=>{v(x).id===v(h)&&z(Dr)})}M(bt);var rr=Z(bt,2),nr=C(rr,!0);M(rr),M(tr),M(mt);var Ur=Z(mt,2);{var ir=z=>{var k=du(),et=C(k);Mn(et,()=>v(x).presentation.description),M(k),X(z,k)};_e(Ur,z=>{v(x).presentation?.description&&z(ir)})}M(pe),M(S),Oe((z,k)=>{we(Dt,z),we(nr,k)},[()=>g(v(x)),()=>r()("startingLevel",{values:{points:v(x).firstEntryPoints.toLocaleString()}})]),X(m,S)};_e(Is,m=>{v(x)&&m(Bs)})}X(e,Jt),Hr(),i()}zi(["click","keydown"]);function Ns(e,t){Ar(t,!0);const r=Q(t,"apiEndpoint",7),n=Q(t,"userSession",7),i=Q(t,"locale",7),s=Q(t,"onLevelLoaded",7),a=Q(t,"onSeeMore",7);var o={get apiEndpoint(){return r()},set apiEndpoint(l){r(l),rt()},get userSession(){return n()},set userSession(l){n(l),rt()},get locale(){return i()},set locale(l){i(l),rt()},get onLevelLoaded(){return s()},set onLevelLoaded(l){s(l),rt()},get onSeeMore(){return a()},set onSeeMore(l){a(l),rt()}};return _u(e,{get apiEndpoint(){return r()},get userSession(){return n()},get locale(){return i()},get onLevelLoaded(){return s()},get onSeeMore(){return a()}}),Hr(o)}customElements.define("loyalty-level",ro(Ns,{apiEndpoint:{},userSession:{},locale:{},onLevelLoaded:{},onSeeMore:{}},[],[],!1));exports.LoyaltyLevel_ce=Ns;
|
package/package.json
CHANGED
|
@@ -1,16 +1,22 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@everymatrix/loyalty-level",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.6",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"svelte": "./svelte/loyalty-level.js",
|
|
6
6
|
"exports": {
|
|
7
|
+
"./package.json": "./package.json",
|
|
7
8
|
".": {
|
|
8
9
|
"svelte": "./svelte/loyalty-level.js",
|
|
9
|
-
"import": "./svelte/loyalty-level.js"
|
|
10
|
+
"import": "./svelte/loyalty-level.js",
|
|
11
|
+
"default": "./svelte/loyalty-level.js"
|
|
10
12
|
},
|
|
11
13
|
"./wc": {
|
|
12
|
-
"import": "./wc/
|
|
13
|
-
|
|
14
|
+
"import": "./wc/loyalty-level.js",
|
|
15
|
+
"require": "./wc/loyalty-level.cjs",
|
|
16
|
+
"default": "./wc/loyalty-level.js"
|
|
17
|
+
},
|
|
18
|
+
"./wc/loyalty-level.js": "./wc/loyalty-level.js",
|
|
19
|
+
"./wc/loyalty-level.cjs": "./wc/loyalty-level.cjs"
|
|
14
20
|
},
|
|
15
21
|
"files": [
|
|
16
22
|
"svelte/",
|
package/wc/loyalty-level.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const s=require("../components/LoyaltyLevel-
|
|
1
|
+
"use strict";const s=require("../components/LoyaltyLevel-Dl163hXA.cjs");function l(t){return function(...n){try{return t.apply(this,n)}catch(e){if(e instanceof DOMException&&e.message.includes("has already been used with this registry")||e.message.includes("Cannot define multiple custom elements with the same tag name"))return!1;throw e}}}customElements.define=l(customElements.define);!customElements.get("loyalty-level")&&customElements.define("loyalty-level",s.LoyaltyLevel_ce.element);
|
package/wc/loyalty-level.js
CHANGED