(function(ot,xe){typeof exports=="object"&&typeof module<"u"?module.exports=xe():typeof define=="function"&&define.amd?define(xe):(ot=typeof globalThis<"u"?globalThis:ot||self,ot.bookmakers_list=xe())})(this,(function(){"use strict";var xe=Array.isArray,br=Array.prototype.indexOf,kt=Array.from,wr=Object.defineProperty,Be=Object.getOwnPropertyDescriptor,$t=Object.getOwnPropertyDescriptors,kr=Object.prototype,Er=Array.prototype,Et=Object.getPrototypeOf,es=Object.isExtensible;function Or(e){return e()}function Ot(e){for(var t=0;t{e=r,t=n});return{promise:s,resolve:e,reject:t}}const P=2,ss=4,ut=8,re=16,ne=32,be=64,lt=128,J=512,F=1024,N=2048,ie=4096,K=8192,we=16384,St=32768,ke=65536,rs=1<<17,ns=1<<18,Fe=1<<19,is=1<<20,Ee=32768,Ct=1<<21,Rt=1<<22,ce=1<<23,He=Symbol("$state"),Sr=Symbol(""),Te=new class extends Error{name="StaleReactionError";message="The reaction that called `getAbortSignal()` was re-run or destroyed"};function Pt(e){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}function Cr(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function Rr(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function Pr(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function xr(e){throw new Error("https://svelte.dev/e/effect_orphan")}function Fr(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function Tr(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function qr(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function Ar(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function Mr(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}const Dr=1,Ir=2,Qr=16,jr=1,Lr=2,T=Symbol(),Ur="http://www.w3.org/1999/xhtml";function Nr(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}function as(e){return e===this.v}function Kr(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function os(e){return!Kr(e,this.v)}let Ge=!1,ji=!1;function zr(){Ge=!0}let E=null;function qe(e){E=e}function us(e){return ls().get(e)}function Br(e,t){return ls().set(e,t),t}function Ve(e,t=!1,s){E={p:E,i:!1,c:null,e:null,s:e,x:null,l:Ge&&!t?{s:null,u:null,$:[]}:null}}function We(e){var t=E,s=t.e;if(s!==null){t.e=null;for(var r of s)Rs(r)}return t.i=!0,E=t.p,{}}function Ye(){return!Ge||E!==null&&E.l===null}function ls(e){return E===null&&Pt(),E.c??=new Map(Hr(E)||void 0)}function Hr(e){let t=e.p;for(;t!==null;){const s=t.c;if(s!==null)return s;t=t.p}return null}let Ae=[];function Gr(){var e=Ae;Ae=[],Ot(e)}function xt(e){if(Ae.length===0){var t=Ae;queueMicrotask(()=>{t===Ae&&Gr()})}Ae.push(e)}function fs(e){var t=k;if(t===null)return m.f|=ce,e;if((t.f&St)===0){if((t.f<)===0)throw e;t.b.error(e)}else Me(e,t)}function Me(e,t){for(;t!==null;){if((t.f<)!==0)try{t.b.error(e);return}catch(s){e=s}t=t.parent}throw e}const ft=new Set;let R=null,z=null,he=[],Ft=null,Tt=!1;class X{committed=!1;current=new Map;previous=new Map;#t=new Set;#e=new Set;#s=0;#n=0;#r=null;#o=[];#a=[];skipped_effects=new Set;is_fork=!1;is_deferred(){return this.is_fork||this.#n>0}process(t){he=[],this.apply();var s={parent:null,effect:null,effects:[],render_effects:[],block_effects:[]};for(const r of t)this.#i(r,s);this.is_fork||this.#f(),this.is_deferred()?(this.#u(s.effects),this.#u(s.render_effects),this.#u(s.block_effects)):(R=null,cs(s.render_effects),cs(s.effects),this.#r?.resolve()),z=null}#i(t,s){t.f^=F;for(var r=t.first;r!==null;){var n=r.f,i=(n&(ne|be))!==0,o=i&&(n&F)!==0,a=o||(n&K)!==0||this.skipped_effects.has(r);if((r.f<)!==0&&r.b?.is_pending()&&(s={parent:s,effect:r,effects:[],render_effects:[],block_effects:[]}),!a&&r.fn!==null){i?r.f^=F:(n&ss)!==0?s.effects.push(r):et(r)&&((r.f&re)!==0&&s.block_effects.push(r),tt(r));var u=r.first;if(u!==null){r=u;continue}}var l=r.parent;for(r=r.next;r===null&&l!==null;)l===s.effect&&(this.#u(s.effects),this.#u(s.render_effects),this.#u(s.block_effects),s=s.parent),r=l.next,l=l.parent}}#u(t){for(const s of t)((s.f&N)!==0?this.#o:this.#a).push(s),this.#l(s.deps),q(s,F)}#l(t){if(t!==null)for(const s of t)(s.f&P)===0||(s.f&Ee)===0||(s.f^=Ee,this.#l(s.deps))}capture(t,s){this.previous.has(t)||this.previous.set(t,s),(t.f&ce)===0&&(this.current.set(t,t.v),z?.set(t,t.v))}activate(){R=this,this.apply()}deactivate(){R===this&&(R=null,z=null)}flush(){if(this.activate(),he.length>0){if(Vr(),R!==null&&R!==this)return}else this.#s===0&&this.process([]);this.deactivate()}discard(){for(const t of this.#e)t(this);this.#e.clear()}#f(){if(this.#n===0){for(const t of this.#t)t();this.#t.clear()}this.#s===0&&this.#c()}#c(){if(ft.size>1){this.previous.clear();var t=z,s=!0,r={parent:null,effect:null,effects:[],render_effects:[],block_effects:[]};for(const n of ft){if(n===this){s=!1;continue}const i=[];for(const[a,u]of this.current){if(n.current.has(a))if(s&&u!==n.current.get(a))n.current.set(a,u);else continue;i.push(a)}if(i.length===0)continue;const o=[...n.current.keys()].filter(a=>!this.current.has(a));if(o.length>0){const a=new Set,u=new Map;for(const l of i)hs(l,o,a,u);if(he.length>0){R=n,n.apply();for(const l of he)n.#i(l,r);he=[],n.deactivate()}}}R=null,z=t}this.committed=!0,ft.delete(this)}increment(t){this.#s+=1,t&&(this.#n+=1)}decrement(t){this.#s-=1,t&&(this.#n-=1),this.revive()}revive(){for(const t of this.#o)q(t,N),Oe(t);for(const t of this.#a)q(t,ie),Oe(t);this.#o=[],this.#a=[],this.flush()}oncommit(t){this.#t.add(t)}ondiscard(t){this.#e.add(t)}settled(){return(this.#r??=ts()).promise}static ensure(){if(R===null){const t=R=new X;ft.add(R),X.enqueue(()=>{R===t&&t.flush()})}return R}static enqueue(t){xt(t)}apply(){}}function Vr(){var e=Ce;Tt=!0;try{var t=0;for(Ds(!0);he.length>0;){var s=X.ensure();if(t++>1e3){var r,n;Wr()}s.process(he),de.clear()}}finally{Tt=!1,Ds(e),Ft=null}}function Wr(){try{Fr()}catch(e){Me(e,Ft)}}let ae=null;function cs(e){var t=e.length;if(t!==0){for(var s=0;s0)){de.clear();for(const n of ae){if((n.f&(we|K))!==0)continue;const i=[n];let o=n.parent;for(;o!==null;)ae.has(o)&&(ae.delete(o),i.push(o)),o=o.parent;for(let a=i.length-1;a>=0;a--){const u=i[a];(u.f&(we|K))===0&&tt(u)}}ae.clear()}}ae=null}}function hs(e,t,s,r){if(!s.has(e)&&(s.add(e),e.reactions!==null))for(const n of e.reactions){const i=n.f;(i&P)!==0?hs(n,t,s,r):(i&(Rt|re))!==0&&(i&N)===0&&ds(n,t,r)&&(q(n,N),Oe(n))}}function ds(e,t,s){const r=s.get(e);if(r!==void 0)return r;if(e.deps!==null)for(const n of e.deps){if(t.includes(n))return!0;if((n.f&P)!==0&&ds(n,t,s))return s.set(n,!0),!0}return s.set(e,!1),!1}function Oe(e){for(var t=Ft=e;t.parent!==null;){t=t.parent;var s=t.f;if(Tt&&t===k&&(s&re)!==0&&(s&ns)===0)return;if((s&(be|ne))!==0){if((s&F)===0)return;t.f^=F}}he.push(t)}function Yr(e){let t=0,s=ve(0),r;return()=>{vt()&&(_(s),hn(()=>(t===0&&(r=je(()=>e(()=>pe(s)))),t+=1,()=>{xt(()=>{t-=1,t===0&&(r?.(),r=void 0,pe(s))})})))}}var Zr=ke|Fe|lt;function Jr(e,t,s){new Xr(e,t,s)}class Xr{parent;#t=!1;#e;#s=null;#n;#r;#o;#a=null;#i=null;#u=null;#l=null;#f=null;#c=0;#h=0;#d=!1;#v=null;#p=Yr(()=>(this.#v=ve(this.#c),()=>{this.#v=null}));constructor(t,s,r){this.#e=t,this.#n=s,this.#r=r,this.parent=k.b,this.#t=!!this.#n.pending,this.#o=_t(()=>{k.b=this;{var n=this.#m();try{this.#a=V(()=>r(n))}catch(i){this.error(i)}this.#h>0?this.#y():this.#t=!1}return()=>{this.#f?.remove()}},Zr)}#b(){try{this.#a=V(()=>this.#r(this.#e))}catch(t){this.error(t)}this.#t=!1}#w(){const t=this.#n.pending;t&&(this.#i=V(()=>t(this.#e)),X.enqueue(()=>{var s=this.#m();this.#a=this.#_(()=>(X.ensure(),V(()=>this.#r(s)))),this.#h>0?this.#y():(Ie(this.#i,()=>{this.#i=null}),this.#t=!1)}))}#m(){var t=this.#e;return this.#t&&(this.#f=_e(),this.#e.before(this.#f),t=this.#f),t}is_pending(){return this.#t||!!this.parent&&this.parent.is_pending()}has_pending_snippet(){return!!this.#n.pending}#_(t){var s=k,r=m,n=E;ee(this.#o),j(this.#o),qe(this.#o.ctx);try{return t()}catch(i){return fs(i),null}finally{ee(s),j(r),qe(n)}}#y(){const t=this.#n.pending;this.#a!==null&&(this.#l=document.createDocumentFragment(),this.#l.append(this.#f),Ms(this.#a,this.#l)),this.#i===null&&(this.#i=V(()=>t(this.#e)))}#g(t){if(!this.has_pending_snippet()){this.parent&&this.parent.#g(t);return}this.#h+=t,this.#h===0&&(this.#t=!1,this.#i&&Ie(this.#i,()=>{this.#i=null}),this.#l&&(this.#e.before(this.#l),this.#l=null))}update_pending_count(t){this.#g(t),this.#c+=t,this.#v&&Ze(this.#v,this.#c)}get_effect_pending(){return this.#p(),_(this.#v)}error(t){var s=this.#n.onerror;let r=this.#n.failed;if(this.#d||!s&&!r)throw t;this.#a&&(Q(this.#a),this.#a=null),this.#i&&(Q(this.#i),this.#i=null),this.#u&&(Q(this.#u),this.#u=null);var n=!1,i=!1;const o=()=>{if(n){Nr();return}n=!0,i&&Mr(),X.ensure(),this.#c=0,this.#u!==null&&Ie(this.#u,()=>{this.#u=null}),this.#t=this.has_pending_snippet(),this.#a=this.#_(()=>(this.#d=!1,V(()=>this.#r(this.#e)))),this.#h>0?this.#y():this.#t=!1};var a=m;try{j(null),i=!0,s?.(t,o),i=!1}catch(u){Me(u,this.#o&&this.#o.parent)}finally{j(a)}r&&xt(()=>{this.#u=this.#_(()=>{X.ensure(),this.#d=!0;try{return V(()=>{r(this.#e,()=>t,()=>o)})}catch(u){return Me(u,this.#o.parent),null}finally{this.#d=!1}})})}}function $r(e,t,s,r){const n=Ye()?ht:ps;if(s.length===0&&e.length===0){r(t.map(n));return}var i=R,o=k,a=en();function u(){Promise.all(s.map(l=>tn(l))).then(l=>{a();try{r([...t.map(n),...l])}catch(f){(o.f&we)===0&&Me(f,o)}i?.deactivate(),ct()}).catch(l=>{Me(l,o)})}e.length>0?Promise.all(e).then(()=>{a();try{return u()}finally{i?.deactivate(),ct()}}):u()}function en(){var e=k,t=m,s=E,r=R;return function(i=!0){ee(e),j(t),qe(s),i&&r?.activate()}}function ct(){ee(null),j(null),qe(null)}function ht(e){var t=P|N,s=m!==null&&(m.f&P)!==0?m:null;return k!==null&&(k.f|=Fe),{ctx:E,deps:null,effects:null,equals:as,f:t,fn:e,reactions:null,rv:0,v:T,wv:0,parent:s??k,ac:null}}function tn(e,t){let s=k;s===null&&Cr();var r=s.b,n=void 0,i=ve(T),o=!m,a=new Map;return cn(()=>{var u=ts();n=u.promise;try{Promise.resolve(e()).then(u.resolve,u.reject).then(()=>{l===R&&l.committed&&l.deactivate(),ct()})}catch(c){u.reject(c),ct()}var l=R;if(o){var f=!r.is_pending();r.update_pending_count(1),l.increment(f),a.get(l)?.reject(Te),a.delete(l),a.set(l,u)}const h=(c,v=void 0)=>{if(l.activate(),v)v!==Te&&(i.f|=ce,Ze(i,v));else{(i.f&ce)!==0&&(i.f^=ce),Ze(i,c);for(const[p,d]of a){if(a.delete(p),p===l)break;d.reject(Te)}}o&&(r.update_pending_count(-1),l.decrement(f))};u.promise.then(h,c=>h(null,c||"unknown"))}),ln(()=>{for(const u of a.values())u.reject(Te)}),new Promise(u=>{function l(f){function h(){f===n?u(i):l(n)}f.then(h,h)}l(n)})}function vs(e){const t=ht(e);return Qs(t),t}function ps(e){const t=ht(e);return t.equals=os,t}function _s(e){var t=e.effects;if(t!==null){e.effects=null;for(var s=0;s0&&!ms&&nn()}return t}function nn(){ms=!1;const e=Array.from(At);for(const t of e)(t.f&F)!==0&&q(t,ie),et(t)&&tt(t);At.clear()}function pe(e){I(e,e.v+1)}function gs(e,t){var s=e.reactions;if(s!==null)for(var r=Ye(),n=s.length,i=0;i{if(le===i)return a();var u=m,l=le;j(null),Ls(i);var f=a();return j(u),Ls(l),f};return r&&s.set("length",B(e.length)),new Proxy(e,{defineProperty(a,u,l){(!("value"in l)||l.configurable===!1||l.enumerable===!1||l.writable===!1)&&Tr();var f=s.get(u);return f===void 0?f=o(()=>{var h=B(l.value);return s.set(u,h),h}):I(f,l.value,!0),!0},deleteProperty(a,u){var l=s.get(u);if(l===void 0){if(u in a){const f=o(()=>B(T));s.set(u,f),pe(n)}}else I(l,T),pe(n);return!0},get(a,u,l){if(u===He)return e;var f=s.get(u),h=u in a;if(f===void 0&&(!h||Be(a,u)?.writable)&&(f=o(()=>{var v=De(h?a[u]:T),p=B(v);return p}),s.set(u,f)),f!==void 0){var c=_(f);return c===T?void 0:c}return Reflect.get(a,u,l)},getOwnPropertyDescriptor(a,u){var l=Reflect.getOwnPropertyDescriptor(a,u);if(l&&"value"in l){var f=s.get(u);f&&(l.value=_(f))}else if(l===void 0){var h=s.get(u),c=h?.v;if(h!==void 0&&c!==T)return{enumerable:!0,configurable:!0,value:c,writable:!0}}return l},has(a,u){if(u===He)return!0;var l=s.get(u),f=l!==void 0&&l.v!==T||Reflect.has(a,u);if(l!==void 0||k!==null&&(!f||Be(a,u)?.writable)){l===void 0&&(l=o(()=>{var c=f?De(a[u]):T,v=B(c);return v}),s.set(u,l));var h=_(l);if(h===T)return!1}return f},set(a,u,l,f){var h=s.get(u),c=u in a;if(r&&u==="length")for(var v=l;vB(T)),s.set(v+"",p))}if(h===void 0)(!c||Be(a,u)?.writable)&&(h=o(()=>B(void 0)),I(h,De(l)),s.set(u,h));else{c=h.v!==T;var d=o(()=>De(l));I(h,d)}var y=Reflect.getOwnPropertyDescriptor(a,u);if(y?.set&&y.set.call(f,l),!c){if(r&&typeof u=="string"){var g=s.get("length"),w=Number(u);Number.isInteger(w)&&w>=g.v&&I(g,w+1)}pe(n)}return!0},ownKeys(a){_(n);var u=Reflect.ownKeys(a).filter(h=>{var c=s.get(h);return c===void 0||c.v!==T});for(var[l,f]of s)f.v!==T&&!(l in a)&&u.push(l);return u},setPrototypeOf(){qr()}})}var bs,ws,ks,Es;function an(){if(bs===void 0){bs=window,ws=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,s=Text.prototype;ks=Be(t,"firstChild").get,Es=Be(t,"nextSibling").get,es(e)&&(e.__click=void 0,e.__className=void 0,e.__attributes=null,e.__style=void 0,e.__e=void 0),es(s)&&(s.__t=void 0)}}function _e(e=""){return document.createTextNode(e)}function dt(e){return ks.call(e)}function Je(e){return Es.call(e)}function G(e,t){return dt(e)}function Se(e,t=!1){{var s=dt(e);return s instanceof Comment&&s.data===""?Je(s):s}}function ye(e,t=1,s=!1){let r=e;for(;t--;)r=Je(r);return r}function on(e){e.textContent=""}function Os(){return!1}function Ss(e){var t=m,s=k;j(null),ee(null);try{return e()}finally{j(t),ee(s)}}function Cs(e){k===null&&(m===null&&xr(),Pr()),Qe&&Rr()}function un(e,t){var s=t.last;s===null?t.last=t.first=e:(s.next=e,e.prev=s,t.last=e)}function oe(e,t,s){var r=k;r!==null&&(r.f&K)!==0&&(e|=K);var n={ctx:E,deps:null,nodes_start:null,nodes_end:null,f:e|N|J,first:null,fn:t,last:null,next:null,parent:r,b:r&&r.b,prev:null,teardown:null,transitions:null,wv:0,ac:null};if(s)try{tt(n),n.f|=St}catch(a){throw Q(n),a}else t!==null&&Oe(n);var i=n;if(s&&i.deps===null&&i.teardown===null&&i.nodes_start===null&&i.first===i.last&&(i.f&Fe)===0&&(i=i.first,(e&re)!==0&&(e&ke)!==0&&i!==null&&(i.f|=ke)),i!==null&&(i.parent=r,r!==null&&un(i,r),m!==null&&(m.f&P)!==0&&(e&be)===0)){var o=m;(o.effects??=[]).push(i)}return n}function vt(){return m!==null&&!$}function ln(e){const t=oe(ut,null,!1);return q(t,F),t.teardown=e,t}function Xe(e){Cs();var t=k.f,s=!m&&(t&ne)!==0&&(t&St)===0;if(s){var r=E;(r.e??=[]).push(e)}else return Rs(e)}function Rs(e){return oe(ss|is,e,!1)}function Ps(e){return Cs(),oe(ut|is,e,!0)}function fn(e){X.ensure();const t=oe(be|Fe,e,!0);return(s={})=>new Promise(r=>{s.outro?Ie(t,()=>{Q(t),r(void 0)}):(Q(t),r(void 0))})}function cn(e){return oe(Rt|Fe,e,!0)}function hn(e,t=0){return oe(ut|t,e,!0)}function pt(e,t=[],s=[],r=[]){$r(r,t,s,n=>{oe(ut,()=>e(...n.map(_)),!0)})}function _t(e,t=0){var s=oe(re|t,e,!0);return s}function V(e){return oe(ne|Fe,e,!0)}function xs(e){var t=e.teardown;if(t!==null){const s=Qe,r=m;Is(!0),j(null);try{t.call(null)}finally{Is(s),j(r)}}}function Fs(e,t=!1){var s=e.first;for(e.first=e.last=null;s!==null;){const n=s.ac;n!==null&&Ss(()=>{n.abort(Te)});var r=s.next;(s.f&be)!==0?s.parent=null:Q(s,t),s=r}}function dn(e){for(var t=e.first;t!==null;){var s=t.next;(t.f&ne)===0&&Q(t),t=s}}function Q(e,t=!0){var s=!1;(t||(e.f&ns)!==0)&&e.nodes_start!==null&&e.nodes_end!==null&&(vn(e.nodes_start,e.nodes_end),s=!0),Fs(e,t&&!s),yt(e,0),q(e,we);var r=e.transitions;if(r!==null)for(const i of r)i.stop();xs(e);var n=e.parent;n!==null&&n.first!==null&&Ts(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes_start=e.nodes_end=e.ac=null}function vn(e,t){for(;e!==null;){var s=e===t?null:Je(e);e.remove(),e=s}}function Ts(e){var t=e.parent,s=e.prev,r=e.next;s!==null&&(s.next=r),r!==null&&(r.prev=s),t!==null&&(t.first===e&&(t.first=r),t.last===e&&(t.last=s))}function Ie(e,t,s=!0){var r=[];Mt(e,r,!0),qs(r,()=>{s&&Q(e),t&&t()})}function qs(e,t){var s=e.length;if(s>0){var r=()=>--s||t();for(var n of e)n.out(r)}else t()}function Mt(e,t,s){if((e.f&K)===0){if(e.f^=K,e.transitions!==null)for(const o of e.transitions)(o.is_global||s)&&t.push(o);for(var r=e.first;r!==null;){var n=r.next,i=(r.f&ke)!==0||(r.f&ne)!==0&&(e.f&re)!==0;Mt(r,t,i?s:!1),r=n}}}function Dt(e){As(e,!0)}function As(e,t){if((e.f&K)!==0){e.f^=K,(e.f&F)===0&&(q(e,N),Oe(e));for(var s=e.first;s!==null;){var r=s.next,n=(s.f&ke)!==0||(s.f&ne)!==0;As(s,n?t:!1),s=r}if(e.transitions!==null)for(const i of e.transitions)(i.is_global||t)&&i.in()}}function Ms(e,t){for(var s=e.nodes_start,r=e.nodes_end;s!==null;){var n=s===r?null:Je(s);t.append(s),s=n}}let Ce=!1;function Ds(e){Ce=e}let Qe=!1;function Is(e){Qe=e}let m=null,$=!1;function j(e){m=e}let k=null;function ee(e){k=e}let ue=null;function Qs(e){m!==null&&(ue===null?ue=[e]:ue.push(e))}let M=null,H=0,W=null;function pn(e){W=e}let js=1,$e=0,le=$e;function Ls(e){le=e}function Us(){return++js}function et(e){var t=e.f;if((t&N)!==0)return!0;if(t&P&&(e.f&=~Ee),(t&ie)!==0){var s=e.deps;if(s!==null)for(var r=s.length,n=0;ne.wv)return!0}(t&J)!==0&&z===null&&q(e,F)}return!1}function Ns(e,t,s=!0){var r=e.reactions;if(r!==null&&!ue?.includes(e))for(var n=0;n{e.ac.abort(Te)}),e.ac=null);try{e.f|=Ct;var f=e.fn,h=f(),c=e.deps;if(M!==null){var v;if(yt(e,H),c!==null&&H>0)for(c.length=H+M.length,v=0;v{throw y});throw c}}finally{e.__root=t,delete e.currentTarget,j(f),ee(h)}}}function kn(e){var t=document.createElement("template");return t.innerHTML=e.replaceAll("",""),t.content}function Qt(e,t){var s=k;s.nodes_start===null&&(s.nodes_start=e,s.nodes_end=t)}function fe(e,t){var s=(t&jr)!==0,r=(t&Lr)!==0,n,i=!e.startsWith("");return()=>{n===void 0&&(n=kn(i?e:""+e),s||(n=dt(n)));var o=r||ws?document.importNode(n,!0):n.cloneNode(!0);if(s){var a=dt(o),u=o.lastChild;Qt(a,u)}else Qt(o,o);return o}}function Le(){var e=document.createDocumentFragment(),t=document.createComment(""),s=_e();return e.append(t,s),Qt(t,s),e}function D(e,t){e!==null&&e.before(t)}function st(e,t){var s=t==null?"":typeof t=="object"?t+"":t;s!==(e.__t??=e.nodeValue)&&(e.__t=s,e.nodeValue=s+"")}function En(e,t){return On(e,t)}const Ue=new Map;function On(e,{target:t,anchor:s,props:r={},events:n,context:i,intro:o=!0}){an();var a=new Set,u=h=>{for(var c=0;c{var h=s??t.appendChild(_e());return Jr(h,{pending:()=>{}},c=>{if(i){Ve({});var v=E;v.c=i}n&&(r.$$events=n),l=e(c,r)||{},i&&We()}),()=>{for(var c of a){t.removeEventListener(c,mt);var v=Ue.get(c);--v===0?(document.removeEventListener(c,mt),Ue.delete(c)):Ue.set(c,v)}Hs.delete(u),h!==s&&h.parentNode?.removeChild(h)}});return Sn.set(l,f),l}let Sn=new WeakMap;class Vs{anchor;#t=new Map;#e=new Map;#s=new Map;#n=!0;constructor(t,s=!0){this.anchor=t,this.#n=s}#r=()=>{var t=R;if(this.#t.has(t)){var s=this.#t.get(t),r=this.#e.get(s);if(r)Dt(r);else{var n=this.#s.get(s);n&&(this.#e.set(s,n.effect),this.#s.delete(s),n.fragment.lastChild.remove(),this.anchor.before(n.fragment),r=n.effect)}for(const[i,o]of this.#t){if(this.#t.delete(i),i===t)break;const a=this.#s.get(o);a&&(Q(a.effect),this.#s.delete(o))}for(const[i,o]of this.#e){if(i===s)continue;const a=()=>{if(Array.from(this.#t.values()).includes(i)){var l=document.createDocumentFragment();Ms(o,l),l.append(_e()),this.#s.set(i,{effect:o,fragment:l})}else Q(o);this.#e.delete(i)};this.#n||!r?Ie(o,a,!1):a()}}};#o=t=>{this.#t.delete(t);const s=Array.from(this.#t.values());for(const[r,n]of this.#s)s.includes(r)||(Q(n.effect),this.#s.delete(r))};ensure(t,s){var r=R,n=Os();if(s&&!this.#e.has(t)&&!this.#s.has(t))if(n){var i=document.createDocumentFragment(),o=_e();i.append(o),this.#s.set(t,{effect:V(()=>s(o)),fragment:i})}else this.#e.set(t,V(()=>s(this.anchor)));if(this.#t.set(r,t),n){for(const[a,u]of this.#e)a===t?r.skipped_effects.delete(u):r.skipped_effects.add(u);for(const[a,u]of this.#s)a===t?r.skipped_effects.delete(u.effect):r.skipped_effects.add(u.effect);r.oncommit(this.#r),r.ondiscard(this.#o)}else this.#r()}}function Re(e,t,s=!1){var r=new Vs(e),n=s?ke:0;function i(o,a){r.ensure(o,a)}_t(()=>{var o=!1;t((a,u=!0)=>{o=!0,i(u,a)}),o||i(!1,null)},n)}function Cn(e,t){return t}function Rn(e,t,s){for(var r=[],n=t.length,i=0;i{var o=r.length===0&&s!==null;if(o){var a=s,u=a.parentNode;on(u),u.append(a),e.items.clear(),te(e,t[0].prev,t[n-1].next)}for(var l=0;l{var d=s();return xe(d)?d:d==null?[]:kt(d)}),h,c=!0;function v(){xn(p,h,a,o,t,r),l!==null&&(h.length===0?(l.fragment?(o.before(l.fragment),l.fragment=null):Dt(l.effect),p.first=l.effect):Ie(l.effect,()=>{l=null}))}var p=_t(()=>{h=_(f);for(var d=h.length,y=new Set,g=R,w=null,S=Os(),C=0;Ci(o))};else{var b=document.createDocumentFragment(),U=_e();b.append(U),l={fragment:b,effect:V(()=>i(U))}}for(const[se,ge]of a.items)y.has(se)||g.skipped_effects.add(ge.e);c||(S?(g.oncommit(v),g.ondiscard(()=>{})):v()),_(f)});c=!1}function xn(e,t,s,r,n,i){var o=t.length,a=s.items,u=s.first,l,f=null,h=[],c=[],v,p,d,y;for(y=0;y0){var b=o===0?r:null;Rn(s,L,b)}}e.first=s.first&&s.first.e,e.last=f&&f.e,f&&(f.e.next=null)}function Fn(e,t,s,r,n,i,o,a){var u=(o&Dr)!==0,l=(o&Qr)===0,f=u?l?rn(s,!1,!1):ve(s):s,h=(o&Ir)===0?n:ve(n),c={i:h,v:f,k:r,a:null,e:null,o:!1,prev:t,next:null};try{if(e===null){var v=document.createDocumentFragment();v.append(e=_e())}return c.e=V(()=>i(e,f,h,a)),c.e.prev=t&&t.e,t!==null&&(t.next=c,t.e.next=c.e),c}finally{}}function jt(e,t,s){for(var r=e.next?e.next.e.nodes_start:s,n=t?t.e.nodes_start:s,i=e.e.nodes_start;i!==null&&i!==r;){var o=Je(i);n.before(i),i=o}}function te(e,t,s){t===null?e.first=s:(t.next=s,t.e.next=s&&s.e),s!==null&&(s.prev=t,s.e.prev=t&&t.e)}function Tn(e,t,...s){var r=new Vs(e);_t(()=>{const n=t()??null;r.ensure(n,n&&(i=>n(i,...s)))},ke)}const qn=Symbol("is custom element"),An=Symbol("is html");function rt(e,t,s,r){var n=Mn(e);n[t]!==(n[t]=s)&&(t==="loading"&&(e[Sr]=s),s==null?e.removeAttribute(t):typeof s!="string"&&Dn(e).includes(t)?e[t]=s:e.setAttribute(t,s))}function Mn(e){return e.__attributes??={[qn]:e.nodeName.includes("-"),[An]:e.namespaceURI===Ur}}var Ws=new Map;function Dn(e){var t=e.getAttribute("is")||e.nodeName,s=Ws.get(t);if(s)return s;Ws.set(t,s=[]);for(var r,n=e,i=Element.prototype;i!==n;){r=$t(n);for(var o in r)r[o].set&&s.push(o);n=Et(n)}return s}function Ys(e=!1){const t=E,s=t.l.u;if(!s)return;let r=()=>mn(t.s);if(e){let n=0,i={};const o=ht(()=>{let a=!1;const u=t.s;for(const l in u)u[l]!==i[l]&&(i[l]=u[l],a=!0);return a&&n++,n});r=()=>_(o)}s.b.length&&Ps(()=>{Zs(t,r),Ot(s.b)}),Xe(()=>{const n=je(()=>s.m.map(Or));return()=>{for(const i of n)typeof i=="function"&&i()}}),s.a.length&&Xe(()=>{Zs(t,r),Ot(s.a)})}function Zs(e,t){if(e.l.s)for(const s of e.l.s)_(s);t()}function In(e,t,s,r){var n=r,i=!0,o=()=>(i&&(i=!1,n=je(r)),n),a;a=e[t],a===void 0&&r!==void 0&&(a=o());var u;return u=()=>{var l=e[t];return l===void 0?o():(i=!0,l)},u}function Js(e){E===null&&Pt(),Ge&&E.l!==null?jn(E).m.push(e):Xe(()=>{const t=je(e);if(typeof t=="function")return t})}function Qn(e){E===null&&Pt(),Js(()=>()=>je(e))}function jn(e){var t=e.l;return t.u??={a:[],b:[],m:[]}}const Ln="5";typeof window<"u"&&((window.__svelte??={}).v??=new Set).add(Ln),zr();var nt=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Un={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},Nn=class{#t=Un;#e=!1;setTimeoutProvider(e){this.#t=e}setTimeout(e,t){return this.#t.setTimeout(e,t)}clearTimeout(e){this.#t.clearTimeout(e)}setInterval(e,t){return this.#t.setInterval(e,t)}clearInterval(e){this.#t.clearInterval(e)}},Pe=new Nn;function Kn(e){setTimeout(e,0)}var Ne=typeof window>"u"||"Deno"in globalThis;function Y(){}function zn(e,t){return typeof e=="function"?e(t):e}function Lt(e){return typeof e=="number"&&e>=0&&e!==1/0}function Xs(e,t){return Math.max(e+(t||0)-Date.now(),0)}function me(e,t){return typeof e=="function"?e(t):e}function Z(e,t){return typeof e=="function"?e(t):e}function $s(e,t){const{type:s="all",exact:r,fetchStatus:n,predicate:i,queryKey:o,stale:a}=e;if(o){if(r){if(t.queryHash!==Ut(o,t.options))return!1}else if(!at(t.queryKey,o))return!1}if(s!=="all"){const u=t.isActive();if(s==="active"&&!u||s==="inactive"&&u)return!1}return!(typeof a=="boolean"&&t.isStale()!==a||n&&n!==t.state.fetchStatus||i&&!i(t))}function er(e,t){const{exact:s,status:r,predicate:n,mutationKey:i}=e;if(i){if(!t.options.mutationKey)return!1;if(s){if(it(t.options.mutationKey)!==it(i))return!1}else if(!at(t.options.mutationKey,i))return!1}return!(r&&t.state.status!==r||n&&!n(t))}function Ut(e,t){return(t?.queryKeyHashFn||it)(e)}function it(e){return JSON.stringify(e,(t,s)=>Kt(s)?Object.keys(s).sort().reduce((r,n)=>(r[n]=s[n],r),{}):s)}function at(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(s=>at(e[s],t[s])):!1}var Bn=Object.prototype.hasOwnProperty;function tr(e,t){if(e===t)return e;const s=sr(e)&&sr(t);if(!s&&!(Kt(e)&&Kt(t)))return t;const n=(s?e:Object.keys(e)).length,i=s?t:Object.keys(t),o=i.length,a=s?new Array(o):{};let u=0;for(let l=0;l{Pe.setTimeout(t,e)})}function zt(e,t,s){return typeof s.structuralSharing=="function"?s.structuralSharing(e,t):s.structuralSharing!==!1?tr(e,t):t}function Gn(e,t,s=0){const r=[...e,t];return s&&r.length>s?r.slice(1):r}function Vn(e,t,s=0){const r=[t,...e];return s&&r.length>s?r.slice(0,-1):r}var Bt=Symbol();function nr(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===Bt?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}var Wn=class extends nt{#t;#e;#s;constructor(){super(),this.#s=e=>{if(!Ne&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}}}onSubscribe(){this.#e||this.setEventListener(this.#s)}onUnsubscribe(){this.hasListeners()||(this.#e?.(),this.#e=void 0)}setEventListener(e){this.#s=e,this.#e?.(),this.#e=e(t=>{typeof t=="boolean"?this.setFocused(t):this.onFocus()})}setFocused(e){this.#t!==e&&(this.#t=e,this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#t=="boolean"?this.#t:globalThis.document?.visibilityState!=="hidden"}},Ht=new Wn;function Gt(){let e,t;const s=new Promise((n,i)=>{e=n,t=i});s.status="pending",s.catch(()=>{});function r(n){Object.assign(s,n),delete s.resolve,delete s.reject}return s.resolve=n=>{r({status:"fulfilled",value:n}),e(n)},s.reject=n=>{r({status:"rejected",reason:n}),t(n)},s}var Yn=Kn;function Zn(){let e=[],t=0,s=a=>{a()},r=a=>{a()},n=Yn;const i=a=>{t?e.push(a):n(()=>{s(a)})},o=()=>{const a=e;e=[],a.length&&n(()=>{r(()=>{a.forEach(u=>{s(u)})})})};return{batch:a=>{let u;t++;try{u=a()}finally{t--,t||o()}return u},batchCalls:a=>(...u)=>{i(()=>{a(...u)})},schedule:i,setNotifyFunction:a=>{s=a},setBatchNotifyFunction:a=>{r=a},setScheduler:a=>{n=a}}}var A=Zn(),Jn=class extends nt{#t=!0;#e;#s;constructor(){super(),this.#s=e=>{if(!Ne&&window.addEventListener){const t=()=>e(!0),s=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",s,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",s)}}}}onSubscribe(){this.#e||this.setEventListener(this.#s)}onUnsubscribe(){this.hasListeners()||(this.#e?.(),this.#e=void 0)}setEventListener(e){this.#s=e,this.#e?.(),this.#e=e(this.setOnline.bind(this))}setOnline(e){this.#t!==e&&(this.#t=e,this.listeners.forEach(s=>{s(e)}))}isOnline(){return this.#t}},gt=new Jn;function Xn(e){return Math.min(1e3*2**e,3e4)}function ir(e){return(e??"online")==="online"?gt.isOnline():!0}var Vt=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function ar(e){let t=!1,s=0,r;const n=Gt(),i=()=>n.status!=="pending",o=d=>{if(!i()){const y=new Vt(d);c(y),e.onCancel?.(y)}},a=()=>{t=!0},u=()=>{t=!1},l=()=>Ht.isFocused()&&(e.networkMode==="always"||gt.isOnline())&&e.canRun(),f=()=>ir(e.networkMode)&&e.canRun(),h=d=>{i()||(r?.(),n.resolve(d))},c=d=>{i()||(r?.(),n.reject(d))},v=()=>new Promise(d=>{r=y=>{(i()||l())&&d(y)},e.onPause?.()}).then(()=>{r=void 0,i()||e.onContinue?.()}),p=()=>{if(i())return;let d;const y=s===0?e.initialPromise:void 0;try{d=y??e.fn()}catch(g){d=Promise.reject(g)}Promise.resolve(d).then(h).catch(g=>{if(i())return;const w=e.retry??(Ne?0:3),S=e.retryDelay??Xn,C=typeof S=="function"?S(s,g):S,x=w===!0||typeof w=="number"&&sl()?void 0:v()).then(()=>{t?c(g):p()})})};return{promise:n,status:()=>n.status,cancel:o,continue:()=>(r?.(),n),cancelRetry:a,continueRetry:u,canStart:f,start:()=>(f()?p():v().then(p),n)}}var or=class{#t;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Lt(this.gcTime)&&(this.#t=Pe.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Ne?1/0:300*1e3))}clearGcTimeout(){this.#t&&(Pe.clearTimeout(this.#t),this.#t=void 0)}},$n=class extends or{#t;#e;#s;#n;#r;#o;#a;constructor(e){super(),this.#a=!1,this.#o=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#n=e.client,this.#s=this.#n.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#t=fr(this.options),this.state=e.state??this.#t,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#r?.promise}setOptions(e){if(this.options={...this.#o,...e},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const t=fr(this.options);t.data!==void 0&&(this.setState(lr(t.data,t.dataUpdatedAt)),this.#t=t)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#s.remove(this)}setData(e,t){const s=zt(this.state.data,e,this.options);return this.#i({data:s,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),s}setState(e,t){this.#i({type:"setState",state:e,setStateOptions:t})}cancel(e){const t=this.#r?.promise;return this.#r?.cancel(e),t?t.then(Y).catch(Y):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#t)}isActive(){return this.observers.some(e=>Z(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Bt||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>me(e.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e==="static"?!1:this.state.isInvalidated?!0:!Xs(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(t=>t.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#r?.continue()}onOnline(){this.observers.find(t=>t.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#r?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#s.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#r&&(this.#a?this.#r.cancel({revert:!0}):this.#r.cancelRetry()),this.scheduleGc()),this.#s.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#i({type:"invalidate"})}async fetch(e,t){if(this.state.fetchStatus!=="idle"&&this.#r?.status()!=="rejected"){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#r)return this.#r.continueRetry(),this.#r.promise}if(e&&this.setOptions(e),!this.options.queryFn){const a=this.observers.find(u=>u.options.queryFn);a&&this.setOptions(a.options)}const s=new AbortController,r=a=>{Object.defineProperty(a,"signal",{enumerable:!0,get:()=>(this.#a=!0,s.signal)})},n=()=>{const a=nr(this.options,t),l=(()=>{const f={client:this.#n,queryKey:this.queryKey,meta:this.meta};return r(f),f})();return this.#a=!1,this.options.persister?this.options.persister(a,l,this):a(l)},o=(()=>{const a={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#n,state:this.state,fetchFn:n};return r(a),a})();this.options.behavior?.onFetch(o,this),this.#e=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==o.fetchOptions?.meta)&&this.#i({type:"fetch",meta:o.fetchOptions?.meta}),this.#r=ar({initialPromise:t?.initialPromise,fn:o.fetchFn,onCancel:a=>{a instanceof Vt&&a.revert&&this.setState({...this.#e,fetchStatus:"idle"}),s.abort()},onFail:(a,u)=>{this.#i({type:"failed",failureCount:a,error:u})},onPause:()=>{this.#i({type:"pause"})},onContinue:()=>{this.#i({type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0});try{const a=await this.#r.start();if(a===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(a),this.#s.config.onSuccess?.(a,this),this.#s.config.onSettled?.(a,this.state.error,this),a}catch(a){if(a instanceof Vt){if(a.silent)return this.#r.promise;if(a.revert){if(this.state.data===void 0)throw a;return this.state.data}}throw this.#i({type:"error",error:a}),this.#s.config.onError?.(a,this),this.#s.config.onSettled?.(this.state.data,a,this),a}finally{this.scheduleGc()}}#i(e){const t=s=>{switch(e.type){case"failed":return{...s,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...s,fetchStatus:"paused"};case"continue":return{...s,fetchStatus:"fetching"};case"fetch":return{...s,...ur(s.data,this.options),fetchMeta:e.meta??null};case"success":const r={...s,...lr(e.data,e.dataUpdatedAt),dataUpdateCount:s.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#e=e.manual?r:void 0,r;case"error":const n=e.error;return{...s,error:n,errorUpdateCount:s.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:s.fetchFailureCount+1,fetchFailureReason:n,fetchStatus:"idle",status:"error"};case"invalidate":return{...s,isInvalidated:!0};case"setState":return{...s,...e.state}}};this.state=t(this.state),A.batch(()=>{this.observers.forEach(s=>{s.onQueryUpdate()}),this.#s.notify({query:this,type:"updated",action:e})})}};function ur(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:ir(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function lr(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function fr(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,s=t!==void 0,r=s?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:s?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:s?"success":"pending",fetchStatus:"idle"}}var ei=class extends nt{constructor(e,t){super(),this.options=t,this.#t=e,this.#i=null,this.#a=Gt(),this.bindMethods(),this.setOptions(t)}#t;#e=void 0;#s=void 0;#n=void 0;#r;#o;#a;#i;#u;#l;#f;#c;#h;#d;#v=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#e.addObserver(this),cr(this.#e,this.options)?this.#p():this.updateResult(),this.#_())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Wt(this.#e,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Wt(this.#e,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#y(),this.#g(),this.#e.removeObserver(this)}setOptions(e){const t=this.options,s=this.#e;if(this.options=this.#t.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Z(this.options.enabled,this.#e)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#k(),this.#e.setOptions(this.options),t._defaulted&&!Nt(this.options,t)&&this.#t.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#e,observer:this});const r=this.hasListeners();r&&hr(this.#e,s,this.options,t)&&this.#p(),this.updateResult(),r&&(this.#e!==s||Z(this.options.enabled,this.#e)!==Z(t.enabled,this.#e)||me(this.options.staleTime,this.#e)!==me(t.staleTime,this.#e))&&this.#b();const n=this.#w();r&&(this.#e!==s||Z(this.options.enabled,this.#e)!==Z(t.enabled,this.#e)||n!==this.#d)&&this.#m(n)}getOptimisticResult(e){const t=this.#t.getQueryCache().build(this.#t,e),s=this.createResult(t,e);return si(this,s)&&(this.#n=s,this.#o=this.options,this.#r=this.#e.state),s}getCurrentResult(){return this.#n}trackResult(e,t){return new Proxy(e,{get:(s,r)=>(this.trackProp(r),t?.(r),r==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&this.#a.status==="pending"&&this.#a.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(s,r))})}trackProp(e){this.#v.add(e)}getCurrentQuery(){return this.#e}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const t=this.#t.defaultQueryOptions(e),s=this.#t.getQueryCache().build(this.#t,t);return s.fetch().then(()=>this.createResult(s,t))}fetch(e){return this.#p({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#n))}#p(e){this.#k();let t=this.#e.fetch(this.options,e);return e?.throwOnError||(t=t.catch(Y)),t}#b(){this.#y();const e=me(this.options.staleTime,this.#e);if(Ne||this.#n.isStale||!Lt(e))return;const s=Xs(this.#n.dataUpdatedAt,e)+1;this.#c=Pe.setTimeout(()=>{this.#n.isStale||this.updateResult()},s)}#w(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#e):this.options.refetchInterval)??!1}#m(e){this.#g(),this.#d=e,!(Ne||Z(this.options.enabled,this.#e)===!1||!Lt(this.#d)||this.#d===0)&&(this.#h=Pe.setInterval(()=>{(this.options.refetchIntervalInBackground||Ht.isFocused())&&this.#p()},this.#d))}#_(){this.#b(),this.#m(this.#w())}#y(){this.#c&&(Pe.clearTimeout(this.#c),this.#c=void 0)}#g(){this.#h&&(Pe.clearInterval(this.#h),this.#h=void 0)}createResult(e,t){const s=this.#e,r=this.options,n=this.#n,i=this.#r,o=this.#o,u=e!==s?e.state:this.#s,{state:l}=e;let f={...l},h=!1,c;if(t._optimisticResults){const b=this.hasListeners(),U=!b&&cr(e,t),se=b&&hr(e,s,t,r);(U||se)&&(f={...f,...ur(l.data,e.options)}),t._optimisticResults==="isRestoring"&&(f.fetchStatus="idle")}let{error:v,errorUpdatedAt:p,status:d}=f;c=f.data;let y=!1;if(t.placeholderData!==void 0&&c===void 0&&d==="pending"){let b;n?.isPlaceholderData&&t.placeholderData===o?.placeholderData?(b=n.data,y=!0):b=typeof t.placeholderData=="function"?t.placeholderData(this.#f?.state.data,this.#f):t.placeholderData,b!==void 0&&(d="success",c=zt(n?.data,b,t),h=!0)}if(t.select&&c!==void 0&&!y)if(n&&c===i?.data&&t.select===this.#u)c=this.#l;else try{this.#u=t.select,c=t.select(c),c=zt(n?.data,c,t),this.#l=c,this.#i=null}catch(b){this.#i=b}this.#i&&(v=this.#i,c=this.#l,p=Date.now(),d="error");const g=f.fetchStatus==="fetching",w=d==="pending",S=d==="error",C=w&&g,x=c!==void 0,O={status:d,fetchStatus:f.fetchStatus,isPending:w,isSuccess:d==="success",isError:S,isInitialLoading:C,isLoading:C,data:c,dataUpdatedAt:f.dataUpdatedAt,error:v,errorUpdatedAt:p,failureCount:f.fetchFailureCount,failureReason:f.fetchFailureReason,errorUpdateCount:f.errorUpdateCount,isFetched:f.dataUpdateCount>0||f.errorUpdateCount>0,isFetchedAfterMount:f.dataUpdateCount>u.dataUpdateCount||f.errorUpdateCount>u.errorUpdateCount,isFetching:g,isRefetching:g&&!w,isLoadingError:S&&!x,isPaused:f.fetchStatus==="paused",isPlaceholderData:h,isRefetchError:S&&x,isStale:Yt(e,t),refetch:this.refetch,promise:this.#a,isEnabled:Z(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){const b=ge=>{O.status==="error"?ge.reject(O.error):O.data!==void 0&&ge.resolve(O.data)},U=()=>{const ge=this.#a=O.promise=Gt();b(ge)},se=this.#a;switch(se.status){case"pending":e.queryHash===s.queryHash&&b(se);break;case"fulfilled":(O.status==="error"||O.data!==se.value)&&U();break;case"rejected":(O.status!=="error"||O.error!==se.reason)&&U();break}}return O}updateResult(){const e=this.#n,t=this.createResult(this.#e,this.options);if(this.#r=this.#e.state,this.#o=this.options,this.#r.data!==void 0&&(this.#f=this.#e),Nt(t,e))return;this.#n=t;const s=()=>{if(!e)return!0;const{notifyOnChangeProps:r}=this.options,n=typeof r=="function"?r():r;if(n==="all"||!n&&!this.#v.size)return!0;const i=new Set(n??this.#v);return this.options.throwOnError&&i.add("error"),Object.keys(this.#n).some(o=>{const a=o;return this.#n[a]!==e[a]&&i.has(a)})};this.#E({listeners:s()})}#k(){const e=this.#t.getQueryCache().build(this.#t,this.options);if(e===this.#e)return;const t=this.#e;this.#e=e,this.#s=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#_()}#E(e){A.batch(()=>{e.listeners&&this.listeners.forEach(t=>{t(this.#n)}),this.#t.getQueryCache().notify({query:this.#e,type:"observerResultsUpdated"})})}};function ti(e,t){return Z(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function cr(e,t){return ti(e,t)||e.state.data!==void 0&&Wt(e,t,t.refetchOnMount)}function Wt(e,t,s){if(Z(t.enabled,e)!==!1&&me(t.staleTime,e)!=="static"){const r=typeof s=="function"?s(e):s;return r==="always"||r!==!1&&Yt(e,t)}return!1}function hr(e,t,s,r){return(e!==t||Z(r.enabled,e)===!1)&&(!s.suspense||e.state.status!=="error")&&Yt(e,s)}function Yt(e,t){return Z(t.enabled,e)!==!1&&e.isStaleByTime(me(t.staleTime,e))}function si(e,t){return!Nt(e.getCurrentResult(),t)}function dr(e){return{onFetch:(t,s)=>{const r=t.options,n=t.fetchOptions?.meta?.fetchMore?.direction,i=t.state.data?.pages||[],o=t.state.data?.pageParams||[];let a={pages:[],pageParams:[]},u=0;const l=async()=>{let f=!1;const h=p=>{Object.defineProperty(p,"signal",{enumerable:!0,get:()=>(t.signal.aborted?f=!0:t.signal.addEventListener("abort",()=>{f=!0}),t.signal)})},c=nr(t.options,t.fetchOptions),v=async(p,d,y)=>{if(f)return Promise.reject();if(d==null&&p.pages.length)return Promise.resolve(p);const w=(()=>{const L={client:t.client,queryKey:t.queryKey,pageParam:d,direction:y?"backward":"forward",meta:t.options.meta};return h(L),L})(),S=await c(w),{maxPages:C}=t.options,x=y?Vn:Gn;return{pages:x(p.pages,S,C),pageParams:x(p.pageParams,d,C)}};if(n&&i.length){const p=n==="backward",d=p?ri:vr,y={pages:i,pageParams:o},g=d(r,y);a=await v(y,g,p)}else{const p=e??i.length;do{const d=u===0?o[0]??r.initialPageParam:vr(r,a);if(u>0&&d==null)break;a=await v(a,d),u++}while(ut.options.persister?.(l,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},s):t.fetchFn=l}}}function vr(e,{pages:t,pageParams:s}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,s[r],s):void 0}function ri(e,{pages:t,pageParams:s}){return t.length>0?e.getPreviousPageParam?.(t[0],t,s[0],s):void 0}var ni=class extends or{#t;#e;#s;#n;constructor(e){super(),this.#t=e.client,this.mutationId=e.mutationId,this.#s=e.mutationCache,this.#e=[],this.state=e.state||ii(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#e.includes(e)||(this.#e.push(e),this.clearGcTimeout(),this.#s.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#e=this.#e.filter(t=>t!==e),this.scheduleGc(),this.#s.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#e.length||(this.state.status==="pending"?this.scheduleGc():this.#s.remove(this))}continue(){return this.#n?.continue()??this.execute(this.state.variables)}async execute(e){const t=()=>{this.#r({type:"continue"})},s={client:this.#t,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#n=ar({fn:()=>this.options.mutationFn?this.options.mutationFn(e,s):Promise.reject(new Error("No mutationFn found")),onFail:(i,o)=>{this.#r({type:"failed",failureCount:i,error:o})},onPause:()=>{this.#r({type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#s.canRun(this)});const r=this.state.status==="pending",n=!this.#n.canStart();try{if(r)t();else{this.#r({type:"pending",variables:e,isPaused:n}),await this.#s.config.onMutate?.(e,this,s);const o=await this.options.onMutate?.(e,s);o!==this.state.context&&this.#r({type:"pending",context:o,variables:e,isPaused:n})}const i=await this.#n.start();return await this.#s.config.onSuccess?.(i,e,this.state.context,this,s),await this.options.onSuccess?.(i,e,this.state.context,s),await this.#s.config.onSettled?.(i,null,this.state.variables,this.state.context,this,s),await this.options.onSettled?.(i,null,e,this.state.context,s),this.#r({type:"success",data:i}),i}catch(i){try{throw await this.#s.config.onError?.(i,e,this.state.context,this,s),await this.options.onError?.(i,e,this.state.context,s),await this.#s.config.onSettled?.(void 0,i,this.state.variables,this.state.context,this,s),await this.options.onSettled?.(void 0,i,e,this.state.context,s),i}finally{this.#r({type:"error",error:i})}}finally{this.#s.runNext(this)}}#r(e){const t=s=>{switch(e.type){case"failed":return{...s,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...s,isPaused:!0};case"continue":return{...s,isPaused:!1};case"pending":return{...s,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...s,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...s,data:void 0,error:e.error,failureCount:s.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=t(this.state),A.batch(()=>{this.#e.forEach(s=>{s.onMutationUpdate(e)}),this.#s.notify({mutation:this,type:"updated",action:e})})}};function ii(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var ai=class extends nt{constructor(e={}){super(),this.config=e,this.#t=new Set,this.#e=new Map,this.#s=0}#t;#e;#s;build(e,t,s){const r=new ni({client:e,mutationCache:this,mutationId:++this.#s,options:e.defaultMutationOptions(t),state:s});return this.add(r),r}add(e){this.#t.add(e);const t=bt(e);if(typeof t=="string"){const s=this.#e.get(t);s?s.push(e):this.#e.set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#t.delete(e)){const t=bt(e);if(typeof t=="string"){const s=this.#e.get(t);if(s)if(s.length>1){const r=s.indexOf(e);r!==-1&&s.splice(r,1)}else s[0]===e&&this.#e.delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){const t=bt(e);if(typeof t=="string"){const r=this.#e.get(t)?.find(n=>n.state.status==="pending");return!r||r===e}else return!0}runNext(e){const t=bt(e);return typeof t=="string"?this.#e.get(t)?.find(r=>r!==e&&r.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){A.batch(()=>{this.#t.forEach(e=>{this.notify({type:"removed",mutation:e})}),this.#t.clear(),this.#e.clear()})}getAll(){return Array.from(this.#t)}find(e){const t={exact:!0,...e};return this.getAll().find(s=>er(t,s))}findAll(e={}){return this.getAll().filter(t=>er(e,t))}notify(e){A.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>t.state.isPaused);return A.batch(()=>Promise.all(e.map(t=>t.continue().catch(Y))))}};function bt(e){return e.options.scope?.id}var oi=class extends nt{constructor(e={}){super(),this.config=e,this.#t=new Map}#t;build(e,t,s){const r=t.queryKey,n=t.queryHash??Ut(r,t);let i=this.get(n);return i||(i=new $n({client:e,queryKey:r,queryHash:n,options:e.defaultQueryOptions(t),state:s,defaultOptions:e.getQueryDefaults(r)}),this.add(i)),i}add(e){this.#t.has(e.queryHash)||(this.#t.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const t=this.#t.get(e.queryHash);t&&(e.destroy(),t===e&&this.#t.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){A.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#t.get(e)}getAll(){return[...this.#t.values()]}find(e){const t={exact:!0,...e};return this.getAll().find(s=>$s(t,s))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(s=>$s(e,s)):t}notify(e){A.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){A.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){A.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},pr=class{#t;#e;#s;#n;#r;#o;#a;#i;constructor(e={}){this.#t=e.queryCache||new oi,this.#e=e.mutationCache||new ai,this.#s=e.defaultOptions||{},this.#n=new Map,this.#r=new Map,this.#o=0}mount(){this.#o++,this.#o===1&&(this.#a=Ht.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#t.onFocus())}),this.#i=gt.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#t.onOnline())}))}unmount(){this.#o--,this.#o===0&&(this.#a?.(),this.#a=void 0,this.#i?.(),this.#i=void 0)}isFetching(e){return this.#t.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#e.findAll({...e,status:"pending"}).length}getQueryData(e){const t=this.defaultQueryOptions({queryKey:e});return this.#t.get(t.queryHash)?.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),s=this.#t.build(this,t),r=s.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&s.isStaleByTime(me(t.staleTime,s))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return this.#t.findAll(e).map(({queryKey:t,state:s})=>{const r=s.data;return[t,r]})}setQueryData(e,t,s){const r=this.defaultQueryOptions({queryKey:e}),i=this.#t.get(r.queryHash)?.state.data,o=zn(t,i);if(o!==void 0)return this.#t.build(this,r).setData(o,{...s,manual:!0})}setQueriesData(e,t,s){return A.batch(()=>this.#t.findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,s)]))}getQueryState(e){const t=this.defaultQueryOptions({queryKey:e});return this.#t.get(t.queryHash)?.state}removeQueries(e){const t=this.#t;A.batch(()=>{t.findAll(e).forEach(s=>{t.remove(s)})})}resetQueries(e,t){const s=this.#t;return A.batch(()=>(s.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const s={revert:!0,...t},r=A.batch(()=>this.#t.findAll(e).map(n=>n.cancel(s)));return Promise.all(r).then(Y).catch(Y)}invalidateQueries(e,t={}){return A.batch(()=>(this.#t.findAll(e).forEach(s=>{s.invalidate()}),e?.refetchType==="none"?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},t)))}refetchQueries(e,t={}){const s={...t,cancelRefetch:t.cancelRefetch??!0},r=A.batch(()=>this.#t.findAll(e).filter(n=>!n.isDisabled()&&!n.isStatic()).map(n=>{let i=n.fetch(void 0,s);return s.throwOnError||(i=i.catch(Y)),n.state.fetchStatus==="paused"?Promise.resolve():i}));return Promise.all(r).then(Y)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const s=this.#t.build(this,t);return s.isStaleByTime(me(t.staleTime,s))?s.fetch(t):Promise.resolve(s.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Y).catch(Y)}fetchInfiniteQuery(e){return e.behavior=dr(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Y).catch(Y)}ensureInfiniteQueryData(e){return e.behavior=dr(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return gt.isOnline()?this.#e.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#t}getMutationCache(){return this.#e}getDefaultOptions(){return this.#s}setDefaultOptions(e){this.#s=e}setQueryDefaults(e,t){this.#n.set(it(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...this.#n.values()],s={};return t.forEach(r=>{at(e,r.queryKey)&&Object.assign(s,r.defaultOptions)}),s}setMutationDefaults(e,t){this.#r.set(it(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...this.#r.values()],s={};return t.forEach(r=>{at(e,r.mutationKey)&&Object.assign(s,r.defaultOptions)}),s}defaultQueryOptions(e){if(e._defaulted)return e;const t={...this.#s.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Ut(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===Bt&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#s.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#t.clear(),this.#e.clear()}};const _r=Symbol("QueryClient"),ui=()=>{const e=us(_r);if(!e)throw new Error("No QueryClient was found in Svelte context. Did you forget to wrap your component with QueryClientProvider?");return e},li=e=>{Br(_r,e)},fi=Symbol("isRestoring"),ci=()=>{try{return us(fi)??{current:!1}}catch{return{current:!1}}};function hi(){return ci()}function di(e){return ui()}var vi=["forEach","isDisjointFrom","isSubsetOf","isSupersetOf"],pi=["difference","intersection","symmetricDifference","union"],yr=!1;class wt extends Set{#t=new Map;#e=B(0);#s=B(0);#n=le||-1;constructor(t){if(super(),t){for(var s of t)super.add(s);this.#s.v=super.size}yr||this.#o()}#r(t){return le===this.#n?B(t):ve(t)}#o(){yr=!0;var t=wt.prototype,s=Set.prototype;for(const r of vi)t[r]=function(...n){return _(this.#e),s[r].apply(this,n)};for(const r of pi)t[r]=function(...n){_(this.#e);var i=s[r].apply(this,n);return new wt(i)}}has(t){var s=super.has(t),r=this.#t,n=r.get(t);if(n===void 0){if(!s)return _(this.#e),!1;n=this.#r(!0),r.set(t,n)}return _(n),s}add(t){return super.has(t)||(super.add(t),I(this.#s,super.size),pe(this.#e)),this}delete(t){var s=super.delete(t),r=this.#t,n=r.get(t);return n!==void 0&&(r.delete(t),I(n,!1)),s&&(I(this.#s,super.size),pe(this.#e)),s}clear(){if(super.size!==0){super.clear();var t=this.#t;for(var s of t.values())I(s,!1);t.clear(),I(this.#s,0),pe(this.#e)}}keys(){return this.values()}values(){return _(this.#e),super.values()}entries(){return _(this.#e),super.entries()}[Symbol.iterator](){return this.keys()}get size(){return _(this.#s)}}function _i(e){const t=Array.isArray(e)?[]:{},s=new wt,r=new Proxy(t,{set(i,o,a,u){if(s.delete(o),o in i)return Reflect.set(i,o,a,u);let l=B(a);return Object.defineProperty(i,o,{configurable:!0,enumerable:!0,get:()=>_(l)&&mi(_(l))?_(l)():_(l),set:f=>{I(l,f)}}),!0},has:(i,o)=>s.has(o)?!1:o in i,ownKeys(i){return Reflect.ownKeys(i).filter(o=>!s.has(o))},getOwnPropertyDescriptor(i,o){if(!s.has(o))return Reflect.getOwnPropertyDescriptor(i,o)},deleteProperty(i,o){return o in i?(i[o]=void 0,s.add(o),Array.isArray(i)&&i.length--,!0):!1}});function n(i){const o=Object.keys(r),a=Object.keys(i),u=o.filter(l=>!a.includes(l));for(const l of u)delete r[l];for(const l of a)r[l]=yi(()=>i[l])}return n(e),[r,n]}const mr=Symbol("LazyValue");function yi(e){return e[mr]=!0,e}function mi(e){return!!e[mr]}function gi(e,t){switch(e){case"post":Xe(t);break;case"pre":Ps(t);break}}const Zt=(e,t,s)=>{let r=!1,n=Array.isArray(e)?[]:void 0;gi(t,()=>{const i=Array.isArray(e)?e.map(a=>a()):e();if(!r){r=!0,n=i;return}const o=je(()=>s(i,n));return n=i,o})};function bi(e,t,s){const r=vs(()=>di()),n=hi(),i=vs(()=>{const f=_(r).defaultQueryOptions(e());return f._optimisticResults=n.current?"isRestoring":"optimistic",f});let o=B(De(new t(_(r),_(i))));Zt(()=>_(r),"pre",()=>{I(o,new t(_(r),_(i)),!0)});function a(){const f=_(o).getOptimisticResult(_(i));return _(i).notifyOnChangeProps?f:_(o).trackResult(f)}const[u,l]=_i(a());return Xe(()=>{const f=n.current?()=>{}:_(o).subscribe(()=>l(a()));return _(o).updateResult(),f}),Zt(()=>_(i),"pre",()=>{_(o).setOptions(_(i))}),Zt(()=>[_(i),_(o)],"pre",()=>{l(a())}),u}function gr(e,t){return bi(e,ei)}function wi(e,t){Ve(t,!0);const s=In(t,"client",19,()=>new pr);Js(()=>{s().mount()}),li(s()),Qn(()=>{s().unmount()});var r=Le(),n=Se(r);Tn(n,()=>t.children),D(e,r),We()}var ki=fe('
'),Ei=fe(''),Oi=fe(''),Si=fe('
bookie of the week
'),Ci=fe('

Checkmark
Checkmark
View Profile Arrow right
');function Ri(e,t){Ve(t,!0);const s=gr(()=>({queryKey:["media",t.bookmaker.acf.bookmaker_logo],queryFn:async()=>{if(!t.bookmaker.acf.bookmaker_logo)throw new Error("No media ID provided");const b=await fetch(`https://betsy.com.au/wp-json/wp/v2/media/${t.bookmaker.acf.bookmaker_logo}`);if(!b.ok)throw new Error(`HTTP error! status: ${b.status}`);return b.json()},enabled:!!t.bookmaker.acf.bookmaker_logo}));var r=Ci(),n=G(r),i=G(n);{var o=b=>{var U=ki();D(b,U)},a=b=>{var U=Le(),se=Se(U);{var ge=Ke=>{var ze=Ei();pt(()=>{rt(ze,"src",s.data.source_url),rt(ze,"alt",t.bookmaker.title.rendered)}),D(Ke,ze)},Di=Ke=>{var ze=Le(),Ii=Se(ze);{var Qi=Jt=>{var Xt=Oi();pt(()=>{rt(Xt,"src",t.bookmaker.acf.logo),rt(Xt,"alt",t.bookmaker.title.rendered)}),D(Jt,Xt)};Re(Ii,Jt=>{t.bookmaker.acf.logo&&Jt(Qi)},!0)}D(Ke,ze)};Re(se,Ke=>{s.data?Ke(ge):Ke(Di,!1)},!0)}D(b,U)};Re(i,b=>{t.bookmaker.acf.bookmaker_logo&&s.isLoading?b(o):b(a,!1)})}var u=ye(n,2),l=G(u),f=G(l),h=G(f),c=ye(f,2);{var v=b=>{var U=Si();D(b,U)};Re(c,b=>{t.bookmaker.acf.bookie_of_the_week&&b(v)})}var p=ye(l,2),d=G(p),y=ye(p,2),g=G(y),w=ye(G(g),2),S=G(w),C=ye(g,2),x=ye(G(C),2),L=G(x),O=ye(y,2);pt(()=>{st(h,`${t.bookmaker.title.rendered??""} Review`),st(d,t.bookmaker.acf.description),st(S,t.bookmaker.acf.unique_selling_point_1),st(L,t.bookmaker.acf.unique_selling_point_2),rt(O,"href",t.bookmaker.link)}),D(e,r),We()}var Pi=fe('
');function xi(e){var t=Pi();D(e,t)}var Fi=fe('
'),Ti=fe('
');function qi(e,t){Ve(t,!1);const s=gr(()=>({queryKey:["bookmakers"],queryFn:async()=>{const u=await fetch("https://betsy.com.au/wp-json/wp/v2/bookmaker");if(!u.ok)throw new Error(`HTTP error! status: ${u.status}`);return u.json()}})),r=()=>s.data?[...s.data].sort((u,l)=>{const f=u.acf?.bookie_of_the_week===!0,h=l.acf?.bookie_of_the_week===!0;return f&&!h?-1:!f&&h?1:0}):[];Ys();var n=Le(),i=Se(n);{var o=u=>{xi(u)},a=u=>{var l=Le(),f=Se(l);{var h=v=>{var p=Fi(),d=G(p);pt(()=>st(d,`Error: ${s.error?.message??""}`)),D(v,p)},c=v=>{var p=Le(),d=Se(p);{var y=g=>{var w=Ti();Pn(w,5,r,Cn,(S,C)=>{Ri(S,{get bookmaker(){return _(C)}})}),D(g,w)};Re(d,g=>{s.data&&s.data.length>0&&g(y)},!0)}D(v,p)};Re(f,v=>{s.isError?v(h):v(c,!1)},!0)}D(u,l)};Re(i,u=>{s.isLoading?u(o):u(a,!1)})}D(e,n),We()}var Ai=fe(" 1514518",1);function Mi(e,t){Ve(t,!1);const s=new pr;Ys();var r=Ai(),n=Se(r);wi(n,{get client(){return s},children:(i,o)=>{qi(i,{})},$$slots:{default:!0}}),D(e,r),We()}return En(Mi,{target:document.getElementById("bookmakers-list")})}));