@workflow/web 4.0.1-beta.1 → 4.0.1-beta.2
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.
- package/.next/BUILD_ID +1 -1
- package/.next/app-build-manifest.json +26 -22
- package/.next/app-path-routes-manifest.json +2 -2
- package/.next/build-manifest.json +5 -5
- package/.next/prerender-manifest.json +3 -3
- package/.next/server/app/_not-found/page.js +1 -1
- package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/server/app/page.js +2 -2
- package/.next/server/app/page.js.nft.json +1 -1
- package/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/server/app/run/[runId]/page.js +2 -2
- package/.next/server/app/run/[runId]/page.js.nft.json +1 -1
- package/.next/server/app/run/[runId]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/run/[runId]/streams/[streamId]/page.js +2 -2
- package/.next/server/app/run/[runId]/streams/[streamId]/page.js.nft.json +1 -1
- package/.next/server/app/run/[runId]/streams/[streamId]/page_client-reference-manifest.js +1 -1
- package/.next/server/app-paths-manifest.json +2 -2
- package/.next/server/chunks/313.js +1 -0
- package/.next/server/chunks/484.js +1 -0
- package/.next/server/chunks/701.js +4 -4
- package/.next/server/chunks/969.js +1 -0
- package/.next/server/middleware-build-manifest.js +1 -1
- package/.next/server/pages/500.html +1 -1
- package/.next/server/server-reference-manifest.js +1 -1
- package/.next/server/server-reference-manifest.json +1 -1
- package/.next/static/chunks/219-4bfbcafcc410f8cc.js +1 -0
- package/.next/static/chunks/222-a421684695ba517f.js +1 -0
- package/.next/static/chunks/251-138a359fdc2149bb.js +1 -0
- package/.next/static/chunks/378-341b236f693d0c1c.js +1 -0
- package/.next/static/chunks/81-584e1cf8b55925fc.js +1 -0
- package/.next/static/chunks/app/layout-2e3067c8439ff45f.js +1 -0
- package/.next/static/chunks/app/page-775fa9219950d7ca.js +1 -0
- package/.next/static/chunks/app/run/[runId]/page-34173526c113151b.js +1 -0
- package/.next/static/chunks/app/run/[runId]/streams/[streamId]/page-38d05c721b1552e5.js +1 -0
- package/.next/static/chunks/{webpack-b430e07cf9392cd1.js → webpack-5c2af5e870f824a4.js} +1 -1
- package/.next/static/css/71ac981417779be5.css +3 -0
- package/.next/trace +18 -19
- package/README.md +1 -45
- package/package.json +3 -3
- package/.next/server/chunks/111.js +0 -1
- package/.next/server/chunks/960.js +0 -1
- package/.next/static/chunks/31-823a0c97323bdf6f.js +0 -1
- package/.next/static/chunks/412-a430cced2eddabdc.js +0 -1
- package/.next/static/chunks/687-ad38291defb5159c.js +0 -1
- package/.next/static/chunks/724-597f8080461271d4.js +0 -1
- package/.next/static/chunks/app/layout-e66fbbfe2cbdd460.js +0 -1
- package/.next/static/chunks/app/page-b3292ee31c7e0f1b.js +0 -1
- package/.next/static/chunks/app/run/[runId]/page-e2ae166a3649fc5b.js +0 -1
- package/.next/static/chunks/app/run/[runId]/streams/[streamId]/page-f3069f77f3c8adfc.js +0 -1
- package/.next/static/css/bb92b93f39c57915.css +0 -3
- /package/.next/static/{xWvHr_S68stQG6YzB4i4N → G3mUskY6nNyDu_k2YGsuX}/_buildManifest.js +0 -0
- /package/.next/static/{xWvHr_S68stQG6YzB4i4N → G3mUskY6nNyDu_k2YGsuX}/_ssgManifest.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"node":{"
|
|
1
|
+
{"node":{"4007fa1c8084a8015582b225627e44f9e645b18f74":{"workers":{"app/_not-found/page":{"moduleId":"6267","async":false},"app/page":{"moduleId":"8429","async":false},"app/run/[runId]/page":{"moduleId":"8429","async":false},"app/run/[runId]/streams/[streamId]/page":{"moduleId":"8429","async":false}},"layer":{"app/_not-found/page":"action-browser","app/page":"action-browser","app/run/[runId]/page":"action-browser","app/run/[runId]/streams/[streamId]/page":"action-browser"},"filename":"lib/config-world.ts","exportedName":"setupWorld"},"40625889a7da117286868280bd09b0bb05b131e5dd":{"workers":{"app/_not-found/page":{"moduleId":"6267","async":false},"app/page":{"moduleId":"8429","async":false},"app/run/[runId]/page":{"moduleId":"8429","async":false},"app/run/[runId]/streams/[streamId]/page":{"moduleId":"8429","async":false}},"layer":{"app/_not-found/page":"action-browser","app/page":"action-browser","app/run/[runId]/page":"action-browser","app/run/[runId]/streams/[streamId]/page":"action-browser"},"filename":"lib/config-world.ts","exportedName":"validateWorldConfig"},"7fe46c0cf772a15f9d6dbaaff3b62232143b9bf434":{"workers":{"app/_not-found/page":{"moduleId":"6267","async":false},"app/page":{"moduleId":"8429","async":false},"app/run/[runId]/page":{"moduleId":"8429","async":false},"app/run/[runId]/streams/[streamId]/page":{"moduleId":"8429","async":false}},"layer":{"app/_not-found/page":"action-browser","app/page":"action-browser","app/run/[runId]/page":"action-browser","app/run/[runId]/streams/[streamId]/page":"action-browser"},"filename":"lib/config-world.ts","exportedName":"getDefaultWorldConfig"},"6023b8cf57ec100f2160cc77c293149ec5c640c6fd":{"workers":{"app/page":{"moduleId":"8429","async":false},"app/run/[runId]/page":{"moduleId":"8429","async":false},"app/run/[runId]/streams/[streamId]/page":{"moduleId":"8429","async":false}},"layer":{"app/page":"action-browser","app/run/[runId]/page":"action-browser","app/run/[runId]/streams/[streamId]/page":"action-browser"},"filename":"workflow-trace-viewer/api/workflow-server-actions.ts","exportedName":"cancelRun"},"6037937f9b3bc44dc03819f9c10ac223a7ce5c9267":{"workers":{"app/page":{"moduleId":"8429","async":false},"app/run/[runId]/page":{"moduleId":"8429","async":false},"app/run/[runId]/streams/[streamId]/page":{"moduleId":"8429","async":false}},"layer":{"app/page":"action-browser","app/run/[runId]/page":"action-browser","app/run/[runId]/streams/[streamId]/page":"action-browser"},"filename":"workflow-trace-viewer/api/workflow-server-actions.ts","exportedName":"fetchHook"},"603b0ae7dec510d9f44512a3046fb170b8dd229c93":{"workers":{"app/page":{"moduleId":"8429","async":false},"app/run/[runId]/page":{"moduleId":"8429","async":false},"app/run/[runId]/streams/[streamId]/page":{"moduleId":"8429","async":false}},"layer":{"app/page":"action-browser","app/run/[runId]/page":"action-browser","app/run/[runId]/streams/[streamId]/page":"action-browser"},"filename":"workflow-trace-viewer/api/workflow-server-actions.ts","exportedName":"fetchRuns"},"60696b1b40c74e2b3a5bcf32fcef739e44b87df356":{"workers":{"app/page":{"moduleId":"8429","async":false},"app/run/[runId]/page":{"moduleId":"8429","async":false},"app/run/[runId]/streams/[streamId]/page":{"moduleId":"8429","async":false}},"layer":{"app/page":"action-browser","app/run/[runId]/page":"action-browser","app/run/[runId]/streams/[streamId]/page":"action-browser"},"filename":"workflow-trace-viewer/api/workflow-server-actions.ts","exportedName":"fetchHooks"},"60a00aff098a73173acf8507caa708e60252d8610a":{"workers":{"app/page":{"moduleId":"8429","async":false},"app/run/[runId]/page":{"moduleId":"8429","async":false},"app/run/[runId]/streams/[streamId]/page":{"moduleId":"8429","async":false}},"layer":{"app/page":"action-browser","app/run/[runId]/page":"action-browser","app/run/[runId]/streams/[streamId]/page":"action-browser"},"filename":"workflow-trace-viewer/api/workflow-server-actions.ts","exportedName":"fetchRun"},"7008e8253d69b099624170bb183cec9061a503838f":{"workers":{"app/page":{"moduleId":"8429","async":false},"app/run/[runId]/page":{"moduleId":"8429","async":false},"app/run/[runId]/streams/[streamId]/page":{"moduleId":"8429","async":false}},"layer":{"app/page":"action-browser","app/run/[runId]/page":"action-browser","app/run/[runId]/streams/[streamId]/page":"action-browser"},"filename":"workflow-trace-viewer/api/workflow-server-actions.ts","exportedName":"fetchStep"},"701d11d568cbae4d5cff3af04e97f904d39e57aa0e":{"workers":{"app/page":{"moduleId":"8429","async":false},"app/run/[runId]/page":{"moduleId":"8429","async":false},"app/run/[runId]/streams/[streamId]/page":{"moduleId":"8429","async":false}},"layer":{"app/page":"action-browser","app/run/[runId]/page":"action-browser","app/run/[runId]/streams/[streamId]/page":"action-browser"},"filename":"workflow-trace-viewer/api/workflow-server-actions.ts","exportedName":"fetchEventsByCorrelationId"},"7032e7b91a6703755c895c5a4f3cd11211f7de96db":{"workers":{"app/page":{"moduleId":"8429","async":false},"app/run/[runId]/page":{"moduleId":"8429","async":false},"app/run/[runId]/streams/[streamId]/page":{"moduleId":"8429","async":false}},"layer":{"app/page":"action-browser","app/run/[runId]/page":"action-browser","app/run/[runId]/streams/[streamId]/page":"action-browser"},"filename":"workflow-trace-viewer/api/workflow-server-actions.ts","exportedName":"fetchEvents"},"709f2774f453bd47e7baa00f84a9f45978c91c9c55":{"workers":{"app/page":{"moduleId":"8429","async":false},"app/run/[runId]/page":{"moduleId":"8429","async":false},"app/run/[runId]/streams/[streamId]/page":{"moduleId":"8429","async":false}},"layer":{"app/page":"action-browser","app/run/[runId]/page":"action-browser","app/run/[runId]/streams/[streamId]/page":"action-browser"},"filename":"workflow-trace-viewer/api/workflow-server-actions.ts","exportedName":"readStreamServerAction"},"70cb8e73ec780fbea5e0f2a8b548588fcaa8bd922b":{"workers":{"app/page":{"moduleId":"8429","async":false},"app/run/[runId]/page":{"moduleId":"8429","async":false},"app/run/[runId]/streams/[streamId]/page":{"moduleId":"8429","async":false}},"layer":{"app/page":"action-browser","app/run/[runId]/page":"action-browser","app/run/[runId]/streams/[streamId]/page":"action-browser"},"filename":"workflow-trace-viewer/api/workflow-server-actions.ts","exportedName":"fetchSteps"}},"edge":{},"encryptionKey":"rwAG3tLMFQBDD4WymrzCoTqrrnmJD1ZPWbpom4vMxoQ="}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[219],{406:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});let r=(0,n(8258).A)("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]])},2304:(e,t,n)=>{"use strict";n.d(t,{UC:()=>tL,YJ:()=>tI,In:()=>tT,q7:()=>tO,VF:()=>tK,p4:()=>t_,JU:()=>tD,ZL:()=>tj,bL:()=>tA,wn:()=>tB,PP:()=>tF,wv:()=>tW,l9:()=>tM,WT:()=>tN,LM:()=>tP});var r,o,l,a=n(4773),i=n(1471);function u(e,[t,n]){return Math.min(n,Math.max(t,e))}var s=n(4053);function c(e,t,n){if(!t.has(e))throw TypeError("attempted to "+n+" private field on non-instance");return t.get(e)}function d(e,t){var n=c(e,t,"get");return n.get?n.get.call(e):n.value}function f(e,t,n){var r=c(e,t,"set");if(r.set)r.set.call(e,n);else{if(!r.writable)throw TypeError("attempted to set read only private field");r.value=n}return n}var p=n(7328),h=n(5034),v=n(9280),m=n(5386),y=new WeakMap;function g(e,t){if("at"in Array.prototype)return Array.prototype.at.call(e,t);let n=function(e,t){let n=e.length,r=w(t),o=r>=0?r:n+r;return o<0||o>=n?-1:o}(e,t);return -1===n?void 0:e[n]}function w(e){return e!=e||0===e?0:Math.trunc(e)}o=new WeakMap,class e extends Map{set(e,t){return y.get(this)&&(this.has(e)?d(this,o)[d(this,o).indexOf(e)]=e:d(this,o).push(e)),super.set(e,t),this}insert(e,t,n){let r,l=this.has(t),a=d(this,o).length,i=w(e),u=i>=0?i:a+i,s=u<0||u>=a?-1:u;if(s===this.size||l&&s===this.size-1||-1===s)return this.set(t,n),this;let c=this.size+ +!l;i<0&&u++;let f=[...d(this,o)],p=!1;for(let e=u;e<c;e++)if(u===e){let o=f[e];f[e]===t&&(o=f[e+1]),l&&this.delete(t),r=this.get(o),this.set(t,n)}else{p||f[e-1]!==t||(p=!0);let n=f[p?e:e-1],o=r;r=this.get(n),this.delete(n),this.set(n,o)}return this}with(t,n,r){let o=new e(this);return o.insert(t,n,r),o}before(e){let t=d(this,o).indexOf(e)-1;if(!(t<0))return this.entryAt(t)}setBefore(e,t,n){let r=d(this,o).indexOf(e);return -1===r?this:this.insert(r,t,n)}after(e){let t=d(this,o).indexOf(e);if(-1!==(t=-1===t||t===this.size-1?-1:t+1))return this.entryAt(t)}setAfter(e,t,n){let r=d(this,o).indexOf(e);return -1===r?this:this.insert(r+1,t,n)}first(){return this.entryAt(0)}last(){return this.entryAt(-1)}clear(){return f(this,o,[]),super.clear()}delete(e){let t=super.delete(e);return t&&d(this,o).splice(d(this,o).indexOf(e),1),t}deleteAt(e){let t=this.keyAt(e);return void 0!==t&&this.delete(t)}at(e){let t=g(d(this,o),e);if(void 0!==t)return this.get(t)}entryAt(e){let t=g(d(this,o),e);if(void 0!==t)return[t,this.get(t)]}indexOf(e){return d(this,o).indexOf(e)}keyAt(e){return g(d(this,o),e)}from(e,t){let n=this.indexOf(e);if(-1===n)return;let r=n+t;return r<0&&(r=0),r>=this.size&&(r=this.size-1),this.at(r)}keyFrom(e,t){let n=this.indexOf(e);if(-1===n)return;let r=n+t;return r<0&&(r=0),r>=this.size&&(r=this.size-1),this.keyAt(r)}find(e,t){let n=0;for(let r of this){if(Reflect.apply(e,t,[r,n,this]))return r;n++}}findIndex(e,t){let n=0;for(let r of this){if(Reflect.apply(e,t,[r,n,this]))return n;n++}return -1}filter(t,n){let r=[],o=0;for(let e of this)Reflect.apply(t,n,[e,o,this])&&r.push(e),o++;return new e(r)}map(t,n){let r=[],o=0;for(let e of this)r.push([e[0],Reflect.apply(t,n,[e,o,this])]),o++;return new e(r)}reduce(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];let[r,o]=t,l=0,a=null!=o?o:this.at(0);for(let e of this)a=0===l&&1===t.length?e:Reflect.apply(r,this,[a,e,l,this]),l++;return a}reduceRight(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];let[r,o]=t,l=null!=o?o:this.at(-1);for(let e=this.size-1;e>=0;e--){let n=this.at(e);l=e===this.size-1&&1===t.length?n:Reflect.apply(r,this,[l,n,e,this])}return l}toSorted(t){return new e([...this.entries()].sort(t))}toReversed(){let t=new e;for(let e=this.size-1;e>=0;e--){let n=this.keyAt(e),r=this.get(n);t.set(n,r)}return t}toSpliced(){for(var t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];let o=[...this.entries()];return o.splice(...n),new e(o)}slice(t,n){let r=new e,o=this.size-1;if(void 0===t)return r;t<0&&(t+=this.size),void 0!==n&&n>0&&(o=n-1);for(let e=t;e<=o;e++){let t=this.keyAt(e),n=this.get(t);r.set(t,n)}return r}every(e,t){let n=0;for(let r of this){if(!Reflect.apply(e,t,[r,n,this]))return!1;n++}return!0}some(e,t){let n=0;for(let r of this){if(Reflect.apply(e,t,[r,n,this]))return!0;n++}return!1}constructor(e){super(e),function(e,t,n){if(t.has(e))throw TypeError("Cannot initialize the same private elements twice on an object");t.set(e,n)}(this,o,{writable:!0,value:void 0}),f(this,o,[...super.keys()]),y.set(this,!0)}};var b=a.createContext(void 0),x=n(7740),S=0;function E(){let e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var C=n(63),k=n(819),R="focusScope.autoFocusOnMount",A="focusScope.autoFocusOnUnmount",M={bubbles:!1,cancelable:!0},N=a.forwardRef((e,t)=>{let{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:l,...i}=e,[u,s]=a.useState(null),c=(0,k.c)(o),d=(0,k.c)(l),f=a.useRef(null),p=(0,h.s)(t,e=>s(e)),v=a.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;a.useEffect(()=>{if(r){let e=function(e){if(v.paused||!u)return;let t=e.target;u.contains(t)?f.current=t:L(f.current,{select:!0})},t=function(e){if(v.paused||!u)return;let t=e.relatedTarget;null!==t&&(u.contains(t)||L(f.current,{select:!0}))};document.addEventListener("focusin",e),document.addEventListener("focusout",t);let n=new MutationObserver(function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&L(u)});return u&&n.observe(u,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t),n.disconnect()}}},[r,u,v.paused]),a.useEffect(()=>{if(u){P.add(v);let e=document.activeElement;if(!u.contains(e)){let t=new CustomEvent(R,M);u.addEventListener(R,c),u.dispatchEvent(t),t.defaultPrevented||(function(e){let{select:t=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=document.activeElement;for(let r of e)if(L(r,{select:t}),document.activeElement!==n)return}(T(u).filter(e=>"A"!==e.tagName),{select:!0}),document.activeElement===e&&L(u))}return()=>{u.removeEventListener(R,c),setTimeout(()=>{let t=new CustomEvent(A,M);u.addEventListener(A,d),u.dispatchEvent(t),t.defaultPrevented||L(null!=e?e:document.body,{select:!0}),u.removeEventListener(A,d),P.remove(v)},0)}}},[u,c,d,v]);let y=a.useCallback(e=>{if(!n&&!r||v.paused)return;let t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,o=document.activeElement;if(t&&o){let t=e.currentTarget,[r,l]=function(e){let t=T(e);return[j(t,e),j(t.reverse(),e)]}(t);r&&l?e.shiftKey||o!==l?e.shiftKey&&o===r&&(e.preventDefault(),n&&L(l,{select:!0})):(e.preventDefault(),n&&L(r,{select:!0})):o===t&&e.preventDefault()}},[n,r,v.paused]);return(0,m.jsx)(C.sG.div,{tabIndex:-1,...i,ref:p,onKeyDown:y})});function T(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{let t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function j(e,t){for(let n of e)if(!function(e,t){let{upTo:n}=t;if("hidden"===getComputedStyle(e).visibility)return!0;for(;e&&(void 0===n||e!==n);){if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}(n,{upTo:t}))return n}function L(e){let{select:t=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e&&e.focus){var n;let r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&(n=e)instanceof HTMLInputElement&&"select"in n&&t&&e.select()}}N.displayName="FocusScope";var P=function(){let e=[];return{add(t){let n=e[0];t!==n&&(null==n||n.pause()),(e=I(e,t)).unshift(t)},remove(t){var n;null==(n=(e=I(e,t))[0])||n.resume()}}}();function I(e,t){let n=[...e],r=n.indexOf(t);return -1!==r&&n.splice(r,1),n}var D=n(5987),O=n(9448),_=n(9302),K=n(9559),F=n(3049),B=n(607),W=new WeakMap,z=new WeakMap,H={},G=0,V=function(e){return e&&(e.host||V(e.parentNode))},U=function(e,t,n,r){var o=(Array.isArray(e)?e:[e]).map(function(e){if(t.contains(e))return e;var n=V(e);return n&&t.contains(n)?n:(console.error("aria-hidden",e,"in not contained inside",t,". Doing nothing"),null)}).filter(function(e){return!!e});H[n]||(H[n]=new WeakMap);var l=H[n],a=[],i=new Set,u=new Set(o),s=function(e){!e||i.has(e)||(i.add(e),s(e.parentNode))};o.forEach(s);var c=function(e){!e||u.has(e)||Array.prototype.forEach.call(e.children,function(e){if(i.has(e))c(e);else try{var t=e.getAttribute(r),o=null!==t&&"false"!==t,u=(W.get(e)||0)+1,s=(l.get(e)||0)+1;W.set(e,u),l.set(e,s),a.push(e),1===u&&o&&z.set(e,!0),1===s&&e.setAttribute(n,"true"),o||e.setAttribute(r,"true")}catch(t){console.error("aria-hidden: cannot operate on ",e,t)}})};return c(t),i.clear(),G++,function(){a.forEach(function(e){var t=W.get(e)-1,o=l.get(e)-1;W.set(e,t),l.set(e,o),t||(z.has(e)||e.removeAttribute(r),z.delete(e)),o||e.removeAttribute(n)}),--G||(W=new WeakMap,W=new WeakMap,z=new WeakMap,H={})}},q=function(e,t,n){void 0===n&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=t||("undefined"==typeof document?null:(Array.isArray(e)?e[0]:e).ownerDocument.body);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),U(r,o,n,"aria-hidden")):function(){return null}},X=function(){return(X=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function Y(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)0>t.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}Object.create;Object.create;var Z=("function"==typeof SuppressedError&&SuppressedError,"right-scroll-bar-position"),J="width-before-scroll-bar";function Q(e,t){return"function"==typeof e?e(t):e&&(e.current=t),e}var $="undefined"!=typeof window?a.useLayoutEffect:a.useEffect,ee=new WeakMap;function et(e){return e}var en=function(e){void 0===e&&(e={});var t,n,r,o=(void 0===t&&(t=et),n=[],r=!1,{read:function(){if(r)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:null},useMedium:function(e){var o=t(e,r);return n.push(o),function(){n=n.filter(function(e){return e!==o})}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var o=n;n=[],o.forEach(e),t=n}var l=function(){var n=t;t=[],n.forEach(e)},a=function(){return Promise.resolve().then(l)};a(),n={push:function(e){t.push(e),a()},filter:function(e){return t=t.filter(e),n}}}});return o.options=X({async:!0,ssr:!1},e),o}(),er=function(){},eo=a.forwardRef(function(e,t){var n,r,o,l,i=a.useRef(null),u=a.useState({onScrollCapture:er,onWheelCapture:er,onTouchMoveCapture:er}),s=u[0],c=u[1],d=e.forwardProps,f=e.children,p=e.className,h=e.removeScrollBar,v=e.enabled,m=e.shards,y=e.sideCar,g=e.noRelative,w=e.noIsolation,b=e.inert,x=e.allowPinchZoom,S=e.as,E=e.gapMode,C=Y(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),k=(n=[i,t],r=function(e){return n.forEach(function(t){return Q(t,e)})},(o=(0,a.useState)(function(){return{value:null,callback:r,facade:{get current(){return o.value},set current(value){var e=o.value;e!==value&&(o.value=value,o.callback(value,e))}}}})[0]).callback=r,l=o.facade,$(function(){var e=ee.get(l);if(e){var t=new Set(e),r=new Set(n),o=l.current;t.forEach(function(e){r.has(e)||Q(e,null)}),r.forEach(function(e){t.has(e)||Q(e,o)})}ee.set(l,n)},[n]),l),R=X(X({},C),s);return a.createElement(a.Fragment,null,v&&a.createElement(y,{sideCar:en,removeScrollBar:h,shards:m,noRelative:g,noIsolation:w,inert:b,setCallbacks:c,allowPinchZoom:!!x,lockRef:i,gapMode:E}),d?a.cloneElement(a.Children.only(f),X(X({},R),{ref:k})):a.createElement(void 0===S?"div":S,X({},R,{className:p,ref:k}),f))});eo.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},eo.classNames={fullWidth:J,zeroRight:Z};var el=function(e){var t=e.sideCar,n=Y(e,["sideCar"]);if(!t)throw Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw Error("Sidecar medium not found");return a.createElement(r,X({},n))};el.isSideCarExport=!0;var ea=function(){var e=0,t=null;return{add:function(r){if(0==e&&(t=function(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=l||n.nc;return t&&e.setAttribute("nonce",t),e}())){var o,a;(o=t).styleSheet?o.styleSheet.cssText=r:o.appendChild(document.createTextNode(r)),a=t,(document.head||document.getElementsByTagName("head")[0]).appendChild(a)}e++},remove:function(){--e||!t||(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},ei=function(){var e=ea();return function(t,n){a.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},eu=function(){var e=ei();return function(t){return e(t.styles,t.dynamic),null}},es={left:0,top:0,right:0,gap:0},ec=function(e){return parseInt(e||"",10)||0},ed=function(e){var t=window.getComputedStyle(document.body),n=t["padding"===e?"paddingLeft":"marginLeft"],r=t["padding"===e?"paddingTop":"marginTop"],o=t["padding"===e?"paddingRight":"marginRight"];return[ec(n),ec(r),ec(o)]},ef=function(e){if(void 0===e&&(e="margin"),"undefined"==typeof window)return es;var t=ed(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},ep=eu(),eh="data-scroll-locked",ev=function(e,t,n,r){var o=e.left,l=e.top,a=e.right,i=e.gap;return void 0===n&&(n="margin"),"\n .".concat("with-scroll-bars-hidden"," {\n overflow: hidden ").concat(r,";\n padding-right: ").concat(i,"px ").concat(r,";\n }\n body[").concat(eh,"] {\n overflow: hidden ").concat(r,";\n overscroll-behavior: contain;\n ").concat([t&&"position: relative ".concat(r,";"),"margin"===n&&"\n padding-left: ".concat(o,"px;\n padding-top: ").concat(l,"px;\n padding-right: ").concat(a,"px;\n margin-left:0;\n margin-top:0;\n margin-right: ").concat(i,"px ").concat(r,";\n "),"padding"===n&&"padding-right: ".concat(i,"px ").concat(r,";")].filter(Boolean).join(""),"\n }\n \n .").concat(Z," {\n right: ").concat(i,"px ").concat(r,";\n }\n \n .").concat(J," {\n margin-right: ").concat(i,"px ").concat(r,";\n }\n \n .").concat(Z," .").concat(Z," {\n right: 0 ").concat(r,";\n }\n \n .").concat(J," .").concat(J," {\n margin-right: 0 ").concat(r,";\n }\n \n body[").concat(eh,"] {\n ").concat("--removed-body-scroll-bar-size",": ").concat(i,"px;\n }\n")},em=function(){var e=parseInt(document.body.getAttribute(eh)||"0",10);return isFinite(e)?e:0},ey=function(){a.useEffect(function(){return document.body.setAttribute(eh,(em()+1).toString()),function(){var e=em()-1;e<=0?document.body.removeAttribute(eh):document.body.setAttribute(eh,e.toString())}},[])},eg=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=void 0===r?"margin":r;ey();var l=a.useMemo(function(){return ef(o)},[o]);return a.createElement(ep,{styles:ev(l,!t,o,n?"":"!important")})},ew=!1;if("undefined"!=typeof window)try{var eb=Object.defineProperty({},"passive",{get:function(){return ew=!0,!0}});window.addEventListener("test",eb,eb),window.removeEventListener("test",eb,eb)}catch(e){ew=!1}var ex=!!ew&&{passive:!1},eS=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return"hidden"!==n[t]&&(n.overflowY!==n.overflowX||"TEXTAREA"===e.tagName||"visible"!==n[t])},eE=function(e,t){var n=t.ownerDocument,r=t;do{if("undefined"!=typeof ShadowRoot&&r instanceof ShadowRoot&&(r=r.host),eC(e,r)){var o=ek(e,r);if(o[1]>o[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},eC=function(e,t){return"v"===e?eS(t,"overflowY"):eS(t,"overflowX")},ek=function(e,t){return"v"===e?[t.scrollTop,t.scrollHeight,t.clientHeight]:[t.scrollLeft,t.scrollWidth,t.clientWidth]},eR=function(e,t,n,r,o){var l,a=(l=window.getComputedStyle(t).direction,"h"===e&&"rtl"===l?-1:1),i=a*r,u=n.target,s=t.contains(u),c=!1,d=i>0,f=0,p=0;do{if(!u)break;var h=ek(e,u),v=h[0],m=h[1]-h[2]-a*v;(v||m)&&eC(e,u)&&(f+=m,p+=v);var y=u.parentNode;u=y&&y.nodeType===Node.DOCUMENT_FRAGMENT_NODE?y.host:y}while(!s&&u!==document.body||s&&(t.contains(u)||t===u));return d&&(o&&1>Math.abs(f)||!o&&i>f)?c=!0:!d&&(o&&1>Math.abs(p)||!o&&-i>p)&&(c=!0),c},eA=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},eM=function(e){return[e.deltaX,e.deltaY]},eN=function(e){return e&&"current"in e?e.current:e},eT=0,ej=[];let eL=(r=function(e){var t=a.useRef([]),n=a.useRef([0,0]),r=a.useRef(),o=a.useState(eT++)[0],l=a.useState(eu)[0],i=a.useRef(e);a.useEffect(function(){i.current=e},[e]),a.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var t=(function(e,t,n){if(n||2==arguments.length)for(var r,o=0,l=t.length;o<l;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))})([e.lockRef.current],(e.shards||[]).map(eN),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),t.forEach(function(e){return e.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var u=a.useCallback(function(e,t){if("touches"in e&&2===e.touches.length||"wheel"===e.type&&e.ctrlKey)return!i.current.allowPinchZoom;var o,l=eA(e),a=n.current,u="deltaX"in e?e.deltaX:a[0]-l[0],s="deltaY"in e?e.deltaY:a[1]-l[1],c=e.target,d=Math.abs(u)>Math.abs(s)?"h":"v";if("touches"in e&&"h"===d&&"range"===c.type)return!1;var f=eE(d,c);if(!f)return!0;if(f?o=d:(o="v"===d?"h":"v",f=eE(d,c)),!f)return!1;if(!r.current&&"changedTouches"in e&&(u||s)&&(r.current=o),!o)return!0;var p=r.current||o;return eR(p,t,e,"h"===p?u:s,!0)},[]),s=a.useCallback(function(e){if(ej.length&&ej[ej.length-1]===l){var n="deltaY"in e?eM(e):eA(e),r=t.current.filter(function(t){var r;return t.name===e.type&&(t.target===e.target||e.target===t.shadowParent)&&(r=t.delta,r[0]===n[0]&&r[1]===n[1])})[0];if(r&&r.should){e.cancelable&&e.preventDefault();return}if(!r){var o=(i.current.shards||[]).map(eN).filter(Boolean).filter(function(t){return t.contains(e.target)});(o.length>0?u(e,o[0]):!i.current.noIsolation)&&e.cancelable&&e.preventDefault()}}},[]),c=a.useCallback(function(e,n,r,o){var l={name:e,delta:n,target:r,should:o,shadowParent:function(e){for(var t=null;null!==e;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}(r)};t.current.push(l),setTimeout(function(){t.current=t.current.filter(function(e){return e!==l})},1)},[]),d=a.useCallback(function(e){n.current=eA(e),r.current=void 0},[]),f=a.useCallback(function(t){c(t.type,eM(t),t.target,u(t,e.lockRef.current))},[]),p=a.useCallback(function(t){c(t.type,eA(t),t.target,u(t,e.lockRef.current))},[]);a.useEffect(function(){return ej.push(l),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:p}),document.addEventListener("wheel",s,ex),document.addEventListener("touchmove",s,ex),document.addEventListener("touchstart",d,ex),function(){ej=ej.filter(function(e){return e!==l}),document.removeEventListener("wheel",s,ex),document.removeEventListener("touchmove",s,ex),document.removeEventListener("touchstart",d,ex)}},[]);var h=e.removeScrollBar,v=e.inert;return a.createElement(a.Fragment,null,v?a.createElement(l,{styles:"\n .block-interactivity-".concat(o," {pointer-events: none;}\n .allow-interactivity-").concat(o," {pointer-events: all;}\n")}):null,h?a.createElement(eg,{noRelative:e.noRelative,gapMode:e.gapMode}):null)},en.useMedium(r),el);var eP=a.forwardRef(function(e,t){return a.createElement(eo,X({},e,{ref:t,sideCar:eL}))});eP.classNames=eo.classNames;var eI=[" ","Enter","ArrowUp","ArrowDown"],eD=[" ","Enter"],eO="Select",[e_,eK,eF]=function(e){let t=e+"CollectionProvider",[n,r]=(0,p.A)(t),[o,l]=n(t,{collectionRef:{current:null},itemMap:new Map}),i=e=>{let{scope:t,children:n}=e,r=a.useRef(null),l=a.useRef(new Map).current;return(0,m.jsx)(o,{scope:t,itemMap:l,collectionRef:r,children:n})};i.displayName=t;let u=e+"CollectionSlot",s=(0,v.TL)(u),c=a.forwardRef((e,t)=>{let{scope:n,children:r}=e,o=l(u,n),a=(0,h.s)(t,o.collectionRef);return(0,m.jsx)(s,{ref:a,children:r})});c.displayName=u;let d=e+"CollectionItemSlot",f="data-radix-collection-item",y=(0,v.TL)(d),g=a.forwardRef((e,t)=>{let{scope:n,children:r,...o}=e,i=a.useRef(null),u=(0,h.s)(t,i),s=l(d,n);return a.useEffect(()=>(s.itemMap.set(i,{ref:i,...o}),()=>void s.itemMap.delete(i))),(0,m.jsx)(y,{...{[f]:""},ref:u,children:r})});return g.displayName=d,[{Provider:i,Slot:c,ItemSlot:g},function(t){let n=l(e+"CollectionConsumer",t);return a.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll("[".concat(f,"]")));return Array.from(n.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current))},[n.collectionRef,n.itemMap])},r]}(eO),[eB,eW]=(0,p.A)(eO,[eF,O.Bk]),ez=(0,O.Bk)(),[eH,eG]=eB(eO),[eV,eU]=eB(eO),eq=e=>{let{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:l,value:i,defaultValue:u,onValueChange:s,dir:c,name:d,autoComplete:f,disabled:p,required:h,form:v}=e,y=ez(t),[g,w]=a.useState(null),[x,S]=a.useState(null),[E,C]=a.useState(!1),k=function(e){let t=a.useContext(b);return e||t||"ltr"}(c),[R,A]=(0,K.i)({prop:r,defaultProp:null!=o&&o,onChange:l,caller:eO}),[M,N]=(0,K.i)({prop:i,defaultProp:u,onChange:s,caller:eO}),T=a.useRef(null),j=!g||v||!!g.closest("form"),[L,P]=a.useState(new Set),I=Array.from(L).map(e=>e.props.value).join(";");return(0,m.jsx)(O.bL,{...y,children:(0,m.jsxs)(eH,{required:h,scope:t,trigger:g,onTriggerChange:w,valueNode:x,onValueNodeChange:S,valueNodeHasChildren:E,onValueNodeHasChildrenChange:C,contentId:(0,D.B)(),value:M,onValueChange:N,open:R,onOpenChange:A,dir:k,triggerPointerDownPosRef:T,disabled:p,children:[(0,m.jsx)(e_.Provider,{scope:t,children:(0,m.jsx)(eV,{scope:e.__scopeSelect,onNativeOptionAdd:a.useCallback(e=>{P(t=>new Set(t).add(e))},[]),onNativeOptionRemove:a.useCallback(e=>{P(t=>{let n=new Set(t);return n.delete(e),n})},[]),children:n})}),j?(0,m.jsxs)(tE,{"aria-hidden":!0,required:h,tabIndex:-1,name:d,autoComplete:f,value:M,onChange:e=>N(e.target.value),disabled:p,form:v,children:[void 0===M?(0,m.jsx)("option",{value:""}):null,Array.from(L)]},I):null]})})};eq.displayName=eO;var eX="SelectTrigger",eY=a.forwardRef((e,t)=>{let{__scopeSelect:n,disabled:r=!1,...o}=e,l=ez(n),i=eG(eX,n),u=i.disabled||r,c=(0,h.s)(t,i.onTriggerChange),d=eK(n),f=a.useRef("touch"),[p,v,y]=tk(e=>{let t=d().filter(e=>!e.disabled),n=t.find(e=>e.value===i.value),r=tR(t,e,n);void 0!==r&&i.onValueChange(r.value)}),g=e=>{u||(i.onOpenChange(!0),y()),e&&(i.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)})};return(0,m.jsx)(O.Mz,{asChild:!0,...l,children:(0,m.jsx)(C.sG.button,{type:"button",role:"combobox","aria-controls":i.contentId,"aria-expanded":i.open,"aria-required":i.required,"aria-autocomplete":"none",dir:i.dir,"data-state":i.open?"open":"closed",disabled:u,"data-disabled":u?"":void 0,"data-placeholder":tC(i.value)?"":void 0,...o,ref:c,onClick:(0,s.mK)(o.onClick,e=>{e.currentTarget.focus(),"mouse"!==f.current&&g(e)}),onPointerDown:(0,s.mK)(o.onPointerDown,e=>{f.current=e.pointerType;let t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),0===e.button&&!1===e.ctrlKey&&"mouse"===e.pointerType&&(g(e),e.preventDefault())}),onKeyDown:(0,s.mK)(o.onKeyDown,e=>{let t=""!==p.current;e.ctrlKey||e.altKey||e.metaKey||1!==e.key.length||v(e.key),(!t||" "!==e.key)&&eI.includes(e.key)&&(g(),e.preventDefault())})})})});eY.displayName=eX;var eZ="SelectValue",eJ=a.forwardRef((e,t)=>{let{__scopeSelect:n,className:r,style:o,children:l,placeholder:a="",...i}=e,u=eG(eZ,n),{onValueNodeHasChildrenChange:s}=u,c=void 0!==l,d=(0,h.s)(t,u.onValueNodeChange);return(0,F.N)(()=>{s(c)},[s,c]),(0,m.jsx)(C.sG.span,{...i,ref:d,style:{pointerEvents:"none"},children:tC(u.value)?(0,m.jsx)(m.Fragment,{children:a}):l})});eJ.displayName=eZ;var eQ=a.forwardRef((e,t)=>{let{__scopeSelect:n,children:r,...o}=e;return(0,m.jsx)(C.sG.span,{"aria-hidden":!0,...o,ref:t,children:r||"▼"})});eQ.displayName="SelectIcon";var e$=e=>(0,m.jsx)(_.Z,{asChild:!0,...e});e$.displayName="SelectPortal";var e0="SelectContent",e1=a.forwardRef((e,t)=>{let n=eG(e0,e.__scopeSelect),[r,o]=a.useState();return((0,F.N)(()=>{o(new DocumentFragment)},[]),n.open)?(0,m.jsx)(e7,{...e,ref:t}):r?i.createPortal((0,m.jsx)(e2,{scope:e.__scopeSelect,children:(0,m.jsx)(e_.Slot,{scope:e.__scopeSelect,children:(0,m.jsx)("div",{children:e.children})})}),r):null});e1.displayName=e0;var[e2,e3]=eB(e0),e8=(0,v.TL)("SelectContent.RemoveScroll"),e7=a.forwardRef((e,t)=>{let{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:l,onPointerDownOutside:i,side:u,sideOffset:c,align:d,alignOffset:f,arrowPadding:p,collisionBoundary:v,collisionPadding:y,sticky:g,hideWhenDetached:w,avoidCollisions:b,...C}=e,k=eG(e0,n),[R,A]=a.useState(null),[M,T]=a.useState(null),j=(0,h.s)(t,e=>A(e)),[L,P]=a.useState(null),[I,D]=a.useState(null),O=eK(n),[_,K]=a.useState(!1),F=a.useRef(!1);a.useEffect(()=>{if(R)return q(R)},[R]),a.useEffect(()=>{var e,t;let n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",null!=(e=n[0])?e:E()),document.body.insertAdjacentElement("beforeend",null!=(t=n[1])?t:E()),S++,()=>{1===S&&document.querySelectorAll("[data-radix-focus-guard]").forEach(e=>e.remove()),S--}},[]);let B=a.useCallback(e=>{let[t,...n]=O().map(e=>e.ref.current),[r]=n.slice(-1),o=document.activeElement;for(let n of e)if(n===o||(null==n||n.scrollIntoView({block:"nearest"}),n===t&&M&&(M.scrollTop=0),n===r&&M&&(M.scrollTop=M.scrollHeight),null==n||n.focus(),document.activeElement!==o))return},[O,M]),W=a.useCallback(()=>B([L,R]),[B,L,R]);a.useEffect(()=>{_&&W()},[_,W]);let{onOpenChange:z,triggerPointerDownPosRef:H}=k;a.useEffect(()=>{if(R){let e={x:0,y:0},t=t=>{var n,r,o,l;e={x:Math.abs(Math.round(t.pageX)-(null!=(o=null==(n=H.current)?void 0:n.x)?o:0)),y:Math.abs(Math.round(t.pageY)-(null!=(l=null==(r=H.current)?void 0:r.y)?l:0))}},n=n=>{e.x<=10&&e.y<=10?n.preventDefault():R.contains(n.target)||z(!1),document.removeEventListener("pointermove",t),H.current=null};return null!==H.current&&(document.addEventListener("pointermove",t),document.addEventListener("pointerup",n,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",t),document.removeEventListener("pointerup",n,{capture:!0})}}},[R,z,H]),a.useEffect(()=>{let e=()=>z(!1);return window.addEventListener("blur",e),window.addEventListener("resize",e),()=>{window.removeEventListener("blur",e),window.removeEventListener("resize",e)}},[z]);let[G,V]=tk(e=>{let t=O().filter(e=>!e.disabled),n=t.find(e=>e.ref.current===document.activeElement),r=tR(t,e,n);r&&setTimeout(()=>r.ref.current.focus())}),U=a.useCallback((e,t,n)=>{let r=!F.current&&!n;(void 0!==k.value&&k.value===t||r)&&(P(e),r&&(F.current=!0))},[k.value]),X=a.useCallback(()=>null==R?void 0:R.focus(),[R]),Y=a.useCallback((e,t,n)=>{let r=!F.current&&!n;(void 0!==k.value&&k.value===t||r)&&D(e)},[k.value]),Z="popper"===r?e6:e5,J=Z===e6?{side:u,sideOffset:c,align:d,alignOffset:f,arrowPadding:p,collisionBoundary:v,collisionPadding:y,sticky:g,hideWhenDetached:w,avoidCollisions:b}:{};return(0,m.jsx)(e2,{scope:n,content:R,viewport:M,onViewportChange:T,itemRefCallback:U,selectedItem:L,onItemLeave:X,itemTextRefCallback:Y,focusSelectedItem:W,selectedItemText:I,position:r,isPositioned:_,searchRef:G,children:(0,m.jsx)(eP,{as:e8,allowPinchZoom:!0,children:(0,m.jsx)(N,{asChild:!0,trapped:k.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:(0,s.mK)(o,e=>{var t;null==(t=k.trigger)||t.focus({preventScroll:!0}),e.preventDefault()}),children:(0,m.jsx)(x.qW,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:l,onPointerDownOutside:i,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>k.onOpenChange(!1),children:(0,m.jsx)(Z,{role:"listbox",id:k.contentId,"data-state":k.open?"open":"closed",dir:k.dir,onContextMenu:e=>e.preventDefault(),...C,...J,onPlaced:()=>K(!0),ref:j,style:{display:"flex",flexDirection:"column",outline:"none",...C.style},onKeyDown:(0,s.mK)(C.onKeyDown,e=>{let t=e.ctrlKey||e.altKey||e.metaKey;if("Tab"===e.key&&e.preventDefault(),t||1!==e.key.length||V(e.key),["ArrowUp","ArrowDown","Home","End"].includes(e.key)){let t=O().filter(e=>!e.disabled).map(e=>e.ref.current);if(["ArrowUp","End"].includes(e.key)&&(t=t.slice().reverse()),["ArrowUp","ArrowDown"].includes(e.key)){let n=e.target,r=t.indexOf(n);t=t.slice(r+1)}setTimeout(()=>B(t)),e.preventDefault()}})})})})})})});e7.displayName="SelectContentImpl";var e5=a.forwardRef((e,t)=>{let{__scopeSelect:n,onPlaced:r,...o}=e,l=eG(e0,n),i=e3(e0,n),[s,c]=a.useState(null),[d,f]=a.useState(null),p=(0,h.s)(t,e=>f(e)),v=eK(n),y=a.useRef(!1),g=a.useRef(!0),{viewport:w,selectedItem:b,selectedItemText:x,focusSelectedItem:S}=i,E=a.useCallback(()=>{if(l.trigger&&l.valueNode&&s&&d&&w&&b&&x){let e=l.trigger.getBoundingClientRect(),t=d.getBoundingClientRect(),n=l.valueNode.getBoundingClientRect(),o=x.getBoundingClientRect();if("rtl"!==l.dir){let r=o.left-t.left,l=n.left-r,a=e.left-l,i=e.width+a,c=Math.max(i,t.width),d=u(l,[10,Math.max(10,window.innerWidth-10-c)]);s.style.minWidth=i+"px",s.style.left=d+"px"}else{let r=t.right-o.right,l=window.innerWidth-n.right-r,a=window.innerWidth-e.right-l,i=e.width+a,c=Math.max(i,t.width),d=u(l,[10,Math.max(10,window.innerWidth-10-c)]);s.style.minWidth=i+"px",s.style.right=d+"px"}let a=v(),i=window.innerHeight-20,c=w.scrollHeight,f=window.getComputedStyle(d),p=parseInt(f.borderTopWidth,10),h=parseInt(f.paddingTop,10),m=parseInt(f.borderBottomWidth,10),g=p+h+c+parseInt(f.paddingBottom,10)+m,S=Math.min(5*b.offsetHeight,g),E=window.getComputedStyle(w),C=parseInt(E.paddingTop,10),k=parseInt(E.paddingBottom,10),R=e.top+e.height/2-10,A=b.offsetHeight/2,M=p+h+(b.offsetTop+A);if(M<=R){let e=a.length>0&&b===a[a.length-1].ref.current;s.style.bottom="0px";let t=Math.max(i-R,A+(e?k:0)+(d.clientHeight-w.offsetTop-w.offsetHeight)+m);s.style.height=M+t+"px"}else{let e=a.length>0&&b===a[0].ref.current;s.style.top="0px";let t=Math.max(R,p+w.offsetTop+(e?C:0)+A);s.style.height=t+(g-M)+"px",w.scrollTop=M-R+w.offsetTop}s.style.margin="".concat(10,"px 0"),s.style.minHeight=S+"px",s.style.maxHeight=i+"px",null==r||r(),requestAnimationFrame(()=>y.current=!0)}},[v,l.trigger,l.valueNode,s,d,w,b,x,l.dir,r]);(0,F.N)(()=>E(),[E]);let[k,R]=a.useState();(0,F.N)(()=>{d&&R(window.getComputedStyle(d).zIndex)},[d]);let A=a.useCallback(e=>{e&&!0===g.current&&(E(),null==S||S(),g.current=!1)},[E,S]);return(0,m.jsx)(e4,{scope:n,contentWrapper:s,shouldExpandOnScrollRef:y,onScrollButtonChange:A,children:(0,m.jsx)("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:k},children:(0,m.jsx)(C.sG.div,{...o,ref:p,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});e5.displayName="SelectItemAlignedPosition";var e6=a.forwardRef((e,t)=>{let{__scopeSelect:n,align:r="start",collisionPadding:o=10,...l}=e,a=ez(n);return(0,m.jsx)(O.UC,{...a,...l,ref:t,align:r,collisionPadding:o,style:{boxSizing:"border-box",...l.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});e6.displayName="SelectPopperPosition";var[e4,e9]=eB(e0,{}),te="SelectViewport",tt=a.forwardRef((e,t)=>{let{__scopeSelect:n,nonce:r,...o}=e,l=e3(te,n),i=e9(te,n),u=(0,h.s)(t,l.onViewportChange),c=a.useRef(0);return(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),(0,m.jsx)(e_.Slot,{scope:n,children:(0,m.jsx)(C.sG.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:u,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:(0,s.mK)(o.onScroll,e=>{let t=e.currentTarget,{contentWrapper:n,shouldExpandOnScrollRef:r}=i;if((null==r?void 0:r.current)&&n){let e=Math.abs(c.current-t.scrollTop);if(e>0){let r=window.innerHeight-20,o=Math.max(parseFloat(n.style.minHeight),parseFloat(n.style.height));if(o<r){let l=o+e,a=Math.min(r,l),i=l-a;n.style.height=a+"px","0px"===n.style.bottom&&(t.scrollTop=i>0?i:0,n.style.justifyContent="flex-end")}}}c.current=t.scrollTop})})})]})});tt.displayName=te;var tn="SelectGroup",[tr,to]=eB(tn),tl=a.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,o=(0,D.B)();return(0,m.jsx)(tr,{scope:n,id:o,children:(0,m.jsx)(C.sG.div,{role:"group","aria-labelledby":o,...r,ref:t})})});tl.displayName=tn;var ta="SelectLabel",ti=a.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,o=to(ta,n);return(0,m.jsx)(C.sG.div,{id:o.id,...r,ref:t})});ti.displayName=ta;var tu="SelectItem",[ts,tc]=eB(tu),td=a.forwardRef((e,t)=>{let{__scopeSelect:n,value:r,disabled:o=!1,textValue:l,...i}=e,u=eG(tu,n),c=e3(tu,n),d=u.value===r,[f,p]=a.useState(null!=l?l:""),[v,y]=a.useState(!1),g=(0,h.s)(t,e=>{var t;return null==(t=c.itemRefCallback)?void 0:t.call(c,e,r,o)}),w=(0,D.B)(),b=a.useRef("touch"),x=()=>{o||(u.onValueChange(r),u.onOpenChange(!1))};if(""===r)throw Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return(0,m.jsx)(ts,{scope:n,value:r,disabled:o,textId:w,isSelected:d,onItemTextChange:a.useCallback(e=>{p(t=>{var n;return t||(null!=(n=null==e?void 0:e.textContent)?n:"").trim()})},[]),children:(0,m.jsx)(e_.ItemSlot,{scope:n,value:r,disabled:o,textValue:f,children:(0,m.jsx)(C.sG.div,{role:"option","aria-labelledby":w,"data-highlighted":v?"":void 0,"aria-selected":d&&v,"data-state":d?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...i,ref:g,onFocus:(0,s.mK)(i.onFocus,()=>y(!0)),onBlur:(0,s.mK)(i.onBlur,()=>y(!1)),onClick:(0,s.mK)(i.onClick,()=>{"mouse"!==b.current&&x()}),onPointerUp:(0,s.mK)(i.onPointerUp,()=>{"mouse"===b.current&&x()}),onPointerDown:(0,s.mK)(i.onPointerDown,e=>{b.current=e.pointerType}),onPointerMove:(0,s.mK)(i.onPointerMove,e=>{if(b.current=e.pointerType,o){var t;null==(t=c.onItemLeave)||t.call(c)}else"mouse"===b.current&&e.currentTarget.focus({preventScroll:!0})}),onPointerLeave:(0,s.mK)(i.onPointerLeave,e=>{if(e.currentTarget===document.activeElement){var t;null==(t=c.onItemLeave)||t.call(c)}}),onKeyDown:(0,s.mK)(i.onKeyDown,e=>{var t;((null==(t=c.searchRef)?void 0:t.current)===""||" "!==e.key)&&(eD.includes(e.key)&&x()," "===e.key&&e.preventDefault())})})})})});td.displayName=tu;var tf="SelectItemText",tp=a.forwardRef((e,t)=>{let{__scopeSelect:n,className:r,style:o,...l}=e,u=eG(tf,n),s=e3(tf,n),c=tc(tf,n),d=eU(tf,n),[f,p]=a.useState(null),v=(0,h.s)(t,e=>p(e),c.onItemTextChange,e=>{var t;return null==(t=s.itemTextRefCallback)?void 0:t.call(s,e,c.value,c.disabled)}),y=null==f?void 0:f.textContent,g=a.useMemo(()=>(0,m.jsx)("option",{value:c.value,disabled:c.disabled,children:y},c.value),[c.disabled,c.value,y]),{onNativeOptionAdd:w,onNativeOptionRemove:b}=d;return(0,F.N)(()=>(w(g),()=>b(g)),[w,b,g]),(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(C.sG.span,{id:c.textId,...l,ref:v}),c.isSelected&&u.valueNode&&!u.valueNodeHasChildren?i.createPortal(l.children,u.valueNode):null]})});tp.displayName=tf;var th="SelectItemIndicator",tv=a.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e;return tc(th,n).isSelected?(0,m.jsx)(C.sG.span,{"aria-hidden":!0,...r,ref:t}):null});tv.displayName=th;var tm="SelectScrollUpButton",ty=a.forwardRef((e,t)=>{let n=e3(tm,e.__scopeSelect),r=e9(tm,e.__scopeSelect),[o,l]=a.useState(!1),i=(0,h.s)(t,r.onScrollButtonChange);return(0,F.N)(()=>{if(n.viewport&&n.isPositioned){let e=function(){l(t.scrollTop>0)},t=n.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}},[n.viewport,n.isPositioned]),o?(0,m.jsx)(tb,{...e,ref:i,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop=e.scrollTop-t.offsetHeight)}}):null});ty.displayName=tm;var tg="SelectScrollDownButton",tw=a.forwardRef((e,t)=>{let n=e3(tg,e.__scopeSelect),r=e9(tg,e.__scopeSelect),[o,l]=a.useState(!1),i=(0,h.s)(t,r.onScrollButtonChange);return(0,F.N)(()=>{if(n.viewport&&n.isPositioned){let e=function(){let e=t.scrollHeight-t.clientHeight;l(Math.ceil(t.scrollTop)<e)},t=n.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}},[n.viewport,n.isPositioned]),o?(0,m.jsx)(tb,{...e,ref:i,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop=e.scrollTop+t.offsetHeight)}}):null});tw.displayName=tg;var tb=a.forwardRef((e,t)=>{let{__scopeSelect:n,onAutoScroll:r,...o}=e,l=e3("SelectScrollButton",n),i=a.useRef(null),u=eK(n),c=a.useCallback(()=>{null!==i.current&&(window.clearInterval(i.current),i.current=null)},[]);return a.useEffect(()=>()=>c(),[c]),(0,F.N)(()=>{var e;let t=u().find(e=>e.ref.current===document.activeElement);null==t||null==(e=t.ref.current)||e.scrollIntoView({block:"nearest"})},[u]),(0,m.jsx)(C.sG.div,{"aria-hidden":!0,...o,ref:t,style:{flexShrink:0,...o.style},onPointerDown:(0,s.mK)(o.onPointerDown,()=>{null===i.current&&(i.current=window.setInterval(r,50))}),onPointerMove:(0,s.mK)(o.onPointerMove,()=>{var e;null==(e=l.onItemLeave)||e.call(l),null===i.current&&(i.current=window.setInterval(r,50))}),onPointerLeave:(0,s.mK)(o.onPointerLeave,()=>{c()})})}),tx=a.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e;return(0,m.jsx)(C.sG.div,{"aria-hidden":!0,...r,ref:t})});tx.displayName="SelectSeparator";var tS="SelectArrow";a.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,o=ez(n),l=eG(tS,n),a=e3(tS,n);return l.open&&"popper"===a.position?(0,m.jsx)(O.i3,{...o,...r,ref:t}):null}).displayName=tS;var tE=a.forwardRef((e,t)=>{let{__scopeSelect:n,value:r,...o}=e,l=a.useRef(null),i=(0,h.s)(t,l),u=function(e){let t=a.useRef({value:e,previous:e});return a.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}(r);return a.useEffect(()=>{let e=l.current;if(!e)return;let t=Object.getOwnPropertyDescriptor(window.HTMLSelectElement.prototype,"value").set;if(u!==r&&t){let n=new Event("change",{bubbles:!0});t.call(e,r),e.dispatchEvent(n)}},[u,r]),(0,m.jsx)(C.sG.select,{...o,style:{...B.Qg,...o.style},ref:i,defaultValue:r})});function tC(e){return""===e||void 0===e}function tk(e){let t=(0,k.c)(e),n=a.useRef(""),r=a.useRef(0),o=a.useCallback(e=>{let o=n.current+e;t(o),function e(t){n.current=t,window.clearTimeout(r.current),""!==t&&(r.current=window.setTimeout(()=>e(""),1e3))}(o)},[t]),l=a.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return a.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,o,l]}function tR(e,t,n){var r,o;let l=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,a=n?e.indexOf(n):-1,i=(r=e,o=Math.max(a,0),r.map((e,t)=>r[(o+t)%r.length]));1===l.length&&(i=i.filter(e=>e!==n));let u=i.find(e=>e.textValue.toLowerCase().startsWith(l.toLowerCase()));return u!==n?u:void 0}tE.displayName="SelectBubbleInput";var tA=eq,tM=eY,tN=eJ,tT=eQ,tj=e$,tL=e1,tP=tt,tI=tl,tD=ti,tO=td,t_=tp,tK=tv,tF=ty,tB=tw,tW=tx},3801:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});let r=(0,n(8258).A)("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]])},6426:e=>{e.exports={style:{fontFamily:"'Geist', 'Geist Fallback'",fontStyle:"normal"},className:"__className_188709",variable:"__variable_188709"}},6480:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});let r=(0,n(8258).A)("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]])},7163:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});let r=(0,n(8258).A)("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]])},7180:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});let r=(0,n(8258).A)("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]])},7222:e=>{e.exports={style:{fontFamily:"'Geist Mono', 'Geist Mono Fallback'",fontStyle:"normal"},className:"__className_9a8899",variable:"__variable_9a8899"}},7536:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});let r=(0,n(8258).A)("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]])},9276:(e,t,n)=>{"use strict";n.d(t,{b:()=>i});var r=n(4773),o=n(63),l=n(5386),a=r.forwardRef((e,t)=>(0,l.jsx)(o.sG.label,{...e,ref:t,onMouseDown:t=>{var n;t.target.closest("button, input, select, textarea")||(null==(n=e.onMouseDown)||n.call(e,t),!t.defaultPrevented&&t.detail>1&&t.preventDefault())}}));a.displayName="Label";var i=a}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[222],{1998:e=>{e.exports={spanRunning:"workflow-trace_spanRunning__1efX_",spanPending:"workflow-trace_spanPending__p7rdl",spanCompleted:"workflow-trace_spanCompleted__9NwVS",spanCancelled:"workflow-trace_spanCancelled___ORjw",spanPaused:"workflow-trace_spanPaused__Ffg_N",spanFailed:"workflow-trace_spanFailed__jtT9c",spanPendingStriped:"workflow-trace_spanPendingStriped___Khxv",spanSleep:"workflow-trace_spanSleep__HrTwd",spanHook:"workflow-trace_spanHook__XG6r_",eventFailed:"workflow-trace_eventFailed__3C_AS",eventRetrying:"workflow-trace_eventRetrying__Sm5qS",eventHook:"workflow-trace_eventHook__vpVmv",eventDefault:"workflow-trace_eventDefault__h2jbU"}},2287:(e,t,r)=>{"use strict";r.d(t,{$g:()=>o,Oc:()=>l,cn:()=>s,yQ:()=>i});var a=r(2928),n=r(8997);let i=10;function s(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return(0,n.QP)((0,a.$)(t))}let l=5e3;function o(e,t,r){return r?"Page ".concat(e," of ").concat(t,"+"):"Page ".concat(e," of ").concat(t)}},2338:(e,t,r)=>{"use strict";r.d(t,{Wu:()=>c,ZB:()=>o,Zp:()=>s,aR:()=>l});var a=r(5386),n=r(4773),i=r(2287);let s=n.forwardRef((e,t)=>{let{className:r,...n}=e;return(0,a.jsx)("div",{ref:t,className:(0,i.cn)("rounded-lg border bg-card text-card-foreground shadow-sm",r),...n})});s.displayName="Card";let l=n.forwardRef((e,t)=>{let{className:r,...n}=e;return(0,a.jsx)("div",{ref:t,className:(0,i.cn)("flex flex-col space-y-1.5 p-6",r),...n})});l.displayName="CardHeader";let o=n.forwardRef((e,t)=>{let{className:r,...n}=e;return(0,a.jsx)("div",{ref:t,className:(0,i.cn)("text-2xl font-semibold leading-none tracking-tight",r),...n})});o.displayName="CardTitle",n.forwardRef((e,t)=>{let{className:r,...n}=e;return(0,a.jsx)("div",{ref:t,className:(0,i.cn)("text-sm text-muted-foreground",r),...n})}).displayName="CardDescription";let c=n.forwardRef((e,t)=>{let{className:r,...n}=e;return(0,a.jsx)("div",{ref:t,className:(0,i.cn)("p-6 pt-0",r),...n})});c.displayName="CardContent",n.forwardRef((e,t)=>{let{className:r,...n}=e;return(0,a.jsx)("div",{ref:t,className:(0,i.cn)("flex items-center p-6 pt-0",r),...n})}).displayName="CardFooter"},2931:(e,t,r)=>{"use strict";function a(e,t){var r;if("string"!=typeof t)return null;let[a,n,...i]=t.split("//");return a===e&&n&&0!==i.length?{shortName:null!=(r=i.at(-1))?r:"",path:n,functionName:i.join("//")}:null}function n(e){return a("workflow",e)}function i(e){return a("step",e)}r.d(t,{Z:()=>i,s:()=>n})},4314:(e,t,r)=>{"use strict";r.d(t,{J9:()=>tt,Su:()=>j,bv:()=>S,LK:()=>w,b_:()=>f,Qz:()=>b});var a=r(4773),n=r(2287),i=r(8033);let s=(0,i.createServerReference)("603b0ae7dec510d9f44512a3046fb170b8dd229c93",i.callServer,void 0,i.findSourceMapURL,"fetchRuns"),l=(0,i.createServerReference)("60696b1b40c74e2b3a5bcf32fcef739e44b87df356",i.callServer,void 0,i.findSourceMapURL,"fetchHooks"),o=(0,i.createServerReference)("70cb8e73ec780fbea5e0f2a8b548588fcaa8bd922b",i.callServer,void 0,i.findSourceMapURL,"fetchSteps"),c=(0,i.createServerReference)("7032e7b91a6703755c895c5a4f3cd11211f7de96db",i.callServer,void 0,i.findSourceMapURL,"fetchEvents"),d=(0,i.createServerReference)("60a00aff098a73173acf8507caa708e60252d8610a",i.callServer,void 0,i.findSourceMapURL,"fetchRun"),u=(0,i.createServerReference)("7008e8253d69b099624170bb183cec9061a503838f",i.callServer,void 0,i.findSourceMapURL,"fetchStep"),m=(0,i.createServerReference)("6037937f9b3bc44dc03819f9c10ac223a7ce5c9267",i.callServer,void 0,i.findSourceMapURL,"fetchHook");var h=r(7372);let p=(0,i.createServerReference)("6023b8cf57ec100f2160cc77c293149ec5c640c6fd",i.callServer,void 0,i.findSourceMapURL,"cancelRun"),v=(0,i.createServerReference)("709f2774f453bd47e7baa00f84a9f45978c91c9c55",i.callServer,void 0,i.findSourceMapURL,"readStreamServerAction");function f(e,t){var r,i,l;let{workflowName:o,status:c,limit:d=10,sortOrder:u="desc"}=t,[m,h]=(0,a.useState)(void 0),[p,v]=(0,a.useState)(!1),[f,w]=(0,a.useState)(0),[g,x]=(0,a.useState)([void 0]),[_,b]=(0,a.useState)(1),[k,y]=(0,a.useState)(new Map([[0,{data:null,isLoading:!0,error:null}]])),j=(0,a.useRef)(new Map),S=(0,a.useCallback)(async function(t,r){let a=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=null!=r?r:"initial";if(y(e=>{var r,a;let n=new Map(e);return n.set(t,{data:null!=(a=null==(r=e.get(t))?void 0:r.data)?a:null,isLoading:!0,error:null}),n}),!a&&j.current.has(n)){let e=j.current.get(n);if(e){y(r=>{let a=new Map(r);return a.set(t,{data:e.data,isLoading:!1,error:null}),a}),h(e.cursor),v(e.hasMore);return}}try{let a=await s(e,{cursor:r,sortOrder:u,limit:d,workflowName:o,status:c});j.current.set(n,{data:a.data,cursor:a.cursor,hasMore:a.hasMore}),y(e=>{let r=new Map(e);return r.set(t,{data:a.data,isLoading:!1,error:null}),r}),h(a.cursor),v(a.hasMore)}catch(r){let e=r instanceof Error?r:Error(String(r));y(r=>{var a,n;let i=new Map(r);return i.set(t,{data:null!=(n=null==(a=r.get(t))?void 0:a.data)?n:null,isLoading:!1,error:e}),i})}},[e,o,d,u,c]);(0,a.useEffect)(()=>{S(0,void 0,!0)},[S,u,e,d,o,c]);let N=(0,a.useCallback)(()=>{if(p&&m){let e=f+1;x(e=>[...e,m]),w(e),b(t=>Math.max(t,e+1)),k.has(e)||y(t=>{let r=new Map(t);return r.set(e,{data:null,isLoading:!0,error:null}),r}),S(e,m)}},[p,m,S,f,k]),L=(0,a.useCallback)(()=>{if(f>0){let e=f-1,t=g[e];w(e),S(e,t)}},[f,g,S]),M=(0,a.useCallback)(()=>{j.current.clear(),y(new Map([[0,{data:null,isLoading:!0,error:null}]])),w(0),x([void 0]),b(1),S(0,void 0,!0)},[S]),R=null!=(i=k.get(f))?i:{data:null,isLoading:!0,error:null},T=null!=(l=null==(r=Array.from(k.values()).find(e=>e.error))?void 0:r.error)?l:null,E=Array.from(k.values()).some(e=>e.isLoading),C=p?f+2:f+1,D=f+1,I=(0,n.$g)(D,_,D===_&&p);return{data:R,allData:Array.from(k.values()),error:T,isLoading:E,currentPage:f,totalPages:C,nextPage:N,previousPage:L,hasNextPage:p,hasPreviousPage:f>0,reload:M,pageInfo:I}}function w(e,t){var r,i,s;let{runId:o,limit:c=10,sortOrder:d="desc"}=t,[u,m]=(0,a.useState)(void 0),[h,p]=(0,a.useState)(!1),[v,f]=(0,a.useState)(0),[w,g]=(0,a.useState)([void 0]),[x,_]=(0,a.useState)(1),[b,k]=(0,a.useState)(new Map([[0,{data:null,isLoading:!0,error:null}]])),y=(0,a.useRef)(new Map),j=(0,a.useCallback)(async function(t,r){let a=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=null!=r?r:"initial";if(k(e=>{var r,a;let n=new Map(e);return n.set(t,{data:null!=(a=null==(r=e.get(t))?void 0:r.data)?a:null,isLoading:!0,error:null}),n}),!a&&y.current.has(n)){let e=y.current.get(n);if(e){k(r=>{let a=new Map(r);return a.set(t,{data:e.data,isLoading:!1,error:null}),a}),m(e.cursor),p(e.hasMore);return}}try{let a=await l(e,{runId:o,cursor:r,sortOrder:d,limit:c});y.current.set(n,{data:a.data,cursor:a.cursor,hasMore:a.hasMore}),k(e=>{let r=new Map(e);return r.set(t,{data:a.data,isLoading:!1,error:null}),r}),m(a.cursor),p(a.hasMore)}catch(r){let e=r instanceof Error?r:Error(String(r));k(r=>{var a,n;let i=new Map(r);return i.set(t,{data:null!=(n=null==(a=r.get(t))?void 0:a.data)?n:null,isLoading:!1,error:e}),i})}},[e,o,c,d]);(0,a.useEffect)(()=>{j(0,void 0)},[j]);let S=(0,a.useCallback)(()=>{if(h&&u){let e=v+1;g(e=>[...e,u]),f(e),_(t=>Math.max(t,e+1)),b.has(e)||k(t=>{let r=new Map(t);return r.set(e,{data:null,isLoading:!0,error:null}),r}),j(e,u)}},[h,u,j,v,b]),N=(0,a.useCallback)(()=>{if(v>0){let e=v-1,t=w[e];f(e),j(e,t)}},[v,w,j]),L=(0,a.useCallback)(()=>{y.current.clear(),k(new Map([[0,{data:null,isLoading:!0,error:null}]])),f(0),g([void 0]),_(1),j(0,void 0,!0)},[j]),M=null!=(i=b.get(v))?i:{data:null,isLoading:!0,error:null},R=null!=(s=null==(r=Array.from(b.values()).find(e=>e.error))?void 0:r.error)?s:null,T=Array.from(b.values()).some(e=>e.isLoading),E=h?v+2:v+1,C=v+1,D=(0,n.$g)(C,x,C===x&&h);return{data:M,allData:Array.from(b.values()),error:R,isLoading:T,currentPage:v,totalPages:E,nextPage:S,previousPage:N,hasNextPage:h,hasPreviousPage:v>0,reload:L,pageInfo:D}}async function g(e,t){let r,a=[];for(;;){let n=await o(e,t,{cursor:r,sortOrder:"asc",limit:100});if(a=[...a,...n.data],!n.hasMore||!n.cursor||a.length>=1e3)break;r=n.cursor}return{data:a,cursor:r}}async function x(e,t){let r,a=[];for(;;){let n=await l(e,{runId:t,cursor:r,sortOrder:"asc",limit:100});if(a=[...a,...n.data],!n.hasMore||!n.cursor||a.length>=1e3)break;r=n.cursor}return{data:a,cursor:r}}async function _(e,t){let r,a=[];for(;;){let n=await c(e,t,{cursor:r,sortOrder:"asc",limit:1e3});if(a=[...a,...n.data],!n.hasMore||!n.cursor||a.length>=1e3)break;r=n.cursor}return{data:a,cursor:r}}function b(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},{live:n=!1}=r,[i,s]=(0,a.useState)(null),[u,m]=(0,a.useState)([]),[h,p]=(0,a.useState)([]),[v,f]=(0,a.useState)([]),[w,b]=(0,a.useState)(!0),[k,y]=(0,a.useState)(null),[j,S]=(0,a.useState)(),[N,L]=(0,a.useState)(),[M,R]=(0,a.useState)(),T=(0,a.useRef)(!1),[E,C]=(0,a.useState)(!1),D=(0,a.useCallback)(async()=>{if(!T.current){T.current=!0,b(!0),y(null);try{let r=await d(e,t);s(r);let a=await g(e,t);m(a.data),S(a.cursor);let n=await x(e,t);p(n.data),L(n.cursor);let i=await _(e,t);f(i.data),R(i.cursor)}catch(e){y(e instanceof Error?e:Error(String(e)))}finally{b(!1),T.current=!1,C(!0)}}},[e,t]),I=(0,a.useCallback)((e,t)=>Array.from(new Map([...e,...t].map(e=>[e.stepId,e])).values()),[]),P=(0,a.useCallback)((e,t)=>Array.from(new Map([...e,...t].map(e=>[e.hookId,e])).values()),[]),A=(0,a.useCallback)((e,t)=>Array.from(new Map([...e,...t].map(e=>[e.eventId,e])).values()),[]),F=(0,a.useCallback)(async()=>{let r=await o(e,t,{cursor:j,sortOrder:"asc",limit:5});return r.data.length>0&&(m(e=>I(e,r.data)),r.cursor&&S(r.cursor),!0)},[e,t,j,I]),H=(0,a.useCallback)(async()=>{let r=await l(e,{runId:t,cursor:N,sortOrder:"asc",limit:5});return r.data.length>0&&(p(e=>P(e,r.data)),r.cursor&&L(r.cursor),!0)},[e,t,N,P]),W=(0,a.useCallback)(async()=>{let r=await c(e,t,{cursor:M,sortOrder:"asc",limit:5});return r.data.length>0&&(f(e=>A(e,r.data)),r.cursor&&R(r.cursor),!0)},[e,t,M,A]),V=(0,a.useCallback)(async()=>{if(T.current||!E)return{foundNewItems:!1};let e=!1;try{let[t,r,a]=await Promise.all([F(),H(),W()]);e=t||r||a}catch(e){console.error("Update error:",e)}return{foundNewItems:e}},[F,H,W,E]);return(0,a.useEffect)(()=>{D()},[D]),(0,a.useEffect)(()=>{if(!n||!E||(null==i?void 0:i.completedAt))return;let e=setInterval(()=>{V()},5e3);return()=>clearInterval(e)},[n,E,V,null==i?void 0:i.completedAt]),{run:null!=i?i:{},steps:u,hooks:h,events:v,loading:w,error:k,update:V}}async function k(e,t,r,a){let n,i;if("run"===t)i=(n=await d(e,r)).runId;else if("step"===t){if(!a)throw Error("runId is required for step resource");i=(n=await u(e,a,r)).stepId}else if("hook"===t)i=(n=await m(e,r)).hookId;else throw Error("Unknown resource type: ".concat(t));return{data:n,correlationId:i}}async function y(e,t,r){let a,{sortOrder:n="asc",limit:i=1e3}=null!=r?r:{},s=[];for(;;){let r=await (0,h.u)(e,t,{cursor:a,sortOrder:n,limit:i});if(s=[...s,...r.data],!r.hasMore||!r.cursor||s.length>=1e3)break;a=r.cursor}return s}async function j(e,t){try{await p(e,t)}catch(e){throw console.error("Error canceling run:",e),e}}async function S(e,t,r){try{return await v(e,t,r)}catch(e){throw console.error("Error reading stream:",e),e}}var N=r(5386),L=r(2928),M=r(6489),R=r(2931);let T={pending:"workflow.status.0-pending",running:"workflow.status.1-running",completed:"workflow.status.2-completed",paused:"workflow.status.3-paused",sleep:"workflow.status.4-sleep",failed:"workflow.status.5-failed",cancelled:"workflow.status.6-cancelled"},E={name:"vercel-workflow",version:"0.1"};function C(e){let t=0;switch(e){case"completed":t=1;break;case"failed":t=2;break;default:t=0}return{code:t}}function D(e){return"sleep"===("stepId"in e?e.stepName:"").toLowerCase()?T.sleep:"hookId"in e?"workflow.hook":I(e.status)}function I(e){return"pending"===e?T.pending:"running"===e?T.running:"completed"===e?T.completed:"paused"===e?T.paused:"failed"===e?T.failed:"cancelled"===e?T.cancelled:T.pending}function P(e){if(!e||!(e instanceof Date))return[0,0];let t=e.getTime();return[Math.floor(t/1e3),t%1e3*1e6]}function A(e,t){if(!e||!(e instanceof Date))return[0,0];let r=(t&&t instanceof Date?t:new Date).getTime()-e.getTime();return[Math.floor(r/1e3),r%1e3*1e6]}let F=new Set(["hook_created","hook_received","hook_disposed","step_retrying","step_failed","workflow_failed"]);function H(e){let t=!(arguments.length>1)||void 0===arguments[1]||arguments[1];return e.filter(e=>!t||F.has(e.eventType)).map(e=>{var t;return{name:e.eventType,timestamp:P(e.createdAt),attributes:{eventId:e.eventId,correlationId:e.correlationId,eventData:"eventData"in e?e.eventData:void 0},showVerticalLine:"hook_created"===(t=e.eventType)||"hook_received"===t||"hook_disposed"===t}})}function W(e){let{summary:t,children:r}=e;return(0,N.jsxs)("details",{className:"group",children:[(0,N.jsx)("summary",{className:"cursor-pointer rounded-md border px-3 py-2 text-copy-14 hover:brightness-95",style:{borderColor:"var(--ds-gray-300)",backgroundColor:"var(--ds-gray-100)",color:"var(--ds-gray-900)"},children:t}),(0,N.jsx)("div",{className:"p-2",children:r})]})}let V=e=>(0,N.jsx)("pre",{className:"text-copy-12 overflow-x-auto rounded-md border p-4",style:{borderColor:"var(--ds-gray-300)",backgroundColor:"var(--ds-gray-100)",color:"var(--ds-gray-1000)"},children:(0,N.jsx)("code",{children:JSON.stringify(e,null,2)})}),O=["workflowName","stepName","status","stepId","hookId","eventId","runId","attempt","token","correlationId","eventType","deploymentId","ownerId","projectId","environment","executionContext","createdAt","startedAt","updatedAt","completedAt","error","errorCode","metadata","eventData","input","output"],B=(e,t)=>(O.indexOf(e)||0)-(O.indexOf(t)||0),z={workflowName:e=>{var t,r;return null!=(r=null==(t=(0,R.s)(String(e)))?void 0:t.shortName)?r:"?"},stepName:e=>{var t,r;return null!=(r=null==(t=(0,R.Z)(String(e)))?void 0:t.shortName)?r:"?"},runId:e=>String(e),stepId:e=>String(e),hookId:e=>String(e),eventId:e=>String(e),status:e=>String(e),attempt:e=>String(e),token:e=>String(e),eventType:e=>String(e),correlationId:e=>String(e),deploymentId:e=>String(e),ownerId:e=>null,projectId:e=>null,environment:e=>null,executionContext:e=>null,createdAt:e=>new Date(String(e)).toLocaleString(),startedAt:e=>new Date(String(e)).toLocaleString(),updatedAt:e=>new Date(String(e)).toLocaleString(),completedAt:e=>new Date(String(e)).toLocaleString(),metadata:V,input:e=>{let t=Array.isArray(e)?e.length:0;return(0,N.jsx)(W,{summary:"Input (".concat(t," arguments)"),children:Array.isArray(e)?e.map((e,t)=>(0,N.jsx)("div",{className:"mt-2",children:V(e)},t)):V(e)})},output:e=>(0,N.jsx)(W,{summary:"Output",children:V(e)}),error:e=>(0,N.jsx)(W,{summary:"Error",children:V(e)}),errorCode:V,eventData:e=>(0,N.jsx)(W,{summary:"Event Data",children:V(e)})},q=["input","output","error","errorCode","metadata","eventData"],U=e=>{let{attribute:t,value:r,isLoading:a}=e,n=z[t];if(!n)return null;let i=n(r);return i?(0,N.jsxs)("div",{className:"relative",children:["boolean"==typeof a&&a&&(0,N.jsx)("div",{className:"absolute top-2 right-2",children:(0,N.jsx)("div",{className:"animate-spin rounded-full h-4 w-4 border-b-2",style:{borderColor:"var(--ds-gray-900)"}})}),(0,N.jsxs)("div",{className:"flex flex-col gap-0 my-2",children:[(0,N.jsx)("span",{className:"font-medium",style:{color:"var(--ds-gray-500)"},children:t}),(0,N.jsx)("span",{style:{color:"var(--ds-gray-1000)"},children:i})]},t)]}):null},K=e=>{let{data:t,isLoading:r,error:a}=e,n=Object.keys(t).filter(e=>!q.includes(e)).sort(B),i=Object.keys(t).filter(e=>q.includes(e)).sort(B);return(0,N.jsxs)("div",{children:[n.map(e=>(0,N.jsx)(U,{attribute:e,value:t[e]},e)),a?(0,N.jsxs)("div",{className:"text-copy-14 text-red-600",children:["Failed to load step details: ",a.message]}):i.map(e=>(0,N.jsx)(U,{isLoading:r,attribute:e,value:t[e]},e))]})};function G(e){let{correlationId:t,env:r,events:n}=e,i=(0,a.useCallback)(()=>(0,h.u)(r,t,{sortOrder:"asc",limit:100,withData:!0}).then(e=>H(e.data||[],!1)),[r,t]),{data:s,error:l,isLoading:o}=(0,M.Ay)(["workflow","events",t],i,{fallbackData:n,revalidateOnFocus:!1}),c=s||n||[];return(0,N.jsxs)("div",{className:"mt-2",style:{color:"var(--ds-gray-1000)"},children:[(0,N.jsx)("h4",{children:"Associated Events"}),l?(0,N.jsxs)("div",{children:["Error loading events: ",l.message]}):null,o?(0,N.jsx)("div",{children:"Loading events..."}):null,c.length>0&&!l?(0,N.jsxs)(N.Fragment,{children:[(0,N.jsxs)("h3",{className:"text-heading-16 font-medium mt-4 mb-2",style:{color:"var(--ds-gray-1000)"},children:["Events (",c.length,")"]}),(0,N.jsx)("div",{className:"flex flex-col gap-2",children:c.map((e,t)=>(0,N.jsx)(W,{summary:(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)("span",{className:"font-medium",style:{color:"var(--ds-gray-1000)"},children:e.name})," ","-"," ",(0,N.jsx)("span",{style:{color:"var(--ds-gray-700)"},children:new Date(1e3*e.timestamp[0]+e.timestamp[1]/1e6).toLocaleString()})]}),children:(0,N.jsxs)("div",{className:"mt-2 px-4",children:[Object.entries(e.attributes).filter(e=>{let[t]=e;return"eventData"!==t}).map(e=>{let[t,r]=e;return(0,N.jsx)(U,{attribute:t,value:r},t)}),(0,N.jsxs)("div",{className:"relative",children:[l&&(0,N.jsx)("div",{children:"Error loading event data"}),!l&&!o&&e.attributes.eventData&&(0,N.jsx)(U,{isLoading:o,attribute:"eventData",value:e.attributes.eventData})]})]})},"".concat(e.name,"-").concat(t)))})]}):null]})}let X={root:{startTime:0,endTime:1,duration:1,depth:0,children:[]},spanMap:{},resourceMap:{},filter:"",selected:null,baseScale:1,scaleRatio:1,scale:1,width:640,height:480,timelineWidth:640,timelineHeight:480,panelWidth:380,panelHeight:480,scrollbarWidth:0,timelineRef:{current:null},scrollSnapshotRef:{current:void 0},memoCacheRef:{current:new Map},getQuickLinks:()=>[],withPanel:!1,isMobile:!1,customPanelComponent:null},$=e=>(e.width-e.scrollbarWidth-Number(!!(e.selected&&e.withPanel))*e.panelWidth)/e.root.duration,Z=(0,a.createContext)({state:X,dispatch:()=>{}});Z.displayName="TraceViewerContext";let Q=(e,t)=>{switch(t.type){case"setRoot":return e.scrollSnapshotRef.current=void 0,e.memoCacheRef.current.clear(),Q({...e,root:t.root,spanMap:t.spanMap,resourceMap:Object.fromEntries(t.resources.map(e=>{let{name:t,attributes:r}=e;return[t,r]}))},{type:"detectBaseScale"});case"setSize":{let r=t.height-56-40-24,a=e.withPanel&&t.width<=768,n={...e,width:t.width,height:t.height,timelineWidth:t.width-Number(!!(e.selected&&e.withPanel&&!a))*e.panelWidth,timelineHeight:r,panelHeight:r,isMobile:a};return n.width!==e.width&&(n=Q(n,{type:"detectBaseScale"})),n}case"setPanelWidth":{let r=Math.max(240,Math.min(t.width,e.width-240));return{...e,timelineWidth:e.width-r,panelWidth:r}}case"setFilter":return{...e,filter:t.filter};case"deselect":return Q({...e,selected:null,timelineWidth:e.width},{type:"minScale"});case"select":{let r=e.spanMap[t.id];if(!r)return e;return{...e,selected:r,timelineWidth:e.width-(e.withPanel&&!e.isMobile?e.panelWidth:0)}}case"escape":if(e.selected)return Q(e,{type:"deselect"});return Q(e,{type:"resetScale"});case"toggleSelection":{var r;let a=e;if(e.selected&&(a=Q(a,{type:"deselect"})),(null==(r=e.selected)?void 0:r.span.spanId)===t.id)return a;return Q(a,{type:"select",id:t.id})}case"detectBaseScale":{let t=(e.width-e.scrollbarWidth)/e.root.duration;return{...e,baseScale:t,scale:t*e.scaleRatio}}case"setScale":return{...e,scaleRatio:t.scale,scale:e.baseScale*t.scale};case"resetScale":return Q(e,{type:"scaleToRange",t1:e.root.startTime,t2:e.root.endTime});case"scaleToNode":{let r=e.spanMap[t.id];if(!r)return e;return Q(Q(e,{type:"setScale",scale:(e.width-e.scrollbarWidth-(e.withPanel&&!e.isMobile?e.panelWidth:0))/r.duration/e.baseScale}),{type:"setScrollSnapshot",anchorT:r.startTime-e.root.startTime,anchorX:0})}case"scaleToRange":{let r=Math.abs(t.t1-t.t2);return Q(Q(e,{type:"setScale",scale:(e.width-e.scrollbarWidth-(e.selected&&e.withPanel?e.panelWidth:0))/r/e.baseScale}),{type:"setScrollSnapshot",anchorT:Math.min(t.t1,t.t2)-e.root.startTime,anchorX:0})}case"adjustScaleRatio":{let{scaleRatio:r}=e;switch(t.direction){case -1:r*=.8;break;case 1:r*=1.25;break;default:r=1}let a=e.timelineRef.current;if(!a)return console.warn("timelineRef is null"),e;let{clientWidth:n,scrollLeft:i}=a;return Q(Q({...e,scaleRatio:r,scale:e.baseScale*r},{type:"minScale"}),{type:"setScrollSnapshot",anchorT:(i+.5*n)/e.scale,anchorX:.5*n})}case"trackpadScale":{let r=Math.max($(e)/e.baseScale,e.scaleRatio*(1+.2*Math.sign(t.delta)*Math.sqrt(Math.abs(t.delta))));return Q({...e,scaleRatio:r,scale:e.baseScale*r},{type:"setScrollSnapshot",anchorT:t.anchorT,anchorX:t.anchorX})}case"minScale":{let t=$(e);if(e.scale>=t)return e;return{...e,scale:t,scaleRatio:t/e.baseScale}}case"setScrollSnapshot":{let r=e.timelineRef.current;if(!r)return e;let{anchorT:a,anchorX:n}=t,i=a*e.scale-n,{scrollTop:s}=r,l=(s-24-8)/26,o=l+Math.ceil(e.timelineHeight/26);return e.scrollSnapshotRef.current={anchorT:a,anchorX:n,scrollLeft:i,scrollTop:s,startTime:e.root.startTime+i/e.scale,endTime:e.root.startTime+(i+e.timelineWidth)/e.scale,startRow:l,endRow:o,scale:e.scale},e}case"setWithPanel":if(e.withPanel===t.withPanel)return e;return{...e,withPanel:t.withPanel};case"forceRender":return e.memoCacheRef.current.set("",{}),{...e}}};function Y(e){let{getQuickLinks:t,withPanel:r=!1,children:n,customSpanClassNameFunc:i,customSpanEventClassNameFunc:s,customPanelComponent:l=null}=e,o=(0,a.useRef)(null),c=(0,a.useRef)(void 0),d=(0,a.useRef)(t);d.current=t;let u=(0,a.useRef)(new Map),m=(0,a.useRef)(new Map),[h,p]=(0,a.useReducer)(Q,X,e=>({...e,scrollbarWidth:(()=>{if(!("document"in globalThis))return 0;let e=document.createElement("div");e.style.width="".concat(400,"px"),e.style.height="".concat(400,"px"),e.style.overflow="scroll",document.body.appendChild(e);let t=400-e.scrollWidth;return e.remove(),t})(),timelineRef:o,scrollSnapshotRef:c,customSpanClassNameFunc:i,customSpanEventClassNameFunc:s,customPanelComponent:l,memoCacheRef:u,withPanel:r,getQuickLinks:e=>{var t;let r=e.spanId,a=m.current.get(r);if(a)return a;let n=(null==(t=d.current)?void 0:t.call(d,e))||[];return m.current.set(r,n),n}}));(0,a.useEffect)(()=>p({type:"setWithPanel",withPanel:r}),[r]);let v=(0,a.useMemo)(()=>({state:h,dispatch:p}),[h,p]);return(0,N.jsx)(Z.Provider,{value:v,children:n})}let J=()=>(0,a.useContext)(Z);var ee=r(6229),et=r.n(ee);function er(e){let[t,r]=e;return 1e3*t+r/1e6}function ea(e){return[Math.floor(e/1e3),e%1e3*1e3]}let en=new Intl.NumberFormat(void 0,{maximumFractionDigits:2});function ei(e){return 0===e?"0":e>=1e3?"".concat(en.format(e/1e3),"s"):"".concat(en.format(e),"ms")}let es=new Intl.NumberFormat(void 0,{minimumFractionDigits:2,maximumFractionDigits:2});function el(e){return e>=1e3?"".concat(es.format(e/1e3),"s"):"".concat(es.format(e),"ms")}let eo=(e,t)=>e.duration*t>=500,ec=e=>e.isVercel?String(et().colorVercel):String(et()["color".concat(e.resourceIndex%5)]),ed=(e,t)=>{let r=eo(e,t),a=e.isHovered&&!r&&!1!==e.isHighlighted;return(0,L.$)(et().spanNode,r&&et().huge,e.duration*t<64&&et().small,e.isSelected&&et().selected,a&&et().xHover,e.isHighlighted?et().colorHighlight:ec(e),!1===e.isHighlighted&&et().unlit)},eu=(0,a.memo)(function(e){let{root:t,scale:r,spans:a,scrollSnapshotRef:n,cache:i,customSpanClassNameFunc:s,customSpanEventClassNameFunc:l}=e;return a.map(e=>(0,N.jsx)(em,{cacheKey:i.get(e.span.spanId),customSpanEventClassNameFunc:l,customSpanClassNameFunc:s,node:e,root:t,scale:r,scrollSnapshotRef:n},e.span.spanId))}),em=(0,a.memo)(function(e){let{node:t,root:r,scale:n,scrollSnapshotRef:i,customSpanClassNameFunc:s,customSpanEventClassNameFunc:l}=e,o=(0,a.useRef)(null);t.ref=o;let{span:c}=t,d=t.isInstrumentationHint?"Get Started":ei(t.duration),u=(t.startTime-r.startTime)*n,m=24+26*t.row,h=t.duration*n,p=Math.max(h,4),v=24,f=eo(t,n),w=h<64,g=t.isHovered&&!f&&!1!==t.isHighlighted;w&&!g&&(v*=.4,m+=(24-v)*.5);let x=!1;if(g){let{duration:e,endTime:a}=r,n=i.current;n&&(e=n.endTime-n.startTime,a=n.endTime),x=a-t.startTime<.25*e}let _=s?s(t):"";return(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)("button",{"aria-label":"".concat(c.name," - ").concat(d),className:(0,L.$)(ed(t,n),_),"data-span-id":c.spanId,"data-start-time":t.startTime-r.startTime,"data-right-side":x,ref:o,style:{"--span-width":"".concat(Math.max(h,1),"px"),minWidth:g?p:void 0,width:g?void 0:p,height:v,maxWidth:g&&!x?(r.endTime-t.startTime)*n:void 0,containIntrinsicWidth:g?void 0:p,containIntrinsicHeight:v,left:x?void 0:u,right:x?(r.endTime-t.endTime)*n:void 0,top:m},type:"button",children:w&&!g?null:(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)("span",{className:et().spanName,children:t.label||c.name}),f?(0,N.jsx)("span",{className:et().spanSpacer}):null,g||p>128?(0,N.jsx)("span",{className:et().spanDuration,children:d}):null]})}),t.events&&!w?t.events.map(e=>(0,N.jsx)(eh,{customSpanEventClassNameFunc:l,event:e,node:t,root:r,scale:n},e.key)):null]})}),eh=(0,a.memo)(function(e){let{event:t,node:r,root:n,scale:i,customSpanEventClassNameFunc:s}=e,l=(0,a.useRef)(null);t.ref=l;let{event:{name:o}}=t,c=ei(t.timestamp-n.startTime),d=(t.timestamp-n.startTime)*i,u=24+26*r.row,m=s?s(t):"";return(0,N.jsxs)("div",{title:"".concat(o," at ").concat(c),className:(0,L.$)(et().spanNodeEvent,m,r.isHighlighted?et().colorHighlight:ec(r),!1===r.isHighlighted&&et().unlit),"data-hovered":t.isHovered,ref:l,style:{left:d,top:u},children:[(0,N.jsxs)("div",{className:(0,L.$)(et().hoverInfo,(t.timestamp-r.startTime)/r.duration<.5?et().alignStart:et().alignEnd),children:[(0,N.jsx)("span",{className:et().eventName,children:o}),(0,N.jsx)("span",{className:et().eventTimestamp,children:c})]}),(0,N.jsx)("div",{className:et().eventDiamond})]})}),ep={"gray-700":"var(--ds-gray-700)","gray-900":"var(--ds-gray-900)"};function ev(e){let{size:t=16,color:r="gray-700"}=e,a={color:ep[r]||r};return(0,N.jsxs)("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",style:a,"aria-hidden":!0,children:[(0,N.jsx)("title",{children:"Cross"}),(0,N.jsx)("path",{d:"M6 6l12 12M18 6L6 18",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})]})}function ef(e){let{size:t=16}=e;return(0,N.jsxs)("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none","aria-hidden":!0,className:et().detailHeadingIcon,children:[(0,N.jsx)("title",{children:"Chevron Down"}),(0,N.jsx)("path",{d:"M6 9l6 6 6-6",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]})}function ew(e){let{size:t=16,color:r="gray-900"}=e,a={color:ep[r]||r};return(0,N.jsxs)("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",style:a,"aria-hidden":!0,children:[(0,N.jsx)("title",{children:"External Small"}),(0,N.jsx)("path",{d:"M14 4h6m0 0v6m0-6L10 14",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),(0,N.jsx)("path",{d:"M20 14v4a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h4",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})]})}function eg(e){let{as:t,className:r,href:a,children:n,...i}=e;return"span"!==(t||"a")&&a?(0,N.jsx)("a",{className:r,href:a,...i,children:n}):(0,N.jsx)("span",{className:r,...i,children:n})}function ex(e){let{className:t,children:r,size:a,...n}=e;return(0,N.jsx)("a",{...n,className:(0,L.$)(et().buttonLink,t),children:r})}function e_(e){let{children:t,className:r}=e;return(0,N.jsx)("div",{className:(0,L.$)(et().note,r),children:t})}function eb(e){let{width:t,height:r,rounded:a}=e;return(0,N.jsx)("span",{className:(0,L.$)(et().skeleton,a&&et().skeletonRounded),style:{width:t,height:r},"aria-hidden":!0})}let ek=e=>"".concat((100*e).toFixed(3),"%"),ey=(e,t)=>e<t?-1:+(e>t),ej=e=>{let t={};for(let[r,a]of Object.entries(e)){let e=r.indexOf("."),n="",i="";-1!==e?(n=r.substring(0,e),i=r.substring(e+1)):i=r;let s=t[n];s||(s={prefix:n,attributes:[]},t[n]=s),s.attributes.push({key:r,suffix:i,value:String(a)})}let r=Array.from(Object.values(t)).sort((e,t)=>ey(e.prefix,t.prefix));for(let e of r)e.attributes.sort((e,t)=>ey(e.suffix,t.suffix));return r},eS=()=>{var e;let{state:{root:t,selected:r,resourceMap:n,getQuickLinks:i},dispatch:s}=J(),l=(0,a.useMemo)(()=>((e,t)=>{let r=[];if(!t)return r;for(let e=t;"parent"in e;e=e.parent)r.unshift(e);return r})(0,r),[t,r]),o=(0,a.useMemo)(()=>{var e;return ej(null!=(e=null==r?void 0:r.span.attributes)?e:{})},[r]),c=(0,a.useMemo)(()=>{let e=null==r?void 0:r.span.resource;if(!e)return[];let t=n[e];return t?ej(t):[]},[n,r]);if(!r)return null;let{span:d}=r,u=eD(r);return(0,N.jsxs)(N.Fragment,{children:[r.isVercel?(0,N.jsx)(eI,{node:r}):null,r.isInstrumentationHint?(0,N.jsx)(eF,{}):null,!r.isInstrumentationHint&&l.length?(0,N.jsx)(eM,{className:et().ancestorGroup,name:"Location",children:l.map(e=>(0,N.jsxs)("button",{className:et().ancestorNode,onClick:()=>s({type:"select",id:e.span.spanId}),type:"button",children:[(0,N.jsxs)("div",{className:et().ancestorText,children:[(0,N.jsx)("span",{className:et().ancestorName,children:e.label||e.span.name}),(0,N.jsx)("span",{className:et().ancestorDuration,children:ei(e.duration)})]}),(0,N.jsx)("span",{"aria-hidden":!0,className:et().ancestorLineContainer,children:(0,N.jsx)("span",{className:(0,L.$)(et().ancestorLine,ec(e)),style:{left:ek((e.startTime-t.startTime)/t.duration),width:ek(e.duration/t.duration)}})})]},"".concat(r.span.spanId,".").concat(e.span.spanId)))}):null,u?(0,N.jsx)(eP,{getQuickLinks:i,span:r.span}):null,(null==(e=r.events)?void 0:e.length)?(0,N.jsx)(eM,{name:"Events",children:r.events.map(e=>(0,N.jsxs)(a.Fragment,{children:[(0,N.jsxs)("dl",{className:et().spanDetailPanelAttribute,children:[(0,N.jsx)("dt",{className:et().spanDetailPanelAttributeKey,children:e.event.name}),(0,N.jsx)("dd",{className:et().spanDetailPanelAttributeValue,children:ei(e.timestamp-t.startTime)})]}),Object.entries(e.event.attributes).map(t=>{let[r,a]=t;return(0,N.jsx)(eH,{name:"".concat(e.event.name,".").concat(r),value:a},r)})]},e.key))}):null,o.length?(0,N.jsx)(eM,{name:"Attributes",children:o.map(e=>(0,N.jsx)(a.Fragment,{children:e.attributes.map(e=>{let{key:t,value:r}=e;return(0,N.jsx)(eH,{name:t,value:r},t)})},e.prefix))}):null,c.length?(0,N.jsx)(eM,{name:"Resource",children:c.map(e=>(0,N.jsx)(a.Fragment,{children:e.attributes.map(e=>{let{key:t,value:r}=e;return(0,N.jsx)(eH,{name:t,value:r},t)})},e.prefix))}):null,r.isInstrumentationHint?null:(0,N.jsxs)(eM,{name:"Library",children:[(0,N.jsx)(eH,{name:"name",value:d.library.name}),d.library.version?(0,N.jsx)(eH,{name:"version",value:d.library.version}):null]})]})};function eN(e){let{attached:t=!1}=e,{state:{selected:r,isMobile:a,customPanelComponent:n},dispatch:i}=J();if(!r)return null;let{span:s}=r;return(0,N.jsxs)("div",{className:(0,L.$)(et().spanDetailPanel,a&&et().mobile),children:[t&&!a?(0,N.jsx)(eW,{}):null,(0,N.jsx)("div",{className:et().spanDetailPanelTop,children:(0,N.jsxs)("div",{className:et().spanDetailPanelTopInfo,children:[(0,N.jsxs)("div",{className:et().spanDetailPanelTruncatedHeading,children:[r.isInstrumentationHint?null:(0,N.jsx)("span",{className:et().spanDetailPanelDuration,children:ei(r.duration)}),(0,N.jsx)("span",{className:et().spanDetailPanelName,title:s.name,children:s.name})]}),(0,N.jsxs)("div",{className:et().spanDetailPanelCorner,children:[(0,N.jsx)("div",{className:et().spanDetailPanelCloseVerticalRule}),(0,N.jsx)("button",{"aria-label":"Close Span Details",className:et().spanDetailPanelClose,onClick:()=>i({type:"deselect"}),type:"button",children:(0,N.jsx)(ev,{color:"gray-700",size:24})})]})]})}),(0,N.jsx)("div",{className:(0,L.$)("flex gap-3",et().spanDetailPanelBody),children:n||(0,N.jsx)(eS,{})})]})}let eL="vc-trace-span-exp:";function eM(e){let{name:t,className:r="",children:n}=e,[i,s]=(0,a.useState)(()=>!("localStorage"in globalThis)||"0"!==localStorage.getItem("".concat(eL).concat(t))),l=(0,a.useCallback)(()=>{s(e=>{let r=!e;return localStorage.setItem("".concat(eL).concat(t),String(Number(r))),r})},[t]);return(0,N.jsxs)("div",{className:(0,L.$)(et().detailGroup,i?et().expanded:et().collapsed,r),children:[(0,N.jsxs)("button",{className:et().detailHeading,onClick:l,type:"button",children:[(0,N.jsx)("span",{children:t}),(0,N.jsx)(ef,{})]}),i?n:null]})}let eR=new Set(["OPTIONS","HEAD","GET","PUT","POST","DELETE"]),eT={"Resolve Deployment":"How long it took Vercel's routing layer to retrieve details for the deployment.","Resolve Cache":"How long it took Vercel's routing layer to check for a cached function invocation.","Resolve Route":"How long it took Vercel's routing layer to resolve routing rules, including redirects and rewrites.","Invoke Middleware":"How long it took this middleware to start and run user code.","Invoke Function":"How long it took this Vercel Function to start and run user code.",waitUntil:"How long it took to run user code inside of waitUntil.","Start VM":"How long it took to start the Virtual Machine which contains the Vercel Function.","Spawn Node.js":"How long it took the Virtual Machine to start the Node.js runtime.","Spawn Python":"How long it took the Virtual Machine to start the Python runtime.","Init User Code":"How long it took to import the user code and run any globally-scoped code."},eE=new Set(["Start VM","Spawn Node.js","Spawn Python","Init User Code"]),eC=e=>{if(!e||!("span"in e))return null;let t=e.span.attributes,r=t["vercel.region"]||t["vercel.function.region"];return r?String(r):null},eD=e=>{if(!e.isVercel)return!1;let{name:t}=e.span,r=t.indexOf(" ");if(-1===r)return!1;let a=t.substring(0,r);return eR.has(a)};function eI(e){let{node:t}=e,{name:r}=t.span,a=eT[r];if(!a&&eD(t)&&(a="How long it took for Vercel to process the request and send the response."),!a)return null;let n=(e=>{let{name:t}=e.span,r=eC(e),a=eC(e.parent);return"true"===e.span.attributes["vercel.middleware.internal"]?"The Vercel Toolbar created this middleware.":eE.has(t)||"Invoke Function"===t&&e.children.some(e=>eE.has(e.span.name))?"This function encountered a cold start.":r&&a&&r!==a?"This request was routed across regions.":null})(t);return(0,N.jsx)(eM,{name:"What is this?",children:(0,N.jsxs)("div",{className:et().infraSpanDescription,children:[(0,N.jsx)("span",{children:a}),n?(0,N.jsx)(e_,{children:n}):n]})})}let eP=(0,a.memo)(function(e){let{getQuickLinks:t,span:r}=e,a=t(r);return a.length?(0,N.jsx)(eM,{name:"Links",children:a.map(e=>{let{key:t,value:r}=e;return(0,N.jsx)(eA,{link:r,name:t},t)})}):null});function eA(e){let{name:t,link:r}=e,n=function(e){let[t,r]=(0,a.useState)({}),n=void 0!==e.__resolvedValue||void 0!==e.__rejectedValue;return(0,a.useEffect)(()=>{n||e.then(t=>{e.__resolvedValue=t}).catch(t=>{e.__rejectedValue=t}).finally(()=>r({}))},[e,n]),e.__resolvedValue}(r);return(0,N.jsxs)(eg,{as:n?void 0:"span",className:(0,L.$)(et().spanDetailPanelAttribute,et().spanDetailPanelQuickLink),href:(null==n?void 0:n.href)||"",children:[(0,N.jsx)("span",{className:et().spanDetailPanelAttributeKey,children:t}),(0,N.jsx)("span",{className:(0,L.$)(et().spanDetailPanelAttributeValue,et().spanDetailPanelQuickLinkLabel),children:n?(0,N.jsxs)(N.Fragment,{children:[n.label,n.icon||(0,N.jsx)(ew,{color:"gray-900"})]}):(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(eb,{height:18,width:32+8*t.length}),(0,N.jsx)(eb,{height:18,rounded:!0,width:18})]})})]})}function eF(){return(0,N.jsx)(eM,{name:"What is this?",children:(0,N.jsxs)("div",{className:et().infraSpanDescription,children:[(0,N.jsx)("span",{children:"You can visualize your application's spans alongside Vercel's spans in this viewer."}),(0,N.jsx)(ex,{href:"https://vercel.com/docs/session-tracing#adding-custom-spans",size:"small",target:"_blank",children:"Get Started"})]})})}function eH(e){let{name:t,value:r}=e;return(0,N.jsxs)("dl",{className:et().spanDetailPanelAttribute,children:[(0,N.jsx)("dt",{className:et().spanDetailPanelAttributeKey,children:t}),(0,N.jsx)("dd",{className:et().spanDetailPanelAttributeValue,title:String(r),children:String(r)})]})}function eW(){let{state:{panelWidth:e},dispatch:t}=J(),r=(0,a.useRef)({start:{x:0,width:e},x:0,width:e,isHeld:!1});r.current.width=e;let n=(0,a.useCallback)(e=>{if("mouse"!==e.pointerType)return;e.preventDefault();let t=r.current;t.start.x=e.clientX,t.x=e.clientX,t.start.width=t.width,t.isHeld=!0},[]),i=(0,a.useCallback)(()=>{t({type:"setPanelWidth",width:X.panelWidth})},[t]);return(0,a.useEffect)(()=>{let e=0,a=()=>{let e=r.current;t({type:"setPanelWidth",width:e.start.width+e.start.x-e.x})},n=t=>{r.current.isHeld&&(t.preventDefault(),r.current.x=t.clientX,cancelAnimationFrame(e),e=requestAnimationFrame(a))},i=()=>{r.current.isHeld=!1};return window.addEventListener("pointermove",n),window.addEventListener("pointerup",i),()=>{window.removeEventListener("pointermove",n),window.removeEventListener("pointerup",i)}},[t]),(0,N.jsx)("div",{"aria-hidden":!0,className:et().spanDetailPanelResizer,onDoubleClick:i,onPointerDown:n})}function eV(e){let t=(0,a.useRef)({});return{setStyle:(0,a.useCallback)((r,a)=>{if(t.current[r]=a,e.current){if(!a)return void e.current.style.removeProperty(r);e.current.style.setProperty(r,a)}},[e]),styleRef:t,style:{...t.current}}}let eO=(0,a.memo)(function(e){let{timelineRef:t,rows:r,scale:n}=e,{state:{root:i,baseScale:s,timelineWidth:l,width:o,scrollbarWidth:c}}=J(),d=o+16,u=(()=>{let[e,t]=(0,a.useState)(1);return(0,a.useLayoutEffect)(()=>{let r=()=>t("devicePixelRatio"in globalThis&&globalThis.devicePixelRatio||1),a=matchMedia("(resolution: ".concat(e,"dppx)"));return a.addEventListener("change",r),r(),()=>{a.removeEventListener("change",r)}},[e]),e})(),m=(0,a.useRef)(null),h=(0,a.useRef)(null),p=o/(o-c)*Math.min(o/l,s/n),v=Math.min(o,(l-c)*p);(0,a.useEffect)(()=>{let e,r=!1,a=0,n=e=>{var t;return!!(null==(t=m.current)?void 0:t.contains(e))},i=0,s=()=>{if(!r||!e)return;let n=t.current;n&&(n.scrollLeft=(a-.5*v-e.left)/p)},l=e=>{({clientX:a}=e),cancelAnimationFrame(i),i=requestAnimationFrame(s)},o=t=>{var a;n(t.target)&&(r=!0,e=null==(a=m.current)?void 0:a.getBoundingClientRect(),l(t))},c=()=>{r=!1,e=void 0},d=e=>{n(e.target)&&e.cancelable&&e.preventDefault()},u=e=>{r&&e.cancelable&&e.preventDefault()};return window.addEventListener("pointerdown",o),window.addEventListener("pointermove",l),window.addEventListener("pointerup",c),window.addEventListener("blur",c),window.addEventListener("touchstart",d,{passive:!1}),window.addEventListener("touchmove",u,{passive:!1}),()=>{window.removeEventListener("pointerdown",o),window.removeEventListener("pointermove",l),window.removeEventListener("pointerup",c),window.removeEventListener("blur",c),window.removeEventListener("touchstart",d),window.removeEventListener("touchmove",u),cancelAnimationFrame(i)}},[t,p,v]),(0,a.useEffect)(()=>{let e=h.current,t=null==e?void 0:e.getContext("2d");if(!e||!t)return;let a=requestAnimationFrame(()=>{t.resetTransform(),t.clearRect(0,0,e.width,e.height),t.scale(u,u);let a=(d-16)/i.duration;for(let e of(t.fillStyle="#ccc",t.beginPath(),r))for(let r of e){let e=7+4*r.row;if(e>=45)break;let n=8+(r.startTime-i.startTime)*a,s=r.duration*a;t.roundRect(n,e,s,3,3)}t.fill()});return()=>cancelAnimationFrame(a)},[u,i,d,r]);let f=(0,a.useRef)(null),{style:w,setStyle:g}=eV(f);return(0,a.useLayoutEffect)(()=>{let e=t.current;if(!e)return;let r=0,a=()=>{g("transform","translateX(".concat(8+e.scrollLeft*p,"px)"))};a();let n=()=>{cancelAnimationFrame(r),r=requestAnimationFrame(a)};return e.addEventListener("scroll",n),()=>{cancelAnimationFrame(r),e.removeEventListener("scroll",n)}},[t,p,g]),(0,N.jsxs)("div",{className:et().mapContainer,ref:m,style:{width:v>0?d:"100%",height:56},children:[(0,N.jsx)("canvas",{className:et().mapCanvas,height:56*u,ref:h,style:{width:d,height:56},width:d*u}),(0,N.jsx)("div",{className:et().mapThumb,ref:f,style:{transform:w.transform,width:v>0?v:"calc(100% - ".concat(16,"px)"),top:2,height:52}})]})}),eB=[1,2,4,5,8,10];function ez(e){let{scale:t}=e,{state:{root:r}}=J(),a=r.duration,n=Math.floor(Math.log10(a)),i=Math.max(2,10**n*(Math.floor(Math.log10(.5*a))===n?1:.5)),s=i*t,l=1;for(let e of eB){if(i/e<24)break;l=e}i/=l,s/=l;let o=Math.ceil(a/i),c=Math.ceil(100/s)||1;return(0,N.jsx)("div",{className:et().markersContainer,children:(0,N.jsx)("div",{"aria-hidden":!0,className:et().markers,style:{width:Math.floor(r.duration*t+15),visibility:-1!==t?"visible":"hidden","--marker-width":"".concat(s,"px")},children:Array(o).fill(null).map((e,t)=>{let r=t%c==0;return(0,N.jsx)("span",{className:(0,L.$)(et().marker,!r&&et().notch),children:r?(0,N.jsx)("span",{className:et().markerLabel,children:ei(i*t)}):null},String(t))})})})}function eq(e){let{events:t,root:r,scale:n}=e,i=(0,a.useMemo)(()=>t.filter(e=>!1!==e.event.showVerticalLine),[t]);return(0,N.jsx)("div",{className:et().eventMarkersContainer,children:(0,N.jsx)("div",{"aria-hidden":!0,className:et().eventMarkers,style:{width:Math.floor(r.duration*n)},children:i.map(e=>(0,N.jsx)("span",{className:(0,L.$)(et().eventMarker),style:{left:Math.floor((e.timestamp-r.startTime)*n),...e.event.color&&{borderLeftColor:e.event.color}}},e.key))})})}function eU(e){let{memoCacheRef:t,timelineRef:r,root:n,spans:i,events:s,scale:l,dispatch:o,scrollSnapshotRef:c}=e,d=(0,a.useRef)(!1),u=(0,a.useRef)(i);u.current=i;let m=(0,a.useRef)(s);m.current=s;let h=(0,a.useRef)(null),{style:p,setStyle:v}=eV(h),f=(0,a.useRef)(null),w=(0,a.useRef)(null),{style:g,setStyle:x}=eV(w),_=(0,a.useRef)(void 0),b=(0,a.useRef)(null),{style:k,setStyle:y}=eV(b),j=(0,a.useRef)(0);(0,a.useEffect)(()=>{let e=r.current;if(!e)return;let a=j.current,i=0,s=!1,c=!1,h=!1,p=!1,w=0,g=0,k=Date.now()+500,N=()=>{_.current||(_.current=e.getBoundingClientRect())},L=e=>_.current?(e-24-8)/26:0,M=()=>{let e=t.current;for(let t of u.current)t.isHovered&&(t.isHovered=!1,e.set(t.span.spanId,{}));o({type:"forceRender"})},R=0,T=()=>{var r,p,j,S,E,C,D,I;if(!d.current)return;_.current||N();let P=_.current;if(!P)return;let{scrollLeft:A,scrollTop:F}=e,H=Math.max(0,Math.min(a+A-P.left-8,n.duration*l)),W="".concat(H-A+8,"px");x("left",W),v("left",W);let V=n.startTime+H/l,O=V-n.startTime;if(O<0||O>n.duration?null==(r=f.current)||r.removeAttribute("data-text"):null==(p=f.current)||p.setAttribute("data-text",el(O)),s){let e,t,r=a-i,s=Math.abs(r);if(!h){if(s<4)return;h=!0,y("display","flex"),M()}r>0?(y("left",""),y("right","0")):(y("left","0"),y("right","")),y("width","".concat(s,"px"));let o=Math.max(0,Math.min(i+A-P.left-8,n.duration*l))/l;o<O?(e=o,t=O):(e=O,t=o),null==(j=b.current)||j.setAttribute("data-range","".concat(el(e)," — ").concat(el(t))),null==(S=b.current)||S.setAttribute("data-duration","".concat(el(t-e)," selected"))}if(Date.now()<k){R=requestAnimationFrame(T);return}if(A!==w||F!==g){w=A,g=F,R=requestAnimationFrame(T);return}if(a-P.left<128?null==(E=f.current)||E.setAttribute("data-align","left"):a-P.left>P.width-128?null==(C=f.current)||C.setAttribute("data-align","right"):null==(D=f.current)||D.removeAttribute("data-align"),!h&&!c){let e=t.current,r=L(F)-2,a=L(F+P.height)+2;for(let t of u.current){let n=t.row>=r&&t.row<=a&&V>=t.startTime&&V<=t.endTime;t.isHovered!==n&&(t.isHovered=n,e.set(t.span.spanId,{}))}let n=12/l;for(let e of m.current){let t=V>=e.timestamp-n&&V<=e.timestamp+n;if(e.isHovered===t)continue;e.isHovered=t;let r=null==(I=e.ref)?void 0:I.current;r&&r.setAttribute("data-hovered",String(t))}o({type:"forceRender"})}};R=requestAnimationFrame(T);let E=e=>{"mouse"===e.pointerType&&(d.current=!0)},C=()=>{d.current&&(d.current=!1,M())},D=e=>{let{clientX:t}=e;j.current=a=t,cancelAnimationFrame(R),R=requestAnimationFrame(T)},I=e=>{e.preventDefault()},P=e=>{var t;if(2===e.button)p=!0,e.preventDefault();else{if(0!==e.button)return;p=!1}(null==(t=r.current)?void 0:t.contains(e.target))?(i=a,s=!0):(c=!0,requestAnimationFrame(M))},A=t=>{if(c=!1,!s||(s=!1,!h))return;if(h=!1,y("display",""),y("left",""),y("right",""),y("width",""),t.preventDefault(),t.stopImmediatePropagation(),p){p=!1;return}_.current||N();let r=_.current;if(!r)return;let{scrollLeft:d}=e,u=Math.max(0,Math.min((i+d-r.left-8)/l,n.duration)),m=Math.max(0,Math.min((a+d-r.left-8)/l,n.duration));o({type:"scaleToRange",t1:u+n.startTime,t2:m+n.startTime})},F=e=>{s&&"Escape"===e.key&&(p=!0,A(e))},H=()=>{_.current=void 0,S.current=void 0,cancelAnimationFrame(R),R=requestAnimationFrame(T)},W=()=>{cancelAnimationFrame(R),R=requestAnimationFrame(T)},V=new ResizeObserver(()=>{_.current=void 0});return V.observe(e),window.addEventListener("mousemove",D),e.addEventListener("contextmenu",I),window.addEventListener("mousedown",P),window.addEventListener("mouseup",A),window.addEventListener("blur",A),window.addEventListener("keydown",F,!0),window.addEventListener("scroll",H),e.addEventListener("scroll",W),e.addEventListener("pointerenter",E),e.addEventListener("pointerleave",C),()=>{V.disconnect(),window.removeEventListener("mousemove",D),e.removeEventListener("contextmenu",I),window.removeEventListener("mousedown",P),window.removeEventListener("mouseup",A),window.removeEventListener("blur",A),window.removeEventListener("keydown",F,!0),window.removeEventListener("scroll",H),e.removeEventListener("scroll",W),e.removeEventListener("pointerenter",E),e.removeEventListener("pointerleave",C),cancelAnimationFrame(R),j.current=a,M()}},[o,n,l,x,v,y,t,r,c]);let S=(0,a.useRef)(void 0);var L=e=>{let t=r.current;if(!t)return;null!=_.current||(_.current=t.getBoundingClientRect());let a=_.current,n=Math.max(0,Math.min(j.current-a.left-8,a.width-16)),i=0,s=S.current;(null==s?void 0:s.anchorX)===n?i=s.anchorT:S.current=s={anchorT:i=(t.scrollLeft+n)/l,anchorX:n},o({type:"trackpadScale",delta:e/64,anchorT:i,anchorX:n})};let M=(0,a.useRef)(L);return M.current=L,(0,a.useEffect)(()=>{let e=0,t=0,r=()=>{M.current(e),e=0},a=a=>{if(!a.ctrlKey&&!a.metaKey)return;a.preventDefault();let n=-a.deltaY;switch(a.deltaMode){case WheelEvent.DOM_DELTA_PAGE:n*=window.innerHeight;break;case WheelEvent.DOM_DELTA_LINE:n*=20}e+=n,cancelAnimationFrame(t),t=requestAnimationFrame(r)};return window.addEventListener("wheel",a,{passive:!1}),()=>{window.removeEventListener("wheel",a),cancelAnimationFrame(t)}},[]),(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)("div",{className:et().cursorMarkerStickyParent,children:(0,N.jsx)("div",{className:et().cursorMarkerLabelContainer,ref:h,style:p,children:(0,N.jsx)("div",{className:et().cursorMarkerLabel,ref:f})})}),(0,N.jsx)("div",{className:et().cursorMarkerStickyParent,children:(0,N.jsx)("div",{className:et().cursorMarkerContainer,ref:w,style:g,children:(0,N.jsx)("div",{className:et().cursorMarker,children:(0,N.jsx)("div",{className:et().cursorSelection,ref:b,style:k})})})})]})}function eK(e){let{height:t,width:r,value:a,placeholder:n,onChange:i}=e;return(0,N.jsxs)("label",{className:et().searchInputLabel,children:[(0,N.jsx)("div",{className:et().searchInputPrefix,children:(0,N.jsx)(eG,{})}),(0,N.jsx)("input",{type:"search",value:a,placeholder:n,onChange:i,style:{height:t,width:r}})]})}function eG(){return(0,N.jsxs)("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",focusable:"false",children:[(0,N.jsx)("circle",{cx:"7",cy:"7",r:"4.5",stroke:"currentColor",strokeWidth:"1.5"}),(0,N.jsx)("path",{d:"M11.5 11.5L14 14",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]})}function eX(){return(0,N.jsx)("nav",{className:et().searchBar,children:(0,N.jsx)(e$,{})})}function e$(){let{dispatch:e}=J(),[t,r]=(0,a.useState)("");return(0,a.useEffect)(()=>{let r=setTimeout(()=>e({type:"setFilter",filter:t}),100);return()=>{clearTimeout(r)}},[e,t]),(0,N.jsx)("div",{className:et().searchInput,children:(0,N.jsx)(eK,{height:40,onChange:e=>r(e.target.value),placeholder:"Search spans…",value:t,width:"100%"})})}function eZ(e){let{size:t=16}=e;return(0,N.jsxs)("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none","aria-hidden":!0,children:[(0,N.jsx)("title",{children:"Zoom In"}),(0,N.jsx)("path",{d:"M11 19a8 8 0 1 0 0-16 8 8 0 0 0 0 16Z",stroke:"currentColor",strokeWidth:"2"}),(0,N.jsx)("path",{d:"M11 8v6M8 11h6",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"}),(0,N.jsx)("path",{d:"M20 20l-3.5-3.5",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})]})}function eQ(e){let{size:t=16}=e;return(0,N.jsxs)("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none","aria-hidden":!0,children:[(0,N.jsx)("title",{children:"Zoom Out"}),(0,N.jsx)("path",{d:"M11 19a8 8 0 1 0 0-16 8 8 0 0 0 0 16Z",stroke:"currentColor",strokeWidth:"2"}),(0,N.jsx)("path",{d:"M8 11h6",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"}),(0,N.jsx)("path",{d:"M20 20l-3.5-3.5",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})]})}function eY(e){let{size:t=16}=e;return(0,N.jsxs)("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none","aria-hidden":!0,children:[(0,N.jsx)("title",{children:"Minus"}),(0,N.jsx)("path",{d:"M6 12h12",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})]})}function eJ(){let{dispatch:e}=J(),t=(0,a.useCallback)(()=>{e({type:"adjustScaleRatio",direction:1})},[e]),r=(0,a.useCallback)(()=>{e({type:"adjustScaleRatio",direction:-1})},[e]),n=(0,a.useCallback)(()=>{e({type:"adjustScaleRatio",direction:0})},[e]);return(0,N.jsxs)("div",{className:et().zoomButtonGroup,children:[(0,N.jsx)("button",{"aria-label":"Zoom Out",className:et().zoomButton,onClick:r,type:"button",children:(0,N.jsx)(eQ,{size:18})}),(0,N.jsx)("div",{className:et().divider}),(0,N.jsx)("button",{"aria-label":"Reset Zoom",className:et().zoomButton,onClick:n,type:"button",children:(0,N.jsx)(eY,{size:18})}),(0,N.jsx)("div",{className:et().divider}),(0,N.jsx)("button",{"aria-label":"Zoom In",className:et().zoomButton,onClick:t,type:"button",children:(0,N.jsx)(eZ,{size:18})})]})}let e0=e=>{if(!e.events.length)return;let t="".concat(e.spanId,":ev");return e.events.map((e,r)=>({key:"".concat(t).concat(r),timestamp:er(e.timestamp),event:e})).sort((e,t)=>e.timestamp-t.timestamp)},e1=(e,t)=>(e.isVisible=!0,e.isHovered=!1,e.isVisible);function e2(){return[]}let e4={traceId:"skeleton",spans:[{parentSpanId:"",spanId:"root",name:"root span",kind:1,resource:"vercel.runtime",startTime:[5e3,0],endTime:[6e3,0],duration:[1e3,0],library:{name:"vercel-site"},status:{code:1},attributes:{"vercel.ownerId":"team_abc"},traceFlags:1,events:[],links:[]}],resources:[{name:"vercel.runtime",attributes:{}}],rootSpanId:"root"};function e6(e){var t;let{trace:n=e4,className:i="",scrollLock:s=!1,height:l,withPanel:o=!1,highlightedSpans:c}=e,d=n===e4,{state:u,dispatch:m}=J(),{timelineRef:h,scrollSnapshotRef:p}=u,v=u.memoCacheRef.current,f=(null!=(t=null==c?void 0:c.length)?t:0)>0;(0,a.useEffect)(()=>{let{root:e,map:t}=(e=>{let{spans:t}=e,r={startTime:0,endTime:0,duration:0,depth:0,children:[]},a={},n=new Map,i=e=>{let t=n.get(e);if(t)return t;let r=n.size+1;return n.set(e,r),r},s=!1;for(let e of t){let t,n=er(e.startTime),l=er(e.endTime),o=er(e.duration);l>r.endTime&&(r.endTime=l,r.duration=l-r.startTime),(0===r.startTime||n<r.startTime)&&(r.startTime=n,r.duration=r.endTime-n);let c=e.resource.startsWith("vercel.");c||(s=!0);let d=c&&("vercel.serverless-runtime"!==e.resource||!("http.method"in e.attributes)),u=d?0:i(e.resource);d&&(t="▲ ".concat(e.name)),a[e.spanId]={parent:null,startTime:n,endTime:l,duration:o,span:e,depth:0,label:t,events:e0(e),isVercel:d,children:[],resourceIndex:u}}let l=(e,t)=>{let n;t&&(n=a[t])||(n=r),e.parent=n,n.children.push(e)},o=e=>{for(let t of("parent"in e&&(e.depth=e.parent.depth+1),e.children))o(t)},c=1,d=(e,t)=>{if("parent"in e&&e.span.name===t){let t=e.endTime,r=e=>e.children.length?e.children.map(r).sort((e,t)=>e.duration-t.duration)[0]||e:"waitUntil"===e.span.name?(t=e.startTime,e.parent):e,n=r(e),i="instrumentation-hint-".concat(c++),s=.05*e.duration,l=e.startTime+s,o=Math.max(l+s,Math.min(t-.01*e.duration,e.endTime-s)),d=o-l,u={parent:n,startTime:l,endTime:o,duration:d,span:{spanId:i,name:"Add your spans here",resource:"",kind:0,library:{name:""},status:{code:200},traceFlags:0,attributes:{},links:[],events:[],startTime:ea(l),endTime:ea(o),duration:ea(d)},depth:e.depth+1,isVercel:!1,isInstrumentationHint:!0,children:[],resourceIndex:1};return n.children.push(u),a[i]=u,!0}for(let r of e.children)if(d(r,t))return!0;return!1};for(let e of Object.values(a))l(e,e.span.parentSpanId);if(o(r),!s){for(let e of["Invoke Function","Invoke Middleware","Vercel Runtime"])if(d(r,e))break}return{root:r,map:a}})(n);m({type:"setRoot",root:e,spanMap:t,resources:n.resources||[]})},[m,n]);let{rows:w,spans:g,events:x,scale:_}=(e=>{let{state:t,dispatch:n}=J(),{root:i,filter:s,scale:l,timelineRef:o,timelineWidth:c,spanMap:d,scrollSnapshotRef:u,selected:m,memoCacheRef:h}=t,p=function(e){let[t,r]=(0,a.useState)(e);return(0,a.useEffect)(()=>{if(t===e)return;let a=0,n=0,i=()=>{if(++a<=3){n=requestAnimationFrame(i);return}r(e)};return i(),()=>{cancelAnimationFrame(n)}},[t,e]),t}(t.timelineHeight),v=(0,a.useRef)(0),[f,w]=(0,a.useState)(e2),[g,x]=(0,a.useState)(e2),[_,b]=(0,a.useState)(e2),[k,y]=(0,a.useState)(-1),j=(0,a.useRef)(void 0);return(0,a.useEffect)(()=>{var e;return null==(e=j.current)?void 0:e.call(j,s)},[s]),(0,a.useEffect)(()=>{if(null==e?void 0:e.length){for(let t of f)for(let r of t){let t=e.includes(r.span.spanId);r.isHighlighted!==t&&(r.isHighlighted=t,h.current.set(r.span.spanId,{}))}n({type:"forceRender"})}},[f,e,n,h]),(0,a.useEffect)(()=>{if(!i.startTime)return;let e=new Worker(r.tu(new URL(r.p+r.u(793),r.b))),t=++v.current;e.addEventListener("message",e=>{let r=e.data;switch(r.type){case"setRowsResult":if(r.isEnd)for(let e of r.rows)for(let t of e){var a,i;t.span=null!=(i=null==(a=d[t.span.spanId])?void 0:a.span)?i:t.span}w(r.rows);break;case"updateHighlight":{if(r.requestId!==t)return;let{matches:e}=r;w(t=>{for(let r of t)for(let t of r){let r=e.has(t.span.spanId);t.isHighlighted!==r&&(t.isHighlighted=r,h.current.set(t.span.spanId,{}))}return t}),n({type:"forceRender"})}}});let a={requestId:t,type:"calculateSpanPositions",root:i};return e.postMessage(a),j.current=r=>{let a=r.trim().toLocaleLowerCase();if(!a)return void w(e=>e.map(e=>e.map(e=>(e.isHighlighted=void 0,{...e}))));let n={type:"filterSpans",requestId:t=++v.current,root:i,filter:a};e.postMessage(n)},()=>{e.terminate()}},[i,d,n,h]),(0,a.useEffect)(()=>{if(!f.length)return;let e=o.current,t=u.current,r=!1,a=!1,n=0,s=0,d=Math.max(500,.5*c),m=Array(f.length).fill(null),h=e=>t?e<t.startRow?e-t.startRow:e>t.endRow?e-t.endRow:0:0,v=e=>{if(!t)return 0;let r=0;e.endTime<t.startTime?r=t.startTime-e.endTime:e.startTime>t.endTime&&(r=e.startTime-t.endTime);let a=Math.abs(h(e.row));return r||a?Math.sqrt((r/l)**2+(24*a+2)**2):0},w=0,g=()=>{(r||!t)&&(r=!1,(()=>{if(!e)return;let{scrollLeft:r,scrollTop:a}=e,n=(a-24-8)/26,s=n+Math.ceil(p/26);u.current=t={anchorT:r/l,anchorX:0,scrollLeft:r,scrollTop:a,startTime:i.startTime+r/l,endTime:i.startTime+(r+c)/l,startRow:n,endRow:s,scale:l};for(let e=m.length;e--;)m[e]=null})()),(()=>{var e;a=!0;let r=Math.min(1+s+Math.ceil(null!=(e=null==t?void 0:t.endRow)?e:1/0),f.length);for(let e=r;e--;){if(m[e])continue;let t=h(e);if(Math.abs(t)>s){if(a=!1,t>0)continue;break}let r=[],i=f[e];if(i){for(let e of i){if(!e1(e,l))continue;let t=v(e);n=Math.max(t,n),r.push({d:t,span:e})}m[e]=r}}})();let o=[],_=[];for(let e of m)if(e)for(let{d:t,span:r}of e)!(t>s)&&(o.push(r),r.events&&_.push(...r.events));s<d&&(!a||s<n)&&(s=Math.min(d,s+100),w=requestAnimationFrame(g)),x(o),b(_),y(l)};g();let _=Date.now(),k=e=>{(e.ctrlKey||e.metaKey)&&(_=Date.now())};null==e||e.addEventListener("wheel",k);let j=()=>{Date.now()-_<=50||(r=!0,cancelAnimationFrame(w),w=requestAnimationFrame(g))};return null==e||e.addEventListener("scroll",j),()=>{cancelAnimationFrame(w),null==e||e.removeEventListener("wheel",k),null==e||e.removeEventListener("scroll",j)}},[f,i,l,u,o,c,p]),(0,a.useEffect)(()=>{var e;let t;if(!m)return;for(let e of g)if(e.span.spanId===m.span.spanId){t=e;break}let r=null==t||null==(e=t.ref)?void 0:e.current;if(t&&r)return t.isSelected=!0,r.className=ed(t,l),()=>{t.isSelected=!1,r.className=ed(t,l)}},[g,l,m]),{rows:f,spans:g,events:_,scale:k}})(c),b=(0,a.useRef)(null);(0,a.useLayoutEffect)(()=>{let e=b.current;if(!e)return;let t=()=>{let t=e.getBoundingClientRect();m({type:"setSize",width:t.width-16,height:t.height})};t();let r=new ResizeObserver(t);return r.observe(e),window.addEventListener("resize",t),()=>{r.disconnect(),window.removeEventListener("resize",t)}},[m]);let k=(0,a.useRef)({t:0,x:-1,y:-1,spanId:""}),y=(0,a.useCallback)(e=>{let t=k.current,r=Date.now(),{clientX:a,clientY:n}=e,i=Math.sqrt((a-t.x)**2+(n-t.y)**2);if(r-t.t<=500&&i<=8)return(e.stopPropagation(),e.preventDefault(),t.spanId)?(m({type:"select",id:t.spanId}),void m({type:"scaleToNode",id:t.spanId})):void m({type:"resetScale"});let s=e.target;if(!s.closest(".".concat(String(et().timeline))))return;let l=s.closest("[data-span-id]"),o=(null==l?void 0:l.dataset.spanId)||"";k.current={x:a,y:n,t:r,spanId:o},o&&(m({type:"toggleSelection",id:o}),e.stopPropagation())},[m]);(0,a.useLayoutEffect)(()=>{let e=h.current;if(!e)return;let t=p.current;t&&(e.scrollLeft=t.anchorT*_-t.anchorX)},[p,h,_]),(0,a.useEffect)(()=>{var e;let t=null==(e=u.selected)?void 0:e.span.spanId;if(!t)return;let r=setTimeout(()=>{let e=u.timelineRef.current,r=null==e?void 0:e.querySelector('[data-span-id="'.concat(t,'"]'));if(!e||!r)return;let a=e.getBoundingClientRect(),n=r.getBoundingClientRect();n.width<a.width&&(n.left<a.left||n.right>a.right||n.top<a.top||n.bottom>a.bottom)&&r.scrollIntoView({block:"nearest",inline:"center",behavior:"smooth"})},500);return()=>{clearTimeout(r)}},[u.selected,u.timelineRef]),(0,a.useEffect)(()=>{let e=e=>{"Escape"===e.key&&m({type:"escape"})};return window.addEventListener("keydown",e),()=>{window.removeEventListener("keydown",e)}},[m]),(0,a.useEffect)(()=>{if(!s)return;let e=document.documentElement,t=document.body;e.style.overflow="clip",t.style.overflow="clip";let r=e=>{(null==e?void 0:e.cancelable)?e.preventDefault():window.scrollTo({left:0,top:0,behavior:"instant"})};return r(),window.addEventListener("scroll",r,{passive:!1}),()=>{e.style.overflow="",t.style.overflow="",window.removeEventListener("scroll",r)}},[s]);let j=Math.max(u.timelineHeight-u.scrollbarWidth,26+26*w.length-2+84),S=!!(u.isMobile&&u.selected);return(0,N.jsxs)("div",{className:(0,L.$)(et().traceViewer,d&&et().skeleton,i),onClickCapture:y,ref:b,style:{height:l,"--timeline-padding":"".concat(8,"px"),"--row-height":"".concat(24,"px"),"--row-padding":"".concat(2,"px"),"--search-height":"".concat(40*!f,"px"),"--search-gap":"".concat(f?2:8,"px"),"--map-height":"".concat(56,"px"),"--timeline-width":"".concat(u.timelineWidth,"px"),"--timeline-height":"".concat(u.timelineHeight,"px"),"--timeline-scroll-width":"".concat(Math.round(u.root.duration*u.scale),"px"),"--panel-width":"".concat(u.panelWidth,"px"),"--panel-height":"".concat(u.panelHeight,"px"),"--height":"".concat(u.height,"px"),"--scrollbar-width":"".concat(u.scrollbarWidth,"px"),"--marker-height":"".concat(24,"px"),"--marker-notch-height":"".concat(8,"px")},children:[f?null:(0,N.jsx)(eX,{}),(0,N.jsx)(eO,{rows:w,scale:_,timelineRef:h}),(0,N.jsxs)("div",{className:(0,L.$)(et().traceViewerContent,S&&et().inert),children:[(0,N.jsx)("div",{className:et().timeline,ref:h,children:(0,N.jsx)("div",{style:{position:"relative",width:u.timelineWidth,height:u.timelineHeight-16,padding:8,paddingBottom:0},children:(0,N.jsxs)("div",{className:et().traceNode,style:{width:u.root.duration*_||void 0,height:j-16},children:[(0,N.jsx)(ez,{scale:_}),(0,N.jsx)(eq,{events:x,root:u.root,scale:_}),(0,N.jsx)(eU,{dispatch:m,events:x,memoCacheRef:u.memoCacheRef,root:u.root,scale:_,scrollSnapshotRef:p,spans:g,timelineRef:h}),(0,N.jsx)(eu,{cacheKey:v.get(""),cache:v,customSpanClassNameFunc:u.customSpanClassNameFunc,customSpanEventClassNameFunc:u.customSpanEventClassNameFunc,root:u.root,scale:_,scrollSnapshotRef:p,spans:g})]})})}),(0,N.jsx)("div",{className:et().zoomButtonTraceViewer,children:(0,N.jsx)(eJ,{})})]}),o?(0,N.jsx)("div",{className:(0,L.$)(et().spanDetailPanelTraceViewer,!u.selected&&et().hidden,u.isMobile&&et().mobile),children:(0,N.jsx)(eN,{attached:!0})}):null]})}function e3(e){var t;let{env:r}=e,{state:n}=J(),{selected:i}=n,s=null==i||null==(t=i.span.attributes)?void 0:t.data,{resource:l,resourceId:o,runId:c}=(0,a.useMemo)(()=>{var e;let t=null==i||null==(e=i.span.attributes)?void 0:e.resource;return"step"===t?{resource:"step",resourceId:s.stepId,runId:s.runId}:"run"===t?{resource:"run",resourceId:s.runId,runId:void 0}:"hook"===t?{resource:"hook",resourceId:s.hookId,runId:void 0}:{resource:void 0,resourceId:void 0,runId:void 0}},[i]),{data:d,error:u,loading:m}=function(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},{refreshInterval:i=0,runId:s}=n,[l,o]=(0,a.useState)(null),[c,d]=(0,a.useState)([]),[u,m]=(0,a.useState)(!0),[h,p]=(0,a.useState)(null),v=(0,a.useCallback)(async()=>{m(!0),p(null);try{let{data:a,correlationId:n}=await k(e,t,r,s);if(o(a),"run"===t)return void m(!1);let i=await y(e,n);d(i)}catch(e){p(e instanceof Error?e:Error(String(e)))}finally{m(!1)}},[e,t,r,s]);return(0,a.useEffect)(()=>{v()},[v]),(0,a.useEffect)(()=>{if(!i||i<=0)return;let e=setInterval(v,i);return()=>clearInterval(e)},[i,v]),{data:l,events:c,loading:u,error:h,refresh:v}}(r,l,null!=o?o:"",{runId:c});if(!i||!l||!o)return null;if(u)return(0,N.jsxs)("div",{className:"text-copy-14 text-red-600 p-2",children:["Failed to load ",l," details: ",u.message]});let h=d||s;return(0,N.jsxs)("div",{className:(0,L.A)("flex flex-col px-2"),children:[(0,N.jsx)(K,{data:h,isLoading:m,error:null!=u?u:void 0}),"run"!==l&&(0,N.jsx)(G,{correlationId:o,env:r,events:i.span.events})]})}var e8=r(1998),e5=r.n(e8);function e7(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(t&&"pending"===e)return e5().spanPendingStriped;switch(e){case"running":return e5().spanRunning;case"pending":return e5().spanPending;case"completed":return e5().spanCompleted;case"cancelled":return e5().spanCancelled;case"paused":return e5().spanPaused;case"failed":return e5().spanFailed;default:return""}}let e9=e=>{let t=e.span.attributes,r=null==t?void 0:t.resource;if("step"===r){let e=t.data,r=null==e?void 0:e.stepName;if(r&&String(r).toLowerCase().includes("sleep"))return e5().spanSleep;let a=(null==e?void 0:e.status)==="pending";return e7(null==e?void 0:e.status,a)}if("run"===r){let e=t.data;return e7(null==e?void 0:e.status,!1)}return"hook"===r?e5().spanHook:""},te=e=>{let t=e.event.name;return"step_failed"===t||"workflow_failed"===t?e5().eventFailed:"step_retrying"===t?e5().eventRetrying:"hook_created"===t||"hook_received"===t||"hook_disposed"===t?e5().eventHook:e5().eventDefault},tt=e=>{let{run:t,steps:r,hooks:n,events:i,env:s,isLoading:l}=e,[o,c]=(0,a.useState)(()=>new Date);(0,a.useEffect)(()=>{if(!(null==t?void 0:t.completedAt)){let e=setInterval(()=>{c(new Date)},2e3);return()=>clearInterval(e)}},[null==t?void 0:t.completedAt]);let d=(0,a.useMemo)(()=>{let e=r.slice().sort((e,t)=>new Date(e.createdAt).getTime()-new Date(t.createdAt).getTime()),a=new Map,s=new Map,l=[];for(let t of i){let r=t.correlationId;if(r){let i=e.find(e=>e.stepId===r),o=n.find(e=>e.hookId===r);if(i){let e=a.get(r)||[];e.push(t),a.set(r,e)}else if(o){let e=s.get(r)||[];e.push(t),s.set(r,e)}else l.push(t)}else l.push(t)}let c=e.map((r,n)=>{let i=0===n?t.runId:String(e[n-1].stepId),s=a.get(r.stepId)||[];return function(e,t,r,a){var n,i;let s=null!=a?a:new Date,l=(0,R.Z)(String(e.stepName)),o=I(e.status),c=null!=(n=e.completedAt)?n:s,d=H(r);return{spanId:String(e.stepId),parentSpanId:t,name:null!=(i=null==l?void 0:l.shortName)?i:"",kind:1,resource:o,library:E,status:C(e.status),traceFlags:1,attributes:{resource:"step",data:e},links:[],events:d,startTime:P(e.startedAt),endTime:P(c),duration:A(e.startedAt,c)}}(r,i,s,o)}),d=n.map(e=>{let r=s.get(e.hookId)||[];return function(e,t,r){let a=r.find(e=>"hook_received"===e.eventType),n=a?P(a.createdAt):P(new Date(Math.max(e.createdAt.getTime()+1e4,Date.now()))),i=H(r);return{spanId:String(e.hookId),parentSpanId:t,name:String(e.hookId),kind:1,resource:D(e),library:E,status:{code:1},traceFlags:1,attributes:{resource:"hook",data:e},links:[],events:i,startTime:P(e.createdAt),endTime:P(n),duration:A(e.createdAt,n)}}(e,t.runId,r)});return{traceId:t.runId,rootSpanId:t.runId,spans:[function(e,t,r){var a,n,i,s;let l=null!=r?r:new Date,o=null!=(n=e.startedAt)?n:e.createdAt,c=null!=(i=e.completedAt)?i:l,d=H(t);return{spanId:String(e.runId),parentSpanId:void 0,name:String(null!=(s=null==(a=(0,R.s)(e.workflowName))?void 0:a.shortName)?s:"?"),kind:1,resource:D(e),library:E,status:C(e.status),traceFlags:1,attributes:{resource:"run",data:e},links:[],events:d,startTime:P(o),endTime:P(c),duration:A(o,c)}}(t,l,o),...c,...d],resources:[{name:"workflow",attributes:{"service.name":"vercel-workflow"}}]}},[t,r,n,i,o]);return(0,N.jsx)(Y,{withPanel:!0,customSpanClassNameFunc:e9,customSpanEventClassNameFunc:te,customPanelComponent:(0,N.jsx)(e3,{env:s}),children:(0,N.jsx)(e6,{height:800,trace:l?void 0:d,withPanel:!0})})}},6016:(e,t,r)=>{"use strict";r.d(t,{$:()=>c});var a=r(5386),n=r(9280),i=r(7586),s=r(4773),l=r(2287);let o=(0,i.F)("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),c=s.forwardRef((e,t)=>{let{className:r,variant:i,size:s,asChild:c=!1,...d}=e,u=c?n.DX:"button";return(0,a.jsx)(u,{className:(0,l.cn)(o({variant:i,size:s,className:r})),ref:t,...d})});c.displayName="Button"},6229:e=>{e.exports={traceNode:"trace-viewer_traceNode__EPpHb",childRow:"trace-viewer_childRow__Cq4_k",spanNode:"trace-viewer_spanNode__RjdWo",huge:"trace-viewer_huge__ldvPq",spanName:"trace-viewer_spanName__TQPrX",spanSpacer:"trace-viewer_spanSpacer__Oup0_",spanDuration:"trace-viewer_spanDuration__889FS",small:"trace-viewer_small__3Mgeo",xHover:"trace-viewer_xHover__SDoIm",selected:"trace-viewer_selected__9DCOs",spanNodeEvent:"trace-viewer_spanNodeEvent__NC_lB",eventDiamond:"trace-viewer_eventDiamond__6HyGU",customEventColor:"trace-viewer_customEventColor__pVObz",hoverInfo:"trace-viewer_hoverInfo__v_oM8",eventName:"trace-viewer_eventName__w9uvJ",eventTimestamp:"trace-viewer_eventTimestamp__Rkpqm",alignStart:"trace-viewer_alignStart__ryiEC",alignEnd:"trace-viewer_alignEnd__o4Ha4",colorVercel:"trace-viewer_colorVercel__EJedp",color0:"trace-viewer_color0__smm5S",color1:"trace-viewer_color1__gG1M7",color2:"trace-viewer_color2__FXg_f",color3:"trace-viewer_color3__nGR6u",color4:"trace-viewer_color4__t43hY",colorHighlight:"trace-viewer_colorHighlight__dgPVp",unlit:"trace-viewer_unlit___zTp3",mapContainer:"trace-viewer_mapContainer__slemC",spanDetailPanel:"trace-viewer_spanDetailPanel__gwWqO",spanDetailPanelResizer:"trace-viewer_spanDetailPanelResizer__jLr1h",spanDetailPanelTop:"trace-viewer_spanDetailPanelTop__KFwOZ",spanDetailPanelBody:"trace-viewer_spanDetailPanelBody__4mjfq",spanDetailPanelTopInfo:"trace-viewer_spanDetailPanelTopInfo__EXa6K",spanNameDetailPanel:"trace-viewer_spanNameDetailPanel__dTZKK",spanDetailPanelTruncatedHeading:"trace-viewer_spanDetailPanelTruncatedHeading__fRtSd",spanDetailPanelName:"trace-viewer_spanDetailPanelName__ixgKy",spanDetailPanelDuration:"trace-viewer_spanDetailPanelDuration__VopYl",spanDetailPanelCorner:"trace-viewer_spanDetailPanelCorner__q2atr",spanDetailPanelCornerInner:"trace-viewer_spanDetailPanelCornerInner__jpQt9",spanDetailPanelCloseVerticalRule:"trace-viewer_spanDetailPanelCloseVerticalRule__HiEA4",spanDetailPanelClose:"trace-viewer_spanDetailPanelClose__NV8h5",spanDetailPanelAttribute:"trace-viewer_spanDetailPanelAttribute__7kHaH",spanDetailPanelAttributeKey:"trace-viewer_spanDetailPanelAttributeKey__Lq39Y",spanDetailPanelAttributeValue:"trace-viewer_spanDetailPanelAttributeValue__ZsbcT",spanDetailPanelQuickLink:"trace-viewer_spanDetailPanelQuickLink__PQU8R",spanDetailPanelQuickLinkLabel:"trace-viewer_spanDetailPanelQuickLinkLabel__hDSrZ",detailGroup:"trace-viewer_detailGroup__q9vls",expanded:"trace-viewer_expanded__tgMvz",collapsed:"trace-viewer_collapsed__7UQa4",ancestorGroup:"trace-viewer_ancestorGroup__L1c_l",detailHeading:"trace-viewer_detailHeading__Tzelx",buttonLink:"trace-viewer_buttonLink__4Sr4T",note:"trace-viewer_note__H_BMB",skeleton:"trace-viewer_skeleton__HHaHu",skeletonRounded:"trace-viewer_skeletonRounded___tfB2",detailHeadingIcon:"trace-viewer_detailHeadingIcon__BKl_b",infraSpanDescription:"trace-viewer_infraSpanDescription__u_u4R",ancestorNode:"trace-viewer_ancestorNode__JEATz",ancestorText:"trace-viewer_ancestorText__pLFpE",ancestorName:"trace-viewer_ancestorName__usG_0",ancestorDuration:"trace-viewer_ancestorDuration__UxeMy",ancestorLineContainer:"trace-viewer_ancestorLineContainer__anAFR",ancestorLine:"trace-viewer_ancestorLine__MQKBZ",zoomButtonGroup:"trace-viewer_zoomButtonGroup__bW6dU","zoom-buttons-fade-in":"trace-viewer_zoom-buttons-fade-in__iwgTN",zoomButton:"trace-viewer_zoomButton__nqkXN",divider:"trace-viewer_divider__EYwDq",markersContainer:"trace-viewer_markersContainer__ljrni",markers:"trace-viewer_markers__phdeo",marker:"trace-viewer_marker__qcenH",notch:"trace-viewer_notch__U_RW0",markerLabel:"trace-viewer_markerLabel__k5WI7",eventMarkersContainer:"trace-viewer_eventMarkersContainer__PpoCp",eventMarkers:"trace-viewer_eventMarkers__TL4ep",eventMarker:"trace-viewer_eventMarker__LTOJz",cursorMarkerStickyParent:"trace-viewer_cursorMarkerStickyParent__fBYPl",cursorMarkerLabelContainer:"trace-viewer_cursorMarkerLabelContainer__3nvXM",cursorMarkerLabel:"trace-viewer_cursorMarkerLabel__G1GEQ",cursorMarkerContainer:"trace-viewer_cursorMarkerContainer__6iYUy",cursorMarker:"trace-viewer_cursorMarker__ZRhrA",cursorSelection:"trace-viewer_cursorSelection__RCPRm",traceViewer:"trace-viewer_traceViewer__8he63","span-skeleton":"trace-viewer_span-skeleton__AvhUy",mapCanvas:"trace-viewer_mapCanvas__0UJOT",zoomButtonTraceViewer:"trace-viewer_zoomButtonTraceViewer__D4Lqw",timeline:"trace-viewer_timeline__omxsu",searchBar:"trace-viewer_searchBar__fqBPw",searchInput:"trace-viewer_searchInput__9pXpo",searchInputLabel:"trace-viewer_searchInputLabel__Ki6la",searchInputPrefix:"trace-viewer_searchInputPrefix__vMKU7",mapThumb:"trace-viewer_mapThumb__uGh8v",spanDetailPanelTraceViewer:"trace-viewer_spanDetailPanelTraceViewer__cr4L3",traceViewerContent:"trace-viewer_traceViewerContent__T7h1G",inert:"trace-viewer_inert__4Vm6G",hidden:"trace-viewer_hidden__mlpPM",mobile:"trace-viewer_mobile__NWGVd"}},7122:(e,t,r)=>{"use strict";r.d(t,{Fc:()=>o,TN:()=>d,XL:()=>c});var a=r(5386),n=r(7586),i=r(4773),s=r(2287);let l=(0,n.F)("relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"}},defaultVariants:{variant:"default"}}),o=i.forwardRef((e,t)=>{let{className:r,variant:n,...i}=e;return(0,a.jsx)("div",{ref:t,role:"alert",className:(0,s.cn)(l({variant:n}),r),...i})});o.displayName="Alert";let c=i.forwardRef((e,t)=>{let{className:r,...n}=e;return(0,a.jsx)("h5",{ref:t,className:(0,s.cn)("mb-1 font-medium leading-none tracking-tight",r),...n})});c.displayName="AlertTitle";let d=i.forwardRef((e,t)=>{let{className:r,...n}=e;return(0,a.jsx)("div",{ref:t,className:(0,s.cn)("text-sm [&_p]:leading-relaxed",r),...n})});d.displayName="AlertDescription"},7372:(e,t,r)=>{"use strict";r.d(t,{u:()=>n});var a=r(8033);let n=(0,a.createServerReference)("701d11d568cbae4d5cff3af04e97f904d39e57aa0e",a.callServer,void 0,a.findSourceMapURL,"fetchEventsByCorrelationId")},7394:(e,t,r)=>{"use strict";r.d(t,{t:()=>d});var a=r(5386),n=r(3039),i=r(316),s=r(4773),l=r(7122),o=r(6016),c=r(2338);class d extends s.Component{static getDerivedStateFromError(e){return{hasError:!0,error:e}}componentDidCatch(e,t){console.error("Error caught by boundary:",e,t)}render(){return this.state.hasError&&this.state.error?this.props.fallback?this.props.fallback(this.state.error,this.handleReset):(0,a.jsxs)(c.Zp,{className:"border-destructive/50 bg-destructive/5",children:[(0,a.jsx)(c.aR,{children:(0,a.jsxs)(c.ZB,{className:"flex items-center gap-2 text-destructive",children:[(0,a.jsx)(n.A,{className:"h-5 w-5"}),this.props.title||"Error"]})}),(0,a.jsxs)(c.Wu,{className:"space-y-4",children:[(0,a.jsxs)(l.Fc,{variant:"destructive",children:[(0,a.jsx)(n.A,{className:"h-4 w-4"}),(0,a.jsx)(l.XL,{children:"Something went wrong"}),(0,a.jsx)(l.TN,{children:this.props.description||"An unexpected error occurred in this section."})]}),(0,a.jsxs)("div",{className:"bg-muted p-3 rounded-md text-sm font-mono text-muted-foreground overflow-auto max-h-48",children:[(0,a.jsx)("div",{className:"text-xs font-semibold mb-2",children:"Error details:"}),(0,a.jsx)("div",{className:"whitespace-pre-wrap break-words text-xs",children:this.state.error.message}),this.state.error.stack&&(0,a.jsx)("div",{className:"mt-2 opacity-60 text-xs",children:this.state.error.stack})]}),!1!==this.props.showReset&&(0,a.jsxs)(o.$,{variant:"outline",size:"sm",onClick:this.handleReset,className:"gap-2",children:[(0,a.jsx)(i.A,{className:"h-4 w-4"}),"Try again"]})]})]}):this.props.children}constructor(e){super(e),this.handleReset=()=>{this.setState({hasError:!1,error:null})},this.state={hasError:!1,error:null}}}},8052:(e,t,r)=>{"use strict";r.d(t,{Nt:()=>l,dL:()=>o,g0:()=>c,nO:()=>d});var a=r(3283),n=r(4773);let i={backend:"embedded",dataDir:"../../workbench/nextjs-turbopack/.next/workflow-data",port:"3000",env:"production"},s=["backend","env","authToken","project","team","port","dataDir"];function l(){let e=(0,a.useSearchParams)();return(0,n.useMemo)(()=>{let t={...i};for(let r of s){let a=e.get(r);a&&(t[r]=a)}return t},[e])}function o(){let e=(0,a.useRouter)(),t=(0,a.usePathname)(),r=(0,a.useSearchParams)();return(0,n.useMemo)(()=>a=>{let n=new URLSearchParams(r.toString());for(let e of s){let t=a[e];null!=t&&""!==t?(t!==i[e]||r.has(e))&&n.set(e,t):n.delete(e)}let l=n.toString(),o=l?"".concat(t,"?").concat(l):t;e.push(o)},[e,t,r])}function c(e,t,r){let a=function(e){let t=new URLSearchParams;for(let r of s){let a=e[r];null!=a&&""!==a&&a!==i[r]&&t.set(r,a)}return t}(t);if(r)for(let[e,t]of Object.entries(r))null!=t&&""!==t&&a.set(e,t);let n=a.toString();return n?"".concat(e,"?").concat(n):e}let d=e=>({WORKFLOW_TARGET_WORLD:e.backend,WORKFLOW_VERCEL_ENV:e.env,WORKFLOW_VERCEL_AUTH_TOKEN:e.authToken,WORKFLOW_VERCEL_PROJECT:e.project,WORKFLOW_VERCEL_TEAM:e.team,PORT:e.port,WORKFLOW_EMBEDDED_DATA_DIR:e.dataDir})}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[251],{63:(e,t,n)=>{n.d(t,{hO:()=>u,sG:()=>a});var r=n(4773),o=n(1471),i=n(9280),l=n(5386),a=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,t)=>{let n=(0,i.TL)(`Primitive.${t}`),o=r.forwardRef((e,r)=>{let{asChild:o,...i}=e;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,l.jsx)(o?n:t,{...i,ref:r})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{});function u(e,t){e&&o.flushSync(()=>e.dispatchEvent(t))}},607:(e,t,n)=>{n.d(t,{Qg:()=>l,bL:()=>u});var r=n(4773),o=n(63),i=n(5386),l=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),a=r.forwardRef((e,t)=>(0,i.jsx)(o.sG.span,{...e,ref:t,style:{...l,...e.style}}));a.displayName="VisuallyHidden";var u=a},819:(e,t,n)=>{n.d(t,{c:()=>o});var r=n(4773);function o(e){let t=r.useRef(e);return r.useEffect(()=>{t.current=e}),r.useMemo(()=>(...e)=>t.current?.(...e),[])}},3049:(e,t,n)=>{n.d(t,{N:()=>o});var r=n(4773),o=globalThis?.document?r.useLayoutEffect:()=>{}},4053:(e,t,n)=>{function r(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),!1===n||!r.defaultPrevented)return t?.(r)}}n.d(t,{mK:()=>r}),"undefined"!=typeof window&&window.document&&window.document.createElement},5987:(e,t,n)=>{n.d(t,{B:()=>u});var r,o=n(4773),i=n(3049),l=(r||(r=n.t(o,2)))[" useId ".trim().toString()]||(()=>void 0),a=0;function u(e){let[t,n]=o.useState(l());return(0,i.N)(()=>{e||n(e=>e??String(a++))},[e]),e||(t?`radix-${t}`:"")}},7328:(e,t,n)=>{n.d(t,{A:()=>i});var r=n(4773),o=n(5386);function i(e,t=[]){let n=[],l=()=>{let t=n.map(e=>r.createContext(e));return function(n){let o=n?.[e]||t;return r.useMemo(()=>({[`__scope${e}`]:{...n,[e]:o}}),[n,o])}};return l.scopeName=e,[function(t,i){let l=r.createContext(i),a=n.length;n=[...n,i];let u=t=>{let{scope:n,children:i,...u}=t,s=n?.[e]?.[a]||l,c=r.useMemo(()=>u,Object.values(u));return(0,o.jsx)(s.Provider,{value:c,children:i})};return u.displayName=t+"Provider",[u,function(n,o){let u=o?.[e]?.[a]||l,s=r.useContext(u);if(s)return s;if(void 0!==i)return i;throw Error(`\`${n}\` must be used within \`${t}\``)}]},function(...e){let t=e[0];if(1===e.length)return t;let n=()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let o=n.reduce((t,{useScope:n,scopeName:r})=>{let o=n(e)[`__scope${r}`];return{...t,...o}},{});return r.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return n.scopeName=t.scopeName,n}(l,...t)]}},7740:(e,t,n)=>{n.d(t,{qW:()=>d});var r,o=n(4773),i=n(4053),l=n(63),a=n(5034),u=n(819),s=n(5386),c="dismissableLayer.update",f=o.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),d=o.forwardRef((e,t)=>{var n,d;let{disableOutsidePointerEvents:h=!1,onEscapeKeyDown:g,onPointerDownOutside:v,onFocusOutside:y,onInteractOutside:w,onDismiss:x,...b}=e,E=o.useContext(f),[C,R]=o.useState(null),T=null!=(d=null==C?void 0:C.ownerDocument)?d:null==(n=globalThis)?void 0:n.document,[,L]=o.useState({}),A=(0,a.s)(t,e=>R(e)),O=Array.from(E.layers),[P]=[...E.layersWithOutsidePointerEventsDisabled].slice(-1),S=O.indexOf(P),N=C?O.indexOf(C):-1,D=E.layersWithOutsidePointerEventsDisabled.size>0,k=N>=S,M=function(e){var t;let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null==(t=globalThis)?void 0:t.document,r=(0,u.c)(e),i=o.useRef(!1),l=o.useRef(()=>{});return o.useEffect(()=>{let e=e=>{if(e.target&&!i.current){let t=function(){m("dismissableLayer.pointerDownOutside",r,o,{discrete:!0})},o={originalEvent:e};"touch"===e.pointerType?(n.removeEventListener("click",l.current),l.current=t,n.addEventListener("click",l.current,{once:!0})):t()}else n.removeEventListener("click",l.current);i.current=!1},t=window.setTimeout(()=>{n.addEventListener("pointerdown",e)},0);return()=>{window.clearTimeout(t),n.removeEventListener("pointerdown",e),n.removeEventListener("click",l.current)}},[n,r]),{onPointerDownCapture:()=>i.current=!0}}(e=>{let t=e.target,n=[...E.branches].some(e=>e.contains(t));k&&!n&&(null==v||v(e),null==w||w(e),e.defaultPrevented||null==x||x())},T),j=function(e){var t;let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null==(t=globalThis)?void 0:t.document,r=(0,u.c)(e),i=o.useRef(!1);return o.useEffect(()=>{let e=e=>{e.target&&!i.current&&m("dismissableLayer.focusOutside",r,{originalEvent:e},{discrete:!1})};return n.addEventListener("focusin",e),()=>n.removeEventListener("focusin",e)},[n,r]),{onFocusCapture:()=>i.current=!0,onBlurCapture:()=>i.current=!1}}(e=>{let t=e.target;![...E.branches].some(e=>e.contains(t))&&(null==y||y(e),null==w||w(e),e.defaultPrevented||null==x||x())},T);return!function(e,t=globalThis?.document){let n=(0,u.c)(e);o.useEffect(()=>{let e=e=>{"Escape"===e.key&&n(e)};return t.addEventListener("keydown",e,{capture:!0}),()=>t.removeEventListener("keydown",e,{capture:!0})},[n,t])}(e=>{N===E.layers.size-1&&(null==g||g(e),!e.defaultPrevented&&x&&(e.preventDefault(),x()))},T),o.useEffect(()=>{if(C)return h&&(0===E.layersWithOutsidePointerEventsDisabled.size&&(r=T.body.style.pointerEvents,T.body.style.pointerEvents="none"),E.layersWithOutsidePointerEventsDisabled.add(C)),E.layers.add(C),p(),()=>{h&&1===E.layersWithOutsidePointerEventsDisabled.size&&(T.body.style.pointerEvents=r)}},[C,T,h,E]),o.useEffect(()=>()=>{C&&(E.layers.delete(C),E.layersWithOutsidePointerEventsDisabled.delete(C),p())},[C,E]),o.useEffect(()=>{let e=()=>L({});return document.addEventListener(c,e),()=>document.removeEventListener(c,e)},[]),(0,s.jsx)(l.sG.div,{...b,ref:A,style:{pointerEvents:D?k?"auto":"none":void 0,...e.style},onFocusCapture:(0,i.mK)(e.onFocusCapture,j.onFocusCapture),onBlurCapture:(0,i.mK)(e.onBlurCapture,j.onBlurCapture),onPointerDownCapture:(0,i.mK)(e.onPointerDownCapture,M.onPointerDownCapture)})});function p(){let e=new CustomEvent(c);document.dispatchEvent(e)}function m(e,t,n,r){let{discrete:o}=r,i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),o?(0,l.hO)(i,a):i.dispatchEvent(a)}d.displayName="DismissableLayer",o.forwardRef((e,t)=>{let n=o.useContext(f),r=o.useRef(null),i=(0,a.s)(t,r);return o.useEffect(()=>{let e=r.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}},[n.branches]),(0,s.jsx)(l.sG.div,{...e,ref:i})}).displayName="DismissableLayerBranch"},8251:(e,t,n)=>{n.d(t,{UC:()=>V,Kq:()=>z,bL:()=>U,Bc:()=>T,l9:()=>$});var r=n(4773),o=n(4053),i=n(5034),l=n(7328),a=n(7740),u=n(5987),s=n(9448),c=(n(9302),n(3049)),f=e=>{let{present:t,children:n}=e,o=function(e){var t,n;let[o,i]=r.useState(),l=r.useRef(null),a=r.useRef(e),u=r.useRef("none"),[s,f]=(t=e?"mounted":"unmounted",n={mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}},r.useReducer((e,t)=>{let r=n[e][t];return null!=r?r:e},t));return r.useEffect(()=>{let e=d(l.current);u.current="mounted"===s?e:"none"},[s]),(0,c.N)(()=>{let t=l.current,n=a.current;if(n!==e){let r=u.current,o=d(t);e?f("MOUNT"):"none"===o||(null==t?void 0:t.display)==="none"?f("UNMOUNT"):n&&r!==o?f("ANIMATION_OUT"):f("UNMOUNT"),a.current=e}},[e,f]),(0,c.N)(()=>{if(o){var e;let t,n=null!=(e=o.ownerDocument.defaultView)?e:window,r=e=>{let r=d(l.current).includes(CSS.escape(e.animationName));if(e.target===o&&r&&(f("ANIMATION_END"),!a.current)){let e=o.style.animationFillMode;o.style.animationFillMode="forwards",t=n.setTimeout(()=>{"forwards"===o.style.animationFillMode&&(o.style.animationFillMode=e)})}},i=e=>{e.target===o&&(u.current=d(l.current))};return o.addEventListener("animationstart",i),o.addEventListener("animationcancel",r),o.addEventListener("animationend",r),()=>{n.clearTimeout(t),o.removeEventListener("animationstart",i),o.removeEventListener("animationcancel",r),o.removeEventListener("animationend",r)}}f("ANIMATION_END")},[o,f]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:r.useCallback(e=>{l.current=e?getComputedStyle(e):null,i(e)},[])}}(t),l="function"==typeof n?n({present:o.isPresent}):r.Children.only(n),a=(0,i.s)(o.ref,function(e){var t,n;let r=null==(t=Object.getOwnPropertyDescriptor(e.props,"ref"))?void 0:t.get,o=r&&"isReactWarning"in r&&r.isReactWarning;return o?e.ref:(o=(r=null==(n=Object.getOwnPropertyDescriptor(e,"ref"))?void 0:n.get)&&"isReactWarning"in r&&r.isReactWarning)?e.props.ref:e.props.ref||e.ref}(l));return"function"==typeof n||o.isPresent?r.cloneElement(l,{ref:a}):null};function d(e){return(null==e?void 0:e.animationName)||"none"}f.displayName="Presence";var p=n(63),m=n(9280),h=n(9559),g=n(607),v=n(5386),[y,w]=(0,l.A)("Tooltip",[s.Bk]),x=(0,s.Bk)(),b="TooltipProvider",E="tooltip.open",[C,R]=y(b),T=e=>{let{__scopeTooltip:t,delayDuration:n=700,skipDelayDuration:o=300,disableHoverableContent:i=!1,children:l}=e,a=r.useRef(!0),u=r.useRef(!1),s=r.useRef(0);return r.useEffect(()=>{let e=s.current;return()=>window.clearTimeout(e)},[]),(0,v.jsx)(C,{scope:t,isOpenDelayedRef:a,delayDuration:n,onOpen:r.useCallback(()=>{window.clearTimeout(s.current),a.current=!1},[]),onClose:r.useCallback(()=>{window.clearTimeout(s.current),s.current=window.setTimeout(()=>a.current=!0,o)},[o]),isPointerInTransitRef:u,onPointerInTransitChange:r.useCallback(e=>{u.current=e},[]),disableHoverableContent:i,children:l})};T.displayName=b;var L="Tooltip",[A,O]=y(L),P=e=>{let{__scopeTooltip:t,children:n,open:o,defaultOpen:i,onOpenChange:l,disableHoverableContent:a,delayDuration:c}=e,f=R(L,e.__scopeTooltip),d=x(t),[p,m]=r.useState(null),g=(0,u.B)(),y=r.useRef(0),w=null!=a?a:f.disableHoverableContent,b=null!=c?c:f.delayDuration,C=r.useRef(!1),[T,O]=(0,h.i)({prop:o,defaultProp:null!=i&&i,onChange:e=>{e?(f.onOpen(),document.dispatchEvent(new CustomEvent(E))):f.onClose(),null==l||l(e)},caller:L}),P=r.useMemo(()=>T?C.current?"delayed-open":"instant-open":"closed",[T]),S=r.useCallback(()=>{window.clearTimeout(y.current),y.current=0,C.current=!1,O(!0)},[O]),N=r.useCallback(()=>{window.clearTimeout(y.current),y.current=0,O(!1)},[O]),D=r.useCallback(()=>{window.clearTimeout(y.current),y.current=window.setTimeout(()=>{C.current=!0,O(!0),y.current=0},b)},[b,O]);return r.useEffect(()=>()=>{y.current&&(window.clearTimeout(y.current),y.current=0)},[]),(0,v.jsx)(s.bL,{...d,children:(0,v.jsx)(A,{scope:t,contentId:g,open:T,stateAttribute:P,trigger:p,onTriggerChange:m,onTriggerEnter:r.useCallback(()=>{f.isOpenDelayedRef.current?D():S()},[f.isOpenDelayedRef,D,S]),onTriggerLeave:r.useCallback(()=>{w?N():(window.clearTimeout(y.current),y.current=0)},[N,w]),onOpen:S,onClose:N,disableHoverableContent:w,children:n})})};P.displayName=L;var S="TooltipTrigger",N=r.forwardRef((e,t)=>{let{__scopeTooltip:n,...l}=e,a=O(S,n),u=R(S,n),c=x(n),f=r.useRef(null),d=(0,i.s)(t,f,a.onTriggerChange),m=r.useRef(!1),h=r.useRef(!1),g=r.useCallback(()=>m.current=!1,[]);return r.useEffect(()=>()=>document.removeEventListener("pointerup",g),[g]),(0,v.jsx)(s.Mz,{asChild:!0,...c,children:(0,v.jsx)(p.sG.button,{"aria-describedby":a.open?a.contentId:void 0,"data-state":a.stateAttribute,...l,ref:d,onPointerMove:(0,o.mK)(e.onPointerMove,e=>{"touch"!==e.pointerType&&(h.current||u.isPointerInTransitRef.current||(a.onTriggerEnter(),h.current=!0))}),onPointerLeave:(0,o.mK)(e.onPointerLeave,()=>{a.onTriggerLeave(),h.current=!1}),onPointerDown:(0,o.mK)(e.onPointerDown,()=>{a.open&&a.onClose(),m.current=!0,document.addEventListener("pointerup",g,{once:!0})}),onFocus:(0,o.mK)(e.onFocus,()=>{m.current||a.onOpen()}),onBlur:(0,o.mK)(e.onBlur,a.onClose),onClick:(0,o.mK)(e.onClick,a.onClose)})})});N.displayName=S;var[D,k]=y("TooltipPortal",{forceMount:void 0}),M="TooltipContent",j=r.forwardRef((e,t)=>{let n=k(M,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...i}=e,l=O(M,e.__scopeTooltip);return(0,v.jsx)(f,{present:r||l.open,children:l.disableHoverableContent?(0,v.jsx)(H,{side:o,...i,ref:t}):(0,v.jsx)(W,{side:o,...i,ref:t})})}),W=r.forwardRef((e,t)=>{let n=O(M,e.__scopeTooltip),o=R(M,e.__scopeTooltip),l=r.useRef(null),a=(0,i.s)(t,l),[u,s]=r.useState(null),{trigger:c,onClose:f}=n,d=l.current,{onPointerInTransitChange:p}=o,m=r.useCallback(()=>{s(null),p(!1)},[p]),h=r.useCallback((e,t)=>{let n=e.currentTarget,r={x:e.clientX,y:e.clientY},o=function(e,t){let n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(n,r,o,i)){case i:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw Error("unreachable")}}(r,n.getBoundingClientRect());s(function(e){let t=e.slice();return t.sort((e,t)=>e.x<t.x?-1:e.x>t.x?1:e.y<t.y?-1:1*!!(e.y>t.y)),function(e){if(e.length<=1)return e.slice();let t=[];for(let n=0;n<e.length;n++){let r=e[n];for(;t.length>=2;){let e=t[t.length-1],n=t[t.length-2];if((e.x-n.x)*(r.y-n.y)>=(e.y-n.y)*(r.x-n.x))t.pop();else break}t.push(r)}t.pop();let n=[];for(let t=e.length-1;t>=0;t--){let r=e[t];for(;n.length>=2;){let e=n[n.length-1],t=n[n.length-2];if((e.x-t.x)*(r.y-t.y)>=(e.y-t.y)*(r.x-t.x))n.pop();else break}n.push(r)}return(n.pop(),1===t.length&&1===n.length&&t[0].x===n[0].x&&t[0].y===n[0].y)?t:t.concat(n)}(t)}([...function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:5,r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n})}return r}(r,o),...function(e){let{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}(t.getBoundingClientRect())])),p(!0)},[p]);return r.useEffect(()=>()=>m(),[m]),r.useEffect(()=>{if(c&&d){let e=e=>h(e,d),t=e=>h(e,c);return c.addEventListener("pointerleave",e),d.addEventListener("pointerleave",t),()=>{c.removeEventListener("pointerleave",e),d.removeEventListener("pointerleave",t)}}},[c,d,h,m]),r.useEffect(()=>{if(u){let e=e=>{let t=e.target,n={x:e.clientX,y:e.clientY},r=(null==c?void 0:c.contains(t))||(null==d?void 0:d.contains(t)),o=!function(e,t){let{x:n,y:r}=e,o=!1;for(let e=0,i=t.length-1;e<t.length;i=e++){let l=t[e],a=t[i],u=l.x,s=l.y,c=a.x,f=a.y;s>r!=f>r&&n<(c-u)*(r-s)/(f-s)+u&&(o=!o)}return o}(n,u);r?m():o&&(m(),f())};return document.addEventListener("pointermove",e),()=>document.removeEventListener("pointermove",e)}},[c,d,u,f,m]),(0,v.jsx)(H,{...e,ref:a})}),[_,F]=y(L,{isInside:!1}),B=(0,m.Dc)("TooltipContent"),H=r.forwardRef((e,t)=>{let{__scopeTooltip:n,children:o,"aria-label":i,onEscapeKeyDown:l,onPointerDownOutside:u,...c}=e,f=O(M,n),d=x(n),{onClose:p}=f;return r.useEffect(()=>(document.addEventListener(E,p),()=>document.removeEventListener(E,p)),[p]),r.useEffect(()=>{if(f.trigger){let e=e=>{let t=e.target;(null==t?void 0:t.contains(f.trigger))&&p()};return window.addEventListener("scroll",e,{capture:!0}),()=>window.removeEventListener("scroll",e,{capture:!0})}},[f.trigger,p]),(0,v.jsx)(a.qW,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:e=>e.preventDefault(),onDismiss:p,children:(0,v.jsxs)(s.UC,{"data-state":f.stateAttribute,...d,...c,ref:t,style:{...c.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[(0,v.jsx)(B,{children:o}),(0,v.jsx)(_,{scope:n,isInside:!0,children:(0,v.jsx)(g.bL,{id:f.contentId,role:"tooltip",children:i||o})})]})})});j.displayName=M;var I="TooltipArrow";r.forwardRef((e,t)=>{let{__scopeTooltip:n,...r}=e,o=x(n);return F(I,n).isInside?null:(0,v.jsx)(s.i3,{...o,...r,ref:t})}).displayName=I;var z=T,U=P,$=N,V=j},9302:(e,t,n)=>{n.d(t,{Z:()=>u});var r=n(4773),o=n(1471),i=n(63),l=n(3049),a=n(5386),u=r.forwardRef((e,t)=>{var n,u;let{container:s,...c}=e,[f,d]=r.useState(!1);(0,l.N)(()=>d(!0),[]);let p=s||f&&(null==(u=globalThis)||null==(n=u.document)?void 0:n.body);return p?o.createPortal((0,a.jsx)(i.sG.div,{...c,ref:t}),p):null});u.displayName="Portal"},9448:(e,t,n)=>{n.d(t,{Mz:()=>e0,i3:()=>e3,UC:()=>e1,bL:()=>eJ,Bk:()=>e_});var r=n(4773);let o=["top","right","bottom","left"],i=Math.min,l=Math.max,a=Math.round,u=Math.floor,s=e=>({x:e,y:e}),c={left:"right",right:"left",bottom:"top",top:"bottom"},f={start:"end",end:"start"};function d(e,t){return"function"==typeof e?e(t):e}function p(e){return e.split("-")[0]}function m(e){return e.split("-")[1]}function h(e){return"x"===e?"y":"x"}function g(e){return"y"===e?"height":"width"}let v=new Set(["top","bottom"]);function y(e){return v.has(p(e))?"y":"x"}function w(e){return e.replace(/start|end/g,e=>f[e])}let x=["left","right"],b=["right","left"],E=["top","bottom"],C=["bottom","top"];function R(e){return e.replace(/left|right|bottom|top/g,e=>c[e])}function T(e){return"number"!=typeof e?{top:0,right:0,bottom:0,left:0,...e}:{top:e,right:e,bottom:e,left:e}}function L(e){let{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function A(e,t,n){let r,{reference:o,floating:i}=e,l=y(t),a=h(y(t)),u=g(a),s=p(t),c="y"===l,f=o.x+o.width/2-i.width/2,d=o.y+o.height/2-i.height/2,v=o[u]/2-i[u]/2;switch(s){case"top":r={x:f,y:o.y-i.height};break;case"bottom":r={x:f,y:o.y+o.height};break;case"right":r={x:o.x+o.width,y:d};break;case"left":r={x:o.x-i.width,y:d};break;default:r={x:o.x,y:o.y}}switch(m(t)){case"start":r[a]-=v*(n&&c?-1:1);break;case"end":r[a]+=v*(n&&c?-1:1)}return r}let O=async(e,t,n)=>{let{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:l}=n,a=i.filter(Boolean),u=await (null==l.isRTL?void 0:l.isRTL(t)),s=await l.getElementRects({reference:e,floating:t,strategy:o}),{x:c,y:f}=A(s,r,u),d=r,p={},m=0;for(let n=0;n<a.length;n++){let{name:i,fn:h}=a[n],{x:g,y:v,data:y,reset:w}=await h({x:c,y:f,initialPlacement:r,placement:d,strategy:o,middlewareData:p,rects:s,platform:l,elements:{reference:e,floating:t}});c=null!=g?g:c,f=null!=v?v:f,p={...p,[i]:{...p[i],...y}},w&&m<=50&&(m++,"object"==typeof w&&(w.placement&&(d=w.placement),w.rects&&(s=!0===w.rects?await l.getElementRects({reference:e,floating:t,strategy:o}):w.rects),{x:c,y:f}=A(s,d,u)),n=-1)}return{x:c,y:f,placement:d,strategy:o,middlewareData:p}};async function P(e,t){var n;void 0===t&&(t={});let{x:r,y:o,platform:i,rects:l,elements:a,strategy:u}=e,{boundary:s="clippingAncestors",rootBoundary:c="viewport",elementContext:f="floating",altBoundary:p=!1,padding:m=0}=d(t,e),h=T(m),g=a[p?"floating"===f?"reference":"floating":f],v=L(await i.getClippingRect({element:null==(n=await (null==i.isElement?void 0:i.isElement(g)))||n?g:g.contextElement||await (null==i.getDocumentElement?void 0:i.getDocumentElement(a.floating)),boundary:s,rootBoundary:c,strategy:u})),y="floating"===f?{x:r,y:o,width:l.floating.width,height:l.floating.height}:l.reference,w=await (null==i.getOffsetParent?void 0:i.getOffsetParent(a.floating)),x=await (null==i.isElement?void 0:i.isElement(w))&&await (null==i.getScale?void 0:i.getScale(w))||{x:1,y:1},b=L(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:y,offsetParent:w,strategy:u}):y);return{top:(v.top-b.top+h.top)/x.y,bottom:(b.bottom-v.bottom+h.bottom)/x.y,left:(v.left-b.left+h.left)/x.x,right:(b.right-v.right+h.right)/x.x}}function S(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function N(e){return o.some(t=>e[t]>=0)}let D=new Set(["left","top"]);async function k(e,t){let{placement:n,platform:r,elements:o}=e,i=await (null==r.isRTL?void 0:r.isRTL(o.floating)),l=p(n),a=m(n),u="y"===y(n),s=D.has(l)?-1:1,c=i&&u?-1:1,f=d(t,e),{mainAxis:h,crossAxis:g,alignmentAxis:v}="number"==typeof f?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return a&&"number"==typeof v&&(g="end"===a?-1*v:v),u?{x:g*c,y:h*s}:{x:h*s,y:g*c}}function M(){return"undefined"!=typeof window}function j(e){return F(e)?(e.nodeName||"").toLowerCase():"#document"}function W(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function _(e){var t;return null==(t=(F(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function F(e){return!!M()&&(e instanceof Node||e instanceof W(e).Node)}function B(e){return!!M()&&(e instanceof Element||e instanceof W(e).Element)}function H(e){return!!M()&&(e instanceof HTMLElement||e instanceof W(e).HTMLElement)}function I(e){return!!M()&&"undefined"!=typeof ShadowRoot&&(e instanceof ShadowRoot||e instanceof W(e).ShadowRoot)}let z=new Set(["inline","contents"]);function U(e){let{overflow:t,overflowX:n,overflowY:r,display:o}=ee(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!z.has(o)}let $=new Set(["table","td","th"]),V=[":popover-open",":modal"];function K(e){return V.some(t=>{try{return e.matches(t)}catch(e){return!1}})}let G=["transform","translate","scale","rotate","perspective"],Y=["transform","translate","scale","rotate","perspective","filter"],X=["paint","layout","strict","content"];function q(e){let t=Q(),n=B(e)?ee(e):e;return G.some(e=>!!n[e]&&"none"!==n[e])||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||Y.some(e=>(n.willChange||"").includes(e))||X.some(e=>(n.contain||"").includes(e))}function Q(){return"undefined"!=typeof CSS&&!!CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")}let Z=new Set(["html","body","#document"]);function J(e){return Z.has(j(e))}function ee(e){return W(e).getComputedStyle(e)}function et(e){return B(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function en(e){if("html"===j(e))return e;let t=e.assignedSlot||e.parentNode||I(e)&&e.host||_(e);return I(t)?t.host:t}function er(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);let o=function e(t){let n=en(t);return J(n)?t.ownerDocument?t.ownerDocument.body:t.body:H(n)&&U(n)?n:e(n)}(e),i=o===(null==(r=e.ownerDocument)?void 0:r.body),l=W(o);if(i){let e=eo(l);return t.concat(l,l.visualViewport||[],U(o)?o:[],e&&n?er(e):[])}return t.concat(o,er(o,[],n))}function eo(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function ei(e){let t=ee(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,o=H(e),i=o?e.offsetWidth:n,l=o?e.offsetHeight:r,u=a(n)!==i||a(r)!==l;return u&&(n=i,r=l),{width:n,height:r,$:u}}function el(e){return B(e)?e:e.contextElement}function ea(e){let t=el(e);if(!H(t))return s(1);let n=t.getBoundingClientRect(),{width:r,height:o,$:i}=ei(t),l=(i?a(n.width):n.width)/r,u=(i?a(n.height):n.height)/o;return l&&Number.isFinite(l)||(l=1),u&&Number.isFinite(u)||(u=1),{x:l,y:u}}let eu=s(0);function es(e){let t=W(e);return Q()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:eu}function ec(e,t,n,r){var o;void 0===t&&(t=!1),void 0===n&&(n=!1);let i=e.getBoundingClientRect(),l=el(e),a=s(1);t&&(r?B(r)&&(a=ea(r)):a=ea(e));let u=(void 0===(o=n)&&(o=!1),r&&(!o||r===W(l))&&o)?es(l):s(0),c=(i.left+u.x)/a.x,f=(i.top+u.y)/a.y,d=i.width/a.x,p=i.height/a.y;if(l){let e=W(l),t=r&&B(r)?W(r):r,n=e,o=eo(n);for(;o&&r&&t!==n;){let e=ea(o),t=o.getBoundingClientRect(),r=ee(o),i=t.left+(o.clientLeft+parseFloat(r.paddingLeft))*e.x,l=t.top+(o.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,f*=e.y,d*=e.x,p*=e.y,c+=i,f+=l,o=eo(n=W(o))}}return L({width:d,height:p,x:c,y:f})}function ef(e,t){let n=et(e).scrollLeft;return t?t.left+n:ec(_(e)).left+n}function ed(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-ef(e,n),y:n.top+t.scrollTop}}let ep=new Set(["absolute","fixed"]);function em(e,t,n){let r;if("viewport"===t)r=function(e,t){let n=W(e),r=_(e),o=n.visualViewport,i=r.clientWidth,l=r.clientHeight,a=0,u=0;if(o){i=o.width,l=o.height;let e=Q();(!e||e&&"fixed"===t)&&(a=o.offsetLeft,u=o.offsetTop)}let s=ef(r);if(s<=0){let e=r.ownerDocument,t=e.body,n=getComputedStyle(t),o="CSS1Compat"===e.compatMode&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,l=Math.abs(r.clientWidth-t.clientWidth-o);l<=25&&(i-=l)}else s<=25&&(i+=s);return{width:i,height:l,x:a,y:u}}(e,n);else if("document"===t)r=function(e){let t=_(e),n=et(e),r=e.ownerDocument.body,o=l(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=l(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),a=-n.scrollLeft+ef(e),u=-n.scrollTop;return"rtl"===ee(r).direction&&(a+=l(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:a,y:u}}(_(e));else if(B(t))r=function(e,t){let n=ec(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=H(e)?ea(e):s(1),l=e.clientWidth*i.x,a=e.clientHeight*i.y;return{width:l,height:a,x:o*i.x,y:r*i.y}}(t,n);else{let n=es(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return L(r)}function eh(e){return"static"===ee(e).position}function eg(e,t){if(!H(e)||"fixed"===ee(e).position)return null;if(t)return t(e);let n=e.offsetParent;return _(e)===n&&(n=n.ownerDocument.body),n}function ev(e,t){var n;let r=W(e);if(K(e))return r;if(!H(e)){let t=en(e);for(;t&&!J(t);){if(B(t)&&!eh(t))return t;t=en(t)}return r}let o=eg(e,t);for(;o&&(n=o,$.has(j(n)))&&eh(o);)o=eg(o,t);return o&&J(o)&&eh(o)&&!q(o)?r:o||function(e){let t=en(e);for(;H(t)&&!J(t);){if(q(t))return t;if(K(t))break;t=en(t)}return null}(e)||r}let ey=async function(e){let t=this.getOffsetParent||ev,n=this.getDimensions,r=await n(e.floating);return{reference:function(e,t,n){let r=H(t),o=_(t),i="fixed"===n,l=ec(e,!0,i,t),a={scrollLeft:0,scrollTop:0},u=s(0);if(r||!r&&!i)if(("body"!==j(t)||U(o))&&(a=et(t)),r){let e=ec(t,!0,i,t);u.x=e.x+t.clientLeft,u.y=e.y+t.clientTop}else o&&(u.x=ef(o));i&&!r&&o&&(u.x=ef(o));let c=!o||r||i?s(0):ed(o,a);return{x:l.left+a.scrollLeft-u.x-c.x,y:l.top+a.scrollTop-u.y-c.y,width:l.width,height:l.height}}(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},ew={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e,i="fixed"===o,l=_(r),a=!!t&&K(t.floating);if(r===l||a&&i)return n;let u={scrollLeft:0,scrollTop:0},c=s(1),f=s(0),d=H(r);if((d||!d&&!i)&&(("body"!==j(r)||U(l))&&(u=et(r)),H(r))){let e=ec(r);c=ea(r),f.x=e.x+r.clientLeft,f.y=e.y+r.clientTop}let p=!l||d||i?s(0):ed(l,u);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-u.scrollLeft*c.x+f.x+p.x,y:n.y*c.y-u.scrollTop*c.y+f.y+p.y}},getDocumentElement:_,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e,a=[..."clippingAncestors"===n?K(t)?[]:function(e,t){let n=t.get(e);if(n)return n;let r=er(e,[],!1).filter(e=>B(e)&&"body"!==j(e)),o=null,i="fixed"===ee(e).position,l=i?en(e):e;for(;B(l)&&!J(l);){let t=ee(l),n=q(l);n||"fixed"!==t.position||(o=null),(i?!n&&!o:!n&&"static"===t.position&&!!o&&ep.has(o.position)||U(l)&&!n&&function e(t,n){let r=en(t);return!(r===n||!B(r)||J(r))&&("fixed"===ee(r).position||e(r,n))}(e,l))?r=r.filter(e=>e!==l):o=t,l=en(l)}return t.set(e,r),r}(t,this._c):[].concat(n),r],u=a[0],s=a.reduce((e,n)=>{let r=em(t,n,o);return e.top=l(r.top,e.top),e.right=i(r.right,e.right),e.bottom=i(r.bottom,e.bottom),e.left=l(r.left,e.left),e},em(t,u,o));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}},getOffsetParent:ev,getElementRects:ey,getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){let{width:t,height:n}=ei(e);return{width:t,height:n}},getScale:ea,isElement:B,isRTL:function(e){return"rtl"===ee(e).direction}};function ex(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}let eb=e=>({name:"arrow",options:e,async fn(t){let{x:n,y:r,placement:o,rects:a,platform:u,elements:s,middlewareData:c}=t,{element:f,padding:p=0}=d(e,t)||{};if(null==f)return{};let v=T(p),w={x:n,y:r},x=h(y(o)),b=g(x),E=await u.getDimensions(f),C="y"===x,R=C?"clientHeight":"clientWidth",L=a.reference[b]+a.reference[x]-w[x]-a.floating[b],A=w[x]-a.reference[x],O=await (null==u.getOffsetParent?void 0:u.getOffsetParent(f)),P=O?O[R]:0;P&&await (null==u.isElement?void 0:u.isElement(O))||(P=s.floating[R]||a.floating[b]);let S=P/2-E[b]/2-1,N=i(v[C?"top":"left"],S),D=i(v[C?"bottom":"right"],S),k=P-E[b]-D,M=P/2-E[b]/2+(L/2-A/2),j=l(N,i(M,k)),W=!c.arrow&&null!=m(o)&&M!==j&&a.reference[b]/2-(M<N?N:D)-E[b]/2<0,_=W?M<N?M-N:M-k:0;return{[x]:w[x]+_,data:{[x]:j,centerOffset:M-j-_,...W&&{alignmentOffset:_}},reset:W}}});var eE=n(1471),eC="undefined"!=typeof document?r.useLayoutEffect:function(){};function eR(e,t){let n,r,o;if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if((n=e.length)!==t.length)return!1;for(r=n;0!=r--;)if(!eR(e[r],t[r]))return!1;return!0}if((n=(o=Object.keys(e)).length)!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!({}).hasOwnProperty.call(t,o[r]))return!1;for(r=n;0!=r--;){let n=o[r];if(("_owner"!==n||!e.$$typeof)&&!eR(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function eT(e){return"undefined"==typeof window?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function eL(e,t){let n=eT(e);return Math.round(t*n)/n}function eA(e){let t=r.useRef(e);return eC(()=>{t.current=e}),t}var eO=n(63),eP=n(5386),eS=r.forwardRef((e,t)=>{let{children:n,width:r=10,height:o=5,...i}=e;return(0,eP.jsx)(eO.sG.svg,{...i,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:(0,eP.jsx)("polygon",{points:"0,0 30,0 15,10"})})});eS.displayName="Arrow";var eN=n(5034),eD=n(7328),ek=n(819),eM=n(3049),ej="Popper",[eW,e_]=(0,eD.A)(ej),[eF,eB]=eW(ej),eH=e=>{let{__scopePopper:t,children:n}=e,[o,i]=r.useState(null);return(0,eP.jsx)(eF,{scope:t,anchor:o,onAnchorChange:i,children:n})};eH.displayName=ej;var eI="PopperAnchor",ez=r.forwardRef((e,t)=>{let{__scopePopper:n,virtualRef:o,...i}=e,l=eB(eI,n),a=r.useRef(null),u=(0,eN.s)(t,a),s=r.useRef(null);return r.useEffect(()=>{let e=s.current;s.current=(null==o?void 0:o.current)||a.current,e!==s.current&&l.onAnchorChange(s.current)}),o?null:(0,eP.jsx)(eO.sG.div,{...i,ref:u})});ez.displayName=eI;var eU="PopperContent",[e$,eV]=eW(eU),eK=r.forwardRef((e,t)=>{var n,o,a,s,c,f,v,T;let{__scopePopper:L,side:A="bottom",sideOffset:M=0,align:j="center",alignOffset:W=0,arrowPadding:F=0,avoidCollisions:B=!0,collisionBoundary:H=[],collisionPadding:I=0,sticky:z="partial",hideWhenDetached:U=!1,updatePositionStrategy:$="optimized",onPlaced:V,...K}=e,G=eB(eU,L),[Y,X]=r.useState(null),q=(0,eN.s)(t,e=>X(e)),[Q,Z]=r.useState(null),J=function(e){let[t,n]=r.useState(void 0);return(0,eM.N)(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{let r,o;if(!Array.isArray(t)||!t.length)return;let i=t[0];if("borderBoxSize"in i){let e=i.borderBoxSize,t=Array.isArray(e)?e[0]:e;r=t.inlineSize,o=t.blockSize}else r=e.offsetWidth,o=e.offsetHeight;n({width:r,height:o})});return t.observe(e,{box:"border-box"}),()=>t.unobserve(e)}n(void 0)},[e]),t}(Q),ee=null!=(v=null==J?void 0:J.width)?v:0,et=null!=(T=null==J?void 0:J.height)?T:0,en="number"==typeof I?I:{top:0,right:0,bottom:0,left:0,...I},eo=Array.isArray(H)?H:[H],ei=eo.length>0,ea={padding:en,boundary:eo.filter(eq),altBoundary:ei},{refs:eu,floatingStyles:es,placement:ef,isPositioned:ed,middlewareData:ep}=function(e){void 0===e&&(e={});let{placement:t="bottom",strategy:n="absolute",middleware:o=[],platform:i,elements:{reference:l,floating:a}={},transform:u=!0,whileElementsMounted:s,open:c}=e,[f,d]=r.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,m]=r.useState(o);eR(p,o)||m(o);let[h,g]=r.useState(null),[v,y]=r.useState(null),w=r.useCallback(e=>{e!==C.current&&(C.current=e,g(e))},[]),x=r.useCallback(e=>{e!==R.current&&(R.current=e,y(e))},[]),b=l||h,E=a||v,C=r.useRef(null),R=r.useRef(null),T=r.useRef(f),L=null!=s,A=eA(s),P=eA(i),S=eA(c),N=r.useCallback(()=>{if(!C.current||!R.current)return;let e={placement:t,strategy:n,middleware:p};P.current&&(e.platform=P.current),((e,t,n)=>{let r=new Map,o={platform:ew,...n},i={...o.platform,_c:r};return O(e,t,{...o,platform:i})})(C.current,R.current,e).then(e=>{let t={...e,isPositioned:!1!==S.current};D.current&&!eR(T.current,t)&&(T.current=t,eE.flushSync(()=>{d(t)}))})},[p,t,n,P,S]);eC(()=>{!1===c&&T.current.isPositioned&&(T.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[c]);let D=r.useRef(!1);eC(()=>(D.current=!0,()=>{D.current=!1}),[]),eC(()=>{if(b&&(C.current=b),E&&(R.current=E),b&&E){if(A.current)return A.current(b,E,N);N()}},[b,E,N,A,L]);let k=r.useMemo(()=>({reference:C,floating:R,setReference:w,setFloating:x}),[w,x]),M=r.useMemo(()=>({reference:b,floating:E}),[b,E]),j=r.useMemo(()=>{let e={position:n,left:0,top:0};if(!M.floating)return e;let t=eL(M.floating,f.x),r=eL(M.floating,f.y);return u?{...e,transform:"translate("+t+"px, "+r+"px)",...eT(M.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}},[n,u,M.floating,f.x,f.y]);return r.useMemo(()=>({...f,update:N,refs:k,elements:M,floatingStyles:j}),[f,N,k,M,j])}({strategy:"fixed",placement:A+("center"!==j?"-"+j:""),whileElementsMounted:function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e,t,n,r){let o;void 0===r&&(r={});let{ancestorScroll:a=!0,ancestorResize:s=!0,elementResize:c="function"==typeof ResizeObserver,layoutShift:f="function"==typeof IntersectionObserver,animationFrame:d=!1}=r,p=el(e),m=a||s?[...p?er(p):[],...er(t)]:[];m.forEach(e=>{a&&e.addEventListener("scroll",n,{passive:!0}),s&&e.addEventListener("resize",n)});let h=p&&f?function(e,t){let n,r=null,o=_(e);function a(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return!function s(c,f){void 0===c&&(c=!1),void 0===f&&(f=1),a();let d=e.getBoundingClientRect(),{left:p,top:m,width:h,height:g}=d;if(c||t(),!h||!g)return;let v=u(m),y=u(o.clientWidth-(p+h)),w={rootMargin:-v+"px "+-y+"px "+-u(o.clientHeight-(m+g))+"px "+-u(p)+"px",threshold:l(0,i(1,f))||1},x=!0;function b(t){let r=t[0].intersectionRatio;if(r!==f){if(!x)return s();r?s(!1,r):n=setTimeout(()=>{s(!1,1e-7)},1e3)}1!==r||ex(d,e.getBoundingClientRect())||s(),x=!1}try{r=new IntersectionObserver(b,{...w,root:o.ownerDocument})}catch(e){r=new IntersectionObserver(b,w)}r.observe(e)}(!0),a}(p,n):null,g=-1,v=null;c&&(v=new ResizeObserver(e=>{let[r]=e;r&&r.target===p&&v&&(v.unobserve(t),cancelAnimationFrame(g),g=requestAnimationFrame(()=>{var e;null==(e=v)||e.observe(t)})),n()}),p&&!d&&v.observe(p),v.observe(t));let y=d?ec(e):null;return d&&function t(){let r=ec(e);y&&!ex(y,r)&&n(),y=r,o=requestAnimationFrame(t)}(),n(),()=>{var e;m.forEach(e=>{a&&e.removeEventListener("scroll",n),s&&e.removeEventListener("resize",n)}),null==h||h(),null==(e=v)||e.disconnect(),v=null,d&&cancelAnimationFrame(o)}}(...t,{animationFrame:"always"===$})},elements:{reference:G.anchor},middleware:[((e,t)=>({...function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,r;let{x:o,y:i,placement:l,middlewareData:a}=t,u=await k(t,e);return l===(null==(n=a.offset)?void 0:n.placement)&&null!=(r=a.arrow)&&r.alignmentOffset?{}:{x:o+u.x,y:i+u.y,data:{...u,placement:l}}}}}(e),options:[e,t]}))({mainAxis:M+et,alignmentAxis:W}),B&&((e,t)=>({...function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){let{x:n,y:r,placement:o}=t,{mainAxis:a=!0,crossAxis:u=!1,limiter:s={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...c}=d(e,t),f={x:n,y:r},m=await P(t,c),g=y(p(o)),v=h(g),w=f[v],x=f[g];if(a){let e="y"===v?"top":"left",t="y"===v?"bottom":"right",n=w+m[e],r=w-m[t];w=l(n,i(w,r))}if(u){let e="y"===g?"top":"left",t="y"===g?"bottom":"right",n=x+m[e],r=x-m[t];x=l(n,i(x,r))}let b=s.fn({...t,[v]:w,[g]:x});return{...b,data:{x:b.x-n,y:b.y-r,enabled:{[v]:a,[g]:u}}}}}}(e),options:[e,t]}))({mainAxis:!0,crossAxis:!1,limiter:"partial"===z?((e,t)=>({...function(e){return void 0===e&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:o,rects:i,middlewareData:l}=t,{offset:a=0,mainAxis:u=!0,crossAxis:s=!0}=d(e,t),c={x:n,y:r},f=y(o),m=h(f),g=c[m],v=c[f],w=d(a,t),x="number"==typeof w?{mainAxis:w,crossAxis:0}:{mainAxis:0,crossAxis:0,...w};if(u){let e="y"===m?"height":"width",t=i.reference[m]-i.floating[e]+x.mainAxis,n=i.reference[m]+i.reference[e]-x.mainAxis;g<t?g=t:g>n&&(g=n)}if(s){var b,E;let e="y"===m?"width":"height",t=D.has(p(o)),n=i.reference[f]-i.floating[e]+(t&&(null==(b=l.offset)?void 0:b[f])||0)+(t?0:x.crossAxis),r=i.reference[f]+i.reference[e]+(t?0:(null==(E=l.offset)?void 0:E[f])||0)-(t?x.crossAxis:0);v<n?v=n:v>r&&(v=r)}return{[m]:g,[f]:v}}}}(e),options:[e,t]}))():void 0,...ea}),B&&((e,t)=>({...function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r,o,i,l;let{placement:a,middlewareData:u,rects:s,initialPlacement:c,platform:f,elements:v}=t,{mainAxis:T=!0,crossAxis:L=!0,fallbackPlacements:A,fallbackStrategy:O="bestFit",fallbackAxisSideDirection:S="none",flipAlignment:N=!0,...D}=d(e,t);if(null!=(n=u.arrow)&&n.alignmentOffset)return{};let k=p(a),M=y(c),j=p(c)===c,W=await (null==f.isRTL?void 0:f.isRTL(v.floating)),_=A||(j||!N?[R(c)]:function(e){let t=R(e);return[w(e),t,w(t)]}(c)),F="none"!==S;!A&&F&&_.push(...function(e,t,n,r){let o=m(e),i=function(e,t,n){switch(e){case"top":case"bottom":if(n)return t?b:x;return t?x:b;case"left":case"right":return t?E:C;default:return[]}}(p(e),"start"===n,r);return o&&(i=i.map(e=>e+"-"+o),t&&(i=i.concat(i.map(w)))),i}(c,N,S,W));let B=[c,..._],H=await P(t,D),I=[],z=(null==(r=u.flip)?void 0:r.overflows)||[];if(T&&I.push(H[k]),L){let e=function(e,t,n){void 0===n&&(n=!1);let r=m(e),o=h(y(e)),i=g(o),l="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[i]>t.floating[i]&&(l=R(l)),[l,R(l)]}(a,s,W);I.push(H[e[0]],H[e[1]])}if(z=[...z,{placement:a,overflows:I}],!I.every(e=>e<=0)){let e=((null==(o=u.flip)?void 0:o.index)||0)+1,t=B[e];if(t&&("alignment"!==L||M===y(t)||z.every(e=>y(e.placement)!==M||e.overflows[0]>0)))return{data:{index:e,overflows:z},reset:{placement:t}};let n=null==(i=z.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:i.placement;if(!n)switch(O){case"bestFit":{let e=null==(l=z.filter(e=>{if(F){let t=y(e.placement);return t===M||"y"===t}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0])?void 0:l[0];e&&(n=e);break}case"initialPlacement":n=c}if(a!==n)return{reset:{placement:n}}}return{}}}}(e),options:[e,t]}))({...ea}),((e,t)=>({...function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){var n,r;let o,a,{placement:u,rects:s,platform:c,elements:f}=t,{apply:h=()=>{},...g}=d(e,t),v=await P(t,g),w=p(u),x=m(u),b="y"===y(u),{width:E,height:C}=s.floating;"top"===w||"bottom"===w?(o=w,a=x===(await (null==c.isRTL?void 0:c.isRTL(f.floating))?"start":"end")?"left":"right"):(a=w,o="end"===x?"top":"bottom");let R=C-v.top-v.bottom,T=E-v.left-v.right,L=i(C-v[o],R),A=i(E-v[a],T),O=!t.middlewareData.shift,S=L,N=A;if(null!=(n=t.middlewareData.shift)&&n.enabled.x&&(N=T),null!=(r=t.middlewareData.shift)&&r.enabled.y&&(S=R),O&&!x){let e=l(v.left,0),t=l(v.right,0),n=l(v.top,0),r=l(v.bottom,0);b?N=E-2*(0!==e||0!==t?e+t:l(v.left,v.right)):S=C-2*(0!==n||0!==r?n+r:l(v.top,v.bottom))}await h({...t,availableWidth:N,availableHeight:S});let D=await c.getDimensions(f.floating);return E!==D.width||C!==D.height?{reset:{rects:!0}}:{}}}}(e),options:[e,t]}))({...ea,apply:e=>{let{elements:t,rects:n,availableWidth:r,availableHeight:o}=e,{width:i,height:l}=n.reference,a=t.floating.style;a.setProperty("--radix-popper-available-width","".concat(r,"px")),a.setProperty("--radix-popper-available-height","".concat(o,"px")),a.setProperty("--radix-popper-anchor-width","".concat(i,"px")),a.setProperty("--radix-popper-anchor-height","".concat(l,"px"))}}),Q&&((e,t)=>({...(e=>({name:"arrow",options:e,fn(t){let{element:n,padding:r}="function"==typeof e?e(t):e;return n&&({}).hasOwnProperty.call(n,"current")?null!=n.current?eb({element:n.current,padding:r}).fn(t):{}:n?eb({element:n,padding:r}).fn(t):{}}}))(e),options:[e,t]}))({element:Q,padding:F}),eQ({arrowWidth:ee,arrowHeight:et}),U&&((e,t)=>({...function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){let{rects:n}=t,{strategy:r="referenceHidden",...o}=d(e,t);switch(r){case"referenceHidden":{let e=S(await P(t,{...o,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:N(e)}}}case"escaped":{let e=S(await P(t,{...o,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:N(e)}}}default:return{}}}}}(e),options:[e,t]}))({strategy:"referenceHidden",...ea})]}),[em,eh]=eZ(ef),eg=(0,ek.c)(V);(0,eM.N)(()=>{ed&&(null==eg||eg())},[ed,eg]);let ev=null==(n=ep.arrow)?void 0:n.x,ey=null==(o=ep.arrow)?void 0:o.y,eS=(null==(a=ep.arrow)?void 0:a.centerOffset)!==0,[eD,ej]=r.useState();return(0,eM.N)(()=>{Y&&ej(window.getComputedStyle(Y).zIndex)},[Y]),(0,eP.jsx)("div",{ref:eu.setFloating,"data-radix-popper-content-wrapper":"",style:{...es,transform:ed?es.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:eD,"--radix-popper-transform-origin":[null==(s=ep.transformOrigin)?void 0:s.x,null==(c=ep.transformOrigin)?void 0:c.y].join(" "),...(null==(f=ep.hide)?void 0:f.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:(0,eP.jsx)(e$,{scope:L,placedSide:em,onArrowChange:Z,arrowX:ev,arrowY:ey,shouldHideArrow:eS,children:(0,eP.jsx)(eO.sG.div,{"data-side":em,"data-align":eh,...K,ref:q,style:{...K.style,animation:ed?void 0:"none"}})})})});eK.displayName=eU;var eG="PopperArrow",eY={top:"bottom",right:"left",bottom:"top",left:"right"},eX=r.forwardRef(function(e,t){let{__scopePopper:n,...r}=e,o=eV(eG,n),i=eY[o.placedSide];return(0,eP.jsx)("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0},children:(0,eP.jsx)(eS,{...r,ref:t,style:{...r.style,display:"block"}})})});function eq(e){return null!==e}eX.displayName=eG;var eQ=e=>({name:"transformOrigin",options:e,fn(t){var n,r,o,i,l;let{placement:a,rects:u,middlewareData:s}=t,c=(null==(n=s.arrow)?void 0:n.centerOffset)!==0,f=c?0:e.arrowWidth,d=c?0:e.arrowHeight,[p,m]=eZ(a),h={start:"0%",center:"50%",end:"100%"}[m],g=(null!=(i=null==(r=s.arrow)?void 0:r.x)?i:0)+f/2,v=(null!=(l=null==(o=s.arrow)?void 0:o.y)?l:0)+d/2,y="",w="";return"bottom"===p?(y=c?h:"".concat(g,"px"),w="".concat(-d,"px")):"top"===p?(y=c?h:"".concat(g,"px"),w="".concat(u.floating.height+d,"px")):"right"===p?(y="".concat(-d,"px"),w=c?h:"".concat(v,"px")):"left"===p&&(y="".concat(u.floating.width+d,"px"),w=c?h:"".concat(v,"px")),{data:{x:y,y:w}}}});function eZ(e){let[t,n="center"]=e.split("-");return[t,n]}var eJ=eH,e0=ez,e1=eK,e3=eX},9559:(e,t,n)=>{n.d(t,{i:()=>a});var r,o=n(4773),i=n(3049),l=(r||(r=n.t(o,2)))[" useInsertionEffect ".trim().toString()]||i.N;function a({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){let[i,a,u]=function({defaultProp:e,onChange:t}){let[n,r]=o.useState(e),i=o.useRef(n),a=o.useRef(t);return l(()=>{a.current=t},[t]),o.useEffect(()=>{i.current!==n&&(a.current?.(n),i.current=n)},[n,i]),[n,r,a]}({defaultProp:t,onChange:n}),s=void 0!==e,c=s?e:i;{let t=o.useRef(void 0!==e);o.useEffect(()=>{let e=t.current;if(e!==s){let t=s?"controlled":"uncontrolled";console.warn(`${r} is changing from ${e?"controlled":"uncontrolled"} to ${t}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`)}t.current=s},[s,r])}return[c,o.useCallback(t=>{if(s){let n="function"==typeof t?t(e):t;n!==e&&u.current?.(n)}else a(t)},[s,e,a,u])]}Symbol("RADIX:SYNC_STATE")}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[378],{316:(e,t,r)=>{r.d(t,{A:()=>n});let n=(0,r(8258).A)("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]])},823:(e,t,r)=>{e.exports=r(1554)},1554:(e,t,r)=>{var n=r(4773),i="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},u=n.useState,a=n.useEffect,o=n.useLayoutEffect,l=n.useDebugValue;function c(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!i(e,r)}catch(e){return!0}}var s="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var r=t(),n=u({inst:{value:r,getSnapshot:t}}),i=n[0].inst,s=n[1];return o(function(){i.value=r,i.getSnapshot=t,c(i)&&s({inst:i})},[e,r,t]),a(function(){return c(i)&&s({inst:i}),e(function(){c(i)&&s({inst:i})})},[e]),l(r),r};t.useSyncExternalStore=void 0!==n.useSyncExternalStore?n.useSyncExternalStore:s},6489:(e,t,r)=>{let n;r.d(t,{Ay:()=>X});var i=r(4773),u=r(823),a=Object.prototype.hasOwnProperty;let o=new WeakMap,l=()=>{},c=l(),s=Object,f=e=>e===c,d=(e,t)=>({...e,...t}),g={},p={},y="undefined",h=typeof window!=y,v=typeof document!=y,w=h&&"Deno"in window,b=(e,t)=>{let r=o.get(e);return[()=>!f(t)&&e.get(t)||g,n=>{if(!f(t)){let i=e.get(t);t in p||(p[t]=i),r[5](t,d(i,n),i||g)}},r[6],()=>!f(t)&&t in p?p[t]:!f(t)&&e.get(t)||g]},m=!0,[O,S]=h&&window.addEventListener?[window.addEventListener.bind(window),window.removeEventListener.bind(window)]:[l,l],E={initFocus:e=>(v&&document.addEventListener("visibilitychange",e),O("focus",e),()=>{v&&document.removeEventListener("visibilitychange",e),S("focus",e)}),initReconnect:e=>{let t=()=>{m=!0,e()},r=()=>{m=!1};return O("online",t),O("offline",r),()=>{S("online",t),S("offline",r)}}},_=!i.useId,k=!h||w,R=k?i.useEffect:i.useLayoutEffect,L="undefined"!=typeof navigator&&navigator.connection,T=!k&&L&&(["slow-2g","2g"].includes(L.effectiveType)||L.saveData),V=new WeakMap,C=(e,t)=>e==="[object ".concat(t,"]"),j=0,D=e=>{let t,r,n=typeof e,i=s.prototype.toString.call(e),u=C(i,"Date"),a=C(i,"RegExp"),o=C(i,"Object");if(s(e)!==e||u||a)t=u?e.toJSON():"symbol"==n?e.toString():"string"==n?JSON.stringify(e):""+e;else{if(t=V.get(e))return t;if(t=++j+"~",V.set(e,t),Array.isArray(e)){for(r=0,t="@";r<e.length;r++)t+=D(e[r])+",";V.set(e,t)}if(o){t="#";let n=s.keys(e).sort();for(;!f(r=n.pop());)f(e[r])||(t+=r+":"+D(e[r])+",");V.set(e,t)}}return t},M=e=>{if("function"==typeof e)try{e=e()}catch(t){e=""}let t=e;return[e="string"==typeof e?e:(Array.isArray(e)?e.length:e)?D(e):"",t]},x=0,A=()=>++x;async function P(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];let[n,i,u,a]=t,l=d({populateCache:!0,throwOnError:!0},"boolean"==typeof a?{revalidate:a}:a||{}),s=l.populateCache,g=l.rollbackOnError,p=l.optimisticData,y=l.throwOnError;if("function"==typeof i){let e=[];for(let t of n.keys())!/^\$(inf|sub)\$/.test(t)&&i(n.get(t)._k)&&e.push(t);return Promise.all(e.map(h))}return h(i);async function h(e){let r,[i]=M(e);if(!i)return;let[a,d]=b(n,i),[h,v,w,m]=o.get(n),O=()=>{let t=h[i];return("function"==typeof l.revalidate?l.revalidate(a().data,e):!1!==l.revalidate)&&(delete w[i],delete m[i],t&&t[0])?t[0](2).then(()=>a().data):a().data};if(t.length<3)return O();let S=u,E=!1,_=A();v[i]=[_,0];let k=!f(p),R=a(),L=R.data,T=R._c,V=f(T)?L:T;if(k&&d({data:p="function"==typeof p?p(V,L):p,_c:V}),"function"==typeof S)try{S=S(V)}catch(e){r=e,E=!0}if(S&&"function"==typeof S.then){let e;if(S=await S.catch(e=>{r=e,E=!0}),_!==v[i][0]){if(E)throw r;return S}E&&k&&(e=r,"function"==typeof g?g(e):!1!==g)&&(s=!0,d({data:V,_c:c}))}if(s&&!E&&("function"==typeof s?d({data:s(S,V),error:c,_c:c}):d({data:S,error:c,_c:c})),v[i][1]=A(),Promise.resolve(O()).then(()=>{d({_c:c})}),E){if(y)throw r;return}return S}}let F=(e,t)=>{for(let r in e)e[r][0]&&e[r][0](t)},I=(e,t)=>{if(!o.has(e)){let r=d(E,t),n=Object.create(null),i=P.bind(c,e),u=l,a=Object.create(null),s=(e,t)=>{let r=a[e]||[];return a[e]=r,r.push(t),()=>r.splice(r.indexOf(t),1)},f=(t,r,n)=>{e.set(t,r);let i=a[t];if(i)for(let e of i)e(r,n)},g=()=>{if(!o.has(e)&&(o.set(e,[n,Object.create(null),Object.create(null),Object.create(null),i,f,s]),!k)){let t=r.initFocus(setTimeout.bind(c,F.bind(c,n,0))),i=r.initReconnect(setTimeout.bind(c,F.bind(c,n,1)));u=()=>{t&&t(),i&&i(),o.delete(e)}}};return g(),[e,i,g,u]}return[e,o.get(e)[4]]},[W,q]=I(new Map),N=d({onLoadingSlow:l,onSuccess:l,onError:l,onErrorRetry:(e,t,r,n,i)=>{let u=r.errorRetryCount,a=i.retryCount,o=~~((Math.random()+.5)*(1<<(a<8?a:8)))*r.errorRetryInterval;(f(u)||!(a>u))&&setTimeout(n,o,i)},onDiscarded:l,revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,shouldRetryOnError:!0,errorRetryInterval:T?1e4:5e3,focusThrottleInterval:5e3,dedupingInterval:2e3,loadingTimeout:T?5e3:3e3,compare:function e(t,r){var n,i;if(t===r)return!0;if(t&&r&&(n=t.constructor)===r.constructor){if(n===Date)return t.getTime()===r.getTime();if(n===RegExp)return t.toString()===r.toString();if(n===Array){if((i=t.length)===r.length)for(;i--&&e(t[i],r[i]););return -1===i}if(!n||"object"==typeof t){for(n in i=0,t)if(a.call(t,n)&&++i&&!a.call(r,n)||!(n in r)||!e(t[n],r[n]))return!1;return Object.keys(r).length===i}}return t!=t&&r!=r},isPaused:()=>!1,cache:W,mutate:q,fallback:{}},{isOnline:()=>m,isVisible:()=>{let e=v&&document.visibilityState;return f(e)||"hidden"!==e}}),$=(e,t)=>{let r=d(e,t);if(t){let{use:n,fallback:i}=e,{use:u,fallback:a}=t;n&&u&&(r.use=n.concat(u)),i&&a&&(r.fallback=d(i,a))}return r},J=(0,i.createContext)({}),U=h&&window.__SWR_DEVTOOLS_USE__,H=(U?window.__SWR_DEVTOOLS_USE__:[]).concat(e=>(t,r,n)=>{let i=r&&((...e)=>{let[n]=M(t),[,,,i]=o.get(W);if(n.startsWith("$inf$"))return r(...e);let u=i[n];return f(u)?r(...e):(delete i[n],u)});return e(t,i,n)});U&&(window.__SWR_DEVTOOLS_REACT__=i);let z=()=>{},B=z();new WeakMap;let G=i.use||(e=>{switch(e.status){case"pending":throw e;case"fulfilled":return e.value;case"rejected":throw e.reason;default:throw e.status="pending",e.then(t=>{e.status="fulfilled",e.value=t},t=>{e.status="rejected",e.reason=t}),e}}),K={dedupe:!0},Q=Promise.resolve(c);s.defineProperty(e=>{let{value:t}=e,r=(0,i.useContext)(J),n="function"==typeof t,u=(0,i.useMemo)(()=>n?t(r):t,[n,r,t]),a=(0,i.useMemo)(()=>n?u:$(r,u),[n,r,u]),o=u&&u.provider,l=(0,i.useRef)(c);o&&!l.current&&(l.current=I(o(a.cache||W),u));let s=l.current;return s&&(a.cache=s[0],a.mutate=s[1]),R(()=>{if(s)return s[2]&&s[2](),s[3]},[]),(0,i.createElement)(J.Provider,d(e,{value:a}))},"defaultValue",{value:N});let X=(n=(e,t,r)=>{let{cache:n,compare:a,suspense:l,fallbackData:s,revalidateOnMount:g,revalidateIfStale:p,refreshInterval:v,refreshWhenHidden:w,refreshWhenOffline:m,keepPreviousData:O}=r,[S,E,L,T]=o.get(n),[V,C]=M(e),j=(0,i.useRef)(!1),D=(0,i.useRef)(!1),x=(0,i.useRef)(V),F=(0,i.useRef)(t),I=(0,i.useRef)(r),W=()=>I.current.isVisible()&&I.current.isOnline(),[q,N,$,J]=b(n,V),U=(0,i.useRef)({}).current,H=f(s)?f(r.fallback)?c:r.fallback[V]:s,z=(e,t)=>{for(let r in U)if("data"===r){if(!a(e[r],t[r])&&(!f(e[r])||!a(ei,t[r])))return!1}else if(t[r]!==e[r])return!1;return!0},B=(0,i.useMemo)(()=>{let e=!!V&&!!t&&(f(g)?!I.current.isPaused()&&!l&&!1!==p:g),r=t=>{let r=d(t);return(delete r._k,e)?{isValidating:!0,isLoading:!0,...r}:r},n=q(),i=J(),u=r(n),a=n===i?u:r(i),o=u;return[()=>{let e=r(q());return z(e,o)?(o.data=e.data,o.isLoading=e.isLoading,o.isValidating=e.isValidating,o.error=e.error,o):(o=e,e)},()=>a]},[n,V]),X=(0,u.useSyncExternalStore)((0,i.useCallback)(e=>$(V,(t,r)=>{z(r,t)||e()}),[n,V]),B[0],B[1]),Y=!j.current,Z=S[V]&&S[V].length>0,ee=X.data,et=f(ee)?H&&"function"==typeof H.then?G(H):H:ee,er=X.error,en=(0,i.useRef)(et),ei=O?f(ee)?f(en.current)?et:en.current:ee:et,eu=(!Z||!!f(er))&&(Y&&!f(g)?g:!I.current.isPaused()&&(l?!f(et)&&p:f(et)||p)),ea=!!(V&&t&&Y&&eu),eo=f(X.isValidating)?ea:X.isValidating,el=f(X.isLoading)?ea:X.isLoading,ec=(0,i.useCallback)(async e=>{let t,n,i=F.current;if(!V||!i||D.current||I.current.isPaused())return!1;let u=!0,o=e||{},l=!L[V]||!o.dedupe,s=()=>_?!D.current&&V===x.current&&j.current:V===x.current,d={isValidating:!1,isLoading:!1},g=()=>{N(d)},p=()=>{let e=L[V];e&&e[1]===n&&delete L[V]},y={isValidating:!0};f(q().data)&&(y.isLoading=!0);try{if(l&&(N(y),r.loadingTimeout&&f(q().data)&&setTimeout(()=>{u&&s()&&I.current.onLoadingSlow(V,r)},r.loadingTimeout),L[V]=[i(C),A()]),[t,n]=L[V],t=await t,l&&setTimeout(p,r.dedupingInterval),!L[V]||L[V][1]!==n)return l&&s()&&I.current.onDiscarded(V),!1;d.error=c;let e=E[V];if(!f(e)&&(n<=e[0]||n<=e[1]||0===e[1]))return g(),l&&s()&&I.current.onDiscarded(V),!1;let o=q().data;d.data=a(o,t)?o:t,l&&s()&&I.current.onSuccess(t,V,r)}catch(r){p();let e=I.current,{shouldRetryOnError:t}=e;!e.isPaused()&&(d.error=r,l&&s())&&(e.onError(r,V,e),(!0===t||"function"==typeof t&&t(r))&&(!I.current.revalidateOnFocus||!I.current.revalidateOnReconnect||W())&&e.onErrorRetry(r,V,e,e=>{let t=S[V];t&&t[0]&&t[0](3,e)},{retryCount:(o.retryCount||0)+1,dedupe:!0}))}return u=!1,g(),!0},[V,n]),es=(0,i.useCallback)((...e)=>P(n,x.current,...e),[]);if(R(()=>{F.current=t,I.current=r,f(ee)||(en.current=ee)}),R(()=>{if(!V)return;let e=ec.bind(c,K),t=0;I.current.revalidateOnFocus&&(t=Date.now()+I.current.focusThrottleInterval);let r=((e,t,r)=>{let n=t[e]||(t[e]=[]);return n.push(r),()=>{let e=n.indexOf(r);e>=0&&(n[e]=n[n.length-1],n.pop())}})(V,S,(r,n={})=>{if(0==r){let r=Date.now();I.current.revalidateOnFocus&&r>t&&W()&&(t=r+I.current.focusThrottleInterval,e())}else if(1==r)I.current.revalidateOnReconnect&&W()&&e();else if(2==r)return ec();else if(3==r)return ec(n)});return D.current=!1,x.current=V,j.current=!0,N({_k:C}),eu&&!L[V]&&(f(et)||k?e():(e=>h&&typeof window.requestAnimationFrame!=y?window.requestAnimationFrame(e):setTimeout(e,1))(e)),()=>{D.current=!0,r()}},[V]),R(()=>{let e;function t(){let t="function"==typeof v?v(q().data):v;t&&-1!==e&&(e=setTimeout(r,t))}function r(){!q().error&&(w||I.current.isVisible())&&(m||I.current.isOnline())?ec(K).then(t):t()}return t(),()=>{e&&(clearTimeout(e),e=-1)}},[v,w,m,V]),(0,i.useDebugValue)(ei),l){let e=V&&f(et);if(!_&&k&&e)throw Error("Fallback data is required when using Suspense in SSR.");e&&(F.current=t,I.current=r,D.current=!1);let n=T[V];if(G(!f(n)&&e?es(n):Q),!f(er)&&e)throw er;let i=e?ec(K):Q;!f(ei)&&e&&(i.status="fulfilled",i.value=!0),G(i)}return{mutate:es,get data(){return U.data=!0,ei},get error(){return U.error=!0,er},get isValidating(){return U.isValidating=!0,eo},get isLoading(){return U.isLoading=!0,el}}},function(...e){let t=(()=>{let e=(0,i.useContext)(J);return(0,i.useMemo)(()=>d(N,e),[e])})(),[r,u,a]="function"==typeof e[1]?[e[0],e[1],e[2]||{}]:[e[0],null,(null===e[1]?e[2]:e[1])||{}],o=$(t,a),l=n,{use:c}=o,s=(c||[]).concat(H);for(let e=s.length;e--;)l=s[e](l);return l(r,u||o.fetcher||null,o)})}}]);
|