/*! For license information please see query.js.LICENSE.txt */ !function(){"use strict";var e={"./node_modules/react/cjs/react-jsx-runtime.development.js":function(e,t,r){!function(){var e=r("react"),n=Symbol.for("react.element"),s=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),u=Symbol.for("react.provider"),c=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),h=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),p=Symbol.for("react.offscreen"),m=Symbol.iterator,b="@@iterator",v=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function g(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n=1&&l>=0&&a[c]!==u[l];)l--;for(;c>=1&&l>=0;c--,l--)if(a[c]!==u[l]){if(1!==c||1!==l)do{if(c--,--l<0||a[c]!==u[l]){var d="\n"+a[c].replace(" at new "," at ");return e.displayName&&d.includes("")&&(d=d.replace("",e.displayName)),"function"==typeof e&&D.set(e,d),d}}while(c>=1&&l>=0);break}}}finally{I=!1,T.current=s,function(){if(0==--E){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:_({},e,{value:k}),info:_({},e,{value:S}),warn:_({},e,{value:C}),error:_({},e,{value:w}),group:_({},e,{value:j}),groupCollapsed:_({},e,{value:P}),groupEnd:_({},e,{value:Q})})}E<0&&g("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}(),Error.prepareStackTrace=i}var h=e?e.displayName||e.name:"",f=h?x(h):"";return"function"==typeof e&&D.set(e,f),f}function K(e,t,r){if(null==e)return"";if("function"==typeof e)return U(e,!(!(n=e.prototype)||!n.isReactComponent));var n;if("string"==typeof e)return x(e);switch(e){case d:return x("Suspense");case h:return x("SuspenseList")}if("object"==typeof e)switch(e.$$typeof){case l:return U(e.render,!1);case f:return K(e.type,t,r);case y:var s=e,i=s._payload,o=s._init;try{return K(o(i),t,r)}catch(e){}}return""}D=new A;var B=Object.prototype.hasOwnProperty,N={},L=v.ReactDebugCurrentFrame;function $(e){if(e){var t=e._owner,r=K(e.type,e._source,t?t.type:null);L.setExtraStackFrame(r)}else L.setExtraStackFrame(null)}var H=Array.isArray;function W(e){return H(e)}function G(e){return""+e}function z(e){if(function(e){try{return G(e),!1}catch(e){return!0}}(e))return g("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",function(e){return"function"==typeof Symbol&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object"}(e)),G(e)}var V,Y,J,X=v.ReactCurrentOwner,Z={key:!0,ref:!0,__self:!0,__source:!0};J={};var ee=function(e,t,r,s,i,o,a){var u={$$typeof:n,type:e,key:t,ref:r,props:a,_owner:o,_store:{}};return Object.defineProperty(u._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(u,"_self",{configurable:!1,enumerable:!1,writable:!1,value:s}),Object.defineProperty(u,"_source",{configurable:!1,enumerable:!1,writable:!1,value:i}),Object.freeze&&(Object.freeze(u.props),Object.freeze(u)),u};var te,re=v.ReactCurrentOwner,ne=v.ReactDebugCurrentFrame;function se(e){if(e){var t=e._owner,r=K(e.type,e._source,t?t.type:null);ne.setExtraStackFrame(r)}else ne.setExtraStackFrame(null)}function ie(e){return"object"==typeof e&&null!==e&&e.$$typeof===n}function oe(){if(re.current){var e=R(re.current.type);if(e)return"\n\nCheck the render method of `"+e+"`."}return""}te=!1;var ae={};function ue(e,t){if(e._store&&!e._store.validated&&null==e.key){e._store.validated=!0;var r=function(e){var t=oe();if(!t){var r="string"==typeof e?e:e.displayName||e.name;r&&(t="\n\nCheck the top-level render call using <"+r+">.")}return t}(t);if(!ae[r]){ae[r]=!0;var n="";e&&e._owner&&e._owner!==re.current&&(n=" It was passed a child from "+R(e._owner.type)+"."),se(e),g('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',r,n),se(null)}}}function ce(e,t){if("object"==typeof e)if(W(e))for(var r=0;r",q=" Did you accidentally export a JSX literal instead of a component?"):k=typeof e,g("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",k,q)}var C=function(e,t,r,n,s){var i,o={},a=null,u=null;for(i in void 0!==r&&(z(r),a=""+r),function(e){if(B.call(e,"key")){var t=Object.getOwnPropertyDescriptor(e,"key").get;if(t&&t.isReactWarning)return!1}return void 0!==e.key}(t)&&(z(t.key),a=""+t.key),function(e){if(B.call(e,"ref")){var t=Object.getOwnPropertyDescriptor(e,"ref").get;if(t&&t.isReactWarning)return!1}return void 0!==e.ref}(t)&&(u=t.ref,function(e,t){if("string"==typeof e.ref&&X.current&&t&&X.current.stateNode!==t){var r=R(X.current.type);J[r]||(g('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',R(X.current.type),e.ref),J[r]=!0)}}(t,s)),t)B.call(t,i)&&!Z.hasOwnProperty(i)&&(o[i]=t[i]);if(e&&e.defaultProps){var c=e.defaultProps;for(i in c)void 0===o[i]&&(o[i]=c[i])}if(a||u){var l="function"==typeof e?e.displayName||e.name||"Unknown":e;a&&function(e,t){var r=function(){V||(V=!0,g("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",t))};r.isReactWarning=!0,Object.defineProperty(e,"key",{get:r,configurable:!0})}(o,l),u&&function(e,t){var r=function(){Y||(Y=!0,g("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",t))};r.isReactWarning=!0,Object.defineProperty(e,"ref",{get:r,configurable:!0})}(o,l)}return ee(e,a,u,s,n,X.current,o)}(e,t,r,m,b);if(null==C)return C;if(v){var w=t.children;if(void 0!==w)if(s)if(W(w)){for(var j=0;j0?"{key: someKey, "+Q.join(": ..., ")+": ...}":"{key: someKey}";le[P+_]||(g('A props object containing a "key" prop is being spread into JSX:\n let props = %s;\n <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n let props = %s;\n <%s key={someKey} {...props} />',_,P,Q.length>0?"{"+Q.join(": ..., ")+": ...}":"{}",P),le[P+_]=!0)}return e===i?function(e){for(var t=Object.keys(e.props),r=0;r{if(!s.isServer&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#r)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#r=e,this.#t?.(),this.#t=e((e=>{"boolean"==typeof e?this.setFocused(e):this.onFocus()}))}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach((t=>{t(e)}))}isFocused(){return"boolean"==typeof this.#e?this.#e:"hidden"!==globalThis.document?.visibilityState}},o=new i},"./node_modules/@tanstack/query-core/build/modern/infiniteQueryBehavior.js":function(e,t,r){r.r(t),r.d(t,{hasNextPage:function(){return a},hasPreviousPage:function(){return u},infiniteQueryBehavior:function(){return s}});var n=r("./node_modules/@tanstack/query-core/build/modern/utils.js");function s(e){return{onFetch:(t,r)=>{const s=async()=>{const r=t.options,s=t.fetchOptions?.meta?.fetchMore?.direction,a=t.state.data?.pages||[],u=t.state.data?.pageParams||[],c={pages:[],pageParams:[]};let l=!1;const d=(0,n.ensureQueryFn)(t.options,t.fetchOptions),h=async(e,r,s)=>{if(l)return Promise.reject();if(null==r&&e.pages.length)return Promise.resolve(e);const i={queryKey:t.queryKey,pageParam:r,direction:s?"backward":"forward",meta:t.options.meta};var o;o=i,Object.defineProperty(o,"signal",{enumerable:!0,get:()=>(t.signal.aborted?l=!0:t.signal.addEventListener("abort",(()=>{l=!0})),t.signal)});const a=await d(i),{maxPages:u}=t.options,c=s?n.addToStart:n.addToEnd;return{pages:c(e.pages,a,u),pageParams:c(e.pageParams,r,u)}};let f;if(s&&a.length){const e="backward"===s,t={pages:a,pageParams:u},n=(e?o:i)(r,t);f=await h(t,n,e)}else{f=await h(c,u[0]??r.initialPageParam);const t=e??a.length;for(let e=1;et.options.persister?.(s,{queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r):t.fetchFn=s}}}function i(e,{pages:t,pageParams:r}){const n=t.length-1;return e.getNextPageParam(t[n],t,r[n],r)}function o(e,{pages:t,pageParams:r}){return e.getPreviousPageParam?.(t[0],t,r[0],r)}function a(e,t){return!!t&&null!=i(e,t)}function u(e,t){return!(!t||!e.getPreviousPageParam)&&null!=o(e,t)}},"./node_modules/@tanstack/query-core/build/modern/infiniteQueryObserver.js":function(e,t,r){r.r(t),r.d(t,{InfiniteQueryObserver:function(){return i}});var n=r("./node_modules/@tanstack/query-core/build/modern/queryObserver.js"),s=r("./node_modules/@tanstack/query-core/build/modern/infiniteQueryBehavior.js"),i=class extends n.QueryObserver{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e,t){super.setOptions({...e,behavior:(0,s.infiniteQueryBehavior)()},t)}getOptimisticResult(e){return e.behavior=(0,s.infiniteQueryBehavior)(),super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"backward"}}})}createResult(e,t){const{state:r}=e,n=super.createResult(e,t),{isFetching:i,isRefetching:o,isError:a,isRefetchError:u}=n,c=r.fetchMeta?.fetchMore?.direction,l=a&&"forward"===c,d=i&&"forward"===c,h=a&&"backward"===c,f=i&&"backward"===c;return{...n,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:(0,s.hasNextPage)(t,r.data),hasPreviousPage:(0,s.hasPreviousPage)(t,r.data),isFetchNextPageError:l,isFetchingNextPage:d,isFetchPreviousPageError:h,isFetchingPreviousPage:f,isRefetchError:u&&!l&&!h,isRefetching:o&&!d&&!f}}}},"./node_modules/@tanstack/query-core/build/modern/mutation.js":function(e,t,r){r.r(t),r.d(t,{Mutation:function(){return o},getDefaultState:function(){return a}});var n=r("./node_modules/@tanstack/query-core/build/modern/notifyManager.js"),s=r("./node_modules/@tanstack/query-core/build/modern/removable.js"),i=r("./node_modules/@tanstack/query-core/build/modern/retryer.js"),o=class extends s.Removable{#n;#s;#i;constructor(e){super(),this.mutationId=e.mutationId,this.#s=e.mutationCache,this.#n=[],this.state=e.state||{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0},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.#n.includes(e)||(this.#n.push(e),this.clearGcTimeout(),this.#s.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#n=this.#n.filter((t=>t!==e)),this.scheduleGc(),this.#s.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#n.length||("pending"===this.state.status?this.scheduleGc():this.#s.remove(this))}continue(){return this.#i?.continue()??this.execute(this.state.variables)}async execute(e){this.#i=(0,i.createRetryer)({fn:()=>this.options.mutationFn?this.options.mutationFn(e):Promise.reject(new Error("No mutationFn found")),onFail:(e,t)=>{this.#o({type:"failed",failureCount:e,error:t})},onPause:()=>{this.#o({type:"pause"})},onContinue:()=>{this.#o({type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#s.canRun(this)});const t="pending"===this.state.status,r=!this.#i.canStart();try{if(!t){this.#o({type:"pending",variables:e,isPaused:r}),await(this.#s.config.onMutate?.(e,this));const t=await(this.options.onMutate?.(e));t!==this.state.context&&this.#o({type:"pending",context:t,variables:e,isPaused:r})}const n=await this.#i.start();return await(this.#s.config.onSuccess?.(n,e,this.state.context,this)),await(this.options.onSuccess?.(n,e,this.state.context)),await(this.#s.config.onSettled?.(n,null,this.state.variables,this.state.context,this)),await(this.options.onSettled?.(n,null,e,this.state.context)),this.#o({type:"success",data:n}),n}catch(t){try{throw await(this.#s.config.onError?.(t,e,this.state.context,this)),await(this.options.onError?.(t,e,this.state.context)),await(this.#s.config.onSettled?.(void 0,t,this.state.variables,this.state.context,this)),await(this.options.onSettled?.(void 0,t,e,this.state.context)),t}finally{this.#o({type:"error",error:t})}}finally{this.#s.runNext(this)}}#o(e){this.state=(t=>{switch(e.type){case"failed":return{...t,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...t,isPaused:!0};case"continue":return{...t,isPaused:!1};case"pending":return{...t,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{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}})(this.state),n.notifyManager.batch((()=>{this.#n.forEach((t=>{t.onMutationUpdate(e)})),this.#s.notify({mutation:this,type:"updated",action:e})}))}};function a(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}},"./node_modules/@tanstack/query-core/build/modern/mutationCache.js":function(e,t,r){r.r(t),r.d(t,{MutationCache:function(){return a}});var n=r("./node_modules/@tanstack/query-core/build/modern/notifyManager.js"),s=r("./node_modules/@tanstack/query-core/build/modern/mutation.js"),i=r("./node_modules/@tanstack/query-core/build/modern/utils.js"),o=r("./node_modules/@tanstack/query-core/build/modern/subscribable.js"),a=class extends o.Subscribable{constructor(e={}){super(),this.config=e,this.#a=new Map,this.#u=Date.now()}#a;#u;build(e,t,r){const n=new s.Mutation({mutationCache:this,mutationId:++this.#u,options:e.defaultMutationOptions(t),state:r});return this.add(n),n}add(e){const t=u(e),r=this.#a.get(t)??[];r.push(e),this.#a.set(t,r),this.notify({type:"added",mutation:e})}remove(e){const t=u(e);if(this.#a.has(t)){const r=this.#a.get(t)?.filter((t=>t!==e));r&&(0===r.length?this.#a.delete(t):this.#a.set(t,r))}this.notify({type:"removed",mutation:e})}canRun(e){const t=this.#a.get(u(e))?.find((e=>"pending"===e.state.status));return!t||t===e}runNext(e){const t=this.#a.get(u(e))?.find((t=>t!==e&&t.state.isPaused));return t?.continue()??Promise.resolve()}clear(){n.notifyManager.batch((()=>{this.getAll().forEach((e=>{this.remove(e)}))}))}getAll(){return[...this.#a.values()].flat()}find(e){const t={exact:!0,...e};return this.getAll().find((e=>(0,i.matchMutation)(t,e)))}findAll(e={}){return this.getAll().filter((t=>(0,i.matchMutation)(e,t)))}notify(e){n.notifyManager.batch((()=>{this.listeners.forEach((t=>{t(e)}))}))}resumePausedMutations(){const e=this.getAll().filter((e=>e.state.isPaused));return n.notifyManager.batch((()=>Promise.all(e.map((e=>e.continue().catch(i.noop))))))}};function u(e){return e.options.scope?.id??String(e.mutationId)}},"./node_modules/@tanstack/query-core/build/modern/mutationObserver.js":function(e,t,r){r.r(t),r.d(t,{MutationObserver:function(){return a}});var n=r("./node_modules/@tanstack/query-core/build/modern/mutation.js"),s=r("./node_modules/@tanstack/query-core/build/modern/notifyManager.js"),i=r("./node_modules/@tanstack/query-core/build/modern/subscribable.js"),o=r("./node_modules/@tanstack/query-core/build/modern/utils.js"),a=class extends i.Subscribable{#c;#l=void 0;#d;#h;constructor(e,t){super(),this.#c=e,this.setOptions(t),this.bindMethods(),this.#f()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){const t=this.options;this.options=this.#c.defaultMutationOptions(e),(0,o.shallowEqualObjects)(this.options,t)||this.#c.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#d,observer:this}),t?.mutationKey&&this.options.mutationKey&&(0,o.hashKey)(t.mutationKey)!==(0,o.hashKey)(this.options.mutationKey)?this.reset():"pending"===this.#d?.state.status&&this.#d.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#d?.removeObserver(this)}onMutationUpdate(e){this.#f(),this.#y(e)}getCurrentResult(){return this.#l}reset(){this.#d?.removeObserver(this),this.#d=void 0,this.#f(),this.#y()}mutate(e,t){return this.#h=t,this.#d?.removeObserver(this),this.#d=this.#c.getMutationCache().build(this.#c,this.options),this.#d.addObserver(this),this.#d.execute(e)}#f(){const e=this.#d?.state??(0,n.getDefaultState)();this.#l={...e,isPending:"pending"===e.status,isSuccess:"success"===e.status,isError:"error"===e.status,isIdle:"idle"===e.status,mutate:this.mutate,reset:this.reset}}#y(e){s.notifyManager.batch((()=>{if(this.#h&&this.hasListeners()){const t=this.#l.variables,r=this.#l.context;"success"===e?.type?(this.#h.onSuccess?.(e.data,t,r),this.#h.onSettled?.(e.data,null,t,r)):"error"===e?.type&&(this.#h.onError?.(e.error,t,r),this.#h.onSettled?.(void 0,e.error,t,r))}this.listeners.forEach((e=>{e(this.#l)}))}))}}},"./node_modules/@tanstack/query-core/build/modern/notifyManager.js":function(e,t,r){function n(){let e=[],t=0,r=e=>{e()},n=e=>{e()},s=e=>setTimeout(e,0);const i=n=>{t?e.push(n):s((()=>{r(n)}))};return{batch:i=>{let o;t++;try{o=i()}finally{t--,t||(()=>{const t=e;e=[],t.length&&s((()=>{n((()=>{t.forEach((e=>{r(e)}))}))}))})()}return o},batchCalls:e=>(...t)=>{i((()=>{e(...t)}))},schedule:i,setNotifyFunction:e=>{r=e},setBatchNotifyFunction:e=>{n=e},setScheduler:e=>{s=e}}}r.r(t),r.d(t,{createNotifyManager:function(){return n},notifyManager:function(){return s}});var s=n()},"./node_modules/@tanstack/query-core/build/modern/onlineManager.js":function(e,t,r){r.r(t),r.d(t,{OnlineManager:function(){return i},onlineManager:function(){return o}});var n=r("./node_modules/@tanstack/query-core/build/modern/subscribable.js"),s=r("./node_modules/@tanstack/query-core/build/modern/utils.js"),i=class extends n.Subscribable{#p=!0;#t;#r;constructor(){super(),this.#r=e=>{if(!s.isServer&&window.addEventListener){const t=()=>e(!0),r=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",r)}}}}onSubscribe(){this.#t||this.setEventListener(this.#r)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#r=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#p!==e&&(this.#p=e,this.listeners.forEach((t=>{t(e)})))}isOnline(){return this.#p}},o=new i},"./node_modules/@tanstack/query-core/build/modern/query.js":function(e,t,r){r.r(t),r.d(t,{Query:function(){return a},fetchState:function(){return u}});var n=r("./node_modules/@tanstack/query-core/build/modern/utils.js"),s=r("./node_modules/@tanstack/query-core/build/modern/notifyManager.js"),i=r("./node_modules/@tanstack/query-core/build/modern/retryer.js"),o=r("./node_modules/@tanstack/query-core/build/modern/removable.js"),a=class extends o.Removable{#m;#b;#v;#i;#g;#O;constructor(e){super(),this.#O=!1,this.#g=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#v=e.cache,this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#m=e.state||function(e){const t="function"==typeof e.initialData?e.initialData():e.initialData,r=void 0!==t,n=r?"function"==typeof e.initialDataUpdatedAt?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?n??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}(this.options),this.state=this.#m,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#i?.promise}setOptions(e){this.options={...this.#g,...e},this.updateGcTime(this.options.gcTime)}optionalRemove(){this.observers.length||"idle"!==this.state.fetchStatus||this.#v.remove(this)}setData(e,t){const r=(0,n.replaceData)(this.state.data,e,this.options);return this.#o({data:r,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),r}setState(e,t){this.#o({type:"setState",state:e,setStateOptions:t})}cancel(e){const t=this.#i?.promise;return this.#i?.cancel(e),t?t.then(n.noop).catch(n.noop):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#m)}isActive(){return this.observers.some((e=>!1!==(0,n.resolveEnabled)(e.options.enabled,this)))}isDisabled(){return this.getObserversCount()>0&&!this.isActive()}isStale(){return!!this.state.isInvalidated||(this.getObserversCount()>0?this.observers.some((e=>e.getCurrentResult().isStale)):void 0===this.state.data)}isStaleByTime(e=0){return this.state.isInvalidated||void 0===this.state.data||!(0,n.timeUntilStale)(this.state.dataUpdatedAt,e)}onFocus(){const e=this.observers.find((e=>e.shouldFetchOnWindowFocus()));e?.refetch({cancelRefetch:!1}),this.#i?.continue()}onOnline(){const e=this.observers.find((e=>e.shouldFetchOnReconnect()));e?.refetch({cancelRefetch:!1}),this.#i?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#v.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.#i&&(this.#O?this.#i.cancel({revert:!0}):this.#i.cancelRetry()),this.scheduleGc()),this.#v.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#o({type:"invalidate"})}fetch(e,t){if("idle"!==this.state.fetchStatus)if(void 0!==this.state.data&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#i)return this.#i.continueRetry(),this.#i.promise;if(e&&this.setOptions(e),!this.options.queryFn){const e=this.observers.find((e=>e.options.queryFn));e&&this.setOptions(e.options)}Array.isArray(this.options.queryKey)||console.error("As of v4, queryKey needs to be an Array. If you are using a string like 'repoData', please change it to an Array, e.g. ['repoData']");const r=new AbortController,s=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(this.#O=!0,r.signal)})},o={fetchOptions:t,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:()=>{const e=(0,n.ensureQueryFn)(this.options,t),r={queryKey:this.queryKey,meta:this.meta};return s(r),this.#O=!1,this.options.persister?this.options.persister(e,r,this):e(r)}};s(o),this.options.behavior?.onFetch(o,this),this.#b=this.state,"idle"!==this.state.fetchStatus&&this.state.fetchMeta===o.fetchOptions?.meta||this.#o({type:"fetch",meta:o.fetchOptions?.meta});const a=e=>{(0,i.isCancelledError)(e)&&e.silent||this.#o({type:"error",error:e}),(0,i.isCancelledError)(e)||(this.#v.config.onError?.(e,this),this.#v.config.onSettled?.(this.state.data,e,this)),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1};return this.#i=(0,i.createRetryer)({initialPromise:t?.initialPromise,fn:o.fetchFn,abort:r.abort.bind(r),onSuccess:e=>{if(void 0===e)return console.error(`Query data cannot be undefined. Please make sure to return a value other than undefined from your query function. Affected query key: ${this.queryHash}`),void a(new Error(`${this.queryHash} data is undefined`));this.setData(e),this.#v.config.onSuccess?.(e,this),this.#v.config.onSettled?.(e,this.state.error,this),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1},onError:a,onFail:(e,t)=>{this.#o({type:"failed",failureCount:e,error:t})},onPause:()=>{this.#o({type:"pause"})},onContinue:()=>{this.#o({type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0}),this.#i.start()}#o(e){this.state=(t=>{switch(e.type){case"failed":return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...t,fetchStatus:"paused"};case"continue":return{...t,fetchStatus:"fetching"};case"fetch":return{...t,...u(t.data,this.options),fetchMeta:e.meta??null};case"success":return{...t,data:e.data,dataUpdateCount:t.dataUpdateCount+1,dataUpdatedAt:e.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const r=e.error;return(0,i.isCancelledError)(r)&&r.revert&&this.#b?{...this.#b,fetchStatus:"idle"}:{...t,error:r,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:"idle",status:"error"};case"invalidate":return{...t,isInvalidated:!0};case"setState":return{...t,...e.state}}})(this.state),s.notifyManager.batch((()=>{this.observers.forEach((e=>{e.onQueryUpdate()})),this.#v.notify({query:this,type:"updated",action:e})}))}};function u(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:(0,i.canFetch)(t.networkMode)?"fetching":"paused",...void 0===e&&{error:null,status:"pending"}}}},"./node_modules/@tanstack/query-core/build/modern/queryCache.js":function(e,t,r){r.r(t),r.d(t,{QueryCache:function(){return a}});var n=r("./node_modules/@tanstack/query-core/build/modern/utils.js"),s=r("./node_modules/@tanstack/query-core/build/modern/query.js"),i=r("./node_modules/@tanstack/query-core/build/modern/notifyManager.js"),o=r("./node_modules/@tanstack/query-core/build/modern/subscribable.js"),a=class extends o.Subscribable{constructor(e={}){super(),this.config=e,this.#q=new Map}#q;build(e,t,r){const i=t.queryKey,o=t.queryHash??(0,n.hashQueryKeyByOptions)(i,t);let a=this.get(o);return a||(a=new s.Query({cache:this,queryKey:i,queryHash:o,options:e.defaultQueryOptions(t),state:r,defaultOptions:e.getQueryDefaults(i)}),this.add(a)),a}add(e){this.#q.has(e.queryHash)||(this.#q.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const t=this.#q.get(e.queryHash);t&&(e.destroy(),t===e&&this.#q.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){i.notifyManager.batch((()=>{this.getAll().forEach((e=>{this.remove(e)}))}))}get(e){return this.#q.get(e)}getAll(){return[...this.#q.values()]}find(e){const t={exact:!0,...e};return this.getAll().find((e=>(0,n.matchQuery)(t,e)))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter((t=>(0,n.matchQuery)(e,t))):t}notify(e){i.notifyManager.batch((()=>{this.listeners.forEach((t=>{t(e)}))}))}onFocus(){i.notifyManager.batch((()=>{this.getAll().forEach((e=>{e.onFocus()}))}))}onOnline(){i.notifyManager.batch((()=>{this.getAll().forEach((e=>{e.onOnline()}))}))}}},"./node_modules/@tanstack/query-core/build/modern/queryClient.js":function(e,t,r){r.r(t),r.d(t,{QueryClient:function(){return l}});var n=r("./node_modules/@tanstack/query-core/build/modern/utils.js"),s=r("./node_modules/@tanstack/query-core/build/modern/queryCache.js"),i=r("./node_modules/@tanstack/query-core/build/modern/mutationCache.js"),o=r("./node_modules/@tanstack/query-core/build/modern/focusManager.js"),a=r("./node_modules/@tanstack/query-core/build/modern/onlineManager.js"),u=r("./node_modules/@tanstack/query-core/build/modern/notifyManager.js"),c=r("./node_modules/@tanstack/query-core/build/modern/infiniteQueryBehavior.js"),l=class{#R;#s;#g;#k;#S;#C;#w;#j;constructor(e={}){this.#R=e.queryCache||new s.QueryCache,this.#s=e.mutationCache||new i.MutationCache,this.#g=e.defaultOptions||{},this.#k=new Map,this.#S=new Map,this.#C=0}mount(){this.#C++,1===this.#C&&(this.#w=o.focusManager.subscribe((async e=>{e&&(await this.resumePausedMutations(),this.#R.onFocus())})),this.#j=a.onlineManager.subscribe((async e=>{e&&(await this.resumePausedMutations(),this.#R.onOnline())})))}unmount(){this.#C--,0===this.#C&&(this.#w?.(),this.#w=void 0,this.#j?.(),this.#j=void 0)}isFetching(e){return this.#R.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#s.findAll({...e,status:"pending"}).length}getQueryData(e){const t=this.defaultQueryOptions({queryKey:e});return this.#R.get(t.queryHash)?.state.data}ensureQueryData(e){const t=this.getQueryData(e.queryKey);if(void 0===t)return this.fetchQuery(e);{const r=this.defaultQueryOptions(e),s=this.#R.build(this,r);return e.revalidateIfStale&&s.isStaleByTime((0,n.resolveStaleTime)(r.staleTime,s))&&this.prefetchQuery(r),Promise.resolve(t)}}getQueriesData(e){return this.#R.findAll(e).map((({queryKey:e,state:t})=>[e,t.data]))}setQueryData(e,t,r){const s=this.defaultQueryOptions({queryKey:e}),i=this.#R.get(s.queryHash),o=i?.state.data,a=(0,n.functionalUpdate)(t,o);if(void 0!==a)return this.#R.build(this,s).setData(a,{...r,manual:!0})}setQueriesData(e,t,r){return u.notifyManager.batch((()=>this.#R.findAll(e).map((({queryKey:e})=>[e,this.setQueryData(e,t,r)]))))}getQueryState(e){const t=this.defaultQueryOptions({queryKey:e});return this.#R.get(t.queryHash)?.state}removeQueries(e){const t=this.#R;u.notifyManager.batch((()=>{t.findAll(e).forEach((e=>{t.remove(e)}))}))}resetQueries(e,t){const r=this.#R,n={type:"active",...e};return u.notifyManager.batch((()=>(r.findAll(e).forEach((e=>{e.reset()})),this.refetchQueries(n,t))))}cancelQueries(e={},t={}){const r={revert:!0,...t},s=u.notifyManager.batch((()=>this.#R.findAll(e).map((e=>e.cancel(r)))));return Promise.all(s).then(n.noop).catch(n.noop)}invalidateQueries(e={},t={}){return u.notifyManager.batch((()=>{if(this.#R.findAll(e).forEach((e=>{e.invalidate()})),"none"===e.refetchType)return Promise.resolve();const r={...e,type:e.refetchType??e.type??"active"};return this.refetchQueries(r,t)}))}refetchQueries(e={},t){const r={...t,cancelRefetch:t?.cancelRefetch??!0},s=u.notifyManager.batch((()=>this.#R.findAll(e).filter((e=>!e.isDisabled())).map((e=>{let t=e.fetch(void 0,r);return r.throwOnError||(t=t.catch(n.noop)),"paused"===e.state.fetchStatus?Promise.resolve():t}))));return Promise.all(s).then(n.noop)}fetchQuery(e){const t=this.defaultQueryOptions(e);void 0===t.retry&&(t.retry=!1);const r=this.#R.build(this,t);return r.isStaleByTime((0,n.resolveStaleTime)(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(n.noop).catch(n.noop)}fetchInfiniteQuery(e){return e.behavior=(0,c.infiniteQueryBehavior)(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(n.noop).catch(n.noop)}resumePausedMutations(){return a.onlineManager.isOnline()?this.#s.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#R}getMutationCache(){return this.#s}getDefaultOptions(){return this.#g}setDefaultOptions(e){this.#g=e}setQueryDefaults(e,t){this.#k.set((0,n.hashKey)(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...this.#k.values()];let r={};return t.forEach((t=>{(0,n.partialMatchKey)(e,t.queryKey)&&(r={...r,...t.defaultOptions})})),r}setMutationDefaults(e,t){this.#S.set((0,n.hashKey)(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...this.#S.values()];let r={};return t.forEach((t=>{(0,n.partialMatchKey)(e,t.mutationKey)&&(r={...r,...t.defaultOptions})})),r}defaultQueryOptions(e){if(e._defaulted)return e;const t={...this.#g.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=(0,n.hashQueryKeyByOptions)(t.queryKey,t)),void 0===t.refetchOnReconnect&&(t.refetchOnReconnect="always"!==t.networkMode),void 0===t.throwOnError&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),!0!==t.enabled&&t.queryFn===n.skipToken&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#g.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#R.clear(),this.#s.clear()}}},"./node_modules/@tanstack/query-core/build/modern/queryObserver.js":function(e,t,r){r.r(t),r.d(t,{QueryObserver:function(){return u}});var n=r("./node_modules/@tanstack/query-core/build/modern/utils.js"),s=r("./node_modules/@tanstack/query-core/build/modern/notifyManager.js"),i=r("./node_modules/@tanstack/query-core/build/modern/focusManager.js"),o=r("./node_modules/@tanstack/query-core/build/modern/subscribable.js"),a=r("./node_modules/@tanstack/query-core/build/modern/query.js"),u=class extends o.Subscribable{constructor(e,t){super(),this.options=t,this.#c=e,this.#P=null,this.bindMethods(),this.setOptions(t)}#c;#Q=void 0;#_=void 0;#l=void 0;#E;#M;#P;#F;#T;#x;#D;#I;#A;#U=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){1===this.listeners.size&&(this.#Q.addObserver(this),c(this.#Q,this.options)?this.#K():this.updateResult(),this.#B())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return l(this.#Q,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return l(this.#Q,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#N(),this.#L(),this.#Q.removeObserver(this)}setOptions(e,t){const r=this.options,s=this.#Q;if(this.options=this.#c.defaultQueryOptions(e),void 0!==this.options.enabled&&"boolean"!=typeof this.options.enabled&&"function"!=typeof this.options.enabled&&"boolean"!=typeof(0,n.resolveEnabled)(this.options.enabled,this.#Q))throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#$(),this.#Q.setOptions(this.options),r._defaulted&&!(0,n.shallowEqualObjects)(this.options,r)&&this.#c.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#Q,observer:this});const i=this.hasListeners();i&&d(this.#Q,s,this.options,r)&&this.#K(),this.updateResult(t),!i||this.#Q===s&&(0,n.resolveEnabled)(this.options.enabled,this.#Q)===(0,n.resolveEnabled)(r.enabled,this.#Q)&&(0,n.resolveStaleTime)(this.options.staleTime,this.#Q)===(0,n.resolveStaleTime)(r.staleTime,this.#Q)||this.#H();const o=this.#W();!i||this.#Q===s&&(0,n.resolveEnabled)(this.options.enabled,this.#Q)===(0,n.resolveEnabled)(r.enabled,this.#Q)&&o===this.#A||this.#G(o)}getOptimisticResult(e){const t=this.#c.getQueryCache().build(this.#c,e),r=this.createResult(t,e);return s=this,i=r,!(0,n.shallowEqualObjects)(s.getCurrentResult(),i)&&(this.#l=r,this.#M=this.options,this.#E=this.#Q.state),r;var s,i}getCurrentResult(){return this.#l}trackResult(e,t){const r={};return Object.keys(e).forEach((n=>{Object.defineProperty(r,n,{configurable:!1,enumerable:!0,get:()=>(this.trackProp(n),t?.(n),e[n])})})),r}trackProp(e){this.#U.add(e)}getCurrentQuery(){return this.#Q}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const t=this.#c.defaultQueryOptions(e),r=this.#c.getQueryCache().build(this.#c,t);return r.isFetchingOptimistic=!0,r.fetch().then((()=>this.createResult(r,t)))}fetch(e){return this.#K({...e,cancelRefetch:e.cancelRefetch??!0}).then((()=>(this.updateResult(),this.#l)))}#K(e){this.#$();let t=this.#Q.fetch(this.options,e);return e?.throwOnError||(t=t.catch(n.noop)),t}#H(){this.#N();const e=(0,n.resolveStaleTime)(this.options.staleTime,this.#Q);if(n.isServer||this.#l.isStale||!(0,n.isValidTimeout)(e))return;const t=(0,n.timeUntilStale)(this.#l.dataUpdatedAt,e)+1;this.#D=setTimeout((()=>{this.#l.isStale||this.updateResult()}),t)}#W(){return("function"==typeof this.options.refetchInterval?this.options.refetchInterval(this.#Q):this.options.refetchInterval)??!1}#G(e){this.#L(),this.#A=e,!n.isServer&&!1!==(0,n.resolveEnabled)(this.options.enabled,this.#Q)&&(0,n.isValidTimeout)(this.#A)&&0!==this.#A&&(this.#I=setInterval((()=>{(this.options.refetchIntervalInBackground||i.focusManager.isFocused())&&this.#K()}),this.#A))}#B(){this.#H(),this.#G(this.#W())}#N(){this.#D&&(clearTimeout(this.#D),this.#D=void 0)}#L(){this.#I&&(clearInterval(this.#I),this.#I=void 0)}createResult(e,t){const r=this.#Q,s=this.options,i=this.#l,o=this.#E,u=this.#M,l=e!==r?e.state:this.#_,{state:f}=e;let y,p={...f},m=!1;if(t._optimisticResults){const n=this.hasListeners(),i=!n&&c(e,t),o=n&&d(e,r,t,s);(i||o)&&(p={...p,...(0,a.fetchState)(f.data,e.options)}),"isRestoring"===t._optimisticResults&&(p.fetchStatus="idle")}let{error:b,errorUpdatedAt:v,status:g}=p;if(t.select&&void 0!==p.data)if(i&&p.data===o?.data&&t.select===this.#F)y=this.#T;else try{this.#F=t.select,y=t.select(p.data),y=(0,n.replaceData)(i?.data,y,t),this.#T=y,this.#P=null}catch(e){this.#P=e}else y=p.data;if(void 0!==t.placeholderData&&void 0===y&&"pending"===g){let e;if(i?.isPlaceholderData&&t.placeholderData===u?.placeholderData)e=i.data;else if(e="function"==typeof t.placeholderData?t.placeholderData(this.#x?.state.data,this.#x):t.placeholderData,t.select&&void 0!==e)try{e=t.select(e),this.#P=null}catch(e){this.#P=e}void 0!==e&&(g="success",y=(0,n.replaceData)(i?.data,e,t),m=!0)}this.#P&&(b=this.#P,y=this.#T,v=Date.now(),g="error");const O="fetching"===p.fetchStatus,q="pending"===g,R="error"===g,k=q&&O,S=void 0!==y;return{status:g,fetchStatus:p.fetchStatus,isPending:q,isSuccess:"success"===g,isError:R,isInitialLoading:k,isLoading:k,data:y,dataUpdatedAt:p.dataUpdatedAt,error:b,errorUpdatedAt:v,failureCount:p.fetchFailureCount,failureReason:p.fetchFailureReason,errorUpdateCount:p.errorUpdateCount,isFetched:p.dataUpdateCount>0||p.errorUpdateCount>0,isFetchedAfterMount:p.dataUpdateCount>l.dataUpdateCount||p.errorUpdateCount>l.errorUpdateCount,isFetching:O,isRefetching:O&&!q,isLoadingError:R&&!S,isPaused:"paused"===p.fetchStatus,isPlaceholderData:m,isRefetchError:R&&S,isStale:h(e,t),refetch:this.refetch}}updateResult(e){const t=this.#l,r=this.createResult(this.#Q,this.options);if(this.#E=this.#Q.state,this.#M=this.options,void 0!==this.#E.data&&(this.#x=this.#Q),(0,n.shallowEqualObjects)(r,t))return;this.#l=r;const s={};!1!==e?.listeners&&(()=>{if(!t)return!0;const{notifyOnChangeProps:e}=this.options,r="function"==typeof e?e():e;if("all"===r||!r&&!this.#U.size)return!0;const n=new Set(r??this.#U);return this.options.throwOnError&&n.add("error"),Object.keys(this.#l).some((e=>{const r=e;return this.#l[r]!==t[r]&&n.has(r)}))})()&&(s.listeners=!0),this.#y({...s,...e})}#$(){const e=this.#c.getQueryCache().build(this.#c,this.options);if(e===this.#Q)return;const t=this.#Q;this.#Q=e,this.#_=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#B()}#y(e){s.notifyManager.batch((()=>{e.listeners&&this.listeners.forEach((e=>{e(this.#l)})),this.#c.getQueryCache().notify({query:this.#Q,type:"observerResultsUpdated"})}))}};function c(e,t){return function(e,t){return!1!==(0,n.resolveEnabled)(t.enabled,e)&&void 0===e.state.data&&!("error"===e.state.status&&!1===t.retryOnMount)}(e,t)||void 0!==e.state.data&&l(e,t,t.refetchOnMount)}function l(e,t,r){if(!1!==(0,n.resolveEnabled)(t.enabled,e)){const n="function"==typeof r?r(e):r;return"always"===n||!1!==n&&h(e,t)}return!1}function d(e,t,r,s){return(e!==t||!1===(0,n.resolveEnabled)(s.enabled,e))&&(!r.suspense||"error"!==e.state.status)&&h(e,r)}function h(e,t){return!1!==(0,n.resolveEnabled)(t.enabled,e)&&e.isStaleByTime((0,n.resolveStaleTime)(t.staleTime,e))}},"./node_modules/@tanstack/query-core/build/modern/removable.js":function(e,t,r){r.r(t),r.d(t,{Removable:function(){return s}});var n=r("./node_modules/@tanstack/query-core/build/modern/utils.js"),s=class{#z;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),(0,n.isValidTimeout)(this.gcTime)&&(this.#z=setTimeout((()=>{this.optionalRemove()}),this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(n.isServer?1/0:3e5))}clearGcTimeout(){this.#z&&(clearTimeout(this.#z),this.#z=void 0)}}},"./node_modules/@tanstack/query-core/build/modern/retryer.js":function(e,t,r){r.r(t),r.d(t,{CancelledError:function(){return u},canFetch:function(){return a},createRetryer:function(){return l},isCancelledError:function(){return c}});var n=r("./node_modules/@tanstack/query-core/build/modern/focusManager.js"),s=r("./node_modules/@tanstack/query-core/build/modern/onlineManager.js"),i=r("./node_modules/@tanstack/query-core/build/modern/utils.js");function o(e){return Math.min(1e3*2**e,3e4)}function a(e){return"online"!==(e??"online")||s.onlineManager.isOnline()}var u=class{constructor(e){this.revert=e?.revert,this.silent=e?.silent}};function c(e){return e instanceof u}function l(e){let t,r,c,l=!1,d=0,h=!1;const f=new Promise(((e,t)=>{r=e,c=t})),y=()=>n.focusManager.isFocused()&&("always"===e.networkMode||s.onlineManager.isOnline())&&e.canRun(),p=()=>a(e.networkMode)&&e.canRun(),m=n=>{h||(h=!0,e.onSuccess?.(n),t?.(),r(n))},b=r=>{h||(h=!0,e.onError?.(r),t?.(),c(r))},v=()=>new Promise((r=>{t=e=>{(h||y())&&r(e)},e.onPause?.()})).then((()=>{t=void 0,h||e.onContinue?.()})),g=()=>{if(h)return;let t;const r=0===d?e.initialPromise:void 0;try{t=r??e.fn()}catch(e){t=Promise.reject(e)}Promise.resolve(t).then(m).catch((t=>{if(h)return;const r=e.retry??(i.isServer?0:3),n=e.retryDelay??o,s="function"==typeof n?n(d,t):n,a=!0===r||"number"==typeof r&&dy()?void 0:v())).then((()=>{l?b(t):g()}))):b(t)}))};return{promise:f,cancel:t=>{h||(b(new u(t)),e.abort?.())},continue:()=>(t?.(),f),cancelRetry:()=>{l=!0},continueRetry:()=>{l=!1},canStart:p,start:()=>(p()?g():v().then(g),f)}}},"./node_modules/@tanstack/query-core/build/modern/subscribable.js":function(e,t,r){r.r(t),r.d(t,{Subscribable:function(){return n}});var n=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(){}}},"./node_modules/@tanstack/query-core/build/modern/utils.js":function(e,t,r){r.r(t),r.d(t,{addToEnd:function(){return k},addToStart:function(){return S},ensureQueryFn:function(){return w},functionalUpdate:function(){return i},hashKey:function(){return f},hashQueryKeyByOptions:function(){return h},isPlainArray:function(){return b},isPlainObject:function(){return v},isServer:function(){return n},isValidTimeout:function(){return o},keepPreviousData:function(){return R},matchMutation:function(){return d},matchQuery:function(){return l},noop:function(){return s},partialMatchKey:function(){return y},replaceData:function(){return q},replaceEqualDeep:function(){return p},resolveEnabled:function(){return c},resolveStaleTime:function(){return u},shallowEqualObjects:function(){return m},skipToken:function(){return C},sleep:function(){return O},timeUntilStale:function(){return a}});var n="undefined"==typeof window||"Deno"in globalThis;function s(){}function i(e,t){return"function"==typeof e?e(t):e}function o(e){return"number"==typeof e&&e>=0&&e!==1/0}function a(e,t){return Math.max(e+(t||0)-Date.now(),0)}function u(e,t){return"function"==typeof e?e(t):e}function c(e,t){return"function"==typeof e?e(t):e}function l(e,t){const{type:r="all",exact:n,fetchStatus:s,predicate:i,queryKey:o,stale:a}=e;if(o)if(n){if(t.queryHash!==h(o,t.options))return!1}else if(!y(t.queryKey,o))return!1;if("all"!==r){const e=t.isActive();if("active"===r&&!e)return!1;if("inactive"===r&&e)return!1}return!("boolean"==typeof a&&t.isStale()!==a||s&&s!==t.state.fetchStatus||i&&!i(t))}function d(e,t){const{exact:r,status:n,predicate:s,mutationKey:i}=e;if(i){if(!t.options.mutationKey)return!1;if(r){if(f(t.options.mutationKey)!==f(i))return!1}else if(!y(t.options.mutationKey,i))return!1}return!(n&&t.state.status!==n||s&&!s(t))}function h(e,t){return(t?.queryKeyHashFn||f)(e)}function f(e){return JSON.stringify(e,((e,t)=>v(t)?Object.keys(t).sort().reduce(((e,r)=>(e[r]=t[r],e)),{}):t))}function y(e,t){return e===t||typeof e==typeof t&&!(!e||!t||"object"!=typeof e||"object"!=typeof t)&&!Object.keys(t).some((r=>!y(e[r],t[r])))}function p(e,t){if(e===t)return e;const r=b(e)&&b(t);if(r||v(e)&&v(t)){const n=r?e:Object.keys(e),s=n.length,i=r?t:Object.keys(t),o=i.length,a=r?[]:{};let u=0;for(let s=0;s{setTimeout(t,e)}))}function q(e,t,r){return"function"==typeof r.structuralSharing?r.structuralSharing(e,t):!1!==r.structuralSharing?p(e,t):t}function R(e){return e}function k(e,t,r=0){const n=[...e,t];return r&&n.length>r?n.slice(1):n}function S(e,t,r=0){const n=[t,...e];return r&&n.length>r?n.slice(0,-1):n}var C=Symbol(),w=(e,t)=>(e.queryFn===C&&console.error(`Attempted to invoke queryFn when set to skipToken. This is likely a configuration error. Query hash: '${e.queryHash}'`),!e.queryFn&&t?.initialPromise?()=>t.initialPromise:e.queryFn&&e.queryFn!==C?e.queryFn:()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)))},"./node_modules/@tanstack/react-query/build/modern/QueryClientProvider.js":function(e,t,r){r.r(t),r.d(t,{QueryClientContext:function(){return i},QueryClientProvider:function(){return a},useQueryClient:function(){return o}});var n=r("react"),s=r("./node_modules/react/jsx-runtime.js"),i=n.createContext(void 0),o=e=>{const t=n.useContext(i);if(e)return e;if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},a=({client:e,children:t})=>(n.useEffect((()=>(e.mount(),()=>{e.unmount()})),[e]),(0,s.jsx)(i.Provider,{value:e,children:t}))},"./node_modules/@tanstack/react-query/build/modern/QueryErrorResetBoundary.js":function(e,t,r){r.r(t),r.d(t,{QueryErrorResetBoundary:function(){return u},useQueryErrorResetBoundary:function(){return a}});var n=r("react"),s=r("./node_modules/react/jsx-runtime.js");function i(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var o=n.createContext(i()),a=()=>n.useContext(o),u=({children:e})=>{const[t]=n.useState((()=>i()));return(0,s.jsx)(o.Provider,{value:t,children:"function"==typeof e?e(t):e})}},"./node_modules/@tanstack/react-query/build/modern/errorBoundaryUtils.js":function(e,t,r){r.r(t),r.d(t,{ensurePreventErrorBoundaryRetry:function(){return i},getHasError:function(){return a},useClearResetErrorBoundary:function(){return o}});var n=r("react"),s=r("./node_modules/@tanstack/react-query/build/modern/utils.js"),i=(e,t)=>{(e.suspense||e.throwOnError)&&(t.isReset()||(e.retryOnMount=!1))},o=e=>{n.useEffect((()=>{e.clearReset()}),[e])},a=({result:e,errorResetBoundary:t,throwOnError:r,query:n})=>e.isError&&!t.isReset()&&!e.isFetching&&n&&(0,s.shouldThrowError)(r,[e.error,n])},"./node_modules/@tanstack/react-query/build/modern/isRestoring.js":function(e,t,r){r.r(t),r.d(t,{IsRestoringProvider:function(){return o},useIsRestoring:function(){return i}});var n=r("react"),s=n.createContext(!1),i=()=>n.useContext(s),o=s.Provider},"./node_modules/@tanstack/react-query/build/modern/suspense.js":function(e,t,r){r.r(t),r.d(t,{defaultThrowOnError:function(){return n},ensureStaleTime:function(){return s},fetchOptimistic:function(){return a},shouldSuspend:function(){return o},willFetch:function(){return i}});var n=(e,t)=>void 0===t.state.data,s=e=>{e.suspense&&"number"!=typeof e.staleTime&&(e.staleTime=1e3)},i=(e,t)=>e.isLoading&&e.isFetching&&!t,o=(e,t)=>e?.suspense&&t.isPending,a=(e,t,r)=>t.fetchOptimistic(e).catch((()=>{r.clearReset()}))},"./node_modules/@tanstack/react-query/build/modern/useBaseQuery.js":function(e,t,r){r.r(t),r.d(t,{useBaseQuery:function(){return l}});var n=r("react"),s=r("./node_modules/@tanstack/query-core/build/modern/notifyManager.js"),i=r("./node_modules/@tanstack/react-query/build/modern/QueryErrorResetBoundary.js"),o=r("./node_modules/@tanstack/react-query/build/modern/QueryClientProvider.js"),a=r("./node_modules/@tanstack/react-query/build/modern/isRestoring.js"),u=r("./node_modules/@tanstack/react-query/build/modern/errorBoundaryUtils.js"),c=r("./node_modules/@tanstack/react-query/build/modern/suspense.js");function l(e,t,r){if("object"!=typeof e||Array.isArray(e))throw new Error('Bad argument type. Starting with v5, only the "Object" form is allowed when calling query related functions. Please use the error stack to find the culprit call. More info here: https://tanstack.com/query/latest/docs/react/guides/migrating-to-v5#supports-a-single-signature-one-object');const l=(0,o.useQueryClient)(r),d=(0,a.useIsRestoring)(),h=(0,i.useQueryErrorResetBoundary)(),f=l.defaultQueryOptions(e);l.getDefaultOptions().queries?._experimental_beforeQuery?.(f),f._optimisticResults=d?"isRestoring":"optimistic",(0,c.ensureStaleTime)(f),(0,u.ensurePreventErrorBoundaryRetry)(f,h),(0,u.useClearResetErrorBoundary)(h);const[y]=n.useState((()=>new t(l,f))),p=y.getOptimisticResult(f);if(n.useSyncExternalStore(n.useCallback((e=>{const t=d?()=>{}:y.subscribe(s.notifyManager.batchCalls(e));return y.updateResult(),t}),[y,d]),(()=>y.getCurrentResult()),(()=>y.getCurrentResult())),n.useEffect((()=>{y.setOptions(f,{listeners:!1})}),[f,y]),(0,c.shouldSuspend)(f,p))throw(0,c.fetchOptimistic)(f,y,h);if((0,u.getHasError)({result:p,errorResetBoundary:h,throwOnError:f.throwOnError,query:l.getQueryCache().get(f.queryHash)}))throw p.error;return l.getDefaultOptions().queries?._experimental_afterQuery?.(f,p),f.notifyOnChangeProps?p:y.trackResult(p)}},"./node_modules/@tanstack/react-query/build/modern/useInfiniteQuery.js":function(e,t,r){r.r(t),r.d(t,{useInfiniteQuery:function(){return i}});var n=r("./node_modules/@tanstack/query-core/build/modern/infiniteQueryObserver.js"),s=r("./node_modules/@tanstack/react-query/build/modern/useBaseQuery.js");function i(e,t){return(0,s.useBaseQuery)(e,n.InfiniteQueryObserver,t)}},"./node_modules/@tanstack/react-query/build/modern/useMutation.js":function(e,t,r){r.r(t),r.d(t,{useMutation:function(){return u}});var n=r("react"),s=r("./node_modules/@tanstack/query-core/build/modern/mutationObserver.js"),i=r("./node_modules/@tanstack/query-core/build/modern/notifyManager.js"),o=r("./node_modules/@tanstack/react-query/build/modern/QueryClientProvider.js"),a=r("./node_modules/@tanstack/react-query/build/modern/utils.js");function u(e,t){const r=(0,o.useQueryClient)(t),[u]=n.useState((()=>new s.MutationObserver(r,e)));n.useEffect((()=>{u.setOptions(e)}),[u,e]);const c=n.useSyncExternalStore(n.useCallback((e=>u.subscribe(i.notifyManager.batchCalls(e))),[u]),(()=>u.getCurrentResult()),(()=>u.getCurrentResult())),l=n.useCallback(((e,t)=>{u.mutate(e,t).catch(a.noop)}),[u]);if(c.error&&(0,a.shouldThrowError)(u.options.throwOnError,[c.error]))throw c.error;return{...c,mutate:l,mutateAsync:c.mutate}}},"./node_modules/@tanstack/react-query/build/modern/useQuery.js":function(e,t,r){r.r(t),r.d(t,{useQuery:function(){return i}});var n=r("./node_modules/@tanstack/query-core/build/modern/queryObserver.js"),s=r("./node_modules/@tanstack/react-query/build/modern/useBaseQuery.js");function i(e,t){return(0,s.useBaseQuery)(e,n.QueryObserver,t)}},"./node_modules/@tanstack/react-query/build/modern/utils.js":function(e,t,r){function n(e,t){return"function"==typeof e?e(...t):!!e}function s(){}r.r(t),r.d(t,{noop:function(){return s},shouldThrowError:function(){return n}})}},t={};function r(n){var s=t[n];if(void 0!==s)return s.exports;var i=t[n]={exports:{}};return e[n](i,i.exports,r),i.exports}r.d=function(e,t){for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};!function(){r.r(n),r.d(n,{QueryClient:function(){return e.QueryClient},QueryClientProvider:function(){return t.QueryClientProvider},createQueryClient:function(){return a},useInfiniteQuery:function(){return s.useInfiniteQuery},useMutation:function(){return i.useMutation},useQuery:function(){return o.useQuery},useQueryClient:function(){return t.useQueryClient}});var e=r("./node_modules/@tanstack/query-core/build/modern/queryClient.js"),t=r("./node_modules/@tanstack/react-query/build/modern/QueryClientProvider.js"),s=r("./node_modules/@tanstack/react-query/build/modern/useInfiniteQuery.js"),i=r("./node_modules/@tanstack/react-query/build/modern/useMutation.js"),o=r("./node_modules/@tanstack/react-query/build/modern/useQuery.js");function a(){return new e.QueryClient({defaultOptions:{queries:{refetchOnWindowFocus:!1,refetchOnReconnect:!1}}})}}(),(window.elementorV2=window.elementorV2||{}).query=n}();1.2.2 - 8th October 2024 - Excluded assets from loading via Spectra for SureForms CPTs. 1.2.1 - 27th September 2024 - Improvement: Hid the chat textbox interface when the user is not authorized. - Improvement: Removed the GPT model parameter for real-time model updates from the middleware. 1.2.0 - 26th July 2024 - Improvement: Switched from the GPT 3.5 Turbo modal to the 4o Mini modal. 1.1.10 - 15th July 2024 - Fix: Resolved an issue with the AI Assistant admin-bar trigger loading order in WordPress 6.6. v1.1.9 - 2nd July 2024 - Improvement: The library's text-domain support has been removed & translation is now managed from the project level. v1.1.8 - 27th June 2024 - Improved security. v1.1.7 - 24th June 2024 - Feature: Added tooltips for icons in the Chat sidebar for improved user experience. - Improvement: Added disconnection status to the settings option to avoid deletion after disconnecting. - Fix: Resolved the empty text glitch that would occur when editing the first message in the chat. - Fix: Resolved PHP warnings in the widget editor for PluginSidebar and PluginSidebarMoreMenuItem. v1.1.6 - 15th May 2024 - Improvement: Added dropdown menu for common Zip AI Assistant actions in the toolbar. - Improvement: Upgraded the `get_credit_server_response` helper function to support data. v1.1.5 - 25th April 2024 - Fix: Copy and Regenerate buttons are now visible by default instead of being displayed on hover. v1.1.4 - 23rd April 2024 - Replaced "AI Assistant" text with a Sparkles icon for clearer visual representation. v1.1.3 - 14th March 2024 - Removed the highlight color for Richtexts. - Replaced ZipWP logo with the AI Sparkle icon for all AI-Assistant-related buttons. - Improved the AI Assistant sidebar UI on the front end. v1.1.2 - 27th February 2024 - Improvement: Added ZipWP API server helper functions to get the current plan. v1.1.1 - 16th February 2024 - Improvement: Added middleware parameter handling for the affiliate ID. - Improvement: Locally loaded Google Fonts for the AI Assistant sidebar. - Fix: Restricted front-end assets for non-admin users. v1.1.0 - 17th January 2024 - Feature: Made the AI Assistant sidebar accessible outside the editor. - Improvement: Added the 'Force Enabled' function to ensure that modules are enabled. v1.0.9 - 11th January 2024 - Improvement: Added middleware parameter handling for the plugin slug. v1.0.8 - 18th December 2023 - Fix: Added compatibility with PHP version 7.0 and above. v1.0.7 - 2nd December 2023 - Improvement: Updated the middleware request and the Zip AI settings that are saved. - Fix: Implemented proper multi-setting updation. v1.0.6 - 30th November 2023 - Improvement: Added a filter to disable the entire library from loading. v1.0.5 - 30th November 2023 - Improvement: Added a new module structure and removed the admin page from Tools. v1.0.4 - 30th November 2023 - Updating `distignore` for composer update compatibility. v1.0.3 - 11th November 2023 - Improvement: Added an option to disable Zip Ai Assistant from the sidebar. v1.0.2 - 9th November 2023 - Improvement: Better one-click command. v1.0.1 - 9th November 2023 - Initial Commit /*! For license information please see editor-v1-adapters.js.LICENSE.txt */ !function(){"use strict";var e={react:function(e){e.exports=window.React}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r](i,i.exports,n),i.exports}n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};!function(){n.r(r),n.d(r,{__privateBlockDataCommand:function(){return a},__privateDispatchReadyEvent:function(){return y},__privateFlushListeners:function(){return E},__privateGetCurrentEditMode:function(){return $},__privateIsRouteActive:function(){return j},__privateListenTo:function(){return h},__privateOpenRoute:function(){return o},__privateRegisterRoute:function(){return i},__privateRunCommand:function(){return t},__privateSetReady:function(){return w},__privateUseIsPreviewMode:function(){return O},__privateUseIsRouteActive:function(){return R},__privateUseListenTo:function(){return P},__privateUseRouteStatus:function(){return C},commandEndEvent:function(){return s},commandStartEvent:function(){return c},editModeChangeEvent:function(){return v},routeCloseEvent:function(){return f},routeOpenEvent:function(){return d},v1ReadyEvent:function(){return l},windowEvent:function(){return m}});var e=n("react");function t(e,t){const n=window;if(!n.$e?.run)return Promise.reject("`$e.run()` is not available");const r=n.$e.run(e,t);return r instanceof Promise?r:(i=r)&&"object"==typeof i&&Object.hasOwn(i,"promise")&&Object.hasOwn(i,"then")&&Object.hasOwn(i,"fail")?(o=r,new Promise(((e,t)=>{o.then(e,t)}))):Promise.resolve(r);var o,i}function o(e){const t=window;if(!t.$e?.route)return Promise.reject("`$e.route()` is not available");try{return Promise.resolve(t.$e.route(e))}catch(e){return Promise.reject(e)}}function i(e){const t=window;if(!t.$e?.routes?.register)return Promise.reject("`$e.routes.register()` is not available");const n=e.split("/");if(n.length<2)return Promise.reject(`\`${e}\` is an invalid route`);const r=n.pop(),o=n.join("/");try{return Promise.resolve(t.$e.routes.register(o,r,(()=>null)))}catch(e){return Promise.reject(e)}}var u=0;function a({command:e,condition:t}){const n=window,r=n.$e?.modules?.hookData?.Dependency;if(!r)return Promise.reject("`$e.modules.hookData.Dependency` is not available");const o=++u,i=new class extends r{getCommand(){return e}getId(){return`${e}--block--${o}`}apply(e){return!t(e)}};try{return Promise.resolve(i.register())}catch(e){return Promise.reject(e)}}var c=e=>({type:"command",name:e,state:"before"}),s=e=>({type:"command",name:e,state:"after"}),d=e=>({type:"route",name:e,state:"open"}),f=e=>({type:"route",name:e,state:"close"}),m=e=>({type:"window-event",name:e}),l=()=>m("elementor/initialized"),v=()=>m("elementor/edit-mode/change"),p=!1;function w(e){p=e}function y(){return function(){const e=window.__elementorEditorV1LoadingPromise;return e||Promise.reject("Elementor Editor V1 is not loaded")}().then((()=>{w(!0),window.dispatchEvent(new CustomEvent("elementor/initialized"))}))}var _=new Map,g=new AbortController;function h(e,t){Array.isArray(e)||(e=[e]);const n=e.map((e=>{const{type:n,name:r}=e;switch(n){case"command":return function(e,t,n){return b(`elementor/commands/run/${t}`,(t=>{"command"===t.type&&t.command===e&&n(t)}))}(r,e.state,t);case"route":return function(e,t,n){return b(`elementor/routes/${t}`,(t=>{"route"===t.type&&t.route.startsWith(e)&&n(t)}))}(r,e.state,t);case"window-event":return b(r,t)}}));return()=>{n.forEach((e=>e()))}}function E(){g.abort(),_.clear(),w(!1),g=new AbortController}function b(e,t){return!_.has(e)&&(_.set(e,[]),function(e){window.addEventListener(e,function(e){return t=>{if(!p)return;const n=function(e){return e instanceof CustomEvent&&e.detail?.command?{type:"command",command:e.detail.command,args:e.detail.args,originalEvent:e}:e instanceof CustomEvent&&e.detail?.route?{type:"route",route:e.detail.route,originalEvent:e}:{type:"window-event",event:e.type,originalEvent:e}}(t);_.get(e)?.forEach((e=>{e(n)}))}}(e),{signal:g.signal})}(e)),_.get(e)?.push(t),()=>{const n=_.get(e);if(!n?.length)return;const r=n.filter((e=>e!==t));_.set(e,r)}}function P(t,n,r=[]){const[o,i]=(0,e.useState)((()=>n()));return(0,e.useEffect)((()=>{const e=()=>i(n());return e(),h(t,e)}),r),o}function j(e){const t=window;return!!t.$e?.routes?.isPartOf(e)}function $(){const e=window;return e.elementor?.channels?.dataEditMode?.request?.("activeMode")}function O(){return P(v(),(()=>"preview"===$()))}function R(e){return P([d(e),f(e)],(()=>j(e)),[e])}function C(e,{blockOnKitRoutes:t=!0,blockOnPreviewMode:n=!0}={}){const r=R(e),o=R("panel/global"),i=O();return{isActive:r&&!(n&&i),isBlocked:n&&i||t&&o}}}(),(window.elementorV2=window.elementorV2||{}).editorV1Adapters=r}();