Files
HX_KI_com-Com1/grafana/plugins/grafana-lokiexplore-app/431.js
2026-03-06 14:37:04 +00:00

2 lines
82 KiB
JavaScript

"use strict";(self.webpackChunkgrafana_lokiexplore_app=self.webpackChunkgrafana_lokiexplore_app||[]).push([[431],{79729:(e,t,n)=>{n.d(t,{BF:()=>l,Eb:()=>F,MC:()=>I});var i=n(85959),r=n.n(i),s=n(15056),a=n(93241);function o(e,t,...n){let i=!1;"undefined"!=typeof window&&(i="true"===localStorage.getItem("grafana.debug.scenes"))}class c extends s.Bs{constructor(e){var t,n;super({...e,children:null!=(t=null==e?void 0:e.children)?t:[],childContexts:null!=(n=null==e?void 0:e.childContexts)?n:[]})}addToScene(e){this.publishEvent(new s.sU(e),!0),this.setState({children:[...this.state.children,e]}),o(0,(e.constructor.name,e.state.key));const t=e.activate();return()=>{o(0,(e.constructor.name,e.state.key)),this.setState({children:this.state.children.filter(t=>t!==e)}),t()}}findByKey(e){return this.state.children.find(t=>t.state.key===e)}findVariable(e){const t=this.state.$variables;if(t)return t.getByName(e)}addVariable(e){let t=this.state.$variables;return this.publishEvent(new s.sU(e),!0),t?t.setState({variables:[...t.state.variables,e]}):(t=new s.Pj({variables:[e]}),this.setState({$variables:t})),o(0,(e.constructor.name,e.state.key)),()=>{t.setState({variables:t.state.variables.filter(t=>t!==e)}),o(0,(e.constructor.name,e.state.key))}}addChildContext(e){var t;this.publishEvent(new s.sU(e),!0),this.setState({childContexts:[...null!=(t=this.state.childContexts)?t:[],e]}),o(0,(e.constructor.name,e.state.key))}removeChildContext(e){var t;this.setState({childContexts:null==(t=this.state.childContexts)?void 0:t.filter(t=>e!==t)}),o(0,(e.constructor.name,e.state.key))}}const u=(0,i.createContext)(null);function l({children:e,timeRange:t,withQueryController:n}){const a=(0,i.useContext)(u),[o,l]=(0,i.useState)(),d=t;if((0,i.useEffect)(()=>{const e={children:[]};n&&(e.$behaviors=[new s.Gg.SceneQueryController]),d&&(e.$timeRange=new s.JZ(d));const t=new c(e);a&&a.addChildContext(t);const i=t.activate();return l(t),()=>{i(),a&&a.removeChildContext(t)}},[a,n]),!o)return null;const h=r().createElement(u.Provider,{value:o},e);return a?h:r().createElement(s.$L,{scene:o,updateUrlOnInit:!0,createBrowserHistorySteps:!0},h)}n(31269);function d(){const e=(0,i.useContext)(u);if(!e)throw new Error("Cannot find a SceneContext");return e}const h="object"==typeof performance&&performance&&"function"==typeof performance.now?performance:Date,f=new Set,p="object"==typeof process&&process?process:{},y=(e,t,n,i)=>{"function"==typeof p.emitWarning?p.emitWarning(e,t,n,i):console.error(`[${n}] ${t}: ${e}`)};let g=globalThis.AbortController,m=globalThis.AbortSignal;if(void 0===g){m=class{onabort;_onabort=[];reason;aborted=!1;addEventListener(e,t){this._onabort.push(t)}},g=class{constructor(){t()}signal=new m;abort(e){if(!this.signal.aborted){this.signal.reason=e,this.signal.aborted=!0;for(const t of this.signal._onabort)t(e);this.signal.onabort?.(e)}}};let e="1"!==p.env?.LRU_CACHE_IGNORE_AC_WARNING;const t=()=>{e&&(e=!1,y("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.","NO_ABORT_CONTROLLER","ENOTSUP",t))}}Symbol("type");const v=e=>e&&e===Math.floor(e)&&e>0&&isFinite(e),b=e=>v(e)?e<=Math.pow(2,8)?Uint8Array:e<=Math.pow(2,16)?Uint16Array:e<=Math.pow(2,32)?Uint32Array:e<=Number.MAX_SAFE_INTEGER?S:null:null;class S extends Array{constructor(e){super(e),this.fill(0)}}class w{heap;length;static#e=!1;static create(e){const t=b(e);if(!t)return[];w.#e=!0;const n=new w(e,t);return w.#e=!1,n}constructor(e,t){if(!w.#e)throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new t(e),this.length=0}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}}class _{#t;#n;#i;#r;#s;#a;ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#o;#c;#u;#l;#d;#h;#f;#p;#y;#g;#m;#v;#b;#S;#w;#_;#A;static unsafeExposeInternals(e){return{starts:e.#b,ttls:e.#S,sizes:e.#v,keyMap:e.#u,keyList:e.#l,valList:e.#d,next:e.#h,prev:e.#f,get head(){return e.#p},get tail(){return e.#y},free:e.#g,isBackgroundFetch:t=>e.#k(t),backgroundFetch:(t,n,i,r)=>e.#T(t,n,i,r),moveToTail:t=>e.#C(t),indexes:t=>e.#O(t),rindexes:t=>e.#x(t),isStale:t=>e.#R(t)}}get max(){return this.#t}get maxSize(){return this.#n}get calculatedSize(){return this.#c}get size(){return this.#o}get fetchMethod(){return this.#s}get memoMethod(){return this.#a}get dispose(){return this.#i}get disposeAfter(){return this.#r}constructor(e){const{max:t=0,ttl:n,ttlResolution:i=1,ttlAutopurge:r,updateAgeOnGet:s,updateAgeOnHas:a,allowStale:o,dispose:c,disposeAfter:u,noDisposeOnSet:l,noUpdateTTL:d,maxSize:h=0,maxEntrySize:p=0,sizeCalculation:g,fetchMethod:m,memoMethod:S,noDeleteOnFetchRejection:A,noDeleteOnStaleGet:k,allowStaleOnFetchRejection:T,allowStaleOnFetchAbort:C,ignoreFetchAbort:O}=e;if(0!==t&&!v(t))throw new TypeError("max option must be a nonnegative integer");const x=t?b(t):Array;if(!x)throw new Error("invalid max value: "+t);if(this.#t=t,this.#n=h,this.maxEntrySize=p||this.#n,this.sizeCalculation=g,this.sizeCalculation){if(!this.#n&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if("function"!=typeof this.sizeCalculation)throw new TypeError("sizeCalculation set to non-function")}if(void 0!==S&&"function"!=typeof S)throw new TypeError("memoMethod must be a function if defined");if(this.#a=S,void 0!==m&&"function"!=typeof m)throw new TypeError("fetchMethod must be a function if specified");if(this.#s=m,this.#_=!!m,this.#u=new Map,this.#l=new Array(t).fill(void 0),this.#d=new Array(t).fill(void 0),this.#h=new x(t),this.#f=new x(t),this.#p=0,this.#y=0,this.#g=w.create(t),this.#o=0,this.#c=0,"function"==typeof c&&(this.#i=c),"function"==typeof u?(this.#r=u,this.#m=[]):(this.#r=void 0,this.#m=void 0),this.#w=!!this.#i,this.#A=!!this.#r,this.noDisposeOnSet=!!l,this.noUpdateTTL=!!d,this.noDeleteOnFetchRejection=!!A,this.allowStaleOnFetchRejection=!!T,this.allowStaleOnFetchAbort=!!C,this.ignoreFetchAbort=!!O,0!==this.maxEntrySize){if(0!==this.#n&&!v(this.#n))throw new TypeError("maxSize must be a positive integer if specified");if(!v(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.#E()}if(this.allowStale=!!o,this.noDeleteOnStaleGet=!!k,this.updateAgeOnGet=!!s,this.updateAgeOnHas=!!a,this.ttlResolution=v(i)||0===i?i:1,this.ttlAutopurge=!!r,this.ttl=n||0,this.ttl){if(!v(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.#z()}if(0===this.#t&&0===this.ttl&&0===this.#n)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#t&&!this.#n){const e="LRU_CACHE_UNBOUNDED";if((e=>!f.has(e))(e)){f.add(e);y("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",e,_)}}}getRemainingTTL(e){return this.#u.has(e)?1/0:0}#z(){const e=new S(this.#t),t=new S(this.#t);this.#S=e,this.#b=t,this.#P=(n,i,r=h.now())=>{if(t[n]=0!==i?r:0,e[n]=i,0!==i&&this.ttlAutopurge){const e=setTimeout(()=>{this.#R(n)&&this.#q(this.#l[n],"expire")},i+1);e.unref&&e.unref()}},this.#I=n=>{t[n]=0!==e[n]?h.now():0},this.#M=(r,s)=>{if(e[s]){const a=e[s],o=t[s];if(!a||!o)return;r.ttl=a,r.start=o,r.now=n||i();const c=r.now-o;r.remainingTTL=a-c}};let n=0;const i=()=>{const e=h.now();if(this.ttlResolution>0){n=e;const t=setTimeout(()=>n=0,this.ttlResolution);t.unref&&t.unref()}return e};this.getRemainingTTL=r=>{const s=this.#u.get(r);if(void 0===s)return 0;const a=e[s],o=t[s];if(!a||!o)return 1/0;return a-((n||i())-o)},this.#R=r=>{const s=t[r],a=e[r];return!!a&&!!s&&(n||i())-s>a}}#I=()=>{};#M=()=>{};#P=()=>{};#R=()=>!1;#E(){const e=new S(this.#t);this.#c=0,this.#v=e,this.#F=t=>{this.#c-=e[t],e[t]=0},this.#D=(e,t,n,i)=>{if(this.#k(t))return 0;if(!v(n)){if(!i)throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");if("function"!=typeof i)throw new TypeError("sizeCalculation must be a function");if(n=i(t,e),!v(n))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}return n},this.#j=(t,n,i)=>{if(e[t]=n,this.#n){const n=this.#n-e[t];for(;this.#c>n;)this.#L(!0)}this.#c+=e[t],i&&(i.entrySize=n,i.totalCalculatedSize=this.#c)}}#F=e=>{};#j=(e,t,n)=>{};#D=(e,t,n,i)=>{if(n||i)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0};*#O({allowStale:e=this.allowStale}={}){if(this.#o)for(let t=this.#y;this.#Q(t)&&(!e&&this.#R(t)||(yield t),t!==this.#p);)t=this.#f[t]}*#x({allowStale:e=this.allowStale}={}){if(this.#o)for(let t=this.#p;this.#Q(t)&&(!e&&this.#R(t)||(yield t),t!==this.#y);)t=this.#h[t]}#Q(e){return void 0!==e&&this.#u.get(this.#l[e])===e}*entries(){for(const e of this.#O())void 0===this.#d[e]||void 0===this.#l[e]||this.#k(this.#d[e])||(yield[this.#l[e],this.#d[e]])}*rentries(){for(const e of this.#x())void 0===this.#d[e]||void 0===this.#l[e]||this.#k(this.#d[e])||(yield[this.#l[e],this.#d[e]])}*keys(){for(const e of this.#O()){const t=this.#l[e];void 0===t||this.#k(this.#d[e])||(yield t)}}*rkeys(){for(const e of this.#x()){const t=this.#l[e];void 0===t||this.#k(this.#d[e])||(yield t)}}*values(){for(const e of this.#O()){void 0===this.#d[e]||this.#k(this.#d[e])||(yield this.#d[e])}}*rvalues(){for(const e of this.#x()){void 0===this.#d[e]||this.#k(this.#d[e])||(yield this.#d[e])}}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(e,t={}){for(const n of this.#O()){const i=this.#d[n],r=this.#k(i)?i.__staleWhileFetching:i;if(void 0!==r&&e(r,this.#l[n],this))return this.get(this.#l[n],t)}}forEach(e,t=this){for(const n of this.#O()){const i=this.#d[n],r=this.#k(i)?i.__staleWhileFetching:i;void 0!==r&&e.call(t,r,this.#l[n],this)}}rforEach(e,t=this){for(const n of this.#x()){const i=this.#d[n],r=this.#k(i)?i.__staleWhileFetching:i;void 0!==r&&e.call(t,r,this.#l[n],this)}}purgeStale(){let e=!1;for(const t of this.#x({allowStale:!0}))this.#R(t)&&(this.#q(this.#l[t],"expire"),e=!0);return e}info(e){const t=this.#u.get(e);if(void 0===t)return;const n=this.#d[t],i=this.#k(n)?n.__staleWhileFetching:n;if(void 0===i)return;const r={value:i};if(this.#S&&this.#b){const e=this.#S[t],n=this.#b[t];if(e&&n){const t=e-(h.now()-n);r.ttl=t,r.start=Date.now()}}return this.#v&&(r.size=this.#v[t]),r}dump(){const e=[];for(const t of this.#O({allowStale:!0})){const n=this.#l[t],i=this.#d[t],r=this.#k(i)?i.__staleWhileFetching:i;if(void 0===r||void 0===n)continue;const s={value:r};if(this.#S&&this.#b){s.ttl=this.#S[t];const e=h.now()-this.#b[t];s.start=Math.floor(Date.now()-e)}this.#v&&(s.size=this.#v[t]),e.unshift([n,s])}return e}load(e){this.clear();for(const[t,n]of e){if(n.start){const e=Date.now()-n.start;n.start=h.now()-e}this.set(t,n.value,n)}}set(e,t,n={}){if(void 0===t)return this.delete(e),this;const{ttl:i=this.ttl,start:r,noDisposeOnSet:s=this.noDisposeOnSet,sizeCalculation:a=this.sizeCalculation,status:o}=n;let{noUpdateTTL:c=this.noUpdateTTL}=n;const u=this.#D(e,t,n.size||0,a);if(this.maxEntrySize&&u>this.maxEntrySize)return o&&(o.set="miss",o.maxEntrySizeExceeded=!0),this.#q(e,"set"),this;let l=0===this.#o?void 0:this.#u.get(e);if(void 0===l)l=0===this.#o?this.#y:0!==this.#g.length?this.#g.pop():this.#o===this.#t?this.#L(!1):this.#o,this.#l[l]=e,this.#d[l]=t,this.#u.set(e,l),this.#h[this.#y]=l,this.#f[l]=this.#y,this.#y=l,this.#o++,this.#j(l,u,o),o&&(o.set="add"),c=!1;else{this.#C(l);const n=this.#d[l];if(t!==n){if(this.#_&&this.#k(n)){n.__abortController.abort(new Error("replaced"));const{__staleWhileFetching:t}=n;void 0===t||s||(this.#w&&this.#i?.(t,e,"set"),this.#A&&this.#m?.push([t,e,"set"]))}else s||(this.#w&&this.#i?.(n,e,"set"),this.#A&&this.#m?.push([n,e,"set"]));if(this.#F(l),this.#j(l,u,o),this.#d[l]=t,o){o.set="replace";const e=n&&this.#k(n)?n.__staleWhileFetching:n;void 0!==e&&(o.oldValue=e)}}else o&&(o.set="update")}if(0===i||this.#S||this.#z(),this.#S&&(c||this.#P(l,i,r),o&&this.#M(o,l)),!s&&this.#A&&this.#m){const e=this.#m;let t;for(;t=e?.shift();)this.#r?.(...t)}return this}pop(){try{for(;this.#o;){const e=this.#d[this.#p];if(this.#L(!0),this.#k(e)){if(e.__staleWhileFetching)return e.__staleWhileFetching}else if(void 0!==e)return e}}finally{if(this.#A&&this.#m){const e=this.#m;let t;for(;t=e?.shift();)this.#r?.(...t)}}}#L(e){const t=this.#p,n=this.#l[t],i=this.#d[t];return this.#_&&this.#k(i)?i.__abortController.abort(new Error("evicted")):(this.#w||this.#A)&&(this.#w&&this.#i?.(i,n,"evict"),this.#A&&this.#m?.push([i,n,"evict"])),this.#F(t),e&&(this.#l[t]=void 0,this.#d[t]=void 0,this.#g.push(t)),1===this.#o?(this.#p=this.#y=0,this.#g.length=0):this.#p=this.#h[t],this.#u.delete(n),this.#o--,t}has(e,t={}){const{updateAgeOnHas:n=this.updateAgeOnHas,status:i}=t,r=this.#u.get(e);if(void 0!==r){const e=this.#d[r];if(this.#k(e)&&void 0===e.__staleWhileFetching)return!1;if(!this.#R(r))return n&&this.#I(r),i&&(i.has="hit",this.#M(i,r)),!0;i&&(i.has="stale",this.#M(i,r))}else i&&(i.has="miss");return!1}peek(e,t={}){const{allowStale:n=this.allowStale}=t,i=this.#u.get(e);if(void 0===i||!n&&this.#R(i))return;const r=this.#d[i];return this.#k(r)?r.__staleWhileFetching:r}#T(e,t,n,i){const r=void 0===t?void 0:this.#d[t];if(this.#k(r))return r;const s=new g,{signal:a}=n;a?.addEventListener("abort",()=>s.abort(a.reason),{signal:s.signal});const o={signal:s.signal,options:n,context:i},c=(i,r=!1)=>{const{aborted:a}=s.signal,c=n.ignoreFetchAbort&&void 0!==i;if(n.status&&(a&&!r?(n.status.fetchAborted=!0,n.status.fetchError=s.signal.reason,c&&(n.status.fetchAbortIgnored=!0)):n.status.fetchResolved=!0),a&&!c&&!r)return u(s.signal.reason);const d=l;return this.#d[t]===l&&(void 0===i?d.__staleWhileFetching?this.#d[t]=d.__staleWhileFetching:this.#q(e,"fetch"):(n.status&&(n.status.fetchUpdated=!0),this.set(e,i,o.options))),i},u=i=>{const{aborted:r}=s.signal,a=r&&n.allowStaleOnFetchAbort,o=a||n.allowStaleOnFetchRejection,c=o||n.noDeleteOnFetchRejection,u=l;if(this.#d[t]===l){!c||void 0===u.__staleWhileFetching?this.#q(e,"fetch"):a||(this.#d[t]=u.__staleWhileFetching)}if(o)return n.status&&void 0!==u.__staleWhileFetching&&(n.status.returnedStale=!0),u.__staleWhileFetching;if(u.__returned===u)throw i};n.status&&(n.status.fetchDispatched=!0);const l=new Promise((t,i)=>{const a=this.#s?.(e,r,o);a&&a instanceof Promise&&a.then(e=>t(void 0===e?void 0:e),i),s.signal.addEventListener("abort",()=>{n.ignoreFetchAbort&&!n.allowStaleOnFetchAbort||(t(void 0),n.allowStaleOnFetchAbort&&(t=e=>c(e,!0)))})}).then(c,e=>(n.status&&(n.status.fetchRejected=!0,n.status.fetchError=e),u(e))),d=Object.assign(l,{__abortController:s,__staleWhileFetching:r,__returned:void 0});return void 0===t?(this.set(e,d,{...o.options,status:void 0}),t=this.#u.get(e)):this.#d[t]=d,d}#k(e){if(!this.#_)return!1;const t=e;return!!t&&t instanceof Promise&&t.hasOwnProperty("__staleWhileFetching")&&t.__abortController instanceof g}async fetch(e,t={}){const{allowStale:n=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:r=this.noDeleteOnStaleGet,ttl:s=this.ttl,noDisposeOnSet:a=this.noDisposeOnSet,size:o=0,sizeCalculation:c=this.sizeCalculation,noUpdateTTL:u=this.noUpdateTTL,noDeleteOnFetchRejection:l=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:d=this.allowStaleOnFetchRejection,ignoreFetchAbort:h=this.ignoreFetchAbort,allowStaleOnFetchAbort:f=this.allowStaleOnFetchAbort,context:p,forceRefresh:y=!1,status:g,signal:m}=t;if(!this.#_)return g&&(g.fetch="get"),this.get(e,{allowStale:n,updateAgeOnGet:i,noDeleteOnStaleGet:r,status:g});const v={allowStale:n,updateAgeOnGet:i,noDeleteOnStaleGet:r,ttl:s,noDisposeOnSet:a,size:o,sizeCalculation:c,noUpdateTTL:u,noDeleteOnFetchRejection:l,allowStaleOnFetchRejection:d,allowStaleOnFetchAbort:f,ignoreFetchAbort:h,status:g,signal:m};let b=this.#u.get(e);if(void 0===b){g&&(g.fetch="miss");const t=this.#T(e,b,v,p);return t.__returned=t}{const t=this.#d[b];if(this.#k(t)){const e=n&&void 0!==t.__staleWhileFetching;return g&&(g.fetch="inflight",e&&(g.returnedStale=!0)),e?t.__staleWhileFetching:t.__returned=t}const r=this.#R(b);if(!y&&!r)return g&&(g.fetch="hit"),this.#C(b),i&&this.#I(b),g&&this.#M(g,b),t;const s=this.#T(e,b,v,p),a=void 0!==s.__staleWhileFetching&&n;return g&&(g.fetch=r?"stale":"refresh",a&&r&&(g.returnedStale=!0)),a?s.__staleWhileFetching:s.__returned=s}}async forceFetch(e,t={}){const n=await this.fetch(e,t);if(void 0===n)throw new Error("fetch() returned undefined");return n}memo(e,t={}){const n=this.#a;if(!n)throw new Error("no memoMethod provided to constructor");const{context:i,forceRefresh:r,...s}=t,a=this.get(e,s);if(!r&&void 0!==a)return a;const o=n(e,a,{options:s,context:i});return this.set(e,o,s),o}get(e,t={}){const{allowStale:n=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:r=this.noDeleteOnStaleGet,status:s}=t,a=this.#u.get(e);if(void 0!==a){const t=this.#d[a],o=this.#k(t);return s&&this.#M(s,a),this.#R(a)?(s&&(s.get="stale"),o?(s&&n&&void 0!==t.__staleWhileFetching&&(s.returnedStale=!0),n?t.__staleWhileFetching:void 0):(r||this.#q(e,"expire"),s&&n&&(s.returnedStale=!0),n?t:void 0)):(s&&(s.get="hit"),o?t.__staleWhileFetching:(this.#C(a),i&&this.#I(a),t))}s&&(s.get="miss")}#N(e,t){this.#f[t]=e,this.#h[e]=t}#C(e){e!==this.#y&&(e===this.#p?this.#p=this.#h[e]:this.#N(this.#f[e],this.#h[e]),this.#N(this.#y,e),this.#y=e)}delete(e){return this.#q(e,"delete")}#q(e,t){let n=!1;if(0!==this.#o){const i=this.#u.get(e);if(void 0!==i)if(n=!0,1===this.#o)this.#K(t);else{this.#F(i);const n=this.#d[i];if(this.#k(n)?n.__abortController.abort(new Error("deleted")):(this.#w||this.#A)&&(this.#w&&this.#i?.(n,e,t),this.#A&&this.#m?.push([n,e,t])),this.#u.delete(e),this.#l[i]=void 0,this.#d[i]=void 0,i===this.#y)this.#y=this.#f[i];else if(i===this.#p)this.#p=this.#h[i];else{const e=this.#f[i];this.#h[e]=this.#h[i];const t=this.#h[i];this.#f[t]=this.#f[i]}this.#o--,this.#g.push(i)}}if(this.#A&&this.#m?.length){const e=this.#m;let t;for(;t=e?.shift();)this.#r?.(...t)}return n}clear(){return this.#K("delete")}#K(e){for(const t of this.#x({allowStale:!0})){const n=this.#d[t];if(this.#k(n))n.__abortController.abort(new Error("deleted"));else{const i=this.#l[t];this.#w&&this.#i?.(n,i,e),this.#A&&this.#m?.push([n,i,e])}}if(this.#u.clear(),this.#d.fill(void 0),this.#l.fill(void 0),this.#S&&this.#b&&(this.#S.fill(0),this.#b.fill(0)),this.#v&&this.#v.fill(0),this.#p=0,this.#y=0,this.#g.length=0,this.#c=0,this.#o=0,this.#A&&this.#m){const e=this.#m;let t;for(;t=e?.shift();)this.#r?.(...t)}}}var A,k,T,C=e=>{throw TypeError(e)},O=(e,t,n)=>t.has(e)||C("Cannot "+n),x=(e,t,n)=>(O(e,t,"read from private field"),n?n.call(e):t.get(e)),R=(e,t,n)=>t.has(e)?C("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),E=(e,t,n,i)=>(O(e,t,"write to private field"),t.set(e,n),n);class z{constructor(){R(this,A),R(this,k,new WeakMap),R(this,T,0),E(this,A,new _({max:500,ttl:3e5}))}add(e,t){x(this,A).set(e,t)}get(e){return x(this,A).get(e)}getHashKey(e,t){return Array.isArray(e)?`${t.name}-${e.map(e=>this.getHashKeyElement(e)).join()}`:`${t.name}-${this.getHashKeyElement(e)}`}getByRefHashKey(e){let t=x(this,k).get(e);return null==t&&(t=((e,t,n,i)=>({set _(n){E(e,t,n)},get _(){return x(e,t,i)}}))(this,T)._++,x(this,k).set(e,t)),t}getHashKeyElement(e){return"string"==typeof e||"boolean"==typeof e||"number"==typeof e?e:(t=e,JSON.stringify(t,(e,t)=>(0,a.isPlainObject)(t)?Object.keys(t).sort().reduce((e,n)=>(e[n]=t[n],e),{}):t));var t}}let P;function q(){return P||(P=new z)}function I(e){const t=function(e){const t=d(),n=(0,i.useId)(),r=q();let a=e.cacheKey?r.getHashKey(e.cacheKey,e.objectConstructor):void 0,o=t.findByKey(n);return!o&&a&&(o=r.get(a),o&&o.parent!==t&&(s.jh.findObject(t,e=>e===o)?(console.error("A scene object cache key matched an object that is already in the scene"),o=void 0,a=void 0):o.clearParent())),o||(o=e.factory(n),a&&r.add(a,o)),(0,i.useEffect)(()=>t.addToScene(o),[o,t]),o}({factory:t=>new s.dt({key:t,queries:e.queries,maxDataPoints:e.maxDataPoints,datasource:e.datasource,liveStreaming:e.liveStreaming,maxDataPointsFromWidth:e.maxDataPointsFromWidth,minInterval:e.minInterval,requestIdPrefix:e.requestIdPrefix}),objectConstructor:s.dt,cacheKey:e.cacheKey});return(0,i.useEffect)(()=>{(0,a.isEqual)(t.state.queries,e.queries)||(t.setState({queries:e.queries}),t.runQueries())},[t,e]),t}A=new WeakMap,k=new WeakMap,T=new WeakMap;n(82007);var M=n(87781);function F(e){const{title:t,description:n,viz:a,dataProvider:c,displayMode:u,hoverHeader:l,hoverHeaderOffset:h,headerActions:f,menu:p,titleItems:y,extendPanelContext:g,seriesLimit:m,seriesLimitShowAll:v,collapsible:b,collapsed:S}=e,w=d(),_=(0,i.useId)(),A=(k=e,T=(0,i.useRef)(),(0,i.useEffect)(function(){T.current=k}),T.current);var k,T;let C=w.findByKey(_);return C||(C=new s.Eb({key:_,pluginId:a.pluginId,title:t,titleItems:y,description:n,options:a.options,fieldConfig:a.fieldConfig,pluginVersion:a.pluginVersion,$data:D(c),displayMode:u,hoverHeader:l,hoverHeaderOffset:h,headerActions:f,menu:p,extendPanelContext:g,collapsible:b,collapsed:S,seriesLimit:m,seriesLimitShowAll:v})),(0,i.useEffect)(()=>w.addToScene(C),[C,w]),(0,i.useEffect)(()=>{const e={};if(A){if(t!==A.title&&(e.title=t),n!==A.description&&(e.description=n),u!==A.displayMode&&(e.displayMode=u),l!==A.hoverHeader&&(e.hoverHeader=l),h!==A.hoverHeaderOffset&&(e.hoverHeaderOffset=h),p!==A.menu&&(e.menu=p),y!==A.titleItems&&(e.titleItems=y),f!==A.headerActions&&(e.headerActions=f),c!==A.dataProvider&&(e.$data=D(c)),m!==A.seriesLimit&&(e.seriesLimit=m),v!==A.seriesLimitShowAll&&(e.seriesLimitShowAll=v),b!==A.collapsible&&(e.collapsible=b),S!==A.collapsed&&(e.collapsed=S),a!==A.viz&&a.pluginId===A.viz.pluginId){const t=C.getPlugin();if(t){const n=(0,M.getPanelOptionsWithDefaults)({plugin:t,currentOptions:a.options,currentFieldConfig:a.fieldConfig,isAfterPluginChange:!1});e.options=n.options,e.fieldConfig=n.fieldConfig,C.clearFieldConfigCache()}}Object.keys(e).length>0&&(C.setState(e),o(0,0))}},[C,t,n,u,l,h,f,p,y,a,c,m,v,b,S,A]),r().createElement(C.Component,{model:C})}function D(e){return!e||e instanceof s.Zv?e:new s.wT({source:e.getRef()})}n(46089);n(18531);(0,i.createContext)({breadcrumbs:[],addBreadcrumb:()=>{},removeBreadcrumb:()=>{}});class j extends s.P1{constructor(e){super({...e,context:new c})}}j.Component=({model:e})=>r().createElement(u.Provider,{value:e.state.context},r().createElement(s.P1.Component,{model:e}))},27247:(e,t,n)=>{n.d(t,{xP:()=>vn});var i=n(7694),r=Symbol.for("immer-nothing"),s=Symbol.for("immer-draftable"),a=Symbol.for("immer-state");function o(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var c=Object.getPrototypeOf;function u(e){return!!e&&!!e[a]}function l(e){return!!e&&(f(e)||Array.isArray(e)||!!e[s]||!!e.constructor?.[s]||b(e)||S(e))}var d=Object.prototype.constructor.toString(),h=new WeakMap;function f(e){if(!e||"object"!=typeof e)return!1;const t=Object.getPrototypeOf(e);if(null===t||t===Object.prototype)return!0;const n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;if(n===Object)return!0;if("function"!=typeof n)return!1;let i=h.get(n);return void 0===i&&(i=Function.toString.call(n),h.set(n,i)),i===d}function p(e,t,n=!0){if(0===y(e)){(n?Reflect.ownKeys(e):Object.keys(e)).forEach(n=>{t(n,e[n],e)})}else e.forEach((n,i)=>t(i,n,e))}function y(e){const t=e[a];return t?t.type_:Array.isArray(e)?1:b(e)?2:S(e)?3:0}function g(e,t){return 2===y(e)?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function m(e,t){return 2===y(e)?e.get(t):e[t]}function v(e,t,n){const i=y(e);2===i?e.set(t,n):3===i?e.add(n):e[t]=n}function b(e){return e instanceof Map}function S(e){return e instanceof Set}function w(e){return e.copy_||e.base_}function _(e,t){if(b(e))return new Map(e);if(S(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=f(e);if(!0===t||"class_only"===t&&!n){const t=Object.getOwnPropertyDescriptors(e);delete t[a];let n=Reflect.ownKeys(t);for(let i=0;i<n.length;i++){const r=n[i],s=t[r];!1===s.writable&&(s.writable=!0,s.configurable=!0),(s.get||s.set)&&(t[r]={configurable:!0,writable:!0,enumerable:s.enumerable,value:e[r]})}return Object.create(c(e),t)}{const t=c(e);if(null!==t&&n)return{...e};const i=Object.create(t);return Object.assign(i,e)}}function A(e,t=!1){return T(e)||u(e)||!l(e)||(y(e)>1&&Object.defineProperties(e,{set:k,add:k,clear:k,delete:k}),Object.freeze(e),t&&Object.values(e).forEach(e=>A(e,!0))),e}var k={value:function(){o(2)}};function T(e){return null===e||"object"!=typeof e||Object.isFrozen(e)}var C,O={};function x(e){const t=O[e];return t||o(0),t}function R(e,t){O[e]||(O[e]=t)}function E(){return C}function z(e,t){t&&(x("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function P(e){q(e),e.drafts_.forEach(M),e.drafts_=null}function q(e){e===C&&(C=e.parent_)}function I(e){return C={drafts_:[],parent_:C,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function M(e){const t=e[a];0===t.type_||1===t.type_?t.revoke_():t.revoked_=!0}function F(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return void 0!==e&&e!==n?(n[a].modified_&&(P(t),o(4)),l(e)&&(e=D(t,e),t.parent_||L(t,e)),t.patches_&&x("Patches").generateReplacementPatches_(n[a].base_,e,t.patches_,t.inversePatches_)):e=D(t,n,[]),P(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==r?e:void 0}function D(e,t,n){if(T(t))return t;const i=e.immer_.shouldUseStrictIteration(),r=t[a];if(!r)return p(t,(i,s)=>j(e,r,t,i,s,n),i),t;if(r.scope_!==e)return t;if(!r.modified_)return L(e,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const t=r.copy_;let s=t,a=!1;3===r.type_&&(s=new Set(t),t.clear(),a=!0),p(s,(i,s)=>j(e,r,t,i,s,n,a),i),L(e,t,!1),n&&e.patches_&&x("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function j(e,t,n,i,r,s,a){if(null==r)return;if("object"!=typeof r&&!a)return;const o=T(r);if(!o||a){if(u(r)){const a=D(e,r,s&&t&&3!==t.type_&&!g(t.assigned_,i)?s.concat(i):void 0);if(v(n,i,a),!u(a))return;e.canAutoFreeze_=!1}else a&&n.add(r);if(l(r)&&!o){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;if(t&&t.base_&&t.base_[i]===r&&o)return;D(e,r),t&&t.scope_.parent_||"symbol"==typeof i||!(b(n)?n.has(i):Object.prototype.propertyIsEnumerable.call(n,i))||L(e,r)}}}function L(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&A(t,n)}var Q={get(e,t){if(t===a)return e;const n=w(e);if(!g(n,t))return function(e,t,n){const i=U(t,n);return i?"value"in i?i.value:i.get?.call(e.draft_):void 0}(e,n,t);const i=n[t];return e.finalized_||!l(i)?i:i===K(e.base_,t)?(B(e),e.copy_[t]=$(i,e)):i},has:(e,t)=>t in w(e),ownKeys:e=>Reflect.ownKeys(w(e)),set(e,t,n){const i=U(w(e),t);if(i?.set)return i.set.call(e.draft_,n),!0;if(!e.modified_){const i=K(w(e),t),o=i?.[a];if(o&&o.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(((r=n)===(s=i)?0!==r||1/r==1/s:r!=r&&s!=s)&&(void 0!==n||g(e.base_,t)))return!0;B(e),W(e)}var r,s;return e.copy_[t]===n&&(void 0!==n||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty:(e,t)=>(void 0!==K(e.base_,t)||t in e.base_?(e.assigned_[t]=!1,B(e),W(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0),getOwnPropertyDescriptor(e,t){const n=w(e),i=Reflect.getOwnPropertyDescriptor(n,t);return i?{writable:!0,configurable:1!==e.type_||"length"!==t,enumerable:i.enumerable,value:n[t]}:i},defineProperty(){o(11)},getPrototypeOf:e=>c(e.base_),setPrototypeOf(){o(12)}},N={};function K(e,t){const n=e[a];return(n?w(n):e)[t]}function U(e,t){if(!(t in e))return;let n=c(e);for(;n;){const e=Object.getOwnPropertyDescriptor(n,t);if(e)return e;n=c(n)}}function W(e){e.modified_||(e.modified_=!0,e.parent_&&W(e.parent_))}function B(e){e.copy_||(e.copy_=_(e.base_,e.scope_.immer_.useStrictShallowCopy_))}p(Q,(e,t)=>{N[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),N.deleteProperty=function(e,t){return N.set.call(this,e,t,void 0)},N.set=function(e,t,n){return Q.set.call(this,e[0],t,n,e[0])};function $(e,t){const n=b(e)?x("MapSet").proxyMap_(e,t):S(e)?x("MapSet").proxySet_(e,t):function(e,t){const n=Array.isArray(e),i={type_:n?1:0,scope_:t?t.scope_:E(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let r=i,s=Q;n&&(r=[i],s=N);const{revoke:a,proxy:o}=Proxy.revocable(r,s);return i.draft_=o,i.revoke_=a,o}(e,t);return(t?t.scope_:E()).drafts_.push(n),n}function H(e){return u(e)||o(10),V(e)}function V(e){if(!l(e)||T(e))return e;const t=e[a];let n,i=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=_(e,t.scope_.immer_.useStrictShallowCopy_),i=t.scope_.immer_.shouldUseStrictIteration()}else n=_(e,!0);return p(n,(e,t)=>{v(n,e,V(t))},i),t&&(t.finalized_=!1),n}function G(){const e="replace",t="add",n="remove";function i(e){if(!l(e))return e;if(Array.isArray(e))return e.map(i);if(b(e))return new Map(Array.from(e.entries()).map(([e,t])=>[e,i(t)]));if(S(e))return new Set(Array.from(e).map(i));const t=Object.create(c(e));for(const n in e)t[n]=i(e[n]);return g(e,s)&&(t[s]=e[s]),t}function a(e){return u(e)?i(e):e}R("Patches",{applyPatches_:function(r,s){return s.forEach(s=>{const{path:a,op:c}=s;let u=r;for(let e=0;e<a.length-1;e++){const t=y(u);let n=a[e];"string"!=typeof n&&"number"!=typeof n&&(n=""+n),0!==t&&1!==t||"__proto__"!==n&&"constructor"!==n||o(19),"function"==typeof u&&"prototype"===n&&o(19),u=m(u,n),"object"!=typeof u&&o(18,a.join("/"))}const l=y(u),d=i(s.value),h=a[a.length-1];switch(c){case e:switch(l){case 2:return u.set(h,d);case 3:o(16);default:return u[h]=d}case t:switch(l){case 1:return"-"===h?u.push(d):u.splice(h,0,d);case 2:return u.set(h,d);case 3:return u.add(d);default:return u[h]=d}case n:switch(l){case 1:return u.splice(h,1);case 2:return u.delete(h);case 3:return u.delete(s.value);default:return delete u[h]}default:o(17)}}),r},generatePatches_:function(i,r,s,o){switch(i.type_){case 0:case 2:return function(i,r,s,o){const{base_:c,copy_:u}=i;p(i.assigned_,(i,l)=>{const d=m(c,i),h=m(u,i),f=l?g(c,i)?e:t:n;if(d===h&&f===e)return;const p=r.concat(i);s.push(f===n?{op:f,path:p}:{op:f,path:p,value:h}),o.push(f===t?{op:n,path:p}:f===n?{op:t,path:p,value:a(d)}:{op:e,path:p,value:a(d)})})}(i,r,s,o);case 1:return function(i,r,s,o){let{base_:c,assigned_:u}=i,l=i.copy_;l.length<c.length&&([c,l]=[l,c],[s,o]=[o,s]);for(let t=0;t<c.length;t++)if(u[t]&&l[t]!==c[t]){const n=r.concat([t]);s.push({op:e,path:n,value:a(l[t])}),o.push({op:e,path:n,value:a(c[t])})}for(let e=c.length;e<l.length;e++){const n=r.concat([e]);s.push({op:t,path:n,value:a(l[e])})}for(let e=l.length-1;c.length<=e;--e){const t=r.concat([e]);o.push({op:n,path:t})}}(i,r,s,o);case 3:return function(e,i,r,s){let{base_:a,copy_:o}=e,c=0;a.forEach(e=>{if(!o.has(e)){const a=i.concat([c]);r.push({op:n,path:a,value:e}),s.unshift({op:t,path:a,value:e})}c++}),c=0,o.forEach(e=>{if(!a.has(e)){const a=i.concat([c]);r.push({op:t,path:a,value:e}),s.unshift({op:n,path:a,value:e})}c++})}(i,r,s,o)}},generateReplacementPatches_:function(t,n,i,s){i.push({op:e,path:[],value:n===r?void 0:n}),s.push({op:e,path:[],value:t})}})}var X=new class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!0,this.produce=(e,t,n)=>{if("function"==typeof e&&"function"!=typeof t){const n=t;t=e;const i=this;return function(e=n,...r){return i.produce(e,e=>t.call(this,e,...r))}}let i;if("function"!=typeof t&&o(6),void 0!==n&&"function"!=typeof n&&o(7),l(e)){const r=I(this),s=$(e,void 0);let a=!0;try{i=t(s),a=!1}finally{a?P(r):q(r)}return z(r,n),F(i,r)}if(!e||"object"!=typeof e){if(i=t(e),void 0===i&&(i=e),i===r&&(i=void 0),this.autoFreeze_&&A(i,!0),n){const t=[],r=[];x("Patches").generateReplacementPatches_(e,i,t,r),n(t,r)}return i}o(1)},this.produceWithPatches=(e,t)=>{if("function"==typeof e)return(t,...n)=>this.produceWithPatches(t,t=>e(t,...n));let n,i;return[this.produce(e,t,(e,t)=>{n=e,i=t}),n,i]},"boolean"==typeof e?.autoFreeze&&this.setAutoFreeze(e.autoFreeze),"boolean"==typeof e?.useStrictShallowCopy&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),"boolean"==typeof e?.useStrictIteration&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){l(e)||o(8),u(e)&&(e=H(e));const t=I(this),n=$(e,void 0);return n[a].isManual_=!0,q(t),n}finishDraft(e,t){const n=e&&e[a];n&&n.isManual_||o(9);const{scope_:i}=n;return z(i,t),F(void 0,i)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const i=t[n];if(0===i.path.length&&"replace"===i.op){e=i.value;break}}n>-1&&(t=t.slice(n+1));const i=x("Patches").applyPatches_;return u(e)?i(e,t):this.produce(e,e=>i(e,t))}},J=X.produce,Y=X.produceWithPatches.bind(X),Z=X.setUseStrictIteration.bind(X),ee=X.applyPatches.bind(X);"undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__,"undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION__&&window.__REDUX_DEVTOOLS_EXTENSION__;var te=e=>e&&"function"==typeof e.match;function ne(e,t){function n(...n){if(t){let i=t(...n);if(!i)throw new Error(qe(0));return{type:e,payload:i.payload,..."meta"in i&&{meta:i.meta},..."error"in i&&{error:i.error}}}return{type:e,payload:n[0]}}return n.toString=()=>`${e}`,n.type=e,n.match=t=>(0,i.isAction)(t)&&t.type===e,n}Symbol.species;function ie(e){return l(e)?J(e,()=>{}):e}function re(e,t,n){return e.has(t)?e.get(t):e.set(t,n(t)).get(t)}var se="RTK_autoBatch",ae=()=>e=>({payload:e,meta:{[se]:!0}});function oe(e){const t={},n=[];let i;const r={addCase(e,n){const i="string"==typeof e?e:e.type;if(!i)throw new Error(qe(28));if(i in t)throw new Error(qe(29));return t[i]=n,r},addAsyncThunk:(e,i)=>(i.pending&&(t[e.pending.type]=i.pending),i.rejected&&(t[e.rejected.type]=i.rejected),i.fulfilled&&(t[e.fulfilled.type]=i.fulfilled),i.settled&&n.push({matcher:e.settled,reducer:i.settled}),r),addMatcher:(e,t)=>(n.push({matcher:e,reducer:t}),r),addDefaultCase:e=>(i=e,r)};return e(r),[t,n,i]}Z(!1);var ce=(e,t)=>te(e)?e.match(t):e(t);function ue(...e){return t=>e.some(e=>ce(e,t))}function le(...e){return t=>e.every(e=>ce(e,t))}function de(e,t){if(!e||!e.meta)return!1;const n="string"==typeof e.meta.requestId,i=t.indexOf(e.meta.requestStatus)>-1;return n&&i}function he(e){return"function"==typeof e[0]&&"pending"in e[0]&&"fulfilled"in e[0]&&"rejected"in e[0]}function fe(...e){return 0===e.length?e=>de(e,["pending"]):he(e)?ue(...e.map(e=>e.pending)):fe()(e[0])}function pe(...e){return 0===e.length?e=>de(e,["rejected"]):he(e)?ue(...e.map(e=>e.rejected)):pe()(e[0])}function ye(...e){const t=e=>e&&e.meta&&e.meta.rejectedWithValue;return 0===e.length||he(e)?le(pe(...e),t):ye()(e[0])}function ge(...e){return 0===e.length?e=>de(e,["fulfilled"]):he(e)?ue(...e.map(e=>e.fulfilled)):ge()(e[0])}function me(...e){return 0===e.length?e=>de(e,["pending","fulfilled","rejected"]):he(e)?ue(...e.flatMap(e=>[e.pending,e.rejected,e.fulfilled])):me()(e[0])}var ve=(e=21)=>{let t="",n=e;for(;n--;)t+="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW"[64*Math.random()|0];return t},be=["name","message","stack","code"],Se=class{constructor(e,t){this.payload=e,this.meta=t}_type},we=class{constructor(e,t){this.payload=e,this.meta=t}_type},_e=e=>{if("object"==typeof e&&null!==e){const t={};for(const n of be)"string"==typeof e[n]&&(t[n]=e[n]);return t}return{message:String(e)}},Ae="External signal was aborted",ke=(()=>{function e(e,t,n){const i=ne(e+"/fulfilled",(e,t,n,i)=>({payload:e,meta:{...i||{},arg:n,requestId:t,requestStatus:"fulfilled"}})),r=ne(e+"/pending",(e,t,n)=>({payload:void 0,meta:{...n||{},arg:t,requestId:e,requestStatus:"pending"}})),s=ne(e+"/rejected",(e,t,i,r,s)=>({payload:r,error:(n&&n.serializeError||_e)(e||"Rejected"),meta:{...s||{},arg:i,requestId:t,rejectedWithValue:!!r,requestStatus:"rejected",aborted:"AbortError"===e?.name,condition:"ConditionError"===e?.name}}));return Object.assign(function(e,{signal:a}={}){return(o,c,u)=>{const l=n?.idGenerator?n.idGenerator(e):ve(),d=new AbortController;let h,f;function p(e){f=e,d.abort()}a&&(a.aborted?p(Ae):a.addEventListener("abort",()=>p(Ae),{once:!0}));const y=async function(){let a;try{let s=n?.condition?.(e,{getState:c,extra:u});if(null!==(y=s)&&"object"==typeof y&&"function"==typeof y.then&&(s=await s),!1===s||d.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};const g=new Promise((e,t)=>{h=()=>{t({name:"AbortError",message:f||"Aborted"})},d.signal.addEventListener("abort",h)});o(r(l,e,n?.getPendingMeta?.({requestId:l,arg:e},{getState:c,extra:u}))),a=await Promise.race([g,Promise.resolve(t(e,{dispatch:o,getState:c,extra:u,requestId:l,signal:d.signal,abort:p,rejectWithValue:(e,t)=>new Se(e,t),fulfillWithValue:(e,t)=>new we(e,t)})).then(t=>{if(t instanceof Se)throw t;return t instanceof we?i(t.payload,l,e,t.meta):i(t,l,e)})])}catch(t){a=t instanceof Se?s(null,l,e,t.payload,t.meta):s(t,l,e)}finally{h&&d.signal.removeEventListener("abort",h)}var y;return n&&!n.dispatchConditionRejection&&s.match(a)&&a.meta.condition||o(a),a}();return Object.assign(y,{abort:p,requestId:l,arg:e,unwrap:()=>y.then(Te)})}},{pending:r,rejected:s,fulfilled:i,settled:ue(s,i),typePrefix:e})}return e.withTypes=()=>e,e})();function Te(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}var Ce=Symbol.for("rtk-slice-createasyncthunk");function Oe(e,t){return`${e}/${t}`}function xe({creators:e}={}){const t=e?.asyncThunk?.[Ce];return function(e){const{name:n,reducerPath:i=n}=e;if(!n)throw new Error(qe(11));const r=("function"==typeof e.reducers?e.reducers(function(){function e(e,t){return{_reducerDefinitionType:"asyncThunk",payloadCreator:e,...t}}return e.withTypes=()=>e,{reducer:e=>Object.assign({[e.name]:(...t)=>e(...t)}[e.name],{_reducerDefinitionType:"reducer"}),preparedReducer:(e,t)=>({_reducerDefinitionType:"reducerWithPrepare",prepare:e,reducer:t}),asyncThunk:e}}()):e.reducers)||{},s=Object.keys(r),a={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},o={addCase(e,t){const n="string"==typeof e?e:e.type;if(!n)throw new Error(qe(12));if(n in a.sliceCaseReducersByType)throw new Error(qe(13));return a.sliceCaseReducersByType[n]=t,o},addMatcher:(e,t)=>(a.sliceMatchers.push({matcher:e,reducer:t}),o),exposeAction:(e,t)=>(a.actionCreators[e]=t,o),exposeCaseReducer:(e,t)=>(a.sliceCaseReducersByName[e]=t,o)};function c(){const[t={},n=[],i]="function"==typeof e.extraReducers?oe(e.extraReducers):[e.extraReducers],r={...t,...a.sliceCaseReducersByType};return function(e,t){let n,[i,r,s]=oe(t);if("function"==typeof e)n=()=>ie(e());else{const t=ie(e);n=()=>t}function a(e=n(),t){let a=[i[t.type],...r.filter(({matcher:e})=>e(t)).map(({reducer:e})=>e)];return 0===a.filter(e=>!!e).length&&(a=[s]),a.reduce((e,n)=>{if(n){if(u(e)){const i=n(e,t);return void 0===i?e:i}if(l(e))return J(e,e=>n(e,t));{const i=n(e,t);if(void 0===i){if(null===e)return e;throw Error("A case reducer on a non-draftable value must not return undefined")}return i}}return e},e)}return a.getInitialState=n,a}(e.initialState,e=>{for(let t in r)e.addCase(t,r[t]);for(let t of a.sliceMatchers)e.addMatcher(t.matcher,t.reducer);for(let t of n)e.addMatcher(t.matcher,t.reducer);i&&e.addDefaultCase(i)})}s.forEach(i=>{const s=r[i],a={reducerName:i,type:Oe(n,i),createNotation:"function"==typeof e.reducers};!function(e){return"asyncThunk"===e._reducerDefinitionType}(s)?function({type:e,reducerName:t,createNotation:n},i,r){let s,a;if("reducer"in i){if(n&&!function(e){return"reducerWithPrepare"===e._reducerDefinitionType}(i))throw new Error(qe(17));s=i.reducer,a=i.prepare}else s=i;r.addCase(e,s).exposeCaseReducer(t,s).exposeAction(t,a?ne(e,a):ne(e))}(a,s,o):function({type:e,reducerName:t},n,i,r){if(!r)throw new Error(qe(18));const{payloadCreator:s,fulfilled:a,pending:o,rejected:c,settled:u,options:l}=n,d=r(e,s,l);i.exposeAction(t,d),a&&i.addCase(d.fulfilled,a);o&&i.addCase(d.pending,o);c&&i.addCase(d.rejected,c);u&&i.addMatcher(d.settled,u);i.exposeCaseReducer(t,{fulfilled:a||ze,pending:o||ze,rejected:c||ze,settled:u||ze})}(a,s,o,t)});const d=e=>e,h=new Map,f=new WeakMap;let p;function y(e,t){return p||(p=c()),p(e,t)}function g(){return p||(p=c()),p.getInitialState()}function m(t,n=!1){function i(e){let r=e[t];return void 0===r&&n&&(r=re(f,i,g)),r}function r(t=d){const i=re(h,n,()=>new WeakMap);return re(i,t,()=>{const i={};for(const[r,s]of Object.entries(e.selectors??{}))i[r]=Re(s,t,()=>re(f,t,g),n);return i})}return{reducerPath:t,getSelectors:r,get selectors(){return r(i)},selectSlice:i}}const v={name:n,reducer:y,actions:a.actionCreators,caseReducers:a.sliceCaseReducersByName,getInitialState:g,...m(i),injectInto(e,{reducerPath:t,...n}={}){const r=t??i;return e.inject({reducerPath:r,reducer:y},n),{...v,...m(r,!0)}}};return v}}function Re(e,t,n,i){function r(r,...s){let a=t(r);return void 0===a&&i&&(a=n()),e(a,...s)}return r.unwrapped=e,r}var Ee=xe();function ze(){}var{assign:Pe}=Object;Symbol.for("rtk-state-proxy-original");function qe(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}function Ie(e,t="expected a function, instead received "+typeof e){if("function"!=typeof e)throw new TypeError(t)}var Me=e=>Array.isArray(e)?e:[e];function Fe(e){const t=Array.isArray(e[0])?e[0]:e;return function(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(e=>"function"==typeof e)){const n=e.map(e=>"function"==typeof e?`function ${e.name||"unnamed"}()`:typeof e).join(", ");throw new TypeError(`${t}[${n}]`)}}(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}Symbol(),Object.getPrototypeOf({});var De="undefined"!=typeof WeakRef?WeakRef:class{constructor(e){this.value=e}deref(){return this.value}};function je(){return{s:0,v:void 0,o:null,p:null}}function Le(e,t={}){let n={s:0,v:void 0,o:null,p:null};const{resultEqualityCheck:i}=t;let r,s=0;function a(){let t=n;const{length:a}=arguments;for(let e=0,n=a;e<n;e++){const n=arguments[e];if("function"==typeof n||"object"==typeof n&&null!==n){let e=t.o;null===e&&(t.o=e=new WeakMap);const i=e.get(n);void 0===i?(t=je(),e.set(n,t)):t=i}else{let e=t.p;null===e&&(t.p=e=new Map);const i=e.get(n);void 0===i?(t=je(),e.set(n,t)):t=i}}const o=t;let c;if(1===t.s)c=t.v;else if(c=e.apply(null,arguments),s++,i){const e=r?.deref?.()??r;null!=e&&i(e,c)&&(c=e,0!==s&&s--);r="object"==typeof c&&null!==c||"function"==typeof c?new De(c):c}return o.s=1,o.v=c,c}return a.clearCache=()=>{n={s:0,v:void 0,o:null,p:null},a.resetResultsCount()},a.resultsCount=()=>s,a.resetResultsCount=()=>{s=0},a}function Qe(e,...t){const n="function"==typeof e?{memoize:e,memoizeOptions:t}:e,i=(...e)=>{let t,i=0,r=0,s={},a=e.pop();"object"==typeof a&&(s=a,a=e.pop()),Ie(a,`createSelector expects an output function after the inputs, but received: [${typeof a}]`);const o={...n,...s},{memoize:c,memoizeOptions:u=[],argsMemoize:l=Le,argsMemoizeOptions:d=[],devModeChecks:h={}}=o,f=Me(u),p=Me(d),y=Fe(e),g=c(function(){return i++,a.apply(null,arguments)},...f);const m=l(function(){r++;const e=function(e,t){const n=[],{length:i}=e;for(let r=0;r<i;r++)n.push(e[r].apply(null,t));return n}(y,arguments);return t=g.apply(null,e),t},...p);return Object.assign(m,{resultFunc:a,memoizedResultFunc:g,dependencies:y,dependencyRecomputations:()=>r,resetDependencyRecomputations:()=>{r=0},lastResult:()=>t,recomputations:()=>i,resetRecomputations:()=>{i=0},memoize:c,argsMemoize:l})};return Object.assign(i,{withTypes:()=>i}),i}var Ne=Qe(Le),Ke=Object.assign((e,t=Ne)=>{!function(e,t="expected an object, instead received "+typeof e){if("object"!=typeof e)throw new TypeError(t)}(e,"createStructuredSelector expects first argument to be an object where each property is a selector, instead received a "+typeof e);const n=Object.keys(e);return t(n.map(t=>e[t]),(...e)=>e.reduce((e,t,i)=>(e[n[i]]=t,e),{}))},{withTypes:()=>Ke});var Ue=class extends Error{issues;constructor(e){super(e[0].message),this.name="SchemaError",this.issues=e}},We=(e=>(e.uninitialized="uninitialized",e.pending="pending",e.fulfilled="fulfilled",e.rejected="rejected",e))(We||{}),Be="uninitialized",$e="pending",He="fulfilled",Ve="rejected";function Ge(e){return{status:e,isUninitialized:e===Be,isLoading:e===$e,isSuccess:e===He,isError:e===Ve}}var Xe=i.isPlainObject;function Je(e,t){if(e===t||!(Xe(e)&&Xe(t)||Array.isArray(e)&&Array.isArray(t)))return t;const n=Object.keys(t),i=Object.keys(e);let r=n.length===i.length;const s=Array.isArray(t)?[]:{};for(const i of n)s[i]=Je(e[i],t[i]),r&&(r=e[i]===s[i]);return r?e:s}function Ye(e,t,n){return e.reduce((e,i,r)=>(t(i,r)&&e.push(n(i,r)),e),[]).flat()}function Ze(e){return null!=e}function et(e){return[...e?.values()??[]].filter(Ze)}function tt(e,t,n){return e.has(t)?e.get(t):e.set(t,n(t)).get(t)}var nt=()=>new Map;var it=class{constructor(e,t=void 0){this.value=e,this.meta=t}};var rt="__rtkq/",st="online",at="offline",ot="focused",ct=ne(`${rt}${ot}`),ut=ne(`${rt}un${ot}`),lt=ne(`${rt}${st}`),dt=ne(`${rt}${at}`);var ht="query",ft="mutation",pt="infinitequery";function yt(e){return e.type===ht}function gt(e){return e.type===pt}function mt(e){return yt(e)||gt(e)}function vt(e,t,n,i,r,s){const a="function"==typeof e?e(t,n,i,r):e;return a?Ye(a,Ze,e=>s(bt(e))):[]}function bt(e){return"string"==typeof e?{type:e}:e}var St=(e,t)=>e.endpointDefinitions[t],wt=Symbol("forceQueryFn"),_t=e=>"function"==typeof e[wt];var At=class extends Ue{constructor(e,t,n,i){super(e),this.value=t,this.schemaName=n,this._bqMeta=i}},kt=(e,t)=>Array.isArray(e)?e.includes(t):!!e;async function Tt(e,t,n,i){const r=await e["~standard"].validate(t);if(r.issues)throw new At(r.issues,t,n,i);return r.value}function Ct(e){return e}var Ot=(e={})=>({...e,[se]:!0});function xt(e,{pages:t,pageParams:n},i){const r=t.length-1;return e.getNextPageParam(t[r],t,n[r],n,i)}function Rt(e,{pages:t,pageParams:n},i){return e.getPreviousPageParam?.(t[0],t,n[0],n,i)}function Et(e,t,n,i){return vt(n[e.meta.arg.endpointName][t],ge(e)?e.payload:void 0,ye(e)?e.payload:void 0,e.meta.arg.originalArgs,"baseQueryMeta"in e.meta?e.meta.baseQueryMeta:void 0,i)}function zt(e){return u(e)?H(e):e}function Pt(e,t,n){const i=e[t];i&&n(i)}function qt(e){return("arg"in e?e.arg.fixedCacheKey:e.fixedCacheKey)??e.requestId}function It(e,t,n){const i=e[qt(t)];i&&n(i)}var Mt={};function Ft({reducerPath:e,queryThunk:t,mutationThunk:n,serializeQueryArgs:r,context:{endpointDefinitions:s,apiUid:c,extractRehydrationInfo:l,hasRehydrationInfo:d},assertTagType:h,config:f}){const p=ne(`${e}/resetApiState`);function y(e,t,n,i){e[t.queryCacheKey]??={status:Be,endpointName:t.endpointName},Pt(e,t.queryCacheKey,e=>{e.status=$e,e.requestId=n&&e.requestId?e.requestId:i.requestId,void 0!==t.originalArgs&&(e.originalArgs=t.originalArgs),e.startedTimeStamp=i.startedTimeStamp;gt(s[i.arg.endpointName])&&"direction"in t&&(e.direction=t.direction)})}function g(e,t,n,i){Pt(e,t.arg.queryCacheKey,e=>{if(e.requestId!==t.requestId&&!i)return;const{merge:r}=s[t.arg.endpointName];if(e.status=He,r)if(void 0!==e.data){const{fulfilledTimeStamp:i,arg:s,baseQueryMeta:a,requestId:o}=t;let c=J(e.data,e=>r(e,n,{arg:s.originalArgs,baseQueryMeta:a,fulfilledTimeStamp:i,requestId:o}));e.data=c}else e.data=n;else e.data=s[t.arg.endpointName].structuralSharing??1?Je(u(e.data)?(u(c=e.data)||o(15),c[a].base_):e.data,n):n;var c;delete e.error,e.fulfilledTimeStamp=t.fulfilledTimeStamp})}const m=Ee({name:`${e}/queries`,initialState:Mt,reducers:{removeQueryResult:{reducer(e,{payload:{queryCacheKey:t}}){delete e[t]},prepare:ae()},cacheEntriesUpserted:{reducer(e,t){for(const n of t.payload){const{queryDescription:i,value:r}=n;y(e,i,!0,{arg:i,requestId:t.meta.requestId,startedTimeStamp:t.meta.timestamp}),g(e,{arg:i,requestId:t.meta.requestId,fulfilledTimeStamp:t.meta.timestamp,baseQueryMeta:{}},r,!0)}},prepare:e=>({payload:e.map(e=>{const{endpointName:t,arg:n,value:i}=e,a=s[t];return{queryDescription:{type:ht,endpointName:t,originalArgs:e.arg,queryCacheKey:r({queryArgs:n,endpointDefinition:a,endpointName:t})},value:i}}),meta:{[se]:!0,requestId:ve(),timestamp:Date.now()}})},queryResultPatched:{reducer(e,{payload:{queryCacheKey:t,patches:n}}){Pt(e,t,e=>{e.data=ee(e.data,n.concat())})},prepare:ae()}},extraReducers(e){e.addCase(t.pending,(e,{meta:t,meta:{arg:n}})=>{y(e,n,_t(n),t)}).addCase(t.fulfilled,(e,{meta:t,payload:n})=>{g(e,t,n,_t(t.arg))}).addCase(t.rejected,(e,{meta:{condition:t,arg:n,requestId:i},error:r,payload:s})=>{Pt(e,n.queryCacheKey,e=>{if(t);else{if(e.requestId!==i)return;e.status=Ve,e.error=s??r}})}).addMatcher(d,(e,t)=>{const{queries:n}=l(t);for(const[t,i]of Object.entries(n))i?.status!==He&&i?.status!==Ve||(e[t]=i)})}}),v=Ee({name:`${e}/mutations`,initialState:Mt,reducers:{removeMutationResult:{reducer(e,{payload:t}){const n=qt(t);n in e&&delete e[n]},prepare:ae()}},extraReducers(e){e.addCase(n.pending,(e,{meta:t,meta:{requestId:n,arg:i,startedTimeStamp:r}})=>{i.track&&(e[qt(t)]={requestId:n,status:$e,endpointName:i.endpointName,startedTimeStamp:r})}).addCase(n.fulfilled,(e,{payload:t,meta:n})=>{n.arg.track&&It(e,n,e=>{e.requestId===n.requestId&&(e.status=He,e.data=t,e.fulfilledTimeStamp=n.fulfilledTimeStamp)})}).addCase(n.rejected,(e,{payload:t,error:n,meta:i})=>{i.arg.track&&It(e,i,e=>{e.requestId===i.requestId&&(e.status=Ve,e.error=t??n)})}).addMatcher(d,(e,t)=>{const{mutations:n}=l(t);for(const[t,i]of Object.entries(n))i?.status!==He&&i?.status!==Ve||t===i?.requestId||(e[t]=i)})}}),b=Ee({name:`${e}/invalidation`,initialState:{tags:{},keys:{}},reducers:{updateProvidedBy:{reducer(e,t){for(const{queryCacheKey:n,providedTags:i}of t.payload){S(e,n);for(const{type:t,id:r}of i){const i=(e.tags[t]??={})[r||"__internal_without_id"]??=[];i.includes(n)||i.push(n)}e.keys[n]=i}},prepare:ae()}},extraReducers(e){e.addCase(m.actions.removeQueryResult,(e,{payload:{queryCacheKey:t}})=>{S(e,t)}).addMatcher(d,(e,t)=>{const{provided:n}=l(t);for(const[t,i]of Object.entries(n.tags??{}))for(const[r,s]of Object.entries(i)){const i=(e.tags[t]??={})[r||"__internal_without_id"]??=[];for(const t of s){i.includes(t)||i.push(t),e.keys[t]=n.keys[t]}}}).addMatcher(ue(ge(t),ye(t)),(e,t)=>{w(e,[t])}).addMatcher(m.actions.cacheEntriesUpserted.match,(e,t)=>{w(e,t.payload.map(({queryDescription:e,value:t})=>({type:"UNKNOWN",payload:t,meta:{requestStatus:"fulfilled",requestId:"UNKNOWN",arg:e}})))})}});function S(e,t){const n=zt(e.keys[t]??[]);for(const i of n){const n=i.type,r=i.id??"__internal_without_id",s=e.tags[n]?.[r];s&&(e.tags[n][r]=zt(s).filter(e=>e!==t))}delete e.keys[t]}function w(e,t){const n=t.map(e=>{const t=Et(e,"providesTags",s,h),{queryCacheKey:n}=e.meta.arg;return{queryCacheKey:n,providedTags:t}});b.caseReducers.updateProvidedBy(e,b.actions.updateProvidedBy(n))}const _=Ee({name:`${e}/subscriptions`,initialState:Mt,reducers:{updateSubscriptionOptions(e,t){},unsubscribeQueryResult(e,t){},internal_getRTKQSubscriptions(){}}}),A=Ee({name:`${e}/internalSubscriptions`,initialState:Mt,reducers:{subscriptionsUpdated:{reducer:(e,t)=>ee(e,t.payload),prepare:ae()}}}),k=Ee({name:`${e}/config`,initialState:{online:"undefined"==typeof navigator||void 0===navigator.onLine||navigator.onLine,focused:"undefined"==typeof document||"hidden"!==document.visibilityState,middlewareRegistered:!1,...f},reducers:{middlewareRegistered(e,{payload:t}){e.middlewareRegistered="conflict"!==e.middlewareRegistered&&c===t||"conflict"}},extraReducers:e=>{e.addCase(lt,e=>{e.online=!0}).addCase(dt,e=>{e.online=!1}).addCase(ct,e=>{e.focused=!0}).addCase(ut,e=>{e.focused=!1}).addMatcher(d,e=>({...e}))}}),T=(0,i.combineReducers)({queries:m.reducer,mutations:v.reducer,provided:b.reducer,subscriptions:A.reducer,config:k.reducer});return{reducer:(e,t)=>T(p.match(t)?void 0:e,t),actions:{...k.actions,...m.actions,..._.actions,...A.actions,...v.actions,...b.actions,resetApiState:p}}}var Dt=Symbol.for("RTKQ/skipToken"),jt={status:Be},Lt=J(jt,()=>{}),Qt=J(jt,()=>{});var Nt=WeakMap?new WeakMap:void 0,Kt=({endpointName:e,queryArgs:t})=>{let n="";const r=Nt?.get(t);if("string"==typeof r)n=r;else{const e=JSON.stringify(t,(e,t)=>(t="bigint"==typeof t?{$bigint:t.toString()}:t,t=(0,i.isPlainObject)(t)?Object.keys(t).sort().reduce((e,n)=>(e[n]=t[n],e),{}):t));(0,i.isPlainObject)(t)&&Nt?.set(t,e),n=e}return`${e}(${n})`};function Ut(...e){return function(t){const n=Le(e=>t.extractRehydrationInfo?.(e,{reducerPath:t.reducerPath??"api"})),i={reducerPath:"api",keepUnusedDataFor:60,refetchOnMountOrArgChange:!1,refetchOnFocus:!1,refetchOnReconnect:!1,invalidationBehavior:"delayed",...t,extractRehydrationInfo:n,serializeQueryArgs(e){let n=Kt;if("serializeQueryArgs"in e.endpointDefinition){const t=e.endpointDefinition.serializeQueryArgs;n=e=>{const n=t(e);return"string"==typeof n?n:Kt({...e,queryArgs:n})}}else t.serializeQueryArgs&&(n=t.serializeQueryArgs);return n(e)},tagTypes:[...t.tagTypes||[]]},r={endpointDefinitions:{},batch(e){e()},apiUid:ve(),extractRehydrationInfo:n,hasRehydrationInfo:Le(e=>null!=n(e))},s={injectEndpoints:function(e){const t=e.endpoints({query:e=>({...e,type:ht}),mutation:e=>({...e,type:ft}),infiniteQuery:e=>({...e,type:pt})});for(const[n,i]of Object.entries(t))if(!0!==e.overrideExisting&&n in r.endpointDefinitions){if("throw"===e.overrideExisting)throw new Error(qe(39))}else{0,r.endpointDefinitions[n]=i;for(const e of a)e.injectEndpoint(n,i)}return s},enhanceEndpoints({addTagTypes:e,endpoints:t}){if(e)for(const t of e)i.tagTypes.includes(t)||i.tagTypes.push(t);if(t)for(const[e,n]of Object.entries(t))"function"==typeof n?n(St(r,e)):Object.assign(St(r,e)||{},n);return s}},a=e.map(e=>e.init(s,i,r));return s.injectEndpoints({endpoints:t.endpoints})}}function Wt(e,...t){return Object.assign(e,...t)}var Bt=({api:e,queryThunk:t,internalState:n,mwApi:i})=>{const r=`${e.reducerPath}/subscriptions`;let s=null,a=null;const{updateSubscriptionOptions:o,unsubscribeQueryResult:c}=e.internalActions,u=()=>n.currentSubscriptions,l={getSubscriptions:u,getSubscriptionCount:e=>{const t=u().get(e);return t?.size??0},isRequestSubscribed:(e,t)=>{const n=u();return!!n?.get(e)?.get(t)}};function d(e){return JSON.parse(JSON.stringify(Object.fromEntries([...e].map(([e,t])=>[e,Object.fromEntries(t)]))))}return(i,u)=>{if(s||(s=d(n.currentSubscriptions)),e.util.resetApiState.match(i))return s={},n.currentSubscriptions.clear(),a=null,[!0,!1];if(e.internalActions.internal_getRTKQSubscriptions.match(i))return[!1,l];const h=((n,i)=>{if(o.match(i)){const{queryCacheKey:e,requestId:t,options:r}=i.payload,s=n.get(e);return s?.has(t)&&s.set(t,r),!0}if(c.match(i)){const{queryCacheKey:e,requestId:t}=i.payload,r=n.get(e);return r&&r.delete(t),!0}if(e.internalActions.removeQueryResult.match(i))return n.delete(i.payload.queryCacheKey),!0;if(t.pending.match(i)){const{meta:{arg:e,requestId:t}}=i,r=tt(n,e.queryCacheKey,nt);return e.subscribe&&r.set(t,e.subscriptionOptions??r.get(t)??{}),!0}let r=!1;if(t.rejected.match(i)){const{meta:{condition:e,arg:t,requestId:s}}=i;if(e&&t.subscribe){const e=tt(n,t.queryCacheKey,nt);e.set(s,t.subscriptionOptions??e.get(s)??{}),r=!0}}return r})(n.currentSubscriptions,i);let f=!0;if(h){a||(a=setTimeout(()=>{const t=d(n.currentSubscriptions),[,i]=Y(s,()=>t);u.next(e.internalActions.subscriptionsUpdated(i)),s=t,a=null},500));const o="string"==typeof i.type&&!!i.type.startsWith(r),c=t.rejected.match(i)&&i.meta.condition&&!!i.meta.arg.subscribe;f=!o&&!c}return[f,!1]}},$t=({reducerPath:e,api:t,queryThunk:n,context:i,internalState:r,selectors:{selectQueryEntry:s,selectConfig:a},getRunningQueryThunk:o,mwApi:c})=>{const{removeQueryResult:u,unsubscribeQueryResult:l,cacheEntriesUpserted:d}=t.internalActions,h=ue(l.match,n.fulfilled,n.rejected,d.match);function f(e){const t=r.currentSubscriptions.get(e);if(!t)return!1;return t.size>0}const p={};function y(e){for(const t of e.values())t?.abort?.()}function g(e,t,n){const i=t.getState();for(const r of e){const e=s(i,r);e?.endpointName&&m(r,e.endpointName,t,n)}}function m(e,t,n,r){const a=St(i,t),c=a?.keepUnusedDataFor??r.keepUnusedDataFor;if(c===1/0)return;const l=Math.max(0,Math.min(c,2147482.647));if(!f(e)){const t=p[e];t&&clearTimeout(t),p[e]=setTimeout(()=>{if(!f(e)){const t=s(n.getState(),e);if(t?.endpointName){const e=n.dispatch(o(t.endpointName,t.originalArgs));e?.abort()}n.dispatch(u({queryCacheKey:e}))}delete p[e]},1e3*l)}}return(e,n)=>{const s=n.getState(),o=a(s);if(h(e)){let t;if(d.match(e))t=e.payload.map(e=>e.queryDescription.queryCacheKey);else{const{queryCacheKey:n}=l.match(e)?e.payload:e.meta.arg;t=[n]}g(t,n,o)}if(t.util.resetApiState.match(e)){for(const[e,t]of Object.entries(p))t&&clearTimeout(t),delete p[e];y(r.runningQueries),y(r.runningMutations)}if(i.hasRehydrationInfo(e)){const{queries:t}=i.extractRehydrationInfo(e);g(Object.keys(t),n,o)}}},Ht=new Error("Promise never resolved before cacheEntryRemoved."),Vt=({api:e,reducerPath:t,context:n,queryThunk:i,mutationThunk:r,internalState:s,selectors:{selectQueryEntry:a,selectApiState:o}})=>{const c=me(i),u=me(r),l=ge(i,r),d={},{removeQueryResult:h,removeMutationResult:f,cacheEntriesUpserted:p}=e.internalActions;function y(e,t,n){const i=d[e];i?.valueResolved&&(i.valueResolved({data:t,meta:n}),delete i.valueResolved)}function g(e){const t=d[e];t&&(delete d[e],t.cacheEntryRemoved())}function m(e){const{arg:t,requestId:n}=e.meta,{endpointName:i,originalArgs:r}=t;return[i,r,n]}function v(t,i,r,s,a){const o=St(n,t),c=o?.onCacheEntryAdded;if(!c)return;const u={},l=new Promise(e=>{u.cacheEntryRemoved=e}),h=Promise.race([new Promise(e=>{u.valueResolved=e}),l.then(()=>{throw Ht})]);h.catch(()=>{}),d[r]=u;const f=e.endpoints[t].select(mt(o)?i:r),p=s.dispatch((e,t,n)=>n),y={...s,getCacheEntry:()=>f(s.getState()),requestId:a,extra:p,updateCachedData:mt(o)?n=>s.dispatch(e.util.updateQueryData(t,i,n)):void 0,cacheDataLoaded:h,cacheEntryRemoved:l},g=c(i,y);Promise.resolve(g).catch(e=>{if(e!==Ht)throw e})}return(n,s,o)=>{const b=function(e){if(c(e))return e.meta.arg.queryCacheKey;if(u(e))return e.meta.arg.fixedCacheKey??e.meta.requestId;return h.match(e)?e.payload.queryCacheKey:f.match(e)?qt(e.payload):""}(n);function S(e,t,n,i){const r=a(o,t),c=a(s.getState(),t);!r&&c&&v(e,i,t,s,n)}if(i.pending.match(n)){const[e,t,i]=m(n);S(e,b,i,t)}else if(p.match(n))for(const{queryDescription:e,value:t}of n.payload){const{endpointName:i,originalArgs:r,queryCacheKey:s}=e;S(i,s,n.meta.requestId,r),y(s,t,{})}else if(r.pending.match(n)){if(s.getState()[t].mutations[b]){const[e,t,i]=m(n);v(e,t,b,s,i)}}else if(l(n))y(b,n.payload,n.meta.baseQueryMeta);else if(h.match(n)||f.match(n))g(b);else if(e.util.resetApiState.match(n))for(const e of Object.keys(d))g(e)}},Gt=({api:e,context:{apiUid:t},reducerPath:n})=>(n,i)=>{e.util.resetApiState.match(n)&&i.dispatch(e.internalActions.middlewareRegistered(t))},Xt=({reducerPath:e,context:t,context:{endpointDefinitions:n},mutationThunk:i,queryThunk:r,api:s,assertTagType:a,refetchQuery:o,internalState:c})=>{const{removeQueryResult:u}=s.internalActions,l=ue(ge(i),ye(i)),d=ue(ge(r,i),pe(r,i));let h=[],f=0;function p(n,i){const r=i.getState(),a=r[e];if(h.push(...n),"delayed"===a.config.invalidationBehavior&&f>0)return;const l=h;if(h=[],0===l.length)return;const d=s.util.selectInvalidatedBy(r,l);t.batch(()=>{const e=Array.from(d.values());for(const{queryCacheKey:t}of e){const e=a.queries[t],n=tt(c.currentSubscriptions,t,nt);e&&(0===n.size?i.dispatch(u({queryCacheKey:t})):e.status!==Be&&i.dispatch(o(e)))}})}return(e,t)=>{(r.pending.match(e)||i.pending.match(e))&&f++,d(e)&&(f=Math.max(0,f-1)),l(e)?p(Et(e,"invalidatesTags",n,a),t):d(e)?p([],t):s.util.invalidateTags.match(e)&&p(vt(e.payload,void 0,void 0,void 0,void 0,a),t)}},Jt=({reducerPath:e,queryThunk:t,api:n,refetchQuery:i,internalState:r})=>{const{currentPolls:s,currentSubscriptions:a}=r,o=new Set;let c=null;function u(e,t){o.add(e),c||(c=setTimeout(()=>{for(const e of o)d({queryCacheKey:e},t);o.clear(),c=null},0))}function l({queryCacheKey:t},n){const r=n.getState()[e],o=r.queries[t],c=a.get(t);if(!o||o.status===Be)return;const{lowestPollingInterval:u,skipPollingIfUnfocused:d}=f(c);if(!Number.isFinite(u))return;const h=s.get(t);h?.timeout&&(clearTimeout(h.timeout),h.timeout=void 0);const p=Date.now()+u;s.set(t,{nextPollTimestamp:p,pollingInterval:u,timeout:setTimeout(()=>{!r.config.focused&&d||n.dispatch(i(o)),l({queryCacheKey:t},n)},u)})}function d({queryCacheKey:t},n){const i=n.getState()[e].queries[t],r=a.get(t);if(!i||i.status===Be)return;const{lowestPollingInterval:o}=f(r);if(!Number.isFinite(o))return void h(t);const c=s.get(t),u=Date.now()+o;(!c||u<c.nextPollTimestamp)&&l({queryCacheKey:t},n)}function h(e){const t=s.get(e);t?.timeout&&clearTimeout(t.timeout),s.delete(e)}function f(e=new Map){let t=!1,n=Number.POSITIVE_INFINITY;for(const i of e.values())i.pollingInterval&&(n=Math.min(i.pollingInterval,n),t=i.skipPollingIfUnfocused||t);return{lowestPollingInterval:n,skipPollingIfUnfocused:t}}return(e,i)=>{(n.internalActions.updateSubscriptionOptions.match(e)||n.internalActions.unsubscribeQueryResult.match(e))&&u(e.payload.queryCacheKey,i),(t.pending.match(e)||t.rejected.match(e)&&e.meta.condition)&&u(e.meta.arg.queryCacheKey,i),(t.fulfilled.match(e)||t.rejected.match(e)&&!e.meta.condition)&&l(e.meta.arg,i),n.util.resetApiState.match(e)&&(!function(){for(const e of s.keys())h(e)}(),c&&(clearTimeout(c),c=null),o.clear())}},Yt=({api:e,context:t,queryThunk:n,mutationThunk:i})=>{const r=fe(n,i),s=pe(n,i),a=ge(n,i),o={};return(n,i)=>{if(r(n)){const{requestId:r,arg:{endpointName:s,originalArgs:a}}=n.meta,c=St(t,s),u=c?.onQueryStarted;if(u){const t={},n=new Promise((e,n)=>{t.resolve=e,t.reject=n});n.catch(()=>{}),o[r]=t;const l=e.endpoints[s].select(mt(c)?a:r),d=i.dispatch((e,t,n)=>n),h={...i,getCacheEntry:()=>l(i.getState()),requestId:r,extra:d,updateCachedData:mt(c)?t=>i.dispatch(e.util.updateQueryData(s,a,t)):void 0,queryFulfilled:n};u(a,h)}}else if(a(n)){const{requestId:e,baseQueryMeta:t}=n.meta;o[e]?.resolve({data:n.payload,meta:t}),delete o[e]}else if(s(n)){const{requestId:e,rejectedWithValue:t,baseQueryMeta:i}=n.meta;o[e]?.reject({error:n.payload??n.error,isUnhandledError:!t,meta:i}),delete o[e]}}};function Zt(e){const{reducerPath:t,queryThunk:n,api:r,context:s,getInternalState:a}=e,{apiUid:o}=s,c={invalidateTags:ne(`${t}/invalidateTags`)},u=e=>e.type.startsWith(`${t}/`),l=[Gt,$t,Xt,Jt,Vt,Yt];return{middleware:n=>{let c=!1;const h=a(n.dispatch),f={...e,internalState:h,refetchQuery:d,isThisApiSliceAction:u,mwApi:n},p=l.map(e=>e(f)),y=Bt(f),g=(({reducerPath:e,context:t,api:n,refetchQuery:i,internalState:r})=>{const{removeQueryResult:s}=n.internalActions;function a(n,a){const o=n.getState()[e],c=o.queries,u=r.currentSubscriptions;t.batch(()=>{for(const e of u.keys()){const t=c[e],r=u.get(e);if(!r||!t)continue;const l=[...r.values()];(l.some(e=>!0===e[a])||l.every(e=>void 0===e[a])&&o.config[a])&&(0===r.size?n.dispatch(s({queryCacheKey:e})):t.status!==Be&&n.dispatch(i(t)))}})}return(e,t)=>{ct.match(e)&&a(t,"refetchOnFocus"),lt.match(e)&&a(t,"refetchOnReconnect")}})(f);return e=>a=>{if(!(0,i.isAction)(a))return e(a);c||(c=!0,n.dispatch(r.internalActions.middlewareRegistered(o)));const l={...n,next:e},d=n.getState(),[h,f]=y(a,l,d);let m;if(m=h?e(a):f,n.getState()[t]&&(g(a,l,d),u(a)||s.hasRehydrationInfo(a)))for(const e of p)e(a,l,d);return m}},actions:c};function d(t){return e.api.endpoints[t.endpointName].initiate(t.originalArgs,{subscribe:!1,forceRefetch:!0})}}var en=Symbol(),tn=({createSelector:e=Ne}={})=>({name:en,init(t,{baseQuery:n,tagTypes:i,reducerPath:r,serializeQueryArgs:s,keepUnusedDataFor:a,refetchOnMountOrArgChange:o,refetchOnFocus:c,refetchOnReconnect:u,invalidationBehavior:d,onSchemaFailure:h,catchSchemaFailure:f,skipSchemaValidation:p},y){G();const g=e=>e;Object.assign(t,{reducerPath:r,endpoints:{},internalActions:{onOnline:lt,onOffline:dt,onFocus:ct,onFocusLost:ut},util:{}});const m=function({serializeQueryArgs:e,reducerPath:t,createSelector:n}){const i=e=>Lt,r=e=>Qt;return{buildQuerySelector:function(e,t){return u(e,t,s)},buildInfiniteQuerySelector:function(e,t){const{infiniteQueryOptions:n}=t;return u(e,t,function(e){const t={...e,...Ge(e.status)},{isLoading:i,isError:r,direction:s}=t,a="forward"===s,o="backward"===s;return{...t,hasNextPage:l(n,t.data,t.originalArgs),hasPreviousPage:d(n,t.data,t.originalArgs),isFetchingNextPage:i&&a,isFetchingPreviousPage:i&&o,isFetchNextPageError:r&&a,isFetchPreviousPageError:r&&o}})},buildMutationSelector:function(){return e=>{let t;return t="object"==typeof e?qt(e)??Dt:e,n(t===Dt?r:e=>a(e)?.mutations?.[t]??Qt,s)}},selectInvalidatedBy:function(e,n){const i=e[t],r=new Set,s=Ye(n,Ze,bt);for(const e of s){const t=i.provided.tags[e.type];if(!t)continue;let n=(void 0!==e.id?t[e.id]:Object.values(t).flat())??[];for(const e of n)r.add(e)}return Array.from(r.values()).flatMap(e=>{const t=i.queries[e];return t?{queryCacheKey:e,endpointName:t.endpointName,originalArgs:t.originalArgs}:[]})},selectCachedArgsForQuery:function(e,t){return Ye(Object.values(o(e)),e=>e?.endpointName===t&&e.status!==Be,e=>e.originalArgs)},selectApiState:a,selectQueries:o,selectMutations:function(e){return a(e)?.mutations},selectQueryEntry:c,selectConfig:function(e){return a(e)?.config}};function s(e){return{...e,...Ge(e.status)}}function a(e){return e[t]}function o(e){return a(e)?.queries}function c(e,t){return o(e)?.[t]}function u(t,r,s){return a=>{if(a===Dt)return n(i,s);const o=e({queryArgs:a,endpointDefinition:r,endpointName:t});return n(e=>c(e,o)??Lt,s)}}function l(e,t,n){return!!t&&null!=xt(e,t,n)}function d(e,t,n){return!(!t||!e.getPreviousPageParam)&&null!=Rt(e,t,n)}}({serializeQueryArgs:s,reducerPath:r,createSelector:e}),{selectInvalidatedBy:v,selectCachedArgsForQuery:b,buildQuerySelector:S,buildInfiniteQuerySelector:w,buildMutationSelector:_}=m;Wt(t.util,{selectInvalidatedBy:v,selectCachedArgsForQuery:b});const{queryThunk:A,infiniteQueryThunk:k,mutationThunk:T,patchQueryData:C,updateQueryData:O,upsertQueryData:x,prefetch:R,buildMatchThunkActions:E}=function({reducerPath:e,baseQuery:t,context:{endpointDefinitions:n},serializeQueryArgs:i,api:r,assertTagType:s,selectors:a,onSchemaFailure:o,catchSchemaFailure:c,skipSchemaValidation:u}){function d(e,t,n=0){const i=[t,...e];return n&&i.length>n?i.slice(0,-1):i}function h(e,t,n=0){const i=[...e,t];return n&&i.length>n?i.slice(1):i}const f=(e,t)=>e.query&&e[t]?e[t]:Ct,p=async(e,{signal:i,abort:r,rejectWithValue:s,fulfillWithValue:l,dispatch:p,getState:g,extra:m})=>{const v=n[e.endpointName],{metaSchema:b,skipSchemaValidation:S=u}=v,w=e.type===ht;try{let _=Ct;const A={signal:i,abort:r,dispatch:p,getState:g,extra:m,endpoint:e.endpointName,type:e.type,forced:w?y(e,g()):void 0,queryCacheKey:w?e.queryCacheKey:void 0},k=w?e[wt]:void 0;let T;const C=async(t,n,i,r)=>{if(null==n&&t.pages.length)return Promise.resolve({data:t});const s={queryArg:e.originalArgs,pageParam:n},a=await O(s),o=r?d:h;return{data:{pages:o(t.pages,a.data,i),pageParams:o(t.pageParams,n,i)},meta:a.meta}};async function O(e){let n;const{extraOptions:i,argSchema:r,rawResponseSchema:s,responseSchema:a}=v;if(r&&!kt(S,"arg")&&(e=await Tt(r,e,"argSchema",{})),k?n=k():v.query?(_=f(v,"transformResponse"),n=await t(v.query(e),A,i)):n=await v.queryFn(e,A,i,e=>t(e,A,i)),n.error)throw new it(n.error,n.meta);let{data:o}=n;s&&!kt(S,"rawResponse")&&(o=await Tt(s,n.data,"rawResponseSchema",n.meta));let c=await _(o,n.meta,e);return a&&!kt(S,"response")&&(c=await Tt(a,c,"responseSchema",n.meta)),{...n,data:c}}if(w&&"infiniteQueryOptions"in v){const{infiniteQueryOptions:x}=v,{maxPages:R=1/0}=x;let E;const z={pages:[],pageParams:[]},P=a.selectQueryEntry(g(),e.queryCacheKey)?.data,q=y(e,g())&&!e.direction||!P?z:P;if("direction"in e&&e.direction&&q.pages.length){const I="backward"===e.direction,M=(I?Rt:xt)(x,q,e.originalArgs);E=await C(q,M,R,I)}else{const{initialPageParam:F=x.initialPageParam}=e,D=P?.pageParams??[],j=D[0]??F,L=D.length;E=await C(q,j,R),k&&(E={data:E.data.pages[0]});for(let Q=1;Q<L;Q++){const N=xt(x,E.data,e.originalArgs);E=await C(E.data,N,R)}}T=E}else T=await O(e.originalArgs);return b&&!kt(S,"meta")&&T.meta&&(T.meta=await Tt(b,T.meta,"metaSchema",T.meta)),l(T.data,Ot({fulfilledTimeStamp:Date.now(),baseQueryMeta:T.meta}))}catch(K){let U=K;if(U instanceof it){let W=f(v,"transformErrorResponse");const{rawErrorResponseSchema:B,errorResponseSchema:$}=v;let{value:H,meta:V}=U;try{B&&!kt(S,"rawErrorResponse")&&(H=await Tt(B,H,"rawErrorResponseSchema",V)),b&&!kt(S,"meta")&&(V=await Tt(b,V,"metaSchema",V));let G=await W(H,V,e.originalArgs);return $&&!kt(S,"errorResponse")&&(G=await Tt($,G,"errorResponseSchema",V)),s(G,Ot({baseQueryMeta:V}))}catch(X){U=X}}try{if(U instanceof At){const J={endpoint:e.endpointName,arg:e.originalArgs,type:e.type,queryCacheKey:w?e.queryCacheKey:void 0};v.onSchemaFailure?.(U,J),o?.(U,J);const{catchSchemaFailure:Y=c}=v;if(Y)return s(Y(U,J),Ot({baseQueryMeta:U._bqMeta}))}}catch(Z){U=Z}throw console.error(U),U}};function y(e,t){const n=a.selectQueryEntry(t,e.queryCacheKey),i=a.selectConfig(t).refetchOnMountOrArgChange,r=n?.fulfilledTimeStamp,s=e.forceRefetch??(e.subscribe&&i);return!!s&&(!0===s||(Number(new Date)-Number(r))/1e3>=s)}const g=()=>ke(`${e}/executeQuery`,p,{getPendingMeta({arg:e}){const t=n[e.endpointName];return Ot({startedTimeStamp:Date.now(),...gt(t)?{direction:e.direction}:{}})},condition(e,{getState:t}){const i=t(),r=a.selectQueryEntry(i,e.queryCacheKey),s=r?.fulfilledTimeStamp,o=e.originalArgs,c=r?.originalArgs,u=n[e.endpointName],l=e.direction;return!(!_t(e)&&("pending"===r?.status||!y(e,i)&&(!yt(u)||!u?.forceRefetch?.({currentArg:o,previousArg:c,endpointState:r,state:i}))&&s&&!l))},dispatchConditionRejection:!0}),m=g(),v=g(),b=ke(`${e}/executeMutation`,p,{getPendingMeta:()=>Ot({startedTimeStamp:Date.now()})});function S(e){return t=>t?.meta?.arg?.endpointName===e}return{queryThunk:m,mutationThunk:b,infiniteQueryThunk:v,prefetch:(e,t,n={})=>(i,s)=>{const a=(e=>"force"in e)(n)&&n.force,o=(e=>"ifOlderThan"in e)(n)&&n.ifOlderThan,c=(n=!0)=>{const i={forceRefetch:n,subscribe:!1};return r.endpoints[e].initiate(t,i)},u=r.endpoints[e].select(t)(s());if(a)i(c());else if(o){const e=u?.fulfilledTimeStamp;if(!e)return void i(c());(Number(new Date)-Number(new Date(e)))/1e3>=o&&i(c())}else i(c(!1))},updateQueryData:(e,t,n,i=!0)=>(s,a)=>{const o=r.endpoints[e].select(t)(a()),c={patches:[],inversePatches:[],undo:()=>s(r.util.patchQueryData(e,t,c.inversePatches,i))};if(o.status===Be)return c;let u;if("data"in o)if(l(o.data)){const[e,t,i]=Y(o.data,n);c.patches.push(...t),c.inversePatches.push(...i),u=e}else u=n(o.data),c.patches.push({op:"replace",path:[],value:u}),c.inversePatches.push({op:"replace",path:[],value:o.data});return 0===c.patches.length||s(r.util.patchQueryData(e,t,c.patches,i)),c},upsertQueryData:(e,t,n)=>i=>i(r.endpoints[e].initiate(t,{subscribe:!1,forceRefetch:!0,[wt]:()=>({data:n})})),patchQueryData:(e,t,a,o)=>(c,u)=>{const l=n[e],d=i({queryArgs:t,endpointDefinition:l,endpointName:e});if(c(r.internalActions.queryResultPatched({queryCacheKey:d,patches:a})),!o)return;const h=r.endpoints[e].select(t)(u()),f=vt(l.providesTags,h.data,void 0,t,{},s);c(r.internalActions.updateProvidedBy([{queryCacheKey:d,providedTags:f}]))},buildMatchThunkActions:function(e,t){return{matchPending:le(fe(e),S(t)),matchFulfilled:le(ge(e),S(t)),matchRejected:le(pe(e),S(t))}}}}({baseQuery:n,reducerPath:r,context:y,api:t,serializeQueryArgs:s,assertTagType:g,selectors:m,onSchemaFailure:h,catchSchemaFailure:f,skipSchemaValidation:p}),{reducer:z,actions:P}=Ft({context:y,queryThunk:A,infiniteQueryThunk:k,mutationThunk:T,serializeQueryArgs:s,reducerPath:r,assertTagType:g,config:{refetchOnFocus:c,refetchOnReconnect:u,refetchOnMountOrArgChange:o,keepUnusedDataFor:a,reducerPath:r,invalidationBehavior:d}});Wt(t.util,{patchQueryData:C,updateQueryData:O,upsertQueryData:x,prefetch:R,resetApiState:P.resetApiState,upsertQueryEntries:P.cacheEntriesUpserted}),Wt(t.internalActions,P);const q=new WeakMap,I=e=>tt(q,e,()=>({currentSubscriptions:new Map,currentPolls:new Map,runningQueries:new Map,runningMutations:new Map})),{buildInitiateQuery:M,buildInitiateInfiniteQuery:F,buildInitiateMutation:D,getRunningMutationThunk:j,getRunningMutationsThunk:L,getRunningQueriesThunk:Q,getRunningQueryThunk:N}=function({serializeQueryArgs:e,queryThunk:t,infiniteQueryThunk:n,mutationThunk:i,api:r,context:s,getInternalState:a}){const o=e=>a(e)?.runningQueries,c=e=>a(e)?.runningMutations,{unsubscribeQueryResult:u,removeMutationResult:l,updateSubscriptionOptions:d}=r.internalActions;return{buildInitiateQuery:function(e,t){return f(e,t)},buildInitiateInfiniteQuery:function(e,t){return f(e,t)},buildInitiateMutation:function(e){return(t,{track:n=!0,fixedCacheKey:r}={})=>(s,a)=>{const o=i({type:"mutation",endpointName:e,originalArgs:t,track:n,fixedCacheKey:r}),u=s(o);h(s);const{requestId:d,abort:f,unwrap:p}=u,y=(g=e=>({error:e}),u.unwrap().then(e=>({data:e})).catch(g));var g;const m=Object.assign(y,{arg:u.arg,requestId:d,abort:f,unwrap:p,reset:()=>{s(l({requestId:d,fixedCacheKey:r}))}}),v=c(s);return v.set(d,m),m.then(()=>{v.delete(d)}),r&&(v.set(r,m),m.then(()=>{v.get(r)===m&&v.delete(r)})),m}},getRunningQueryThunk:function(t,n){return i=>{const r=St(s,t),a=e({queryArgs:n,endpointDefinition:r,endpointName:t});return o(i)?.get(a)}},getRunningMutationThunk:function(e,t){return e=>c(e)?.get(t)},getRunningQueriesThunk:function(){return e=>et(o(e))},getRunningMutationsThunk:function(){return e=>et(c(e))}};function h(e){}function f(i,s){const a=(c,{subscribe:l=!0,forceRefetch:f,subscriptionOptions:p,[wt]:y,...g}={})=>(m,v)=>{const b=e({queryArgs:c,endpointDefinition:s,endpointName:i});let S;const w={...g,type:ht,subscribe:l,forceRefetch:f,subscriptionOptions:p,endpointName:i,originalArgs:c,queryCacheKey:b,[wt]:y};if(yt(s))S=t(w);else{const{direction:e,initialPageParam:t}=g;S=n({...w,direction:e,initialPageParam:t})}const _=r.endpoints[i].select(c),A=m(S),k=_(v());h();const{requestId:T,abort:C}=A,O=k.requestId!==T,x=o(m)?.get(b),R=()=>_(v()),E=Object.assign(y?A.then(R):O&&!x?Promise.resolve(k):Promise.all([x,A]).then(R),{arg:c,requestId:T,subscriptionOptions:p,queryCacheKey:b,abort:C,async unwrap(){const e=await E;if(e.isError)throw e.error;return e.data},refetch:()=>m(a(c,{subscribe:!1,forceRefetch:!0})),unsubscribe(){l&&m(u({queryCacheKey:b,requestId:T}))},updateSubscriptionOptions(e){E.subscriptionOptions=e,m(d({endpointName:i,requestId:T,queryCacheKey:b,options:e}))}});if(!x&&!O&&!y){const e=o(m);e.set(b,E),E.then(()=>{e.delete(b)})}return E};return a}}({queryThunk:A,mutationThunk:T,infiniteQueryThunk:k,api:t,serializeQueryArgs:s,context:y,getInternalState:I});Wt(t.util,{getRunningMutationThunk:j,getRunningMutationsThunk:L,getRunningQueryThunk:N,getRunningQueriesThunk:Q});const{middleware:K,actions:U}=Zt({reducerPath:r,context:y,queryThunk:A,mutationThunk:T,infiniteQueryThunk:k,api:t,assertTagType:g,selectors:m,getRunningQueryThunk:N,getInternalState:I});return Wt(t.util,U),Wt(t,{reducer:z,middleware:K}),{name:en,injectEndpoint(e,n){const i=t,r=i.endpoints[e]??={};yt(n)&&Wt(r,{name:e,select:S(e,n),initiate:M(e,n)},E(A,e)),n.type===ft&&Wt(r,{name:e,select:_(),initiate:D(e)},E(T,e)),gt(n)&&Wt(r,{name:e,select:w(e,n),initiate:F(e,n)},E(A,e))}}}}),nn=(tn(),n(30200)),rn=n(85959);function sn(e){return e.replace(e[0],e[0].toUpperCase())}function an(e){return"infinitequery"===e.type}function on(e,...t){return Object.assign(e,...t)}var cn=Symbol();function un(e){const t=(0,rn.useRef)(e),n=(0,rn.useMemo)(()=>Je(t.current,e),[e]);return(0,rn.useEffect)(()=>{t.current!==n&&(t.current=n)},[n]),n}function ln(e){const t=(0,rn.useRef)(e);return(0,rn.useEffect)(()=>{(0,nn.shallowEqual)(t.current,e)||(t.current=e)},[e]),(0,nn.shallowEqual)(t.current,e)?t.current:e}var dn=(()=>!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement))(),hn=(()=>"undefined"!=typeof navigator&&"ReactNative"===navigator.product)(),fn=(()=>dn||hn?rn.useLayoutEffect:rn.useEffect)(),pn=e=>e.isUninitialized?{...e,isUninitialized:!1,isFetching:!0,isLoading:void 0===e.data,status:We.pending}:e;function yn(e,...t){const n={};return t.forEach(t=>{n[t]=e[t]}),n}var gn=["data","status","isLoading","isSuccess","isError","error"];var mn=Symbol();var vn=Ut(tn(),(({batch:e=nn.batch,hooks:t={useDispatch:nn.useDispatch,useSelector:nn.useSelector,useStore:nn.useStore},createSelector:n=Ne,unstable__sideEffectsInRender:i=!1,...r}={})=>({name:mn,init(r,{serializeQueryArgs:s},a){const o=r,{buildQueryHooks:c,buildInfiniteQueryHooks:u,buildMutationHook:l,usePrefetch:d}=function({api:e,moduleOptions:{batch:t,hooks:{useDispatch:n,useSelector:i,useStore:r},unstable__sideEffectsInRender:s,createSelector:a},serializeQueryArgs:o,context:c}){const u=s?e=>e():rn.useEffect,l=e=>e.current?.unsubscribe?.(),d=c.endpointDefinitions;return{buildQueryHooks:function(i){const r=(e,t={})=>{const[n]=p(i,e,t);return g(n),(0,rn.useMemo)(()=>({refetch:()=>m(n)}),[n])},s=({refetchOnReconnect:r,refetchOnFocus:s,pollingInterval:a=0,skipPollingIfUnfocused:o=!1}={})=>{const{initiate:c}=e.endpoints[i],d=n(),[h,f]=(0,rn.useState)(cn),p=(0,rn.useRef)(void 0),y=ln({refetchOnReconnect:r,refetchOnFocus:s,pollingInterval:a,skipPollingIfUnfocused:o});u(()=>{const e=p.current?.subscriptionOptions;y!==e&&p.current?.updateSubscriptionOptions(y)},[y]);const g=(0,rn.useRef)(y);u(()=>{g.current=y},[y]);const m=(0,rn.useCallback)(function(e,n=!1){let i;return t(()=>{l(p),p.current=i=d(c(e,{subscriptionOptions:g.current,forceRefetch:!n})),f(e)}),i},[d,c]),v=(0,rn.useCallback)(()=>{p.current?.queryCacheKey&&d(e.internalActions.removeQueryResult({queryCacheKey:p.current?.queryCacheKey}))},[d]);return(0,rn.useEffect)(()=>()=>{l(p)},[]),(0,rn.useEffect)(()=>{h===cn||p.current||m(h,!0)},[h,m]),(0,rn.useMemo)(()=>[m,h,{reset:v}],[m,h,v])},a=y(i,h);return{useQueryState:a,useQuerySubscription:r,useLazyQuerySubscription:s,useLazyQuery(e){const[t,n,{reset:i}]=s(e),r=a(n,{...e,skip:n===cn}),o=(0,rn.useMemo)(()=>({lastArg:n}),[n]);return(0,rn.useMemo)(()=>[t,{...r,reset:i},o],[t,r,i,o])},useQuery(e,t){const n=r(e,t),i=a(e,{selectFromResult:e===Dt||t?.skip?void 0:pn,...t}),s=yn(i,...gn);return(0,rn.useDebugValue)(s),(0,rn.useMemo)(()=>({...i,...n}),[i,n])}}},buildInfiniteQueryHooks:function(e){const n=(n,i={})=>{const[r,s,a,o]=p(e,n,i),c=(0,rn.useRef)(o);u(()=>{c.current=o},[o]);const d=(0,rn.useCallback)(function(e,n){let i;return t(()=>{l(r),r.current=i=s(a(e,{subscriptionOptions:c.current,direction:n}))}),i},[r,s,a]);g(r);const h=un(i.skip?Dt:n),f=(0,rn.useCallback)(()=>m(r),[r]);return(0,rn.useMemo)(()=>({trigger:d,refetch:f,fetchNextPage:()=>d(h,"forward"),fetchPreviousPage:()=>d(h,"backward")}),[f,d,h])},i=y(e,f);return{useInfiniteQueryState:i,useInfiniteQuerySubscription:n,useInfiniteQuery(e,t){const{refetch:r,fetchNextPage:s,fetchPreviousPage:a}=n(e,t),o=i(e,{selectFromResult:e===Dt||t?.skip?void 0:pn,...t}),c=yn(o,...gn,"hasNextPage","hasPreviousPage");return(0,rn.useDebugValue)(c),(0,rn.useMemo)(()=>({...o,fetchNextPage:s,fetchPreviousPage:a,refetch:r}),[o,s,a,r])}}},buildMutationHook:function(r){return({selectFromResult:s,fixedCacheKey:o}={})=>{const{select:c,initiate:u}=e.endpoints[r],l=n(),[d,h]=(0,rn.useState)();(0,rn.useEffect)(()=>()=>{d?.arg.fixedCacheKey||d?.reset()},[d]);const f=(0,rn.useCallback)(function(e){const t=l(u(e,{fixedCacheKey:o}));return h(t),t},[l,u,o]),{requestId:p}=d||{},y=(0,rn.useMemo)(()=>c({fixedCacheKey:o,requestId:d?.requestId}),[o,d,c]),g=(0,rn.useMemo)(()=>s?a([y],s):y,[s,y]),m=i(g,nn.shallowEqual),v=null==o?d?.arg.originalArgs:void 0,b=(0,rn.useCallback)(()=>{t(()=>{d&&h(void 0),o&&l(e.internalActions.removeMutationResult({requestId:p,fixedCacheKey:o}))})},[l,o,d,p]),S=yn(m,...gn,"endpointName");(0,rn.useDebugValue)(S);const w=(0,rn.useMemo)(()=>({...m,originalArgs:v,reset:b}),[m,v,b]);return(0,rn.useMemo)(()=>[f,w],[f,w])}},usePrefetch:function(t,i){const r=n(),s=ln(i);return(0,rn.useCallback)((n,i)=>r(e.util.prefetch(t,n,{...s,...i})),[t,r,s])}};function h(e,t,n){if(t?.endpointName&&e.isUninitialized){const{endpointName:e}=t,i=d[e];n!==Dt&&o({queryArgs:t.originalArgs,endpointDefinition:i,endpointName:e})===o({queryArgs:n,endpointDefinition:i,endpointName:e})&&(t=void 0)}let i=e.isSuccess?e.data:t?.data;void 0===i&&(i=e.data);const r=void 0!==i,s=e.isLoading,a=(!t||t.isLoading||t.isUninitialized)&&!r&&s,c=e.isSuccess||r&&(s&&!t?.isError||e.isUninitialized);return{...e,data:i,currentData:e.data,isFetching:s,isLoading:a,isSuccess:c}}function f(e,t,n){if(t?.endpointName&&e.isUninitialized){const{endpointName:e}=t,i=d[e];n!==Dt&&o({queryArgs:t.originalArgs,endpointDefinition:i,endpointName:e})===o({queryArgs:n,endpointDefinition:i,endpointName:e})&&(t=void 0)}let i=e.isSuccess?e.data:t?.data;void 0===i&&(i=e.data);const r=void 0!==i,s=e.isLoading,a=(!t||t.isLoading||t.isUninitialized)&&!r&&s,c=e.isSuccess||s&&r;return{...e,data:i,currentData:e.data,isFetching:s,isLoading:a,isSuccess:c}}function p(t,i,{refetchOnReconnect:r,refetchOnFocus:s,refetchOnMountOrArgChange:a,skip:o=!1,pollingInterval:c=0,skipPollingIfUnfocused:l=!1,...h}={}){const{initiate:f}=e.endpoints[t],p=n(),y=(0,rn.useRef)(void 0);if(!y.current){const t=p(e.internalActions.internal_getRTKQSubscriptions());y.current=t}const g=un(o?Dt:i),m=ln({refetchOnReconnect:r,refetchOnFocus:s,pollingInterval:c,skipPollingIfUnfocused:l}),v=ln(h.initialPageParam),b=(0,rn.useRef)(void 0);let{queryCacheKey:S,requestId:w}=b.current||{},_=!1;S&&w&&(_=y.current.isRequestSubscribed(S,w));const A=!_&&void 0!==b.current;return u(()=>{A&&(b.current=void 0)},[A]),u(()=>{const e=b.current;if(g===Dt)return e?.unsubscribe(),void(b.current=void 0);const n=b.current?.subscriptionOptions;if(e&&e.arg===g)m!==n&&e.updateSubscriptionOptions(m);else{e?.unsubscribe();const n=p(f(g,{subscriptionOptions:m,forceRefetch:a,...an(d[t])?{initialPageParam:v}:{}}));b.current=n}},[p,f,a,g,m,A,v,t]),[b,p,f,m]}function y(t,n){return(s,{skip:o=!1,selectFromResult:c}={})=>{const{select:u}=e.endpoints[t],l=un(o?Dt:s),d=(0,rn.useRef)(void 0),h=(0,rn.useMemo)(()=>a([u(l),(e,t)=>t,e=>l],n,{memoizeOptions:{resultEqualityCheck:nn.shallowEqual}}),[u,l]),f=(0,rn.useMemo)(()=>c?a([h],c,{devModeChecks:{identityFunctionCheck:"never"}}):h,[h,c]),p=i(e=>f(e,d.current),nn.shallowEqual),y=r(),g=h(y.getState(),d.current);return fn(()=>{d.current=g},[g]),p}}function g(e){(0,rn.useEffect)(()=>()=>{l(e),e.current=void 0},[e])}function m(e){if(!e.current)throw new Error(qe(38));return e.current.refetch()}}({api:r,moduleOptions:{batch:e,hooks:t,unstable__sideEffectsInRender:i,createSelector:n},serializeQueryArgs:s,context:a});return on(o,{usePrefetch:d}),on(a,{batch:e}),{injectEndpoint(e,t){if("query"===t.type){const{useQuery:t,useLazyQuery:n,useLazyQuerySubscription:i,useQueryState:s,useQuerySubscription:a}=c(e);on(o.endpoints[e],{useQuery:t,useLazyQuery:n,useLazyQuerySubscription:i,useQueryState:s,useQuerySubscription:a}),r[`use${sn(e)}Query`]=t,r[`useLazy${sn(e)}Query`]=n}if(function(e){return"mutation"===e.type}(t)){const t=l(e);on(o.endpoints[e],{useMutation:t}),r[`use${sn(e)}Mutation`]=t}else if(an(t)){const{useInfiniteQuery:t,useInfiniteQuerySubscription:n,useInfiniteQueryState:i}=u(e);on(o.endpoints[e],{useInfiniteQuery:t,useInfiniteQuerySubscription:n,useInfiniteQueryState:i}),r[`use${sn(e)}InfiniteQuery`]=t}}}}}))())}}]);
//# sourceMappingURL=431.js.map?_cache=9e6d1dbfdc45eea10d2c