kiteline 0.3.2 → 0.3.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. package/dist/{auth-CYNu-f_h.mjs → auth-DfYnQl7W.mjs} +6 -2
  2. package/dist/cli.mjs +6 -6
  3. package/dist/{control-BEq2N-wP.mjs → control-B4iYGngw.mjs} +1 -1
  4. package/dist/{control-BpOGsRCZ.mjs → control-BMOIrur6.mjs} +1 -1
  5. package/dist/{devices-command-Bubh46v1.mjs → devices-command-Bv_bsDPa.mjs} +1 -1
  6. package/dist/{package-D0hl72v4.mjs → package-CX75B96-.mjs} +1 -1
  7. package/dist/{pair-command-DHeG-ZsP.mjs → pair-command-DyAaiyGn.mjs} +1 -1
  8. package/dist/{service-Fzh98Meh.mjs → service-pIzAzHWX.mjs} +3 -3
  9. package/dist/{src-DekrqcQL.mjs → src-BIPu215q.mjs} +208 -51
  10. package/dist/web/assets/Check.es-BazDUJ8l.js +1 -0
  11. package/dist/web/assets/{Plus.es-wuLJIFEO.js → Plus.es-BTjK6Adi.js} +1 -1
  12. package/dist/web/assets/{MagnifyingGlass.es-DUOewsuL.js → X.es-BLVrGeYn.js} +1 -1
  13. package/dist/web/assets/composer-D3-nzQwm.js +1 -0
  14. package/dist/web/assets/copy-button-B5-YyZiJ.js +1 -0
  15. package/dist/web/assets/format-qC7-v1aY.js +9 -0
  16. package/dist/web/assets/{index-DA4jO1yh.js → index-DLCIIoKU.js} +3 -3
  17. package/dist/web/assets/index-Dfz5hLiZ.css +1 -0
  18. package/dist/web/assets/lazy/{core-B6TDb-vl.js → core-CU5HQPlE.js} +1 -1
  19. package/dist/web/assets/new-8iHRF9aP.js +1 -0
  20. package/dist/web/assets/prefs-CwnnVOOA.js +1 -0
  21. package/dist/web/assets/routes-BC1QwJvj.js +1 -0
  22. package/dist/web/assets/{s._sessionId-zegjksnG.js → s._sessionId-BH5Oq7PW.js} +8 -8
  23. package/dist/web/assets/{settings-Dvc2znbn.js → settings-CFJIOWmt.js} +1 -1
  24. package/dist/web/assets/{status-D-preq93.js → status-DNclzjzI.js} +1 -1
  25. package/dist/web/index.html +3 -3
  26. package/dist/web/sw.js +1 -1
  27. package/package.json +1 -1
  28. package/dist/web/assets/composer-3-vKn_3C.js +0 -1
  29. package/dist/web/assets/copy-button-CSWEBRJT.js +0 -1
  30. package/dist/web/assets/format-DYOlz7Mf.js +0 -9
  31. package/dist/web/assets/index-BRaZDA7B.css +0 -1
  32. package/dist/web/assets/new-BGVIKCzl.js +0 -1
  33. package/dist/web/assets/prefs-DzSTtEbH.js +0 -1
  34. package/dist/web/assets/routes-DpVY3ZGq.js +0 -1
