(function(xt,Be){typeof exports=="object"&&typeof module<"u"?module.exports=Be():typeof define=="function"&&define.amd?define(Be):(xt=typeof globalThis<"u"?globalThis:xt||self,xt.offers_widget=Be())})(this,(function(){"use strict";var Be=Array.isArray,ti=Array.prototype.indexOf,en=Array.from,ni=Object.defineProperty,at=Object.getOwnPropertyDescriptor,Kn=Object.getOwnPropertyDescriptors,ri=Object.prototype,si=Array.prototype,tn=Object.getPrototypeOf,$n=Object.isExtensible;function ii(e){return e()}function nn(e){for(var t=0;t{e=r,t=s});return{promise:n,resolve:e,reject:t}}const D=2,Vn=4,Pt=8,he=16,de=32,xe=64,Ft=128,re=512,N=1024,z=2048,pe=4096,V=8192,Pe=16384,rn=32768,Fe=65536,Jn=1<<17,Wn=1<<18,Qe=1<<19,Gn=1<<20,ke=32768,sn=1<<21,on=1<<22,be=1<<23,ut=Symbol("$state"),oi=Symbol(""),He=new class extends Error{name="StaleReactionError";message="The reaction that called `getAbortSignal()` was re-run or destroyed"};function an(e){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}function ai(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function ui(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function li(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function ci(e){throw new Error("https://svelte.dev/e/effect_orphan")}function fi(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function hi(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function di(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function pi(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function mi(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}const vi=1,yi=2,_i=16,gi=2,M=Symbol(),bi="http://www.w3.org/1999/xhtml";function wi(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}function Xn(e){return e===this.v}function Ei(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function Yn(e){return!Ei(e,this.v)}let lt=!1,qu=!1;function Si(){lt=!0}let A=null;function Ke(e){A=e}function Zn(e){return er().get(e)}function Oi(e,t){return er().set(e,t),t}function ct(e,t=!1,n){A={p:A,i:!1,c:null,e:null,s:e,x:null,l:lt&&!t?{s:null,u:null,$:[]}:null}}function ft(e){var t=A,n=t.e;if(n!==null){t.e=null;for(var r of n)_r(r)}return t.i=!0,A=t.p,{}}function ht(){return!lt||A!==null&&A.l===null}function er(e){return A===null&&an(),A.c??=new Map(Ri(A)||void 0)}function Ri(e){let t=e.p;for(;t!==null;){const n=t.c;if(n!==null)return n;t=t.p}return null}let $e=[];function Ti(){var e=$e;$e=[],nn(e)}function un(e){if($e.length===0){var t=$e;queueMicrotask(()=>{t===$e&&Ti()})}$e.push(e)}function tr(e){var t=C;if(t===null)return R.f|=be,e;if((t.f&rn)===0){if((t.f&Ft)===0)throw e;t.b.error(e)}else ze(e,t)}function ze(e,t){for(;t!==null;){if((t.f&Ft)!==0)try{t.b.error(e);return}catch(n){e=n}t=t.parent}throw e}const kt=new Set;let k=null,J=null,we=[],ln=null,cn=!1;class oe{committed=!1;current=new Map;previous=new Map;#t=new Set;#e=new Set;#n=0;#s=0;#r=null;#a=[];#o=[];skipped_effects=new Set;is_fork=!1;is_deferred(){return this.is_fork||this.#s>0}process(t){we=[],this.apply();var n={parent:null,effect:null,effects:[],render_effects:[],block_effects:[]};for(const r of t)this.#i(r,n);this.is_fork||this.#c(),this.is_deferred()?(this.#u(n.effects),this.#u(n.render_effects),this.#u(n.block_effects)):(k=null,nr(n.render_effects),nr(n.effects),this.#r?.resolve()),J=null}#i(t,n){t.f^=N;for(var r=t.first;r!==null;){var s=r.f,i=(s&(de|xe))!==0,o=i&&(s&N)!==0,a=o||(s&V)!==0||this.skipped_effects.has(r);if((r.f&Ft)!==0&&r.b?.is_pending()&&(n={parent:n,effect:r,effects:[],render_effects:[],block_effects:[]}),!a&&r.fn!==null){i?r.f^=N:(s&Vn)!==0?n.effects.push(r):yt(r)&&((r.f&he)!==0&&n.block_effects.push(r),_t(r));var u=r.first;if(u!==null){r=u;continue}}var l=r.parent;for(r=r.next;r===null&&l!==null;)l===n.effect&&(this.#u(n.effects),this.#u(n.render_effects),this.#u(n.block_effects),n=n.parent),r=l.next,l=l.parent}}#u(t){for(const n of t)((n.f&z)!==0?this.#a:this.#o).push(n),this.#l(n.deps),U(n,N)}#l(t){if(t!==null)for(const n of t)(n.f&D)===0||(n.f&ke)===0||(n.f^=ke,this.#l(n.deps))}capture(t,n){this.previous.has(t)||this.previous.set(t,n),(t.f&be)===0&&(this.current.set(t,t.v),J?.set(t,t.v))}activate(){k=this,this.apply()}deactivate(){k===this&&(k=null,J=null)}flush(){if(this.activate(),we.length>0){if(Ci(),k!==null&&k!==this)return}else this.#n===0&&this.process([]);this.deactivate()}discard(){for(const t of this.#e)t(this);this.#e.clear()}#c(){if(this.#s===0){for(const t of this.#t)t();this.#t.clear()}this.#n===0&&this.#f()}#f(){if(kt.size>1){this.previous.clear();var t=J,n=!0,r={parent:null,effect:null,effects:[],render_effects:[],block_effects:[]};for(const s of kt){if(s===this){n=!1;continue}const i=[];for(const[a,u]of this.current){if(s.current.has(a))if(n&&u!==s.current.get(a))s.current.set(a,u);else continue;i.push(a)}if(i.length===0)continue;const o=[...s.current.keys()].filter(a=>!this.current.has(a));if(o.length>0){const a=new Set,u=new Map;for(const l of i)rr(l,o,a,u);if(we.length>0){k=s,s.apply();for(const l of we)s.#i(l,r);we=[],s.deactivate()}}}k=null,J=t}this.committed=!0,kt.delete(this)}increment(t){this.#n+=1,t&&(this.#s+=1)}decrement(t){this.#n-=1,t&&(this.#s-=1),this.revive()}revive(){for(const t of this.#a)U(t,z),De(t);for(const t of this.#o)U(t,pe),De(t);this.#a=[],this.#o=[],this.flush()}oncommit(t){this.#t.add(t)}ondiscard(t){this.#e.add(t)}settled(){return(this.#r??=zn()).promise}static ensure(){if(k===null){const t=k=new oe;kt.add(k),oe.enqueue(()=>{k===t&&t.flush()})}return k}static enqueue(t){un(t)}apply(){}}function Ci(){var e=Ne;cn=!0;try{var t=0;for(Tr(!0);we.length>0;){var n=oe.ensure();if(t++>1e3){var r,s;Ai()}n.process(we),Ee.clear()}}finally{cn=!1,Tr(e),ln=null}}function Ai(){try{fi()}catch(e){ze(e,ln)}}let me=null;function nr(e){var t=e.length;if(t!==0){for(var n=0;n0)){Ee.clear();for(const s of me){if((s.f&(Pe|V))!==0)continue;const i=[s];let o=s.parent;for(;o!==null;)me.has(o)&&(me.delete(o),i.push(o)),o=o.parent;for(let a=i.length-1;a>=0;a--){const u=i[a];(u.f&(Pe|V))===0&&_t(u)}}me.clear()}}me=null}}function rr(e,t,n,r){if(!n.has(e)&&(n.add(e),e.reactions!==null))for(const s of e.reactions){const i=s.f;(i&D)!==0?rr(s,t,n,r):(i&(on|he))!==0&&(i&z)===0&&sr(s,t,r)&&(U(s,z),De(s))}}function sr(e,t,n){const r=n.get(e);if(r!==void 0)return r;if(e.deps!==null)for(const s of e.deps){if(t.includes(s))return!0;if((s.f&D)!==0&&sr(s,t,n))return n.set(s,!0),!0}return n.set(e,!1),!1}function De(e){for(var t=ln=e;t.parent!==null;){t=t.parent;var n=t.f;if(cn&&t===C&&(n&he)!==0&&(n&Wn)===0)return;if((n&(xe|de))!==0){if((n&N)===0)return;t.f^=N}}we.push(t)}function xi(e){let t=0,n=Se(0),r;return()=>{Ut()&&(E(n),$i(()=>(t===0&&(r=Xe(()=>e(()=>Oe(n)))),t+=1,()=>{un(()=>{t-=1,t===0&&(r?.(),r=void 0,Oe(n))})})))}}var Pi=Fe|Qe|Ft;function Fi(e,t,n){new ki(e,t,n)}class ki{parent;#t=!1;#e;#n=null;#s;#r;#a;#o=null;#i=null;#u=null;#l=null;#c=null;#f=0;#h=0;#d=!1;#p=null;#m=xi(()=>(this.#p=Se(this.#f),()=>{this.#p=null}));constructor(t,n,r){this.#e=t,this.#s=n,this.#r=r,this.parent=C.b,this.#t=!!this.#s.pending,this.#a=It(()=>{C.b=this;{var s=this.#_();try{this.#o=Z(()=>r(s))}catch(i){this.error(i)}this.#h>0?this.#y():this.#t=!1}return()=>{this.#c?.remove()}},Pi)}#b(){try{this.#o=Z(()=>this.#r(this.#e))}catch(t){this.error(t)}this.#t=!1}#w(){const t=this.#s.pending;t&&(this.#i=Z(()=>t(this.#e)),oe.enqueue(()=>{var n=this.#_();this.#o=this.#v(()=>(oe.ensure(),Z(()=>this.#r(n)))),this.#h>0?this.#y():(We(this.#i,()=>{this.#i=null}),this.#t=!1)}))}#_(){var t=this.#e;return this.#t&&(this.#c=Re(),this.#e.before(this.#c),t=this.#c),t}is_pending(){return this.#t||!!this.parent&&this.parent.is_pending()}has_pending_snippet(){return!!this.#s.pending}#v(t){var n=C,r=R,s=A;ue(this.#a),H(this.#a),Ke(this.#a.ctx);try{return t()}catch(i){return tr(i),null}finally{ue(n),H(r),Ke(s)}}#y(){const t=this.#s.pending;this.#o!==null&&(this.#l=document.createDocumentFragment(),this.#l.append(this.#c),Rr(this.#o,this.#l)),this.#i===null&&(this.#i=Z(()=>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&&We(this.#i,()=>{this.#i=null}),this.#l&&(this.#e.before(this.#l),this.#l=null))}update_pending_count(t){this.#g(t),this.#f+=t,this.#p&&dt(this.#p,this.#f)}get_effect_pending(){return this.#m(),E(this.#p)}error(t){var n=this.#s.onerror;let r=this.#s.failed;if(this.#d||!n&&!r)throw t;this.#o&&(Q(this.#o),this.#o=null),this.#i&&(Q(this.#i),this.#i=null),this.#u&&(Q(this.#u),this.#u=null);var s=!1,i=!1;const o=()=>{if(s){wi();return}s=!0,i&&mi(),oe.ensure(),this.#f=0,this.#u!==null&&We(this.#u,()=>{this.#u=null}),this.#t=this.has_pending_snippet(),this.#o=this.#v(()=>(this.#d=!1,Z(()=>this.#r(this.#e)))),this.#h>0?this.#y():this.#t=!1};var a=R;try{H(null),i=!0,n?.(t,o),i=!1}catch(u){ze(u,this.#a&&this.#a.parent)}finally{H(a)}r&&un(()=>{this.#u=this.#v(()=>{oe.ensure(),this.#d=!0;try{return Z(()=>{r(this.#e,()=>t,()=>o)})}catch(u){return ze(u,this.#a.parent),null}finally{this.#d=!1}})})}}function Di(e,t,n,r){const s=ht()?Nt:or;if(n.length===0&&e.length===0){r(t.map(s));return}var i=k,o=C,a=Ni();function u(){Promise.all(n.map(l=>Mi(l))).then(l=>{a();try{r([...t.map(s),...l])}catch(c){(o.f&Pe)===0&&ze(c,o)}i?.deactivate(),Dt()}).catch(l=>{ze(l,o)})}e.length>0?Promise.all(e).then(()=>{a();try{return u()}finally{i?.deactivate(),Dt()}}):u()}function Ni(){var e=C,t=R,n=A,r=k;return function(i=!0){ue(e),H(t),Ke(n),i&&r?.activate()}}function Dt(){ue(null),H(null),Ke(null)}function Nt(e){var t=D|z,n=R!==null&&(R.f&D)!==0?R:null;return C!==null&&(C.f|=Qe),{ctx:A,deps:null,effects:null,equals:Xn,f:t,fn:e,reactions:null,rv:0,v:M,wv:0,parent:n??C,ac:null}}function Mi(e,t){let n=C;n===null&&ai();var r=n.b,s=void 0,i=Se(M),o=!R,a=new Map;return Ki(()=>{var u=zn();s=u.promise;try{Promise.resolve(e()).then(u.resolve,u.reject).then(()=>{l===k&&l.committed&&l.deactivate(),Dt()})}catch(p){u.reject(p),Dt()}var l=k;if(o){var c=!r.is_pending();r.update_pending_count(1),l.increment(c),a.get(l)?.reject(He),a.delete(l),a.set(l,u)}const d=(p,y=void 0)=>{if(l.activate(),y)y!==He&&(i.f|=be,dt(i,y));else{(i.f&be)!==0&&(i.f^=be),dt(i,p);for(const[h,m]of a){if(a.delete(h),h===l)break;m.reject(He)}}o&&(r.update_pending_count(-1),l.decrement(c))};u.promise.then(d,p=>d(null,p||"unknown"))}),Qi(()=>{for(const u of a.values())u.reject(He)}),new Promise(u=>{function l(c){function d(){c===s?u(i):l(s)}c.then(d,d)}l(s)})}function ir(e){const t=Nt(e);return Ar(t),t}function or(e){const t=Nt(e);return t.equals=Yn,t}function ar(e){var t=e.effects;if(t!==null){e.effects=null;for(var n=0;n0&&!lr&&Li()}return t}function Li(){lr=!1;const e=Array.from(hn);for(const t of e)(t.f&N)!==0&&U(t,pe),yt(t)&&_t(t);hn.clear()}function Oe(e){B(e,e.v+1)}function cr(e,t){var n=e.reactions;if(n!==null)for(var r=ht(),s=n.length,i=0;i{if(ge===i)return a();var u=R,l=ge;H(null),Pr(i);var c=a();return H(u),Pr(l),c};return r&&n.set("length",W(e.length)),new Proxy(e,{defineProperty(a,u,l){(!("value"in l)||l.configurable===!1||l.enumerable===!1||l.writable===!1)&&hi();var c=n.get(u);return c===void 0?c=o(()=>{var d=W(l.value);return n.set(u,d),d}):B(c,l.value,!0),!0},deleteProperty(a,u){var l=n.get(u);if(l===void 0){if(u in a){const c=o(()=>W(M));n.set(u,c),Oe(s)}}else B(l,M),Oe(s);return!0},get(a,u,l){if(u===ut)return e;var c=n.get(u),d=u in a;if(c===void 0&&(!d||at(a,u)?.writable)&&(c=o(()=>{var y=Ve(d?a[u]:M),h=W(y);return h}),n.set(u,c)),c!==void 0){var p=E(c);return p===M?void 0:p}return Reflect.get(a,u,l)},getOwnPropertyDescriptor(a,u){var l=Reflect.getOwnPropertyDescriptor(a,u);if(l&&"value"in l){var c=n.get(u);c&&(l.value=E(c))}else if(l===void 0){var d=n.get(u),p=d?.v;if(d!==void 0&&p!==M)return{enumerable:!0,configurable:!0,value:p,writable:!0}}return l},has(a,u){if(u===ut)return!0;var l=n.get(u),c=l!==void 0&&l.v!==M||Reflect.has(a,u);if(l!==void 0||C!==null&&(!c||at(a,u)?.writable)){l===void 0&&(l=o(()=>{var p=c?Ve(a[u]):M,y=W(p);return y}),n.set(u,l));var d=E(l);if(d===M)return!1}return c},set(a,u,l,c){var d=n.get(u),p=u in a;if(r&&u==="length")for(var y=l;yW(M)),n.set(y+"",h))}if(d===void 0)(!p||at(a,u)?.writable)&&(d=o(()=>W(void 0)),B(d,Ve(l)),n.set(u,d));else{p=d.v!==M;var m=o(()=>Ve(l));B(d,m)}var v=Reflect.getOwnPropertyDescriptor(a,u);if(v?.set&&v.set.call(c,l),!p){if(r&&typeof u=="string"){var _=n.get("length"),b=Number(u);Number.isInteger(b)&&b>=_.v&&B(_,b+1)}Oe(s)}return!0},ownKeys(a){E(s);var u=Reflect.ownKeys(a).filter(d=>{var p=n.get(d);return p===void 0||p.v!==M});for(var[l,c]of n)c.v!==M&&!(l in a)&&u.push(l);return u},setPrototypeOf(){di()}})}var fr,hr,dr,pr;function ji(){if(fr===void 0){fr=window,hr=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,n=Text.prototype;dr=at(t,"firstChild").get,pr=at(t,"nextSibling").get,$n(e)&&(e.__click=void 0,e.__className=void 0,e.__attributes=null,e.__style=void 0,e.__e=void 0),$n(n)&&(n.__t=void 0)}}function Re(e=""){return document.createTextNode(e)}function dn(e){return dr.call(e)}function pt(e){return pr.call(e)}function ve(e,t){return dn(e)}function Je(e,t=!1){{var n=dn(e);return n instanceof Comment&&n.data===""?pt(n):n}}function Mt(e,t=1,n=!1){let r=e;for(;t--;)r=pt(r);return r}function qi(e){e.textContent=""}function mr(){return!1}function vr(e){var t=R,n=C;H(null),ue(null);try{return e()}finally{H(t),ue(n)}}function yr(e){C===null&&(R===null&&ci(),li()),Ge&&ui()}function Bi(e,t){var n=t.last;n===null?t.last=t.first=e:(n.next=e,e.prev=n,t.last=e)}function ye(e,t,n){var r=C;r!==null&&(r.f&V)!==0&&(e|=V);var s={ctx:A,deps:null,nodes_start:null,nodes_end:null,f:e|z|re,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(n)try{_t(s),s.f|=rn}catch(a){throw Q(s),a}else t!==null&&De(s);var i=s;if(n&&i.deps===null&&i.teardown===null&&i.nodes_start===null&&i.first===i.last&&(i.f&Qe)===0&&(i=i.first,(e&he)!==0&&(e&Fe)!==0&&i!==null&&(i.f|=Fe)),i!==null&&(i.parent=r,r!==null&&Bi(i,r),R!==null&&(R.f&D)!==0&&(e&xe)===0)){var o=R;(o.effects??=[]).push(i)}return s}function Ut(){return R!==null&&!ae}function Qi(e){const t=ye(Pt,null,!1);return U(t,N),t.teardown=e,t}function mt(e){yr();var t=C.f,n=!R&&(t&de)!==0&&(t&rn)===0;if(n){var r=A;(r.e??=[]).push(e)}else return _r(e)}function _r(e){return ye(Vn|Gn,e,!1)}function gr(e){return yr(),ye(Pt|Gn,e,!0)}function Hi(e){oe.ensure();const t=ye(xe|Qe,e,!0);return(n={})=>new Promise(r=>{n.outro?We(t,()=>{Q(t),r(void 0)}):(Q(t),r(void 0))})}function Ki(e){return ye(on|Qe,e,!0)}function $i(e,t=0){return ye(Pt|t,e,!0)}function pn(e,t=[],n=[],r=[]){Di(r,t,n,s=>{ye(Pt,()=>e(...s.map(E)),!0)})}function It(e,t=0){var n=ye(he|t,e,!0);return n}function Z(e){return ye(de|Qe,e,!0)}function br(e){var t=e.teardown;if(t!==null){const n=Ge,r=R;Cr(!0),H(null);try{t.call(null)}finally{Cr(n),H(r)}}}function wr(e,t=!1){var n=e.first;for(e.first=e.last=null;n!==null;){const s=n.ac;s!==null&&vr(()=>{s.abort(He)});var r=n.next;(n.f&xe)!==0?n.parent=null:Q(n,t),n=r}}function zi(e){for(var t=e.first;t!==null;){var n=t.next;(t.f&de)===0&&Q(t),t=n}}function Q(e,t=!0){var n=!1;(t||(e.f&Wn)!==0)&&e.nodes_start!==null&&e.nodes_end!==null&&(Vi(e.nodes_start,e.nodes_end),n=!0),wr(e,t&&!n),Lt(e,0),U(e,Pe);var r=e.transitions;if(r!==null)for(const i of r)i.stop();br(e);var s=e.parent;s!==null&&s.first!==null&&Er(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes_start=e.nodes_end=e.ac=null}function Vi(e,t){for(;e!==null;){var n=e===t?null:pt(e);e.remove(),e=n}}function Er(e){var t=e.parent,n=e.prev,r=e.next;n!==null&&(n.next=r),r!==null&&(r.prev=n),t!==null&&(t.first===e&&(t.first=r),t.last===e&&(t.last=n))}function We(e,t,n=!0){var r=[];mn(e,r,!0),Sr(r,()=>{n&&Q(e),t&&t()})}function Sr(e,t){var n=e.length;if(n>0){var r=()=>--n||t();for(var s of e)s.out(r)}else t()}function mn(e,t,n){if((e.f&V)===0){if(e.f^=V,e.transitions!==null)for(const o of e.transitions)(o.is_global||n)&&t.push(o);for(var r=e.first;r!==null;){var s=r.next,i=(r.f&Fe)!==0||(r.f&de)!==0&&(e.f&he)!==0;mn(r,t,i?n:!1),r=s}}}function vn(e){Or(e,!0)}function Or(e,t){if((e.f&V)!==0){e.f^=V,(e.f&N)===0&&(U(e,z),De(e));for(var n=e.first;n!==null;){var r=n.next,s=(n.f&Fe)!==0||(n.f&de)!==0;Or(n,s?t:!1),n=r}if(e.transitions!==null)for(const i of e.transitions)(i.is_global||t)&&i.in()}}function Rr(e,t){for(var n=e.nodes_start,r=e.nodes_end;n!==null;){var s=n===r?null:pt(n);t.append(n),n=s}}let Ne=!1;function Tr(e){Ne=e}let Ge=!1;function Cr(e){Ge=e}let R=null,ae=!1;function H(e){R=e}let C=null;function ue(e){C=e}let _e=null;function Ar(e){R!==null&&(_e===null?_e=[e]:_e.push(e))}let j=null,G=0,ee=null;function Ji(e){ee=e}let xr=1,vt=0,ge=vt;function Pr(e){ge=e}function Fr(){return++xr}function yt(e){var t=e.f;if((t&z)!==0)return!0;if(t&D&&(e.f&=~ke),(t&pe)!==0){var n=e.deps;if(n!==null)for(var r=n.length,s=0;se.wv)return!0}(t&re)!==0&&J===null&&U(e,N)}return!1}function kr(e,t,n=!0){var r=e.reactions;if(r!==null&&!_e?.includes(e))for(var s=0;s{e.ac.abort(He)}),e.ac=null);try{e.f|=sn;var c=e.fn,d=c(),p=e.deps;if(j!==null){var y;if(Lt(e,G),p!==null&&G>0)for(p.length=G+j.length,y=0;y{throw v});throw p}}finally{e.__root=t,delete e.currentTarget,H(c),ue(d)}}}function to(e){var t=document.createElement("template");return t.innerHTML=e.replaceAll("",""),t.content}function Lr(e,t){var n=C;n.nodes_start===null&&(n.nodes_start=e,n.nodes_end=t)}function Me(e,t){var n=(t&gi)!==0,r,s=!e.startsWith("");return()=>{r===void 0&&(r=to(s?e:""+e),r=dn(r));var i=n||hr?document.importNode(r,!0):r.cloneNode(!0);return Lr(i,i),i}}function Ye(){var e=document.createDocumentFragment(),t=document.createComment(""),n=Re();return e.append(t,n),Lr(t,n),e}function X(e,t){e!==null&&e.before(t)}function gt(e,t){var n=t==null?"":typeof t=="object"?t+"":t;n!==(e.__t??=e.nodeValue)&&(e.__t=n,e.nodeValue=n+"")}function no(e,t){return ro(e,t)}const Ze=new Map;function ro(e,{target:t,anchor:n,props:r={},events:s,context:i,intro:o=!0}){ji();var a=new Set,u=d=>{for(var p=0;p{var d=n??t.appendChild(Re());return Fi(d,{pending:()=>{}},p=>{if(i){ct({});var y=A;y.c=i}s&&(r.$$events=s),l=e(p,r)||{},i&&ft()}),()=>{for(var p of a){t.removeEventListener(p,jt);var y=Ze.get(p);--y===0?(document.removeEventListener(p,jt),Ze.delete(p)):Ze.set(p,y)}Ur.delete(u),d!==n&&d.parentNode?.removeChild(d)}});return so.set(l,c),l}let so=new WeakMap;class jr{anchor;#t=new Map;#e=new Map;#n=new Map;#s=!0;constructor(t,n=!0){this.anchor=t,this.#s=n}#r=()=>{var t=k;if(this.#t.has(t)){var n=this.#t.get(t),r=this.#e.get(n);if(r)vn(r);else{var s=this.#n.get(n);s&&(this.#e.set(n,s.effect),this.#n.delete(n),s.fragment.lastChild.remove(),this.anchor.before(s.fragment),r=s.effect)}for(const[i,o]of this.#t){if(this.#t.delete(i),i===t)break;const a=this.#n.get(o);a&&(Q(a.effect),this.#n.delete(o))}for(const[i,o]of this.#e){if(i===n)continue;const a=()=>{if(Array.from(this.#t.values()).includes(i)){var l=document.createDocumentFragment();Rr(o,l),l.append(Re()),this.#n.set(i,{effect:o,fragment:l})}else Q(o);this.#e.delete(i)};this.#s||!r?We(o,a,!1):a()}}};#a=t=>{this.#t.delete(t);const n=Array.from(this.#t.values());for(const[r,s]of this.#n)n.includes(r)||(Q(s.effect),this.#n.delete(r))};ensure(t,n){var r=k,s=mr();if(n&&!this.#e.has(t)&&!this.#n.has(t))if(s){var i=document.createDocumentFragment(),o=Re();i.append(o),this.#n.set(t,{effect:Z(()=>n(o)),fragment:i})}else this.#e.set(t,Z(()=>n(this.anchor)));if(this.#t.set(r,t),s){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.#n)a===t?r.skipped_effects.delete(u.effect):r.skipped_effects.add(u.effect);r.oncommit(this.#r),r.ondiscard(this.#a)}else this.#r()}}function et(e,t,n=!1){var r=new jr(e),s=n?Fe:0;function i(o,a){r.ensure(o,a)}It(()=>{var o=!1;t((a,u=!0)=>{o=!0,i(u,a)}),o||i(!1,null)},s)}function io(e,t){return t}function oo(e,t,n){for(var r=[],s=t.length,i=0;i{var o=r.length===0&&n!==null;if(o){var a=n,u=a.parentNode;qi(u),u.append(a),e.items.clear(),le(e,t[0].prev,t[s-1].next)}for(var l=0;l{var m=n();return Be(m)?m:m==null?[]:en(m)}),d,p=!0;function y(){uo(h,d,a,o,t,r),l!==null&&(d.length===0?(l.fragment?(o.before(l.fragment),l.fragment=null):vn(l.effect),h.first=l.effect):We(l.effect,()=>{l=null}))}var h=It(()=>{d=E(c);for(var m=d.length,v=new Set,_=k,b=null,g=mr(),O=0;Oi(o))};else{var F=document.createDocumentFragment(),q=Re();F.append(q),l={fragment:F,effect:Z(()=>i(q))}}for(const[Y,ie]of a.items)v.has(Y)||_.skipped_effects.add(ie.e);p||(g?(_.oncommit(y),_.ondiscard(()=>{})):y()),E(c)});p=!1}function uo(e,t,n,r,s,i){var o=t.length,a=n.items,u=n.first,l,c=null,d=[],p=[],y,h,m,v;for(v=0;v0){var F=o===0?r:null;oo(n,P,F)}}e.first=n.first&&n.first.e,e.last=c&&c.e,c&&(c.e.next=null)}function lo(e,t,n,r,s,i,o,a){var u=(o&vi)!==0,l=(o&_i)===0,c=u?l?Ii(n,!1,!1):Se(n):n,d=(o&yi)===0?s:Se(s),p={i:d,v:c,k:r,a:null,e:null,o:!1,prev:t,next:null};try{if(e===null){var y=document.createDocumentFragment();y.append(e=Re())}return p.e=Z(()=>i(e,c,d,a)),p.e.prev=t&&t.e,t!==null&&(t.next=p,t.e.next=p.e),p}finally{}}function _n(e,t,n){for(var r=e.next?e.next.e.nodes_start:n,s=t?t.e.nodes_start:n,i=e.e.nodes_start;i!==null&&i!==r;){var o=pt(i);s.before(i),i=o}}function le(e,t,n){t===null?e.first=n:(t.next=n,t.e.next=n&&n.e),n!==null&&(n.prev=t,n.e.prev=t&&t.e)}function co(e,t,...n){var r=new jr(e);It(()=>{const s=t()??null;r.ensure(s,s&&(i=>s(i,...n)))},Fe)}function fo(e,t){return e==null?null:String(e)}function ho(e,t,n,r){var s=e.__style;if(s!==t){var i=fo(t);i==null?e.removeAttribute("style"):e.style.cssText=i,e.__style=t}return r}const po=Symbol("is custom element"),mo=Symbol("is html");function gn(e,t,n,r){var s=vo(e);s[t]!==(s[t]=n)&&(t==="loading"&&(e[oi]=n),n==null?e.removeAttribute(t):typeof n!="string"&&yo(e).includes(t)?e[t]=n:e.setAttribute(t,n))}function vo(e){return e.__attributes??={[po]:e.nodeName.includes("-"),[mo]:e.namespaceURI===bi}}var qr=new Map;function yo(e){var t=e.getAttribute("is")||e.nodeName,n=qr.get(t);if(n)return n;qr.set(t,n=[]);for(var r,s=e,i=Element.prototype;i!==s;){r=Kn(s);for(var o in r)r[o].set&&n.push(o);s=tn(s)}return n}function _o(e=!1){const t=A,n=t.l.u;if(!n)return;let r=()=>Xi(t.s);if(e){let s=0,i={};const o=Nt(()=>{let a=!1;const u=t.s;for(const l in u)u[l]!==i[l]&&(i[l]=u[l],a=!0);return a&&s++,s});r=()=>E(o)}n.b.length&&gr(()=>{Br(t,r),nn(n.b)}),mt(()=>{const s=Xe(()=>n.m.map(ii));return()=>{for(const i of s)typeof i=="function"&&i()}}),n.a.length&&mt(()=>{Br(t,r),nn(n.a)})}function Br(e,t){if(e.l.s)for(const n of e.l.s)E(n);t()}function go(e,t,n,r){var s=r,i=!0,o=()=>(i&&(i=!1,s=Xe(r)),s),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 Qr(e){A===null&&an(),lt&&A.l!==null?wo(A).m.push(e):mt(()=>{const t=Xe(e);if(typeof t=="function")return t})}function bo(e){A===null&&an(),Qr(()=>()=>Xe(e))}function wo(e){var t=e.l;return t.u??={a:[],b:[],m:[]}}const Eo="5";typeof window<"u"&&((window.__svelte??={}).v??=new Set).add(Eo),Si();var bt=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(){}},So={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},Oo=class{#t=So;#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)}},Ue=new Oo;function Ro(e){setTimeout(e,0)}var tt=typeof window>"u"||"Deno"in globalThis;function te(){}function To(e,t){return typeof e=="function"?e(t):e}function bn(e){return typeof e=="number"&&e>=0&&e!==1/0}function Hr(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Te(e,t){return typeof e=="function"?e(t):e}function ne(e,t){return typeof e=="function"?e(t):e}function Kr(e,t){const{type:n="all",exact:r,fetchStatus:s,predicate:i,queryKey:o,stale:a}=e;if(o){if(r){if(t.queryHash!==wn(o,t.options))return!1}else if(!Et(t.queryKey,o))return!1}if(n!=="all"){const u=t.isActive();if(n==="active"&&!u||n==="inactive"&&u)return!1}return!(typeof a=="boolean"&&t.isStale()!==a||s&&s!==t.state.fetchStatus||i&&!i(t))}function $r(e,t){const{exact:n,status:r,predicate:s,mutationKey:i}=e;if(i){if(!t.options.mutationKey)return!1;if(n){if(wt(t.options.mutationKey)!==wt(i))return!1}else if(!Et(t.options.mutationKey,i))return!1}return!(r&&t.state.status!==r||s&&!s(t))}function wn(e,t){return(t?.queryKeyHashFn||wt)(e)}function wt(e){return JSON.stringify(e,(t,n)=>Sn(n)?Object.keys(n).sort().reduce((r,s)=>(r[s]=n[s],r),{}):n)}function Et(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>Et(e[n],t[n])):!1}var Co=Object.prototype.hasOwnProperty;function zr(e,t){if(e===t)return e;const n=Vr(e)&&Vr(t);if(!n&&!(Sn(e)&&Sn(t)))return t;const s=(n?e:Object.keys(e)).length,i=n?t:Object.keys(t),o=i.length,a=n?new Array(o):{};let u=0;for(let l=0;l{Ue.setTimeout(t,e)})}function On(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?zr(e,t):t}function xo(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function Po(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var Rn=Symbol();function Wr(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===Rn?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}var Fo=class extends bt{#t;#e;#n;constructor(){super(),this.#n=e=>{if(!tt&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}}}onSubscribe(){this.#e||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#e?.(),this.#e=void 0)}setEventListener(e){this.#n=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"}},Tn=new Fo;function Cn(){let e,t;const n=new Promise((s,i)=>{e=s,t=i});n.status="pending",n.catch(()=>{});function r(s){Object.assign(n,s),delete n.resolve,delete n.reject}return n.resolve=s=>{r({status:"fulfilled",value:s}),e(s)},n.reject=s=>{r({status:"rejected",reason:s}),t(s)},n}var ko=Ro;function Do(){let e=[],t=0,n=a=>{a()},r=a=>{a()},s=ko;const i=a=>{t?e.push(a):s(()=>{n(a)})},o=()=>{const a=e;e=[],a.length&&s(()=>{r(()=>{a.forEach(u=>{n(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=>{n=a},setBatchNotifyFunction:a=>{r=a},setScheduler:a=>{s=a}}}var I=Do(),No=class extends bt{#t=!0;#e;#n;constructor(){super(),this.#n=e=>{if(!tt&&window.addEventListener){const t=()=>e(!0),n=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",n)}}}}onSubscribe(){this.#e||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#e?.(),this.#e=void 0)}setEventListener(e){this.#n=e,this.#e?.(),this.#e=e(this.setOnline.bind(this))}setOnline(e){this.#t!==e&&(this.#t=e,this.listeners.forEach(n=>{n(e)}))}isOnline(){return this.#t}},qt=new No;function Mo(e){return Math.min(1e3*2**e,3e4)}function Gr(e){return(e??"online")==="online"?qt.isOnline():!0}var An=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function Xr(e){let t=!1,n=0,r;const s=Cn(),i=()=>s.status!=="pending",o=m=>{if(!i()){const v=new An(m);p(v),e.onCancel?.(v)}},a=()=>{t=!0},u=()=>{t=!1},l=()=>Tn.isFocused()&&(e.networkMode==="always"||qt.isOnline())&&e.canRun(),c=()=>Gr(e.networkMode)&&e.canRun(),d=m=>{i()||(r?.(),s.resolve(m))},p=m=>{i()||(r?.(),s.reject(m))},y=()=>new Promise(m=>{r=v=>{(i()||l())&&m(v)},e.onPause?.()}).then(()=>{r=void 0,i()||e.onContinue?.()}),h=()=>{if(i())return;let m;const v=n===0?e.initialPromise:void 0;try{m=v??e.fn()}catch(_){m=Promise.reject(_)}Promise.resolve(m).then(d).catch(_=>{if(i())return;const b=e.retry??(tt?0:3),g=e.retryDelay??Mo,O=typeof g=="function"?g(n,_):g,T=b===!0||typeof b=="number"&&nl()?void 0:y()).then(()=>{t?p(_):h()})})};return{promise:s,status:()=>s.status,cancel:o,continue:()=>(r?.(),s),cancelRetry:a,continueRetry:u,canStart:c,start:()=>(c()?h():y().then(h),s)}}var Yr=class{#t;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),bn(this.gcTime)&&(this.#t=Ue.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(tt?1/0:300*1e3))}clearGcTimeout(){this.#t&&(Ue.clearTimeout(this.#t),this.#t=void 0)}},Uo=class extends Yr{#t;#e;#n;#s;#r;#a;#o;constructor(e){super(),this.#o=!1,this.#a=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#s=e.client,this.#n=this.#s.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#t=ts(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.#a,...e},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const t=ts(this.options);t.data!==void 0&&(this.setState(es(t.data,t.dataUpdatedAt)),this.#t=t)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#n.remove(this)}setData(e,t){const n=On(this.state.data,e,this.options);return this.#i({data:n,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}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(te).catch(te):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#t)}isActive(){return this.observers.some(e=>ne(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Rn||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>Te(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:!Hr(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.#n.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.#o?this.#r.cancel({revert:!0}):this.#r.cancelRetry()),this.scheduleGc()),this.#n.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 n=new AbortController,r=a=>{Object.defineProperty(a,"signal",{enumerable:!0,get:()=>(this.#o=!0,n.signal)})},s=()=>{const a=Wr(this.options,t),l=(()=>{const c={client:this.#s,queryKey:this.queryKey,meta:this.meta};return r(c),c})();return this.#o=!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.#s,state:this.state,fetchFn:s};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=Xr({initialPromise:t?.initialPromise,fn:o.fetchFn,onCancel:a=>{a instanceof An&&a.revert&&this.setState({...this.#e,fetchStatus:"idle"}),n.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.#n.config.onSuccess?.(a,this),this.#n.config.onSettled?.(a,this.state.error,this),a}catch(a){if(a instanceof An){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.#n.config.onError?.(a,this),this.#n.config.onSettled?.(this.state.data,a,this),a}finally{this.scheduleGc()}}#i(e){const t=n=>{switch(e.type){case"failed":return{...n,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...Zr(n.data,this.options),fetchMeta:e.meta??null};case"success":const r={...n,...es(e.data,e.dataUpdatedAt),dataUpdateCount:n.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#e=e.manual?r:void 0,r;case"error":const s=e.error;return{...n,error:s,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:s,fetchStatus:"idle",status:"error"};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...e.state}}};this.state=t(this.state),I.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),this.#n.notify({query:this,type:"updated",action:e})})}};function Zr(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Gr(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function es(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function ts(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var Io=class extends bt{constructor(e,t){super(),this.options=t,this.#t=e,this.#i=null,this.#o=Cn(),this.bindMethods(),this.setOptions(t)}#t;#e=void 0;#n=void 0;#s=void 0;#r;#a;#o;#i;#u;#l;#c;#f;#h;#d;#p=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#e.addObserver(this),ns(this.#e,this.options)?this.#m():this.updateResult(),this.#v())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return xn(this.#e,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return xn(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,n=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 ne(this.options.enabled,this.#e)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#E(),this.#e.setOptions(this.options),t._defaulted&&!En(this.options,t)&&this.#t.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#e,observer:this});const r=this.hasListeners();r&&rs(this.#e,n,this.options,t)&&this.#m(),this.updateResult(),r&&(this.#e!==n||ne(this.options.enabled,this.#e)!==ne(t.enabled,this.#e)||Te(this.options.staleTime,this.#e)!==Te(t.staleTime,this.#e))&&this.#b();const s=this.#w();r&&(this.#e!==n||ne(this.options.enabled,this.#e)!==ne(t.enabled,this.#e)||s!==this.#d)&&this.#_(s)}getOptimisticResult(e){const t=this.#t.getQueryCache().build(this.#t,e),n=this.createResult(t,e);return jo(this,n)&&(this.#s=n,this.#a=this.options,this.#r=this.#e.state),n}getCurrentResult(){return this.#s}trackResult(e,t){return new Proxy(e,{get:(n,r)=>(this.trackProp(r),t?.(r),r==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&this.#o.status==="pending"&&this.#o.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(n,r))})}trackProp(e){this.#p.add(e)}getCurrentQuery(){return this.#e}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const t=this.#t.defaultQueryOptions(e),n=this.#t.getQueryCache().build(this.#t,t);return n.fetch().then(()=>this.createResult(n,t))}fetch(e){return this.#m({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#s))}#m(e){this.#E();let t=this.#e.fetch(this.options,e);return e?.throwOnError||(t=t.catch(te)),t}#b(){this.#y();const e=Te(this.options.staleTime,this.#e);if(tt||this.#s.isStale||!bn(e))return;const n=Hr(this.#s.dataUpdatedAt,e)+1;this.#f=Ue.setTimeout(()=>{this.#s.isStale||this.updateResult()},n)}#w(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#e):this.options.refetchInterval)??!1}#_(e){this.#g(),this.#d=e,!(tt||ne(this.options.enabled,this.#e)===!1||!bn(this.#d)||this.#d===0)&&(this.#h=Ue.setInterval(()=>{(this.options.refetchIntervalInBackground||Tn.isFocused())&&this.#m()},this.#d))}#v(){this.#b(),this.#_(this.#w())}#y(){this.#f&&(Ue.clearTimeout(this.#f),this.#f=void 0)}#g(){this.#h&&(Ue.clearInterval(this.#h),this.#h=void 0)}createResult(e,t){const n=this.#e,r=this.options,s=this.#s,i=this.#r,o=this.#a,u=e!==n?e.state:this.#n,{state:l}=e;let c={...l},d=!1,p;if(t._optimisticResults){const F=this.hasListeners(),q=!F&&ns(e,t),Y=F&&rs(e,n,t,r);(q||Y)&&(c={...c,...Zr(l.data,e.options)}),t._optimisticResults==="isRestoring"&&(c.fetchStatus="idle")}let{error:y,errorUpdatedAt:h,status:m}=c;p=c.data;let v=!1;if(t.placeholderData!==void 0&&p===void 0&&m==="pending"){let F;s?.isPlaceholderData&&t.placeholderData===o?.placeholderData?(F=s.data,v=!0):F=typeof t.placeholderData=="function"?t.placeholderData(this.#c?.state.data,this.#c):t.placeholderData,F!==void 0&&(m="success",p=On(s?.data,F,t),d=!0)}if(t.select&&p!==void 0&&!v)if(s&&p===i?.data&&t.select===this.#u)p=this.#l;else try{this.#u=t.select,p=t.select(p),p=On(s?.data,p,t),this.#l=p,this.#i=null}catch(F){this.#i=F}this.#i&&(y=this.#i,p=this.#l,h=Date.now(),m="error");const _=c.fetchStatus==="fetching",b=m==="pending",g=m==="error",O=b&&_,T=p!==void 0,S={status:m,fetchStatus:c.fetchStatus,isPending:b,isSuccess:m==="success",isError:g,isInitialLoading:O,isLoading:O,data:p,dataUpdatedAt:c.dataUpdatedAt,error:y,errorUpdatedAt:h,failureCount:c.fetchFailureCount,failureReason:c.fetchFailureReason,errorUpdateCount:c.errorUpdateCount,isFetched:c.dataUpdateCount>0||c.errorUpdateCount>0,isFetchedAfterMount:c.dataUpdateCount>u.dataUpdateCount||c.errorUpdateCount>u.errorUpdateCount,isFetching:_,isRefetching:_&&!b,isLoadingError:g&&!T,isPaused:c.fetchStatus==="paused",isPlaceholderData:d,isRefetchError:g&&T,isStale:Pn(e,t),refetch:this.refetch,promise:this.#o,isEnabled:ne(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){const F=ie=>{S.status==="error"?ie.reject(S.error):S.data!==void 0&&ie.resolve(S.data)},q=()=>{const ie=this.#o=S.promise=Cn();F(ie)},Y=this.#o;switch(Y.status){case"pending":e.queryHash===n.queryHash&&F(Y);break;case"fulfilled":(S.status==="error"||S.data!==Y.value)&&q();break;case"rejected":(S.status!=="error"||S.error!==Y.reason)&&q();break}}return S}updateResult(){const e=this.#s,t=this.createResult(this.#e,this.options);if(this.#r=this.#e.state,this.#a=this.options,this.#r.data!==void 0&&(this.#c=this.#e),En(t,e))return;this.#s=t;const n=()=>{if(!e)return!0;const{notifyOnChangeProps:r}=this.options,s=typeof r=="function"?r():r;if(s==="all"||!s&&!this.#p.size)return!0;const i=new Set(s??this.#p);return this.options.throwOnError&&i.add("error"),Object.keys(this.#s).some(o=>{const a=o;return this.#s[a]!==e[a]&&i.has(a)})};this.#S({listeners:n()})}#E(){const e=this.#t.getQueryCache().build(this.#t,this.options);if(e===this.#e)return;const t=this.#e;this.#e=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#v()}#S(e){I.batch(()=>{e.listeners&&this.listeners.forEach(t=>{t(this.#s)}),this.#t.getQueryCache().notify({query:this.#e,type:"observerResultsUpdated"})})}};function Lo(e,t){return ne(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function ns(e,t){return Lo(e,t)||e.state.data!==void 0&&xn(e,t,t.refetchOnMount)}function xn(e,t,n){if(ne(t.enabled,e)!==!1&&Te(t.staleTime,e)!=="static"){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&Pn(e,t)}return!1}function rs(e,t,n,r){return(e!==t||ne(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&Pn(e,n)}function Pn(e,t){return ne(t.enabled,e)!==!1&&e.isStaleByTime(Te(t.staleTime,e))}function jo(e,t){return!En(e.getCurrentResult(),t)}function ss(e){return{onFetch:(t,n)=>{const r=t.options,s=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 c=!1;const d=h=>{Object.defineProperty(h,"signal",{enumerable:!0,get:()=>(t.signal.aborted?c=!0:t.signal.addEventListener("abort",()=>{c=!0}),t.signal)})},p=Wr(t.options,t.fetchOptions),y=async(h,m,v)=>{if(c)return Promise.reject();if(m==null&&h.pages.length)return Promise.resolve(h);const b=(()=>{const P={client:t.client,queryKey:t.queryKey,pageParam:m,direction:v?"backward":"forward",meta:t.options.meta};return d(P),P})(),g=await p(b),{maxPages:O}=t.options,T=v?Po:xo;return{pages:T(h.pages,g,O),pageParams:T(h.pageParams,m,O)}};if(s&&i.length){const h=s==="backward",m=h?qo:is,v={pages:i,pageParams:o},_=m(r,v);a=await y(v,_,h)}else{const h=e??i.length;do{const m=u===0?o[0]??r.initialPageParam:is(r,a);if(u>0&&m==null)break;a=await y(a,m),u++}while(ut.options.persister?.(l,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):t.fetchFn=l}}}function is(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function qo(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var Bo=class extends Yr{#t;#e;#n;#s;constructor(e){super(),this.#t=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#e=[],this.state=e.state||Qo(),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.#n.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#e=this.#e.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#e.length||(this.state.status==="pending"?this.scheduleGc():this.#n.remove(this))}continue(){return this.#s?.continue()??this.execute(this.state.variables)}async execute(e){const t=()=>{this.#r({type:"continue"})},n={client:this.#t,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#s=Xr({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):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.#n.canRun(this)});const r=this.state.status==="pending",s=!this.#s.canStart();try{if(r)t();else{this.#r({type:"pending",variables:e,isPaused:s}),await this.#n.config.onMutate?.(e,this,n);const o=await this.options.onMutate?.(e,n);o!==this.state.context&&this.#r({type:"pending",context:o,variables:e,isPaused:s})}const i=await this.#s.start();return await this.#n.config.onSuccess?.(i,e,this.state.context,this,n),await this.options.onSuccess?.(i,e,this.state.context,n),await this.#n.config.onSettled?.(i,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(i,null,e,this.state.context,n),this.#r({type:"success",data:i}),i}catch(i){try{throw await this.#n.config.onError?.(i,e,this.state.context,this,n),await this.options.onError?.(i,e,this.state.context,n),await this.#n.config.onSettled?.(void 0,i,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(void 0,i,e,this.state.context,n),i}finally{this.#r({type:"error",error:i})}}finally{this.#n.runNext(this)}}#r(e){const t=n=>{switch(e.type){case"failed":return{...n,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,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{...n,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:e.error,failureCount:n.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=t(this.state),I.batch(()=>{this.#e.forEach(n=>{n.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:"updated",action:e})})}};function Qo(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Ho=class extends bt{constructor(e={}){super(),this.config=e,this.#t=new Set,this.#e=new Map,this.#n=0}#t;#e;#n;build(e,t,n){const r=new Bo({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){this.#t.add(e);const t=Bt(e);if(typeof t=="string"){const n=this.#e.get(t);n?n.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 n=this.#e.get(t);if(n)if(n.length>1){const r=n.indexOf(e);r!==-1&&n.splice(r,1)}else n[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(s=>s.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(){I.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(n=>$r(t,n))}findAll(e={}){return this.getAll().filter(t=>$r(e,t))}notify(e){I.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>t.state.isPaused);return I.batch(()=>Promise.all(e.map(t=>t.continue().catch(te))))}};function Bt(e){return e.options.scope?.id}var Ko=class extends bt{constructor(e={}){super(),this.config=e,this.#t=new Map}#t;build(e,t,n){const r=t.queryKey,s=t.queryHash??wn(r,t);let i=this.get(s);return i||(i=new Uo({client:e,queryKey:r,queryHash:s,options:e.defaultQueryOptions(t),state:n,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(){I.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(n=>Kr(t,n))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(n=>Kr(e,n)):t}notify(e){I.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){I.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){I.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},os=class{#t;#e;#n;#s;#r;#a;#o;#i;constructor(e={}){this.#t=e.queryCache||new Ko,this.#e=e.mutationCache||new Ho,this.#n=e.defaultOptions||{},this.#s=new Map,this.#r=new Map,this.#a=0}mount(){this.#a++,this.#a===1&&(this.#o=Tn.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#t.onFocus())}),this.#i=qt.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#t.onOnline())}))}unmount(){this.#a--,this.#a===0&&(this.#o?.(),this.#o=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),n=this.#t.build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(Te(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return this.#t.findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),i=this.#t.get(r.queryHash)?.state.data,o=To(t,i);if(o!==void 0)return this.#t.build(this,r).setData(o,{...n,manual:!0})}setQueriesData(e,t,n){return I.batch(()=>this.#t.findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){const t=this.defaultQueryOptions({queryKey:e});return this.#t.get(t.queryHash)?.state}removeQueries(e){const t=this.#t;I.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=this.#t;return I.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=I.batch(()=>this.#t.findAll(e).map(s=>s.cancel(n)));return Promise.all(r).then(te).catch(te)}invalidateQueries(e,t={}){return I.batch(()=>(this.#t.findAll(e).forEach(n=>{n.invalidate()}),e?.refetchType==="none"?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=I.batch(()=>this.#t.findAll(e).filter(s=>!s.isDisabled()&&!s.isStatic()).map(s=>{let i=s.fetch(void 0,n);return n.throwOnError||(i=i.catch(te)),s.state.fetchStatus==="paused"?Promise.resolve():i}));return Promise.all(r).then(te)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=this.#t.build(this,t);return n.isStaleByTime(Te(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(te).catch(te)}fetchInfiniteQuery(e){return e.behavior=ss(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(te).catch(te)}ensureInfiniteQueryData(e){return e.behavior=ss(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return qt.isOnline()?this.#e.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#t}getMutationCache(){return this.#e}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#s.set(wt(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...this.#s.values()],n={};return t.forEach(r=>{Et(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){this.#r.set(wt(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...this.#r.values()],n={};return t.forEach(r=>{Et(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=wn(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===Rn&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#t.clear(),this.#e.clear()}};const as=Symbol("QueryClient"),$o=()=>{const e=Zn(as);if(!e)throw new Error("No QueryClient was found in Svelte context. Did you forget to wrap your component with QueryClientProvider?");return e},zo=e=>{Oi(as,e)},Vo=Symbol("isRestoring"),Jo=()=>{try{return Zn(Vo)??{current:!1}}catch{return{current:!1}}};function Wo(){return Jo()}function Go(e){return $o()}var Xo=["forEach","isDisjointFrom","isSubsetOf","isSupersetOf"],Yo=["difference","intersection","symmetricDifference","union"],us=!1;class Qt extends Set{#t=new Map;#e=W(0);#n=W(0);#s=ge||-1;constructor(t){if(super(),t){for(var n of t)super.add(n);this.#n.v=super.size}us||this.#a()}#r(t){return ge===this.#s?W(t):Se(t)}#a(){us=!0;var t=Qt.prototype,n=Set.prototype;for(const r of Xo)t[r]=function(...s){return E(this.#e),n[r].apply(this,s)};for(const r of Yo)t[r]=function(...s){E(this.#e);var i=n[r].apply(this,s);return new Qt(i)}}has(t){var n=super.has(t),r=this.#t,s=r.get(t);if(s===void 0){if(!n)return E(this.#e),!1;s=this.#r(!0),r.set(t,s)}return E(s),n}add(t){return super.has(t)||(super.add(t),B(this.#n,super.size),Oe(this.#e)),this}delete(t){var n=super.delete(t),r=this.#t,s=r.get(t);return s!==void 0&&(r.delete(t),B(s,!1)),n&&(B(this.#n,super.size),Oe(this.#e)),n}clear(){if(super.size!==0){super.clear();var t=this.#t;for(var n of t.values())B(n,!1);t.clear(),B(this.#n,0),Oe(this.#e)}}keys(){return this.values()}values(){return E(this.#e),super.values()}entries(){return E(this.#e),super.entries()}[Symbol.iterator](){return this.keys()}get size(){return E(this.#n)}}function Zo(e){const t=Array.isArray(e)?[]:{},n=new Qt,r=new Proxy(t,{set(i,o,a,u){if(n.delete(o),o in i)return Reflect.set(i,o,a,u);let l=W(a);return Object.defineProperty(i,o,{configurable:!0,enumerable:!0,get:()=>E(l)&&ta(E(l))?E(l)():E(l),set:c=>{B(l,c)}}),!0},has:(i,o)=>n.has(o)?!1:o in i,ownKeys(i){return Reflect.ownKeys(i).filter(o=>!n.has(o))},getOwnPropertyDescriptor(i,o){if(!n.has(o))return Reflect.getOwnPropertyDescriptor(i,o)},deleteProperty(i,o){return o in i?(i[o]=void 0,n.add(o),Array.isArray(i)&&i.length--,!0):!1}});function s(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]=ea(()=>i[l])}return s(e),[r,s]}const ls=Symbol("LazyValue");function ea(e){return e[ls]=!0,e}function ta(e){return!!e[ls]}function na(e,t){switch(e){case"post":mt(t);break;case"pre":gr(t);break}}const Fn=(e,t,n)=>{let r=!1,s=Array.isArray(e)?[]:void 0;na(t,()=>{const i=Array.isArray(e)?e.map(a=>a()):e();if(!r){r=!0,s=i;return}const o=Xe(()=>n(i,s));return s=i,o})};function ra(e,t,n){const r=ir(()=>Go()),s=Wo(),i=ir(()=>{const c=E(r).defaultQueryOptions(e());return c._optimisticResults=s.current?"isRestoring":"optimistic",c});let o=W(Ve(new t(E(r),E(i))));Fn(()=>E(r),"pre",()=>{B(o,new t(E(r),E(i)),!0)});function a(){const c=E(o).getOptimisticResult(E(i));return E(i).notifyOnChangeProps?c:E(o).trackResult(c)}const[u,l]=Zo(a());return mt(()=>{const c=s.current?()=>{}:E(o).subscribe(()=>l(a()));return E(o).updateResult(),c}),Fn(()=>E(i),"pre",()=>{E(o).setOptions(E(i))}),Fn(()=>[E(i),E(o)],"pre",()=>{l(a())}),u}function cs(e,t){return ra(e,Io)}function sa(e,t){ct(t,!0);const n=go(t,"client",19,()=>new os);Qr(()=>{n().mount()}),zo(n()),bo(()=>{n().unmount()});var r=Ye(),s=Je(r);co(s,()=>t.children),X(e,r),ft()}function fs(e,t){return function(){return e.apply(t,arguments)}}const{toString:ia}=Object.prototype,{getPrototypeOf:kn}=Object,{iterator:Ht,toStringTag:hs}=Symbol,Kt=(e=>t=>{const n=ia.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),se=e=>(e=e.toLowerCase(),t=>Kt(t)===e),$t=e=>t=>typeof t===e,{isArray:nt}=Array,rt=$t("undefined");function St(e){return e!==null&&!rt(e)&&e.constructor!==null&&!rt(e.constructor)&&K(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const ds=se("ArrayBuffer");function oa(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&ds(e.buffer),t}const aa=$t("string"),K=$t("function"),ps=$t("number"),Ot=e=>e!==null&&typeof e=="object",ua=e=>e===!0||e===!1,zt=e=>{if(Kt(e)!=="object")return!1;const t=kn(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(hs in e)&&!(Ht in e)},la=e=>{if(!Ot(e)||St(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},ca=se("Date"),fa=se("File"),ha=se("Blob"),da=se("FileList"),pa=e=>Ot(e)&&K(e.pipe),ma=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||K(e.append)&&((t=Kt(e))==="formdata"||t==="object"&&K(e.toString)&&e.toString()==="[object FormData]"))},va=se("URLSearchParams"),[ya,_a,ga,ba]=["ReadableStream","Request","Response","Headers"].map(se),wa=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Rt(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,s;if(typeof e!="object"&&(e=[e]),nt(e))for(r=0,s=e.length;r0;)if(s=n[r],t===s.toLowerCase())return s;return null}const Ie=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,vs=e=>!rt(e)&&e!==Ie;function Dn(){const{caseless:e,skipUndefined:t}=vs(this)&&this||{},n={},r=(s,i)=>{const o=e&&ms(n,i)||i;zt(n[o])&&zt(s)?n[o]=Dn(n[o],s):zt(s)?n[o]=Dn({},s):nt(s)?n[o]=s.slice():(!t||!rt(s))&&(n[o]=s)};for(let s=0,i=arguments.length;s(Rt(t,(s,i)=>{n&&K(s)?e[i]=fs(s,n):e[i]=s},{allOwnKeys:r}),e),Sa=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Oa=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},Ra=(e,t,n,r)=>{let s,i,o;const a={};if(t=t||{},e==null)return t;do{for(s=Object.getOwnPropertyNames(e),i=s.length;i-- >0;)o=s[i],(!r||r(o,e,t))&&!a[o]&&(t[o]=e[o],a[o]=!0);e=n!==!1&&kn(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},Ta=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},Ca=e=>{if(!e)return null;if(nt(e))return e;let t=e.length;if(!ps(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},Aa=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&kn(Uint8Array)),xa=(e,t)=>{const r=(e&&e[Ht]).call(e);let s;for(;(s=r.next())&&!s.done;){const i=s.value;t.call(e,i[0],i[1])}},Pa=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},Fa=se("HTMLFormElement"),ka=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,s){return r.toUpperCase()+s}),ys=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Da=se("RegExp"),_s=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Rt(n,(s,i)=>{let o;(o=t(s,i,e))!==!1&&(r[i]=o||s)}),Object.defineProperties(e,r)},Na=e=>{_s(e,(t,n)=>{if(K(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(K(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},Ma=(e,t)=>{const n={},r=s=>{s.forEach(i=>{n[i]=!0})};return nt(e)?r(e):r(String(e).split(t)),n},Ua=()=>{},Ia=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function La(e){return!!(e&&K(e.append)&&e[hs]==="FormData"&&e[Ht])}const ja=e=>{const t=new Array(10),n=(r,s)=>{if(Ot(r)){if(t.indexOf(r)>=0)return;if(St(r))return r;if(!("toJSON"in r)){t[s]=r;const i=nt(r)?[]:{};return Rt(r,(o,a)=>{const u=n(o,s+1);!rt(u)&&(i[a]=u)}),t[s]=void 0,i}}return r};return n(e,0)},qa=se("AsyncFunction"),Ba=e=>e&&(Ot(e)||K(e))&&K(e.then)&&K(e.catch),gs=((e,t)=>e?setImmediate:t?((n,r)=>(Ie.addEventListener("message",({source:s,data:i})=>{s===Ie&&i===n&&r.length&&r.shift()()},!1),s=>{r.push(s),Ie.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",K(Ie.postMessage)),Qa=typeof queueMicrotask<"u"?queueMicrotask.bind(Ie):typeof process<"u"&&process.nextTick||gs,f={isArray:nt,isArrayBuffer:ds,isBuffer:St,isFormData:ma,isArrayBufferView:oa,isString:aa,isNumber:ps,isBoolean:ua,isObject:Ot,isPlainObject:zt,isEmptyObject:la,isReadableStream:ya,isRequest:_a,isResponse:ga,isHeaders:ba,isUndefined:rt,isDate:ca,isFile:fa,isBlob:ha,isRegExp:Da,isFunction:K,isStream:pa,isURLSearchParams:va,isTypedArray:Aa,isFileList:da,forEach:Rt,merge:Dn,extend:Ea,trim:wa,stripBOM:Sa,inherits:Oa,toFlatObject:Ra,kindOf:Kt,kindOfTest:se,endsWith:Ta,toArray:Ca,forEachEntry:xa,matchAll:Pa,isHTMLForm:Fa,hasOwnProperty:ys,hasOwnProp:ys,reduceDescriptors:_s,freezeMethods:Na,toObjectSet:Ma,toCamelCase:ka,noop:Ua,toFiniteNumber:Ia,findKey:ms,global:Ie,isContextDefined:vs,isSpecCompliantForm:La,toJSONObject:ja,isAsyncFn:qa,isThenable:Ba,setImmediate:gs,asap:Qa,isIterable:e=>e!=null&&K(e[Ht])};function w(e,t,n,r,s){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),s&&(this.response=s,this.status=s.status?s.status:null)}f.inherits(w,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:f.toJSONObject(this.config),code:this.code,status:this.status}}});const bs=w.prototype,ws={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{ws[e]={value:e}}),Object.defineProperties(w,ws),Object.defineProperty(bs,"isAxiosError",{value:!0}),w.from=(e,t,n,r,s,i)=>{const o=Object.create(bs);f.toFlatObject(e,o,function(c){return c!==Error.prototype},l=>l!=="isAxiosError");const a=e&&e.message?e.message:"Error",u=t==null&&e?e.code:t;return w.call(o,a,u,n,r,s),e&&o.cause==null&&Object.defineProperty(o,"cause",{value:e,configurable:!0}),o.name=e&&e.name||"Error",i&&Object.assign(o,i),o};const Ha=null;function Nn(e){return f.isPlainObject(e)||f.isArray(e)}function Es(e){return f.endsWith(e,"[]")?e.slice(0,-2):e}function Ss(e,t,n){return e?e.concat(t).map(function(s,i){return s=Es(s),!n&&i?"["+s+"]":s}).join(n?".":""):t}function Ka(e){return f.isArray(e)&&!e.some(Nn)}const $a=f.toFlatObject(f,{},null,function(t){return/^is[A-Z]/.test(t)});function Vt(e,t,n){if(!f.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=f.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(m,v){return!f.isUndefined(v[m])});const r=n.metaTokens,s=n.visitor||c,i=n.dots,o=n.indexes,u=(n.Blob||typeof Blob<"u"&&Blob)&&f.isSpecCompliantForm(t);if(!f.isFunction(s))throw new TypeError("visitor must be a function");function l(h){if(h===null)return"";if(f.isDate(h))return h.toISOString();if(f.isBoolean(h))return h.toString();if(!u&&f.isBlob(h))throw new w("Blob is not supported. Use a Buffer instead.");return f.isArrayBuffer(h)||f.isTypedArray(h)?u&&typeof Blob=="function"?new Blob([h]):Buffer.from(h):h}function c(h,m,v){let _=h;if(h&&!v&&typeof h=="object"){if(f.endsWith(m,"{}"))m=r?m:m.slice(0,-2),h=JSON.stringify(h);else if(f.isArray(h)&&Ka(h)||(f.isFileList(h)||f.endsWith(m,"[]"))&&(_=f.toArray(h)))return m=Es(m),_.forEach(function(g,O){!(f.isUndefined(g)||g===null)&&t.append(o===!0?Ss([m],O,i):o===null?m:m+"[]",l(g))}),!1}return Nn(h)?!0:(t.append(Ss(v,m,i),l(h)),!1)}const d=[],p=Object.assign($a,{defaultVisitor:c,convertValue:l,isVisitable:Nn});function y(h,m){if(!f.isUndefined(h)){if(d.indexOf(h)!==-1)throw Error("Circular reference detected in "+m.join("."));d.push(h),f.forEach(h,function(_,b){(!(f.isUndefined(_)||_===null)&&s.call(t,_,f.isString(b)?b.trim():b,m,p))===!0&&y(_,m?m.concat(b):[b])}),d.pop()}}if(!f.isObject(e))throw new TypeError("data must be an object");return y(e),t}function Os(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function Mn(e,t){this._pairs=[],e&&Vt(e,this,t)}const Rs=Mn.prototype;Rs.append=function(t,n){this._pairs.push([t,n])},Rs.toString=function(t){const n=t?function(r){return t.call(this,r,Os)}:Os;return this._pairs.map(function(s){return n(s[0])+"="+n(s[1])},"").join("&")};function za(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Ts(e,t,n){if(!t)return e;const r=n&&n.encode||za;f.isFunction(n)&&(n={serialize:n});const s=n&&n.serialize;let i;if(s?i=s(t,n):i=f.isURLSearchParams(t)?t.toString():new Mn(t,n).toString(r),i){const o=e.indexOf("#");o!==-1&&(e=e.slice(0,o)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}class Cs{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){f.forEach(this.handlers,function(r){r!==null&&t(r)})}}const As={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Va={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:Mn,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},Un=typeof window<"u"&&typeof document<"u",In=typeof navigator=="object"&&navigator||void 0,Ja=Un&&(!In||["ReactNative","NativeScript","NS"].indexOf(In.product)<0),Wa=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Ga=Un&&window.location.href||"http://localhost",L={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Un,hasStandardBrowserEnv:Ja,hasStandardBrowserWebWorkerEnv:Wa,navigator:In,origin:Ga},Symbol.toStringTag,{value:"Module"})),...Va};function Xa(e,t){return Vt(e,new L.classes.URLSearchParams,{visitor:function(n,r,s,i){return L.isNode&&f.isBuffer(n)?(this.append(r,n.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)},...t})}function Ya(e){return f.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Za(e){const t={},n=Object.keys(e);let r;const s=n.length;let i;for(r=0;r=n.length;return o=!o&&f.isArray(s)?s.length:o,u?(f.hasOwnProp(s,o)?s[o]=[s[o],r]:s[o]=r,!a):((!s[o]||!f.isObject(s[o]))&&(s[o]=[]),t(n,r,s[o],i)&&f.isArray(s[o])&&(s[o]=Za(s[o])),!a)}if(f.isFormData(e)&&f.isFunction(e.entries)){const n={};return f.forEachEntry(e,(r,s)=>{t(Ya(r),s,n,0)}),n}return null}function eu(e,t,n){if(f.isString(e))try{return(t||JSON.parse)(e),f.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const Tt={transitional:As,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",s=r.indexOf("application/json")>-1,i=f.isObject(t);if(i&&f.isHTMLForm(t)&&(t=new FormData(t)),f.isFormData(t))return s?JSON.stringify(xs(t)):t;if(f.isArrayBuffer(t)||f.isBuffer(t)||f.isStream(t)||f.isFile(t)||f.isBlob(t)||f.isReadableStream(t))return t;if(f.isArrayBufferView(t))return t.buffer;if(f.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let a;if(i){if(r.indexOf("application/x-www-form-urlencoded")>-1)return Xa(t,this.formSerializer).toString();if((a=f.isFileList(t))||r.indexOf("multipart/form-data")>-1){const u=this.env&&this.env.FormData;return Vt(a?{"files[]":t}:t,u&&new u,this.formSerializer)}}return i||s?(n.setContentType("application/json",!1),eu(t)):t}],transformResponse:[function(t){const n=this.transitional||Tt.transitional,r=n&&n.forcedJSONParsing,s=this.responseType==="json";if(f.isResponse(t)||f.isReadableStream(t))return t;if(t&&f.isString(t)&&(r&&!this.responseType||s)){const o=!(n&&n.silentJSONParsing)&&s;try{return JSON.parse(t,this.parseReviver)}catch(a){if(o)throw a.name==="SyntaxError"?w.from(a,w.ERR_BAD_RESPONSE,this,null,this.response):a}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:L.classes.FormData,Blob:L.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};f.forEach(["delete","get","head","post","put","patch"],e=>{Tt.headers[e]={}});const tu=f.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),nu=e=>{const t={};let n,r,s;return e&&e.split(` `).forEach(function(o){s=o.indexOf(":"),n=o.substring(0,s).trim().toLowerCase(),r=o.substring(s+1).trim(),!(!n||t[n]&&tu[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},Ps=Symbol("internals");function Ct(e){return e&&String(e).trim().toLowerCase()}function Jt(e){return e===!1||e==null?e:f.isArray(e)?e.map(Jt):String(e)}function ru(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const su=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Ln(e,t,n,r,s){if(f.isFunction(r))return r.call(this,t,n);if(s&&(t=n),!!f.isString(t)){if(f.isString(r))return t.indexOf(r)!==-1;if(f.isRegExp(r))return r.test(t)}}function iu(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function ou(e,t){const n=f.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(s,i,o){return this[r].call(this,t,s,i,o)},configurable:!0})})}let $=class{constructor(t){t&&this.set(t)}set(t,n,r){const s=this;function i(a,u,l){const c=Ct(u);if(!c)throw new Error("header name must be a non-empty string");const d=f.findKey(s,c);(!d||s[d]===void 0||l===!0||l===void 0&&s[d]!==!1)&&(s[d||u]=Jt(a))}const o=(a,u)=>f.forEach(a,(l,c)=>i(l,c,u));if(f.isPlainObject(t)||t instanceof this.constructor)o(t,n);else if(f.isString(t)&&(t=t.trim())&&!su(t))o(nu(t),n);else if(f.isObject(t)&&f.isIterable(t)){let a={},u,l;for(const c of t){if(!f.isArray(c))throw TypeError("Object iterator must return a key-value pair");a[l=c[0]]=(u=a[l])?f.isArray(u)?[...u,c[1]]:[u,c[1]]:c[1]}o(a,n)}else t!=null&&i(n,t,r);return this}get(t,n){if(t=Ct(t),t){const r=f.findKey(this,t);if(r){const s=this[r];if(!n)return s;if(n===!0)return ru(s);if(f.isFunction(n))return n.call(this,s,r);if(f.isRegExp(n))return n.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=Ct(t),t){const r=f.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||Ln(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let s=!1;function i(o){if(o=Ct(o),o){const a=f.findKey(r,o);a&&(!n||Ln(r,r[a],a,n))&&(delete r[a],s=!0)}}return f.isArray(t)?t.forEach(i):i(t),s}clear(t){const n=Object.keys(this);let r=n.length,s=!1;for(;r--;){const i=n[r];(!t||Ln(this,this[i],i,t,!0))&&(delete this[i],s=!0)}return s}normalize(t){const n=this,r={};return f.forEach(this,(s,i)=>{const o=f.findKey(r,i);if(o){n[o]=Jt(s),delete n[i];return}const a=t?iu(i):String(i).trim();a!==i&&delete n[i],n[a]=Jt(s),r[a]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return f.forEach(this,(r,s)=>{r!=null&&r!==!1&&(n[s]=t&&f.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(` `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(s=>r.set(s)),r}static accessor(t){const r=(this[Ps]=this[Ps]={accessors:{}}).accessors,s=this.prototype;function i(o){const a=Ct(o);r[a]||(ou(s,o),r[a]=!0)}return f.isArray(t)?t.forEach(i):i(t),this}};$.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),f.reduceDescriptors($.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}}),f.freezeMethods($);function jn(e,t){const n=this||Tt,r=t||n,s=$.from(r.headers);let i=r.data;return f.forEach(e,function(a){i=a.call(n,i,s.normalize(),t?t.status:void 0)}),s.normalize(),i}function Fs(e){return!!(e&&e.__CANCEL__)}function st(e,t,n){w.call(this,e??"canceled",w.ERR_CANCELED,t,n),this.name="CanceledError"}f.inherits(st,w,{__CANCEL__:!0});function ks(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new w("Request failed with status code "+n.status,[w.ERR_BAD_REQUEST,w.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function au(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function uu(e,t){e=e||10;const n=new Array(e),r=new Array(e);let s=0,i=0,o;return t=t!==void 0?t:1e3,function(u){const l=Date.now(),c=r[i];o||(o=l),n[s]=u,r[s]=l;let d=i,p=0;for(;d!==s;)p+=n[d++],d=d%e;if(s=(s+1)%e,s===i&&(i=(i+1)%e),l-o{n=c,s=null,i&&(clearTimeout(i),i=null),e(...l)};return[(...l)=>{const c=Date.now(),d=c-n;d>=r?o(l,c):(s=l,i||(i=setTimeout(()=>{i=null,o(s)},r-d)))},()=>s&&o(s)]}const Wt=(e,t,n=3)=>{let r=0;const s=uu(50,250);return lu(i=>{const o=i.loaded,a=i.lengthComputable?i.total:void 0,u=o-r,l=s(u),c=o<=a;r=o;const d={loaded:o,total:a,progress:a?o/a:void 0,bytes:u,rate:l||void 0,estimated:l&&a&&c?(a-o)/l:void 0,event:i,lengthComputable:a!=null,[t?"download":"upload"]:!0};e(d)},n)},Ds=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},Ns=e=>(...t)=>f.asap(()=>e(...t)),cu=L.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,L.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(L.origin),L.navigator&&/(msie|trident)/i.test(L.navigator.userAgent)):()=>!0,fu=L.hasStandardBrowserEnv?{write(e,t,n,r,s,i,o){if(typeof document>"u")return;const a=[`${e}=${encodeURIComponent(t)}`];f.isNumber(n)&&a.push(`expires=${new Date(n).toUTCString()}`),f.isString(r)&&a.push(`path=${r}`),f.isString(s)&&a.push(`domain=${s}`),i===!0&&a.push("secure"),f.isString(o)&&a.push(`SameSite=${o}`),document.cookie=a.join("; ")},read(e){if(typeof document>"u")return null;const t=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function hu(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function du(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Ms(e,t,n){let r=!hu(t);return e&&(r||n==!1)?du(e,t):t}const Us=e=>e instanceof $?{...e}:e;function Le(e,t){t=t||{};const n={};function r(l,c,d,p){return f.isPlainObject(l)&&f.isPlainObject(c)?f.merge.call({caseless:p},l,c):f.isPlainObject(c)?f.merge({},c):f.isArray(c)?c.slice():c}function s(l,c,d,p){if(f.isUndefined(c)){if(!f.isUndefined(l))return r(void 0,l,d,p)}else return r(l,c,d,p)}function i(l,c){if(!f.isUndefined(c))return r(void 0,c)}function o(l,c){if(f.isUndefined(c)){if(!f.isUndefined(l))return r(void 0,l)}else return r(void 0,c)}function a(l,c,d){if(d in t)return r(l,c);if(d in e)return r(void 0,l)}const u={url:i,method:i,data:i,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:a,headers:(l,c,d)=>s(Us(l),Us(c),d,!0)};return f.forEach(Object.keys({...e,...t}),function(c){const d=u[c]||s,p=d(e[c],t[c],c);f.isUndefined(p)&&d!==a||(n[c]=p)}),n}const Is=e=>{const t=Le({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:s,xsrfCookieName:i,headers:o,auth:a}=t;if(t.headers=o=$.from(o),t.url=Ts(Ms(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),a&&o.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):""))),f.isFormData(n)){if(L.hasStandardBrowserEnv||L.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if(f.isFunction(n.getHeaders)){const u=n.getHeaders(),l=["content-type","content-length"];Object.entries(u).forEach(([c,d])=>{l.includes(c.toLowerCase())&&o.set(c,d)})}}if(L.hasStandardBrowserEnv&&(r&&f.isFunction(r)&&(r=r(t)),r||r!==!1&&cu(t.url))){const u=s&&i&&fu.read(i);u&&o.set(s,u)}return t},pu=typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(n,r){const s=Is(e);let i=s.data;const o=$.from(s.headers).normalize();let{responseType:a,onUploadProgress:u,onDownloadProgress:l}=s,c,d,p,y,h;function m(){y&&y(),h&&h(),s.cancelToken&&s.cancelToken.unsubscribe(c),s.signal&&s.signal.removeEventListener("abort",c)}let v=new XMLHttpRequest;v.open(s.method.toUpperCase(),s.url,!0),v.timeout=s.timeout;function _(){if(!v)return;const g=$.from("getAllResponseHeaders"in v&&v.getAllResponseHeaders()),T={data:!a||a==="text"||a==="json"?v.responseText:v.response,status:v.status,statusText:v.statusText,headers:g,config:e,request:v};ks(function(S){n(S),m()},function(S){r(S),m()},T),v=null}"onloadend"in v?v.onloadend=_:v.onreadystatechange=function(){!v||v.readyState!==4||v.status===0&&!(v.responseURL&&v.responseURL.indexOf("file:")===0)||setTimeout(_)},v.onabort=function(){v&&(r(new w("Request aborted",w.ECONNABORTED,e,v)),v=null)},v.onerror=function(O){const T=O&&O.message?O.message:"Network Error",P=new w(T,w.ERR_NETWORK,e,v);P.event=O||null,r(P),v=null},v.ontimeout=function(){let O=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const T=s.transitional||As;s.timeoutErrorMessage&&(O=s.timeoutErrorMessage),r(new w(O,T.clarifyTimeoutError?w.ETIMEDOUT:w.ECONNABORTED,e,v)),v=null},i===void 0&&o.setContentType(null),"setRequestHeader"in v&&f.forEach(o.toJSON(),function(O,T){v.setRequestHeader(T,O)}),f.isUndefined(s.withCredentials)||(v.withCredentials=!!s.withCredentials),a&&a!=="json"&&(v.responseType=s.responseType),l&&([p,h]=Wt(l,!0),v.addEventListener("progress",p)),u&&v.upload&&([d,y]=Wt(u),v.upload.addEventListener("progress",d),v.upload.addEventListener("loadend",y)),(s.cancelToken||s.signal)&&(c=g=>{v&&(r(!g||g.type?new st(null,e,v):g),v.abort(),v=null)},s.cancelToken&&s.cancelToken.subscribe(c),s.signal&&(s.signal.aborted?c():s.signal.addEventListener("abort",c)));const b=au(s.url);if(b&&L.protocols.indexOf(b)===-1){r(new w("Unsupported protocol "+b+":",w.ERR_BAD_REQUEST,e));return}v.send(i||null)})},mu=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,s;const i=function(l){if(!s){s=!0,a();const c=l instanceof Error?l:this.reason;r.abort(c instanceof w?c:new st(c instanceof Error?c.message:c))}};let o=t&&setTimeout(()=>{o=null,i(new w(`timeout ${t} of ms exceeded`,w.ETIMEDOUT))},t);const a=()=>{e&&(o&&clearTimeout(o),o=null,e.forEach(l=>{l.unsubscribe?l.unsubscribe(i):l.removeEventListener("abort",i)}),e=null)};e.forEach(l=>l.addEventListener("abort",i));const{signal:u}=r;return u.unsubscribe=()=>f.asap(a),u}},vu=function*(e,t){let n=e.byteLength;if(n{const s=yu(e,t);let i=0,o,a=u=>{o||(o=!0,r&&r(u))};return new ReadableStream({async pull(u){try{const{done:l,value:c}=await s.next();if(l){a(),u.close();return}let d=c.byteLength;if(n){let p=i+=d;n(p)}u.enqueue(new Uint8Array(c))}catch(l){throw a(l),l}},cancel(u){return a(u),s.return()}},{highWaterMark:2})},js=64*1024,{isFunction:Gt}=f,gu=(({Request:e,Response:t})=>({Request:e,Response:t}))(f.global),{ReadableStream:qs,TextEncoder:Bs}=f.global,Qs=(e,...t)=>{try{return!!e(...t)}catch{return!1}},bu=e=>{e=f.merge.call({skipUndefined:!0},gu,e);const{fetch:t,Request:n,Response:r}=e,s=t?Gt(t):typeof fetch=="function",i=Gt(n),o=Gt(r);if(!s)return!1;const a=s&&Gt(qs),u=s&&(typeof Bs=="function"?(h=>m=>h.encode(m))(new Bs):async h=>new Uint8Array(await new n(h).arrayBuffer())),l=i&&a&&Qs(()=>{let h=!1;const m=new n(L.origin,{body:new qs,method:"POST",get duplex(){return h=!0,"half"}}).headers.has("Content-Type");return h&&!m}),c=o&&a&&Qs(()=>f.isReadableStream(new r("").body)),d={stream:c&&(h=>h.body)};s&&["text","arrayBuffer","blob","formData","stream"].forEach(h=>{!d[h]&&(d[h]=(m,v)=>{let _=m&&m[h];if(_)return _.call(m);throw new w(`Response type '${h}' is not supported`,w.ERR_NOT_SUPPORT,v)})});const p=async h=>{if(h==null)return 0;if(f.isBlob(h))return h.size;if(f.isSpecCompliantForm(h))return(await new n(L.origin,{method:"POST",body:h}).arrayBuffer()).byteLength;if(f.isArrayBufferView(h)||f.isArrayBuffer(h))return h.byteLength;if(f.isURLSearchParams(h)&&(h=h+""),f.isString(h))return(await u(h)).byteLength},y=async(h,m)=>{const v=f.toFiniteNumber(h.getContentLength());return v??p(m)};return async h=>{let{url:m,method:v,data:_,signal:b,cancelToken:g,timeout:O,onDownloadProgress:T,onUploadProgress:P,responseType:S,headers:F,withCredentials:q="same-origin",fetchOptions:Y}=Is(h),ie=t||fetch;S=S?(S+"").toLowerCase():"text";let it=mu([b,g&&g.toAbortSignal()],O),At=null;const qe=it&&it.unsubscribe&&(()=>{it.unsubscribe()});let Gs;try{if(P&&l&&v!=="get"&&v!=="head"&&(Gs=await y(F,_))!==0){let Ae=new n(m,{method:"POST",body:_,duplex:"half"}),ot;if(f.isFormData(_)&&(ot=Ae.headers.get("content-type"))&&F.setContentType(ot),Ae.body){const[Hn,Zt]=Ds(Gs,Wt(Ns(P)));_=Ls(Ae.body,js,Hn,Zt)}}f.isString(q)||(q=q?"include":"omit");const fe=i&&"credentials"in n.prototype,Xs={...Y,signal:it,method:v.toUpperCase(),headers:F.normalize().toJSON(),body:_,duplex:"half",credentials:fe?q:void 0};At=i&&new n(m,Xs);let Ce=await(i?ie(At,Y):ie(m,Xs));const Ys=c&&(S==="stream"||S==="response");if(c&&(T||Ys&&qe)){const Ae={};["status","statusText","headers"].forEach(Zs=>{Ae[Zs]=Ce[Zs]});const ot=f.toFiniteNumber(Ce.headers.get("content-length")),[Hn,Zt]=T&&Ds(ot,Wt(Ns(T),!0))||[];Ce=new r(Ls(Ce.body,js,Hn,()=>{Zt&&Zt(),qe&&qe()}),Ae)}S=S||"text";let ju=await d[f.findKey(d,S)||"text"](Ce,h);return!Ys&&qe&&qe(),await new Promise((Ae,ot)=>{ks(Ae,ot,{data:ju,headers:$.from(Ce.headers),status:Ce.status,statusText:Ce.statusText,config:h,request:At})})}catch(fe){throw qe&&qe(),fe&&fe.name==="TypeError"&&/Load failed|fetch/i.test(fe.message)?Object.assign(new w("Network Error",w.ERR_NETWORK,h,At),{cause:fe.cause||fe}):w.from(fe,fe&&fe.code,h,At)}}},wu=new Map,Hs=e=>{let t=e&&e.env||{};const{fetch:n,Request:r,Response:s}=t,i=[r,s,n];let o=i.length,a=o,u,l,c=wu;for(;a--;)u=i[a],l=c.get(u),l===void 0&&c.set(u,l=a?new Map:bu(t)),c=l;return l};Hs();const qn={http:Ha,xhr:pu,fetch:{get:Hs}};f.forEach(qn,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const Ks=e=>`- ${e}`,Eu=e=>f.isFunction(e)||e===null||e===!1;function Su(e,t){e=f.isArray(e)?e:[e];const{length:n}=e;let r,s;const i={};for(let o=0;o`adapter ${u} `+(l===!1?"is not supported by the environment":"is not available in the build"));let a=n?o.length>1?`since : `+o.map(Ks).join(` `):" "+Ks(o[0]):"as no adapter specified";throw new w("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return s}const $s={getAdapter:Su,adapters:qn};function Bn(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new st(null,e)}function zs(e){return Bn(e),e.headers=$.from(e.headers),e.data=jn.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),$s.getAdapter(e.adapter||Tt.adapter,e)(e).then(function(r){return Bn(e),r.data=jn.call(e,e.transformResponse,r),r.headers=$.from(r.headers),r},function(r){return Fs(r)||(Bn(e),r&&r.response&&(r.response.data=jn.call(e,e.transformResponse,r.response),r.response.headers=$.from(r.response.headers))),Promise.reject(r)})}const Vs="1.13.2",Xt={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Xt[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const Js={};Xt.transitional=function(t,n,r){function s(i,o){return"[Axios v"+Vs+"] Transitional option '"+i+"'"+o+(r?". "+r:"")}return(i,o,a)=>{if(t===!1)throw new w(s(o," has been removed"+(n?" in "+n:"")),w.ERR_DEPRECATED);return n&&!Js[o]&&(Js[o]=!0,console.warn(s(o," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(i,o,a):!0}},Xt.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function Ou(e,t,n){if(typeof e!="object")throw new w("options must be an object",w.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let s=r.length;for(;s-- >0;){const i=r[s],o=t[i];if(o){const a=e[i],u=a===void 0||o(a,i,e);if(u!==!0)throw new w("option "+i+" must be "+u,w.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new w("Unknown option "+i,w.ERR_BAD_OPTION)}}const Yt={assertOptions:Ou,validators:Xt},ce=Yt.validators;let je=class{constructor(t){this.defaults=t||{},this.interceptors={request:new Cs,response:new Cs}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let s={};Error.captureStackTrace?Error.captureStackTrace(s):s=new Error;const i=s.stack?s.stack.replace(/^.+\n/,""):"";try{r.stack?i&&!String(r.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(r.stack+=` `+i):r.stack=i}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Le(this.defaults,n);const{transitional:r,paramsSerializer:s,headers:i}=n;r!==void 0&&Yt.assertOptions(r,{silentJSONParsing:ce.transitional(ce.boolean),forcedJSONParsing:ce.transitional(ce.boolean),clarifyTimeoutError:ce.transitional(ce.boolean)},!1),s!=null&&(f.isFunction(s)?n.paramsSerializer={serialize:s}:Yt.assertOptions(s,{encode:ce.function,serialize:ce.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),Yt.assertOptions(n,{baseUrl:ce.spelling("baseURL"),withXsrfToken:ce.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let o=i&&f.merge(i.common,i[n.method]);i&&f.forEach(["delete","get","head","post","put","patch","common"],h=>{delete i[h]}),n.headers=$.concat(o,i);const a=[];let u=!0;this.interceptors.request.forEach(function(m){typeof m.runWhen=="function"&&m.runWhen(n)===!1||(u=u&&m.synchronous,a.unshift(m.fulfilled,m.rejected))});const l=[];this.interceptors.response.forEach(function(m){l.push(m.fulfilled,m.rejected)});let c,d=0,p;if(!u){const h=[zs.bind(this),void 0];for(h.unshift(...a),h.push(...l),p=h.length,c=Promise.resolve(n);d{if(!r._listeners)return;let i=r._listeners.length;for(;i-- >0;)r._listeners[i](s);r._listeners=null}),this.promise.then=s=>{let i;const o=new Promise(a=>{r.subscribe(a),i=a}).then(s);return o.cancel=function(){r.unsubscribe(i)},o},t(function(i,o,a){r.reason||(r.reason=new st(i,o,a),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new ei(function(s){t=s}),cancel:t}}};function Tu(e){return function(n){return e.apply(null,n)}}function Cu(e){return f.isObject(e)&&e.isAxiosError===!0}const Qn={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Qn).forEach(([e,t])=>{Qn[t]=e});function Ws(e){const t=new je(e),n=fs(je.prototype.request,t);return f.extend(n,je.prototype,t,{allOwnKeys:!0}),f.extend(n,t,null,{allOwnKeys:!0}),n.create=function(s){return Ws(Le(e,s))},n}const x=Ws(Tt);x.Axios=je,x.CanceledError=st,x.CancelToken=Ru,x.isCancel=Fs,x.VERSION=Vs,x.toFormData=Vt,x.AxiosError=w,x.Cancel=x.CanceledError,x.all=function(t){return Promise.all(t)},x.spread=Tu,x.isAxiosError=Cu,x.mergeConfig=Le,x.AxiosHeaders=$,x.formToJSON=e=>xs(f.isHTMLForm(e)?new FormData(e):e),x.getAdapter=$s.getAdapter,x.HttpStatusCode=Qn,x.default=x;const{Axios:Vu,AxiosError:Ju,CanceledError:Wu,isCancel:Gu,CancelToken:Xu,VERSION:Yu,all:Zu,Cancel:el,isAxiosError:tl,spread:nl,toFormData:rl,AxiosHeaders:sl,HttpStatusCode:il,formToJSON:ol,getAdapter:al,mergeConfig:ul}=x,Au="data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M4%208H12M12%208L9.33333%205M12%208L9.33333%2011'%20stroke='black'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e";var xu=Me('
Loading offer...
'),Pu=Me('
'),Fu=Me('');function ku(e,t){ct(t,!0);const n=u=>typeof window<"u"?`${window.location.origin}/wp-admin/admin-ajax.php?action=rest_proxy&endpoint=${u}`:`/wp-admin/admin-ajax.php?action=rest_proxy&endpoint=${u}`,r=cs(()=>({queryKey:["bookmaker",t.offer.bookmaker],queryFn:async()=>{const u=await x.get(n(`bookmaker/${t.offer.bookmaker}`));console.log("Bookmaker logo",u,n(`media/${u.data.acf.bookmaker_logo}`));const l=await x.get(n(`media/${u.data.acf.bookmaker_logo}`));return{...u.data.acf,source_url:l.data.source_url}}}));var s=Ye(),i=Je(s);{var o=u=>{var l=xu();X(u,l)},a=u=>{var l=Ye(),c=Je(l);{var d=y=>{var h=Pu(),m=ve(h);pn(()=>gt(m,`Error: ${r.error.message??""}`)),X(y,h)},p=y=>{var h=Ye(),m=Je(h);{var v=_=>{var b=Fu(),g=ve(b),O=ve(g),T=Mt(O,2),P=ve(T),S=Mt(P),F=Mt(g,2),q=ve(F),Y=ve(q),ie=Mt(q,2),it=ve(ie);pn(()=>{ho(g,`background-color: ${(r.data.brand_color?r.data.brand_color:"#14805E")??""}`),gn(O,"src",r.data.source_url),gn(T,"href",t.offer.offer_link),gt(P,`${t.offer.cta_button??""} `),gn(S,"src",Au),gt(Y,t.offer.offer_name),gt(it,t.offer.offer_details)}),X(_,b)};et(m,_=>{r.data&&_(v)},!0)}X(y,h)};et(c,y=>{r.isError?y(d):y(p,!1)},!0)}X(u,l)};et(i,u=>{r.isLoading?u(o):u(a,!1)})}X(e,s),ft()}var Du=Me("
Loading...
"),Nu=Me("
"),Mu=Me('
'),Uu=Me("
");function Iu(e,t){ct(t,!0);const n=u=>typeof window<"u"?`${window.location.origin}/wp-admin/admin-ajax.php?action=rest_proxy&endpoint=${u}`:`/wp-admin/admin-ajax.php?action=rest_proxy&endpoint=${u}`,r=cs(()=>({queryKey:["offers"],queryFn:async()=>{const{data:u}=await x.get(n("offers"));return u.map(l=>l.acf)}}));var s=Uu(),i=ve(s);{var o=u=>{var l=Du();X(u,l)},a=u=>{var l=Ye(),c=Je(l);{var d=y=>{var h=Nu(),m=ve(h);pn(()=>gt(m,`Error: ${r.error.message??""}`)),X(y,h)},p=y=>{var h=Ye(),m=Je(h);{var v=_=>{var b=Mu();ao(b,21,()=>r.data,io,(g,O)=>{ku(g,{get offer(){return E(O)}})}),X(_,b)};et(m,_=>{r.data&&_(v)},!0)}X(y,h)};et(c,y=>{r.isError?y(d):y(p,!1)},!0)}X(u,l)};et(i,u=>{r.isLoading?u(o):u(a,!1)})}X(e,s),ft()}function Lu(e,t){ct(t,!1);const n=new os;_o(),sa(e,{get client(){return n},children:(r,s)=>{Iu(r,{})},$$slots:{default:!0}}),ft()}return no(Lu,{target:document.getElementById("offers-widget")})}));