@everymatrix/loyalty-rakeback 0.2.0 → 0.2.1

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.
@@ -1,23 +0,0 @@
1
- "use strict";const Wi="5";typeof window<"u"&&((window.__svelte??={}).v??=new Set).add(Wi);const zi=2,xn="[",wn="[!",Yr="[?",Sn="]",nt={},W=Symbol(),Yi="http://www.w3.org/1999/xhtml",qi=!1;var Zi=Array.isArray,Ji=Array.prototype.indexOf,it=Array.prototype.includes,Qi=Array.from,zt=Object.keys,Ht=Object.defineProperty,tt=Object.getOwnPropertyDescriptor,Ki=Object.prototype,es=Array.prototype,ts=Object.getPrototypeOf,qr=Object.isExtensible;const Te=()=>{};function Tn(e){for(var t=0;t<e.length;t++)e[t]()}function Hn(){var e,t,r=new Promise((n,i)=>{e=n,t=i});return{promise:r,resolve:e,reject:t}}const X=2,st=4,Bt=8,An=1<<24,Le=16,be=32,Ce=64,vr=128,ae=512,V=1024,Y=2048,de=4096,_e=8192,ce=16384,De=32768,Zr=1<<25,at=65536,Jr=1<<17,rs=1<<18,Ye=1<<19,$n=1<<20,We=65536,mr=1<<21,Br=1<<22,Re=1<<23,or=Symbol("$state"),ns=Symbol("legacy props"),we=new class extends Error{name="StaleReactionError";message="The reaction that called `getAbortSignal()` was re-run or destroyed"},Kt=3,er=8;function is(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function ss(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function as(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function os(e){throw new Error("https://svelte.dev/e/effect_orphan")}function us(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function ls(){throw new Error("https://svelte.dev/e/hydration_failed")}function fs(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function hs(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function cs(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function ds(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}function tr(e){console.warn("https://svelte.dev/e/hydration_mismatch")}function ps(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}let F=!1;function Ke(e){F=e}let N;function pe(e){if(e===null)throw tr(),nt;return N=e}function Pr(){return pe($e(N))}function Ct(e){if(F){if($e(N)!==null)throw tr(),nt;N=e}}function vs(e=1){if(F){for(var t=e,r=N;t--;)r=$e(r);N=r}}function On(e=!0){for(var t=0,r=N;;){if(r.nodeType===er){var n=r.data;if(n===Sn){if(t===0)return r;t-=1}else(n===xn||n===wn||n[0]==="["&&!isNaN(Number(n.slice(1))))&&(t+=1)}var i=$e(r);e&&r.remove(),r=i}}function ms(e){if(!e||e.nodeType!==er)throw tr(),nt;return e.data}function Nn(e){return e===this.v}function Mn(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function _s(e){return!Mn(e,this.v)}let bs=!1,ue=null;function ot(e){ue=e}function Rr(e,t=!1,r){ue={p:ue,i:!1,c:null,e:null,s:e,x:null,r:H,l:null}}function Ir(e){var t=ue,r=t.e;if(r!==null){t.e=null;for(var n of r)Qn(n)}return e!==void 0&&(t.x=e),t.i=!0,ue=t.p,e??{}}function Bn(){return!0}let je=[];function Pn(){var e=je;je=[],Tn(e)}function rt(e){if(je.length===0&&!wt){var t=je;queueMicrotask(()=>{t===je&&Pn()})}je.push(e)}function gs(){for(;je.length>0;)Pn()}function Rn(e){var t=H;if(t===null)return S.f|=Re,e;if(!(t.f&De)&&!(t.f&st))throw e;Me(e,t)}function Me(e,t){for(;t!==null;){if(t.f&vr){if(!(t.f&De))throw e;try{t.b.error(e);return}catch(r){e=r}}t=t.parent}throw e}const ys=-7169;function L(e,t){e.f=e.f&ys|t}function Cr(e){e.f&ae||e.deps===null?L(e,V):L(e,de)}function In(e){if(e!==null)for(const t of e)!(t.f&X)||!(t.f&We)||(t.f^=We,In(t.deps))}function Cn(e,t,r){e.f&Y?t.add(e):e.f&de&&r.add(e),In(e.deps),L(e,V)}function kr(e,t,r){if(e==null)return t(void 0),r&&r(void 0),Te;const n=di(()=>e.subscribe(t,r));return n.unsubscribe?()=>n.unsubscribe():n}const Qe=[];function Es(e,t){return{subscribe:rr(e,t).subscribe}}function rr(e,t=Te){let r=null;const n=new Set;function i(a){if(Mn(e,a)&&(e=a,r)){const u=!Qe.length;for(const l of n)l[1](),Qe.push(l,e);if(u){for(let l=0;l<Qe.length;l+=2)Qe[l][0](Qe[l+1]);Qe.length=0}}}function s(a){i(a(e))}function o(a,u=Te){const l=[a,u];return n.add(l),n.size===1&&(r=t(i,s)||Te),a(e),()=>{n.delete(l),n.size===0&&r&&(r(),r=null)}}return{set:i,update:s,subscribe:o}}function dt(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 Es(r,(o,a)=>{let u=!1;const l=[];let f=0,c=Te;const h=()=>{if(f)return;c();const v=t(n?l[0]:l,o,a);s?o(v):c=typeof v=="function"?v:Te},p=i.map((v,E)=>kr(v,$=>{l[E]=$,f&=~(1<<E),u&&h()},()=>{f|=1<<E}));return u=!0,h(),function(){Tn(p),c(),u=!1}})}function xs(e){let t;return kr(e,r=>t=r)(),t}let _r=Symbol();function ws(e,t,r){const n=r[t]??={store:null,source:Vn(void 0),unsubscribe:Te};if(n.store!==e&&!(_r in r))if(n.unsubscribe(),n.store=e??null,e==null)n.source.v=void 0,n.unsubscribe=Te;else{var i=!0;n.unsubscribe=kr(e,s=>{i?n.source.v=s:z(n.source,s)}),i=!1}return e&&_r in r?xs(e):O(n.source)}function Ss(){const e={};function t(){Jn(()=>{for(var r in e)e[r].unsubscribe();Ht(e,_r,{enumerable:!1,value:!0})})}return[e,t]}const gt=new Set;let B=null,fe=null,br=null,wt=!1,ur=!1,et=null,Ft=null;var Qr=0;let Ts=1;class He{id=Ts++;current=new Map;previous=new Map;#e=new Set;#t=new Set;#r=0;#u=0;#n=null;#i=[];#s=new Set;#a=new Set;#o=new Map;is_fork=!1;#l=!1;#f(){return this.is_fork||this.#u>0}skip_effect(t){this.#o.has(t)||this.#o.set(t,{d:[],m:[]})}unskip_effect(t){var r=this.#o.get(t);if(r){this.#o.delete(t);for(var n of r.d)L(n,Y),this.schedule(n);for(n of r.m)L(n,de),this.schedule(n)}}#c(){Qr++>1e3&&Hs();const t=this.#i;this.#i=[],this.apply();var r=et=[],n=[],i=Ft=[];for(const a of t)this.#d(a,r,n);if(B=null,i.length>0){var s=He.ensure();for(const a of i)s.schedule(a)}if(et=null,Ft=null,this.#f()){this.#p(n),this.#p(r);for(const[a,u]of this.#o)Dn(a,u)}else{this.#s.clear(),this.#a.clear();for(const a of this.#e)a(this);this.#e.clear(),Kr(n),Kr(r),this.#r===0&&this.#h(),this.#n?.resolve()}var o=B;o!==null&&(gt.add(o),o.#c())}#d(t,r,n){t.f^=V;for(var i=t.first;i!==null;){var s=i.f,o=(s&(be|Ce))!==0,a=o&&(s&V)!==0,u=a||(s&_e)!==0||this.#o.has(i);if(!u&&i.fn!==null){o?i.f^=V:s&st?r.push(i):Rt(i)&&(s&Le&&this.#a.add(i),ut(i));var l=i.first;if(l!==null){i=l;continue}}for(;i!==null;){var f=i.next;if(f!==null){i=f;break}i=i.parent}}}#p(t){for(var r=0;r<t.length;r+=1)Cn(t[r],this.#s,this.#a)}capture(t,r){r!==W&&!this.previous.has(t)&&this.previous.set(t,r),t.f&Re||(this.current.set(t,t.v),fe?.set(t,t.v))}activate(){B=this}deactivate(){B=null,fe=null}flush(){try{if(ur=!0,B=this,!this.#f()){for(const t of this.#s)this.#a.delete(t),L(t,Y),this.schedule(t);for(const t of this.#a)L(t,de),this.schedule(t)}this.#c()}finally{Qr=0,br=null,et=null,Ft=null,ur=!1,B=null,fe=null,Ie.clear()}}discard(){for(const t of this.#t)t(this);this.#t.clear()}#h(){if(gt.size>1){this.previous.clear();var t=B,r=fe,n=!0;for(const i of gt){if(i===this){n=!1;continue}const s=[];for(const[a,u]of this.current){if(i.current.has(a))if(n&&u!==i.current.get(a))i.current.set(a,u);else continue;s.push(a)}if(s.length===0)continue;const o=[...i.current.keys()].filter(a=>!this.current.has(a));if(o.length>0){i.activate();const a=new Set,u=new Map;for(const l of s)kn(l,o,a,u);if(i.#i.length>0){i.apply();for(const l of i.#i)i.#d(l,[],[])}i.deactivate()}}B=t,fe=r}this.#o.clear(),gt.delete(this)}increment(t){this.#r+=1,t&&(this.#u+=1)}decrement(t,r){this.#r-=1,t&&(this.#u-=1),!(this.#l||r)&&(this.#l=!0,rt(()=>{this.#l=!1,this.flush()}))}oncommit(t){this.#e.add(t)}ondiscard(t){this.#t.add(t)}settled(){return(this.#n??=Hn()).promise}static ensure(){if(B===null){const t=B=new He;ur||(gt.add(B),wt||rt(()=>{B===t&&t.flush()}))}return B}apply(){}schedule(t){if(br=t,t.b?.is_pending&&t.f&(st|Bt|An)&&!(t.f&De)){t.b.defer_effect(t);return}for(var r=t;r.parent!==null;){r=r.parent;var n=r.f;if(et!==null&&r===H&&(S===null||!(S.f&X)))return;if(n&(Ce|be)){if(!(n&V))return;r.f^=V}}this.#i.push(r)}}function Se(e){var t=wt;wt=!0;try{for(var r;;){if(gs(),B===null)return r;B.flush()}}finally{wt=t}}function Hs(){try{us()}catch(e){Me(e,br)}}let Ee=null;function Kr(e){var t=e.length;if(t!==0){for(var r=0;r<t;){var n=e[r++];if(!(n.f&(ce|_e))&&Rt(n)&&(Ee=new Set,ut(n),n.deps===null&&n.first===null&&n.nodes===null&&n.teardown===null&&n.ac===null&&ri(n),Ee?.size>0)){Ie.clear();for(const i of Ee){if(i.f&(ce|_e))continue;const s=[i];let o=i.parent;for(;o!==null;)Ee.has(o)&&(Ee.delete(o),s.push(o)),o=o.parent;for(let a=s.length-1;a>=0;a--){const u=s[a];u.f&(ce|_e)||ut(u)}}Ee.clear()}}Ee=null}}function kn(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&X?kn(i,t,r,n):s&(Br|Le)&&!(s&Y)&&Ln(i,t,n)&&(L(i,Y),Lr(i))}}function Ln(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(it.call(t,i))return!0;if(i.f&X&&Ln(i,t,r))return r.set(i,!0),!0}return r.set(e,!1),!1}function Lr(e){B.schedule(e)}function Dn(e,t){if(!(e.f&be&&e.f&V)){e.f&Y?t.d.push(e):e.f&de&&t.m.push(e),L(e,V);for(var r=e.first;r!==null;)Dn(r,t),r=r.next}}function As(e){let t=0,r=Pt(0),n;return()=>{jr()&&(O(r),Kn(()=>(t===0&&(n=di(()=>e(()=>St(r)))),t+=1,()=>{rt(()=>{t-=1,t===0&&(n?.(),n=void 0,St(r))})})))}}var $s=at|Ye;function Os(e,t,r,n){new Ns(e,t,r,n)}class Ns{parent;is_pending=!1;transform_error;#e;#t=F?N:null;#r;#u;#n;#i=null;#s=null;#a=null;#o=null;#l=0;#f=0;#c=!1;#d=new Set;#p=new Set;#h=null;#g=As(()=>(this.#h=Pt(this.#l),()=>{this.#h=null}));constructor(t,r,n,i){this.#e=t,this.#r=r,this.#u=s=>{var o=H;o.b=this,o.f|=vr,n(s)},this.parent=H.b,this.transform_error=i??this.parent?.transform_error??(s=>s),this.#n=ei(()=>{if(F){const s=this.#t;Pr();const o=s.data===wn;if(s.data.startsWith(Yr)){const u=JSON.parse(s.data.slice(Yr.length));this.#E(u)}else o?this.#x():this.#y()}else this.#_()},$s),F&&(this.#e=N)}#y(){try{this.#i=xe(()=>this.#u(this.#e))}catch(t){this.error(t)}}#E(t){const r=this.#r.failed;r&&(this.#a=xe(()=>{r(this.#e,()=>t,()=>()=>{})}))}#x(){const t=this.#r.pending;if(t){this.is_pending=!0,this.#s=xe(()=>t(this.#e));var r=B;rt(()=>{var n=this.#o=document.createDocumentFragment(),i=Ae();n.append(i),this.#i=this.#m(()=>xe(()=>this.#u(i))),this.#f===0&&(this.#e.before(n),this.#o=null,Tt(this.#s,()=>{this.#s=null}),this.#v(r))})}}#_(){var t=B;try{if(this.is_pending=this.has_pending_snippet(),this.#f=0,this.#l=0,this.#i=xe(()=>{this.#u(this.#e)}),this.#f>0){var r=this.#o=document.createDocumentFragment();si(this.#i,r);const n=this.#r.pending;this.#s=xe(()=>n(this.#e))}else this.#v(t)}catch(n){this.error(n)}}#v(t){this.is_pending=!1;for(const r of this.#d)L(r,Y),t.schedule(r);for(const r of this.#p)L(r,de),t.schedule(r);this.#d.clear(),this.#p.clear()}defer_effect(t){Cn(t,this.#d,this.#p)}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!this.#r.pending}#m(t){var r=H,n=S,i=ue;ge(this.#n),le(this.#n),ot(this.#n.ctx);try{return He.ensure(),t()}catch(s){return Rn(s),null}finally{ge(r),le(n),ot(i)}}#b(t,r){if(!this.has_pending_snippet()){this.parent&&this.parent.#b(t,r);return}this.#f+=t,this.#f===0&&(this.#v(r),this.#s&&Tt(this.#s,()=>{this.#s=null}),this.#o&&(this.#e.before(this.#o),this.#o=null))}update_pending_count(t,r){this.#b(t,r),this.#l+=t,!(!this.#h||this.#c)&&(this.#c=!0,rt(()=>{this.#c=!1,this.#h&&qt(this.#h,this.#l)}))}get_effect_pending(){return this.#g(),O(this.#h)}error(t){var r=this.#r.onerror;let n=this.#r.failed;if(!r&&!n)throw t;this.#i&&(te(this.#i),this.#i=null),this.#s&&(te(this.#s),this.#s=null),this.#a&&(te(this.#a),this.#a=null),F&&(pe(this.#t),vs(),pe(On()));var i=!1,s=!1;const o=()=>{if(i){ps();return}i=!0,s&&ds(),this.#a!==null&&Tt(this.#a,()=>{this.#a=null}),this.#m(()=>{this.#_()})},a=u=>{try{s=!0,r?.(u,o),s=!1}catch(l){Me(l,this.#n&&this.#n.parent)}n&&(this.#a=this.#m(()=>{try{return xe(()=>{var l=H;l.b=this,l.f|=vr,n(this.#e,()=>u,()=>o)})}catch(l){return Me(l,this.#n.parent),null}}))};rt(()=>{var u;try{u=this.transform_error(t)}catch(l){Me(l,this.#n&&this.#n.parent);return}u!==null&&typeof u=="object"&&typeof u.then=="function"?u.then(a,l=>Me(l,this.#n&&this.#n.parent)):a(u)})}}function Ms(e,t,r,n){const i=Dr;var s=e.filter(h=>!h.settled);if(r.length===0&&s.length===0){n(t.map(i));return}var o=H,a=Bs(),u=s.length===1?s[0].promise:s.length>1?Promise.all(s.map(h=>h.promise)):null;function l(h){a();try{n(h)}catch(p){o.f&ce||Me(p,o)}Yt()}if(r.length===0){u.then(()=>l(t.map(i)));return}var f=Un();function c(){Promise.all(r.map(h=>Ps(h))).then(h=>l([...t.map(i),...h])).catch(h=>Me(h,o)).finally(()=>f())}u?u.then(()=>{a(),c(),Yt()}):c()}function Bs(){var e=H,t=S,r=ue,n=B;return function(s=!0){ge(e),le(t),ot(r),s&&!(e.f&ce)&&(n?.activate(),n?.apply())}}function Yt(e=!0){ge(null),le(null),ot(null),e&&B?.deactivate()}function Un(){var e=H.b,t=B,r=e.is_rendered();return e.update_pending_count(1,t),t.increment(r),(n=!1)=>{e.update_pending_count(-1,t),t.decrement(r,n)}}function Dr(e){var t=X|Y,r=S!==null&&S.f&X?S:null;return H!==null&&(H.f|=Ye),{ctx:ue,deps:null,effects:null,equals:Nn,f:t,fn:e,reactions:null,rv:0,v:W,wv:0,parent:r??H,ac:null}}function Ps(e,t,r){let n=H;n===null&&is();var i=void 0,s=Pt(W),o=!S,a=new Map;return zs(()=>{var u=H,l=Hn();i=l.promise;try{Promise.resolve(e()).then(l.resolve,l.reject).finally(Yt)}catch(p){l.reject(p),Yt()}var f=B;if(o){if(u.f&De)var c=Un();if(n.b.is_rendered())a.get(f)?.reject(we),a.delete(f);else{for(const p of a.values())p.reject(we);a.clear()}a.set(f,l)}const h=(p,v=void 0)=>{if(c){var E=v===we;c(E)}if(!(v===we||u.f&ce)){if(f.activate(),v)s.f|=Re,qt(s,v);else{s.f&Re&&(s.f^=Re),qt(s,p);for(const[$,I]of a){if(a.delete($),$===f)break;I.reject(we)}}f.deactivate()}};l.promise.then(h,p=>h(null,p||"unknown"))}),Jn(()=>{for(const u of a.values())u.reject(we)}),new Promise(u=>{function l(f){function c(){f===i?u(s):l(i)}f.then(c,c)}l(i)})}function kt(e){const t=Dr(e);return ai(t),t}function Rs(e){var t=e.effects;if(t!==null){e.effects=null;for(var r=0;r<t.length;r+=1)te(t[r])}}function Is(e){for(var t=e.parent;t!==null;){if(!(t.f&X))return t.f&ce?null:t;t=t.parent}return null}function Ur(e){var t,r=H;ge(Is(e));try{e.f&=~We,Rs(e),t=fi(e)}finally{ge(r)}return t}function Fn(e){var t=Ur(e);if(!e.equals(t)&&(e.wv=ui(),(!B?.is_fork||e.deps===null)&&(e.v=t,e.deps===null))){L(e,V);return}ke||(fe!==null?(jr()||B?.is_fork)&&fe.set(e,t):Cr(e))}function Cs(e){if(e.effects!==null)for(const t of e.effects)(t.teardown||t.ac)&&(t.teardown?.(),t.ac?.abort(we),t.teardown=Te,t.ac=null,$t(t,0),Vr(t))}function Gn(e){if(e.effects!==null)for(const t of e.effects)t.teardown&&ut(t)}let gr=new Set;const Ie=new Map;let jn=!1;function Pt(e,t){var r={f:0,v:e,reactions:null,equals:Nn,rv:0,wv:0};return r}function se(e,t){const r=Pt(e);return ai(r),r}function Vn(e,t=!1,r=!0){const n=Pt(e);return t||(n.equals=_s),n}function z(e,t,r=!1){S!==null&&(!he||S.f&Jr)&&Bn()&&S.f&(X|Le|Br|Jr)&&(oe===null||!it.call(oe,e))&&cs();let n=r?Et(t):t;return qt(e,n,Ft)}function qt(e,t,r=null){if(!e.equals(t)){var n=e.v;ke?Ie.set(e,t):Ie.set(e,n),e.v=t;var i=He.ensure();if(i.capture(e,n),e.f&X){const s=e;e.f&Y&&Ur(s),Cr(s)}e.wv=ui(),Xn(e,Y,r),H!==null&&H.f&V&&!(H.f&(be|Ce))&&(ie===null?Qs([e]):ie.push(e)),!i.is_fork&&gr.size>0&&!jn&&ks()}return t}function ks(){jn=!1;for(const e of gr)e.f&V&&L(e,de),Rt(e)&&ut(e);gr.clear()}function St(e){z(e,e.v+1)}function Xn(e,t,r){var n=e.reactions;if(n!==null)for(var i=n.length,s=0;s<i;s++){var o=n[s],a=o.f,u=(a&Y)===0;if(u&&L(o,t),a&X){var l=o;fe?.delete(l),a&We||(a&ae&&(o.f|=We),Xn(l,de,r))}else if(u){var f=o;a&Le&&Ee!==null&&Ee.add(f),r!==null?r.push(f):Lr(f)}}}function Et(e){if(typeof e!="object"||e===null||or in e)return e;const t=ts(e);if(t!==Ki&&t!==es)return e;var r=new Map,n=Zi(e),i=se(0),s=Xe,o=a=>{if(Xe===s)return a();var u=S,l=Xe;le(null),nn(s);var f=a();return le(u),nn(l),f};return n&&r.set("length",se(e.length)),new Proxy(e,{defineProperty(a,u,l){(!("value"in l)||l.configurable===!1||l.enumerable===!1||l.writable===!1)&&fs();var f=r.get(u);return f===void 0?o(()=>{var c=se(l.value);return r.set(u,c),c}):z(f,l.value,!0),!0},deleteProperty(a,u){var l=r.get(u);if(l===void 0){if(u in a){const f=o(()=>se(W));r.set(u,f),St(i)}}else z(l,W),St(i);return!0},get(a,u,l){if(u===or)return e;var f=r.get(u),c=u in a;if(f===void 0&&(!c||tt(a,u)?.writable)&&(f=o(()=>{var p=Et(c?a[u]:W),v=se(p);return v}),r.set(u,f)),f!==void 0){var h=O(f);return h===W?void 0:h}return Reflect.get(a,u,l)},getOwnPropertyDescriptor(a,u){var l=Reflect.getOwnPropertyDescriptor(a,u);if(l&&"value"in l){var f=r.get(u);f&&(l.value=O(f))}else if(l===void 0){var c=r.get(u),h=c?.v;if(c!==void 0&&h!==W)return{enumerable:!0,configurable:!0,value:h,writable:!0}}return l},has(a,u){if(u===or)return!0;var l=r.get(u),f=l!==void 0&&l.v!==W||Reflect.has(a,u);if(l!==void 0||H!==null&&(!f||tt(a,u)?.writable)){l===void 0&&(l=o(()=>{var h=f?Et(a[u]):W,p=se(h);return p}),r.set(u,l));var c=O(l);if(c===W)return!1}return f},set(a,u,l,f){var c=r.get(u),h=u in a;if(n&&u==="length")for(var p=l;p<c.v;p+=1){var v=r.get(p+"");v!==void 0?z(v,W):p in a&&(v=o(()=>se(W)),r.set(p+"",v))}if(c===void 0)(!h||tt(a,u)?.writable)&&(c=o(()=>se(void 0)),z(c,Et(l)),r.set(u,c));else{h=c.v!==W;var E=o(()=>Et(l));z(c,E)}var $=Reflect.getOwnPropertyDescriptor(a,u);if($?.set&&$.set.call(f,l),!h){if(n&&typeof u=="string"){var I=r.get("length"),G=Number(u);Number.isInteger(G)&&G>=I.v&&z(I,G+1)}St(i)}return!0},ownKeys(a){O(i);var u=Reflect.ownKeys(a).filter(c=>{var h=r.get(c);return h===void 0||h.v!==W});for(var[l,f]of r)f.v!==W&&!(l in a)&&u.push(l);return u},setPrototypeOf(){hs()}})}var en,Wn,zn,Yn;function yr(){if(en===void 0){en=window,Wn=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,r=Text.prototype;zn=tt(t,"firstChild").get,Yn=tt(t,"nextSibling").get,qr(e)&&(e.__click=void 0,e.__className=void 0,e.__attributes=null,e.__style=void 0,e.__e=void 0),qr(r)&&(r.__t=void 0)}}function Ae(e=""){return document.createTextNode(e)}function At(e){return zn.call(e)}function $e(e){return Yn.call(e)}function Lt(e,t){if(!F)return At(e);var r=At(N);if(r===null)r=N.appendChild(Ae());else if(t&&r.nodeType!==Kt){var n=Ae();return r?.before(n),pe(n),n}return t&&Gr(r),pe(r),r}function Ls(e,t=!1){if(!F){var r=At(e);return r instanceof Comment&&r.data===""?$e(r):r}if(t){if(N?.nodeType!==Kt){var n=Ae();return N?.before(n),pe(n),n}Gr(N)}return N}function Ds(e,t=1,r=!1){let n=F?N:e;for(var i;t--;)i=n,n=$e(n);if(!F)return n;if(r){if(n?.nodeType!==Kt){var s=Ae();return n===null?i?.after(s):n.before(s),pe(s),s}Gr(n)}return pe(n),n}function Us(e){e.textContent=""}function Fs(){return!1}function Fr(e,t,r){return document.createElementNS(Yi,e,void 0)}function Gr(e){if(e.nodeValue.length<65536)return;let t=e.nextSibling;for(;t!==null&&t.nodeType===Kt;)t.remove(),e.nodeValue+=t.nodeValue,t=e.nextSibling}function qn(e){var t=S,r=H;le(null),ge(null);try{return e()}finally{le(t),ge(r)}}function Zn(e){H===null&&(S===null&&os(),as()),ke&&ss()}function Gs(e,t){var r=t.last;r===null?t.last=t.first=e:(r.next=e,e.prev=r,t.last=e)}function ve(e,t){var r=H;r!==null&&r.f&_e&&(e|=_e);var n={ctx:ue,deps:null,nodes:null,f:e|Y|ae,first:null,fn:t,last:null,next:null,parent:r,b:r&&r.b,prev:null,teardown:null,wv:0,ac:null},i=n;if(e&st)et!==null?et.push(n):He.ensure().schedule(n);else if(t!==null){try{ut(n)}catch(o){throw te(n),o}i.deps===null&&i.teardown===null&&i.nodes===null&&i.first===i.last&&!(i.f&Ye)&&(i=i.first,e&Le&&e&at&&i!==null&&(i.f|=at))}if(i!==null&&(i.parent=r,r!==null&&Gs(i,r),S!==null&&S.f&X&&!(e&Ce))){var s=S;(s.effects??=[]).push(i)}return n}function jr(){return S!==null&&!he}function Jn(e){const t=ve(Bt,null);return L(t,V),t.teardown=e,t}function tn(e){Zn();var t=H.f,r=!S&&(t&be)!==0&&(t&De)===0;if(r){var n=ue;(n.e??=[]).push(e)}else return Qn(e)}function Qn(e){return ve(st|$n,e)}function js(e){return Zn(),ve(Bt|$n,e)}function Vs(e){He.ensure();const t=ve(Ce|Ye,e);return()=>{te(t)}}function Xs(e){He.ensure();const t=ve(Ce|Ye,e);return(r={})=>new Promise(n=>{r.outro?Tt(t,()=>{te(t),n(void 0)}):(te(t),n(void 0))})}function Ws(e){return ve(st,e)}function zs(e){return ve(Br|Ye,e)}function Kn(e,t=0){return ve(Bt|t,e)}function Ys(e,t=[],r=[],n=[]){Ms(n,t,r,i=>{ve(Bt,()=>e(...i.map(O)))})}function ei(e,t=0){var r=ve(Le|t,e);return r}function xe(e){return ve(be|Ye,e)}function ti(e){var t=e.teardown;if(t!==null){const r=ke,n=S;rn(!0),le(null);try{t.call(null)}finally{rn(r),le(n)}}}function Vr(e,t=!1){var r=e.first;for(e.first=e.last=null;r!==null;){const i=r.ac;i!==null&&qn(()=>{i.abort(we)});var n=r.next;r.f&Ce?r.parent=null:te(r,t),r=n}}function qs(e){for(var t=e.first;t!==null;){var r=t.next;t.f&be||te(t),t=r}}function te(e,t=!0){var r=!1;(t||e.f&rs)&&e.nodes!==null&&e.nodes.end!==null&&(Zs(e.nodes.start,e.nodes.end),r=!0),L(e,Zr),Vr(e,t&&!r),$t(e,0);var n=e.nodes&&e.nodes.t;if(n!==null)for(const s of n)s.stop();ti(e),e.f^=Zr,e.f|=ce;var i=e.parent;i!==null&&i.first!==null&&ri(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=null}function Zs(e,t){for(;e!==null;){var r=e===t?null:$e(e);e.remove(),e=r}}function ri(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 Tt(e,t,r=!0){var n=[];ni(e,n,!0);var i=()=>{r&&te(e),t&&t()},s=n.length;if(s>0){var o=()=>--s||i();for(var a of n)a.out(o)}else i()}function ni(e,t,r){if(!(e.f&_e)){e.f^=_e;var n=e.nodes&&e.nodes.t;if(n!==null)for(const a of n)(a.is_global||r)&&t.push(a);for(var i=e.first;i!==null;){var s=i.next,o=(i.f&at)!==0||(i.f&be)!==0&&(e.f&Le)!==0;ni(i,t,o?r:!1),i=s}}}function Js(e){ii(e,!0)}function ii(e,t){if(e.f&_e){e.f^=_e,e.f&V||(L(e,Y),He.ensure().schedule(e));for(var r=e.first;r!==null;){var n=r.next,i=(r.f&at)!==0||(r.f&be)!==0;ii(r,i?t:!1),r=n}var s=e.nodes&&e.nodes.t;if(s!==null)for(const o of s)(o.is_global||t)&&o.in()}}function si(e,t){if(e.nodes)for(var r=e.nodes.start,n=e.nodes.end;r!==null;){var i=r===n?null:$e(r);t.append(r),r=i}}let Gt=!1,ke=!1;function rn(e){ke=e}let S=null,he=!1;function le(e){S=e}let H=null;function ge(e){H=e}let oe=null;function ai(e){S!==null&&(oe===null?oe=[e]:oe.push(e))}let ee=null,re=0,ie=null;function Qs(e){ie=e}let oi=1,Ve=0,Xe=Ve;function nn(e){Xe=e}function ui(){return++oi}function Rt(e){var t=e.f;if(t&Y)return!0;if(t&X&&(e.f&=~We),t&de){for(var r=e.deps,n=r.length,i=0;i<n;i++){var s=r[i];if(Rt(s)&&Fn(s),s.wv>e.wv)return!0}t&ae&&fe===null&&L(e,V)}return!1}function li(e,t,r=!0){var n=e.reactions;if(n!==null&&!(oe!==null&&it.call(oe,e)))for(var i=0;i<n.length;i++){var s=n[i];s.f&X?li(s,t,!1):t===s&&(r?L(s,Y):s.f&V&&L(s,de),Lr(s))}}function fi(e){var t=ee,r=re,n=ie,i=S,s=oe,o=ue,a=he,u=Xe,l=e.f;ee=null,re=0,ie=null,S=l&(be|Ce)?null:e,oe=null,ot(e.ctx),he=!1,Xe=++Ve,e.ac!==null&&(qn(()=>{e.ac.abort(we)}),e.ac=null);try{e.f|=mr;var f=e.fn,c=f();e.f|=De;var h=e.deps,p=B?.is_fork;if(ee!==null){var v;if(p||$t(e,re),h!==null&&re>0)for(h.length=re+ee.length,v=0;v<ee.length;v++)h[re+v]=ee[v];else e.deps=h=ee;if(jr()&&e.f&ae)for(v=re;v<h.length;v++)(h[v].reactions??=[]).push(e)}else!p&&h!==null&&re<h.length&&($t(e,re),h.length=re);if(Bn()&&ie!==null&&!he&&h!==null&&!(e.f&(X|de|Y)))for(v=0;v<ie.length;v++)li(ie[v],e);if(i!==null&&i!==e){if(Ve++,i.deps!==null)for(let E=0;E<r;E+=1)i.deps[E].rv=Ve;if(t!==null)for(const E of t)E.rv=Ve;ie!==null&&(n===null?n=ie:n.push(...ie))}return e.f&Re&&(e.f^=Re),c}catch(E){return Rn(E)}finally{e.f^=mr,ee=t,re=r,ie=n,S=i,oe=s,ot(o),he=a,Xe=u}}function Ks(e,t){let r=t.reactions;if(r!==null){var n=Ji.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&X&&(ee===null||!it.call(ee,t))){var s=t;s.f&ae&&(s.f^=ae,s.f&=~We),Cr(s),Cs(s),$t(s,0)}}function $t(e,t){var r=e.deps;if(r!==null)for(var n=t;n<r.length;n++)Ks(e,r[n])}function ut(e){var t=e.f;if(!(t&ce)){L(e,V);var r=H,n=Gt;H=e,Gt=!0;try{t&(Le|An)?qs(e):Vr(e),ti(e);var i=fi(e);e.teardown=typeof i=="function"?i:null,e.wv=oi;var s;qi&&bs&&e.f&Y&&e.deps}finally{Gt=n,H=r}}}function O(e){var t=e.f,r=(t&X)!==0;if(S!==null&&!he){var n=H!==null&&(H.f&ce)!==0;if(!n&&(oe===null||!it.call(oe,e))){var i=S.deps;if(S.f&mr)e.rv<Ve&&(e.rv=Ve,ee===null&&i!==null&&i[re]===e?re++:ee===null?ee=[e]:ee.push(e));else{(S.deps??=[]).push(e);var s=e.reactions;s===null?e.reactions=[S]:it.call(s,S)||s.push(S)}}}if(ke&&Ie.has(e))return Ie.get(e);if(r){var o=e;if(ke){var a=o.v;return(!(o.f&V)&&o.reactions!==null||ci(o))&&(a=Ur(o)),Ie.set(o,a),a}var u=(o.f&ae)===0&&!he&&S!==null&&(Gt||(S.f&ae)!==0),l=(o.f&De)===0;Rt(o)&&(u&&(o.f|=ae),Fn(o)),u&&!l&&(Gn(o),hi(o))}if(fe?.has(e))return fe.get(e);if(e.f&Re)throw e.v;return e.v}function hi(e){if(e.f|=ae,e.deps!==null)for(const t of e.deps)(t.reactions??=[]).push(e),t.f&X&&!(t.f&ae)&&(Gn(t),hi(t))}function ci(e){if(e.v===W)return!0;if(e.deps===null)return!1;for(const t of e.deps)if(Ie.has(t)||t.f&X&&ci(t))return!0;return!1}function di(e){var t=he;try{return he=!0,e()}finally{he=t}}const xt=Symbol("events"),pi=new Set,Er=new Set;function ea(e,t,r){(t[xt]??={})[e]=r}function ta(e){for(var t=0;t<e.length;t++)pi.add(e[t]);for(var r of Er)r(e)}let sn=null;function an(e){var t=this,r=t.ownerDocument,n=e.type,i=e.composedPath?.()||[],s=i[0]||e.target;sn=e;var o=0,a=sn===e&&e[xt];if(a){var u=i.indexOf(a);if(u!==-1&&(t===document||t===window)){e[xt]=t;return}var l=i.indexOf(t);if(l===-1)return;u<=l&&(o=u)}if(s=i[o]||e.target,s!==t){Ht(e,"currentTarget",{configurable:!0,get(){return s||r}});var f=S,c=H;le(null),ge(null);try{for(var h,p=[];s!==null;){var v=s.assignedSlot||s.parentNode||s.host||null;try{var E=s[xt]?.[n];E!=null&&(!s.disabled||e.target===s)&&E.call(s,e)}catch($){h?p.push($):h=$}if(e.cancelBubble||v===t||v===null)break;s=v}if(h){for(let $ of p)queueMicrotask(()=>{throw $});throw h}}finally{e[xt]=t,delete e.currentTarget,le(f),ge(c)}}}const ra=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy("svelte-trusted-html",{createHTML:e=>e});function na(e){return ra?.createHTML(e)??e}function ia(e){var t=Fr("template");return t.innerHTML=na(e.replaceAll("<!>","<!---->")),t.content}function Ot(e,t){var r=H;r.nodes===null&&(r.nodes={start:e,end:t,a:null,t:null})}function vi(e,t){var r=(t&zi)!==0,n,i=!e.startsWith("<!>");return()=>{if(F)return Ot(N,null),N;n===void 0&&(n=ia(i?e:"<!>"+e),n=At(n));var s=r||Wn?document.importNode(n,!0):n.cloneNode(!0);return Ot(s,s),s}}function sa(){if(F)return Ot(N,null),N;var e=document.createDocumentFragment(),t=document.createComment(""),r=Ae();return e.append(t,r),Ot(t,r),e}function jt(e,t){if(F){var r=H;(!(r.f&De)||r.nodes.end===null)&&(r.nodes.end=N),Pr();return}e!==null&&e.before(t)}const aa=["touchstart","touchmove"];function oa(e){return aa.includes(e)}function on(e,t){var r=t==null?"":typeof t=="object"?`${t}`:t;r!==(e.__t??=e.nodeValue)&&(e.__t=r,e.nodeValue=`${r}`)}function mi(e,t){return _i(e,t)}function ua(e,t){yr(),t.intro=t.intro??!1;const r=t.target,n=F,i=N;try{for(var s=At(r);s&&(s.nodeType!==er||s.data!==xn);)s=$e(s);if(!s)throw nt;Ke(!0),pe(s);const o=_i(e,{...t,anchor:s});return Ke(!1),o}catch(o){if(o instanceof Error&&o.message.split(`
2
- `).some(a=>a.startsWith("https://svelte.dev/e/")))throw o;return o!==nt&&console.warn("Failed to hydrate: ",o),t.recover===!1&&ls(),yr(),Us(r),Ke(!1),mi(e,t)}finally{Ke(n),pe(i)}}const Dt=new Map;function _i(e,{target:t,anchor:r,props:n={},events:i,context:s,intro:o=!0,transformError:a}){yr();var u=void 0,l=Xs(()=>{var f=r??t.appendChild(Ae());Os(f,{pending:()=>{}},p=>{Rr({});var v=ue;if(s&&(v.c=s),i&&(n.$$events=i),F&&Ot(p,null),u=e(p,n)||{},F&&(H.nodes.end=N,N===null||N.nodeType!==er||N.data!==Sn))throw tr(),nt;Ir()},a);var c=new Set,h=p=>{for(var v=0;v<p.length;v++){var E=p[v];if(!c.has(E)){c.add(E);var $=oa(E);for(const D of[t,document]){var I=Dt.get(D);I===void 0&&(I=new Map,Dt.set(D,I));var G=I.get(E);G===void 0?(D.addEventListener(E,an,{passive:$}),I.set(E,1)):I.set(E,G+1)}}}};return h(Qi(pi)),Er.add(h),()=>{for(var p of c)for(const $ of[t,document]){var v=Dt.get($),E=v.get(p);--E==0?($.removeEventListener(p,an),v.delete(p),v.size===0&&Dt.delete($)):v.set(p,E)}Er.delete(h),f!==r&&f.parentNode?.removeChild(f)}});return xr.set(u,l),u}let xr=new WeakMap;function la(e,t){const r=xr.get(e);return r?(xr.delete(e),r(t)):Promise.resolve()}class fa{anchor;#e=new Map;#t=new Map;#r=new Map;#u=new Set;#n=!0;constructor(t,r=!0){this.anchor=t,this.#n=r}#i=t=>{if(this.#e.has(t)){var r=this.#e.get(t),n=this.#t.get(r);if(n)Js(n),this.#u.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,o]of this.#e){if(this.#e.delete(s),s===t)break;const a=this.#r.get(o);a&&(te(a.effect),this.#r.delete(o))}for(const[s,o]of this.#t){if(s===r||this.#u.has(s))continue;const a=()=>{if(Array.from(this.#e.values()).includes(s)){var l=document.createDocumentFragment();si(o,l),l.append(Ae()),this.#r.set(s,{effect:o,fragment:l})}else te(o);this.#u.delete(s),this.#t.delete(s)};this.#n||!n?(this.#u.add(s),Tt(o,a,!1)):a()}}};#s=t=>{this.#e.delete(t);const r=Array.from(this.#e.values());for(const[n,i]of this.#r)r.includes(n)||(te(i.effect),this.#r.delete(n))};ensure(t,r){var n=B,i=Fs();if(r&&!this.#t.has(t)&&!this.#r.has(t))if(i){var s=document.createDocumentFragment(),o=Ae();s.append(o),this.#r.set(t,{effect:xe(()=>r(o)),fragment:s})}else this.#t.set(t,xe(()=>r(this.anchor)));if(this.#e.set(n,t),i){for(const[a,u]of this.#t)a===t?n.unskip_effect(u):n.skip_effect(u);for(const[a,u]of this.#r)a===t?n.unskip_effect(u.effect):n.skip_effect(u.effect);n.oncommit(this.#i),n.ondiscard(this.#s)}else F&&(this.anchor=N),this.#i(n)}}function ha(e,t,r=!1){var n;F&&(n=N,Pr());var i=new fa(e),s=r?at:0;function o(a,u){if(F){var l=ms(n);if(a!==parseInt(l.substring(1))){var f=On();pe(f),i.anchor=f,Ke(!1),i.ensure(a,u),Ke(!0);return}}i.ensure(a,u)}ei(()=>{var a=!1;t((u,l=0)=>{a=!0,o(l,u)}),a||o(-1,null)},s)}function ca(e,t){Ws(()=>{var r=e.getRootNode(),n=r.host?r:r.head??r.ownerDocument.head;if(!n.querySelector("#"+t.hash)){const i=Fr("style");i.id=t.hash,i.textContent=t.code,n.appendChild(i)}})}function Be(e,t,r,n){var i=n,s=!0,o=()=>(s&&(s=!1,i=n),i),a;a=e[t],a===void 0&&n!==void 0&&(a=o());var u;u=()=>{var h=e[t];return h===void 0?o():(s=!0,h)};var l=!1,f=Dr(()=>(l=!1,u())),c=H;return function(h,p){if(arguments.length>0){const v=p?O(f):h;return z(f,v),l=!0,i!==void 0&&(i=v),h}return ke&&l||c.f&ce?f.v:O(f)}}function da(e){return new pa(e)}class pa{#e;#t;constructor(t){var r=new Map,n=(s,o)=>{var a=Vn(o,!1,!1);return r.set(s,a),a};const i=new Proxy({...t.props||{},$$events:{}},{get(s,o){return O(r.get(o)??n(o,Reflect.get(s,o)))},has(s,o){return o===ns?!0:(O(r.get(o)??n(o,Reflect.get(s,o))),Reflect.has(s,o))},set(s,o,a){return z(r.get(o)??n(o,a),a),Reflect.set(s,o,a)}});this.#t=(t.hydrate?ua:mi)(t.component,{target:t.target,anchor:t.anchor,props:i,context:t.context,intro:t.intro??!1,recover:t.recover,transformError:t.transformError}),(!t?.props?.$$host||t.sync===!1)&&Se(),this.#e=i.$$events;for(const s of Object.keys(this.#t))s==="$set"||s==="$destroy"||s==="$on"||Ht(this,s,{get(){return this.#t[s]},set(o){this.#t[s]=o},enumerable:!0});this.#t.$set=s=>{Object.assign(i,s)},this.#t.$destroy=()=>{la(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 bi;typeof HTMLElement=="function"&&(bi=class extends HTMLElement{$$ctor;$$s;$$c;$$cn=!1;$$d={};$$r=!1;$$p_d={};$$l={};$$l_u=new Map;$$me;$$shadowRoot=null;constructor(e,t,r){super(),this.$$ctor=e,this.$$s=t,r&&(this.$$shadowRoot=this.attachShadow(r))}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=Fr("slot");n!=="default"&&(s.name=n),jt(i,s)}};if(await Promise.resolve(),!this.$$cn||this.$$c)return;const t={},r=va(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]=Vt(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=da({component:this.$$ctor,target:this.$$shadowRoot||this,props:{...this.$$d,$$slots:t,$$host:this}}),this.$$me=Vs(()=>{Kn(()=>{this.$$r=!0;for(const n of zt(this.$$c)){if(!this.$$p_d[n]?.reflect)continue;this.$$d[n]=this.$$c[n];const i=Vt(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]=Vt(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 zt(this.$$p_d).find(t=>this.$$p_d[t].attribute===e||!this.$$p_d[t].attribute&&t.toLowerCase()===e)||e}});function Vt(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 va(e){const t={};return e.childNodes.forEach(r=>{t[r.slot||"default"]=!0}),t}function gi(e,t,r,n,i,s){let o=class extends bi{constructor(){super(e,r,i),this.$$p_d=t}static get observedAttributes(){return zt(t).map(a=>(t[a].attribute||a).toLowerCase())}};return zt(t).forEach(a=>{Ht(o.prototype,a,{get(){return this.$$c&&a in this.$$c?this.$$c[a]:this.$$d[a]},set(u){u=Vt(a,u,t),this.$$d[a]=u;var l=this.$$c;if(l){var f=tt(l,a)?.get;f?l[a]=u:l.$set({[a]:u})}}})}),n.forEach(a=>{Ht(o.prototype,a,{get(){return this.$$c?.[a]}})}),e.element=o,o}class yi extends Error{constructor(t,r){super(r),this.code=t,this.name="ElevateApiError"}}const ma=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 yi(i.errorCode,i.errorMessage);return i.data},_a=async e=>{const t=new URL(`${e.apiEndpoint}/elevate/rakeback/claim`),r=new Headers({"Content-Type":"application/json"});e.userSession&&r.append("X-Sessionid",e.userSession);const i=await(await fetch(t.href,{method:"PUT",headers:r,body:JSON.stringify({})})).json();if(!i.success)throw new yi(i.errorCode,i.errorMessage)};var ba=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ga(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ya={exports:{}};(function(e,t){(function(r,n){e.exports=n()})(ba,function(){var r=1e3,n=6e4,i=36e5,s="millisecond",o="second",a="minute",u="hour",l="day",f="week",c="month",h="quarter",p="year",v="date",E="Invalid Date",$=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,I=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,G={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(y){var _=["th","st","nd","rd"],d=y%100;return"["+y+(_[(d-20)%10]||_[d]||_[0])+"]"}},D=function(y,_,d){var g=String(y);return!g||g.length>=_?y:""+Array(_+1-g.length).join(d)+y},ye={s:D,z:function(y){var _=-y.utcOffset(),d=Math.abs(_),g=Math.floor(d/60),m=d%60;return(_<=0?"+":"-")+D(g,2,"0")+":"+D(m,2,"0")},m:function y(_,d){if(_.date()<d.date())return-y(d,_);var g=12*(d.year()-_.year())+(d.month()-_.month()),m=_.clone().add(g,c),x=d-m<0,w=_.clone().add(g+(x?-1:1),c);return+(-(g+(d-m)/(x?m-w:w-m))||0)},a:function(y){return y<0?Math.ceil(y)||0:Math.floor(y)},p:function(y){return{M:c,y:p,w:f,d:l,D:v,h:u,m:a,s:o,ms:s,Q:h}[y]||String(y||"").toLowerCase().replace(/s$/,"")},u:function(y){return y===void 0}},Z="en",J={};J[Z]=G;var Ue="$isDayjsObject",mt=function(y){return y instanceof C||!(!y||!y[Ue])},Ze=function y(_,d,g){var m;if(!_)return Z;if(typeof _=="string"){var x=_.toLowerCase();J[x]&&(m=x),d&&(J[x]=d,m=x);var w=_.split("-");if(!m&&w.length>1)return y(w[0])}else{var M=_.name;J[M]=_,m=M}return!g&&m&&(Z=m),m||!g&&Z},U=function(y,_){if(mt(y))return y.clone();var d=typeof _=="object"?_:{};return d.date=y,d.args=arguments,new C(d)},b=ye;b.l=Ze,b.i=mt,b.w=function(y,_){return U(y,{locale:_.$L,utc:_.$u,x:_.$x,$offset:_.$offset})};var C=function(){function y(d){this.$L=Ze(d.locale,null,!0),this.parse(d),this.$x=this.$x||d.x||{},this[Ue]=!0}var _=y.prototype;return _.parse=function(d){this.$d=function(g){var m=g.date,x=g.utc;if(m===null)return new Date(NaN);if(b.u(m))return new Date;if(m instanceof Date)return new Date(m);if(typeof m=="string"&&!/Z$/i.test(m)){var w=m.match($);if(w){var M=w[2]-1||0,k=(w[7]||"0").substring(0,3);return x?new Date(Date.UTC(w[1],M,w[3]||1,w[4]||0,w[5]||0,w[6]||0,k)):new Date(w[1],M,w[3]||1,w[4]||0,w[5]||0,w[6]||0,k)}}return new Date(m)}(d),this.init()},_.init=function(){var d=this.$d;this.$y=d.getFullYear(),this.$M=d.getMonth(),this.$D=d.getDate(),this.$W=d.getDay(),this.$H=d.getHours(),this.$m=d.getMinutes(),this.$s=d.getSeconds(),this.$ms=d.getMilliseconds()},_.$utils=function(){return b},_.isValid=function(){return this.$d.toString()!==E},_.isSame=function(d,g){var m=U(d);return this.startOf(g)<=m&&m<=this.endOf(g)},_.isAfter=function(d,g){return U(d)<this.startOf(g)},_.isBefore=function(d,g){return this.endOf(g)<U(d)},_.$g=function(d,g,m){return b.u(d)?this[g]:this.set(m,d)},_.unix=function(){return Math.floor(this.valueOf()/1e3)},_.valueOf=function(){return this.$d.getTime()},_.startOf=function(d,g){var m=this,x=!!b.u(g)||g,w=b.p(d),M=function(Ge,K){var Ne=b.w(m.$u?Date.UTC(m.$y,K,Ge):new Date(m.$y,K,Ge),m);return x?Ne:Ne.endOf(l)},k=function(Ge,K){return b.w(m.toDate()[Ge].apply(m.toDate("s"),(x?[0,0,0,0]:[23,59,59,999]).slice(K)),m)},j=this.$W,q=this.$M,ne=this.$D,Je="set"+(this.$u?"UTC":"");switch(w){case p:return x?M(1,0):M(31,11);case c:return x?M(1,q):M(0,q+1);case f:var Fe=this.$locale().weekStart||0,_t=(j<Fe?j+7:j)-Fe;return M(x?ne-_t:ne+(6-_t),q);case l:case v:return k(Je+"Hours",0);case u:return k(Je+"Minutes",1);case a:return k(Je+"Seconds",2);case o:return k(Je+"Milliseconds",3);default:return this.clone()}},_.endOf=function(d){return this.startOf(d,!1)},_.$set=function(d,g){var m,x=b.p(d),w="set"+(this.$u?"UTC":""),M=(m={},m[l]=w+"Date",m[v]=w+"Date",m[c]=w+"Month",m[p]=w+"FullYear",m[u]=w+"Hours",m[a]=w+"Minutes",m[o]=w+"Seconds",m[s]=w+"Milliseconds",m)[x],k=x===l?this.$D+(g-this.$W):g;if(x===c||x===p){var j=this.clone().set(v,1);j.$d[M](k),j.init(),this.$d=j.set(v,Math.min(this.$D,j.daysInMonth())).$d}else M&&this.$d[M](k);return this.init(),this},_.set=function(d,g){return this.clone().$set(d,g)},_.get=function(d){return this[b.p(d)]()},_.add=function(d,g){var m,x=this;d=Number(d);var w=b.p(g),M=function(q){var ne=U(x);return b.w(ne.date(ne.date()+Math.round(q*d)),x)};if(w===c)return this.set(c,this.$M+d);if(w===p)return this.set(p,this.$y+d);if(w===l)return M(1);if(w===f)return M(7);var k=(m={},m[a]=n,m[u]=i,m[o]=r,m)[w]||1,j=this.$d.getTime()+d*k;return b.w(j,this)},_.subtract=function(d,g){return this.add(-1*d,g)},_.format=function(d){var g=this,m=this.$locale();if(!this.isValid())return m.invalidDate||E;var x=d||"YYYY-MM-DDTHH:mm:ssZ",w=b.z(this),M=this.$H,k=this.$m,j=this.$M,q=m.weekdays,ne=m.months,Je=m.meridiem,Fe=function(K,Ne,bt,It){return K&&(K[Ne]||K(g,x))||bt[Ne].slice(0,It)},_t=function(K){return b.s(M%12||12,K,"0")},Ge=Je||function(K,Ne,bt){var It=K<12?"AM":"PM";return bt?It.toLowerCase():It};return x.replace(I,function(K,Ne){return Ne||function(bt){switch(bt){case"YY":return String(g.$y).slice(-2);case"YYYY":return b.s(g.$y,4,"0");case"M":return j+1;case"MM":return b.s(j+1,2,"0");case"MMM":return Fe(m.monthsShort,j,ne,3);case"MMMM":return Fe(ne,j);case"D":return g.$D;case"DD":return b.s(g.$D,2,"0");case"d":return String(g.$W);case"dd":return Fe(m.weekdaysMin,g.$W,q,2);case"ddd":return Fe(m.weekdaysShort,g.$W,q,3);case"dddd":return q[g.$W];case"H":return String(M);case"HH":return b.s(M,2,"0");case"h":return _t(1);case"hh":return _t(2);case"a":return Ge(M,k,!0);case"A":return Ge(M,k,!1);case"m":return String(k);case"mm":return b.s(k,2,"0");case"s":return String(g.$s);case"ss":return b.s(g.$s,2,"0");case"SSS":return b.s(g.$ms,3,"0");case"Z":return w}return null}(K)||w.replace(":","")})},_.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},_.diff=function(d,g,m){var x,w=this,M=b.p(g),k=U(d),j=(k.utcOffset()-this.utcOffset())*n,q=this-k,ne=function(){return b.m(w,k)};switch(M){case p:x=ne()/12;break;case c:x=ne();break;case h:x=ne()/3;break;case f:x=(q-j)/6048e5;break;case l:x=(q-j)/864e5;break;case u:x=q/i;break;case a:x=q/n;break;case o:x=q/r;break;default:x=q}return m?x:b.a(x)},_.daysInMonth=function(){return this.endOf(c).$D},_.$locale=function(){return J[this.$L]},_.locale=function(d,g){if(!d)return this.$L;var m=this.clone(),x=Ze(d,g,!0);return x&&(m.$L=x),m},_.clone=function(){return b.w(this.$d,this)},_.toDate=function(){return new Date(this.valueOf())},_.toJSON=function(){return this.isValid()?this.toISOString():null},_.toISOString=function(){return this.$d.toISOString()},_.toString=function(){return this.$d.toUTCString()},y}(),Oe=C.prototype;return U.prototype=Oe,[["$ms",s],["$s",o],["$m",a],["$H",u],["$W",l],["$M",c],["$y",p],["$D",v]].forEach(function(y){Oe[y[1]]=function(_){return this.$g(_,y[0],y[1])}}),U.extend=function(y,_){return y.$i||(y(_,C,U),y.$i=!0),U},U.locale=Ze,U.isDayjs=mt,U.unix=function(y){return U(1e3*y)},U.en=J[Z],U.Ls=J,U.p={},U})})(ya);const Ea=(e,t=2)=>{const[r,n=""]=e.toString().split(".");return t<=0?r:`${r}.${n?n.slice(0,t).padEnd(t,"0"):"0".repeat(t)}`},xa=(e,t="en")=>{if(!e)return"";try{return new Intl.NumberFormat(t,{style:"currency",currency:e,currencyDisplay:"narrowSymbol"}).formatToParts(0).find(n=>n.type==="currency")?.value??e}catch{return e}},wa=e=>{window.postMessage({type:"Loyalty:RakebackClaimTrigger",points:e},window.location.href)},Sa=e=>{window.postMessage({type:"Loyalty:RakebackClaimSuccess",points:e},window.location.href)},Ta=e=>{window.postMessage({type:"Loyalty:RakebackClaimFailed",message:e},window.location.href)},Ha=()=>{window.postMessage({type:"Loyalty:RakebackWalletMissing"},window.location.href)};var Aa=function(t){return $a(t)&&!Oa(t)};function $a(e){return!!e&&typeof e=="object"}function Oa(e){var t=Object.prototype.toString.call(e);return t==="[object RegExp]"||t==="[object Date]"||Ba(e)}var Na=typeof Symbol=="function"&&Symbol.for,Ma=Na?Symbol.for("react.element"):60103;function Ba(e){return e.$$typeof===Ma}function Pa(e){return Array.isArray(e)?[]:{}}function Nt(e,t){return t.clone!==!1&&t.isMergeableObject(e)?lt(Pa(e),e,t):e}function Ra(e,t,r){return e.concat(t).map(function(n){return Nt(n,r)})}function Ia(e,t){if(!t.customMerge)return lt;var r=t.customMerge(e);return typeof r=="function"?r:lt}function Ca(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[]}function un(e){return Object.keys(e).concat(Ca(e))}function Ei(e,t){try{return t in e}catch{return!1}}function ka(e,t){return Ei(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))}function La(e,t,r){var n={};return r.isMergeableObject(e)&&un(e).forEach(function(i){n[i]=Nt(e[i],r)}),un(t).forEach(function(i){ka(e,i)||(Ei(e,i)&&r.isMergeableObject(t[i])?n[i]=Ia(i,r)(e[i],t[i],r):n[i]=Nt(t[i],r))}),n}function lt(e,t,r){r=r||{},r.arrayMerge=r.arrayMerge||Ra,r.isMergeableObject=r.isMergeableObject||Aa,r.cloneUnlessOtherwiseSpecified=Nt;var n=Array.isArray(t),i=Array.isArray(e),s=n===i;return s?n?r.arrayMerge(e,t,r):La(e,t,r):Nt(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 Da=lt,Ua=Da;const Fa=ga(Ua);var wr=function(e,t){return wr=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])},wr(e,t)};function nr(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");wr(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var me=function(){return me=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},me.apply(this,arguments)};function Ga(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 lr(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 fr(e,t){var r=t&&t.cache?t.cache:qa,n=t&&t.serializer?t.serializer:za,i=t&&t.strategy?t.strategy:Xa;return i(e,{cache:r,serializer:n})}function ja(e){return e==null||typeof e=="number"||typeof e=="boolean"}function Va(e,t,r,n){var i=ja(n)?n:r(n),s=t.get(i);return typeof s>"u"&&(s=e.call(this,n),t.set(i,s)),s}function xi(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 wi(e,t,r,n,i){return r.bind(t,e,n,i)}function Xa(e,t){var r=e.length===1?Va:xi;return wi(e,this,r,t.cache.create(),t.serializer)}function Wa(e,t){return wi(e,this,xi,t.cache.create(),t.serializer)}var za=function(){return JSON.stringify(arguments)},Ya=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}(),qa={create:function(){return new Ya}},hr={variadic:Wa},Zt=function(){return Zt=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},Zt.apply(this,arguments)};var T;(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"})(T||(T={}));var P;(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"})(P||(P={}));var ft;(function(e){e[e.number=0]="number",e[e.dateTime=1]="dateTime"})(ft||(ft={}));function ln(e){return e.type===P.literal}function Za(e){return e.type===P.argument}function Si(e){return e.type===P.number}function Ti(e){return e.type===P.date}function Hi(e){return e.type===P.time}function Ai(e){return e.type===P.select}function $i(e){return e.type===P.plural}function Ja(e){return e.type===P.pound}function Oi(e){return e.type===P.tag}function Ni(e){return!!(e&&typeof e=="object"&&e.type===ft.number)}function Sr(e){return!!(e&&typeof e=="object"&&e.type===ft.dateTime)}var Mi=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/,Qa=/(?:[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 Ka(e){var t={};return e.replace(Qa,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 R=function(){return R=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},R.apply(this,arguments)};var eo=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i;function to(e){if(e.length===0)throw new Error("Number skeleton cannot be empty");for(var t=e.split(eo).filter(function(h){return h.length>0}),r=[],n=0,i=t;n<i.length;n++){var s=i[n],o=s.split("/");if(o.length===0)throw new Error("Invalid number skeleton");for(var a=o[0],u=o.slice(1),l=0,f=u;l<f.length;l++){var c=f[l];if(c.length===0)throw new Error("Invalid number skeleton")}r.push({stem:a,options:u})}return r}function ro(e){return e.replace(/^(.*?)-/,"")}var fn=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,Bi=/^(@+)?(\+|#+)?[rs]?$/g,no=/(\*)(0+)|(#+)(0+)|(0+)/g,Pi=/^(0+)$/;function hn(e){var t={};return e[e.length-1]==="r"?t.roundingPriority="morePrecision":e[e.length-1]==="s"&&(t.roundingPriority="lessPrecision"),e.replace(Bi,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 Ri(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 io(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)),!Pi.test(e))throw new Error("Malformed concise eng/scientific notation");t.minimumIntegerDigits=e.length}return t}function cn(e){var t={},r=Ri(e);return r||t}function so(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=ro(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=R(R(R({},t),{notation:"scientific"}),i.options.reduce(function(u,l){return R(R({},u),cn(l))},{}));continue;case"engineering":t=R(R(R({},t),{notation:"engineering"}),i.options.reduce(function(u,l){return R(R({},u),cn(l))},{}));continue;case"notation-simple":t.notation="standard";continue;case"unit-width-narrow":t.currencyDisplay="narrowSymbol",t.unitDisplay="narrow";continue;case"unit-width-short":t.currencyDisplay="code",t.unitDisplay="short";continue;case"unit-width-full-name":t.currencyDisplay="name",t.unitDisplay="long";continue;case"unit-width-iso-code":t.currencyDisplay="symbol";continue;case"scale":t.scale=parseFloat(i.options[0]);continue;case"rounding-mode-floor":t.roundingMode="floor";continue;case"rounding-mode-ceiling":t.roundingMode="ceil";continue;case"rounding-mode-down":t.roundingMode="trunc";continue;case"rounding-mode-up":t.roundingMode="expand";continue;case"rounding-mode-half-even":t.roundingMode="halfEven";continue;case"rounding-mode-half-down":t.roundingMode="halfTrunc";continue;case"rounding-mode-half-up":t.roundingMode="halfExpand";continue;case"integer-width":if(i.options.length>1)throw new RangeError("integer-width stems only accept a single optional option");i.options[0].replace(no,function(u,l,f,c,h,p){if(l)t.minimumIntegerDigits=f.length;else{if(c&&h)throw new Error("We currently do not support maximum integer digits");if(p)throw new Error("We currently do not support exact integer digits")}return""});continue}if(Pi.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(u,l,f,c,h,p){return f==="*"?t.minimumFractionDigits=l.length:c&&c[0]==="#"?t.maximumFractionDigits=c.length:h&&p?(t.minimumFractionDigits=h.length,t.maximumFractionDigits=h.length+p.length):(t.minimumFractionDigits=l.length,t.maximumFractionDigits=l.length),""});var s=i.options[0];s==="w"?t=R(R({},t),{trailingZeroDisplay:"stripIfInteger"}):s&&(t=R(R({},t),hn(s)));continue}if(Bi.test(i.stem)){t=R(R({},t),hn(i.stem));continue}var o=Ri(i.stem);o&&(t=R(R({},t),o));var a=io(i.stem);a&&(t=R(R({},t),a))}return t}var Ut={"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 ao(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 o=1+(s&1),a=s<2?1:3+(s>>1),u="a",l=oo(t);for((l=="H"||l=="k")&&(a=0);a-- >0;)r+=u;for(;o-- >0;)r=l+r}else i==="J"?r+="H":r+=i}return r}function oo(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=Ut[n||""]||Ut[r||""]||Ut["".concat(r,"-001")]||Ut["001"];return i[0]}var cr,uo=new RegExp("^".concat(Mi.source,"*")),lo=new RegExp("".concat(Mi.source,"*$"));function A(e,t){return{start:e,end:t}}var fo=!!String.prototype.startsWith&&"_a".startsWith("a",1),ho=!!String.fromCodePoint,co=!!Object.fromEntries,po=!!String.prototype.codePointAt,vo=!!String.prototype.trimStart,mo=!!String.prototype.trimEnd,_o=!!Number.isSafeInteger,bo=_o?Number.isSafeInteger:function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e&&Math.abs(e)<=9007199254740991},Tr=!0;try{var go=Ci("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");Tr=((cr=go.exec("a"))===null||cr===void 0?void 0:cr[0])==="a"}catch{Tr=!1}var dn=fo?function(t,r,n){return t.startsWith(r,n)}:function(t,r,n){return t.slice(n,n+r.length)===r},Hr=ho?String.fromCodePoint:function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];for(var n="",i=t.length,s=0,o;i>s;){if(o=t[s++],o>1114111)throw RangeError(o+" is not a valid code point");n+=o<65536?String.fromCharCode(o):String.fromCharCode(((o-=65536)>>10)+55296,o%1024+56320)}return n},pn=co?Object.fromEntries:function(t){for(var r={},n=0,i=t;n<i.length;n++){var s=i[n],o=s[0],a=s[1];r[o]=a}return r},Ii=po?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}},yo=vo?function(t){return t.trimStart()}:function(t){return t.replace(uo,"")},Eo=mo?function(t){return t.trimEnd()}:function(t){return t.replace(lo,"")};function Ci(e,t){return new RegExp(e,t)}var Ar;if(Tr){var vn=Ci("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");Ar=function(t,r){var n;vn.lastIndex=r;var i=vn.exec(t);return(n=i[1])!==null&&n!==void 0?n:""}}else Ar=function(t,r){for(var n=[];;){var i=Ii(t,r);if(i===void 0||ki(i)||To(i))break;n.push(i),r+=i>=65536?2:1}return Hr.apply(void 0,n)};var xo=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 o=this.parseArgument(t,n);if(o.err)return o;i.push(o.val)}else{if(s===125&&t>0)break;if(s===35&&(r==="plural"||r==="selectordinal")){var a=this.clonePosition();this.bump(),i.push({type:P.pound,location:A(a,this.clonePosition())})}else if(s===60&&!this.ignoreTag&&this.peek()===47){if(n)break;return this.error(T.UNMATCHED_CLOSING_TAG,A(this.clonePosition(),this.clonePosition()))}else if(s===60&&!this.ignoreTag&&$r(this.peek()||0)){var o=this.parseTag(t,r);if(o.err)return o;i.push(o.val)}else{var o=this.parseLiteral(t,r);if(o.err)return o;i.push(o.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:P.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 o=s.val,a=this.clonePosition();if(this.bumpIf("</")){if(this.isEOF()||!$r(this.char()))return this.error(T.INVALID_TAG,A(a,this.clonePosition()));var u=this.clonePosition(),l=this.parseTagName();return i!==l?this.error(T.UNMATCHED_CLOSING_TAG,A(u,this.clonePosition())):(this.bumpSpace(),this.bumpIf(">")?{val:{type:P.tag,value:i,children:o,location:A(n,this.clonePosition())},err:null}:this.error(T.INVALID_TAG,A(a,this.clonePosition())))}else return this.error(T.UNCLOSED_TAG,A(n,this.clonePosition()))}else return this.error(T.INVALID_TAG,A(n,this.clonePosition()))},e.prototype.parseTagName=function(){var t=this.offset();for(this.bump();!this.isEOF()&&So(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 o=this.tryParseUnquoted(t,r);if(o){i+=o;continue}var a=this.tryParseLeftAngleBracket();if(a){i+=a;continue}break}var u=A(n,this.clonePosition());return{val:{type:P.literal,value:i,location:u},err:null}},e.prototype.tryParseLeftAngleBracket=function(){return!this.isEOF()&&this.char()===60&&(this.ignoreTag||!wo(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 Hr.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(),Hr(n))},e.prototype.parseArgument=function(t,r){var n=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(T.EXPECT_ARGUMENT_CLOSING_BRACE,A(n,this.clonePosition()));if(this.char()===125)return this.bump(),this.error(T.EMPTY_ARGUMENT,A(n,this.clonePosition()));var i=this.parseIdentifierIfPossible().value;if(!i)return this.error(T.MALFORMED_ARGUMENT,A(n,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(T.EXPECT_ARGUMENT_CLOSING_BRACE,A(n,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:P.argument,value:i,location:A(n,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(T.EXPECT_ARGUMENT_CLOSING_BRACE,A(n,this.clonePosition())):this.parseArgumentOptions(t,r,i,n);default:return this.error(T.MALFORMED_ARGUMENT,A(n,this.clonePosition()))}},e.prototype.parseIdentifierIfPossible=function(){var t=this.clonePosition(),r=this.offset(),n=Ar(this.message,r),i=r+n.length;this.bumpTo(i);var s=this.clonePosition(),o=A(t,s);return{value:n,location:o}},e.prototype.parseArgumentOptions=function(t,r,n,i){var s,o=this.clonePosition(),a=this.parseIdentifierIfPossible().value,u=this.clonePosition();switch(a){case"":return this.error(T.EXPECT_ARGUMENT_TYPE,A(o,u));case"number":case"date":case"time":{this.bumpSpace();var l=null;if(this.bumpIf(",")){this.bumpSpace();var f=this.clonePosition(),c=this.parseSimpleArgStyleIfPossible();if(c.err)return c;var h=Eo(c.val);if(h.length===0)return this.error(T.EXPECT_ARGUMENT_STYLE,A(this.clonePosition(),this.clonePosition()));var p=A(f,this.clonePosition());l={style:h,styleLocation:p}}var v=this.tryParseArgumentClose(i);if(v.err)return v;var E=A(i,this.clonePosition());if(l&&dn(l?.style,"::",0)){var $=yo(l.style.slice(2));if(a==="number"){var c=this.parseNumberSkeletonFromString($,l.styleLocation);return c.err?c:{val:{type:P.number,value:n,location:E,style:c.val},err:null}}else{if($.length===0)return this.error(T.EXPECT_DATE_TIME_SKELETON,E);var I=$;this.locale&&(I=ao($,this.locale));var h={type:ft.dateTime,pattern:I,location:l.styleLocation,parsedOptions:this.shouldParseSkeletons?Ka(I):{}},G=a==="date"?P.date:P.time;return{val:{type:G,value:n,location:E,style:h},err:null}}}return{val:{type:a==="number"?P.number:a==="date"?P.date:P.time,value:n,location:E,style:(s=l?.style)!==null&&s!==void 0?s:null},err:null}}case"plural":case"selectordinal":case"select":{var D=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(T.EXPECT_SELECT_ARGUMENT_OPTIONS,A(D,Zt({},D)));this.bumpSpace();var ye=this.parseIdentifierIfPossible(),Z=0;if(a!=="select"&&ye.value==="offset"){if(!this.bumpIf(":"))return this.error(T.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,A(this.clonePosition(),this.clonePosition()));this.bumpSpace();var c=this.tryParseDecimalInteger(T.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,T.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);if(c.err)return c;this.bumpSpace(),ye=this.parseIdentifierIfPossible(),Z=c.val}var J=this.tryParsePluralOrSelectOptions(t,a,r,ye);if(J.err)return J;var v=this.tryParseArgumentClose(i);if(v.err)return v;var Ue=A(i,this.clonePosition());return a==="select"?{val:{type:P.select,value:n,options:pn(J.val),location:Ue},err:null}:{val:{type:P.plural,value:n,options:pn(J.val),offset:Z,pluralType:a==="plural"?"cardinal":"ordinal",location:Ue},err:null}}default:return this.error(T.INVALID_ARGUMENT_TYPE,A(o,u))}},e.prototype.tryParseArgumentClose=function(t){return this.isEOF()||this.char()!==125?this.error(T.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(T.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=to(t)}catch{return this.error(T.INVALID_NUMBER_SKELETON,r)}return{val:{type:ft.number,tokens:n,location:r,parsedOptions:this.shouldParseSkeletons?so(n):{}},err:null}},e.prototype.tryParsePluralOrSelectOptions=function(t,r,n,i){for(var s,o=!1,a=[],u=new Set,l=i.value,f=i.location;;){if(l.length===0){var c=this.clonePosition();if(r!=="select"&&this.bumpIf("=")){var h=this.tryParseDecimalInteger(T.EXPECT_PLURAL_ARGUMENT_SELECTOR,T.INVALID_PLURAL_ARGUMENT_SELECTOR);if(h.err)return h;f=A(c,this.clonePosition()),l=this.message.slice(c.offset,this.offset())}else break}if(u.has(l))return this.error(r==="select"?T.DUPLICATE_SELECT_ARGUMENT_SELECTOR:T.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,f);l==="other"&&(o=!0),this.bumpSpace();var p=this.clonePosition();if(!this.bumpIf("{"))return this.error(r==="select"?T.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:T.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,A(this.clonePosition(),this.clonePosition()));var v=this.parseMessage(t+1,r,n);if(v.err)return v;var E=this.tryParseArgumentClose(p);if(E.err)return E;a.push([l,{value:v.val,location:A(p,this.clonePosition())}]),u.add(l),this.bumpSpace(),s=this.parseIdentifierIfPossible(),l=s.value,f=s.location}return a.length===0?this.error(r==="select"?T.EXPECT_SELECT_ARGUMENT_SELECTOR:T.EXPECT_PLURAL_ARGUMENT_SELECTOR,A(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!o?this.error(T.MISSING_OTHER_CLAUSE,A(this.clonePosition(),this.clonePosition())):{val:a,err:null}},e.prototype.tryParseDecimalInteger=function(t,r){var n=1,i=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(n=-1);for(var s=!1,o=0;!this.isEOF();){var a=this.char();if(a>=48&&a<=57)s=!0,o=o*10+(a-48),this.bump();else break}var u=A(i,this.clonePosition());return s?(o*=n,bo(o)?{val:o,err:null}:this.error(r,u)):this.error(t,u)},e.prototype.offset=function(){return this.position.offset},e.prototype.isEOF=function(){return this.offset()===this.message.length},e.prototype.clonePosition=function(){return{offset:this.position.offset,line:this.position.line,column:this.position.column}},e.prototype.char=function(){var t=this.position.offset;if(t>=this.message.length)throw Error("out of bound");var r=Ii(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(dn(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()&&ki(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 $r(e){return e>=97&&e<=122||e>=65&&e<=90}function wo(e){return $r(e)||e===47}function So(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 ki(e){return e>=9&&e<=13||e===32||e===133||e>=8206&&e<=8207||e===8232||e===8233}function To(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 Or(e){e.forEach(function(t){if(delete t.location,Ai(t)||$i(t))for(var r in t.options)delete t.options[r].location,Or(t.options[r].value);else Si(t)&&Ni(t.style)||(Ti(t)||Hi(t))&&Sr(t.style)?delete t.style.location:Oi(t)&&Or(t.children)})}function Ho(e,t){t===void 0&&(t={}),t=Zt({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var r=new xo(e,t).parse();if(r.err){var n=SyntaxError(T[r.err.kind]);throw n.location=r.err.location,n.originalMessage=r.err.message,n}return t?.captureLocation||Or(r.val),r.val}var ht;(function(e){e.MISSING_VALUE="MISSING_VALUE",e.INVALID_VALUE="INVALID_VALUE",e.MISSING_INTL_API="MISSING_INTL_API"})(ht||(ht={}));var ir=function(e){nr(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),mn=function(e){nr(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('", "'),'"'),ht.INVALID_VALUE,s)||this}return t}(ir),Ao=function(e){nr(t,e);function t(r,n,i){return e.call(this,'Value for "'.concat(r,'" must be of type ').concat(n),ht.INVALID_VALUE,i)||this}return t}(ir),$o=function(e){nr(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,'"'),ht.MISSING_VALUE,n)||this}return t}(ir),Q;(function(e){e[e.literal=0]="literal",e[e.object=1]="object"})(Q||(Q={}));function Oo(e){return e.length<2?e:e.reduce(function(t,r){var n=t[t.length-1];return!n||n.type!==Q.literal||r.type!==Q.literal?t.push(r):n.value+=r.value,t},[])}function No(e){return typeof e=="function"}function Xt(e,t,r,n,i,s,o){if(e.length===1&&ln(e[0]))return[{type:Q.literal,value:e[0].value}];for(var a=[],u=0,l=e;u<l.length;u++){var f=l[u];if(ln(f)){a.push({type:Q.literal,value:f.value});continue}if(Ja(f)){typeof s=="number"&&a.push({type:Q.literal,value:r.getNumberFormat(t).format(s)});continue}var c=f.value;if(!(i&&c in i))throw new $o(c,o);var h=i[c];if(Za(f)){(!h||typeof h=="string"||typeof h=="number")&&(h=typeof h=="string"||typeof h=="number"?String(h):""),a.push({type:typeof h=="string"?Q.literal:Q.object,value:h});continue}if(Ti(f)){var p=typeof f.style=="string"?n.date[f.style]:Sr(f.style)?f.style.parsedOptions:void 0;a.push({type:Q.literal,value:r.getDateTimeFormat(t,p).format(h)});continue}if(Hi(f)){var p=typeof f.style=="string"?n.time[f.style]:Sr(f.style)?f.style.parsedOptions:n.time.medium;a.push({type:Q.literal,value:r.getDateTimeFormat(t,p).format(h)});continue}if(Si(f)){var p=typeof f.style=="string"?n.number[f.style]:Ni(f.style)?f.style.parsedOptions:void 0;p&&p.scale&&(h=h*(p.scale||1)),a.push({type:Q.literal,value:r.getNumberFormat(t,p).format(h)});continue}if(Oi(f)){var v=f.children,E=f.value,$=i[E];if(!No($))throw new Ao(E,"function",o);var I=Xt(v,t,r,n,i,s),G=$(I.map(function(Z){return Z.value}));Array.isArray(G)||(G=[G]),a.push.apply(a,G.map(function(Z){return{type:typeof Z=="string"?Q.literal:Q.object,value:Z}}))}if(Ai(f)){var D=f.options[h]||f.options.other;if(!D)throw new mn(f.value,h,Object.keys(f.options),o);a.push.apply(a,Xt(D.value,t,r,n,i));continue}if($i(f)){var D=f.options["=".concat(h)];if(!D){if(!Intl.PluralRules)throw new ir(`Intl.PluralRules is not available in this environment.
3
- Try polyfilling it using "@formatjs/intl-pluralrules"
4
- `,ht.MISSING_INTL_API,o);var ye=r.getPluralRules(t,{type:f.pluralType}).select(h-(f.offset||0));D=f.options[ye]||f.options.other}if(!D)throw new mn(f.value,h,Object.keys(f.options),o);a.push.apply(a,Xt(D.value,t,r,n,i,h-(f.offset||0)));continue}}return Oo(a)}function Mo(e,t){return t?me(me(me({},e||{}),t||{}),Object.keys(e).reduce(function(r,n){return r[n]=me(me({},e[n]),t[n]||{}),r},{})):e}function Bo(e,t){return t?Object.keys(e).reduce(function(r,n){return r[n]=Mo(e[n],t[n]),r},me({},e)):e}function dr(e){return{create:function(){return{get:function(t){return e[t]},set:function(t,r){e[t]=r}}}}}function Po(e){return e===void 0&&(e={number:{},dateTime:{},pluralRules:{}}),{getNumberFormat:fr(function(){for(var t,r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return new((t=Intl.NumberFormat).bind.apply(t,lr([void 0],r,!1)))},{cache:dr(e.number),strategy:hr.variadic}),getDateTimeFormat:fr(function(){for(var t,r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return new((t=Intl.DateTimeFormat).bind.apply(t,lr([void 0],r,!1)))},{cache:dr(e.dateTime),strategy:hr.variadic}),getPluralRules:fr(function(){for(var t,r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return new((t=Intl.PluralRules).bind.apply(t,lr([void 0],r,!1)))},{cache:dr(e.pluralRules),strategy:hr.variadic})}}var Ro=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(u){var l=s.formatToParts(u);if(l.length===1)return l[0].value;var f=l.reduce(function(c,h){return!c.length||h.type!==Q.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(u){return Xt(s.ast,s.locales,s.formatters,s.formats,u,void 0,s.message)},this.resolvedOptions=function(){var u;return{locale:((u=s.resolvedLocale)===null||u===void 0?void 0:u.toString())||Intl.NumberFormat.supportedLocalesOf(s.locales)[0]}},this.getAst=function(){return s.ast},this.locales=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 o=i||{};o.formatters;var a=Ga(o,["formatters"]);this.ast=e.__parse(t,me(me({},a),{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=Bo(e.formats,n),this.formatters=i&&i.formatters||Po(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=Ho,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 Io(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 Pe={},Co=(e,t,r)=>r&&(t in Pe||(Pe[t]={}),e in Pe[t]||(Pe[t][e]=r),r),Li=(e,t)=>{if(t==null)return;if(t in Pe&&e in Pe[t])return Pe[t][e];const r=sr(t);for(let n=0;n<r.length;n++){const i=r[n],s=Lo(i,e);if(s)return Co(e,t,s)}};let Xr;const pt=rr({});function ko(e){return Xr[e]||null}function Di(e){return e in Xr}function Lo(e,t){if(!Di(e))return null;const r=ko(e);return Io(r,t)}function Do(e){if(e==null)return;const t=sr(e);for(let r=0;r<t.length;r++){const n=t[r];if(Di(n))return n}}function Ui(e,...t){delete Pe[e],pt.update(r=>(r[e]=Fa.all([r[e]||{},...t]),r))}dt([pt],([e])=>Object.keys(e));pt.subscribe(e=>Xr=e);const Wt={};function Uo(e,t){Wt[e].delete(t),Wt[e].size===0&&delete Wt[e]}function Fi(e){return Wt[e]}function Fo(e){return sr(e).map(t=>{const r=Fi(t);return[t,r?[...r]:[]]}).filter(([,t])=>t.length>0)}function Nr(e){return e==null?!1:sr(e).some(t=>{var r;return(r=Fi(t))==null?void 0:r.size})}function Go(e,t){return Promise.all(t.map(n=>(Uo(e,n),n().then(i=>i.default||i)))).then(n=>Ui(e,...n))}const yt={};function Gi(e){if(!Nr(e))return e in yt?yt[e]:Promise.resolve();const t=Fo(e);return yt[e]=Promise.all(t.map(([r,n])=>Go(r,n))).then(()=>{if(Nr(e))return Gi(e);delete yt[e]}),yt[e]}const jo={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"}}},Vo={fallbackLocale:null,loadingDelay:200,formats:jo,warnOnMissingMessages:!0,handleMissingMessage:void 0,ignoreTag:!0},Xo=Vo;function ct(){return Xo}const pr=rr(!1);var Wo=Object.defineProperty,zo=Object.defineProperties,Yo=Object.getOwnPropertyDescriptors,_n=Object.getOwnPropertySymbols,qo=Object.prototype.hasOwnProperty,Zo=Object.prototype.propertyIsEnumerable,bn=(e,t,r)=>t in e?Wo(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Jo=(e,t)=>{for(var r in t||(t={}))qo.call(t,r)&&bn(e,r,t[r]);if(_n)for(var r of _n(t))Zo.call(t,r)&&bn(e,r,t[r]);return e},Qo=(e,t)=>zo(e,Yo(t));let Mr;const Jt=rr(null);function gn(e){return e.split("-").map((t,r,n)=>n.slice(0,r+1).join("-")).reverse()}function sr(e,t=ct().fallbackLocale){const r=gn(e);return t?[...new Set([...r,...gn(t)])]:r}function qe(){return Mr??void 0}Jt.subscribe(e=>{Mr=e??void 0,typeof window<"u"&&e!=null&&document.documentElement.setAttribute("lang",e)});const Ko=e=>{if(e&&Do(e)&&Nr(e)){const{loadingDelay:t}=ct();let r;return typeof window<"u"&&qe()!=null&&t?r=window.setTimeout(()=>pr.set(!0),t):pr.set(!0),Gi(e).then(()=>{Jt.set(e)}).finally(()=>{clearTimeout(r),pr.set(!1)})}return Jt.set(e)},ze=Qo(Jo({},Jt),{set:Ko}),ar=e=>{const t=Object.create(null);return n=>{const i=JSON.stringify(n);return i in t?t[i]:t[i]=e(n)}};var eu=Object.defineProperty,Qt=Object.getOwnPropertySymbols,ji=Object.prototype.hasOwnProperty,Vi=Object.prototype.propertyIsEnumerable,yn=(e,t,r)=>t in e?eu(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Wr=(e,t)=>{for(var r in t||(t={}))ji.call(t,r)&&yn(e,r,t[r]);if(Qt)for(var r of Qt(t))Vi.call(t,r)&&yn(e,r,t[r]);return e},vt=(e,t)=>{var r={};for(var n in e)ji.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Qt)for(var n of Qt(e))t.indexOf(n)<0&&Vi.call(e,n)&&(r[n]=e[n]);return r};const Mt=(e,t)=>{const{formats:r}=ct();if(e in r&&t in r[e])return r[e][t];throw new Error(`[svelte-i18n] Unknown "${t}" ${e} format.`)},tu=ar(e=>{var t=e,{locale:r,format:n}=t,i=vt(t,["locale","format"]);if(r==null)throw new Error('[svelte-i18n] A "locale" must be set to format numbers');return n&&(i=Mt("number",n)),new Intl.NumberFormat(r,i)}),ru=ar(e=>{var t=e,{locale:r,format:n}=t,i=vt(t,["locale","format"]);if(r==null)throw new Error('[svelte-i18n] A "locale" must be set to format dates');return n?i=Mt("date",n):Object.keys(i).length===0&&(i=Mt("date","short")),new Intl.DateTimeFormat(r,i)}),nu=ar(e=>{var t=e,{locale:r,format:n}=t,i=vt(t,["locale","format"]);if(r==null)throw new Error('[svelte-i18n] A "locale" must be set to format time values');return n?i=Mt("time",n):Object.keys(i).length===0&&(i=Mt("time","short")),new Intl.DateTimeFormat(r,i)}),iu=(e={})=>{var t=e,{locale:r=qe()}=t,n=vt(t,["locale"]);return tu(Wr({locale:r},n))},su=(e={})=>{var t=e,{locale:r=qe()}=t,n=vt(t,["locale"]);return ru(Wr({locale:r},n))},au=(e={})=>{var t=e,{locale:r=qe()}=t,n=vt(t,["locale"]);return nu(Wr({locale:r},n))},ou=ar((e,t=qe())=>new Ro(e,t,ct().formats,{ignoreTag:ct().ignoreTag})),uu=(e,t={})=>{var r,n,i,s;let o=t;typeof e=="object"&&(o=e,e=o.id);const{values:a,locale:u=qe(),default:l}=o;if(u==null)throw new Error("[svelte-i18n] Cannot format a message without first setting the initial locale.");let f=Li(e,u);if(!f)f=(s=(i=(n=(r=ct()).handleMissingMessage)==null?void 0:n.call(r,{locale:u,id:e,defaultValue:l}))!=null?i:l)!=null?s:e;else if(typeof f!="string")return console.warn(`[svelte-i18n] Message with id "${e}" must be of type "string", found: "${typeof f}". Gettin its value through the "$format" method is deprecated; use the "json" method instead.`),f;if(!a)return f;let c=f;try{c=ou(f,u).format(a)}catch(h){h instanceof Error&&console.warn(`[svelte-i18n] Message "${e}" has syntax error:`,h.message)}return c},lu=(e,t)=>au(t).format(e),fu=(e,t)=>su(t).format(e),hu=(e,t)=>iu(t).format(e),cu=(e,t=qe())=>Li(e,t),du=dt([ze,pt],()=>uu);dt([ze],()=>lu);dt([ze],()=>fu);dt([ze],()=>hu);dt([ze,pt],()=>cu);function pu({withLocale:e,translations:t}){ze.subscribe(r=>{r==null&&(pt.set(t),ze.set(e))})}function En(e,t){Ui(e,t)}const vu={en:{requestRakeback:"Request Rakeback"},tr:{requestRakeback:"Rakeback Talebi"},da:{requestRakeback:"Anmod om Rakeback"},de:{requestRakeback:"Rakeback anfordern"},nl:{requestRakeback:"Rakeback aanvragen"},fr:{requestRakeback:"Demander un Rakeback"},hu:{requestRakeback:"Rakeback igénylése"}},mu="RakebackClaimConfirmed";var _u=vi('<div class="loyalty-rakeback-card svelte-bm1wev"><div class="loyalty-rakeback-card__content svelte-bm1wev"><span class="loyalty-rakeback-card__amount svelte-bm1wev"> </span> <button class="loyalty-rakeback-card__button svelte-bm1wev" type="button"> </button></div></div>'),bu=vi('<div class="loyalty-rakeback-card svelte-bm1wev" aria-busy="true"><div class="loyalty-rakeback-card__content loyalty-rakeback-card__content--skeleton svelte-bm1wev"><span class="loyalty-rakeback-skeleton loyalty-rakeback-skeleton--amount svelte-bm1wev"></span> <span class="loyalty-rakeback-skeleton loyalty-rakeback-skeleton--button svelte-bm1wev"></span></div></div>');const gu={hash:"svelte-bm1wev",code:`.loyalty-rakeback-card.svelte-bm1wev {padding:14px 16px;display:inline-flex;flex-direction:column;background-color:var(--app-container-bg-default, #022652);border-radius:6px;border:1px solid var(--border-subtle, rgba(255, 255, 255, 0.1));width:100%;box-sizing:border-box;}.loyalty-rakeback-card__content.svelte-bm1wev {display:flex;align-items:baseline;gap:8px;justify-content:space-between;}.loyalty-rakeback-card__amount.svelte-bm1wev {color:var(--text-default, #ffffff);font-size:16px;font-weight:700;line-height:140%;}.loyalty-rakeback-card__button.svelte-bm1wev {height:37px;border-radius:6px;border-width:1px;padding:10px 16px;cursor:pointer;background:var(--button-secondary-bg-default, rgba(251, 251, 251, 0.1));border:solid 1px var(--button-secondary-border-default, rgba(251, 251, 251, 0.05));font-size:12px;font-weight:700;color:var(--button-secondary-text-default, #ffffff);}.loyalty-rakeback-card__button.svelte-bm1wev:disabled {opacity:0.4;cursor:default;}.loyalty-rakeback-skeleton.svelte-bm1wev {display:block;border-radius:4px;background:linear-gradient(
5
- 90deg,
6
- var(--app-container-bg-subtle, rgba(251, 251, 251, 0.1)) 0%,
7
- color-mix(in srgb, var(--app-container-bg-subtle, rgba(251, 251, 251, 0.1)) 80%, white) 50%,
8
- var(--app-container-bg-subtle, rgba(251, 251, 251, 0.1)) 100%
9
- );background-size:400% 100%;
10
- animation: svelte-bm1wev-loyalty-rakeback-shimmer 1.4s ease infinite;}.loyalty-rakeback-card__content--skeleton.svelte-bm1wev {align-items:center;}.loyalty-rakeback-skeleton--amount.svelte-bm1wev {width:120px;height:22px;}.loyalty-rakeback-skeleton--button.svelte-bm1wev {width:110px;height:37px;border-radius:6px;}
11
-
12
- @keyframes svelte-bm1wev-loyalty-rakeback-shimmer {
13
- 0% {
14
- background-position: 100% 50%;
15
- }
16
- 100% {
17
- background-position: 0 50%;
18
- }
19
- }
20
-
21
- @media (prefers-reduced-motion: reduce) {.loyalty-rakeback-skeleton.svelte-bm1wev {
22
- animation: none;}
23
- }`};function zr(e,t){Rr(t,!0),ca(e,gu);const r=()=>ws(du,"$_",n),[n,i]=Ss(),s=Be(t,"apiEndpoint",7,""),o=Be(t,"userSession",7,""),a=Be(t,"locale",7,""),u=Be(t,"translationUrl");pu({withLocale:a(),translations:{}}),Object.entries(vu).forEach(([b,C])=>{En(b,C)});const l=()=>{let b=new URL(u(),window.location.href);fetch(b.href).then(C=>C.json()).then(C=>{Object.keys(C).forEach(Oe=>{En(Oe,C[Oe])})}).catch(C=>{console.log("loyalty rakeback translation url err:",C)})};js(()=>{u()&&l()});let f=se(void 0),c=se(!1),h=se(!1),p=se(!1);const v=kt(()=>O(f)?Ea(O(f).total.points<=0?0:O(f).total.points,2):"0.00"),E=kt(()=>xa(O(f)?.currency??"",a())),$=kt(()=>!!O(f)?.claimable),I=kt(()=>O(c)),G=async()=>{if(!(!s()||!o())){z(p,!0);try{const b=await ma({apiEndpoint:s(),userSession:o(),locale:a()});if(!b.rakebackWallet){z(c,!1),Ha();return}z(f,b.rakebackWallet,!0),z(c,!0)}catch(b){console.error("Failed to load rakeback info:",b)}finally{z(p,!1)}}},D=()=>{!O($)||O(h)||!O(f)||wa(O(f).total.points)},ye=async()=>{if(!(!s()||!o()||!O(f))){z(h,!0);try{await _a({apiEndpoint:s(),userSession:o(),locale:a()}),await G(),Sa(O(f).total.points)}catch(b){console.error("Claim rakeback: ",b),Ta(b.message)}finally{z(h,!1)}}};tn(()=>{s(),o(),a(),G()}),tn(()=>{const b=C=>{C.data?.type===mu&&ye()};return window.addEventListener("message",b),()=>window.removeEventListener("message",b)});var Z={get apiEndpoint(){return s()},set apiEndpoint(b=""){s(b),Se()},get userSession(){return o()},set userSession(b=""){o(b),Se()},get locale(){return a()},set locale(b=""){a(b),Se()},get translationUrl(){return u()},set translationUrl(b){u(b),Se()}},J=sa(),Ue=Ls(J);{var mt=b=>{var C=_u(),Oe=Lt(C),y=Lt(Oe),_=Lt(y);Ct(y);var d=Ds(y,2),g=Lt(d,!0);Ct(d),Ct(Oe),Ct(C),Ys(m=>{on(_,`${O(v)??""} ${O(E)??""}`),d.disabled=O(h)||!O($),on(g,m)},[()=>r()("requestRakeback")]),ea("click",d,D),jt(b,C)},Ze=b=>{var C=bu();jt(b,C)};ha(Ue,b=>{O(I)?b(mt):O(p)&&b(Ze,1)})}jt(e,J);var U=Ir(Z);return i(),U}ta(["click"]);gi(zr,{apiEndpoint:{},userSession:{},locale:{},translationUrl:{}},[],[],{mode:"open"});function Xi(e,t){Rr(t,!0);let r=Be(t,"apiEndpoint",7,""),n=Be(t,"userSession",7,""),i=Be(t,"locale",7,""),s=Be(t,"translationUrl");var o={get apiEndpoint(){return r()},set apiEndpoint(a=""){r(a),Se()},get userSession(){return n()},set userSession(a=""){n(a),Se()},get locale(){return i()},set locale(a=""){i(a),Se()},get translationUrl(){return s()},set translationUrl(a){s(a),Se()}};return zr(e,{get apiEndpoint(){return r()},get userSession(){return n()},get locale(){return i()},get translationUrl(){return s()}}),Ir(o)}customElements.define("loyalty-rakeback",gi(Xi,{apiEndpoint:{},userSession:{},locale:{},translationUrl:{}},[],[]));const yu=Object.freeze(Object.defineProperty({__proto__:null,default:Xi},Symbol.toStringTag,{value:"Module"}));exports.LoyaltyRakeback=zr;exports.LoyaltyRakeback_ce=yu;