@@ -0,0 +1,9 @@
1
+ var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t,t.exports),e=null),t.exports),s=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},c=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},l=(n,r,o)=>(o=n==null?{}:e(i(n)),c(r||!n||!n.__esModule||!a.call(n,`default`)?t(o,`default`,{value:n,enumerable:!0}):o,n)),u=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.for(`react.view_transition`),m=Symbol.iterator;function h(e){return typeof e!=`object`||!e?null:(e=m&&e[m]||e[`@@iterator`],typeof e==`function`?e:null)}var g={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,v={};function y(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||g}y.prototype.isReactComponent={},y.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},y.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function b(){}b.prototype=y.prototype;function x(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||g}var S=x.prototype=new b;S.constructor=x,_(S,y.prototype),S.isPureReactComponent=!0;var C=Array.isArray;function w(){}var T={H:null,A:null,T:null,S:null},E=Object.prototype.hasOwnProperty;function D(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function O(e,t){return D(e.type,t,e.props)}function k(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function A(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var j=/\/+/g;function M(e,t){return typeof e==`object`&&e&&e.key!=null?A(``+e.key):t.toString(36)}function ee(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(w,w):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function N(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,N(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+M(e,0):a,C(o)?(i=``,c!=null&&(i=c.replace(j,`$&/`)+`/`),N(o,r,i,``,function(e){return e})):o!=null&&(k(o)&&(o=O(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(j,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(C(e))for(var u=0;u<e.length;u++)a=e[u],s=l+M(a,u),c+=N(a,r,i,s,o);else if(u=h(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+M(a,u++),c+=N(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return N(ee(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return c}function P(e,t,n){if(e==null)return e;var r=[],i=0;return N(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function F(e){if(e._status===-1){var t=e._result,n=t();n.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t,n.status===void 0&&(n.status=`fulfilled`,n.value=t))},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t,n.status===void 0&&(n.status=`rejected`,n.reason=t))}),e._status===-1&&(e._status=0,e._result=n)}if(e._status===1)return e._result.default;throw e._result}var I=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)};function L(e){var t=T.T,n={};n.types=t===null?null:t.types,T.T=n;try{var r=e(),i=T.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(w,I)}catch(e){I(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),T.T=t}}function R(e){var t=T.T;if(t!==null){var n=t.types;n===null?t.types=[e]:n.indexOf(e)===-1&&n.push(e)}else L(R.bind(null,e))}var te={map:P,forEach:function(e,t,n){P(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return P(e,function(){t++}),t},toArray:function(e){return P(e,function(e){return e})||[]},only:function(e){if(!k(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=te,e.Component=y,e.Fragment=r,e.Profiler=a,e.PureComponent=x,e.StrictMode=i,e.Suspense=l,e.ViewTransition=p,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=T,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return T.H.useMemoCache(e)}},e.addTransitionType=R,e.cache=function(e){return function(){return e.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(e,t,n){if(e==null)throw Error(`The argument must be a React element, but you passed `+e+`.`);var r=_({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!E.call(t,a)||a===`key`||a===`__self`||a===`__source`||a===`ref`&&t.ref===void 0||(r[a]=t[a]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];r.children=o}return D(e.type,i,r)},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:o,_context:e},e},e.createElement=function(e,t,n){var r,i={},a=null;if(t!=null)for(r in t.key!==void 0&&(a=``+t.key),t)E.call(t,r)&&r!==`key`&&r!==`__self`&&r!==`__source`&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var s=Array(o),c=0;c<o;c++)s[c]=arguments[c+2];i.children=s}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return D(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=k,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:F}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=L,e.unstable_useCacheRefresh=function(){return T.H.useCacheRefresh()},e.use=function(e){return T.H.use(e)},e.useActionState=function(e,t,n){return T.H.useActionState(e,t,n)},e.useCallback=function(e,t){return T.H.useCallback(e,t)},e.useContext=function(e){return T.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return T.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return T.H.useEffect(e,t)},e.useEffectEvent=function(e){return T.H.useEffectEvent(e)},e.useId=function(){return T.H.useId()},e.useImperativeHandle=function(e,t,n){return T.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return T.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return T.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return T.H.useMemo(e,t)},e.useOptimistic=function(e,t){return T.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return T.H.useReducer(e,t,n)},e.useRef=function(e){return T.H.useRef(e)},e.useState=function(e){return T.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return T.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return T.H.useTransition()},e.version=`19.3.1`})),d=o(((e,t)=>{t.exports=u()})),f=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),p=o(((e,t)=>{t.exports=f()})),m=l(d(),1),h=p(),g=m.createContext(void 0),_=e=>{let t=m.useContext(g);if(e)return e;if(!t)throw Error(`No QueryClient set, use QueryClientProvider to set one`);return t},v=({client:e,children:t})=>(m.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),(0,h.jsx)(g.Provider,{value:e,children:t})),y={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},b=new class{#e=y;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}};function x(e){setTimeout(e,0)}var S=typeof window>`u`||`Deno`in globalThis;function C(){}function w(e,t){return typeof e==`function`?e(t):e}function T(e){return typeof e==`number`&&e>=0&&e!==1/0}function E(e,t){return Math.max(e+(t||0)-Date.now(),0)}function D(e,t){return typeof e==`function`?e(t):e}function O(e,t){let{type:n=`all`,exact:r,fetchStatus:i,predicate:a,queryKey:o,stale:s}=e;if(o){if(r){if(t.queryHash!==A(o,t.options))return!1}else if(!M(t.queryKey,o))return!1}if(n!==`all`){let e=t.isActive();if(n===`active`&&!e||n===`inactive`&&e)return!1}return!(typeof s==`boolean`&&t.isStale()!==s||i&&i!==t.state.fetchStatus||a&&!a(t))}function k(e,t){let{exact:n,status:r,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(n){if(j(t.options.mutationKey)!==j(a))return!1}else if(!M(t.options.mutationKey,a))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function A(e,t){return(t?.queryKeyHashFn||j)(e)}function j(e){return JSON.stringify(e,(e,t)=>I(t)?Object.keys(t).sort().reduce((e,n)=>(e[n]=t[n],e),{}):t)}function M(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(e&&t&&typeof e==`object`&&typeof t==`object`){if(Array.isArray(e)&&Array.isArray(t)){if(t.length>e.length)return!1;for(let n=0;n<t.length;n++)if(!M(e[n],t[n]))return!1;return!0}let n=Object.keys(t);for(let r of n)if(!M(e[r],t[r]))return!1;return!0}return!1}var ee=Object.prototype.hasOwnProperty;function N(e,t,n=0){if(e===t)return e;if(n>500)return t;let r=F(e)&&F(t);if(!r&&!(I(e)&&I(t)))return t;let i=(r?e:Object.keys(e)).length,a=r?t:Object.keys(t),o=a.length,s=r?Array(o):{},c=0;for(let l=0;l<o;l++){let o=r?l:a[l],u=e[o],d=t[o];if(u===d){s[o]=u,(r?l<i:ee.call(e,o))&&c++;continue}if(u===null||d===null||typeof u!=`object`||typeof d!=`object`){s[o]=d;continue}let f=N(u,d,n+1);s[o]=f,f===u&&c++}return i===o&&c===i?e:s}function P(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e)if(e[n]!==t[n])return!1;return!0}function F(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function I(e){if(!L(e))return!1;let t=Object.getPrototypeOf(e),n=t?.constructor;if(n===void 0)return!0;if(typeof n!=`function`)return!1;let r=n.prototype;return!(!L(r)||!r.hasOwnProperty(`isPrototypeOf`)||t!==Object.prototype)}function L(e){return Object.prototype.toString.call(e)===`[object Object]`}function R(e){return new Promise(t=>{b.setTimeout(t,e)})}function te(e,t,n){return typeof n.structuralSharing==`function`?n.structuralSharing(e,t):n.structuralSharing===!1?t:N(e,t)}function ne(e,t,n=0){let r=[...e,t];return n&&r.length>n?r.slice(1):r}function re(e,t,n=0){let r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var z=Symbol();function B(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===z?()=>Promise.reject(Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function ie(e,t){return typeof e==`function`?e(...t):!!e}function ae(e,t,n){let r=!1,i;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(i??=t(),r||(r=!0,i.aborted?n():i.addEventListener(`abort`,n,{once:!0})),i)}),e}var V=()=>S,oe=()=>V(),se=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(){}},H=new class extends se{#e;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e();return window.addEventListener(`visibilitychange`,t,!1),()=>{window.removeEventListener(`visibilitychange`,t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(e=>{typeof e==`boolean`?this.setFocused(e):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){let e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e==`boolean`?this.#e:globalThis.document?.visibilityState!==`hidden`}},ce=x;function U(){let e=[],t=0,n=e=>{e()},r=e=>{e()},i=ce,a=r=>{t?e.push(r):i(()=>{n(r)})},o=()=>{let t=e;e=[],t.length&&i(()=>{r(()=>{t.forEach(e=>{n(e)})})})};return{batch:e=>{let n;t++;try{n=e()}finally{t--,t||o()}return n},batchCalls:e=>(...t)=>{a(()=>{e(...t)})},schedule:a,setNotifyFunction:e=>{n=e},setBatchNotifyFunction:e=>{r=e},setScheduler:e=>{i=e}}}var W=U(),le=new class extends se{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e(!0),n=()=>e(!1);return window.addEventListener(`online`,t,!1),window.addEventListener(`offline`,n,!1),()=>{window.removeEventListener(`online`,t),window.removeEventListener(`offline`,n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(t=>{t(e)}))}isOnline(){return this.#e}};function ue(e){return Math.min(1e3*2**e,3e4)}function de(e){return(e??`online`)!==`online`||le.isOnline()}var fe=class extends Error{constructor(e){super(`CancelledError`),this.revert=e?.revert,this.silent=e?.silent}};function pe(e){let t=!1,n=0,r,i=`pending`,a,o,s=new Promise((e,t)=>{a=e,o=t});s.catch(C);let c=()=>i!==`pending`,l=t=>{if(!c()){let n=new fe(t);h(n),e.onCancel?.(n)}},u=()=>{t=!0},d=()=>{t=!1},f=()=>H.isFocused()&&(e.networkMode===`always`||le.isOnline())&&e.canRun(),p=()=>de(e.networkMode)&&e.canRun(),m=e=>{c()||(r?.(),i=`resolved`,a(e))},h=e=>{c()||(r?.(),i=`rejected`,o(e))},g=t=>new Promise(n=>{r=e=>{(c()||t())&&n(e)},e.onPause?.()}).then(()=>{r=void 0,c()||e.onContinue?.()}),_=()=>{if(c())return;let r,i=n===0?e.initialPromise:void 0;try{r=i??e.fn()}catch(e){r=Promise.reject(e)}Promise.resolve(r).then(m).catch(r=>{if(c())return;let i=e.retry??(oe()?0:3),a=e.retryDelay??ue,o=typeof a==`function`?a(n,r):a,s=i===!0||typeof i==`number`&&n<i||typeof i==`function`&&i(n,r);t||!s?h(r):(n++,e.onFail?.(n,r),R(o).then(()=>f()?void 0:g(f)).then(()=>{t?h(r):_()}))})};return{promise:s,status:()=>i,cancel:l,continue:()=>(r?.(),s),cancelRetry:u,continueRetry:d,canStart:p,start:()=>(p()?_():g(p).then(_),s)}}var me=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),T(this.gcTime)&&(this.#e=b.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(oe()?1/0:3e5))}clearGcTimeout(){this.#e!==void 0&&(b.clearTimeout(this.#e),this.#e=void 0)}};function he(e){return{onFetch:(t,n)=>{let r=t.options,i=t.fetchOptions?.meta?.fetchMore?.direction,a=t.state.data?.pages||[],o=t.state.data?.pageParams||[],s={pages:[],pageParams:[]},c=0,l=async()=>{let n=!1,l=e=>{ae(e,()=>t.signal,()=>n=!0)},u=B(t.options,t.fetchOptions),d=async(e,r,i)=>{if(n)return Promise.reject(t.signal.reason);if(r==null&&e.pages.length)return Promise.resolve(e);let a=(()=>{let e={client:t.client,queryKey:t.queryKey,pageParam:r,direction:i?`backward`:`forward`,meta:t.options.meta};return l(e),e})(),o=await u(a),{maxPages:s}=t.options,c=i?re:ne;return{pages:c(e.pages,o,s),pageParams:c(e.pageParams,r,s)}};if(i&&a.length){let e=i===`backward`,t=e?_e:ge,n={pages:a,pageParams:o};s=await d(n,t(r,n),e)}else{let t=e??a.length;do{let e=c===0?o[0]===void 0?r.initialPageParam:o[0]:ge(r,s);if(c>0&&e==null)break;s=await d(s,e),c++}while(c<t)}return s};t.fetchFn=t.options.persister?()=>t.options.persister?.(l,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):l}}}function ge(e,{pages:t,pageParams:n}){let r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function _e(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var ve=class extends me{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e){super(),this.#s=!1,this.#o=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#i=e.client,this.#r=this.#i.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#t=G(this.options),this.state=e.state??this.#t,this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return this.#e}get promise(){return this.#a?.promise}setOptions(e){if(this.options={...this.#o,...e},e?._type&&(this.#e=e._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){let e=G(this.options);e.data!==void 0&&(this.setState(be(e.data,e.dataUpdatedAt)),this.#t=e)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus===`idle`&&this.#r.remove(this)}setData(e,t){let n=te(this.state.data,e,this.options);return this.#c({data:n,type:`success`,dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e){this.#c({type:`setState`,state:e})}cancel(e){let t=this.#a?.promise;return this.#a?.cancel(e),t?t.then(C).catch(C):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#t}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>D(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===z||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0&&this.observers.some(e=>D(e.options.staleTime,this)===`static`)}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e===`static`?!1:this.state.isInvalidated?!0:!E(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(e=>e.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#a?.continue()}onOnline(){this.observers.find(e=>e.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#a?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#r.notify({type:`observerAdded`,query:this,observer:e}))}removeObserver(e){let t=this.observers.indexOf(e);t!==-1&&(this.observers.splice(t,1),this.observers.length||(this.#a&&(this.#s||this.state.fetchStatus===`paused`&&this.state.status===`pending`?this.#a.cancel({revert:!0}):this.#a.cancelRetry()),this.scheduleGc()),this.#r.notify({type:`observerRemoved`,query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#c({type:`invalidate`})}async fetch(e,t){if(this.state.fetchStatus!==`idle`&&this.#a?.status()!==`rejected`){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#a)return this.#a.continueRetry(),this.#a.promise}if(e&&this.setOptions(e),!this.options.queryFn){let e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}let n=new AbortController,r=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(this.#s=!0,n.signal)})},i=()=>{let e=B(this.options,t),n=(()=>{let e={client:this.#i,queryKey:this.queryKey,meta:this.meta};return r(e),e})();return this.#s=!1,this.options.persister?this.options.persister(e,n,this):e(n)},a=(()=>{let e={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#i,state:this.state,fetchFn:i};return r(e),e})();(this.#e===`infinite`?he(this.options.pages):this.options.behavior)?.onFetch(a,this),this.#n=this.state,(this.state.fetchStatus===`idle`||this.state.fetchMeta!==a.fetchOptions?.meta)&&this.#c({type:`fetch`,meta:a.fetchOptions?.meta});let o=this.#a=pe({initialPromise:t?.initialPromise,fn:a.fetchFn,onCancel:e=>{e instanceof fe&&e.revert&&this.setState({...this.#n,fetchStatus:`idle`}),n.abort()},onFail:(e,t)=>{this.#c({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#c({type:`pause`})},onContinue:()=>{this.#c({type:`continue`})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0});try{let e=await o.start();if(e===void 0)throw Error(`${this.queryHash} data is undefined`);return this.setData(e),this.#r.config.onSuccess?.(e,this),this.#r.config.onSettled?.(e,this.state.error,this),e}catch(e){if(e instanceof fe){if(e.silent)return this.#a.promise;if(e.revert){if(this.state.data===void 0)throw e;return this.state.data}}throw this.#c({type:`error`,error:e}),this.#r.config.onError?.(e,this),this.#r.config.onSettled?.(this.state.data,e,this),e}finally{this.#a===o&&(this.#a=void 0),this.scheduleGc()}}#c(e){let t=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,...ye(t.data,this.options),fetchMeta:e.meta??null};case`success`:let n={...t,...be(e.data,e.dataUpdatedAt),dataUpdateCount:t.dataUpdateCount+1,...!e.manual&&{fetchStatus:`idle`,fetchFailureCount:0,fetchFailureReason:null}};return this.#n=e.manual?n:void 0,n;case`error`:let r=e.error;return{...t,error:r,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:`idle`,status:`error`,isInvalidated:!0};case`invalidate`:return{...t,isInvalidated:!0};case`setState`:return{...t,...e.state}}};this.state=t(this.state),W.batch(()=>{this.observers.slice().forEach(e=>{e.onQueryUpdate()}),this.#r.notify({query:this,type:`updated`,action:e})})}};function ye(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:de(t.networkMode)?`fetching`:`paused`,...e===void 0&&{error:null,status:`pending`}}}function be(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:`success`}}function G(e){let t=typeof e.initialData==`function`?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt==`function`?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?`success`:`pending`,fetchStatus:`idle`}}var xe=class extends se{#e;#t=void 0;#n=void 0;#r=void 0;#i;#a;#o;#s;#c;#l;#u;#d;#f;#p=new Set;constructor(e,t){super(),this.options=t,this.#e=e,this.#o=null,this.bindMethods(),this.setOptions(t)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),K(this.#t,this.options)?this.#m():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Ce(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Ce(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#b(),this.#x(),this.#t.removeObserver(this)}setOptions(e){let t=this.options,n=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!=`boolean`&&typeof this.options.enabled!=`function`&&typeof D(this.options.enabled,this.#t)!=`boolean`)throw Error(`Expected enabled to be a boolean or a callback that returns a boolean`);this.#S(),this.#t.setOptions(this.options),t._defaulted&&!P(this.options,t)&&this.#e.getQueryCache().notify({type:`observerOptionsUpdated`,query:this.#t,observer:this});let r=this.hasListeners();r&&we(this.#t,n,this.options,t)&&this.#m(),this.updateResult(),r&&(this.#t!==n||D(this.options.enabled,this.#t)!==D(t.enabled,this.#t)||D(this.options.staleTime,this.#t)!==D(t.staleTime,this.#t))&&this.#g();let i=this.#_();r&&(this.#t!==n||D(this.options.enabled,this.#t)!==D(t.enabled,this.#t)||i!==this.#f)&&this.#v(i)}getOptimisticResult(e){let t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return P(this.getCurrentResult(),n)||(this.#r=n,this.#a=this.options,this.#i=this.#t.state),n}getCurrentResult(){return this.#r}trackResult(e,t){return new Proxy(e,{get:(e,n)=>(this.trackProp(n),t?.(n),Reflect.get(e,n))})}trackProp(e){this.#p.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){let t=this.#e.defaultQueryOptions(e),n=this.#e.getQueryCache().build(this.#e,t),r=()=>{},i,a=new Promise(e=>{i=e,r=this.#e.getQueryCache().subscribe(i=>{i.type===`updated`&&i.query.queryHash===n.queryHash&&n.state.data!==void 0&&(r(),e(this.createResult(n,t)))})});return Promise.race([n.fetch(t).then(()=>{let e=this.createResult(n,t);return i?.(e),e}).finally(()=>{r()}),a])}fetch(e){return this.#m({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#r))}#m(e){this.#S();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(C)),t}#h(e){return!oe()&&D(this.options.enabled,this.#t)!==!1&&T(e)}#g(){this.#b();let e=D(this.options.staleTime,this.#t);if(this.#r.isStale||!this.#h(e))return;let t=E(this.#r.dataUpdatedAt,e)+1;this.#u=b.setTimeout(()=>{this.#r.isStale||this.updateResult()},t)}#_(){return D(this.options.refetchInterval,this.#t)??!1}#v(e){this.#x(),this.#f=e,this.#f!==0&&this.#h(this.#f)&&(this.#d=b.setInterval(()=>{(this.options.refetchIntervalInBackground||H.isFocused())&&this.#m()},this.#f))}#y(){this.#g(),this.#v(this.#_())}#b(){this.#u!==void 0&&(b.clearTimeout(this.#u),this.#u=void 0)}#x(){this.#d!==void 0&&(b.clearInterval(this.#d),this.#d=void 0)}createResult(e,t){let n=this.#t,r=this.options,i=this.#r,a=this.#i,o=this.#a,s=e===n?this.#n:e.state,{state:c}=e,l={...c},u=!1,d;if(t._optimisticResults){let i=this.hasListeners(),a=!i&&K(e,t),o=i&&we(e,n,t,r);(a||o)&&(l={...l,...ye(c.data,e.options)}),t._optimisticResults===`isRestoring`&&(l.fetchStatus=`idle`)}let{error:f,errorUpdatedAt:p,status:m}=l;d=l.data;let h=!1;if(t.placeholderData!==void 0&&d===void 0&&m===`pending`){let e;i?.isPlaceholderData&&t.placeholderData===o?.placeholderData?(e=i.data,h=!0):e=typeof t.placeholderData==`function`?t.placeholderData(this.#l?.state.data,this.#l):t.placeholderData,e!==void 0&&(m=`success`,d=te(i?.data,e,t),u=!0)}if(t.select&&d!==void 0&&!h){if(i&&d===a?.data&&t.select===this.#s)d=this.#c;else try{this.#s=t.select,d=t.select(d),d=te(i?.data,d,t),this.#c=d,this.#o=null}catch(e){this.#o=e}}else d===void 0&&(this.#o=null);this.#o&&(f=this.#o,d=this.#c,p=Date.now(),m=`error`,u=!1);let g=l.fetchStatus===`fetching`,_=m===`pending`,v=m===`error`,y=_&&g,b=d!==void 0;return{status:m,fetchStatus:l.fetchStatus,isPending:_,isSuccess:m===`success`,isError:v,isInitialLoading:y,isLoading:y,data:d,dataUpdatedAt:l.dataUpdatedAt,error:f,errorUpdatedAt:p,failureCount:l.fetchFailureCount,failureReason:l.fetchFailureReason,errorUpdateCount:l.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:l.dataUpdateCount>s.dataUpdateCount||l.errorUpdateCount>s.errorUpdateCount,isFetching:g,isRefetching:g&&!_,isLoadingError:v&&!b,isPaused:l.fetchStatus===`paused`,isPlaceholderData:u,isRefetchError:v&&b,isStale:Te(e,t),refetch:this.refetch,isEnabled:D(t.enabled,e)!==!1}}updateResult(){let e=this.#r,t=this.createResult(this.#t,this.options);if(this.#i=this.#t.state,this.#a=this.options,this.#i.data!==void 0&&(this.#l=this.#t),P(t,e))return;this.#r=t;let n=(()=>{if(!e)return!0;let{notifyOnChangeProps:t}=this.options,n=typeof t==`function`?t():t;if(n===`all`||!n&&!this.#p.size)return!0;let r=new Set(n??this.#p);return this.options.throwOnError&&r.add(`error`),Object.keys(this.#r).some(t=>{let n=t;return this.#r[n]!==e[n]&&r.has(n)})})();W.batch(()=>{n&&this.listeners.forEach(e=>{e(this.#r)}),this.#e.getQueryCache().notify({query:this.#t,type:`observerResultsUpdated`})})}#S(){let e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;let t=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#y()}};function Se(e,t){return D(t.enabled,e)!==!1&&e.state.data===void 0&&(e.state.status!==`error`||D(t.retryOnMount,e)!==!1)}function K(e,t){return Se(e,t)||e.state.data!==void 0&&Ce(e,t,t.refetchOnMount)}function Ce(e,t,n){if(D(t.enabled,e)!==!1&&D(t.staleTime,e)!==`static`){let r=D(n,e);return r===`always`||r!==!1&&Te(e,t)}return!1}function we(e,t,n,r){return(e!==t||D(r.enabled,e)===!1)&&(!n.suspense||e.state.status!==`error`)&&Te(e,n)}function Te(e,t){return D(t.enabled,e)!==!1&&e.isStaleByTime(D(t.staleTime,e))}var Ee=class extends me{#e;#t;#n;#r;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||De(),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.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:`observerAdded`,mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:`observerRemoved`,mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status===`pending`?this.scheduleGc():this.#n.remove(this))}continue(){return this.#r?.continue()??(this.state.status===`pending`?this.execute(this.state.variables):Promise.resolve())}async execute(e){let t=()=>{this.#i({type:`continue`})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey},r=this.#r=pe({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(Error(`No mutationFn found`)),onFail:(e,t)=>{this.#i({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#i({type:`pause`})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)}),i=this.state.status===`pending`,a=!r.canStart();try{if(i)t();else{this.#i({type:`pending`,variables:e,isPaused:a}),this.#n.config.onMutate&&await this.#n.config.onMutate(e,this,n);let t=await this.options.onMutate?.(e,n);t!==this.state.context&&this.#i({type:`pending`,context:t,variables:e,isPaused:a})}let o=await r.start();return await this.#n.config.onSuccess?.(o,e,this.state.context,this,n),await this.options.onSuccess?.(o,e,this.state.context,n),await this.#n.config.onSettled?.(o,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(o,null,e,this.state.context,n),this.#i({type:`success`,data:o}),o}catch(t){try{await this.#n.config.onError?.(t,e,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onError?.(t,e,this.state.context,n)}catch(e){Promise.reject(e)}try{await this.#n.config.onSettled?.(void 0,t,this.state.variables,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onSettled?.(void 0,t,e,this.state.context,n)}catch(e){Promise.reject(e)}throw this.#i({type:`error`,error:t}),t}finally{this.#r===r&&(this.#r=void 0),this.#n.runNext(this)}}#i(e){let t=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=t(this.state),W.batch(()=>{this.#t.forEach(t=>{t.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:`updated`,action:e})})}};function De(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:`idle`,variables:void 0,submittedAt:0}}var Oe=class extends se{#e;#t;#n;constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}build(e,t,n){let r=new Ee({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){this.#e.add(e);let t=ke(e);if(typeof t==`string`){let n=this.#t.get(t);n?n.push(e):this.#t.set(t,[e])}this.notify({type:`added`,mutation:e})}remove(e){if(this.#e.delete(e)){let t=ke(e);if(typeof t==`string`){let n=this.#t.get(t);if(n){if(n.length>1){let t=n.indexOf(e);t!==-1&&n.splice(t,1)}else n[0]===e&&this.#t.delete(t)}}}this.notify({type:`removed`,mutation:e})}canRun(e){let t=ke(e);if(typeof t==`string`){let n=this.#t.get(t)?.find(e=>e.state.status===`pending`);return!n||n===e}return!0}runNext(e){let t=ke(e);return typeof t==`string`?(this.#t.get(t)?.find(t=>t!==e&&t.state.isPaused))?.continue()??Promise.resolve():Promise.resolve()}clear(){W.batch(()=>{let e=this.getAll();this.#e.clear(),this.#t.clear(),e.forEach(e=>{this.notify({type:`removed`,mutation:e})})})}getAll(){return Array.from(this.#e)}find(e){let t={exact:!0,...e};return this.getAll().find(e=>k(t,e))}findAll(e={}){return this.getAll().filter(t=>k(e,t))}notify(e){W.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(e=>e.state.isPaused);return W.batch(()=>Promise.all(e.map(e=>e.continue().catch(C))))}};function ke(e){return e.options.scope?.id}var Ae=class extends se{#e;constructor(e={}){super(),this.config=e,this.#e=new Map}build(e,t,n){let r=t.queryKey,i=t.queryHash??A(r,t),a=this.get(i);return a||(a=new ve({client:e,queryKey:r,queryHash:i,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(a)),a}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:`added`,query:e}))}remove(e){this.#e.get(e.queryHash)===e&&(e.destroy(),this.#e.delete(e.queryHash),this.notify({type:`removed`,query:e}))}clear(){W.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){let t={exact:!0,...e};return this.getAll().find(e=>O(t,e))}findAll(e={}){let t=this.getAll();return Object.keys(e).length>0?t.filter(t=>O(e,t)):t}notify(e){W.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){W.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){W.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},je=class{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e={}){this.#e=e.queryCache||new Ae,this.#t=e.mutationCache||new Oe,this.#n=e.defaultOptions||{},this.#r=new Map,this.#i=new Map,this.#a=0}mount(){this.#a++,this.#a===1&&(this.#o=H.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#s=le.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#a--,this.#a===0&&(this.#o?.(),this.#o=void 0,this.#s?.(),this.#s=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:`fetching`}).length}isMutating(e){return this.#t.findAll({...e,status:`pending`}).length}getQueryData(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){let t=this.defaultQueryOptions(e),n=this.#e.build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(D(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,t,n){let r=this.defaultQueryOptions({queryKey:e}),i=this.#e.get(r.queryHash)?.state.data,a=w(t,i);if(a!==void 0)return this.#e.build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return W.batch(()=>this.#e.findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,n)]))}getQueryState(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){let t=this.#e;W.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){let n=this.#e;return W.batch(()=>{let r=n.findAll(e),i=new Set(r);return r.forEach(e=>{e.reset()}),this.refetchQueries({type:`active`,predicate:e=>i.has(e)},t)})}cancelQueries(e,t={}){let n={revert:!0,...t},r=W.batch(()=>this.#e.findAll(e).map(e=>e.cancel(n)));return Promise.all(r).then(C).catch(C)}invalidateQueries(e,t={}){return W.batch(()=>(this.#e.findAll(e).forEach(e=>{e.invalidate()}),e?.refetchType===`none`?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??`active`},t)))}refetchQueries(e,t={}){let n={...t,cancelRefetch:t.cancelRefetch??!0},r=W.batch(()=>this.#e.findAll(e).filter(e=>!e.isDisabled()&&!e.isStatic()).map(e=>{let t=e.fetch(void 0,n);return n.throwOnError||(t=t.catch(C)),e.state.fetchStatus===`paused`?Promise.resolve():t}));return Promise.all(r).then(C)}async query(e){let t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);let n=this.#e.build(this,t),r=n.isStaleByTime(D(t.staleTime,n))?await n.fetch(t):n.state.data,i=t.select;return i?i(r):r}fetchQuery(e){let t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);let n=this.#e.build(this,t);return n.isStaleByTime(D(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(C).catch(C)}infiniteQuery(e){return e._type=`infinite`,this.query(e)}fetchInfiniteQuery(e){return e._type=`infinite`,this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(C).catch(C)}ensureInfiniteQueryData(e){return e._type=`infinite`,this.ensureQueryData(e)}resumePausedMutations(){return le.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#r.set(j(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let t=[...this.#r.values()],n={};return t.forEach(t=>{M(e,t.queryKey)&&Object.assign(n,t.defaultOptions)}),n}setMutationDefaults(e,t){this.#i.set(j(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let t=[...this.#i.values()],n={};return t.forEach(t=>{M(e,t.mutationKey)&&Object.assign(n,t.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;let t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||=A(t.queryKey,t),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!==`always`),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode=`offlineFirst`),t.queryFn===z&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},Me=m.createContext(!1),Ne=()=>m.useContext(Me);Me.Provider;function Pe(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Fe=m.createContext(Pe()),Ie=()=>m.useContext(Fe),Le=(e,t,n)=>{let r=n?.state.status===`error`&&typeof e.throwOnError==`function`?ie(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||r)&&(t.isReset()||(e.retryOnMount=!1))},Re=e=>{m.useEffect(()=>{e.clearReset()},[e])},q=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||ie(n,[e.error,r])),ze=e=>{if(e.suspense){let t=1e3,n=e=>e===`static`?e:Math.max(e??t,t),r=e.staleTime;e.staleTime=typeof r==`function`?(...e)=>n(r(...e)):n(r),typeof e.gcTime==`number`&&(e.gcTime=Math.max(e.gcTime,t))}},Be=(e,t)=>e?.suspense&&t.isPending,Ve=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function He(e,t,n){let r=Ne(),i=Ie(),a=_(n),o=a.defaultQueryOptions(e),s=a.getQueryCache().get(o.queryHash),c=e.subscribed!==!1;o._optimisticResults=r?`isRestoring`:c?`optimistic`:void 0,ze(o),Le(o,i,s),Re(i);let[l]=m.useState(()=>new t(a,o)),u=l.getOptimisticResult(o),d=!r&&c;if(m.useSyncExternalStore(m.useCallback(e=>{let t=d?l.subscribe(W.batchCalls(e)):C;return l.updateResult(),t},[l,d]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),m.useEffect(()=>{l.setOptions(o)},[o,l]),Be(o,u))throw Ve(o,l,i);if(q({result:u,errorResetBoundary:i,throwOnError:o.throwOnError,query:s,suspense:o.suspense}))throw u.error;return o.notifyOnChangeProps?u:l.trackResult(u)}function Ue(e,t){return He(e,xe,t)}var We=m.createContext(null);function Ge(e){return m.useContext(We)}var Ke=o((e=>{var t=d();function n(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function r(){}var i={d:{f:r,r:function(){throw Error(n(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},a=Symbol.for(`react.portal`),o=Symbol.for(`react.recoverable`),s=Symbol.for(`react.optimistic_key`);function c(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:r==null?null:r===s?s:``+r,children:e,containerInfo:t,implementation:n}}var l=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function u(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,e.browser=function(e){return{$$typeof:o,_reason:e}},e.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(n(299));return c(e,t,null,r)},e.flushSync=function(e){var t=l.T,n=i.p;try{if(l.T=null,i.p=2,e)return e()}finally{l.T=t,i.p=n,i.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,i.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&i.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=u(n,t.crossOrigin),a=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?i.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:a,fetchPriority:o}):n===`script`&&i.d.X(e,{crossOrigin:r,integrity:a,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`){if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=u(t.as,t.crossOrigin);i.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0})}}else t??i.d.M(e)}},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=u(n,t.crossOrigin);i.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`){if(t){var n=u(t.as,t.crossOrigin);i.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0})}else i.d.m(e)}},e.requestFormReset=function(e){i.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return l.H.useFormState(e,t,n)},e.useFormStatus=function(){return l.H.useHostTransitionStatus()},e.version=`19.3.1`})),qe=o(((e,t)=>{function n(){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE==`function`)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=Ke()})),Je=48,J=(e,t=0)=>{let n=new Int32Array(e.length);for(let r=0;r<e.length;r++)n[r]=e.charCodeAt(r)-Je-t;return n},Ye=e=>{let t=new Int32Array(e.length+1);for(let n=0;n<e.length;n++)t[n+1]=t[n]+e[n];return t},Y=e=>{let t=new Int32Array(e.length),n=0;for(let r=0;r<e.length;r++){let i=e.charCodeAt(r)-Je;n+=i>>>1^-(i&1),t[r]=n}return t},Xe=384,Ze=[],Qe=Ye(J(`E0500002005282000000002000150000020021820000011200000003022202000300004200120000200420001200021200301200010400162000010000220021010:2192001200220012000220012000200200200400010200040000000000400200108200110100000022010313000162002000020020012020080213000228200000000082000000000120002000120020020040101020300130001001010`)),$e=Ye(J(`:11111111211111119311546544411119731869:671397415686432441111111111161114151214313433415:78311132233313187211117221449443411141111151152226611131111112212518142224214215421421542142424242516171151615616347111111111197911327451111111111111111111113134714133513411111311111111111111111111112444411111342312715245411117:3`)),et=`@containerabcdefghinlmoprstunderlineviawzccentlignnimatespectuto-colsrowsaglorightnessckdrop-sisbcontrastfiltergrayscalehue-rotateinvertopacityslurrightnessaturateepia-coniclinearpositionradialsizeockurrderttom-belrstxyespacing-xyaretoursorlnt-umnsendspantartainentrasteividerop-shadowurationcorationlay-xyasendillexontromlter-featuresstretchapr-xyayscaleidow-colsrowsue-rotatedentlinesetvert-beringsxyeshadoweiadingftnest-clamp-imageabein-lrstxyskx--b-coniclpositionrsizet-x-y-fromto-fromto-inearfromto-fromto-adialfromto-fromtofromtofromtofromtoblockhinlinew-screenesblockhinlinewbjectpacityrutlinederigin-offsetbelrstxyesrspective-originaceholderioghtng-offsettateundedw-xyz-belrstlreseslr-endspantartaturatecepiahizekewpace-taleroll-xyz-barmpbelrstxyesbelrstxyes-thumbrackadowrink-xyxyartrokeabextora-shadowpckingnsformitionlate-xyz-offsetill-changeoom`,tt=(()=>{let e=Qe.length-1,t=new Int32Array(e);for(let n=e-1;n>=0;n--){let e=1,r=n+1;for(let i=Qe[n];i<Qe[n+1];i++)e+=t[r],r+=t[r];t[n]=e}let n=new Int32Array(Qe[e]),r=0;for(let i=0;i<e;i++){let e=i+1;for(let a=Qe[i];a<Qe[i+1];a++)n[r++]=e,e+=t[e]}return n})(),nt=J(`02000000000000900<=0?000B000F00F00ŏI0J0LNPRTVX0000]_a00000000000000000000000rst0000000zŏ00000000000…ŏ000ˆ0000ŏ0000000000—0000000000000000000000000000000000000000000000000000Ë000000000000000000000Þ000000000000000000ð0000000ø0ùúûüýþÿĀāĂ㥹Ć000000000000000000000000000000000000000000ħ0ĨĪ00000000000000000000ļĽ00000Ŭ000000`,1),rt=Ye(J(`123333359346463635126536711576`)),it=J(`93203242332583253248325D>E?F@03263243255B:032523853:0325B:8GA032542H<C=12727B:0328432553;D>E?3257D>032585:0325B:;0328B:032`),at=J(`012113445661666666789111:5;;;;;;;;444;;;:62999<1161=62>>?61:21@ABCD4446996:64E:::;:?::64:F114GHHIHHHHIHH1HH1HH1HHHHHH::EEJ4444::EE4444441691;644444114244444:;K6666555555555555555999666664444444444444444444444226?6:66644L9M?D:111::::6DE199`),X=Y(`020200202020020020020020020020200200200200200200200002020202001003040106000200200200200200200200200200200200200200200200200200200200200200200200200200200200020020020020020020002020200202002002002002002002002002002020002002020020200220200200200200200200200200200200020020020000200020002000200200200020020020002000200200200020020202002020202000200200020022000200200020020002002000200220002002000200W0Z00020020002002020002002000200g0j0002002000200200020020002002000200200020020002000200002000002002002002002000200020000200002002002002002002002020020020200200200200200200200200202020020020020020020020020002002002020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020002002002002002002000200200200200200200200200200020202020002000200020002002002002000020200200`),ot=(()=>{let e=new Int32Array(319).fill(-1),t=Y(`02422242:222222242224222242442222222422222244442242226224222426222422442462222422622222222626222462242622422622422424242422222222422222222242422222222222222222622442224222222222222224424442262222222222222222222226224222424242422224422422422222`),n=Y(`02222222222222222222202222222222222222222222221422222222222222222222222222222222222Y\\222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222221422222222222222222222222222222222222222Ŀł222222222222222222`);for(let r=0;r<t.length;r++)e[t[r]]=n[r];return e})(),st=`container |break-after- all auto avoid avoid-page column left page right|break-before- all auto avoid avoid-page column left page right|break-inside-a uto void void-column void-page|box-decoration- clone slice|box- border content| contents flow-root hidden table table-caption table-cell table-column table-column-group table-footer-group table-header-group table-row table-row-group| not-sr-only sr-only|float- end left none right start|clear- both end left none right start|isolat e ion-auto|overflow- auto clip hidden scroll visible|overflow-x- auto clip hidden scroll visible|overflow-y- auto clip hidden scroll visible|overscroll- auto contain none|overscroll-x- auto contain none|overscroll-y- auto contain none| absolute fixed relative static sticky| collapse invisible visible|justify- around baseline between center center-safe end end-safe evenly normal start stretch|justify-items- center center-safe end end-safe normal start stretch|justify-self- auto center center-safe end end-safe start stretch|items- baseline baseline-last center center-safe end end-safe start stretch|self- auto baseline baseline-last center center-safe end end-safe start stretch|place-content- around baseline between center center-safe end end-safe evenly start stretch|place-items- baseline center center-safe end end-safe start stretch|place-self- auto center center-safe end end-safe start stretch| antialiased subpixel-antialiased| italic not-italic|normal-nums |ordinal |slashed-zero | lining-nums oldstyle-nums| proportional-nums tabular-nums| diagonal-fractions stacked-fractions| no-underline overline| capitalize lowercase normal-case uppercase|truncate |whitespace- break-spaces normal nowrap pre pre-line pre-wrap|break- all keep normal words|wrap- anywhere break-word normal|hyphens- auto manual none|mix-blend- color color-burn color-dodge darken difference exclusion hard-light hue lighten luminosity multiply normal overlay plus-darker plus-lighter saturation screen soft-light|table- auto fixed|caption- bottom top|backface- hidden visible|appearance- auto none|scheme- dark light light-dark normal only-dark only-light|field-sizing- content fixed|pointer-events- auto none|resize -none -x -y|snap- align-none center end start|snap- always normal|snap- both none x y|snap- mandatory proximity|touch- auto manipulation none|touch-pan- left right x|touch-pan- down up y|touch-pinch-zoom |select- all auto none text|forced-color-adjust- auto none| normal size| baseline bottom middle sub super text-bottom text-top top| bounce none ping pulse spin| auto square video| auto fr max min px|none | auto full px| fixed local scroll|clip- border content padding text|origin- border content padding| bottom bottom-left bottom-right center left left-bottom left-top right right-bottom right-top top top-left top-right| no-repeat repeat repeat-round repeat-space repeat-x repeat-y| auto contain cover|blend- color color-burn color-dodge darken difference exclusion hard-light hue lighten luminosity multiply normal overlay saturation screen soft-light|to- b bl br l r t tl tr| auto dvh fit full lh lvh max min px screen svh| dashed dotted double hidden none solid| collapse separate|px |auto |full | content none strict| inline-size size|layout |paint |style | around baseline between center center-safe end end-safe evenly normal start stretch| alias all-scroll auto cell col-resize context-menu copy crosshair default e-resize ew-resize grab grabbing help move n-resize ne-resize nesw-resize no-drop none not-allowed ns-resize nw-resize nwse-resize pointer progress row-resize s-resize se-resize sw-resize text vertical-text w-resize wait zoom-in zoom-out| dashed dotted double solid wavy| auto from-font|reverse |initial | in in-out initial linear out| col col-reverse row row-reverse| nowrap wrap wrap-reverse| auto initial none| black bold extrabold extralight light medium normal semibold thin| condensed expanded extra-condensed extra-expanded normal semi-condensed semi-expanded ultra-condensed ultra-expanded|flow- col col-dense dense row row-dense| none subgrid| auto dvh dvw fit full lh lvh lvw max min px screen svh svw| block flex grid table| auto dvw fit full lvw max min px screen svw| loose none normal px relaxed snug tight|through |item | inside outside| decimal disc none| auto px| clip-border clip-content clip-fill clip-padding clip-stroke clip-view no-clip| add exclude intersect subtract| alpha luminance match|origin- border content fill padding stroke view|type- alpha luminance| circle ellipse| closest-corner closest-side farthest-corner farthest-side|at- bottom bottom-left bottom-right center left left-bottom left-top right right-bottom right-top top top-left top-right| dvh fit full lh lvh max min none px screen svh| auto dvh dvw fit full lh lvh lvw max min none px screen svh svw| dvw fit full lvw max min none px screen svw| auto dvh dvw fit full lvh lvw max min none prose px svh svw| auto dvh dvw fit full lvh lvw max min none px screen svh svw| contain cover fill none scale-down| first last none| distant dramatic midrange near none normal|inset | full none|3d | auto smooth|gutter- auto both stable| auto none thin| inner none| auto dvh dvw fit full lvh lvw max min px svh svw|base | center end justify left right start| clip ellipsis| balance nowrap pretty wrap| normal tight tighter wide wider widest| cpu gpu none| 3d flat| all colors none opacity shadow transform| discrete normal| full px| auto dvh dvw fit full lvh lvw max min px screen svh svw| auto contents scroll transform`.split(`|`).map(e=>{let t=e.split(` `),n=t.shift();for(let e=0;e<t.length;e++)t[e]=n+t[e];return t}),ct=Y(`0000000000000000000000000000000000000000000000000000000000000262242:6@200000006:240B428:4422400002046044222426220026642642462026224222824220022400000000\\00N222422242222222224062242222222422226264222422222222222222442804222422222222222222222222220<4<0204260002444020204224422`),lt=Y(`ɠ222222222222222222222222222222222222222222222222222222222222˕4222226>6ʰ22ʷʺʷʺʷ42ʴ2ʓ22>621422ɶ222ɹɼɷɺɷɺ22ɱ42222ɨ2ɧ26622ɘɓ244ƸƵ222]d24242ǖǓƚÄȫ2263ȨȥȨ2222222ǣ222222222222222222ǂƽ2ƾƵ2222222422222ƜƑ22222222222222222222144Ŧţ22Ţş222222222222222222222ĸ2ı68ĦģĦɡŰ4Ġ«®ĝ822ĔđĔ2ē2222622`),ut=Y(`02222222222222222222222222222222222222222222222222222222222222222202021422222222CF2200GJ021042222WZ222IL0ad2c10h2222U00X202[^2w0000120zy|}€22ƒ†…:22z22222222222G000q†OVI00000{˜2™<40000Œ›@00000G¦§000ª00000000000000021K¬«00®“000000000000000000000–222›HGH_1¸222½2¾2222ÇÊ000­°2±`),dt=new Int32Array(987),ft=new Int32Array(987),pt=new Int32Array(987),mt=``,ht=new Int32Array(1022);{let e=new Map,t=0,n=0;for(let r=0;r<ct.length;r++)for(let i of st[ut[r]]){let a=e.get(i);a===void 0&&(a=t++,e.set(i,a),ht[a*2]=mt.length,ht[a*2+1]=i.length,mt+=i),dt[n]=ct[r],ft[n]=lt[r],pt[n]=a,n++}}var gt=Y(`0b2N:222@R>F@286¦2@H2D266226FB22B2>BD\\6N22222Z222D222p`),_t=Ye(J(`1::24444432:442:44:44>222222:44:4421322511111311111114`)),vt=Y(`2Š4A;33N=C@H4A;33N=C@<27;83:;8393NQ:3NQʰ222ˉºŴŽ2R2=18cƴÅҜ=cĞÛC1ƈǝȈ:ħ25=11D3A@4=<1;1DEr25;11B3?<6;:371BCn9@7=<8192>2E121@9@EHE@9>2T25511<398454131<=V25511<398454131<=„ƧNž2Đå242L222290000f22500ɛ000ǘ222`),yt=J(`ij`),bt=J(`—`),xt=J(`1`),St={GROUP_COUNT:Xe,customValidatorNames:Ze,edgeStart:Qe,labelStart:$e,labelText:et,edgeTarget:tt,nodeGroup:nt,nodeVlist:ot,vlistPat:rt,vlistOps:it,vlistRef:at,vlistGroup:X,litAnchor:dt,litGroup:ft,litPool:pt,poolOffsets:ht,poolText:mt,adjGid:gt,adjStart:_t,adjTgt:vt,patGid:yt,patTgt:bt,postfixLookupGroups:xt,orderSensitiveModifiers:`* ** after backdrop before details-content file first-letter first-line marker placeholder selection`},Ct=`line`in Error(),wt=-1,Tt=-1,Et=(e,t,n)=>{let r=2166136261;for(let i=t;i<n;i++)r=Math.imul(r^e.charCodeAt(i),16777619);return r},Dt=(e,t,n)=>{let r=n-t,i=Math.imul(r,2654435761)^e.charCodeAt(t);if(r>3){let a=r>>2,o=r>>1;i=Math.imul(i^e.charCodeAt(t+1)<<8^e.charCodeAt(t+2)<<16^e.charCodeAt(t+a),2246822507),i=Math.imul(i^e.charCodeAt(t+o)<<8^e.charCodeAt(t+o+a)<<16^e.charCodeAt(n-3),3266489909),i^=e.charCodeAt(n-2)<<8^e.charCodeAt(n-1)<<16;for(let r=t+3,a=n-4;r<t+8&&r<a;r++,a--)i=Math.imul(i^e.charCodeAt(r)^e.charCodeAt(a)<<8,16777619)}return i^i>>>15},Ot=(e,t,n={})=>{let{GROUP_COUNT:r,edgeStart:i,labelStart:a,labelText:o,edgeTarget:s,nodeGroup:c,nodeVlist:l,vlistPat:u,vlistOps:d,vlistRef:f,vlistGroup:p,litAnchor:m,litGroup:h,litPool:g,poolOffsets:_,poolText:v,adjGid:y,adjStart:b,adjTgt:x,patGid:S,patTgt:C,postfixLookupGroups:w,customValidatorNames:T,orderSensitiveModifiers:E}=e,D=new Int32Array(r).fill(-1);for(let e=0;e<y.length;e++)D[y[e]]=e;let O=0;for(let e=0;e+1<b.length;e++){let t=b[e+1]-b[e];t>O&&(O=t)}let k=32;for(;k<2*(1+O+S.length);)k<<=1;let A=new Int32Array(f.length+1);for(let e=0;e<f.length;e++)A[e+1]=A[e]+u[f[e]+1]-u[f[e]];let j=new Uint8Array(r);for(let e=0;e<w.length;e++)j[w[e]]=1;let M=i.length-1,ee=new Uint8Array(M),N=0,P=!0;for(let e=0;e<m.length;e++){ee[m[e]]=1;let t=_[g[e]*2+1];t>N&&(N=t);let n=v.charCodeAt(_[g[e]*2]);(n===91||n===40)&&(P=!1)}let F=1;for(;F<m.length*2;)F<<=1;let I=new Int32Array(F).fill(-1);for(let e=0;e<m.length;e++){let t=_[g[e]*2],n=(Et(v,t,t+_[g[e]*2+1])^Math.imul(m[e],2654435761)|0)&F-1;for(;I[n]!==-1;)n=n+1&F-1;I[n]=e}let L=(e,t,n,r)=>{let i=(Et(t,n,r)^Math.imul(e,2654435761)|0)&F-1,a=r-n;for(;;){let r=I[i];if(r===-1)return-1;if(m[r]===e&&_[g[r]*2+1]===a){let e=_[g[r]*2],i=!0;for(let r=0;r<a;r++)if(v.charCodeAt(e+r)!==t.charCodeAt(n+r)){i=!1;break}if(i)return h[r]}i=i+1&F-1}},R=n.cacheSize??8192,te=n.prefix??e.prefix??``,ne=te===``?``:te+`:`,re=ne.length,z=(T??[]).map(e=>{let n=t&&t[e];if(!n)throw Error(`cn: missing validator `+e);return n}),B=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,ie=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,ae=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,V=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,oe=0,se=-1,H=-1,ce=-1,U=-1,W=e=>e>=97&&e<=122||e>=65&&e<=90||e>=48&&e<=57||e===95,le=e=>/\s/.test(String.fromCharCode(e)),ue=(e,t,n)=>{if(oe=0,se=-1,n-t<3)return;let r=e.charCodeAt(t),i=e.charCodeAt(n-1);if(r===91&&i===93)oe=1;else if(r===40&&i===41)oe=2;else return;ce=t+1,U=n-1;let a=t+1;if(W(e.charCodeAt(a))){for(a++;a<n-1;){let t=e.charCodeAt(a);if(!W(t)&&t!==45)break;a++}a<n-2&&e.charCodeAt(a)===58&&(se=t+1,H=a,ce=a+1)}},de=(e,t,n,r)=>{if(n-t!==r.length)return!1;for(let n=0;n<r.length;n++)if(e.charCodeAt(t+n)!==r.charCodeAt(n))return!1;return!0},fe=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,pe=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,me=e=>!!e&&!Number.isNaN(Number(e)),he=(e,t,n)=>{if(n-t<11||!de(e,t,t+10,`@container`))return!1;if(e.charCodeAt(t+10)===47)return n-t>=12;let r=e.charCodeAt(t+11);return r===115&&n-t>=17&&de(e,t+10,t+16,`-size/`)||r===110&&n-t>=19&&de(e,t+10,t+18,`-normal/`)},ge=[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2],_e=`length|number|number weight|family-name|position percentage|length size bg-size|image url|shadow|length|family-name|position percentage|length size bg-size|image url|shadow|number weight`.split(`|`).map(e=>e.split(` `)),ve=[2,3,1,0,0,0,4,5,0,0,0,0,0,1,1],ye=(e,t,n,r)=>{if(e>=10){if(e>=25)return z[e-25](t.slice(n,r));let i=e-10;if(oe!==ge[i])return!1;if(se>=0){for(let e of _e[i])if(de(t,se,H,e))return!0;return!1}switch(ve[i]){case 0:return!1;case 1:return!0;case 2:{let e=t.slice(ce,U);return B.test(e)&&!ie.test(e)}case 3:return me(t.slice(ce,U));case 4:return V.test(t.slice(ce,U));default:return ae.test(t.slice(ce,U))}}switch(e){case 0:return!0;case 1:return oe===0;case 2:return oe===1;case 3:return oe===2;case 4:return fe.test(t.slice(n,r));case 5:return me(t.slice(n,r));case 6:{let e=t.slice(n,r);return!!e&&Number.isInteger(Number(e))}case 7:return r>n&&t.charCodeAt(r-1)===37&&me(t.slice(n,r-1));case 8:return pe.test(t.slice(n,r));default:return he(t,n,r)}},be=new Set(typeof E==`string`?E.split(` `):E),G=(e,t,n,r,i,a)=>{let o=Et(t,n,r)^(i?2654435769:0),s=e.get(o);if(s!==void 0)outer:for(let e=0;e<s.length;e++){let a=s[e];if(a.imp===i&&a.k.length===r-n){for(let e=0;e<a.k.length;e++)if(a.k.charCodeAt(e)!==t.charCodeAt(n+e))continue outer;return a.id}}else e.set(o,s=[]);let c=t.slice(n,r),l=a(c);return s.push({k:c,imp:i,id:l}),l},xe=new Map,Se=new Map,K=2,Ce=4096,we=(e,t)=>{let n=[],r=0,i=0,a=0;for(let t=0;t<e.length;t++){let o=e.charCodeAt(t);r===0&&i===0&&o===58?(n.push(e.slice(a,t)),a=t+1):o===91?r++:o===93?r--:o===40?i++:o===41&&i--}n.push(e.slice(a));let o=n[0];if(n.length>1){let e=[],t=[];for(let r of n)r.charCodeAt(0)===91||be.has(r)?(t.length&&(e.push(...t.sort()),t=[]),e.push(r)):t.push(r);t.length&&e.push(...t.sort()),o=e.join(`:`)}let s=t?o+` !`:o,c=Se.get(s);return c===void 0&&Se.set(s,c=K++),c},Te=new Map,Ee=r,De=r+4096,Oe=()=>Ee++,ke=2097152,Ae=8192,je=new Int32Array(Ae),Me=Array(Ae).fill(null),Ne=new Int32Array(Ae),Pe=new Int32Array(Ae),Fe=new Uint8Array(Ae),Ie=0,Le=(e,t,n,r,i,a,o,s)=>{let c=e;if(Me[e]!==null){if(Me[e|1]===null)c=e|1;else if(!(Ie++&3))c=e|Ie>>2&1;else return}Me[c]=t.slice(n,r),je[c]=i,Ne[c]=a,Pe[c]=o,Fe[c]=s},Re=()=>Me.fill(null),q=256,ze=[new Int32Array(q),new Int32Array(q),new Int32Array(q),new Int32Array(q)],[Be,Ve,He,Ue]=ze,We=new Uint8Array(q),Ge=new Uint8Array(q),Ke=()=>{q*=2,ze=ze.map(e=>{let t=new Int32Array(q);return t.set(e),t}),[Be,Ve,He,Ue]=ze;let e=new Uint8Array(q);e.set(We),We=e,Ge=new Uint8Array(q)},qe=64,Je=new Int32Array(qe),J=new Int32Array(qe),Ye=new Int32Array(r),Y=2048,Xe=21,Ze=new Float64Array(Y),Qe=new Int32Array(Y),$e=0,et=(e,t)=>{if(e===0&&t<r)return Ye[t]===$e?1:(Ye[t]=$e,0);let n=e*2097152+t+1,i=Math.imul(n,2654435761)>>>Xe;for(;Qe[i]===$e;){if(Ze[i]===n)return 1;i=i+1&Y-1}return Ze[i]=n,Qe[i]=$e,0},tt=(e,t,n,r,i)=>{if(n-t>=2&&e.charCodeAt(t)===91&&e.charCodeAt(n-1)===93){let r=-1;for(let i=t+1;i<n-1;i++)if(e.charCodeAt(i)===58){r=i;break}return r===-1||r===t+1?wt:G(Te,e,t+1,r,0,Oe)}if(r>=0&&c[r]>=0)return c[r];for(let t=i-1;t>=0;t--){let r=J[t];if(r>n)continue;let i=Je[t],a=n-r;if(ee[i]===1&&a>0&&a<=N){let t=e.charCodeAt(r);if(P===!1||t!==91&&t!==40){let t=L(i,e,r,n);if(t>=0)return t}}let o=l[i];if(o<0)continue;let s=f[o],c=u[s],m=u[s+1];if(c===m)continue;ue(e,r,n);let h=A[o]-c;for(let t=c;t<m;t++)if(ye(d[t],e,r,n))return p[h+t]}return wt},nt=e=>{let t=e.length,n=0,c=0,u=!1;(K>Ce||xe.size>Ce)&&(xe=new Map,Se=new Map,K=2,Re()),Ee>De&&(Te=new Map,Ee=r,Re());let d=0;for(;d<t;){let f=e.charCodeAt(d);if(f===32||f>=9&&f<=13||f>=160&&le(f)){f!==32&&(u=!0),d++;continue}let p=d,m=0;for(;d<t;){if(f=e.charCodeAt(d),f<=32){if(f===32)break;if(f>=9&&f<=13){u=!0;break}}else if(f>=160&&le(f)){u=!0;break}m=Math.imul(m^f,16777619),d++}let h=d,g=h-p;n===q&&Ke();let _=n++;Be[_]=p,Ve[_]=h,c+=g,m^=Math.imul(g,2654435761);let v=m^m>>>15,y=v&8190;{let t=-1;if(je[y]===v&&Me[y]!==null&&Me[y].length===g?t=y:je[y|1]===v&&Me[y|1]!==null&&Me[y|1].length===g&&(t=y|1),t>=0){let n=Me[t],r=!0;for(let t=0;t<g;t++)if(n.charCodeAt(t)!==e.charCodeAt(p+t)){r=!1;break}if(r){He[_]=Ne[t],Ue[_]=Pe[t],We[_]=Fe[t];continue}}}let b=p;if(re!==0){if(h-p<=re||!e.startsWith(ne,p)){He[_]=wt,Le(y,e,p,h,v,wt,0,0);continue}b=p+re}let x=0,S=0,C=-1,w=-1;for(let t=b;t<h;t++){let n=e.charCodeAt(t);if(x===0&&S===0){if(n===58){C=t;continue}if(n===47){w=t;continue}}n===91?x++:n===93?x--:n===40?S++:n===41&&S--}let T=C>=b?C+1:b,E=T,D=h,O=!1,k=0;D>E&&e.charCodeAt(D-1)===33?(O=!0,D--):D>E&&e.charCodeAt(E)===33&&(O=!0,E++,k=1);let A=-1;w>T&&(A=w+k,A>=D&&(A=-1));let M=E;D-E>1&&e.charCodeAt(E)===45&&(M=E+1);let N=0,P=0,F=0,I=-1,L=0;(l[0]>=0||ee[0]===1)&&(Je[0]=0,J[0]=M,L=1);let R=Tt,te=0;for(let t=M;t<D;t++)if(t===A&&(R=P<F?Tt:N,te=L),N!==Tt){let n=e.charCodeAt(t),r=-1;if(P<F)o.charCodeAt(P)===n?(P++,P===F&&(r=N=I)):N=Tt;else{let e=i[N],t=i[N+1],c=Tt;for(let i=e;i<t;i++){let e=a[i];if(o.charCodeAt(e)===n){a[i+1]-e===1?r=c=s[i]:(P=e+1,F=a[i+1],I=s[i],c=N);break}}N=c}if(r>=0&&(l[r]>=0||ee[r]===1)&&t+1<D&&e.charCodeAt(t+1)===45){if(L===qe){qe*=2;let e=new Int32Array(qe);e.set(Je),Je=e;let t=new Int32Array(qe);t.set(J),J=t}Je[L]=r,J[L]=t+2,L++}}A===D&&(R=P<F?Tt:N,te=L);let z=P<F?Tt:N,B,ie=!1;if(A>=0){if(ie=!0,B=tt(e,E,A,R,te),B!==wt&&B<r&&j[B]){let t=tt(e,E,D,z,L);t!==wt&&t!==B&&(B=t,ie=!1)}else B===wt&&(B=tt(e,E,D,z,L),ie=!1)}else B=tt(e,E,D,z,L);let ae=0,V=0;B===wt?He[_]=wt:(V=+!!ie,ae=b>=C?+!!O:G(xe,e,b,C,+!!O,e=>we(e,O)),He[_]=B,We[_]=V,Ue[_]=ae),Le(y,e,p,h,v,B,ae,V)}if(n===0)return``;if(n===1)return Be[0]===0&&Ve[0]===t?e:e.slice(Be[0],Ve[0]);if(n*k>Y){for(;n*k>Y;)Y<<=1,Xe--;Ze=new Float64Array(Y),Qe=new Int32Array(Y)}if(K>=ke||Ee>=ke)throw Error(`cn: too many distinct classes in one merge`);$e=$e+1|0,$e===0&&(Ye.fill(0),Qe.fill(0),$e=1);let f=!1;for(let e=n-1;e>=0;e--){let t=He[e];if(t===wt){Ge[e]=1;continue}let n=Ue[e];if(et(n,t)===1)Ge[e]=0,f=!0;else if(Ge[e]=1,t<r){let r=D[t];if(r>=0)for(let e=b[r];e<b[r+1];e++)et(n,x[e]);if(We[e]&1)for(let e=0;e<S.length;e++)S[e]===t&&et(n,C[e])}}if(!f&&!u&&t===c+n-1)return e;let p=``,m=0;for(;m<n;){if(!Ge[m]){m++;continue}let t=Be[m],r=Ve[m],i=m+1;for(;i<n&&Ge[i]&&Be[i]===r+1&&e.charCodeAt(r)===32;)r=Ve[i],i++;p.length>0&&(p+=` `),p+=e.slice(t,r),m=i}return p},rt=16384,it=new Int32Array(rt*2),at=0,X=1,ot=Object.create(null),st=Object.create(null),ct=new Map,lt=new Map,ut=0,dt=0,ft=()=>{at^=rt,X=X+1|0,dt=0},pt=e=>{let t=ot[e];if(t!==void 0)return t;let n=Dt(e,0,e.length),r=(n&16383)+at,i=it[r]===(n^X)||it[r^rt]===(n^X-1);return i&&(t=st[e],t!==void 0)?(ot[e]=t,t):(t=nt(e),i?(ot[e]=t,++ut>R&&(ut=0,st=ot,ot=Object.create(null),ft())):(it[r]=n^X,++dt>rt&&ft()),t)},mt=e=>{let t=ct.get(e);if(t!==void 0)return t;let n=Dt(e,0,e.length),r=(n&16383)+at,i=it[r]===(n^X)||it[r^rt]===(n^X-1);return i&&(t=lt.get(e),t!==void 0)?(ct.set(e,t),t):(t=nt(e),i?(ct.set(e,t),++ut>R&&(ut=0,lt=ct,ct=new Map,ft())):(it[r]=n^X,++dt>rt&&ft()),t)},ht=e=>{let t=Dt(e,0,e.length),n=(t&16383)+at;return it[n]===(t^X)||it[n^rt]===(t^X-1)||(it[n]=t^X,++dt>rt&&ft(),!1)},gt=R===0?nt:Ct?e=>{let t=ct.get(e);return t===void 0?mt(e):t}:pt;return{merge:function(){return arguments.length===1&&typeof arguments[0]==`string`?gt(arguments[0]):gt(jt.apply(null,arguments))},mergeString:gt,seenBefore:R===0?()=>!1:ht,mergeUncached:nt}},kt=(e,t)=>{if(!e)return``;if(typeof e==`string`)return e;let n=``;if(typeof e.length==`number`&&(!t||Array.isArray(e))){let r=e;for(let e=0;e<r.length;e++){let i=r[e];if(!i)continue;let a=typeof i==`string`?i:kt(i,t);a&&(n&&(n+=` `),n+=a)}return n}if(t){if(typeof e==`number`)return``+e;if(typeof e==`object`)for(let t in e)e[t]&&(n&&(n+=` `),n+=t)}return n},At=(e,t)=>{let n=``;for(let r=0;r<e.length;r++){let i=e[r];if(!i)continue;let a=typeof i==`string`?i:kt(i,t);a&&(n&&(n+=` `),n+=a)}return n},jt=function(){return At(arguments,!1)},Mt=256,Nt=16,Pt=1024,Ft=4096,It=(e,t)=>{let n=t===void 0?()=>!0:t.seenBefore,r=t===void 0?e:t.mergeUncached,i=new Map,a=new Map,o=0,s=null,c=null,l=[],u=[],d=0,f=(t,n,r)=>{c===null&&(c=Array(Ft).fill(``),l=Array(Ft).fill(``),u=Array(Ft).fill(``));let i=Dt(t,0,t.length)&4094;if(c[i]===t&&l[i]===n)return u[i];if(c[i|1]===t&&l[i|1]===n)return u[i|1];let a=e(r?n+` `+t:t),o=c[i]===``?i:i|(c[i|1]===``?1:d++&1);return c[o]=t,l[o]=n,u[o]=a,a},p=(e,t,n,r)=>{let i=0;if(t){if(t!==e.a0)return!1;i=1}if(n){if(n!==(i===0?e.a0:e.a1))return!1;i++}if(r){if(r!==(i===0?e.a0:i===1?e.a1:e.a2))return!1;i++}return i===e.t},m=(e,t)=>{let n=e.a,r=0;for(let e=0;e<t.length;e++){let i=t[e];if(i){if(i!==n[r])return!1;r++}}return r===e.t},h=(t,c)=>{let l=t.length,u=s===null?null:s.n;if(!c){if(u!==null&&m(u,t))return s=u,u.r;if(s!==null&&s!==u&&m(s,t))return s.r}let d=``,p=-1,h=0,g=!1;for(let e=0;e<l;e++){let n=t[e];if(n){if(typeof n!=`string`){if(n=t[e]=kt(n,!0),!n)continue;g=!0}p<0&&(d=n,p=e),h++}}if(h===0)return``;if(h===1)return e(d);if(g){if(u!==null&&m(u,t))return s=u,u.r;if(s!==null&&s!==u&&m(s,t))return s.r}let _=i.get(d);_===void 0&&(_=a.get(d),_!==void 0&&i.set(d,_));let v=null;if(_!==void 0){if(_.skip>0){_.skip--,s=null;let e=d;for(let n=p+1;n<l;n++){let r=t[n];r&&(e+=` `+r)}return f(e,``,!1)}let e=_.e;outer:for(let n=0;n<e.length;n++){let r=e[n];if(r.t!==h)continue;let i=r.a,a=1;for(let e=p+1;e<l;e++){let n=t[e];if(n&&n!==i[a++])continue outer}v=r;break}v!==null&&(_.miss=0)}if(v===null){let s=d,c=[d];for(let e=p+1;e<l;e++){let n=t[e];n&&(s+=` `+n,c.push(n))}if(!n(s))return r(s);v={r:e(s),t:c.length,a0:c[0],a1:c[1],a2:c[2]??``,a:c,n:null},_===void 0?i.set(d,_={e:[],miss:0,skip:0,at:0}):++_.miss>Nt&&(_.miss=Nt,_.skip=Pt,_.e.length=0,_.at=0);let u=_.e;u.length<Mt?u.push(v):(u[_.at]=v,_.at=_.at+1&255),++o>1e3&&(o=0,a=i,i=new Map)}return s!==null&&s!==v&&(s.n=v),s=v,v.r},g=t=>Array.isArray(t)?h(t.slice(),!1):e(kt(t,!0));return function(t,n,r){let a=arguments.length;if((a|1)==3){let e=s;if(e!==null){let i=e.n;if(i!==null&&p(i,t,n,r))return s=i,i.r;if(e!==i&&p(e,t,n,r))return e.r}if(a===2&&typeof n==`string`&&n!==``){let e=i.get(t);if(e!==void 0&&e.skip>0)return e.skip--,s=null,f(n,t,!0)}return h([t,n,r],!0)}if(a===1)return typeof t==`string`?e(t):g(t);let o=s;if(o!==null){let e=o.n;if(e!==null){let t=e.a,n=0,r=!0;for(let e=0;e<a;e++){let i=arguments[e];if(i){if(i!==t[n]){r=!1;break}n++}}if(r&&n===e.t)return s=e,e.r}if(o!==e){let e=o.a,t=0,n=!0;for(let r=0;r<a;r++){let i=arguments[r];if(i){if(i!==e[t]){n=!1;break}t++}}if(n&&t===o.t)return o.r}}let c=[];for(let e=0;e<a;e++)c.push(arguments[e]);return h(c,!0)}},Lt=Ot(St),Rt=It(Lt.mergeString,Lt);Lt.merge;function zt(e){return e[0]??{}}function Bt(e){return Array.isArray(e)?e:e==null?[]:[e]}var Vt=4300,Ht=/^-?(?:0|[1-9]\d*)$/;function Ut(e,t){if(!((e.startsWith(`-`)?e.length-1:e.length)>t||!Ht.test(e)))return BigInt(e)}var Wt=`orpc`,Gt=`@orpc/shared`,Kt=`1.16.1`,qt=class extends Error{constructor(...e){super(...e),this.name=`AbortError`}};function Jt(e){let t;return()=>{if(t)return t.result;let n=e();return t={result:n},n}}function Yt(e){let t=Promise.resolve();return(...n)=>t=t.catch(()=>{}).then(()=>e(...n))}var Xt=2,Zt=`__${Gt}@${Kt}/otel/config__`;function Qt(){return globalThis[Zt]}function $t(e,t={},n){return(Qt()?.tracer)?.startSpan(e,t,n)}function en(e,t,n={}){if(!e)return;let r=tn(t);e.recordException(r),n.signal?.aborted&&n.signal.reason===t||e.setStatus({code:Xt,message:r.message})}function tn(e){if(e instanceof Error){let t={message:e.message,name:e.name,stack:e.stack};return`code`in e&&(typeof e.code==`string`||typeof e.code==`number`)&&(t.code=e.code),t}return{message:String(e)}}async function nn({name:e,context:t,...n},r){let i=Qt()?.tracer;if(!i)return r();let a=async e=>{try{return await r(e)}catch(t){throw en(e,t,n),t}finally{e.end()}};return t?i.startActiveSpan(e,n,t,a):i.startActiveSpan(e,n,a)}async function rn(e,t){let n=Qt();if(!e||!n)return t();let r=n.trace.setSpan(n.context.active(),e);return n.context.with(r,t)}function an(e){return!e||typeof e!=`object`?!1:`next`in e&&typeof e.next==`function`&&Symbol.asyncIterator in e&&typeof e[Symbol.asyncIterator]==`function`}var on=Symbol.asyncDispose??Symbol.for(`asyncDispose`),sn=class{#e=!1;#t=!1;#n;#r;constructor(e,t){this.#n=t,this.#r=Yt(async()=>{if(this.#e)return{done:!0,value:void 0};try{let t=await e();return t.done&&(this.#e=!0),t}catch(e){throw this.#e=!0,e}finally{this.#e&&!this.#t&&(this.#t=!0,await this.#n(`next`))}})}next(){return this.#r()}async return(e){return this.#e=!0,this.#t||(this.#t=!0,await this.#n(`return`)),{done:!0,value:e}}async throw(e){throw this.#e=!0,this.#t||(this.#t=!0,await this.#n(`throw`)),e}async[on](){this.#e=!0,this.#t||(this.#t=!0,await this.#n(`dispose`))}[Symbol.asyncIterator](){return this}};function cn({name:e,...t},n){let r;return new sn(async()=>{r??=$t(e);try{let e=await rn(r,()=>n.next());return r?.addEvent(e.done?`completed`:`yielded`),e}catch(e){throw en(r,e,t),e}},async e=>{try{e!==`next`&&await rn(r,()=>n.return?.())}catch(e){throw en(r,e,t),e}finally{r?.end()}})}function ln(e,t,n){let r=(t,i)=>{let a=e[i];return a?a({...t,next:(e=t)=>r(e,i+1)}):n(t)};return r(t,0)}function un(e){if(e)return JSON.parse(e)}function dn(e){return JSON.stringify(e)}function fn(e){return mn(e)?Object.getPrototypeOf(e)?.constructor:null}function pn(e){if(!e||typeof e!=`object`)return!1;let t=Object.getPrototypeOf(e);return t===Object.prototype||!t||!t.constructor}function mn(e){return!!e&&(typeof e==`object`||typeof e==`function`)}function hn(e,t){let n=e;for(let e of t){if(!mn(n))return;n=n[e]}return n}function gn(e,t,n){t===`__proto__`?Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0}):e[t]=n}function _n(e,t,n){let r=e[t];if(r!==n)return r;let i;if(Array.isArray(r))i=r.slice();else if(pn(r))i={...r};else return r;return gn(e,t,i),i}function vn(e,...t){return typeof e==`function`?e(...t):e}function yn(e){return new Proxy(e,{get(e,t,n){let r=Reflect.get(e,t,n);return t!==`then`||typeof r!=`function`?r:new Proxy(r,{apply(t,n,r){if(r.length!==2||r.some(e=>!xn(e)))return Reflect.apply(t,n,r);let i=!0;r[0].call(n,yn(new Proxy(e,{get:(e,t,n)=>{if(i&&t===`then`)i=!1;else return Reflect.get(e,t,n)}})))}})}})}var bn=/^\s*function\s*\(\)\s*\{\s*\[native code\]\s*\}\s*$/;function xn(e){return typeof e==`function`&&bn.test(e.toString())}var Sn=/^[dgimsuvy]*$/;function Cn(e){return Sn.test(e)&&new Set(e).size===e.length&&!(e.includes(`u`)&&e.includes(`v`))}function wn(e,t){let n,r=0,i=()=>(n===void 0&&(n=new RegExp(e,t),n.lastIndex=r),n);return new Proxy(Object.create(RegExp.prototype),{get(e,t){if(t===Symbol.toStringTag)return`RegExp`;if(n===void 0){if(t===`lastIndex`)return r;if(!(t in RegExp.prototype))return}let a=i(),o=Reflect.get(a,t,a);return typeof o==`function`&&t!==`constructor`?o.bind(a):o},set(e,t,a){if(n===void 0&&t===`lastIndex`)return r=a,!0;let o=i();return Reflect.set(o,t,a,o)},has(e,t){return n===void 0?t===`lastIndex`||t in RegExp.prototype:Reflect.has(n,t)}})}function Tn(e){try{return decodeURIComponent(e)}catch{return e}}var En=`@orpc/client`,Dn=`1.16.1`,On=new Set([`bind`,`valueOf`,`toString`,`toJSON`]),kn={BAD_REQUEST:{status:400,message:`Bad Request`},UNAUTHORIZED:{status:401,message:`Unauthorized`},FORBIDDEN:{status:403,message:`Forbidden`},NOT_FOUND:{status:404,message:`Not Found`},METHOD_NOT_SUPPORTED:{status:405,message:`Method Not Supported`},NOT_ACCEPTABLE:{status:406,message:`Not Acceptable`},TIMEOUT:{status:408,message:`Request Timeout`},CONFLICT:{status:409,message:`Conflict`},PRECONDITION_FAILED:{status:412,message:`Precondition Failed`},PAYLOAD_TOO_LARGE:{status:413,message:`Payload Too Large`},UNSUPPORTED_MEDIA_TYPE:{status:415,message:`Unsupported Media Type`},UNPROCESSABLE_CONTENT:{status:422,message:`Unprocessable Content`},TOO_MANY_REQUESTS:{status:429,message:`Too Many Requests`},CLIENT_CLOSED_REQUEST:{status:499,message:`Client Closed Request`},INTERNAL_SERVER_ERROR:{status:500,message:`Internal Server Error`},NOT_IMPLEMENTED:{status:501,message:`Not Implemented`},BAD_GATEWAY:{status:502,message:`Bad Gateway`},SERVICE_UNAVAILABLE:{status:503,message:`Service Unavailable`},GATEWAY_TIMEOUT:{status:504,message:`Gateway Timeout`}};function An(e,t){return t??kn[e]?.status??500}function jn(e,t){return t||kn[e]?.message||e}var Mn,Nn=class e extends Error{defined;code;status;data;static{let t=Symbol.for(`__${En}@${Dn}/error/ORPC_ERROR_CONSTRUCTORS__`);globalThis[t]??=new WeakSet,Mn=globalThis[t],Mn.add(e)}constructor(e,...t){let n=zt(t);if(n.status!==void 0&&!Fn(n.status))throw Error(`[ORPCError] Invalid error status code.`);let r=jn(e,n.message);super(r,n),this.code=e,this.status=An(e,n.status),this.defined=n.defined??!1,this.data=n.data}toJSON(){return{defined:this.defined,code:this.code,status:this.status,message:this.message,data:this.data}}static[Symbol.hasInstance](e){if(Mn.has(this)){let t=fn(e);if(t&&Mn.has(t))return!0}return super[Symbol.hasInstance](e)}};function Pn(e){return e instanceof Nn?e:new Nn(`INTERNAL_SERVER_ERROR`,{message:`Internal server error`,cause:e})}function Fn(e){return e<200||e>=400}function In(e){if(!pn(e))return!1;let t=[`defined`,`code`,`status`,`message`,`data`];return!Object.keys(e).some(e=>!t.includes(e))&&`defined`in e&&typeof e.defined==`boolean`&&`code`in e&&typeof e.code==`string`&&`status`in e&&typeof e.status==`number`&&Fn(e.status)&&`message`in e&&typeof e.message==`string`}function Ln(e,t={}){return new Nn(e.code,{...t,...e})}var Rn=class extends TypeError{},zn=class extends TypeError{},Bn=class extends Error{data;constructor(e){super(e?.message??`An error event was received`,e),this.data=e?.data}},Vn=/\r\n|\r(?!\n)|\n/,Hn=/(?:\r\n|\r(?!\n)|\n){2}/,Un=/(?:\r\n|\r(?!\n)|\n){2}/g,Wn=13,Gn=10,Kn=32;function qn(e){let t={data:void 0,event:void 0,id:void 0,retry:void 0,comments:[]};for(let n of e.split(Vn)){if(n===``)continue;let e=n.indexOf(`:`),r=e===-1?``:n.slice(n.charCodeAt(e+1)===Kn?e+2:e+1);if(e===0)t.comments.push(r);else switch(e===-1?n:n.slice(0,e)){case`data`:t.data=t.data===void 0?r:`${t.data}
2
+ ${r}`;break;case`event`:t.event=r;break;case`id`:t.id=r;break;case`retry`:{let e=Number.parseInt(r,10);e>=0&&e.toString()===r&&(t.retry=e);break}}}return t}var Jn=class{constructor(e={}){this.options=e}pending=[];tail=``;discardLeadingLF=!1;feed(e){if(e===``||this.discardLeadingLF&&(this.discardLeadingLF=!1,e.charCodeAt(0)===Gn&&(e=e.slice(1),e===``)))return;let t=this.tail+e;if(!Hn.test(t)){this.pending.push(e),this.tail=t.slice(-3);return}this.pending.push(e);let n=this.pending.length===1?e:this.pending.join(``),r=n.length-t.length,i=[],a=0;for(let e of t.matchAll(Un))i.push(n.slice(a,r+e.index)),a=r+e.index+e[0].length;let o=n.slice(a);this.pending.length=0,this.tail=o.slice(-3),o===``?this.discardLeadingLF=e.charCodeAt(e.length-1)===Wn:this.pending.push(o);for(let e of i){let t=qn(e);this.options.onEvent&&this.options.onEvent(t)}}end(){if(this.pending.length!==0)throw new zn(`Event Iterator ended before complete`)}},Yn=class extends TransformStream{constructor(){let e;super({start(t){e=new Jn({onEvent:e=>{t.enqueue(e)}})},transform(t){e.feed(t)},flush(){e.end()}})}},Xn=/\r\n|[\n\r]/,Zn=/\r\n|[\n\r]/g;function Qn(e){return Xn.test(e)}function $n(e){if(Qn(e))throw new Rn(`Event's id must not contain a carriage return or newline character`)}function er(e){if(Qn(e))throw new Rn(`Event's event must not contain a carriage return or newline character`)}function tr(e){if(!Number.isInteger(e)||e<0)throw new Rn(`Event's retry must be a integer and >= 0`)}function nr(e){if(Qn(e))throw new Rn(`Event's comment must not contain a carriage return or newline character`)}function rr(e){return e===void 0?``:`data: ${e.replace(Zn,`
3
+ data: `)}
4
+ `}function ir(e){let t=``;for(let n of e??[])nr(n),t+=`: ${n}
5
+ `;return t}function ar(e){let t=``;return t+=ir(e.comments),e.event!==void 0&&(er(e.event),t+=`event: ${e.event}
6
+ `),e.retry!==void 0&&(tr(e.retry),t+=`retry: ${e.retry}
7
+ `),e.id!==void 0&&($n(e.id),t+=`id: ${e.id}
8
+ `),t+=rr(e.data),t+=`
9
+ `,t}var or=Symbol(`ORPC_EVENT_SOURCE_META`);function sr(e,t){if(t.id===void 0&&t.retry===void 0&&!t.comments?.length)return e;if(t.id!==void 0&&$n(t.id),t.retry!==void 0&&tr(t.retry),t.comments!==void 0)for(let e of t.comments)nr(e);return new Proxy(e,{get(e,n,r){return n===or?t:Reflect.get(e,n,r)}})}function cr(e){return mn(e)?Reflect.get(e,or):void 0}function lr(e,t=`inline`){return`${t}; filename="${e.replace(/[^\x20-\x7E]/g,`_`).replace(/"/g,`\\"`)}"; filename*=utf-8''${encodeURIComponent(e).replace(/['()*]/g,e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`).replace(/%(7C|60|5E)/g,(e,t)=>String.fromCharCode(Number.parseInt(t,16)))}`}function ur(e){let t=e.match(/filename\*=(UTF-8'')?([^;]*)/i);if(t&&typeof t[2]==`string`)return Tn(t[2]);let n=e.match(/filename="((?:\\"|[^"])*)"/i);if(n&&typeof n[1]==`string`)return n[1].replace(/\\"/g,`"`)}function dr(e,t){let n={...e};for(let e in t)Array.isArray(t[e])?n[e]=[...Bt(n[e]),...t[e]]:t[e]!==void 0&&(n[e]=Array.isArray(n[e])?[...n[e],t[e]]:n[e]===void 0?t[e]:[n[e],t[e]]);return n}function fr(e,t){let n=async e=>{let n=await t.error(e);if(n!==e){let t=cr(e);t&&mn(n)&&(n=sr(n,t))}return n};return new sn(async()=>{let{done:r,value:i}=await(async()=>{try{return await e.next()}catch(e){throw await n(e)}})(),a=await t.value(i,r);if(a!==i){let e=cr(i);e&&mn(a)&&(a=sr(a,e))}return{done:r,value:a}},async()=>{try{await e.return?.()}catch(e){throw await n(e)}})}function pr(e){return{...e,context:e.context??{}}}function mr(e,t={}){let n=t.path??[];return yn(new Proxy(async(...[t,r={}])=>await e.call(n,t,pr(r)),{get(r,i){return typeof i!=`string`||On.has(i)?Reflect.get(r,i):mr(e,{...t,path:[...n,i]})}}))}function hr(e,t={}){let n=(e?.pipeThrough(new TextDecoderStream).pipeThrough(new Yn))?.getReader(),r,i=!1;return new sn(async()=>{r??=$t(`consume_event_iterator_stream`);try{for(;;){if(n===void 0)return{done:!0,value:void 0};let{done:e,value:t}=await rn(r,()=>n.read());if(e){if(i)throw new qt(`Stream was cancelled`);return{done:!0,value:void 0}}switch(t.event??(t.data===void 0?void 0:`message`)){case`message`:{let e=un(t.data);return mn(e)&&(e=sr(e,t)),r?.addEvent(`message`),{done:!1,value:e}}case`error`:{let e=new Bn({data:un(t.data)});throw e=sr(e,t),r?.addEvent(`error`),e}case`done`:case`close`:{let e=un(t.data);return mn(e)&&(e=sr(e,t)),r?.addEvent(`done`),{done:!0,value:e}}default:r?.addEvent(`maybe_keepalive`)}}}catch(e){throw e instanceof Bn||en(r,e,t),e}},async e=>{try{e!==`next`&&(i=!0,r?.addEvent(`cancelled`)),await rn(r,()=>n?.cancel())}catch(e){throw en(r,e,t),e}finally{r?.end()}})}function gr(e,t={}){let n=t.eventIteratorKeepAliveEnabled??!0,r=t.eventIteratorKeepAliveInterval??5e3,i=t.eventIteratorKeepAliveComment??``,a=t.eventIteratorInitialCommentEnabled??!0,o=t.eventIteratorInitialComment??``,s=!1,c,l;return new ReadableStream({start(e){l=$t(`stream_event_iterator`),a&&e.enqueue(ar({comments:[o]}))},async pull(t){try{n&&(c=setInterval(()=>{t.enqueue(ar({comments:[i]})),l?.addEvent(`keepalive`)},r));let a=await rn(l,()=>e.next());if(clearInterval(c),s)return;let o=cr(a.value);if(!a.done||a.value!==void 0||o!==void 0){let e=a.done?`done`:`message`;t.enqueue(ar({...o,event:e,data:dn(a.value)})),l?.addEvent(e)}a.done&&(t.close(),l?.end())}catch(e){if(clearInterval(c),s)return;e instanceof Bn?(t.enqueue(ar({...cr(e),event:`error`,data:dn(e.data)})),l?.addEvent(`error`),t.close()):(en(l,e),t.error(e)),l?.end()}},async cancel(){try{s=!0,clearInterval(c),l?.addEvent(`cancelled`),await rn(l,()=>e.return?.())}catch(e){throw en(l,e),e}finally{l?.end()}}}).pipeThrough(new TextEncoderStream)}function _r(e,t={}){return nn({name:`parse_standard_body`,signal:t.signal},async()=>{let n=e.headers.get(`content-disposition`);if(typeof n==`string`){let t=ur(n)??`blob`,r=await e.blob();return new File([r],t,{type:r.type})}let r=e.headers.get(`content-type`);if(!r||r.startsWith(`application/json`))return un(await e.text());if(r.startsWith(`multipart/form-data`))return await e.formData();if(r.startsWith(`application/x-www-form-urlencoded`)){let t=await e.text();return new URLSearchParams(t)}if(r.startsWith(`text/event-stream`))return hr(e.body,t);if(r.startsWith(`text/plain`))return await e.text();let i=await e.blob();return new File([i],`blob`,{type:i.type})})}function vr(e,t,n={}){if(e instanceof ReadableStream)return e;let r=t.get(`content-disposition`);if(t.delete(`content-type`),t.delete(`content-disposition`),e!==void 0)return e instanceof Blob?(t.set(`content-type`,e.type),t.set(`content-length`,e.size.toString()),t.set(`content-disposition`,r??lr(e instanceof File?e.name:`blob`)),e):e instanceof FormData||e instanceof URLSearchParams?e:an(e)?(t.set(`content-type`,`text/event-stream`),gr(e,n)):(t.set(`content-type`,`application/json`),dn(e))}function yr(e,t={}){return e.forEach((e,n)=>{Array.isArray(t[n])?t[n].push(e):t[n]=t[n]===void 0?e:[t[n],e]}),t}function br(e,t=new Headers){for(let[n,r]of Object.entries(e))if(Array.isArray(r))for(let e of r)t.append(n,e);else r!==void 0&&t.append(n,r);return t}function xr(e,t={}){let n=br(e.headers),r=vr(e.body,n,t);return new Request(e.url,{signal:e.signal,method:e.method,headers:n,body:r})}function Sr(e,t={}){return{body:Jt(()=>_r(e,t)),status:e.status,get headers(){let t=yr(e.headers);return Object.defineProperty(this,"headers",{value:t,writable:!0}),t},set headers(e){Object.defineProperty(this,"headers",{value:e,writable:!0})}}}var Cr=class{plugins;constructor(e=[]){this.plugins=[...e].sort((e,t)=>(e.order??0)-(t.order??0))}init(e){for(let t of this.plugins)t.init?.(e)}},wr=class{constructor(e,t,n={}){this.codec=e,this.sender=t,new Cr(n.plugins).init(n),this.interceptors=Bt(n.interceptors),this.clientInterceptors=Bt(n.clientInterceptors)}interceptors;clientInterceptors;call(e,t,n){return nn({name:`${Wt}.${e.join(`/`)}`,signal:n.signal},r=>(r?.setAttribute(`rpc.system`,Wt),r?.setAttribute(`rpc.method`,e.join(`.`)),an(t)&&(t=cn({name:`consume_event_iterator_input`,signal:n.signal},t)),ln(this.interceptors,{...n,path:e,input:t},async({path:e,input:t,...n})=>{let i=Qt(),a,o=i?.trace.getActiveSpan()??r;o&&i&&(a=i?.trace.setSpan(i.context.active(),o));let s=await nn({name:`encode_request`,context:a},()=>this.codec.encode(e,t,n)),c=await ln(this.clientInterceptors,{...n,input:t,path:e,request:s},({input:e,path:t,request:n,...r})=>nn({name:`send_request`,signal:r.signal,context:a},()=>this.sender.call(n,r,t,e))),l=await nn({name:`decode_response`,context:a},()=>this.codec.decode(c,n,e,t));return an(l)?cn({name:`consume_event_iterator_output`,signal:n.signal},l):l})))}},Z={BIGINT:0,DATE:1,NAN:2,UNDEFINED:3,URL:4,REGEXP:5,SET:6,MAP:7},Tr=new Set(Object.values(Z)),Er=/^\/(.*)\/([a-z]*)$/;function Dr(e){return TypeError(`Invalid RPC serialized data: ${e}`)}function Or(e,t,n){return Dr(`type ${e} (${t}) expects ${n}.`)}var kr=class{customSerializers;constructor(e={}){if(this.customSerializers=e.customJsonSerializers??[],this.customSerializers.length!==new Set(this.customSerializers.map(e=>e.type)).size)throw Error(`Custom serializer type must be unique.`)}serialize(e,t=[],n=[],r=[],i=[]){for(let a of this.customSerializers)if(a.condition(e)){let o=this.serialize(a.serialize(e),t,n,r,i);return n.push([a.type,...t]),o}if(e instanceof Blob)return r.push(t),i.push(e),[e,n,r,i];if(typeof e==`bigint`)return n.push([Z.BIGINT,...t]),[e.toString(),n,r,i];if(e instanceof Date)return n.push([Z.DATE,...t]),Number.isNaN(e.getTime())?[null,n,r,i]:[e.toISOString(),n,r,i];if(Number.isNaN(e))return n.push([Z.NAN,...t]),[null,n,r,i];if(e instanceof URL)return n.push([Z.URL,...t]),[e.toString(),n,r,i];if(e instanceof RegExp)return n.push([Z.REGEXP,...t]),[e.toString(),n,r,i];if(e instanceof Set){let a=this.serialize(Array.from(e),t,n,r,i);return n.push([Z.SET,...t]),a}if(e instanceof Map){let a=this.serialize(Array.from(e.entries()),t,n,r,i);return n.push([Z.MAP,...t]),a}if(Array.isArray(e))return[e.map((e,a)=>e===void 0?(n.push([Z.UNDEFINED,...t,a]),null):this.serialize(e,[...t,a],n,r,i)[0]),n,r,i];if(pn(e)){let a={};for(let o in e)(o!==`toJSON`||typeof e[o]!=`function`)&&(a[o]=this.serialize(e[o],[...t,o],n,r,i)[0]);return[a,n,r,i]}return[e,n,r,i]}deserialize(e,t,n,r){let i={data:e},a={data:e};n&&r&&n.forEach((e,t)=>{let n=r(t);if(!(n instanceof Blob))throw Dr(`blob ${t} is not a Blob.`);let o=a,s=i,c=`data`;e.forEach(e=>{if(o=o[c],s=_n(s,c,o),c=e,!Object.hasOwn(s,c))throw Dr(`segment "${c}" does not exist.`)}),s[c]=n});for(let e of t){let t=e[0],n=this.customSerializers.find(e=>e.type===t);if(n===void 0&&!Tr.has(t))continue;let r=a,o=i,s=`data`;for(let t=1;t<e.length;t++)if(r=r[s],o=_n(o,s,r),s=e[t],!Object.hasOwn(o,s))throw Dr(`segment "${s}" does not exist.`);if(n!==void 0){o[s]=n.deserialize(o[s]);continue}let c=o[s];switch(t){case Z.BIGINT:{if(typeof c!=`string`)throw Or(t,`bigint`,`a string`);let e=Ut(c,Vt);if(e===void 0)throw Or(t,`bigint`,`a decimal integer string of at most ${Vt} digits`);o[s]=e;break}case Z.DATE:if(typeof c!=`string`&&c!==null)throw Or(t,`date`,`a string or null`);o[s]=new Date(c??NaN);break;case Z.NAN:if(c!==null)throw Or(t,`nan`,`null`);o[s]=NaN;break;case Z.UNDEFINED:if(c!==null)throw Or(t,`undefined`,`null`);o[s]=void 0;break;case Z.URL:if(typeof c!=`string`)throw Or(t,`url`,`a string`);o[s]=new URL(c);break;case Z.REGEXP:{if(typeof c!=`string`)throw Or(t,`regexp`,`a string`);let e=c.match(Er);if(e===null||!Cn(e[2]))throw Dr(`type ${t} (regexp) expects a "/pattern/flags" string.`);o[s]=wn(e[1],e[2]);break}case Z.SET:if(!Array.isArray(c))throw Or(t,`set`,`an array`);o[s]=new Set(c);break;case Z.MAP:if(!Array.isArray(c))throw Or(t,`map`,`an array`);o[s]=new Map(c)}}return i.data}};function Ar(e){return`/${e.map(encodeURIComponent).join(`/`)}`}function jr(e){return typeof e.forEach==`function`?yr(e):e}function Mr(e){return Object.entries(kn).find(([,t])=>t.status===e)?.[0]??`MALFORMED_ORPC_ERROR_RESPONSE`}var Nr=class{constructor(e,t){this.serializer=e,this.baseUrl=t.url,this.maxUrlLength=t.maxUrlLength??2083,this.fallbackMethod=t.fallbackMethod??`POST`,this.expectedMethod=t.method??this.fallbackMethod,this.headers=t.headers??{}}baseUrl;maxUrlLength;fallbackMethod;expectedMethod;headers;async encode(e,t,n){let r=jr(await vn(this.headers,n,e,t));n.lastEventId!==void 0&&(r=dr(r,{"last-event-id":n.lastEventId}));let i=await vn(this.expectedMethod,n,e,t),a=await vn(this.baseUrl,n,e,t),o=new URL(a);o.pathname=`${o.pathname.replace(/\/$/,``)}${Ar(e)}`;let s=this.serializer.serialize(t);if(i===`GET`&&!(s instanceof FormData)&&!an(s)){let a=await vn(this.maxUrlLength,n,e,t),c=new URL(o);if(c.searchParams.append(`data`,dn(s)),c.toString().length<=a)return{body:void 0,method:i,headers:r,url:c,signal:n.signal}}return{url:o,method:i===`GET`?this.fallbackMethod:i,headers:r,body:s,signal:n.signal}}async decode(e){let t=!Fn(e.status),n=await(async()=>{let t=!1;try{let n=await e.body();return t=!0,this.serializer.deserialize(n)}catch(e){throw Error(t?`Invalid RPC response format.`:`Cannot parse response body, please check the response body and content-type.`,{cause:e})}})();if(!t)throw In(n)?Ln(n):new Nn(Mr(e.status),{status:e.status,data:{...e,body:n}});return n}},Pr=class{constructor(e){this.jsonSerializer=e}serialize(e){return an(e)?fr(e,{value:async e=>this.#e(e,!1),error:async e=>new Bn({data:this.#e(Pn(e).toJSON(),!1),cause:e})}):this.#e(e,!0)}#e(e,t){let[n,r,i,a]=this.jsonSerializer.serialize(e),o=r.length===0?void 0:r;if(!t||a.length===0)return{json:n,meta:o};let s=new FormData;return s.set(`data`,dn({json:n,meta:o,maps:i})),a.forEach((e,t)=>{s.set(t.toString(),e)}),s}deserialize(e){return an(e)?fr(e,{value:async e=>this.#t(e),error:async e=>{if(!(e instanceof Bn))return e;let t=this.#t(e.data);return In(t)?Ln(t,{cause:e}):new Bn({data:t,cause:e})}}):this.#t(e)}#t(e){if(e===void 0)return;if(!(e instanceof FormData))return this.jsonSerializer.deserialize(e.json,e.meta??[]);let t=JSON.parse(e.get(`data`));return this.jsonSerializer.deserialize(t.json,t.meta??[],t.maps,t=>e.get(t.toString()))}},Fr=class extends wr{constructor(e,t){let n=new Nr(new Pr(new kr(t)),t);super(n,e,t)}},Ir=class extends Cr{initRuntimeAdapter(e){for(let t of this.plugins)t.initRuntimeAdapter?.(e)}},Lr=class{fetch;toFetchRequestOptions;adapterInterceptors;constructor(e){new Ir(e.plugins).initRuntimeAdapter(e),this.fetch=e.fetch??globalThis.fetch.bind(globalThis),this.toFetchRequestOptions=e,this.adapterInterceptors=Bt(e.adapterInterceptors)}async call(e,t,n,r){let i=xr(e,this.toFetchRequestOptions);return Sr(await ln(this.adapterInterceptors,{...t,request:i,path:n,input:r,init:{redirect:`manual`}},({request:e,path:t,input:n,init:r,...i})=>this.fetch(e,r,i,t,n)),{signal:i.signal})}},Rr=class extends Fr{constructor(e){let t=new Lr(e);super(t,e)}};function zr(e,t={}){return[e,{...t.input===void 0?{}:{input:t.input},...t.type===void 0?{}:{type:t.type},...t.fnOptions===void 0?{}:{fnOptions:t.fnOptions}}]}function Br(e){return{key(t){return zr(e,t)}}}function Vr(e){return async t=>{let n=await e(t),r;for await(let e of n){if(t.signal.aborted)throw t.signal.reason;r={chunk:e},t.client.setQueryData(t.queryKey,e)}if(!r)throw Error(`Live query for ${dn(t.queryKey)} did not yield any data. Ensure the query function returns an AsyncIterable with at least one chunk.`);return r.chunk}}function Hr(e,{refetchMode:t=`reset`,maxChunks:n=1/0}={}){return async r=>{let i=r.client.getQueryCache().find({queryKey:r.queryKey,exact:!0}),a=!!i&&i.state.data!==void 0;a&&(t===`reset`?i.setState({status:`pending`,data:void 0,error:null,fetchStatus:`fetching`}):r.client.setQueryData(r.queryKey,(e=[])=>Ur(e,n)));let o=[],s=await e(r),c=!a||t!==`replace`;r.client.setQueryData(r.queryKey,(e=[])=>Ur(e,n));for await(let e of s){if(r.signal.aborted)throw r.signal.reason;o.push(e),o=Ur(o,n),c&&r.client.setQueryData(r.queryKey,(t=[])=>Ur([...t,e],n))}c||r.client.setQueryData(r.queryKey,o);let l=r.client.getQueryData(r.queryKey);return l?Ur(l,n):o}}function Ur(e,t){return e.length<=t?e:e.slice(e.length-t)}var Wr=Symbol(`ORPC_OPERATION_CONTEXT`);function Gr(e,t){let n={call:e,queryKey(...[e={}]){return e={...t.experimental_defaults?.queryKey,...e},e.queryKey??zr(t.path,{type:`query`,input:e.input})},queryOptions(...[r={}]){r={...t.experimental_defaults?.queryOptions,...r};let i=n.queryKey(r);return{queryFn:({signal:t})=>{if(r.input===z)throw Error(`queryFn should not be called with skipToken used as input`);return e(r.input,{signal:t,context:{[Wr]:{key:i,type:`query`},...r.context}})},...r.input===z?{enabled:!1}:{},...r,queryKey:i}},experimental_streamedKey(...[e={}]){return e={...t.experimental_defaults?.experimental_streamedKey,...e},e.queryKey??zr(t.path,{type:`streamed`,input:e.input,fnOptions:e.queryFnOptions})},experimental_streamedOptions(...[r={}]){r={...t.experimental_defaults?.experimental_streamedOptions,...r};let i=n.experimental_streamedKey(r);return{queryFn:Hr(async({signal:t})=>{if(r.input===z)throw Error(`queryFn should not be called with skipToken used as input`);let n=await e(r.input,{signal:t,context:{[Wr]:{key:i,type:`streamed`},...r.context}});if(!an(n))throw Error(`streamedQuery requires an event iterator output`);return n},r.queryFnOptions),...r.input===z?{enabled:!1}:{},...r,queryKey:i}},experimental_liveKey(...[e={}]){return e={...t.experimental_defaults?.experimental_liveKey,...e},e.queryKey??zr(t.path,{type:`live`,input:e.input})},experimental_liveOptions(...[r={}]){r={...t.experimental_defaults?.experimental_liveOptions,...r};let i=n.experimental_liveKey(r);return{queryFn:Vr(async({signal:t})=>{if(r.input===z)throw Error(`queryFn should not be called with skipToken used as input`);let n=await e(r.input,{signal:t,context:{[Wr]:{key:i,type:`live`},...r.context}});if(!an(n))throw Error(`liveQuery requires an event iterator output`);return n}),...r.input===z?{enabled:!1}:{},...r,queryKey:i}},infiniteKey(e){return e={...t.experimental_defaults?.infiniteKey,...e},e.queryKey??zr(t.path,{type:`infinite`,input:e.input===z?z:e.input(e.initialPageParam)})},infiniteOptions(r){r={...t.experimental_defaults?.infiniteOptions,...r};let i=n.infiniteKey(r);return{queryFn:({pageParam:t,signal:n})=>{if(r.input===z)throw Error(`queryFn should not be called with skipToken used as input`);return e(r.input(t),{signal:n,context:{[Wr]:{key:i,type:`infinite`},...r.context}})},...r.input===z?{enabled:!1}:{},...r,queryKey:i}},mutationKey(...[e={}]){return e={...t.experimental_defaults?.mutationKey,...e},e.mutationKey??zr(t.path,{type:`mutation`})},mutationOptions(...[r={}]){r={...t.experimental_defaults?.mutationOptions,...r};let i=n.mutationKey(r);return{mutationFn:t=>e(t,{context:{[Wr]:{key:i,type:`mutation`},...r.context}}),...r,mutationKey:i}}};return n}function Kr(e,t={}){let n=Bt(t.path),r=Br(n),i=Gr(e,{path:n,experimental_defaults:t.experimental_defaults});return new Proxy({...r,...i},{get(r,i){let a=Reflect.get(r,i),o=mn(e)?Reflect.get(e,i):void 0;if(typeof i!=`string`||On.has(i)||!mn(o))return a;let s=Kr(e[i],{...t,path:[...n,i],experimental_defaults:hn(t.experimental_defaults,[i])});return typeof a==`function`?new Proxy(a,{get(e,t){return typeof t!=`string`||On.has(t)?Reflect.get(e,t):Reflect.get(s,t)}}):s}})}var qr=l(qe(),1);function Jr(e){if(!e||typeof document>`u`)return;let t=document.head||document.getElementsByTagName(`head`)[0],n=document.createElement(`style`);n.type=`text/css`,t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}var Yr=e=>{switch(e){case`success`:return Qr;case`info`:return ei;case`warning`:return $r;case`error`:return ti;default:return null}},Xr=Array(12).fill(0),Zr=({visible:e,className:t})=>m.createElement(`div`,{className:[`sonner-loading-wrapper`,t].filter(Boolean).join(` `),"data-visible":e},m.createElement(`div`,{className:`sonner-spinner`},Xr.map((e,t)=>m.createElement(`div`,{className:`sonner-loading-bar`,key:`spinner-bar-${t}`})))),Qr=m.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`,"aria-hidden":`true`},m.createElement(`path`,{fillRule:`evenodd`,d:`M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z`,clipRule:`evenodd`})),$r=m.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,fill:`currentColor`,height:`20`,width:`20`,"aria-hidden":`true`},m.createElement(`path`,{fillRule:`evenodd`,d:`M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z`,clipRule:`evenodd`})),ei=m.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`,"aria-hidden":`true`},m.createElement(`path`,{fillRule:`evenodd`,d:`M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z`,clipRule:`evenodd`})),ti=m.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`,"aria-hidden":`true`},m.createElement(`path`,{fillRule:`evenodd`,d:`M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z`,clipRule:`evenodd`})),ni=m.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`12`,height:`12`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`},m.createElement(`line`,{x1:`18`,y1:`6`,x2:`6`,y2:`18`}),m.createElement(`line`,{x1:`6`,y1:`6`,x2:`18`,y2:`18`})),ri=()=>{let[e,t]=m.useState(document.hidden);return m.useEffect(()=>{let e=()=>{t(document.hidden)};return document.addEventListener(`visibilitychange`,e),()=>document.removeEventListener(`visibilitychange`,e)},[]),e},ii=1,ai=100,oi=e=>typeof e?.id==`number`||e?.id?.length>0?e.id:ii++,Q=new class{constructor(){this.subscribe=e=>(this.subscribers.push(e),this.getActiveToasts().forEach(t=>e(t)),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e],this.trimHistory()},this.trimHistory=()=>{let e=this.toasts.length-ai;e<=0||(this.toasts=this.toasts.filter(t=>e>0&&this.dismissedToasts.has(t.id)?(this.dismissedToasts.delete(t.id),e--,!1):!0))},this.create=e=>{let{message:t,...n}=e,r=oi(e),i=this.pendingDismissals.get(r);i!==void 0&&(cancelAnimationFrame(i),this.pendingDismissals.delete(r),this.dismissedToasts.delete(r));let a=this.dismissedToasts.has(r),o=e.dismissible===void 0||e.dismissible;return a&&(this.dismissedToasts.delete(r),this.toasts=this.toasts.filter(e=>e.id!==r)),!a&&this.toasts.find(e=>e.id===r)?this.toasts=this.toasts.map(n=>n.id===r?(this.publish({...n,...e,id:r,title:t}),{...n,...e,id:r,dismissible:o,title:t}):n):this.addToast({title:t,...n,dismissible:o,id:r}),r},this.dismiss=e=>{if(e==null)return this.getActiveToasts().forEach(e=>{this.dismissedToasts.add(e.id),this.subscribers.forEach(t=>t({id:e.id,dismiss:!0}))}),e;this.dismissedToasts.add(e);let t=this.pendingDismissals.get(e);return t!==void 0&&cancelAnimationFrame(t),this.pendingDismissals.set(e,requestAnimationFrame(()=>{this.pendingDismissals.delete(e),this.subscribers.forEach(t=>t({id:e,dismiss:!0}))})),e},this.message=(e,t)=>this.create({...t,message:e,type:void 0}),this.error=(e,t)=>this.create({...t,message:e,type:`error`}),this.success=(e,t)=>this.create({...t,type:`success`,message:e}),this.info=(e,t)=>this.create({...t,type:`info`,message:e}),this.warning=(e,t)=>this.create({...t,type:`warning`,message:e}),this.loading=(e,t)=>this.create({...t,type:`loading`,message:e}),this.promise=(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:e,type:`loading`,message:t.loading,description:typeof t.description==`function`?void 0:t.description}));let r=Promise.resolve(e instanceof Function?e():e),i=n!==void 0,a,o=r.then(async e=>{if(a=[`resolve`,e],m.isValidElement(e))i=!1,this.create({id:n,type:`default`,message:e});else if(ci(e)&&!e.ok){i=!1;let r=typeof t.error==`function`?await t.error(`HTTP error! status: ${e.status}`):t.error,a=typeof t.description==`function`?await t.description(`HTTP error! status: ${e.status}`):t.description,o=typeof r==`object`&&!m.isValidElement(r)?r:{message:r};this.create({id:n,type:`error`,description:a,...o})}else if(e instanceof Error){i=!1;let r=typeof t.error==`function`?await t.error(e):t.error,a=typeof t.description==`function`?await t.description(e):t.description,o=typeof r==`object`&&!m.isValidElement(r)?r:{message:r};this.create({id:n,type:`error`,description:a,...o})}else if(t.success!==void 0){i=!1;let r=typeof t.success==`function`?await t.success(e):t.success,a=typeof t.description==`function`?await t.description(e):t.description,o=typeof r==`object`&&!m.isValidElement(r)?r:{message:r};this.create({id:n,type:`success`,description:a,...o})}}).catch(async e=>{if(a=[`reject`,e],t.error!==void 0){i=!1;let r=typeof t.error==`function`?await t.error(e):t.error,a=typeof t.description==`function`?await t.description(e):t.description,o=typeof r==`object`&&!m.isValidElement(r)?r:{message:r};this.create({id:n,type:`error`,description:a,...o})}}).finally(()=>{i&&(this.dismiss(n),n=void 0),t.finally==null||t.finally.call(t)}),s=()=>new Promise((e,t)=>o.then(()=>a[0]===`reject`?t(a[1]):e(a[1])).catch(t));return typeof n!=`string`&&typeof n!=`number`?{unwrap:s}:Object.assign(n,{unwrap:s})},this.custom=(e,t)=>{let n=oi(t);return this.create({...t,jsx:e(n),id:n,type:void 0}),n},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set,this.pendingDismissals=new Map}},si=(e,t)=>Q.message(e,t),ci=e=>e&&typeof e==`object`&&`ok`in e&&typeof e.ok==`boolean`&&`status`in e&&typeof e.status==`number`,li=Object.assign(si,{success:Q.success,info:Q.info,warning:Q.warning,error:Q.error,custom:Q.custom,message:Q.message,promise:Q.promise,dismiss:Q.dismiss,loading:Q.loading},{getHistory:()=>Q.toasts,getToasts:()=>Q.getActiveToasts()});Jr(`[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px;flex:1;min-width:0}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--normal-text);background:var(--normal-bg);border:1px solid var(--normal-border);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{-webkit-user-select:none;user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}`);function ui(e){return e.label!==void 0}var di=3,fi=`24px`,pi=`16px`,mi=4e3,hi=356,gi=14,_i=45,vi=200;function yi(...e){return e.filter(Boolean).join(` `)}function bi(e){let[t,n]=e.split(`-`),r=[];return t&&r.push(t),n&&r.push(n),r}var xi=e=>{let{invert:t,toast:n,unstyled:r,interacting:i,setHeights:a,visibleToasts:o,heights:s,index:c,toasts:l,expanded:u,removeToast:d,defaultRichColors:f,closeButton:p,style:h,cancelButtonStyle:g,actionButtonStyle:_,className:v=``,descriptionClassName:y=``,duration:b,position:x,gap:S,expandByDefault:C,classNames:w,icons:T,closeButtonAriaLabel:E=`Close toast`}=e,[D,O]=m.useState(null),[k,A]=m.useState(null),[j,M]=m.useState(!1),[ee,N]=m.useState(!1),[P,F]=m.useState(!1),[I,L]=m.useState(!1),[R,te]=m.useState(!1),[ne,re]=m.useState(0),[z,B]=m.useState(0),ie=m.useRef(n.duration||b||mi),ae=m.useRef(null),V=m.useRef(null),oe=c===0,se=c+1<=o,H=n.type,ce=H??`default`,U=n.dismissible!==!1,W=n.className||``,le=n.descriptionClassName||``,ue=m.useMemo(()=>s.findIndex(e=>e.toastId===n.id)||0,[s,n.id]),de=m.useMemo(()=>n.closeButton??p,[n.closeButton,p]),fe=m.useMemo(()=>n.duration||b||mi,[n.duration,b]),pe=m.useRef(0),me=m.useRef(0),he=m.useRef(0),ge=m.useRef(null),[_e,ve]=x.split(`-`),ye=m.useMemo(()=>s.reduce((e,t,n)=>n>=ue?e:e+t.height,0),[s,ue]),be=ri(),G=m.useMemo(()=>e.swipeDirections??bi(x),[e.swipeDirections,x]),xe=n.invert||t,Se=H===`loading`;me.current=m.useMemo(()=>ue*S+ye,[ue,ye]),m.useEffect(()=>{ie.current=fe},[fe]),m.useEffect(()=>{M(!0)},[]),m.useEffect(()=>{let e=V.current;if(e){let t=e.getBoundingClientRect().height;return B(t),a(e=>[{toastId:n.id,height:t,position:n.position},...e]),()=>a(e=>e.filter(e=>e.toastId!==n.id))}},[a,n.id]),m.useLayoutEffect(()=>{if(!j)return;let e=V.current,t=e.style.height;e.style.height=`auto`;let r=e.getBoundingClientRect().height;e.style.height=t,B(r),a(e=>e.find(e=>e.toastId===n.id)?e.map(e=>e.toastId===n.id?{...e,height:r}:e):[{toastId:n.id,height:r,position:n.position},...e])},[j,n.title,n.description,a,n.id,n.jsx,n.action,n.cancel]);let K=m.useCallback(()=>{N(!0),re(me.current),a(e=>e.filter(e=>e.toastId!==n.id)),setTimeout(()=>{d(n)},vi)},[n,d,a,me]);m.useEffect(()=>{if(n.promise&&H===`loading`||n.duration===1/0||n.type===`loading`)return;let e;return u||i||be?(()=>{if(he.current<pe.current){let e=new Date().getTime()-pe.current;ie.current-=e}he.current=new Date().getTime()})():ie.current!==1/0&&(pe.current=new Date().getTime(),e=setTimeout(()=>{n.onAutoClose==null||n.onAutoClose.call(n,n),K()},ie.current)),()=>clearTimeout(e)},[u,i,n,H,be,K]),m.useEffect(()=>{n.delete&&(K(),n.onDismiss==null||n.onDismiss.call(n,n))},[K,n.delete]);function Ce(){return T?.loading?m.createElement(`div`,{className:yi(w?.loader,n?.classNames?.loader,`sonner-loader`),"data-visible":H===`loading`},T.loading):m.createElement(Zr,{className:yi(w?.loader,n?.classNames?.loader),visible:H===`loading`})}let we=n.icon||T?.[H]||Yr(H);return m.createElement(`li`,{tabIndex:0,ref:V,className:yi(v,W,w?.toast,n?.classNames?.toast,w?.[ce],n?.classNames?.[ce]),"data-sonner-toast":``,"data-rich-colors":n.richColors??f,"data-styled":!(n.jsx||n.unstyled||r),"data-mounted":j,"data-promise":!!n.promise,"data-swiped":R,"data-removed":ee,"data-visible":se,"data-y-position":_e,"data-x-position":ve,"data-index":c,"data-front":oe,"data-swiping":P,"data-dismissible":U,"data-type":H,"data-invert":xe,"data-swipe-out":I,"data-swipe-direction":k,"data-expanded":!!(u||C&&j),"data-testid":n.testId,style:{"--index":c,"--toasts-before":c,"--z-index":l.length-c,"--offset":`${ee?ne:me.current}px`,"--initial-height":C?`auto`:`${z}px`,...h,...n.style},onDragEnd:()=>{F(!1),O(null),ge.current=null},onPointerDown:e=>{e.button!==2&&!Se&&U&&(ae.current=new Date,re(me.current),e.target.setPointerCapture(e.pointerId),e.target.tagName!==`BUTTON`&&(F(!0),ge.current={x:e.clientX,y:e.clientY}))},onPointerUp:()=>{if(I||!U)return;ge.current=null;let e=Number(V.current?.style.getPropertyValue(`--swipe-amount-x`).replace(`px`,``)||0),t=Number(V.current?.style.getPropertyValue(`--swipe-amount-y`).replace(`px`,``)||0),r=new Date().getTime()-ae.current?.getTime(),i=D===`x`?e:t,a=Math.abs(i)/r;if((D===`x`?G.includes(e>0?`right`:`left`):G.includes(t>0?`bottom`:`top`))&&(Math.abs(i)>=_i||a>.11))re(me.current),n.onDismiss==null||n.onDismiss.call(n,n),A(D===`x`?e>0?`right`:`left`:t>0?`down`:`up`),K(),L(!0);else{var o,s;(o=V.current)==null||o.style.setProperty(`--swipe-amount-x`,`0px`),(s=V.current)==null||s.style.setProperty(`--swipe-amount-y`,`0px`),te(!1),F(!1),O(null)}},onPointerMove:e=>{var t,n;if(!ge.current||!U||window.getSelection()?.toString().length>0)return;let r=e.clientY-ge.current.y,i=e.clientX-ge.current.x;!D&&(Math.abs(i)>1||Math.abs(r)>1)&&O(Math.abs(i)>Math.abs(r)?`x`:`y`);let a={x:0,y:0},o=e=>1/(1.5+Math.abs(e)/20);if(D===`y`){if(G.includes(`top`)||G.includes(`bottom`)){if(G.includes(`top`)&&r<0||G.includes(`bottom`)&&r>0)a.y=r;else{let e=r*o(r);a.y=Math.abs(e)<Math.abs(r)?e:r}}}else if(D===`x`&&(G.includes(`left`)||G.includes(`right`))){if(G.includes(`left`)&&i<0||G.includes(`right`)&&i>0)a.x=i;else{let e=i*o(i);a.x=Math.abs(e)<Math.abs(i)?e:i}}(Math.abs(a.x)>0||Math.abs(a.y)>0)&&te(!0),(t=V.current)==null||t.style.setProperty(`--swipe-amount-x`,`${a.x}px`),(n=V.current)==null||n.style.setProperty(`--swipe-amount-y`,`${a.y}px`)}},de&&!n.jsx&&H!==`loading`?m.createElement(`button`,{"aria-label":E,"data-disabled":Se,"data-close-button":!0,onClick:Se||!U?()=>{}:()=>{K(),n.onDismiss==null||n.onDismiss.call(n,n)},className:yi(w?.closeButton,n?.classNames?.closeButton)},T?.close??ni):null,(H||n.icon||n.promise)&&n.icon!==null&&(T?.[H]!==null||n.icon)?m.createElement(`div`,{"data-icon":``,className:yi(w?.icon,n?.classNames?.icon)},H===`loading`?n.icon||Ce():n.promise?Ce():null,H===`loading`?null:we):null,m.createElement(`div`,{"data-content":``,className:yi(w?.content,n?.classNames?.content)},m.createElement(`div`,{"data-title":``,className:yi(w?.title,n?.classNames?.title)},n.jsx?n.jsx:typeof n.title==`function`?n.title():n.title),n.description?m.createElement(`div`,{"data-description":``,className:yi(y,le,w?.description,n?.classNames?.description)},typeof n.description==`function`?n.description():n.description):null),m.isValidElement(n.cancel)?n.cancel:n.cancel&&ui(n.cancel)?m.createElement(`button`,{"data-button":!0,"data-cancel":!0,style:n.cancelButtonStyle||g,onClick:e=>{ui(n.cancel)&&U&&(n.cancel.onClick==null||n.cancel.onClick.call(n.cancel,e),K())},className:yi(w?.cancelButton,n?.classNames?.cancelButton)},n.cancel.label):null,m.isValidElement(n.action)?n.action:n.action&&ui(n.action)?m.createElement(`button`,{"data-button":!0,"data-action":!0,style:n.actionButtonStyle||_,onClick:e=>{ui(n.action)&&(n.action.onClick==null||n.action.onClick.call(n.action,e),e.defaultPrevented||K())},className:yi(w?.actionButton,n?.classNames?.actionButton)},n.action.label):null)};function Si(){if(typeof window>`u`||typeof document>`u`)return`ltr`;let e=document.documentElement.getAttribute(`dir`);return e===`auto`||!e?window.getComputedStyle(document.documentElement).direction:e}function Ci(e,t){let n={};return[e,t].forEach((e,t)=>{let r=t===1,i=r?`--mobile-offset`:`--offset`,a=r?pi:fi;function o(e){[`top`,`right`,`bottom`,`left`].forEach(t=>{n[`${i}-${t}`]=typeof e==`number`?`${e}px`:e})}typeof e==`number`||typeof e==`string`?o(e):typeof e==`object`?[`top`,`right`,`bottom`,`left`].forEach(t=>{e[t]===void 0?n[`${i}-${t}`]=a:n[`${i}-${t}`]=typeof e[t]==`number`?`${e[t]}px`:e[t]}):o(a)}),n}var wi=m.forwardRef(function(e,t){let{id:n,invert:r,position:i=`bottom-right`,hotkey:a=[`altKey`,`KeyT`],expand:o,closeButton:s,className:c,offset:l,mobileOffset:u,theme:d=`light`,richColors:f,duration:p,style:h,visibleToasts:g=di,toastOptions:_,dir:v=Si(),gap:y=gi,icons:b,customAriaLabel:x,containerAriaLabel:S=`Notifications`}=e,[C,w]=m.useState([]),T=m.useMemo(()=>n?C.filter(e=>e.toasterId===n):C.filter(e=>!e.toasterId),[C,n]),E=m.useMemo(()=>Array.from(new Set([i].concat(T.filter(e=>e.position).map(e=>e.position)))),[T,i]),[D,O]=m.useState([]),[k,A]=m.useState(!1),[j,M]=m.useState(!1),[ee,N]=m.useState(d===`system`?typeof window<`u`&&window.matchMedia&&window.matchMedia(`(prefers-color-scheme: dark)`).matches?`dark`:`light`:d),P=m.useRef(null),F=a.join(`+`).replace(/Key/g,``).replace(/Digit/g,``),I=m.useRef(null),L=m.useRef(!1),R=m.useCallback(e=>{w(t=>(t.find(t=>t.id===e.id)?.delete||Q.dismiss(e.id),t.filter(({id:t})=>t!==e.id)))},[]);return m.useEffect(()=>Q.subscribe(e=>{e.dismiss?requestAnimationFrame(()=>{w(t=>t.map(t=>t.id===e.id?{...t,delete:!0}:t))}):setTimeout(()=>{qr.flushSync(()=>{w(t=>{let n=t.findIndex(t=>t.id===e.id);return n===-1?[e,...t]:[...t.slice(0,n),{...t[n],...e},...t.slice(n+1)]})})})}),[]),m.useEffect(()=>{if(d!==`system`){N(d);return}if(d===`system`&&(window.matchMedia&&window.matchMedia(`(prefers-color-scheme: dark)`).matches?N(`dark`):N(`light`)),typeof window>`u`)return;let e=window.matchMedia(`(prefers-color-scheme: dark)`);try{e.addEventListener(`change`,({matches:e})=>{N(e?`dark`:`light`)})}catch{e.addListener(({matches:e})=>{try{N(e?`dark`:`light`)}catch(e){console.error(e)}})}},[d]),m.useEffect(()=>{C.length<=1&&A(!1)},[C]),m.useEffect(()=>{let e=e=>{if(a.length>0&&a.every(t=>e[t]||e.code===t)){var t;A(!0),(t=P.current)==null||t.focus()}e.code===`Escape`&&(document.activeElement===P.current||P.current?.contains(document.activeElement))&&A(!1)};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[a]),m.useEffect(()=>{if(P.current)return()=>{I.current&&(I.current.focus({preventScroll:!0}),I.current=null,L.current=!1)}},[P.current]),m.createElement(`section`,{ref:t,"aria-label":x??`${S} ${F}`,tabIndex:-1,"aria-live":`polite`,"aria-relevant":`additions text`,"aria-atomic":`false`,suppressHydrationWarning:!0,"data-react-aria-top-layer":!0},E.map((t,n)=>{let[i,a]=t.split(`-`);return T.length?m.createElement(`ol`,{key:t,dir:v===`auto`?Si():v,tabIndex:-1,ref:P,className:c,"data-sonner-toaster":!0,"data-sonner-theme":ee,"data-y-position":i,"data-x-position":a,style:{"--front-toast-height":`${D[0]?.height||0}px`,"--width":`${hi}px`,"--gap":`${y}px`,...h,...Ci(l,u)},onBlur:e=>{L.current&&!e.currentTarget.contains(e.relatedTarget)&&(L.current=!1,I.current&&=(I.current.focus({preventScroll:!0}),null))},onFocus:e=>{e.target instanceof HTMLElement&&e.target.dataset.dismissible===`false`||L.current||(L.current=!0,I.current=e.relatedTarget)},onMouseEnter:()=>A(!0),onMouseMove:()=>A(!0),onMouseLeave:()=>{j||A(!1)},onDragEnd:()=>A(!1),onPointerDown:e=>{e.target instanceof HTMLElement&&e.target.dataset.dismissible===`false`||M(!0)},onPointerUp:()=>M(!1)},T.filter(e=>!e.position&&n===0||e.position===t).map((n,i)=>m.createElement(xi,{key:n.id,icons:b,index:i,toast:n,defaultRichColors:f,duration:_?.duration??p,className:_?.className,descriptionClassName:_?.descriptionClassName,invert:r,visibleToasts:g,closeButton:_?.closeButton??s,interacting:j,position:t,style:_?.style,unstyled:_?.unstyled,classNames:_?.classNames,cancelButtonStyle:_?.cancelButtonStyle,actionButtonStyle:_?.actionButtonStyle,closeButtonAriaLabel:_?.closeButtonAriaLabel,removeToast:R,toasts:T.filter(e=>e.position==n.position),heights:D.filter(e=>e.position==n.position),setHeights:O,expandByDefault:o,gap:y,expanded:k,swipeDirections:e.swipeDirections}))):null}))}),Ti=new TextEncoder;new TextDecoder;var Ei=Ti.encode(`kiteline-tunnel-v2`),Di=Ti.encode(`kiteline-tunnel-v2/message`),Oi=16,ki=22,Ai={Hello:1,Welcome:2,Confirm:3,Sealed:16},ji={device:1,pairing:2},Mi=class extends Error{};function Ni(...e){let t=new Uint8Array(e.reduce((e,t)=>e+t.length,0)),n=0;for(let r of e)t.set(r,n),n+=r.length;return t}function Pi(e){return crypto.getRandomValues(new Uint8Array(e))}function Fi(e){let t=``;for(let n of e)t+=String.fromCharCode(n);return btoa(t).replace(/\+/g,`-`).replace(/\//g,`_`).replace(/=+$/,``)}async function Ii(e){let t=Fi(await Vi(Ti.encode(`kiteline-pair-id/${e}`))).slice(0,ki),n=await crypto.subtle.importKey(`raw`,Ti.encode(e),{name:`HMAC`,hash:`SHA-256`},!1,[`sign`]);return{id:t,secret:new Uint8Array(await crypto.subtle.sign(`HMAC`,n,Ti.encode(`kiteline-pair-v2`)))}}function Li(e,t=!1){return crypto.subtle.importKey(`raw`,e,{name:`HMAC`,hash:`SHA-256`},t,[`sign`])}function Ri(e){if(!/^[\w-]{22}$/.test(e.id))throw new Mi(`A key's name is 22 characters.`);return Ni(Uint8Array.of(ji[e.kind]),Ti.encode(e.id))}async function zi(){let e=await crypto.subtle.generateKey({name:`ECDH`,namedCurve:`P-256`},!1,[`deriveBits`]),t=new Uint8Array(await crypto.subtle.exportKey(`raw`,e.publicKey));return{privateKey:e.privateKey,publicKey:t}}async function Bi(e,t){let n=await crypto.subtle.importKey(`raw`,t,{name:`ECDH`,namedCurve:`P-256`},!1,[]);return new Uint8Array(await crypto.subtle.deriveBits({name:`ECDH`,public:n},e,256))}async function Vi(e){return new Uint8Array(await crypto.subtle.digest(`SHA-256`,e))}async function Hi(e,t,n){let r=new Uint8Array(await crypto.subtle.sign(`HMAC`,e,Ni(t,n))),i=await crypto.subtle.importKey(`raw`,r,`HKDF`,!1,[`deriveBits`]),a=e=>crypto.subtle.deriveBits({name:`HKDF`,hash:`SHA-256`,salt:n,info:Ti.encode(e)},i,256),o=async e=>crypto.subtle.importKey(`raw`,await a(e),{name:`AES-GCM`},!1,[`encrypt`,`decrypt`]),s=async e=>crypto.subtle.importKey(`raw`,await a(e),{name:`HMAC`,hash:`SHA-256`},!1,[`sign`,`verify`]);return{c2s:await o(`client-to-host`),s2c:await o(`host-to-client`),hostConfirm:await s(`host-confirm`),clientConfirm:await s(`client-confirm`)}}var Ui=class e{sendKey;receiveKey;sent=0n;received=0n;constructor(e,t){this.sendKey=e,this.receiveKey=t}static iv(e){let t=new Uint8Array(12);return new DataView(t.buffer).setBigUint64(4,e),t}async seal(t){let n=e.iv(this.sent++),r=await crypto.subtle.encrypt({name:`AES-GCM`,iv:n,additionalData:Di},this.sendKey,t);return Ni(Uint8Array.of(Ai.Sealed),new Uint8Array(r))}async open(t){if(t[0]!==Ai.Sealed)throw new Mi(`Expected a sealed message.`);let n=e.iv(this.received++),r=await crypto.subtle.decrypt({name:`AES-GCM`,iv:n,additionalData:Di},this.receiveKey,t.subarray(1));return new Uint8Array(r)}};async function Wi(e,t,n,r){let i=Ri(e),a=await zi(),o=Pi(Oi);n(Ni(Uint8Array.of(Ai.Hello,2),i,a.publicKey,o));let s=await r();if(s[0]!==Ai.Welcome||s.length!==114)throw new Mi(`The computer's answer wasn't a handshake.`);let c=s.slice(1,66),l=s.slice(66,82),u=s.slice(82),d=await Vi(Ni(Ei,i,a.publicKey,o,c,l)),f=await Hi(t,await Bi(a.privateKey,c),d);if(!await crypto.subtle.verify(`HMAC`,f.hostConfirm,u,d))throw new Mi(`The computer doesn't hold this phone's pairing.`);let p=new Uint8Array(await crypto.subtle.sign(`HMAC`,f.clientConfirm,d));return n(Ni(Uint8Array.of(Ai.Confirm),p)),new Ui(f.c2s,f.s2c)}var $={Request:1,Body:2,End:3,Cancel:4,Response:17,Data:18,Done:19,Fail:20,Ping:32,Pong:33},Gi=65536,Ki=new TextEncoder,qi=new TextDecoder;function Ji(e,t,n){let r=new Uint8Array(5);return r[0]=e,new DataView(r.buffer).setUint32(1,t),n?.length?Ni(r,n):r}function Yi(e){if(e.length<5)throw Error(`A tunnel message was cut short.`);return{type:e[0],stream:new DataView(e.buffer,e.byteOffset,e.byteLength).getUint32(1),payload:e.subarray(5)}}var Xi=e=>Ki.encode(JSON.stringify(e)),Zi=e=>JSON.parse(qi.decode(e)),Qi=e=>qi.decode(e),$i={host:`/v1/host`,client:`/v1/client/`,data:`/v1/data/`},ea={Replaced:4e3,BadRequest:4400,NotPaired:4401,HostOffline:4404,TooMany:4429,ShuttingDown:4503,HostSilent:4504};function ta(e){let t=atob(e.replace(/-/g,`+`).replace(/_/g,`/`)),n=new Uint8Array(t.length);for(let e=0;e<t.length;e++)n[e]=t.charCodeAt(e);return n}function na(e,t){let n=new URL(t,e);return n.protocol=n.protocol===`http:`?`ws:`:`wss:`,n.toString()}var ra=class{ws;frames=[];texts=[];waiting=[];ended=null;closeListeners=new Set;constructor(e){this.ws=e,e.binaryType=`arraybuffer`,e.addEventListener(`message`,e=>{let t=e.data;typeof t==`string`?this.deliver(!1,t):t instanceof ArrayBuffer&&this.deliver(!0,new Uint8Array(t))}),e.addEventListener(`close`,e=>this.end(e.code,e.reason)),e.addEventListener(`error`,()=>this.end(1006,`connection error`))}get closed(){return this.ended}onClose(e){this.ended?e(this.ended.code,this.ended.reason):this.closeListeners.add(e)}deliver(e,t){let n=this.waiting.findIndex(t=>t.binary===e);if(n!==-1){let[e]=this.waiting.splice(n,1);e?.resolve(t)}else e?this.frames.push(t):this.texts.push(t)}end(e,t){if(this.ended)return;this.ended={code:e,reason:t};let n=new ia(e,t);for(let e of this.waiting.splice(0))e.reject(n);for(let n of this.closeListeners)n(e,t);this.closeListeners.clear()}take(e,t){let n=e?this.frames.shift():this.texts.shift();return n===void 0?this.ended?Promise.reject(new ia(this.ended.code,this.ended.reason)):new Promise((n,r)=>{let i={binary:e,resolve:n,reject:r};this.waiting.push(i),t!==void 0&&setTimeout(()=>{let e=this.waiting.indexOf(i);e!==-1&&(this.waiting.splice(e,1),r(new aa))},t)}):Promise.resolve(n)}next(e){return this.take(!0,e)}nextText(e){return this.take(!1,e)}send(e){this.ws.readyState===WebSocket.OPEN&&this.ws.send(e)}close(e,t){try{this.ws.close(e,t.slice(0,120))}catch{this.ws.close()}this.end(e,t)}},ia=class extends Error{code;reason;constructor(e,t){super(t||`Connection closed (${e}).`),this.code=e,this.reason=t}},aa=class extends Error{constructor(){super(`Timed out.`)}};function oa(e,t){return new Promise((n,r)=>{if(e.readyState===WebSocket.OPEN)return n();let i=setTimeout(()=>r(new aa),t);e.addEventListener(`open`,()=>{clearTimeout(i),n()}),e.addEventListener(`close`,e=>{clearTimeout(i),r(new ia(e.code,e.reason))})})}var sa=class extends Error{problem;constructor(e,t){super(t),this.problem=e}},ca={offline:`Your computer isn't connected to the relay. Check that Kiteline is running there with --relay.`,unpaired:`This phone isn't paired with that computer any more. Pair it again: run kiteline pair there.`,expired:`That pairing code has expired or was already used. Run kiteline pair for a new one.`,silent:`Your computer didn't answer. Check that Kiteline is still running there.`,lost:`Lost the connection to your computer.`};function la(e){if(e instanceof sa)return e.problem;if(e instanceof Mi)return`unpaired`;if(e instanceof ia){if(e.code===ea.HostOffline)return`offline`;if(e.code===ea.NotPaired)return e.reason===`code expired`?`expired`:`unpaired`;if(e.code===ea.HostSilent)return`silent`}return e instanceof aa?`silent`:`lost`}var ua=e=>e instanceof sa?e:new sa(la(e),ca[la(e)]),da=new Set([101,103,204,205,304]),fa=2e4,pa=5e4,ma=4e3,ha=class e{socket;cipher;nextStream=1;streams=new Map;sending=Promise.resolve();lastHeard=Date.now();heard=0;probing=!1;timer;failure=null;listeners=new Set;constructor(e,t){this.socket=e,this.cipher=t,e.onClose((e,t)=>this.fail(ua(new ia(e,t)))),this.timer=setInterval(()=>{Date.now()-this.lastHeard>pa?this.fail(ua(new aa)):this.post($.Ping,0)},fa),this.receive()}static async connect(t,n,r,i=2e4){let a=new WebSocket(t),o=new ra(a);try{if(await oa(a,i),await o.nextText(i)!==`{"t":"paired"}`)throw new sa(`lost`,ca.lost);let t=await Wi(n,r,e=>o.send(e),()=>o.next(i));return new e(o,t)}catch(e){throw o.close(1e3,`done`),ua(e)}}get error(){return this.failure}onClose(e){this.failure?e(this.failure):this.listeners.add(e)}close(){this.fail(new sa(`lost`,`Closed.`))}probe(e=ma){if(this.failure||this.probing)return;this.probing=!0;let t=this.heard;this.post($.Ping,0),setTimeout(()=>{this.probing=!1,this.heard===t&&this.fail(ua(new aa))},e)}fail(e){if(!this.failure){this.failure=e,clearInterval(this.timer),this.socket.close(1e3,`closing`);for(let t of this.streams.values())t.body?t.body.error(e):t.reject(e);this.streams.clear();for(let t of this.listeners)t(e);this.listeners.clear()}}post(e,t,n){let r=Ji(e,t,n);this.sending=this.sending.then(async()=>{this.failure||this.socket.send(await this.cipher.seal(r))}),this.sending.catch(e=>this.fail(ua(e)))}async receive(){try{for(;;){let e=await this.socket.next(),{type:t,stream:n,payload:r}=Yi(await this.cipher.open(e));this.lastHeard=Date.now(),this.heard++,this.dispatch(t,n,r)}}catch(e){this.fail(ua(e))}}dispatch(e,t,n){if(e===$.Pong||e===$.Ping)return;let r=this.streams.get(t);if(r)switch(e){case $.Response:{let e=Zi(n),i=null;da.has(e.status)||(i=new ReadableStream({start:e=>{r.body=e},cancel:()=>{this.streams.delete(t),this.post($.Cancel,t)}})),r.resolve(new Response(i,{status:e.status,headers:e.headers})),i||this.streams.delete(t);break}case $.Data:r.body?.enqueue(n.slice());break;case $.Done:r.body?.close(),this.streams.delete(t);break;case $.Fail:{let e=TypeError(Qi(n)||`The computer couldn't answer that.`);r.body?r.body.error(e):r.reject(e),this.streams.delete(t);break}}}fetch=async(e,t)=>{if(this.failure)throw this.failure;let n=new Request(e,t),r=t?.signal??n.signal;if(r?.aborted)throw r.reason??new DOMException(`Aborted`,`AbortError`);let i=new URL(n.url),a=n.method===`GET`||n.method===`HEAD`?null:new Uint8Array(await n.arrayBuffer()),o=this.nextStream;this.nextStream+=2;let s=new Promise((e,t)=>{this.streams.set(o,{resolve:e,reject:t})});r?.addEventListener(`abort`,()=>{let e=this.streams.get(o);if(!e)return;this.streams.delete(o),this.post($.Cancel,o);let t=r?.reason??new DOMException(`Aborted`,`AbortError`);e.body?e.body.error(t):e.reject(t)},{once:!0});let c=[...n.headers].filter(([e])=>e!==`cookie`&&e!==`authorization`);if(this.post($.Request,o,Xi({method:n.method,path:i.pathname+i.search,headers:c,body:!!a?.length})),a?.length){for(let e=0;e<a.length;e+=Gi)this.post($.Body,o,a.subarray(e,e+Gi));this.post($.End,o)}return s}},ga=typeof document<`u`&&!!document.querySelector(`meta[name="kiteline-relay"]`),_a=`kiteline-relay`,va=`computers`,ya=`kiteline:relay:computer`;function ba(){return new Promise((e,t)=>{let n=indexedDB.open(_a,1);n.onupgradeneeded=()=>n.result.createObjectStore(va,{keyPath:`id`}),n.onsuccess=()=>e(n.result),n.onerror=()=>t(n.error)})}async function xa(e,t){let n=await ba();return new Promise((r,i)=>{let a=t(n.transaction(va,e).objectStore(va));a.onsuccess=()=>r(a.result),a.onerror=()=>i(a.error)}).finally(()=>n.close())}function Sa(){try{return localStorage.getItem(ya)}catch{return null}}async function Ca(e){return await xa(`readonly`,t=>t.get(e)).catch(()=>void 0)??null}async function wa(){let e=Sa();return e?Ca(e):null}async function Ta(e,t,n){let r=await Ca(e);r?.device&&r.device!==t&&await Ea(e,r.device,r.key);let i=await Li(ta(n));await xa(`readwrite`,n=>n.put({id:e,device:t,key:i,pairedAt:Date.now()}));try{localStorage.setItem(ya,e)}catch{}La()}async function Ea(e,t,n){Sa()===e&&La();try{let r=na(window.location.origin,$i.client+e),i=await ha.connect(r,{kind:`device`,id:t},n,1e4);try{await(await i.fetch(`/auth/logout`,{method:`POST`})).body?.cancel()}finally{i.close()}}catch{}}async function Da(){let e=Sa();La();try{localStorage.removeItem(ya)}catch{}e&&await xa(`readwrite`,t=>t.delete(e)).catch(()=>{})}async function Oa(e,t){let n=await ba();return new Promise((r,i)=>{let a=n.transaction(va,`readwrite`),o=a.objectStore(va),s=!1,c=o.get(e);c.onsuccess=()=>{let n=c.result;n&&n.device===t&&(o.delete(e),s=!0)},a.oncomplete=()=>r(s),a.onerror=()=>i(a.error),a.onabort=()=>i(a.error)}).finally(()=>n.close())}async function ka(){let e=Sa();e&&await Oa(e,void 0).catch(()=>!1)}async function Aa(){let e=await wa();return e?e.device?`paired`:`outdated`:`none`}var ja=null,Ma=null,Na=0,Pa=new Set;function Fa(e){return Pa.add(e),()=>void Pa.delete(e)}async function Ia(e,t){if(await Oa(e,t).catch(()=>!1)&&Sa()===e)for(let e of Pa)e()}function La(){Na++,Ma?.close(),Ma=null,ja=null}ga&&(document.addEventListener(`visibilitychange`,()=>{document.visibilityState===`visible`&&Ma?.probe()}),window.addEventListener(`online`,()=>Ma?.probe()));function Ra(){ja??=(async()=>{let e=Na,t=await wa(),n=t?.device;if(!t||!n)throw new sa(`unpaired`,`This phone isn't paired with a computer yet.`);let r=t.id,i=na(window.location.origin,$i.client+r),a;try{a=await ha.connect(i,{kind:`device`,id:n},t.key)}catch(e){let t=ua(e);throw t.problem===`unpaired`&&await Ia(r,n),t}if(e!==Na)throw a.close(),new sa(`lost`,`Reconnecting.`);return Ma=a,a.onClose(e=>{Ma===a&&(Ma=null,ja=null,e.problem===`unpaired`&&Ia(r,n))}),a})();let e=ja;return e.catch(()=>{ja===e&&(ja=null)}),e}async function za(e,t){let n;try{n=await Ra()}catch(e){throw ua(e)}return n.fetch(e,t)}async function Ba(e,t){let{id:n,secret:r}=await Ii(t),i=na(window.location.origin,$i.client+e);return ha.connect(i,{kind:`pairing`,id:n},await Li(r))}function Va(e){return e instanceof Nn&&e.code===`UNAUTHORIZED`}function Ha(e){return e instanceof Error&&e.message?e.message:`Something went wrong.`}function Ua(){Ga.setQueryData([`auth`],{authed:!1,stale:!0})}function Wa(e){if(Va(e))return Ua();li.error(Ha(e))}var Ga=new je({queryCache:new Ae({onError:Wa}),mutationCache:new Oe({onError:Wa}),defaultOptions:{queries:{retry:(e,t)=>!Va(t)&&e<2,refetchOnWindowFocus:!0}}}),Ka=mr(new Rr({url:`${window.location.origin}/rpc`,fetch:ga?za:(e,t)=>fetch(e,{...t,credentials:`same-origin`})})),qa=Kr(Ka);Fa(Ua);var Ja=(0,m.createContext)({color:`currentColor`,size:`1em`,weight:`regular`,mirrored:!1}),Ya=m.forwardRef((e,t)=>{let{alt:n,color:r,size:i,weight:a,mirrored:o,children:s,weights:c,...l}=e,{color:u=`currentColor`,size:d,weight:f=`regular`,mirrored:p=!1,...h}=m.useContext(Ja);return m.createElement(`svg`,{ref:t,xmlns:`http://www.w3.org/2000/svg`,width:i??d,height:i??d,fill:r??u,viewBox:`0 0 256 256`,transform:o||p?`scale(-1, 1)`:void 0,...h,...l},!!n&&m.createElement(`title`,null,n),s,c.get(a??f))});Ya.displayName=`IconBase`;var Xa=new Intl.RelativeTimeFormat(`en`,{numeric:`auto`});function Za(e,t=Date.now()){let n=Math.round((e-t)/1e3),r=Math.abs(n);return r<45?`just now`:r<3600?Xa.format(Math.round(n/60),`minute`):r<86400?Xa.format(Math.round(n/3600),`hour`):r<604800?Xa.format(Math.round(n/86400),`day`):new Date(e).toLocaleDateString(`en`,{month:`short`,day:`numeric`})}function Qa(e,t=new Date){let n=new Date(t.getFullYear(),t.getMonth(),t.getDate()).getTime();return e>=n?`Today`:e>=n-864e5?`Yesterday`:e>=n-5184e5?`This week`:e>=n-25056e5?`This month`:`Earlier`}var $a=``;function eo(e){$a=e}function to(e){return $a&&e.startsWith($a)?`~${e.slice($a.length)}`:e}function no(e){let t=e.replace(/\/+$/,``).split(`/`);return t[t.length-1]||e}function ro(e,t){return t&&e.startsWith(`${t}/`)?e.slice(t.length+1):to(e)}function io(e){return e<.01?`<$0.01`:`$${e.toFixed(e<1?3:2)}`}function ao(e){let t=Math.round(e/1e3);return t<60?`${t}s`:`${Math.floor(t/60)}m ${t%60}s`}function oo(e=new Date){let t=e.getHours();return t<5?`Up late`:t<12?`Good morning`:t<18?`Good afternoon`:`Good evening`}export{Ge as A,v as B,Ta as C,li as D,wi as E,se as F,s as G,p as H,j as I,l as K,C as L,Ue as M,De as N,Rt as O,W as P,P as R,za as S,ua as T,d as U,_ as V,o as W,Aa as _,oo as a,ga as b,eo as c,Ka as d,Ha as f,Ga as g,qa as h,ao as i,We as j,qe as k,to as l,Ua as m,Qa as n,Za as o,Va as p,io as r,ro as s,no as t,Ya as u,Da as v,sa as w,Ba as x,ka as y,ie as z};