@launchsecure/launch-kit 0.0.16 → 0.0.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (84) hide show
  1. package/dist/chart-client/assets/index--120d9P9.css +1 -0
  2. package/dist/chart-client/assets/index-D7x8nz-H.js +441 -0
  3. package/dist/chart-client/index.html +2 -2
  4. package/dist/client/assets/index-Bf8zdL3x.css +32 -0
  5. package/dist/client/assets/index-Ds9UP_cj.js +291 -0
  6. package/dist/client/index.html +2 -2
  7. package/dist/council-client/assets/index-CofZh7pS.css +1 -0
  8. package/dist/council-client/assets/index-Dc41S-R2.js +198 -0
  9. package/dist/council-client/index.html +21 -0
  10. package/dist/deck-client/assets/_baseUniq-2gclQXo7.js +1 -0
  11. package/dist/deck-client/assets/arc-DcMY5Wm0.js +1 -0
  12. package/dist/deck-client/assets/architectureDiagram-Q4EWVU46-B8iirmmJ.js +36 -0
  13. package/dist/deck-client/assets/blockDiagram-DXYQGD6D-B4JBLjmJ.js +132 -0
  14. package/dist/deck-client/assets/c4Diagram-AHTNJAMY-CojrJAk8.js +10 -0
  15. package/dist/deck-client/assets/channel-ERh5jKXV.js +1 -0
  16. package/dist/deck-client/assets/chunk-4BX2VUAB-Bmb_BMDo.js +1 -0
  17. package/dist/deck-client/assets/chunk-4TB4RGXK-CumBy8qe.js +206 -0
  18. package/dist/deck-client/assets/chunk-55IACEB6-Ka8Hb1wD.js +1 -0
  19. package/dist/deck-client/assets/chunk-EDXVE4YY-B3sIPiQo.js +1 -0
  20. package/dist/deck-client/assets/chunk-FMBD7UC4-C1tYkaqu.js +15 -0
  21. package/dist/deck-client/assets/chunk-OYMX7WX6-D7Wacbky.js +231 -0
  22. package/dist/deck-client/assets/chunk-QZHKN3VN-ChXI0vO3.js +1 -0
  23. package/dist/deck-client/assets/chunk-YZCP3GAM-BXhiqf8u.js +1 -0
  24. package/dist/deck-client/assets/classDiagram-6PBFFD2Q-CMi1Gaev.js +1 -0
  25. package/dist/deck-client/assets/classDiagram-v2-HSJHXN6E-CMi1Gaev.js +1 -0
  26. package/dist/deck-client/assets/clone-DfWhlD4X.js +1 -0
  27. package/dist/deck-client/assets/cose-bilkent-S5V4N54A-Bqp3p68D.js +1 -0
  28. package/dist/deck-client/assets/cytoscape.esm-BQk4lpUV.js +331 -0
  29. package/dist/deck-client/assets/dagre-KV5264BT-BS-rtyhZ.js +4 -0
  30. package/dist/deck-client/assets/defaultLocale-DX6XiGOO.js +1 -0
  31. package/dist/deck-client/assets/diagram-5BDNPKRD-BIrj9YGI.js +10 -0
  32. package/dist/deck-client/assets/diagram-G4DWMVQ6-noHWPIg4.js +24 -0
  33. package/dist/deck-client/assets/diagram-MMDJMWI5-C2qHxvqV.js +43 -0
  34. package/dist/deck-client/assets/diagram-TYMM5635-BytnGQr-.js +24 -0
  35. package/dist/deck-client/assets/erDiagram-SMLLAGMA-BfK5m2YQ.js +85 -0
  36. package/dist/deck-client/assets/flowDiagram-DWJPFMVM-Cq925G1Z.js +162 -0
  37. package/dist/deck-client/assets/ganttDiagram-T4ZO3ILL-DhhHPAmj.js +292 -0
  38. package/dist/deck-client/assets/gitGraphDiagram-UUTBAWPF-B3Lc0h9q.js +106 -0
  39. package/dist/deck-client/assets/graph-RTawgVWm.js +1 -0
  40. package/dist/deck-client/assets/index-765AIQ9z.css +1 -0
  41. package/dist/deck-client/assets/index-BfIfJXmS.js +476 -0
  42. package/dist/deck-client/assets/infoDiagram-42DDH7IO-BlR584kX.js +2 -0
  43. package/dist/deck-client/assets/init-Gi6I4Gst.js +1 -0
  44. package/dist/deck-client/assets/ishikawaDiagram-UXIWVN3A-DygKoNGY.js +70 -0
  45. package/dist/deck-client/assets/journeyDiagram-VCZTEJTY-BnaiYp9N.js +139 -0
  46. package/dist/deck-client/assets/kanban-definition-6JOO6SKY-BQBUBzJC.js +89 -0
  47. package/dist/deck-client/assets/katex-DkKDou_j.js +257 -0
  48. package/dist/deck-client/assets/layout-DeZ8HI1T.js +1 -0
  49. package/dist/deck-client/assets/linear-C6roLi_9.js +1 -0
  50. package/dist/deck-client/assets/min-CbUksbuI.js +1 -0
  51. package/dist/deck-client/assets/mindmap-definition-QFDTVHPH-iNxV62yN.js +96 -0
  52. package/dist/deck-client/assets/ordinal-Cboi1Yqb.js +1 -0
  53. package/dist/deck-client/assets/pieDiagram-DEJITSTG-DHVA0jaG.js +30 -0
  54. package/dist/deck-client/assets/quadrantDiagram-34T5L4WZ-DBeKKLUQ.js +7 -0
  55. package/dist/deck-client/assets/requirementDiagram-MS252O5E-CBwITx7p.js +84 -0
  56. package/dist/deck-client/assets/sankeyDiagram-XADWPNL6-BtE-1YTU.js +10 -0
  57. package/dist/deck-client/assets/sequenceDiagram-FGHM5R23-DN96yPP2.js +157 -0
  58. package/dist/deck-client/assets/stateDiagram-FHFEXIEX-VUkKC2uJ.js +1 -0
  59. package/dist/deck-client/assets/stateDiagram-v2-QKLJ7IA2-CA0IjulK.js +1 -0
  60. package/dist/deck-client/assets/timeline-definition-GMOUNBTQ-oUeZhRns.js +120 -0
  61. package/dist/deck-client/assets/vennDiagram-DHZGUBPP-D87fK90n.js +34 -0
  62. package/dist/deck-client/assets/wardley-RL74JXVD-DYbYcpDp.js +162 -0
  63. package/dist/deck-client/assets/wardleyDiagram-NUSXRM2D-Ca_i0QRA.js +20 -0
  64. package/dist/deck-client/assets/xychartDiagram-5P7HB3ND-CUOJVIvq.js +7 -0
  65. package/dist/deck-client/index.html +21 -0
  66. package/dist/server/chart-serve.js +258 -273
  67. package/dist/server/cli.js +305 -713
  68. package/dist/server/council-entry.js +1418 -0
  69. package/dist/server/council-serve.js +1039 -0
  70. package/dist/server/deck-mcp-entry.js +1789 -0
  71. package/dist/server/deck-serve.js +1275 -0
  72. package/dist/server/deck-server/deck-mcp-entry.js +1789 -0
  73. package/dist/server/deck-server/deck-serve.js +1275 -0
  74. package/dist/server/fb-wizard.js +0 -0
  75. package/dist/server/graph-mcp-entry.js +268 -701
  76. package/dist/server/server/chart-serve.js +4643 -0
  77. package/dist/server/server/cli.js +13360 -0
  78. package/dist/server/server/fb-wizard.js +136 -0
  79. package/dist/server/server/graph-mcp-entry.js +6776 -0
  80. package/package.json +25 -18
  81. package/dist/chart-client/assets/index-BpQPtTuo.js +0 -441
  82. package/dist/chart-client/assets/index-CbZ13AXL.css +0 -1
  83. package/dist/client/assets/index-3ENenBk-.js +0 -291
  84. package/dist/client/assets/index-BCYw64M7.css +0 -32
@@ -1,441 +0,0 @@
1
- function LP(e,n){for(var r=0;r<n.length;r++){const o=n[r];if(typeof o!="string"&&!Array.isArray(o)){for(const i in o)if(i!=="default"&&!(i in e)){const s=Object.getOwnPropertyDescriptor(o,i);s&&Object.defineProperty(e,i,s.get?s:{enumerable:!0,get:()=>o[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const n=document.createElement("link").relList;if(n&&n.supports&&n.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))o(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const a of s.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&o(a)}).observe(document,{childList:!0,subtree:!0});function r(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function o(i){if(i.ep)return;i.ep=!0;const s=r(i);fetch(i.href,s)}})();function Au(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var jw={exports:{}},Tu={},Mw={exports:{}},ge={};/**
2
- * @license React
3
- * react.production.min.js
4
- *
5
- * Copyright (c) Facebook, Inc. and its affiliates.
6
- *
7
- * This source code is licensed under the MIT license found in the
8
- * LICENSE file in the root directory of this source tree.
9
- */var Ma=Symbol.for("react.element"),zP=Symbol.for("react.portal"),FP=Symbol.for("react.fragment"),VP=Symbol.for("react.strict_mode"),BP=Symbol.for("react.profiler"),HP=Symbol.for("react.provider"),WP=Symbol.for("react.context"),UP=Symbol.for("react.forward_ref"),GP=Symbol.for("react.suspense"),YP=Symbol.for("react.memo"),XP=Symbol.for("react.lazy"),y0=Symbol.iterator;function KP(e){return e===null||typeof e!="object"?null:(e=y0&&e[y0]||e["@@iterator"],typeof e=="function"?e:null)}var Rw={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Aw=Object.assign,Tw={};function qi(e,n,r){this.props=e,this.context=n,this.refs=Tw,this.updater=r||Rw}qi.prototype.isReactComponent={};qi.prototype.setState=function(e,n){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,n,"setState")};qi.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Iw(){}Iw.prototype=qi.prototype;function Fh(e,n,r){this.props=e,this.context=n,this.refs=Tw,this.updater=r||Rw}var Vh=Fh.prototype=new Iw;Vh.constructor=Fh;Aw(Vh,qi.prototype);Vh.isPureReactComponent=!0;var v0=Array.isArray,$w=Object.prototype.hasOwnProperty,Bh={current:null},Ow={key:!0,ref:!0,__self:!0,__source:!0};function Dw(e,n,r){var o,i={},s=null,a=null;if(n!=null)for(o in n.ref!==void 0&&(a=n.ref),n.key!==void 0&&(s=""+n.key),n)$w.call(n,o)&&!Ow.hasOwnProperty(o)&&(i[o]=n[o]);var l=arguments.length-2;if(l===1)i.children=r;else if(1<l){for(var c=Array(l),u=0;u<l;u++)c[u]=arguments[u+2];i.children=c}if(e&&e.defaultProps)for(o in l=e.defaultProps,l)i[o]===void 0&&(i[o]=l[o]);return{$$typeof:Ma,type:e,key:s,ref:a,props:i,_owner:Bh.current}}function qP(e,n){return{$$typeof:Ma,type:e.type,key:n,ref:e.ref,props:e.props,_owner:e._owner}}function Hh(e){return typeof e=="object"&&e!==null&&e.$$typeof===Ma}function ZP(e){var n={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(r){return n[r]})}var x0=/\/+/g;function Wd(e,n){return typeof e=="object"&&e!==null&&e.key!=null?ZP(""+e.key):n.toString(36)}function oc(e,n,r,o,i){var s=typeof e;(s==="undefined"||s==="boolean")&&(e=null);var a=!1;if(e===null)a=!0;else switch(s){case"string":case"number":a=!0;break;case"object":switch(e.$$typeof){case Ma:case zP:a=!0}}if(a)return a=e,i=i(a),e=o===""?"."+Wd(a,0):o,v0(i)?(r="",e!=null&&(r=e.replace(x0,"$&/")+"/"),oc(i,n,r,"",function(u){return u})):i!=null&&(Hh(i)&&(i=qP(i,r+(!i.key||a&&a.key===i.key?"":(""+i.key).replace(x0,"$&/")+"/")+e)),n.push(i)),1;if(a=0,o=o===""?".":o+":",v0(e))for(var l=0;l<e.length;l++){s=e[l];var c=o+Wd(s,l);a+=oc(s,n,r,c,i)}else if(c=KP(e),typeof c=="function")for(e=c.call(e),l=0;!(s=e.next()).done;)s=s.value,c=o+Wd(s,l++),a+=oc(s,n,r,c,i);else if(s==="object")throw n=String(e),Error("Objects are not valid as a React child (found: "+(n==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":n)+"). If you meant to render a collection of children, use an array instead.");return a}function pl(e,n,r){if(e==null)return e;var o=[],i=0;return oc(e,o,"","",function(s){return n.call(r,s,i++)}),o}function QP(e){if(e._status===-1){var n=e._result;n=n(),n.then(function(r){(e._status===0||e._status===-1)&&(e._status=1,e._result=r)},function(r){(e._status===0||e._status===-1)&&(e._status=2,e._result=r)}),e._status===-1&&(e._status=0,e._result=n)}if(e._status===1)return e._result.default;throw e._result}var dt={current:null},ic={transition:null},JP={ReactCurrentDispatcher:dt,ReactCurrentBatchConfig:ic,ReactCurrentOwner:Bh};function Lw(){throw Error("act(...) is not supported in production builds of React.")}ge.Children={map:pl,forEach:function(e,n,r){pl(e,function(){n.apply(this,arguments)},r)},count:function(e){var n=0;return pl(e,function(){n++}),n},toArray:function(e){return pl(e,function(n){return n})||[]},only:function(e){if(!Hh(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};ge.Component=qi;ge.Fragment=FP;ge.Profiler=BP;ge.PureComponent=Fh;ge.StrictMode=VP;ge.Suspense=GP;ge.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=JP;ge.act=Lw;ge.cloneElement=function(e,n,r){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var o=Aw({},e.props),i=e.key,s=e.ref,a=e._owner;if(n!=null){if(n.ref!==void 0&&(s=n.ref,a=Bh.current),n.key!==void 0&&(i=""+n.key),e.type&&e.type.defaultProps)var l=e.type.defaultProps;for(c in n)$w.call(n,c)&&!Ow.hasOwnProperty(c)&&(o[c]=n[c]===void 0&&l!==void 0?l[c]:n[c])}var c=arguments.length-2;if(c===1)o.children=r;else if(1<c){l=Array(c);for(var u=0;u<c;u++)l[u]=arguments[u+2];o.children=l}return{$$typeof:Ma,type:e.type,key:i,ref:s,props:o,_owner:a}};ge.createContext=function(e){return e={$$typeof:WP,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:HP,_context:e},e.Consumer=e};ge.createElement=Dw;ge.createFactory=function(e){var n=Dw.bind(null,e);return n.type=e,n};ge.createRef=function(){return{current:null}};ge.forwardRef=function(e){return{$$typeof:UP,render:e}};ge.isValidElement=Hh;ge.lazy=function(e){return{$$typeof:XP,_payload:{_status:-1,_result:e},_init:QP}};ge.memo=function(e,n){return{$$typeof:YP,type:e,compare:n===void 0?null:n}};ge.startTransition=function(e){var n=ic.transition;ic.transition={};try{e()}finally{ic.transition=n}};ge.unstable_act=Lw;ge.useCallback=function(e,n){return dt.current.useCallback(e,n)};ge.useContext=function(e){return dt.current.useContext(e)};ge.useDebugValue=function(){};ge.useDeferredValue=function(e){return dt.current.useDeferredValue(e)};ge.useEffect=function(e,n){return dt.current.useEffect(e,n)};ge.useId=function(){return dt.current.useId()};ge.useImperativeHandle=function(e,n,r){return dt.current.useImperativeHandle(e,n,r)};ge.useInsertionEffect=function(e,n){return dt.current.useInsertionEffect(e,n)};ge.useLayoutEffect=function(e,n){return dt.current.useLayoutEffect(e,n)};ge.useMemo=function(e,n){return dt.current.useMemo(e,n)};ge.useReducer=function(e,n,r){return dt.current.useReducer(e,n,r)};ge.useRef=function(e){return dt.current.useRef(e)};ge.useState=function(e){return dt.current.useState(e)};ge.useSyncExternalStore=function(e,n,r){return dt.current.useSyncExternalStore(e,n,r)};ge.useTransition=function(){return dt.current.useTransition()};ge.version="18.3.1";Mw.exports=ge;var h=Mw.exports;const ot=Au(h),Iu=LP({__proto__:null,default:ot},[h]);/**
10
- * @license React
11
- * react-jsx-runtime.production.min.js
12
- *
13
- * Copyright (c) Facebook, Inc. and its affiliates.
14
- *
15
- * This source code is licensed under the MIT license found in the
16
- * LICENSE file in the root directory of this source tree.
17
- */var ej=h,tj=Symbol.for("react.element"),nj=Symbol.for("react.fragment"),rj=Object.prototype.hasOwnProperty,oj=ej.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,ij={key:!0,ref:!0,__self:!0,__source:!0};function zw(e,n,r){var o,i={},s=null,a=null;r!==void 0&&(s=""+r),n.key!==void 0&&(s=""+n.key),n.ref!==void 0&&(a=n.ref);for(o in n)rj.call(n,o)&&!ij.hasOwnProperty(o)&&(i[o]=n[o]);if(e&&e.defaultProps)for(o in n=e.defaultProps,n)i[o]===void 0&&(i[o]=n[o]);return{$$typeof:tj,type:e,key:s,ref:a,props:i,_owner:oj.current}}Tu.Fragment=nj;Tu.jsx=zw;Tu.jsxs=zw;jw.exports=Tu;var m=jw.exports,Zf={},Fw={exports:{}},Dt={},Vw={exports:{}},Bw={};/**
18
- * @license React
19
- * scheduler.production.min.js
20
- *
21
- * Copyright (c) Facebook, Inc. and its affiliates.
22
- *
23
- * This source code is licensed under the MIT license found in the
24
- * LICENSE file in the root directory of this source tree.
25
- */(function(e){function n(M,R){var O=M.length;M.push(R);e:for(;0<O;){var W=O-1>>>1,$=M[W];if(0<i($,R))M[W]=R,M[O]=$,O=W;else break e}}function r(M){return M.length===0?null:M[0]}function o(M){if(M.length===0)return null;var R=M[0],O=M.pop();if(O!==R){M[0]=O;e:for(var W=0,$=M.length,X=$>>>1;W<X;){var F=2*(W+1)-1,H=M[F],G=F+1,U=M[G];if(0>i(H,O))G<$&&0>i(U,H)?(M[W]=U,M[G]=O,W=G):(M[W]=H,M[F]=O,W=F);else if(G<$&&0>i(U,O))M[W]=U,M[G]=O,W=G;else break e}}return R}function i(M,R){var O=M.sortIndex-R.sortIndex;return O!==0?O:M.id-R.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;e.unstable_now=function(){return s.now()}}else{var a=Date,l=a.now();e.unstable_now=function(){return a.now()-l}}var c=[],u=[],f=1,d=null,p=3,g=!1,v=!1,w=!1,_=typeof setTimeout=="function"?setTimeout:null,y=typeof clearTimeout=="function"?clearTimeout:null,b=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function x(M){for(var R=r(u);R!==null;){if(R.callback===null)o(u);else if(R.startTime<=M)o(u),R.sortIndex=R.expirationTime,n(c,R);else break;R=r(u)}}function S(M){if(w=!1,x(M),!v)if(r(c)!==null)v=!0,I(C);else{var R=r(u);R!==null&&z(S,R.startTime-M)}}function C(M,R){v=!1,w&&(w=!1,y(E),E=-1),g=!0;var O=p;try{for(x(R),d=r(c);d!==null&&(!(d.expirationTime>R)||M&&!A());){var W=d.callback;if(typeof W=="function"){d.callback=null,p=d.priorityLevel;var $=W(d.expirationTime<=R);R=e.unstable_now(),typeof $=="function"?d.callback=$:d===r(c)&&o(c),x(R)}else o(c);d=r(c)}if(d!==null)var X=!0;else{var F=r(u);F!==null&&z(S,F.startTime-R),X=!1}return X}finally{d=null,p=O,g=!1}}var k=!1,N=null,E=-1,P=5,T=-1;function A(){return!(e.unstable_now()-T<P)}function D(){if(N!==null){var M=e.unstable_now();T=M;var R=!0;try{R=N(!0,M)}finally{R?V():(k=!1,N=null)}}else k=!1}var V;if(typeof b=="function")V=function(){b(D)};else if(typeof MessageChannel<"u"){var j=new MessageChannel,L=j.port2;j.port1.onmessage=D,V=function(){L.postMessage(null)}}else V=function(){_(D,0)};function I(M){N=M,k||(k=!0,V())}function z(M,R){E=_(function(){M(e.unstable_now())},R)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(M){M.callback=null},e.unstable_continueExecution=function(){v||g||(v=!0,I(C))},e.unstable_forceFrameRate=function(M){0>M||125<M?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):P=0<M?Math.floor(1e3/M):5},e.unstable_getCurrentPriorityLevel=function(){return p},e.unstable_getFirstCallbackNode=function(){return r(c)},e.unstable_next=function(M){switch(p){case 1:case 2:case 3:var R=3;break;default:R=p}var O=p;p=R;try{return M()}finally{p=O}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(M,R){switch(M){case 1:case 2:case 3:case 4:case 5:break;default:M=3}var O=p;p=M;try{return R()}finally{p=O}},e.unstable_scheduleCallback=function(M,R,O){var W=e.unstable_now();switch(typeof O=="object"&&O!==null?(O=O.delay,O=typeof O=="number"&&0<O?W+O:W):O=W,M){case 1:var $=-1;break;case 2:$=250;break;case 5:$=1073741823;break;case 4:$=1e4;break;default:$=5e3}return $=O+$,M={id:f++,callback:R,priorityLevel:M,startTime:O,expirationTime:$,sortIndex:-1},O>W?(M.sortIndex=O,n(u,M),r(c)===null&&M===r(u)&&(w?(y(E),E=-1):w=!0,z(S,O-W))):(M.sortIndex=$,n(c,M),v||g||(v=!0,I(C))),M},e.unstable_shouldYield=A,e.unstable_wrapCallback=function(M){var R=p;return function(){var O=p;p=R;try{return M.apply(this,arguments)}finally{p=O}}}})(Bw);Vw.exports=Bw;var sj=Vw.exports;/**
26
- * @license React
27
- * react-dom.production.min.js
28
- *
29
- * Copyright (c) Facebook, Inc. and its affiliates.
30
- *
31
- * This source code is licensed under the MIT license found in the
32
- * LICENSE file in the root directory of this source tree.
33
- */var aj=h,$t=sj;function Q(e){for(var n="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r<arguments.length;r++)n+="&args[]="+encodeURIComponent(arguments[r]);return"Minified React error #"+e+"; visit "+n+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var Hw=new Set,Zs={};function Oo(e,n){ji(e,n),ji(e+"Capture",n)}function ji(e,n){for(Zs[e]=n,e=0;e<n.length;e++)Hw.add(n[e])}var Jn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Qf=Object.prototype.hasOwnProperty,lj=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,w0={},b0={};function cj(e){return Qf.call(b0,e)?!0:Qf.call(w0,e)?!1:lj.test(e)?b0[e]=!0:(w0[e]=!0,!1)}function uj(e,n,r,o){if(r!==null&&r.type===0)return!1;switch(typeof n){case"function":case"symbol":return!0;case"boolean":return o?!1:r!==null?!r.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function dj(e,n,r,o){if(n===null||typeof n>"u"||uj(e,n,r,o))return!0;if(o)return!1;if(r!==null)switch(r.type){case 3:return!n;case 4:return n===!1;case 5:return isNaN(n);case 6:return isNaN(n)||1>n}return!1}function ft(e,n,r,o,i,s,a){this.acceptsBooleans=n===2||n===3||n===4,this.attributeName=o,this.attributeNamespace=i,this.mustUseProperty=r,this.propertyName=e,this.type=n,this.sanitizeURL=s,this.removeEmptyString=a}var Je={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Je[e]=new ft(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var n=e[0];Je[n]=new ft(n,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Je[e]=new ft(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Je[e]=new ft(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Je[e]=new ft(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Je[e]=new ft(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Je[e]=new ft(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Je[e]=new ft(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Je[e]=new ft(e,5,!1,e.toLowerCase(),null,!1,!1)});var Wh=/[\-:]([a-z])/g;function Uh(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var n=e.replace(Wh,Uh);Je[n]=new ft(n,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var n=e.replace(Wh,Uh);Je[n]=new ft(n,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var n=e.replace(Wh,Uh);Je[n]=new ft(n,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Je[e]=new ft(e,1,!1,e.toLowerCase(),null,!1,!1)});Je.xlinkHref=new ft("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Je[e]=new ft(e,1,!1,e.toLowerCase(),null,!0,!0)});function Gh(e,n,r,o){var i=Je.hasOwnProperty(n)?Je[n]:null;(i!==null?i.type!==0:o||!(2<n.length)||n[0]!=="o"&&n[0]!=="O"||n[1]!=="n"&&n[1]!=="N")&&(dj(n,r,i,o)&&(r=null),o||i===null?cj(n)&&(r===null?e.removeAttribute(n):e.setAttribute(n,""+r)):i.mustUseProperty?e[i.propertyName]=r===null?i.type===3?!1:"":r:(n=i.attributeName,o=i.attributeNamespace,r===null?e.removeAttribute(n):(i=i.type,r=i===3||i===4&&r===!0?"":""+r,o?e.setAttributeNS(o,n,r):e.setAttribute(n,r))))}var sr=aj.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,hl=Symbol.for("react.element"),oi=Symbol.for("react.portal"),ii=Symbol.for("react.fragment"),Yh=Symbol.for("react.strict_mode"),Jf=Symbol.for("react.profiler"),Ww=Symbol.for("react.provider"),Uw=Symbol.for("react.context"),Xh=Symbol.for("react.forward_ref"),ep=Symbol.for("react.suspense"),tp=Symbol.for("react.suspense_list"),Kh=Symbol.for("react.memo"),br=Symbol.for("react.lazy"),Gw=Symbol.for("react.offscreen"),_0=Symbol.iterator;function as(e){return e===null||typeof e!="object"?null:(e=_0&&e[_0]||e["@@iterator"],typeof e=="function"?e:null)}var Le=Object.assign,Ud;function Ns(e){if(Ud===void 0)try{throw Error()}catch(r){var n=r.stack.trim().match(/\n( *(at )?)/);Ud=n&&n[1]||""}return`
34
- `+Ud+e}var Gd=!1;function Yd(e,n){if(!e||Gd)return"";Gd=!0;var r=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(n)if(n=function(){throw Error()},Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(n,[])}catch(u){var o=u}Reflect.construct(e,[],n)}else{try{n.call()}catch(u){o=u}e.call(n.prototype)}else{try{throw Error()}catch(u){o=u}e()}}catch(u){if(u&&o&&typeof u.stack=="string"){for(var i=u.stack.split(`
35
- `),s=o.stack.split(`
36
- `),a=i.length-1,l=s.length-1;1<=a&&0<=l&&i[a]!==s[l];)l--;for(;1<=a&&0<=l;a--,l--)if(i[a]!==s[l]){if(a!==1||l!==1)do if(a--,l--,0>l||i[a]!==s[l]){var c=`
37
- `+i[a].replace(" at new "," at ");return e.displayName&&c.includes("<anonymous>")&&(c=c.replace("<anonymous>",e.displayName)),c}while(1<=a&&0<=l);break}}}finally{Gd=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?Ns(e):""}function fj(e){switch(e.tag){case 5:return Ns(e.type);case 16:return Ns("Lazy");case 13:return Ns("Suspense");case 19:return Ns("SuspenseList");case 0:case 2:case 15:return e=Yd(e.type,!1),e;case 11:return e=Yd(e.type.render,!1),e;case 1:return e=Yd(e.type,!0),e;default:return""}}function np(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case ii:return"Fragment";case oi:return"Portal";case Jf:return"Profiler";case Yh:return"StrictMode";case ep:return"Suspense";case tp:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Uw:return(e.displayName||"Context")+".Consumer";case Ww:return(e._context.displayName||"Context")+".Provider";case Xh:var n=e.render;return e=e.displayName,e||(e=n.displayName||n.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Kh:return n=e.displayName||null,n!==null?n:np(e.type)||"Memo";case br:n=e._payload,e=e._init;try{return np(e(n))}catch{}}return null}function pj(e){var n=e.type;switch(e.tag){case 24:return"Cache";case 9:return(n.displayName||"Context")+".Consumer";case 10:return(n._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=n.render,e=e.displayName||e.name||"",n.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return n;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return np(n);case 8:return n===Yh?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof n=="function")return n.displayName||n.name||null;if(typeof n=="string")return n}return null}function Vr(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Yw(e){var n=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(n==="checkbox"||n==="radio")}function hj(e){var n=Yw(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,n),o=""+e[n];if(!e.hasOwnProperty(n)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var i=r.get,s=r.set;return Object.defineProperty(e,n,{configurable:!0,get:function(){return i.call(this)},set:function(a){o=""+a,s.call(this,a)}}),Object.defineProperty(e,n,{enumerable:r.enumerable}),{getValue:function(){return o},setValue:function(a){o=""+a},stopTracking:function(){e._valueTracker=null,delete e[n]}}}}function ml(e){e._valueTracker||(e._valueTracker=hj(e))}function Xw(e){if(!e)return!1;var n=e._valueTracker;if(!n)return!0;var r=n.getValue(),o="";return e&&(o=Yw(e)?e.checked?"true":"false":e.value),e=o,e!==r?(n.setValue(e),!0):!1}function Ec(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function rp(e,n){var r=n.checked;return Le({},n,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function S0(e,n){var r=n.defaultValue==null?"":n.defaultValue,o=n.checked!=null?n.checked:n.defaultChecked;r=Vr(n.value!=null?n.value:r),e._wrapperState={initialChecked:o,initialValue:r,controlled:n.type==="checkbox"||n.type==="radio"?n.checked!=null:n.value!=null}}function Kw(e,n){n=n.checked,n!=null&&Gh(e,"checked",n,!1)}function op(e,n){Kw(e,n);var r=Vr(n.value),o=n.type;if(r!=null)o==="number"?(r===0&&e.value===""||e.value!=r)&&(e.value=""+r):e.value!==""+r&&(e.value=""+r);else if(o==="submit"||o==="reset"){e.removeAttribute("value");return}n.hasOwnProperty("value")?ip(e,n.type,r):n.hasOwnProperty("defaultValue")&&ip(e,n.type,Vr(n.defaultValue)),n.checked==null&&n.defaultChecked!=null&&(e.defaultChecked=!!n.defaultChecked)}function C0(e,n,r){if(n.hasOwnProperty("value")||n.hasOwnProperty("defaultValue")){var o=n.type;if(!(o!=="submit"&&o!=="reset"||n.value!==void 0&&n.value!==null))return;n=""+e._wrapperState.initialValue,r||n===e.value||(e.value=n),e.defaultValue=n}r=e.name,r!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,r!==""&&(e.name=r)}function ip(e,n,r){(n!=="number"||Ec(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var Es=Array.isArray;function vi(e,n,r,o){if(e=e.options,n){n={};for(var i=0;i<r.length;i++)n["$"+r[i]]=!0;for(r=0;r<e.length;r++)i=n.hasOwnProperty("$"+e[r].value),e[r].selected!==i&&(e[r].selected=i),i&&o&&(e[r].defaultSelected=!0)}else{for(r=""+Vr(r),n=null,i=0;i<e.length;i++){if(e[i].value===r){e[i].selected=!0,o&&(e[i].defaultSelected=!0);return}n!==null||e[i].disabled||(n=e[i])}n!==null&&(n.selected=!0)}}function sp(e,n){if(n.dangerouslySetInnerHTML!=null)throw Error(Q(91));return Le({},n,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function k0(e,n){var r=n.value;if(r==null){if(r=n.children,n=n.defaultValue,r!=null){if(n!=null)throw Error(Q(92));if(Es(r)){if(1<r.length)throw Error(Q(93));r=r[0]}n=r}n==null&&(n=""),r=n}e._wrapperState={initialValue:Vr(r)}}function qw(e,n){var r=Vr(n.value),o=Vr(n.defaultValue);r!=null&&(r=""+r,r!==e.value&&(e.value=r),n.defaultValue==null&&e.defaultValue!==r&&(e.defaultValue=r)),o!=null&&(e.defaultValue=""+o)}function N0(e){var n=e.textContent;n===e._wrapperState.initialValue&&n!==""&&n!==null&&(e.value=n)}function Zw(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function ap(e,n){return e==null||e==="http://www.w3.org/1999/xhtml"?Zw(n):e==="http://www.w3.org/2000/svg"&&n==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var gl,Qw=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(n,r,o,i){MSApp.execUnsafeLocalFunction(function(){return e(n,r,o,i)})}:e}(function(e,n){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=n;else{for(gl=gl||document.createElement("div"),gl.innerHTML="<svg>"+n.valueOf().toString()+"</svg>",n=gl.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;n.firstChild;)e.appendChild(n.firstChild)}});function Qs(e,n){if(n){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=n;return}}e.textContent=n}var Os={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},mj=["Webkit","ms","Moz","O"];Object.keys(Os).forEach(function(e){mj.forEach(function(n){n=n+e.charAt(0).toUpperCase()+e.substring(1),Os[n]=Os[e]})});function Jw(e,n,r){return n==null||typeof n=="boolean"||n===""?"":r||typeof n!="number"||n===0||Os.hasOwnProperty(e)&&Os[e]?(""+n).trim():n+"px"}function e1(e,n){e=e.style;for(var r in n)if(n.hasOwnProperty(r)){var o=r.indexOf("--")===0,i=Jw(r,n[r],o);r==="float"&&(r="cssFloat"),o?e.setProperty(r,i):e[r]=i}}var gj=Le({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function lp(e,n){if(n){if(gj[e]&&(n.children!=null||n.dangerouslySetInnerHTML!=null))throw Error(Q(137,e));if(n.dangerouslySetInnerHTML!=null){if(n.children!=null)throw Error(Q(60));if(typeof n.dangerouslySetInnerHTML!="object"||!("__html"in n.dangerouslySetInnerHTML))throw Error(Q(61))}if(n.style!=null&&typeof n.style!="object")throw Error(Q(62))}}function cp(e,n){if(e.indexOf("-")===-1)return typeof n.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var up=null;function qh(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var dp=null,xi=null,wi=null;function E0(e){if(e=Ta(e)){if(typeof dp!="function")throw Error(Q(280));var n=e.stateNode;n&&(n=zu(n),dp(e.stateNode,e.type,n))}}function t1(e){xi?wi?wi.push(e):wi=[e]:xi=e}function n1(){if(xi){var e=xi,n=wi;if(wi=xi=null,E0(e),n)for(e=0;e<n.length;e++)E0(n[e])}}function r1(e,n){return e(n)}function o1(){}var Xd=!1;function i1(e,n,r){if(Xd)return e(n,r);Xd=!0;try{return r1(e,n,r)}finally{Xd=!1,(xi!==null||wi!==null)&&(o1(),n1())}}function Js(e,n){var r=e.stateNode;if(r===null)return null;var o=zu(r);if(o===null)return null;r=o[n];e:switch(n){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(o=!o.disabled)||(e=e.type,o=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!o;break e;default:e=!1}if(e)return null;if(r&&typeof r!="function")throw Error(Q(231,n,typeof r));return r}var fp=!1;if(Jn)try{var ls={};Object.defineProperty(ls,"passive",{get:function(){fp=!0}}),window.addEventListener("test",ls,ls),window.removeEventListener("test",ls,ls)}catch{fp=!1}function yj(e,n,r,o,i,s,a,l,c){var u=Array.prototype.slice.call(arguments,3);try{n.apply(r,u)}catch(f){this.onError(f)}}var Ds=!1,Pc=null,jc=!1,pp=null,vj={onError:function(e){Ds=!0,Pc=e}};function xj(e,n,r,o,i,s,a,l,c){Ds=!1,Pc=null,yj.apply(vj,arguments)}function wj(e,n,r,o,i,s,a,l,c){if(xj.apply(this,arguments),Ds){if(Ds){var u=Pc;Ds=!1,Pc=null}else throw Error(Q(198));jc||(jc=!0,pp=u)}}function Do(e){var n=e,r=e;if(e.alternate)for(;n.return;)n=n.return;else{e=n;do n=e,n.flags&4098&&(r=n.return),e=n.return;while(e)}return n.tag===3?r:null}function s1(e){if(e.tag===13){var n=e.memoizedState;if(n===null&&(e=e.alternate,e!==null&&(n=e.memoizedState)),n!==null)return n.dehydrated}return null}function P0(e){if(Do(e)!==e)throw Error(Q(188))}function bj(e){var n=e.alternate;if(!n){if(n=Do(e),n===null)throw Error(Q(188));return n!==e?null:e}for(var r=e,o=n;;){var i=r.return;if(i===null)break;var s=i.alternate;if(s===null){if(o=i.return,o!==null){r=o;continue}break}if(i.child===s.child){for(s=i.child;s;){if(s===r)return P0(i),e;if(s===o)return P0(i),n;s=s.sibling}throw Error(Q(188))}if(r.return!==o.return)r=i,o=s;else{for(var a=!1,l=i.child;l;){if(l===r){a=!0,r=i,o=s;break}if(l===o){a=!0,o=i,r=s;break}l=l.sibling}if(!a){for(l=s.child;l;){if(l===r){a=!0,r=s,o=i;break}if(l===o){a=!0,o=s,r=i;break}l=l.sibling}if(!a)throw Error(Q(189))}}if(r.alternate!==o)throw Error(Q(190))}if(r.tag!==3)throw Error(Q(188));return r.stateNode.current===r?e:n}function a1(e){return e=bj(e),e!==null?l1(e):null}function l1(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var n=l1(e);if(n!==null)return n;e=e.sibling}return null}var c1=$t.unstable_scheduleCallback,j0=$t.unstable_cancelCallback,_j=$t.unstable_shouldYield,Sj=$t.unstable_requestPaint,Fe=$t.unstable_now,Cj=$t.unstable_getCurrentPriorityLevel,Zh=$t.unstable_ImmediatePriority,u1=$t.unstable_UserBlockingPriority,Mc=$t.unstable_NormalPriority,kj=$t.unstable_LowPriority,d1=$t.unstable_IdlePriority,$u=null,Pn=null;function Nj(e){if(Pn&&typeof Pn.onCommitFiberRoot=="function")try{Pn.onCommitFiberRoot($u,e,void 0,(e.current.flags&128)===128)}catch{}}var fn=Math.clz32?Math.clz32:jj,Ej=Math.log,Pj=Math.LN2;function jj(e){return e>>>=0,e===0?32:31-(Ej(e)/Pj|0)|0}var yl=64,vl=4194304;function Ps(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Rc(e,n){var r=e.pendingLanes;if(r===0)return 0;var o=0,i=e.suspendedLanes,s=e.pingedLanes,a=r&268435455;if(a!==0){var l=a&~i;l!==0?o=Ps(l):(s&=a,s!==0&&(o=Ps(s)))}else a=r&~i,a!==0?o=Ps(a):s!==0&&(o=Ps(s));if(o===0)return 0;if(n!==0&&n!==o&&!(n&i)&&(i=o&-o,s=n&-n,i>=s||i===16&&(s&4194240)!==0))return n;if(o&4&&(o|=r&16),n=e.entangledLanes,n!==0)for(e=e.entanglements,n&=o;0<n;)r=31-fn(n),i=1<<r,o|=e[r],n&=~i;return o}function Mj(e,n){switch(e){case 1:case 2:case 4:return n+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return n+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Rj(e,n){for(var r=e.suspendedLanes,o=e.pingedLanes,i=e.expirationTimes,s=e.pendingLanes;0<s;){var a=31-fn(s),l=1<<a,c=i[a];c===-1?(!(l&r)||l&o)&&(i[a]=Mj(l,n)):c<=n&&(e.expiredLanes|=l),s&=~l}}function hp(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function f1(){var e=yl;return yl<<=1,!(yl&4194240)&&(yl=64),e}function Kd(e){for(var n=[],r=0;31>r;r++)n.push(e);return n}function Ra(e,n,r){e.pendingLanes|=n,n!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,n=31-fn(n),e[n]=r}function Aj(e,n){var r=e.pendingLanes&~n;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=n,e.mutableReadLanes&=n,e.entangledLanes&=n,n=e.entanglements;var o=e.eventTimes;for(e=e.expirationTimes;0<r;){var i=31-fn(r),s=1<<i;n[i]=0,o[i]=-1,e[i]=-1,r&=~s}}function Qh(e,n){var r=e.entangledLanes|=n;for(e=e.entanglements;r;){var o=31-fn(r),i=1<<o;i&n|e[o]&n&&(e[o]|=n),r&=~i}}var _e=0;function p1(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var h1,Jh,m1,g1,y1,mp=!1,xl=[],Mr=null,Rr=null,Ar=null,ea=new Map,ta=new Map,Cr=[],Tj="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function M0(e,n){switch(e){case"focusin":case"focusout":Mr=null;break;case"dragenter":case"dragleave":Rr=null;break;case"mouseover":case"mouseout":Ar=null;break;case"pointerover":case"pointerout":ea.delete(n.pointerId);break;case"gotpointercapture":case"lostpointercapture":ta.delete(n.pointerId)}}function cs(e,n,r,o,i,s){return e===null||e.nativeEvent!==s?(e={blockedOn:n,domEventName:r,eventSystemFlags:o,nativeEvent:s,targetContainers:[i]},n!==null&&(n=Ta(n),n!==null&&Jh(n)),e):(e.eventSystemFlags|=o,n=e.targetContainers,i!==null&&n.indexOf(i)===-1&&n.push(i),e)}function Ij(e,n,r,o,i){switch(n){case"focusin":return Mr=cs(Mr,e,n,r,o,i),!0;case"dragenter":return Rr=cs(Rr,e,n,r,o,i),!0;case"mouseover":return Ar=cs(Ar,e,n,r,o,i),!0;case"pointerover":var s=i.pointerId;return ea.set(s,cs(ea.get(s)||null,e,n,r,o,i)),!0;case"gotpointercapture":return s=i.pointerId,ta.set(s,cs(ta.get(s)||null,e,n,r,o,i)),!0}return!1}function v1(e){var n=po(e.target);if(n!==null){var r=Do(n);if(r!==null){if(n=r.tag,n===13){if(n=s1(r),n!==null){e.blockedOn=n,y1(e.priority,function(){m1(r)});return}}else if(n===3&&r.stateNode.current.memoizedState.isDehydrated){e.blockedOn=r.tag===3?r.stateNode.containerInfo:null;return}}}e.blockedOn=null}function sc(e){if(e.blockedOn!==null)return!1;for(var n=e.targetContainers;0<n.length;){var r=gp(e.domEventName,e.eventSystemFlags,n[0],e.nativeEvent);if(r===null){r=e.nativeEvent;var o=new r.constructor(r.type,r);up=o,r.target.dispatchEvent(o),up=null}else return n=Ta(r),n!==null&&Jh(n),e.blockedOn=r,!1;n.shift()}return!0}function R0(e,n,r){sc(e)&&r.delete(n)}function $j(){mp=!1,Mr!==null&&sc(Mr)&&(Mr=null),Rr!==null&&sc(Rr)&&(Rr=null),Ar!==null&&sc(Ar)&&(Ar=null),ea.forEach(R0),ta.forEach(R0)}function us(e,n){e.blockedOn===n&&(e.blockedOn=null,mp||(mp=!0,$t.unstable_scheduleCallback($t.unstable_NormalPriority,$j)))}function na(e){function n(i){return us(i,e)}if(0<xl.length){us(xl[0],e);for(var r=1;r<xl.length;r++){var o=xl[r];o.blockedOn===e&&(o.blockedOn=null)}}for(Mr!==null&&us(Mr,e),Rr!==null&&us(Rr,e),Ar!==null&&us(Ar,e),ea.forEach(n),ta.forEach(n),r=0;r<Cr.length;r++)o=Cr[r],o.blockedOn===e&&(o.blockedOn=null);for(;0<Cr.length&&(r=Cr[0],r.blockedOn===null);)v1(r),r.blockedOn===null&&Cr.shift()}var bi=sr.ReactCurrentBatchConfig,Ac=!0;function Oj(e,n,r,o){var i=_e,s=bi.transition;bi.transition=null;try{_e=1,em(e,n,r,o)}finally{_e=i,bi.transition=s}}function Dj(e,n,r,o){var i=_e,s=bi.transition;bi.transition=null;try{_e=4,em(e,n,r,o)}finally{_e=i,bi.transition=s}}function em(e,n,r,o){if(Ac){var i=gp(e,n,r,o);if(i===null)sf(e,n,o,Tc,r),M0(e,o);else if(Ij(i,e,n,r,o))o.stopPropagation();else if(M0(e,o),n&4&&-1<Tj.indexOf(e)){for(;i!==null;){var s=Ta(i);if(s!==null&&h1(s),s=gp(e,n,r,o),s===null&&sf(e,n,o,Tc,r),s===i)break;i=s}i!==null&&o.stopPropagation()}else sf(e,n,o,null,r)}}var Tc=null;function gp(e,n,r,o){if(Tc=null,e=qh(o),e=po(e),e!==null)if(n=Do(e),n===null)e=null;else if(r=n.tag,r===13){if(e=s1(n),e!==null)return e;e=null}else if(r===3){if(n.stateNode.current.memoizedState.isDehydrated)return n.tag===3?n.stateNode.containerInfo:null;e=null}else n!==e&&(e=null);return Tc=e,null}function x1(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Cj()){case Zh:return 1;case u1:return 4;case Mc:case kj:return 16;case d1:return 536870912;default:return 16}default:return 16}}var Er=null,tm=null,ac=null;function w1(){if(ac)return ac;var e,n=tm,r=n.length,o,i="value"in Er?Er.value:Er.textContent,s=i.length;for(e=0;e<r&&n[e]===i[e];e++);var a=r-e;for(o=1;o<=a&&n[r-o]===i[s-o];o++);return ac=i.slice(e,1<o?1-o:void 0)}function lc(e){var n=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&n===13&&(e=13)):e=n,e===10&&(e=13),32<=e||e===13?e:0}function wl(){return!0}function A0(){return!1}function Lt(e){function n(r,o,i,s,a){this._reactName=r,this._targetInst=i,this.type=o,this.nativeEvent=s,this.target=a,this.currentTarget=null;for(var l in e)e.hasOwnProperty(l)&&(r=e[l],this[l]=r?r(s):s[l]);return this.isDefaultPrevented=(s.defaultPrevented!=null?s.defaultPrevented:s.returnValue===!1)?wl:A0,this.isPropagationStopped=A0,this}return Le(n.prototype,{preventDefault:function(){this.defaultPrevented=!0;var r=this.nativeEvent;r&&(r.preventDefault?r.preventDefault():typeof r.returnValue!="unknown"&&(r.returnValue=!1),this.isDefaultPrevented=wl)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=wl)},persist:function(){},isPersistent:wl}),n}var Zi={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},nm=Lt(Zi),Aa=Le({},Zi,{view:0,detail:0}),Lj=Lt(Aa),qd,Zd,ds,Ou=Le({},Aa,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:rm,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==ds&&(ds&&e.type==="mousemove"?(qd=e.screenX-ds.screenX,Zd=e.screenY-ds.screenY):Zd=qd=0,ds=e),qd)},movementY:function(e){return"movementY"in e?e.movementY:Zd}}),T0=Lt(Ou),zj=Le({},Ou,{dataTransfer:0}),Fj=Lt(zj),Vj=Le({},Aa,{relatedTarget:0}),Qd=Lt(Vj),Bj=Le({},Zi,{animationName:0,elapsedTime:0,pseudoElement:0}),Hj=Lt(Bj),Wj=Le({},Zi,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Uj=Lt(Wj),Gj=Le({},Zi,{data:0}),I0=Lt(Gj),Yj={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Xj={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},Kj={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function qj(e){var n=this.nativeEvent;return n.getModifierState?n.getModifierState(e):(e=Kj[e])?!!n[e]:!1}function rm(){return qj}var Zj=Le({},Aa,{key:function(e){if(e.key){var n=Yj[e.key]||e.key;if(n!=="Unidentified")return n}return e.type==="keypress"?(e=lc(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Xj[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:rm,charCode:function(e){return e.type==="keypress"?lc(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?lc(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Qj=Lt(Zj),Jj=Le({},Ou,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),$0=Lt(Jj),eM=Le({},Aa,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:rm}),tM=Lt(eM),nM=Le({},Zi,{propertyName:0,elapsedTime:0,pseudoElement:0}),rM=Lt(nM),oM=Le({},Ou,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),iM=Lt(oM),sM=[9,13,27,32],om=Jn&&"CompositionEvent"in window,Ls=null;Jn&&"documentMode"in document&&(Ls=document.documentMode);var aM=Jn&&"TextEvent"in window&&!Ls,b1=Jn&&(!om||Ls&&8<Ls&&11>=Ls),O0=" ",D0=!1;function _1(e,n){switch(e){case"keyup":return sM.indexOf(n.keyCode)!==-1;case"keydown":return n.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function S1(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var si=!1;function lM(e,n){switch(e){case"compositionend":return S1(n);case"keypress":return n.which!==32?null:(D0=!0,O0);case"textInput":return e=n.data,e===O0&&D0?null:e;default:return null}}function cM(e,n){if(si)return e==="compositionend"||!om&&_1(e,n)?(e=w1(),ac=tm=Er=null,si=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(n.ctrlKey||n.altKey||n.metaKey)||n.ctrlKey&&n.altKey){if(n.char&&1<n.char.length)return n.char;if(n.which)return String.fromCharCode(n.which)}return null;case"compositionend":return b1&&n.locale!=="ko"?null:n.data;default:return null}}var uM={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function L0(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n==="input"?!!uM[e.type]:n==="textarea"}function C1(e,n,r,o){t1(o),n=Ic(n,"onChange"),0<n.length&&(r=new nm("onChange","change",null,r,o),e.push({event:r,listeners:n}))}var zs=null,ra=null;function dM(e){$1(e,0)}function Du(e){var n=ci(e);if(Xw(n))return e}function fM(e,n){if(e==="change")return n}var k1=!1;if(Jn){var Jd;if(Jn){var ef="oninput"in document;if(!ef){var z0=document.createElement("div");z0.setAttribute("oninput","return;"),ef=typeof z0.oninput=="function"}Jd=ef}else Jd=!1;k1=Jd&&(!document.documentMode||9<document.documentMode)}function F0(){zs&&(zs.detachEvent("onpropertychange",N1),ra=zs=null)}function N1(e){if(e.propertyName==="value"&&Du(ra)){var n=[];C1(n,ra,e,qh(e)),i1(dM,n)}}function pM(e,n,r){e==="focusin"?(F0(),zs=n,ra=r,zs.attachEvent("onpropertychange",N1)):e==="focusout"&&F0()}function hM(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Du(ra)}function mM(e,n){if(e==="click")return Du(n)}function gM(e,n){if(e==="input"||e==="change")return Du(n)}function yM(e,n){return e===n&&(e!==0||1/e===1/n)||e!==e&&n!==n}var hn=typeof Object.is=="function"?Object.is:yM;function oa(e,n){if(hn(e,n))return!0;if(typeof e!="object"||e===null||typeof n!="object"||n===null)return!1;var r=Object.keys(e),o=Object.keys(n);if(r.length!==o.length)return!1;for(o=0;o<r.length;o++){var i=r[o];if(!Qf.call(n,i)||!hn(e[i],n[i]))return!1}return!0}function V0(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function B0(e,n){var r=V0(e);e=0;for(var o;r;){if(r.nodeType===3){if(o=e+r.textContent.length,e<=n&&o>=n)return{node:r,offset:n-e};e=o}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=V0(r)}}function E1(e,n){return e&&n?e===n?!0:e&&e.nodeType===3?!1:n&&n.nodeType===3?E1(e,n.parentNode):"contains"in e?e.contains(n):e.compareDocumentPosition?!!(e.compareDocumentPosition(n)&16):!1:!1}function P1(){for(var e=window,n=Ec();n instanceof e.HTMLIFrameElement;){try{var r=typeof n.contentWindow.location.href=="string"}catch{r=!1}if(r)e=n.contentWindow;else break;n=Ec(e.document)}return n}function im(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n&&(n==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||n==="textarea"||e.contentEditable==="true")}function vM(e){var n=P1(),r=e.focusedElem,o=e.selectionRange;if(n!==r&&r&&r.ownerDocument&&E1(r.ownerDocument.documentElement,r)){if(o!==null&&im(r)){if(n=o.start,e=o.end,e===void 0&&(e=n),"selectionStart"in r)r.selectionStart=n,r.selectionEnd=Math.min(e,r.value.length);else if(e=(n=r.ownerDocument||document)&&n.defaultView||window,e.getSelection){e=e.getSelection();var i=r.textContent.length,s=Math.min(o.start,i);o=o.end===void 0?s:Math.min(o.end,i),!e.extend&&s>o&&(i=o,o=s,s=i),i=B0(r,s);var a=B0(r,o);i&&a&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&(n=n.createRange(),n.setStart(i.node,i.offset),e.removeAllRanges(),s>o?(e.addRange(n),e.extend(a.node,a.offset)):(n.setEnd(a.node,a.offset),e.addRange(n)))}}for(n=[],e=r;e=e.parentNode;)e.nodeType===1&&n.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r<n.length;r++)e=n[r],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var xM=Jn&&"documentMode"in document&&11>=document.documentMode,ai=null,yp=null,Fs=null,vp=!1;function H0(e,n,r){var o=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;vp||ai==null||ai!==Ec(o)||(o=ai,"selectionStart"in o&&im(o)?o={start:o.selectionStart,end:o.selectionEnd}:(o=(o.ownerDocument&&o.ownerDocument.defaultView||window).getSelection(),o={anchorNode:o.anchorNode,anchorOffset:o.anchorOffset,focusNode:o.focusNode,focusOffset:o.focusOffset}),Fs&&oa(Fs,o)||(Fs=o,o=Ic(yp,"onSelect"),0<o.length&&(n=new nm("onSelect","select",null,n,r),e.push({event:n,listeners:o}),n.target=ai)))}function bl(e,n){var r={};return r[e.toLowerCase()]=n.toLowerCase(),r["Webkit"+e]="webkit"+n,r["Moz"+e]="moz"+n,r}var li={animationend:bl("Animation","AnimationEnd"),animationiteration:bl("Animation","AnimationIteration"),animationstart:bl("Animation","AnimationStart"),transitionend:bl("Transition","TransitionEnd")},tf={},j1={};Jn&&(j1=document.createElement("div").style,"AnimationEvent"in window||(delete li.animationend.animation,delete li.animationiteration.animation,delete li.animationstart.animation),"TransitionEvent"in window||delete li.transitionend.transition);function Lu(e){if(tf[e])return tf[e];if(!li[e])return e;var n=li[e],r;for(r in n)if(n.hasOwnProperty(r)&&r in j1)return tf[e]=n[r];return e}var M1=Lu("animationend"),R1=Lu("animationiteration"),A1=Lu("animationstart"),T1=Lu("transitionend"),I1=new Map,W0="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Yr(e,n){I1.set(e,n),Oo(n,[e])}for(var nf=0;nf<W0.length;nf++){var rf=W0[nf],wM=rf.toLowerCase(),bM=rf[0].toUpperCase()+rf.slice(1);Yr(wM,"on"+bM)}Yr(M1,"onAnimationEnd");Yr(R1,"onAnimationIteration");Yr(A1,"onAnimationStart");Yr("dblclick","onDoubleClick");Yr("focusin","onFocus");Yr("focusout","onBlur");Yr(T1,"onTransitionEnd");ji("onMouseEnter",["mouseout","mouseover"]);ji("onMouseLeave",["mouseout","mouseover"]);ji("onPointerEnter",["pointerout","pointerover"]);ji("onPointerLeave",["pointerout","pointerover"]);Oo("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Oo("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Oo("onBeforeInput",["compositionend","keypress","textInput","paste"]);Oo("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Oo("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Oo("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var js="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),_M=new Set("cancel close invalid load scroll toggle".split(" ").concat(js));function U0(e,n,r){var o=e.type||"unknown-event";e.currentTarget=r,wj(o,n,void 0,e),e.currentTarget=null}function $1(e,n){n=(n&4)!==0;for(var r=0;r<e.length;r++){var o=e[r],i=o.event;o=o.listeners;e:{var s=void 0;if(n)for(var a=o.length-1;0<=a;a--){var l=o[a],c=l.instance,u=l.currentTarget;if(l=l.listener,c!==s&&i.isPropagationStopped())break e;U0(i,l,u),s=c}else for(a=0;a<o.length;a++){if(l=o[a],c=l.instance,u=l.currentTarget,l=l.listener,c!==s&&i.isPropagationStopped())break e;U0(i,l,u),s=c}}}if(jc)throw e=pp,jc=!1,pp=null,e}function Ee(e,n){var r=n[Sp];r===void 0&&(r=n[Sp]=new Set);var o=e+"__bubble";r.has(o)||(O1(n,e,2,!1),r.add(o))}function of(e,n,r){var o=0;n&&(o|=4),O1(r,e,o,n)}var _l="_reactListening"+Math.random().toString(36).slice(2);function ia(e){if(!e[_l]){e[_l]=!0,Hw.forEach(function(r){r!=="selectionchange"&&(_M.has(r)||of(r,!1,e),of(r,!0,e))});var n=e.nodeType===9?e:e.ownerDocument;n===null||n[_l]||(n[_l]=!0,of("selectionchange",!1,n))}}function O1(e,n,r,o){switch(x1(n)){case 1:var i=Oj;break;case 4:i=Dj;break;default:i=em}r=i.bind(null,n,r,e),i=void 0,!fp||n!=="touchstart"&&n!=="touchmove"&&n!=="wheel"||(i=!0),o?i!==void 0?e.addEventListener(n,r,{capture:!0,passive:i}):e.addEventListener(n,r,!0):i!==void 0?e.addEventListener(n,r,{passive:i}):e.addEventListener(n,r,!1)}function sf(e,n,r,o,i){var s=o;if(!(n&1)&&!(n&2)&&o!==null)e:for(;;){if(o===null)return;var a=o.tag;if(a===3||a===4){var l=o.stateNode.containerInfo;if(l===i||l.nodeType===8&&l.parentNode===i)break;if(a===4)for(a=o.return;a!==null;){var c=a.tag;if((c===3||c===4)&&(c=a.stateNode.containerInfo,c===i||c.nodeType===8&&c.parentNode===i))return;a=a.return}for(;l!==null;){if(a=po(l),a===null)return;if(c=a.tag,c===5||c===6){o=s=a;continue e}l=l.parentNode}}o=o.return}i1(function(){var u=s,f=qh(r),d=[];e:{var p=I1.get(e);if(p!==void 0){var g=nm,v=e;switch(e){case"keypress":if(lc(r)===0)break e;case"keydown":case"keyup":g=Qj;break;case"focusin":v="focus",g=Qd;break;case"focusout":v="blur",g=Qd;break;case"beforeblur":case"afterblur":g=Qd;break;case"click":if(r.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":g=T0;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":g=Fj;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":g=tM;break;case M1:case R1:case A1:g=Hj;break;case T1:g=rM;break;case"scroll":g=Lj;break;case"wheel":g=iM;break;case"copy":case"cut":case"paste":g=Uj;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":g=$0}var w=(n&4)!==0,_=!w&&e==="scroll",y=w?p!==null?p+"Capture":null:p;w=[];for(var b=u,x;b!==null;){x=b;var S=x.stateNode;if(x.tag===5&&S!==null&&(x=S,y!==null&&(S=Js(b,y),S!=null&&w.push(sa(b,S,x)))),_)break;b=b.return}0<w.length&&(p=new g(p,v,null,r,f),d.push({event:p,listeners:w}))}}if(!(n&7)){e:{if(p=e==="mouseover"||e==="pointerover",g=e==="mouseout"||e==="pointerout",p&&r!==up&&(v=r.relatedTarget||r.fromElement)&&(po(v)||v[er]))break e;if((g||p)&&(p=f.window===f?f:(p=f.ownerDocument)?p.defaultView||p.parentWindow:window,g?(v=r.relatedTarget||r.toElement,g=u,v=v?po(v):null,v!==null&&(_=Do(v),v!==_||v.tag!==5&&v.tag!==6)&&(v=null)):(g=null,v=u),g!==v)){if(w=T0,S="onMouseLeave",y="onMouseEnter",b="mouse",(e==="pointerout"||e==="pointerover")&&(w=$0,S="onPointerLeave",y="onPointerEnter",b="pointer"),_=g==null?p:ci(g),x=v==null?p:ci(v),p=new w(S,b+"leave",g,r,f),p.target=_,p.relatedTarget=x,S=null,po(f)===u&&(w=new w(y,b+"enter",v,r,f),w.target=x,w.relatedTarget=_,S=w),_=S,g&&v)t:{for(w=g,y=v,b=0,x=w;x;x=Go(x))b++;for(x=0,S=y;S;S=Go(S))x++;for(;0<b-x;)w=Go(w),b--;for(;0<x-b;)y=Go(y),x--;for(;b--;){if(w===y||y!==null&&w===y.alternate)break t;w=Go(w),y=Go(y)}w=null}else w=null;g!==null&&G0(d,p,g,w,!1),v!==null&&_!==null&&G0(d,_,v,w,!0)}}e:{if(p=u?ci(u):window,g=p.nodeName&&p.nodeName.toLowerCase(),g==="select"||g==="input"&&p.type==="file")var C=fM;else if(L0(p))if(k1)C=gM;else{C=hM;var k=pM}else(g=p.nodeName)&&g.toLowerCase()==="input"&&(p.type==="checkbox"||p.type==="radio")&&(C=mM);if(C&&(C=C(e,u))){C1(d,C,r,f);break e}k&&k(e,p,u),e==="focusout"&&(k=p._wrapperState)&&k.controlled&&p.type==="number"&&ip(p,"number",p.value)}switch(k=u?ci(u):window,e){case"focusin":(L0(k)||k.contentEditable==="true")&&(ai=k,yp=u,Fs=null);break;case"focusout":Fs=yp=ai=null;break;case"mousedown":vp=!0;break;case"contextmenu":case"mouseup":case"dragend":vp=!1,H0(d,r,f);break;case"selectionchange":if(xM)break;case"keydown":case"keyup":H0(d,r,f)}var N;if(om)e:{switch(e){case"compositionstart":var E="onCompositionStart";break e;case"compositionend":E="onCompositionEnd";break e;case"compositionupdate":E="onCompositionUpdate";break e}E=void 0}else si?_1(e,r)&&(E="onCompositionEnd"):e==="keydown"&&r.keyCode===229&&(E="onCompositionStart");E&&(b1&&r.locale!=="ko"&&(si||E!=="onCompositionStart"?E==="onCompositionEnd"&&si&&(N=w1()):(Er=f,tm="value"in Er?Er.value:Er.textContent,si=!0)),k=Ic(u,E),0<k.length&&(E=new I0(E,e,null,r,f),d.push({event:E,listeners:k}),N?E.data=N:(N=S1(r),N!==null&&(E.data=N)))),(N=aM?lM(e,r):cM(e,r))&&(u=Ic(u,"onBeforeInput"),0<u.length&&(f=new I0("onBeforeInput","beforeinput",null,r,f),d.push({event:f,listeners:u}),f.data=N))}$1(d,n)})}function sa(e,n,r){return{instance:e,listener:n,currentTarget:r}}function Ic(e,n){for(var r=n+"Capture",o=[];e!==null;){var i=e,s=i.stateNode;i.tag===5&&s!==null&&(i=s,s=Js(e,r),s!=null&&o.unshift(sa(e,s,i)),s=Js(e,n),s!=null&&o.push(sa(e,s,i))),e=e.return}return o}function Go(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function G0(e,n,r,o,i){for(var s=n._reactName,a=[];r!==null&&r!==o;){var l=r,c=l.alternate,u=l.stateNode;if(c!==null&&c===o)break;l.tag===5&&u!==null&&(l=u,i?(c=Js(r,s),c!=null&&a.unshift(sa(r,c,l))):i||(c=Js(r,s),c!=null&&a.push(sa(r,c,l)))),r=r.return}a.length!==0&&e.push({event:n,listeners:a})}var SM=/\r\n?/g,CM=/\u0000|\uFFFD/g;function Y0(e){return(typeof e=="string"?e:""+e).replace(SM,`
38
- `).replace(CM,"")}function Sl(e,n,r){if(n=Y0(n),Y0(e)!==n&&r)throw Error(Q(425))}function $c(){}var xp=null,wp=null;function bp(e,n){return e==="textarea"||e==="noscript"||typeof n.children=="string"||typeof n.children=="number"||typeof n.dangerouslySetInnerHTML=="object"&&n.dangerouslySetInnerHTML!==null&&n.dangerouslySetInnerHTML.__html!=null}var _p=typeof setTimeout=="function"?setTimeout:void 0,kM=typeof clearTimeout=="function"?clearTimeout:void 0,X0=typeof Promise=="function"?Promise:void 0,NM=typeof queueMicrotask=="function"?queueMicrotask:typeof X0<"u"?function(e){return X0.resolve(null).then(e).catch(EM)}:_p;function EM(e){setTimeout(function(){throw e})}function af(e,n){var r=n,o=0;do{var i=r.nextSibling;if(e.removeChild(r),i&&i.nodeType===8)if(r=i.data,r==="/$"){if(o===0){e.removeChild(i),na(n);return}o--}else r!=="$"&&r!=="$?"&&r!=="$!"||o++;r=i}while(r);na(n)}function Tr(e){for(;e!=null;e=e.nextSibling){var n=e.nodeType;if(n===1||n===3)break;if(n===8){if(n=e.data,n==="$"||n==="$!"||n==="$?")break;if(n==="/$")return null}}return e}function K0(e){e=e.previousSibling;for(var n=0;e;){if(e.nodeType===8){var r=e.data;if(r==="$"||r==="$!"||r==="$?"){if(n===0)return e;n--}else r==="/$"&&n++}e=e.previousSibling}return null}var Qi=Math.random().toString(36).slice(2),Cn="__reactFiber$"+Qi,aa="__reactProps$"+Qi,er="__reactContainer$"+Qi,Sp="__reactEvents$"+Qi,PM="__reactListeners$"+Qi,jM="__reactHandles$"+Qi;function po(e){var n=e[Cn];if(n)return n;for(var r=e.parentNode;r;){if(n=r[er]||r[Cn]){if(r=n.alternate,n.child!==null||r!==null&&r.child!==null)for(e=K0(e);e!==null;){if(r=e[Cn])return r;e=K0(e)}return n}e=r,r=e.parentNode}return null}function Ta(e){return e=e[Cn]||e[er],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function ci(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(Q(33))}function zu(e){return e[aa]||null}var Cp=[],ui=-1;function Xr(e){return{current:e}}function je(e){0>ui||(e.current=Cp[ui],Cp[ui]=null,ui--)}function Ce(e,n){ui++,Cp[ui]=e.current,e.current=n}var Br={},at=Xr(Br),xt=Xr(!1),So=Br;function Mi(e,n){var r=e.type.contextTypes;if(!r)return Br;var o=e.stateNode;if(o&&o.__reactInternalMemoizedUnmaskedChildContext===n)return o.__reactInternalMemoizedMaskedChildContext;var i={},s;for(s in r)i[s]=n[s];return o&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=n,e.__reactInternalMemoizedMaskedChildContext=i),i}function wt(e){return e=e.childContextTypes,e!=null}function Oc(){je(xt),je(at)}function q0(e,n,r){if(at.current!==Br)throw Error(Q(168));Ce(at,n),Ce(xt,r)}function D1(e,n,r){var o=e.stateNode;if(n=n.childContextTypes,typeof o.getChildContext!="function")return r;o=o.getChildContext();for(var i in o)if(!(i in n))throw Error(Q(108,pj(e)||"Unknown",i));return Le({},r,o)}function Dc(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Br,So=at.current,Ce(at,e),Ce(xt,xt.current),!0}function Z0(e,n,r){var o=e.stateNode;if(!o)throw Error(Q(169));r?(e=D1(e,n,So),o.__reactInternalMemoizedMergedChildContext=e,je(xt),je(at),Ce(at,e)):je(xt),Ce(xt,r)}var Wn=null,Fu=!1,lf=!1;function L1(e){Wn===null?Wn=[e]:Wn.push(e)}function MM(e){Fu=!0,L1(e)}function Kr(){if(!lf&&Wn!==null){lf=!0;var e=0,n=_e;try{var r=Wn;for(_e=1;e<r.length;e++){var o=r[e];do o=o(!0);while(o!==null)}Wn=null,Fu=!1}catch(i){throw Wn!==null&&(Wn=Wn.slice(e+1)),c1(Zh,Kr),i}finally{_e=n,lf=!1}}return null}var di=[],fi=0,Lc=null,zc=0,Ut=[],Gt=0,Co=null,Gn=1,Yn="";function co(e,n){di[fi++]=zc,di[fi++]=Lc,Lc=e,zc=n}function z1(e,n,r){Ut[Gt++]=Gn,Ut[Gt++]=Yn,Ut[Gt++]=Co,Co=e;var o=Gn;e=Yn;var i=32-fn(o)-1;o&=~(1<<i),r+=1;var s=32-fn(n)+i;if(30<s){var a=i-i%5;s=(o&(1<<a)-1).toString(32),o>>=a,i-=a,Gn=1<<32-fn(n)+i|r<<i|o,Yn=s+e}else Gn=1<<s|r<<i|o,Yn=e}function sm(e){e.return!==null&&(co(e,1),z1(e,1,0))}function am(e){for(;e===Lc;)Lc=di[--fi],di[fi]=null,zc=di[--fi],di[fi]=null;for(;e===Co;)Co=Ut[--Gt],Ut[Gt]=null,Yn=Ut[--Gt],Ut[Gt]=null,Gn=Ut[--Gt],Ut[Gt]=null}var At=null,Rt=null,Re=!1,an=null;function F1(e,n){var r=Xt(5,null,null,0);r.elementType="DELETED",r.stateNode=n,r.return=e,n=e.deletions,n===null?(e.deletions=[r],e.flags|=16):n.push(r)}function Q0(e,n){switch(e.tag){case 5:var r=e.type;return n=n.nodeType!==1||r.toLowerCase()!==n.nodeName.toLowerCase()?null:n,n!==null?(e.stateNode=n,At=e,Rt=Tr(n.firstChild),!0):!1;case 6:return n=e.pendingProps===""||n.nodeType!==3?null:n,n!==null?(e.stateNode=n,At=e,Rt=null,!0):!1;case 13:return n=n.nodeType!==8?null:n,n!==null?(r=Co!==null?{id:Gn,overflow:Yn}:null,e.memoizedState={dehydrated:n,treeContext:r,retryLane:1073741824},r=Xt(18,null,null,0),r.stateNode=n,r.return=e,e.child=r,At=e,Rt=null,!0):!1;default:return!1}}function kp(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Np(e){if(Re){var n=Rt;if(n){var r=n;if(!Q0(e,n)){if(kp(e))throw Error(Q(418));n=Tr(r.nextSibling);var o=At;n&&Q0(e,n)?F1(o,r):(e.flags=e.flags&-4097|2,Re=!1,At=e)}}else{if(kp(e))throw Error(Q(418));e.flags=e.flags&-4097|2,Re=!1,At=e}}}function J0(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;At=e}function Cl(e){if(e!==At)return!1;if(!Re)return J0(e),Re=!0,!1;var n;if((n=e.tag!==3)&&!(n=e.tag!==5)&&(n=e.type,n=n!=="head"&&n!=="body"&&!bp(e.type,e.memoizedProps)),n&&(n=Rt)){if(kp(e))throw V1(),Error(Q(418));for(;n;)F1(e,n),n=Tr(n.nextSibling)}if(J0(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(Q(317));e:{for(e=e.nextSibling,n=0;e;){if(e.nodeType===8){var r=e.data;if(r==="/$"){if(n===0){Rt=Tr(e.nextSibling);break e}n--}else r!=="$"&&r!=="$!"&&r!=="$?"||n++}e=e.nextSibling}Rt=null}}else Rt=At?Tr(e.stateNode.nextSibling):null;return!0}function V1(){for(var e=Rt;e;)e=Tr(e.nextSibling)}function Ri(){Rt=At=null,Re=!1}function lm(e){an===null?an=[e]:an.push(e)}var RM=sr.ReactCurrentBatchConfig;function fs(e,n,r){if(e=r.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(r._owner){if(r=r._owner,r){if(r.tag!==1)throw Error(Q(309));var o=r.stateNode}if(!o)throw Error(Q(147,e));var i=o,s=""+e;return n!==null&&n.ref!==null&&typeof n.ref=="function"&&n.ref._stringRef===s?n.ref:(n=function(a){var l=i.refs;a===null?delete l[s]:l[s]=a},n._stringRef=s,n)}if(typeof e!="string")throw Error(Q(284));if(!r._owner)throw Error(Q(290,e))}return e}function kl(e,n){throw e=Object.prototype.toString.call(n),Error(Q(31,e==="[object Object]"?"object with keys {"+Object.keys(n).join(", ")+"}":e))}function ey(e){var n=e._init;return n(e._payload)}function B1(e){function n(y,b){if(e){var x=y.deletions;x===null?(y.deletions=[b],y.flags|=16):x.push(b)}}function r(y,b){if(!e)return null;for(;b!==null;)n(y,b),b=b.sibling;return null}function o(y,b){for(y=new Map;b!==null;)b.key!==null?y.set(b.key,b):y.set(b.index,b),b=b.sibling;return y}function i(y,b){return y=Dr(y,b),y.index=0,y.sibling=null,y}function s(y,b,x){return y.index=x,e?(x=y.alternate,x!==null?(x=x.index,x<b?(y.flags|=2,b):x):(y.flags|=2,b)):(y.flags|=1048576,b)}function a(y){return e&&y.alternate===null&&(y.flags|=2),y}function l(y,b,x,S){return b===null||b.tag!==6?(b=mf(x,y.mode,S),b.return=y,b):(b=i(b,x),b.return=y,b)}function c(y,b,x,S){var C=x.type;return C===ii?f(y,b,x.props.children,S,x.key):b!==null&&(b.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===br&&ey(C)===b.type)?(S=i(b,x.props),S.ref=fs(y,b,x),S.return=y,S):(S=mc(x.type,x.key,x.props,null,y.mode,S),S.ref=fs(y,b,x),S.return=y,S)}function u(y,b,x,S){return b===null||b.tag!==4||b.stateNode.containerInfo!==x.containerInfo||b.stateNode.implementation!==x.implementation?(b=gf(x,y.mode,S),b.return=y,b):(b=i(b,x.children||[]),b.return=y,b)}function f(y,b,x,S,C){return b===null||b.tag!==7?(b=xo(x,y.mode,S,C),b.return=y,b):(b=i(b,x),b.return=y,b)}function d(y,b,x){if(typeof b=="string"&&b!==""||typeof b=="number")return b=mf(""+b,y.mode,x),b.return=y,b;if(typeof b=="object"&&b!==null){switch(b.$$typeof){case hl:return x=mc(b.type,b.key,b.props,null,y.mode,x),x.ref=fs(y,null,b),x.return=y,x;case oi:return b=gf(b,y.mode,x),b.return=y,b;case br:var S=b._init;return d(y,S(b._payload),x)}if(Es(b)||as(b))return b=xo(b,y.mode,x,null),b.return=y,b;kl(y,b)}return null}function p(y,b,x,S){var C=b!==null?b.key:null;if(typeof x=="string"&&x!==""||typeof x=="number")return C!==null?null:l(y,b,""+x,S);if(typeof x=="object"&&x!==null){switch(x.$$typeof){case hl:return x.key===C?c(y,b,x,S):null;case oi:return x.key===C?u(y,b,x,S):null;case br:return C=x._init,p(y,b,C(x._payload),S)}if(Es(x)||as(x))return C!==null?null:f(y,b,x,S,null);kl(y,x)}return null}function g(y,b,x,S,C){if(typeof S=="string"&&S!==""||typeof S=="number")return y=y.get(x)||null,l(b,y,""+S,C);if(typeof S=="object"&&S!==null){switch(S.$$typeof){case hl:return y=y.get(S.key===null?x:S.key)||null,c(b,y,S,C);case oi:return y=y.get(S.key===null?x:S.key)||null,u(b,y,S,C);case br:var k=S._init;return g(y,b,x,k(S._payload),C)}if(Es(S)||as(S))return y=y.get(x)||null,f(b,y,S,C,null);kl(b,S)}return null}function v(y,b,x,S){for(var C=null,k=null,N=b,E=b=0,P=null;N!==null&&E<x.length;E++){N.index>E?(P=N,N=null):P=N.sibling;var T=p(y,N,x[E],S);if(T===null){N===null&&(N=P);break}e&&N&&T.alternate===null&&n(y,N),b=s(T,b,E),k===null?C=T:k.sibling=T,k=T,N=P}if(E===x.length)return r(y,N),Re&&co(y,E),C;if(N===null){for(;E<x.length;E++)N=d(y,x[E],S),N!==null&&(b=s(N,b,E),k===null?C=N:k.sibling=N,k=N);return Re&&co(y,E),C}for(N=o(y,N);E<x.length;E++)P=g(N,y,E,x[E],S),P!==null&&(e&&P.alternate!==null&&N.delete(P.key===null?E:P.key),b=s(P,b,E),k===null?C=P:k.sibling=P,k=P);return e&&N.forEach(function(A){return n(y,A)}),Re&&co(y,E),C}function w(y,b,x,S){var C=as(x);if(typeof C!="function")throw Error(Q(150));if(x=C.call(x),x==null)throw Error(Q(151));for(var k=C=null,N=b,E=b=0,P=null,T=x.next();N!==null&&!T.done;E++,T=x.next()){N.index>E?(P=N,N=null):P=N.sibling;var A=p(y,N,T.value,S);if(A===null){N===null&&(N=P);break}e&&N&&A.alternate===null&&n(y,N),b=s(A,b,E),k===null?C=A:k.sibling=A,k=A,N=P}if(T.done)return r(y,N),Re&&co(y,E),C;if(N===null){for(;!T.done;E++,T=x.next())T=d(y,T.value,S),T!==null&&(b=s(T,b,E),k===null?C=T:k.sibling=T,k=T);return Re&&co(y,E),C}for(N=o(y,N);!T.done;E++,T=x.next())T=g(N,y,E,T.value,S),T!==null&&(e&&T.alternate!==null&&N.delete(T.key===null?E:T.key),b=s(T,b,E),k===null?C=T:k.sibling=T,k=T);return e&&N.forEach(function(D){return n(y,D)}),Re&&co(y,E),C}function _(y,b,x,S){if(typeof x=="object"&&x!==null&&x.type===ii&&x.key===null&&(x=x.props.children),typeof x=="object"&&x!==null){switch(x.$$typeof){case hl:e:{for(var C=x.key,k=b;k!==null;){if(k.key===C){if(C=x.type,C===ii){if(k.tag===7){r(y,k.sibling),b=i(k,x.props.children),b.return=y,y=b;break e}}else if(k.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===br&&ey(C)===k.type){r(y,k.sibling),b=i(k,x.props),b.ref=fs(y,k,x),b.return=y,y=b;break e}r(y,k);break}else n(y,k);k=k.sibling}x.type===ii?(b=xo(x.props.children,y.mode,S,x.key),b.return=y,y=b):(S=mc(x.type,x.key,x.props,null,y.mode,S),S.ref=fs(y,b,x),S.return=y,y=S)}return a(y);case oi:e:{for(k=x.key;b!==null;){if(b.key===k)if(b.tag===4&&b.stateNode.containerInfo===x.containerInfo&&b.stateNode.implementation===x.implementation){r(y,b.sibling),b=i(b,x.children||[]),b.return=y,y=b;break e}else{r(y,b);break}else n(y,b);b=b.sibling}b=gf(x,y.mode,S),b.return=y,y=b}return a(y);case br:return k=x._init,_(y,b,k(x._payload),S)}if(Es(x))return v(y,b,x,S);if(as(x))return w(y,b,x,S);kl(y,x)}return typeof x=="string"&&x!==""||typeof x=="number"?(x=""+x,b!==null&&b.tag===6?(r(y,b.sibling),b=i(b,x),b.return=y,y=b):(r(y,b),b=mf(x,y.mode,S),b.return=y,y=b),a(y)):r(y,b)}return _}var Ai=B1(!0),H1=B1(!1),Fc=Xr(null),Vc=null,pi=null,cm=null;function um(){cm=pi=Vc=null}function dm(e){var n=Fc.current;je(Fc),e._currentValue=n}function Ep(e,n,r){for(;e!==null;){var o=e.alternate;if((e.childLanes&n)!==n?(e.childLanes|=n,o!==null&&(o.childLanes|=n)):o!==null&&(o.childLanes&n)!==n&&(o.childLanes|=n),e===r)break;e=e.return}}function _i(e,n){Vc=e,cm=pi=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&n&&(yt=!0),e.firstContext=null)}function Zt(e){var n=e._currentValue;if(cm!==e)if(e={context:e,memoizedValue:n,next:null},pi===null){if(Vc===null)throw Error(Q(308));pi=e,Vc.dependencies={lanes:0,firstContext:e}}else pi=pi.next=e;return n}var ho=null;function fm(e){ho===null?ho=[e]:ho.push(e)}function W1(e,n,r,o){var i=n.interleaved;return i===null?(r.next=r,fm(n)):(r.next=i.next,i.next=r),n.interleaved=r,tr(e,o)}function tr(e,n){e.lanes|=n;var r=e.alternate;for(r!==null&&(r.lanes|=n),r=e,e=e.return;e!==null;)e.childLanes|=n,r=e.alternate,r!==null&&(r.childLanes|=n),r=e,e=e.return;return r.tag===3?r.stateNode:null}var _r=!1;function pm(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function U1(e,n){e=e.updateQueue,n.updateQueue===e&&(n.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function qn(e,n){return{eventTime:e,lane:n,tag:0,payload:null,callback:null,next:null}}function Ir(e,n,r){var o=e.updateQueue;if(o===null)return null;if(o=o.shared,we&2){var i=o.pending;return i===null?n.next=n:(n.next=i.next,i.next=n),o.pending=n,tr(e,r)}return i=o.interleaved,i===null?(n.next=n,fm(o)):(n.next=i.next,i.next=n),o.interleaved=n,tr(e,r)}function cc(e,n,r){if(n=n.updateQueue,n!==null&&(n=n.shared,(r&4194240)!==0)){var o=n.lanes;o&=e.pendingLanes,r|=o,n.lanes=r,Qh(e,r)}}function ty(e,n){var r=e.updateQueue,o=e.alternate;if(o!==null&&(o=o.updateQueue,r===o)){var i=null,s=null;if(r=r.firstBaseUpdate,r!==null){do{var a={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};s===null?i=s=a:s=s.next=a,r=r.next}while(r!==null);s===null?i=s=n:s=s.next=n}else i=s=n;r={baseState:o.baseState,firstBaseUpdate:i,lastBaseUpdate:s,shared:o.shared,effects:o.effects},e.updateQueue=r;return}e=r.lastBaseUpdate,e===null?r.firstBaseUpdate=n:e.next=n,r.lastBaseUpdate=n}function Bc(e,n,r,o){var i=e.updateQueue;_r=!1;var s=i.firstBaseUpdate,a=i.lastBaseUpdate,l=i.shared.pending;if(l!==null){i.shared.pending=null;var c=l,u=c.next;c.next=null,a===null?s=u:a.next=u,a=c;var f=e.alternate;f!==null&&(f=f.updateQueue,l=f.lastBaseUpdate,l!==a&&(l===null?f.firstBaseUpdate=u:l.next=u,f.lastBaseUpdate=c))}if(s!==null){var d=i.baseState;a=0,f=u=c=null,l=s;do{var p=l.lane,g=l.eventTime;if((o&p)===p){f!==null&&(f=f.next={eventTime:g,lane:0,tag:l.tag,payload:l.payload,callback:l.callback,next:null});e:{var v=e,w=l;switch(p=n,g=r,w.tag){case 1:if(v=w.payload,typeof v=="function"){d=v.call(g,d,p);break e}d=v;break e;case 3:v.flags=v.flags&-65537|128;case 0:if(v=w.payload,p=typeof v=="function"?v.call(g,d,p):v,p==null)break e;d=Le({},d,p);break e;case 2:_r=!0}}l.callback!==null&&l.lane!==0&&(e.flags|=64,p=i.effects,p===null?i.effects=[l]:p.push(l))}else g={eventTime:g,lane:p,tag:l.tag,payload:l.payload,callback:l.callback,next:null},f===null?(u=f=g,c=d):f=f.next=g,a|=p;if(l=l.next,l===null){if(l=i.shared.pending,l===null)break;p=l,l=p.next,p.next=null,i.lastBaseUpdate=p,i.shared.pending=null}}while(!0);if(f===null&&(c=d),i.baseState=c,i.firstBaseUpdate=u,i.lastBaseUpdate=f,n=i.shared.interleaved,n!==null){i=n;do a|=i.lane,i=i.next;while(i!==n)}else s===null&&(i.shared.lanes=0);No|=a,e.lanes=a,e.memoizedState=d}}function ny(e,n,r){if(e=n.effects,n.effects=null,e!==null)for(n=0;n<e.length;n++){var o=e[n],i=o.callback;if(i!==null){if(o.callback=null,o=r,typeof i!="function")throw Error(Q(191,i));i.call(o)}}}var Ia={},jn=Xr(Ia),la=Xr(Ia),ca=Xr(Ia);function mo(e){if(e===Ia)throw Error(Q(174));return e}function hm(e,n){switch(Ce(ca,n),Ce(la,e),Ce(jn,Ia),e=n.nodeType,e){case 9:case 11:n=(n=n.documentElement)?n.namespaceURI:ap(null,"");break;default:e=e===8?n.parentNode:n,n=e.namespaceURI||null,e=e.tagName,n=ap(n,e)}je(jn),Ce(jn,n)}function Ti(){je(jn),je(la),je(ca)}function G1(e){mo(ca.current);var n=mo(jn.current),r=ap(n,e.type);n!==r&&(Ce(la,e),Ce(jn,r))}function mm(e){la.current===e&&(je(jn),je(la))}var $e=Xr(0);function Hc(e){for(var n=e;n!==null;){if(n.tag===13){var r=n.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||r.data==="$?"||r.data==="$!"))return n}else if(n.tag===19&&n.memoizedProps.revealOrder!==void 0){if(n.flags&128)return n}else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return null;n=n.return}n.sibling.return=n.return,n=n.sibling}return null}var cf=[];function gm(){for(var e=0;e<cf.length;e++)cf[e]._workInProgressVersionPrimary=null;cf.length=0}var uc=sr.ReactCurrentDispatcher,uf=sr.ReactCurrentBatchConfig,ko=0,Oe=null,Ue=null,Xe=null,Wc=!1,Vs=!1,ua=0,AM=0;function tt(){throw Error(Q(321))}function ym(e,n){if(n===null)return!1;for(var r=0;r<n.length&&r<e.length;r++)if(!hn(e[r],n[r]))return!1;return!0}function vm(e,n,r,o,i,s){if(ko=s,Oe=n,n.memoizedState=null,n.updateQueue=null,n.lanes=0,uc.current=e===null||e.memoizedState===null?OM:DM,e=r(o,i),Vs){s=0;do{if(Vs=!1,ua=0,25<=s)throw Error(Q(301));s+=1,Xe=Ue=null,n.updateQueue=null,uc.current=LM,e=r(o,i)}while(Vs)}if(uc.current=Uc,n=Ue!==null&&Ue.next!==null,ko=0,Xe=Ue=Oe=null,Wc=!1,n)throw Error(Q(300));return e}function xm(){var e=ua!==0;return ua=0,e}function _n(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Xe===null?Oe.memoizedState=Xe=e:Xe=Xe.next=e,Xe}function Qt(){if(Ue===null){var e=Oe.alternate;e=e!==null?e.memoizedState:null}else e=Ue.next;var n=Xe===null?Oe.memoizedState:Xe.next;if(n!==null)Xe=n,Ue=e;else{if(e===null)throw Error(Q(310));Ue=e,e={memoizedState:Ue.memoizedState,baseState:Ue.baseState,baseQueue:Ue.baseQueue,queue:Ue.queue,next:null},Xe===null?Oe.memoizedState=Xe=e:Xe=Xe.next=e}return Xe}function da(e,n){return typeof n=="function"?n(e):n}function df(e){var n=Qt(),r=n.queue;if(r===null)throw Error(Q(311));r.lastRenderedReducer=e;var o=Ue,i=o.baseQueue,s=r.pending;if(s!==null){if(i!==null){var a=i.next;i.next=s.next,s.next=a}o.baseQueue=i=s,r.pending=null}if(i!==null){s=i.next,o=o.baseState;var l=a=null,c=null,u=s;do{var f=u.lane;if((ko&f)===f)c!==null&&(c=c.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),o=u.hasEagerState?u.eagerState:e(o,u.action);else{var d={lane:f,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};c===null?(l=c=d,a=o):c=c.next=d,Oe.lanes|=f,No|=f}u=u.next}while(u!==null&&u!==s);c===null?a=o:c.next=l,hn(o,n.memoizedState)||(yt=!0),n.memoizedState=o,n.baseState=a,n.baseQueue=c,r.lastRenderedState=o}if(e=r.interleaved,e!==null){i=e;do s=i.lane,Oe.lanes|=s,No|=s,i=i.next;while(i!==e)}else i===null&&(r.lanes=0);return[n.memoizedState,r.dispatch]}function ff(e){var n=Qt(),r=n.queue;if(r===null)throw Error(Q(311));r.lastRenderedReducer=e;var o=r.dispatch,i=r.pending,s=n.memoizedState;if(i!==null){r.pending=null;var a=i=i.next;do s=e(s,a.action),a=a.next;while(a!==i);hn(s,n.memoizedState)||(yt=!0),n.memoizedState=s,n.baseQueue===null&&(n.baseState=s),r.lastRenderedState=s}return[s,o]}function Y1(){}function X1(e,n){var r=Oe,o=Qt(),i=n(),s=!hn(o.memoizedState,i);if(s&&(o.memoizedState=i,yt=!0),o=o.queue,wm(Z1.bind(null,r,o,e),[e]),o.getSnapshot!==n||s||Xe!==null&&Xe.memoizedState.tag&1){if(r.flags|=2048,fa(9,q1.bind(null,r,o,i,n),void 0,null),Ke===null)throw Error(Q(349));ko&30||K1(r,n,i)}return i}function K1(e,n,r){e.flags|=16384,e={getSnapshot:n,value:r},n=Oe.updateQueue,n===null?(n={lastEffect:null,stores:null},Oe.updateQueue=n,n.stores=[e]):(r=n.stores,r===null?n.stores=[e]:r.push(e))}function q1(e,n,r,o){n.value=r,n.getSnapshot=o,Q1(n)&&J1(e)}function Z1(e,n,r){return r(function(){Q1(n)&&J1(e)})}function Q1(e){var n=e.getSnapshot;e=e.value;try{var r=n();return!hn(e,r)}catch{return!0}}function J1(e){var n=tr(e,1);n!==null&&pn(n,e,1,-1)}function ry(e){var n=_n();return typeof e=="function"&&(e=e()),n.memoizedState=n.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:da,lastRenderedState:e},n.queue=e,e=e.dispatch=$M.bind(null,Oe,e),[n.memoizedState,e]}function fa(e,n,r,o){return e={tag:e,create:n,destroy:r,deps:o,next:null},n=Oe.updateQueue,n===null?(n={lastEffect:null,stores:null},Oe.updateQueue=n,n.lastEffect=e.next=e):(r=n.lastEffect,r===null?n.lastEffect=e.next=e:(o=r.next,r.next=e,e.next=o,n.lastEffect=e)),e}function eb(){return Qt().memoizedState}function dc(e,n,r,o){var i=_n();Oe.flags|=e,i.memoizedState=fa(1|n,r,void 0,o===void 0?null:o)}function Vu(e,n,r,o){var i=Qt();o=o===void 0?null:o;var s=void 0;if(Ue!==null){var a=Ue.memoizedState;if(s=a.destroy,o!==null&&ym(o,a.deps)){i.memoizedState=fa(n,r,s,o);return}}Oe.flags|=e,i.memoizedState=fa(1|n,r,s,o)}function oy(e,n){return dc(8390656,8,e,n)}function wm(e,n){return Vu(2048,8,e,n)}function tb(e,n){return Vu(4,2,e,n)}function nb(e,n){return Vu(4,4,e,n)}function rb(e,n){if(typeof n=="function")return e=e(),n(e),function(){n(null)};if(n!=null)return e=e(),n.current=e,function(){n.current=null}}function ob(e,n,r){return r=r!=null?r.concat([e]):null,Vu(4,4,rb.bind(null,n,e),r)}function bm(){}function ib(e,n){var r=Qt();n=n===void 0?null:n;var o=r.memoizedState;return o!==null&&n!==null&&ym(n,o[1])?o[0]:(r.memoizedState=[e,n],e)}function sb(e,n){var r=Qt();n=n===void 0?null:n;var o=r.memoizedState;return o!==null&&n!==null&&ym(n,o[1])?o[0]:(e=e(),r.memoizedState=[e,n],e)}function ab(e,n,r){return ko&21?(hn(r,n)||(r=f1(),Oe.lanes|=r,No|=r,e.baseState=!0),n):(e.baseState&&(e.baseState=!1,yt=!0),e.memoizedState=r)}function TM(e,n){var r=_e;_e=r!==0&&4>r?r:4,e(!0);var o=uf.transition;uf.transition={};try{e(!1),n()}finally{_e=r,uf.transition=o}}function lb(){return Qt().memoizedState}function IM(e,n,r){var o=Or(e);if(r={lane:o,action:r,hasEagerState:!1,eagerState:null,next:null},cb(e))ub(n,r);else if(r=W1(e,n,r,o),r!==null){var i=ut();pn(r,e,o,i),db(r,n,o)}}function $M(e,n,r){var o=Or(e),i={lane:o,action:r,hasEagerState:!1,eagerState:null,next:null};if(cb(e))ub(n,i);else{var s=e.alternate;if(e.lanes===0&&(s===null||s.lanes===0)&&(s=n.lastRenderedReducer,s!==null))try{var a=n.lastRenderedState,l=s(a,r);if(i.hasEagerState=!0,i.eagerState=l,hn(l,a)){var c=n.interleaved;c===null?(i.next=i,fm(n)):(i.next=c.next,c.next=i),n.interleaved=i;return}}catch{}finally{}r=W1(e,n,i,o),r!==null&&(i=ut(),pn(r,e,o,i),db(r,n,o))}}function cb(e){var n=e.alternate;return e===Oe||n!==null&&n===Oe}function ub(e,n){Vs=Wc=!0;var r=e.pending;r===null?n.next=n:(n.next=r.next,r.next=n),e.pending=n}function db(e,n,r){if(r&4194240){var o=n.lanes;o&=e.pendingLanes,r|=o,n.lanes=r,Qh(e,r)}}var Uc={readContext:Zt,useCallback:tt,useContext:tt,useEffect:tt,useImperativeHandle:tt,useInsertionEffect:tt,useLayoutEffect:tt,useMemo:tt,useReducer:tt,useRef:tt,useState:tt,useDebugValue:tt,useDeferredValue:tt,useTransition:tt,useMutableSource:tt,useSyncExternalStore:tt,useId:tt,unstable_isNewReconciler:!1},OM={readContext:Zt,useCallback:function(e,n){return _n().memoizedState=[e,n===void 0?null:n],e},useContext:Zt,useEffect:oy,useImperativeHandle:function(e,n,r){return r=r!=null?r.concat([e]):null,dc(4194308,4,rb.bind(null,n,e),r)},useLayoutEffect:function(e,n){return dc(4194308,4,e,n)},useInsertionEffect:function(e,n){return dc(4,2,e,n)},useMemo:function(e,n){var r=_n();return n=n===void 0?null:n,e=e(),r.memoizedState=[e,n],e},useReducer:function(e,n,r){var o=_n();return n=r!==void 0?r(n):n,o.memoizedState=o.baseState=n,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:n},o.queue=e,e=e.dispatch=IM.bind(null,Oe,e),[o.memoizedState,e]},useRef:function(e){var n=_n();return e={current:e},n.memoizedState=e},useState:ry,useDebugValue:bm,useDeferredValue:function(e){return _n().memoizedState=e},useTransition:function(){var e=ry(!1),n=e[0];return e=TM.bind(null,e[1]),_n().memoizedState=e,[n,e]},useMutableSource:function(){},useSyncExternalStore:function(e,n,r){var o=Oe,i=_n();if(Re){if(r===void 0)throw Error(Q(407));r=r()}else{if(r=n(),Ke===null)throw Error(Q(349));ko&30||K1(o,n,r)}i.memoizedState=r;var s={value:r,getSnapshot:n};return i.queue=s,oy(Z1.bind(null,o,s,e),[e]),o.flags|=2048,fa(9,q1.bind(null,o,s,r,n),void 0,null),r},useId:function(){var e=_n(),n=Ke.identifierPrefix;if(Re){var r=Yn,o=Gn;r=(o&~(1<<32-fn(o)-1)).toString(32)+r,n=":"+n+"R"+r,r=ua++,0<r&&(n+="H"+r.toString(32)),n+=":"}else r=AM++,n=":"+n+"r"+r.toString(32)+":";return e.memoizedState=n},unstable_isNewReconciler:!1},DM={readContext:Zt,useCallback:ib,useContext:Zt,useEffect:wm,useImperativeHandle:ob,useInsertionEffect:tb,useLayoutEffect:nb,useMemo:sb,useReducer:df,useRef:eb,useState:function(){return df(da)},useDebugValue:bm,useDeferredValue:function(e){var n=Qt();return ab(n,Ue.memoizedState,e)},useTransition:function(){var e=df(da)[0],n=Qt().memoizedState;return[e,n]},useMutableSource:Y1,useSyncExternalStore:X1,useId:lb,unstable_isNewReconciler:!1},LM={readContext:Zt,useCallback:ib,useContext:Zt,useEffect:wm,useImperativeHandle:ob,useInsertionEffect:tb,useLayoutEffect:nb,useMemo:sb,useReducer:ff,useRef:eb,useState:function(){return ff(da)},useDebugValue:bm,useDeferredValue:function(e){var n=Qt();return Ue===null?n.memoizedState=e:ab(n,Ue.memoizedState,e)},useTransition:function(){var e=ff(da)[0],n=Qt().memoizedState;return[e,n]},useMutableSource:Y1,useSyncExternalStore:X1,useId:lb,unstable_isNewReconciler:!1};function rn(e,n){if(e&&e.defaultProps){n=Le({},n),e=e.defaultProps;for(var r in e)n[r]===void 0&&(n[r]=e[r]);return n}return n}function Pp(e,n,r,o){n=e.memoizedState,r=r(o,n),r=r==null?n:Le({},n,r),e.memoizedState=r,e.lanes===0&&(e.updateQueue.baseState=r)}var Bu={isMounted:function(e){return(e=e._reactInternals)?Do(e)===e:!1},enqueueSetState:function(e,n,r){e=e._reactInternals;var o=ut(),i=Or(e),s=qn(o,i);s.payload=n,r!=null&&(s.callback=r),n=Ir(e,s,i),n!==null&&(pn(n,e,i,o),cc(n,e,i))},enqueueReplaceState:function(e,n,r){e=e._reactInternals;var o=ut(),i=Or(e),s=qn(o,i);s.tag=1,s.payload=n,r!=null&&(s.callback=r),n=Ir(e,s,i),n!==null&&(pn(n,e,i,o),cc(n,e,i))},enqueueForceUpdate:function(e,n){e=e._reactInternals;var r=ut(),o=Or(e),i=qn(r,o);i.tag=2,n!=null&&(i.callback=n),n=Ir(e,i,o),n!==null&&(pn(n,e,o,r),cc(n,e,o))}};function iy(e,n,r,o,i,s,a){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(o,s,a):n.prototype&&n.prototype.isPureReactComponent?!oa(r,o)||!oa(i,s):!0}function fb(e,n,r){var o=!1,i=Br,s=n.contextType;return typeof s=="object"&&s!==null?s=Zt(s):(i=wt(n)?So:at.current,o=n.contextTypes,s=(o=o!=null)?Mi(e,i):Br),n=new n(r,s),e.memoizedState=n.state!==null&&n.state!==void 0?n.state:null,n.updater=Bu,e.stateNode=n,n._reactInternals=e,o&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=s),n}function sy(e,n,r,o){e=n.state,typeof n.componentWillReceiveProps=="function"&&n.componentWillReceiveProps(r,o),typeof n.UNSAFE_componentWillReceiveProps=="function"&&n.UNSAFE_componentWillReceiveProps(r,o),n.state!==e&&Bu.enqueueReplaceState(n,n.state,null)}function jp(e,n,r,o){var i=e.stateNode;i.props=r,i.state=e.memoizedState,i.refs={},pm(e);var s=n.contextType;typeof s=="object"&&s!==null?i.context=Zt(s):(s=wt(n)?So:at.current,i.context=Mi(e,s)),i.state=e.memoizedState,s=n.getDerivedStateFromProps,typeof s=="function"&&(Pp(e,n,s,r),i.state=e.memoizedState),typeof n.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(n=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),n!==i.state&&Bu.enqueueReplaceState(i,i.state,null),Bc(e,r,i,o),i.state=e.memoizedState),typeof i.componentDidMount=="function"&&(e.flags|=4194308)}function Ii(e,n){try{var r="",o=n;do r+=fj(o),o=o.return;while(o);var i=r}catch(s){i=`
39
- Error generating stack: `+s.message+`
40
- `+s.stack}return{value:e,source:n,stack:i,digest:null}}function pf(e,n,r){return{value:e,source:null,stack:r??null,digest:n??null}}function Mp(e,n){try{console.error(n.value)}catch(r){setTimeout(function(){throw r})}}var zM=typeof WeakMap=="function"?WeakMap:Map;function pb(e,n,r){r=qn(-1,r),r.tag=3,r.payload={element:null};var o=n.value;return r.callback=function(){Yc||(Yc=!0,Fp=o),Mp(e,n)},r}function hb(e,n,r){r=qn(-1,r),r.tag=3;var o=e.type.getDerivedStateFromError;if(typeof o=="function"){var i=n.value;r.payload=function(){return o(i)},r.callback=function(){Mp(e,n)}}var s=e.stateNode;return s!==null&&typeof s.componentDidCatch=="function"&&(r.callback=function(){Mp(e,n),typeof o!="function"&&($r===null?$r=new Set([this]):$r.add(this));var a=n.stack;this.componentDidCatch(n.value,{componentStack:a!==null?a:""})}),r}function ay(e,n,r){var o=e.pingCache;if(o===null){o=e.pingCache=new zM;var i=new Set;o.set(n,i)}else i=o.get(n),i===void 0&&(i=new Set,o.set(n,i));i.has(r)||(i.add(r),e=JM.bind(null,e,n,r),n.then(e,e))}function ly(e){do{var n;if((n=e.tag===13)&&(n=e.memoizedState,n=n!==null?n.dehydrated!==null:!0),n)return e;e=e.return}while(e!==null);return null}function cy(e,n,r,o,i){return e.mode&1?(e.flags|=65536,e.lanes=i,e):(e===n?e.flags|=65536:(e.flags|=128,r.flags|=131072,r.flags&=-52805,r.tag===1&&(r.alternate===null?r.tag=17:(n=qn(-1,1),n.tag=2,Ir(r,n,1))),r.lanes|=1),e)}var FM=sr.ReactCurrentOwner,yt=!1;function lt(e,n,r,o){n.child=e===null?H1(n,null,r,o):Ai(n,e.child,r,o)}function uy(e,n,r,o,i){r=r.render;var s=n.ref;return _i(n,i),o=vm(e,n,r,o,s,i),r=xm(),e!==null&&!yt?(n.updateQueue=e.updateQueue,n.flags&=-2053,e.lanes&=~i,nr(e,n,i)):(Re&&r&&sm(n),n.flags|=1,lt(e,n,o,i),n.child)}function dy(e,n,r,o,i){if(e===null){var s=r.type;return typeof s=="function"&&!jm(s)&&s.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(n.tag=15,n.type=s,mb(e,n,s,o,i)):(e=mc(r.type,null,o,n,n.mode,i),e.ref=n.ref,e.return=n,n.child=e)}if(s=e.child,!(e.lanes&i)){var a=s.memoizedProps;if(r=r.compare,r=r!==null?r:oa,r(a,o)&&e.ref===n.ref)return nr(e,n,i)}return n.flags|=1,e=Dr(s,o),e.ref=n.ref,e.return=n,n.child=e}function mb(e,n,r,o,i){if(e!==null){var s=e.memoizedProps;if(oa(s,o)&&e.ref===n.ref)if(yt=!1,n.pendingProps=o=s,(e.lanes&i)!==0)e.flags&131072&&(yt=!0);else return n.lanes=e.lanes,nr(e,n,i)}return Rp(e,n,r,o,i)}function gb(e,n,r){var o=n.pendingProps,i=o.children,s=e!==null?e.memoizedState:null;if(o.mode==="hidden")if(!(n.mode&1))n.memoizedState={baseLanes:0,cachePool:null,transitions:null},Ce(mi,jt),jt|=r;else{if(!(r&1073741824))return e=s!==null?s.baseLanes|r:r,n.lanes=n.childLanes=1073741824,n.memoizedState={baseLanes:e,cachePool:null,transitions:null},n.updateQueue=null,Ce(mi,jt),jt|=e,null;n.memoizedState={baseLanes:0,cachePool:null,transitions:null},o=s!==null?s.baseLanes:r,Ce(mi,jt),jt|=o}else s!==null?(o=s.baseLanes|r,n.memoizedState=null):o=r,Ce(mi,jt),jt|=o;return lt(e,n,i,r),n.child}function yb(e,n){var r=n.ref;(e===null&&r!==null||e!==null&&e.ref!==r)&&(n.flags|=512,n.flags|=2097152)}function Rp(e,n,r,o,i){var s=wt(r)?So:at.current;return s=Mi(n,s),_i(n,i),r=vm(e,n,r,o,s,i),o=xm(),e!==null&&!yt?(n.updateQueue=e.updateQueue,n.flags&=-2053,e.lanes&=~i,nr(e,n,i)):(Re&&o&&sm(n),n.flags|=1,lt(e,n,r,i),n.child)}function fy(e,n,r,o,i){if(wt(r)){var s=!0;Dc(n)}else s=!1;if(_i(n,i),n.stateNode===null)fc(e,n),fb(n,r,o),jp(n,r,o,i),o=!0;else if(e===null){var a=n.stateNode,l=n.memoizedProps;a.props=l;var c=a.context,u=r.contextType;typeof u=="object"&&u!==null?u=Zt(u):(u=wt(r)?So:at.current,u=Mi(n,u));var f=r.getDerivedStateFromProps,d=typeof f=="function"||typeof a.getSnapshotBeforeUpdate=="function";d||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(l!==o||c!==u)&&sy(n,a,o,u),_r=!1;var p=n.memoizedState;a.state=p,Bc(n,o,a,i),c=n.memoizedState,l!==o||p!==c||xt.current||_r?(typeof f=="function"&&(Pp(n,r,f,o),c=n.memoizedState),(l=_r||iy(n,r,l,o,p,c,u))?(d||typeof a.UNSAFE_componentWillMount!="function"&&typeof a.componentWillMount!="function"||(typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount=="function"&&(n.flags|=4194308)):(typeof a.componentDidMount=="function"&&(n.flags|=4194308),n.memoizedProps=o,n.memoizedState=c),a.props=o,a.state=c,a.context=u,o=l):(typeof a.componentDidMount=="function"&&(n.flags|=4194308),o=!1)}else{a=n.stateNode,U1(e,n),l=n.memoizedProps,u=n.type===n.elementType?l:rn(n.type,l),a.props=u,d=n.pendingProps,p=a.context,c=r.contextType,typeof c=="object"&&c!==null?c=Zt(c):(c=wt(r)?So:at.current,c=Mi(n,c));var g=r.getDerivedStateFromProps;(f=typeof g=="function"||typeof a.getSnapshotBeforeUpdate=="function")||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(l!==d||p!==c)&&sy(n,a,o,c),_r=!1,p=n.memoizedState,a.state=p,Bc(n,o,a,i);var v=n.memoizedState;l!==d||p!==v||xt.current||_r?(typeof g=="function"&&(Pp(n,r,g,o),v=n.memoizedState),(u=_r||iy(n,r,u,o,p,v,c)||!1)?(f||typeof a.UNSAFE_componentWillUpdate!="function"&&typeof a.componentWillUpdate!="function"||(typeof a.componentWillUpdate=="function"&&a.componentWillUpdate(o,v,c),typeof a.UNSAFE_componentWillUpdate=="function"&&a.UNSAFE_componentWillUpdate(o,v,c)),typeof a.componentDidUpdate=="function"&&(n.flags|=4),typeof a.getSnapshotBeforeUpdate=="function"&&(n.flags|=1024)):(typeof a.componentDidUpdate!="function"||l===e.memoizedProps&&p===e.memoizedState||(n.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&p===e.memoizedState||(n.flags|=1024),n.memoizedProps=o,n.memoizedState=v),a.props=o,a.state=v,a.context=c,o=u):(typeof a.componentDidUpdate!="function"||l===e.memoizedProps&&p===e.memoizedState||(n.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&p===e.memoizedState||(n.flags|=1024),o=!1)}return Ap(e,n,r,o,s,i)}function Ap(e,n,r,o,i,s){yb(e,n);var a=(n.flags&128)!==0;if(!o&&!a)return i&&Z0(n,r,!1),nr(e,n,s);o=n.stateNode,FM.current=n;var l=a&&typeof r.getDerivedStateFromError!="function"?null:o.render();return n.flags|=1,e!==null&&a?(n.child=Ai(n,e.child,null,s),n.child=Ai(n,null,l,s)):lt(e,n,l,s),n.memoizedState=o.state,i&&Z0(n,r,!0),n.child}function vb(e){var n=e.stateNode;n.pendingContext?q0(e,n.pendingContext,n.pendingContext!==n.context):n.context&&q0(e,n.context,!1),hm(e,n.containerInfo)}function py(e,n,r,o,i){return Ri(),lm(i),n.flags|=256,lt(e,n,r,o),n.child}var Tp={dehydrated:null,treeContext:null,retryLane:0};function Ip(e){return{baseLanes:e,cachePool:null,transitions:null}}function xb(e,n,r){var o=n.pendingProps,i=$e.current,s=!1,a=(n.flags&128)!==0,l;if((l=a)||(l=e!==null&&e.memoizedState===null?!1:(i&2)!==0),l?(s=!0,n.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),Ce($e,i&1),e===null)return Np(n),e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(n.mode&1?e.data==="$!"?n.lanes=8:n.lanes=1073741824:n.lanes=1,null):(a=o.children,e=o.fallback,s?(o=n.mode,s=n.child,a={mode:"hidden",children:a},!(o&1)&&s!==null?(s.childLanes=0,s.pendingProps=a):s=Uu(a,o,0,null),e=xo(e,o,r,null),s.return=n,e.return=n,s.sibling=e,n.child=s,n.child.memoizedState=Ip(r),n.memoizedState=Tp,e):_m(n,a));if(i=e.memoizedState,i!==null&&(l=i.dehydrated,l!==null))return VM(e,n,a,o,l,i,r);if(s){s=o.fallback,a=n.mode,i=e.child,l=i.sibling;var c={mode:"hidden",children:o.children};return!(a&1)&&n.child!==i?(o=n.child,o.childLanes=0,o.pendingProps=c,n.deletions=null):(o=Dr(i,c),o.subtreeFlags=i.subtreeFlags&14680064),l!==null?s=Dr(l,s):(s=xo(s,a,r,null),s.flags|=2),s.return=n,o.return=n,o.sibling=s,n.child=o,o=s,s=n.child,a=e.child.memoizedState,a=a===null?Ip(r):{baseLanes:a.baseLanes|r,cachePool:null,transitions:a.transitions},s.memoizedState=a,s.childLanes=e.childLanes&~r,n.memoizedState=Tp,o}return s=e.child,e=s.sibling,o=Dr(s,{mode:"visible",children:o.children}),!(n.mode&1)&&(o.lanes=r),o.return=n,o.sibling=null,e!==null&&(r=n.deletions,r===null?(n.deletions=[e],n.flags|=16):r.push(e)),n.child=o,n.memoizedState=null,o}function _m(e,n){return n=Uu({mode:"visible",children:n},e.mode,0,null),n.return=e,e.child=n}function Nl(e,n,r,o){return o!==null&&lm(o),Ai(n,e.child,null,r),e=_m(n,n.pendingProps.children),e.flags|=2,n.memoizedState=null,e}function VM(e,n,r,o,i,s,a){if(r)return n.flags&256?(n.flags&=-257,o=pf(Error(Q(422))),Nl(e,n,a,o)):n.memoizedState!==null?(n.child=e.child,n.flags|=128,null):(s=o.fallback,i=n.mode,o=Uu({mode:"visible",children:o.children},i,0,null),s=xo(s,i,a,null),s.flags|=2,o.return=n,s.return=n,o.sibling=s,n.child=o,n.mode&1&&Ai(n,e.child,null,a),n.child.memoizedState=Ip(a),n.memoizedState=Tp,s);if(!(n.mode&1))return Nl(e,n,a,null);if(i.data==="$!"){if(o=i.nextSibling&&i.nextSibling.dataset,o)var l=o.dgst;return o=l,s=Error(Q(419)),o=pf(s,o,void 0),Nl(e,n,a,o)}if(l=(a&e.childLanes)!==0,yt||l){if(o=Ke,o!==null){switch(a&-a){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(o.suspendedLanes|a)?0:i,i!==0&&i!==s.retryLane&&(s.retryLane=i,tr(e,i),pn(o,e,i,-1))}return Pm(),o=pf(Error(Q(421))),Nl(e,n,a,o)}return i.data==="$?"?(n.flags|=128,n.child=e.child,n=eR.bind(null,e),i._reactRetry=n,null):(e=s.treeContext,Rt=Tr(i.nextSibling),At=n,Re=!0,an=null,e!==null&&(Ut[Gt++]=Gn,Ut[Gt++]=Yn,Ut[Gt++]=Co,Gn=e.id,Yn=e.overflow,Co=n),n=_m(n,o.children),n.flags|=4096,n)}function hy(e,n,r){e.lanes|=n;var o=e.alternate;o!==null&&(o.lanes|=n),Ep(e.return,n,r)}function hf(e,n,r,o,i){var s=e.memoizedState;s===null?e.memoizedState={isBackwards:n,rendering:null,renderingStartTime:0,last:o,tail:r,tailMode:i}:(s.isBackwards=n,s.rendering=null,s.renderingStartTime=0,s.last=o,s.tail=r,s.tailMode=i)}function wb(e,n,r){var o=n.pendingProps,i=o.revealOrder,s=o.tail;if(lt(e,n,o.children,r),o=$e.current,o&2)o=o&1|2,n.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=n.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&hy(e,r,n);else if(e.tag===19)hy(e,r,n);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===n)break e;for(;e.sibling===null;){if(e.return===null||e.return===n)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}o&=1}if(Ce($e,o),!(n.mode&1))n.memoizedState=null;else switch(i){case"forwards":for(r=n.child,i=null;r!==null;)e=r.alternate,e!==null&&Hc(e)===null&&(i=r),r=r.sibling;r=i,r===null?(i=n.child,n.child=null):(i=r.sibling,r.sibling=null),hf(n,!1,i,r,s);break;case"backwards":for(r=null,i=n.child,n.child=null;i!==null;){if(e=i.alternate,e!==null&&Hc(e)===null){n.child=i;break}e=i.sibling,i.sibling=r,r=i,i=e}hf(n,!0,r,null,s);break;case"together":hf(n,!1,null,null,void 0);break;default:n.memoizedState=null}return n.child}function fc(e,n){!(n.mode&1)&&e!==null&&(e.alternate=null,n.alternate=null,n.flags|=2)}function nr(e,n,r){if(e!==null&&(n.dependencies=e.dependencies),No|=n.lanes,!(r&n.childLanes))return null;if(e!==null&&n.child!==e.child)throw Error(Q(153));if(n.child!==null){for(e=n.child,r=Dr(e,e.pendingProps),n.child=r,r.return=n;e.sibling!==null;)e=e.sibling,r=r.sibling=Dr(e,e.pendingProps),r.return=n;r.sibling=null}return n.child}function BM(e,n,r){switch(n.tag){case 3:vb(n),Ri();break;case 5:G1(n);break;case 1:wt(n.type)&&Dc(n);break;case 4:hm(n,n.stateNode.containerInfo);break;case 10:var o=n.type._context,i=n.memoizedProps.value;Ce(Fc,o._currentValue),o._currentValue=i;break;case 13:if(o=n.memoizedState,o!==null)return o.dehydrated!==null?(Ce($e,$e.current&1),n.flags|=128,null):r&n.child.childLanes?xb(e,n,r):(Ce($e,$e.current&1),e=nr(e,n,r),e!==null?e.sibling:null);Ce($e,$e.current&1);break;case 19:if(o=(r&n.childLanes)!==0,e.flags&128){if(o)return wb(e,n,r);n.flags|=128}if(i=n.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Ce($e,$e.current),o)break;return null;case 22:case 23:return n.lanes=0,gb(e,n,r)}return nr(e,n,r)}var bb,$p,_b,Sb;bb=function(e,n){for(var r=n.child;r!==null;){if(r.tag===5||r.tag===6)e.appendChild(r.stateNode);else if(r.tag!==4&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===n)break;for(;r.sibling===null;){if(r.return===null||r.return===n)return;r=r.return}r.sibling.return=r.return,r=r.sibling}};$p=function(){};_b=function(e,n,r,o){var i=e.memoizedProps;if(i!==o){e=n.stateNode,mo(jn.current);var s=null;switch(r){case"input":i=rp(e,i),o=rp(e,o),s=[];break;case"select":i=Le({},i,{value:void 0}),o=Le({},o,{value:void 0}),s=[];break;case"textarea":i=sp(e,i),o=sp(e,o),s=[];break;default:typeof i.onClick!="function"&&typeof o.onClick=="function"&&(e.onclick=$c)}lp(r,o);var a;r=null;for(u in i)if(!o.hasOwnProperty(u)&&i.hasOwnProperty(u)&&i[u]!=null)if(u==="style"){var l=i[u];for(a in l)l.hasOwnProperty(a)&&(r||(r={}),r[a]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(Zs.hasOwnProperty(u)?s||(s=[]):(s=s||[]).push(u,null));for(u in o){var c=o[u];if(l=i!=null?i[u]:void 0,o.hasOwnProperty(u)&&c!==l&&(c!=null||l!=null))if(u==="style")if(l){for(a in l)!l.hasOwnProperty(a)||c&&c.hasOwnProperty(a)||(r||(r={}),r[a]="");for(a in c)c.hasOwnProperty(a)&&l[a]!==c[a]&&(r||(r={}),r[a]=c[a])}else r||(s||(s=[]),s.push(u,r)),r=c;else u==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,l=l?l.__html:void 0,c!=null&&l!==c&&(s=s||[]).push(u,c)):u==="children"?typeof c!="string"&&typeof c!="number"||(s=s||[]).push(u,""+c):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(Zs.hasOwnProperty(u)?(c!=null&&u==="onScroll"&&Ee("scroll",e),s||l===c||(s=[])):(s=s||[]).push(u,c))}r&&(s=s||[]).push("style",r);var u=s;(n.updateQueue=u)&&(n.flags|=4)}};Sb=function(e,n,r,o){r!==o&&(n.flags|=4)};function ps(e,n){if(!Re)switch(e.tailMode){case"hidden":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?e.tail=null:r.sibling=null;break;case"collapsed":r=e.tail;for(var o=null;r!==null;)r.alternate!==null&&(o=r),r=r.sibling;o===null?n||e.tail===null?e.tail=null:e.tail.sibling=null:o.sibling=null}}function nt(e){var n=e.alternate!==null&&e.alternate.child===e.child,r=0,o=0;if(n)for(var i=e.child;i!==null;)r|=i.lanes|i.childLanes,o|=i.subtreeFlags&14680064,o|=i.flags&14680064,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)r|=i.lanes|i.childLanes,o|=i.subtreeFlags,o|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=o,e.childLanes=r,n}function HM(e,n,r){var o=n.pendingProps;switch(am(n),n.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return nt(n),null;case 1:return wt(n.type)&&Oc(),nt(n),null;case 3:return o=n.stateNode,Ti(),je(xt),je(at),gm(),o.pendingContext&&(o.context=o.pendingContext,o.pendingContext=null),(e===null||e.child===null)&&(Cl(n)?n.flags|=4:e===null||e.memoizedState.isDehydrated&&!(n.flags&256)||(n.flags|=1024,an!==null&&(Hp(an),an=null))),$p(e,n),nt(n),null;case 5:mm(n);var i=mo(ca.current);if(r=n.type,e!==null&&n.stateNode!=null)_b(e,n,r,o,i),e.ref!==n.ref&&(n.flags|=512,n.flags|=2097152);else{if(!o){if(n.stateNode===null)throw Error(Q(166));return nt(n),null}if(e=mo(jn.current),Cl(n)){o=n.stateNode,r=n.type;var s=n.memoizedProps;switch(o[Cn]=n,o[aa]=s,e=(n.mode&1)!==0,r){case"dialog":Ee("cancel",o),Ee("close",o);break;case"iframe":case"object":case"embed":Ee("load",o);break;case"video":case"audio":for(i=0;i<js.length;i++)Ee(js[i],o);break;case"source":Ee("error",o);break;case"img":case"image":case"link":Ee("error",o),Ee("load",o);break;case"details":Ee("toggle",o);break;case"input":S0(o,s),Ee("invalid",o);break;case"select":o._wrapperState={wasMultiple:!!s.multiple},Ee("invalid",o);break;case"textarea":k0(o,s),Ee("invalid",o)}lp(r,s),i=null;for(var a in s)if(s.hasOwnProperty(a)){var l=s[a];a==="children"?typeof l=="string"?o.textContent!==l&&(s.suppressHydrationWarning!==!0&&Sl(o.textContent,l,e),i=["children",l]):typeof l=="number"&&o.textContent!==""+l&&(s.suppressHydrationWarning!==!0&&Sl(o.textContent,l,e),i=["children",""+l]):Zs.hasOwnProperty(a)&&l!=null&&a==="onScroll"&&Ee("scroll",o)}switch(r){case"input":ml(o),C0(o,s,!0);break;case"textarea":ml(o),N0(o);break;case"select":case"option":break;default:typeof s.onClick=="function"&&(o.onclick=$c)}o=i,n.updateQueue=o,o!==null&&(n.flags|=4)}else{a=i.nodeType===9?i:i.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=Zw(r)),e==="http://www.w3.org/1999/xhtml"?r==="script"?(e=a.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof o.is=="string"?e=a.createElement(r,{is:o.is}):(e=a.createElement(r),r==="select"&&(a=e,o.multiple?a.multiple=!0:o.size&&(a.size=o.size))):e=a.createElementNS(e,r),e[Cn]=n,e[aa]=o,bb(e,n,!1,!1),n.stateNode=e;e:{switch(a=cp(r,o),r){case"dialog":Ee("cancel",e),Ee("close",e),i=o;break;case"iframe":case"object":case"embed":Ee("load",e),i=o;break;case"video":case"audio":for(i=0;i<js.length;i++)Ee(js[i],e);i=o;break;case"source":Ee("error",e),i=o;break;case"img":case"image":case"link":Ee("error",e),Ee("load",e),i=o;break;case"details":Ee("toggle",e),i=o;break;case"input":S0(e,o),i=rp(e,o),Ee("invalid",e);break;case"option":i=o;break;case"select":e._wrapperState={wasMultiple:!!o.multiple},i=Le({},o,{value:void 0}),Ee("invalid",e);break;case"textarea":k0(e,o),i=sp(e,o),Ee("invalid",e);break;default:i=o}lp(r,i),l=i;for(s in l)if(l.hasOwnProperty(s)){var c=l[s];s==="style"?e1(e,c):s==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,c!=null&&Qw(e,c)):s==="children"?typeof c=="string"?(r!=="textarea"||c!=="")&&Qs(e,c):typeof c=="number"&&Qs(e,""+c):s!=="suppressContentEditableWarning"&&s!=="suppressHydrationWarning"&&s!=="autoFocus"&&(Zs.hasOwnProperty(s)?c!=null&&s==="onScroll"&&Ee("scroll",e):c!=null&&Gh(e,s,c,a))}switch(r){case"input":ml(e),C0(e,o,!1);break;case"textarea":ml(e),N0(e);break;case"option":o.value!=null&&e.setAttribute("value",""+Vr(o.value));break;case"select":e.multiple=!!o.multiple,s=o.value,s!=null?vi(e,!!o.multiple,s,!1):o.defaultValue!=null&&vi(e,!!o.multiple,o.defaultValue,!0);break;default:typeof i.onClick=="function"&&(e.onclick=$c)}switch(r){case"button":case"input":case"select":case"textarea":o=!!o.autoFocus;break e;case"img":o=!0;break e;default:o=!1}}o&&(n.flags|=4)}n.ref!==null&&(n.flags|=512,n.flags|=2097152)}return nt(n),null;case 6:if(e&&n.stateNode!=null)Sb(e,n,e.memoizedProps,o);else{if(typeof o!="string"&&n.stateNode===null)throw Error(Q(166));if(r=mo(ca.current),mo(jn.current),Cl(n)){if(o=n.stateNode,r=n.memoizedProps,o[Cn]=n,(s=o.nodeValue!==r)&&(e=At,e!==null))switch(e.tag){case 3:Sl(o.nodeValue,r,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Sl(o.nodeValue,r,(e.mode&1)!==0)}s&&(n.flags|=4)}else o=(r.nodeType===9?r:r.ownerDocument).createTextNode(o),o[Cn]=n,n.stateNode=o}return nt(n),null;case 13:if(je($e),o=n.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Re&&Rt!==null&&n.mode&1&&!(n.flags&128))V1(),Ri(),n.flags|=98560,s=!1;else if(s=Cl(n),o!==null&&o.dehydrated!==null){if(e===null){if(!s)throw Error(Q(318));if(s=n.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(Q(317));s[Cn]=n}else Ri(),!(n.flags&128)&&(n.memoizedState=null),n.flags|=4;nt(n),s=!1}else an!==null&&(Hp(an),an=null),s=!0;if(!s)return n.flags&65536?n:null}return n.flags&128?(n.lanes=r,n):(o=o!==null,o!==(e!==null&&e.memoizedState!==null)&&o&&(n.child.flags|=8192,n.mode&1&&(e===null||$e.current&1?Ge===0&&(Ge=3):Pm())),n.updateQueue!==null&&(n.flags|=4),nt(n),null);case 4:return Ti(),$p(e,n),e===null&&ia(n.stateNode.containerInfo),nt(n),null;case 10:return dm(n.type._context),nt(n),null;case 17:return wt(n.type)&&Oc(),nt(n),null;case 19:if(je($e),s=n.memoizedState,s===null)return nt(n),null;if(o=(n.flags&128)!==0,a=s.rendering,a===null)if(o)ps(s,!1);else{if(Ge!==0||e!==null&&e.flags&128)for(e=n.child;e!==null;){if(a=Hc(e),a!==null){for(n.flags|=128,ps(s,!1),o=a.updateQueue,o!==null&&(n.updateQueue=o,n.flags|=4),n.subtreeFlags=0,o=r,r=n.child;r!==null;)s=r,e=o,s.flags&=14680066,a=s.alternate,a===null?(s.childLanes=0,s.lanes=e,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=a.childLanes,s.lanes=a.lanes,s.child=a.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=a.memoizedProps,s.memoizedState=a.memoizedState,s.updateQueue=a.updateQueue,s.type=a.type,e=a.dependencies,s.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),r=r.sibling;return Ce($e,$e.current&1|2),n.child}e=e.sibling}s.tail!==null&&Fe()>$i&&(n.flags|=128,o=!0,ps(s,!1),n.lanes=4194304)}else{if(!o)if(e=Hc(a),e!==null){if(n.flags|=128,o=!0,r=e.updateQueue,r!==null&&(n.updateQueue=r,n.flags|=4),ps(s,!0),s.tail===null&&s.tailMode==="hidden"&&!a.alternate&&!Re)return nt(n),null}else 2*Fe()-s.renderingStartTime>$i&&r!==1073741824&&(n.flags|=128,o=!0,ps(s,!1),n.lanes=4194304);s.isBackwards?(a.sibling=n.child,n.child=a):(r=s.last,r!==null?r.sibling=a:n.child=a,s.last=a)}return s.tail!==null?(n=s.tail,s.rendering=n,s.tail=n.sibling,s.renderingStartTime=Fe(),n.sibling=null,r=$e.current,Ce($e,o?r&1|2:r&1),n):(nt(n),null);case 22:case 23:return Em(),o=n.memoizedState!==null,e!==null&&e.memoizedState!==null!==o&&(n.flags|=8192),o&&n.mode&1?jt&1073741824&&(nt(n),n.subtreeFlags&6&&(n.flags|=8192)):nt(n),null;case 24:return null;case 25:return null}throw Error(Q(156,n.tag))}function WM(e,n){switch(am(n),n.tag){case 1:return wt(n.type)&&Oc(),e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 3:return Ti(),je(xt),je(at),gm(),e=n.flags,e&65536&&!(e&128)?(n.flags=e&-65537|128,n):null;case 5:return mm(n),null;case 13:if(je($e),e=n.memoizedState,e!==null&&e.dehydrated!==null){if(n.alternate===null)throw Error(Q(340));Ri()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 19:return je($e),null;case 4:return Ti(),null;case 10:return dm(n.type._context),null;case 22:case 23:return Em(),null;case 24:return null;default:return null}}var El=!1,it=!1,UM=typeof WeakSet=="function"?WeakSet:Set,oe=null;function hi(e,n){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(o){ze(e,n,o)}else r.current=null}function Op(e,n,r){try{r()}catch(o){ze(e,n,o)}}var my=!1;function GM(e,n){if(xp=Ac,e=P1(),im(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var o=r.getSelection&&r.getSelection();if(o&&o.rangeCount!==0){r=o.anchorNode;var i=o.anchorOffset,s=o.focusNode;o=o.focusOffset;try{r.nodeType,s.nodeType}catch{r=null;break e}var a=0,l=-1,c=-1,u=0,f=0,d=e,p=null;t:for(;;){for(var g;d!==r||i!==0&&d.nodeType!==3||(l=a+i),d!==s||o!==0&&d.nodeType!==3||(c=a+o),d.nodeType===3&&(a+=d.nodeValue.length),(g=d.firstChild)!==null;)p=d,d=g;for(;;){if(d===e)break t;if(p===r&&++u===i&&(l=a),p===s&&++f===o&&(c=a),(g=d.nextSibling)!==null)break;d=p,p=d.parentNode}d=g}r=l===-1||c===-1?null:{start:l,end:c}}else r=null}r=r||{start:0,end:0}}else r=null;for(wp={focusedElem:e,selectionRange:r},Ac=!1,oe=n;oe!==null;)if(n=oe,e=n.child,(n.subtreeFlags&1028)!==0&&e!==null)e.return=n,oe=e;else for(;oe!==null;){n=oe;try{var v=n.alternate;if(n.flags&1024)switch(n.tag){case 0:case 11:case 15:break;case 1:if(v!==null){var w=v.memoizedProps,_=v.memoizedState,y=n.stateNode,b=y.getSnapshotBeforeUpdate(n.elementType===n.type?w:rn(n.type,w),_);y.__reactInternalSnapshotBeforeUpdate=b}break;case 3:var x=n.stateNode.containerInfo;x.nodeType===1?x.textContent="":x.nodeType===9&&x.documentElement&&x.removeChild(x.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(Q(163))}}catch(S){ze(n,n.return,S)}if(e=n.sibling,e!==null){e.return=n.return,oe=e;break}oe=n.return}return v=my,my=!1,v}function Bs(e,n,r){var o=n.updateQueue;if(o=o!==null?o.lastEffect:null,o!==null){var i=o=o.next;do{if((i.tag&e)===e){var s=i.destroy;i.destroy=void 0,s!==void 0&&Op(n,r,s)}i=i.next}while(i!==o)}}function Hu(e,n){if(n=n.updateQueue,n=n!==null?n.lastEffect:null,n!==null){var r=n=n.next;do{if((r.tag&e)===e){var o=r.create;r.destroy=o()}r=r.next}while(r!==n)}}function Dp(e){var n=e.ref;if(n!==null){var r=e.stateNode;switch(e.tag){case 5:e=r;break;default:e=r}typeof n=="function"?n(e):n.current=e}}function Cb(e){var n=e.alternate;n!==null&&(e.alternate=null,Cb(n)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(n=e.stateNode,n!==null&&(delete n[Cn],delete n[aa],delete n[Sp],delete n[PM],delete n[jM])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function kb(e){return e.tag===5||e.tag===3||e.tag===4}function gy(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||kb(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Lp(e,n,r){var o=e.tag;if(o===5||o===6)e=e.stateNode,n?r.nodeType===8?r.parentNode.insertBefore(e,n):r.insertBefore(e,n):(r.nodeType===8?(n=r.parentNode,n.insertBefore(e,r)):(n=r,n.appendChild(e)),r=r._reactRootContainer,r!=null||n.onclick!==null||(n.onclick=$c));else if(o!==4&&(e=e.child,e!==null))for(Lp(e,n,r),e=e.sibling;e!==null;)Lp(e,n,r),e=e.sibling}function zp(e,n,r){var o=e.tag;if(o===5||o===6)e=e.stateNode,n?r.insertBefore(e,n):r.appendChild(e);else if(o!==4&&(e=e.child,e!==null))for(zp(e,n,r),e=e.sibling;e!==null;)zp(e,n,r),e=e.sibling}var Ze=null,sn=!1;function pr(e,n,r){for(r=r.child;r!==null;)Nb(e,n,r),r=r.sibling}function Nb(e,n,r){if(Pn&&typeof Pn.onCommitFiberUnmount=="function")try{Pn.onCommitFiberUnmount($u,r)}catch{}switch(r.tag){case 5:it||hi(r,n);case 6:var o=Ze,i=sn;Ze=null,pr(e,n,r),Ze=o,sn=i,Ze!==null&&(sn?(e=Ze,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):Ze.removeChild(r.stateNode));break;case 18:Ze!==null&&(sn?(e=Ze,r=r.stateNode,e.nodeType===8?af(e.parentNode,r):e.nodeType===1&&af(e,r),na(e)):af(Ze,r.stateNode));break;case 4:o=Ze,i=sn,Ze=r.stateNode.containerInfo,sn=!0,pr(e,n,r),Ze=o,sn=i;break;case 0:case 11:case 14:case 15:if(!it&&(o=r.updateQueue,o!==null&&(o=o.lastEffect,o!==null))){i=o=o.next;do{var s=i,a=s.destroy;s=s.tag,a!==void 0&&(s&2||s&4)&&Op(r,n,a),i=i.next}while(i!==o)}pr(e,n,r);break;case 1:if(!it&&(hi(r,n),o=r.stateNode,typeof o.componentWillUnmount=="function"))try{o.props=r.memoizedProps,o.state=r.memoizedState,o.componentWillUnmount()}catch(l){ze(r,n,l)}pr(e,n,r);break;case 21:pr(e,n,r);break;case 22:r.mode&1?(it=(o=it)||r.memoizedState!==null,pr(e,n,r),it=o):pr(e,n,r);break;default:pr(e,n,r)}}function yy(e){var n=e.updateQueue;if(n!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new UM),n.forEach(function(o){var i=tR.bind(null,e,o);r.has(o)||(r.add(o),o.then(i,i))})}}function Jt(e,n){var r=n.deletions;if(r!==null)for(var o=0;o<r.length;o++){var i=r[o];try{var s=e,a=n,l=a;e:for(;l!==null;){switch(l.tag){case 5:Ze=l.stateNode,sn=!1;break e;case 3:Ze=l.stateNode.containerInfo,sn=!0;break e;case 4:Ze=l.stateNode.containerInfo,sn=!0;break e}l=l.return}if(Ze===null)throw Error(Q(160));Nb(s,a,i),Ze=null,sn=!1;var c=i.alternate;c!==null&&(c.return=null),i.return=null}catch(u){ze(i,n,u)}}if(n.subtreeFlags&12854)for(n=n.child;n!==null;)Eb(n,e),n=n.sibling}function Eb(e,n){var r=e.alternate,o=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Jt(n,e),bn(e),o&4){try{Bs(3,e,e.return),Hu(3,e)}catch(w){ze(e,e.return,w)}try{Bs(5,e,e.return)}catch(w){ze(e,e.return,w)}}break;case 1:Jt(n,e),bn(e),o&512&&r!==null&&hi(r,r.return);break;case 5:if(Jt(n,e),bn(e),o&512&&r!==null&&hi(r,r.return),e.flags&32){var i=e.stateNode;try{Qs(i,"")}catch(w){ze(e,e.return,w)}}if(o&4&&(i=e.stateNode,i!=null)){var s=e.memoizedProps,a=r!==null?r.memoizedProps:s,l=e.type,c=e.updateQueue;if(e.updateQueue=null,c!==null)try{l==="input"&&s.type==="radio"&&s.name!=null&&Kw(i,s),cp(l,a);var u=cp(l,s);for(a=0;a<c.length;a+=2){var f=c[a],d=c[a+1];f==="style"?e1(i,d):f==="dangerouslySetInnerHTML"?Qw(i,d):f==="children"?Qs(i,d):Gh(i,f,d,u)}switch(l){case"input":op(i,s);break;case"textarea":qw(i,s);break;case"select":var p=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!s.multiple;var g=s.value;g!=null?vi(i,!!s.multiple,g,!1):p!==!!s.multiple&&(s.defaultValue!=null?vi(i,!!s.multiple,s.defaultValue,!0):vi(i,!!s.multiple,s.multiple?[]:"",!1))}i[aa]=s}catch(w){ze(e,e.return,w)}}break;case 6:if(Jt(n,e),bn(e),o&4){if(e.stateNode===null)throw Error(Q(162));i=e.stateNode,s=e.memoizedProps;try{i.nodeValue=s}catch(w){ze(e,e.return,w)}}break;case 3:if(Jt(n,e),bn(e),o&4&&r!==null&&r.memoizedState.isDehydrated)try{na(n.containerInfo)}catch(w){ze(e,e.return,w)}break;case 4:Jt(n,e),bn(e);break;case 13:Jt(n,e),bn(e),i=e.child,i.flags&8192&&(s=i.memoizedState!==null,i.stateNode.isHidden=s,!s||i.alternate!==null&&i.alternate.memoizedState!==null||(km=Fe())),o&4&&yy(e);break;case 22:if(f=r!==null&&r.memoizedState!==null,e.mode&1?(it=(u=it)||f,Jt(n,e),it=u):Jt(n,e),bn(e),o&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!f&&e.mode&1)for(oe=e,f=e.child;f!==null;){for(d=oe=f;oe!==null;){switch(p=oe,g=p.child,p.tag){case 0:case 11:case 14:case 15:Bs(4,p,p.return);break;case 1:hi(p,p.return);var v=p.stateNode;if(typeof v.componentWillUnmount=="function"){o=p,r=p.return;try{n=o,v.props=n.memoizedProps,v.state=n.memoizedState,v.componentWillUnmount()}catch(w){ze(o,r,w)}}break;case 5:hi(p,p.return);break;case 22:if(p.memoizedState!==null){xy(d);continue}}g!==null?(g.return=p,oe=g):xy(d)}f=f.sibling}e:for(f=null,d=e;;){if(d.tag===5){if(f===null){f=d;try{i=d.stateNode,u?(s=i.style,typeof s.setProperty=="function"?s.setProperty("display","none","important"):s.display="none"):(l=d.stateNode,c=d.memoizedProps.style,a=c!=null&&c.hasOwnProperty("display")?c.display:null,l.style.display=Jw("display",a))}catch(w){ze(e,e.return,w)}}}else if(d.tag===6){if(f===null)try{d.stateNode.nodeValue=u?"":d.memoizedProps}catch(w){ze(e,e.return,w)}}else if((d.tag!==22&&d.tag!==23||d.memoizedState===null||d===e)&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===e)break e;for(;d.sibling===null;){if(d.return===null||d.return===e)break e;f===d&&(f=null),d=d.return}f===d&&(f=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:Jt(n,e),bn(e),o&4&&yy(e);break;case 21:break;default:Jt(n,e),bn(e)}}function bn(e){var n=e.flags;if(n&2){try{e:{for(var r=e.return;r!==null;){if(kb(r)){var o=r;break e}r=r.return}throw Error(Q(160))}switch(o.tag){case 5:var i=o.stateNode;o.flags&32&&(Qs(i,""),o.flags&=-33);var s=gy(e);zp(e,s,i);break;case 3:case 4:var a=o.stateNode.containerInfo,l=gy(e);Lp(e,l,a);break;default:throw Error(Q(161))}}catch(c){ze(e,e.return,c)}e.flags&=-3}n&4096&&(e.flags&=-4097)}function YM(e,n,r){oe=e,Pb(e)}function Pb(e,n,r){for(var o=(e.mode&1)!==0;oe!==null;){var i=oe,s=i.child;if(i.tag===22&&o){var a=i.memoizedState!==null||El;if(!a){var l=i.alternate,c=l!==null&&l.memoizedState!==null||it;l=El;var u=it;if(El=a,(it=c)&&!u)for(oe=i;oe!==null;)a=oe,c=a.child,a.tag===22&&a.memoizedState!==null?wy(i):c!==null?(c.return=a,oe=c):wy(i);for(;s!==null;)oe=s,Pb(s),s=s.sibling;oe=i,El=l,it=u}vy(e)}else i.subtreeFlags&8772&&s!==null?(s.return=i,oe=s):vy(e)}}function vy(e){for(;oe!==null;){var n=oe;if(n.flags&8772){var r=n.alternate;try{if(n.flags&8772)switch(n.tag){case 0:case 11:case 15:it||Hu(5,n);break;case 1:var o=n.stateNode;if(n.flags&4&&!it)if(r===null)o.componentDidMount();else{var i=n.elementType===n.type?r.memoizedProps:rn(n.type,r.memoizedProps);o.componentDidUpdate(i,r.memoizedState,o.__reactInternalSnapshotBeforeUpdate)}var s=n.updateQueue;s!==null&&ny(n,s,o);break;case 3:var a=n.updateQueue;if(a!==null){if(r=null,n.child!==null)switch(n.child.tag){case 5:r=n.child.stateNode;break;case 1:r=n.child.stateNode}ny(n,a,r)}break;case 5:var l=n.stateNode;if(r===null&&n.flags&4){r=l;var c=n.memoizedProps;switch(n.type){case"button":case"input":case"select":case"textarea":c.autoFocus&&r.focus();break;case"img":c.src&&(r.src=c.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(n.memoizedState===null){var u=n.alternate;if(u!==null){var f=u.memoizedState;if(f!==null){var d=f.dehydrated;d!==null&&na(d)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(Q(163))}it||n.flags&512&&Dp(n)}catch(p){ze(n,n.return,p)}}if(n===e){oe=null;break}if(r=n.sibling,r!==null){r.return=n.return,oe=r;break}oe=n.return}}function xy(e){for(;oe!==null;){var n=oe;if(n===e){oe=null;break}var r=n.sibling;if(r!==null){r.return=n.return,oe=r;break}oe=n.return}}function wy(e){for(;oe!==null;){var n=oe;try{switch(n.tag){case 0:case 11:case 15:var r=n.return;try{Hu(4,n)}catch(c){ze(n,r,c)}break;case 1:var o=n.stateNode;if(typeof o.componentDidMount=="function"){var i=n.return;try{o.componentDidMount()}catch(c){ze(n,i,c)}}var s=n.return;try{Dp(n)}catch(c){ze(n,s,c)}break;case 5:var a=n.return;try{Dp(n)}catch(c){ze(n,a,c)}}}catch(c){ze(n,n.return,c)}if(n===e){oe=null;break}var l=n.sibling;if(l!==null){l.return=n.return,oe=l;break}oe=n.return}}var XM=Math.ceil,Gc=sr.ReactCurrentDispatcher,Sm=sr.ReactCurrentOwner,Kt=sr.ReactCurrentBatchConfig,we=0,Ke=null,Ve=null,Qe=0,jt=0,mi=Xr(0),Ge=0,pa=null,No=0,Wu=0,Cm=0,Hs=null,gt=null,km=0,$i=1/0,Hn=null,Yc=!1,Fp=null,$r=null,Pl=!1,Pr=null,Xc=0,Ws=0,Vp=null,pc=-1,hc=0;function ut(){return we&6?Fe():pc!==-1?pc:pc=Fe()}function Or(e){return e.mode&1?we&2&&Qe!==0?Qe&-Qe:RM.transition!==null?(hc===0&&(hc=f1()),hc):(e=_e,e!==0||(e=window.event,e=e===void 0?16:x1(e.type)),e):1}function pn(e,n,r,o){if(50<Ws)throw Ws=0,Vp=null,Error(Q(185));Ra(e,r,o),(!(we&2)||e!==Ke)&&(e===Ke&&(!(we&2)&&(Wu|=r),Ge===4&&kr(e,Qe)),bt(e,o),r===1&&we===0&&!(n.mode&1)&&($i=Fe()+500,Fu&&Kr()))}function bt(e,n){var r=e.callbackNode;Rj(e,n);var o=Rc(e,e===Ke?Qe:0);if(o===0)r!==null&&j0(r),e.callbackNode=null,e.callbackPriority=0;else if(n=o&-o,e.callbackPriority!==n){if(r!=null&&j0(r),n===1)e.tag===0?MM(by.bind(null,e)):L1(by.bind(null,e)),NM(function(){!(we&6)&&Kr()}),r=null;else{switch(p1(o)){case 1:r=Zh;break;case 4:r=u1;break;case 16:r=Mc;break;case 536870912:r=d1;break;default:r=Mc}r=Ob(r,jb.bind(null,e))}e.callbackPriority=n,e.callbackNode=r}}function jb(e,n){if(pc=-1,hc=0,we&6)throw Error(Q(327));var r=e.callbackNode;if(Si()&&e.callbackNode!==r)return null;var o=Rc(e,e===Ke?Qe:0);if(o===0)return null;if(o&30||o&e.expiredLanes||n)n=Kc(e,o);else{n=o;var i=we;we|=2;var s=Rb();(Ke!==e||Qe!==n)&&(Hn=null,$i=Fe()+500,vo(e,n));do try{ZM();break}catch(l){Mb(e,l)}while(!0);um(),Gc.current=s,we=i,Ve!==null?n=0:(Ke=null,Qe=0,n=Ge)}if(n!==0){if(n===2&&(i=hp(e),i!==0&&(o=i,n=Bp(e,i))),n===1)throw r=pa,vo(e,0),kr(e,o),bt(e,Fe()),r;if(n===6)kr(e,o);else{if(i=e.current.alternate,!(o&30)&&!KM(i)&&(n=Kc(e,o),n===2&&(s=hp(e),s!==0&&(o=s,n=Bp(e,s))),n===1))throw r=pa,vo(e,0),kr(e,o),bt(e,Fe()),r;switch(e.finishedWork=i,e.finishedLanes=o,n){case 0:case 1:throw Error(Q(345));case 2:uo(e,gt,Hn);break;case 3:if(kr(e,o),(o&130023424)===o&&(n=km+500-Fe(),10<n)){if(Rc(e,0)!==0)break;if(i=e.suspendedLanes,(i&o)!==o){ut(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=_p(uo.bind(null,e,gt,Hn),n);break}uo(e,gt,Hn);break;case 4:if(kr(e,o),(o&4194240)===o)break;for(n=e.eventTimes,i=-1;0<o;){var a=31-fn(o);s=1<<a,a=n[a],a>i&&(i=a),o&=~s}if(o=i,o=Fe()-o,o=(120>o?120:480>o?480:1080>o?1080:1920>o?1920:3e3>o?3e3:4320>o?4320:1960*XM(o/1960))-o,10<o){e.timeoutHandle=_p(uo.bind(null,e,gt,Hn),o);break}uo(e,gt,Hn);break;case 5:uo(e,gt,Hn);break;default:throw Error(Q(329))}}}return bt(e,Fe()),e.callbackNode===r?jb.bind(null,e):null}function Bp(e,n){var r=Hs;return e.current.memoizedState.isDehydrated&&(vo(e,n).flags|=256),e=Kc(e,n),e!==2&&(n=gt,gt=r,n!==null&&Hp(n)),e}function Hp(e){gt===null?gt=e:gt.push.apply(gt,e)}function KM(e){for(var n=e;;){if(n.flags&16384){var r=n.updateQueue;if(r!==null&&(r=r.stores,r!==null))for(var o=0;o<r.length;o++){var i=r[o],s=i.getSnapshot;i=i.value;try{if(!hn(s(),i))return!1}catch{return!1}}}if(r=n.child,n.subtreeFlags&16384&&r!==null)r.return=n,n=r;else{if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return!0;n=n.return}n.sibling.return=n.return,n=n.sibling}}return!0}function kr(e,n){for(n&=~Cm,n&=~Wu,e.suspendedLanes|=n,e.pingedLanes&=~n,e=e.expirationTimes;0<n;){var r=31-fn(n),o=1<<r;e[r]=-1,n&=~o}}function by(e){if(we&6)throw Error(Q(327));Si();var n=Rc(e,0);if(!(n&1))return bt(e,Fe()),null;var r=Kc(e,n);if(e.tag!==0&&r===2){var o=hp(e);o!==0&&(n=o,r=Bp(e,o))}if(r===1)throw r=pa,vo(e,0),kr(e,n),bt(e,Fe()),r;if(r===6)throw Error(Q(345));return e.finishedWork=e.current.alternate,e.finishedLanes=n,uo(e,gt,Hn),bt(e,Fe()),null}function Nm(e,n){var r=we;we|=1;try{return e(n)}finally{we=r,we===0&&($i=Fe()+500,Fu&&Kr())}}function Eo(e){Pr!==null&&Pr.tag===0&&!(we&6)&&Si();var n=we;we|=1;var r=Kt.transition,o=_e;try{if(Kt.transition=null,_e=1,e)return e()}finally{_e=o,Kt.transition=r,we=n,!(we&6)&&Kr()}}function Em(){jt=mi.current,je(mi)}function vo(e,n){e.finishedWork=null,e.finishedLanes=0;var r=e.timeoutHandle;if(r!==-1&&(e.timeoutHandle=-1,kM(r)),Ve!==null)for(r=Ve.return;r!==null;){var o=r;switch(am(o),o.tag){case 1:o=o.type.childContextTypes,o!=null&&Oc();break;case 3:Ti(),je(xt),je(at),gm();break;case 5:mm(o);break;case 4:Ti();break;case 13:je($e);break;case 19:je($e);break;case 10:dm(o.type._context);break;case 22:case 23:Em()}r=r.return}if(Ke=e,Ve=e=Dr(e.current,null),Qe=jt=n,Ge=0,pa=null,Cm=Wu=No=0,gt=Hs=null,ho!==null){for(n=0;n<ho.length;n++)if(r=ho[n],o=r.interleaved,o!==null){r.interleaved=null;var i=o.next,s=r.pending;if(s!==null){var a=s.next;s.next=i,o.next=a}r.pending=o}ho=null}return e}function Mb(e,n){do{var r=Ve;try{if(um(),uc.current=Uc,Wc){for(var o=Oe.memoizedState;o!==null;){var i=o.queue;i!==null&&(i.pending=null),o=o.next}Wc=!1}if(ko=0,Xe=Ue=Oe=null,Vs=!1,ua=0,Sm.current=null,r===null||r.return===null){Ge=1,pa=n,Ve=null;break}e:{var s=e,a=r.return,l=r,c=n;if(n=Qe,l.flags|=32768,c!==null&&typeof c=="object"&&typeof c.then=="function"){var u=c,f=l,d=f.tag;if(!(f.mode&1)&&(d===0||d===11||d===15)){var p=f.alternate;p?(f.updateQueue=p.updateQueue,f.memoizedState=p.memoizedState,f.lanes=p.lanes):(f.updateQueue=null,f.memoizedState=null)}var g=ly(a);if(g!==null){g.flags&=-257,cy(g,a,l,s,n),g.mode&1&&ay(s,u,n),n=g,c=u;var v=n.updateQueue;if(v===null){var w=new Set;w.add(c),n.updateQueue=w}else v.add(c);break e}else{if(!(n&1)){ay(s,u,n),Pm();break e}c=Error(Q(426))}}else if(Re&&l.mode&1){var _=ly(a);if(_!==null){!(_.flags&65536)&&(_.flags|=256),cy(_,a,l,s,n),lm(Ii(c,l));break e}}s=c=Ii(c,l),Ge!==4&&(Ge=2),Hs===null?Hs=[s]:Hs.push(s),s=a;do{switch(s.tag){case 3:s.flags|=65536,n&=-n,s.lanes|=n;var y=pb(s,c,n);ty(s,y);break e;case 1:l=c;var b=s.type,x=s.stateNode;if(!(s.flags&128)&&(typeof b.getDerivedStateFromError=="function"||x!==null&&typeof x.componentDidCatch=="function"&&($r===null||!$r.has(x)))){s.flags|=65536,n&=-n,s.lanes|=n;var S=hb(s,l,n);ty(s,S);break e}}s=s.return}while(s!==null)}Tb(r)}catch(C){n=C,Ve===r&&r!==null&&(Ve=r=r.return);continue}break}while(!0)}function Rb(){var e=Gc.current;return Gc.current=Uc,e===null?Uc:e}function Pm(){(Ge===0||Ge===3||Ge===2)&&(Ge=4),Ke===null||!(No&268435455)&&!(Wu&268435455)||kr(Ke,Qe)}function Kc(e,n){var r=we;we|=2;var o=Rb();(Ke!==e||Qe!==n)&&(Hn=null,vo(e,n));do try{qM();break}catch(i){Mb(e,i)}while(!0);if(um(),we=r,Gc.current=o,Ve!==null)throw Error(Q(261));return Ke=null,Qe=0,Ge}function qM(){for(;Ve!==null;)Ab(Ve)}function ZM(){for(;Ve!==null&&!_j();)Ab(Ve)}function Ab(e){var n=$b(e.alternate,e,jt);e.memoizedProps=e.pendingProps,n===null?Tb(e):Ve=n,Sm.current=null}function Tb(e){var n=e;do{var r=n.alternate;if(e=n.return,n.flags&32768){if(r=WM(r,n),r!==null){r.flags&=32767,Ve=r;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Ge=6,Ve=null;return}}else if(r=HM(r,n,jt),r!==null){Ve=r;return}if(n=n.sibling,n!==null){Ve=n;return}Ve=n=e}while(n!==null);Ge===0&&(Ge=5)}function uo(e,n,r){var o=_e,i=Kt.transition;try{Kt.transition=null,_e=1,QM(e,n,r,o)}finally{Kt.transition=i,_e=o}return null}function QM(e,n,r,o){do Si();while(Pr!==null);if(we&6)throw Error(Q(327));r=e.finishedWork;var i=e.finishedLanes;if(r===null)return null;if(e.finishedWork=null,e.finishedLanes=0,r===e.current)throw Error(Q(177));e.callbackNode=null,e.callbackPriority=0;var s=r.lanes|r.childLanes;if(Aj(e,s),e===Ke&&(Ve=Ke=null,Qe=0),!(r.subtreeFlags&2064)&&!(r.flags&2064)||Pl||(Pl=!0,Ob(Mc,function(){return Si(),null})),s=(r.flags&15990)!==0,r.subtreeFlags&15990||s){s=Kt.transition,Kt.transition=null;var a=_e;_e=1;var l=we;we|=4,Sm.current=null,GM(e,r),Eb(r,e),vM(wp),Ac=!!xp,wp=xp=null,e.current=r,YM(r),Sj(),we=l,_e=a,Kt.transition=s}else e.current=r;if(Pl&&(Pl=!1,Pr=e,Xc=i),s=e.pendingLanes,s===0&&($r=null),Nj(r.stateNode),bt(e,Fe()),n!==null)for(o=e.onRecoverableError,r=0;r<n.length;r++)i=n[r],o(i.value,{componentStack:i.stack,digest:i.digest});if(Yc)throw Yc=!1,e=Fp,Fp=null,e;return Xc&1&&e.tag!==0&&Si(),s=e.pendingLanes,s&1?e===Vp?Ws++:(Ws=0,Vp=e):Ws=0,Kr(),null}function Si(){if(Pr!==null){var e=p1(Xc),n=Kt.transition,r=_e;try{if(Kt.transition=null,_e=16>e?16:e,Pr===null)var o=!1;else{if(e=Pr,Pr=null,Xc=0,we&6)throw Error(Q(331));var i=we;for(we|=4,oe=e.current;oe!==null;){var s=oe,a=s.child;if(oe.flags&16){var l=s.deletions;if(l!==null){for(var c=0;c<l.length;c++){var u=l[c];for(oe=u;oe!==null;){var f=oe;switch(f.tag){case 0:case 11:case 15:Bs(8,f,s)}var d=f.child;if(d!==null)d.return=f,oe=d;else for(;oe!==null;){f=oe;var p=f.sibling,g=f.return;if(Cb(f),f===u){oe=null;break}if(p!==null){p.return=g,oe=p;break}oe=g}}}var v=s.alternate;if(v!==null){var w=v.child;if(w!==null){v.child=null;do{var _=w.sibling;w.sibling=null,w=_}while(w!==null)}}oe=s}}if(s.subtreeFlags&2064&&a!==null)a.return=s,oe=a;else e:for(;oe!==null;){if(s=oe,s.flags&2048)switch(s.tag){case 0:case 11:case 15:Bs(9,s,s.return)}var y=s.sibling;if(y!==null){y.return=s.return,oe=y;break e}oe=s.return}}var b=e.current;for(oe=b;oe!==null;){a=oe;var x=a.child;if(a.subtreeFlags&2064&&x!==null)x.return=a,oe=x;else e:for(a=b;oe!==null;){if(l=oe,l.flags&2048)try{switch(l.tag){case 0:case 11:case 15:Hu(9,l)}}catch(C){ze(l,l.return,C)}if(l===a){oe=null;break e}var S=l.sibling;if(S!==null){S.return=l.return,oe=S;break e}oe=l.return}}if(we=i,Kr(),Pn&&typeof Pn.onPostCommitFiberRoot=="function")try{Pn.onPostCommitFiberRoot($u,e)}catch{}o=!0}return o}finally{_e=r,Kt.transition=n}}return!1}function _y(e,n,r){n=Ii(r,n),n=pb(e,n,1),e=Ir(e,n,1),n=ut(),e!==null&&(Ra(e,1,n),bt(e,n))}function ze(e,n,r){if(e.tag===3)_y(e,e,r);else for(;n!==null;){if(n.tag===3){_y(n,e,r);break}else if(n.tag===1){var o=n.stateNode;if(typeof n.type.getDerivedStateFromError=="function"||typeof o.componentDidCatch=="function"&&($r===null||!$r.has(o))){e=Ii(r,e),e=hb(n,e,1),n=Ir(n,e,1),e=ut(),n!==null&&(Ra(n,1,e),bt(n,e));break}}n=n.return}}function JM(e,n,r){var o=e.pingCache;o!==null&&o.delete(n),n=ut(),e.pingedLanes|=e.suspendedLanes&r,Ke===e&&(Qe&r)===r&&(Ge===4||Ge===3&&(Qe&130023424)===Qe&&500>Fe()-km?vo(e,0):Cm|=r),bt(e,n)}function Ib(e,n){n===0&&(e.mode&1?(n=vl,vl<<=1,!(vl&130023424)&&(vl=4194304)):n=1);var r=ut();e=tr(e,n),e!==null&&(Ra(e,n,r),bt(e,r))}function eR(e){var n=e.memoizedState,r=0;n!==null&&(r=n.retryLane),Ib(e,r)}function tR(e,n){var r=0;switch(e.tag){case 13:var o=e.stateNode,i=e.memoizedState;i!==null&&(r=i.retryLane);break;case 19:o=e.stateNode;break;default:throw Error(Q(314))}o!==null&&o.delete(n),Ib(e,r)}var $b;$b=function(e,n,r){if(e!==null)if(e.memoizedProps!==n.pendingProps||xt.current)yt=!0;else{if(!(e.lanes&r)&&!(n.flags&128))return yt=!1,BM(e,n,r);yt=!!(e.flags&131072)}else yt=!1,Re&&n.flags&1048576&&z1(n,zc,n.index);switch(n.lanes=0,n.tag){case 2:var o=n.type;fc(e,n),e=n.pendingProps;var i=Mi(n,at.current);_i(n,r),i=vm(null,n,o,e,i,r);var s=xm();return n.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(n.tag=1,n.memoizedState=null,n.updateQueue=null,wt(o)?(s=!0,Dc(n)):s=!1,n.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,pm(n),i.updater=Bu,n.stateNode=i,i._reactInternals=n,jp(n,o,e,r),n=Ap(null,n,o,!0,s,r)):(n.tag=0,Re&&s&&sm(n),lt(null,n,i,r),n=n.child),n;case 16:o=n.elementType;e:{switch(fc(e,n),e=n.pendingProps,i=o._init,o=i(o._payload),n.type=o,i=n.tag=rR(o),e=rn(o,e),i){case 0:n=Rp(null,n,o,e,r);break e;case 1:n=fy(null,n,o,e,r);break e;case 11:n=uy(null,n,o,e,r);break e;case 14:n=dy(null,n,o,rn(o.type,e),r);break e}throw Error(Q(306,o,""))}return n;case 0:return o=n.type,i=n.pendingProps,i=n.elementType===o?i:rn(o,i),Rp(e,n,o,i,r);case 1:return o=n.type,i=n.pendingProps,i=n.elementType===o?i:rn(o,i),fy(e,n,o,i,r);case 3:e:{if(vb(n),e===null)throw Error(Q(387));o=n.pendingProps,s=n.memoizedState,i=s.element,U1(e,n),Bc(n,o,null,r);var a=n.memoizedState;if(o=a.element,s.isDehydrated)if(s={element:o,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},n.updateQueue.baseState=s,n.memoizedState=s,n.flags&256){i=Ii(Error(Q(423)),n),n=py(e,n,o,r,i);break e}else if(o!==i){i=Ii(Error(Q(424)),n),n=py(e,n,o,r,i);break e}else for(Rt=Tr(n.stateNode.containerInfo.firstChild),At=n,Re=!0,an=null,r=H1(n,null,o,r),n.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(Ri(),o===i){n=nr(e,n,r);break e}lt(e,n,o,r)}n=n.child}return n;case 5:return G1(n),e===null&&Np(n),o=n.type,i=n.pendingProps,s=e!==null?e.memoizedProps:null,a=i.children,bp(o,i)?a=null:s!==null&&bp(o,s)&&(n.flags|=32),yb(e,n),lt(e,n,a,r),n.child;case 6:return e===null&&Np(n),null;case 13:return xb(e,n,r);case 4:return hm(n,n.stateNode.containerInfo),o=n.pendingProps,e===null?n.child=Ai(n,null,o,r):lt(e,n,o,r),n.child;case 11:return o=n.type,i=n.pendingProps,i=n.elementType===o?i:rn(o,i),uy(e,n,o,i,r);case 7:return lt(e,n,n.pendingProps,r),n.child;case 8:return lt(e,n,n.pendingProps.children,r),n.child;case 12:return lt(e,n,n.pendingProps.children,r),n.child;case 10:e:{if(o=n.type._context,i=n.pendingProps,s=n.memoizedProps,a=i.value,Ce(Fc,o._currentValue),o._currentValue=a,s!==null)if(hn(s.value,a)){if(s.children===i.children&&!xt.current){n=nr(e,n,r);break e}}else for(s=n.child,s!==null&&(s.return=n);s!==null;){var l=s.dependencies;if(l!==null){a=s.child;for(var c=l.firstContext;c!==null;){if(c.context===o){if(s.tag===1){c=qn(-1,r&-r),c.tag=2;var u=s.updateQueue;if(u!==null){u=u.shared;var f=u.pending;f===null?c.next=c:(c.next=f.next,f.next=c),u.pending=c}}s.lanes|=r,c=s.alternate,c!==null&&(c.lanes|=r),Ep(s.return,r,n),l.lanes|=r;break}c=c.next}}else if(s.tag===10)a=s.type===n.type?null:s.child;else if(s.tag===18){if(a=s.return,a===null)throw Error(Q(341));a.lanes|=r,l=a.alternate,l!==null&&(l.lanes|=r),Ep(a,r,n),a=s.sibling}else a=s.child;if(a!==null)a.return=s;else for(a=s;a!==null;){if(a===n){a=null;break}if(s=a.sibling,s!==null){s.return=a.return,a=s;break}a=a.return}s=a}lt(e,n,i.children,r),n=n.child}return n;case 9:return i=n.type,o=n.pendingProps.children,_i(n,r),i=Zt(i),o=o(i),n.flags|=1,lt(e,n,o,r),n.child;case 14:return o=n.type,i=rn(o,n.pendingProps),i=rn(o.type,i),dy(e,n,o,i,r);case 15:return mb(e,n,n.type,n.pendingProps,r);case 17:return o=n.type,i=n.pendingProps,i=n.elementType===o?i:rn(o,i),fc(e,n),n.tag=1,wt(o)?(e=!0,Dc(n)):e=!1,_i(n,r),fb(n,o,i),jp(n,o,i,r),Ap(null,n,o,!0,e,r);case 19:return wb(e,n,r);case 22:return gb(e,n,r)}throw Error(Q(156,n.tag))};function Ob(e,n){return c1(e,n)}function nR(e,n,r,o){this.tag=e,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=n,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=o,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Xt(e,n,r,o){return new nR(e,n,r,o)}function jm(e){return e=e.prototype,!(!e||!e.isReactComponent)}function rR(e){if(typeof e=="function")return jm(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Xh)return 11;if(e===Kh)return 14}return 2}function Dr(e,n){var r=e.alternate;return r===null?(r=Xt(e.tag,n,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=n,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&14680064,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,n=e.dependencies,r.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function mc(e,n,r,o,i,s){var a=2;if(o=e,typeof e=="function")jm(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case ii:return xo(r.children,i,s,n);case Yh:a=8,i|=8;break;case Jf:return e=Xt(12,r,n,i|2),e.elementType=Jf,e.lanes=s,e;case ep:return e=Xt(13,r,n,i),e.elementType=ep,e.lanes=s,e;case tp:return e=Xt(19,r,n,i),e.elementType=tp,e.lanes=s,e;case Gw:return Uu(r,i,s,n);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Ww:a=10;break e;case Uw:a=9;break e;case Xh:a=11;break e;case Kh:a=14;break e;case br:a=16,o=null;break e}throw Error(Q(130,e==null?e:typeof e,""))}return n=Xt(a,r,n,i),n.elementType=e,n.type=o,n.lanes=s,n}function xo(e,n,r,o){return e=Xt(7,e,o,n),e.lanes=r,e}function Uu(e,n,r,o){return e=Xt(22,e,o,n),e.elementType=Gw,e.lanes=r,e.stateNode={isHidden:!1},e}function mf(e,n,r){return e=Xt(6,e,null,n),e.lanes=r,e}function gf(e,n,r){return n=Xt(4,e.children!==null?e.children:[],e.key,n),n.lanes=r,n.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},n}function oR(e,n,r,o,i){this.tag=n,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Kd(0),this.expirationTimes=Kd(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Kd(0),this.identifierPrefix=o,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function Mm(e,n,r,o,i,s,a,l,c){return e=new oR(e,n,r,l,c),n===1?(n=1,s===!0&&(n|=8)):n=0,s=Xt(3,null,null,n),e.current=s,s.stateNode=e,s.memoizedState={element:o,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},pm(s),e}function iR(e,n,r){var o=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:oi,key:o==null?null:""+o,children:e,containerInfo:n,implementation:r}}function Db(e){if(!e)return Br;e=e._reactInternals;e:{if(Do(e)!==e||e.tag!==1)throw Error(Q(170));var n=e;do{switch(n.tag){case 3:n=n.stateNode.context;break e;case 1:if(wt(n.type)){n=n.stateNode.__reactInternalMemoizedMergedChildContext;break e}}n=n.return}while(n!==null);throw Error(Q(171))}if(e.tag===1){var r=e.type;if(wt(r))return D1(e,r,n)}return n}function Lb(e,n,r,o,i,s,a,l,c){return e=Mm(r,o,!0,e,i,s,a,l,c),e.context=Db(null),r=e.current,o=ut(),i=Or(r),s=qn(o,i),s.callback=n??null,Ir(r,s,i),e.current.lanes=i,Ra(e,i,o),bt(e,o),e}function Gu(e,n,r,o){var i=n.current,s=ut(),a=Or(i);return r=Db(r),n.context===null?n.context=r:n.pendingContext=r,n=qn(s,a),n.payload={element:e},o=o===void 0?null:o,o!==null&&(n.callback=o),e=Ir(i,n,a),e!==null&&(pn(e,i,a,s),cc(e,i,a)),a}function qc(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function Sy(e,n){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var r=e.retryLane;e.retryLane=r!==0&&r<n?r:n}}function Rm(e,n){Sy(e,n),(e=e.alternate)&&Sy(e,n)}function sR(){return null}var zb=typeof reportError=="function"?reportError:function(e){console.error(e)};function Am(e){this._internalRoot=e}Yu.prototype.render=Am.prototype.render=function(e){var n=this._internalRoot;if(n===null)throw Error(Q(409));Gu(e,n,null,null)};Yu.prototype.unmount=Am.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var n=e.containerInfo;Eo(function(){Gu(null,e,null,null)}),n[er]=null}};function Yu(e){this._internalRoot=e}Yu.prototype.unstable_scheduleHydration=function(e){if(e){var n=g1();e={blockedOn:null,target:e,priority:n};for(var r=0;r<Cr.length&&n!==0&&n<Cr[r].priority;r++);Cr.splice(r,0,e),r===0&&v1(e)}};function Tm(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Xu(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Cy(){}function aR(e,n,r,o,i){if(i){if(typeof o=="function"){var s=o;o=function(){var u=qc(a);s.call(u)}}var a=Lb(n,o,e,0,null,!1,!1,"",Cy);return e._reactRootContainer=a,e[er]=a.current,ia(e.nodeType===8?e.parentNode:e),Eo(),a}for(;i=e.lastChild;)e.removeChild(i);if(typeof o=="function"){var l=o;o=function(){var u=qc(c);l.call(u)}}var c=Mm(e,0,!1,null,null,!1,!1,"",Cy);return e._reactRootContainer=c,e[er]=c.current,ia(e.nodeType===8?e.parentNode:e),Eo(function(){Gu(n,c,r,o)}),c}function Ku(e,n,r,o,i){var s=r._reactRootContainer;if(s){var a=s;if(typeof i=="function"){var l=i;i=function(){var c=qc(a);l.call(c)}}Gu(n,a,e,i)}else a=aR(r,n,e,i,o);return qc(a)}h1=function(e){switch(e.tag){case 3:var n=e.stateNode;if(n.current.memoizedState.isDehydrated){var r=Ps(n.pendingLanes);r!==0&&(Qh(n,r|1),bt(n,Fe()),!(we&6)&&($i=Fe()+500,Kr()))}break;case 13:Eo(function(){var o=tr(e,1);if(o!==null){var i=ut();pn(o,e,1,i)}}),Rm(e,1)}};Jh=function(e){if(e.tag===13){var n=tr(e,134217728);if(n!==null){var r=ut();pn(n,e,134217728,r)}Rm(e,134217728)}};m1=function(e){if(e.tag===13){var n=Or(e),r=tr(e,n);if(r!==null){var o=ut();pn(r,e,n,o)}Rm(e,n)}};g1=function(){return _e};y1=function(e,n){var r=_e;try{return _e=e,n()}finally{_e=r}};dp=function(e,n,r){switch(n){case"input":if(op(e,r),n=r.name,r.type==="radio"&&n!=null){for(r=e;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll("input[name="+JSON.stringify(""+n)+'][type="radio"]'),n=0;n<r.length;n++){var o=r[n];if(o!==e&&o.form===e.form){var i=zu(o);if(!i)throw Error(Q(90));Xw(o),op(o,i)}}}break;case"textarea":qw(e,r);break;case"select":n=r.value,n!=null&&vi(e,!!r.multiple,n,!1)}};r1=Nm;o1=Eo;var lR={usingClientEntryPoint:!1,Events:[Ta,ci,zu,t1,n1,Nm]},hs={findFiberByHostInstance:po,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},cR={bundleType:hs.bundleType,version:hs.version,rendererPackageName:hs.rendererPackageName,rendererConfig:hs.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:sr.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=a1(e),e===null?null:e.stateNode},findFiberByHostInstance:hs.findFiberByHostInstance||sR,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var jl=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!jl.isDisabled&&jl.supportsFiber)try{$u=jl.inject(cR),Pn=jl}catch{}}Dt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=lR;Dt.createPortal=function(e,n){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Tm(n))throw Error(Q(200));return iR(e,n,null,r)};Dt.createRoot=function(e,n){if(!Tm(e))throw Error(Q(299));var r=!1,o="",i=zb;return n!=null&&(n.unstable_strictMode===!0&&(r=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onRecoverableError!==void 0&&(i=n.onRecoverableError)),n=Mm(e,1,!1,null,null,r,!1,o,i),e[er]=n.current,ia(e.nodeType===8?e.parentNode:e),new Am(n)};Dt.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var n=e._reactInternals;if(n===void 0)throw typeof e.render=="function"?Error(Q(188)):(e=Object.keys(e).join(","),Error(Q(268,e)));return e=a1(n),e=e===null?null:e.stateNode,e};Dt.flushSync=function(e){return Eo(e)};Dt.hydrate=function(e,n,r){if(!Xu(n))throw Error(Q(200));return Ku(null,e,n,!0,r)};Dt.hydrateRoot=function(e,n,r){if(!Tm(e))throw Error(Q(405));var o=r!=null&&r.hydratedSources||null,i=!1,s="",a=zb;if(r!=null&&(r.unstable_strictMode===!0&&(i=!0),r.identifierPrefix!==void 0&&(s=r.identifierPrefix),r.onRecoverableError!==void 0&&(a=r.onRecoverableError)),n=Lb(n,null,e,1,r??null,i,!1,s,a),e[er]=n.current,ia(e),o)for(e=0;e<o.length;e++)r=o[e],i=r._getVersion,i=i(r._source),n.mutableSourceEagerHydrationData==null?n.mutableSourceEagerHydrationData=[r,i]:n.mutableSourceEagerHydrationData.push(r,i);return new Yu(n)};Dt.render=function(e,n,r){if(!Xu(n))throw Error(Q(200));return Ku(null,e,n,!1,r)};Dt.unmountComponentAtNode=function(e){if(!Xu(e))throw Error(Q(40));return e._reactRootContainer?(Eo(function(){Ku(null,null,e,!1,function(){e._reactRootContainer=null,e[er]=null})}),!0):!1};Dt.unstable_batchedUpdates=Nm;Dt.unstable_renderSubtreeIntoContainer=function(e,n,r,o){if(!Xu(r))throw Error(Q(200));if(e==null||e._reactInternals===void 0)throw Error(Q(38));return Ku(e,n,r,!1,o)};Dt.version="18.3.1-next-f1338f8080-20240426";function Fb(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Fb)}catch(e){console.error(e)}}Fb(),Fw.exports=Dt;var Lo=Fw.exports;const uR=Au(Lo);var ky=Lo;Zf.createRoot=ky.createRoot,Zf.hydrateRoot=ky.hydrateRoot;/**
41
- * @remix-run/router v1.23.2
42
- *
43
- * Copyright (c) Remix Software Inc.
44
- *
45
- * This source code is licensed under the MIT license found in the
46
- * LICENSE.md file in the root directory of this source tree.
47
- *
48
- * @license MIT
49
- */function ha(){return ha=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var r=arguments[n];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},ha.apply(this,arguments)}var jr;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(jr||(jr={}));const Ny="popstate";function dR(e){e===void 0&&(e={});function n(o,i){let{pathname:s,search:a,hash:l}=o.location;return Wp("",{pathname:s,search:a,hash:l},i.state&&i.state.usr||null,i.state&&i.state.key||"default")}function r(o,i){return typeof i=="string"?i:Zc(i)}return pR(n,r,null,e)}function De(e,n){if(e===!1||e===null||typeof e>"u")throw new Error(n)}function Im(e,n){if(!e){typeof console<"u"&&console.warn(n);try{throw new Error(n)}catch{}}}function fR(){return Math.random().toString(36).substr(2,8)}function Ey(e,n){return{usr:e.state,key:e.key,idx:n}}function Wp(e,n,r,o){return r===void 0&&(r=null),ha({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof n=="string"?Ji(n):n,{state:r,key:n&&n.key||o||fR()})}function Zc(e){let{pathname:n="/",search:r="",hash:o=""}=e;return r&&r!=="?"&&(n+=r.charAt(0)==="?"?r:"?"+r),o&&o!=="#"&&(n+=o.charAt(0)==="#"?o:"#"+o),n}function Ji(e){let n={};if(e){let r=e.indexOf("#");r>=0&&(n.hash=e.substr(r),e=e.substr(0,r));let o=e.indexOf("?");o>=0&&(n.search=e.substr(o),e=e.substr(0,o)),e&&(n.pathname=e)}return n}function pR(e,n,r,o){o===void 0&&(o={});let{window:i=document.defaultView,v5Compat:s=!1}=o,a=i.history,l=jr.Pop,c=null,u=f();u==null&&(u=0,a.replaceState(ha({},a.state,{idx:u}),""));function f(){return(a.state||{idx:null}).idx}function d(){l=jr.Pop;let _=f(),y=_==null?null:_-u;u=_,c&&c({action:l,location:w.location,delta:y})}function p(_,y){l=jr.Push;let b=Wp(w.location,_,y);u=f()+1;let x=Ey(b,u),S=w.createHref(b);try{a.pushState(x,"",S)}catch(C){if(C instanceof DOMException&&C.name==="DataCloneError")throw C;i.location.assign(S)}s&&c&&c({action:l,location:w.location,delta:1})}function g(_,y){l=jr.Replace;let b=Wp(w.location,_,y);u=f();let x=Ey(b,u),S=w.createHref(b);a.replaceState(x,"",S),s&&c&&c({action:l,location:w.location,delta:0})}function v(_){let y=i.location.origin!=="null"?i.location.origin:i.location.href,b=typeof _=="string"?_:Zc(_);return b=b.replace(/ $/,"%20"),De(y,"No window.location.(origin|href) available to create URL for href: "+b),new URL(b,y)}let w={get action(){return l},get location(){return e(i,a)},listen(_){if(c)throw new Error("A history only accepts one active listener");return i.addEventListener(Ny,d),c=_,()=>{i.removeEventListener(Ny,d),c=null}},createHref(_){return n(i,_)},createURL:v,encodeLocation(_){let y=v(_);return{pathname:y.pathname,search:y.search,hash:y.hash}},push:p,replace:g,go(_){return a.go(_)}};return w}var Py;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(Py||(Py={}));function hR(e,n,r){return r===void 0&&(r="/"),mR(e,n,r)}function mR(e,n,r,o){let i=typeof n=="string"?Ji(n):n,s=Oi(i.pathname||"/",r);if(s==null)return null;let a=Vb(e);gR(a);let l=null;for(let c=0;l==null&&c<a.length;++c){let u=ER(s);l=kR(a[c],u)}return l}function Vb(e,n,r,o){n===void 0&&(n=[]),r===void 0&&(r=[]),o===void 0&&(o="");let i=(s,a,l)=>{let c={relativePath:l===void 0?s.path||"":l,caseSensitive:s.caseSensitive===!0,childrenIndex:a,route:s};c.relativePath.startsWith("/")&&(De(c.relativePath.startsWith(o),'Absolute route path "'+c.relativePath+'" nested under path '+('"'+o+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),c.relativePath=c.relativePath.slice(o.length));let u=Lr([o,c.relativePath]),f=r.concat(c);s.children&&s.children.length>0&&(De(s.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),Vb(s.children,n,f,u)),!(s.path==null&&!s.index)&&n.push({path:u,score:SR(u,s.index),routesMeta:f})};return e.forEach((s,a)=>{var l;if(s.path===""||!((l=s.path)!=null&&l.includes("?")))i(s,a);else for(let c of Bb(s.path))i(s,a,c)}),n}function Bb(e){let n=e.split("/");if(n.length===0)return[];let[r,...o]=n,i=r.endsWith("?"),s=r.replace(/\?$/,"");if(o.length===0)return i?[s,""]:[s];let a=Bb(o.join("/")),l=[];return l.push(...a.map(c=>c===""?s:[s,c].join("/"))),i&&l.push(...a),l.map(c=>e.startsWith("/")&&c===""?"/":c)}function gR(e){e.sort((n,r)=>n.score!==r.score?r.score-n.score:CR(n.routesMeta.map(o=>o.childrenIndex),r.routesMeta.map(o=>o.childrenIndex)))}const yR=/^:[\w-]+$/,vR=3,xR=2,wR=1,bR=10,_R=-2,jy=e=>e==="*";function SR(e,n){let r=e.split("/"),o=r.length;return r.some(jy)&&(o+=_R),n&&(o+=xR),r.filter(i=>!jy(i)).reduce((i,s)=>i+(yR.test(s)?vR:s===""?wR:bR),o)}function CR(e,n){return e.length===n.length&&e.slice(0,-1).every((o,i)=>o===n[i])?e[e.length-1]-n[n.length-1]:0}function kR(e,n,r){let{routesMeta:o}=e,i={},s="/",a=[];for(let l=0;l<o.length;++l){let c=o[l],u=l===o.length-1,f=s==="/"?n:n.slice(s.length)||"/",d=Up({path:c.relativePath,caseSensitive:c.caseSensitive,end:u},f),p=c.route;if(!d)return null;Object.assign(i,d.params),a.push({params:i,pathname:Lr([s,d.pathname]),pathnameBase:AR(Lr([s,d.pathnameBase])),route:p}),d.pathnameBase!=="/"&&(s=Lr([s,d.pathnameBase]))}return a}function Up(e,n){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,o]=NR(e.path,e.caseSensitive,e.end),i=n.match(r);if(!i)return null;let s=i[0],a=s.replace(/(.)\/+$/,"$1"),l=i.slice(1);return{params:o.reduce((u,f,d)=>{let{paramName:p,isOptional:g}=f;if(p==="*"){let w=l[d]||"";a=s.slice(0,s.length-w.length).replace(/(.)\/+$/,"$1")}const v=l[d];return g&&!v?u[p]=void 0:u[p]=(v||"").replace(/%2F/g,"/"),u},{}),pathname:s,pathnameBase:a,pattern:e}}function NR(e,n,r){n===void 0&&(n=!1),r===void 0&&(r=!0),Im(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let o=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(a,l,c)=>(o.push({paramName:l,isOptional:c!=null}),c?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(o.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,n?void 0:"i"),o]}function ER(e){try{return e.split("/").map(n=>decodeURIComponent(n).replace(/\//g,"%2F")).join("/")}catch(n){return Im(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+n+").")),e}}function Oi(e,n){if(n==="/")return e;if(!e.toLowerCase().startsWith(n.toLowerCase()))return null;let r=n.endsWith("/")?n.length-1:n.length,o=e.charAt(r);return o&&o!=="/"?null:e.slice(r)||"/"}const PR=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,jR=e=>PR.test(e);function MR(e,n){n===void 0&&(n="/");let{pathname:r,search:o="",hash:i=""}=typeof e=="string"?Ji(e):e,s;if(r)if(jR(r))s=r;else{if(r.includes("//")){let a=r;r=r.replace(/\/\/+/g,"/"),Im(!1,"Pathnames cannot have embedded double slashes - normalizing "+(a+" -> "+r))}r.startsWith("/")?s=My(r.substring(1),"/"):s=My(r,n)}else s=n;return{pathname:s,search:TR(o),hash:IR(i)}}function My(e,n){let r=n.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?r.length>1&&r.pop():i!=="."&&r.push(i)}),r.length>1?r.join("/"):"/"}function yf(e,n,r,o){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+n+"` field ["+JSON.stringify(o)+"]. Please separate it out to the ")+("`to."+r+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function RR(e){return e.filter((n,r)=>r===0||n.route.path&&n.route.path.length>0)}function $m(e,n){let r=RR(e);return n?r.map((o,i)=>i===r.length-1?o.pathname:o.pathnameBase):r.map(o=>o.pathnameBase)}function Om(e,n,r,o){o===void 0&&(o=!1);let i;typeof e=="string"?i=Ji(e):(i=ha({},e),De(!i.pathname||!i.pathname.includes("?"),yf("?","pathname","search",i)),De(!i.pathname||!i.pathname.includes("#"),yf("#","pathname","hash",i)),De(!i.search||!i.search.includes("#"),yf("#","search","hash",i)));let s=e===""||i.pathname==="",a=s?"/":i.pathname,l;if(a==null)l=r;else{let d=n.length-1;if(!o&&a.startsWith("..")){let p=a.split("/");for(;p[0]==="..";)p.shift(),d-=1;i.pathname=p.join("/")}l=d>=0?n[d]:"/"}let c=MR(i,l),u=a&&a!=="/"&&a.endsWith("/"),f=(s||a===".")&&r.endsWith("/");return!c.pathname.endsWith("/")&&(u||f)&&(c.pathname+="/"),c}const Lr=e=>e.join("/").replace(/\/\/+/g,"/"),AR=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),TR=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,IR=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function $R(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const Hb=["post","put","patch","delete"];new Set(Hb);const OR=["get",...Hb];new Set(OR);/**
50
- * React Router v6.30.3
51
- *
52
- * Copyright (c) Remix Software Inc.
53
- *
54
- * This source code is licensed under the MIT license found in the
55
- * LICENSE.md file in the root directory of this source tree.
56
- *
57
- * @license MIT
58
- */function ma(){return ma=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var r=arguments[n];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},ma.apply(this,arguments)}const qu=h.createContext(null),Wb=h.createContext(null),ar=h.createContext(null),Zu=h.createContext(null),qr=h.createContext({outlet:null,matches:[],isDataRoute:!1}),Ub=h.createContext(null);function DR(e,n){let{relative:r}=n===void 0?{}:n;es()||De(!1);let{basename:o,navigator:i}=h.useContext(ar),{hash:s,pathname:a,search:l}=Qu(e,{relative:r}),c=a;return o!=="/"&&(c=a==="/"?o:Lr([o,a])),i.createHref({pathname:c,search:l,hash:s})}function es(){return h.useContext(Zu)!=null}function ts(){return es()||De(!1),h.useContext(Zu).location}function Gb(e){h.useContext(ar).static||h.useLayoutEffect(e)}function Yb(){let{isDataRoute:e}=h.useContext(qr);return e?qR():LR()}function LR(){es()||De(!1);let e=h.useContext(qu),{basename:n,future:r,navigator:o}=h.useContext(ar),{matches:i}=h.useContext(qr),{pathname:s}=ts(),a=JSON.stringify($m(i,r.v7_relativeSplatPath)),l=h.useRef(!1);return Gb(()=>{l.current=!0}),h.useCallback(function(u,f){if(f===void 0&&(f={}),!l.current)return;if(typeof u=="number"){o.go(u);return}let d=Om(u,JSON.parse(a),s,f.relative==="path");e==null&&n!=="/"&&(d.pathname=d.pathname==="/"?n:Lr([n,d.pathname])),(f.replace?o.replace:o.push)(d,f.state,f)},[n,o,a,s,e])}function Qu(e,n){let{relative:r}=n===void 0?{}:n,{future:o}=h.useContext(ar),{matches:i}=h.useContext(qr),{pathname:s}=ts(),a=JSON.stringify($m(i,o.v7_relativeSplatPath));return h.useMemo(()=>Om(e,JSON.parse(a),s,r==="path"),[e,a,s,r])}function zR(e,n){return FR(e,n)}function FR(e,n,r,o){es()||De(!1);let{navigator:i}=h.useContext(ar),{matches:s}=h.useContext(qr),a=s[s.length-1],l=a?a.params:{};a&&a.pathname;let c=a?a.pathnameBase:"/";a&&a.route;let u=ts(),f;if(n){var d;let _=typeof n=="string"?Ji(n):n;c==="/"||(d=_.pathname)!=null&&d.startsWith(c)||De(!1),f=_}else f=u;let p=f.pathname||"/",g=p;if(c!=="/"){let _=c.replace(/^\//,"").split("/");g="/"+p.replace(/^\//,"").split("/").slice(_.length).join("/")}let v=hR(e,{pathname:g}),w=UR(v&&v.map(_=>Object.assign({},_,{params:Object.assign({},l,_.params),pathname:Lr([c,i.encodeLocation?i.encodeLocation(_.pathname).pathname:_.pathname]),pathnameBase:_.pathnameBase==="/"?c:Lr([c,i.encodeLocation?i.encodeLocation(_.pathnameBase).pathname:_.pathnameBase])})),s,r,o);return n&&w?h.createElement(Zu.Provider,{value:{location:ma({pathname:"/",search:"",hash:"",state:null,key:"default"},f),navigationType:jr.Pop}},w):w}function VR(){let e=KR(),n=$R(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return h.createElement(h.Fragment,null,h.createElement("h2",null,"Unexpected Application Error!"),h.createElement("h3",{style:{fontStyle:"italic"}},n),r?h.createElement("pre",{style:i},r):null,null)}const BR=h.createElement(VR,null);class HR extends h.Component{constructor(n){super(n),this.state={location:n.location,revalidation:n.revalidation,error:n.error}}static getDerivedStateFromError(n){return{error:n}}static getDerivedStateFromProps(n,r){return r.location!==n.location||r.revalidation!=="idle"&&n.revalidation==="idle"?{error:n.error,location:n.location,revalidation:n.revalidation}:{error:n.error!==void 0?n.error:r.error,location:r.location,revalidation:n.revalidation||r.revalidation}}componentDidCatch(n,r){console.error("React Router caught the following error during render",n,r)}render(){return this.state.error!==void 0?h.createElement(qr.Provider,{value:this.props.routeContext},h.createElement(Ub.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function WR(e){let{routeContext:n,match:r,children:o}=e,i=h.useContext(qu);return i&&i.static&&i.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=r.route.id),h.createElement(qr.Provider,{value:n},o)}function UR(e,n,r,o){var i;if(n===void 0&&(n=[]),r===void 0&&(r=null),o===void 0&&(o=null),e==null){var s;if(!r)return null;if(r.errors)e=r.matches;else if((s=o)!=null&&s.v7_partialHydration&&n.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let a=e,l=(i=r)==null?void 0:i.errors;if(l!=null){let f=a.findIndex(d=>d.route.id&&(l==null?void 0:l[d.route.id])!==void 0);f>=0||De(!1),a=a.slice(0,Math.min(a.length,f+1))}let c=!1,u=-1;if(r&&o&&o.v7_partialHydration)for(let f=0;f<a.length;f++){let d=a[f];if((d.route.HydrateFallback||d.route.hydrateFallbackElement)&&(u=f),d.route.id){let{loaderData:p,errors:g}=r,v=d.route.loader&&p[d.route.id]===void 0&&(!g||g[d.route.id]===void 0);if(d.route.lazy||v){c=!0,u>=0?a=a.slice(0,u+1):a=[a[0]];break}}}return a.reduceRight((f,d,p)=>{let g,v=!1,w=null,_=null;r&&(g=l&&d.route.id?l[d.route.id]:void 0,w=d.route.errorElement||BR,c&&(u<0&&p===0?(ZR("route-fallback"),v=!0,_=null):u===p&&(v=!0,_=d.route.hydrateFallbackElement||null)));let y=n.concat(a.slice(0,p+1)),b=()=>{let x;return g?x=w:v?x=_:d.route.Component?x=h.createElement(d.route.Component,null):d.route.element?x=d.route.element:x=f,h.createElement(WR,{match:d,routeContext:{outlet:f,matches:y,isDataRoute:r!=null},children:x})};return r&&(d.route.ErrorBoundary||d.route.errorElement||p===0)?h.createElement(HR,{location:r.location,revalidation:r.revalidation,component:w,error:g,children:b(),routeContext:{outlet:null,matches:y,isDataRoute:!0}}):b()},null)}var Xb=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(Xb||{}),Kb=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(Kb||{});function GR(e){let n=h.useContext(qu);return n||De(!1),n}function YR(e){let n=h.useContext(Wb);return n||De(!1),n}function XR(e){let n=h.useContext(qr);return n||De(!1),n}function qb(e){let n=XR(),r=n.matches[n.matches.length-1];return r.route.id||De(!1),r.route.id}function KR(){var e;let n=h.useContext(Ub),r=YR(),o=qb();return n!==void 0?n:(e=r.errors)==null?void 0:e[o]}function qR(){let{router:e}=GR(Xb.UseNavigateStable),n=qb(Kb.UseNavigateStable),r=h.useRef(!1);return Gb(()=>{r.current=!0}),h.useCallback(function(i,s){s===void 0&&(s={}),r.current&&(typeof i=="number"?e.navigate(i):e.navigate(i,ma({fromRouteId:n},s)))},[e,n])}const Ry={};function ZR(e,n,r){Ry[e]||(Ry[e]=!0)}function QR(e,n){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function JR(e){let{to:n,replace:r,state:o,relative:i}=e;es()||De(!1);let{future:s,static:a}=h.useContext(ar),{matches:l}=h.useContext(qr),{pathname:c}=ts(),u=Yb(),f=Om(n,$m(l,s.v7_relativeSplatPath),c,i==="path"),d=JSON.stringify(f);return h.useEffect(()=>u(JSON.parse(d),{replace:r,state:o,relative:i}),[u,d,i,r,o]),null}function Bn(e){De(!1)}function e3(e){let{basename:n="/",children:r=null,location:o,navigationType:i=jr.Pop,navigator:s,static:a=!1,future:l}=e;es()&&De(!1);let c=n.replace(/^\/*/,"/"),u=h.useMemo(()=>({basename:c,navigator:s,static:a,future:ma({v7_relativeSplatPath:!1},l)}),[c,l,s,a]);typeof o=="string"&&(o=Ji(o));let{pathname:f="/",search:d="",hash:p="",state:g=null,key:v="default"}=o,w=h.useMemo(()=>{let _=Oi(f,c);return _==null?null:{location:{pathname:_,search:d,hash:p,state:g,key:v},navigationType:i}},[c,f,d,p,g,v,i]);return w==null?null:h.createElement(ar.Provider,{value:u},h.createElement(Zu.Provider,{children:r,value:w}))}function t3(e){let{children:n,location:r}=e;return zR(Gp(n),r)}new Promise(()=>{});function Gp(e,n){n===void 0&&(n=[]);let r=[];return h.Children.forEach(e,(o,i)=>{if(!h.isValidElement(o))return;let s=[...n,i];if(o.type===h.Fragment){r.push.apply(r,Gp(o.props.children,s));return}o.type!==Bn&&De(!1),!o.props.index||!o.props.children||De(!1);let a={id:o.props.id||s.join("-"),caseSensitive:o.props.caseSensitive,element:o.props.element,Component:o.props.Component,index:o.props.index,path:o.props.path,loader:o.props.loader,action:o.props.action,errorElement:o.props.errorElement,ErrorBoundary:o.props.ErrorBoundary,hasErrorBoundary:o.props.ErrorBoundary!=null||o.props.errorElement!=null,shouldRevalidate:o.props.shouldRevalidate,handle:o.props.handle,lazy:o.props.lazy};o.props.children&&(a.children=Gp(o.props.children,s)),r.push(a)}),r}/**
59
- * React Router DOM v6.30.3
60
- *
61
- * Copyright (c) Remix Software Inc.
62
- *
63
- * This source code is licensed under the MIT license found in the
64
- * LICENSE.md file in the root directory of this source tree.
65
- *
66
- * @license MIT
67
- */function Qc(){return Qc=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var r=arguments[n];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},Qc.apply(this,arguments)}function Zb(e,n){if(e==null)return{};var r={},o=Object.keys(e),i,s;for(s=0;s<o.length;s++)i=o[s],!(n.indexOf(i)>=0)&&(r[i]=e[i]);return r}function n3(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function r3(e,n){return e.button===0&&(!n||n==="_self")&&!n3(e)}const o3=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],i3=["aria-current","caseSensitive","className","end","style","to","viewTransition","children"],s3="6";try{window.__reactRouterVersion=s3}catch{}const a3=h.createContext({isTransitioning:!1}),l3="startTransition",Ay=Iu[l3];function c3(e){let{basename:n,children:r,future:o,window:i}=e,s=h.useRef();s.current==null&&(s.current=dR({window:i,v5Compat:!0}));let a=s.current,[l,c]=h.useState({action:a.action,location:a.location}),{v7_startTransition:u}=o||{},f=h.useCallback(d=>{u&&Ay?Ay(()=>c(d)):c(d)},[c,u]);return h.useLayoutEffect(()=>a.listen(f),[a,f]),h.useEffect(()=>QR(o),[o]),h.createElement(e3,{basename:n,children:r,location:l.location,navigationType:l.action,navigator:a,future:o})}const u3=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",d3=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,f3=h.forwardRef(function(n,r){let{onClick:o,relative:i,reloadDocument:s,replace:a,state:l,target:c,to:u,preventScrollReset:f,viewTransition:d}=n,p=Zb(n,o3),{basename:g}=h.useContext(ar),v,w=!1;if(typeof u=="string"&&d3.test(u)&&(v=u,u3))try{let x=new URL(window.location.href),S=u.startsWith("//")?new URL(x.protocol+u):new URL(u),C=Oi(S.pathname,g);S.origin===x.origin&&C!=null?u=C+S.search+S.hash:w=!0}catch{}let _=DR(u,{relative:i}),y=m3(u,{replace:a,state:l,target:c,preventScrollReset:f,relative:i,viewTransition:d});function b(x){o&&o(x),x.defaultPrevented||y(x)}return h.createElement("a",Qc({},p,{href:v||_,onClick:w||s?o:b,ref:r,target:c}))}),p3=h.forwardRef(function(n,r){let{"aria-current":o="page",caseSensitive:i=!1,className:s="",end:a=!1,style:l,to:c,viewTransition:u,children:f}=n,d=Zb(n,i3),p=Qu(c,{relative:d.relative}),g=ts(),v=h.useContext(Wb),{navigator:w,basename:_}=h.useContext(ar),y=v!=null&&g3(p)&&u===!0,b=w.encodeLocation?w.encodeLocation(p).pathname:p.pathname,x=g.pathname,S=v&&v.navigation&&v.navigation.location?v.navigation.location.pathname:null;i||(x=x.toLowerCase(),S=S?S.toLowerCase():null,b=b.toLowerCase()),S&&_&&(S=Oi(S,_)||S);const C=b!=="/"&&b.endsWith("/")?b.length-1:b.length;let k=x===b||!a&&x.startsWith(b)&&x.charAt(C)==="/",N=S!=null&&(S===b||!a&&S.startsWith(b)&&S.charAt(b.length)==="/"),E={isActive:k,isPending:N,isTransitioning:y},P=k?o:void 0,T;typeof s=="function"?T=s(E):T=[s,k?"active":null,N?"pending":null,y?"transitioning":null].filter(Boolean).join(" ");let A=typeof l=="function"?l(E):l;return h.createElement(f3,Qc({},d,{"aria-current":P,className:T,ref:r,style:A,to:c,viewTransition:u}),typeof f=="function"?f(E):f)});var Yp;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(Yp||(Yp={}));var Ty;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(Ty||(Ty={}));function h3(e){let n=h.useContext(qu);return n||De(!1),n}function m3(e,n){let{target:r,replace:o,state:i,preventScrollReset:s,relative:a,viewTransition:l}=n===void 0?{}:n,c=Yb(),u=ts(),f=Qu(e,{relative:a});return h.useCallback(d=>{if(r3(d,r)){d.preventDefault();let p=o!==void 0?o:Zc(u)===Zc(f);c(e,{replace:p,state:i,preventScrollReset:s,relative:a,viewTransition:l})}},[u,c,f,o,i,r,e,s,a,l])}function g3(e,n){n===void 0&&(n={});let r=h.useContext(a3);r==null&&De(!1);let{basename:o}=h3(Yp.useViewTransitionState),i=Qu(e,{relative:n.relative});if(!r.isTransitioning)return!1;let s=Oi(r.currentLocation.pathname,o)||r.currentLocation.pathname,a=Oi(r.nextLocation.pathname,o)||r.nextLocation.pathname;return Up(i.pathname,a)!=null||Up(i.pathname,s)!=null}const Qb=h.createContext({theme:"system",resolvedTheme:"light",setTheme:()=>{}});function y3(){return h.useContext(Qb)}function v3(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function Iy(e){return e==="system"?v3():e}function x3({children:e}){const[n,r]=h.useState(()=>localStorage.getItem("launchpod-theme")||"system"),[o,i]=h.useState(()=>Iy(localStorage.getItem("launchpod-theme")||"system")),s=h.useCallback(l=>{const c=Iy(l);i(c),document.documentElement.classList.toggle("dark",c==="dark")},[]),a=h.useCallback(l=>{r(l),localStorage.setItem("launchpod-theme",l),s(l)},[s]);return h.useEffect(()=>{s(n);const l=window.matchMedia("(prefers-color-scheme: dark)"),c=()=>{n==="system"&&s("system")};return l.addEventListener("change",c),()=>l.removeEventListener("change",c)},[n,s]),m.jsx(Qb.Provider,{value:{theme:n,resolvedTheme:o,setTheme:a},children:e})}function Jb(e){var n,r,o="";if(typeof e=="string"||typeof e=="number")o+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(n=0;n<i;n++)e[n]&&(r=Jb(e[n]))&&(o&&(o+=" "),o+=r)}else for(r in e)e[r]&&(o&&(o+=" "),o+=r);return o}function e_(){for(var e,n,r=0,o="",i=arguments.length;r<i;r++)(e=arguments[r])&&(n=Jb(e))&&(o&&(o+=" "),o+=n);return o}const w3=(e,n)=>{const r=new Array(e.length+n.length);for(let o=0;o<e.length;o++)r[o]=e[o];for(let o=0;o<n.length;o++)r[e.length+o]=n[o];return r},b3=(e,n)=>({classGroupId:e,validator:n}),t_=(e=new Map,n=null,r)=>({nextPart:e,validators:n,classGroupId:r}),Jc="-",$y=[],_3="arbitrary..",S3=e=>{const n=k3(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:a=>{if(a.startsWith("[")&&a.endsWith("]"))return C3(a);const l=a.split(Jc),c=l[0]===""&&l.length>1?1:0;return n_(l,c,n)},getConflictingClassGroupIds:(a,l)=>{if(l){const c=o[a],u=r[a];return c?u?w3(u,c):c:u||$y}return r[a]||$y}}},n_=(e,n,r)=>{if(e.length-n===0)return r.classGroupId;const i=e[n],s=r.nextPart.get(i);if(s){const u=n_(e,n+1,s);if(u)return u}const a=r.validators;if(a===null)return;const l=n===0?e.join(Jc):e.slice(n).join(Jc),c=a.length;for(let u=0;u<c;u++){const f=a[u];if(f.validator(l))return f.classGroupId}},C3=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const n=e.slice(1,-1),r=n.indexOf(":"),o=n.slice(0,r);return o?_3+o:void 0})(),k3=e=>{const{theme:n,classGroups:r}=e;return N3(r,n)},N3=(e,n)=>{const r=t_();for(const o in e){const i=e[o];Dm(i,r,o,n)}return r},Dm=(e,n,r,o)=>{const i=e.length;for(let s=0;s<i;s++){const a=e[s];E3(a,n,r,o)}},E3=(e,n,r,o)=>{if(typeof e=="string"){P3(e,n,r);return}if(typeof e=="function"){j3(e,n,r,o);return}M3(e,n,r,o)},P3=(e,n,r)=>{const o=e===""?n:r_(n,e);o.classGroupId=r},j3=(e,n,r,o)=>{if(R3(e)){Dm(e(o),n,r,o);return}n.validators===null&&(n.validators=[]),n.validators.push(b3(r,e))},M3=(e,n,r,o)=>{const i=Object.entries(e),s=i.length;for(let a=0;a<s;a++){const[l,c]=i[a];Dm(c,r_(n,l),r,o)}},r_=(e,n)=>{let r=e;const o=n.split(Jc),i=o.length;for(let s=0;s<i;s++){const a=o[s];let l=r.nextPart.get(a);l||(l=t_(),r.nextPart.set(a,l)),r=l}return r},R3=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,A3=e=>{if(e<1)return{get:()=>{},set:()=>{}};let n=0,r=Object.create(null),o=Object.create(null);const i=(s,a)=>{r[s]=a,n++,n>e&&(n=0,o=r,r=Object.create(null))};return{get(s){let a=r[s];if(a!==void 0)return a;if((a=o[s])!==void 0)return i(s,a),a},set(s,a){s in r?r[s]=a:i(s,a)}}},Xp="!",Oy=":",T3=[],Dy=(e,n,r,o,i)=>({modifiers:e,hasImportantModifier:n,baseClassName:r,maybePostfixModifierPosition:o,isExternal:i}),I3=e=>{const{prefix:n,experimentalParseClassName:r}=e;let o=i=>{const s=[];let a=0,l=0,c=0,u;const f=i.length;for(let w=0;w<f;w++){const _=i[w];if(a===0&&l===0){if(_===Oy){s.push(i.slice(c,w)),c=w+1;continue}if(_==="/"){u=w;continue}}_==="["?a++:_==="]"?a--:_==="("?l++:_===")"&&l--}const d=s.length===0?i:i.slice(c);let p=d,g=!1;d.endsWith(Xp)?(p=d.slice(0,-1),g=!0):d.startsWith(Xp)&&(p=d.slice(1),g=!0);const v=u&&u>c?u-c:void 0;return Dy(s,g,p,v)};if(n){const i=n+Oy,s=o;o=a=>a.startsWith(i)?s(a.slice(i.length)):Dy(T3,!1,a,void 0,!0)}if(r){const i=o;o=s=>r({className:s,parseClassName:i})}return o},$3=e=>{const n=new Map;return e.orderSensitiveModifiers.forEach((r,o)=>{n.set(r,1e6+o)}),r=>{const o=[];let i=[];for(let s=0;s<r.length;s++){const a=r[s],l=a[0]==="[",c=n.has(a);l||c?(i.length>0&&(i.sort(),o.push(...i),i=[]),o.push(a)):i.push(a)}return i.length>0&&(i.sort(),o.push(...i)),o}},O3=e=>({cache:A3(e.cacheSize),parseClassName:I3(e),sortModifiers:$3(e),...S3(e)}),D3=/\s+/,L3=(e,n)=>{const{parseClassName:r,getClassGroupId:o,getConflictingClassGroupIds:i,sortModifiers:s}=n,a=[],l=e.trim().split(D3);let c="";for(let u=l.length-1;u>=0;u-=1){const f=l[u],{isExternal:d,modifiers:p,hasImportantModifier:g,baseClassName:v,maybePostfixModifierPosition:w}=r(f);if(d){c=f+(c.length>0?" "+c:c);continue}let _=!!w,y=o(_?v.substring(0,w):v);if(!y){if(!_){c=f+(c.length>0?" "+c:c);continue}if(y=o(v),!y){c=f+(c.length>0?" "+c:c);continue}_=!1}const b=p.length===0?"":p.length===1?p[0]:s(p).join(":"),x=g?b+Xp:b,S=x+y;if(a.indexOf(S)>-1)continue;a.push(S);const C=i(y,_);for(let k=0;k<C.length;++k){const N=C[k];a.push(x+N)}c=f+(c.length>0?" "+c:c)}return c},z3=(...e)=>{let n=0,r,o,i="";for(;n<e.length;)(r=e[n++])&&(o=o_(r))&&(i&&(i+=" "),i+=o);return i},o_=e=>{if(typeof e=="string")return e;let n,r="";for(let o=0;o<e.length;o++)e[o]&&(n=o_(e[o]))&&(r&&(r+=" "),r+=n);return r},F3=(e,...n)=>{let r,o,i,s;const a=c=>{const u=n.reduce((f,d)=>d(f),e());return r=O3(u),o=r.cache.get,i=r.cache.set,s=l,l(c)},l=c=>{const u=o(c);if(u)return u;const f=L3(c,r);return i(c,f),f};return s=a,(...c)=>s(z3(...c))},V3=[],We=e=>{const n=r=>r[e]||V3;return n.isThemeGetter=!0,n},i_=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,s_=/^\((?:(\w[\w-]*):)?(.+)\)$/i,B3=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,H3=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,W3=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,U3=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,G3=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Y3=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,hr=e=>B3.test(e),me=e=>!!e&&!Number.isNaN(Number(e)),mr=e=>!!e&&Number.isInteger(Number(e)),vf=e=>e.endsWith("%")&&me(e.slice(0,-1)),Dn=e=>H3.test(e),a_=()=>!0,X3=e=>W3.test(e)&&!U3.test(e),Lm=()=>!1,K3=e=>G3.test(e),q3=e=>Y3.test(e),Z3=e=>!ie(e)&&!se(e),Q3=e=>Zr(e,u_,Lm),ie=e=>i_.test(e),so=e=>Zr(e,d_,X3),Ly=e=>Zr(e,s5,me),J3=e=>Zr(e,p_,a_),e5=e=>Zr(e,f_,Lm),zy=e=>Zr(e,l_,Lm),t5=e=>Zr(e,c_,q3),Ml=e=>Zr(e,h_,K3),se=e=>s_.test(e),ms=e=>zo(e,d_),n5=e=>zo(e,f_),Fy=e=>zo(e,l_),r5=e=>zo(e,u_),o5=e=>zo(e,c_),Rl=e=>zo(e,h_,!0),i5=e=>zo(e,p_,!0),Zr=(e,n,r)=>{const o=i_.exec(e);return o?o[1]?n(o[1]):r(o[2]):!1},zo=(e,n,r=!1)=>{const o=s_.exec(e);return o?o[1]?n(o[1]):r:!1},l_=e=>e==="position"||e==="percentage",c_=e=>e==="image"||e==="url",u_=e=>e==="length"||e==="size"||e==="bg-size",d_=e=>e==="length",s5=e=>e==="number",f_=e=>e==="family-name",p_=e=>e==="number"||e==="weight",h_=e=>e==="shadow",a5=()=>{const e=We("color"),n=We("font"),r=We("text"),o=We("font-weight"),i=We("tracking"),s=We("leading"),a=We("breakpoint"),l=We("container"),c=We("spacing"),u=We("radius"),f=We("shadow"),d=We("inset-shadow"),p=We("text-shadow"),g=We("drop-shadow"),v=We("blur"),w=We("perspective"),_=We("aspect"),y=We("ease"),b=We("animate"),x=()=>["auto","avoid","all","avoid-page","page","left","right","column"],S=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],C=()=>[...S(),se,ie],k=()=>["auto","hidden","clip","visible","scroll"],N=()=>["auto","contain","none"],E=()=>[se,ie,c],P=()=>[hr,"full","auto",...E()],T=()=>[mr,"none","subgrid",se,ie],A=()=>["auto",{span:["full",mr,se,ie]},mr,se,ie],D=()=>[mr,"auto",se,ie],V=()=>["auto","min","max","fr",se,ie],j=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],L=()=>["start","end","center","stretch","center-safe","end-safe"],I=()=>["auto",...E()],z=()=>[hr,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...E()],M=()=>[hr,"screen","full","dvw","lvw","svw","min","max","fit",...E()],R=()=>[hr,"screen","full","lh","dvh","lvh","svh","min","max","fit",...E()],O=()=>[e,se,ie],W=()=>[...S(),Fy,zy,{position:[se,ie]}],$=()=>["no-repeat",{repeat:["","x","y","space","round"]}],X=()=>["auto","cover","contain",r5,Q3,{size:[se,ie]}],F=()=>[vf,ms,so],H=()=>["","none","full",u,se,ie],G=()=>["",me,ms,so],U=()=>["solid","dashed","dotted","double"],Y=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],q=()=>[me,vf,Fy,zy],te=()=>["","none",v,se,ie],J=()=>["none",me,se,ie],Z=()=>["none",me,se,ie],ne=()=>[me,se,ie],ue=()=>[hr,"full",...E()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Dn],breakpoint:[Dn],color:[a_],container:[Dn],"drop-shadow":[Dn],ease:["in","out","in-out"],font:[Z3],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Dn],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Dn],shadow:[Dn],spacing:["px",me],text:[Dn],"text-shadow":[Dn],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",hr,ie,se,_]}],container:["container"],columns:[{columns:[me,ie,se,l]}],"break-after":[{"break-after":x()}],"break-before":[{"break-before":x()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:C()}],overflow:[{overflow:k()}],"overflow-x":[{"overflow-x":k()}],"overflow-y":[{"overflow-y":k()}],overscroll:[{overscroll:N()}],"overscroll-x":[{"overscroll-x":N()}],"overscroll-y":[{"overscroll-y":N()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:P()}],"inset-x":[{"inset-x":P()}],"inset-y":[{"inset-y":P()}],start:[{"inset-s":P(),start:P()}],end:[{"inset-e":P(),end:P()}],"inset-bs":[{"inset-bs":P()}],"inset-be":[{"inset-be":P()}],top:[{top:P()}],right:[{right:P()}],bottom:[{bottom:P()}],left:[{left:P()}],visibility:["visible","invisible","collapse"],z:[{z:[mr,"auto",se,ie]}],basis:[{basis:[hr,"full","auto",l,...E()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[me,hr,"auto","initial","none",ie]}],grow:[{grow:["",me,se,ie]}],shrink:[{shrink:["",me,se,ie]}],order:[{order:[mr,"first","last","none",se,ie]}],"grid-cols":[{"grid-cols":T()}],"col-start-end":[{col:A()}],"col-start":[{"col-start":D()}],"col-end":[{"col-end":D()}],"grid-rows":[{"grid-rows":T()}],"row-start-end":[{row:A()}],"row-start":[{"row-start":D()}],"row-end":[{"row-end":D()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":V()}],"auto-rows":[{"auto-rows":V()}],gap:[{gap:E()}],"gap-x":[{"gap-x":E()}],"gap-y":[{"gap-y":E()}],"justify-content":[{justify:[...j(),"normal"]}],"justify-items":[{"justify-items":[...L(),"normal"]}],"justify-self":[{"justify-self":["auto",...L()]}],"align-content":[{content:["normal",...j()]}],"align-items":[{items:[...L(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...L(),{baseline:["","last"]}]}],"place-content":[{"place-content":j()}],"place-items":[{"place-items":[...L(),"baseline"]}],"place-self":[{"place-self":["auto",...L()]}],p:[{p:E()}],px:[{px:E()}],py:[{py:E()}],ps:[{ps:E()}],pe:[{pe:E()}],pbs:[{pbs:E()}],pbe:[{pbe:E()}],pt:[{pt:E()}],pr:[{pr:E()}],pb:[{pb:E()}],pl:[{pl:E()}],m:[{m:I()}],mx:[{mx:I()}],my:[{my:I()}],ms:[{ms:I()}],me:[{me:I()}],mbs:[{mbs:I()}],mbe:[{mbe:I()}],mt:[{mt:I()}],mr:[{mr:I()}],mb:[{mb:I()}],ml:[{ml:I()}],"space-x":[{"space-x":E()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":E()}],"space-y-reverse":["space-y-reverse"],size:[{size:z()}],"inline-size":[{inline:["auto",...M()]}],"min-inline-size":[{"min-inline":["auto",...M()]}],"max-inline-size":[{"max-inline":["none",...M()]}],"block-size":[{block:["auto",...R()]}],"min-block-size":[{"min-block":["auto",...R()]}],"max-block-size":[{"max-block":["none",...R()]}],w:[{w:[l,"screen",...z()]}],"min-w":[{"min-w":[l,"screen","none",...z()]}],"max-w":[{"max-w":[l,"screen","none","prose",{screen:[a]},...z()]}],h:[{h:["screen","lh",...z()]}],"min-h":[{"min-h":["screen","lh","none",...z()]}],"max-h":[{"max-h":["screen","lh",...z()]}],"font-size":[{text:["base",r,ms,so]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[o,i5,J3]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",vf,ie]}],"font-family":[{font:[n5,e5,n]}],"font-features":[{"font-features":[ie]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[i,se,ie]}],"line-clamp":[{"line-clamp":[me,"none",se,Ly]}],leading:[{leading:[s,...E()]}],"list-image":[{"list-image":["none",se,ie]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",se,ie]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:O()}],"text-color":[{text:O()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...U(),"wavy"]}],"text-decoration-thickness":[{decoration:[me,"from-font","auto",se,so]}],"text-decoration-color":[{decoration:O()}],"underline-offset":[{"underline-offset":[me,"auto",se,ie]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:E()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",se,ie]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",se,ie]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:W()}],"bg-repeat":[{bg:$()}],"bg-size":[{bg:X()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},mr,se,ie],radial:["",se,ie],conic:[mr,se,ie]},o5,t5]}],"bg-color":[{bg:O()}],"gradient-from-pos":[{from:F()}],"gradient-via-pos":[{via:F()}],"gradient-to-pos":[{to:F()}],"gradient-from":[{from:O()}],"gradient-via":[{via:O()}],"gradient-to":[{to:O()}],rounded:[{rounded:H()}],"rounded-s":[{"rounded-s":H()}],"rounded-e":[{"rounded-e":H()}],"rounded-t":[{"rounded-t":H()}],"rounded-r":[{"rounded-r":H()}],"rounded-b":[{"rounded-b":H()}],"rounded-l":[{"rounded-l":H()}],"rounded-ss":[{"rounded-ss":H()}],"rounded-se":[{"rounded-se":H()}],"rounded-ee":[{"rounded-ee":H()}],"rounded-es":[{"rounded-es":H()}],"rounded-tl":[{"rounded-tl":H()}],"rounded-tr":[{"rounded-tr":H()}],"rounded-br":[{"rounded-br":H()}],"rounded-bl":[{"rounded-bl":H()}],"border-w":[{border:G()}],"border-w-x":[{"border-x":G()}],"border-w-y":[{"border-y":G()}],"border-w-s":[{"border-s":G()}],"border-w-e":[{"border-e":G()}],"border-w-bs":[{"border-bs":G()}],"border-w-be":[{"border-be":G()}],"border-w-t":[{"border-t":G()}],"border-w-r":[{"border-r":G()}],"border-w-b":[{"border-b":G()}],"border-w-l":[{"border-l":G()}],"divide-x":[{"divide-x":G()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":G()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...U(),"hidden","none"]}],"divide-style":[{divide:[...U(),"hidden","none"]}],"border-color":[{border:O()}],"border-color-x":[{"border-x":O()}],"border-color-y":[{"border-y":O()}],"border-color-s":[{"border-s":O()}],"border-color-e":[{"border-e":O()}],"border-color-bs":[{"border-bs":O()}],"border-color-be":[{"border-be":O()}],"border-color-t":[{"border-t":O()}],"border-color-r":[{"border-r":O()}],"border-color-b":[{"border-b":O()}],"border-color-l":[{"border-l":O()}],"divide-color":[{divide:O()}],"outline-style":[{outline:[...U(),"none","hidden"]}],"outline-offset":[{"outline-offset":[me,se,ie]}],"outline-w":[{outline:["",me,ms,so]}],"outline-color":[{outline:O()}],shadow:[{shadow:["","none",f,Rl,Ml]}],"shadow-color":[{shadow:O()}],"inset-shadow":[{"inset-shadow":["none",d,Rl,Ml]}],"inset-shadow-color":[{"inset-shadow":O()}],"ring-w":[{ring:G()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:O()}],"ring-offset-w":[{"ring-offset":[me,so]}],"ring-offset-color":[{"ring-offset":O()}],"inset-ring-w":[{"inset-ring":G()}],"inset-ring-color":[{"inset-ring":O()}],"text-shadow":[{"text-shadow":["none",p,Rl,Ml]}],"text-shadow-color":[{"text-shadow":O()}],opacity:[{opacity:[me,se,ie]}],"mix-blend":[{"mix-blend":[...Y(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Y()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[me]}],"mask-image-linear-from-pos":[{"mask-linear-from":q()}],"mask-image-linear-to-pos":[{"mask-linear-to":q()}],"mask-image-linear-from-color":[{"mask-linear-from":O()}],"mask-image-linear-to-color":[{"mask-linear-to":O()}],"mask-image-t-from-pos":[{"mask-t-from":q()}],"mask-image-t-to-pos":[{"mask-t-to":q()}],"mask-image-t-from-color":[{"mask-t-from":O()}],"mask-image-t-to-color":[{"mask-t-to":O()}],"mask-image-r-from-pos":[{"mask-r-from":q()}],"mask-image-r-to-pos":[{"mask-r-to":q()}],"mask-image-r-from-color":[{"mask-r-from":O()}],"mask-image-r-to-color":[{"mask-r-to":O()}],"mask-image-b-from-pos":[{"mask-b-from":q()}],"mask-image-b-to-pos":[{"mask-b-to":q()}],"mask-image-b-from-color":[{"mask-b-from":O()}],"mask-image-b-to-color":[{"mask-b-to":O()}],"mask-image-l-from-pos":[{"mask-l-from":q()}],"mask-image-l-to-pos":[{"mask-l-to":q()}],"mask-image-l-from-color":[{"mask-l-from":O()}],"mask-image-l-to-color":[{"mask-l-to":O()}],"mask-image-x-from-pos":[{"mask-x-from":q()}],"mask-image-x-to-pos":[{"mask-x-to":q()}],"mask-image-x-from-color":[{"mask-x-from":O()}],"mask-image-x-to-color":[{"mask-x-to":O()}],"mask-image-y-from-pos":[{"mask-y-from":q()}],"mask-image-y-to-pos":[{"mask-y-to":q()}],"mask-image-y-from-color":[{"mask-y-from":O()}],"mask-image-y-to-color":[{"mask-y-to":O()}],"mask-image-radial":[{"mask-radial":[se,ie]}],"mask-image-radial-from-pos":[{"mask-radial-from":q()}],"mask-image-radial-to-pos":[{"mask-radial-to":q()}],"mask-image-radial-from-color":[{"mask-radial-from":O()}],"mask-image-radial-to-color":[{"mask-radial-to":O()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":S()}],"mask-image-conic-pos":[{"mask-conic":[me]}],"mask-image-conic-from-pos":[{"mask-conic-from":q()}],"mask-image-conic-to-pos":[{"mask-conic-to":q()}],"mask-image-conic-from-color":[{"mask-conic-from":O()}],"mask-image-conic-to-color":[{"mask-conic-to":O()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:W()}],"mask-repeat":[{mask:$()}],"mask-size":[{mask:X()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",se,ie]}],filter:[{filter:["","none",se,ie]}],blur:[{blur:te()}],brightness:[{brightness:[me,se,ie]}],contrast:[{contrast:[me,se,ie]}],"drop-shadow":[{"drop-shadow":["","none",g,Rl,Ml]}],"drop-shadow-color":[{"drop-shadow":O()}],grayscale:[{grayscale:["",me,se,ie]}],"hue-rotate":[{"hue-rotate":[me,se,ie]}],invert:[{invert:["",me,se,ie]}],saturate:[{saturate:[me,se,ie]}],sepia:[{sepia:["",me,se,ie]}],"backdrop-filter":[{"backdrop-filter":["","none",se,ie]}],"backdrop-blur":[{"backdrop-blur":te()}],"backdrop-brightness":[{"backdrop-brightness":[me,se,ie]}],"backdrop-contrast":[{"backdrop-contrast":[me,se,ie]}],"backdrop-grayscale":[{"backdrop-grayscale":["",me,se,ie]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[me,se,ie]}],"backdrop-invert":[{"backdrop-invert":["",me,se,ie]}],"backdrop-opacity":[{"backdrop-opacity":[me,se,ie]}],"backdrop-saturate":[{"backdrop-saturate":[me,se,ie]}],"backdrop-sepia":[{"backdrop-sepia":["",me,se,ie]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":E()}],"border-spacing-x":[{"border-spacing-x":E()}],"border-spacing-y":[{"border-spacing-y":E()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",se,ie]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[me,"initial",se,ie]}],ease:[{ease:["linear","initial",y,se,ie]}],delay:[{delay:[me,se,ie]}],animate:[{animate:["none",b,se,ie]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[w,se,ie]}],"perspective-origin":[{"perspective-origin":C()}],rotate:[{rotate:J()}],"rotate-x":[{"rotate-x":J()}],"rotate-y":[{"rotate-y":J()}],"rotate-z":[{"rotate-z":J()}],scale:[{scale:Z()}],"scale-x":[{"scale-x":Z()}],"scale-y":[{"scale-y":Z()}],"scale-z":[{"scale-z":Z()}],"scale-3d":["scale-3d"],skew:[{skew:ne()}],"skew-x":[{"skew-x":ne()}],"skew-y":[{"skew-y":ne()}],transform:[{transform:[se,ie,"","none","gpu","cpu"]}],"transform-origin":[{origin:C()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:ue()}],"translate-x":[{"translate-x":ue()}],"translate-y":[{"translate-y":ue()}],"translate-z":[{"translate-z":ue()}],"translate-none":["translate-none"],accent:[{accent:O()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:O()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",se,ie]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":E()}],"scroll-mx":[{"scroll-mx":E()}],"scroll-my":[{"scroll-my":E()}],"scroll-ms":[{"scroll-ms":E()}],"scroll-me":[{"scroll-me":E()}],"scroll-mbs":[{"scroll-mbs":E()}],"scroll-mbe":[{"scroll-mbe":E()}],"scroll-mt":[{"scroll-mt":E()}],"scroll-mr":[{"scroll-mr":E()}],"scroll-mb":[{"scroll-mb":E()}],"scroll-ml":[{"scroll-ml":E()}],"scroll-p":[{"scroll-p":E()}],"scroll-px":[{"scroll-px":E()}],"scroll-py":[{"scroll-py":E()}],"scroll-ps":[{"scroll-ps":E()}],"scroll-pe":[{"scroll-pe":E()}],"scroll-pbs":[{"scroll-pbs":E()}],"scroll-pbe":[{"scroll-pbe":E()}],"scroll-pt":[{"scroll-pt":E()}],"scroll-pr":[{"scroll-pr":E()}],"scroll-pb":[{"scroll-pb":E()}],"scroll-pl":[{"scroll-pl":E()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",se,ie]}],fill:[{fill:["none",...O()]}],"stroke-w":[{stroke:[me,ms,so,Ly]}],stroke:[{stroke:["none",...O()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},l5=F3(a5);function ae(...e){return l5(e_(e))}function m_(e,n=[]){let r=[];function o(s,a){const l=h.createContext(a);l.displayName=s+"Context";const c=r.length;r=[...r,a];const u=d=>{var y;const{scope:p,children:g,...v}=d,w=((y=p==null?void 0:p[e])==null?void 0:y[c])||l,_=h.useMemo(()=>v,Object.values(v));return m.jsx(w.Provider,{value:_,children:g})};u.displayName=s+"Provider";function f(d,p){var w;const g=((w=p==null?void 0:p[e])==null?void 0:w[c])||l,v=h.useContext(g);if(v)return v;if(a!==void 0)return a;throw new Error(`\`${d}\` must be used within \`${s}\``)}return[u,f]}const i=()=>{const s=r.map(a=>h.createContext(a));return function(l){const c=(l==null?void 0:l[e])||s;return h.useMemo(()=>({[`__scope${e}`]:{...l,[e]:c}}),[l,c])}};return i.scopeName=e,[o,c5(i,...n)]}function c5(...e){const n=e[0];if(e.length===1)return n;const r=()=>{const o=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(s){const a=o.reduce((l,{useScope:c,scopeName:u})=>{const d=c(s)[`__scope${u}`];return{...l,...d}},{});return h.useMemo(()=>({[`__scope${n.scopeName}`]:a}),[a])}};return r.scopeName=n.scopeName,r}function An(e){const n=h.useRef(e);return h.useEffect(()=>{n.current=e}),h.useMemo(()=>(...r)=>{var o;return(o=n.current)==null?void 0:o.call(n,...r)},[])}var Ye=globalThis!=null&&globalThis.document?h.useLayoutEffect:()=>{};function Vy(e,n){if(typeof e=="function")return e(n);e!=null&&(e.current=n)}function ke(...e){return n=>{let r=!1;const o=e.map(i=>{const s=Vy(i,n);return!r&&typeof s=="function"&&(r=!0),s});if(r)return()=>{for(let i=0;i<o.length;i++){const s=o[i];typeof s=="function"?s():Vy(e[i],null)}}}}function ve(...e){return h.useCallback(ke(...e),e)}var u5=Symbol.for("react.lazy"),eu=Iu[" use ".trim().toString()];function d5(e){return typeof e=="object"&&e!==null&&"then"in e}function g_(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===u5&&"_payload"in e&&d5(e._payload)}function y_(e){const n=f5(e),r=h.forwardRef((o,i)=>{let{children:s,...a}=o;g_(s)&&typeof eu=="function"&&(s=eu(s._payload));const l=h.Children.toArray(s),c=l.find(h5);if(c){const u=c.props.children,f=l.map(d=>d===c?h.Children.count(u)>1?h.Children.only(null):h.isValidElement(u)?u.props.children:null:d);return m.jsx(n,{...a,ref:i,children:h.isValidElement(u)?h.cloneElement(u,void 0,f):null})}return m.jsx(n,{...a,ref:i,children:s})});return r.displayName=`${e}.Slot`,r}var v_=y_("Slot");function f5(e){const n=h.forwardRef((r,o)=>{let{children:i,...s}=r;if(g_(i)&&typeof eu=="function"&&(i=eu(i._payload)),h.isValidElement(i)){const a=g5(i),l=m5(s,i.props);return i.type!==h.Fragment&&(l.ref=o?ke(o,a):a),h.cloneElement(i,l)}return h.Children.count(i)>1?h.Children.only(null):null});return n.displayName=`${e}.SlotClone`,n}var p5=Symbol("radix.slottable");function h5(e){return h.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===p5}function m5(e,n){const r={...n};for(const o in n){const i=e[o],s=n[o];/^on[A-Z]/.test(o)?i&&s?r[o]=(...l)=>{const c=s(...l);return i(...l),c}:i&&(r[o]=i):o==="style"?r[o]={...i,...s}:o==="className"&&(r[o]=[i,s].filter(Boolean).join(" "))}return{...e,...r}}function g5(e){var o,i;let n=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,r=n&&"isReactWarning"in n&&n.isReactWarning;return r?e.ref:(n=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,r=n&&"isReactWarning"in n&&n.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var y5=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],pt=y5.reduce((e,n)=>{const r=y_(`Primitive.${n}`),o=h.forwardRef((i,s)=>{const{asChild:a,...l}=i,c=a?r:n;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),m.jsx(c,{...l,ref:s})});return o.displayName=`Primitive.${n}`,{...e,[n]:o}},{}),x_={exports:{}},w_={};/**
68
- * @license React
69
- * use-sync-external-store-shim.production.js
70
- *
71
- * Copyright (c) Meta Platforms, Inc. and affiliates.
72
- *
73
- * This source code is licensed under the MIT license found in the
74
- * LICENSE file in the root directory of this source tree.
75
- */var Di=h;function v5(e,n){return e===n&&(e!==0||1/e===1/n)||e!==e&&n!==n}var x5=typeof Object.is=="function"?Object.is:v5,w5=Di.useState,b5=Di.useEffect,_5=Di.useLayoutEffect,S5=Di.useDebugValue;function C5(e,n){var r=n(),o=w5({inst:{value:r,getSnapshot:n}}),i=o[0].inst,s=o[1];return _5(function(){i.value=r,i.getSnapshot=n,xf(i)&&s({inst:i})},[e,r,n]),b5(function(){return xf(i)&&s({inst:i}),e(function(){xf(i)&&s({inst:i})})},[e]),S5(r),r}function xf(e){var n=e.getSnapshot;e=e.value;try{var r=n();return!x5(e,r)}catch{return!0}}function k5(e,n){return n()}var N5=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?k5:C5;w_.useSyncExternalStore=Di.useSyncExternalStore!==void 0?Di.useSyncExternalStore:N5;x_.exports=w_;var b_=x_.exports;function E5(){return b_.useSyncExternalStore(P5,()=>!0,()=>!1)}function P5(){return()=>{}}var zm="Avatar",[j5]=m_(zm),[M5,__]=j5(zm),S_=h.forwardRef((e,n)=>{const{__scopeAvatar:r,...o}=e,[i,s]=h.useState("idle");return m.jsx(M5,{scope:r,imageLoadingStatus:i,onImageLoadingStatusChange:s,children:m.jsx(pt.span,{...o,ref:n})})});S_.displayName=zm;var C_="AvatarImage",k_=h.forwardRef((e,n)=>{const{__scopeAvatar:r,src:o,onLoadingStatusChange:i=()=>{},...s}=e,a=__(C_,r),l=R5(o,s),c=An(u=>{i(u),a.onImageLoadingStatusChange(u)});return Ye(()=>{l!=="idle"&&c(l)},[l,c]),l==="loaded"?m.jsx(pt.img,{...s,ref:n,src:o}):null});k_.displayName=C_;var N_="AvatarFallback",E_=h.forwardRef((e,n)=>{const{__scopeAvatar:r,delayMs:o,...i}=e,s=__(N_,r),[a,l]=h.useState(o===void 0);return h.useEffect(()=>{if(o!==void 0){const c=window.setTimeout(()=>l(!0),o);return()=>window.clearTimeout(c)}},[o]),a&&s.imageLoadingStatus!=="loaded"?m.jsx(pt.span,{...i,ref:n}):null});E_.displayName=N_;function By(e,n){return e?n?(e.src!==n&&(e.src=n),e.complete&&e.naturalWidth>0?"loaded":"loading"):"error":"idle"}function R5(e,{referrerPolicy:n,crossOrigin:r}){const o=E5(),i=h.useRef(null),s=o?(i.current||(i.current=new window.Image),i.current):null,[a,l]=h.useState(()=>By(s,e));return Ye(()=>{l(By(s,e))},[s,e]),Ye(()=>{const c=d=>()=>{l(d)};if(!s)return;const u=c("loaded"),f=c("error");return s.addEventListener("load",u),s.addEventListener("error",f),n&&(s.referrerPolicy=n),typeof r=="string"&&(s.crossOrigin=r),()=>{s.removeEventListener("load",u),s.removeEventListener("error",f)}},[s,r,n]),a}var P_=S_,j_=k_,M_=E_;const A5=h.forwardRef(({className:e,...n},r)=>m.jsx(P_,{ref:r,className:ae("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",e),...n}));A5.displayName=P_.displayName;const T5=h.forwardRef(({className:e,...n},r)=>m.jsx(j_,{ref:r,className:ae("aspect-square h-full w-full",e),...n}));T5.displayName=j_.displayName;const I5=h.forwardRef(({className:e,...n},r)=>m.jsx(M_,{ref:r,className:ae("flex h-full w-full items-center justify-center rounded-full bg-primary/10 text-primary font-medium",e),...n}));I5.displayName=M_.displayName;const Hy=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Wy=e_,Fm=(e,n)=>r=>{var o;if((n==null?void 0:n.variants)==null)return Wy(e,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:i,defaultVariants:s}=n,a=Object.keys(i).map(u=>{const f=r==null?void 0:r[u],d=s==null?void 0:s[u];if(f===null)return null;const p=Hy(f)||Hy(d);return i[u][p]}),l=r&&Object.entries(r).reduce((u,f)=>{let[d,p]=f;return p===void 0||(u[d]=p),u},{}),c=n==null||(o=n.compoundVariants)===null||o===void 0?void 0:o.reduce((u,f)=>{let{class:d,className:p,...g}=f;return Object.entries(g).every(v=>{let[w,_]=v;return Array.isArray(_)?_.includes({...s,...l}[w]):{...s,...l}[w]===_})?[...u,d,p]:u},[]);return Wy(e,a,c,r==null?void 0:r.class,r==null?void 0:r.className)};/**
76
- * @license lucide-react v0.576.0 - ISC
77
- *
78
- * This source code is licensed under the ISC license.
79
- * See the LICENSE file in the root directory of this source tree.
80
- */const R_=(...e)=>e.filter((n,r,o)=>!!n&&n.trim()!==""&&o.indexOf(n)===r).join(" ").trim();/**
81
- * @license lucide-react v0.576.0 - ISC
82
- *
83
- * This source code is licensed under the ISC license.
84
- * See the LICENSE file in the root directory of this source tree.
85
- */const $5=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/**
86
- * @license lucide-react v0.576.0 - ISC
87
- *
88
- * This source code is licensed under the ISC license.
89
- * See the LICENSE file in the root directory of this source tree.
90
- */const O5=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(n,r,o)=>o?o.toUpperCase():r.toLowerCase());/**
91
- * @license lucide-react v0.576.0 - ISC
92
- *
93
- * This source code is licensed under the ISC license.
94
- * See the LICENSE file in the root directory of this source tree.
95
- */const Uy=e=>{const n=O5(e);return n.charAt(0).toUpperCase()+n.slice(1)};/**
96
- * @license lucide-react v0.576.0 - ISC
97
- *
98
- * This source code is licensed under the ISC license.
99
- * See the LICENSE file in the root directory of this source tree.
100
- */var D5={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
101
- * @license lucide-react v0.576.0 - ISC
102
- *
103
- * This source code is licensed under the ISC license.
104
- * See the LICENSE file in the root directory of this source tree.
105
- */const L5=e=>{for(const n in e)if(n.startsWith("aria-")||n==="role"||n==="title")return!0;return!1};/**
106
- * @license lucide-react v0.576.0 - ISC
107
- *
108
- * This source code is licensed under the ISC license.
109
- * See the LICENSE file in the root directory of this source tree.
110
- */const z5=h.forwardRef(({color:e="currentColor",size:n=24,strokeWidth:r=2,absoluteStrokeWidth:o,className:i="",children:s,iconNode:a,...l},c)=>h.createElement("svg",{ref:c,...D5,width:n,height:n,stroke:e,strokeWidth:o?Number(r)*24/Number(n):r,className:R_("lucide",i),...!s&&!L5(l)&&{"aria-hidden":"true"},...l},[...a.map(([u,f])=>h.createElement(u,f)),...Array.isArray(s)?s:[s]]));/**
111
- * @license lucide-react v0.576.0 - ISC
112
- *
113
- * This source code is licensed under the ISC license.
114
- * See the LICENSE file in the root directory of this source tree.
115
- */const fe=(e,n)=>{const r=h.forwardRef(({className:o,...i},s)=>h.createElement(z5,{ref:s,iconNode:n,className:R_(`lucide-${$5(Uy(e))}`,`lucide-${e}`,o),...i}));return r.displayName=Uy(e),r};/**
116
- * @license lucide-react v0.576.0 - ISC
117
- *
118
- * This source code is licensed under the ISC license.
119
- * See the LICENSE file in the root directory of this source tree.
120
- */const F5=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],Vm=fe("arrow-left",F5);/**
121
- * @license lucide-react v0.576.0 - ISC
122
- *
123
- * This source code is licensed under the ISC license.
124
- * See the LICENSE file in the root directory of this source tree.
125
- */const V5=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],B5=fe("arrow-right",V5);/**
126
- * @license lucide-react v0.576.0 - ISC
127
- *
128
- * This source code is licensed under the ISC license.
129
- * See the LICENSE file in the root directory of this source tree.
130
- */const H5=[["path",{d:"M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z",key:"lc1i9w"}],["path",{d:"m7 16.5-4.74-2.85",key:"1o9zyk"}],["path",{d:"m7 16.5 5-3",key:"va8pkn"}],["path",{d:"M7 16.5v5.17",key:"jnp8gn"}],["path",{d:"M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z",key:"8zsnat"}],["path",{d:"m17 16.5-5-3",key:"8arw3v"}],["path",{d:"m17 16.5 4.74-2.85",key:"8rfmw"}],["path",{d:"M17 16.5v5.17",key:"k6z78m"}],["path",{d:"M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z",key:"1xygjf"}],["path",{d:"M12 8 7.26 5.15",key:"1vbdud"}],["path",{d:"m12 8 4.74-2.85",key:"3rx089"}],["path",{d:"M12 13.5V8",key:"1io7kd"}]],Ju=fe("boxes",H5);/**
131
- * @license lucide-react v0.576.0 - ISC
132
- *
133
- * This source code is licensed under the ISC license.
134
- * See the LICENSE file in the root directory of this source tree.
135
- */const W5=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Bm=fe("check",W5);/**
136
- * @license lucide-react v0.576.0 - ISC
137
- *
138
- * This source code is licensed under the ISC license.
139
- * See the LICENSE file in the root directory of this source tree.
140
- */const U5=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],ed=fe("chevron-down",U5);/**
141
- * @license lucide-react v0.576.0 - ISC
142
- *
143
- * This source code is licensed under the ISC license.
144
- * See the LICENSE file in the root directory of this source tree.
145
- */const G5=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Li=fe("chevron-right",G5);/**
146
- * @license lucide-react v0.576.0 - ISC
147
- *
148
- * This source code is licensed under the ISC license.
149
- * See the LICENSE file in the root directory of this source tree.
150
- */const Y5=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],X5=fe("chevron-up",Y5);/**
151
- * @license lucide-react v0.576.0 - ISC
152
- *
153
- * This source code is licensed under the ISC license.
154
- * See the LICENSE file in the root directory of this source tree.
155
- */const K5=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],Ci=fe("circle-alert",K5);/**
156
- * @license lucide-react v0.576.0 - ISC
157
- *
158
- * This source code is licensed under the ISC license.
159
- * See the LICENSE file in the root directory of this source tree.
160
- */const q5=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],go=fe("circle-check-big",q5);/**
161
- * @license lucide-react v0.576.0 - ISC
162
- *
163
- * This source code is licensed under the ISC license.
164
- * See the LICENSE file in the root directory of this source tree.
165
- */const Z5=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],Q5=fe("circle-x",Z5);/**
166
- * @license lucide-react v0.576.0 - ISC
167
- *
168
- * This source code is licensed under the ISC license.
169
- * See the LICENSE file in the root directory of this source tree.
170
- */const J5=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],eA=fe("circle",J5);/**
171
- * @license lucide-react v0.576.0 - ISC
172
- *
173
- * This source code is licensed under the ISC license.
174
- * See the LICENSE file in the root directory of this source tree.
175
- */const tA=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],Gy=fe("copy",tA);/**
176
- * @license lucide-react v0.576.0 - ISC
177
- *
178
- * This source code is licensed under the ISC license.
179
- * See the LICENSE file in the root directory of this source tree.
180
- */const nA=[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]],Hm=fe("database",nA);/**
181
- * @license lucide-react v0.576.0 - ISC
182
- *
183
- * This source code is licensed under the ISC license.
184
- * See the LICENSE file in the root directory of this source tree.
185
- */const rA=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 12.5 8 15l2 2.5",key:"1tg20x"}],["path",{d:"m14 12.5 2 2.5-2 2.5",key:"yinavb"}]],oA=fe("file-code",rA);/**
186
- * @license lucide-react v0.576.0 - ISC
187
- *
188
- * This source code is licensed under the ISC license.
189
- * See the LICENSE file in the root directory of this source tree.
190
- */const iA=[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]],wf=fe("folder-open",iA);/**
191
- * @license lucide-react v0.576.0 - ISC
192
- *
193
- * This source code is licensed under the ISC license.
194
- * See the LICENSE file in the root directory of this source tree.
195
- */const sA=[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]],Yy=fe("folder",sA);/**
196
- * @license lucide-react v0.576.0 - ISC
197
- *
198
- * This source code is licensed under the ISC license.
199
- * See the LICENSE file in the root directory of this source tree.
200
- */const aA=[["path",{d:"M15 6a9 9 0 0 0-9 9V3",key:"1cii5b"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}]],lA=fe("git-branch",aA);/**
201
- * @license lucide-react v0.576.0 - ISC
202
- *
203
- * This source code is licensed under the ISC license.
204
- * See the LICENSE file in the root directory of this source tree.
205
- */const cA=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]],Wm=fe("globe",cA);/**
206
- * @license lucide-react v0.576.0 - ISC
207
- *
208
- * This source code is licensed under the ISC license.
209
- * See the LICENSE file in the root directory of this source tree.
210
- */const uA=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],A_=fe("info",uA);/**
211
- * @license lucide-react v0.576.0 - ISC
212
- *
213
- * This source code is licensed under the ISC license.
214
- * See the LICENSE file in the root directory of this source tree.
215
- */const dA=[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]],$a=fe("layers",dA);/**
216
- * @license lucide-react v0.576.0 - ISC
217
- *
218
- * This source code is licensed under the ISC license.
219
- * See the LICENSE file in the root directory of this source tree.
220
- */const fA=[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]],pA=fe("layout-dashboard",fA);/**
221
- * @license lucide-react v0.576.0 - ISC
222
- *
223
- * This source code is licensed under the ISC license.
224
- * See the LICENSE file in the root directory of this source tree.
225
- */const hA=[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]],Xy=fe("link",hA);/**
226
- * @license lucide-react v0.576.0 - ISC
227
- *
228
- * This source code is licensed under the ISC license.
229
- * See the LICENSE file in the root directory of this source tree.
230
- */const mA=[["path",{d:"M3 5h.01",key:"18ugdj"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 19h.01",key:"noohij"}],["path",{d:"M8 5h13",key:"1pao27"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 19h13",key:"m83p4d"}]],gA=fe("list",mA);/**
231
- * @license lucide-react v0.576.0 - ISC
232
- *
233
- * This source code is licensed under the ISC license.
234
- * See the LICENSE file in the root directory of this source tree.
235
- */const yA=[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]],vA=fe("map-pin",yA);/**
236
- * @license lucide-react v0.576.0 - ISC
237
- *
238
- * This source code is licensed under the ISC license.
239
- * See the LICENSE file in the root directory of this source tree.
240
- */const xA=[["path",{d:"M14.106 5.553a2 2 0 0 0 1.788 0l3.659-1.83A1 1 0 0 1 21 4.619v12.764a1 1 0 0 1-.553.894l-4.553 2.277a2 2 0 0 1-1.788 0l-4.212-2.106a2 2 0 0 0-1.788 0l-3.659 1.83A1 1 0 0 1 3 19.381V6.618a1 1 0 0 1 .553-.894l4.553-2.277a2 2 0 0 1 1.788 0z",key:"169xi5"}],["path",{d:"M15 5.764v15",key:"1pn4in"}],["path",{d:"M9 3.236v15",key:"1uimfh"}]],wA=fe("map",xA);/**
241
- * @license lucide-react v0.576.0 - ISC
242
- *
243
- * This source code is licensed under the ISC license.
244
- * See the LICENSE file in the root directory of this source tree.
245
- */const bA=[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]],_A=fe("moon",bA);/**
246
- * @license lucide-react v0.576.0 - ISC
247
- *
248
- * This source code is licensed under the ISC license.
249
- * See the LICENSE file in the root directory of this source tree.
250
- */const SA=[["rect",{x:"16",y:"16",width:"6",height:"6",rx:"1",key:"4q2zg0"}],["rect",{x:"2",y:"16",width:"6",height:"6",rx:"1",key:"8cvhb9"}],["rect",{x:"9",y:"2",width:"6",height:"6",rx:"1",key:"1egb70"}],["path",{d:"M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3",key:"1jsf9p"}],["path",{d:"M12 12V8",key:"2874zd"}]],CA=fe("network",SA);/**
251
- * @license lucide-react v0.576.0 - ISC
252
- *
253
- * This source code is licensed under the ISC license.
254
- * See the LICENSE file in the root directory of this source tree.
255
- */const kA=[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]],Ky=fe("package",kA);/**
256
- * @license lucide-react v0.576.0 - ISC
257
- *
258
- * This source code is licensed under the ISC license.
259
- * See the LICENSE file in the root directory of this source tree.
260
- */const NA=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],EA=fe("play",NA);/**
261
- * @license lucide-react v0.576.0 - ISC
262
- *
263
- * This source code is licensed under the ISC license.
264
- * See the LICENSE file in the root directory of this source tree.
265
- */const PA=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Al=fe("plus",PA);/**
266
- * @license lucide-react v0.576.0 - ISC
267
- *
268
- * This source code is licensed under the ISC license.
269
- * See the LICENSE file in the root directory of this source tree.
270
- */const jA=[["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"}]],T_=fe("refresh-cw",jA);/**
271
- * @license lucide-react v0.576.0 - ISC
272
- *
273
- * This source code is licensed under the ISC license.
274
- * See the LICENSE file in the root directory of this source tree.
275
- */const MA=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]],qy=fe("rotate-ccw",MA);/**
276
- * @license lucide-react v0.576.0 - ISC
277
- *
278
- * This source code is licensed under the ISC license.
279
- * See the LICENSE file in the root directory of this source tree.
280
- */const RA=[["circle",{cx:"6",cy:"19",r:"3",key:"1kj8tv"}],["path",{d:"M9 19h8.5a3.5 3.5 0 0 0 0-7h-11a3.5 3.5 0 0 1 0-7H15",key:"1d8sl"}],["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}]],AA=fe("route",RA);/**
281
- * @license lucide-react v0.576.0 - ISC
282
- *
283
- * This source code is licensed under the ISC license.
284
- * See the LICENSE file in the root directory of this source tree.
285
- */const TA=[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]],Zy=fe("save",TA);/**
286
- * @license lucide-react v0.576.0 - ISC
287
- *
288
- * This source code is licensed under the ISC license.
289
- * See the LICENSE file in the root directory of this source tree.
290
- */const IA=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],$A=fe("search",IA);/**
291
- * @license lucide-react v0.576.0 - ISC
292
- *
293
- * This source code is licensed under the ISC license.
294
- * See the LICENSE file in the root directory of this source tree.
295
- */const OA=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],I_=fe("settings",OA);/**
296
- * @license lucide-react v0.576.0 - ISC
297
- *
298
- * This source code is licensed under the ISC license.
299
- * See the LICENSE file in the root directory of this source tree.
300
- */const DA=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],$_=fe("shield-check",DA);/**
301
- * @license lucide-react v0.576.0 - ISC
302
- *
303
- * This source code is licensed under the ISC license.
304
- * See the LICENSE file in the root directory of this source tree.
305
- */const LA=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]],zA=fe("sun",LA);/**
306
- * @license lucide-react v0.576.0 - ISC
307
- *
308
- * This source code is licensed under the ISC license.
309
- * See the LICENSE file in the root directory of this source tree.
310
- */const FA=[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",key:"vktsd0"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]],VA=fe("tag",FA);/**
311
- * @license lucide-react v0.576.0 - ISC
312
- *
313
- * This source code is licensed under the ISC license.
314
- * See the LICENSE file in the root directory of this source tree.
315
- */const BA=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],Tl=fe("trash-2",BA);/**
316
- * @license lucide-react v0.576.0 - ISC
317
- *
318
- * This source code is licensed under the ISC license.
319
- * See the LICENSE file in the root directory of this source tree.
320
- */const HA=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],Um=fe("triangle-alert",HA);/**
321
- * @license lucide-react v0.576.0 - ISC
322
- *
323
- * This source code is licensed under the ISC license.
324
- * See the LICENSE file in the root directory of this source tree.
325
- */const WA=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],tu=fe("x",WA);/**
326
- * @license lucide-react v0.576.0 - ISC
327
- *
328
- * This source code is licensed under the ISC license.
329
- * See the LICENSE file in the root directory of this source tree.
330
- */const UA=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],GA=fe("zap",UA),YA=h.forwardRef(({...e},n)=>m.jsx("nav",{ref:n,"aria-label":"breadcrumb",...e}));YA.displayName="Breadcrumb";const XA=h.forwardRef(({className:e,...n},r)=>m.jsx("ol",{ref:r,className:ae("flex flex-wrap items-center gap-1.5 break-words text-sm text-muted-foreground sm:gap-2.5",e),...n}));XA.displayName="BreadcrumbList";const KA=h.forwardRef(({className:e,...n},r)=>m.jsx("li",{ref:r,className:ae("inline-flex items-center gap-1.5",e),...n}));KA.displayName="BreadcrumbItem";const qA=h.forwardRef(({asChild:e,className:n,...r},o)=>{const i=e?v_:"a";return m.jsx(i,{ref:o,className:ae("transition-colors hover:text-foreground",n),...r})});qA.displayName="BreadcrumbLink";const ZA=h.forwardRef(({className:e,...n},r)=>m.jsx("span",{ref:r,role:"link","aria-disabled":"true","aria-current":"page",className:ae("font-normal text-foreground",e),...n}));ZA.displayName="BreadcrumbPage";const QA=Fm("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring 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 shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),O_=h.forwardRef(({className:e,variant:n,size:r,asChild:o=!1,...i},s)=>{const a=o?v_:"button";return m.jsx(a,{className:ae(QA({variant:n,size:r,className:e})),ref:s,...i})});O_.displayName="Button";const JA=h.forwardRef(({className:e,onClick:n,...r},o)=>{const i=h.useRef(null),[s,a]=h.useState(!1);return h.useEffect(()=>{var u;const l=i.current;if(!l)return;const c=!!n||((u=l.parentElement)==null?void 0:u.tagName)==="A"||!!l.querySelector(":scope > a");a(c)},[n]),m.jsx("div",{ref:l=>{i.current=l,typeof o=="function"?o(l):o&&(o.current=l)},className:ae("ls-card rounded-xl bg-card text-card-foreground",s&&"interactive",e),onClick:n,...r})});JA.displayName="Card";const eT=h.forwardRef(({className:e,...n},r)=>m.jsx("div",{ref:r,className:ae("flex flex-col space-y-1.5 p-6",e),...n}));eT.displayName="CardHeader";const tT=h.forwardRef(({className:e,...n},r)=>m.jsx("div",{ref:r,className:ae("font-semibold leading-none tracking-tight",e),...n}));tT.displayName="CardTitle";const nT=h.forwardRef(({className:e,...n},r)=>m.jsx("div",{ref:r,className:ae("text-sm text-muted-foreground",e),...n}));nT.displayName="CardDescription";const rT=h.forwardRef(({className:e,...n},r)=>m.jsx("div",{ref:r,className:ae("p-6 pt-0",e),...n}));rT.displayName="CardContent";const oT=h.forwardRef(({className:e,...n},r)=>m.jsx("div",{ref:r,className:ae("flex items-center p-6 pt-0",e),...n}));oT.displayName="CardFooter";function iT(e,n=[]){let r=[];function o(s,a){const l=h.createContext(a),c=r.length;r=[...r,a];const u=d=>{var y;const{scope:p,children:g,...v}=d,w=((y=p==null?void 0:p[e])==null?void 0:y[c])||l,_=h.useMemo(()=>v,Object.values(v));return m.jsx(w.Provider,{value:_,children:g})};u.displayName=s+"Provider";function f(d,p){var w;const g=((w=p==null?void 0:p[e])==null?void 0:w[c])||l,v=h.useContext(g);if(v)return v;if(a!==void 0)return a;throw new Error(`\`${d}\` must be used within \`${s}\``)}return[u,f]}const i=()=>{const s=r.map(a=>h.createContext(a));return function(l){const c=(l==null?void 0:l[e])||s;return h.useMemo(()=>({[`__scope${e}`]:{...l,[e]:c}}),[l,c])}};return i.scopeName=e,[o,sT(i,...n)]}function sT(...e){const n=e[0];if(e.length===1)return n;const r=()=>{const o=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(s){const a=o.reduce((l,{useScope:c,scopeName:u})=>{const d=c(s)[`__scope${u}`];return{...l,...d}},{});return h.useMemo(()=>({[`__scope${n.scopeName}`]:a}),[a])}};return r.scopeName=n.scopeName,r}function re(e,n,{checkForDefaultPrevented:r=!0}={}){return function(i){if(e==null||e(i),r===!1||!i.defaultPrevented)return n==null?void 0:n(i)}}var aT=Iu[" useInsertionEffect ".trim().toString()]||Ye;function Oa({prop:e,defaultProp:n,onChange:r=()=>{},caller:o}){const[i,s,a]=lT({defaultProp:n,onChange:r}),l=e!==void 0,c=l?e:i;{const f=h.useRef(e!==void 0);h.useEffect(()=>{const d=f.current;d!==l&&console.warn(`${o} is changing from ${d?"controlled":"uncontrolled"} to ${l?"controlled":"uncontrolled"}. 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.`),f.current=l},[l,o])}const u=h.useCallback(f=>{var d;if(l){const p=cT(f)?f(e):f;p!==e&&((d=a.current)==null||d.call(a,p))}else s(f)},[l,e,s,a]);return[c,u]}function lT({defaultProp:e,onChange:n}){const[r,o]=h.useState(e),i=h.useRef(r),s=h.useRef(n);return aT(()=>{s.current=n},[n]),h.useEffect(()=>{var a;i.current!==r&&((a=s.current)==null||a.call(s,r),i.current=r)},[r,i]),[r,o,s]}function cT(e){return typeof e=="function"}function Gm(e){const n=h.useRef({value:e,previous:e});return h.useMemo(()=>(n.current.value!==e&&(n.current.previous=n.current.value,n.current.value=e),n.current.previous),[e])}function Ym(e){const[n,r]=h.useState(void 0);return Ye(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const o=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const s=i[0];let a,l;if("borderBoxSize"in s){const c=s.borderBoxSize,u=Array.isArray(c)?c[0]:c;a=u.inlineSize,l=u.blockSize}else a=e.offsetWidth,l=e.offsetHeight;r({width:a,height:l})});return o.observe(e,{box:"border-box"}),()=>o.unobserve(e)}else r(void 0)},[e]),n}function uT(e,n){return h.useReducer((r,o)=>n[r][o]??r,e)}var _t=e=>{const{present:n,children:r}=e,o=dT(n),i=typeof r=="function"?r({present:o.isPresent}):h.Children.only(r),s=ve(o.ref,fT(i));return typeof r=="function"||o.isPresent?h.cloneElement(i,{ref:s}):null};_t.displayName="Presence";function dT(e){const[n,r]=h.useState(),o=h.useRef(null),i=h.useRef(e),s=h.useRef("none"),a=e?"mounted":"unmounted",[l,c]=uT(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return h.useEffect(()=>{const u=Il(o.current);s.current=l==="mounted"?u:"none"},[l]),Ye(()=>{const u=o.current,f=i.current;if(f!==e){const p=s.current,g=Il(u);e?c("MOUNT"):g==="none"||(u==null?void 0:u.display)==="none"?c("UNMOUNT"):c(f&&p!==g?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,c]),Ye(()=>{if(n){let u;const f=n.ownerDocument.defaultView??window,d=g=>{const w=Il(o.current).includes(CSS.escape(g.animationName));if(g.target===n&&w&&(c("ANIMATION_END"),!i.current)){const _=n.style.animationFillMode;n.style.animationFillMode="forwards",u=f.setTimeout(()=>{n.style.animationFillMode==="forwards"&&(n.style.animationFillMode=_)})}},p=g=>{g.target===n&&(s.current=Il(o.current))};return n.addEventListener("animationstart",p),n.addEventListener("animationcancel",d),n.addEventListener("animationend",d),()=>{f.clearTimeout(u),n.removeEventListener("animationstart",p),n.removeEventListener("animationcancel",d),n.removeEventListener("animationend",d)}}else c("ANIMATION_END")},[n,c]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:h.useCallback(u=>{o.current=u?getComputedStyle(u):null,r(u)},[])}}function Il(e){return(e==null?void 0:e.animationName)||"none"}function fT(e){var o,i;let n=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,r=n&&"isReactWarning"in n&&n.isReactWarning;return r?e.ref:(n=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,r=n&&"isReactWarning"in n&&n.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}function pT(e){const n=hT(e),r=h.forwardRef((o,i)=>{const{children:s,...a}=o,l=h.Children.toArray(s),c=l.find(gT);if(c){const u=c.props.children,f=l.map(d=>d===c?h.Children.count(u)>1?h.Children.only(null):h.isValidElement(u)?u.props.children:null:d);return m.jsx(n,{...a,ref:i,children:h.isValidElement(u)?h.cloneElement(u,void 0,f):null})}return m.jsx(n,{...a,ref:i,children:s})});return r.displayName=`${e}.Slot`,r}function hT(e){const n=h.forwardRef((r,o)=>{const{children:i,...s}=r;if(h.isValidElement(i)){const a=vT(i),l=yT(s,i.props);return i.type!==h.Fragment&&(l.ref=o?ke(o,a):a),h.cloneElement(i,l)}return h.Children.count(i)>1?h.Children.only(null):null});return n.displayName=`${e}.SlotClone`,n}var mT=Symbol("radix.slottable");function gT(e){return h.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===mT}function yT(e,n){const r={...n};for(const o in n){const i=e[o],s=n[o];/^on[A-Z]/.test(o)?i&&s?r[o]=(...l)=>{const c=s(...l);return i(...l),c}:i&&(r[o]=i):o==="style"?r[o]={...i,...s}:o==="className"&&(r[o]=[i,s].filter(Boolean).join(" "))}return{...e,...r}}function vT(e){var o,i;let n=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,r=n&&"isReactWarning"in n&&n.isReactWarning;return r?e.ref:(n=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,r=n&&"isReactWarning"in n&&n.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var xT=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Xm=xT.reduce((e,n)=>{const r=pT(`Primitive.${n}`),o=h.forwardRef((i,s)=>{const{asChild:a,...l}=i,c=a?r:n;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),m.jsx(c,{...l,ref:s})});return o.displayName=`Primitive.${n}`,{...e,[n]:o}},{}),td="Checkbox",[wT]=iT(td),[bT,Km]=wT(td);function _T(e){const{__scopeCheckbox:n,checked:r,children:o,defaultChecked:i,disabled:s,form:a,name:l,onCheckedChange:c,required:u,value:f="on",internal_do_not_use_render:d}=e,[p,g]=Oa({prop:r,defaultProp:i??!1,onChange:c,caller:td}),[v,w]=h.useState(null),[_,y]=h.useState(null),b=h.useRef(!1),x=v?!!a||!!v.closest("form"):!0,S={checked:p,disabled:s,setChecked:g,control:v,setControl:w,name:l,form:a,value:f,hasConsumerStoppedPropagationRef:b,required:u,defaultChecked:zr(i)?!1:i,isFormControl:x,bubbleInput:_,setBubbleInput:y};return m.jsx(bT,{scope:n,...S,children:ST(d)?d(S):o})}var D_="CheckboxTrigger",L_=h.forwardRef(({__scopeCheckbox:e,onKeyDown:n,onClick:r,...o},i)=>{const{control:s,value:a,disabled:l,checked:c,required:u,setControl:f,setChecked:d,hasConsumerStoppedPropagationRef:p,isFormControl:g,bubbleInput:v}=Km(D_,e),w=ve(i,f),_=h.useRef(c);return h.useEffect(()=>{const y=s==null?void 0:s.form;if(y){const b=()=>d(_.current);return y.addEventListener("reset",b),()=>y.removeEventListener("reset",b)}},[s,d]),m.jsx(Xm.button,{type:"button",role:"checkbox","aria-checked":zr(c)?"mixed":c,"aria-required":u,"data-state":H_(c),"data-disabled":l?"":void 0,disabled:l,value:a,...o,ref:w,onKeyDown:re(n,y=>{y.key==="Enter"&&y.preventDefault()}),onClick:re(r,y=>{d(b=>zr(b)?!0:!b),v&&g&&(p.current=y.isPropagationStopped(),p.current||y.stopPropagation())})})});L_.displayName=D_;var qm=h.forwardRef((e,n)=>{const{__scopeCheckbox:r,name:o,checked:i,defaultChecked:s,required:a,disabled:l,value:c,onCheckedChange:u,form:f,...d}=e;return m.jsx(_T,{__scopeCheckbox:r,checked:i,defaultChecked:s,disabled:l,required:a,onCheckedChange:u,name:o,form:f,value:c,internal_do_not_use_render:({isFormControl:p})=>m.jsxs(m.Fragment,{children:[m.jsx(L_,{...d,ref:n,__scopeCheckbox:r}),p&&m.jsx(B_,{__scopeCheckbox:r})]})})});qm.displayName=td;var z_="CheckboxIndicator",F_=h.forwardRef((e,n)=>{const{__scopeCheckbox:r,forceMount:o,...i}=e,s=Km(z_,r);return m.jsx(_t,{present:o||zr(s.checked)||s.checked===!0,children:m.jsx(Xm.span,{"data-state":H_(s.checked),"data-disabled":s.disabled?"":void 0,...i,ref:n,style:{pointerEvents:"none",...e.style}})})});F_.displayName=z_;var V_="CheckboxBubbleInput",B_=h.forwardRef(({__scopeCheckbox:e,...n},r)=>{const{control:o,hasConsumerStoppedPropagationRef:i,checked:s,defaultChecked:a,required:l,disabled:c,name:u,value:f,form:d,bubbleInput:p,setBubbleInput:g}=Km(V_,e),v=ve(r,g),w=Gm(s),_=Ym(o);h.useEffect(()=>{const b=p;if(!b)return;const x=window.HTMLInputElement.prototype,C=Object.getOwnPropertyDescriptor(x,"checked").set,k=!i.current;if(w!==s&&C){const N=new Event("click",{bubbles:k});b.indeterminate=zr(s),C.call(b,zr(s)?!1:s),b.dispatchEvent(N)}},[p,w,s,i]);const y=h.useRef(zr(s)?!1:s);return m.jsx(Xm.input,{type:"checkbox","aria-hidden":!0,defaultChecked:a??y.current,required:l,disabled:c,name:u,value:f,form:d,...n,tabIndex:-1,ref:v,style:{...n.style,..._,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});B_.displayName=V_;function ST(e){return typeof e=="function"}function zr(e){return e==="indeterminate"}function H_(e){return zr(e)?"indeterminate":e?"checked":"unchecked"}const CT=h.forwardRef(({className:e,...n},r)=>m.jsx(qm,{ref:r,className:ae("grid place-content-center peer h-4 w-4 shrink-0 rounded-sm border border-primary shadow focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",e),...n,children:m.jsx(F_,{className:ae("grid place-content-center text-current"),children:m.jsx(Bm,{className:"h-4 w-4"})})}));CT.displayName=qm.displayName;var kT=Iu[" useId ".trim().toString()]||(()=>{}),NT=0;function Tt(e){const[n,r]=h.useState(kT());return Ye(()=>{r(o=>o??String(NT++))},[e]),n?`radix-${n}`:""}var Qy=1,ET=.9,PT=.8,jT=.17,bf=.1,_f=.999,MT=.9999,RT=.99,AT=/[\\\/_+.#"@\[\(\{&]/,TT=/[\\\/_+.#"@\[\(\{&]/g,IT=/[\s-]/,W_=/[\s-]/g;function Kp(e,n,r,o,i,s,a){if(s===n.length)return i===e.length?Qy:RT;var l=`${i},${s}`;if(a[l]!==void 0)return a[l];for(var c=o.charAt(s),u=r.indexOf(c,i),f=0,d,p,g,v;u>=0;)d=Kp(e,n,r,o,u+1,s+1,a),d>f&&(u===i?d*=Qy:AT.test(e.charAt(u-1))?(d*=PT,g=e.slice(i,u-1).match(TT),g&&i>0&&(d*=Math.pow(_f,g.length))):IT.test(e.charAt(u-1))?(d*=ET,v=e.slice(i,u-1).match(W_),v&&i>0&&(d*=Math.pow(_f,v.length))):(d*=jT,i>0&&(d*=Math.pow(_f,u-i))),e.charAt(u)!==n.charAt(s)&&(d*=MT)),(d<bf&&r.charAt(u-1)===o.charAt(s+1)||o.charAt(s+1)===o.charAt(s)&&r.charAt(u-1)!==o.charAt(s))&&(p=Kp(e,n,r,o,u+1,s+2,a),p*bf>d&&(d=p*bf)),d>f&&(f=d),u=r.indexOf(c,u+1);return a[l]=f,f}function Jy(e){return e.toLowerCase().replace(W_," ")}function $T(e,n,r){return e=r&&r.length>0?`${e+" "+r.join(" ")}`:e,Kp(e,n,Jy(e),Jy(n),0,0,{})}function OT(e,n){const r=h.createContext(n),o=s=>{const{children:a,...l}=s,c=h.useMemo(()=>l,Object.values(l));return m.jsx(r.Provider,{value:c,children:a})};o.displayName=e+"Provider";function i(s){const a=h.useContext(r);if(a)return a;if(n!==void 0)return n;throw new Error(`\`${s}\` must be used within \`${e}\``)}return[o,i]}function DT(e,n=[]){let r=[];function o(s,a){const l=h.createContext(a),c=r.length;r=[...r,a];const u=d=>{var y;const{scope:p,children:g,...v}=d,w=((y=p==null?void 0:p[e])==null?void 0:y[c])||l,_=h.useMemo(()=>v,Object.values(v));return m.jsx(w.Provider,{value:_,children:g})};u.displayName=s+"Provider";function f(d,p){var w;const g=((w=p==null?void 0:p[e])==null?void 0:w[c])||l,v=h.useContext(g);if(v)return v;if(a!==void 0)return a;throw new Error(`\`${d}\` must be used within \`${s}\``)}return[u,f]}const i=()=>{const s=r.map(a=>h.createContext(a));return function(l){const c=(l==null?void 0:l[e])||s;return h.useMemo(()=>({[`__scope${e}`]:{...l,[e]:c}}),[l,c])}};return i.scopeName=e,[o,LT(i,...n)]}function LT(...e){const n=e[0];if(e.length===1)return n;const r=()=>{const o=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(s){const a=o.reduce((l,{useScope:c,scopeName:u})=>{const d=c(s)[`__scope${u}`];return{...l,...d}},{});return h.useMemo(()=>({[`__scope${n.scopeName}`]:a}),[a])}};return r.scopeName=n.scopeName,r}function zT(e){const n=FT(e),r=h.forwardRef((o,i)=>{const{children:s,...a}=o,l=h.Children.toArray(s),c=l.find(BT);if(c){const u=c.props.children,f=l.map(d=>d===c?h.Children.count(u)>1?h.Children.only(null):h.isValidElement(u)?u.props.children:null:d);return m.jsx(n,{...a,ref:i,children:h.isValidElement(u)?h.cloneElement(u,void 0,f):null})}return m.jsx(n,{...a,ref:i,children:s})});return r.displayName=`${e}.Slot`,r}function FT(e){const n=h.forwardRef((r,o)=>{const{children:i,...s}=r;if(h.isValidElement(i)){const a=WT(i),l=HT(s,i.props);return i.type!==h.Fragment&&(l.ref=o?ke(o,a):a),h.cloneElement(i,l)}return h.Children.count(i)>1?h.Children.only(null):null});return n.displayName=`${e}.SlotClone`,n}var VT=Symbol("radix.slottable");function BT(e){return h.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===VT}function HT(e,n){const r={...n};for(const o in n){const i=e[o],s=n[o];/^on[A-Z]/.test(o)?i&&s?r[o]=(...l)=>{const c=s(...l);return i(...l),c}:i&&(r[o]=i):o==="style"?r[o]={...i,...s}:o==="className"&&(r[o]=[i,s].filter(Boolean).join(" "))}return{...e,...r}}function WT(e){var o,i;let n=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,r=n&&"isReactWarning"in n&&n.isReactWarning;return r?e.ref:(n=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,r=n&&"isReactWarning"in n&&n.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var UT=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],U_=UT.reduce((e,n)=>{const r=zT(`Primitive.${n}`),o=h.forwardRef((i,s)=>{const{asChild:a,...l}=i,c=a?r:n;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),m.jsx(c,{...l,ref:s})});return o.displayName=`Primitive.${n}`,{...e,[n]:o}},{});function GT(e,n){e&&Lo.flushSync(()=>e.dispatchEvent(n))}function YT(e,n=globalThis==null?void 0:globalThis.document){const r=An(e);h.useEffect(()=>{const o=i=>{i.key==="Escape"&&r(i)};return n.addEventListener("keydown",o,{capture:!0}),()=>n.removeEventListener("keydown",o,{capture:!0})},[r,n])}var XT="DismissableLayer",qp="dismissableLayer.update",KT="dismissableLayer.pointerDownOutside",qT="dismissableLayer.focusOutside",ev,G_=h.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),ns=h.forwardRef((e,n)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:s,onInteractOutside:a,onDismiss:l,...c}=e,u=h.useContext(G_),[f,d]=h.useState(null),p=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,g]=h.useState({}),v=ve(n,N=>d(N)),w=Array.from(u.layers),[_]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),y=w.indexOf(_),b=f?w.indexOf(f):-1,x=u.layersWithOutsidePointerEventsDisabled.size>0,S=b>=y,C=JT(N=>{const E=N.target,P=[...u.branches].some(T=>T.contains(E));!S||P||(i==null||i(N),a==null||a(N),N.defaultPrevented||l==null||l())},p),k=eI(N=>{const E=N.target;[...u.branches].some(T=>T.contains(E))||(s==null||s(N),a==null||a(N),N.defaultPrevented||l==null||l())},p);return YT(N=>{b===u.layers.size-1&&(o==null||o(N),!N.defaultPrevented&&l&&(N.preventDefault(),l()))},p),h.useEffect(()=>{if(f)return r&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(ev=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(f)),u.layers.add(f),tv(),()=>{r&&u.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=ev)}},[f,p,r,u]),h.useEffect(()=>()=>{f&&(u.layers.delete(f),u.layersWithOutsidePointerEventsDisabled.delete(f),tv())},[f,u]),h.useEffect(()=>{const N=()=>g({});return document.addEventListener(qp,N),()=>document.removeEventListener(qp,N)},[]),m.jsx(U_.div,{...c,ref:v,style:{pointerEvents:x?S?"auto":"none":void 0,...e.style},onFocusCapture:re(e.onFocusCapture,k.onFocusCapture),onBlurCapture:re(e.onBlurCapture,k.onBlurCapture),onPointerDownCapture:re(e.onPointerDownCapture,C.onPointerDownCapture)})});ns.displayName=XT;var ZT="DismissableLayerBranch",QT=h.forwardRef((e,n)=>{const r=h.useContext(G_),o=h.useRef(null),i=ve(n,o);return h.useEffect(()=>{const s=o.current;if(s)return r.branches.add(s),()=>{r.branches.delete(s)}},[r.branches]),m.jsx(U_.div,{...e,ref:i})});QT.displayName=ZT;function JT(e,n=globalThis==null?void 0:globalThis.document){const r=An(e),o=h.useRef(!1),i=h.useRef(()=>{});return h.useEffect(()=>{const s=l=>{if(l.target&&!o.current){let c=function(){Y_(KT,r,u,{discrete:!0})};const u={originalEvent:l};l.pointerType==="touch"?(n.removeEventListener("click",i.current),i.current=c,n.addEventListener("click",i.current,{once:!0})):c()}else n.removeEventListener("click",i.current);o.current=!1},a=window.setTimeout(()=>{n.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(a),n.removeEventListener("pointerdown",s),n.removeEventListener("click",i.current)}},[n,r]),{onPointerDownCapture:()=>o.current=!0}}function eI(e,n=globalThis==null?void 0:globalThis.document){const r=An(e),o=h.useRef(!1);return h.useEffect(()=>{const i=s=>{s.target&&!o.current&&Y_(qT,r,{originalEvent:s},{discrete:!1})};return n.addEventListener("focusin",i),()=>n.removeEventListener("focusin",i)},[n,r]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}function tv(){const e=new CustomEvent(qp);document.dispatchEvent(e)}function Y_(e,n,r,{discrete:o}){const i=r.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});n&&i.addEventListener(e,n,{once:!0}),o?GT(i,s):i.dispatchEvent(s)}function tI(e){const n=nI(e),r=h.forwardRef((o,i)=>{const{children:s,...a}=o,l=h.Children.toArray(s),c=l.find(oI);if(c){const u=c.props.children,f=l.map(d=>d===c?h.Children.count(u)>1?h.Children.only(null):h.isValidElement(u)?u.props.children:null:d);return m.jsx(n,{...a,ref:i,children:h.isValidElement(u)?h.cloneElement(u,void 0,f):null})}return m.jsx(n,{...a,ref:i,children:s})});return r.displayName=`${e}.Slot`,r}function nI(e){const n=h.forwardRef((r,o)=>{const{children:i,...s}=r;if(h.isValidElement(i)){const a=sI(i),l=iI(s,i.props);return i.type!==h.Fragment&&(l.ref=o?ke(o,a):a),h.cloneElement(i,l)}return h.Children.count(i)>1?h.Children.only(null):null});return n.displayName=`${e}.SlotClone`,n}var rI=Symbol("radix.slottable");function oI(e){return h.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===rI}function iI(e,n){const r={...n};for(const o in n){const i=e[o],s=n[o];/^on[A-Z]/.test(o)?i&&s?r[o]=(...l)=>{const c=s(...l);return i(...l),c}:i&&(r[o]=i):o==="style"?r[o]={...i,...s}:o==="className"&&(r[o]=[i,s].filter(Boolean).join(" "))}return{...e,...r}}function sI(e){var o,i;let n=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,r=n&&"isReactWarning"in n&&n.isReactWarning;return r?e.ref:(n=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,r=n&&"isReactWarning"in n&&n.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var aI=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],lI=aI.reduce((e,n)=>{const r=tI(`Primitive.${n}`),o=h.forwardRef((i,s)=>{const{asChild:a,...l}=i,c=a?r:n;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),m.jsx(c,{...l,ref:s})});return o.displayName=`Primitive.${n}`,{...e,[n]:o}},{}),Sf="focusScope.autoFocusOnMount",Cf="focusScope.autoFocusOnUnmount",nv={bubbles:!1,cancelable:!0},cI="FocusScope",Da=h.forwardRef((e,n)=>{const{loop:r=!1,trapped:o=!1,onMountAutoFocus:i,onUnmountAutoFocus:s,...a}=e,[l,c]=h.useState(null),u=An(i),f=An(s),d=h.useRef(null),p=ve(n,w=>c(w)),g=h.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;h.useEffect(()=>{if(o){let w=function(x){if(g.paused||!l)return;const S=x.target;l.contains(S)?d.current=S:wr(d.current,{select:!0})},_=function(x){if(g.paused||!l)return;const S=x.relatedTarget;S!==null&&(l.contains(S)||wr(d.current,{select:!0}))},y=function(x){if(document.activeElement===document.body)for(const C of x)C.removedNodes.length>0&&wr(l)};document.addEventListener("focusin",w),document.addEventListener("focusout",_);const b=new MutationObserver(y);return l&&b.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",w),document.removeEventListener("focusout",_),b.disconnect()}}},[o,l,g.paused]),h.useEffect(()=>{if(l){ov.add(g);const w=document.activeElement;if(!l.contains(w)){const y=new CustomEvent(Sf,nv);l.addEventListener(Sf,u),l.dispatchEvent(y),y.defaultPrevented||(uI(mI(X_(l)),{select:!0}),document.activeElement===w&&wr(l))}return()=>{l.removeEventListener(Sf,u),setTimeout(()=>{const y=new CustomEvent(Cf,nv);l.addEventListener(Cf,f),l.dispatchEvent(y),y.defaultPrevented||wr(w??document.body,{select:!0}),l.removeEventListener(Cf,f),ov.remove(g)},0)}}},[l,u,f,g]);const v=h.useCallback(w=>{if(!r&&!o||g.paused)return;const _=w.key==="Tab"&&!w.altKey&&!w.ctrlKey&&!w.metaKey,y=document.activeElement;if(_&&y){const b=w.currentTarget,[x,S]=dI(b);x&&S?!w.shiftKey&&y===S?(w.preventDefault(),r&&wr(x,{select:!0})):w.shiftKey&&y===x&&(w.preventDefault(),r&&wr(S,{select:!0})):y===b&&w.preventDefault()}},[r,o,g.paused]);return m.jsx(lI.div,{tabIndex:-1,...a,ref:p,onKeyDown:v})});Da.displayName=cI;function uI(e,{select:n=!1}={}){const r=document.activeElement;for(const o of e)if(wr(o,{select:n}),document.activeElement!==r)return}function dI(e){const n=X_(e),r=rv(n,e),o=rv(n.reverse(),e);return[r,o]}function X_(e){const n=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{const i=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||i?NodeFilter.FILTER_SKIP:o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)n.push(r.currentNode);return n}function rv(e,n){for(const r of e)if(!fI(r,{upTo:n}))return r}function fI(e,{upTo:n}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(n!==void 0&&e===n)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function pI(e){return e instanceof HTMLInputElement&&"select"in e}function wr(e,{select:n=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&pI(e)&&n&&e.select()}}var ov=hI();function hI(){let e=[];return{add(n){const r=e[0];n!==r&&(r==null||r.pause()),e=iv(e,n),e.unshift(n)},remove(n){var r;e=iv(e,n),(r=e[0])==null||r.resume()}}}function iv(e,n){const r=[...e],o=r.indexOf(n);return o!==-1&&r.splice(o,1),r}function mI(e){return e.filter(n=>n.tagName!=="A")}function gI(e){const n=yI(e),r=h.forwardRef((o,i)=>{const{children:s,...a}=o,l=h.Children.toArray(s),c=l.find(xI);if(c){const u=c.props.children,f=l.map(d=>d===c?h.Children.count(u)>1?h.Children.only(null):h.isValidElement(u)?u.props.children:null:d);return m.jsx(n,{...a,ref:i,children:h.isValidElement(u)?h.cloneElement(u,void 0,f):null})}return m.jsx(n,{...a,ref:i,children:s})});return r.displayName=`${e}.Slot`,r}function yI(e){const n=h.forwardRef((r,o)=>{const{children:i,...s}=r;if(h.isValidElement(i)){const a=bI(i),l=wI(s,i.props);return i.type!==h.Fragment&&(l.ref=o?ke(o,a):a),h.cloneElement(i,l)}return h.Children.count(i)>1?h.Children.only(null):null});return n.displayName=`${e}.SlotClone`,n}var vI=Symbol("radix.slottable");function xI(e){return h.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===vI}function wI(e,n){const r={...n};for(const o in n){const i=e[o],s=n[o];/^on[A-Z]/.test(o)?i&&s?r[o]=(...l)=>{const c=s(...l);return i(...l),c}:i&&(r[o]=i):o==="style"?r[o]={...i,...s}:o==="className"&&(r[o]=[i,s].filter(Boolean).join(" "))}return{...e,...r}}function bI(e){var o,i;let n=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,r=n&&"isReactWarning"in n&&n.isReactWarning;return r?e.ref:(n=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,r=n&&"isReactWarning"in n&&n.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var _I=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],SI=_I.reduce((e,n)=>{const r=gI(`Primitive.${n}`),o=h.forwardRef((i,s)=>{const{asChild:a,...l}=i,c=a?r:n;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),m.jsx(c,{...l,ref:s})});return o.displayName=`Primitive.${n}`,{...e,[n]:o}},{}),CI="Portal",rs=h.forwardRef((e,n)=>{var l;const{container:r,...o}=e,[i,s]=h.useState(!1);Ye(()=>s(!0),[]);const a=r||i&&((l=globalThis==null?void 0:globalThis.document)==null?void 0:l.body);return a?uR.createPortal(m.jsx(SI.div,{...o,ref:n}),a):null});rs.displayName=CI;function K_(e){const n=kI(e),r=h.forwardRef((o,i)=>{const{children:s,...a}=o,l=h.Children.toArray(s),c=l.find(EI);if(c){const u=c.props.children,f=l.map(d=>d===c?h.Children.count(u)>1?h.Children.only(null):h.isValidElement(u)?u.props.children:null:d);return m.jsx(n,{...a,ref:i,children:h.isValidElement(u)?h.cloneElement(u,void 0,f):null})}return m.jsx(n,{...a,ref:i,children:s})});return r.displayName=`${e}.Slot`,r}function kI(e){const n=h.forwardRef((r,o)=>{const{children:i,...s}=r;if(h.isValidElement(i)){const a=jI(i),l=PI(s,i.props);return i.type!==h.Fragment&&(l.ref=o?ke(o,a):a),h.cloneElement(i,l)}return h.Children.count(i)>1?h.Children.only(null):null});return n.displayName=`${e}.SlotClone`,n}var NI=Symbol("radix.slottable");function EI(e){return h.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===NI}function PI(e,n){const r={...n};for(const o in n){const i=e[o],s=n[o];/^on[A-Z]/.test(o)?i&&s?r[o]=(...l)=>{const c=s(...l);return i(...l),c}:i&&(r[o]=i):o==="style"?r[o]={...i,...s}:o==="className"&&(r[o]=[i,s].filter(Boolean).join(" "))}return{...e,...r}}function jI(e){var o,i;let n=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,r=n&&"isReactWarning"in n&&n.isReactWarning;return r?e.ref:(n=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,r=n&&"isReactWarning"in n&&n.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var MI=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],La=MI.reduce((e,n)=>{const r=K_(`Primitive.${n}`),o=h.forwardRef((i,s)=>{const{asChild:a,...l}=i,c=a?r:n;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),m.jsx(c,{...l,ref:s})});return o.displayName=`Primitive.${n}`,{...e,[n]:o}},{}),kf=0;function nd(){h.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??sv()),document.body.insertAdjacentElement("beforeend",e[1]??sv()),kf++,()=>{kf===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(n=>n.remove()),kf--}},[])}function sv(){const 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 kn=function(){return kn=Object.assign||function(n){for(var r,o=1,i=arguments.length;o<i;o++){r=arguments[o];for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&(n[s]=r[s])}return n},kn.apply(this,arguments)};function q_(e,n){var r={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&n.indexOf(o)<0&&(r[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,o=Object.getOwnPropertySymbols(e);i<o.length;i++)n.indexOf(o[i])<0&&Object.prototype.propertyIsEnumerable.call(e,o[i])&&(r[o[i]]=e[o[i]]);return r}function RI(e,n,r){if(r||arguments.length===2)for(var o=0,i=n.length,s;o<i;o++)(s||!(o in n))&&(s||(s=Array.prototype.slice.call(n,0,o)),s[o]=n[o]);return e.concat(s||Array.prototype.slice.call(n))}var gc="right-scroll-bar-position",yc="width-before-scroll-bar",AI="with-scroll-bars-hidden",TI="--removed-body-scroll-bar-size";function Nf(e,n){return typeof e=="function"?e(n):e&&(e.current=n),e}function II(e,n){var r=h.useState(function(){return{value:e,callback:n,facade:{get current(){return r.value},set current(o){var i=r.value;i!==o&&(r.value=o,r.callback(o,i))}}}})[0];return r.callback=n,r.facade}var $I=typeof window<"u"?h.useLayoutEffect:h.useEffect,av=new WeakMap;function OI(e,n){var r=II(null,function(o){return e.forEach(function(i){return Nf(i,o)})});return $I(function(){var o=av.get(r);if(o){var i=new Set(o),s=new Set(e),a=r.current;i.forEach(function(l){s.has(l)||Nf(l,null)}),s.forEach(function(l){i.has(l)||Nf(l,a)})}av.set(r,e)},[e]),r}function DI(e){return e}function LI(e,n){n===void 0&&(n=DI);var r=[],o=!1,i={read:function(){if(o)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(s){var a=n(s,o);return r.push(a),function(){r=r.filter(function(l){return l!==a})}},assignSyncMedium:function(s){for(o=!0;r.length;){var a=r;r=[],a.forEach(s)}r={push:function(l){return s(l)},filter:function(){return r}}},assignMedium:function(s){o=!0;var a=[];if(r.length){var l=r;r=[],l.forEach(s),a=r}var c=function(){var f=a;a=[],f.forEach(s)},u=function(){return Promise.resolve().then(c)};u(),r={push:function(f){a.push(f),u()},filter:function(f){return a=a.filter(f),r}}}};return i}function zI(e){e===void 0&&(e={});var n=LI(null);return n.options=kn({async:!0,ssr:!1},e),n}var Z_=function(e){var n=e.sideCar,r=q_(e,["sideCar"]);if(!n)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var o=n.read();if(!o)throw new Error("Sidecar medium not found");return h.createElement(o,kn({},r))};Z_.isSideCarExport=!0;function FI(e,n){return e.useMedium(n),Z_}var Q_=zI(),Ef=function(){},rd=h.forwardRef(function(e,n){var r=h.useRef(null),o=h.useState({onScrollCapture:Ef,onWheelCapture:Ef,onTouchMoveCapture:Ef}),i=o[0],s=o[1],a=e.forwardProps,l=e.children,c=e.className,u=e.removeScrollBar,f=e.enabled,d=e.shards,p=e.sideCar,g=e.noRelative,v=e.noIsolation,w=e.inert,_=e.allowPinchZoom,y=e.as,b=y===void 0?"div":y,x=e.gapMode,S=q_(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),C=p,k=OI([r,n]),N=kn(kn({},S),i);return h.createElement(h.Fragment,null,f&&h.createElement(C,{sideCar:Q_,removeScrollBar:u,shards:d,noRelative:g,noIsolation:v,inert:w,setCallbacks:s,allowPinchZoom:!!_,lockRef:r,gapMode:x}),a?h.cloneElement(h.Children.only(l),kn(kn({},N),{ref:k})):h.createElement(b,kn({},N,{className:c,ref:k}),l))});rd.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};rd.classNames={fullWidth:yc,zeroRight:gc};var VI=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function BI(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var n=VI();return n&&e.setAttribute("nonce",n),e}function HI(e,n){e.styleSheet?e.styleSheet.cssText=n:e.appendChild(document.createTextNode(n))}function WI(e){var n=document.head||document.getElementsByTagName("head")[0];n.appendChild(e)}var UI=function(){var e=0,n=null;return{add:function(r){e==0&&(n=BI())&&(HI(n,r),WI(n)),e++},remove:function(){e--,!e&&n&&(n.parentNode&&n.parentNode.removeChild(n),n=null)}}},GI=function(){var e=UI();return function(n,r){h.useEffect(function(){return e.add(n),function(){e.remove()}},[n&&r])}},J_=function(){var e=GI(),n=function(r){var o=r.styles,i=r.dynamic;return e(o,i),null};return n},YI={left:0,top:0,right:0,gap:0},Pf=function(e){return parseInt(e||"",10)||0},XI=function(e){var n=window.getComputedStyle(document.body),r=n[e==="padding"?"paddingLeft":"marginLeft"],o=n[e==="padding"?"paddingTop":"marginTop"],i=n[e==="padding"?"paddingRight":"marginRight"];return[Pf(r),Pf(o),Pf(i)]},KI=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return YI;var n=XI(e),r=document.documentElement.clientWidth,o=window.innerWidth;return{left:n[0],top:n[1],right:n[2],gap:Math.max(0,o-r+n[2]-n[0])}},qI=J_(),ki="data-scroll-locked",ZI=function(e,n,r,o){var i=e.left,s=e.top,a=e.right,l=e.gap;return r===void 0&&(r="margin"),`
331
- .`.concat(AI,` {
332
- overflow: hidden `).concat(o,`;
333
- padding-right: `).concat(l,"px ").concat(o,`;
334
- }
335
- body[`).concat(ki,`] {
336
- overflow: hidden `).concat(o,`;
337
- overscroll-behavior: contain;
338
- `).concat([n&&"position: relative ".concat(o,";"),r==="margin"&&`
339
- padding-left: `.concat(i,`px;
340
- padding-top: `).concat(s,`px;
341
- padding-right: `).concat(a,`px;
342
- margin-left:0;
343
- margin-top:0;
344
- margin-right: `).concat(l,"px ").concat(o,`;
345
- `),r==="padding"&&"padding-right: ".concat(l,"px ").concat(o,";")].filter(Boolean).join(""),`
346
- }
347
-
348
- .`).concat(gc,` {
349
- right: `).concat(l,"px ").concat(o,`;
350
- }
351
-
352
- .`).concat(yc,` {
353
- margin-right: `).concat(l,"px ").concat(o,`;
354
- }
355
-
356
- .`).concat(gc," .").concat(gc,` {
357
- right: 0 `).concat(o,`;
358
- }
359
-
360
- .`).concat(yc," .").concat(yc,` {
361
- margin-right: 0 `).concat(o,`;
362
- }
363
-
364
- body[`).concat(ki,`] {
365
- `).concat(TI,": ").concat(l,`px;
366
- }
367
- `)},lv=function(){var e=parseInt(document.body.getAttribute(ki)||"0",10);return isFinite(e)?e:0},QI=function(){h.useEffect(function(){return document.body.setAttribute(ki,(lv()+1).toString()),function(){var e=lv()-1;e<=0?document.body.removeAttribute(ki):document.body.setAttribute(ki,e.toString())}},[])},JI=function(e){var n=e.noRelative,r=e.noImportant,o=e.gapMode,i=o===void 0?"margin":o;QI();var s=h.useMemo(function(){return KI(i)},[i]);return h.createElement(qI,{styles:ZI(s,!n,i,r?"":"!important")})},Zp=!1;if(typeof window<"u")try{var $l=Object.defineProperty({},"passive",{get:function(){return Zp=!0,!0}});window.addEventListener("test",$l,$l),window.removeEventListener("test",$l,$l)}catch{Zp=!1}var Yo=Zp?{passive:!1}:!1,e$=function(e){return e.tagName==="TEXTAREA"},eS=function(e,n){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return r[n]!=="hidden"&&!(r.overflowY===r.overflowX&&!e$(e)&&r[n]==="visible")},t$=function(e){return eS(e,"overflowY")},n$=function(e){return eS(e,"overflowX")},cv=function(e,n){var r=n.ownerDocument,o=n;do{typeof ShadowRoot<"u"&&o instanceof ShadowRoot&&(o=o.host);var i=tS(e,o);if(i){var s=nS(e,o),a=s[1],l=s[2];if(a>l)return!0}o=o.parentNode}while(o&&o!==r.body);return!1},r$=function(e){var n=e.scrollTop,r=e.scrollHeight,o=e.clientHeight;return[n,r,o]},o$=function(e){var n=e.scrollLeft,r=e.scrollWidth,o=e.clientWidth;return[n,r,o]},tS=function(e,n){return e==="v"?t$(n):n$(n)},nS=function(e,n){return e==="v"?r$(n):o$(n)},i$=function(e,n){return e==="h"&&n==="rtl"?-1:1},s$=function(e,n,r,o,i){var s=i$(e,window.getComputedStyle(n).direction),a=s*o,l=r.target,c=n.contains(l),u=!1,f=a>0,d=0,p=0;do{if(!l)break;var g=nS(e,l),v=g[0],w=g[1],_=g[2],y=w-_-s*v;(v||y)&&tS(e,l)&&(d+=y,p+=v);var b=l.parentNode;l=b&&b.nodeType===Node.DOCUMENT_FRAGMENT_NODE?b.host:b}while(!c&&l!==document.body||c&&(n.contains(l)||n===l));return(f&&Math.abs(d)<1||!f&&Math.abs(p)<1)&&(u=!0),u},Ol=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},uv=function(e){return[e.deltaX,e.deltaY]},dv=function(e){return e&&"current"in e?e.current:e},a$=function(e,n){return e[0]===n[0]&&e[1]===n[1]},l$=function(e){return`
368
- .block-interactivity-`.concat(e,` {pointer-events: none;}
369
- .allow-interactivity-`).concat(e,` {pointer-events: all;}
370
- `)},c$=0,Xo=[];function u$(e){var n=h.useRef([]),r=h.useRef([0,0]),o=h.useRef(),i=h.useState(c$++)[0],s=h.useState(J_)[0],a=h.useRef(e);h.useEffect(function(){a.current=e},[e]),h.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var w=RI([e.lockRef.current],(e.shards||[]).map(dv),!0).filter(Boolean);return w.forEach(function(_){return _.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),w.forEach(function(_){return _.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var l=h.useCallback(function(w,_){if("touches"in w&&w.touches.length===2||w.type==="wheel"&&w.ctrlKey)return!a.current.allowPinchZoom;var y=Ol(w),b=r.current,x="deltaX"in w?w.deltaX:b[0]-y[0],S="deltaY"in w?w.deltaY:b[1]-y[1],C,k=w.target,N=Math.abs(x)>Math.abs(S)?"h":"v";if("touches"in w&&N==="h"&&k.type==="range")return!1;var E=window.getSelection(),P=E&&E.anchorNode,T=P?P===k||P.contains(k):!1;if(T)return!1;var A=cv(N,k);if(!A)return!0;if(A?C=N:(C=N==="v"?"h":"v",A=cv(N,k)),!A)return!1;if(!o.current&&"changedTouches"in w&&(x||S)&&(o.current=C),!C)return!0;var D=o.current||C;return s$(D,_,w,D==="h"?x:S)},[]),c=h.useCallback(function(w){var _=w;if(!(!Xo.length||Xo[Xo.length-1]!==s)){var y="deltaY"in _?uv(_):Ol(_),b=n.current.filter(function(C){return C.name===_.type&&(C.target===_.target||_.target===C.shadowParent)&&a$(C.delta,y)})[0];if(b&&b.should){_.cancelable&&_.preventDefault();return}if(!b){var x=(a.current.shards||[]).map(dv).filter(Boolean).filter(function(C){return C.contains(_.target)}),S=x.length>0?l(_,x[0]):!a.current.noIsolation;S&&_.cancelable&&_.preventDefault()}}},[]),u=h.useCallback(function(w,_,y,b){var x={name:w,delta:_,target:y,should:b,shadowParent:d$(y)};n.current.push(x),setTimeout(function(){n.current=n.current.filter(function(S){return S!==x})},1)},[]),f=h.useCallback(function(w){r.current=Ol(w),o.current=void 0},[]),d=h.useCallback(function(w){u(w.type,uv(w),w.target,l(w,e.lockRef.current))},[]),p=h.useCallback(function(w){u(w.type,Ol(w),w.target,l(w,e.lockRef.current))},[]);h.useEffect(function(){return Xo.push(s),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:p}),document.addEventListener("wheel",c,Yo),document.addEventListener("touchmove",c,Yo),document.addEventListener("touchstart",f,Yo),function(){Xo=Xo.filter(function(w){return w!==s}),document.removeEventListener("wheel",c,Yo),document.removeEventListener("touchmove",c,Yo),document.removeEventListener("touchstart",f,Yo)}},[]);var g=e.removeScrollBar,v=e.inert;return h.createElement(h.Fragment,null,v?h.createElement(s,{styles:l$(i)}):null,g?h.createElement(JI,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function d$(e){for(var n=null;e!==null;)e instanceof ShadowRoot&&(n=e.host,e=e.host),e=e.parentNode;return n}const f$=FI(Q_,u$);var za=h.forwardRef(function(e,n){return h.createElement(rd,kn({},e,{ref:n,sideCar:f$}))});za.classNames=rd.classNames;var p$=function(e){if(typeof document>"u")return null;var n=Array.isArray(e)?e[0]:e;return n.ownerDocument.body},Ko=new WeakMap,Dl=new WeakMap,Ll={},jf=0,rS=function(e){return e&&(e.host||rS(e.parentNode))},h$=function(e,n){return n.map(function(r){if(e.contains(r))return r;var o=rS(r);return o&&e.contains(o)?o:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},m$=function(e,n,r,o){var i=h$(n,Array.isArray(e)?e:[e]);Ll[r]||(Ll[r]=new WeakMap);var s=Ll[r],a=[],l=new Set,c=new Set(i),u=function(d){!d||l.has(d)||(l.add(d),u(d.parentNode))};i.forEach(u);var f=function(d){!d||c.has(d)||Array.prototype.forEach.call(d.children,function(p){if(l.has(p))f(p);else try{var g=p.getAttribute(o),v=g!==null&&g!=="false",w=(Ko.get(p)||0)+1,_=(s.get(p)||0)+1;Ko.set(p,w),s.set(p,_),a.push(p),w===1&&v&&Dl.set(p,!0),_===1&&p.setAttribute(r,"true"),v||p.setAttribute(o,"true")}catch(y){console.error("aria-hidden: cannot operate on ",p,y)}})};return f(n),l.clear(),jf++,function(){a.forEach(function(d){var p=Ko.get(d)-1,g=s.get(d)-1;Ko.set(d,p),s.set(d,g),p||(Dl.has(d)||d.removeAttribute(o),Dl.delete(d)),g||d.removeAttribute(r)}),jf--,jf||(Ko=new WeakMap,Ko=new WeakMap,Dl=new WeakMap,Ll={})}},od=function(e,n,r){r===void 0&&(r="data-aria-hidden");var o=Array.from(Array.isArray(e)?e:[e]),i=p$(e);return i?(o.push.apply(o,Array.from(i.querySelectorAll("[aria-live], script"))),m$(o,i,r,"aria-hidden")):function(){return null}},id="Dialog",[oS]=DT(id),[g$,yn]=oS(id),iS=e=>{const{__scopeDialog:n,children:r,open:o,defaultOpen:i,onOpenChange:s,modal:a=!0}=e,l=h.useRef(null),c=h.useRef(null),[u,f]=Oa({prop:o,defaultProp:i??!1,onChange:s,caller:id});return m.jsx(g$,{scope:n,triggerRef:l,contentRef:c,contentId:Tt(),titleId:Tt(),descriptionId:Tt(),open:u,onOpenChange:f,onOpenToggle:h.useCallback(()=>f(d=>!d),[f]),modal:a,children:r})};iS.displayName=id;var sS="DialogTrigger",y$=h.forwardRef((e,n)=>{const{__scopeDialog:r,...o}=e,i=yn(sS,r),s=ve(n,i.triggerRef);return m.jsx(La.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":Jm(i.open),...o,ref:s,onClick:re(e.onClick,i.onOpenToggle)})});y$.displayName=sS;var Zm="DialogPortal",[v$,aS]=oS(Zm,{forceMount:void 0}),lS=e=>{const{__scopeDialog:n,forceMount:r,children:o,container:i}=e,s=yn(Zm,n);return m.jsx(v$,{scope:n,forceMount:r,children:h.Children.map(o,a=>m.jsx(_t,{present:r||s.open,children:m.jsx(rs,{asChild:!0,container:i,children:a})}))})};lS.displayName=Zm;var nu="DialogOverlay",cS=h.forwardRef((e,n)=>{const r=aS(nu,e.__scopeDialog),{forceMount:o=r.forceMount,...i}=e,s=yn(nu,e.__scopeDialog);return s.modal?m.jsx(_t,{present:o||s.open,children:m.jsx(w$,{...i,ref:n})}):null});cS.displayName=nu;var x$=K_("DialogOverlay.RemoveScroll"),w$=h.forwardRef((e,n)=>{const{__scopeDialog:r,...o}=e,i=yn(nu,r);return m.jsx(za,{as:x$,allowPinchZoom:!0,shards:[i.contentRef],children:m.jsx(La.div,{"data-state":Jm(i.open),...o,ref:n,style:{pointerEvents:"auto",...o.style}})})}),Po="DialogContent",uS=h.forwardRef((e,n)=>{const r=aS(Po,e.__scopeDialog),{forceMount:o=r.forceMount,...i}=e,s=yn(Po,e.__scopeDialog);return m.jsx(_t,{present:o||s.open,children:s.modal?m.jsx(b$,{...i,ref:n}):m.jsx(_$,{...i,ref:n})})});uS.displayName=Po;var b$=h.forwardRef((e,n)=>{const r=yn(Po,e.__scopeDialog),o=h.useRef(null),i=ve(n,r.contentRef,o);return h.useEffect(()=>{const s=o.current;if(s)return od(s)},[]),m.jsx(dS,{...e,ref:i,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:re(e.onCloseAutoFocus,s=>{var a;s.preventDefault(),(a=r.triggerRef.current)==null||a.focus()}),onPointerDownOutside:re(e.onPointerDownOutside,s=>{const a=s.detail.originalEvent,l=a.button===0&&a.ctrlKey===!0;(a.button===2||l)&&s.preventDefault()}),onFocusOutside:re(e.onFocusOutside,s=>s.preventDefault())})}),_$=h.forwardRef((e,n)=>{const r=yn(Po,e.__scopeDialog),o=h.useRef(!1),i=h.useRef(!1);return m.jsx(dS,{...e,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{var a,l;(a=e.onCloseAutoFocus)==null||a.call(e,s),s.defaultPrevented||(o.current||(l=r.triggerRef.current)==null||l.focus(),s.preventDefault()),o.current=!1,i.current=!1},onInteractOutside:s=>{var c,u;(c=e.onInteractOutside)==null||c.call(e,s),s.defaultPrevented||(o.current=!0,s.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const a=s.target;((u=r.triggerRef.current)==null?void 0:u.contains(a))&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&i.current&&s.preventDefault()}})}),dS=h.forwardRef((e,n)=>{const{__scopeDialog:r,trapFocus:o,onOpenAutoFocus:i,onCloseAutoFocus:s,...a}=e,l=yn(Po,r),c=h.useRef(null),u=ve(n,c);return nd(),m.jsxs(m.Fragment,{children:[m.jsx(Da,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:i,onUnmountAutoFocus:s,children:m.jsx(ns,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":Jm(l.open),...a,ref:u,onDismiss:()=>l.onOpenChange(!1)})}),m.jsxs(m.Fragment,{children:[m.jsx(S$,{titleId:l.titleId}),m.jsx(k$,{contentRef:c,descriptionId:l.descriptionId})]})]})}),Qm="DialogTitle",fS=h.forwardRef((e,n)=>{const{__scopeDialog:r,...o}=e,i=yn(Qm,r);return m.jsx(La.h2,{id:i.titleId,...o,ref:n})});fS.displayName=Qm;var pS="DialogDescription",hS=h.forwardRef((e,n)=>{const{__scopeDialog:r,...o}=e,i=yn(pS,r);return m.jsx(La.p,{id:i.descriptionId,...o,ref:n})});hS.displayName=pS;var mS="DialogClose",gS=h.forwardRef((e,n)=>{const{__scopeDialog:r,...o}=e,i=yn(mS,r);return m.jsx(La.button,{type:"button",...o,ref:n,onClick:re(e.onClick,()=>i.onOpenChange(!1))})});gS.displayName=mS;function Jm(e){return e?"open":"closed"}var yS="DialogTitleWarning",[$K,vS]=OT(yS,{contentName:Po,titleName:Qm,docsSlug:"dialog"}),S$=({titleId:e})=>{const n=vS(yS),r=`\`${n.contentName}\` requires a \`${n.titleName}\` for the component to be accessible for screen reader users.
371
-
372
- If you want to hide the \`${n.titleName}\`, you can wrap it with our VisuallyHidden component.
373
-
374
- For more information, see https://radix-ui.com/primitives/docs/components/${n.docsSlug}`;return h.useEffect(()=>{e&&(document.getElementById(e)||console.error(r))},[r,e]),null},C$="DialogDescriptionWarning",k$=({contentRef:e,descriptionId:n})=>{const o=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${vS(C$).contentName}}.`;return h.useEffect(()=>{var s;const i=(s=e.current)==null?void 0:s.getAttribute("aria-describedby");n&&i&&(document.getElementById(n)||console.warn(o))},[o,e,n]),null},N$=iS,eg=lS,Fa=cS,Va=uS,sd=fS,ad=hS,xS=gS,gs='[cmdk-group=""]',Mf='[cmdk-group-items=""]',E$='[cmdk-group-heading=""]',wS='[cmdk-item=""]',fv=`${wS}:not([aria-disabled="true"])`,Qp="cmdk-item-select",ni="data-value",P$=(e,n,r)=>$T(e,n,r),bS=h.createContext(void 0),Ba=()=>h.useContext(bS),_S=h.createContext(void 0),tg=()=>h.useContext(_S),SS=h.createContext(void 0),CS=h.forwardRef((e,n)=>{let r=ri(()=>{var $,X;return{search:"",value:(X=($=e.value)!=null?$:e.defaultValue)!=null?X:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),o=ri(()=>new Set),i=ri(()=>new Map),s=ri(()=>new Map),a=ri(()=>new Set),l=kS(e),{label:c,children:u,value:f,onValueChange:d,filter:p,shouldFilter:g,loop:v,disablePointerSelection:w=!1,vimBindings:_=!0,...y}=e,b=Tt(),x=Tt(),S=Tt(),C=h.useRef(null),k=z$();jo(()=>{if(f!==void 0){let $=f.trim();r.current.value=$,N.emit()}},[f]),jo(()=>{k(6,V)},[]);let N=h.useMemo(()=>({subscribe:$=>(a.current.add($),()=>a.current.delete($)),snapshot:()=>r.current,setState:($,X,F)=>{var H,G,U,Y;if(!Object.is(r.current[$],X)){if(r.current[$]=X,$==="search")D(),T(),k(1,A);else if($==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let q=document.getElementById(S);q?q.focus():(H=document.getElementById(b))==null||H.focus()}if(k(7,()=>{var q;r.current.selectedItemId=(q=j())==null?void 0:q.id,N.emit()}),F||k(5,V),((G=l.current)==null?void 0:G.value)!==void 0){let q=X??"";(Y=(U=l.current).onValueChange)==null||Y.call(U,q);return}}N.emit()}},emit:()=>{a.current.forEach($=>$())}}),[]),E=h.useMemo(()=>({value:($,X,F)=>{var H;X!==((H=s.current.get($))==null?void 0:H.value)&&(s.current.set($,{value:X,keywords:F}),r.current.filtered.items.set($,P(X,F)),k(2,()=>{T(),N.emit()}))},item:($,X)=>(o.current.add($),X&&(i.current.has(X)?i.current.get(X).add($):i.current.set(X,new Set([$]))),k(3,()=>{D(),T(),r.current.value||A(),N.emit()}),()=>{s.current.delete($),o.current.delete($),r.current.filtered.items.delete($);let F=j();k(4,()=>{D(),(F==null?void 0:F.getAttribute("id"))===$&&A(),N.emit()})}),group:$=>(i.current.has($)||i.current.set($,new Set),()=>{s.current.delete($),i.current.delete($)}),filter:()=>l.current.shouldFilter,label:c||e["aria-label"],getDisablePointerSelection:()=>l.current.disablePointerSelection,listId:b,inputId:S,labelId:x,listInnerRef:C}),[]);function P($,X){var F,H;let G=(H=(F=l.current)==null?void 0:F.filter)!=null?H:P$;return $?G($,r.current.search,X):0}function T(){if(!r.current.search||l.current.shouldFilter===!1)return;let $=r.current.filtered.items,X=[];r.current.filtered.groups.forEach(H=>{let G=i.current.get(H),U=0;G.forEach(Y=>{let q=$.get(Y);U=Math.max(q,U)}),X.push([H,U])});let F=C.current;L().sort((H,G)=>{var U,Y;let q=H.getAttribute("id"),te=G.getAttribute("id");return((U=$.get(te))!=null?U:0)-((Y=$.get(q))!=null?Y:0)}).forEach(H=>{let G=H.closest(Mf);G?G.appendChild(H.parentElement===G?H:H.closest(`${Mf} > *`)):F.appendChild(H.parentElement===F?H:H.closest(`${Mf} > *`))}),X.sort((H,G)=>G[1]-H[1]).forEach(H=>{var G;let U=(G=C.current)==null?void 0:G.querySelector(`${gs}[${ni}="${encodeURIComponent(H[0])}"]`);U==null||U.parentElement.appendChild(U)})}function A(){let $=L().find(F=>F.getAttribute("aria-disabled")!=="true"),X=$==null?void 0:$.getAttribute(ni);N.setState("value",X||void 0)}function D(){var $,X,F,H;if(!r.current.search||l.current.shouldFilter===!1){r.current.filtered.count=o.current.size;return}r.current.filtered.groups=new Set;let G=0;for(let U of o.current){let Y=(X=($=s.current.get(U))==null?void 0:$.value)!=null?X:"",q=(H=(F=s.current.get(U))==null?void 0:F.keywords)!=null?H:[],te=P(Y,q);r.current.filtered.items.set(U,te),te>0&&G++}for(let[U,Y]of i.current)for(let q of Y)if(r.current.filtered.items.get(q)>0){r.current.filtered.groups.add(U);break}r.current.filtered.count=G}function V(){var $,X,F;let H=j();H&&((($=H.parentElement)==null?void 0:$.firstChild)===H&&((F=(X=H.closest(gs))==null?void 0:X.querySelector(E$))==null||F.scrollIntoView({block:"nearest"})),H.scrollIntoView({block:"nearest"}))}function j(){var $;return($=C.current)==null?void 0:$.querySelector(`${wS}[aria-selected="true"]`)}function L(){var $;return Array.from((($=C.current)==null?void 0:$.querySelectorAll(fv))||[])}function I($){let X=L()[$];X&&N.setState("value",X.getAttribute(ni))}function z($){var X;let F=j(),H=L(),G=H.findIndex(Y=>Y===F),U=H[G+$];(X=l.current)!=null&&X.loop&&(U=G+$<0?H[H.length-1]:G+$===H.length?H[0]:H[G+$]),U&&N.setState("value",U.getAttribute(ni))}function M($){let X=j(),F=X==null?void 0:X.closest(gs),H;for(;F&&!H;)F=$>0?D$(F,gs):L$(F,gs),H=F==null?void 0:F.querySelector(fv);H?N.setState("value",H.getAttribute(ni)):z($)}let R=()=>I(L().length-1),O=$=>{$.preventDefault(),$.metaKey?R():$.altKey?M(1):z(1)},W=$=>{$.preventDefault(),$.metaKey?I(0):$.altKey?M(-1):z(-1)};return h.createElement(pt.div,{ref:n,tabIndex:-1,...y,"cmdk-root":"",onKeyDown:$=>{var X;(X=y.onKeyDown)==null||X.call(y,$);let F=$.nativeEvent.isComposing||$.keyCode===229;if(!($.defaultPrevented||F))switch($.key){case"n":case"j":{_&&$.ctrlKey&&O($);break}case"ArrowDown":{O($);break}case"p":case"k":{_&&$.ctrlKey&&W($);break}case"ArrowUp":{W($);break}case"Home":{$.preventDefault(),I(0);break}case"End":{$.preventDefault(),R();break}case"Enter":{$.preventDefault();let H=j();if(H){let G=new Event(Qp);H.dispatchEvent(G)}}}}},h.createElement("label",{"cmdk-label":"",htmlFor:E.inputId,id:E.labelId,style:V$},c),ld(e,$=>h.createElement(_S.Provider,{value:N},h.createElement(bS.Provider,{value:E},$))))}),j$=h.forwardRef((e,n)=>{var r,o;let i=Tt(),s=h.useRef(null),a=h.useContext(SS),l=Ba(),c=kS(e),u=(o=(r=c.current)==null?void 0:r.forceMount)!=null?o:a==null?void 0:a.forceMount;jo(()=>{if(!u)return l.item(i,a==null?void 0:a.id)},[u]);let f=NS(i,s,[e.value,e.children,s],e.keywords),d=tg(),p=Hr(k=>k.value&&k.value===f.current),g=Hr(k=>u||l.filter()===!1?!0:k.search?k.filtered.items.get(i)>0:!0);h.useEffect(()=>{let k=s.current;if(!(!k||e.disabled))return k.addEventListener(Qp,v),()=>k.removeEventListener(Qp,v)},[g,e.onSelect,e.disabled]);function v(){var k,N;w(),(N=(k=c.current).onSelect)==null||N.call(k,f.current)}function w(){d.setState("value",f.current,!0)}if(!g)return null;let{disabled:_,value:y,onSelect:b,forceMount:x,keywords:S,...C}=e;return h.createElement(pt.div,{ref:ke(s,n),...C,id:i,"cmdk-item":"",role:"option","aria-disabled":!!_,"aria-selected":!!p,"data-disabled":!!_,"data-selected":!!p,onPointerMove:_||l.getDisablePointerSelection()?void 0:w,onClick:_?void 0:v},e.children)}),M$=h.forwardRef((e,n)=>{let{heading:r,children:o,forceMount:i,...s}=e,a=Tt(),l=h.useRef(null),c=h.useRef(null),u=Tt(),f=Ba(),d=Hr(g=>i||f.filter()===!1?!0:g.search?g.filtered.groups.has(a):!0);jo(()=>f.group(a),[]),NS(a,l,[e.value,e.heading,c]);let p=h.useMemo(()=>({id:a,forceMount:i}),[i]);return h.createElement(pt.div,{ref:ke(l,n),...s,"cmdk-group":"",role:"presentation",hidden:d?void 0:!0},r&&h.createElement("div",{ref:c,"cmdk-group-heading":"","aria-hidden":!0,id:u},r),ld(e,g=>h.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":r?u:void 0},h.createElement(SS.Provider,{value:p},g))))}),R$=h.forwardRef((e,n)=>{let{alwaysRender:r,...o}=e,i=h.useRef(null),s=Hr(a=>!a.search);return!r&&!s?null:h.createElement(pt.div,{ref:ke(i,n),...o,"cmdk-separator":"",role:"separator"})}),A$=h.forwardRef((e,n)=>{let{onValueChange:r,...o}=e,i=e.value!=null,s=tg(),a=Hr(u=>u.search),l=Hr(u=>u.selectedItemId),c=Ba();return h.useEffect(()=>{e.value!=null&&s.setState("search",e.value)},[e.value]),h.createElement(pt.input,{ref:n,...o,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":c.listId,"aria-labelledby":c.labelId,"aria-activedescendant":l,id:c.inputId,type:"text",value:i?e.value:a,onChange:u=>{i||s.setState("search",u.target.value),r==null||r(u.target.value)}})}),T$=h.forwardRef((e,n)=>{let{children:r,label:o="Suggestions",...i}=e,s=h.useRef(null),a=h.useRef(null),l=Hr(u=>u.selectedItemId),c=Ba();return h.useEffect(()=>{if(a.current&&s.current){let u=a.current,f=s.current,d,p=new ResizeObserver(()=>{d=requestAnimationFrame(()=>{let g=u.offsetHeight;f.style.setProperty("--cmdk-list-height",g.toFixed(1)+"px")})});return p.observe(u),()=>{cancelAnimationFrame(d),p.unobserve(u)}}},[]),h.createElement(pt.div,{ref:ke(s,n),...i,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":l,"aria-label":o,id:c.listId},ld(e,u=>h.createElement("div",{ref:ke(a,c.listInnerRef),"cmdk-list-sizer":""},u)))}),I$=h.forwardRef((e,n)=>{let{open:r,onOpenChange:o,overlayClassName:i,contentClassName:s,container:a,...l}=e;return h.createElement(N$,{open:r,onOpenChange:o},h.createElement(eg,{container:a},h.createElement(Fa,{"cmdk-overlay":"",className:i}),h.createElement(Va,{"aria-label":e.label,"cmdk-dialog":"",className:s},h.createElement(CS,{ref:n,...l}))))}),$$=h.forwardRef((e,n)=>Hr(r=>r.filtered.count===0)?h.createElement(pt.div,{ref:n,...e,"cmdk-empty":"",role:"presentation"}):null),O$=h.forwardRef((e,n)=>{let{progress:r,children:o,label:i="Loading...",...s}=e;return h.createElement(pt.div,{ref:n,...s,"cmdk-loading":"",role:"progressbar","aria-valuenow":r,"aria-valuemin":0,"aria-valuemax":100,"aria-label":i},ld(e,a=>h.createElement("div",{"aria-hidden":!0},a)))}),St=Object.assign(CS,{List:T$,Item:j$,Input:A$,Group:M$,Separator:R$,Dialog:I$,Empty:$$,Loading:O$});function D$(e,n){let r=e.nextElementSibling;for(;r;){if(r.matches(n))return r;r=r.nextElementSibling}}function L$(e,n){let r=e.previousElementSibling;for(;r;){if(r.matches(n))return r;r=r.previousElementSibling}}function kS(e){let n=h.useRef(e);return jo(()=>{n.current=e}),n}var jo=typeof window>"u"?h.useEffect:h.useLayoutEffect;function ri(e){let n=h.useRef();return n.current===void 0&&(n.current=e()),n}function Hr(e){let n=tg(),r=()=>e(n.snapshot());return h.useSyncExternalStore(n.subscribe,r,r)}function NS(e,n,r,o=[]){let i=h.useRef(),s=Ba();return jo(()=>{var a;let l=(()=>{var u;for(let f of r){if(typeof f=="string")return f.trim();if(typeof f=="object"&&"current"in f)return f.current?(u=f.current.textContent)==null?void 0:u.trim():i.current}})(),c=o.map(u=>u.trim());s.value(e,l,c),(a=n.current)==null||a.setAttribute(ni,l),i.current=l}),i}var z$=()=>{let[e,n]=h.useState(),r=ri(()=>new Map);return jo(()=>{r.current.forEach(o=>o()),r.current=new Map},[e]),(o,i)=>{r.current.set(o,i),n({})}};function F$(e){let n=e.type;return typeof n=="function"?n(e.props):"render"in n?n.render(e.props):e}function ld({asChild:e,children:n},r){return e&&h.isValidElement(n)?h.cloneElement(F$(n),{ref:n.ref},r(n.props.children)):r(n)}var V$={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};const B$=h.forwardRef(({className:e,...n},r)=>m.jsx(St,{ref:r,className:ae("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...n}));B$.displayName=St.displayName;const H$=h.forwardRef(({className:e,...n},r)=>m.jsxs("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[m.jsx($A,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),m.jsx(St.Input,{ref:r,className:ae("flex h-9 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",e),...n})]}));H$.displayName=St.Input.displayName;const W$=h.forwardRef(({className:e,onWheel:n,...r},o)=>m.jsx(St.List,{ref:o,className:ae("overflow-y-auto overflow-x-hidden",e),style:{maxHeight:300},onWheel:n??(i=>{i.currentTarget.scrollTop+=i.deltaY}),...r}));W$.displayName=St.List.displayName;const U$=h.forwardRef((e,n)=>m.jsx(St.Empty,{ref:n,className:"py-6 text-center text-sm",...e}));U$.displayName=St.Empty.displayName;const G$=h.forwardRef(({className:e,...n},r)=>m.jsx(St.Group,{ref:r,className:ae("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",e),...n}));G$.displayName=St.Group.displayName;const Y$=h.forwardRef(({className:e,...n},r)=>m.jsx(St.Separator,{ref:r,className:ae("-mx-1 h-px bg-border",e),...n}));Y$.displayName=St.Separator.displayName;const X$=h.forwardRef(({className:e,...n},r)=>m.jsx(St.Item,{ref:r,className:ae("relative flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",e),...n}));X$.displayName=St.Item.displayName;const K$=eg,ES=h.forwardRef(({className:e,...n},r)=>m.jsx(Fa,{ref:r,className:ae("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...n}));ES.displayName=Fa.displayName;const q$=h.forwardRef(({className:e,children:n,...r},o)=>m.jsxs(K$,{children:[m.jsx(ES,{}),m.jsxs(Va,{ref:o,className:ae("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...r,children:[n,m.jsxs(xS,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[m.jsx(tu,{className:"h-4 w-4"}),m.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));q$.displayName=Va.displayName;const Z$=h.forwardRef(({className:e,...n},r)=>m.jsx(sd,{ref:r,className:ae("text-lg font-semibold leading-none tracking-tight",e),...n}));Z$.displayName=sd.displayName;const Q$=h.forwardRef(({className:e,...n},r)=>m.jsx(ad,{ref:r,className:ae("text-sm text-muted-foreground",e),...n}));Q$.displayName=ad.displayName;function J$(e,n=[]){let r=[];function o(s,a){const l=h.createContext(a),c=r.length;r=[...r,a];const u=d=>{var y;const{scope:p,children:g,...v}=d,w=((y=p==null?void 0:p[e])==null?void 0:y[c])||l,_=h.useMemo(()=>v,Object.values(v));return m.jsx(w.Provider,{value:_,children:g})};u.displayName=s+"Provider";function f(d,p){var w;const g=((w=p==null?void 0:p[e])==null?void 0:w[c])||l,v=h.useContext(g);if(v)return v;if(a!==void 0)return a;throw new Error(`\`${d}\` must be used within \`${s}\``)}return[u,f]}const i=()=>{const s=r.map(a=>h.createContext(a));return function(l){const c=(l==null?void 0:l[e])||s;return h.useMemo(()=>({[`__scope${e}`]:{...l,[e]:c}}),[l,c])}};return i.scopeName=e,[o,eO(i,...n)]}function eO(...e){const n=e[0];if(e.length===1)return n;const r=()=>{const o=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(s){const a=o.reduce((l,{useScope:c,scopeName:u})=>{const d=c(s)[`__scope${u}`];return{...l,...d}},{});return h.useMemo(()=>({[`__scope${n.scopeName}`]:a}),[a])}};return r.scopeName=n.scopeName,r}function tO(e){const n=nO(e),r=h.forwardRef((o,i)=>{const{children:s,...a}=o,l=h.Children.toArray(s),c=l.find(oO);if(c){const u=c.props.children,f=l.map(d=>d===c?h.Children.count(u)>1?h.Children.only(null):h.isValidElement(u)?u.props.children:null:d);return m.jsx(n,{...a,ref:i,children:h.isValidElement(u)?h.cloneElement(u,void 0,f):null})}return m.jsx(n,{...a,ref:i,children:s})});return r.displayName=`${e}.Slot`,r}function nO(e){const n=h.forwardRef((r,o)=>{const{children:i,...s}=r;if(h.isValidElement(i)){const a=sO(i),l=iO(s,i.props);return i.type!==h.Fragment&&(l.ref=o?ke(o,a):a),h.cloneElement(i,l)}return h.Children.count(i)>1?h.Children.only(null):null});return n.displayName=`${e}.SlotClone`,n}var rO=Symbol("radix.slottable");function oO(e){return h.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===rO}function iO(e,n){const r={...n};for(const o in n){const i=e[o],s=n[o];/^on[A-Z]/.test(o)?i&&s?r[o]=(...l)=>{const c=s(...l);return i(...l),c}:i&&(r[o]=i):o==="style"?r[o]={...i,...s}:o==="className"&&(r[o]=[i,s].filter(Boolean).join(" "))}return{...e,...r}}function sO(e){var o,i;let n=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,r=n&&"isReactWarning"in n&&n.isReactWarning;return r?e.ref:(n=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,r=n&&"isReactWarning"in n&&n.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var aO=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],lO=aO.reduce((e,n)=>{const r=tO(`Primitive.${n}`),o=h.forwardRef((i,s)=>{const{asChild:a,...l}=i,c=a?r:n;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),m.jsx(c,{...l,ref:s})});return o.displayName=`Primitive.${n}`,{...e,[n]:o}},{});function cO(e,n=[]){let r=[];function o(s,a){const l=h.createContext(a),c=r.length;r=[...r,a];const u=d=>{var y;const{scope:p,children:g,...v}=d,w=((y=p==null?void 0:p[e])==null?void 0:y[c])||l,_=h.useMemo(()=>v,Object.values(v));return m.jsx(w.Provider,{value:_,children:g})};u.displayName=s+"Provider";function f(d,p){var w;const g=((w=p==null?void 0:p[e])==null?void 0:w[c])||l,v=h.useContext(g);if(v)return v;if(a!==void 0)return a;throw new Error(`\`${d}\` must be used within \`${s}\``)}return[u,f]}const i=()=>{const s=r.map(a=>h.createContext(a));return function(l){const c=(l==null?void 0:l[e])||s;return h.useMemo(()=>({[`__scope${e}`]:{...l,[e]:c}}),[l,c])}};return i.scopeName=e,[o,uO(i,...n)]}function uO(...e){const n=e[0];if(e.length===1)return n;const r=()=>{const o=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(s){const a=o.reduce((l,{useScope:c,scopeName:u})=>{const d=c(s)[`__scope${u}`];return{...l,...d}},{});return h.useMemo(()=>({[`__scope${n.scopeName}`]:a}),[a])}};return r.scopeName=n.scopeName,r}function pv(e){const n=dO(e),r=h.forwardRef((o,i)=>{const{children:s,...a}=o,l=h.Children.toArray(s),c=l.find(pO);if(c){const u=c.props.children,f=l.map(d=>d===c?h.Children.count(u)>1?h.Children.only(null):h.isValidElement(u)?u.props.children:null:d);return m.jsx(n,{...a,ref:i,children:h.isValidElement(u)?h.cloneElement(u,void 0,f):null})}return m.jsx(n,{...a,ref:i,children:s})});return r.displayName=`${e}.Slot`,r}function dO(e){const n=h.forwardRef((r,o)=>{const{children:i,...s}=r;if(h.isValidElement(i)){const a=mO(i),l=hO(s,i.props);return i.type!==h.Fragment&&(l.ref=o?ke(o,a):a),h.cloneElement(i,l)}return h.Children.count(i)>1?h.Children.only(null):null});return n.displayName=`${e}.SlotClone`,n}var fO=Symbol("radix.slottable");function pO(e){return h.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===fO}function hO(e,n){const r={...n};for(const o in n){const i=e[o],s=n[o];/^on[A-Z]/.test(o)?i&&s?r[o]=(...l)=>{const c=s(...l);return i(...l),c}:i&&(r[o]=i):o==="style"?r[o]={...i,...s}:o==="className"&&(r[o]=[i,s].filter(Boolean).join(" "))}return{...e,...r}}function mO(e){var o,i;let n=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,r=n&&"isReactWarning"in n&&n.isReactWarning;return r?e.ref:(n=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,r=n&&"isReactWarning"in n&&n.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}function ng(e){const n=e+"CollectionProvider",[r,o]=cO(n),[i,s]=r(n,{collectionRef:{current:null},itemMap:new Map}),a=w=>{const{scope:_,children:y}=w,b=ot.useRef(null),x=ot.useRef(new Map).current;return m.jsx(i,{scope:_,itemMap:x,collectionRef:b,children:y})};a.displayName=n;const l=e+"CollectionSlot",c=pv(l),u=ot.forwardRef((w,_)=>{const{scope:y,children:b}=w,x=s(l,y),S=ve(_,x.collectionRef);return m.jsx(c,{ref:S,children:b})});u.displayName=l;const f=e+"CollectionItemSlot",d="data-radix-collection-item",p=pv(f),g=ot.forwardRef((w,_)=>{const{scope:y,children:b,...x}=w,S=ot.useRef(null),C=ve(_,S),k=s(f,y);return ot.useEffect(()=>(k.itemMap.set(S,{ref:S,...x}),()=>void k.itemMap.delete(S))),m.jsx(p,{[d]:"",ref:C,children:b})});g.displayName=f;function v(w){const _=s(e+"CollectionConsumer",w);return ot.useCallback(()=>{const b=_.collectionRef.current;if(!b)return[];const x=Array.from(b.querySelectorAll(`[${d}]`));return Array.from(_.itemMap.values()).sort((k,N)=>x.indexOf(k.ref.current)-x.indexOf(N.ref.current))},[_.collectionRef,_.itemMap])}return[{Provider:a,Slot:u,ItemSlot:g},v,o]}function gO(e,n=[]){let r=[];function o(s,a){const l=h.createContext(a),c=r.length;r=[...r,a];const u=d=>{var y;const{scope:p,children:g,...v}=d,w=((y=p==null?void 0:p[e])==null?void 0:y[c])||l,_=h.useMemo(()=>v,Object.values(v));return m.jsx(w.Provider,{value:_,children:g})};u.displayName=s+"Provider";function f(d,p){var w;const g=((w=p==null?void 0:p[e])==null?void 0:w[c])||l,v=h.useContext(g);if(v)return v;if(a!==void 0)return a;throw new Error(`\`${d}\` must be used within \`${s}\``)}return[u,f]}const i=()=>{const s=r.map(a=>h.createContext(a));return function(l){const c=(l==null?void 0:l[e])||s;return h.useMemo(()=>({[`__scope${e}`]:{...l,[e]:c}}),[l,c])}};return i.scopeName=e,[o,yO(i,...n)]}function yO(...e){const n=e[0];if(e.length===1)return n;const r=()=>{const o=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(s){const a=o.reduce((l,{useScope:c,scopeName:u})=>{const d=c(s)[`__scope${u}`];return{...l,...d}},{});return h.useMemo(()=>({[`__scope${n.scopeName}`]:a}),[a])}};return r.scopeName=n.scopeName,r}var vO=h.createContext(void 0);function PS(e){const n=h.useContext(vO);return e||n||"ltr"}const xO=["top","right","bottom","left"],Wr=Math.min,Mt=Math.max,ru=Math.round,zl=Math.floor,Mn=e=>({x:e,y:e}),wO={left:"right",right:"left",bottom:"top",top:"bottom"};function Jp(e,n,r){return Mt(e,Wr(n,r))}function rr(e,n){return typeof e=="function"?e(n):e}function or(e){return e.split("-")[0]}function os(e){return e.split("-")[1]}function rg(e){return e==="x"?"y":"x"}function og(e){return e==="y"?"height":"width"}function Nn(e){const n=e[0];return n==="t"||n==="b"?"y":"x"}function ig(e){return rg(Nn(e))}function bO(e,n,r){r===void 0&&(r=!1);const o=os(e),i=ig(e),s=og(i);let a=i==="x"?o===(r?"end":"start")?"right":"left":o==="start"?"bottom":"top";return n.reference[s]>n.floating[s]&&(a=ou(a)),[a,ou(a)]}function _O(e){const n=ou(e);return[eh(e),n,eh(n)]}function eh(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const hv=["left","right"],mv=["right","left"],SO=["top","bottom"],CO=["bottom","top"];function kO(e,n,r){switch(e){case"top":case"bottom":return r?n?mv:hv:n?hv:mv;case"left":case"right":return n?SO:CO;default:return[]}}function NO(e,n,r,o){const i=os(e);let s=kO(or(e),r==="start",o);return i&&(s=s.map(a=>a+"-"+i),n&&(s=s.concat(s.map(eh)))),s}function ou(e){const n=or(e);return wO[n]+e.slice(n.length)}function EO(e){return{top:0,right:0,bottom:0,left:0,...e}}function jS(e){return typeof e!="number"?EO(e):{top:e,right:e,bottom:e,left:e}}function iu(e){const{x:n,y:r,width:o,height:i}=e;return{width:o,height:i,top:r,left:n,right:n+o,bottom:r+i,x:n,y:r}}function gv(e,n,r){let{reference:o,floating:i}=e;const s=Nn(n),a=ig(n),l=og(a),c=or(n),u=s==="y",f=o.x+o.width/2-i.width/2,d=o.y+o.height/2-i.height/2,p=o[l]/2-i[l]/2;let g;switch(c){case"top":g={x:f,y:o.y-i.height};break;case"bottom":g={x:f,y:o.y+o.height};break;case"right":g={x:o.x+o.width,y:d};break;case"left":g={x:o.x-i.width,y:d};break;default:g={x:o.x,y:o.y}}switch(os(n)){case"start":g[a]-=p*(r&&u?-1:1);break;case"end":g[a]+=p*(r&&u?-1:1);break}return g}async function PO(e,n){var r;n===void 0&&(n={});const{x:o,y:i,platform:s,rects:a,elements:l,strategy:c}=e,{boundary:u="clippingAncestors",rootBoundary:f="viewport",elementContext:d="floating",altBoundary:p=!1,padding:g=0}=rr(n,e),v=jS(g),_=l[p?d==="floating"?"reference":"floating":d],y=iu(await s.getClippingRect({element:(r=await(s.isElement==null?void 0:s.isElement(_)))==null||r?_:_.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(l.floating)),boundary:u,rootBoundary:f,strategy:c})),b=d==="floating"?{x:o,y:i,width:a.floating.width,height:a.floating.height}:a.reference,x=await(s.getOffsetParent==null?void 0:s.getOffsetParent(l.floating)),S=await(s.isElement==null?void 0:s.isElement(x))?await(s.getScale==null?void 0:s.getScale(x))||{x:1,y:1}:{x:1,y:1},C=iu(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:b,offsetParent:x,strategy:c}):b);return{top:(y.top-C.top+v.top)/S.y,bottom:(C.bottom-y.bottom+v.bottom)/S.y,left:(y.left-C.left+v.left)/S.x,right:(C.right-y.right+v.right)/S.x}}const jO=50,MO=async(e,n,r)=>{const{placement:o="bottom",strategy:i="absolute",middleware:s=[],platform:a}=r,l=a.detectOverflow?a:{...a,detectOverflow:PO},c=await(a.isRTL==null?void 0:a.isRTL(n));let u=await a.getElementRects({reference:e,floating:n,strategy:i}),{x:f,y:d}=gv(u,o,c),p=o,g=0;const v={};for(let w=0;w<s.length;w++){const _=s[w];if(!_)continue;const{name:y,fn:b}=_,{x,y:S,data:C,reset:k}=await b({x:f,y:d,initialPlacement:o,placement:p,strategy:i,middlewareData:v,rects:u,platform:l,elements:{reference:e,floating:n}});f=x??f,d=S??d,v[y]={...v[y],...C},k&&g<jO&&(g++,typeof k=="object"&&(k.placement&&(p=k.placement),k.rects&&(u=k.rects===!0?await a.getElementRects({reference:e,floating:n,strategy:i}):k.rects),{x:f,y:d}=gv(u,p,c)),w=-1)}return{x:f,y:d,placement:p,strategy:i,middlewareData:v}},RO=e=>({name:"arrow",options:e,async fn(n){const{x:r,y:o,placement:i,rects:s,platform:a,elements:l,middlewareData:c}=n,{element:u,padding:f=0}=rr(e,n)||{};if(u==null)return{};const d=jS(f),p={x:r,y:o},g=ig(i),v=og(g),w=await a.getDimensions(u),_=g==="y",y=_?"top":"left",b=_?"bottom":"right",x=_?"clientHeight":"clientWidth",S=s.reference[v]+s.reference[g]-p[g]-s.floating[v],C=p[g]-s.reference[g],k=await(a.getOffsetParent==null?void 0:a.getOffsetParent(u));let N=k?k[x]:0;(!N||!await(a.isElement==null?void 0:a.isElement(k)))&&(N=l.floating[x]||s.floating[v]);const E=S/2-C/2,P=N/2-w[v]/2-1,T=Wr(d[y],P),A=Wr(d[b],P),D=T,V=N-w[v]-A,j=N/2-w[v]/2+E,L=Jp(D,j,V),I=!c.arrow&&os(i)!=null&&j!==L&&s.reference[v]/2-(j<D?T:A)-w[v]/2<0,z=I?j<D?j-D:j-V:0;return{[g]:p[g]+z,data:{[g]:L,centerOffset:j-L-z,...I&&{alignmentOffset:z}},reset:I}}}),AO=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(n){var r,o;const{placement:i,middlewareData:s,rects:a,initialPlacement:l,platform:c,elements:u}=n,{mainAxis:f=!0,crossAxis:d=!0,fallbackPlacements:p,fallbackStrategy:g="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:w=!0,..._}=rr(e,n);if((r=s.arrow)!=null&&r.alignmentOffset)return{};const y=or(i),b=Nn(l),x=or(l)===l,S=await(c.isRTL==null?void 0:c.isRTL(u.floating)),C=p||(x||!w?[ou(l)]:_O(l)),k=v!=="none";!p&&k&&C.push(...NO(l,w,v,S));const N=[l,...C],E=await c.detectOverflow(n,_),P=[];let T=((o=s.flip)==null?void 0:o.overflows)||[];if(f&&P.push(E[y]),d){const j=bO(i,a,S);P.push(E[j[0]],E[j[1]])}if(T=[...T,{placement:i,overflows:P}],!P.every(j=>j<=0)){var A,D;const j=(((A=s.flip)==null?void 0:A.index)||0)+1,L=N[j];if(L&&(!(d==="alignment"?b!==Nn(L):!1)||T.every(M=>Nn(M.placement)===b?M.overflows[0]>0:!0)))return{data:{index:j,overflows:T},reset:{placement:L}};let I=(D=T.filter(z=>z.overflows[0]<=0).sort((z,M)=>z.overflows[1]-M.overflows[1])[0])==null?void 0:D.placement;if(!I)switch(g){case"bestFit":{var V;const z=(V=T.filter(M=>{if(k){const R=Nn(M.placement);return R===b||R==="y"}return!0}).map(M=>[M.placement,M.overflows.filter(R=>R>0).reduce((R,O)=>R+O,0)]).sort((M,R)=>M[1]-R[1])[0])==null?void 0:V[0];z&&(I=z);break}case"initialPlacement":I=l;break}if(i!==I)return{reset:{placement:I}}}return{}}}};function yv(e,n){return{top:e.top-n.height,right:e.right-n.width,bottom:e.bottom-n.height,left:e.left-n.width}}function vv(e){return xO.some(n=>e[n]>=0)}const TO=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(n){const{rects:r,platform:o}=n,{strategy:i="referenceHidden",...s}=rr(e,n);switch(i){case"referenceHidden":{const a=await o.detectOverflow(n,{...s,elementContext:"reference"}),l=yv(a,r.reference);return{data:{referenceHiddenOffsets:l,referenceHidden:vv(l)}}}case"escaped":{const a=await o.detectOverflow(n,{...s,altBoundary:!0}),l=yv(a,r.floating);return{data:{escapedOffsets:l,escaped:vv(l)}}}default:return{}}}}},MS=new Set(["left","top"]);async function IO(e,n){const{placement:r,platform:o,elements:i}=e,s=await(o.isRTL==null?void 0:o.isRTL(i.floating)),a=or(r),l=os(r),c=Nn(r)==="y",u=MS.has(a)?-1:1,f=s&&c?-1:1,d=rr(n,e);let{mainAxis:p,crossAxis:g,alignmentAxis:v}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return l&&typeof v=="number"&&(g=l==="end"?v*-1:v),c?{x:g*f,y:p*u}:{x:p*u,y:g*f}}const $O=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(n){var r,o;const{x:i,y:s,placement:a,middlewareData:l}=n,c=await IO(n,e);return a===((r=l.offset)==null?void 0:r.placement)&&(o=l.arrow)!=null&&o.alignmentOffset?{}:{x:i+c.x,y:s+c.y,data:{...c,placement:a}}}}},OO=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(n){const{x:r,y:o,placement:i,platform:s}=n,{mainAxis:a=!0,crossAxis:l=!1,limiter:c={fn:y=>{let{x:b,y:x}=y;return{x:b,y:x}}},...u}=rr(e,n),f={x:r,y:o},d=await s.detectOverflow(n,u),p=Nn(or(i)),g=rg(p);let v=f[g],w=f[p];if(a){const y=g==="y"?"top":"left",b=g==="y"?"bottom":"right",x=v+d[y],S=v-d[b];v=Jp(x,v,S)}if(l){const y=p==="y"?"top":"left",b=p==="y"?"bottom":"right",x=w+d[y],S=w-d[b];w=Jp(x,w,S)}const _=c.fn({...n,[g]:v,[p]:w});return{..._,data:{x:_.x-r,y:_.y-o,enabled:{[g]:a,[p]:l}}}}}},DO=function(e){return e===void 0&&(e={}),{options:e,fn(n){const{x:r,y:o,placement:i,rects:s,middlewareData:a}=n,{offset:l=0,mainAxis:c=!0,crossAxis:u=!0}=rr(e,n),f={x:r,y:o},d=Nn(i),p=rg(d);let g=f[p],v=f[d];const w=rr(l,n),_=typeof w=="number"?{mainAxis:w,crossAxis:0}:{mainAxis:0,crossAxis:0,...w};if(c){const x=p==="y"?"height":"width",S=s.reference[p]-s.floating[x]+_.mainAxis,C=s.reference[p]+s.reference[x]-_.mainAxis;g<S?g=S:g>C&&(g=C)}if(u){var y,b;const x=p==="y"?"width":"height",S=MS.has(or(i)),C=s.reference[d]-s.floating[x]+(S&&((y=a.offset)==null?void 0:y[d])||0)+(S?0:_.crossAxis),k=s.reference[d]+s.reference[x]+(S?0:((b=a.offset)==null?void 0:b[d])||0)-(S?_.crossAxis:0);v<C?v=C:v>k&&(v=k)}return{[p]:g,[d]:v}}}},LO=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(n){var r,o;const{placement:i,rects:s,platform:a,elements:l}=n,{apply:c=()=>{},...u}=rr(e,n),f=await a.detectOverflow(n,u),d=or(i),p=os(i),g=Nn(i)==="y",{width:v,height:w}=s.floating;let _,y;d==="top"||d==="bottom"?(_=d,y=p===(await(a.isRTL==null?void 0:a.isRTL(l.floating))?"start":"end")?"left":"right"):(y=d,_=p==="end"?"top":"bottom");const b=w-f.top-f.bottom,x=v-f.left-f.right,S=Wr(w-f[_],b),C=Wr(v-f[y],x),k=!n.middlewareData.shift;let N=S,E=C;if((r=n.middlewareData.shift)!=null&&r.enabled.x&&(E=x),(o=n.middlewareData.shift)!=null&&o.enabled.y&&(N=b),k&&!p){const T=Mt(f.left,0),A=Mt(f.right,0),D=Mt(f.top,0),V=Mt(f.bottom,0);g?E=v-2*(T!==0||A!==0?T+A:Mt(f.left,f.right)):N=w-2*(D!==0||V!==0?D+V:Mt(f.top,f.bottom))}await c({...n,availableWidth:E,availableHeight:N});const P=await a.getDimensions(l.floating);return v!==P.width||w!==P.height?{reset:{rects:!0}}:{}}}};function cd(){return typeof window<"u"}function is(e){return RS(e)?(e.nodeName||"").toLowerCase():"#document"}function It(e){var n;return(e==null||(n=e.ownerDocument)==null?void 0:n.defaultView)||window}function $n(e){var n;return(n=(RS(e)?e.ownerDocument:e.document)||window.document)==null?void 0:n.documentElement}function RS(e){return cd()?e instanceof Node||e instanceof It(e).Node:!1}function mn(e){return cd()?e instanceof Element||e instanceof It(e).Element:!1}function lr(e){return cd()?e instanceof HTMLElement||e instanceof It(e).HTMLElement:!1}function xv(e){return!cd()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof It(e).ShadowRoot}function Ha(e){const{overflow:n,overflowX:r,overflowY:o,display:i}=gn(e);return/auto|scroll|overlay|hidden|clip/.test(n+o+r)&&i!=="inline"&&i!=="contents"}function zO(e){return/^(table|td|th)$/.test(is(e))}function ud(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const FO=/transform|translate|scale|rotate|perspective|filter/,VO=/paint|layout|strict|content/,ao=e=>!!e&&e!=="none";let Rf;function sg(e){const n=mn(e)?gn(e):e;return ao(n.transform)||ao(n.translate)||ao(n.scale)||ao(n.rotate)||ao(n.perspective)||!ag()&&(ao(n.backdropFilter)||ao(n.filter))||FO.test(n.willChange||"")||VO.test(n.contain||"")}function BO(e){let n=Ur(e);for(;lr(n)&&!zi(n);){if(sg(n))return n;if(ud(n))return null;n=Ur(n)}return null}function ag(){return Rf==null&&(Rf=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Rf}function zi(e){return/^(html|body|#document)$/.test(is(e))}function gn(e){return It(e).getComputedStyle(e)}function dd(e){return mn(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ur(e){if(is(e)==="html")return e;const n=e.assignedSlot||e.parentNode||xv(e)&&e.host||$n(e);return xv(n)?n.host:n}function AS(e){const n=Ur(e);return zi(n)?e.ownerDocument?e.ownerDocument.body:e.body:lr(n)&&Ha(n)?n:AS(n)}function ga(e,n,r){var o;n===void 0&&(n=[]),r===void 0&&(r=!0);const i=AS(e),s=i===((o=e.ownerDocument)==null?void 0:o.body),a=It(i);if(s){const l=th(a);return n.concat(a,a.visualViewport||[],Ha(i)?i:[],l&&r?ga(l):[])}else return n.concat(i,ga(i,[],r))}function th(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function TS(e){const n=gn(e);let r=parseFloat(n.width)||0,o=parseFloat(n.height)||0;const i=lr(e),s=i?e.offsetWidth:r,a=i?e.offsetHeight:o,l=ru(r)!==s||ru(o)!==a;return l&&(r=s,o=a),{width:r,height:o,$:l}}function lg(e){return mn(e)?e:e.contextElement}function Ni(e){const n=lg(e);if(!lr(n))return Mn(1);const r=n.getBoundingClientRect(),{width:o,height:i,$:s}=TS(n);let a=(s?ru(r.width):r.width)/o,l=(s?ru(r.height):r.height)/i;return(!a||!Number.isFinite(a))&&(a=1),(!l||!Number.isFinite(l))&&(l=1),{x:a,y:l}}const HO=Mn(0);function IS(e){const n=It(e);return!ag()||!n.visualViewport?HO:{x:n.visualViewport.offsetLeft,y:n.visualViewport.offsetTop}}function WO(e,n,r){return n===void 0&&(n=!1),!r||n&&r!==It(e)?!1:n}function Mo(e,n,r,o){n===void 0&&(n=!1),r===void 0&&(r=!1);const i=e.getBoundingClientRect(),s=lg(e);let a=Mn(1);n&&(o?mn(o)&&(a=Ni(o)):a=Ni(e));const l=WO(s,r,o)?IS(s):Mn(0);let c=(i.left+l.x)/a.x,u=(i.top+l.y)/a.y,f=i.width/a.x,d=i.height/a.y;if(s){const p=It(s),g=o&&mn(o)?It(o):o;let v=p,w=th(v);for(;w&&o&&g!==v;){const _=Ni(w),y=w.getBoundingClientRect(),b=gn(w),x=y.left+(w.clientLeft+parseFloat(b.paddingLeft))*_.x,S=y.top+(w.clientTop+parseFloat(b.paddingTop))*_.y;c*=_.x,u*=_.y,f*=_.x,d*=_.y,c+=x,u+=S,v=It(w),w=th(v)}}return iu({width:f,height:d,x:c,y:u})}function fd(e,n){const r=dd(e).scrollLeft;return n?n.left+r:Mo($n(e)).left+r}function $S(e,n){const r=e.getBoundingClientRect(),o=r.left+n.scrollLeft-fd(e,r),i=r.top+n.scrollTop;return{x:o,y:i}}function UO(e){let{elements:n,rect:r,offsetParent:o,strategy:i}=e;const s=i==="fixed",a=$n(o),l=n?ud(n.floating):!1;if(o===a||l&&s)return r;let c={scrollLeft:0,scrollTop:0},u=Mn(1);const f=Mn(0),d=lr(o);if((d||!d&&!s)&&((is(o)!=="body"||Ha(a))&&(c=dd(o)),d)){const g=Mo(o);u=Ni(o),f.x=g.x+o.clientLeft,f.y=g.y+o.clientTop}const p=a&&!d&&!s?$S(a,c):Mn(0);return{width:r.width*u.x,height:r.height*u.y,x:r.x*u.x-c.scrollLeft*u.x+f.x+p.x,y:r.y*u.y-c.scrollTop*u.y+f.y+p.y}}function GO(e){return Array.from(e.getClientRects())}function YO(e){const n=$n(e),r=dd(e),o=e.ownerDocument.body,i=Mt(n.scrollWidth,n.clientWidth,o.scrollWidth,o.clientWidth),s=Mt(n.scrollHeight,n.clientHeight,o.scrollHeight,o.clientHeight);let a=-r.scrollLeft+fd(e);const l=-r.scrollTop;return gn(o).direction==="rtl"&&(a+=Mt(n.clientWidth,o.clientWidth)-i),{width:i,height:s,x:a,y:l}}const wv=25;function XO(e,n){const r=It(e),o=$n(e),i=r.visualViewport;let s=o.clientWidth,a=o.clientHeight,l=0,c=0;if(i){s=i.width,a=i.height;const f=ag();(!f||f&&n==="fixed")&&(l=i.offsetLeft,c=i.offsetTop)}const u=fd(o);if(u<=0){const f=o.ownerDocument,d=f.body,p=getComputedStyle(d),g=f.compatMode==="CSS1Compat"&&parseFloat(p.marginLeft)+parseFloat(p.marginRight)||0,v=Math.abs(o.clientWidth-d.clientWidth-g);v<=wv&&(s-=v)}else u<=wv&&(s+=u);return{width:s,height:a,x:l,y:c}}function KO(e,n){const r=Mo(e,!0,n==="fixed"),o=r.top+e.clientTop,i=r.left+e.clientLeft,s=lr(e)?Ni(e):Mn(1),a=e.clientWidth*s.x,l=e.clientHeight*s.y,c=i*s.x,u=o*s.y;return{width:a,height:l,x:c,y:u}}function bv(e,n,r){let o;if(n==="viewport")o=XO(e,r);else if(n==="document")o=YO($n(e));else if(mn(n))o=KO(n,r);else{const i=IS(e);o={x:n.x-i.x,y:n.y-i.y,width:n.width,height:n.height}}return iu(o)}function OS(e,n){const r=Ur(e);return r===n||!mn(r)||zi(r)?!1:gn(r).position==="fixed"||OS(r,n)}function qO(e,n){const r=n.get(e);if(r)return r;let o=ga(e,[],!1).filter(l=>mn(l)&&is(l)!=="body"),i=null;const s=gn(e).position==="fixed";let a=s?Ur(e):e;for(;mn(a)&&!zi(a);){const l=gn(a),c=sg(a);!c&&l.position==="fixed"&&(i=null),(s?!c&&!i:!c&&l.position==="static"&&!!i&&(i.position==="absolute"||i.position==="fixed")||Ha(a)&&!c&&OS(e,a))?o=o.filter(f=>f!==a):i=l,a=Ur(a)}return n.set(e,o),o}function ZO(e){let{element:n,boundary:r,rootBoundary:o,strategy:i}=e;const a=[...r==="clippingAncestors"?ud(n)?[]:qO(n,this._c):[].concat(r),o],l=bv(n,a[0],i);let c=l.top,u=l.right,f=l.bottom,d=l.left;for(let p=1;p<a.length;p++){const g=bv(n,a[p],i);c=Mt(g.top,c),u=Wr(g.right,u),f=Wr(g.bottom,f),d=Mt(g.left,d)}return{width:u-d,height:f-c,x:d,y:c}}function QO(e){const{width:n,height:r}=TS(e);return{width:n,height:r}}function JO(e,n,r){const o=lr(n),i=$n(n),s=r==="fixed",a=Mo(e,!0,s,n);let l={scrollLeft:0,scrollTop:0};const c=Mn(0);function u(){c.x=fd(i)}if(o||!o&&!s)if((is(n)!=="body"||Ha(i))&&(l=dd(n)),o){const g=Mo(n,!0,s,n);c.x=g.x+n.clientLeft,c.y=g.y+n.clientTop}else i&&u();s&&!o&&i&&u();const f=i&&!o&&!s?$S(i,l):Mn(0),d=a.left+l.scrollLeft-c.x-f.x,p=a.top+l.scrollTop-c.y-f.y;return{x:d,y:p,width:a.width,height:a.height}}function Af(e){return gn(e).position==="static"}function _v(e,n){if(!lr(e)||gn(e).position==="fixed")return null;if(n)return n(e);let r=e.offsetParent;return $n(e)===r&&(r=r.ownerDocument.body),r}function DS(e,n){const r=It(e);if(ud(e))return r;if(!lr(e)){let i=Ur(e);for(;i&&!zi(i);){if(mn(i)&&!Af(i))return i;i=Ur(i)}return r}let o=_v(e,n);for(;o&&zO(o)&&Af(o);)o=_v(o,n);return o&&zi(o)&&Af(o)&&!sg(o)?r:o||BO(e)||r}const e4=async function(e){const n=this.getOffsetParent||DS,r=this.getDimensions,o=await r(e.floating);return{reference:JO(e.reference,await n(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function t4(e){return gn(e).direction==="rtl"}const n4={convertOffsetParentRelativeRectToViewportRelativeRect:UO,getDocumentElement:$n,getClippingRect:ZO,getOffsetParent:DS,getElementRects:e4,getClientRects:GO,getDimensions:QO,getScale:Ni,isElement:mn,isRTL:t4};function LS(e,n){return e.x===n.x&&e.y===n.y&&e.width===n.width&&e.height===n.height}function r4(e,n){let r=null,o;const i=$n(e);function s(){var l;clearTimeout(o),(l=r)==null||l.disconnect(),r=null}function a(l,c){l===void 0&&(l=!1),c===void 0&&(c=1),s();const u=e.getBoundingClientRect(),{left:f,top:d,width:p,height:g}=u;if(l||n(),!p||!g)return;const v=zl(d),w=zl(i.clientWidth-(f+p)),_=zl(i.clientHeight-(d+g)),y=zl(f),x={rootMargin:-v+"px "+-w+"px "+-_+"px "+-y+"px",threshold:Mt(0,Wr(1,c))||1};let S=!0;function C(k){const N=k[0].intersectionRatio;if(N!==c){if(!S)return a();N?a(!1,N):o=setTimeout(()=>{a(!1,1e-7)},1e3)}N===1&&!LS(u,e.getBoundingClientRect())&&a(),S=!1}try{r=new IntersectionObserver(C,{...x,root:i.ownerDocument})}catch{r=new IntersectionObserver(C,x)}r.observe(e)}return a(!0),s}function o4(e,n,r,o){o===void 0&&(o={});const{ancestorScroll:i=!0,ancestorResize:s=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:c=!1}=o,u=lg(e),f=i||s?[...u?ga(u):[],...n?ga(n):[]]:[];f.forEach(y=>{i&&y.addEventListener("scroll",r,{passive:!0}),s&&y.addEventListener("resize",r)});const d=u&&l?r4(u,r):null;let p=-1,g=null;a&&(g=new ResizeObserver(y=>{let[b]=y;b&&b.target===u&&g&&n&&(g.unobserve(n),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var x;(x=g)==null||x.observe(n)})),r()}),u&&!c&&g.observe(u),n&&g.observe(n));let v,w=c?Mo(e):null;c&&_();function _(){const y=Mo(e);w&&!LS(w,y)&&r(),w=y,v=requestAnimationFrame(_)}return r(),()=>{var y;f.forEach(b=>{i&&b.removeEventListener("scroll",r),s&&b.removeEventListener("resize",r)}),d==null||d(),(y=g)==null||y.disconnect(),g=null,c&&cancelAnimationFrame(v)}}const i4=$O,s4=OO,a4=AO,l4=LO,c4=TO,Sv=RO,u4=DO,d4=(e,n,r)=>{const o=new Map,i={platform:n4,...r},s={...i.platform,_c:o};return MO(e,n,{...i,platform:s})};var f4=typeof document<"u",p4=function(){},vc=f4?h.useLayoutEffect:p4;function su(e,n){if(e===n)return!0;if(typeof e!=typeof n)return!1;if(typeof e=="function"&&e.toString()===n.toString())return!0;let r,o,i;if(e&&n&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==n.length)return!1;for(o=r;o--!==0;)if(!su(e[o],n[o]))return!1;return!0}if(i=Object.keys(e),r=i.length,r!==Object.keys(n).length)return!1;for(o=r;o--!==0;)if(!{}.hasOwnProperty.call(n,i[o]))return!1;for(o=r;o--!==0;){const s=i[o];if(!(s==="_owner"&&e.$$typeof)&&!su(e[s],n[s]))return!1}return!0}return e!==e&&n!==n}function zS(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Cv(e,n){const r=zS(e);return Math.round(n*r)/r}function Tf(e){const n=h.useRef(e);return vc(()=>{n.current=e}),n}function h4(e){e===void 0&&(e={});const{placement:n="bottom",strategy:r="absolute",middleware:o=[],platform:i,elements:{reference:s,floating:a}={},transform:l=!0,whileElementsMounted:c,open:u}=e,[f,d]=h.useState({x:0,y:0,strategy:r,placement:n,middlewareData:{},isPositioned:!1}),[p,g]=h.useState(o);su(p,o)||g(o);const[v,w]=h.useState(null),[_,y]=h.useState(null),b=h.useCallback(M=>{M!==k.current&&(k.current=M,w(M))},[]),x=h.useCallback(M=>{M!==N.current&&(N.current=M,y(M))},[]),S=s||v,C=a||_,k=h.useRef(null),N=h.useRef(null),E=h.useRef(f),P=c!=null,T=Tf(c),A=Tf(i),D=Tf(u),V=h.useCallback(()=>{if(!k.current||!N.current)return;const M={placement:n,strategy:r,middleware:p};A.current&&(M.platform=A.current),d4(k.current,N.current,M).then(R=>{const O={...R,isPositioned:D.current!==!1};j.current&&!su(E.current,O)&&(E.current=O,Lo.flushSync(()=>{d(O)}))})},[p,n,r,A,D]);vc(()=>{u===!1&&E.current.isPositioned&&(E.current.isPositioned=!1,d(M=>({...M,isPositioned:!1})))},[u]);const j=h.useRef(!1);vc(()=>(j.current=!0,()=>{j.current=!1}),[]),vc(()=>{if(S&&(k.current=S),C&&(N.current=C),S&&C){if(T.current)return T.current(S,C,V);V()}},[S,C,V,T,P]);const L=h.useMemo(()=>({reference:k,floating:N,setReference:b,setFloating:x}),[b,x]),I=h.useMemo(()=>({reference:S,floating:C}),[S,C]),z=h.useMemo(()=>{const M={position:r,left:0,top:0};if(!I.floating)return M;const R=Cv(I.floating,f.x),O=Cv(I.floating,f.y);return l?{...M,transform:"translate("+R+"px, "+O+"px)",...zS(I.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:R,top:O}},[r,l,I.floating,f.x,f.y]);return h.useMemo(()=>({...f,update:V,refs:L,elements:I,floatingStyles:z}),[f,V,L,I,z])}const m4=e=>{function n(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:e,fn(r){const{element:o,padding:i}=typeof e=="function"?e(r):e;return o&&n(o)?o.current!=null?Sv({element:o.current,padding:i}).fn(r):{}:o?Sv({element:o,padding:i}).fn(r):{}}}},g4=(e,n)=>{const r=i4(e);return{name:r.name,fn:r.fn,options:[e,n]}},y4=(e,n)=>{const r=s4(e);return{name:r.name,fn:r.fn,options:[e,n]}},v4=(e,n)=>({fn:u4(e).fn,options:[e,n]}),x4=(e,n)=>{const r=a4(e);return{name:r.name,fn:r.fn,options:[e,n]}},w4=(e,n)=>{const r=l4(e);return{name:r.name,fn:r.fn,options:[e,n]}},b4=(e,n)=>{const r=c4(e);return{name:r.name,fn:r.fn,options:[e,n]}},_4=(e,n)=>{const r=m4(e);return{name:r.name,fn:r.fn,options:[e,n]}};function S4(e){const n=C4(e),r=h.forwardRef((o,i)=>{const{children:s,...a}=o,l=h.Children.toArray(s),c=l.find(N4);if(c){const u=c.props.children,f=l.map(d=>d===c?h.Children.count(u)>1?h.Children.only(null):h.isValidElement(u)?u.props.children:null:d);return m.jsx(n,{...a,ref:i,children:h.isValidElement(u)?h.cloneElement(u,void 0,f):null})}return m.jsx(n,{...a,ref:i,children:s})});return r.displayName=`${e}.Slot`,r}function C4(e){const n=h.forwardRef((r,o)=>{const{children:i,...s}=r;if(h.isValidElement(i)){const a=P4(i),l=E4(s,i.props);return i.type!==h.Fragment&&(l.ref=o?ke(o,a):a),h.cloneElement(i,l)}return h.Children.count(i)>1?h.Children.only(null):null});return n.displayName=`${e}.SlotClone`,n}var k4=Symbol("radix.slottable");function N4(e){return h.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===k4}function E4(e,n){const r={...n};for(const o in n){const i=e[o],s=n[o];/^on[A-Z]/.test(o)?i&&s?r[o]=(...l)=>{const c=s(...l);return i(...l),c}:i&&(r[o]=i):o==="style"?r[o]={...i,...s}:o==="className"&&(r[o]=[i,s].filter(Boolean).join(" "))}return{...e,...r}}function P4(e){var o,i;let n=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,r=n&&"isReactWarning"in n&&n.isReactWarning;return r?e.ref:(n=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,r=n&&"isReactWarning"in n&&n.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var j4=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],M4=j4.reduce((e,n)=>{const r=S4(`Primitive.${n}`),o=h.forwardRef((i,s)=>{const{asChild:a,...l}=i,c=a?r:n;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),m.jsx(c,{...l,ref:s})});return o.displayName=`Primitive.${n}`,{...e,[n]:o}},{}),R4="Arrow",FS=h.forwardRef((e,n)=>{const{children:r,width:o=10,height:i=5,...s}=e;return m.jsx(M4.svg,{...s,ref:n,width:o,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:m.jsx("polygon",{points:"0,0 30,0 15,10"})})});FS.displayName=R4;var A4=FS;function T4(e,n=[]){let r=[];function o(s,a){const l=h.createContext(a),c=r.length;r=[...r,a];const u=d=>{var y;const{scope:p,children:g,...v}=d,w=((y=p==null?void 0:p[e])==null?void 0:y[c])||l,_=h.useMemo(()=>v,Object.values(v));return m.jsx(w.Provider,{value:_,children:g})};u.displayName=s+"Provider";function f(d,p){var w;const g=((w=p==null?void 0:p[e])==null?void 0:w[c])||l,v=h.useContext(g);if(v)return v;if(a!==void 0)return a;throw new Error(`\`${d}\` must be used within \`${s}\``)}return[u,f]}const i=()=>{const s=r.map(a=>h.createContext(a));return function(l){const c=(l==null?void 0:l[e])||s;return h.useMemo(()=>({[`__scope${e}`]:{...l,[e]:c}}),[l,c])}};return i.scopeName=e,[o,I4(i,...n)]}function I4(...e){const n=e[0];if(e.length===1)return n;const r=()=>{const o=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(s){const a=o.reduce((l,{useScope:c,scopeName:u})=>{const d=c(s)[`__scope${u}`];return{...l,...d}},{});return h.useMemo(()=>({[`__scope${n.scopeName}`]:a}),[a])}};return r.scopeName=n.scopeName,r}function $4(e){const n=O4(e),r=h.forwardRef((o,i)=>{const{children:s,...a}=o,l=h.Children.toArray(s),c=l.find(L4);if(c){const u=c.props.children,f=l.map(d=>d===c?h.Children.count(u)>1?h.Children.only(null):h.isValidElement(u)?u.props.children:null:d);return m.jsx(n,{...a,ref:i,children:h.isValidElement(u)?h.cloneElement(u,void 0,f):null})}return m.jsx(n,{...a,ref:i,children:s})});return r.displayName=`${e}.Slot`,r}function O4(e){const n=h.forwardRef((r,o)=>{const{children:i,...s}=r;if(h.isValidElement(i)){const a=F4(i),l=z4(s,i.props);return i.type!==h.Fragment&&(l.ref=o?ke(o,a):a),h.cloneElement(i,l)}return h.Children.count(i)>1?h.Children.only(null):null});return n.displayName=`${e}.SlotClone`,n}var D4=Symbol("radix.slottable");function L4(e){return h.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===D4}function z4(e,n){const r={...n};for(const o in n){const i=e[o],s=n[o];/^on[A-Z]/.test(o)?i&&s?r[o]=(...l)=>{const c=s(...l);return i(...l),c}:i&&(r[o]=i):o==="style"?r[o]={...i,...s}:o==="className"&&(r[o]=[i,s].filter(Boolean).join(" "))}return{...e,...r}}function F4(e){var o,i;let n=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,r=n&&"isReactWarning"in n&&n.isReactWarning;return r?e.ref:(n=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,r=n&&"isReactWarning"in n&&n.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var V4=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],VS=V4.reduce((e,n)=>{const r=$4(`Primitive.${n}`),o=h.forwardRef((i,s)=>{const{asChild:a,...l}=i,c=a?r:n;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),m.jsx(c,{...l,ref:s})});return o.displayName=`Primitive.${n}`,{...e,[n]:o}},{}),BS="Popper",[HS,Qr]=T4(BS),[OK,WS]=HS(BS),US="PopperAnchor",GS=h.forwardRef((e,n)=>{const{__scopePopper:r,virtualRef:o,...i}=e,s=WS(US,r),a=h.useRef(null),l=ve(n,a),c=h.useRef(null);return h.useEffect(()=>{const u=c.current;c.current=(o==null?void 0:o.current)||a.current,u!==c.current&&s.onAnchorChange(c.current)}),o?null:m.jsx(VS.div,{...i,ref:l})});GS.displayName=US;var cg="PopperContent",[B4,H4]=HS(cg),YS=h.forwardRef((e,n)=>{var U,Y,q,te,J,Z;const{__scopePopper:r,side:o="bottom",sideOffset:i=0,align:s="center",alignOffset:a=0,arrowPadding:l=0,avoidCollisions:c=!0,collisionBoundary:u=[],collisionPadding:f=0,sticky:d="partial",hideWhenDetached:p=!1,updatePositionStrategy:g="optimized",onPlaced:v,...w}=e,_=WS(cg,r),[y,b]=h.useState(null),x=ve(n,ne=>b(ne)),[S,C]=h.useState(null),k=Ym(S),N=(k==null?void 0:k.width)??0,E=(k==null?void 0:k.height)??0,P=o+(s!=="center"?"-"+s:""),T=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},A=Array.isArray(u)?u:[u],D=A.length>0,V={padding:T,boundary:A.filter(U4),altBoundary:D},{refs:j,floatingStyles:L,placement:I,isPositioned:z,middlewareData:M}=h4({strategy:"fixed",placement:P,whileElementsMounted:(...ne)=>o4(...ne,{animationFrame:g==="always"}),elements:{reference:_.anchor},middleware:[g4({mainAxis:i+E,alignmentAxis:a}),c&&y4({mainAxis:!0,crossAxis:!1,limiter:d==="partial"?v4():void 0,...V}),c&&x4({...V}),w4({...V,apply:({elements:ne,rects:ue,availableWidth:ye,availableHeight:pe})=>{const{width:Ne,height:mt}=ue.reference,qe=ne.floating.style;qe.setProperty("--radix-popper-available-width",`${ye}px`),qe.setProperty("--radix-popper-available-height",`${pe}px`),qe.setProperty("--radix-popper-anchor-width",`${Ne}px`),qe.setProperty("--radix-popper-anchor-height",`${mt}px`)}}),S&&_4({element:S,padding:l}),G4({arrowWidth:N,arrowHeight:E}),p&&b4({strategy:"referenceHidden",...V})]}),[R,O]=qS(I),W=An(v);Ye(()=>{z&&(W==null||W())},[z,W]);const $=(U=M.arrow)==null?void 0:U.x,X=(Y=M.arrow)==null?void 0:Y.y,F=((q=M.arrow)==null?void 0:q.centerOffset)!==0,[H,G]=h.useState();return Ye(()=>{y&&G(window.getComputedStyle(y).zIndex)},[y]),m.jsx("div",{ref:j.setFloating,"data-radix-popper-content-wrapper":"",style:{...L,transform:z?L.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:H,"--radix-popper-transform-origin":[(te=M.transformOrigin)==null?void 0:te.x,(J=M.transformOrigin)==null?void 0:J.y].join(" "),...((Z=M.hide)==null?void 0:Z.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:m.jsx(B4,{scope:r,placedSide:R,onArrowChange:C,arrowX:$,arrowY:X,shouldHideArrow:F,children:m.jsx(VS.div,{"data-side":R,"data-align":O,...w,ref:x,style:{...w.style,animation:z?void 0:"none"}})})})});YS.displayName=cg;var XS="PopperArrow",W4={top:"bottom",right:"left",bottom:"top",left:"right"},KS=h.forwardRef(function(n,r){const{__scopePopper:o,...i}=n,s=H4(XS,o),a=W4[s.placedSide];return m.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:m.jsx(A4,{...i,ref:r,style:{...i.style,display:"block"}})})});KS.displayName=XS;function U4(e){return e!==null}var G4=e=>({name:"transformOrigin",options:e,fn(n){var _,y,b;const{placement:r,rects:o,middlewareData:i}=n,a=((_=i.arrow)==null?void 0:_.centerOffset)!==0,l=a?0:e.arrowWidth,c=a?0:e.arrowHeight,[u,f]=qS(r),d={start:"0%",center:"50%",end:"100%"}[f],p=(((y=i.arrow)==null?void 0:y.x)??0)+l/2,g=(((b=i.arrow)==null?void 0:b.y)??0)+c/2;let v="",w="";return u==="bottom"?(v=a?d:`${p}px`,w=`${-c}px`):u==="top"?(v=a?d:`${p}px`,w=`${o.floating.height+c}px`):u==="right"?(v=`${-c}px`,w=a?d:`${g}px`):u==="left"&&(v=`${o.floating.width+c}px`,w=a?d:`${g}px`),{data:{x:v,y:w}}}});function qS(e){const[n,r="center"]=e.split("-");return[n,r]}var Wa=GS,pd=YS,hd=KS;function ZS(e){const n=Y4(e),r=h.forwardRef((o,i)=>{const{children:s,...a}=o,l=h.Children.toArray(s),c=l.find(K4);if(c){const u=c.props.children,f=l.map(d=>d===c?h.Children.count(u)>1?h.Children.only(null):h.isValidElement(u)?u.props.children:null:d);return m.jsx(n,{...a,ref:i,children:h.isValidElement(u)?h.cloneElement(u,void 0,f):null})}return m.jsx(n,{...a,ref:i,children:s})});return r.displayName=`${e}.Slot`,r}function Y4(e){const n=h.forwardRef((r,o)=>{const{children:i,...s}=r;if(h.isValidElement(i)){const a=Z4(i),l=q4(s,i.props);return i.type!==h.Fragment&&(l.ref=o?ke(o,a):a),h.cloneElement(i,l)}return h.Children.count(i)>1?h.Children.only(null):null});return n.displayName=`${e}.SlotClone`,n}var X4=Symbol("radix.slottable");function K4(e){return h.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===X4}function q4(e,n){const r={...n};for(const o in n){const i=e[o],s=n[o];/^on[A-Z]/.test(o)?i&&s?r[o]=(...l)=>{const c=s(...l);return i(...l),c}:i&&(r[o]=i):o==="style"?r[o]={...i,...s}:o==="className"&&(r[o]=[i,s].filter(Boolean).join(" "))}return{...e,...r}}function Z4(e){var o,i;let n=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,r=n&&"isReactWarning"in n&&n.isReactWarning;return r?e.ref:(n=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,r=n&&"isReactWarning"in n&&n.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var Q4=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Ua=Q4.reduce((e,n)=>{const r=ZS(`Primitive.${n}`),o=h.forwardRef((i,s)=>{const{asChild:a,...l}=i,c=a?r:n;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),m.jsx(c,{...l,ref:s})});return o.displayName=`Primitive.${n}`,{...e,[n]:o}},{});function J4(e,n){e&&Lo.flushSync(()=>e.dispatchEvent(n))}function eD(e,n=[]){let r=[];function o(s,a){const l=h.createContext(a),c=r.length;r=[...r,a];const u=d=>{var y;const{scope:p,children:g,...v}=d,w=((y=p==null?void 0:p[e])==null?void 0:y[c])||l,_=h.useMemo(()=>v,Object.values(v));return m.jsx(w.Provider,{value:_,children:g})};u.displayName=s+"Provider";function f(d,p){var w;const g=((w=p==null?void 0:p[e])==null?void 0:w[c])||l,v=h.useContext(g);if(v)return v;if(a!==void 0)return a;throw new Error(`\`${d}\` must be used within \`${s}\``)}return[u,f]}const i=()=>{const s=r.map(a=>h.createContext(a));return function(l){const c=(l==null?void 0:l[e])||s;return h.useMemo(()=>({[`__scope${e}`]:{...l,[e]:c}}),[l,c])}};return i.scopeName=e,[o,tD(i,...n)]}function tD(...e){const n=e[0];if(e.length===1)return n;const r=()=>{const o=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(s){const a=o.reduce((l,{useScope:c,scopeName:u})=>{const d=c(s)[`__scope${u}`];return{...l,...d}},{});return h.useMemo(()=>({[`__scope${n.scopeName}`]:a}),[a])}};return r.scopeName=n.scopeName,r}function nD(e){const n=rD(e),r=h.forwardRef((o,i)=>{const{children:s,...a}=o,l=h.Children.toArray(s),c=l.find(iD);if(c){const u=c.props.children,f=l.map(d=>d===c?h.Children.count(u)>1?h.Children.only(null):h.isValidElement(u)?u.props.children:null:d);return m.jsx(n,{...a,ref:i,children:h.isValidElement(u)?h.cloneElement(u,void 0,f):null})}return m.jsx(n,{...a,ref:i,children:s})});return r.displayName=`${e}.Slot`,r}function rD(e){const n=h.forwardRef((r,o)=>{const{children:i,...s}=r;if(h.isValidElement(i)){const a=aD(i),l=sD(s,i.props);return i.type!==h.Fragment&&(l.ref=o?ke(o,a):a),h.cloneElement(i,l)}return h.Children.count(i)>1?h.Children.only(null):null});return n.displayName=`${e}.SlotClone`,n}var oD=Symbol("radix.slottable");function iD(e){return h.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===oD}function sD(e,n){const r={...n};for(const o in n){const i=e[o],s=n[o];/^on[A-Z]/.test(o)?i&&s?r[o]=(...l)=>{const c=s(...l);return i(...l),c}:i&&(r[o]=i):o==="style"?r[o]={...i,...s}:o==="className"&&(r[o]=[i,s].filter(Boolean).join(" "))}return{...e,...r}}function aD(e){var o,i;let n=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,r=n&&"isReactWarning"in n&&n.isReactWarning;return r?e.ref:(n=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,r=n&&"isReactWarning"in n&&n.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var lD=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],QS=lD.reduce((e,n)=>{const r=nD(`Primitive.${n}`),o=h.forwardRef((i,s)=>{const{asChild:a,...l}=i,c=a?r:n;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),m.jsx(c,{...l,ref:s})});return o.displayName=`Primitive.${n}`,{...e,[n]:o}},{}),If="rovingFocusGroup.onEntryFocus",cD={bubbles:!1,cancelable:!0},Ga="RovingFocusGroup",[nh,JS,uD]=ng(Ga),[dD,md]=eD(Ga,[uD]),[fD,pD]=dD(Ga),e2=h.forwardRef((e,n)=>m.jsx(nh.Provider,{scope:e.__scopeRovingFocusGroup,children:m.jsx(nh.Slot,{scope:e.__scopeRovingFocusGroup,children:m.jsx(hD,{...e,ref:n})})}));e2.displayName=Ga;var hD=h.forwardRef((e,n)=>{const{__scopeRovingFocusGroup:r,orientation:o,loop:i=!1,dir:s,currentTabStopId:a,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:c,onEntryFocus:u,preventScrollOnEntryFocus:f=!1,...d}=e,p=h.useRef(null),g=ve(n,p),v=PS(s),[w,_]=Oa({prop:a,defaultProp:l??null,onChange:c,caller:Ga}),[y,b]=h.useState(!1),x=An(u),S=JS(r),C=h.useRef(!1),[k,N]=h.useState(0);return h.useEffect(()=>{const E=p.current;if(E)return E.addEventListener(If,x),()=>E.removeEventListener(If,x)},[x]),m.jsx(fD,{scope:r,orientation:o,dir:v,loop:i,currentTabStopId:w,onItemFocus:h.useCallback(E=>_(E),[_]),onItemShiftTab:h.useCallback(()=>b(!0),[]),onFocusableItemAdd:h.useCallback(()=>N(E=>E+1),[]),onFocusableItemRemove:h.useCallback(()=>N(E=>E-1),[]),children:m.jsx(QS.div,{tabIndex:y||k===0?-1:0,"data-orientation":o,...d,ref:g,style:{outline:"none",...e.style},onMouseDown:re(e.onMouseDown,()=>{C.current=!0}),onFocus:re(e.onFocus,E=>{const P=!C.current;if(E.target===E.currentTarget&&P&&!y){const T=new CustomEvent(If,cD);if(E.currentTarget.dispatchEvent(T),!T.defaultPrevented){const A=S().filter(I=>I.focusable),D=A.find(I=>I.active),V=A.find(I=>I.id===w),L=[D,V,...A].filter(Boolean).map(I=>I.ref.current);r2(L,f)}}C.current=!1}),onBlur:re(e.onBlur,()=>b(!1))})})}),t2="RovingFocusGroupItem",n2=h.forwardRef((e,n)=>{const{__scopeRovingFocusGroup:r,focusable:o=!0,active:i=!1,tabStopId:s,children:a,...l}=e,c=Tt(),u=s||c,f=pD(t2,r),d=f.currentTabStopId===u,p=JS(r),{onFocusableItemAdd:g,onFocusableItemRemove:v,currentTabStopId:w}=f;return h.useEffect(()=>{if(o)return g(),()=>v()},[o,g,v]),m.jsx(nh.ItemSlot,{scope:r,id:u,focusable:o,active:i,children:m.jsx(QS.span,{tabIndex:d?0:-1,"data-orientation":f.orientation,...l,ref:n,onMouseDown:re(e.onMouseDown,_=>{o?f.onItemFocus(u):_.preventDefault()}),onFocus:re(e.onFocus,()=>f.onItemFocus(u)),onKeyDown:re(e.onKeyDown,_=>{if(_.key==="Tab"&&_.shiftKey){f.onItemShiftTab();return}if(_.target!==_.currentTarget)return;const y=yD(_,f.orientation,f.dir);if(y!==void 0){if(_.metaKey||_.ctrlKey||_.altKey||_.shiftKey)return;_.preventDefault();let x=p().filter(S=>S.focusable).map(S=>S.ref.current);if(y==="last")x.reverse();else if(y==="prev"||y==="next"){y==="prev"&&x.reverse();const S=x.indexOf(_.currentTarget);x=f.loop?vD(x,S+1):x.slice(S+1)}setTimeout(()=>r2(x))}}),children:typeof a=="function"?a({isCurrentTabStop:d,hasTabStop:w!=null}):a})})});n2.displayName=t2;var mD={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function gD(e,n){return n!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function yD(e,n,r){const o=gD(e.key,r);if(!(n==="vertical"&&["ArrowLeft","ArrowRight"].includes(o))&&!(n==="horizontal"&&["ArrowUp","ArrowDown"].includes(o)))return mD[o]}function r2(e,n=!1){const r=document.activeElement;for(const o of e)if(o===r||(o.focus({preventScroll:n}),document.activeElement!==r))return}function vD(e,n){return e.map((r,o)=>e[(n+o)%e.length])}var o2=e2,i2=n2,rh=["Enter"," "],xD=["ArrowDown","PageUp","Home"],s2=["ArrowUp","PageDown","End"],wD=[...xD,...s2],bD={ltr:[...rh,"ArrowRight"],rtl:[...rh,"ArrowLeft"]},_D={ltr:["ArrowLeft"],rtl:["ArrowRight"]},gd="Menu",[ya,SD,CD]=ng(gd),[Fo,a2]=gO(gd,[CD,Qr,md]),ug=Qr(),l2=md(),[DK,Vo]=Fo(gd),[LK,Ya]=Fo(gd),kD="MenuAnchor",dg=h.forwardRef((e,n)=>{const{__scopeMenu:r,...o}=e,i=ug(r);return m.jsx(Wa,{...i,...o,ref:n})});dg.displayName=kD;var fg="MenuPortal",[ND,c2]=Fo(fg,{forceMount:void 0}),u2=e=>{const{__scopeMenu:n,forceMount:r,children:o,container:i}=e,s=Vo(fg,n);return m.jsx(ND,{scope:n,forceMount:r,children:m.jsx(_t,{present:r||s.open,children:m.jsx(rs,{asChild:!0,container:i,children:o})})})};u2.displayName=fg;var qt="MenuContent",[ED,pg]=Fo(qt),d2=h.forwardRef((e,n)=>{const r=c2(qt,e.__scopeMenu),{forceMount:o=r.forceMount,...i}=e,s=Vo(qt,e.__scopeMenu),a=Ya(qt,e.__scopeMenu);return m.jsx(ya.Provider,{scope:e.__scopeMenu,children:m.jsx(_t,{present:o||s.open,children:m.jsx(ya.Slot,{scope:e.__scopeMenu,children:a.modal?m.jsx(PD,{...i,ref:n}):m.jsx(jD,{...i,ref:n})})})})}),PD=h.forwardRef((e,n)=>{const r=Vo(qt,e.__scopeMenu),o=h.useRef(null),i=ve(n,o);return h.useEffect(()=>{const s=o.current;if(s)return od(s)},[]),m.jsx(hg,{...e,ref:i,trapFocus:r.open,disableOutsidePointerEvents:r.open,disableOutsideScroll:!0,onFocusOutside:re(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>r.onOpenChange(!1)})}),jD=h.forwardRef((e,n)=>{const r=Vo(qt,e.__scopeMenu);return m.jsx(hg,{...e,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>r.onOpenChange(!1)})}),MD=ZS("MenuContent.ScrollLock"),hg=h.forwardRef((e,n)=>{const{__scopeMenu:r,loop:o=!1,trapFocus:i,onOpenAutoFocus:s,onCloseAutoFocus:a,disableOutsidePointerEvents:l,onEntryFocus:c,onEscapeKeyDown:u,onPointerDownOutside:f,onFocusOutside:d,onInteractOutside:p,onDismiss:g,disableOutsideScroll:v,...w}=e,_=Vo(qt,r),y=Ya(qt,r),b=ug(r),x=l2(r),S=SD(r),[C,k]=h.useState(null),N=h.useRef(null),E=ve(n,N,_.onContentChange),P=h.useRef(0),T=h.useRef(""),A=h.useRef(0),D=h.useRef(null),V=h.useRef("right"),j=h.useRef(0),L=v?za:h.Fragment,I=v?{as:MD,allowPinchZoom:!0}:void 0,z=R=>{var U,Y;const O=T.current+R,W=S().filter(q=>!q.disabled),$=document.activeElement,X=(U=W.find(q=>q.ref.current===$))==null?void 0:U.textValue,F=W.map(q=>q.textValue),H=BD(F,O,X),G=(Y=W.find(q=>q.textValue===H))==null?void 0:Y.ref.current;(function q(te){T.current=te,window.clearTimeout(P.current),te!==""&&(P.current=window.setTimeout(()=>q(""),1e3))})(O),G&&setTimeout(()=>G.focus())};h.useEffect(()=>()=>window.clearTimeout(P.current),[]),nd();const M=h.useCallback(R=>{var W,$;return V.current===((W=D.current)==null?void 0:W.side)&&WD(R,($=D.current)==null?void 0:$.area)},[]);return m.jsx(ED,{scope:r,searchRef:T,onItemEnter:h.useCallback(R=>{M(R)&&R.preventDefault()},[M]),onItemLeave:h.useCallback(R=>{var O;M(R)||((O=N.current)==null||O.focus(),k(null))},[M]),onTriggerLeave:h.useCallback(R=>{M(R)&&R.preventDefault()},[M]),pointerGraceTimerRef:A,onPointerGraceIntentChange:h.useCallback(R=>{D.current=R},[]),children:m.jsx(L,{...I,children:m.jsx(Da,{asChild:!0,trapped:i,onMountAutoFocus:re(s,R=>{var O;R.preventDefault(),(O=N.current)==null||O.focus({preventScroll:!0})}),onUnmountAutoFocus:a,children:m.jsx(ns,{asChild:!0,disableOutsidePointerEvents:l,onEscapeKeyDown:u,onPointerDownOutside:f,onFocusOutside:d,onInteractOutside:p,onDismiss:g,children:m.jsx(o2,{asChild:!0,...x,dir:y.dir,orientation:"vertical",loop:o,currentTabStopId:C,onCurrentTabStopIdChange:k,onEntryFocus:re(c,R=>{y.isUsingKeyboardRef.current||R.preventDefault()}),preventScrollOnEntryFocus:!0,children:m.jsx(pd,{role:"menu","aria-orientation":"vertical","data-state":E2(_.open),"data-radix-menu-content":"",dir:y.dir,...b,...w,ref:E,style:{outline:"none",...w.style},onKeyDown:re(w.onKeyDown,R=>{const W=R.target.closest("[data-radix-menu-content]")===R.currentTarget,$=R.ctrlKey||R.altKey||R.metaKey,X=R.key.length===1;W&&(R.key==="Tab"&&R.preventDefault(),!$&&X&&z(R.key));const F=N.current;if(R.target!==F||!wD.includes(R.key))return;R.preventDefault();const G=S().filter(U=>!U.disabled).map(U=>U.ref.current);s2.includes(R.key)&&G.reverse(),FD(G)}),onBlur:re(e.onBlur,R=>{R.currentTarget.contains(R.target)||(window.clearTimeout(P.current),T.current="")}),onPointerMove:re(e.onPointerMove,va(R=>{const O=R.target,W=j.current!==R.clientX;if(R.currentTarget.contains(O)&&W){const $=R.clientX>j.current?"right":"left";V.current=$,j.current=R.clientX}}))})})})})})})});d2.displayName=qt;var RD="MenuGroup",mg=h.forwardRef((e,n)=>{const{__scopeMenu:r,...o}=e;return m.jsx(Ua.div,{role:"group",...o,ref:n})});mg.displayName=RD;var AD="MenuLabel",f2=h.forwardRef((e,n)=>{const{__scopeMenu:r,...o}=e;return m.jsx(Ua.div,{...o,ref:n})});f2.displayName=AD;var au="MenuItem",kv="menu.itemSelect",yd=h.forwardRef((e,n)=>{const{disabled:r=!1,onSelect:o,...i}=e,s=h.useRef(null),a=Ya(au,e.__scopeMenu),l=pg(au,e.__scopeMenu),c=ve(n,s),u=h.useRef(!1),f=()=>{const d=s.current;if(!r&&d){const p=new CustomEvent(kv,{bubbles:!0,cancelable:!0});d.addEventListener(kv,g=>o==null?void 0:o(g),{once:!0}),J4(d,p),p.defaultPrevented?u.current=!1:a.onClose()}};return m.jsx(p2,{...i,ref:c,disabled:r,onClick:re(e.onClick,f),onPointerDown:d=>{var p;(p=e.onPointerDown)==null||p.call(e,d),u.current=!0},onPointerUp:re(e.onPointerUp,d=>{var p;u.current||(p=d.currentTarget)==null||p.click()}),onKeyDown:re(e.onKeyDown,d=>{const p=l.searchRef.current!=="";r||p&&d.key===" "||rh.includes(d.key)&&(d.currentTarget.click(),d.preventDefault())})})});yd.displayName=au;var p2=h.forwardRef((e,n)=>{const{__scopeMenu:r,disabled:o=!1,textValue:i,...s}=e,a=pg(au,r),l=l2(r),c=h.useRef(null),u=ve(n,c),[f,d]=h.useState(!1),[p,g]=h.useState("");return h.useEffect(()=>{const v=c.current;v&&g((v.textContent??"").trim())},[s.children]),m.jsx(ya.ItemSlot,{scope:r,disabled:o,textValue:i??p,children:m.jsx(i2,{asChild:!0,...l,focusable:!o,children:m.jsx(Ua.div,{role:"menuitem","data-highlighted":f?"":void 0,"aria-disabled":o||void 0,"data-disabled":o?"":void 0,...s,ref:u,onPointerMove:re(e.onPointerMove,va(v=>{o?a.onItemLeave(v):(a.onItemEnter(v),v.defaultPrevented||v.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:re(e.onPointerLeave,va(v=>a.onItemLeave(v))),onFocus:re(e.onFocus,()=>d(!0)),onBlur:re(e.onBlur,()=>d(!1))})})})}),TD="MenuCheckboxItem",h2=h.forwardRef((e,n)=>{const{checked:r=!1,onCheckedChange:o,...i}=e;return m.jsx(x2,{scope:e.__scopeMenu,checked:r,children:m.jsx(yd,{role:"menuitemcheckbox","aria-checked":lu(r)?"mixed":r,...i,ref:n,"data-state":yg(r),onSelect:re(i.onSelect,()=>o==null?void 0:o(lu(r)?!0:!r),{checkForDefaultPrevented:!1})})})});h2.displayName=TD;var m2="MenuRadioGroup",[ID,$D]=Fo(m2,{value:void 0,onValueChange:()=>{}}),g2=h.forwardRef((e,n)=>{const{value:r,onValueChange:o,...i}=e,s=An(o);return m.jsx(ID,{scope:e.__scopeMenu,value:r,onValueChange:s,children:m.jsx(mg,{...i,ref:n})})});g2.displayName=m2;var y2="MenuRadioItem",v2=h.forwardRef((e,n)=>{const{value:r,...o}=e,i=$D(y2,e.__scopeMenu),s=r===i.value;return m.jsx(x2,{scope:e.__scopeMenu,checked:s,children:m.jsx(yd,{role:"menuitemradio","aria-checked":s,...o,ref:n,"data-state":yg(s),onSelect:re(o.onSelect,()=>{var a;return(a=i.onValueChange)==null?void 0:a.call(i,r)},{checkForDefaultPrevented:!1})})})});v2.displayName=y2;var gg="MenuItemIndicator",[x2,OD]=Fo(gg,{checked:!1}),w2=h.forwardRef((e,n)=>{const{__scopeMenu:r,forceMount:o,...i}=e,s=OD(gg,r);return m.jsx(_t,{present:o||lu(s.checked)||s.checked===!0,children:m.jsx(Ua.span,{...i,ref:n,"data-state":yg(s.checked)})})});w2.displayName=gg;var DD="MenuSeparator",b2=h.forwardRef((e,n)=>{const{__scopeMenu:r,...o}=e;return m.jsx(Ua.div,{role:"separator","aria-orientation":"horizontal",...o,ref:n})});b2.displayName=DD;var LD="MenuArrow",_2=h.forwardRef((e,n)=>{const{__scopeMenu:r,...o}=e,i=ug(r);return m.jsx(hd,{...i,...o,ref:n})});_2.displayName=LD;var zD="MenuSub",[zK,S2]=Fo(zD),Ms="MenuSubTrigger",C2=h.forwardRef((e,n)=>{const r=Vo(Ms,e.__scopeMenu),o=Ya(Ms,e.__scopeMenu),i=S2(Ms,e.__scopeMenu),s=pg(Ms,e.__scopeMenu),a=h.useRef(null),{pointerGraceTimerRef:l,onPointerGraceIntentChange:c}=s,u={__scopeMenu:e.__scopeMenu},f=h.useCallback(()=>{a.current&&window.clearTimeout(a.current),a.current=null},[]);return h.useEffect(()=>f,[f]),h.useEffect(()=>{const d=l.current;return()=>{window.clearTimeout(d),c(null)}},[l,c]),m.jsx(dg,{asChild:!0,...u,children:m.jsx(p2,{id:i.triggerId,"aria-haspopup":"menu","aria-expanded":r.open,"aria-controls":i.contentId,"data-state":E2(r.open),...e,ref:ke(n,i.onTriggerChange),onClick:d=>{var p;(p=e.onClick)==null||p.call(e,d),!(e.disabled||d.defaultPrevented)&&(d.currentTarget.focus(),r.open||r.onOpenChange(!0))},onPointerMove:re(e.onPointerMove,va(d=>{s.onItemEnter(d),!d.defaultPrevented&&!e.disabled&&!r.open&&!a.current&&(s.onPointerGraceIntentChange(null),a.current=window.setTimeout(()=>{r.onOpenChange(!0),f()},100))})),onPointerLeave:re(e.onPointerLeave,va(d=>{var g,v;f();const p=(g=r.content)==null?void 0:g.getBoundingClientRect();if(p){const w=(v=r.content)==null?void 0:v.dataset.side,_=w==="right",y=_?-5:5,b=p[_?"left":"right"],x=p[_?"right":"left"];s.onPointerGraceIntentChange({area:[{x:d.clientX+y,y:d.clientY},{x:b,y:p.top},{x,y:p.top},{x,y:p.bottom},{x:b,y:p.bottom}],side:w}),window.clearTimeout(l.current),l.current=window.setTimeout(()=>s.onPointerGraceIntentChange(null),300)}else{if(s.onTriggerLeave(d),d.defaultPrevented)return;s.onPointerGraceIntentChange(null)}})),onKeyDown:re(e.onKeyDown,d=>{var g;const p=s.searchRef.current!=="";e.disabled||p&&d.key===" "||bD[o.dir].includes(d.key)&&(r.onOpenChange(!0),(g=r.content)==null||g.focus(),d.preventDefault())})})})});C2.displayName=Ms;var k2="MenuSubContent",N2=h.forwardRef((e,n)=>{const r=c2(qt,e.__scopeMenu),{forceMount:o=r.forceMount,...i}=e,s=Vo(qt,e.__scopeMenu),a=Ya(qt,e.__scopeMenu),l=S2(k2,e.__scopeMenu),c=h.useRef(null),u=ve(n,c);return m.jsx(ya.Provider,{scope:e.__scopeMenu,children:m.jsx(_t,{present:o||s.open,children:m.jsx(ya.Slot,{scope:e.__scopeMenu,children:m.jsx(hg,{id:l.contentId,"aria-labelledby":l.triggerId,...i,ref:u,align:"start",side:a.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:f=>{var d;a.isUsingKeyboardRef.current&&((d=c.current)==null||d.focus()),f.preventDefault()},onCloseAutoFocus:f=>f.preventDefault(),onFocusOutside:re(e.onFocusOutside,f=>{f.target!==l.trigger&&s.onOpenChange(!1)}),onEscapeKeyDown:re(e.onEscapeKeyDown,f=>{a.onClose(),f.preventDefault()}),onKeyDown:re(e.onKeyDown,f=>{var g;const d=f.currentTarget.contains(f.target),p=_D[a.dir].includes(f.key);d&&p&&(s.onOpenChange(!1),(g=l.trigger)==null||g.focus(),f.preventDefault())})})})})})});N2.displayName=k2;function E2(e){return e?"open":"closed"}function lu(e){return e==="indeterminate"}function yg(e){return lu(e)?"indeterminate":e?"checked":"unchecked"}function FD(e){const n=document.activeElement;for(const r of e)if(r===n||(r.focus(),document.activeElement!==n))return}function VD(e,n){return e.map((r,o)=>e[(n+o)%e.length])}function BD(e,n,r){const i=n.length>1&&Array.from(n).every(u=>u===n[0])?n[0]:n,s=r?e.indexOf(r):-1;let a=VD(e,Math.max(s,0));i.length===1&&(a=a.filter(u=>u!==r));const c=a.find(u=>u.toLowerCase().startsWith(i.toLowerCase()));return c!==r?c:void 0}function HD(e,n){const{x:r,y:o}=e;let i=!1;for(let s=0,a=n.length-1;s<n.length;a=s++){const l=n[s],c=n[a],u=l.x,f=l.y,d=c.x,p=c.y;f>o!=p>o&&r<(d-u)*(o-f)/(p-f)+u&&(i=!i)}return i}function WD(e,n){if(!n)return!1;const r={x:e.clientX,y:e.clientY};return HD(r,n)}function va(e){return n=>n.pointerType==="mouse"?e(n):void 0}var UD=dg,GD=u2,YD=d2,XD=mg,KD=f2,qD=yd,ZD=h2,QD=g2,JD=v2,eL=w2,tL=b2,nL=_2,rL=C2,oL=N2,P2="DropdownMenu",[iL]=J$(P2,[a2]),Ct=a2(),[FK,j2]=iL(P2),M2="DropdownMenuTrigger",sL=h.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,disabled:o=!1,...i}=e,s=j2(M2,r),a=Ct(r);return m.jsx(UD,{asChild:!0,...a,children:m.jsx(lO.button,{type:"button",id:s.triggerId,"aria-haspopup":"menu","aria-expanded":s.open,"aria-controls":s.open?s.contentId:void 0,"data-state":s.open?"open":"closed","data-disabled":o?"":void 0,disabled:o,...i,ref:ke(n,s.triggerRef),onPointerDown:re(e.onPointerDown,l=>{!o&&l.button===0&&l.ctrlKey===!1&&(s.onOpenToggle(),s.open||l.preventDefault())}),onKeyDown:re(e.onKeyDown,l=>{o||(["Enter"," "].includes(l.key)&&s.onOpenToggle(),l.key==="ArrowDown"&&s.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(l.key)&&l.preventDefault())})})})});sL.displayName=M2;var aL="DropdownMenuPortal",R2=e=>{const{__scopeDropdownMenu:n,...r}=e,o=Ct(n);return m.jsx(GD,{...o,...r})};R2.displayName=aL;var A2="DropdownMenuContent",T2=h.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...o}=e,i=j2(A2,r),s=Ct(r),a=h.useRef(!1);return m.jsx(YD,{id:i.contentId,"aria-labelledby":i.triggerId,...s,...o,ref:n,onCloseAutoFocus:re(e.onCloseAutoFocus,l=>{var c;a.current||(c=i.triggerRef.current)==null||c.focus(),a.current=!1,l.preventDefault()}),onInteractOutside:re(e.onInteractOutside,l=>{const c=l.detail.originalEvent,u=c.button===0&&c.ctrlKey===!0,f=c.button===2||u;(!i.modal||f)&&(a.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});T2.displayName=A2;var lL="DropdownMenuGroup",cL=h.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...o}=e,i=Ct(r);return m.jsx(XD,{...i,...o,ref:n})});cL.displayName=lL;var uL="DropdownMenuLabel",I2=h.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...o}=e,i=Ct(r);return m.jsx(KD,{...i,...o,ref:n})});I2.displayName=uL;var dL="DropdownMenuItem",$2=h.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...o}=e,i=Ct(r);return m.jsx(qD,{...i,...o,ref:n})});$2.displayName=dL;var fL="DropdownMenuCheckboxItem",O2=h.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...o}=e,i=Ct(r);return m.jsx(ZD,{...i,...o,ref:n})});O2.displayName=fL;var pL="DropdownMenuRadioGroup",hL=h.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...o}=e,i=Ct(r);return m.jsx(QD,{...i,...o,ref:n})});hL.displayName=pL;var mL="DropdownMenuRadioItem",D2=h.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...o}=e,i=Ct(r);return m.jsx(JD,{...i,...o,ref:n})});D2.displayName=mL;var gL="DropdownMenuItemIndicator",L2=h.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...o}=e,i=Ct(r);return m.jsx(eL,{...i,...o,ref:n})});L2.displayName=gL;var yL="DropdownMenuSeparator",z2=h.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...o}=e,i=Ct(r);return m.jsx(tL,{...i,...o,ref:n})});z2.displayName=yL;var vL="DropdownMenuArrow",xL=h.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...o}=e,i=Ct(r);return m.jsx(nL,{...i,...o,ref:n})});xL.displayName=vL;var wL="DropdownMenuSubTrigger",F2=h.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...o}=e,i=Ct(r);return m.jsx(rL,{...i,...o,ref:n})});F2.displayName=wL;var bL="DropdownMenuSubContent",V2=h.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...o}=e,i=Ct(r);return m.jsx(oL,{...i,...o,ref:n,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});V2.displayName=bL;var _L=R2,B2=T2,H2=I2,W2=$2,U2=O2,G2=D2,Y2=L2,X2=z2,K2=F2,q2=V2;const SL=h.forwardRef(({className:e,inset:n,children:r,...o},i)=>m.jsxs(K2,{ref:i,className:ae("flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",n&&"pl-8",e),...o,children:[r,m.jsx(Li,{className:"ml-auto"})]}));SL.displayName=K2.displayName;const CL=h.forwardRef(({className:e,...n},r)=>m.jsx(q2,{ref:r,className:ae("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-dropdown-menu-content-transform-origin]",e),...n}));CL.displayName=q2.displayName;const kL=h.forwardRef(({className:e,sideOffset:n=4,...r},o)=>m.jsx(_L,{children:m.jsx(B2,{ref:o,sideOffset:n,className:ae("z-50 max-h-[var(--radix-dropdown-menu-content-available-height)] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-dropdown-menu-content-transform-origin]",e),...r})}));kL.displayName=B2.displayName;const NL=h.forwardRef(({className:e,inset:n,...r},o)=>m.jsx(W2,{ref:o,className:ae("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0",n&&"pl-8",e),...r}));NL.displayName=W2.displayName;const EL=h.forwardRef(({className:e,children:n,checked:r,...o},i)=>m.jsxs(U2,{ref:i,className:ae("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:r,...o,children:[m.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:m.jsx(Y2,{children:m.jsx(Bm,{className:"h-4 w-4"})})}),n]}));EL.displayName=U2.displayName;const PL=h.forwardRef(({className:e,children:n,...r},o)=>m.jsxs(G2,{ref:o,className:ae("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...r,children:[m.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:m.jsx(Y2,{children:m.jsx(eA,{className:"h-2 w-2 fill-current"})})}),n]}));PL.displayName=G2.displayName;const jL=h.forwardRef(({className:e,inset:n,...r},o)=>m.jsx(H2,{ref:o,className:ae("px-2 py-1.5 text-sm font-semibold",n&&"pl-8",e),...r}));jL.displayName=H2.displayName;const ML=h.forwardRef(({className:e,...n},r)=>m.jsx(X2,{ref:r,className:ae("-mx-1 my-1 h-px bg-muted",e),...n}));ML.displayName=X2.displayName;const RL=h.forwardRef(({className:e,type:n,...r},o)=>m.jsx("input",{type:n,className:ae("flex h-9 w-full rounded-md border border-transparent bg-input px-3 py-1 text-base transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground/50 placeholder:font-light focus-visible:outline-none focus-visible:border-ring focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:o,...r}));RL.displayName="Input";var AL="Label",Z2=h.forwardRef((e,n)=>m.jsx(pt.label,{...e,ref:n,onMouseDown:r=>{var i;r.target.closest("button, input, select, textarea")||((i=e.onMouseDown)==null||i.call(e,r),!r.defaultPrevented&&r.detail>1&&r.preventDefault())}}));Z2.displayName=AL;var Q2=Z2;const TL=Fm("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),IL=h.forwardRef(({className:e,...n},r)=>m.jsx(Q2,{ref:r,className:ae(TL(),e),...n}));IL.displayName=Q2.displayName;function $L(e,n=[]){let r=[];function o(s,a){const l=h.createContext(a),c=r.length;r=[...r,a];const u=d=>{var y;const{scope:p,children:g,...v}=d,w=((y=p==null?void 0:p[e])==null?void 0:y[c])||l,_=h.useMemo(()=>v,Object.values(v));return m.jsx(w.Provider,{value:_,children:g})};u.displayName=s+"Provider";function f(d,p){var w;const g=((w=p==null?void 0:p[e])==null?void 0:w[c])||l,v=h.useContext(g);if(v)return v;if(a!==void 0)return a;throw new Error(`\`${d}\` must be used within \`${s}\``)}return[u,f]}const i=()=>{const s=r.map(a=>h.createContext(a));return function(l){const c=(l==null?void 0:l[e])||s;return h.useMemo(()=>({[`__scope${e}`]:{...l,[e]:c}}),[l,c])}};return i.scopeName=e,[o,OL(i,...n)]}function OL(...e){const n=e[0];if(e.length===1)return n;const r=()=>{const o=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(s){const a=o.reduce((l,{useScope:c,scopeName:u})=>{const d=c(s)[`__scope${u}`];return{...l,...d}},{});return h.useMemo(()=>({[`__scope${n.scopeName}`]:a}),[a])}};return r.scopeName=n.scopeName,r}function J2(e){const n=DL(e),r=h.forwardRef((o,i)=>{const{children:s,...a}=o,l=h.Children.toArray(s),c=l.find(zL);if(c){const u=c.props.children,f=l.map(d=>d===c?h.Children.count(u)>1?h.Children.only(null):h.isValidElement(u)?u.props.children:null:d);return m.jsx(n,{...a,ref:i,children:h.isValidElement(u)?h.cloneElement(u,void 0,f):null})}return m.jsx(n,{...a,ref:i,children:s})});return r.displayName=`${e}.Slot`,r}function DL(e){const n=h.forwardRef((r,o)=>{const{children:i,...s}=r;if(h.isValidElement(i)){const a=VL(i),l=FL(s,i.props);return i.type!==h.Fragment&&(l.ref=o?ke(o,a):a),h.cloneElement(i,l)}return h.Children.count(i)>1?h.Children.only(null):null});return n.displayName=`${e}.SlotClone`,n}var LL=Symbol("radix.slottable");function zL(e){return h.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===LL}function FL(e,n){const r={...n};for(const o in n){const i=e[o],s=n[o];/^on[A-Z]/.test(o)?i&&s?r[o]=(...l)=>{const c=s(...l);return i(...l),c}:i&&(r[o]=i):o==="style"?r[o]={...i,...s}:o==="className"&&(r[o]=[i,s].filter(Boolean).join(" "))}return{...e,...r}}function VL(e){var o,i;let n=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,r=n&&"isReactWarning"in n&&n.isReactWarning;return r?e.ref:(n=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,r=n&&"isReactWarning"in n&&n.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var BL=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],eC=BL.reduce((e,n)=>{const r=J2(`Primitive.${n}`),o=h.forwardRef((i,s)=>{const{asChild:a,...l}=i,c=a?r:n;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),m.jsx(c,{...l,ref:s})});return o.displayName=`Primitive.${n}`,{...e,[n]:o}},{}),tC="Popover",[nC]=$L(tC,[Qr]),vd=Qr(),[VK,Jr]=nC(tC),rC="PopoverAnchor",HL=h.forwardRef((e,n)=>{const{__scopePopover:r,...o}=e,i=Jr(rC,r),s=vd(r),{onCustomAnchorAdd:a,onCustomAnchorRemove:l}=i;return h.useEffect(()=>(a(),()=>l()),[a,l]),m.jsx(Wa,{...s,...o,ref:n})});HL.displayName=rC;var oC="PopoverTrigger",WL=h.forwardRef((e,n)=>{const{__scopePopover:r,...o}=e,i=Jr(oC,r),s=vd(r),a=ve(n,i.triggerRef),l=m.jsx(eC.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":cC(i.open),...o,ref:a,onClick:re(e.onClick,i.onOpenToggle)});return i.hasCustomAnchor?l:m.jsx(Wa,{asChild:!0,...s,children:l})});WL.displayName=oC;var vg="PopoverPortal",[UL,GL]=nC(vg,{forceMount:void 0}),iC=e=>{const{__scopePopover:n,forceMount:r,children:o,container:i}=e,s=Jr(vg,n);return m.jsx(UL,{scope:n,forceMount:r,children:m.jsx(_t,{present:r||s.open,children:m.jsx(rs,{asChild:!0,container:i,children:o})})})};iC.displayName=vg;var Fi="PopoverContent",sC=h.forwardRef((e,n)=>{const r=GL(Fi,e.__scopePopover),{forceMount:o=r.forceMount,...i}=e,s=Jr(Fi,e.__scopePopover);return m.jsx(_t,{present:o||s.open,children:s.modal?m.jsx(XL,{...i,ref:n}):m.jsx(KL,{...i,ref:n})})});sC.displayName=Fi;var YL=J2("PopoverContent.RemoveScroll"),XL=h.forwardRef((e,n)=>{const r=Jr(Fi,e.__scopePopover),o=h.useRef(null),i=ve(n,o),s=h.useRef(!1);return h.useEffect(()=>{const a=o.current;if(a)return od(a)},[]),m.jsx(za,{as:YL,allowPinchZoom:!0,children:m.jsx(aC,{...e,ref:i,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:re(e.onCloseAutoFocus,a=>{var l;a.preventDefault(),s.current||(l=r.triggerRef.current)==null||l.focus()}),onPointerDownOutside:re(e.onPointerDownOutside,a=>{const l=a.detail.originalEvent,c=l.button===0&&l.ctrlKey===!0,u=l.button===2||c;s.current=u},{checkForDefaultPrevented:!1}),onFocusOutside:re(e.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1})})})}),KL=h.forwardRef((e,n)=>{const r=Jr(Fi,e.__scopePopover),o=h.useRef(!1),i=h.useRef(!1);return m.jsx(aC,{...e,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{var a,l;(a=e.onCloseAutoFocus)==null||a.call(e,s),s.defaultPrevented||(o.current||(l=r.triggerRef.current)==null||l.focus(),s.preventDefault()),o.current=!1,i.current=!1},onInteractOutside:s=>{var c,u;(c=e.onInteractOutside)==null||c.call(e,s),s.defaultPrevented||(o.current=!0,s.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const a=s.target;((u=r.triggerRef.current)==null?void 0:u.contains(a))&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&i.current&&s.preventDefault()}})}),aC=h.forwardRef((e,n)=>{const{__scopePopover:r,trapFocus:o,onOpenAutoFocus:i,onCloseAutoFocus:s,disableOutsidePointerEvents:a,onEscapeKeyDown:l,onPointerDownOutside:c,onFocusOutside:u,onInteractOutside:f,...d}=e,p=Jr(Fi,r),g=vd(r);return nd(),m.jsx(Da,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:i,onUnmountAutoFocus:s,children:m.jsx(ns,{asChild:!0,disableOutsidePointerEvents:a,onInteractOutside:f,onEscapeKeyDown:l,onPointerDownOutside:c,onFocusOutside:u,onDismiss:()=>p.onOpenChange(!1),children:m.jsx(pd,{"data-state":cC(p.open),role:"dialog",id:p.contentId,...g,...d,ref:n,style:{...d.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),lC="PopoverClose",qL=h.forwardRef((e,n)=>{const{__scopePopover:r,...o}=e,i=Jr(lC,r);return m.jsx(eC.button,{type:"button",...o,ref:n,onClick:re(e.onClick,()=>i.onOpenChange(!1))})});qL.displayName=lC;var ZL="PopoverArrow",QL=h.forwardRef((e,n)=>{const{__scopePopover:r,...o}=e,i=vd(r);return m.jsx(hd,{...i,...o,ref:n})});QL.displayName=ZL;function cC(e){return e?"open":"closed"}var JL=iC,uC=sC;const e6=h.forwardRef(({className:e,align:n="start",sideOffset:r=4,...o},i)=>m.jsx(JL,{children:m.jsx(uC,{ref:i,align:n,sideOffset:r,className:ae("z-50 w-[var(--radix-popover-trigger-width)] rounded-md border bg-popover p-0 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...o})}));e6.displayName=uC.displayName;var xg="Progress",wg=100,[t6]=m_(xg),[n6,r6]=t6(xg),dC=h.forwardRef((e,n)=>{const{__scopeProgress:r,value:o=null,max:i,getValueLabel:s=o6,...a}=e;(i||i===0)&&!Nv(i)&&console.error(i6(`${i}`,"Progress"));const l=Nv(i)?i:wg;o!==null&&!Ev(o,l)&&console.error(s6(`${o}`,"Progress"));const c=Ev(o,l)?o:null,u=cu(c)?s(c,l):void 0;return m.jsx(n6,{scope:r,value:c,max:l,children:m.jsx(pt.div,{"aria-valuemax":l,"aria-valuemin":0,"aria-valuenow":cu(c)?c:void 0,"aria-valuetext":u,role:"progressbar","data-state":hC(c,l),"data-value":c??void 0,"data-max":l,...a,ref:n})})});dC.displayName=xg;var fC="ProgressIndicator",pC=h.forwardRef((e,n)=>{const{__scopeProgress:r,...o}=e,i=r6(fC,r);return m.jsx(pt.div,{"data-state":hC(i.value,i.max),"data-value":i.value??void 0,"data-max":i.max,...o,ref:n})});pC.displayName=fC;function o6(e,n){return`${Math.round(e/n*100)}%`}function hC(e,n){return e==null?"indeterminate":e===n?"complete":"loading"}function cu(e){return typeof e=="number"}function Nv(e){return cu(e)&&!isNaN(e)&&e>0}function Ev(e,n){return cu(e)&&!isNaN(e)&&e<=n&&e>=0}function i6(e,n){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${n}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${wg}\`.`}function s6(e,n){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${n}\`. The \`value\` prop must be:
375
- - a positive number
376
- - less than the value passed to \`max\` (or ${wg} if no \`max\` prop is set)
377
- - \`null\` or \`undefined\` if the progress is indeterminate.
378
-
379
- Defaulting to \`null\`.`}var mC=dC,a6=pC;const l6=h.forwardRef(({className:e,value:n,...r},o)=>m.jsx(mC,{ref:o,className:ae("relative h-2 w-full overflow-hidden rounded-full bg-primary/20",e),...r,children:m.jsx(a6,{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(n||0)}%)`}})}));l6.displayName=mC.displayName;function Pv(e,[n,r]){return Math.min(r,Math.max(n,e))}function c6(e,n=[]){let r=[];function o(s,a){const l=h.createContext(a),c=r.length;r=[...r,a];const u=d=>{var y;const{scope:p,children:g,...v}=d,w=((y=p==null?void 0:p[e])==null?void 0:y[c])||l,_=h.useMemo(()=>v,Object.values(v));return m.jsx(w.Provider,{value:_,children:g})};u.displayName=s+"Provider";function f(d,p){var w;const g=((w=p==null?void 0:p[e])==null?void 0:w[c])||l,v=h.useContext(g);if(v)return v;if(a!==void 0)return a;throw new Error(`\`${d}\` must be used within \`${s}\``)}return[u,f]}const i=()=>{const s=r.map(a=>h.createContext(a));return function(l){const c=(l==null?void 0:l[e])||s;return h.useMemo(()=>({[`__scope${e}`]:{...l,[e]:c}}),[l,c])}};return i.scopeName=e,[o,u6(i,...n)]}function u6(...e){const n=e[0];if(e.length===1)return n;const r=()=>{const o=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(s){const a=o.reduce((l,{useScope:c,scopeName:u})=>{const d=c(s)[`__scope${u}`];return{...l,...d}},{});return h.useMemo(()=>({[`__scope${n.scopeName}`]:a}),[a])}};return r.scopeName=n.scopeName,r}function gC(e){const n=d6(e),r=h.forwardRef((o,i)=>{const{children:s,...a}=o,l=h.Children.toArray(s),c=l.find(p6);if(c){const u=c.props.children,f=l.map(d=>d===c?h.Children.count(u)>1?h.Children.only(null):h.isValidElement(u)?u.props.children:null:d);return m.jsx(n,{...a,ref:i,children:h.isValidElement(u)?h.cloneElement(u,void 0,f):null})}return m.jsx(n,{...a,ref:i,children:s})});return r.displayName=`${e}.Slot`,r}function d6(e){const n=h.forwardRef((r,o)=>{const{children:i,...s}=r;if(h.isValidElement(i)){const a=m6(i),l=h6(s,i.props);return i.type!==h.Fragment&&(l.ref=o?ke(o,a):a),h.cloneElement(i,l)}return h.Children.count(i)>1?h.Children.only(null):null});return n.displayName=`${e}.SlotClone`,n}var f6=Symbol("radix.slottable");function p6(e){return h.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===f6}function h6(e,n){const r={...n};for(const o in n){const i=e[o],s=n[o];/^on[A-Z]/.test(o)?i&&s?r[o]=(...l)=>{const c=s(...l);return i(...l),c}:i&&(r[o]=i):o==="style"?r[o]={...i,...s}:o==="className"&&(r[o]=[i,s].filter(Boolean).join(" "))}return{...e,...r}}function m6(e){var o,i;let n=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,r=n&&"isReactWarning"in n&&n.isReactWarning;return r?e.ref:(n=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,r=n&&"isReactWarning"in n&&n.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var g6=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],zt=g6.reduce((e,n)=>{const r=gC(`Primitive.${n}`),o=h.forwardRef((i,s)=>{const{asChild:a,...l}=i,c=a?r:n;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),m.jsx(c,{...l,ref:s})});return o.displayName=`Primitive.${n}`,{...e,[n]:o}},{});function y6(e){const n=v6(e),r=h.forwardRef((o,i)=>{const{children:s,...a}=o,l=h.Children.toArray(s),c=l.find(w6);if(c){const u=c.props.children,f=l.map(d=>d===c?h.Children.count(u)>1?h.Children.only(null):h.isValidElement(u)?u.props.children:null:d);return m.jsx(n,{...a,ref:i,children:h.isValidElement(u)?h.cloneElement(u,void 0,f):null})}return m.jsx(n,{...a,ref:i,children:s})});return r.displayName=`${e}.Slot`,r}function v6(e){const n=h.forwardRef((r,o)=>{const{children:i,...s}=r;if(h.isValidElement(i)){const a=_6(i),l=b6(s,i.props);return i.type!==h.Fragment&&(l.ref=o?ke(o,a):a),h.cloneElement(i,l)}return h.Children.count(i)>1?h.Children.only(null):null});return n.displayName=`${e}.SlotClone`,n}var x6=Symbol("radix.slottable");function w6(e){return h.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===x6}function b6(e,n){const r={...n};for(const o in n){const i=e[o],s=n[o];/^on[A-Z]/.test(o)?i&&s?r[o]=(...l)=>{const c=s(...l);return i(...l),c}:i&&(r[o]=i):o==="style"?r[o]={...i,...s}:o==="className"&&(r[o]=[i,s].filter(Boolean).join(" "))}return{...e,...r}}function _6(e){var o,i;let n=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,r=n&&"isReactWarning"in n&&n.isReactWarning;return r?e.ref:(n=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,r=n&&"isReactWarning"in n&&n.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var S6=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],C6=S6.reduce((e,n)=>{const r=y6(`Primitive.${n}`),o=h.forwardRef((i,s)=>{const{asChild:a,...l}=i,c=a?r:n;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),m.jsx(c,{...l,ref:s})});return o.displayName=`Primitive.${n}`,{...e,[n]:o}},{}),yC=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"}),k6="VisuallyHidden",vC=h.forwardRef((e,n)=>m.jsx(C6.span,{...e,ref:n,style:{...yC,...e.style}}));vC.displayName=k6;var N6=vC,E6=[" ","Enter","ArrowUp","ArrowDown"],P6=[" ","Enter"],xd="Select",[bg,wd,j6]=ng(xd),[ss]=c6(xd,[j6,Qr]),_g=Qr(),[BK,eo]=ss(xd),[HK,M6]=ss(xd),xC="SelectTrigger",wC=h.forwardRef((e,n)=>{const{__scopeSelect:r,disabled:o=!1,...i}=e,s=_g(r),a=eo(xC,r),l=a.disabled||o,c=ve(n,a.onTriggerChange),u=wd(r),f=h.useRef("touch"),[d,p,g]=BC(w=>{const _=u().filter(x=>!x.disabled),y=_.find(x=>x.value===a.value),b=HC(_,w,y);b!==void 0&&a.onValueChange(b.value)}),v=w=>{l||(a.onOpenChange(!0),g()),w&&(a.triggerPointerDownPosRef.current={x:Math.round(w.pageX),y:Math.round(w.pageY)})};return m.jsx(Wa,{asChild:!0,...s,children:m.jsx(zt.button,{type:"button",role:"combobox","aria-controls":a.contentId,"aria-expanded":a.open,"aria-required":a.required,"aria-autocomplete":"none",dir:a.dir,"data-state":a.open?"open":"closed",disabled:l,"data-disabled":l?"":void 0,"data-placeholder":VC(a.value)?"":void 0,...i,ref:c,onClick:re(i.onClick,w=>{w.currentTarget.focus(),f.current!=="mouse"&&v(w)}),onPointerDown:re(i.onPointerDown,w=>{f.current=w.pointerType;const _=w.target;_.hasPointerCapture(w.pointerId)&&_.releasePointerCapture(w.pointerId),w.button===0&&w.ctrlKey===!1&&w.pointerType==="mouse"&&(v(w),w.preventDefault())}),onKeyDown:re(i.onKeyDown,w=>{const _=d.current!=="";!(w.ctrlKey||w.altKey||w.metaKey)&&w.key.length===1&&p(w.key),!(_&&w.key===" ")&&E6.includes(w.key)&&(v(),w.preventDefault())})})})});wC.displayName=xC;var bC="SelectValue",R6=h.forwardRef((e,n)=>{const{__scopeSelect:r,className:o,style:i,children:s,placeholder:a="",...l}=e,c=eo(bC,r),{onValueNodeHasChildrenChange:u}=c,f=s!==void 0,d=ve(n,c.onValueNodeChange);return Ye(()=>{u(f)},[u,f]),m.jsx(zt.span,{...l,ref:d,style:{pointerEvents:"none"},children:VC(c.value)?m.jsx(m.Fragment,{children:a}):s})});R6.displayName=bC;var A6="SelectIcon",_C=h.forwardRef((e,n)=>{const{__scopeSelect:r,children:o,...i}=e;return m.jsx(zt.span,{"aria-hidden":!0,...i,ref:n,children:o||"▼"})});_C.displayName=A6;var T6="SelectPortal",SC=e=>m.jsx(rs,{asChild:!0,...e});SC.displayName=T6;var Ro="SelectContent",CC=h.forwardRef((e,n)=>{const r=eo(Ro,e.__scopeSelect),[o,i]=h.useState();if(Ye(()=>{i(new DocumentFragment)},[]),!r.open){const s=o;return s?Lo.createPortal(m.jsx(kC,{scope:e.__scopeSelect,children:m.jsx(bg.Slot,{scope:e.__scopeSelect,children:m.jsx("div",{children:e.children})})}),s):null}return m.jsx(NC,{...e,ref:n})});CC.displayName=Ro;var nn=10,[kC,to]=ss(Ro),I6="SelectContentImpl",$6=gC("SelectContent.RemoveScroll"),NC=h.forwardRef((e,n)=>{const{__scopeSelect:r,position:o="item-aligned",onCloseAutoFocus:i,onEscapeKeyDown:s,onPointerDownOutside:a,side:l,sideOffset:c,align:u,alignOffset:f,arrowPadding:d,collisionBoundary:p,collisionPadding:g,sticky:v,hideWhenDetached:w,avoidCollisions:_,...y}=e,b=eo(Ro,r),[x,S]=h.useState(null),[C,k]=h.useState(null),N=ve(n,U=>S(U)),[E,P]=h.useState(null),[T,A]=h.useState(null),D=wd(r),[V,j]=h.useState(!1),L=h.useRef(!1);h.useEffect(()=>{if(x)return od(x)},[x]),nd();const I=h.useCallback(U=>{const[Y,...q]=D().map(Z=>Z.ref.current),[te]=q.slice(-1),J=document.activeElement;for(const Z of U)if(Z===J||(Z==null||Z.scrollIntoView({block:"nearest"}),Z===Y&&C&&(C.scrollTop=0),Z===te&&C&&(C.scrollTop=C.scrollHeight),Z==null||Z.focus(),document.activeElement!==J))return},[D,C]),z=h.useCallback(()=>I([E,x]),[I,E,x]);h.useEffect(()=>{V&&z()},[V,z]);const{onOpenChange:M,triggerPointerDownPosRef:R}=b;h.useEffect(()=>{if(x){let U={x:0,y:0};const Y=te=>{var J,Z;U={x:Math.abs(Math.round(te.pageX)-(((J=R.current)==null?void 0:J.x)??0)),y:Math.abs(Math.round(te.pageY)-(((Z=R.current)==null?void 0:Z.y)??0))}},q=te=>{U.x<=10&&U.y<=10?te.preventDefault():x.contains(te.target)||M(!1),document.removeEventListener("pointermove",Y),R.current=null};return R.current!==null&&(document.addEventListener("pointermove",Y),document.addEventListener("pointerup",q,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",Y),document.removeEventListener("pointerup",q,{capture:!0})}}},[x,M,R]),h.useEffect(()=>{const U=()=>M(!1);return window.addEventListener("blur",U),window.addEventListener("resize",U),()=>{window.removeEventListener("blur",U),window.removeEventListener("resize",U)}},[M]);const[O,W]=BC(U=>{const Y=D().filter(J=>!J.disabled),q=Y.find(J=>J.ref.current===document.activeElement),te=HC(Y,U,q);te&&setTimeout(()=>te.ref.current.focus())}),$=h.useCallback((U,Y,q)=>{const te=!L.current&&!q;(b.value!==void 0&&b.value===Y||te)&&(P(U),te&&(L.current=!0))},[b.value]),X=h.useCallback(()=>x==null?void 0:x.focus(),[x]),F=h.useCallback((U,Y,q)=>{const te=!L.current&&!q;(b.value!==void 0&&b.value===Y||te)&&A(U)},[b.value]),H=o==="popper"?oh:EC,G=H===oh?{side:l,sideOffset:c,align:u,alignOffset:f,arrowPadding:d,collisionBoundary:p,collisionPadding:g,sticky:v,hideWhenDetached:w,avoidCollisions:_}:{};return m.jsx(kC,{scope:r,content:x,viewport:C,onViewportChange:k,itemRefCallback:$,selectedItem:E,onItemLeave:X,itemTextRefCallback:F,focusSelectedItem:z,selectedItemText:T,position:o,isPositioned:V,searchRef:O,children:m.jsx(za,{as:$6,allowPinchZoom:!0,children:m.jsx(Da,{asChild:!0,trapped:b.open,onMountAutoFocus:U=>{U.preventDefault()},onUnmountAutoFocus:re(i,U=>{var Y;(Y=b.trigger)==null||Y.focus({preventScroll:!0}),U.preventDefault()}),children:m.jsx(ns,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:a,onFocusOutside:U=>U.preventDefault(),onDismiss:()=>b.onOpenChange(!1),children:m.jsx(H,{role:"listbox",id:b.contentId,"data-state":b.open?"open":"closed",dir:b.dir,onContextMenu:U=>U.preventDefault(),...y,...G,onPlaced:()=>j(!0),ref:N,style:{display:"flex",flexDirection:"column",outline:"none",...y.style},onKeyDown:re(y.onKeyDown,U=>{const Y=U.ctrlKey||U.altKey||U.metaKey;if(U.key==="Tab"&&U.preventDefault(),!Y&&U.key.length===1&&W(U.key),["ArrowUp","ArrowDown","Home","End"].includes(U.key)){let te=D().filter(J=>!J.disabled).map(J=>J.ref.current);if(["ArrowUp","End"].includes(U.key)&&(te=te.slice().reverse()),["ArrowUp","ArrowDown"].includes(U.key)){const J=U.target,Z=te.indexOf(J);te=te.slice(Z+1)}setTimeout(()=>I(te)),U.preventDefault()}})})})})})})});NC.displayName=I6;var O6="SelectItemAlignedPosition",EC=h.forwardRef((e,n)=>{const{__scopeSelect:r,onPlaced:o,...i}=e,s=eo(Ro,r),a=to(Ro,r),[l,c]=h.useState(null),[u,f]=h.useState(null),d=ve(n,N=>f(N)),p=wd(r),g=h.useRef(!1),v=h.useRef(!0),{viewport:w,selectedItem:_,selectedItemText:y,focusSelectedItem:b}=a,x=h.useCallback(()=>{if(s.trigger&&s.valueNode&&l&&u&&w&&_&&y){const N=s.trigger.getBoundingClientRect(),E=u.getBoundingClientRect(),P=s.valueNode.getBoundingClientRect(),T=y.getBoundingClientRect();if(s.dir!=="rtl"){const J=T.left-E.left,Z=P.left-J,ne=N.left-Z,ue=N.width+ne,ye=Math.max(ue,E.width),pe=window.innerWidth-nn,Ne=Pv(Z,[nn,Math.max(nn,pe-ye)]);l.style.minWidth=ue+"px",l.style.left=Ne+"px"}else{const J=E.right-T.right,Z=window.innerWidth-P.right-J,ne=window.innerWidth-N.right-Z,ue=N.width+ne,ye=Math.max(ue,E.width),pe=window.innerWidth-nn,Ne=Pv(Z,[nn,Math.max(nn,pe-ye)]);l.style.minWidth=ue+"px",l.style.right=Ne+"px"}const A=p(),D=window.innerHeight-nn*2,V=w.scrollHeight,j=window.getComputedStyle(u),L=parseInt(j.borderTopWidth,10),I=parseInt(j.paddingTop,10),z=parseInt(j.borderBottomWidth,10),M=parseInt(j.paddingBottom,10),R=L+I+V+M+z,O=Math.min(_.offsetHeight*5,R),W=window.getComputedStyle(w),$=parseInt(W.paddingTop,10),X=parseInt(W.paddingBottom,10),F=N.top+N.height/2-nn,H=D-F,G=_.offsetHeight/2,U=_.offsetTop+G,Y=L+I+U,q=R-Y;if(Y<=F){const J=A.length>0&&_===A[A.length-1].ref.current;l.style.bottom="0px";const Z=u.clientHeight-w.offsetTop-w.offsetHeight,ne=Math.max(H,G+(J?X:0)+Z+z),ue=Y+ne;l.style.height=ue+"px"}else{const J=A.length>0&&_===A[0].ref.current;l.style.top="0px";const ne=Math.max(F,L+w.offsetTop+(J?$:0)+G)+q;l.style.height=ne+"px",w.scrollTop=Y-F+w.offsetTop}l.style.margin=`${nn}px 0`,l.style.minHeight=O+"px",l.style.maxHeight=D+"px",o==null||o(),requestAnimationFrame(()=>g.current=!0)}},[p,s.trigger,s.valueNode,l,u,w,_,y,s.dir,o]);Ye(()=>x(),[x]);const[S,C]=h.useState();Ye(()=>{u&&C(window.getComputedStyle(u).zIndex)},[u]);const k=h.useCallback(N=>{N&&v.current===!0&&(x(),b==null||b(),v.current=!1)},[x,b]);return m.jsx(L6,{scope:r,contentWrapper:l,shouldExpandOnScrollRef:g,onScrollButtonChange:k,children:m.jsx("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:S},children:m.jsx(zt.div,{...i,ref:d,style:{boxSizing:"border-box",maxHeight:"100%",...i.style}})})})});EC.displayName=O6;var D6="SelectPopperPosition",oh=h.forwardRef((e,n)=>{const{__scopeSelect:r,align:o="start",collisionPadding:i=nn,...s}=e,a=_g(r);return m.jsx(pd,{...a,...s,ref:n,align:o,collisionPadding:i,style:{boxSizing:"border-box",...s.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)"}})});oh.displayName=D6;var[L6,Sg]=ss(Ro,{}),ih="SelectViewport",PC=h.forwardRef((e,n)=>{const{__scopeSelect:r,nonce:o,...i}=e,s=to(ih,r),a=Sg(ih,r),l=ve(n,s.onViewportChange),c=h.useRef(0);return m.jsxs(m.Fragment,{children:[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:o}),m.jsx(bg.Slot,{scope:r,children:m.jsx(zt.div,{"data-radix-select-viewport":"",role:"presentation",...i,ref:l,style:{position:"relative",flex:1,overflow:"hidden auto",...i.style},onScroll:re(i.onScroll,u=>{const f=u.currentTarget,{contentWrapper:d,shouldExpandOnScrollRef:p}=a;if(p!=null&&p.current&&d){const g=Math.abs(c.current-f.scrollTop);if(g>0){const v=window.innerHeight-nn*2,w=parseFloat(d.style.minHeight),_=parseFloat(d.style.height),y=Math.max(w,_);if(y<v){const b=y+g,x=Math.min(v,b),S=b-x;d.style.height=x+"px",d.style.bottom==="0px"&&(f.scrollTop=S>0?S:0,d.style.justifyContent="flex-end")}}}c.current=f.scrollTop})})})]})});PC.displayName=ih;var jC="SelectGroup",[z6,F6]=ss(jC),V6=h.forwardRef((e,n)=>{const{__scopeSelect:r,...o}=e,i=Tt();return m.jsx(z6,{scope:r,id:i,children:m.jsx(zt.div,{role:"group","aria-labelledby":i,...o,ref:n})})});V6.displayName=jC;var MC="SelectLabel",RC=h.forwardRef((e,n)=>{const{__scopeSelect:r,...o}=e,i=F6(MC,r);return m.jsx(zt.div,{id:i.id,...o,ref:n})});RC.displayName=MC;var uu="SelectItem",[B6,AC]=ss(uu),TC=h.forwardRef((e,n)=>{const{__scopeSelect:r,value:o,disabled:i=!1,textValue:s,...a}=e,l=eo(uu,r),c=to(uu,r),u=l.value===o,[f,d]=h.useState(s??""),[p,g]=h.useState(!1),v=ve(n,b=>{var x;return(x=c.itemRefCallback)==null?void 0:x.call(c,b,o,i)}),w=Tt(),_=h.useRef("touch"),y=()=>{i||(l.onValueChange(o),l.onOpenChange(!1))};if(o==="")throw new 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 m.jsx(B6,{scope:r,value:o,disabled:i,textId:w,isSelected:u,onItemTextChange:h.useCallback(b=>{d(x=>x||((b==null?void 0:b.textContent)??"").trim())},[]),children:m.jsx(bg.ItemSlot,{scope:r,value:o,disabled:i,textValue:f,children:m.jsx(zt.div,{role:"option","aria-labelledby":w,"data-highlighted":p?"":void 0,"aria-selected":u&&p,"data-state":u?"checked":"unchecked","aria-disabled":i||void 0,"data-disabled":i?"":void 0,tabIndex:i?void 0:-1,...a,ref:v,onFocus:re(a.onFocus,()=>g(!0)),onBlur:re(a.onBlur,()=>g(!1)),onClick:re(a.onClick,()=>{_.current!=="mouse"&&y()}),onPointerUp:re(a.onPointerUp,()=>{_.current==="mouse"&&y()}),onPointerDown:re(a.onPointerDown,b=>{_.current=b.pointerType}),onPointerMove:re(a.onPointerMove,b=>{var x;_.current=b.pointerType,i?(x=c.onItemLeave)==null||x.call(c):_.current==="mouse"&&b.currentTarget.focus({preventScroll:!0})}),onPointerLeave:re(a.onPointerLeave,b=>{var x;b.currentTarget===document.activeElement&&((x=c.onItemLeave)==null||x.call(c))}),onKeyDown:re(a.onKeyDown,b=>{var S;((S=c.searchRef)==null?void 0:S.current)!==""&&b.key===" "||(P6.includes(b.key)&&y(),b.key===" "&&b.preventDefault())})})})})});TC.displayName=uu;var Rs="SelectItemText",IC=h.forwardRef((e,n)=>{const{__scopeSelect:r,className:o,style:i,...s}=e,a=eo(Rs,r),l=to(Rs,r),c=AC(Rs,r),u=M6(Rs,r),[f,d]=h.useState(null),p=ve(n,y=>d(y),c.onItemTextChange,y=>{var b;return(b=l.itemTextRefCallback)==null?void 0:b.call(l,y,c.value,c.disabled)}),g=f==null?void 0:f.textContent,v=h.useMemo(()=>m.jsx("option",{value:c.value,disabled:c.disabled,children:g},c.value),[c.disabled,c.value,g]),{onNativeOptionAdd:w,onNativeOptionRemove:_}=u;return Ye(()=>(w(v),()=>_(v)),[w,_,v]),m.jsxs(m.Fragment,{children:[m.jsx(zt.span,{id:c.textId,...s,ref:p}),c.isSelected&&a.valueNode&&!a.valueNodeHasChildren?Lo.createPortal(s.children,a.valueNode):null]})});IC.displayName=Rs;var $C="SelectItemIndicator",OC=h.forwardRef((e,n)=>{const{__scopeSelect:r,...o}=e;return AC($C,r).isSelected?m.jsx(zt.span,{"aria-hidden":!0,...o,ref:n}):null});OC.displayName=$C;var sh="SelectScrollUpButton",DC=h.forwardRef((e,n)=>{const r=to(sh,e.__scopeSelect),o=Sg(sh,e.__scopeSelect),[i,s]=h.useState(!1),a=ve(n,o.onScrollButtonChange);return Ye(()=>{if(r.viewport&&r.isPositioned){let l=function(){const u=c.scrollTop>0;s(u)};const c=r.viewport;return l(),c.addEventListener("scroll",l),()=>c.removeEventListener("scroll",l)}},[r.viewport,r.isPositioned]),i?m.jsx(zC,{...e,ref:a,onAutoScroll:()=>{const{viewport:l,selectedItem:c}=r;l&&c&&(l.scrollTop=l.scrollTop-c.offsetHeight)}}):null});DC.displayName=sh;var ah="SelectScrollDownButton",LC=h.forwardRef((e,n)=>{const r=to(ah,e.__scopeSelect),o=Sg(ah,e.__scopeSelect),[i,s]=h.useState(!1),a=ve(n,o.onScrollButtonChange);return Ye(()=>{if(r.viewport&&r.isPositioned){let l=function(){const u=c.scrollHeight-c.clientHeight,f=Math.ceil(c.scrollTop)<u;s(f)};const c=r.viewport;return l(),c.addEventListener("scroll",l),()=>c.removeEventListener("scroll",l)}},[r.viewport,r.isPositioned]),i?m.jsx(zC,{...e,ref:a,onAutoScroll:()=>{const{viewport:l,selectedItem:c}=r;l&&c&&(l.scrollTop=l.scrollTop+c.offsetHeight)}}):null});LC.displayName=ah;var zC=h.forwardRef((e,n)=>{const{__scopeSelect:r,onAutoScroll:o,...i}=e,s=to("SelectScrollButton",r),a=h.useRef(null),l=wd(r),c=h.useCallback(()=>{a.current!==null&&(window.clearInterval(a.current),a.current=null)},[]);return h.useEffect(()=>()=>c(),[c]),Ye(()=>{var f;const u=l().find(d=>d.ref.current===document.activeElement);(f=u==null?void 0:u.ref.current)==null||f.scrollIntoView({block:"nearest"})},[l]),m.jsx(zt.div,{"aria-hidden":!0,...i,ref:n,style:{flexShrink:0,...i.style},onPointerDown:re(i.onPointerDown,()=>{a.current===null&&(a.current=window.setInterval(o,50))}),onPointerMove:re(i.onPointerMove,()=>{var u;(u=s.onItemLeave)==null||u.call(s),a.current===null&&(a.current=window.setInterval(o,50))}),onPointerLeave:re(i.onPointerLeave,()=>{c()})})}),H6="SelectSeparator",FC=h.forwardRef((e,n)=>{const{__scopeSelect:r,...o}=e;return m.jsx(zt.div,{"aria-hidden":!0,...o,ref:n})});FC.displayName=H6;var lh="SelectArrow",W6=h.forwardRef((e,n)=>{const{__scopeSelect:r,...o}=e,i=_g(r),s=eo(lh,r),a=to(lh,r);return s.open&&a.position==="popper"?m.jsx(hd,{...i,...o,ref:n}):null});W6.displayName=lh;var U6="SelectBubbleInput",G6=h.forwardRef(({__scopeSelect:e,value:n,...r},o)=>{const i=h.useRef(null),s=ve(o,i),a=Gm(n);return h.useEffect(()=>{const l=i.current;if(!l)return;const c=window.HTMLSelectElement.prototype,f=Object.getOwnPropertyDescriptor(c,"value").set;if(a!==n&&f){const d=new Event("change",{bubbles:!0});f.call(l,n),l.dispatchEvent(d)}},[a,n]),m.jsx(zt.select,{...r,style:{...yC,...r.style},ref:s,defaultValue:n})});G6.displayName=U6;function VC(e){return e===""||e===void 0}function BC(e){const n=An(e),r=h.useRef(""),o=h.useRef(0),i=h.useCallback(a=>{const l=r.current+a;n(l),function c(u){r.current=u,window.clearTimeout(o.current),u!==""&&(o.current=window.setTimeout(()=>c(""),1e3))}(l)},[n]),s=h.useCallback(()=>{r.current="",window.clearTimeout(o.current)},[]);return h.useEffect(()=>()=>window.clearTimeout(o.current),[]),[r,i,s]}function HC(e,n,r){const i=n.length>1&&Array.from(n).every(u=>u===n[0])?n[0]:n,s=r?e.indexOf(r):-1;let a=Y6(e,Math.max(s,0));i.length===1&&(a=a.filter(u=>u!==r));const c=a.find(u=>u.textValue.toLowerCase().startsWith(i.toLowerCase()));return c!==r?c:void 0}function Y6(e,n){return e.map((r,o)=>e[(n+o)%e.length])}var WC=wC,X6=_C,K6=SC,UC=CC,q6=PC,GC=RC,YC=TC,Z6=IC,Q6=OC,XC=DC,KC=LC,qC=FC;const J6=h.forwardRef(({className:e,children:n,...r},o)=>m.jsxs(WC,{ref:o,className:ae("flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-transparent bg-input px-3 py-2 text-sm ring-offset-background data-[placeholder]:text-muted-foreground/50 data-[placeholder]:font-light focus:outline-none focus:border-ring focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...r,children:[n,m.jsx(X6,{asChild:!0,children:m.jsx(ed,{className:"h-4 w-4 opacity-50"})})]}));J6.displayName=WC.displayName;const ZC=h.forwardRef(({className:e,...n},r)=>m.jsx(XC,{ref:r,className:ae("flex cursor-default items-center justify-center py-1",e),...n,children:m.jsx(X5,{className:"h-4 w-4"})}));ZC.displayName=XC.displayName;const QC=h.forwardRef(({className:e,...n},r)=>m.jsx(KC,{ref:r,className:ae("flex cursor-default items-center justify-center py-1",e),...n,children:m.jsx(ed,{className:"h-4 w-4"})}));QC.displayName=KC.displayName;const e8=h.forwardRef(({className:e,children:n,position:r="popper",...o},i)=>m.jsx(K6,{children:m.jsxs(UC,{ref:i,className:ae("relative z-50 max-h-[--radix-select-content-available-height] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-select-content-transform-origin]",r==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:r,...o,children:[m.jsx(ZC,{}),m.jsx(q6,{className:ae("p-1",r==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:n}),m.jsx(QC,{})]})}));e8.displayName=UC.displayName;const t8=h.forwardRef(({className:e,...n},r)=>m.jsx(GC,{ref:r,className:ae("px-2 py-1.5 text-sm font-semibold",e),...n}));t8.displayName=GC.displayName;const n8=h.forwardRef(({className:e,children:n,...r},o)=>m.jsxs(YC,{ref:o,className:ae("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...r,children:[m.jsx("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:m.jsx(Q6,{children:m.jsx(Bm,{className:"h-4 w-4"})})}),m.jsx(Z6,{children:n})]}));n8.displayName=YC.displayName;const r8=h.forwardRef(({className:e,...n},r)=>m.jsx(qC,{ref:r,className:ae("-mx-1 my-1 h-px bg-muted",e),...n}));r8.displayName=qC.displayName;var o8="Separator",jv="horizontal",i8=["horizontal","vertical"],JC=h.forwardRef((e,n)=>{const{decorative:r,orientation:o=jv,...i}=e,s=s8(o)?o:jv,l=r?{role:"none"}:{"aria-orientation":s==="vertical"?s:void 0,role:"separator"};return m.jsx(pt.div,{"data-orientation":s,...l,...i,ref:n})});JC.displayName=o8;function s8(e){return i8.includes(e)}var ek=JC;const a8=h.forwardRef(({className:e,orientation:n="horizontal",decorative:r=!0,...o},i)=>m.jsx(ek,{ref:i,decorative:r,orientation:n,className:ae("shrink-0 bg-border",n==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...o}));a8.displayName=ek.displayName;const l8=eg,tk=h.forwardRef(({className:e,...n},r)=>m.jsx(Fa,{className:ae("fixed inset-0 z-50 bg-black/80 [will-change:opacity] data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...n,ref:r}));tk.displayName=Fa.displayName;const c8=Fm("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out [will-change:transform,opacity] data-[state=closed]:duration-300 data-[state=open]:duration-500 data-[state=open]:animate-in data-[state=closed]:animate-out",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),u8=h.forwardRef(({side:e="right",className:n,children:r,...o},i)=>m.jsxs(l8,{children:[m.jsx(tk,{}),m.jsxs(Va,{ref:i,className:ae(c8({side:e}),n),...o,children:[m.jsxs(xS,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",children:[m.jsx(tu,{className:"h-4 w-4"}),m.jsx("span",{className:"sr-only",children:"Close"})]}),r]})]}));u8.displayName=Va.displayName;const d8=h.forwardRef(({className:e,...n},r)=>m.jsx(sd,{ref:r,className:ae("text-lg font-semibold text-foreground",e),...n}));d8.displayName=sd.displayName;const f8=h.forwardRef(({className:e,...n},r)=>m.jsx(ad,{ref:r,className:ae("text-sm text-muted-foreground",e),...n}));f8.displayName=ad.displayName;function p8(e,n=[]){let r=[];function o(s,a){const l=h.createContext(a),c=r.length;r=[...r,a];const u=d=>{var y;const{scope:p,children:g,...v}=d,w=((y=p==null?void 0:p[e])==null?void 0:y[c])||l,_=h.useMemo(()=>v,Object.values(v));return m.jsx(w.Provider,{value:_,children:g})};u.displayName=s+"Provider";function f(d,p){var w;const g=((w=p==null?void 0:p[e])==null?void 0:w[c])||l,v=h.useContext(g);if(v)return v;if(a!==void 0)return a;throw new Error(`\`${d}\` must be used within \`${s}\``)}return[u,f]}const i=()=>{const s=r.map(a=>h.createContext(a));return function(l){const c=(l==null?void 0:l[e])||s;return h.useMemo(()=>({[`__scope${e}`]:{...l,[e]:c}}),[l,c])}};return i.scopeName=e,[o,h8(i,...n)]}function h8(...e){const n=e[0];if(e.length===1)return n;const r=()=>{const o=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(s){const a=o.reduce((l,{useScope:c,scopeName:u})=>{const d=c(s)[`__scope${u}`];return{...l,...d}},{});return h.useMemo(()=>({[`__scope${n.scopeName}`]:a}),[a])}};return r.scopeName=n.scopeName,r}function m8(e){const n=g8(e),r=h.forwardRef((o,i)=>{const{children:s,...a}=o,l=h.Children.toArray(s),c=l.find(v8);if(c){const u=c.props.children,f=l.map(d=>d===c?h.Children.count(u)>1?h.Children.only(null):h.isValidElement(u)?u.props.children:null:d);return m.jsx(n,{...a,ref:i,children:h.isValidElement(u)?h.cloneElement(u,void 0,f):null})}return m.jsx(n,{...a,ref:i,children:s})});return r.displayName=`${e}.Slot`,r}function g8(e){const n=h.forwardRef((r,o)=>{const{children:i,...s}=r;if(h.isValidElement(i)){const a=w8(i),l=x8(s,i.props);return i.type!==h.Fragment&&(l.ref=o?ke(o,a):a),h.cloneElement(i,l)}return h.Children.count(i)>1?h.Children.only(null):null});return n.displayName=`${e}.SlotClone`,n}var y8=Symbol("radix.slottable");function v8(e){return h.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===y8}function x8(e,n){const r={...n};for(const o in n){const i=e[o],s=n[o];/^on[A-Z]/.test(o)?i&&s?r[o]=(...l)=>{const c=s(...l);return i(...l),c}:i&&(r[o]=i):o==="style"?r[o]={...i,...s}:o==="className"&&(r[o]=[i,s].filter(Boolean).join(" "))}return{...e,...r}}function w8(e){var o,i;let n=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,r=n&&"isReactWarning"in n&&n.isReactWarning;return r?e.ref:(n=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,r=n&&"isReactWarning"in n&&n.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var b8=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],nk=b8.reduce((e,n)=>{const r=m8(`Primitive.${n}`),o=h.forwardRef((i,s)=>{const{asChild:a,...l}=i,c=a?r:n;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),m.jsx(c,{...l,ref:s})});return o.displayName=`Primitive.${n}`,{...e,[n]:o}},{}),bd="Switch",[_8]=p8(bd),[S8,C8]=_8(bd),rk=h.forwardRef((e,n)=>{const{__scopeSwitch:r,name:o,checked:i,defaultChecked:s,required:a,disabled:l,value:c="on",onCheckedChange:u,form:f,...d}=e,[p,g]=h.useState(null),v=ve(n,x=>g(x)),w=h.useRef(!1),_=p?f||!!p.closest("form"):!0,[y,b]=Oa({prop:i,defaultProp:s??!1,onChange:u,caller:bd});return m.jsxs(S8,{scope:r,checked:y,disabled:l,children:[m.jsx(nk.button,{type:"button",role:"switch","aria-checked":y,"aria-required":a,"data-state":ak(y),"data-disabled":l?"":void 0,disabled:l,value:c,...d,ref:v,onClick:re(e.onClick,x=>{b(S=>!S),_&&(w.current=x.isPropagationStopped(),w.current||x.stopPropagation())})}),_&&m.jsx(sk,{control:p,bubbles:!w.current,name:o,value:c,checked:y,required:a,disabled:l,form:f,style:{transform:"translateX(-100%)"}})]})});rk.displayName=bd;var ok="SwitchThumb",ik=h.forwardRef((e,n)=>{const{__scopeSwitch:r,...o}=e,i=C8(ok,r);return m.jsx(nk.span,{"data-state":ak(i.checked),"data-disabled":i.disabled?"":void 0,...o,ref:n})});ik.displayName=ok;var k8="SwitchBubbleInput",sk=h.forwardRef(({__scopeSwitch:e,control:n,checked:r,bubbles:o=!0,...i},s)=>{const a=h.useRef(null),l=ve(a,s),c=Gm(r),u=Ym(n);return h.useEffect(()=>{const f=a.current;if(!f)return;const d=window.HTMLInputElement.prototype,g=Object.getOwnPropertyDescriptor(d,"checked").set;if(c!==r&&g){const v=new Event("click",{bubbles:o});g.call(f,r),f.dispatchEvent(v)}},[c,r,o]),m.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:r,...i,tabIndex:-1,ref:l,style:{...i.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});sk.displayName=k8;function ak(e){return e?"checked":"unchecked"}var lk=rk,N8=ik;const E8=h.forwardRef(({className:e,...n},r)=>m.jsx(lk,{ref:r,className:ae("peer inline-flex h-4 w-7 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",e),...n,children:m.jsx(N8,{className:ae("pointer-events-none block h-3 w-3 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-3 data-[state=unchecked]:translate-x-0")})}));E8.displayName=lk.displayName;function P8(e){if(typeof document>"u")return;let n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",n.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}Array(12).fill(0);let ch=1;class j8{constructor(){this.subscribe=n=>(this.subscribers.push(n),()=>{const r=this.subscribers.indexOf(n);this.subscribers.splice(r,1)}),this.publish=n=>{this.subscribers.forEach(r=>r(n))},this.addToast=n=>{this.publish(n),this.toasts=[...this.toasts,n]},this.create=n=>{var r;const{message:o,...i}=n,s=typeof(n==null?void 0:n.id)=="number"||((r=n.id)==null?void 0:r.length)>0?n.id:ch++,a=this.toasts.find(c=>c.id===s),l=n.dismissible===void 0?!0:n.dismissible;return this.dismissedToasts.has(s)&&this.dismissedToasts.delete(s),a?this.toasts=this.toasts.map(c=>c.id===s?(this.publish({...c,...n,id:s,title:o}),{...c,...n,id:s,dismissible:l,title:o}):c):this.addToast({title:o,...i,dismissible:l,id:s}),s},this.dismiss=n=>(n?(this.dismissedToasts.add(n),requestAnimationFrame(()=>this.subscribers.forEach(r=>r({id:n,dismiss:!0})))):this.toasts.forEach(r=>{this.subscribers.forEach(o=>o({id:r.id,dismiss:!0}))}),n),this.message=(n,r)=>this.create({...r,message:n}),this.error=(n,r)=>this.create({...r,message:n,type:"error"}),this.success=(n,r)=>this.create({...r,type:"success",message:n}),this.info=(n,r)=>this.create({...r,type:"info",message:n}),this.warning=(n,r)=>this.create({...r,type:"warning",message:n}),this.loading=(n,r)=>this.create({...r,type:"loading",message:n}),this.promise=(n,r)=>{if(!r)return;let o;r.loading!==void 0&&(o=this.create({...r,promise:n,type:"loading",message:r.loading,description:typeof r.description!="function"?r.description:void 0}));const i=Promise.resolve(n instanceof Function?n():n);let s=o!==void 0,a;const l=i.then(async u=>{if(a=["resolve",u],ot.isValidElement(u))s=!1,this.create({id:o,type:"default",message:u});else if(R8(u)&&!u.ok){s=!1;const d=typeof r.error=="function"?await r.error(`HTTP error! status: ${u.status}`):r.error,p=typeof r.description=="function"?await r.description(`HTTP error! status: ${u.status}`):r.description,v=typeof d=="object"&&!ot.isValidElement(d)?d:{message:d};this.create({id:o,type:"error",description:p,...v})}else if(u instanceof Error){s=!1;const d=typeof r.error=="function"?await r.error(u):r.error,p=typeof r.description=="function"?await r.description(u):r.description,v=typeof d=="object"&&!ot.isValidElement(d)?d:{message:d};this.create({id:o,type:"error",description:p,...v})}else if(r.success!==void 0){s=!1;const d=typeof r.success=="function"?await r.success(u):r.success,p=typeof r.description=="function"?await r.description(u):r.description,v=typeof d=="object"&&!ot.isValidElement(d)?d:{message:d};this.create({id:o,type:"success",description:p,...v})}}).catch(async u=>{if(a=["reject",u],r.error!==void 0){s=!1;const f=typeof r.error=="function"?await r.error(u):r.error,d=typeof r.description=="function"?await r.description(u):r.description,g=typeof f=="object"&&!ot.isValidElement(f)?f:{message:f};this.create({id:o,type:"error",description:d,...g})}}).finally(()=>{s&&(this.dismiss(o),o=void 0),r.finally==null||r.finally.call(r)}),c=()=>new Promise((u,f)=>l.then(()=>a[0]==="reject"?f(a[1]):u(a[1])).catch(f));return typeof o!="string"&&typeof o!="number"?{unwrap:c}:Object.assign(o,{unwrap:c})},this.custom=(n,r)=>{const o=(r==null?void 0:r.id)||ch++;return this.create({jsx:n(o),id:o,...r}),o},this.getActiveToasts=()=>this.toasts.filter(n=>!this.dismissedToasts.has(n.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const Ht=new j8,M8=(e,n)=>{const r=(n==null?void 0:n.id)||ch++;return Ht.addToast({title:e,...n,id:r}),r},R8=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",A8=M8,T8=()=>Ht.toasts,I8=()=>Ht.getActiveToasts();Object.assign(A8,{success:Ht.success,info:Ht.info,warning:Ht.warning,error:Ht.error,custom:Ht.custom,message:Ht.message,promise:Ht.promise,dismiss:Ht.dismiss,loading:Ht.loading},{getHistory:T8,getToasts:I8});P8("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function $8(e,n=[]){let r=[];function o(s,a){const l=h.createContext(a),c=r.length;r=[...r,a];const u=d=>{var y;const{scope:p,children:g,...v}=d,w=((y=p==null?void 0:p[e])==null?void 0:y[c])||l,_=h.useMemo(()=>v,Object.values(v));return m.jsx(w.Provider,{value:_,children:g})};u.displayName=s+"Provider";function f(d,p){var w;const g=((w=p==null?void 0:p[e])==null?void 0:w[c])||l,v=h.useContext(g);if(v)return v;if(a!==void 0)return a;throw new Error(`\`${d}\` must be used within \`${s}\``)}return[u,f]}const i=()=>{const s=r.map(a=>h.createContext(a));return function(l){const c=(l==null?void 0:l[e])||s;return h.useMemo(()=>({[`__scope${e}`]:{...l,[e]:c}}),[l,c])}};return i.scopeName=e,[o,O8(i,...n)]}function O8(...e){const n=e[0];if(e.length===1)return n;const r=()=>{const o=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(s){const a=o.reduce((l,{useScope:c,scopeName:u})=>{const d=c(s)[`__scope${u}`];return{...l,...d}},{});return h.useMemo(()=>({[`__scope${n.scopeName}`]:a}),[a])}};return r.scopeName=n.scopeName,r}function D8(e){const n=L8(e),r=h.forwardRef((o,i)=>{const{children:s,...a}=o,l=h.Children.toArray(s),c=l.find(F8);if(c){const u=c.props.children,f=l.map(d=>d===c?h.Children.count(u)>1?h.Children.only(null):h.isValidElement(u)?u.props.children:null:d);return m.jsx(n,{...a,ref:i,children:h.isValidElement(u)?h.cloneElement(u,void 0,f):null})}return m.jsx(n,{...a,ref:i,children:s})});return r.displayName=`${e}.Slot`,r}function L8(e){const n=h.forwardRef((r,o)=>{const{children:i,...s}=r;if(h.isValidElement(i)){const a=B8(i),l=V8(s,i.props);return i.type!==h.Fragment&&(l.ref=o?ke(o,a):a),h.cloneElement(i,l)}return h.Children.count(i)>1?h.Children.only(null):null});return n.displayName=`${e}.SlotClone`,n}var z8=Symbol("radix.slottable");function F8(e){return h.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===z8}function V8(e,n){const r={...n};for(const o in n){const i=e[o],s=n[o];/^on[A-Z]/.test(o)?i&&s?r[o]=(...l)=>{const c=s(...l);return i(...l),c}:i&&(r[o]=i):o==="style"?r[o]={...i,...s}:o==="className"&&(r[o]=[i,s].filter(Boolean).join(" "))}return{...e,...r}}function B8(e){var o,i;let n=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,r=n&&"isReactWarning"in n&&n.isReactWarning;return r?e.ref:(n=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,r=n&&"isReactWarning"in n&&n.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var H8=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],_d=H8.reduce((e,n)=>{const r=D8(`Primitive.${n}`),o=h.forwardRef((i,s)=>{const{asChild:a,...l}=i,c=a?r:n;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),m.jsx(c,{...l,ref:s})});return o.displayName=`Primitive.${n}`,{...e,[n]:o}},{}),Sd="Tabs",[W8]=$8(Sd,[md]),ck=md(),[U8,Cg]=W8(Sd),G8=h.forwardRef((e,n)=>{const{__scopeTabs:r,value:o,onValueChange:i,defaultValue:s,orientation:a="horizontal",dir:l,activationMode:c="automatic",...u}=e,f=PS(l),[d,p]=Oa({prop:o,onChange:i,defaultProp:s??"",caller:Sd});return m.jsx(U8,{scope:r,baseId:Tt(),value:d,onValueChange:p,orientation:a,dir:f,activationMode:c,children:m.jsx(_d.div,{dir:f,"data-orientation":a,...u,ref:n})})});G8.displayName=Sd;var uk="TabsList",dk=h.forwardRef((e,n)=>{const{__scopeTabs:r,loop:o=!0,...i}=e,s=Cg(uk,r),a=ck(r);return m.jsx(o2,{asChild:!0,...a,orientation:s.orientation,dir:s.dir,loop:o,children:m.jsx(_d.div,{role:"tablist","aria-orientation":s.orientation,...i,ref:n})})});dk.displayName=uk;var fk="TabsTrigger",pk=h.forwardRef((e,n)=>{const{__scopeTabs:r,value:o,disabled:i=!1,...s}=e,a=Cg(fk,r),l=ck(r),c=gk(a.baseId,o),u=yk(a.baseId,o),f=o===a.value;return m.jsx(i2,{asChild:!0,...l,focusable:!i,active:f,children:m.jsx(_d.button,{type:"button",role:"tab","aria-selected":f,"aria-controls":u,"data-state":f?"active":"inactive","data-disabled":i?"":void 0,disabled:i,id:c,...s,ref:n,onMouseDown:re(e.onMouseDown,d=>{!i&&d.button===0&&d.ctrlKey===!1?a.onValueChange(o):d.preventDefault()}),onKeyDown:re(e.onKeyDown,d=>{[" ","Enter"].includes(d.key)&&a.onValueChange(o)}),onFocus:re(e.onFocus,()=>{const d=a.activationMode!=="manual";!f&&!i&&d&&a.onValueChange(o)})})})});pk.displayName=fk;var hk="TabsContent",mk=h.forwardRef((e,n)=>{const{__scopeTabs:r,value:o,forceMount:i,children:s,...a}=e,l=Cg(hk,r),c=gk(l.baseId,o),u=yk(l.baseId,o),f=o===l.value,d=h.useRef(f);return h.useEffect(()=>{const p=requestAnimationFrame(()=>d.current=!1);return()=>cancelAnimationFrame(p)},[]),m.jsx(_t,{present:i||f,children:({present:p})=>m.jsx(_d.div,{"data-state":f?"active":"inactive","data-orientation":l.orientation,role:"tabpanel","aria-labelledby":c,hidden:!p,id:u,tabIndex:0,...a,ref:n,style:{...e.style,animationDuration:d.current?"0s":void 0},children:p&&s})})});mk.displayName=hk;function gk(e,n){return`${e}-trigger-${n}`}function yk(e,n){return`${e}-content-${n}`}var vk=dk,xk=pk,wk=mk;const Y8=h.forwardRef(({className:e,...n},r)=>m.jsx(vk,{ref:r,className:ae("inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",e),...n}));Y8.displayName=vk.displayName;const X8=h.forwardRef(({className:e,...n},r)=>m.jsx(xk,{ref:r,className:ae("inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-primary/10 data-[state=active]:text-primary data-[state=active]:shadow-sm",e),...n}));X8.displayName=xk.displayName;const K8=h.forwardRef(({className:e,...n},r)=>m.jsx(wk,{ref:r,className:ae("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...n}));K8.displayName=wk.displayName;const q8=h.forwardRef(({className:e,...n},r)=>m.jsx("textarea",{className:ae("flex min-h-[60px] w-full rounded-md border border-transparent bg-input px-3 py-2 text-base placeholder:text-muted-foreground/50 placeholder:font-light focus-visible:outline-none focus-visible:border-ring focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:r,...n}));q8.displayName="Textarea";function Z8(e,n=[]){let r=[];function o(s,a){const l=h.createContext(a),c=r.length;r=[...r,a];const u=d=>{var y;const{scope:p,children:g,...v}=d,w=((y=p==null?void 0:p[e])==null?void 0:y[c])||l,_=h.useMemo(()=>v,Object.values(v));return m.jsx(w.Provider,{value:_,children:g})};u.displayName=s+"Provider";function f(d,p){var w;const g=((w=p==null?void 0:p[e])==null?void 0:w[c])||l,v=h.useContext(g);if(v)return v;if(a!==void 0)return a;throw new Error(`\`${d}\` must be used within \`${s}\``)}return[u,f]}const i=()=>{const s=r.map(a=>h.createContext(a));return function(l){const c=(l==null?void 0:l[e])||s;return h.useMemo(()=>({[`__scope${e}`]:{...l,[e]:c}}),[l,c])}};return i.scopeName=e,[o,Q8(i,...n)]}function Q8(...e){const n=e[0];if(e.length===1)return n;const r=()=>{const o=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(s){const a=o.reduce((l,{useScope:c,scopeName:u})=>{const d=c(s)[`__scope${u}`];return{...l,...d}},{});return h.useMemo(()=>({[`__scope${n.scopeName}`]:a}),[a])}};return r.scopeName=n.scopeName,r}function J8(e){const n=ez(e),r=h.forwardRef((o,i)=>{const{children:s,...a}=o,l=h.Children.toArray(s),c=l.find(nz);if(c){const u=c.props.children,f=l.map(d=>d===c?h.Children.count(u)>1?h.Children.only(null):h.isValidElement(u)?u.props.children:null:d);return m.jsx(n,{...a,ref:i,children:h.isValidElement(u)?h.cloneElement(u,void 0,f):null})}return m.jsx(n,{...a,ref:i,children:s})});return r.displayName=`${e}.Slot`,r}function ez(e){const n=h.forwardRef((r,o)=>{const{children:i,...s}=r;if(h.isValidElement(i)){const a=oz(i),l=rz(s,i.props);return i.type!==h.Fragment&&(l.ref=o?ke(o,a):a),h.cloneElement(i,l)}return h.Children.count(i)>1?h.Children.only(null):null});return n.displayName=`${e}.SlotClone`,n}var bk=Symbol("radix.slottable");function tz(e){const n=({children:r})=>m.jsx(m.Fragment,{children:r});return n.displayName=`${e}.Slottable`,n.__radixId=bk,n}function nz(e){return h.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===bk}function rz(e,n){const r={...n};for(const o in n){const i=e[o],s=n[o];/^on[A-Z]/.test(o)?i&&s?r[o]=(...l)=>{const c=s(...l);return i(...l),c}:i&&(r[o]=i):o==="style"?r[o]={...i,...s}:o==="className"&&(r[o]=[i,s].filter(Boolean).join(" "))}return{...e,...r}}function oz(e){var o,i;let n=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,r=n&&"isReactWarning"in n&&n.isReactWarning;return r?e.ref:(n=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,r=n&&"isReactWarning"in n&&n.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var iz=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],sz=iz.reduce((e,n)=>{const r=J8(`Primitive.${n}`),o=h.forwardRef((i,s)=>{const{asChild:a,...l}=i,c=a?r:n;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),m.jsx(c,{...l,ref:s})});return o.displayName=`Primitive.${n}`,{...e,[n]:o}},{}),[Cd]=Z8("Tooltip",[Qr]),kg=Qr(),az="TooltipProvider",Mv="tooltip.open",[WK,_k]=Cd(az),Sk="Tooltip",[UK,Xa]=Cd(Sk),uh="TooltipTrigger",lz=h.forwardRef((e,n)=>{const{__scopeTooltip:r,...o}=e,i=Xa(uh,r),s=_k(uh,r),a=kg(r),l=h.useRef(null),c=ve(n,l,i.onTriggerChange),u=h.useRef(!1),f=h.useRef(!1),d=h.useCallback(()=>u.current=!1,[]);return h.useEffect(()=>()=>document.removeEventListener("pointerup",d),[d]),m.jsx(Wa,{asChild:!0,...a,children:m.jsx(sz.button,{"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute,...o,ref:c,onPointerMove:re(e.onPointerMove,p=>{p.pointerType!=="touch"&&!f.current&&!s.isPointerInTransitRef.current&&(i.onTriggerEnter(),f.current=!0)}),onPointerLeave:re(e.onPointerLeave,()=>{i.onTriggerLeave(),f.current=!1}),onPointerDown:re(e.onPointerDown,()=>{i.open&&i.onClose(),u.current=!0,document.addEventListener("pointerup",d,{once:!0})}),onFocus:re(e.onFocus,()=>{u.current||i.onOpen()}),onBlur:re(e.onBlur,i.onClose),onClick:re(e.onClick,i.onClose)})})});lz.displayName=uh;var Ng="TooltipPortal",[cz,uz]=Cd(Ng,{forceMount:void 0}),Ck=e=>{const{__scopeTooltip:n,forceMount:r,children:o,container:i}=e,s=Xa(Ng,n);return m.jsx(cz,{scope:n,forceMount:r,children:m.jsx(_t,{present:r||s.open,children:m.jsx(rs,{asChild:!0,container:i,children:o})})})};Ck.displayName=Ng;var Vi="TooltipContent",kk=h.forwardRef((e,n)=>{const r=uz(Vi,e.__scopeTooltip),{forceMount:o=r.forceMount,side:i="top",...s}=e,a=Xa(Vi,e.__scopeTooltip);return m.jsx(_t,{present:o||a.open,children:a.disableHoverableContent?m.jsx(Nk,{side:i,...s,ref:n}):m.jsx(dz,{side:i,...s,ref:n})})}),dz=h.forwardRef((e,n)=>{const r=Xa(Vi,e.__scopeTooltip),o=_k(Vi,e.__scopeTooltip),i=h.useRef(null),s=ve(n,i),[a,l]=h.useState(null),{trigger:c,onClose:u}=r,f=i.current,{onPointerInTransitChange:d}=o,p=h.useCallback(()=>{l(null),d(!1)},[d]),g=h.useCallback((v,w)=>{const _=v.currentTarget,y={x:v.clientX,y:v.clientY},b=gz(y,_.getBoundingClientRect()),x=yz(y,b),S=vz(w.getBoundingClientRect()),C=wz([...x,...S]);l(C),d(!0)},[d]);return h.useEffect(()=>()=>p(),[p]),h.useEffect(()=>{if(c&&f){const v=_=>g(_,f),w=_=>g(_,c);return c.addEventListener("pointerleave",v),f.addEventListener("pointerleave",w),()=>{c.removeEventListener("pointerleave",v),f.removeEventListener("pointerleave",w)}}},[c,f,g,p]),h.useEffect(()=>{if(a){const v=w=>{const _=w.target,y={x:w.clientX,y:w.clientY},b=(c==null?void 0:c.contains(_))||(f==null?void 0:f.contains(_)),x=!xz(y,a);b?p():x&&(p(),u())};return document.addEventListener("pointermove",v),()=>document.removeEventListener("pointermove",v)}},[c,f,a,u,p]),m.jsx(Nk,{...e,ref:s})}),[fz,pz]=Cd(Sk,{isInside:!1}),hz=tz("TooltipContent"),Nk=h.forwardRef((e,n)=>{const{__scopeTooltip:r,children:o,"aria-label":i,onEscapeKeyDown:s,onPointerDownOutside:a,...l}=e,c=Xa(Vi,r),u=kg(r),{onClose:f}=c;return h.useEffect(()=>(document.addEventListener(Mv,f),()=>document.removeEventListener(Mv,f)),[f]),h.useEffect(()=>{if(c.trigger){const d=p=>{const g=p.target;g!=null&&g.contains(c.trigger)&&f()};return window.addEventListener("scroll",d,{capture:!0}),()=>window.removeEventListener("scroll",d,{capture:!0})}},[c.trigger,f]),m.jsx(ns,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:a,onFocusOutside:d=>d.preventDefault(),onDismiss:f,children:m.jsxs(pd,{"data-state":c.stateAttribute,...u,...l,ref:n,style:{...l.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:[m.jsx(hz,{children:o}),m.jsx(fz,{scope:r,isInside:!0,children:m.jsx(N6,{id:c.contentId,role:"tooltip",children:i||o})})]})})});kk.displayName=Vi;var Ek="TooltipArrow",mz=h.forwardRef((e,n)=>{const{__scopeTooltip:r,...o}=e,i=kg(r);return pz(Ek,r).isInside?null:m.jsx(hd,{...i,...o,ref:n})});mz.displayName=Ek;function gz(e,n){const r=Math.abs(n.top-e.y),o=Math.abs(n.bottom-e.y),i=Math.abs(n.right-e.x),s=Math.abs(n.left-e.x);switch(Math.min(r,o,i,s)){case s:return"left";case i:return"right";case r:return"top";case o:return"bottom";default:throw new Error("unreachable")}}function yz(e,n,r=5){const o=[];switch(n){case"top":o.push({x:e.x-r,y:e.y+r},{x:e.x+r,y:e.y+r});break;case"bottom":o.push({x:e.x-r,y:e.y-r},{x:e.x+r,y:e.y-r});break;case"left":o.push({x:e.x+r,y:e.y-r},{x:e.x+r,y:e.y+r});break;case"right":o.push({x:e.x-r,y:e.y-r},{x:e.x-r,y:e.y+r});break}return o}function vz(e){const{top:n,right:r,bottom:o,left:i}=e;return[{x:i,y:n},{x:r,y:n},{x:r,y:o},{x:i,y:o}]}function xz(e,n){const{x:r,y:o}=e;let i=!1;for(let s=0,a=n.length-1;s<n.length;a=s++){const l=n[s],c=n[a],u=l.x,f=l.y,d=c.x,p=c.y;f>o!=p>o&&r<(d-u)*(o-f)/(p-f)+u&&(i=!i)}return i}function wz(e){const n=e.slice();return n.sort((r,o)=>r.x<o.x?-1:r.x>o.x?1:r.y<o.y?-1:r.y>o.y?1:0),bz(n)}function bz(e){if(e.length<=1)return e.slice();const n=[];for(let o=0;o<e.length;o++){const i=e[o];for(;n.length>=2;){const s=n[n.length-1],a=n[n.length-2];if((s.x-a.x)*(i.y-a.y)>=(s.y-a.y)*(i.x-a.x))n.pop();else break}n.push(i)}n.pop();const r=[];for(let o=e.length-1;o>=0;o--){const i=e[o];for(;r.length>=2;){const s=r[r.length-1],a=r[r.length-2];if((s.x-a.x)*(i.y-a.y)>=(s.y-a.y)*(i.x-a.x))r.pop();else break}r.push(i)}return r.pop(),n.length===1&&r.length===1&&n[0].x===r[0].x&&n[0].y===r[0].y?n:n.concat(r)}var _z=Ck,Pk=kk;const Sz=h.forwardRef(({className:e,sideOffset:n=4,...r},o)=>m.jsx(_z,{children:m.jsx(Pk,{ref:o,sideOffset:n,className:ae("z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-tooltip-content-transform-origin]",e),...r})}));Sz.displayName=Pk.displayName;function Cz(){const{setTheme:e,resolvedTheme:n}=y3();return m.jsxs(O_,{variant:"ghost",size:"icon",className:"relative h-8 w-8",onClick:()=>e(n==="dark"?"light":"dark"),children:[m.jsx(zA,{className:"h-4 w-4 rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0"}),m.jsx(_A,{className:"absolute h-4 w-4 rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100"}),m.jsx("span",{className:"sr-only",children:"Toggle theme"})]})}const jk=h.createContext({activeProject:".",setActiveProject:()=>{},projects:[],isMultiProject:!1,monorepoRoot:"",reloadProjects:async()=>{}});function Eg(){return h.useContext(jk)}function Bo(){const{activeProject:e,isMultiProject:n}=Eg();return h.useCallback((r,o)=>{const i=new URLSearchParams(o);n&&e!=="."&&i.set("project",e);const s=i.toString();return s?`${r}?${s}`:r},[e,n])}function kz({children:e}){const[n,r]=h.useState([]),[o,i]=h.useState("."),[s,a]=h.useState(""),l=h.useCallback(async()=>{var u;try{const f=await fetch("/api/projects");if(!f.ok)return;const d=await f.json();r(d.projects??[]),a(d.monorepoRoot??""),((u=d.projects)==null?void 0:u.length)>0&&o==="."&&i(d.projects[0].root)}catch{}},[o]);h.useEffect(()=>{l()},[l]);const c=n.length>1;return m.jsx(jk.Provider,{value:{activeProject:o,setActiveProject:i,projects:n,isMultiProject:c,monorepoRoot:s,reloadProjects:l},children:e})}function Nz(){return m.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[m.jsx("circle",{cx:"6",cy:"6",r:"2.5"}),m.jsx("circle",{cx:"18",cy:"6",r:"2.5"}),m.jsx("circle",{cx:"12",cy:"14",r:"2.5"}),m.jsx("circle",{cx:"6",cy:"20",r:"1.8"}),m.jsx("circle",{cx:"18",cy:"20",r:"1.8"}),m.jsx("path",{d:"M7.6 7.6 10.7 12.5"}),m.jsx("path",{d:"M16.4 7.6 13.3 12.5"}),m.jsx("path",{d:"M10.5 15.5 7.2 19"}),m.jsx("path",{d:"M13.5 15.5 16.8 19"})]})}function Ez(){var c;const{projects:e,activeProject:n,setActiveProject:r,isMultiProject:o}=Eg(),[i,s]=h.useState(!1),a=h.useRef(null);h.useEffect(()=>{if(!i)return;const u=f=>{a.current&&!a.current.contains(f.target)&&s(!1)};return document.addEventListener("mousedown",u),()=>document.removeEventListener("mousedown",u)},[i]);const l=((c=e.find(u=>u.root===n))==null?void 0:c.name)??"Project";return o?m.jsxs("div",{className:"relative",ref:a,children:[m.jsxs("button",{onClick:()=>s(!i),className:"flex items-center gap-1.5 px-3 py-1.5 text-sm font-medium rounded-lg border border-border/50 hover:bg-muted/50 transition-colors",children:[l,m.jsx(ed,{className:`h-3.5 w-3.5 text-muted-foreground transition-transform ${i?"rotate-180":""}`})]}),i&&m.jsx("div",{className:"absolute top-full left-0 mt-1 w-56 rounded-lg border border-border bg-card shadow-lg z-50 py-1",children:e.map(u=>m.jsxs("button",{onClick:()=>{r(u.root),s(!1)},className:`flex items-center gap-2 w-full px-3 py-2 text-sm text-left hover:bg-muted/50 transition-colors ${u.root===n?"bg-purple-500/10 text-purple-400":""}`,children:[m.jsx("span",{className:"flex-1 truncate",children:u.name}),u.hasGraphs&&m.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-green-500 shrink-0",title:"Graphs generated"})]},u.root))})]}):m.jsx("span",{className:"text-sm font-medium text-muted-foreground px-2",children:l})}function Pz(){return m.jsxs("header",{className:"sticky top-0 z-40 flex h-[var(--header-height)] items-center border-b bg-background/80 px-4 shadow-sm backdrop-blur-md",children:[m.jsxs("span",{className:"logo",children:[m.jsx("span",{className:"logo-icon",children:m.jsx(Nz,{})}),m.jsx("span",{className:"logo-text",children:"LaunchChart"})]}),m.jsx("div",{className:"mx-4",children:m.jsx(Ez,{})}),m.jsx("div",{className:"ml-auto flex items-center gap-2",children:m.jsx(Cz,{})})]})}const jz=[{to:"/overview",label:"Overview",icon:pA},{to:"/modules",label:"Modules",icon:Ju},{to:"/sitemap",label:"Sitemap",icon:wA},{to:"/journeys",label:"User Journeys",icon:AA},{to:"/project-graph",label:"Project Graph",icon:CA},{to:"/audit",label:"Audit",icon:$_},{to:"/settings",label:"Settings",icon:I_}],Mz="sidebar-nav-item active relative flex items-center gap-3 overflow-hidden rounded-lg px-3 py-1.5 text-sm bg-gradient-to-r from-sidebar-primary/20 via-transparent via-80% to-transparent font-medium text-sidebar-foreground before:absolute before:left-0 before:top-0 before:h-full before:w-[3px] before:rounded-full before:bg-sidebar-primary",Rz="sidebar-nav-item relative flex w-full items-center gap-3 overflow-hidden rounded-lg px-3 py-1.5 text-sm font-normal text-sidebar-muted-foreground transition-colors duration-200 hover:text-sidebar-foreground bg-transparent border-none cursor-pointer";function Az(){return m.jsx("aside",{className:"hidden lg:flex lg:flex-col w-[var(--sidebar-width)] sidebar-gradient",children:m.jsx("nav",{className:"flex-1 overflow-y-auto px-3 py-4",children:m.jsx("ul",{className:"space-y-1",children:jz.map(e=>{const n=e.icon;return m.jsx("li",{children:m.jsxs(p3,{to:e.to,className:({isActive:r})=>r?Mz:Rz,children:[m.jsx(n,{className:"h-4 w-4 shrink-0"}),e.label]})},e.to)})})})})}function Tz(e,n){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var o,i,s,a,l=[],c=!0,u=!1;try{if(s=(r=r.call(e)).next,n===0){if(Object(r)!==r)return;c=!1}else for(;!(c=(o=s.call(r)).done)&&(l.push(o.value),l.length!==n);c=!0);}catch(f){u=!0,i=f}finally{try{if(!c&&r.return!=null&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw i}}return l}}function Iz(e,n,r){return n=Bz(n),n in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}function Rv(e,n){return Dz(e)||Tz(e,n)||Mk(e,n)||Fz()}function $z(e){return Oz(e)||Lz(e)||Mk(e)||zz()}function Oz(e){if(Array.isArray(e))return dh(e)}function Dz(e){if(Array.isArray(e))return e}function Lz(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Mk(e,n){if(e){if(typeof e=="string")return dh(e,n);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return dh(e,n)}}function dh(e,n){(n==null||n>e.length)&&(n=e.length);for(var r=0,o=new Array(n);r<n;r++)o[r]=e[r];return o}function zz(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
380
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Fz(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
381
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Vz(e,n){if(typeof e!="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var o=r.call(e,n);if(typeof o!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}function Bz(e){var n=Vz(e,"string");return typeof n=="symbol"?n:String(n)}var Hz=function(n,r){var o=new Set(r);return Object.assign.apply(Object,[{}].concat($z(Object.entries(n).filter(function(i){var s=Rv(i,1),a=s[0];return!o.has(a)}).map(function(i){var s=Rv(i,2),a=s[0],l=s[1];return Iz({},a,l)}))))};function fh(e,n){(n==null||n>e.length)&&(n=e.length);for(var r=0,o=Array(n);r<n;r++)o[r]=e[r];return o}function Wz(e){if(Array.isArray(e))return e}function Uz(e){if(Array.isArray(e))return fh(e)}function Gz(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Yz(e,n){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var o,i,s,a,l=[],c=!0,u=!1;try{if(s=(r=r.call(e)).next,n!==0)for(;!(c=(o=s.call(r)).done)&&(l.push(o.value),l.length!==n);c=!0);}catch(f){u=!0,i=f}finally{try{if(!c&&r.return!=null&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw i}}return l}}function Xz(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
382
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Kz(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
383
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function qz(e,n){return Wz(e)||Yz(e,n)||Rk(e,n)||Xz()}function Av(e){return Uz(e)||Gz(e)||Rk(e)||Kz()}function Rk(e,n){if(e){if(typeof e=="string")return fh(e,n);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?fh(e,n):void 0}}function Zz(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=n.wrapperElementType,o=r===void 0?"div":r,i=n.nodeMapper,s=i===void 0?function(f){return f}:i,a=n.methodNames,l=a===void 0?[]:a,c=n.initPropNames,u=c===void 0?[]:c;return h.forwardRef(function(f,d){var p=h.useRef(),g=h.useMemo(function(){var _=Object.fromEntries(u.filter(function(y){return f.hasOwnProperty(y)}).map(function(y){return[y,f[y]]}));return e(_)},[]);Tv(function(){g(s(p.current))},h.useLayoutEffect),Tv(function(){return g._destructor instanceof Function?g._destructor:void 0});var v=h.useCallback(function(_){for(var y=arguments.length,b=new Array(y>1?y-1:0),x=1;x<y;x++)b[x-1]=arguments[x];return g[_]instanceof Function?g[_].apply(g,b):void 0},[g]),w=h.useRef({});return Object.keys(Hz(f,[].concat(Av(l),Av(u)))).filter(function(_){return w.current[_]!==f[_]}).forEach(function(_){return v(_,f[_])}),w.current=f,h.useImperativeHandle(d,function(){return Object.fromEntries(l.map(function(_){return[_,function(){for(var y=arguments.length,b=new Array(y),x=0;x<y;x++)b[x]=arguments[x];return v.apply(void 0,[_].concat(b))}]}))},[v]),ot.createElement(o,{ref:p})})}function Tv(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:h.useEffect,r=h.useRef(),o=h.useRef(!1),i=h.useRef(!1),s=h.useState(0),a=qz(s,2);a[0];var l=a[1];o.current&&(i.current=!0),n(function(){return o.current||(r.current=e(),o.current=!0),l(function(c){return c+1}),function(){i.current&&r.current&&r.current()}},[])}var ph="http://www.w3.org/1999/xhtml";const Iv={svg:"http://www.w3.org/2000/svg",xhtml:ph,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function kd(e){var n=e+="",r=n.indexOf(":");return r>=0&&(n=e.slice(0,r))!=="xmlns"&&(e=e.slice(r+1)),Iv.hasOwnProperty(n)?{space:Iv[n],local:e}:e}function Qz(e){return function(){var n=this.ownerDocument,r=this.namespaceURI;return r===ph&&n.documentElement.namespaceURI===ph?n.createElement(e):n.createElementNS(r,e)}}function Jz(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Ak(e){var n=kd(e);return(n.local?Jz:Qz)(n)}function e9(){}function Pg(e){return e==null?e9:function(){return this.querySelector(e)}}function t9(e){typeof e!="function"&&(e=Pg(e));for(var n=this._groups,r=n.length,o=new Array(r),i=0;i<r;++i)for(var s=n[i],a=s.length,l=o[i]=new Array(a),c,u,f=0;f<a;++f)(c=s[f])&&(u=e.call(c,c.__data__,f,s))&&("__data__"in c&&(u.__data__=c.__data__),l[f]=u);return new Ot(o,this._parents)}function n9(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function r9(){return[]}function Tk(e){return e==null?r9:function(){return this.querySelectorAll(e)}}function o9(e){return function(){return n9(e.apply(this,arguments))}}function i9(e){typeof e=="function"?e=o9(e):e=Tk(e);for(var n=this._groups,r=n.length,o=[],i=[],s=0;s<r;++s)for(var a=n[s],l=a.length,c,u=0;u<l;++u)(c=a[u])&&(o.push(e.call(c,c.__data__,u,a)),i.push(c));return new Ot(o,i)}function Ik(e){return function(){return this.matches(e)}}function $k(e){return function(n){return n.matches(e)}}var s9=Array.prototype.find;function a9(e){return function(){return s9.call(this.children,e)}}function l9(){return this.firstElementChild}function c9(e){return this.select(e==null?l9:a9(typeof e=="function"?e:$k(e)))}var u9=Array.prototype.filter;function d9(){return Array.from(this.children)}function f9(e){return function(){return u9.call(this.children,e)}}function p9(e){return this.selectAll(e==null?d9:f9(typeof e=="function"?e:$k(e)))}function h9(e){typeof e!="function"&&(e=Ik(e));for(var n=this._groups,r=n.length,o=new Array(r),i=0;i<r;++i)for(var s=n[i],a=s.length,l=o[i]=[],c,u=0;u<a;++u)(c=s[u])&&e.call(c,c.__data__,u,s)&&l.push(c);return new Ot(o,this._parents)}function Ok(e){return new Array(e.length)}function m9(){return new Ot(this._enter||this._groups.map(Ok),this._parents)}function du(e,n){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=n}du.prototype={constructor:du,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,n){return this._parent.insertBefore(e,n)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function g9(e){return function(){return e}}function y9(e,n,r,o,i,s){for(var a=0,l,c=n.length,u=s.length;a<u;++a)(l=n[a])?(l.__data__=s[a],o[a]=l):r[a]=new du(e,s[a]);for(;a<c;++a)(l=n[a])&&(i[a]=l)}function v9(e,n,r,o,i,s,a){var l,c,u=new Map,f=n.length,d=s.length,p=new Array(f),g;for(l=0;l<f;++l)(c=n[l])&&(p[l]=g=a.call(c,c.__data__,l,n)+"",u.has(g)?i[l]=c:u.set(g,c));for(l=0;l<d;++l)g=a.call(e,s[l],l,s)+"",(c=u.get(g))?(o[l]=c,c.__data__=s[l],u.delete(g)):r[l]=new du(e,s[l]);for(l=0;l<f;++l)(c=n[l])&&u.get(p[l])===c&&(i[l]=c)}function x9(e){return e.__data__}function w9(e,n){if(!arguments.length)return Array.from(this,x9);var r=n?v9:y9,o=this._parents,i=this._groups;typeof e!="function"&&(e=g9(e));for(var s=i.length,a=new Array(s),l=new Array(s),c=new Array(s),u=0;u<s;++u){var f=o[u],d=i[u],p=d.length,g=b9(e.call(f,f&&f.__data__,u,o)),v=g.length,w=l[u]=new Array(v),_=a[u]=new Array(v),y=c[u]=new Array(p);r(f,d,w,_,y,g,n);for(var b=0,x=0,S,C;b<v;++b)if(S=w[b]){for(b>=x&&(x=b+1);!(C=_[x])&&++x<v;);S._next=C||null}}return a=new Ot(a,o),a._enter=l,a._exit=c,a}function b9(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function _9(){return new Ot(this._exit||this._groups.map(Ok),this._parents)}function S9(e,n,r){var o=this.enter(),i=this,s=this.exit();return typeof e=="function"?(o=e(o),o&&(o=o.selection())):o=o.append(e+""),n!=null&&(i=n(i),i&&(i=i.selection())),r==null?s.remove():r(s),o&&i?o.merge(i).order():i}function C9(e){for(var n=e.selection?e.selection():e,r=this._groups,o=n._groups,i=r.length,s=o.length,a=Math.min(i,s),l=new Array(i),c=0;c<a;++c)for(var u=r[c],f=o[c],d=u.length,p=l[c]=new Array(d),g,v=0;v<d;++v)(g=u[v]||f[v])&&(p[v]=g);for(;c<i;++c)l[c]=r[c];return new Ot(l,this._parents)}function k9(){for(var e=this._groups,n=-1,r=e.length;++n<r;)for(var o=e[n],i=o.length-1,s=o[i],a;--i>=0;)(a=o[i])&&(s&&a.compareDocumentPosition(s)^4&&s.parentNode.insertBefore(a,s),s=a);return this}function N9(e){e||(e=E9);function n(d,p){return d&&p?e(d.__data__,p.__data__):!d-!p}for(var r=this._groups,o=r.length,i=new Array(o),s=0;s<o;++s){for(var a=r[s],l=a.length,c=i[s]=new Array(l),u,f=0;f<l;++f)(u=a[f])&&(c[f]=u);c.sort(n)}return new Ot(i,this._parents).order()}function E9(e,n){return e<n?-1:e>n?1:e>=n?0:NaN}function P9(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function j9(){return Array.from(this)}function M9(){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var o=e[n],i=0,s=o.length;i<s;++i){var a=o[i];if(a)return a}return null}function R9(){let e=0;for(const n of this)++e;return e}function A9(){return!this.node()}function T9(e){for(var n=this._groups,r=0,o=n.length;r<o;++r)for(var i=n[r],s=0,a=i.length,l;s<a;++s)(l=i[s])&&e.call(l,l.__data__,s,i);return this}function I9(e){return function(){this.removeAttribute(e)}}function $9(e){return function(){this.removeAttributeNS(e.space,e.local)}}function O9(e,n){return function(){this.setAttribute(e,n)}}function D9(e,n){return function(){this.setAttributeNS(e.space,e.local,n)}}function L9(e,n){return function(){var r=n.apply(this,arguments);r==null?this.removeAttribute(e):this.setAttribute(e,r)}}function z9(e,n){return function(){var r=n.apply(this,arguments);r==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,r)}}function F9(e,n){var r=kd(e);if(arguments.length<2){var o=this.node();return r.local?o.getAttributeNS(r.space,r.local):o.getAttribute(r)}return this.each((n==null?r.local?$9:I9:typeof n=="function"?r.local?z9:L9:r.local?D9:O9)(r,n))}function Dk(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function V9(e){return function(){this.style.removeProperty(e)}}function B9(e,n,r){return function(){this.style.setProperty(e,n,r)}}function H9(e,n,r){return function(){var o=n.apply(this,arguments);o==null?this.style.removeProperty(e):this.style.setProperty(e,o,r)}}function W9(e,n,r){return arguments.length>1?this.each((n==null?V9:typeof n=="function"?H9:B9)(e,n,r??"")):Bi(this.node(),e)}function Bi(e,n){return e.style.getPropertyValue(n)||Dk(e).getComputedStyle(e,null).getPropertyValue(n)}function U9(e){return function(){delete this[e]}}function G9(e,n){return function(){this[e]=n}}function Y9(e,n){return function(){var r=n.apply(this,arguments);r==null?delete this[e]:this[e]=r}}function X9(e,n){return arguments.length>1?this.each((n==null?U9:typeof n=="function"?Y9:G9)(e,n)):this.node()[e]}function Lk(e){return e.trim().split(/^|\s+/)}function jg(e){return e.classList||new zk(e)}function zk(e){this._node=e,this._names=Lk(e.getAttribute("class")||"")}zk.prototype={add:function(e){var n=this._names.indexOf(e);n<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var n=this._names.indexOf(e);n>=0&&(this._names.splice(n,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function Fk(e,n){for(var r=jg(e),o=-1,i=n.length;++o<i;)r.add(n[o])}function Vk(e,n){for(var r=jg(e),o=-1,i=n.length;++o<i;)r.remove(n[o])}function K9(e){return function(){Fk(this,e)}}function q9(e){return function(){Vk(this,e)}}function Z9(e,n){return function(){(n.apply(this,arguments)?Fk:Vk)(this,e)}}function Q9(e,n){var r=Lk(e+"");if(arguments.length<2){for(var o=jg(this.node()),i=-1,s=r.length;++i<s;)if(!o.contains(r[i]))return!1;return!0}return this.each((typeof n=="function"?Z9:n?K9:q9)(r,n))}function J9(){this.textContent=""}function eF(e){return function(){this.textContent=e}}function tF(e){return function(){var n=e.apply(this,arguments);this.textContent=n??""}}function nF(e){return arguments.length?this.each(e==null?J9:(typeof e=="function"?tF:eF)(e)):this.node().textContent}function rF(){this.innerHTML=""}function oF(e){return function(){this.innerHTML=e}}function iF(e){return function(){var n=e.apply(this,arguments);this.innerHTML=n??""}}function sF(e){return arguments.length?this.each(e==null?rF:(typeof e=="function"?iF:oF)(e)):this.node().innerHTML}function aF(){this.nextSibling&&this.parentNode.appendChild(this)}function lF(){return this.each(aF)}function cF(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function uF(){return this.each(cF)}function dF(e){var n=typeof e=="function"?e:Ak(e);return this.select(function(){return this.appendChild(n.apply(this,arguments))})}function fF(){return null}function pF(e,n){var r=typeof e=="function"?e:Ak(e),o=n==null?fF:typeof n=="function"?n:Pg(n);return this.select(function(){return this.insertBefore(r.apply(this,arguments),o.apply(this,arguments)||null)})}function hF(){var e=this.parentNode;e&&e.removeChild(this)}function mF(){return this.each(hF)}function gF(){var e=this.cloneNode(!1),n=this.parentNode;return n?n.insertBefore(e,this.nextSibling):e}function yF(){var e=this.cloneNode(!0),n=this.parentNode;return n?n.insertBefore(e,this.nextSibling):e}function vF(e){return this.select(e?yF:gF)}function xF(e){return arguments.length?this.property("__data__",e):this.node().__data__}function wF(e){return function(n){e.call(this,n,this.__data__)}}function bF(e){return e.trim().split(/^|\s+/).map(function(n){var r="",o=n.indexOf(".");return o>=0&&(r=n.slice(o+1),n=n.slice(0,o)),{type:n,name:r}})}function _F(e){return function(){var n=this.__on;if(n){for(var r=0,o=-1,i=n.length,s;r<i;++r)s=n[r],(!e.type||s.type===e.type)&&s.name===e.name?this.removeEventListener(s.type,s.listener,s.options):n[++o]=s;++o?n.length=o:delete this.__on}}}function SF(e,n,r){return function(){var o=this.__on,i,s=wF(n);if(o){for(var a=0,l=o.length;a<l;++a)if((i=o[a]).type===e.type&&i.name===e.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=s,i.options=r),i.value=n;return}}this.addEventListener(e.type,s,r),i={type:e.type,name:e.name,value:n,listener:s,options:r},o?o.push(i):this.__on=[i]}}function CF(e,n,r){var o=bF(e+""),i,s=o.length,a;if(arguments.length<2){var l=this.node().__on;if(l){for(var c=0,u=l.length,f;c<u;++c)for(i=0,f=l[c];i<s;++i)if((a=o[i]).type===f.type&&a.name===f.name)return f.value}return}for(l=n?SF:_F,i=0;i<s;++i)this.each(l(o[i],n,r));return this}function Bk(e,n,r){var o=Dk(e),i=o.CustomEvent;typeof i=="function"?i=new i(n,r):(i=o.document.createEvent("Event"),r?(i.initEvent(n,r.bubbles,r.cancelable),i.detail=r.detail):i.initEvent(n,!1,!1)),e.dispatchEvent(i)}function kF(e,n){return function(){return Bk(this,e,n)}}function NF(e,n){return function(){return Bk(this,e,n.apply(this,arguments))}}function EF(e,n){return this.each((typeof n=="function"?NF:kF)(e,n))}function*PF(){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var o=e[n],i=0,s=o.length,a;i<s;++i)(a=o[i])&&(yield a)}var Hk=[null];function Ot(e,n){this._groups=e,this._parents=n}function Ka(){return new Ot([[document.documentElement]],Hk)}function jF(){return this}Ot.prototype=Ka.prototype={constructor:Ot,select:t9,selectAll:i9,selectChild:c9,selectChildren:p9,filter:h9,data:w9,enter:m9,exit:_9,join:S9,merge:C9,selection:jF,order:k9,sort:N9,call:P9,nodes:j9,node:M9,size:R9,empty:A9,each:T9,attr:F9,style:W9,property:X9,classed:Q9,text:nF,html:sF,raise:lF,lower:uF,append:dF,insert:pF,remove:mF,clone:vF,datum:xF,on:CF,dispatch:EF,[Symbol.iterator]:PF};function st(e){return typeof e=="string"?new Ot([[document.querySelector(e)]],[document.documentElement]):new Ot([[e]],Hk)}function MF(e){let n;for(;n=e.sourceEvent;)e=n;return e}function Wt(e,n){if(e=MF(e),n===void 0&&(n=e.currentTarget),n){var r=n.ownerSVGElement||n;if(r.createSVGPoint){var o=r.createSVGPoint();return o.x=e.clientX,o.y=e.clientY,o=o.matrixTransform(n.getScreenCTM().inverse()),[o.x,o.y]}if(n.getBoundingClientRect){var i=n.getBoundingClientRect();return[e.clientX-i.left-n.clientLeft,e.clientY-i.top-n.clientTop]}}return[e.pageX,e.pageY]}var RF={value:()=>{}};function qa(){for(var e=0,n=arguments.length,r={},o;e<n;++e){if(!(o=arguments[e]+"")||o in r||/[\s.]/.test(o))throw new Error("illegal type: "+o);r[o]=[]}return new xc(r)}function xc(e){this._=e}function AF(e,n){return e.trim().split(/^|\s+/).map(function(r){var o="",i=r.indexOf(".");if(i>=0&&(o=r.slice(i+1),r=r.slice(0,i)),r&&!n.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:o}})}xc.prototype=qa.prototype={constructor:xc,on:function(e,n){var r=this._,o=AF(e+"",r),i,s=-1,a=o.length;if(arguments.length<2){for(;++s<a;)if((i=(e=o[s]).type)&&(i=TF(r[i],e.name)))return i;return}if(n!=null&&typeof n!="function")throw new Error("invalid callback: "+n);for(;++s<a;)if(i=(e=o[s]).type)r[i]=$v(r[i],e.name,n);else if(n==null)for(i in r)r[i]=$v(r[i],e.name,null);return this},copy:function(){var e={},n=this._;for(var r in n)e[r]=n[r].slice();return new xc(e)},call:function(e,n){if((i=arguments.length-2)>0)for(var r=new Array(i),o=0,i,s;o<i;++o)r[o]=arguments[o+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(s=this._[e],o=0,i=s.length;o<i;++o)s[o].value.apply(n,r)},apply:function(e,n,r){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var o=this._[e],i=0,s=o.length;i<s;++i)o[i].value.apply(n,r)}};function TF(e,n){for(var r=0,o=e.length,i;r<o;++r)if((i=e[r]).name===n)return i.value}function $v(e,n,r){for(var o=0,i=e.length;o<i;++o)if(e[o].name===n){e[o]=RF,e=e.slice(0,o).concat(e.slice(o+1));break}return r!=null&&e.push({name:n,value:r}),e}const IF={passive:!1},xa={capture:!0,passive:!1};function $f(e){e.stopImmediatePropagation()}function Ei(e){e.preventDefault(),e.stopImmediatePropagation()}function Wk(e){var n=e.document.documentElement,r=st(e).on("dragstart.drag",Ei,xa);"onselectstart"in n?r.on("selectstart.drag",Ei,xa):(n.__noselect=n.style.MozUserSelect,n.style.MozUserSelect="none")}function Uk(e,n){var r=e.document.documentElement,o=st(e).on("dragstart.drag",null);n&&(o.on("click.drag",Ei,xa),setTimeout(function(){o.on("click.drag",null)},0)),"onselectstart"in r?o.on("selectstart.drag",null):(r.style.MozUserSelect=r.__noselect,delete r.__noselect)}const Fl=e=>()=>e;function hh(e,{sourceEvent:n,subject:r,target:o,identifier:i,active:s,x:a,y:l,dx:c,dy:u,dispatch:f}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:n,enumerable:!0,configurable:!0},subject:{value:r,enumerable:!0,configurable:!0},target:{value:o,enumerable:!0,configurable:!0},identifier:{value:i,enumerable:!0,configurable:!0},active:{value:s,enumerable:!0,configurable:!0},x:{value:a,enumerable:!0,configurable:!0},y:{value:l,enumerable:!0,configurable:!0},dx:{value:c,enumerable:!0,configurable:!0},dy:{value:u,enumerable:!0,configurable:!0},_:{value:f}})}hh.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function $F(e){return!e.ctrlKey&&!e.button}function OF(){return this.parentNode}function DF(e,n){return n??{x:e.x,y:e.y}}function LF(){return navigator.maxTouchPoints||"ontouchstart"in this}function Mg(){var e=$F,n=OF,r=DF,o=LF,i={},s=qa("start","drag","end"),a=0,l,c,u,f,d=0;function p(S){S.on("mousedown.drag",g).filter(o).on("touchstart.drag",_).on("touchmove.drag",y,IF).on("touchend.drag touchcancel.drag",b).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function g(S,C){if(!(f||!e.call(this,S,C))){var k=x(this,n.call(this,S,C),S,C,"mouse");k&&(st(S.view).on("mousemove.drag",v,xa).on("mouseup.drag",w,xa),Wk(S.view),$f(S),u=!1,l=S.clientX,c=S.clientY,k("start",S))}}function v(S){if(Ei(S),!u){var C=S.clientX-l,k=S.clientY-c;u=C*C+k*k>d}i.mouse("drag",S)}function w(S){st(S.view).on("mousemove.drag mouseup.drag",null),Uk(S.view,u),Ei(S),i.mouse("end",S)}function _(S,C){if(e.call(this,S,C)){var k=S.changedTouches,N=n.call(this,S,C),E=k.length,P,T;for(P=0;P<E;++P)(T=x(this,N,S,C,k[P].identifier,k[P]))&&($f(S),T("start",S,k[P]))}}function y(S){var C=S.changedTouches,k=C.length,N,E;for(N=0;N<k;++N)(E=i[C[N].identifier])&&(Ei(S),E("drag",S,C[N]))}function b(S){var C=S.changedTouches,k=C.length,N,E;for(f&&clearTimeout(f),f=setTimeout(function(){f=null},500),N=0;N<k;++N)(E=i[C[N].identifier])&&($f(S),E("end",S,C[N]))}function x(S,C,k,N,E,P){var T=s.copy(),A=Wt(P||k,C),D,V,j;if((j=r.call(S,new hh("beforestart",{sourceEvent:k,target:p,identifier:E,active:a,x:A[0],y:A[1],dx:0,dy:0,dispatch:T}),N))!=null)return D=j.x-A[0]||0,V=j.y-A[1]||0,function L(I,z,M){var R=A,O;switch(I){case"start":i[E]=L,O=a++;break;case"end":delete i[E],--a;case"drag":A=Wt(M||z,C),O=a;break}T.call(I,S,new hh(I,{sourceEvent:z,subject:j,target:p,identifier:E,active:O,x:A[0]+D,y:A[1]+V,dx:A[0]-R[0],dy:A[1]-R[1],dispatch:T}),N)}}return p.filter=function(S){return arguments.length?(e=typeof S=="function"?S:Fl(!!S),p):e},p.container=function(S){return arguments.length?(n=typeof S=="function"?S:Fl(S),p):n},p.subject=function(S){return arguments.length?(r=typeof S=="function"?S:Fl(S),p):r},p.touchable=function(S){return arguments.length?(o=typeof S=="function"?S:Fl(!!S),p):o},p.on=function(){var S=s.on.apply(s,arguments);return S===s?p:S},p.clickDistance=function(S){return arguments.length?(d=(S=+S)*S,p):Math.sqrt(d)},p}function Rg(e,n,r){e.prototype=n.prototype=r,r.constructor=e}function Gk(e,n){var r=Object.create(e.prototype);for(var o in n)r[o]=n[o];return r}function Za(){}var wa=.7,fu=1/wa,Pi="\\s*([+-]?\\d+)\\s*",ba="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Rn="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",zF=/^#([0-9a-f]{3,8})$/,FF=new RegExp(`^rgb\\(${Pi},${Pi},${Pi}\\)$`),VF=new RegExp(`^rgb\\(${Rn},${Rn},${Rn}\\)$`),BF=new RegExp(`^rgba\\(${Pi},${Pi},${Pi},${ba}\\)$`),HF=new RegExp(`^rgba\\(${Rn},${Rn},${Rn},${ba}\\)$`),WF=new RegExp(`^hsl\\(${ba},${Rn},${Rn}\\)$`),UF=new RegExp(`^hsla\\(${ba},${Rn},${Rn},${ba}\\)$`),Ov={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};Rg(Za,Ao,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Dv,formatHex:Dv,formatHex8:GF,formatHsl:YF,formatRgb:Lv,toString:Lv});function Dv(){return this.rgb().formatHex()}function GF(){return this.rgb().formatHex8()}function YF(){return Yk(this).formatHsl()}function Lv(){return this.rgb().formatRgb()}function Ao(e){var n,r;return e=(e+"").trim().toLowerCase(),(n=zF.exec(e))?(r=n[1].length,n=parseInt(n[1],16),r===6?zv(n):r===3?new vt(n>>8&15|n>>4&240,n>>4&15|n&240,(n&15)<<4|n&15,1):r===8?Vl(n>>24&255,n>>16&255,n>>8&255,(n&255)/255):r===4?Vl(n>>12&15|n>>8&240,n>>8&15|n>>4&240,n>>4&15|n&240,((n&15)<<4|n&15)/255):null):(n=FF.exec(e))?new vt(n[1],n[2],n[3],1):(n=VF.exec(e))?new vt(n[1]*255/100,n[2]*255/100,n[3]*255/100,1):(n=BF.exec(e))?Vl(n[1],n[2],n[3],n[4]):(n=HF.exec(e))?Vl(n[1]*255/100,n[2]*255/100,n[3]*255/100,n[4]):(n=WF.exec(e))?Bv(n[1],n[2]/100,n[3]/100,1):(n=UF.exec(e))?Bv(n[1],n[2]/100,n[3]/100,n[4]):Ov.hasOwnProperty(e)?zv(Ov[e]):e==="transparent"?new vt(NaN,NaN,NaN,0):null}function zv(e){return new vt(e>>16&255,e>>8&255,e&255,1)}function Vl(e,n,r,o){return o<=0&&(e=n=r=NaN),new vt(e,n,r,o)}function XF(e){return e instanceof Za||(e=Ao(e)),e?(e=e.rgb(),new vt(e.r,e.g,e.b,e.opacity)):new vt}function mh(e,n,r,o){return arguments.length===1?XF(e):new vt(e,n,r,o??1)}function vt(e,n,r,o){this.r=+e,this.g=+n,this.b=+r,this.opacity=+o}Rg(vt,mh,Gk(Za,{brighter(e){return e=e==null?fu:Math.pow(fu,e),new vt(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?wa:Math.pow(wa,e),new vt(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new vt(wo(this.r),wo(this.g),wo(this.b),pu(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Fv,formatHex:Fv,formatHex8:KF,formatRgb:Vv,toString:Vv}));function Fv(){return`#${yo(this.r)}${yo(this.g)}${yo(this.b)}`}function KF(){return`#${yo(this.r)}${yo(this.g)}${yo(this.b)}${yo((isNaN(this.opacity)?1:this.opacity)*255)}`}function Vv(){const e=pu(this.opacity);return`${e===1?"rgb(":"rgba("}${wo(this.r)}, ${wo(this.g)}, ${wo(this.b)}${e===1?")":`, ${e})`}`}function pu(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function wo(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function yo(e){return e=wo(e),(e<16?"0":"")+e.toString(16)}function Bv(e,n,r,o){return o<=0?e=n=r=NaN:r<=0||r>=1?e=n=NaN:n<=0&&(e=NaN),new ln(e,n,r,o)}function Yk(e){if(e instanceof ln)return new ln(e.h,e.s,e.l,e.opacity);if(e instanceof Za||(e=Ao(e)),!e)return new ln;if(e instanceof ln)return e;e=e.rgb();var n=e.r/255,r=e.g/255,o=e.b/255,i=Math.min(n,r,o),s=Math.max(n,r,o),a=NaN,l=s-i,c=(s+i)/2;return l?(n===s?a=(r-o)/l+(r<o)*6:r===s?a=(o-n)/l+2:a=(n-r)/l+4,l/=c<.5?s+i:2-s-i,a*=60):l=c>0&&c<1?0:a,new ln(a,l,c,e.opacity)}function qF(e,n,r,o){return arguments.length===1?Yk(e):new ln(e,n,r,o??1)}function ln(e,n,r,o){this.h=+e,this.s=+n,this.l=+r,this.opacity=+o}Rg(ln,qF,Gk(Za,{brighter(e){return e=e==null?fu:Math.pow(fu,e),new ln(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?wa:Math.pow(wa,e),new ln(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,n=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,o=r+(r<.5?r:1-r)*n,i=2*r-o;return new vt(Of(e>=240?e-240:e+120,i,o),Of(e,i,o),Of(e<120?e+240:e-120,i,o),this.opacity)},clamp(){return new ln(Hv(this.h),Bl(this.s),Bl(this.l),pu(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=pu(this.opacity);return`${e===1?"hsl(":"hsla("}${Hv(this.h)}, ${Bl(this.s)*100}%, ${Bl(this.l)*100}%${e===1?")":`, ${e})`}`}}));function Hv(e){return e=(e||0)%360,e<0?e+360:e}function Bl(e){return Math.max(0,Math.min(1,e||0))}function Of(e,n,r){return(e<60?n+(r-n)*e/60:e<180?r:e<240?n+(r-n)*(240-e)/60:n)*255}const Ag=e=>()=>e;function ZF(e,n){return function(r){return e+r*n}}function QF(e,n,r){return e=Math.pow(e,r),n=Math.pow(n,r)-e,r=1/r,function(o){return Math.pow(e+o*n,r)}}function JF(e){return(e=+e)==1?Xk:function(n,r){return r-n?QF(n,r,e):Ag(isNaN(n)?r:n)}}function Xk(e,n){var r=n-e;return r?ZF(e,r):Ag(isNaN(e)?n:e)}const hu=function e(n){var r=JF(n);function o(i,s){var a=r((i=mh(i)).r,(s=mh(s)).r),l=r(i.g,s.g),c=r(i.b,s.b),u=Xk(i.opacity,s.opacity);return function(f){return i.r=a(f),i.g=l(f),i.b=c(f),i.opacity=u(f),i+""}}return o.gamma=e,o}(1);function e7(e,n){n||(n=[]);var r=e?Math.min(n.length,e.length):0,o=n.slice(),i;return function(s){for(i=0;i<r;++i)o[i]=e[i]*(1-s)+n[i]*s;return o}}function t7(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function n7(e,n){var r=n?n.length:0,o=e?Math.min(r,e.length):0,i=new Array(o),s=new Array(r),a;for(a=0;a<o;++a)i[a]=Us(e[a],n[a]);for(;a<r;++a)s[a]=n[a];return function(l){for(a=0;a<o;++a)s[a]=i[a](l);return s}}function r7(e,n){var r=new Date;return e=+e,n=+n,function(o){return r.setTime(e*(1-o)+n*o),r}}function Sn(e,n){return e=+e,n=+n,function(r){return e*(1-r)+n*r}}function o7(e,n){var r={},o={},i;(e===null||typeof e!="object")&&(e={}),(n===null||typeof n!="object")&&(n={});for(i in n)i in e?r[i]=Us(e[i],n[i]):o[i]=n[i];return function(s){for(i in r)o[i]=r[i](s);return o}}var gh=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Df=new RegExp(gh.source,"g");function i7(e){return function(){return e}}function s7(e){return function(n){return e(n)+""}}function Kk(e,n){var r=gh.lastIndex=Df.lastIndex=0,o,i,s,a=-1,l=[],c=[];for(e=e+"",n=n+"";(o=gh.exec(e))&&(i=Df.exec(n));)(s=i.index)>r&&(s=n.slice(r,s),l[a]?l[a]+=s:l[++a]=s),(o=o[0])===(i=i[0])?l[a]?l[a]+=i:l[++a]=i:(l[++a]=null,c.push({i:a,x:Sn(o,i)})),r=Df.lastIndex;return r<n.length&&(s=n.slice(r),l[a]?l[a]+=s:l[++a]=s),l.length<2?c[0]?s7(c[0].x):i7(n):(n=c.length,function(u){for(var f=0,d;f<n;++f)l[(d=c[f]).i]=d.x(u);return l.join("")})}function Us(e,n){var r=typeof n,o;return n==null||r==="boolean"?Ag(n):(r==="number"?Sn:r==="string"?(o=Ao(n))?(n=o,hu):Kk:n instanceof Ao?hu:n instanceof Date?r7:t7(n)?e7:Array.isArray(n)?n7:typeof n.valueOf!="function"&&typeof n.toString!="function"||isNaN(n)?o7:Sn)(e,n)}var Wv=180/Math.PI,yh={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function qk(e,n,r,o,i,s){var a,l,c;return(a=Math.sqrt(e*e+n*n))&&(e/=a,n/=a),(c=e*r+n*o)&&(r-=e*c,o-=n*c),(l=Math.sqrt(r*r+o*o))&&(r/=l,o/=l,c/=l),e*o<n*r&&(e=-e,n=-n,c=-c,a=-a),{translateX:i,translateY:s,rotate:Math.atan2(n,e)*Wv,skewX:Math.atan(c)*Wv,scaleX:a,scaleY:l}}var Hl;function a7(e){const n=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return n.isIdentity?yh:qk(n.a,n.b,n.c,n.d,n.e,n.f)}function l7(e){return e==null||(Hl||(Hl=document.createElementNS("http://www.w3.org/2000/svg","g")),Hl.setAttribute("transform",e),!(e=Hl.transform.baseVal.consolidate()))?yh:(e=e.matrix,qk(e.a,e.b,e.c,e.d,e.e,e.f))}function Zk(e,n,r,o){function i(u){return u.length?u.pop()+" ":""}function s(u,f,d,p,g,v){if(u!==d||f!==p){var w=g.push("translate(",null,n,null,r);v.push({i:w-4,x:Sn(u,d)},{i:w-2,x:Sn(f,p)})}else(d||p)&&g.push("translate("+d+n+p+r)}function a(u,f,d,p){u!==f?(u-f>180?f+=360:f-u>180&&(u+=360),p.push({i:d.push(i(d)+"rotate(",null,o)-2,x:Sn(u,f)})):f&&d.push(i(d)+"rotate("+f+o)}function l(u,f,d,p){u!==f?p.push({i:d.push(i(d)+"skewX(",null,o)-2,x:Sn(u,f)}):f&&d.push(i(d)+"skewX("+f+o)}function c(u,f,d,p,g,v){if(u!==d||f!==p){var w=g.push(i(g)+"scale(",null,",",null,")");v.push({i:w-4,x:Sn(u,d)},{i:w-2,x:Sn(f,p)})}else(d!==1||p!==1)&&g.push(i(g)+"scale("+d+","+p+")")}return function(u,f){var d=[],p=[];return u=e(u),f=e(f),s(u.translateX,u.translateY,f.translateX,f.translateY,d,p),a(u.rotate,f.rotate,d,p),l(u.skewX,f.skewX,d,p),c(u.scaleX,u.scaleY,f.scaleX,f.scaleY,d,p),u=f=null,function(g){for(var v=-1,w=p.length,_;++v<w;)d[(_=p[v]).i]=_.x(g);return d.join("")}}}var c7=Zk(a7,"px, ","px)","deg)"),u7=Zk(l7,", ",")",")"),d7=1e-12;function Uv(e){return((e=Math.exp(e))+1/e)/2}function f7(e){return((e=Math.exp(e))-1/e)/2}function p7(e){return((e=Math.exp(2*e))-1)/(e+1)}const wc=function e(n,r,o){function i(s,a){var l=s[0],c=s[1],u=s[2],f=a[0],d=a[1],p=a[2],g=f-l,v=d-c,w=g*g+v*v,_,y;if(w<d7)y=Math.log(p/u)/n,_=function(N){return[l+N*g,c+N*v,u*Math.exp(n*N*y)]};else{var b=Math.sqrt(w),x=(p*p-u*u+o*w)/(2*u*r*b),S=(p*p-u*u-o*w)/(2*p*r*b),C=Math.log(Math.sqrt(x*x+1)-x),k=Math.log(Math.sqrt(S*S+1)-S);y=(k-C)/n,_=function(N){var E=N*y,P=Uv(C),T=u/(r*b)*(P*p7(n*E+C)-f7(C));return[l+T*g,c+T*v,u*P/Uv(n*E+C)]}}return _.duration=y*1e3*n/Math.SQRT2,_}return i.rho=function(s){var a=Math.max(.001,+s),l=a*a,c=l*l;return e(a,l,c)},i}(Math.SQRT2,2,4);var Hi=0,As=0,ys=0,Qk=1e3,mu,Ts,gu=0,To=0,Nd=0,_a=typeof performance=="object"&&performance.now?performance:Date,Jk=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function Tg(){return To||(Jk(h7),To=_a.now()+Nd)}function h7(){To=0}function yu(){this._call=this._time=this._next=null}yu.prototype=Ig.prototype={constructor:yu,restart:function(e,n,r){if(typeof e!="function")throw new TypeError("callback is not a function");r=(r==null?Tg():+r)+(n==null?0:+n),!this._next&&Ts!==this&&(Ts?Ts._next=this:mu=this,Ts=this),this._call=e,this._time=r,vh()},stop:function(){this._call&&(this._call=null,this._time=1/0,vh())}};function Ig(e,n,r){var o=new yu;return o.restart(e,n,r),o}function m7(){Tg(),++Hi;for(var e=mu,n;e;)(n=To-e._time)>=0&&e._call.call(void 0,n),e=e._next;--Hi}function Gv(){To=(gu=_a.now())+Nd,Hi=As=0;try{m7()}finally{Hi=0,y7(),To=0}}function g7(){var e=_a.now(),n=e-gu;n>Qk&&(Nd-=n,gu=e)}function y7(){for(var e,n=mu,r,o=1/0;n;)n._call?(o>n._time&&(o=n._time),e=n,n=n._next):(r=n._next,n._next=null,n=e?e._next=r:mu=r);Ts=e,vh(o)}function vh(e){if(!Hi){As&&(As=clearTimeout(As));var n=e-To;n>24?(e<1/0&&(As=setTimeout(Gv,e-_a.now()-Nd)),ys&&(ys=clearInterval(ys))):(ys||(gu=_a.now(),ys=setInterval(g7,Qk)),Hi=1,Jk(Gv))}}function Yv(e,n,r){var o=new yu;return n=n==null?0:+n,o.restart(i=>{o.stop(),e(i+n)},n,r),o}var v7=qa("start","end","cancel","interrupt"),x7=[],eN=0,Xv=1,xh=2,bc=3,Kv=4,wh=5,_c=6;function Ed(e,n,r,o,i,s){var a=e.__transition;if(!a)e.__transition={};else if(r in a)return;w7(e,r,{name:n,index:o,group:i,on:v7,tween:x7,time:s.time,delay:s.delay,duration:s.duration,ease:s.ease,timer:null,state:eN})}function $g(e,n){var r=vn(e,n);if(r.state>eN)throw new Error("too late; already scheduled");return r}function On(e,n){var r=vn(e,n);if(r.state>bc)throw new Error("too late; already running");return r}function vn(e,n){var r=e.__transition;if(!r||!(r=r[n]))throw new Error("transition not found");return r}function w7(e,n,r){var o=e.__transition,i;o[n]=r,r.timer=Ig(s,0,r.time);function s(u){r.state=Xv,r.timer.restart(a,r.delay,r.time),r.delay<=u&&a(u-r.delay)}function a(u){var f,d,p,g;if(r.state!==Xv)return c();for(f in o)if(g=o[f],g.name===r.name){if(g.state===bc)return Yv(a);g.state===Kv?(g.state=_c,g.timer.stop(),g.on.call("interrupt",e,e.__data__,g.index,g.group),delete o[f]):+f<n&&(g.state=_c,g.timer.stop(),g.on.call("cancel",e,e.__data__,g.index,g.group),delete o[f])}if(Yv(function(){r.state===bc&&(r.state=Kv,r.timer.restart(l,r.delay,r.time),l(u))}),r.state=xh,r.on.call("start",e,e.__data__,r.index,r.group),r.state===xh){for(r.state=bc,i=new Array(p=r.tween.length),f=0,d=-1;f<p;++f)(g=r.tween[f].value.call(e,e.__data__,r.index,r.group))&&(i[++d]=g);i.length=d+1}}function l(u){for(var f=u<r.duration?r.ease.call(null,u/r.duration):(r.timer.restart(c),r.state=wh,1),d=-1,p=i.length;++d<p;)i[d].call(e,f);r.state===wh&&(r.on.call("end",e,e.__data__,r.index,r.group),c())}function c(){r.state=_c,r.timer.stop(),delete o[n];for(var u in o)return;delete e.__transition}}function Sc(e,n){var r=e.__transition,o,i,s=!0,a;if(r){n=n==null?null:n+"";for(a in r){if((o=r[a]).name!==n){s=!1;continue}i=o.state>xh&&o.state<wh,o.state=_c,o.timer.stop(),o.on.call(i?"interrupt":"cancel",e,e.__data__,o.index,o.group),delete r[a]}s&&delete e.__transition}}function b7(e){return this.each(function(){Sc(this,e)})}function _7(e,n){var r,o;return function(){var i=On(this,e),s=i.tween;if(s!==r){o=r=s;for(var a=0,l=o.length;a<l;++a)if(o[a].name===n){o=o.slice(),o.splice(a,1);break}}i.tween=o}}function S7(e,n,r){var o,i;if(typeof r!="function")throw new Error;return function(){var s=On(this,e),a=s.tween;if(a!==o){i=(o=a).slice();for(var l={name:n,value:r},c=0,u=i.length;c<u;++c)if(i[c].name===n){i[c]=l;break}c===u&&i.push(l)}s.tween=i}}function C7(e,n){var r=this._id;if(e+="",arguments.length<2){for(var o=vn(this.node(),r).tween,i=0,s=o.length,a;i<s;++i)if((a=o[i]).name===e)return a.value;return null}return this.each((n==null?_7:S7)(r,e,n))}function Og(e,n,r){var o=e._id;return e.each(function(){var i=On(this,o);(i.value||(i.value={}))[n]=r.apply(this,arguments)}),function(i){return vn(i,o).value[n]}}function tN(e,n){var r;return(typeof n=="number"?Sn:n instanceof Ao?hu:(r=Ao(n))?(n=r,hu):Kk)(e,n)}function k7(e){return function(){this.removeAttribute(e)}}function N7(e){return function(){this.removeAttributeNS(e.space,e.local)}}function E7(e,n,r){var o,i=r+"",s;return function(){var a=this.getAttribute(e);return a===i?null:a===o?s:s=n(o=a,r)}}function P7(e,n,r){var o,i=r+"",s;return function(){var a=this.getAttributeNS(e.space,e.local);return a===i?null:a===o?s:s=n(o=a,r)}}function j7(e,n,r){var o,i,s;return function(){var a,l=r(this),c;return l==null?void this.removeAttribute(e):(a=this.getAttribute(e),c=l+"",a===c?null:a===o&&c===i?s:(i=c,s=n(o=a,l)))}}function M7(e,n,r){var o,i,s;return function(){var a,l=r(this),c;return l==null?void this.removeAttributeNS(e.space,e.local):(a=this.getAttributeNS(e.space,e.local),c=l+"",a===c?null:a===o&&c===i?s:(i=c,s=n(o=a,l)))}}function R7(e,n){var r=kd(e),o=r==="transform"?u7:tN;return this.attrTween(e,typeof n=="function"?(r.local?M7:j7)(r,o,Og(this,"attr."+e,n)):n==null?(r.local?N7:k7)(r):(r.local?P7:E7)(r,o,n))}function A7(e,n){return function(r){this.setAttribute(e,n.call(this,r))}}function T7(e,n){return function(r){this.setAttributeNS(e.space,e.local,n.call(this,r))}}function I7(e,n){var r,o;function i(){var s=n.apply(this,arguments);return s!==o&&(r=(o=s)&&T7(e,s)),r}return i._value=n,i}function $7(e,n){var r,o;function i(){var s=n.apply(this,arguments);return s!==o&&(r=(o=s)&&A7(e,s)),r}return i._value=n,i}function O7(e,n){var r="attr."+e;if(arguments.length<2)return(r=this.tween(r))&&r._value;if(n==null)return this.tween(r,null);if(typeof n!="function")throw new Error;var o=kd(e);return this.tween(r,(o.local?I7:$7)(o,n))}function D7(e,n){return function(){$g(this,e).delay=+n.apply(this,arguments)}}function L7(e,n){return n=+n,function(){$g(this,e).delay=n}}function z7(e){var n=this._id;return arguments.length?this.each((typeof e=="function"?D7:L7)(n,e)):vn(this.node(),n).delay}function F7(e,n){return function(){On(this,e).duration=+n.apply(this,arguments)}}function V7(e,n){return n=+n,function(){On(this,e).duration=n}}function B7(e){var n=this._id;return arguments.length?this.each((typeof e=="function"?F7:V7)(n,e)):vn(this.node(),n).duration}function H7(e,n){if(typeof n!="function")throw new Error;return function(){On(this,e).ease=n}}function W7(e){var n=this._id;return arguments.length?this.each(H7(n,e)):vn(this.node(),n).ease}function U7(e,n){return function(){var r=n.apply(this,arguments);if(typeof r!="function")throw new Error;On(this,e).ease=r}}function G7(e){if(typeof e!="function")throw new Error;return this.each(U7(this._id,e))}function Y7(e){typeof e!="function"&&(e=Ik(e));for(var n=this._groups,r=n.length,o=new Array(r),i=0;i<r;++i)for(var s=n[i],a=s.length,l=o[i]=[],c,u=0;u<a;++u)(c=s[u])&&e.call(c,c.__data__,u,s)&&l.push(c);return new ir(o,this._parents,this._name,this._id)}function X7(e){if(e._id!==this._id)throw new Error;for(var n=this._groups,r=e._groups,o=n.length,i=r.length,s=Math.min(o,i),a=new Array(o),l=0;l<s;++l)for(var c=n[l],u=r[l],f=c.length,d=a[l]=new Array(f),p,g=0;g<f;++g)(p=c[g]||u[g])&&(d[g]=p);for(;l<o;++l)a[l]=n[l];return new ir(a,this._parents,this._name,this._id)}function K7(e){return(e+"").trim().split(/^|\s+/).every(function(n){var r=n.indexOf(".");return r>=0&&(n=n.slice(0,r)),!n||n==="start"})}function q7(e,n,r){var o,i,s=K7(n)?$g:On;return function(){var a=s(this,e),l=a.on;l!==o&&(i=(o=l).copy()).on(n,r),a.on=i}}function Z7(e,n){var r=this._id;return arguments.length<2?vn(this.node(),r).on.on(e):this.each(q7(r,e,n))}function Q7(e){return function(){var n=this.parentNode;for(var r in this.__transition)if(+r!==e)return;n&&n.removeChild(this)}}function J7(){return this.on("end.remove",Q7(this._id))}function eV(e){var n=this._name,r=this._id;typeof e!="function"&&(e=Pg(e));for(var o=this._groups,i=o.length,s=new Array(i),a=0;a<i;++a)for(var l=o[a],c=l.length,u=s[a]=new Array(c),f,d,p=0;p<c;++p)(f=l[p])&&(d=e.call(f,f.__data__,p,l))&&("__data__"in f&&(d.__data__=f.__data__),u[p]=d,Ed(u[p],n,r,p,u,vn(f,r)));return new ir(s,this._parents,n,r)}function tV(e){var n=this._name,r=this._id;typeof e!="function"&&(e=Tk(e));for(var o=this._groups,i=o.length,s=[],a=[],l=0;l<i;++l)for(var c=o[l],u=c.length,f,d=0;d<u;++d)if(f=c[d]){for(var p=e.call(f,f.__data__,d,c),g,v=vn(f,r),w=0,_=p.length;w<_;++w)(g=p[w])&&Ed(g,n,r,w,p,v);s.push(p),a.push(f)}return new ir(s,a,n,r)}var nV=Ka.prototype.constructor;function rV(){return new nV(this._groups,this._parents)}function oV(e,n){var r,o,i;return function(){var s=Bi(this,e),a=(this.style.removeProperty(e),Bi(this,e));return s===a?null:s===r&&a===o?i:i=n(r=s,o=a)}}function nN(e){return function(){this.style.removeProperty(e)}}function iV(e,n,r){var o,i=r+"",s;return function(){var a=Bi(this,e);return a===i?null:a===o?s:s=n(o=a,r)}}function sV(e,n,r){var o,i,s;return function(){var a=Bi(this,e),l=r(this),c=l+"";return l==null&&(c=l=(this.style.removeProperty(e),Bi(this,e))),a===c?null:a===o&&c===i?s:(i=c,s=n(o=a,l))}}function aV(e,n){var r,o,i,s="style."+n,a="end."+s,l;return function(){var c=On(this,e),u=c.on,f=c.value[s]==null?l||(l=nN(n)):void 0;(u!==r||i!==f)&&(o=(r=u).copy()).on(a,i=f),c.on=o}}function lV(e,n,r){var o=(e+="")=="transform"?c7:tN;return n==null?this.styleTween(e,oV(e,o)).on("end.style."+e,nN(e)):typeof n=="function"?this.styleTween(e,sV(e,o,Og(this,"style."+e,n))).each(aV(this._id,e)):this.styleTween(e,iV(e,o,n),r).on("end.style."+e,null)}function cV(e,n,r){return function(o){this.style.setProperty(e,n.call(this,o),r)}}function uV(e,n,r){var o,i;function s(){var a=n.apply(this,arguments);return a!==i&&(o=(i=a)&&cV(e,a,r)),o}return s._value=n,s}function dV(e,n,r){var o="style."+(e+="");if(arguments.length<2)return(o=this.tween(o))&&o._value;if(n==null)return this.tween(o,null);if(typeof n!="function")throw new Error;return this.tween(o,uV(e,n,r??""))}function fV(e){return function(){this.textContent=e}}function pV(e){return function(){var n=e(this);this.textContent=n??""}}function hV(e){return this.tween("text",typeof e=="function"?pV(Og(this,"text",e)):fV(e==null?"":e+""))}function mV(e){return function(n){this.textContent=e.call(this,n)}}function gV(e){var n,r;function o(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&mV(i)),n}return o._value=e,o}function yV(e){var n="text";if(arguments.length<1)return(n=this.tween(n))&&n._value;if(e==null)return this.tween(n,null);if(typeof e!="function")throw new Error;return this.tween(n,gV(e))}function vV(){for(var e=this._name,n=this._id,r=rN(),o=this._groups,i=o.length,s=0;s<i;++s)for(var a=o[s],l=a.length,c,u=0;u<l;++u)if(c=a[u]){var f=vn(c,n);Ed(c,e,r,u,a,{time:f.time+f.delay+f.duration,delay:0,duration:f.duration,ease:f.ease})}return new ir(o,this._parents,e,r)}function xV(){var e,n,r=this,o=r._id,i=r.size();return new Promise(function(s,a){var l={value:a},c={value:function(){--i===0&&s()}};r.each(function(){var u=On(this,o),f=u.on;f!==e&&(n=(e=f).copy(),n._.cancel.push(l),n._.interrupt.push(l),n._.end.push(c)),u.on=n}),i===0&&s()})}var wV=0;function ir(e,n,r,o){this._groups=e,this._parents=n,this._name=r,this._id=o}function rN(){return++wV}var Ln=Ka.prototype;ir.prototype={constructor:ir,select:eV,selectAll:tV,selectChild:Ln.selectChild,selectChildren:Ln.selectChildren,filter:Y7,merge:X7,selection:rV,transition:vV,call:Ln.call,nodes:Ln.nodes,node:Ln.node,size:Ln.size,empty:Ln.empty,each:Ln.each,on:Z7,attr:R7,attrTween:O7,style:lV,styleTween:dV,text:hV,textTween:yV,remove:J7,tween:C7,delay:z7,duration:B7,ease:W7,easeVarying:G7,end:xV,[Symbol.iterator]:Ln[Symbol.iterator]};function bV(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var _V={time:null,delay:0,duration:250,ease:bV};function SV(e,n){for(var r;!(r=e.__transition)||!(r=r[n]);)if(!(e=e.parentNode))throw new Error(`transition ${n} not found`);return r}function CV(e){var n,r;e instanceof ir?(n=e._id,e=e._name):(n=rN(),(r=_V).time=Tg(),e=e==null?null:e+"");for(var o=this._groups,i=o.length,s=0;s<i;++s)for(var a=o[s],l=a.length,c,u=0;u<l;++u)(c=a[u])&&Ed(c,e,n,u,a,r||SV(c,n));return new ir(o,this._parents,e,n)}Ka.prototype.interrupt=b7;Ka.prototype.transition=CV;const Wl=e=>()=>e;function kV(e,{sourceEvent:n,target:r,transform:o,dispatch:i}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:n,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},transform:{value:o,enumerable:!0,configurable:!0},_:{value:i}})}function Xn(e,n,r){this.k=e,this.x=n,this.y=r}Xn.prototype={constructor:Xn,scale:function(e){return e===1?this:new Xn(this.k*e,this.x,this.y)},translate:function(e,n){return e===0&n===0?this:new Xn(this.k,this.x+this.k*e,this.y+this.k*n)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var Pd=new Xn(1,0,0);on.prototype=Xn.prototype;function on(e){for(;!e.__zoom;)if(!(e=e.parentNode))return Pd;return e.__zoom}function Lf(e){e.stopImmediatePropagation()}function vs(e){e.preventDefault(),e.stopImmediatePropagation()}function NV(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function EV(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e,e.hasAttribute("viewBox")?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]):[[0,0],[e.clientWidth,e.clientHeight]]}function qv(){return this.__zoom||Pd}function PV(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function jV(){return navigator.maxTouchPoints||"ontouchstart"in this}function MV(e,n,r){var o=e.invertX(n[0][0])-r[0][0],i=e.invertX(n[1][0])-r[1][0],s=e.invertY(n[0][1])-r[0][1],a=e.invertY(n[1][1])-r[1][1];return e.translate(i>o?(o+i)/2:Math.min(0,o)||Math.max(0,i),a>s?(s+a)/2:Math.min(0,s)||Math.max(0,a))}function Dg(){var e=NV,n=EV,r=MV,o=PV,i=jV,s=[0,1/0],a=[[-1/0,-1/0],[1/0,1/0]],l=250,c=wc,u=qa("start","zoom","end"),f,d,p,g=500,v=150,w=0,_=10;function y(j){j.property("__zoom",qv).on("wheel.zoom",E,{passive:!1}).on("mousedown.zoom",P).on("dblclick.zoom",T).filter(i).on("touchstart.zoom",A).on("touchmove.zoom",D).on("touchend.zoom touchcancel.zoom",V).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}y.transform=function(j,L,I,z){var M=j.selection?j.selection():j;M.property("__zoom",qv),j!==M?C(j,L,I,z):M.interrupt().each(function(){k(this,arguments).event(z).start().zoom(null,typeof L=="function"?L.apply(this,arguments):L).end()})},y.scaleBy=function(j,L,I,z){y.scaleTo(j,function(){var M=this.__zoom.k,R=typeof L=="function"?L.apply(this,arguments):L;return M*R},I,z)},y.scaleTo=function(j,L,I,z){y.transform(j,function(){var M=n.apply(this,arguments),R=this.__zoom,O=I==null?S(M):typeof I=="function"?I.apply(this,arguments):I,W=R.invert(O),$=typeof L=="function"?L.apply(this,arguments):L;return r(x(b(R,$),O,W),M,a)},I,z)},y.translateBy=function(j,L,I,z){y.transform(j,function(){return r(this.__zoom.translate(typeof L=="function"?L.apply(this,arguments):L,typeof I=="function"?I.apply(this,arguments):I),n.apply(this,arguments),a)},null,z)},y.translateTo=function(j,L,I,z,M){y.transform(j,function(){var R=n.apply(this,arguments),O=this.__zoom,W=z==null?S(R):typeof z=="function"?z.apply(this,arguments):z;return r(Pd.translate(W[0],W[1]).scale(O.k).translate(typeof L=="function"?-L.apply(this,arguments):-L,typeof I=="function"?-I.apply(this,arguments):-I),R,a)},z,M)};function b(j,L){return L=Math.max(s[0],Math.min(s[1],L)),L===j.k?j:new Xn(L,j.x,j.y)}function x(j,L,I){var z=L[0]-I[0]*j.k,M=L[1]-I[1]*j.k;return z===j.x&&M===j.y?j:new Xn(j.k,z,M)}function S(j){return[(+j[0][0]+ +j[1][0])/2,(+j[0][1]+ +j[1][1])/2]}function C(j,L,I,z){j.on("start.zoom",function(){k(this,arguments).event(z).start()}).on("interrupt.zoom end.zoom",function(){k(this,arguments).event(z).end()}).tween("zoom",function(){var M=this,R=arguments,O=k(M,R).event(z),W=n.apply(M,R),$=I==null?S(W):typeof I=="function"?I.apply(M,R):I,X=Math.max(W[1][0]-W[0][0],W[1][1]-W[0][1]),F=M.__zoom,H=typeof L=="function"?L.apply(M,R):L,G=c(F.invert($).concat(X/F.k),H.invert($).concat(X/H.k));return function(U){if(U===1)U=H;else{var Y=G(U),q=X/Y[2];U=new Xn(q,$[0]-Y[0]*q,$[1]-Y[1]*q)}O.zoom(null,U)}})}function k(j,L,I){return!I&&j.__zooming||new N(j,L)}function N(j,L){this.that=j,this.args=L,this.active=0,this.sourceEvent=null,this.extent=n.apply(j,L),this.taps=0}N.prototype={event:function(j){return j&&(this.sourceEvent=j),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(j,L){return this.mouse&&j!=="mouse"&&(this.mouse[1]=L.invert(this.mouse[0])),this.touch0&&j!=="touch"&&(this.touch0[1]=L.invert(this.touch0[0])),this.touch1&&j!=="touch"&&(this.touch1[1]=L.invert(this.touch1[0])),this.that.__zoom=L,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(j){var L=st(this.that).datum();u.call(j,this.that,new kV(j,{sourceEvent:this.sourceEvent,target:y,transform:this.that.__zoom,dispatch:u}),L)}};function E(j,...L){if(!e.apply(this,arguments))return;var I=k(this,L).event(j),z=this.__zoom,M=Math.max(s[0],Math.min(s[1],z.k*Math.pow(2,o.apply(this,arguments)))),R=Wt(j);if(I.wheel)(I.mouse[0][0]!==R[0]||I.mouse[0][1]!==R[1])&&(I.mouse[1]=z.invert(I.mouse[0]=R)),clearTimeout(I.wheel);else{if(z.k===M)return;I.mouse=[R,z.invert(R)],Sc(this),I.start()}vs(j),I.wheel=setTimeout(O,v),I.zoom("mouse",r(x(b(z,M),I.mouse[0],I.mouse[1]),I.extent,a));function O(){I.wheel=null,I.end()}}function P(j,...L){if(p||!e.apply(this,arguments))return;var I=j.currentTarget,z=k(this,L,!0).event(j),M=st(j.view).on("mousemove.zoom",$,!0).on("mouseup.zoom",X,!0),R=Wt(j,I),O=j.clientX,W=j.clientY;Wk(j.view),Lf(j),z.mouse=[R,this.__zoom.invert(R)],Sc(this),z.start();function $(F){if(vs(F),!z.moved){var H=F.clientX-O,G=F.clientY-W;z.moved=H*H+G*G>w}z.event(F).zoom("mouse",r(x(z.that.__zoom,z.mouse[0]=Wt(F,I),z.mouse[1]),z.extent,a))}function X(F){M.on("mousemove.zoom mouseup.zoom",null),Uk(F.view,z.moved),vs(F),z.event(F).end()}}function T(j,...L){if(e.apply(this,arguments)){var I=this.__zoom,z=Wt(j.changedTouches?j.changedTouches[0]:j,this),M=I.invert(z),R=I.k*(j.shiftKey?.5:2),O=r(x(b(I,R),z,M),n.apply(this,L),a);vs(j),l>0?st(this).transition().duration(l).call(C,O,z,j):st(this).call(y.transform,O,z,j)}}function A(j,...L){if(e.apply(this,arguments)){var I=j.touches,z=I.length,M=k(this,L,j.changedTouches.length===z).event(j),R,O,W,$;for(Lf(j),O=0;O<z;++O)W=I[O],$=Wt(W,this),$=[$,this.__zoom.invert($),W.identifier],M.touch0?!M.touch1&&M.touch0[2]!==$[2]&&(M.touch1=$,M.taps=0):(M.touch0=$,R=!0,M.taps=1+!!f);f&&(f=clearTimeout(f)),R&&(M.taps<2&&(d=$[0],f=setTimeout(function(){f=null},g)),Sc(this),M.start())}}function D(j,...L){if(this.__zooming){var I=k(this,L).event(j),z=j.changedTouches,M=z.length,R,O,W,$;for(vs(j),R=0;R<M;++R)O=z[R],W=Wt(O,this),I.touch0&&I.touch0[2]===O.identifier?I.touch0[0]=W:I.touch1&&I.touch1[2]===O.identifier&&(I.touch1[0]=W);if(O=I.that.__zoom,I.touch1){var X=I.touch0[0],F=I.touch0[1],H=I.touch1[0],G=I.touch1[1],U=(U=H[0]-X[0])*U+(U=H[1]-X[1])*U,Y=(Y=G[0]-F[0])*Y+(Y=G[1]-F[1])*Y;O=b(O,Math.sqrt(U/Y)),W=[(X[0]+H[0])/2,(X[1]+H[1])/2],$=[(F[0]+G[0])/2,(F[1]+G[1])/2]}else if(I.touch0)W=I.touch0[0],$=I.touch0[1];else return;I.zoom("touch",r(x(O,W,$),I.extent,a))}}function V(j,...L){if(this.__zooming){var I=k(this,L).event(j),z=j.changedTouches,M=z.length,R,O;for(Lf(j),p&&clearTimeout(p),p=setTimeout(function(){p=null},g),R=0;R<M;++R)O=z[R],I.touch0&&I.touch0[2]===O.identifier?delete I.touch0:I.touch1&&I.touch1[2]===O.identifier&&delete I.touch1;if(I.touch1&&!I.touch0&&(I.touch0=I.touch1,delete I.touch1),I.touch0)I.touch0[1]=this.__zoom.invert(I.touch0[0]);else if(I.end(),I.taps===2&&(O=Wt(O,this),Math.hypot(d[0]-O[0],d[1]-O[1])<_)){var W=st(this).on("dblclick.zoom");W&&W.apply(this,arguments)}}}return y.wheelDelta=function(j){return arguments.length?(o=typeof j=="function"?j:Wl(+j),y):o},y.filter=function(j){return arguments.length?(e=typeof j=="function"?j:Wl(!!j),y):e},y.touchable=function(j){return arguments.length?(i=typeof j=="function"?j:Wl(!!j),y):i},y.extent=function(j){return arguments.length?(n=typeof j=="function"?j:Wl([[+j[0][0],+j[0][1]],[+j[1][0],+j[1][1]]]),y):n},y.scaleExtent=function(j){return arguments.length?(s[0]=+j[0],s[1]=+j[1],y):[s[0],s[1]]},y.translateExtent=function(j){return arguments.length?(a[0][0]=+j[0][0],a[1][0]=+j[1][0],a[0][1]=+j[0][1],a[1][1]=+j[1][1],y):[[a[0][0],a[0][1]],[a[1][0],a[1][1]]]},y.constrain=function(j){return arguments.length?(r=j,y):r},y.duration=function(j){return arguments.length?(l=+j,y):l},y.interpolate=function(j){return arguments.length?(c=j,y):c},y.on=function(){var j=u.on.apply(u,arguments);return j===u?y:j},y.clickDistance=function(j){return arguments.length?(w=(j=+j)*j,y):Math.sqrt(w)},y.tapDistance=function(j){return arguments.length?(_=+j,y):_},y}class Zv extends Map{constructor(n,r=TV){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:r}}),n!=null)for(const[o,i]of n)this.set(o,i)}get(n){return super.get(Qv(this,n))}has(n){return super.has(Qv(this,n))}set(n,r){return super.set(RV(this,n),r)}delete(n){return super.delete(AV(this,n))}}function Qv({_intern:e,_key:n},r){const o=n(r);return e.has(o)?e.get(o):r}function RV({_intern:e,_key:n},r){const o=n(r);return e.has(o)?e.get(o):(e.set(o,r),r)}function AV({_intern:e,_key:n},r){const o=n(r);return e.has(o)&&(r=e.get(o),e.delete(o)),r}function TV(e){return e!==null&&typeof e=="object"?e.valueOf():e}function Jv(e,n){let r;if(n===void 0)for(const o of e)o!=null&&(r<o||r===void 0&&o>=o)&&(r=o);else{let o=-1;for(let i of e)(i=n(i,++o,e))!=null&&(r<i||r===void 0&&i>=i)&&(r=i)}return r}function ex(e,n){let r;if(n===void 0)for(const o of e)o!=null&&(r>o||r===void 0&&o>=o)&&(r=o);else{let o=-1;for(let i of e)(i=n(i,++o,e))!=null&&(r>i||r===void 0&&i>=i)&&(r=i)}return r}function IV(e,n){let r=0;for(let o of e)(o=+o)&&(r+=o);return r}var $V=typeof global=="object"&&global&&global.Object===Object&&global,OV=typeof self=="object"&&self&&self.Object===Object&&self,oN=$V||OV||Function("return this")(),vu=oN.Symbol,iN=Object.prototype,DV=iN.hasOwnProperty,LV=iN.toString,xs=vu?vu.toStringTag:void 0;function zV(e){var n=DV.call(e,xs),r=e[xs];try{e[xs]=void 0;var o=!0}catch{}var i=LV.call(e);return o&&(n?e[xs]=r:delete e[xs]),i}var FV=Object.prototype,VV=FV.toString;function BV(e){return VV.call(e)}var HV="[object Null]",WV="[object Undefined]",tx=vu?vu.toStringTag:void 0;function UV(e){return e==null?e===void 0?WV:HV:tx&&tx in Object(e)?zV(e):BV(e)}function GV(e){return e!=null&&typeof e=="object"}var YV="[object Symbol]";function XV(e){return typeof e=="symbol"||GV(e)&&UV(e)==YV}var KV=/\s/;function qV(e){for(var n=e.length;n--&&KV.test(e.charAt(n)););return n}var ZV=/^\s+/;function QV(e){return e&&e.slice(0,qV(e)+1).replace(ZV,"")}function xu(e){var n=typeof e;return e!=null&&(n=="object"||n=="function")}var nx=NaN,JV=/^[-+]0x[0-9a-f]+$/i,eB=/^0b[01]+$/i,tB=/^0o[0-7]+$/i,nB=parseInt;function rx(e){if(typeof e=="number")return e;if(XV(e))return nx;if(xu(e)){var n=typeof e.valueOf=="function"?e.valueOf():e;e=xu(n)?n+"":n}if(typeof e!="string")return e===0?e:+e;e=QV(e);var r=eB.test(e);return r||tB.test(e)?nB(e.slice(2),r?2:8):JV.test(e)?nx:+e}var zf=function(){return oN.Date.now()},rB="Expected a function",oB=Math.max,iB=Math.min;function sN(e,n,r){var o,i,s,a,l,c,u=0,f=!1,d=!1,p=!0;if(typeof e!="function")throw new TypeError(rB);n=rx(n)||0,xu(r)&&(f=!!r.leading,d="maxWait"in r,s=d?oB(rx(r.maxWait)||0,n):s,p="trailing"in r?!!r.trailing:p);function g(k){var N=o,E=i;return o=i=void 0,u=k,a=e.apply(E,N),a}function v(k){return u=k,l=setTimeout(y,n),f?g(k):a}function w(k){var N=k-c,E=k-u,P=n-N;return d?iB(P,s-E):P}function _(k){var N=k-c,E=k-u;return c===void 0||N>=n||N<0||d&&E>=s}function y(){var k=zf();if(_(k))return b(k);l=setTimeout(y,w(k))}function b(k){return l=void 0,p&&o?g(k):(o=i=void 0,a)}function x(){l!==void 0&&clearTimeout(l),u=0,o=c=i=l=void 0}function S(){return l===void 0?a:b(zf())}function C(){var k=zf(),N=_(k);if(o=arguments,i=this,c=k,N){if(l===void 0)return v(c);if(d)return clearTimeout(l),l=setTimeout(y,n),g(c)}return l===void 0&&(l=setTimeout(y,n)),a}return C.cancel=x,C.flush=S,C}var sB="Expected a function";function aB(e,n,r){var o=!0,i=!0;if(typeof e!="function")throw new TypeError(sB);return xu(r)&&(o="leading"in r?!!r.leading:o,i="trailing"in r?!!r.trailing:i),sN(e,n,{leading:o,maxWait:n,trailing:i})}var bo=Object.freeze({Linear:Object.freeze({None:function(e){return e},In:function(e){return e},Out:function(e){return e},InOut:function(e){return e}}),Quadratic:Object.freeze({In:function(e){return e*e},Out:function(e){return e*(2-e)},InOut:function(e){return(e*=2)<1?.5*e*e:-.5*(--e*(e-2)-1)}}),Cubic:Object.freeze({In:function(e){return e*e*e},Out:function(e){return--e*e*e+1},InOut:function(e){return(e*=2)<1?.5*e*e*e:.5*((e-=2)*e*e+2)}}),Quartic:Object.freeze({In:function(e){return e*e*e*e},Out:function(e){return 1- --e*e*e*e},InOut:function(e){return(e*=2)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2)}}),Quintic:Object.freeze({In:function(e){return e*e*e*e*e},Out:function(e){return--e*e*e*e*e+1},InOut:function(e){return(e*=2)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2)}}),Sinusoidal:Object.freeze({In:function(e){return 1-Math.sin((1-e)*Math.PI/2)},Out:function(e){return Math.sin(e*Math.PI/2)},InOut:function(e){return .5*(1-Math.sin(Math.PI*(.5-e)))}}),Exponential:Object.freeze({In:function(e){return e===0?0:Math.pow(1024,e-1)},Out:function(e){return e===1?1:1-Math.pow(2,-10*e)},InOut:function(e){return e===0?0:e===1?1:(e*=2)<1?.5*Math.pow(1024,e-1):.5*(-Math.pow(2,-10*(e-1))+2)}}),Circular:Object.freeze({In:function(e){return 1-Math.sqrt(1-e*e)},Out:function(e){return Math.sqrt(1- --e*e)},InOut:function(e){return(e*=2)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)}}),Elastic:Object.freeze({In:function(e){return e===0?0:e===1?1:-Math.pow(2,10*(e-1))*Math.sin((e-1.1)*5*Math.PI)},Out:function(e){return e===0?0:e===1?1:Math.pow(2,-10*e)*Math.sin((e-.1)*5*Math.PI)+1},InOut:function(e){return e===0?0:e===1?1:(e*=2,e<1?-.5*Math.pow(2,10*(e-1))*Math.sin((e-1.1)*5*Math.PI):.5*Math.pow(2,-10*(e-1))*Math.sin((e-1.1)*5*Math.PI)+1)}}),Back:Object.freeze({In:function(e){var n=1.70158;return e===1?1:e*e*((n+1)*e-n)},Out:function(e){var n=1.70158;return e===0?0:--e*e*((n+1)*e+n)+1},InOut:function(e){var n=2.5949095;return(e*=2)<1?.5*(e*e*((n+1)*e-n)):.5*((e-=2)*e*((n+1)*e+n)+2)}}),Bounce:Object.freeze({In:function(e){return 1-bo.Bounce.Out(1-e)},Out:function(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},InOut:function(e){return e<.5?bo.Bounce.In(e*2)*.5:bo.Bounce.Out(e*2-1)*.5+.5}}),generatePow:function(e){return e===void 0&&(e=4),e=e<Number.EPSILON?Number.EPSILON:e,e=e>1e4?1e4:e,{In:function(n){return Math.pow(n,e)},Out:function(n){return 1-Math.pow(1-n,e)},InOut:function(n){return n<.5?Math.pow(n*2,e)/2:(1-Math.pow(2-n*2,e))/2+.5}}}}),Is=function(){return performance.now()},aN=function(){function e(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];this._tweens={},this._tweensAddedDuringUpdate={},this.add.apply(this,n)}return e.prototype.getAll=function(){var n=this;return Object.keys(this._tweens).map(function(r){return n._tweens[r]})},e.prototype.removeAll=function(){this._tweens={}},e.prototype.add=function(){for(var n,r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];for(var i=0,s=r;i<s.length;i++){var a=s[i];(n=a._group)===null||n===void 0||n.remove(a),a._group=this,this._tweens[a.getId()]=a,this._tweensAddedDuringUpdate[a.getId()]=a}},e.prototype.remove=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];for(var o=0,i=n;o<i.length;o++){var s=i[o];s._group=void 0,delete this._tweens[s.getId()],delete this._tweensAddedDuringUpdate[s.getId()]}},e.prototype.allStopped=function(){return this.getAll().every(function(n){return!n.isPlaying()})},e.prototype.update=function(n,r){n===void 0&&(n=Is()),r===void 0&&(r=!0);var o=Object.keys(this._tweens);if(o.length!==0)for(;o.length>0;){this._tweensAddedDuringUpdate={};for(var i=0;i<o.length;i++){var s=this._tweens[o[i]],a=!r;s&&s.update(n,a)===!1&&!r&&this.remove(s)}o=Object.keys(this._tweensAddedDuringUpdate)}},e}(),bh={Linear:function(e,n){var r=e.length-1,o=r*n,i=Math.floor(o),s=bh.Utils.Linear;return n<0?s(e[0],e[1],o):n>1?s(e[r],e[r-1],r-o):s(e[i],e[i+1>r?r:i+1],o-i)},Utils:{Linear:function(e,n,r){return(n-e)*r+e}}},lN=function(){function e(){}return e.nextId=function(){return e._nextId++},e._nextId=0,e}(),_h=new aN,ox=function(){function e(n,r){this._isPaused=!1,this._pauseStart=0,this._valuesStart={},this._valuesEnd={},this._valuesStartRepeat={},this._duration=1e3,this._isDynamic=!1,this._initialRepeat=0,this._repeat=0,this._yoyo=!1,this._isPlaying=!1,this._reversed=!1,this._delayTime=0,this._startTime=0,this._easingFunction=bo.Linear.None,this._interpolationFunction=bh.Linear,this._chainedTweens=[],this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._id=lN.nextId(),this._isChainStopped=!1,this._propertiesAreSetUp=!1,this._goToEnd=!1,this._object=n,typeof r=="object"?(this._group=r,r.add(this)):r===!0&&(this._group=_h,_h.add(this))}return e.prototype.getId=function(){return this._id},e.prototype.isPlaying=function(){return this._isPlaying},e.prototype.isPaused=function(){return this._isPaused},e.prototype.getDuration=function(){return this._duration},e.prototype.to=function(n,r){if(r===void 0&&(r=1e3),this._isPlaying)throw new Error("Can not call Tween.to() while Tween is already started or paused. Stop the Tween first.");return this._valuesEnd=n,this._propertiesAreSetUp=!1,this._duration=r<0?0:r,this},e.prototype.duration=function(n){return n===void 0&&(n=1e3),this._duration=n<0?0:n,this},e.prototype.dynamic=function(n){return n===void 0&&(n=!1),this._isDynamic=n,this},e.prototype.start=function(n,r){if(n===void 0&&(n=Is()),r===void 0&&(r=!1),this._isPlaying)return this;if(this._repeat=this._initialRepeat,this._reversed){this._reversed=!1;for(var o in this._valuesStartRepeat)this._swapEndStartRepeatValues(o),this._valuesStart[o]=this._valuesStartRepeat[o]}if(this._isPlaying=!0,this._isPaused=!1,this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._isChainStopped=!1,this._startTime=n,this._startTime+=this._delayTime,!this._propertiesAreSetUp||r){if(this._propertiesAreSetUp=!0,!this._isDynamic){var i={};for(var s in this._valuesEnd)i[s]=this._valuesEnd[s];this._valuesEnd=i}this._setupProperties(this._object,this._valuesStart,this._valuesEnd,this._valuesStartRepeat,r)}return this},e.prototype.startFromCurrentValues=function(n){return this.start(n,!0)},e.prototype._setupProperties=function(n,r,o,i,s){for(var a in o){var l=n[a],c=Array.isArray(l),u=c?"array":typeof l,f=!c&&Array.isArray(o[a]);if(!(u==="undefined"||u==="function")){if(f){var d=o[a];if(d.length===0)continue;for(var p=[l],g=0,v=d.length;g<v;g+=1){var w=this._handleRelativeValue(l,d[g]);if(isNaN(w)){f=!1,console.warn("Found invalid interpolation list. Skipping.");break}p.push(w)}f&&(o[a]=p)}if((u==="object"||c)&&l&&!f){r[a]=c?[]:{};var _=l;for(var y in _)r[a][y]=_[y];i[a]=c?[]:{};var d=o[a];if(!this._isDynamic){var b={};for(var y in d)b[y]=d[y];o[a]=d=b}this._setupProperties(_,r[a],d,i[a],s)}else(typeof r[a]>"u"||s)&&(r[a]=l),c||(r[a]*=1),f?i[a]=o[a].slice().reverse():i[a]=r[a]||0}}},e.prototype.stop=function(){return this._isChainStopped||(this._isChainStopped=!0,this.stopChainedTweens()),this._isPlaying?(this._isPlaying=!1,this._isPaused=!1,this._onStopCallback&&this._onStopCallback(this._object),this):this},e.prototype.end=function(){return this._goToEnd=!0,this.update(this._startTime+this._duration),this},e.prototype.pause=function(n){return n===void 0&&(n=Is()),this._isPaused||!this._isPlaying?this:(this._isPaused=!0,this._pauseStart=n,this)},e.prototype.resume=function(n){return n===void 0&&(n=Is()),!this._isPaused||!this._isPlaying?this:(this._isPaused=!1,this._startTime+=n-this._pauseStart,this._pauseStart=0,this)},e.prototype.stopChainedTweens=function(){for(var n=0,r=this._chainedTweens.length;n<r;n++)this._chainedTweens[n].stop();return this},e.prototype.group=function(n){return n?(n.add(this),this):(console.warn("tween.group() without args has been removed, use group.add(tween) instead."),this)},e.prototype.remove=function(){var n;return(n=this._group)===null||n===void 0||n.remove(this),this},e.prototype.delay=function(n){return n===void 0&&(n=0),this._delayTime=n,this},e.prototype.repeat=function(n){return n===void 0&&(n=0),this._initialRepeat=n,this._repeat=n,this},e.prototype.repeatDelay=function(n){return this._repeatDelayTime=n,this},e.prototype.yoyo=function(n){return n===void 0&&(n=!1),this._yoyo=n,this},e.prototype.easing=function(n){return n===void 0&&(n=bo.Linear.None),this._easingFunction=n,this},e.prototype.interpolation=function(n){return n===void 0&&(n=bh.Linear),this._interpolationFunction=n,this},e.prototype.chain=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return this._chainedTweens=n,this},e.prototype.onStart=function(n){return this._onStartCallback=n,this},e.prototype.onEveryStart=function(n){return this._onEveryStartCallback=n,this},e.prototype.onUpdate=function(n){return this._onUpdateCallback=n,this},e.prototype.onRepeat=function(n){return this._onRepeatCallback=n,this},e.prototype.onComplete=function(n){return this._onCompleteCallback=n,this},e.prototype.onStop=function(n){return this._onStopCallback=n,this},e.prototype.update=function(n,r){var o=this,i;if(n===void 0&&(n=Is()),r===void 0&&(r=e.autoStartOnUpdate),this._isPaused)return!0;var s;if(!this._goToEnd&&!this._isPlaying)if(r)this.start(n,!0);else return!1;if(this._goToEnd=!1,n<this._startTime)return!0;this._onStartCallbackFired===!1&&(this._onStartCallback&&this._onStartCallback(this._object),this._onStartCallbackFired=!0),this._onEveryStartCallbackFired===!1&&(this._onEveryStartCallback&&this._onEveryStartCallback(this._object),this._onEveryStartCallbackFired=!0);var a=n-this._startTime,l=this._duration+((i=this._repeatDelayTime)!==null&&i!==void 0?i:this._delayTime),c=this._duration+this._repeat*l,u=function(){if(o._duration===0||a>c)return 1;var w=Math.trunc(a/l),_=a-w*l,y=Math.min(_/o._duration,1);return y===0&&a===o._duration?1:y},f=u(),d=this._easingFunction(f);if(this._updateProperties(this._object,this._valuesStart,this._valuesEnd,d),this._onUpdateCallback&&this._onUpdateCallback(this._object,f),this._duration===0||a>=this._duration)if(this._repeat>0){var p=Math.min(Math.trunc((a-this._duration)/l)+1,this._repeat);isFinite(this._repeat)&&(this._repeat-=p);for(s in this._valuesStartRepeat)!this._yoyo&&typeof this._valuesEnd[s]=="string"&&(this._valuesStartRepeat[s]=this._valuesStartRepeat[s]+parseFloat(this._valuesEnd[s])),this._yoyo&&this._swapEndStartRepeatValues(s),this._valuesStart[s]=this._valuesStartRepeat[s];return this._yoyo&&(this._reversed=!this._reversed),this._startTime+=l*p,this._onRepeatCallback&&this._onRepeatCallback(this._object),this._onEveryStartCallbackFired=!1,!0}else{this._onCompleteCallback&&this._onCompleteCallback(this._object);for(var g=0,v=this._chainedTweens.length;g<v;g++)this._chainedTweens[g].start(this._startTime+this._duration,!1);return this._isPlaying=!1,!1}return!0},e.prototype._updateProperties=function(n,r,o,i){for(var s in o)if(r[s]!==void 0){var a=r[s]||0,l=o[s],c=Array.isArray(n[s]),u=Array.isArray(l),f=!c&&u;f?n[s]=this._interpolationFunction(l,i):typeof l=="object"&&l?this._updateProperties(n[s],a,l,i):(l=this._handleRelativeValue(a,l),typeof l=="number"&&(n[s]=a+(l-a)*i))}},e.prototype._handleRelativeValue=function(n,r){return typeof r!="string"?r:r.charAt(0)==="+"||r.charAt(0)==="-"?n+parseFloat(r):parseFloat(r)},e.prototype._swapEndStartRepeatValues=function(n){var r=this._valuesStartRepeat[n],o=this._valuesEnd[n];typeof o=="string"?this._valuesStartRepeat[n]=this._valuesStartRepeat[n]+parseFloat(o):this._valuesStartRepeat[n]=this._valuesEnd[n],this._valuesEnd[n]=r},e.autoStartOnUpdate=!1,e}();lN.nextId;var Tn=_h;Tn.getAll.bind(Tn);Tn.removeAll.bind(Tn);Tn.add.bind(Tn);Tn.remove.bind(Tn);Tn.update.bind(Tn);function ix(e,n){(n==null||n>e.length)&&(n=e.length);for(var r=0,o=Array(n);r<n;r++)o[r]=e[r];return o}function lB(e){if(Array.isArray(e))return e}function cB(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function uB(e,n,r){return Object.defineProperty(e,"prototype",{writable:!1}),e}function dB(e,n){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var o,i,s,a,l=[],c=!0,u=!1;try{if(s=(r=r.call(e)).next,n!==0)for(;!(c=(o=s.call(r)).done)&&(l.push(o.value),l.length!==n);c=!0);}catch(f){u=!0,i=f}finally{try{if(!c&&r.return!=null&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw i}}return l}}function fB(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
384
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function pB(e,n){return lB(e)||dB(e,n)||hB(e,n)||fB()}function hB(e,n){if(e){if(typeof e=="string")return ix(e,n);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?ix(e,n):void 0}}var mB=uB(function e(n,r){var o=r.default,i=o===void 0?null:o,s=r.triggerUpdate,a=s===void 0?!0:s,l=r.onChange,c=l===void 0?function(u,f){}:l;cB(this,e),this.name=n,this.defaultVal=i,this.triggerUpdate=a,this.onChange=c});function Lg(e){var n=e.stateInit,r=n===void 0?function(){return{}}:n,o=e.props,i=o===void 0?{}:o,s=e.methods,a=s===void 0?{}:s,l=e.aliases,c=l===void 0?{}:l,u=e.init,f=u===void 0?function(){}:u,d=e.update,p=d===void 0?function(){}:d,g=Object.keys(i).map(function(v){return new mB(v,i[v])});return function v(){for(var w=arguments.length,_=new Array(w),y=0;y<w;y++)_[y]=arguments[y];var b=!!(this instanceof v&&this.constructor),x=b?_.shift():void 0,S=_[0],C=S===void 0?{}:S,k=Object.assign({},r instanceof Function?r(C):r,{initialised:!1}),N={};function E(A){return P(A,C),T(),E}var P=function(D,V){f.call(E,D,k,V),k.initialised=!0},T=sN(function(){k.initialised&&(p.call(E,k,N),N={})},1);return g.forEach(function(A){E[A.name]=D(A);function D(V){var j=V.name,L=V.triggerUpdate,I=L===void 0?!1:L,z=V.onChange,M=z===void 0?function(W,$){}:z,R=V.defaultVal,O=R===void 0?null:R;return function(W){var $=k[j];if(!arguments.length)return $;var X=W===void 0?O:W;return k[j]=X,M.call(E,X,k,$),!N.hasOwnProperty(j)&&(N[j]=$),I&&T(),E}}}),Object.keys(a).forEach(function(A){E[A]=function(){for(var D,V=arguments.length,j=new Array(V),L=0;L<V;L++)j[L]=arguments[L];return(D=a[A]).call.apply(D,[E,k].concat(j))}}),Object.entries(c).forEach(function(A){var D=pB(A,2),V=D[0],j=D[1];return E[V]=E[j]}),E.resetProps=function(){return g.forEach(function(A){E[A.name](A.defaultVal)}),E},E.resetProps(),k._rerender=T,b&&x&&E(x),E}}var be=function(e){return typeof e=="function"?e:typeof e=="string"?function(n){return n[e]}:function(n){return e}};function wu(e){"@babel/helpers - typeof";return wu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},wu(e)}var gB=/^\s+/,yB=/\s+$/;function le(e,n){if(e=e||"",n=n||{},e instanceof le)return e;if(!(this instanceof le))return new le(e,n);var r=vB(e);this._originalInput=e,this._r=r.r,this._g=r.g,this._b=r.b,this._a=r.a,this._roundA=Math.round(100*this._a)/100,this._format=n.format||r.format,this._gradientType=n.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=r.ok}le.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var n=this.toRgb();return(n.r*299+n.g*587+n.b*114)/1e3},getLuminance:function(){var n=this.toRgb(),r,o,i,s,a,l;return r=n.r/255,o=n.g/255,i=n.b/255,r<=.03928?s=r/12.92:s=Math.pow((r+.055)/1.055,2.4),o<=.03928?a=o/12.92:a=Math.pow((o+.055)/1.055,2.4),i<=.03928?l=i/12.92:l=Math.pow((i+.055)/1.055,2.4),.2126*s+.7152*a+.0722*l},setAlpha:function(n){return this._a=cN(n),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var n=ax(this._r,this._g,this._b);return{h:n.h*360,s:n.s,v:n.v,a:this._a}},toHsvString:function(){var n=ax(this._r,this._g,this._b),r=Math.round(n.h*360),o=Math.round(n.s*100),i=Math.round(n.v*100);return this._a==1?"hsv("+r+", "+o+"%, "+i+"%)":"hsva("+r+", "+o+"%, "+i+"%, "+this._roundA+")"},toHsl:function(){var n=sx(this._r,this._g,this._b);return{h:n.h*360,s:n.s,l:n.l,a:this._a}},toHslString:function(){var n=sx(this._r,this._g,this._b),r=Math.round(n.h*360),o=Math.round(n.s*100),i=Math.round(n.l*100);return this._a==1?"hsl("+r+", "+o+"%, "+i+"%)":"hsla("+r+", "+o+"%, "+i+"%, "+this._roundA+")"},toHex:function(n){return lx(this._r,this._g,this._b,n)},toHexString:function(n){return"#"+this.toHex(n)},toHex8:function(n){return _B(this._r,this._g,this._b,this._a,n)},toHex8String:function(n){return"#"+this.toHex8(n)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(Me(this._r,255)*100)+"%",g:Math.round(Me(this._g,255)*100)+"%",b:Math.round(Me(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+Math.round(Me(this._r,255)*100)+"%, "+Math.round(Me(this._g,255)*100)+"%, "+Math.round(Me(this._b,255)*100)+"%)":"rgba("+Math.round(Me(this._r,255)*100)+"%, "+Math.round(Me(this._g,255)*100)+"%, "+Math.round(Me(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:IB[lx(this._r,this._g,this._b,!0)]||!1},toFilter:function(n){var r="#"+cx(this._r,this._g,this._b,this._a),o=r,i=this._gradientType?"GradientType = 1, ":"";if(n){var s=le(n);o="#"+cx(s._r,s._g,s._b,s._a)}return"progid:DXImageTransform.Microsoft.gradient("+i+"startColorstr="+r+",endColorstr="+o+")"},toString:function(n){var r=!!n;n=n||this._format;var o=!1,i=this._a<1&&this._a>=0,s=!r&&i&&(n==="hex"||n==="hex6"||n==="hex3"||n==="hex4"||n==="hex8"||n==="name");return s?n==="name"&&this._a===0?this.toName():this.toRgbString():(n==="rgb"&&(o=this.toRgbString()),n==="prgb"&&(o=this.toPercentageRgbString()),(n==="hex"||n==="hex6")&&(o=this.toHexString()),n==="hex3"&&(o=this.toHexString(!0)),n==="hex4"&&(o=this.toHex8String(!0)),n==="hex8"&&(o=this.toHex8String()),n==="name"&&(o=this.toName()),n==="hsl"&&(o=this.toHslString()),n==="hsv"&&(o=this.toHsvString()),o||this.toHexString())},clone:function(){return le(this.toString())},_applyModification:function(n,r){var o=n.apply(null,[this].concat([].slice.call(r)));return this._r=o._r,this._g=o._g,this._b=o._b,this.setAlpha(o._a),this},lighten:function(){return this._applyModification(NB,arguments)},brighten:function(){return this._applyModification(EB,arguments)},darken:function(){return this._applyModification(PB,arguments)},desaturate:function(){return this._applyModification(SB,arguments)},saturate:function(){return this._applyModification(CB,arguments)},greyscale:function(){return this._applyModification(kB,arguments)},spin:function(){return this._applyModification(jB,arguments)},_applyCombination:function(n,r){return n.apply(null,[this].concat([].slice.call(r)))},analogous:function(){return this._applyCombination(AB,arguments)},complement:function(){return this._applyCombination(MB,arguments)},monochromatic:function(){return this._applyCombination(TB,arguments)},splitcomplement:function(){return this._applyCombination(RB,arguments)},triad:function(){return this._applyCombination(ux,[3])},tetrad:function(){return this._applyCombination(ux,[4])}};le.fromRatio=function(e,n){if(wu(e)=="object"){var r={};for(var o in e)e.hasOwnProperty(o)&&(o==="a"?r[o]=e[o]:r[o]=$s(e[o]));e=r}return le(e,n)};function vB(e){var n={r:0,g:0,b:0},r=1,o=null,i=null,s=null,a=!1,l=!1;return typeof e=="string"&&(e=LB(e)),wu(e)=="object"&&(zn(e.r)&&zn(e.g)&&zn(e.b)?(n=xB(e.r,e.g,e.b),a=!0,l=String(e.r).substr(-1)==="%"?"prgb":"rgb"):zn(e.h)&&zn(e.s)&&zn(e.v)?(o=$s(e.s),i=$s(e.v),n=bB(e.h,o,i),a=!0,l="hsv"):zn(e.h)&&zn(e.s)&&zn(e.l)&&(o=$s(e.s),s=$s(e.l),n=wB(e.h,o,s),a=!0,l="hsl"),e.hasOwnProperty("a")&&(r=e.a)),r=cN(r),{ok:a,format:e.format||l,r:Math.min(255,Math.max(n.r,0)),g:Math.min(255,Math.max(n.g,0)),b:Math.min(255,Math.max(n.b,0)),a:r}}function xB(e,n,r){return{r:Me(e,255)*255,g:Me(n,255)*255,b:Me(r,255)*255}}function sx(e,n,r){e=Me(e,255),n=Me(n,255),r=Me(r,255);var o=Math.max(e,n,r),i=Math.min(e,n,r),s,a,l=(o+i)/2;if(o==i)s=a=0;else{var c=o-i;switch(a=l>.5?c/(2-o-i):c/(o+i),o){case e:s=(n-r)/c+(n<r?6:0);break;case n:s=(r-e)/c+2;break;case r:s=(e-n)/c+4;break}s/=6}return{h:s,s:a,l}}function wB(e,n,r){var o,i,s;e=Me(e,360),n=Me(n,100),r=Me(r,100);function a(u,f,d){return d<0&&(d+=1),d>1&&(d-=1),d<1/6?u+(f-u)*6*d:d<1/2?f:d<2/3?u+(f-u)*(2/3-d)*6:u}if(n===0)o=i=s=r;else{var l=r<.5?r*(1+n):r+n-r*n,c=2*r-l;o=a(c,l,e+1/3),i=a(c,l,e),s=a(c,l,e-1/3)}return{r:o*255,g:i*255,b:s*255}}function ax(e,n,r){e=Me(e,255),n=Me(n,255),r=Me(r,255);var o=Math.max(e,n,r),i=Math.min(e,n,r),s,a,l=o,c=o-i;if(a=o===0?0:c/o,o==i)s=0;else{switch(o){case e:s=(n-r)/c+(n<r?6:0);break;case n:s=(r-e)/c+2;break;case r:s=(e-n)/c+4;break}s/=6}return{h:s,s:a,v:l}}function bB(e,n,r){e=Me(e,360)*6,n=Me(n,100),r=Me(r,100);var o=Math.floor(e),i=e-o,s=r*(1-n),a=r*(1-i*n),l=r*(1-(1-i)*n),c=o%6,u=[r,a,s,s,l,r][c],f=[l,r,r,a,s,s][c],d=[s,s,l,r,r,a][c];return{r:u*255,g:f*255,b:d*255}}function lx(e,n,r,o){var i=[cn(Math.round(e).toString(16)),cn(Math.round(n).toString(16)),cn(Math.round(r).toString(16))];return o&&i[0].charAt(0)==i[0].charAt(1)&&i[1].charAt(0)==i[1].charAt(1)&&i[2].charAt(0)==i[2].charAt(1)?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0):i.join("")}function _B(e,n,r,o,i){var s=[cn(Math.round(e).toString(16)),cn(Math.round(n).toString(16)),cn(Math.round(r).toString(16)),cn(uN(o))];return i&&s[0].charAt(0)==s[0].charAt(1)&&s[1].charAt(0)==s[1].charAt(1)&&s[2].charAt(0)==s[2].charAt(1)&&s[3].charAt(0)==s[3].charAt(1)?s[0].charAt(0)+s[1].charAt(0)+s[2].charAt(0)+s[3].charAt(0):s.join("")}function cx(e,n,r,o){var i=[cn(uN(o)),cn(Math.round(e).toString(16)),cn(Math.round(n).toString(16)),cn(Math.round(r).toString(16))];return i.join("")}le.equals=function(e,n){return!e||!n?!1:le(e).toRgbString()==le(n).toRgbString()};le.random=function(){return le.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})};function SB(e,n){n=n===0?0:n||10;var r=le(e).toHsl();return r.s-=n/100,r.s=jd(r.s),le(r)}function CB(e,n){n=n===0?0:n||10;var r=le(e).toHsl();return r.s+=n/100,r.s=jd(r.s),le(r)}function kB(e){return le(e).desaturate(100)}function NB(e,n){n=n===0?0:n||10;var r=le(e).toHsl();return r.l+=n/100,r.l=jd(r.l),le(r)}function EB(e,n){n=n===0?0:n||10;var r=le(e).toRgb();return r.r=Math.max(0,Math.min(255,r.r-Math.round(255*-(n/100)))),r.g=Math.max(0,Math.min(255,r.g-Math.round(255*-(n/100)))),r.b=Math.max(0,Math.min(255,r.b-Math.round(255*-(n/100)))),le(r)}function PB(e,n){n=n===0?0:n||10;var r=le(e).toHsl();return r.l-=n/100,r.l=jd(r.l),le(r)}function jB(e,n){var r=le(e).toHsl(),o=(r.h+n)%360;return r.h=o<0?360+o:o,le(r)}function MB(e){var n=le(e).toHsl();return n.h=(n.h+180)%360,le(n)}function ux(e,n){if(isNaN(n)||n<=0)throw new Error("Argument to polyad must be a positive number");for(var r=le(e).toHsl(),o=[le(e)],i=360/n,s=1;s<n;s++)o.push(le({h:(r.h+s*i)%360,s:r.s,l:r.l}));return o}function RB(e){var n=le(e).toHsl(),r=n.h;return[le(e),le({h:(r+72)%360,s:n.s,l:n.l}),le({h:(r+216)%360,s:n.s,l:n.l})]}function AB(e,n,r){n=n||6,r=r||30;var o=le(e).toHsl(),i=360/r,s=[le(e)];for(o.h=(o.h-(i*n>>1)+720)%360;--n;)o.h=(o.h+i)%360,s.push(le(o));return s}function TB(e,n){n=n||6;for(var r=le(e).toHsv(),o=r.h,i=r.s,s=r.v,a=[],l=1/n;n--;)a.push(le({h:o,s:i,v:s})),s=(s+l)%1;return a}le.mix=function(e,n,r){r=r===0?0:r||50;var o=le(e).toRgb(),i=le(n).toRgb(),s=r/100,a={r:(i.r-o.r)*s+o.r,g:(i.g-o.g)*s+o.g,b:(i.b-o.b)*s+o.b,a:(i.a-o.a)*s+o.a};return le(a)};le.readability=function(e,n){var r=le(e),o=le(n);return(Math.max(r.getLuminance(),o.getLuminance())+.05)/(Math.min(r.getLuminance(),o.getLuminance())+.05)};le.isReadable=function(e,n,r){var o=le.readability(e,n),i,s;switch(s=!1,i=zB(r),i.level+i.size){case"AAsmall":case"AAAlarge":s=o>=4.5;break;case"AAlarge":s=o>=3;break;case"AAAsmall":s=o>=7;break}return s};le.mostReadable=function(e,n,r){var o=null,i=0,s,a,l,c;r=r||{},a=r.includeFallbackColors,l=r.level,c=r.size;for(var u=0;u<n.length;u++)s=le.readability(e,n[u]),s>i&&(i=s,o=le(n[u]));return le.isReadable(e,o,{level:l,size:c})||!a?o:(r.includeFallbackColors=!1,le.mostReadable(e,["#fff","#000"],r))};var Sh=le.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},IB=le.hexNames=$B(Sh);function $B(e){var n={};for(var r in e)e.hasOwnProperty(r)&&(n[e[r]]=r);return n}function cN(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function Me(e,n){OB(e)&&(e="100%");var r=DB(e);return e=Math.min(n,Math.max(0,parseFloat(e))),r&&(e=parseInt(e*n,10)/100),Math.abs(e-n)<1e-6?1:e%n/parseFloat(n)}function jd(e){return Math.min(1,Math.max(0,e))}function Pt(e){return parseInt(e,16)}function OB(e){return typeof e=="string"&&e.indexOf(".")!=-1&&parseFloat(e)===1}function DB(e){return typeof e=="string"&&e.indexOf("%")!=-1}function cn(e){return e.length==1?"0"+e:""+e}function $s(e){return e<=1&&(e=e*100+"%"),e}function uN(e){return Math.round(parseFloat(e)*255).toString(16)}function dx(e){return Pt(e)/255}var tn=function(){var e="[-\\+]?\\d+%?",n="[-\\+]?\\d*\\.\\d+%?",r="(?:"+n+")|(?:"+e+")",o="[\\s|\\(]+("+r+")[,|\\s]+("+r+")[,|\\s]+("+r+")\\s*\\)?",i="[\\s|\\(]+("+r+")[,|\\s]+("+r+")[,|\\s]+("+r+")[,|\\s]+("+r+")\\s*\\)?";return{CSS_UNIT:new RegExp(r),rgb:new RegExp("rgb"+o),rgba:new RegExp("rgba"+i),hsl:new RegExp("hsl"+o),hsla:new RegExp("hsla"+i),hsv:new RegExp("hsv"+o),hsva:new RegExp("hsva"+i),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function zn(e){return!!tn.CSS_UNIT.exec(e)}function LB(e){e=e.replace(gB,"").replace(yB,"").toLowerCase();var n=!1;if(Sh[e])e=Sh[e],n=!0;else if(e=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var r;return(r=tn.rgb.exec(e))?{r:r[1],g:r[2],b:r[3]}:(r=tn.rgba.exec(e))?{r:r[1],g:r[2],b:r[3],a:r[4]}:(r=tn.hsl.exec(e))?{h:r[1],s:r[2],l:r[3]}:(r=tn.hsla.exec(e))?{h:r[1],s:r[2],l:r[3],a:r[4]}:(r=tn.hsv.exec(e))?{h:r[1],s:r[2],v:r[3]}:(r=tn.hsva.exec(e))?{h:r[1],s:r[2],v:r[3],a:r[4]}:(r=tn.hex8.exec(e))?{r:Pt(r[1]),g:Pt(r[2]),b:Pt(r[3]),a:dx(r[4]),format:n?"name":"hex8"}:(r=tn.hex6.exec(e))?{r:Pt(r[1]),g:Pt(r[2]),b:Pt(r[3]),format:n?"name":"hex"}:(r=tn.hex4.exec(e))?{r:Pt(r[1]+""+r[1]),g:Pt(r[2]+""+r[2]),b:Pt(r[3]+""+r[3]),a:dx(r[4]+""+r[4]),format:n?"name":"hex8"}:(r=tn.hex3.exec(e))?{r:Pt(r[1]+""+r[1]),g:Pt(r[2]+""+r[2]),b:Pt(r[3]+""+r[3]),format:n?"name":"hex"}:!1}function zB(e){var n,r;return e=e||{level:"AA",size:"small"},n=(e.level||"AA").toUpperCase(),r=(e.size||"small").toLowerCase(),n!=="AA"&&n!=="AAA"&&(n="AA"),r!=="small"&&r!=="large"&&(r="small"),{level:n,size:r}}function Ch(e,n){(n==null||n>e.length)&&(n=e.length);for(var r=0,o=Array(n);r<n;r++)o[r]=e[r];return o}function FB(e){if(Array.isArray(e))return Ch(e)}function dN(e,n,r){if(typeof e=="function"?e===n:e.has(n))return arguments.length<3?n:r;throw new TypeError("Private element is not present on this object")}function VB(e,n){if(n.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function BB(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function Vt(e,n){return e.get(dN(e,n))}function fx(e,n,r){VB(e,n),n.set(e,r)}function px(e,n,r){return e.set(dN(e,n),r),r}function HB(e,n){for(var r=0;r<n.length;r++){var o=n[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,KB(o.key),o)}}function WB(e,n,r){return n&&HB(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function UB(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function GB(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
385
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function YB(e){return FB(e)||UB(e)||qB(e)||GB()}function XB(e,n){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var o=r.call(e,n);if(typeof o!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function KB(e){var n=XB(e,"string");return typeof n=="symbol"?n:n+""}function qB(e,n){if(e){if(typeof e=="string")return Ch(e,n);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Ch(e,n):void 0}}var ZB=123,QB=function(n){return"#".concat(Math.min(n,Math.pow(2,24)).toString(16).padStart(6,"0"))},fN=function(n,r,o){return(n<<16)+(r<<8)+o},JB=function(n){var r=le(n).toRgb(),o=r.r,i=r.g,s=r.b;return fN(o,i,s)},hx=function(n,r){return n*ZB%Math.pow(2,r)},lo=new WeakMap,Fn=new WeakMap,eH=function(){function e(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:6;BB(this,e),fx(this,lo,void 0),fx(this,Fn,void 0),px(Fn,this,n),this.reset()}return WB(e,[{key:"reset",value:function(){px(lo,this,["__reserved for background__"])}},{key:"register",value:function(r){if(Vt(lo,this).length>=Math.pow(2,24-Vt(Fn,this)))return null;var o=Vt(lo,this).length,i=hx(o,Vt(Fn,this)),s=QB(o+(i<<24-Vt(Fn,this)));return Vt(lo,this).push(r),s}},{key:"lookup",value:function(r){if(!r)return null;var o=typeof r=="string"?JB(r):fN.apply(void 0,YB(r));if(!o)return null;var i=o&Math.pow(2,24-Vt(Fn,this))-1,s=o>>24-Vt(Fn,this)&Math.pow(2,Vt(Fn,this))-1;return hx(i,Vt(Fn,this))!==s||i>=Vt(lo,this).length?null:Vt(lo,this)[i]}}])}(),Qa,Ae,pN,hN,Sr,mx,mN,gN,Ff,Cc,Gs,yN,zg,kh,Nh,bu={},_u=[],tH=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Md=Array.isArray;function En(e,n){for(var r in n)e[r]=n[r];return e}function Fg(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function nH(e,n,r){var o,i,s,a={};for(s in n)s=="key"?o=n[s]:s=="ref"?i=n[s]:a[s]=n[s];if(arguments.length>2&&(a.children=arguments.length>3?Qa.call(arguments,2):r),typeof e=="function"&&e.defaultProps!=null)for(s in e.defaultProps)a[s]===void 0&&(a[s]=e.defaultProps[s]);return Ys(e,a,o,i,null)}function Ys(e,n,r,o,i){var s={type:e,props:n,key:r,ref:o,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:i??++pN,__i:-1,__u:0};return i==null&&Ae.vnode!=null&&Ae.vnode(s),s}function Rd(e){return e.children}function kc(e,n){this.props=e,this.context=n}function Wi(e,n){if(n==null)return e.__?Wi(e.__,e.__i+1):null;for(var r;n<e.__k.length;n++)if((r=e.__k[n])!=null&&r.__e!=null)return r.__e;return typeof e.type=="function"?Wi(e):null}function rH(e){if(e.__P&&e.__d){var n=e.__v,r=n.__e,o=[],i=[],s=En({},n);s.__v=n.__v+1,Ae.vnode&&Ae.vnode(s),Vg(e.__P,s,n,e.__n,e.__P.namespaceURI,32&n.__u?[r]:null,o,r??Wi(n),!!(32&n.__u),i),s.__v=n.__v,s.__.__k[s.__i]=s,bN(o,s,i),n.__e=n.__=null,s.__e!=r&&vN(s)}}function vN(e){if((e=e.__)!=null&&e.__c!=null)return e.__e=e.__c.base=null,e.__k.some(function(n){if(n!=null&&n.__e!=null)return e.__e=e.__c.base=n.__e}),vN(e)}function gx(e){(!e.__d&&(e.__d=!0)&&Sr.push(e)&&!Su.__r++||mx!=Ae.debounceRendering)&&((mx=Ae.debounceRendering)||mN)(Su)}function Su(){try{for(var e,n=1;Sr.length;)Sr.length>n&&Sr.sort(gN),e=Sr.shift(),n=Sr.length,rH(e)}finally{Sr.length=Su.__r=0}}function xN(e,n,r,o,i,s,a,l,c,u,f){var d,p,g,v,w,_,y,b=o&&o.__k||_u,x=n.length;for(c=oH(r,n,b,c,x),d=0;d<x;d++)(g=r.__k[d])!=null&&(p=g.__i!=-1&&b[g.__i]||bu,g.__i=d,_=Vg(e,g,p,i,s,a,l,c,u,f),v=g.__e,g.ref&&p.ref!=g.ref&&(p.ref&&Bg(p.ref,null,g),f.push(g.ref,g.__c||v,g)),w==null&&v!=null&&(w=v),(y=!!(4&g.__u))||p.__k===g.__k?(c=wN(g,c,e,y),y&&p.__e&&(p.__e=null)):typeof g.type=="function"&&_!==void 0?c=_:v&&(c=v.nextSibling),g.__u&=-7);return r.__e=w,c}function oH(e,n,r,o,i){var s,a,l,c,u,f=r.length,d=f,p=0;for(e.__k=new Array(i),s=0;s<i;s++)(a=n[s])!=null&&typeof a!="boolean"&&typeof a!="function"?(typeof a=="string"||typeof a=="number"||typeof a=="bigint"||a.constructor==String?a=e.__k[s]=Ys(null,a,null,null,null):Md(a)?a=e.__k[s]=Ys(Rd,{children:a},null,null,null):a.constructor===void 0&&a.__b>0?a=e.__k[s]=Ys(a.type,a.props,a.key,a.ref?a.ref:null,a.__v):e.__k[s]=a,c=s+p,a.__=e,a.__b=e.__b+1,l=null,(u=a.__i=iH(a,r,c,d))!=-1&&(d--,(l=r[u])&&(l.__u|=2)),l==null||l.__v==null?(u==-1&&(i>f?p--:i<f&&p++),typeof a.type!="function"&&(a.__u|=4)):u!=c&&(u==c-1?p--:u==c+1?p++:(u>c?p--:p++,a.__u|=4))):e.__k[s]=null;if(d)for(s=0;s<f;s++)(l=r[s])!=null&&!(2&l.__u)&&(l.__e==o&&(o=Wi(l)),SN(l,l));return o}function wN(e,n,r,o){var i,s;if(typeof e.type=="function"){for(i=e.__k,s=0;i&&s<i.length;s++)i[s]&&(i[s].__=e,n=wN(i[s],n,r,o));return n}e.__e!=n&&(o&&(n&&e.type&&!n.parentNode&&(n=Wi(e)),r.insertBefore(e.__e,n||null)),n=e.__e);do n=n&&n.nextSibling;while(n!=null&&n.nodeType==8);return n}function iH(e,n,r,o){var i,s,a,l=e.key,c=e.type,u=n[r],f=u!=null&&(2&u.__u)==0;if(u===null&&l==null||f&&l==u.key&&c==u.type)return r;if(o>(f?1:0)){for(i=r-1,s=r+1;i>=0||s<n.length;)if((u=n[a=i>=0?i--:s++])!=null&&!(2&u.__u)&&l==u.key&&c==u.type)return a}return-1}function yx(e,n,r){n[0]=="-"?e.setProperty(n,r??""):e[n]=r==null?"":typeof r!="number"||tH.test(n)?r:r+"px"}function Ul(e,n,r,o,i){var s,a;e:if(n=="style")if(typeof r=="string")e.style.cssText=r;else{if(typeof o=="string"&&(e.style.cssText=o=""),o)for(n in o)r&&n in r||yx(e.style,n,"");if(r)for(n in r)o&&r[n]==o[n]||yx(e.style,n,r[n])}else if(n[0]=="o"&&n[1]=="n")s=n!=(n=n.replace(yN,"$1")),a=n.toLowerCase(),n=a in e||n=="onFocusOut"||n=="onFocusIn"?a.slice(2):n.slice(2),e.l||(e.l={}),e.l[n+s]=r,r?o?r[Gs]=o[Gs]:(r[Gs]=zg,e.addEventListener(n,s?Nh:kh,s)):e.removeEventListener(n,s?Nh:kh,s);else{if(i=="http://www.w3.org/2000/svg")n=n.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(n!="width"&&n!="height"&&n!="href"&&n!="list"&&n!="form"&&n!="tabIndex"&&n!="download"&&n!="rowSpan"&&n!="colSpan"&&n!="role"&&n!="popover"&&n in e)try{e[n]=r??"";break e}catch{}typeof r=="function"||(r==null||r===!1&&n[4]!="-"?e.removeAttribute(n):e.setAttribute(n,n=="popover"&&r==1?"":r))}}function vx(e){return function(n){if(this.l){var r=this.l[n.type+e];if(n[Cc]==null)n[Cc]=zg++;else if(n[Cc]<r[Gs])return;return r(Ae.event?Ae.event(n):n)}}}function Vg(e,n,r,o,i,s,a,l,c,u){var f,d,p,g,v,w,_,y,b,x,S,C,k,N,E,P=n.type;if(n.constructor!==void 0)return null;128&r.__u&&(c=!!(32&r.__u),s=[l=n.__e=r.__e]),(f=Ae.__b)&&f(n);e:if(typeof P=="function")try{if(y=n.props,b=P.prototype&&P.prototype.render,x=(f=P.contextType)&&o[f.__c],S=f?x?x.props.value:f.__:o,r.__c?_=(d=n.__c=r.__c).__=d.__E:(b?n.__c=d=new P(y,S):(n.__c=d=new kc(y,S),d.constructor=P,d.render=aH),x&&x.sub(d),d.state||(d.state={}),d.__n=o,p=d.__d=!0,d.__h=[],d._sb=[]),b&&d.__s==null&&(d.__s=d.state),b&&P.getDerivedStateFromProps!=null&&(d.__s==d.state&&(d.__s=En({},d.__s)),En(d.__s,P.getDerivedStateFromProps(y,d.__s))),g=d.props,v=d.state,d.__v=n,p)b&&P.getDerivedStateFromProps==null&&d.componentWillMount!=null&&d.componentWillMount(),b&&d.componentDidMount!=null&&d.__h.push(d.componentDidMount);else{if(b&&P.getDerivedStateFromProps==null&&y!==g&&d.componentWillReceiveProps!=null&&d.componentWillReceiveProps(y,S),n.__v==r.__v||!d.__e&&d.shouldComponentUpdate!=null&&d.shouldComponentUpdate(y,d.__s,S)===!1){n.__v!=r.__v&&(d.props=y,d.state=d.__s,d.__d=!1),n.__e=r.__e,n.__k=r.__k,n.__k.some(function(T){T&&(T.__=n)}),_u.push.apply(d.__h,d._sb),d._sb=[],d.__h.length&&a.push(d);break e}d.componentWillUpdate!=null&&d.componentWillUpdate(y,d.__s,S),b&&d.componentDidUpdate!=null&&d.__h.push(function(){d.componentDidUpdate(g,v,w)})}if(d.context=S,d.props=y,d.__P=e,d.__e=!1,C=Ae.__r,k=0,b)d.state=d.__s,d.__d=!1,C&&C(n),f=d.render(d.props,d.state,d.context),_u.push.apply(d.__h,d._sb),d._sb=[];else do d.__d=!1,C&&C(n),f=d.render(d.props,d.state,d.context),d.state=d.__s;while(d.__d&&++k<25);d.state=d.__s,d.getChildContext!=null&&(o=En(En({},o),d.getChildContext())),b&&!p&&d.getSnapshotBeforeUpdate!=null&&(w=d.getSnapshotBeforeUpdate(g,v)),N=f!=null&&f.type===Rd&&f.key==null?_N(f.props.children):f,l=xN(e,Md(N)?N:[N],n,r,o,i,s,a,l,c,u),d.base=n.__e,n.__u&=-161,d.__h.length&&a.push(d),_&&(d.__E=d.__=null)}catch(T){if(n.__v=null,c||s!=null)if(T.then){for(n.__u|=c?160:128;l&&l.nodeType==8&&l.nextSibling;)l=l.nextSibling;s[s.indexOf(l)]=null,n.__e=l}else{for(E=s.length;E--;)Fg(s[E]);Eh(n)}else n.__e=r.__e,n.__k=r.__k,T.then||Eh(n);Ae.__e(T,n,r)}else s==null&&n.__v==r.__v?(n.__k=r.__k,n.__e=r.__e):l=n.__e=sH(r.__e,n,r,o,i,s,a,c,u);return(f=Ae.diffed)&&f(n),128&n.__u?void 0:l}function Eh(e){e&&(e.__c&&(e.__c.__e=!0),e.__k&&e.__k.some(Eh))}function bN(e,n,r){for(var o=0;o<r.length;o++)Bg(r[o],r[++o],r[++o]);Ae.__c&&Ae.__c(n,e),e.some(function(i){try{e=i.__h,i.__h=[],e.some(function(s){s.call(i)})}catch(s){Ae.__e(s,i.__v)}})}function _N(e){return typeof e!="object"||e==null||e.__b>0?e:Md(e)?e.map(_N):En({},e)}function sH(e,n,r,o,i,s,a,l,c){var u,f,d,p,g,v,w,_=r.props||bu,y=n.props,b=n.type;if(b=="svg"?i="http://www.w3.org/2000/svg":b=="math"?i="http://www.w3.org/1998/Math/MathML":i||(i="http://www.w3.org/1999/xhtml"),s!=null){for(u=0;u<s.length;u++)if((g=s[u])&&"setAttribute"in g==!!b&&(b?g.localName==b:g.nodeType==3)){e=g,s[u]=null;break}}if(e==null){if(b==null)return document.createTextNode(y);e=document.createElementNS(i,b,y.is&&y),l&&(Ae.__m&&Ae.__m(n,s),l=!1),s=null}if(b==null)_===y||l&&e.data==y||(e.data=y);else{if(s=s&&Qa.call(e.childNodes),!l&&s!=null)for(_={},u=0;u<e.attributes.length;u++)_[(g=e.attributes[u]).name]=g.value;for(u in _)g=_[u],u=="dangerouslySetInnerHTML"?d=g:u=="children"||u in y||u=="value"&&"defaultValue"in y||u=="checked"&&"defaultChecked"in y||Ul(e,u,null,g,i);for(u in y)g=y[u],u=="children"?p=g:u=="dangerouslySetInnerHTML"?f=g:u=="value"?v=g:u=="checked"?w=g:l&&typeof g!="function"||_[u]===g||Ul(e,u,g,_[u],i);if(f)l||d&&(f.__html==d.__html||f.__html==e.innerHTML)||(e.innerHTML=f.__html),n.__k=[];else if(d&&(e.innerHTML=""),xN(n.type=="template"?e.content:e,Md(p)?p:[p],n,r,o,b=="foreignObject"?"http://www.w3.org/1999/xhtml":i,s,a,s?s[0]:r.__k&&Wi(r,0),l,c),s!=null)for(u=s.length;u--;)Fg(s[u]);l||(u="value",b=="progress"&&v==null?e.removeAttribute("value"):v!=null&&(v!==e[u]||b=="progress"&&!v||b=="option"&&v!=_[u])&&Ul(e,u,v,_[u],i),u="checked",w!=null&&w!=e[u]&&Ul(e,u,w,_[u],i))}return e}function Bg(e,n,r){try{if(typeof e=="function"){var o=typeof e.__u=="function";o&&e.__u(),o&&n==null||(e.__u=e(n))}else e.current=n}catch(i){Ae.__e(i,r)}}function SN(e,n,r){var o,i;if(Ae.unmount&&Ae.unmount(e),(o=e.ref)&&(o.current&&o.current!=e.__e||Bg(o,null,n)),(o=e.__c)!=null){if(o.componentWillUnmount)try{o.componentWillUnmount()}catch(s){Ae.__e(s,n)}o.base=o.__P=null}if(o=e.__k)for(i=0;i<o.length;i++)o[i]&&SN(o[i],n,r||typeof e.type!="function");r||Fg(e.__e),e.__c=e.__=e.__e=void 0}function aH(e,n,r){return this.constructor(e,r)}function lH(e,n,r){var o,i,s,a;n==document&&(n=document.documentElement),Ae.__&&Ae.__(e,n),i=(o=!1)?null:n.__k,s=[],a=[],Vg(n,e=n.__k=nH(Rd,null,[e]),i||bu,bu,n.namespaceURI,i?null:n.firstChild?Qa.call(n.childNodes):null,s,i?i.__e:n.firstChild,o,a),bN(s,e,a)}function CN(e,n,r){var o,i,s,a,l=En({},e.props);for(s in e.type&&e.type.defaultProps&&(a=e.type.defaultProps),n)s=="key"?o=n[s]:s=="ref"?i=n[s]:l[s]=n[s]===void 0&&a!=null?a[s]:n[s];return arguments.length>2&&(l.children=arguments.length>3?Qa.call(arguments,2):r),Ys(e.type,l,o||e.key,i||e.ref,null)}Qa=_u.slice,Ae={__e:function(e,n,r,o){for(var i,s,a;n=n.__;)if((i=n.__c)&&!i.__)try{if((s=i.constructor)&&s.getDerivedStateFromError!=null&&(i.setState(s.getDerivedStateFromError(e)),a=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(e,o||{}),a=i.__d),a)return i.__E=i}catch(l){e=l}throw e}},pN=0,hN=function(e){return e!=null&&e.constructor===void 0},kc.prototype.setState=function(e,n){var r;r=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=En({},this.state),typeof e=="function"&&(e=e(En({},r),this.props)),e&&En(r,e),e!=null&&this.__v&&(n&&this._sb.push(n),gx(this))},kc.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),gx(this))},kc.prototype.render=Rd,Sr=[],mN=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,gN=function(e,n){return e.__v.__b-n.__v.__b},Su.__r=0,Ff=Math.random().toString(8),Cc="__d"+Ff,Gs="__a"+Ff,yN=/(PointerCapture)$|Capture$/i,zg=0,kh=vx(!1),Nh=vx(!0);function xx(e,n){(n==null||n>e.length)&&(n=e.length);for(var r=0,o=Array(n);r<n;r++)o[r]=e[r];return o}function cH(e){if(Array.isArray(e))return e}function uH(e,n,r){return(n=gH(n))in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}function dH(e,n){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var o,i,s,a,l=[],c=!0,u=!1;try{if(s=(r=r.call(e)).next,n!==0)for(;!(c=(o=s.call(r)).done)&&(l.push(o.value),l.length!==n);c=!0);}catch(f){u=!0,i=f}finally{try{if(!c&&r.return!=null&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw i}}return l}}function fH(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
386
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function wx(e,n){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,o)}return r}function pH(e){for(var n=1;n<arguments.length;n++){var r=arguments[n]!=null?arguments[n]:{};n%2?wx(Object(r),!0).forEach(function(o){uH(e,o,r[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):wx(Object(r)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(r,o))})}return e}function hH(e,n){return cH(e)||dH(e,n)||yH(e,n)||fH()}function mH(e,n){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var o=r.call(e,n);if(typeof o!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}function gH(e){var n=mH(e,"string");return typeof n=="symbol"?n:n+""}function Cu(e){"@babel/helpers - typeof";return Cu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Cu(e)}function yH(e,n){if(e){if(typeof e=="string")return xx(e,n);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?xx(e,n):void 0}}var Ph=function(n){if(Cu(n)!=="object")return n;var r=CN(n);if(r.props){var o;r.props=pH({},r.props),r!=null&&(o=r.props)!==null&&o!==void 0&&o.children&&(r.props.children=Array.isArray(r.props.children)?r.props.children.map(Ph):Ph(r.props.children))}return r},vH=function(n){return hN(CN(n))},xH=function(n,r){delete r.__k,lH(Ph(n),r)};function wH(e,n){n===void 0&&(n={});var r=n.insertAt;if(!(typeof document>"u")){var o=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css",r==="top"&&o.firstChild?o.insertBefore(i,o.firstChild):o.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}var bH=`.float-tooltip-kap {
387
- position: absolute;
388
- width: max-content; /* prevent shrinking near right edge */
389
- max-width: max(50%, 150px);
390
- padding: 3px 5px;
391
- border-radius: 3px;
392
- font: 12px sans-serif;
393
- color: #eee;
394
- background: rgba(0,0,0,0.6);
395
- pointer-events: none;
396
- }
397
- `;wH(bH);var _H=Lg({props:{content:{default:!1},offsetX:{triggerUpdate:!1},offsetY:{triggerUpdate:!1}},init:function(n,r){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=o.style,s=i===void 0?{}:i,a=!!n&&Cu(n)==="object"&&!!n.node&&typeof n.node=="function",l=st(a?n.node():n);l.style("position")==="static"&&l.style("position","relative"),r.tooltipEl=l.append("div").attr("class","float-tooltip-kap"),Object.entries(s).forEach(function(u){var f=hH(u,2),d=f[0],p=f[1];return r.tooltipEl.style(d,p)}),r.tooltipEl.style("left","-10000px").style("display","none");var c="tooltip-".concat(Math.round(Math.random()*1e12));r.mouseInside=!1,l.on("mousemove.".concat(c),function(u){r.mouseInside=!0;var f=Wt(u),d=l.node(),p=d.offsetWidth,g=d.offsetHeight,v=[r.offsetX===null||r.offsetX===void 0?"-".concat(f[0]/p*100,"%"):typeof r.offsetX=="number"?"calc(-50% + ".concat(r.offsetX,"px)"):r.offsetX,r.offsetY===null||r.offsetY===void 0?g>130&&g-f[1]<100?"calc(-100% - 6px)":"21px":typeof r.offsetY=="number"?r.offsetY<0?"calc(-100% - ".concat(Math.abs(r.offsetY),"px)"):"".concat(r.offsetY,"px"):r.offsetY];r.tooltipEl.style("left",f[0]+"px").style("top",f[1]+"px").style("transform","translate(".concat(v.join(","),")")),r.content&&r.tooltipEl.style("display","inline")}),l.on("mouseover.".concat(c),function(){r.mouseInside=!0,r.content&&r.tooltipEl.style("display","inline")}),l.on("mouseout.".concat(c),function(){r.mouseInside=!1,r.tooltipEl.style("display","none")})},update:function(n){n.tooltipEl.style("display",n.content&&n.mouseInside?"inline":"none"),n.content?n.content instanceof HTMLElement?(n.tooltipEl.text(""),n.tooltipEl.append(function(){return n.content})):typeof n.content=="string"?n.tooltipEl.html(n.content):vH(n.content)?(n.tooltipEl.text(""),xH(n.content,n.tooltipEl.node())):(n.tooltipEl.style("display","none"),console.warn("Tooltip content is invalid, skipping.",n.content,n.content.toString())):n.tooltipEl.text("")}});function SH(e,n,r){var o,i=1;e==null&&(e=0),n==null&&(n=0),r==null&&(r=0);function s(){var a,l=o.length,c,u=0,f=0,d=0;for(a=0;a<l;++a)c=o[a],u+=c.x||0,f+=c.y||0,d+=c.z||0;for(u=(u/l-e)*i,f=(f/l-n)*i,d=(d/l-r)*i,a=0;a<l;++a)c=o[a],u&&(c.x-=u),f&&(c.y-=f),d&&(c.z-=d)}return s.initialize=function(a){o=a},s.x=function(a){return arguments.length?(e=+a,s):e},s.y=function(a){return arguments.length?(n=+a,s):n},s.z=function(a){return arguments.length?(r=+a,s):r},s.strength=function(a){return arguments.length?(i=+a,s):i},s}function CH(e){const n=+this._x.call(null,e);return kN(this.cover(n),n,e)}function kN(e,n,r){if(isNaN(n))return e;var o,i=e._root,s={data:r},a=e._x0,l=e._x1,c,u,f,d,p;if(!i)return e._root=s,e;for(;i.length;)if((f=n>=(c=(a+l)/2))?a=c:l=c,o=i,!(i=i[d=+f]))return o[d]=s,e;if(u=+e._x.call(null,i.data),n===u)return s.next=i,o?o[d]=s:e._root=s,e;do o=o?o[d]=new Array(2):e._root=new Array(2),(f=n>=(c=(a+l)/2))?a=c:l=c;while((d=+f)==(p=+(u>=c)));return o[p]=i,o[d]=s,e}function kH(e){Array.isArray(e)||(e=Array.from(e));const n=e.length,r=new Float64Array(n);let o=1/0,i=-1/0;for(let s=0,a;s<n;++s)isNaN(a=+this._x.call(null,e[s]))||(r[s]=a,a<o&&(o=a),a>i&&(i=a));if(o>i)return this;this.cover(o).cover(i);for(let s=0;s<n;++s)kN(this,r[s],e[s]);return this}function NH(e){if(isNaN(e=+e))return this;var n=this._x0,r=this._x1;if(isNaN(n))r=(n=Math.floor(e))+1;else{for(var o=r-n||1,i=this._root,s,a;n>e||e>=r;)switch(a=+(e<n),s=new Array(2),s[a]=i,i=s,o*=2,a){case 0:r=n+o;break;case 1:n=r-o;break}this._root&&this._root.length&&(this._root=i)}return this._x0=n,this._x1=r,this}function EH(){var e=[];return this.visit(function(n){if(!n.length)do e.push(n.data);while(n=n.next)}),e}function PH(e){return arguments.length?this.cover(+e[0][0]).cover(+e[1][0]):isNaN(this._x0)?void 0:[[this._x0],[this._x1]]}function Zn(e,n,r){this.node=e,this.x0=n,this.x1=r}function jH(e,n){var r,o=this._x0,i,s,a=this._x1,l=[],c=this._root,u,f;for(c&&l.push(new Zn(c,o,a)),n==null?n=1/0:(o=e-n,a=e+n);u=l.pop();)if(!(!(c=u.node)||(i=u.x0)>a||(s=u.x1)<o))if(c.length){var d=(i+s)/2;l.push(new Zn(c[1],d,s),new Zn(c[0],i,d)),(f=+(e>=d))&&(u=l[l.length-1],l[l.length-1]=l[l.length-1-f],l[l.length-1-f]=u)}else{var p=Math.abs(e-+this._x.call(null,c.data));p<n&&(n=p,o=e-p,a=e+p,r=c.data)}return r}function MH(e){if(isNaN(c=+this._x.call(null,e)))return this;var n,r=this._root,o,i,s,a=this._x0,l=this._x1,c,u,f,d,p;if(!r)return this;if(r.length)for(;;){if((f=c>=(u=(a+l)/2))?a=u:l=u,n=r,!(r=r[d=+f]))return this;if(!r.length)break;n[d+1&1]&&(o=n,p=d)}for(;r.data!==e;)if(i=r,!(r=r.next))return this;return(s=r.next)&&delete r.next,i?(s?i.next=s:delete i.next,this):n?(s?n[d]=s:delete n[d],(r=n[0]||n[1])&&r===(n[1]||n[0])&&!r.length&&(o?o[p]=r:this._root=r),this):(this._root=s,this)}function RH(e){for(var n=0,r=e.length;n<r;++n)this.remove(e[n]);return this}function AH(){return this._root}function TH(){var e=0;return this.visit(function(n){if(!n.length)do++e;while(n=n.next)}),e}function IH(e){var n=[],r,o=this._root,i,s,a;for(o&&n.push(new Zn(o,this._x0,this._x1));r=n.pop();)if(!e(o=r.node,s=r.x0,a=r.x1)&&o.length){var l=(s+a)/2;(i=o[1])&&n.push(new Zn(i,l,a)),(i=o[0])&&n.push(new Zn(i,s,l))}return this}function $H(e){var n=[],r=[],o;for(this._root&&n.push(new Zn(this._root,this._x0,this._x1));o=n.pop();){var i=o.node;if(i.length){var s,a=o.x0,l=o.x1,c=(a+l)/2;(s=i[0])&&n.push(new Zn(s,a,c)),(s=i[1])&&n.push(new Zn(s,c,l))}r.push(o)}for(;o=r.pop();)e(o.node,o.x0,o.x1);return this}function OH(e){return e[0]}function DH(e){return arguments.length?(this._x=e,this):this._x}function NN(e,n){var r=new Hg(n??OH,NaN,NaN);return e==null?r:r.addAll(e)}function Hg(e,n,r){this._x=e,this._x0=n,this._x1=r,this._root=void 0}function bx(e){for(var n={data:e.data},r=n;e=e.next;)r=r.next={data:e.data};return n}var kt=NN.prototype=Hg.prototype;kt.copy=function(){var e=new Hg(this._x,this._x0,this._x1),n=this._root,r,o;if(!n)return e;if(!n.length)return e._root=bx(n),e;for(r=[{source:n,target:e._root=new Array(2)}];n=r.pop();)for(var i=0;i<2;++i)(o=n.source[i])&&(o.length?r.push({source:o,target:n.target[i]=new Array(2)}):n.target[i]=bx(o));return e};kt.add=CH;kt.addAll=kH;kt.cover=NH;kt.data=EH;kt.extent=PH;kt.find=jH;kt.remove=MH;kt.removeAll=RH;kt.root=AH;kt.size=TH;kt.visit=IH;kt.visitAfter=$H;kt.x=DH;function LH(e){const n=+this._x.call(null,e),r=+this._y.call(null,e);return EN(this.cover(n,r),n,r,e)}function EN(e,n,r,o){if(isNaN(n)||isNaN(r))return e;var i,s=e._root,a={data:o},l=e._x0,c=e._y0,u=e._x1,f=e._y1,d,p,g,v,w,_,y,b;if(!s)return e._root=a,e;for(;s.length;)if((w=n>=(d=(l+u)/2))?l=d:u=d,(_=r>=(p=(c+f)/2))?c=p:f=p,i=s,!(s=s[y=_<<1|w]))return i[y]=a,e;if(g=+e._x.call(null,s.data),v=+e._y.call(null,s.data),n===g&&r===v)return a.next=s,i?i[y]=a:e._root=a,e;do i=i?i[y]=new Array(4):e._root=new Array(4),(w=n>=(d=(l+u)/2))?l=d:u=d,(_=r>=(p=(c+f)/2))?c=p:f=p;while((y=_<<1|w)===(b=(v>=p)<<1|g>=d));return i[b]=s,i[y]=a,e}function zH(e){var n,r,o=e.length,i,s,a=new Array(o),l=new Array(o),c=1/0,u=1/0,f=-1/0,d=-1/0;for(r=0;r<o;++r)isNaN(i=+this._x.call(null,n=e[r]))||isNaN(s=+this._y.call(null,n))||(a[r]=i,l[r]=s,i<c&&(c=i),i>f&&(f=i),s<u&&(u=s),s>d&&(d=s));if(c>f||u>d)return this;for(this.cover(c,u).cover(f,d),r=0;r<o;++r)EN(this,a[r],l[r],e[r]);return this}function FH(e,n){if(isNaN(e=+e)||isNaN(n=+n))return this;var r=this._x0,o=this._y0,i=this._x1,s=this._y1;if(isNaN(r))i=(r=Math.floor(e))+1,s=(o=Math.floor(n))+1;else{for(var a=i-r||1,l=this._root,c,u;r>e||e>=i||o>n||n>=s;)switch(u=(n<o)<<1|e<r,c=new Array(4),c[u]=l,l=c,a*=2,u){case 0:i=r+a,s=o+a;break;case 1:r=i-a,s=o+a;break;case 2:i=r+a,o=s-a;break;case 3:r=i-a,o=s-a;break}this._root&&this._root.length&&(this._root=l)}return this._x0=r,this._y0=o,this._x1=i,this._y1=s,this}function VH(){var e=[];return this.visit(function(n){if(!n.length)do e.push(n.data);while(n=n.next)}),e}function BH(e){return arguments.length?this.cover(+e[0][0],+e[0][1]).cover(+e[1][0],+e[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]}function ct(e,n,r,o,i){this.node=e,this.x0=n,this.y0=r,this.x1=o,this.y1=i}function HH(e,n,r){var o,i=this._x0,s=this._y0,a,l,c,u,f=this._x1,d=this._y1,p=[],g=this._root,v,w;for(g&&p.push(new ct(g,i,s,f,d)),r==null?r=1/0:(i=e-r,s=n-r,f=e+r,d=n+r,r*=r);v=p.pop();)if(!(!(g=v.node)||(a=v.x0)>f||(l=v.y0)>d||(c=v.x1)<i||(u=v.y1)<s))if(g.length){var _=(a+c)/2,y=(l+u)/2;p.push(new ct(g[3],_,y,c,u),new ct(g[2],a,y,_,u),new ct(g[1],_,l,c,y),new ct(g[0],a,l,_,y)),(w=(n>=y)<<1|e>=_)&&(v=p[p.length-1],p[p.length-1]=p[p.length-1-w],p[p.length-1-w]=v)}else{var b=e-+this._x.call(null,g.data),x=n-+this._y.call(null,g.data),S=b*b+x*x;if(S<r){var C=Math.sqrt(r=S);i=e-C,s=n-C,f=e+C,d=n+C,o=g.data}}return o}function WH(e){if(isNaN(f=+this._x.call(null,e))||isNaN(d=+this._y.call(null,e)))return this;var n,r=this._root,o,i,s,a=this._x0,l=this._y0,c=this._x1,u=this._y1,f,d,p,g,v,w,_,y;if(!r)return this;if(r.length)for(;;){if((v=f>=(p=(a+c)/2))?a=p:c=p,(w=d>=(g=(l+u)/2))?l=g:u=g,n=r,!(r=r[_=w<<1|v]))return this;if(!r.length)break;(n[_+1&3]||n[_+2&3]||n[_+3&3])&&(o=n,y=_)}for(;r.data!==e;)if(i=r,!(r=r.next))return this;return(s=r.next)&&delete r.next,i?(s?i.next=s:delete i.next,this):n?(s?n[_]=s:delete n[_],(r=n[0]||n[1]||n[2]||n[3])&&r===(n[3]||n[2]||n[1]||n[0])&&!r.length&&(o?o[y]=r:this._root=r),this):(this._root=s,this)}function UH(e){for(var n=0,r=e.length;n<r;++n)this.remove(e[n]);return this}function GH(){return this._root}function YH(){var e=0;return this.visit(function(n){if(!n.length)do++e;while(n=n.next)}),e}function XH(e){var n=[],r,o=this._root,i,s,a,l,c;for(o&&n.push(new ct(o,this._x0,this._y0,this._x1,this._y1));r=n.pop();)if(!e(o=r.node,s=r.x0,a=r.y0,l=r.x1,c=r.y1)&&o.length){var u=(s+l)/2,f=(a+c)/2;(i=o[3])&&n.push(new ct(i,u,f,l,c)),(i=o[2])&&n.push(new ct(i,s,f,u,c)),(i=o[1])&&n.push(new ct(i,u,a,l,f)),(i=o[0])&&n.push(new ct(i,s,a,u,f))}return this}function KH(e){var n=[],r=[],o;for(this._root&&n.push(new ct(this._root,this._x0,this._y0,this._x1,this._y1));o=n.pop();){var i=o.node;if(i.length){var s,a=o.x0,l=o.y0,c=o.x1,u=o.y1,f=(a+c)/2,d=(l+u)/2;(s=i[0])&&n.push(new ct(s,a,l,f,d)),(s=i[1])&&n.push(new ct(s,f,l,c,d)),(s=i[2])&&n.push(new ct(s,a,d,f,u)),(s=i[3])&&n.push(new ct(s,f,d,c,u))}r.push(o)}for(;o=r.pop();)e(o.node,o.x0,o.y0,o.x1,o.y1);return this}function qH(e){return e[0]}function ZH(e){return arguments.length?(this._x=e,this):this._x}function QH(e){return e[1]}function JH(e){return arguments.length?(this._y=e,this):this._y}function PN(e,n,r){var o=new Wg(n??qH,r??QH,NaN,NaN,NaN,NaN);return e==null?o:o.addAll(e)}function Wg(e,n,r,o,i,s){this._x=e,this._y=n,this._x0=r,this._y0=o,this._x1=i,this._y1=s,this._root=void 0}function _x(e){for(var n={data:e.data},r=n;e=e.next;)r=r.next={data:e.data};return n}var ht=PN.prototype=Wg.prototype;ht.copy=function(){var e=new Wg(this._x,this._y,this._x0,this._y0,this._x1,this._y1),n=this._root,r,o;if(!n)return e;if(!n.length)return e._root=_x(n),e;for(r=[{source:n,target:e._root=new Array(4)}];n=r.pop();)for(var i=0;i<4;++i)(o=n.source[i])&&(o.length?r.push({source:o,target:n.target[i]=new Array(4)}):n.target[i]=_x(o));return e};ht.add=LH;ht.addAll=zH;ht.cover=FH;ht.data=VH;ht.extent=BH;ht.find=HH;ht.remove=WH;ht.removeAll=UH;ht.root=GH;ht.size=YH;ht.visit=XH;ht.visitAfter=KH;ht.x=ZH;ht.y=JH;function eW(e){const n=+this._x.call(null,e),r=+this._y.call(null,e),o=+this._z.call(null,e);return jN(this.cover(n,r,o),n,r,o,e)}function jN(e,n,r,o,i){if(isNaN(n)||isNaN(r)||isNaN(o))return e;var s,a=e._root,l={data:i},c=e._x0,u=e._y0,f=e._z0,d=e._x1,p=e._y1,g=e._z1,v,w,_,y,b,x,S,C,k,N,E;if(!a)return e._root=l,e;for(;a.length;)if((S=n>=(v=(c+d)/2))?c=v:d=v,(C=r>=(w=(u+p)/2))?u=w:p=w,(k=o>=(_=(f+g)/2))?f=_:g=_,s=a,!(a=a[N=k<<2|C<<1|S]))return s[N]=l,e;if(y=+e._x.call(null,a.data),b=+e._y.call(null,a.data),x=+e._z.call(null,a.data),n===y&&r===b&&o===x)return l.next=a,s?s[N]=l:e._root=l,e;do s=s?s[N]=new Array(8):e._root=new Array(8),(S=n>=(v=(c+d)/2))?c=v:d=v,(C=r>=(w=(u+p)/2))?u=w:p=w,(k=o>=(_=(f+g)/2))?f=_:g=_;while((N=k<<2|C<<1|S)===(E=(x>=_)<<2|(b>=w)<<1|y>=v));return s[E]=a,s[N]=l,e}function tW(e){Array.isArray(e)||(e=Array.from(e));const n=e.length,r=new Float64Array(n),o=new Float64Array(n),i=new Float64Array(n);let s=1/0,a=1/0,l=1/0,c=-1/0,u=-1/0,f=-1/0;for(let d=0,p,g,v,w;d<n;++d)isNaN(g=+this._x.call(null,p=e[d]))||isNaN(v=+this._y.call(null,p))||isNaN(w=+this._z.call(null,p))||(r[d]=g,o[d]=v,i[d]=w,g<s&&(s=g),g>c&&(c=g),v<a&&(a=v),v>u&&(u=v),w<l&&(l=w),w>f&&(f=w));if(s>c||a>u||l>f)return this;this.cover(s,a,l).cover(c,u,f);for(let d=0;d<n;++d)jN(this,r[d],o[d],i[d],e[d]);return this}function nW(e,n,r){if(isNaN(e=+e)||isNaN(n=+n)||isNaN(r=+r))return this;var o=this._x0,i=this._y0,s=this._z0,a=this._x1,l=this._y1,c=this._z1;if(isNaN(o))a=(o=Math.floor(e))+1,l=(i=Math.floor(n))+1,c=(s=Math.floor(r))+1;else{for(var u=a-o||1,f=this._root,d,p;o>e||e>=a||i>n||n>=l||s>r||r>=c;)switch(p=(r<s)<<2|(n<i)<<1|e<o,d=new Array(8),d[p]=f,f=d,u*=2,p){case 0:a=o+u,l=i+u,c=s+u;break;case 1:o=a-u,l=i+u,c=s+u;break;case 2:a=o+u,i=l-u,c=s+u;break;case 3:o=a-u,i=l-u,c=s+u;break;case 4:a=o+u,l=i+u,s=c-u;break;case 5:o=a-u,l=i+u,s=c-u;break;case 6:a=o+u,i=l-u,s=c-u;break;case 7:o=a-u,i=l-u,s=c-u;break}this._root&&this._root.length&&(this._root=f)}return this._x0=o,this._y0=i,this._z0=s,this._x1=a,this._y1=l,this._z1=c,this}function rW(){var e=[];return this.visit(function(n){if(!n.length)do e.push(n.data);while(n=n.next)}),e}function oW(e){return arguments.length?this.cover(+e[0][0],+e[0][1],+e[0][2]).cover(+e[1][0],+e[1][1],+e[1][2]):isNaN(this._x0)?void 0:[[this._x0,this._y0,this._z0],[this._x1,this._y1,this._z1]]}function Se(e,n,r,o,i,s,a){this.node=e,this.x0=n,this.y0=r,this.z0=o,this.x1=i,this.y1=s,this.z1=a}function iW(e,n,r,o){var i,s=this._x0,a=this._y0,l=this._z0,c,u,f,d,p,g,v=this._x1,w=this._y1,_=this._z1,y=[],b=this._root,x,S;for(b&&y.push(new Se(b,s,a,l,v,w,_)),o==null?o=1/0:(s=e-o,a=n-o,l=r-o,v=e+o,w=n+o,_=r+o,o*=o);x=y.pop();)if(!(!(b=x.node)||(c=x.x0)>v||(u=x.y0)>w||(f=x.z0)>_||(d=x.x1)<s||(p=x.y1)<a||(g=x.z1)<l))if(b.length){var C=(c+d)/2,k=(u+p)/2,N=(f+g)/2;y.push(new Se(b[7],C,k,N,d,p,g),new Se(b[6],c,k,N,C,p,g),new Se(b[5],C,u,N,d,k,g),new Se(b[4],c,u,N,C,k,g),new Se(b[3],C,k,f,d,p,N),new Se(b[2],c,k,f,C,p,N),new Se(b[1],C,u,f,d,k,N),new Se(b[0],c,u,f,C,k,N)),(S=(r>=N)<<2|(n>=k)<<1|e>=C)&&(x=y[y.length-1],y[y.length-1]=y[y.length-1-S],y[y.length-1-S]=x)}else{var E=e-+this._x.call(null,b.data),P=n-+this._y.call(null,b.data),T=r-+this._z.call(null,b.data),A=E*E+P*P+T*T;if(A<o){var D=Math.sqrt(o=A);s=e-D,a=n-D,l=r-D,v=e+D,w=n+D,_=r+D,i=b.data}}return i}const sW=(e,n,r,o,i,s)=>Math.sqrt((e-o)**2+(n-i)**2+(r-s)**2);function aW(e,n,r,o){const i=[],s=e-o,a=n-o,l=r-o,c=e+o,u=n+o,f=r+o;return this.visit((d,p,g,v,w,_,y)=>{if(!d.length)do{const b=d.data;sW(e,n,r,this._x(b),this._y(b),this._z(b))<=o&&i.push(b)}while(d=d.next);return p>c||g>u||v>f||w<s||_<a||y<l}),i}function lW(e){if(isNaN(p=+this._x.call(null,e))||isNaN(g=+this._y.call(null,e))||isNaN(v=+this._z.call(null,e)))return this;var n,r=this._root,o,i,s,a=this._x0,l=this._y0,c=this._z0,u=this._x1,f=this._y1,d=this._z1,p,g,v,w,_,y,b,x,S,C,k;if(!r)return this;if(r.length)for(;;){if((b=p>=(w=(a+u)/2))?a=w:u=w,(x=g>=(_=(l+f)/2))?l=_:f=_,(S=v>=(y=(c+d)/2))?c=y:d=y,n=r,!(r=r[C=S<<2|x<<1|b]))return this;if(!r.length)break;(n[C+1&7]||n[C+2&7]||n[C+3&7]||n[C+4&7]||n[C+5&7]||n[C+6&7]||n[C+7&7])&&(o=n,k=C)}for(;r.data!==e;)if(i=r,!(r=r.next))return this;return(s=r.next)&&delete r.next,i?(s?i.next=s:delete i.next,this):n?(s?n[C]=s:delete n[C],(r=n[0]||n[1]||n[2]||n[3]||n[4]||n[5]||n[6]||n[7])&&r===(n[7]||n[6]||n[5]||n[4]||n[3]||n[2]||n[1]||n[0])&&!r.length&&(o?o[k]=r:this._root=r),this):(this._root=s,this)}function cW(e){for(var n=0,r=e.length;n<r;++n)this.remove(e[n]);return this}function uW(){return this._root}function dW(){var e=0;return this.visit(function(n){if(!n.length)do++e;while(n=n.next)}),e}function fW(e){var n=[],r,o=this._root,i,s,a,l,c,u,f;for(o&&n.push(new Se(o,this._x0,this._y0,this._z0,this._x1,this._y1,this._z1));r=n.pop();)if(!e(o=r.node,s=r.x0,a=r.y0,l=r.z0,c=r.x1,u=r.y1,f=r.z1)&&o.length){var d=(s+c)/2,p=(a+u)/2,g=(l+f)/2;(i=o[7])&&n.push(new Se(i,d,p,g,c,u,f)),(i=o[6])&&n.push(new Se(i,s,p,g,d,u,f)),(i=o[5])&&n.push(new Se(i,d,a,g,c,p,f)),(i=o[4])&&n.push(new Se(i,s,a,g,d,p,f)),(i=o[3])&&n.push(new Se(i,d,p,l,c,u,g)),(i=o[2])&&n.push(new Se(i,s,p,l,d,u,g)),(i=o[1])&&n.push(new Se(i,d,a,l,c,p,g)),(i=o[0])&&n.push(new Se(i,s,a,l,d,p,g))}return this}function pW(e){var n=[],r=[],o;for(this._root&&n.push(new Se(this._root,this._x0,this._y0,this._z0,this._x1,this._y1,this._z1));o=n.pop();){var i=o.node;if(i.length){var s,a=o.x0,l=o.y0,c=o.z0,u=o.x1,f=o.y1,d=o.z1,p=(a+u)/2,g=(l+f)/2,v=(c+d)/2;(s=i[0])&&n.push(new Se(s,a,l,c,p,g,v)),(s=i[1])&&n.push(new Se(s,p,l,c,u,g,v)),(s=i[2])&&n.push(new Se(s,a,g,c,p,f,v)),(s=i[3])&&n.push(new Se(s,p,g,c,u,f,v)),(s=i[4])&&n.push(new Se(s,a,l,v,p,g,d)),(s=i[5])&&n.push(new Se(s,p,l,v,u,g,d)),(s=i[6])&&n.push(new Se(s,a,g,v,p,f,d)),(s=i[7])&&n.push(new Se(s,p,g,v,u,f,d))}r.push(o)}for(;o=r.pop();)e(o.node,o.x0,o.y0,o.z0,o.x1,o.y1,o.z1);return this}function hW(e){return e[0]}function mW(e){return arguments.length?(this._x=e,this):this._x}function gW(e){return e[1]}function yW(e){return arguments.length?(this._y=e,this):this._y}function vW(e){return e[2]}function xW(e){return arguments.length?(this._z=e,this):this._z}function MN(e,n,r,o){var i=new Ug(n??hW,r??gW,o??vW,NaN,NaN,NaN,NaN,NaN,NaN);return e==null?i:i.addAll(e)}function Ug(e,n,r,o,i,s,a,l,c){this._x=e,this._y=n,this._z=r,this._x0=o,this._y0=i,this._z0=s,this._x1=a,this._y1=l,this._z1=c,this._root=void 0}function Sx(e){for(var n={data:e.data},r=n;e=e.next;)r=r.next={data:e.data};return n}var et=MN.prototype=Ug.prototype;et.copy=function(){var e=new Ug(this._x,this._y,this._z,this._x0,this._y0,this._z0,this._x1,this._y1,this._z1),n=this._root,r,o;if(!n)return e;if(!n.length)return e._root=Sx(n),e;for(r=[{source:n,target:e._root=new Array(8)}];n=r.pop();)for(var i=0;i<8;++i)(o=n.source[i])&&(o.length?r.push({source:o,target:n.target[i]=new Array(8)}):n.target[i]=Sx(o));return e};et.add=eW;et.addAll=tW;et.cover=nW;et.data=rW;et.extent=oW;et.find=iW;et.findAllWithinRadius=aW;et.remove=lW;et.removeAll=cW;et.root=uW;et.size=dW;et.visit=fW;et.visitAfter=pW;et.x=mW;et.y=yW;et.z=xW;function Kn(e){return function(){return e}}function Un(e){return(e()-.5)*1e-6}function wW(e){return e.index}function Cx(e,n){var r=e.get(n);if(!r)throw new Error("node not found: "+n);return r}function bW(e){var n=wW,r=p,o,i=Kn(30),s,a,l,c,u,f,d=1;e==null&&(e=[]);function p(y){return 1/Math.min(c[y.source.index],c[y.target.index])}function g(y){for(var b=0,x=e.length;b<d;++b)for(var S=0,C,k,N,E=0,P=0,T=0,A,D;S<x;++S)C=e[S],k=C.source,N=C.target,E=N.x+N.vx-k.x-k.vx||Un(f),l>1&&(P=N.y+N.vy-k.y-k.vy||Un(f)),l>2&&(T=N.z+N.vz-k.z-k.vz||Un(f)),A=Math.sqrt(E*E+P*P+T*T),A=(A-s[S])/A*y*o[S],E*=A,P*=A,T*=A,N.vx-=E*(D=u[S]),l>1&&(N.vy-=P*D),l>2&&(N.vz-=T*D),k.vx+=E*(D=1-D),l>1&&(k.vy+=P*D),l>2&&(k.vz+=T*D)}function v(){if(a){var y,b=a.length,x=e.length,S=new Map(a.map((k,N)=>[n(k,N,a),k])),C;for(y=0,c=new Array(b);y<x;++y)C=e[y],C.index=y,typeof C.source!="object"&&(C.source=Cx(S,C.source)),typeof C.target!="object"&&(C.target=Cx(S,C.target)),c[C.source.index]=(c[C.source.index]||0)+1,c[C.target.index]=(c[C.target.index]||0)+1;for(y=0,u=new Array(x);y<x;++y)C=e[y],u[y]=c[C.source.index]/(c[C.source.index]+c[C.target.index]);o=new Array(x),w(),s=new Array(x),_()}}function w(){if(a)for(var y=0,b=e.length;y<b;++y)o[y]=+r(e[y],y,e)}function _(){if(a)for(var y=0,b=e.length;y<b;++y)s[y]=+i(e[y],y,e)}return g.initialize=function(y,...b){a=y,f=b.find(x=>typeof x=="function")||Math.random,l=b.find(x=>[1,2,3].includes(x))||2,v()},g.links=function(y){return arguments.length?(e=y,v(),g):e},g.id=function(y){return arguments.length?(n=y,g):n},g.iterations=function(y){return arguments.length?(d=+y,g):d},g.strength=function(y){return arguments.length?(r=typeof y=="function"?y:Kn(+y),w(),g):r},g.distance=function(y){return arguments.length?(i=typeof y=="function"?y:Kn(+y),_(),g):i},g}const _W=1664525,SW=1013904223,kx=4294967296;function CW(){let e=1;return()=>(e=(_W*e+SW)%kx)/kx}var Nx=3;function Vf(e){return e.x}function Ex(e){return e.y}function kW(e){return e.z}var NW=10,EW=Math.PI*(3-Math.sqrt(5)),PW=Math.PI*20/(9+Math.sqrt(221));function jW(e,n){n=n||2;var r=Math.min(Nx,Math.max(1,Math.round(n))),o,i=1,s=.001,a=1-Math.pow(s,1/300),l=0,c=.6,u=new Map,f=Ig(g),d=qa("tick","end"),p=CW();e==null&&(e=[]);function g(){v(),d.call("tick",o),i<s&&(f.stop(),d.call("end",o))}function v(y){var b,x=e.length,S;y===void 0&&(y=1);for(var C=0;C<y;++C)for(i+=(l-i)*a,u.forEach(function(k){k(i)}),b=0;b<x;++b)S=e[b],S.fx==null?S.x+=S.vx*=c:(S.x=S.fx,S.vx=0),r>1&&(S.fy==null?S.y+=S.vy*=c:(S.y=S.fy,S.vy=0)),r>2&&(S.fz==null?S.z+=S.vz*=c:(S.z=S.fz,S.vz=0));return o}function w(){for(var y=0,b=e.length,x;y<b;++y){if(x=e[y],x.index=y,x.fx!=null&&(x.x=x.fx),x.fy!=null&&(x.y=x.fy),x.fz!=null&&(x.z=x.fz),isNaN(x.x)||r>1&&isNaN(x.y)||r>2&&isNaN(x.z)){var S=NW*(r>2?Math.cbrt(.5+y):r>1?Math.sqrt(.5+y):y),C=y*EW,k=y*PW;r===1?x.x=S:r===2?(x.x=S*Math.cos(C),x.y=S*Math.sin(C)):(x.x=S*Math.sin(C)*Math.cos(k),x.y=S*Math.cos(C),x.z=S*Math.sin(C)*Math.sin(k))}(isNaN(x.vx)||r>1&&isNaN(x.vy)||r>2&&isNaN(x.vz))&&(x.vx=0,r>1&&(x.vy=0),r>2&&(x.vz=0))}}function _(y){return y.initialize&&y.initialize(e,p,r),y}return w(),o={tick:v,restart:function(){return f.restart(g),o},stop:function(){return f.stop(),o},numDimensions:function(y){return arguments.length?(r=Math.min(Nx,Math.max(1,Math.round(y))),u.forEach(_),o):r},nodes:function(y){return arguments.length?(e=y,w(),u.forEach(_),o):e},alpha:function(y){return arguments.length?(i=+y,o):i},alphaMin:function(y){return arguments.length?(s=+y,o):s},alphaDecay:function(y){return arguments.length?(a=+y,o):+a},alphaTarget:function(y){return arguments.length?(l=+y,o):l},velocityDecay:function(y){return arguments.length?(c=1-y,o):1-c},randomSource:function(y){return arguments.length?(p=y,u.forEach(_),o):p},force:function(y,b){return arguments.length>1?(b==null?u.delete(y):u.set(y,_(b)),o):u.get(y)},find:function(){var y=Array.prototype.slice.call(arguments),b=y.shift()||0,x=(r>1?y.shift():null)||0,S=(r>2?y.shift():null)||0,C=y.shift()||1/0,k=0,N=e.length,E,P,T,A,D,V;for(C*=C,k=0;k<N;++k)D=e[k],E=b-D.x,P=x-(D.y||0),T=S-(D.z||0),A=E*E+P*P+T*T,A<C&&(V=D,C=A);return V},on:function(y,b){return arguments.length>1?(d.on(y,b),o):d.on(y)}}}function MW(){var e,n,r,o,i,s=Kn(-30),a,l=1,c=1/0,u=.81;function f(v){var w,_=e.length,y=(n===1?NN(e,Vf):n===2?PN(e,Vf,Ex):n===3?MN(e,Vf,Ex,kW):null).visitAfter(p);for(i=v,w=0;w<_;++w)r=e[w],y.visit(g)}function d(){if(e){var v,w=e.length,_;for(a=new Array(w),v=0;v<w;++v)_=e[v],a[_.index]=+s(_,v,e)}}function p(v){var w=0,_,y,b=0,x,S,C,k,N=v.length;if(N){for(x=S=C=k=0;k<N;++k)(_=v[k])&&(y=Math.abs(_.value))&&(w+=_.value,b+=y,x+=y*(_.x||0),S+=y*(_.y||0),C+=y*(_.z||0));w*=Math.sqrt(4/N),v.x=x/b,n>1&&(v.y=S/b),n>2&&(v.z=C/b)}else{_=v,_.x=_.data.x,n>1&&(_.y=_.data.y),n>2&&(_.z=_.data.z);do w+=a[_.data.index];while(_=_.next)}v.value=w}function g(v,w,_,y,b){if(!v.value)return!0;var x=[_,y,b][n-1],S=v.x-r.x,C=n>1?v.y-r.y:0,k=n>2?v.z-r.z:0,N=x-w,E=S*S+C*C+k*k;if(N*N/u<E)return E<c&&(S===0&&(S=Un(o),E+=S*S),n>1&&C===0&&(C=Un(o),E+=C*C),n>2&&k===0&&(k=Un(o),E+=k*k),E<l&&(E=Math.sqrt(l*E)),r.vx+=S*v.value*i/E,n>1&&(r.vy+=C*v.value*i/E),n>2&&(r.vz+=k*v.value*i/E)),!0;if(v.length||E>=c)return;(v.data!==r||v.next)&&(S===0&&(S=Un(o),E+=S*S),n>1&&C===0&&(C=Un(o),E+=C*C),n>2&&k===0&&(k=Un(o),E+=k*k),E<l&&(E=Math.sqrt(l*E)));do v.data!==r&&(N=a[v.data.index]*i/E,r.vx+=S*N,n>1&&(r.vy+=C*N),n>2&&(r.vz+=k*N));while(v=v.next)}return f.initialize=function(v,...w){e=v,o=w.find(_=>typeof _=="function")||Math.random,n=w.find(_=>[1,2,3].includes(_))||2,d()},f.strength=function(v){return arguments.length?(s=typeof v=="function"?v:Kn(+v),d(),f):s},f.distanceMin=function(v){return arguments.length?(l=v*v,f):Math.sqrt(l)},f.distanceMax=function(v){return arguments.length?(c=v*v,f):Math.sqrt(c)},f.theta=function(v){return arguments.length?(u=v*v,f):Math.sqrt(u)},f}function RW(e,n,r,o){var i,s,a=Kn(.1),l,c;typeof e!="function"&&(e=Kn(+e)),n==null&&(n=0),r==null&&(r=0),o==null&&(o=0);function u(d){for(var p=0,g=i.length;p<g;++p){var v=i[p],w=v.x-n||1e-6,_=(v.y||0)-r||1e-6,y=(v.z||0)-o||1e-6,b=Math.sqrt(w*w+_*_+y*y),x=(c[p]-b)*l[p]*d/b;v.vx+=w*x,s>1&&(v.vy+=_*x),s>2&&(v.vz+=y*x)}}function f(){if(i){var d,p=i.length;for(l=new Array(p),c=new Array(p),d=0;d<p;++d)c[d]=+e(i[d],d,i),l[d]=isNaN(c[d])?0:+a(i[d],d,i)}}return u.initialize=function(d,...p){i=d,s=p.find(g=>[1,2,3].includes(g))||2,f()},u.strength=function(d){return arguments.length?(a=typeof d=="function"?d:Kn(+d),f(),u):a},u.radius=function(d){return arguments.length?(e=typeof d=="function"?d:Kn(+d),f(),u):e},u.x=function(d){return arguments.length?(n=+d,u):n},u.y=function(d){return arguments.length?(r=+d,u):r},u.z=function(d){return arguments.length?(o=+d,u):o},u}const{abs:ws,cos:Vn,sin:qo,acos:AW,atan2:bs,sqrt:gr,pow:Bt}=Math;function _s(e){return e<0?-Bt(-e,1/3):Bt(e,1/3)}const RN=Math.PI,Gl=2*RN,yr=RN/2,TW=1e-6,Bf=Number.MAX_SAFE_INTEGER||9007199254740991,Hf=Number.MIN_SAFE_INTEGER||-9007199254740991,IW={x:0,y:0,z:0},ee={Tvalues:[-.06405689286260563,.06405689286260563,-.1911188674736163,.1911188674736163,-.3150426796961634,.3150426796961634,-.4337935076260451,.4337935076260451,-.5454214713888396,.5454214713888396,-.6480936519369755,.6480936519369755,-.7401241915785544,.7401241915785544,-.820001985973903,.820001985973903,-.8864155270044011,.8864155270044011,-.9382745520027328,.9382745520027328,-.9747285559713095,.9747285559713095,-.9951872199970213,.9951872199970213],Cvalues:[.12793819534675216,.12793819534675216,.1258374563468283,.1258374563468283,.12167047292780339,.12167047292780339,.1155056680537256,.1155056680537256,.10744427011596563,.10744427011596563,.09761865210411388,.09761865210411388,.08619016153195327,.08619016153195327,.0733464814110803,.0733464814110803,.05929858491543678,.05929858491543678,.04427743881741981,.04427743881741981,.028531388628933663,.028531388628933663,.0123412297999872,.0123412297999872],arcfn:function(e,n){const r=n(e);let o=r.x*r.x+r.y*r.y;return typeof r.z<"u"&&(o+=r.z*r.z),gr(o)},compute:function(e,n,r){if(e===0)return n[0].t=0,n[0];const o=n.length-1;if(e===1)return n[o].t=1,n[o];const i=1-e;let s=n;if(o===0)return n[0].t=e,n[0];if(o===1){const l={x:i*s[0].x+e*s[1].x,y:i*s[0].y+e*s[1].y,t:e};return r&&(l.z=i*s[0].z+e*s[1].z),l}if(o<4){let l=i*i,c=e*e,u,f,d,p=0;o===2?(s=[s[0],s[1],s[2],IW],u=l,f=i*e*2,d=c):o===3&&(u=l*i,f=l*e*3,d=i*c*3,p=e*c);const g={x:u*s[0].x+f*s[1].x+d*s[2].x+p*s[3].x,y:u*s[0].y+f*s[1].y+d*s[2].y+p*s[3].y,t:e};return r&&(g.z=u*s[0].z+f*s[1].z+d*s[2].z+p*s[3].z),g}const a=JSON.parse(JSON.stringify(n));for(;a.length>1;){for(let l=0;l<a.length-1;l++)a[l]={x:a[l].x+(a[l+1].x-a[l].x)*e,y:a[l].y+(a[l+1].y-a[l].y)*e},typeof a[l].z<"u"&&(a[l].z=a[l].z+(a[l+1].z-a[l].z)*e);a.splice(a.length-1,1)}return a[0].t=e,a[0]},computeWithRatios:function(e,n,r,o){const i=1-e,s=r,a=n;let l=s[0],c=s[1],u=s[2],f=s[3],d;if(l*=i,c*=e,a.length===2)return d=l+c,{x:(l*a[0].x+c*a[1].x)/d,y:(l*a[0].y+c*a[1].y)/d,z:o?(l*a[0].z+c*a[1].z)/d:!1,t:e};if(l*=i,c*=2*i,u*=e*e,a.length===3)return d=l+c+u,{x:(l*a[0].x+c*a[1].x+u*a[2].x)/d,y:(l*a[0].y+c*a[1].y+u*a[2].y)/d,z:o?(l*a[0].z+c*a[1].z+u*a[2].z)/d:!1,t:e};if(l*=i,c*=1.5*i,u*=3*i,f*=e*e*e,a.length===4)return d=l+c+u+f,{x:(l*a[0].x+c*a[1].x+u*a[2].x+f*a[3].x)/d,y:(l*a[0].y+c*a[1].y+u*a[2].y+f*a[3].y)/d,z:o?(l*a[0].z+c*a[1].z+u*a[2].z+f*a[3].z)/d:!1,t:e}},derive:function(e,n){const r=[];for(let o=e,i=o.length,s=i-1;i>1;i--,s--){const a=[];for(let l=0,c;l<s;l++)c={x:s*(o[l+1].x-o[l].x),y:s*(o[l+1].y-o[l].y)},n&&(c.z=s*(o[l+1].z-o[l].z)),a.push(c);r.push(a),o=a}return r},between:function(e,n,r){return n<=e&&e<=r||ee.approximately(e,n)||ee.approximately(e,r)},approximately:function(e,n,r){return ws(e-n)<=(r||TW)},length:function(e){const r=ee.Tvalues.length;let o=0;for(let i=0,s;i<r;i++)s=.5*ee.Tvalues[i]+.5,o+=ee.Cvalues[i]*ee.arcfn(s,e);return .5*o},map:function(e,n,r,o,i){const s=r-n,a=i-o,l=e-n,c=l/s;return o+a*c},lerp:function(e,n,r){const o={x:n.x+e*(r.x-n.x),y:n.y+e*(r.y-n.y)};return n.z!==void 0&&r.z!==void 0&&(o.z=n.z+e*(r.z-n.z)),o},pointToString:function(e){let n=e.x+"/"+e.y;return typeof e.z<"u"&&(n+="/"+e.z),n},pointsToString:function(e){return"["+e.map(ee.pointToString).join(", ")+"]"},copy:function(e){return JSON.parse(JSON.stringify(e))},angle:function(e,n,r){const o=n.x-e.x,i=n.y-e.y,s=r.x-e.x,a=r.y-e.y,l=o*a-i*s,c=o*s+i*a;return bs(l,c)},round:function(e,n){const r=""+e,o=r.indexOf(".");return parseFloat(r.substring(0,o+1+n))},dist:function(e,n){const r=e.x-n.x,o=e.y-n.y;return gr(r*r+o*o)},closest:function(e,n){let r=Bt(2,63),o,i;return e.forEach(function(s,a){i=ee.dist(n,s),i<r&&(r=i,o=a)}),{mdist:r,mpos:o}},abcratio:function(e,n){if(n!==2&&n!==3)return!1;if(typeof e>"u")e=.5;else if(e===0||e===1)return e;const r=Bt(e,n)+Bt(1-e,n),o=r-1;return ws(o/r)},projectionratio:function(e,n){if(n!==2&&n!==3)return!1;if(typeof e>"u")e=.5;else if(e===0||e===1)return e;const r=Bt(1-e,n),o=Bt(e,n)+r;return r/o},lli8:function(e,n,r,o,i,s,a,l){const c=(e*o-n*r)*(i-a)-(e-r)*(i*l-s*a),u=(e*o-n*r)*(s-l)-(n-o)*(i*l-s*a),f=(e-r)*(s-l)-(n-o)*(i-a);return f==0?!1:{x:c/f,y:u/f}},lli4:function(e,n,r,o){const i=e.x,s=e.y,a=n.x,l=n.y,c=r.x,u=r.y,f=o.x,d=o.y;return ee.lli8(i,s,a,l,c,u,f,d)},lli:function(e,n){return ee.lli4(e,e.c,n,n.c)},makeline:function(e,n){return new Pe(e.x,e.y,(e.x+n.x)/2,(e.y+n.y)/2,n.x,n.y)},findbbox:function(e){let n=Bf,r=Bf,o=Hf,i=Hf;return e.forEach(function(s){const a=s.bbox();n>a.x.min&&(n=a.x.min),r>a.y.min&&(r=a.y.min),o<a.x.max&&(o=a.x.max),i<a.y.max&&(i=a.y.max)}),{x:{min:n,mid:(n+o)/2,max:o,size:o-n},y:{min:r,mid:(r+i)/2,max:i,size:i-r}}},shapeintersections:function(e,n,r,o,i){if(!ee.bboxoverlap(n,o))return[];const s=[],a=[e.startcap,e.forward,e.back,e.endcap],l=[r.startcap,r.forward,r.back,r.endcap];return a.forEach(function(c){c.virtual||l.forEach(function(u){if(u.virtual)return;const f=c.intersects(u,i);f.length>0&&(f.c1=c,f.c2=u,f.s1=e,f.s2=r,s.push(f))})}),s},makeshape:function(e,n,r){const o=n.points.length,i=e.points.length,s=ee.makeline(n.points[o-1],e.points[0]),a=ee.makeline(e.points[i-1],n.points[0]),l={startcap:s,forward:e,back:n,endcap:a,bbox:ee.findbbox([s,e,n,a])};return l.intersections=function(c){return ee.shapeintersections(l,l.bbox,c,c.bbox,r)},l},getminmax:function(e,n,r){if(!r)return{min:0,max:0};let o=Bf,i=Hf,s,a;r.indexOf(0)===-1&&(r=[0].concat(r)),r.indexOf(1)===-1&&r.push(1);for(let l=0,c=r.length;l<c;l++)s=r[l],a=e.get(s),a[n]<o&&(o=a[n]),a[n]>i&&(i=a[n]);return{min:o,mid:(o+i)/2,max:i,size:i-o}},align:function(e,n){const r=n.p1.x,o=n.p1.y,i=-bs(n.p2.y-o,n.p2.x-r),s=function(a){return{x:(a.x-r)*Vn(i)-(a.y-o)*qo(i),y:(a.x-r)*qo(i)+(a.y-o)*Vn(i)}};return e.map(s)},roots:function(e,n){n=n||{p1:{x:0,y:0},p2:{x:1,y:0}};const r=e.length-1,o=ee.align(e,n),i=function(N){return 0<=N&&N<=1};if(r===2){const N=o[0].y,E=o[1].y,P=o[2].y,T=N-2*E+P;if(T!==0){const A=-gr(E*E-N*P),D=-N+E,V=-(A+D)/T,j=-(-A+D)/T;return[V,j].filter(i)}else if(E!==P&&T===0)return[(2*E-P)/(2*E-2*P)].filter(i);return[]}const s=o[0].y,a=o[1].y,l=o[2].y,c=o[3].y;let u=-s+3*a-3*l+c,f=3*s-6*a+3*l,d=-3*s+3*a,p=s;if(ee.approximately(u,0)){if(ee.approximately(f,0))return ee.approximately(d,0)?[]:[-p/d].filter(i);const N=gr(d*d-4*f*p),E=2*f;return[(N-d)/E,(-d-N)/E].filter(i)}f/=u,d/=u,p/=u;const g=(3*d-f*f)/3,v=g/3,w=(2*f*f*f-9*f*d+27*p)/27,_=w/2,y=_*_+v*v*v;let b,x,S,C,k;if(y<0){const N=-g/3,E=N*N*N,P=gr(E),T=-w/(2*P),A=T<-1?-1:T>1?1:T,D=AW(A),V=_s(P),j=2*V;return S=j*Vn(D/3)-f/3,C=j*Vn((D+Gl)/3)-f/3,k=j*Vn((D+2*Gl)/3)-f/3,[S,C,k].filter(i)}else{if(y===0)return b=_<0?_s(-_):-_s(_),S=2*b-f/3,C=-b-f/3,[S,C].filter(i);{const N=gr(y);return b=_s(-_+N),x=_s(_+N),[b-x-f/3].filter(i)}}},droots:function(e){if(e.length===3){const n=e[0],r=e[1],o=e[2],i=n-2*r+o;if(i!==0){const s=-gr(r*r-n*o),a=-n+r,l=-(s+a)/i,c=-(-s+a)/i;return[l,c]}else if(r!==o&&i===0)return[(2*r-o)/(2*(r-o))];return[]}if(e.length===2){const n=e[0],r=e[1];return n!==r?[n/(n-r)]:[]}return[]},curvature:function(e,n,r,o,i){let s,a,l,c,u=0,f=0;const d=ee.compute(e,n),p=ee.compute(e,r),g=d.x*d.x+d.y*d.y;if(o?(s=gr(Bt(d.y*p.z-p.y*d.z,2)+Bt(d.z*p.x-p.z*d.x,2)+Bt(d.x*p.y-p.x*d.y,2)),a=Bt(g+d.z*d.z,3/2)):(s=d.x*p.y-d.y*p.x,a=Bt(g,3/2)),s===0||a===0)return{k:0,r:0};if(u=s/a,f=a/s,!i){const v=ee.curvature(e-.001,n,r,o,!0).k,w=ee.curvature(e+.001,n,r,o,!0).k;c=(w-u+(u-v))/2,l=(ws(w-u)+ws(u-v))/2}return{k:u,r:f,dk:c,adk:l}},inflections:function(e){if(e.length<4)return[];const n=ee.align(e,{p1:e[0],p2:e.slice(-1)[0]}),r=n[2].x*n[1].y,o=n[3].x*n[1].y,i=n[1].x*n[2].y,s=n[3].x*n[2].y,a=18*(-3*r+2*o+3*i-s),l=18*(3*r-o-3*i),c=18*(i-r);if(ee.approximately(a,0)){if(!ee.approximately(l,0)){let p=-c/l;if(0<=p&&p<=1)return[p]}return[]}const u=2*a;if(ee.approximately(u,0))return[];const f=l*l-4*a*c;if(f<0)return[];const d=Math.sqrt(f);return[(d-l)/u,-(l+d)/u].filter(function(p){return 0<=p&&p<=1})},bboxoverlap:function(e,n){const r=["x","y"],o=r.length;for(let i=0,s,a,l,c;i<o;i++)if(s=r[i],a=e[s].mid,l=n[s].mid,c=(e[s].size+n[s].size)/2,ws(a-l)>=c)return!1;return!0},expandbox:function(e,n){n.x.min<e.x.min&&(e.x.min=n.x.min),n.y.min<e.y.min&&(e.y.min=n.y.min),n.z&&n.z.min<e.z.min&&(e.z.min=n.z.min),n.x.max>e.x.max&&(e.x.max=n.x.max),n.y.max>e.y.max&&(e.y.max=n.y.max),n.z&&n.z.max>e.z.max&&(e.z.max=n.z.max),e.x.mid=(e.x.min+e.x.max)/2,e.y.mid=(e.y.min+e.y.max)/2,e.z&&(e.z.mid=(e.z.min+e.z.max)/2),e.x.size=e.x.max-e.x.min,e.y.size=e.y.max-e.y.min,e.z&&(e.z.size=e.z.max-e.z.min)},pairiteration:function(e,n,r){const o=e.bbox(),i=n.bbox(),s=1e5,a=r||.5;if(o.x.size+o.y.size<a&&i.x.size+i.y.size<a)return[(s*(e._t1+e._t2)/2|0)/s+"/"+(s*(n._t1+n._t2)/2|0)/s];let l=e.split(.5),c=n.split(.5),u=[{left:l.left,right:c.left},{left:l.left,right:c.right},{left:l.right,right:c.right},{left:l.right,right:c.left}];u=u.filter(function(d){return ee.bboxoverlap(d.left.bbox(),d.right.bbox())});let f=[];return u.length===0||(u.forEach(function(d){f=f.concat(ee.pairiteration(d.left,d.right,a))}),f=f.filter(function(d,p){return f.indexOf(d)===p})),f},getccenter:function(e,n,r){const o=n.x-e.x,i=n.y-e.y,s=r.x-n.x,a=r.y-n.y,l=o*Vn(yr)-i*qo(yr),c=o*qo(yr)+i*Vn(yr),u=s*Vn(yr)-a*qo(yr),f=s*qo(yr)+a*Vn(yr),d=(e.x+n.x)/2,p=(e.y+n.y)/2,g=(n.x+r.x)/2,v=(n.y+r.y)/2,w=d+l,_=p+c,y=g+u,b=v+f,x=ee.lli8(d,p,w,_,g,v,y,b),S=ee.dist(x,e);let C=bs(e.y-x.y,e.x-x.x),k=bs(n.y-x.y,n.x-x.x),N=bs(r.y-x.y,r.x-x.x),E;return C<N?((C>k||k>N)&&(C+=Gl),C>N&&(E=N,N=C,C=E)):N<k&&k<C?(E=N,N=C,C=E):N+=Gl,x.s=C,x.e=N,x.r=S,x},numberSort:function(e,n){return e-n}};class Xs{constructor(n){this.curves=[],this._3d=!1,n&&(this.curves=n,this._3d=this.curves[0]._3d)}valueOf(){return this.toString()}toString(){return"["+this.curves.map(function(n){return ee.pointsToString(n.points)}).join(", ")+"]"}addCurve(n){this.curves.push(n),this._3d=this._3d||n._3d}length(){return this.curves.map(function(n){return n.length()}).reduce(function(n,r){return n+r})}curve(n){return this.curves[n]}bbox(){const n=this.curves;for(var r=n[0].bbox(),o=1;o<n.length;o++)ee.expandbox(r,n[o].bbox());return r}offset(n){const r=[];return this.curves.forEach(function(o){r.push(...o.offset(n))}),new Xs(r)}}const{abs:Ss,min:Px,max:jx,cos:$W,sin:OW,acos:DW,sqrt:Cs}=Math,LW=Math.PI;class Pe{constructor(n){let r=n&&n.forEach?n:Array.from(arguments).slice(),o=!1;if(typeof r[0]=="object"){o=r.length;const g=[];r.forEach(function(v){["x","y","z"].forEach(function(w){typeof v[w]<"u"&&g.push(v[w])})}),r=g}let i=!1;const s=r.length;if(o){if(o>4){if(arguments.length!==1)throw new Error("Only new Bezier(point[]) is accepted for 4th and higher order curves");i=!0}}else if(s!==6&&s!==8&&s!==9&&s!==12&&arguments.length!==1)throw new Error("Only new Bezier(point[]) is accepted for 4th and higher order curves");const a=this._3d=!i&&(s===9||s===12)||n&&n[0]&&typeof n[0].z<"u",l=this.points=[];for(let g=0,v=a?3:2;g<s;g+=v){var c={x:r[g],y:r[g+1]};a&&(c.z=r[g+2]),l.push(c)}const u=this.order=l.length-1,f=this.dims=["x","y"];a&&f.push("z"),this.dimlen=f.length;const d=ee.align(l,{p1:l[0],p2:l[u]}),p=ee.dist(l[0],l[u]);this._linear=d.reduce((g,v)=>g+Ss(v.y),0)<p/50,this._lut=[],this._t1=0,this._t2=1,this.update()}static quadraticFromPoints(n,r,o,i){if(typeof i>"u"&&(i=.5),i===0)return new Pe(r,r,o);if(i===1)return new Pe(n,r,r);const s=Pe.getABC(2,n,r,o,i);return new Pe(n,s.A,o)}static cubicFromPoints(n,r,o,i,s){typeof i>"u"&&(i=.5);const a=Pe.getABC(3,n,r,o,i);typeof s>"u"&&(s=ee.dist(r,a.C));const l=s*(1-i)/i,c=ee.dist(n,o),u=(o.x-n.x)/c,f=(o.y-n.y)/c,d=s*u,p=s*f,g=l*u,v=l*f,w={x:r.x-d,y:r.y-p},_={x:r.x+g,y:r.y+v},y=a.A,b={x:y.x+(w.x-y.x)/(1-i),y:y.y+(w.y-y.y)/(1-i)},x={x:y.x+(_.x-y.x)/i,y:y.y+(_.y-y.y)/i},S={x:n.x+(b.x-n.x)/i,y:n.y+(b.y-n.y)/i},C={x:o.x+(x.x-o.x)/(1-i),y:o.y+(x.y-o.y)/(1-i)};return new Pe(n,S,C,o)}static getUtils(){return ee}getUtils(){return Pe.getUtils()}static get PolyBezier(){return Xs}valueOf(){return this.toString()}toString(){return ee.pointsToString(this.points)}toSVG(){if(this._3d)return!1;const n=this.points,r=n[0].x,o=n[0].y,i=["M",r,o,this.order===2?"Q":"C"];for(let s=1,a=n.length;s<a;s++)i.push(n[s].x),i.push(n[s].y);return i.join(" ")}setRatios(n){if(n.length!==this.points.length)throw new Error("incorrect number of ratio values");this.ratios=n,this._lut=[]}verify(){const n=this.coordDigest();n!==this._print&&(this._print=n,this.update())}coordDigest(){return this.points.map(function(n,r){return""+r+n.x+n.y+(n.z?n.z:0)}).join("")}update(){this._lut=[],this.dpoints=ee.derive(this.points,this._3d),this.computedirection()}computedirection(){const n=this.points,r=ee.angle(n[0],n[this.order],n[1]);this.clockwise=r>0}length(){return ee.length(this.derivative.bind(this))}static getABC(n=2,r,o,i,s=.5){const a=ee.projectionratio(s,n),l=1-a,c={x:a*r.x+l*i.x,y:a*r.y+l*i.y},u=ee.abcratio(s,n);return{A:{x:o.x+(o.x-c.x)/u,y:o.y+(o.y-c.y)/u},B:o,C:c,S:r,E:i}}getABC(n,r){r=r||this.get(n);let o=this.points[0],i=this.points[this.order];return Pe.getABC(this.order,o,r,i,n)}getLUT(n){if(this.verify(),n=n||100,this._lut.length===n+1)return this._lut;this._lut=[],n++,this._lut=[];for(let r=0,o,i;r<n;r++)i=r/(n-1),o=this.compute(i),o.t=i,this._lut.push(o);return this._lut}on(n,r){r=r||5;const o=this.getLUT(),i=[];for(let s=0,a,l=0;s<o.length;s++)a=o[s],ee.dist(a,n)<r&&(i.push(a),l+=s/o.length);return i.length?t/=i.length:!1}project(n){const r=this.getLUT(),o=r.length-1,i=ee.closest(r,n),s=i.mpos,a=(s-1)/o,l=(s+1)/o,c=.1/o;let u=i.mdist,f=a,d=f,p;u+=1;for(let g;f<l+c;f+=c)p=this.compute(f),g=ee.dist(n,p),g<u&&(u=g,d=f);return d=d<0?0:d>1?1:d,p=this.compute(d),p.t=d,p.d=u,p}get(n){return this.compute(n)}point(n){return this.points[n]}compute(n){return this.ratios?ee.computeWithRatios(n,this.points,this.ratios,this._3d):ee.compute(n,this.points,this._3d,this.ratios)}raise(){const n=this.points,r=[n[0]],o=n.length;for(let i=1,s,a;i<o;i++)s=n[i],a=n[i-1],r[i]={x:(o-i)/o*s.x+i/o*a.x,y:(o-i)/o*s.y+i/o*a.y};return r[o]=n[o-1],new Pe(r)}derivative(n){return ee.compute(n,this.dpoints[0],this._3d)}dderivative(n){return ee.compute(n,this.dpoints[1],this._3d)}align(){let n=this.points;return new Pe(ee.align(n,{p1:n[0],p2:n[n.length-1]}))}curvature(n){return ee.curvature(n,this.dpoints[0],this.dpoints[1],this._3d)}inflections(){return ee.inflections(this.points)}normal(n){return this._3d?this.__normal3(n):this.__normal2(n)}__normal2(n){const r=this.derivative(n),o=Cs(r.x*r.x+r.y*r.y);return{t:n,x:-r.y/o,y:r.x/o}}__normal3(n){const r=this.derivative(n),o=this.derivative(n+.01),i=Cs(r.x*r.x+r.y*r.y+r.z*r.z),s=Cs(o.x*o.x+o.y*o.y+o.z*o.z);r.x/=i,r.y/=i,r.z/=i,o.x/=s,o.y/=s,o.z/=s;const a={x:o.y*r.z-o.z*r.y,y:o.z*r.x-o.x*r.z,z:o.x*r.y-o.y*r.x},l=Cs(a.x*a.x+a.y*a.y+a.z*a.z);a.x/=l,a.y/=l,a.z/=l;const c=[a.x*a.x,a.x*a.y-a.z,a.x*a.z+a.y,a.x*a.y+a.z,a.y*a.y,a.y*a.z-a.x,a.x*a.z-a.y,a.y*a.z+a.x,a.z*a.z];return{t:n,x:c[0]*r.x+c[1]*r.y+c[2]*r.z,y:c[3]*r.x+c[4]*r.y+c[5]*r.z,z:c[6]*r.x+c[7]*r.y+c[8]*r.z}}hull(n){let r=this.points,o=[],i=[],s=0;for(i[s++]=r[0],i[s++]=r[1],i[s++]=r[2],this.order===3&&(i[s++]=r[3]);r.length>1;){o=[];for(let a=0,l,c=r.length-1;a<c;a++)l=ee.lerp(n,r[a],r[a+1]),i[s++]=l,o.push(l);r=o}return i}split(n,r){if(n===0&&r)return this.split(r).left;if(r===1)return this.split(n).right;const o=this.hull(n),i={left:this.order===2?new Pe([o[0],o[3],o[5]]):new Pe([o[0],o[4],o[7],o[9]]),right:this.order===2?new Pe([o[5],o[4],o[2]]):new Pe([o[9],o[8],o[6],o[3]]),span:o};return i.left._t1=ee.map(0,0,1,this._t1,this._t2),i.left._t2=ee.map(n,0,1,this._t1,this._t2),i.right._t1=ee.map(n,0,1,this._t1,this._t2),i.right._t2=ee.map(1,0,1,this._t1,this._t2),r?(r=ee.map(r,n,1,0,1),i.right.split(r).left):i}extrema(){const n={};let r=[];return this.dims.forEach((function(o){let i=function(a){return a[o]},s=this.dpoints[0].map(i);n[o]=ee.droots(s),this.order===3&&(s=this.dpoints[1].map(i),n[o]=n[o].concat(ee.droots(s))),n[o]=n[o].filter(function(a){return a>=0&&a<=1}),r=r.concat(n[o].sort(ee.numberSort))}).bind(this)),n.values=r.sort(ee.numberSort).filter(function(o,i){return r.indexOf(o)===i}),n}bbox(){const n=this.extrema(),r={};return this.dims.forEach((function(o){r[o]=ee.getminmax(this,o,n[o])}).bind(this)),r}overlaps(n){const r=this.bbox(),o=n.bbox();return ee.bboxoverlap(r,o)}offset(n,r){if(typeof r<"u"){const o=this.get(n),i=this.normal(n),s={c:o,n:i,x:o.x+i.x*r,y:o.y+i.y*r};return this._3d&&(s.z=o.z+i.z*r),s}if(this._linear){const o=this.normal(0),i=this.points.map(function(s){const a={x:s.x+n*o.x,y:s.y+n*o.y};return s.z&&o.z&&(a.z=s.z+n*o.z),a});return[new Pe(i)]}return this.reduce().map(function(o){return o._linear?o.offset(n)[0]:o.scale(n)})}simple(){if(this.order===3){const i=ee.angle(this.points[0],this.points[3],this.points[1]),s=ee.angle(this.points[0],this.points[3],this.points[2]);if(i>0&&s<0||i<0&&s>0)return!1}const n=this.normal(0),r=this.normal(1);let o=n.x*r.x+n.y*r.y;return this._3d&&(o+=n.z*r.z),Ss(DW(o))<LW/3}reduce(){let n,r=0,o=0,i=.01,s,a=[],l=[],c=this.extrema().values;for(c.indexOf(0)===-1&&(c=[0].concat(c)),c.indexOf(1)===-1&&c.push(1),r=c[0],n=1;n<c.length;n++)o=c[n],s=this.split(r,o),s._t1=r,s._t2=o,a.push(s),r=o;return a.forEach(function(u){for(r=0,o=0;o<=1;)for(o=r+i;o<=1+i;o+=i)if(s=u.split(r,o),!s.simple()){if(o-=i,Ss(r-o)<i)return[];s=u.split(r,o),s._t1=ee.map(r,0,1,u._t1,u._t2),s._t2=ee.map(o,0,1,u._t1,u._t2),l.push(s),r=o;break}r<1&&(s=u.split(r,1),s._t1=ee.map(r,0,1,u._t1,u._t2),s._t2=u._t2,l.push(s))}),l}translate(n,r,o){o=typeof o=="number"?o:r;const i=this.order;let s=this.points.map((a,l)=>(1-l/i)*r+l/i*o);return new Pe(this.points.map((a,l)=>({x:a.x+n.x*s[l],y:a.y+n.y*s[l]})))}scale(n){const r=this.order;let o=!1;if(typeof n=="function"&&(o=n),o&&r===2)return this.raise().scale(o);const i=this.clockwise,s=this.points;if(this._linear)return this.translate(this.normal(0),o?o(0):n,o?o(1):n);const a=o?o(0):n,l=o?o(1):n,c=[this.offset(0,10),this.offset(1,10)],u=[],f=ee.lli4(c[0],c[0].c,c[1],c[1].c);if(!f)throw new Error("cannot scale this curve. Try reducing it first.");return[0,1].forEach(function(d){const p=u[d*r]=ee.copy(s[d*r]);p.x+=(d?l:a)*c[d].n.x,p.y+=(d?l:a)*c[d].n.y}),o?([0,1].forEach(function(d){if(!(r===2&&d)){var p=s[d+1],g={x:p.x-f.x,y:p.y-f.y},v=o?o((d+1)/r):n;o&&!i&&(v=-v);var w=Cs(g.x*g.x+g.y*g.y);g.x/=w,g.y/=w,u[d+1]={x:p.x+v*g.x,y:p.y+v*g.y}}}),new Pe(u)):([0,1].forEach(d=>{if(r===2&&d)return;const p=u[d*r],g=this.derivative(d),v={x:p.x+g.x,y:p.y+g.y};u[d+1]=ee.lli4(p,v,f,s[d+1])}),new Pe(u))}outline(n,r,o,i){if(r=r===void 0?n:r,this._linear){const C=this.normal(0),k=this.points[0],N=this.points[this.points.length-1];let E,P,T;o===void 0&&(o=n,i=r),E={x:k.x+C.x*n,y:k.y+C.y*n},T={x:N.x+C.x*o,y:N.y+C.y*o},P={x:(E.x+T.x)/2,y:(E.y+T.y)/2};const A=[E,P,T];E={x:k.x-C.x*r,y:k.y-C.y*r},T={x:N.x-C.x*i,y:N.y-C.y*i},P={x:(E.x+T.x)/2,y:(E.y+T.y)/2};const D=[T,P,E],V=ee.makeline(D[2],A[0]),j=ee.makeline(A[2],D[0]),L=[V,new Pe(A),j,new Pe(D)];return new Xs(L)}const s=this.reduce(),a=s.length,l=[];let c=[],u,f=0,d=this.length();const p=typeof o<"u"&&typeof i<"u";function g(C,k,N,E,P){return function(T){const A=E/N,D=(E+P)/N,V=k-C;return ee.map(T,0,1,C+A*V,C+D*V)}}s.forEach(function(C){const k=C.length();p?(l.push(C.scale(g(n,o,d,f,k))),c.push(C.scale(g(-r,-i,d,f,k)))):(l.push(C.scale(n)),c.push(C.scale(-r))),f+=k}),c=c.map(function(C){return u=C.points,u[3]?C.points=[u[3],u[2],u[1],u[0]]:C.points=[u[2],u[1],u[0]],C}).reverse();const v=l[0].points[0],w=l[a-1].points[l[a-1].points.length-1],_=c[a-1].points[c[a-1].points.length-1],y=c[0].points[0],b=ee.makeline(_,v),x=ee.makeline(w,y),S=[b].concat(l).concat([x]).concat(c);return new Xs(S)}outlineshapes(n,r,o){r=r||n;const i=this.outline(n,r).curves,s=[];for(let a=1,l=i.length;a<l/2;a++){const c=ee.makeshape(i[a],i[l-a],o);c.startcap.virtual=a>1,c.endcap.virtual=a<l/2-1,s.push(c)}return s}intersects(n,r){return n?n.p1&&n.p2?this.lineIntersects(n):(n instanceof Pe&&(n=n.reduce()),this.curveintersects(this.reduce(),n,r)):this.selfintersects(r)}lineIntersects(n){const r=Px(n.p1.x,n.p2.x),o=Px(n.p1.y,n.p2.y),i=jx(n.p1.x,n.p2.x),s=jx(n.p1.y,n.p2.y);return ee.roots(this.points,n).filter(a=>{var l=this.get(a);return ee.between(l.x,r,i)&&ee.between(l.y,o,s)})}selfintersects(n){const r=this.reduce(),o=r.length-2,i=[];for(let s=0,a,l,c;s<o;s++)l=r.slice(s,s+1),c=r.slice(s+2),a=this.curveintersects(l,c,n),i.push(...a);return i}curveintersects(n,r,o){const i=[];n.forEach(function(a){r.forEach(function(l){a.overlaps(l)&&i.push({left:a,right:l})})});let s=[];return i.forEach(function(a){const l=ee.pairiteration(a.left,a.right,o);l.length>0&&(s=s.concat(l))}),s}arcs(n){return n=n||.5,this._iterate(n,[])}_error(n,r,o,i){const s=(i-o)/4,a=this.get(o+s),l=this.get(i-s),c=ee.dist(n,r),u=ee.dist(n,a),f=ee.dist(n,l);return Ss(u-c)+Ss(f-c)}_iterate(n,r){let o=0,i=1,s;do{s=0,i=1;let a=this.get(o),l,c,u,f,d=!1,p=!1,g,v=i,w=1;do if(p=d,f=u,v=(o+i)/2,l=this.get(v),c=this.get(i),u=ee.getccenter(a,l,c),u.interval={start:o,end:i},d=this._error(u,a,o,i)<=n,g=p&&!d,g||(w=i),d){if(i>=1){if(u.interval.end=w=1,f=u,i>1){let y={x:u.x+u.r*$W(u.e),y:u.y+u.r*OW(u.e)};u.e+=ee.angle({x:u.x,y:u.y},y,this.get(1))}break}i=i+(i-o)/2}else i=v;while(!g&&s++<100);if(s>=100)break;f=f||u,r.push(f),o=w}while(i<1);return r}}function jh(e,n){(n==null||n>e.length)&&(n=e.length);for(var r=0,o=Array(n);r<n;r++)o[r]=e[r];return o}function zW(e){if(Array.isArray(e))return e}function FW(e){if(Array.isArray(e))return jh(e)}function VW(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function BW(e,n){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var o,i,s,a,l=[],c=!0,u=!1;try{if(s=(r=r.call(e)).next,n!==0)for(;!(c=(o=s.call(r)).done)&&(l.push(o.value),l.length!==n);c=!0);}catch(f){u=!0,i=f}finally{try{if(!c&&r.return!=null&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw i}}return l}}function HW(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
398
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function WW(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
399
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function UW(e,n){if(e==null)return{};var r,o,i=GW(e,n);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(o=0;o<s.length;o++)r=s[o],n.includes(r)||{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function GW(e,n){if(e==null)return{};var r={};for(var o in e)if({}.hasOwnProperty.call(e,o)){if(n.includes(o))continue;r[o]=e[o]}return r}function YW(e,n){return zW(e)||BW(e,n)||AN(e,n)||HW()}function XW(e){return FW(e)||VW(e)||AN(e)||WW()}function KW(e,n){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var o=r.call(e,n);if(typeof o!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function qW(e){var n=KW(e,"string");return typeof n=="symbol"?n:n+""}function AN(e,n){if(e){if(typeof e=="string")return jh(e,n);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?jh(e,n):void 0}}var ZW=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,i=(n instanceof Array?n.length?n:[void 0]:[n]).map(function(l){return{keyAccessor:l,isProp:!(l instanceof Function)}}),s=e.reduce(function(l,c){var u=l,f=c;return i.forEach(function(d,p){var g=d.keyAccessor,v=d.isProp,w;if(v){var _=f,y=_[g],b=UW(_,[g].map(qW));w=y,f=b}else w=g(f,p);p+1<i.length?(u.hasOwnProperty(w)||(u[w]={}),u=u[w]):r?(u.hasOwnProperty(w)||(u[w]=[]),u[w].push(f)):u[w]=f}),l},{});r instanceof Function&&function l(c){var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;u===i.length?Object.keys(c).forEach(function(f){return c[f]=r(c[f])}):Object.values(c).forEach(function(f){return l(f,u+1)})}(s);var a=s;return o&&(a=[],function l(c){var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];u.length===i.length?a.push({keys:u,vals:c}):Object.entries(c).forEach(function(f){var d=YW(f,2),p=d[0],g=d[1];return l(g,[].concat(XW(u),[p]))})}(s),n instanceof Array&&n.length===0&&a.length===1&&(a[0].keys=[])),a};function QW(e,n){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(n).domain(e);break}return this}const Mx=Symbol("implicit");function TN(){var e=new Zv,n=[],r=[],o=Mx;function i(s){let a=e.get(s);if(a===void 0){if(o!==Mx)return o;e.set(s,a=n.push(s)-1)}return r[a%r.length]}return i.domain=function(s){if(!arguments.length)return n.slice();n=[],e=new Zv;for(const a of s)e.has(a)||e.set(a,n.push(a)-1);return i},i.range=function(s){return arguments.length?(r=Array.from(s),i):r.slice()},i.unknown=function(s){return arguments.length?(o=s,i):o},i.copy=function(){return TN(n,r).unknown(o)},QW.apply(i,arguments),i}function JW(e){for(var n=e.length/6|0,r=new Array(n),o=0;o<n;)r[o]="#"+e.slice(o*6,++o*6);return r}const eU=JW("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928");function tU(e,n){n===void 0&&(n={});var r=n.insertAt;if(!(typeof document>"u")){var o=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css",r==="top"&&o.firstChild?o.insertBefore(i,o.firstChild):o.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}var nU=`.force-graph-container canvas {
400
- display: block;
401
- user-select: none;
402
- outline: none;
403
- -webkit-tap-highlight-color: transparent;
404
- }
405
-
406
- .force-graph-container .clickable {
407
- cursor: pointer;
408
- }
409
-
410
- .force-graph-container .grabbable {
411
- cursor: move;
412
- cursor: grab;
413
- cursor: -moz-grab;
414
- cursor: -webkit-grab;
415
- }
416
-
417
- .force-graph-container .grabbable:active {
418
- cursor: grabbing;
419
- cursor: -moz-grabbing;
420
- cursor: -webkit-grabbing;
421
- }
422
- `;tU(nU);function Mh(e,n){(n==null||n>e.length)&&(n=e.length);for(var r=0,o=Array(n);r<n;r++)o[r]=e[r];return o}function rU(e){if(Array.isArray(e))return e}function oU(e){if(Array.isArray(e))return Mh(e)}function Rx(e,n,r){if(IN())return Reflect.construct.apply(null,arguments);var o=[null];o.push.apply(o,n);var i=new(e.bind.apply(e,o));return i}function Sa(e,n,r){return(n=uU(n))in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}function IN(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(IN=function(){return!!e})()}function iU(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function sU(e,n){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var o,i,s,a,l=[],c=!0,u=!1;try{if(s=(r=r.call(e)).next,n!==0)for(;!(c=(o=s.call(r)).done)&&(l.push(o.value),l.length!==n);c=!0);}catch(f){u=!0,i=f}finally{try{if(!c&&r.return!=null&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw i}}return l}}function aU(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
423
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function lU(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
424
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ax(e,n){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,o)}return r}function Zo(e){for(var n=1;n<arguments.length;n++){var r=arguments[n]!=null?arguments[n]:{};n%2?Ax(Object(r),!0).forEach(function(o){Sa(e,o,r[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ax(Object(r)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(r,o))})}return e}function Ks(e,n){return rU(e)||sU(e,n)||$N(e,n)||aU()}function Yt(e){return oU(e)||iU(e)||$N(e)||lU()}function cU(e,n){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var o=r.call(e,n);if(typeof o!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}function uU(e){var n=cU(e,"string");return typeof n=="symbol"?n:n+""}function Rh(e){"@babel/helpers - typeof";return Rh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Rh(e)}function $N(e,n){if(e){if(typeof e=="string")return Mh(e,n);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Mh(e,n):void 0}}var dU=TN(eU);function Tx(e,n,r){!n||typeof r!="string"||e.filter(function(o){return!o[r]}).forEach(function(o){o[r]=dU(n(o))})}function fU(e,n){var r=e.nodes,o=e.links,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s=i.nodeFilter,a=s===void 0?function(){return!0}:s,l=i.onLoopError,c=l===void 0?function(g){throw"Invalid DAG structure! Found cycle in node path: ".concat(g.join(" -> "),".")}:l,u={};r.forEach(function(g){return u[n(g)]={data:g,out:[],depth:-1,skip:!a(g)}}),o.forEach(function(g){var v=g.source,w=g.target,_=S(v),y=S(w);if(!u.hasOwnProperty(_))throw"Missing source node with id: ".concat(_);if(!u.hasOwnProperty(y))throw"Missing target node with id: ".concat(y);var b=u[_],x=u[y];b.out.push(x);function S(C){return Rh(C)==="object"?n(C):C}});var f=[];p(Object.values(u));var d=Object.assign.apply(Object,[{}].concat(Yt(Object.entries(u).filter(function(g){var v=Ks(g,2),w=v[1];return!w.skip}).map(function(g){var v=Ks(g,2),w=v[0],_=v[1];return Sa({},w,_.depth)}))));return d;function p(g){for(var v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],w=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,_=function(){var S=g[y];if(v.indexOf(S)!==-1){var C=[].concat(Yt(v.slice(v.indexOf(S))),[S]).map(function(k){return n(k.data)});return f.some(function(k){return k.length===C.length&&k.every(function(N,E){return N===C[E]})})||(f.push(C),c(C)),1}w>S.depth&&(S.depth=w,p(S.out,[].concat(Yt(v),[S]),w+(S.skip?0:1)))},y=0,b=g.length;y<b;y++)_()}}var pU=2,rt=function(n,r){return r.onNeedsRedraw&&r.onNeedsRedraw()},Ix=function(n,r){if(!r.isShadow){var o=be(r.linkDirectionalParticles);r.graphData.links.forEach(function(i){var s=Math.round(Math.abs(o(i)));s?i.__photons=Yt(Array(s)).map(function(){return{}}):delete i.__photons})}},ku=Lg({props:{graphData:{default:{nodes:[],links:[]},onChange:function(n,r){r.engineRunning=!1,Ix(n,r)}},dagMode:{onChange:function(n,r){!n&&(r.graphData.nodes||[]).forEach(function(o){return o.fx=o.fy=void 0})}},dagLevelDistance:{},dagNodeFilter:{default:function(n){return!0}},onDagError:{triggerUpdate:!1},nodeRelSize:{default:4,triggerUpdate:!1,onChange:rt},nodeId:{default:"id"},nodeVal:{default:"val",triggerUpdate:!1,onChange:rt},nodeColor:{default:"color",triggerUpdate:!1,onChange:rt},nodeAutoColorBy:{},nodeCanvasObject:{triggerUpdate:!1,onChange:rt},nodeCanvasObjectMode:{default:function(){return"replace"},triggerUpdate:!1,onChange:rt},nodeVisibility:{default:!0,triggerUpdate:!1,onChange:rt},linkSource:{default:"source"},linkTarget:{default:"target"},linkVisibility:{default:!0,triggerUpdate:!1,onChange:rt},linkColor:{default:"color",triggerUpdate:!1,onChange:rt},linkAutoColorBy:{},linkLineDash:{triggerUpdate:!1,onChange:rt},linkWidth:{default:1,triggerUpdate:!1,onChange:rt},linkCurvature:{default:0,triggerUpdate:!1,onChange:rt},linkCanvasObject:{triggerUpdate:!1,onChange:rt},linkCanvasObjectMode:{default:function(){return"replace"},triggerUpdate:!1,onChange:rt},linkDirectionalArrowLength:{default:0,triggerUpdate:!1,onChange:rt},linkDirectionalArrowColor:{triggerUpdate:!1,onChange:rt},linkDirectionalArrowRelPos:{default:.5,triggerUpdate:!1,onChange:rt},linkDirectionalParticles:{default:0,triggerUpdate:!1,onChange:Ix},linkDirectionalParticleSpeed:{default:.01,triggerUpdate:!1},linkDirectionalParticleOffset:{default:0,triggerUpdate:!1},linkDirectionalParticleWidth:{default:4,triggerUpdate:!1},linkDirectionalParticleColor:{triggerUpdate:!1},linkDirectionalParticleCanvasObject:{triggerUpdate:!1},globalScale:{default:1,triggerUpdate:!1},d3AlphaMin:{default:0,triggerUpdate:!1},d3AlphaDecay:{default:.0228,triggerUpdate:!1,onChange:function(n,r){r.forceLayout.alphaDecay(n)}},d3AlphaTarget:{default:0,triggerUpdate:!1,onChange:function(n,r){r.forceLayout.alphaTarget(n)}},d3VelocityDecay:{default:.4,triggerUpdate:!1,onChange:function(n,r){r.forceLayout.velocityDecay(n)}},warmupTicks:{default:0,triggerUpdate:!1},cooldownTicks:{default:1/0,triggerUpdate:!1},cooldownTime:{default:15e3,triggerUpdate:!1},onUpdate:{default:function(){},triggerUpdate:!1},onFinishUpdate:{default:function(){},triggerUpdate:!1},onEngineTick:{default:function(){},triggerUpdate:!1},onEngineStop:{default:function(){},triggerUpdate:!1},onNeedsRedraw:{triggerUpdate:!1},isShadow:{default:!1,triggerUpdate:!1}},methods:{d3Force:function(n,r,o){return o===void 0?n.forceLayout.force(r):(n.forceLayout.force(r,o),this)},d3ReheatSimulation:function(n){return n.forceLayout.alpha(1),this.resetCountdown(),this},resetCountdown:function(n){return n.cntTicks=0,n.startTickTime=new Date,n.engineRunning=!0,this},isEngineRunning:function(n){return!!n.engineRunning},tickFrame:function(n){return!n.isShadow&&r(),i(),!n.isShadow&&s(),!n.isShadow&&a(),o(),this;function r(){n.engineRunning&&(++n.cntTicks>n.cooldownTicks||new Date-n.startTickTime>n.cooldownTime||n.d3AlphaMin>0&&n.forceLayout.alpha()<n.d3AlphaMin?(n.engineRunning=!1,n.onEngineStop()):(n.forceLayout.tick(),n.onEngineTick()))}function o(){var l=be(n.nodeVisibility),c=be(n.nodeVal),u=be(n.nodeColor),f=be(n.nodeCanvasObjectMode),d=n.ctx,p=n.isShadow/n.globalScale,g=n.graphData.nodes.filter(l);d.save(),g.forEach(function(v){var w=f(v);if(n.nodeCanvasObject&&(w==="before"||w==="replace")&&(n.nodeCanvasObject(v,d,n.globalScale),w==="replace")){d.restore();return}var _=Math.sqrt(Math.max(0,c(v)||1))*n.nodeRelSize+p;d.beginPath(),d.arc(v.x,v.y,_,0,2*Math.PI,!1),d.fillStyle=u(v)||"rgba(31, 120, 180, 0.92)",d.fill(),n.nodeCanvasObject&&w==="after"&&n.nodeCanvasObject(v,n.ctx,n.globalScale)}),d.restore()}function i(){var l=be(n.linkVisibility),c=be(n.linkColor),u=be(n.linkWidth),f=be(n.linkLineDash),d=be(n.linkCurvature),p=be(n.linkCanvasObjectMode),g=n.ctx,v=n.isShadow*2,w=n.graphData.links.filter(l);w.forEach(k);var _=[],y=[],b=w;if(n.linkCanvasObject){var x=[],S=[];w.forEach(function(N){return({before:_,after:y,replace:x}[p(N)]||S).push(N)}),b=[].concat(Yt(_),y,S),_=_.concat(x)}g.save(),_.forEach(function(N){return n.linkCanvasObject(N,g,n.globalScale)}),g.restore();var C=ZW(b,[c,u,f]);g.save(),Object.entries(C).forEach(function(N){var E=Ks(N,2),P=E[0],T=E[1],A=!P||P==="undefined"?"rgba(0,0,0,0.15)":P;Object.entries(T).forEach(function(D){var V=Ks(D,2),j=V[0],L=V[1],I=(j||1)/n.globalScale+v;Object.entries(L).forEach(function(z){var M=Ks(z,2);M[0];var R=M[1],O=f(R[0]);g.beginPath(),R.forEach(function(W){var $=W.source,X=W.target;if(!(!$||!X||!$.hasOwnProperty("x")||!X.hasOwnProperty("x"))){g.moveTo($.x,$.y);var F=W.__controlPoints;F?g[F.length===2?"quadraticCurveTo":"bezierCurveTo"].apply(g,Yt(F).concat([X.x,X.y])):g.lineTo(X.x,X.y)}}),g.strokeStyle=A,g.lineWidth=I,g.setLineDash(O||[]),g.stroke()})})}),g.restore(),g.save(),y.forEach(function(N){return n.linkCanvasObject(N,g,n.globalScale)}),g.restore();function k(N){var E=d(N);if(!E){N.__controlPoints=null;return}var P=N.source,T=N.target;if(!(!P||!T||!P.hasOwnProperty("x")||!T.hasOwnProperty("x"))){var A=Math.sqrt(Math.pow(T.x-P.x,2)+Math.pow(T.y-P.y,2));if(A>0){var D=Math.atan2(T.y-P.y,T.x-P.x),V=A*E,j={x:(P.x+T.x)/2+V*Math.cos(D-Math.PI/2),y:(P.y+T.y)/2+V*Math.sin(D-Math.PI/2)};N.__controlPoints=[j.x,j.y]}else{var L=E*70;N.__controlPoints=[T.x,T.y-L,T.x+L,T.y]}}}}function s(){var l=1.6,c=.2,u=be(n.linkDirectionalArrowLength),f=be(n.linkDirectionalArrowRelPos),d=be(n.linkVisibility),p=be(n.linkDirectionalArrowColor||n.linkColor),g=be(n.nodeVal),v=n.ctx;v.save(),n.graphData.links.filter(d).forEach(function(w){var _=u(w);if(!(!_||_<0)){var y=w.source,b=w.target;if(!(!y||!b||!y.hasOwnProperty("x")||!b.hasOwnProperty("x"))){var x=Math.sqrt(Math.max(0,g(y)||1))*n.nodeRelSize,S=Math.sqrt(Math.max(0,g(b)||1))*n.nodeRelSize,C=Math.min(1,Math.max(0,f(w))),k=p(w)||"rgba(0,0,0,0.28)",N=_/l/2,E=w.__controlPoints&&Rx(Pe,[y.x,y.y].concat(Yt(w.__controlPoints),[b.x,b.y])),P=E?function(I){return E.get(I)}:function(I){return{x:y.x+(b.x-y.x)*I||0,y:y.y+(b.y-y.y)*I||0}},T=E?E.length():Math.sqrt(Math.pow(b.x-y.x,2)+Math.pow(b.y-y.y,2)),A=x+_+(T-x-S-_)*C,D=P(A/T),V=P((A-_)/T),j=P((A-_*(1-c))/T),L=Math.atan2(D.y-V.y,D.x-V.x)-Math.PI/2;v.beginPath(),v.moveTo(D.x,D.y),v.lineTo(V.x+N*Math.cos(L),V.y+N*Math.sin(L)),v.lineTo(j.x,j.y),v.lineTo(V.x-N*Math.cos(L),V.y-N*Math.sin(L)),v.fillStyle=k,v.fill()}}}),v.restore()}function a(){var l=be(n.linkDirectionalParticles),c=be(n.linkDirectionalParticleSpeed),u=be(n.linkDirectionalParticleOffset),f=be(n.linkDirectionalParticleWidth),d=be(n.linkVisibility),p=be(n.linkDirectionalParticleColor||n.linkColor),g=n.ctx;g.save(),n.graphData.links.filter(d).forEach(function(v){var w=l(v);if(!(!v.hasOwnProperty("__photons")||!v.__photons.length)){var _=v.source,y=v.target;if(!(!_||!y||!_.hasOwnProperty("x")||!y.hasOwnProperty("x"))){var b=c(v),x=Math.abs(u(v)),S=v.__photons||[],C=Math.max(0,f(v)/2)/Math.sqrt(n.globalScale),k=p(v)||"rgba(0,0,0,0.28)";g.fillStyle=k;var N=v.__controlPoints?Rx(Pe,[_.x,_.y].concat(Yt(v.__controlPoints),[y.x,y.y])):null,E=0,P=!1;S.forEach(function(T){var A=!!T.__singleHop;if(T.hasOwnProperty("__progressRatio")||(T.__progressRatio=A?0:(E+x)/w),!A&&E++,T.__progressRatio+=b,T.__progressRatio>=1)if(!A)T.__progressRatio=T.__progressRatio%1;else{P=!0;return}var D=T.__progressRatio,V=N?N.get(D):{x:_.x+(y.x-_.x)*D||0,y:_.y+(y.y-_.y)*D||0};n.linkDirectionalParticleCanvasObject?n.linkDirectionalParticleCanvasObject(V.x,V.y,v,g,n.globalScale):(g.beginPath(),g.arc(V.x,V.y,C,0,2*Math.PI,!1),g.fill())}),P&&(v.__photons=v.__photons.filter(function(T){return!T.__singleHop||T.__progressRatio<=1}))}}}),g.restore()}},emitParticle:function(n,r){return r&&(!r.__photons&&(r.__photons=[]),r.__photons.push({__singleHop:!0})),this}},stateInit:function(){return{forceLayout:jW().force("link",bW()).force("charge",MW()).force("center",SH()).force("dagRadial",null).stop(),engineRunning:!1}},init:function(n,r){r.ctx=n},update:function(n,r){n.engineRunning=!1,n.onUpdate(),n.nodeAutoColorBy!==null&&Tx(n.graphData.nodes,be(n.nodeAutoColorBy),n.nodeColor),n.linkAutoColorBy!==null&&Tx(n.graphData.links,be(n.linkAutoColorBy),n.linkColor),n.graphData.links.forEach(function(p){p.source=p[n.linkSource],p.target=p[n.linkTarget]}),n.forceLayout.stop().alpha(1).nodes(n.graphData.nodes);var o=n.forceLayout.force("link");o&&o.id(function(p){return p[n.nodeId]}).links(n.graphData.links);var i=n.dagMode&&fU(n.graphData,function(p){return p[n.nodeId]},{nodeFilter:n.dagNodeFilter,onLoopError:n.onDagError||void 0}),s=Math.max.apply(Math,Yt(Object.values(i||[]))),a=n.dagLevelDistance||n.graphData.nodes.length/(s||1)*pU*(["radialin","radialout"].indexOf(n.dagMode)!==-1?.7:1);if(["lr","rl","td","bu"].includes(r.dagMode)){var l=["lr","rl"].includes(r.dagMode)?"fx":"fy";n.graphData.nodes.filter(n.dagNodeFilter).forEach(function(p){return delete p[l]})}if(["lr","rl","td","bu"].includes(n.dagMode)){var c=["rl","bu"].includes(n.dagMode),u=function(g){return(i[g[n.nodeId]]-s/2)*a*(c?-1:1)},f=["lr","rl"].includes(n.dagMode)?"fx":"fy";n.graphData.nodes.filter(n.dagNodeFilter).forEach(function(p){return p[f]=u(p)})}n.forceLayout.force("dagRadial",["radialin","radialout"].indexOf(n.dagMode)!==-1?RW(function(p){var g=i[p[n.nodeId]]||-1;return(n.dagMode==="radialin"?s-g:g)*a}).strength(function(p){return n.dagNodeFilter(p)?1:0}):null);for(var d=0;d<n.warmupTicks&&!(n.d3AlphaMin>0&&n.forceLayout.alpha()<n.d3AlphaMin);d++)n.forceLayout.tick();this.resetCountdown(),n.onFinishUpdate()}});function ON(e,n){var r=e instanceof Array?e:[e],o=new n;return o._destructor&&o._destructor(),{linkProp:function(s){return{default:o[s](),onChange:function(l,c){r.forEach(function(u){return c[u][s](l)})},triggerUpdate:!1}},linkMethod:function(s){return function(a){for(var l=arguments.length,c=new Array(l>1?l-1:0),u=1;u<l;u++)c[u-1]=arguments[u];var f=[];return r.forEach(function(d){var p=a[d],g=p[s].apply(p,c);g!==p&&f.push(g)}),f.length?f[0]:this}}}}var hU=800,mU=4,gU=5,DN=ON("forceGraph",ku),yU=ON(["forceGraph","shadowGraph"],ku),vU=Object.assign.apply(Object,Yt(["nodeColor","nodeAutoColorBy","nodeCanvasObject","nodeCanvasObjectMode","linkColor","linkAutoColorBy","linkLineDash","linkWidth","linkCanvasObject","linkCanvasObjectMode","linkDirectionalArrowLength","linkDirectionalArrowColor","linkDirectionalArrowRelPos","linkDirectionalParticles","linkDirectionalParticleSpeed","linkDirectionalParticleOffset","linkDirectionalParticleWidth","linkDirectionalParticleColor","linkDirectionalParticleCanvasObject","dagMode","dagLevelDistance","dagNodeFilter","onDagError","d3AlphaMin","d3AlphaDecay","d3VelocityDecay","warmupTicks","cooldownTicks","cooldownTime","onEngineTick","onEngineStop"].map(function(e){return Sa({},e,DN.linkProp(e))})).concat(Yt(["nodeRelSize","nodeId","nodeVal","nodeVisibility","linkSource","linkTarget","linkVisibility","linkCurvature"].map(function(e){return Sa({},e,yU.linkProp(e))})))),xU=Object.assign.apply(Object,Yt(["d3Force","d3ReheatSimulation","emitParticle"].map(function(e){return Sa({},e,DN.linkMethod(e))})));function Wf(e){if(e.canvas){var n=e.canvas.width,r=e.canvas.height;n===300&&r===150&&(n=r=0);var o=window.devicePixelRatio;n/=o,r/=o,[e.canvas,e.shadowCanvas].forEach(function(s){s.style.width="".concat(e.width,"px"),s.style.height="".concat(e.height,"px"),s.width=e.width*o,s.height=e.height*o,!n&&!r&&s.getContext("2d").scale(o,o)});var i=on(e.canvas).k;e.zoom.translateBy(e.zoom.__baseElem,(e.width-n)/2/i,(e.height-r)/2/i),e.needsRedraw=!0}}function LN(e){var n=window.devicePixelRatio;e.setTransform(n,0,0,n,0,0)}function $x(e,n,r){e.save(),LN(e),e.clearRect(0,0,n,r),e.restore()}var wU=Lg({props:Zo({width:{default:window.innerWidth,onChange:function(n,r){return Wf(r)},triggerUpdate:!1},height:{default:window.innerHeight,onChange:function(n,r){return Wf(r)},triggerUpdate:!1},graphData:{default:{nodes:[],links:[]},onChange:function(n,r){[n.nodes,n.links].every(function(i){return(i||[]).every(function(s){return!s.hasOwnProperty("__indexColor")})})&&r.colorTracker.reset(),[{type:"Node",objs:n.nodes},{type:"Link",objs:n.links}].forEach(o),r.forceGraph.graphData(n),r.shadowGraph.graphData(n);function o(i){var s=i.type,a=i.objs;a.filter(function(l){if(!l.hasOwnProperty("__indexColor"))return!0;var c=r.colorTracker.lookup(l.__indexColor);return!c||!c.hasOwnProperty("d")||c.d!==l}).forEach(function(l){l.__indexColor=r.colorTracker.register({type:s,d:l})})}},triggerUpdate:!1},backgroundColor:{onChange:function(n,r){r.canvas&&n&&(r.canvas.style.background=n)},triggerUpdate:!1},nodeLabel:{default:"name",triggerUpdate:!1},nodePointerAreaPaint:{onChange:function(n,r){r.shadowGraph.nodeCanvasObject(n?function(o,i,s){return n(o,o.__indexColor,i,s)}:null),r.flushShadowCanvas&&r.flushShadowCanvas()},triggerUpdate:!1},linkPointerAreaPaint:{onChange:function(n,r){r.shadowGraph.linkCanvasObject(n?function(o,i,s){return n(o,o.__indexColor,i,s)}:null),r.flushShadowCanvas&&r.flushShadowCanvas()},triggerUpdate:!1},linkLabel:{default:"name",triggerUpdate:!1},linkHoverPrecision:{default:4,triggerUpdate:!1},minZoom:{default:.01,onChange:function(n,r){r.zoom.scaleExtent([n,r.zoom.scaleExtent()[1]])},triggerUpdate:!1},maxZoom:{default:1e3,onChange:function(n,r){r.zoom.scaleExtent([r.zoom.scaleExtent()[0],n])},triggerUpdate:!1},enableNodeDrag:{default:!0,triggerUpdate:!1},enableZoomInteraction:{default:!0,triggerUpdate:!1},enablePanInteraction:{default:!0,triggerUpdate:!1},enableZoomPanInteraction:{default:!0,triggerUpdate:!1},enablePointerInteraction:{default:!0,onChange:function(n,r){r.hoverObj=null},triggerUpdate:!1},autoPauseRedraw:{default:!0,triggerUpdate:!1},onNodeDrag:{default:function(){},triggerUpdate:!1},onNodeDragEnd:{default:function(){},triggerUpdate:!1},onNodeClick:{triggerUpdate:!1},onNodeRightClick:{triggerUpdate:!1},onNodeHover:{triggerUpdate:!1},onLinkClick:{triggerUpdate:!1},onLinkRightClick:{triggerUpdate:!1},onLinkHover:{triggerUpdate:!1},onBackgroundClick:{triggerUpdate:!1},onBackgroundRightClick:{triggerUpdate:!1},showPointerCursor:{default:!0,triggerUpdate:!1},onZoom:{triggerUpdate:!1},onZoomEnd:{triggerUpdate:!1},onRenderFramePre:{triggerUpdate:!1},onRenderFramePost:{triggerUpdate:!1}},vU),aliases:{stopAnimation:"pauseAnimation"},methods:Zo({graph2ScreenCoords:function(n,r,o){var i=on(n.canvas);return{x:r*i.k+i.x,y:o*i.k+i.y}},screen2GraphCoords:function(n,r,o){var i=on(n.canvas);return{x:(r-i.x)/i.k,y:(o-i.y)/i.k}},centerAt:function(n,r,o,i){if(!n.canvas)return null;if(r!==void 0||o!==void 0){var s=Object.assign({},r!==void 0?{x:r}:{},o!==void 0?{y:o}:{});return i?n.tweenGroup.add(new ox(a()).to(s,i).easing(bo.Quadratic.Out).onUpdate(l).onComplete(function(){n.tweenGroup.remove(this)}).start()):l(s),this}return a();function a(){var c=on(n.canvas);return{x:(n.width/2-c.x)/c.k,y:(n.height/2-c.y)/c.k}}function l(c){var u=c.x,f=c.y;n.zoom.translateTo(n.zoom.__baseElem,u===void 0?a().x:u,f===void 0?a().y:f),n.needsRedraw=!0}},zoom:function(n,r,o){if(!n.canvas)return null;if(r!==void 0)return o?n.tweenGroup.add(new ox({k:i()}).to({k:r},o).easing(bo.Quadratic.Out).onUpdate(function(a){var l=a.k;return s(l)}).onComplete(function(){n.tweenGroup.remove(this)}).start()):s(r),this;return i();function i(){return on(n.canvas).k}function s(a){n.zoom.scaleTo(n.zoom.__baseElem,a),n.needsRedraw=!0}},zoomToFit:function(n){for(var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:10,i=arguments.length,s=new Array(i>3?i-3:0),a=3;a<i;a++)s[a-3]=arguments[a];var l=this.getGraphBbox.apply(this,s);if(l){var c={x:(l.x[0]+l.x[1])/2,y:(l.y[0]+l.y[1])/2},u=Math.max(1e-12,Math.min(1e12,(n.width-o*2)/(l.x[1]-l.x[0]),(n.height-o*2)/(l.y[1]-l.y[0])));this.centerAt(c.x,c.y,r),this.zoom(u,r)}return this},getGraphBbox:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:function(){return!0},o=be(n.nodeVal),i=function(l){return Math.sqrt(Math.max(0,o(l)||1))*n.nodeRelSize},s=n.graphData.nodes.filter(r).map(function(a){return{x:a.x,y:a.y,r:i(a)}});return s.length?{x:[ex(s,function(a){return a.x-a.r}),Jv(s,function(a){return a.x+a.r})],y:[ex(s,function(a){return a.y-a.r}),Jv(s,function(a){return a.y+a.r})]}:null},pauseAnimation:function(n){return n.animationFrameRequestId&&(cancelAnimationFrame(n.animationFrameRequestId),n.animationFrameRequestId=null),this},resumeAnimation:function(n){return n.animationFrameRequestId||this._animationCycle(),this},_destructor:function(){this.pauseAnimation(),this.graphData({nodes:[],links:[]})}},xU),stateInit:function(){return{lastSetZoom:1,zoom:Dg(),forceGraph:new ku,shadowGraph:new ku().cooldownTicks(0).nodeColor("__indexColor").linkColor("__indexColor").isShadow(!0),colorTracker:new eH,tweenGroup:new aN}},init:function(n,r){var o=this;n.innerHTML="";var i=document.createElement("div");i.classList.add("force-graph-container"),i.style.position="relative",n.appendChild(i),r.canvas=document.createElement("canvas"),r.backgroundColor&&(r.canvas.style.background=r.backgroundColor),i.appendChild(r.canvas),r.shadowCanvas=document.createElement("canvas");var s=r.canvas.getContext("2d"),a=r.shadowCanvas.getContext("2d",{willReadFrequently:!0}),l={x:-1e12,y:-1e12},c=function(){var d=null,p=window.devicePixelRatio,g=l.x>0&&l.y>0?a.getImageData(l.x*p,l.y*p,1,1):null;return g&&(d=r.colorTracker.lookup(g.data)),d};st(r.canvas).call(Mg().subject(function(){if(!r.enableNodeDrag)return null;var f=c();return f&&f.type==="Node"?f.d:null}).on("start",function(f){var d=f.subject;d.__initialDragPos={x:d.x,y:d.y,fx:d.fx,fy:d.fy},f.active||(d.fx=d.x,d.fy=d.y),r.canvas.classList.add("grabbable")}).on("drag",function(f){var d=f.subject,p=d.__initialDragPos,g=f,v=on(r.canvas).k,w={x:p.x+(g.x-p.x)/v-d.x,y:p.y+(g.y-p.y)/v-d.y};["x","y"].forEach(function(_){return d["f".concat(_)]=d[_]=p[_]+(g[_]-p[_])/v}),!(!d.__dragged&&gU>=Math.sqrt(IV(["x","y"].map(function(_){return Math.pow(f[_]-p[_],2)}))))&&(r.forceGraph.d3AlphaTarget(.3).resetCountdown(),r.isPointerDragging=!0,d.__dragged=!0,r.onNodeDrag(d,w))}).on("end",function(f){var d=f.subject,p=d.__initialDragPos,g={x:d.x-p.x,y:d.y-p.y};p.fx===void 0&&(d.fx=void 0),p.fy===void 0&&(d.fy=void 0),delete d.__initialDragPos,r.forceGraph.d3AlphaTarget()&&r.forceGraph.d3AlphaTarget(0).resetCountdown(),r.canvas.classList.remove("grabbable"),r.isPointerDragging=!1,d.__dragged&&(delete d.__dragged,r.onNodeDragEnd(d,g))})),r.zoom(r.zoom.__baseElem=st(r.canvas)),r.zoom.__baseElem.on("dblclick.zoom",null),r.zoom.filter(function(f){return!f.button&&r.enableZoomPanInteraction&&(f.type!=="wheel"||be(r.enableZoomInteraction)(f))&&(f.type==="wheel"||be(r.enablePanInteraction)(f))}).on("zoom",function(f){var d=f.transform;[s,a].forEach(function(p){LN(p),p.translate(d.x,d.y),p.scale(d.k,d.k)}),r.isPointerDragging=!0,r.onZoom&&r.onZoom(Zo(Zo({},d),o.centerAt())),r.needsRedraw=!0}).on("end",function(f){r.isPointerDragging=!1,r.onZoomEnd&&r.onZoomEnd(Zo(Zo({},f.transform),o.centerAt()))}),Wf(r),r.forceGraph.onNeedsRedraw(function(){return r.needsRedraw=!0}).onFinishUpdate(function(){on(r.canvas).k===r.lastSetZoom&&r.graphData.nodes.length&&(r.zoom.scaleTo(r.zoom.__baseElem,r.lastSetZoom=mU/Math.cbrt(r.graphData.nodes.length)),r.needsRedraw=!0)}),r.tooltip=new _H(i),["pointermove","pointerdown"].forEach(function(f){return i.addEventListener(f,function(d){f==="pointerdown"&&(r.isPointerPressed=!0,r.pointerDownEvent=d),!r.isPointerDragging&&d.type==="pointermove"&&r.onBackgroundClick&&(d.pressure>0||r.isPointerPressed)&&(d.pointerType==="mouse"||d.movementX===void 0||[d.movementX,d.movementY].some(function(v){return Math.abs(v)>1}))&&(r.isPointerDragging=!0);var p=g(i);l.x=d.pageX-p.left,l.y=d.pageY-p.top;function g(v){var w=v.getBoundingClientRect(),_=window.pageXOffset||document.documentElement.scrollLeft,y=window.pageYOffset||document.documentElement.scrollTop;return{top:w.top+y,left:w.left+_}}},{passive:!0})}),i.addEventListener("pointerup",function(f){if(r.isPointerPressed){if(r.isPointerPressed=!1,r.isPointerDragging){r.isPointerDragging=!1;return}var d=[f,r.pointerDownEvent];requestAnimationFrame(function(){if(f.button===0)if(r.hoverObj){var p=r["on".concat(r.hoverObj.type,"Click")];p&&p.apply(void 0,[r.hoverObj.d].concat(d))}else r.onBackgroundClick&&r.onBackgroundClick.apply(r,d);if(f.button===2)if(r.hoverObj){var g=r["on".concat(r.hoverObj.type,"RightClick")];g&&g.apply(void 0,[r.hoverObj.d].concat(d))}else r.onBackgroundRightClick&&r.onBackgroundRightClick.apply(r,d)})}},{passive:!0}),i.addEventListener("contextmenu",function(f){return!r.onBackgroundRightClick&&!r.onNodeRightClick&&!r.onLinkRightClick?!0:(f.preventDefault(),!1)}),r.forceGraph(s),r.shadowGraph(a);var u=aB(function(){$x(a,r.width,r.height),r.shadowGraph.linkWidth(function(d){return be(r.linkWidth)(d)+r.linkHoverPrecision});var f=on(r.canvas);r.shadowGraph.globalScale(f.k).tickFrame()},hU);r.flushShadowCanvas=u.flush,(this._animationCycle=function f(){var d=!r.autoPauseRedraw||!!r.needsRedraw||r.forceGraph.isEngineRunning()||r.graphData.links.some(function(x){return x.__photons&&x.__photons.length});if(r.needsRedraw=!1,r.enablePointerInteraction){var p=r.isPointerDragging?null:c();if(p!==r.hoverObj){var g=r.hoverObj,v=g?g.type:null,w=p?p.type:null;if(v&&v!==w){var _=r["on".concat(v,"Hover")];_&&_(null,g.d)}if(w){var y=r["on".concat(w,"Hover")];y&&y(p.d,v===w?g.d:null)}r.tooltip.content(p&&be(r["".concat(p.type.toLowerCase(),"Label")])(p.d)||null),r.canvas.classList[(p&&r["on".concat(w,"Click")]||!p&&r.onBackgroundClick)&&be(r.showPointerCursor)(p==null?void 0:p.d)?"add":"remove"]("clickable"),r.hoverObj=p}d&&u()}if(d){$x(s,r.width,r.height);var b=on(r.canvas).k;r.onRenderFramePre&&r.onRenderFramePre(s,b),r.forceGraph.globalScale(b).tickFrame(),r.onRenderFramePost&&r.onRenderFramePost(s,b)}r.tweenGroup.update(),r.animationFrameRequestId=requestAnimationFrame(f)})()},update:function(n){}}),zN={exports:{}},bU="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",_U=bU,SU=_U;function FN(){}function VN(){}VN.resetWarningCache=FN;var CU=function(){function e(o,i,s,a,l,c){if(c!==SU){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}e.isRequired=e;function n(){return e}var r={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:n,element:e,elementType:e,instanceOf:n,node:e,objectOf:n,oneOf:n,oneOfType:n,shape:n,exact:n,checkPropTypes:VN,resetWarningCache:FN};return r.PropTypes=r,r};zN.exports=CU();var kU=zN.exports;const B=Au(kU),Ad={width:B.number,height:B.number,graphData:B.shape({nodes:B.arrayOf(B.object).isRequired,links:B.arrayOf(B.object).isRequired}),backgroundColor:B.string,nodeRelSize:B.number,nodeId:B.string,nodeLabel:B.oneOfType([B.string,B.func]),nodeVal:B.oneOfType([B.number,B.string,B.func]),nodeVisibility:B.oneOfType([B.bool,B.string,B.func]),nodeColor:B.oneOfType([B.string,B.func]),nodeAutoColorBy:B.oneOfType([B.string,B.func]),onNodeHover:B.func,onNodeClick:B.func,linkSource:B.string,linkTarget:B.string,linkLabel:B.oneOfType([B.string,B.func]),linkVisibility:B.oneOfType([B.bool,B.string,B.func]),linkColor:B.oneOfType([B.string,B.func]),linkAutoColorBy:B.oneOfType([B.string,B.func]),linkWidth:B.oneOfType([B.number,B.string,B.func]),linkCurvature:B.oneOfType([B.number,B.string,B.func]),linkDirectionalArrowLength:B.oneOfType([B.number,B.string,B.func]),linkDirectionalArrowColor:B.oneOfType([B.string,B.func]),linkDirectionalArrowRelPos:B.oneOfType([B.number,B.string,B.func]),linkDirectionalParticles:B.oneOfType([B.number,B.string,B.func]),linkDirectionalParticleSpeed:B.oneOfType([B.number,B.string,B.func]),linkDirectionalParticleOffset:B.oneOfType([B.number,B.string,B.func]),linkDirectionalParticleWidth:B.oneOfType([B.number,B.string,B.func]),linkDirectionalParticleColor:B.oneOfType([B.string,B.func]),onLinkHover:B.func,onLinkClick:B.func,dagMode:B.oneOf(["td","bu","lr","rl","zin","zout","radialin","radialout"]),dagLevelDistance:B.number,dagNodeFilter:B.func,onDagError:B.func,d3AlphaMin:B.number,d3AlphaDecay:B.number,d3VelocityDecay:B.number,warmupTicks:B.number,cooldownTicks:B.number,cooldownTime:B.number,onEngineTick:B.func,onEngineStop:B.func,getGraphBbox:B.func},BN={zoomToFit:B.func,onNodeRightClick:B.func,onNodeDrag:B.func,onNodeDragEnd:B.func,onLinkRightClick:B.func,linkHoverPrecision:B.number,onBackgroundClick:B.func,onBackgroundRightClick:B.func,showPointerCursor:B.oneOfType([B.bool,B.func]),enablePointerInteraction:B.bool,enableNodeDrag:B.bool},Gg={showNavInfo:B.bool,nodeOpacity:B.number,nodeResolution:B.number,nodeThreeObject:B.oneOfType([B.object,B.string,B.func]),nodeThreeObjectExtend:B.oneOfType([B.bool,B.string,B.func]),nodePositionUpdate:B.func,linkOpacity:B.number,linkResolution:B.number,linkCurveRotation:B.oneOfType([B.number,B.string,B.func]),linkMaterial:B.oneOfType([B.object,B.string,B.func]),linkThreeObject:B.oneOfType([B.object,B.string,B.func]),linkThreeObjectExtend:B.oneOfType([B.bool,B.string,B.func]),linkPositionUpdate:B.func,linkDirectionalArrowResolution:B.number,linkDirectionalParticleResolution:B.number,linkDirectionalParticleThreeObject:B.oneOfType([B.object,B.string,B.func]),forceEngine:B.oneOf(["d3","ngraph"]),ngraphPhysics:B.object,numDimensions:B.oneOf([1,2,3])},NU=Object.assign({},Ad,BN,{linkLineDash:B.oneOfType([B.arrayOf(B.number),B.string,B.func]),nodeCanvasObjectMode:B.oneOfType([B.string,B.func]),nodeCanvasObject:B.func,nodePointerAreaPaint:B.func,linkCanvasObjectMode:B.oneOfType([B.string,B.func]),linkCanvasObject:B.func,linkPointerAreaPaint:B.func,linkDirectionalParticleCanvasObject:B.func,autoPauseRedraw:B.bool,minZoom:B.number,maxZoom:B.number,enableZoomInteraction:B.oneOfType([B.bool,B.func]),enablePanInteraction:B.oneOfType([B.bool,B.func]),onZoom:B.func,onZoomEnd:B.func,onRenderFramePre:B.func,onRenderFramePost:B.func});Object.assign({},Ad,BN,Gg,{enableNavigationControls:B.bool,controlType:B.oneOf(["trackball","orbit","fly"]),rendererConfig:B.object,extraRenderers:B.arrayOf(B.shape({render:B.func.isRequired}))});Object.assign({},Ad,Gg,{nodeDesc:B.oneOfType([B.string,B.func]),linkDesc:B.oneOfType([B.string,B.func])});Object.assign({},Ad,Gg,{markerAttrs:B.object,yOffset:B.number,glScale:B.number});const Yg=Zz(wU,{methodNames:["emitParticle","d3Force","d3ReheatSimulation","stopAnimation","pauseAnimation","resumeAnimation","centerAt","zoom","zoomToFit","getGraphBbox","screen2GraphCoords","graph2ScreenCoords"]});Yg.displayName="ForceGraph2D";Yg.propTypes=NU;const ks={ui:"#60a5fa",api:"#34d399",db:"#f59e0b"},EU="rgba(244, 114, 182, 0.6)",PU="rgba(148, 163, 184, 0.25)";function jU(){const[e,n]=h.useState(null),[r,o]=h.useState(null),[i,s]=h.useState(!0),[a,l]=h.useState(!1),[c,u]=h.useState(new Set(["ui","api","db"])),[f,d]=h.useState(null),p=h.useRef(null),[g,v]=h.useState({width:0,height:0}),w=Bo(),_=h.useCallback((x=!1)=>{x?l(!0):s(!0),o(null),fetch(w("/api/project-graph",x?{regenerate:"1"}:void 0)).then(S=>S.json()).then(S=>{"error"in S?o(S.error):n(S)}).catch(S=>o(String(S))).finally(()=>{s(!1),l(!1)})},[w]);h.useEffect(()=>{_(!1)},[_]),h.useEffect(()=>{if(!p.current)return;const x=p.current,S=()=>v({width:x.clientWidth,height:x.clientHeight});S();const C=new ResizeObserver(S);return C.observe(x),()=>C.disconnect()},[e]);const y=h.useMemo(()=>{if(!e)return{nodes:[],links:[]};const x=e.nodes.filter(k=>c.has(k.layer)),S=new Set(x.map(k=>k.id)),C=e.links.filter(k=>{const N=typeof k.source=="string"?k.source:k.source.id,E=typeof k.target=="string"?k.target:k.target.id;return S.has(N)&&S.has(E)});return{nodes:x,links:C}},[e,c]),b=x=>{const S=new Set(c);S.has(x)?S.delete(x):S.add(x),S.size!==0&&u(S)};return m.jsxs("div",{className:"flex h-full flex-col",children:[m.jsxs("div",{className:"flex flex-wrap items-center gap-3 border-b border-sidebar-border px-6 py-3",children:[m.jsx("h1",{className:"text-lg font-semibold",children:"Project Graph"}),e&&m.jsxs("span",{className:"text-xs text-muted-foreground",children:[y.nodes.length," nodes · ",y.links.length," links"]}),m.jsxs("div",{className:"ml-auto flex items-center gap-2",children:[["ui","api","db"].map(x=>m.jsxs("button",{type:"button",onClick:()=>b(x),className:"flex items-center gap-1.5 rounded-md border border-sidebar-border px-2.5 py-1 text-xs transition-opacity",style:{opacity:c.has(x)?1:.4,borderColor:c.has(x)?ks[x]:void 0},children:[m.jsx("span",{className:"h-2 w-2 rounded-full",style:{backgroundColor:ks[x]}}),x.toUpperCase(),e&&` (${e.stats.byLayer[x]})`]},x)),m.jsx("button",{type:"button",onClick:()=>_(!0),disabled:a||i,className:"rounded-md border border-sidebar-border px-2.5 py-1 text-xs hover:bg-sidebar-accent disabled:opacity-50",children:a?"Regenerating…":"Regenerate"})]})]}),m.jsxs("div",{ref:p,className:"relative flex-1 overflow-hidden",children:[i&&m.jsx("div",{className:"absolute inset-0 flex items-center justify-center text-muted-foreground",children:"Loading graph…"}),r&&m.jsx("div",{className:"absolute inset-0 flex items-center justify-center text-destructive",children:r}),e&&g.width>0&&m.jsx(Yg,{width:g.width,height:g.height,graphData:y,nodeId:"id",nodeLabel:x=>`${x.layer}/${x.type}: ${x.name}`,nodeRelSize:3,nodeColor:x=>ks[x.layer],linkColor:x=>x.cross?EU:PU,linkWidth:x=>x.cross?1:.5,linkDirectionalParticles:0,cooldownTicks:120,onNodeHover:x=>d(x),backgroundColor:"transparent",nodeCanvasObjectMode:()=>"after",nodeCanvasObject:(x,S,C)=>{if(C<1.4||x.x===void 0||x.y===void 0)return;const k=x.name,N=11/C;S.font=`${N}px -apple-system, system-ui, sans-serif`;const E=S.measureText(k).width,P=3/C,T=1.5/C;S.fillStyle="rgba(15, 15, 20, 0.75)",S.fillRect(x.x-E/2-P,x.y+5/C-T,E+P*2,N+T*2),S.textAlign="center",S.textBaseline="top",S.fillStyle=ks[x.layer],S.fillText(k,x.x,x.y+5/C)}}),f&&m.jsxs("div",{className:"pointer-events-none absolute bottom-4 left-4 max-w-md rounded-lg border border-sidebar-border bg-background/90 px-3 py-2 text-xs shadow-lg backdrop-blur",children:[m.jsxs("div",{className:"font-semibold",style:{color:ks[f.layer]},children:[f.layer.toUpperCase()," · ",f.type]}),m.jsx("div",{className:"font-mono",children:f.name}),m.jsx("div",{className:"text-muted-foreground",children:f.path}),f.module&&m.jsxs("div",{className:"text-muted-foreground",children:["module: ",f.module]})]})]})]})}function Qn(e){var n;return((n=e.tags)==null?void 0:n.module)??e.module??null}function Xg(e){var n;return(n=e.tags)!=null&&n.screen?e.tags.screen==="true":e.type==="page"||e.type==="layout"}function Ca(e){return e.split(/[-_]/).map(n=>n.charAt(0).toUpperCase()+n.slice(1)).join(" ")}function Gr(e){if(e.route){const n=e.route.split("/").filter(Boolean).filter(r=>!r.startsWith("(")&&!r.startsWith(":")&&!r.startsWith("["));return n.length>0?n[n.length-1].split(/[-_]/).map(o=>o.charAt(0).toUpperCase()+o.slice(1)).join(" "):"Home"}return e.name}const MU=new Set(["lib","db","config","external","middleware","server-lib","services","mcp","layout","shared-ui"]);function RU(){const[e,n]=h.useState(null),[r,o]=h.useState("loading"),[i,s]=h.useState(null),[a,l]=h.useState(!1),c=Bo(),u=h.useCallback(async()=>{try{const g=await fetch(c("/api/raw-graphs"));if(!g.ok)throw new Error(`HTTP ${g.status}`);const v=await g.json();n(v);const w=!!(v.ui||v.api||v.db);o(w?"ready":"empty")}catch(g){s(String(g)),o("error")}},[c]);h.useEffect(()=>{u()},[u]);const f=h.useCallback(async()=>{l(!0),s(null);try{const g=await fetch(c("/api/generate-graph"),{method:"POST"});if(!g.ok)throw new Error(`HTTP ${g.status}`);const v=await g.json();if(!v.ok)throw new Error(v.error??"Generation failed");n({ui:v.ui,api:v.api,db:v.db});const w=!!(v.ui||v.api||v.db);o(w?"ready":"empty")}catch(g){s(String(g))}finally{l(!1)}},[]),{moduleBuckets:d,counts:p}=h.useMemo(()=>{if(!(e!=null&&e.ui)||!(e!=null&&e.api)||!(e!=null&&e.db))return{moduleBuckets:[],counts:null};const g=e.ui.nodes.filter(b=>Xg(b)&&Qn(b)&&!MU.has(Qn(b))),v=new Map;for(const b of g){const x=Qn(b);v.has(x)||v.set(x,[]),v.get(x).push(b)}const w=[],_=new Map;for(const[b,x]of v)x.length===1?w.push(...x):_.set(b,x);const y=[..._.entries()].map(([b,x])=>({module:b,screens:x})).sort((b,x)=>x.screens.length-b.screens.length);return w.length>0&&y.push({module:"misc",screens:w}),{moduleBuckets:y,counts:{screens:g.length,modules:y.length,endpoints:e.api.nodes.length,tables:e.db.nodes.length,components:e.ui.nodes.filter(b=>b.type==="component").length}}},[e]);return r==="loading"?m.jsx("div",{className:"flex h-full items-center justify-center",children:m.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading overview…"})}):r==="empty"?m.jsx(AU,{onGenerate:f,busy:a,error:i}):r==="error"?m.jsx("div",{className:"flex h-full items-center justify-center p-8",children:m.jsxs("div",{className:"max-w-md text-center",children:[m.jsx("p",{className:"text-sm text-foreground",children:"Failed to load graph"}),m.jsx("p",{className:"mt-2 text-xs text-muted-foreground",children:i}),m.jsx("button",{type:"button",onClick:u,className:"mt-4 rounded-md border border-sidebar-border px-3 py-1.5 text-xs text-foreground hover:bg-sidebar-accent",children:"Retry"})]})}):p?m.jsx("div",{className:"h-full overflow-y-auto",children:m.jsxs("div",{className:"mx-auto max-w-6xl px-8 py-8",children:[m.jsxs("header",{className:"mb-8 flex items-start justify-between gap-4",children:[m.jsxs("div",{children:[m.jsx("h1",{className:"text-2xl font-semibold text-foreground",children:"Project Overview"}),m.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:"A high-level map of the modules, screens, and systems in this project."})]}),m.jsxs("button",{type:"button",onClick:f,disabled:a,className:"flex shrink-0 items-center gap-1.5 rounded-md border border-sidebar-border px-3 py-1.5 text-xs text-muted-foreground transition-colors hover:bg-sidebar-accent hover:text-foreground disabled:cursor-not-allowed disabled:opacity-60",children:[m.jsx(T_,{className:`h-3 w-3 ${a?"animate-spin":""}`}),a?"Regenerating…":"Regenerate graph"]})]}),i&&m.jsx("div",{className:"mb-4 rounded-md border border-destructive/30 bg-destructive/10 px-3 py-2 text-xs text-destructive",children:i}),m.jsxs("div",{className:"mb-8 grid grid-cols-2 gap-3 md:grid-cols-4",children:[m.jsx(Yl,{icon:m.jsx(Ju,{className:"h-4 w-4"}),label:"Modules",value:p.modules}),m.jsx(Yl,{icon:m.jsx($a,{className:"h-4 w-4"}),label:"Screens",value:p.screens}),m.jsx(Yl,{icon:m.jsx(Wm,{className:"h-4 w-4"}),label:"API endpoints",value:p.endpoints}),m.jsx(Yl,{icon:m.jsx(Hm,{className:"h-4 w-4"}),label:"Database tables",value:p.tables})]}),m.jsxs("section",{children:[m.jsx("h2",{className:"mb-3 text-xs font-semibold uppercase tracking-wider text-muted-foreground",children:"Capability map"}),m.jsx("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-2 xl:grid-cols-3",children:d.map(g=>m.jsx(TU,{module:g.module,screens:g.screens},g.module))})]})]})}):null}function AU({onGenerate:e,busy:n,error:r}){return m.jsx("div",{className:"flex h-full items-center justify-center p-8",children:m.jsxs("div",{className:"max-w-md text-center",children:[m.jsx("div",{className:"mx-auto flex h-12 w-12 items-center justify-center rounded-full bg-sidebar-primary/15 text-sidebar-primary",children:m.jsx(GA,{className:"h-6 w-6"})}),m.jsx("h2",{className:"mt-4 text-lg font-semibold text-foreground",children:"No graph yet"}),m.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:"LaunchChart hasn't generated a project graph for this workspace. Generate one to see modules, screens, API endpoints, and database tables."}),m.jsxs("button",{type:"button",onClick:e,disabled:n,className:"mt-6 inline-flex items-center gap-2 rounded-md bg-sidebar-primary px-4 py-2 text-sm font-medium text-white shadow-sm transition-colors hover:bg-sidebar-primary/90 disabled:cursor-not-allowed disabled:opacity-60",children:[m.jsx(T_,{className:`h-4 w-4 ${n?"animate-spin":""}`}),n?"Generating…":"Generate graph"]}),m.jsx("p",{className:"mt-3 text-[11px] text-muted-foreground",children:"This scans your source tree — takes a few seconds."}),r&&m.jsx("div",{className:"mt-4 rounded-md border border-destructive/30 bg-destructive/10 px-3 py-2 text-xs text-destructive",children:r})]})})}function Yl({icon:e,label:n,value:r}){return m.jsxs("div",{className:"rounded-lg border border-sidebar-border bg-background/40 px-4 py-3",children:[m.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground",children:[e,m.jsx("span",{className:"text-[11px] font-semibold uppercase tracking-wider",children:n})]}),m.jsx("p",{className:"mt-1 text-2xl font-semibold tabular-nums text-foreground",children:r})]})}function TU({module:e,screens:n}){const r=n.slice(0,6),o=n.length-r.length;return m.jsxs("div",{className:"rounded-lg border border-sidebar-border bg-background/40 p-5 transition-colors hover:border-sidebar-primary/50",children:[m.jsxs("div",{className:"mb-3 flex items-center justify-between",children:[m.jsx("h3",{className:"text-base font-semibold text-foreground",children:Ca(e)}),m.jsxs("span",{className:"rounded bg-sidebar-accent px-2 py-0.5 text-[10px] font-medium tabular-nums text-muted-foreground",children:[n.length," screens"]})]}),m.jsxs("ul",{className:"space-y-1",children:[r.map(i=>m.jsxs("li",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[m.jsx("span",{className:"h-1 w-1 shrink-0 rounded-full bg-sidebar-primary/60"}),m.jsx("span",{className:"truncate text-foreground/90",children:Gr(i)})]},i.id)),o>0&&m.jsxs("li",{className:"pl-3 pt-1 text-[11px] italic text-muted-foreground",children:["+",o," more"]})]})]})}function Be(e){if(typeof e=="string"||typeof e=="number")return""+e;let n="";if(Array.isArray(e))for(let r=0,o;r<e.length;r++)(o=Be(e[r]))!==""&&(n+=(n&&" ")+o);else for(let r in e)e[r]&&(n+=(n&&" ")+r);return n}const In={error001:()=>"[React Flow]: Seems like you have not used zustand provider as an ancestor. Help: https://reactflow.dev/error#001",error002:()=>"It looks like you've created a new nodeTypes or edgeTypes object. If this wasn't on purpose please define the nodeTypes/edgeTypes outside of the component or memoize them.",error003:e=>`Node type "${e}" not found. Using fallback type "default".`,error004:()=>"The React Flow parent container needs a width and a height to render the graph.",error005:()=>"Only child nodes can use a parent extent.",error006:()=>"Can't create edge. An edge needs a source and a target.",error007:e=>`The old edge with id=${e} does not exist.`,error009:e=>`Marker type "${e}" doesn't exist.`,error008:(e,{id:n,sourceHandle:r,targetHandle:o})=>`Couldn't create edge for ${e} handle id: "${e==="source"?r:o}", edge id: ${n}.`,error010:()=>"Handle: No node id found. Make sure to only use a Handle inside a custom Node.",error011:e=>`Edge type "${e}" not found. Using fallback type "default".`,error012:e=>`Node with id "${e}" does not exist, it may have been removed. This can happen when a node is deleted before the "onNodeClick" handler is called.`,error013:(e="react")=>`It seems that you haven't loaded the styles. Please import '@xyflow/${e}/dist/style.css' or base.css to make sure everything is working properly.`,error014:()=>"useNodeConnections: No node ID found. Call useNodeConnections inside a custom Node or provide a node ID.",error015:()=>"It seems that you are trying to drag a node that is not initialized. Please use onNodesChange as explained in the docs."},ka=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],HN=["Enter"," ","Escape"],WN={"node.a11yDescription.default":"Press enter or space to select a node. Press delete to remove it and escape to cancel.","node.a11yDescription.keyboardDisabled":"Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.","node.a11yDescription.ariaLiveMessage":({direction:e,x:n,y:r})=>`Moved selected node ${e}. New position, x: ${n}, y: ${r}`,"edge.a11yDescription.default":"Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.","controls.ariaLabel":"Control Panel","controls.zoomIn.ariaLabel":"Zoom In","controls.zoomOut.ariaLabel":"Zoom Out","controls.fitView.ariaLabel":"Fit View","controls.interactive.ariaLabel":"Toggle Interactivity","minimap.ariaLabel":"Mini Map","handle.ariaLabel":"Handle"};var Ui;(function(e){e.Strict="strict",e.Loose="loose"})(Ui||(Ui={}));var _o;(function(e){e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal"})(_o||(_o={}));var Na;(function(e){e.Partial="partial",e.Full="full"})(Na||(Na={}));const UN={inProgress:!1,isValid:null,from:null,fromHandle:null,fromPosition:null,fromNode:null,to:null,toHandle:null,toPosition:null,toNode:null,pointer:null};var Nr;(function(e){e.Bezier="default",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e.SimpleBezier="simplebezier"})(Nr||(Nr={}));var Nu;(function(e){e.Arrow="arrow",e.ArrowClosed="arrowclosed"})(Nu||(Nu={}));var ce;(function(e){e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom"})(ce||(ce={}));const Ox={[ce.Left]:ce.Right,[ce.Right]:ce.Left,[ce.Top]:ce.Bottom,[ce.Bottom]:ce.Top};function GN(e){return e===null?null:e?"valid":"invalid"}const YN=e=>"id"in e&&"source"in e&&"target"in e,IU=e=>"id"in e&&"position"in e&&!("source"in e)&&!("target"in e),Kg=e=>"id"in e&&"internals"in e&&!("source"in e)&&!("target"in e),Ja=(e,n=[0,0])=>{const{width:r,height:o}=cr(e),i=e.origin??n,s=r*i[0],a=o*i[1];return{x:e.position.x-s,y:e.position.y-a}},$U=(e,n={nodeOrigin:[0,0]})=>{if(e.length===0)return{x:0,y:0,width:0,height:0};const r=e.reduce((o,i)=>{const s=typeof i=="string";let a=!n.nodeLookup&&!s?i:void 0;n.nodeLookup&&(a=s?n.nodeLookup.get(i):Kg(i)?i:n.nodeLookup.get(i.id));const l=a?Eu(a,n.nodeOrigin):{x:0,y:0,x2:0,y2:0};return Td(o,l)},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return Id(r)},el=(e,n={})=>{let r={x:1/0,y:1/0,x2:-1/0,y2:-1/0},o=!1;return e.forEach(i=>{(n.filter===void 0||n.filter(i))&&(r=Td(r,Eu(i)),o=!0)}),o?Id(r):{x:0,y:0,width:0,height:0}},qg=(e,n,[r,o,i]=[0,0,1],s=!1,a=!1)=>{const l={...nl(n,[r,o,i]),width:n.width/i,height:n.height/i},c=[];for(const u of e.values()){const{measured:f,selectable:d=!0,hidden:p=!1}=u;if(a&&!d||p)continue;const g=f.width??u.width??u.initialWidth??null,v=f.height??u.height??u.initialHeight??null,w=Ea(l,Yi(u)),_=(g??0)*(v??0),y=s&&w>0;(!u.internals.handleBounds||y||w>=_||u.dragging)&&c.push(u)}return c},OU=(e,n)=>{const r=new Set;return e.forEach(o=>{r.add(o.id)}),n.filter(o=>r.has(o.source)||r.has(o.target))};function DU(e,n){const r=new Map,o=n!=null&&n.nodes?new Set(n.nodes.map(i=>i.id)):null;return e.forEach(i=>{i.measured.width&&i.measured.height&&((n==null?void 0:n.includeHiddenNodes)||!i.hidden)&&(!o||o.has(i.id))&&r.set(i.id,i)}),r}async function LU({nodes:e,width:n,height:r,panZoom:o,minZoom:i,maxZoom:s},a){if(e.size===0)return Promise.resolve(!0);const l=DU(e,a),c=el(l),u=Zg(c,n,r,(a==null?void 0:a.minZoom)??i,(a==null?void 0:a.maxZoom)??s,(a==null?void 0:a.padding)??.1);return await o.setViewport(u,{duration:a==null?void 0:a.duration,ease:a==null?void 0:a.ease,interpolate:a==null?void 0:a.interpolate}),Promise.resolve(!0)}function XN({nodeId:e,nextPosition:n,nodeLookup:r,nodeOrigin:o=[0,0],nodeExtent:i,onError:s}){const a=r.get(e),l=a.parentId?r.get(a.parentId):void 0,{x:c,y:u}=l?l.internals.positionAbsolute:{x:0,y:0},f=a.origin??o;let d=a.extent||i;if(a.extent==="parent"&&!a.expandParent)if(!l)s==null||s("005",In.error005());else{const g=l.measured.width,v=l.measured.height;g&&v&&(d=[[c,u],[c+g,u+v]])}else l&&Xi(a.extent)&&(d=[[a.extent[0][0]+c,a.extent[0][1]+u],[a.extent[1][0]+c,a.extent[1][1]+u]]);const p=Xi(d)?Io(n,d,a.measured):n;return(a.measured.width===void 0||a.measured.height===void 0)&&(s==null||s("015",In.error015())),{position:{x:p.x-c+(a.measured.width??0)*f[0],y:p.y-u+(a.measured.height??0)*f[1]},positionAbsolute:p}}async function zU({nodesToRemove:e=[],edgesToRemove:n=[],nodes:r,edges:o,onBeforeDelete:i}){const s=new Set(e.map(p=>p.id)),a=[];for(const p of r){if(p.deletable===!1)continue;const g=s.has(p.id),v=!g&&p.parentId&&a.find(w=>w.id===p.parentId);(g||v)&&a.push(p)}const l=new Set(n.map(p=>p.id)),c=o.filter(p=>p.deletable!==!1),f=OU(a,c);for(const p of c)l.has(p.id)&&!f.find(v=>v.id===p.id)&&f.push(p);if(!i)return{edges:f,nodes:a};const d=await i({nodes:a,edges:f});return typeof d=="boolean"?d?{edges:f,nodes:a}:{edges:[],nodes:[]}:d}const Gi=(e,n=0,r=1)=>Math.min(Math.max(e,n),r),Io=(e={x:0,y:0},n,r)=>({x:Gi(e.x,n[0][0],n[1][0]-((r==null?void 0:r.width)??0)),y:Gi(e.y,n[0][1],n[1][1]-((r==null?void 0:r.height)??0))});function KN(e,n,r){const{width:o,height:i}=cr(r),{x:s,y:a}=r.internals.positionAbsolute;return Io(e,[[s,a],[s+o,a+i]],n)}const Dx=(e,n,r)=>e<n?Gi(Math.abs(e-n),1,n)/n:e>r?-Gi(Math.abs(e-r),1,n)/n:0,qN=(e,n,r=15,o=40)=>{const i=Dx(e.x,o,n.width-o)*r,s=Dx(e.y,o,n.height-o)*r;return[i,s]},Td=(e,n)=>({x:Math.min(e.x,n.x),y:Math.min(e.y,n.y),x2:Math.max(e.x2,n.x2),y2:Math.max(e.y2,n.y2)}),Ah=({x:e,y:n,width:r,height:o})=>({x:e,y:n,x2:e+r,y2:n+o}),Id=({x:e,y:n,x2:r,y2:o})=>({x:e,y:n,width:r-e,height:o-n}),Yi=(e,n=[0,0])=>{var i,s;const{x:r,y:o}=Kg(e)?e.internals.positionAbsolute:Ja(e,n);return{x:r,y:o,width:((i=e.measured)==null?void 0:i.width)??e.width??e.initialWidth??0,height:((s=e.measured)==null?void 0:s.height)??e.height??e.initialHeight??0}},Eu=(e,n=[0,0])=>{var i,s;const{x:r,y:o}=Kg(e)?e.internals.positionAbsolute:Ja(e,n);return{x:r,y:o,x2:r+(((i=e.measured)==null?void 0:i.width)??e.width??e.initialWidth??0),y2:o+(((s=e.measured)==null?void 0:s.height)??e.height??e.initialHeight??0)}},ZN=(e,n)=>Id(Td(Ah(e),Ah(n))),Ea=(e,n)=>{const r=Math.max(0,Math.min(e.x+e.width,n.x+n.width)-Math.max(e.x,n.x)),o=Math.max(0,Math.min(e.y+e.height,n.y+n.height)-Math.max(e.y,n.y));return Math.ceil(r*o)},Lx=e=>un(e.width)&&un(e.height)&&un(e.x)&&un(e.y),un=e=>!isNaN(e)&&isFinite(e),FU=(e,n)=>{},tl=(e,n=[1,1])=>({x:n[0]*Math.round(e.x/n[0]),y:n[1]*Math.round(e.y/n[1])}),nl=({x:e,y:n},[r,o,i],s=!1,a=[1,1])=>{const l={x:(e-r)/i,y:(n-o)/i};return s?tl(l,a):l},Pu=({x:e,y:n},[r,o,i])=>({x:e*i+r,y:n*i+o});function Qo(e,n){if(typeof e=="number")return Math.floor((n-n/(1+e))*.5);if(typeof e=="string"&&e.endsWith("px")){const r=parseFloat(e);if(!Number.isNaN(r))return Math.floor(r)}if(typeof e=="string"&&e.endsWith("%")){const r=parseFloat(e);if(!Number.isNaN(r))return Math.floor(n*r*.01)}return console.error(`[React Flow] The padding value "${e}" is invalid. Please provide a number or a string with a valid unit (px or %).`),0}function VU(e,n,r){if(typeof e=="string"||typeof e=="number"){const o=Qo(e,r),i=Qo(e,n);return{top:o,right:i,bottom:o,left:i,x:i*2,y:o*2}}if(typeof e=="object"){const o=Qo(e.top??e.y??0,r),i=Qo(e.bottom??e.y??0,r),s=Qo(e.left??e.x??0,n),a=Qo(e.right??e.x??0,n);return{top:o,right:a,bottom:i,left:s,x:s+a,y:o+i}}return{top:0,right:0,bottom:0,left:0,x:0,y:0}}function BU(e,n,r,o,i,s){const{x:a,y:l}=Pu(e,[n,r,o]),{x:c,y:u}=Pu({x:e.x+e.width,y:e.y+e.height},[n,r,o]),f=i-c,d=s-u;return{left:Math.floor(a),top:Math.floor(l),right:Math.floor(f),bottom:Math.floor(d)}}const Zg=(e,n,r,o,i,s)=>{const a=VU(s,n,r),l=(n-a.x)/e.width,c=(r-a.y)/e.height,u=Math.min(l,c),f=Gi(u,o,i),d=e.x+e.width/2,p=e.y+e.height/2,g=n/2-d*f,v=r/2-p*f,w=BU(e,g,v,f,n,r),_={left:Math.min(w.left-a.left,0),top:Math.min(w.top-a.top,0),right:Math.min(w.right-a.right,0),bottom:Math.min(w.bottom-a.bottom,0)};return{x:g-_.left+_.right,y:v-_.top+_.bottom,zoom:f}},Pa=()=>{var e;return typeof navigator<"u"&&((e=navigator==null?void 0:navigator.userAgent)==null?void 0:e.indexOf("Mac"))>=0};function Xi(e){return e!=null&&e!=="parent"}function cr(e){var n,r;return{width:((n=e.measured)==null?void 0:n.width)??e.width??e.initialWidth??0,height:((r=e.measured)==null?void 0:r.height)??e.height??e.initialHeight??0}}function QN(e){var n,r;return(((n=e.measured)==null?void 0:n.width)??e.width??e.initialWidth)!==void 0&&(((r=e.measured)==null?void 0:r.height)??e.height??e.initialHeight)!==void 0}function JN(e,n={width:0,height:0},r,o,i){const s={...e},a=o.get(r);if(a){const l=a.origin||i;s.x+=a.internals.positionAbsolute.x-(n.width??0)*l[0],s.y+=a.internals.positionAbsolute.y-(n.height??0)*l[1]}return s}function zx(e,n){if(e.size!==n.size)return!1;for(const r of e)if(!n.has(r))return!1;return!0}function HU(){let e,n;return{promise:new Promise((o,i)=>{e=o,n=i}),resolve:e,reject:n}}function WU(e){return{...WN,...e||{}}}function qs(e,{snapGrid:n=[0,0],snapToGrid:r=!1,transform:o,containerBounds:i}){const{x:s,y:a}=dn(e),l=nl({x:s-((i==null?void 0:i.left)??0),y:a-((i==null?void 0:i.top)??0)},o),{x:c,y:u}=r?tl(l,n):l;return{xSnapped:c,ySnapped:u,...l}}const Qg=e=>({width:e.offsetWidth,height:e.offsetHeight}),eE=e=>{var n;return((n=e==null?void 0:e.getRootNode)==null?void 0:n.call(e))||(window==null?void 0:window.document)},UU=["INPUT","SELECT","TEXTAREA"];function tE(e){var o,i;const n=((i=(o=e.composedPath)==null?void 0:o.call(e))==null?void 0:i[0])||e.target;return(n==null?void 0:n.nodeType)!==1?!1:UU.includes(n.nodeName)||n.hasAttribute("contenteditable")||!!n.closest(".nokey")}const nE=e=>"clientX"in e,dn=(e,n)=>{var s,a;const r=nE(e),o=r?e.clientX:(s=e.touches)==null?void 0:s[0].clientX,i=r?e.clientY:(a=e.touches)==null?void 0:a[0].clientY;return{x:o-((n==null?void 0:n.left)??0),y:i-((n==null?void 0:n.top)??0)}},Fx=(e,n,r,o,i)=>{const s=n.querySelectorAll(`.${e}`);return!s||!s.length?null:Array.from(s).map(a=>{const l=a.getBoundingClientRect();return{id:a.getAttribute("data-handleid"),type:e,nodeId:i,position:a.getAttribute("data-handlepos"),x:(l.left-r.left)/o,y:(l.top-r.top)/o,...Qg(a)}})};function rE({sourceX:e,sourceY:n,targetX:r,targetY:o,sourceControlX:i,sourceControlY:s,targetControlX:a,targetControlY:l}){const c=e*.125+i*.375+a*.375+r*.125,u=n*.125+s*.375+l*.375+o*.125,f=Math.abs(c-e),d=Math.abs(u-n);return[c,u,f,d]}function Xl(e,n){return e>=0?.5*e:n*25*Math.sqrt(-e)}function Vx({pos:e,x1:n,y1:r,x2:o,y2:i,c:s}){switch(e){case ce.Left:return[n-Xl(n-o,s),r];case ce.Right:return[n+Xl(o-n,s),r];case ce.Top:return[n,r-Xl(r-i,s)];case ce.Bottom:return[n,r+Xl(i-r,s)]}}function oE({sourceX:e,sourceY:n,sourcePosition:r=ce.Bottom,targetX:o,targetY:i,targetPosition:s=ce.Top,curvature:a=.25}){const[l,c]=Vx({pos:r,x1:e,y1:n,x2:o,y2:i,c:a}),[u,f]=Vx({pos:s,x1:o,y1:i,x2:e,y2:n,c:a}),[d,p,g,v]=rE({sourceX:e,sourceY:n,targetX:o,targetY:i,sourceControlX:l,sourceControlY:c,targetControlX:u,targetControlY:f});return[`M${e},${n} C${l},${c} ${u},${f} ${o},${i}`,d,p,g,v]}function iE({sourceX:e,sourceY:n,targetX:r,targetY:o}){const i=Math.abs(r-e)/2,s=r<e?r+i:r-i,a=Math.abs(o-n)/2,l=o<n?o+a:o-a;return[s,l,i,a]}function GU({sourceNode:e,targetNode:n,selected:r=!1,zIndex:o=0,elevateOnSelect:i=!1,zIndexMode:s="basic"}){if(s==="manual")return o;const a=i&&r?o+1e3:o,l=Math.max(e.parentId||i&&e.selected?e.internals.z:0,n.parentId||i&&n.selected?n.internals.z:0);return a+l}function YU({sourceNode:e,targetNode:n,width:r,height:o,transform:i}){const s=Td(Eu(e),Eu(n));s.x===s.x2&&(s.x2+=1),s.y===s.y2&&(s.y2+=1);const a={x:-i[0]/i[2],y:-i[1]/i[2],width:r/i[2],height:o/i[2]};return Ea(a,Id(s))>0}const XU=({source:e,sourceHandle:n,target:r,targetHandle:o})=>`xy-edge__${e}${n||""}-${r}${o||""}`,KU=(e,n)=>n.some(r=>r.source===e.source&&r.target===e.target&&(r.sourceHandle===e.sourceHandle||!r.sourceHandle&&!e.sourceHandle)&&(r.targetHandle===e.targetHandle||!r.targetHandle&&!e.targetHandle)),qU=(e,n,r={})=>{if(!e.source||!e.target)return n;const o=r.getEdgeId||XU;let i;return YN(e)?i={...e}:i={...e,id:o(e)},KU(i,n)?n:(i.sourceHandle===null&&delete i.sourceHandle,i.targetHandle===null&&delete i.targetHandle,n.concat(i))};function sE({sourceX:e,sourceY:n,targetX:r,targetY:o}){const[i,s,a,l]=iE({sourceX:e,sourceY:n,targetX:r,targetY:o});return[`M ${e},${n}L ${r},${o}`,i,s,a,l]}const Bx={[ce.Left]:{x:-1,y:0},[ce.Right]:{x:1,y:0},[ce.Top]:{x:0,y:-1},[ce.Bottom]:{x:0,y:1}},ZU=({source:e,sourcePosition:n=ce.Bottom,target:r})=>n===ce.Left||n===ce.Right?e.x<r.x?{x:1,y:0}:{x:-1,y:0}:e.y<r.y?{x:0,y:1}:{x:0,y:-1},Hx=(e,n)=>Math.sqrt(Math.pow(n.x-e.x,2)+Math.pow(n.y-e.y,2));function QU({source:e,sourcePosition:n=ce.Bottom,target:r,targetPosition:o=ce.Top,center:i,offset:s,stepPosition:a}){const l=Bx[n],c=Bx[o],u={x:e.x+l.x*s,y:e.y+l.y*s},f={x:r.x+c.x*s,y:r.y+c.y*s},d=ZU({source:u,sourcePosition:n,target:f}),p=d.x!==0?"x":"y",g=d[p];let v=[],w,_;const y={x:0,y:0},b={x:0,y:0},[,,x,S]=iE({sourceX:e.x,sourceY:e.y,targetX:r.x,targetY:r.y});if(l[p]*c[p]===-1){p==="x"?(w=i.x??u.x+(f.x-u.x)*a,_=i.y??(u.y+f.y)/2):(w=i.x??(u.x+f.x)/2,_=i.y??u.y+(f.y-u.y)*a);const E=[{x:w,y:u.y},{x:w,y:f.y}],P=[{x:u.x,y:_},{x:f.x,y:_}];l[p]===g?v=p==="x"?E:P:v=p==="x"?P:E}else{const E=[{x:u.x,y:f.y}],P=[{x:f.x,y:u.y}];if(p==="x"?v=l.x===g?P:E:v=l.y===g?E:P,n===o){const j=Math.abs(e[p]-r[p]);if(j<=s){const L=Math.min(s-1,s-j);l[p]===g?y[p]=(u[p]>e[p]?-1:1)*L:b[p]=(f[p]>r[p]?-1:1)*L}}if(n!==o){const j=p==="x"?"y":"x",L=l[p]===c[j],I=u[j]>f[j],z=u[j]<f[j];(l[p]===1&&(!L&&I||L&&z)||l[p]!==1&&(!L&&z||L&&I))&&(v=p==="x"?E:P)}const T={x:u.x+y.x,y:u.y+y.y},A={x:f.x+b.x,y:f.y+b.y},D=Math.max(Math.abs(T.x-v[0].x),Math.abs(A.x-v[0].x)),V=Math.max(Math.abs(T.y-v[0].y),Math.abs(A.y-v[0].y));D>=V?(w=(T.x+A.x)/2,_=v[0].y):(w=v[0].x,_=(T.y+A.y)/2)}const C={x:u.x+y.x,y:u.y+y.y},k={x:f.x+b.x,y:f.y+b.y};return[[e,...C.x!==v[0].x||C.y!==v[0].y?[C]:[],...v,...k.x!==v[v.length-1].x||k.y!==v[v.length-1].y?[k]:[],r],w,_,x,S]}function JU(e,n,r,o){const i=Math.min(Hx(e,n)/2,Hx(n,r)/2,o),{x:s,y:a}=n;if(e.x===s&&s===r.x||e.y===a&&a===r.y)return`L${s} ${a}`;if(e.y===a){const u=e.x<r.x?-1:1,f=e.y<r.y?1:-1;return`L ${s+i*u},${a}Q ${s},${a} ${s},${a+i*f}`}const l=e.x<r.x?1:-1,c=e.y<r.y?-1:1;return`L ${s},${a+i*c}Q ${s},${a} ${s+i*l},${a}`}function Th({sourceX:e,sourceY:n,sourcePosition:r=ce.Bottom,targetX:o,targetY:i,targetPosition:s=ce.Top,borderRadius:a=5,centerX:l,centerY:c,offset:u=20,stepPosition:f=.5}){const[d,p,g,v,w]=QU({source:{x:e,y:n},sourcePosition:r,target:{x:o,y:i},targetPosition:s,center:{x:l,y:c},offset:u,stepPosition:f});let _=`M${d[0].x} ${d[0].y}`;for(let y=1;y<d.length-1;y++)_+=JU(d[y-1],d[y],d[y+1],a);return _+=`L${d[d.length-1].x} ${d[d.length-1].y}`,[_,p,g,v,w]}function Wx(e){var n;return e&&!!(e.internals.handleBounds||(n=e.handles)!=null&&n.length)&&!!(e.measured.width||e.width||e.initialWidth)}function eG(e){var d;const{sourceNode:n,targetNode:r}=e;if(!Wx(n)||!Wx(r))return null;const o=n.internals.handleBounds||Ux(n.handles),i=r.internals.handleBounds||Ux(r.handles),s=Gx((o==null?void 0:o.source)??[],e.sourceHandle),a=Gx(e.connectionMode===Ui.Strict?(i==null?void 0:i.target)??[]:((i==null?void 0:i.target)??[]).concat((i==null?void 0:i.source)??[]),e.targetHandle);if(!s||!a)return(d=e.onError)==null||d.call(e,"008",In.error008(s?"target":"source",{id:e.id,sourceHandle:e.sourceHandle,targetHandle:e.targetHandle})),null;const l=(s==null?void 0:s.position)||ce.Bottom,c=(a==null?void 0:a.position)||ce.Top,u=$o(n,s,l),f=$o(r,a,c);return{sourceX:u.x,sourceY:u.y,targetX:f.x,targetY:f.y,sourcePosition:l,targetPosition:c}}function Ux(e){if(!e)return null;const n=[],r=[];for(const o of e)o.width=o.width??1,o.height=o.height??1,o.type==="source"?n.push(o):o.type==="target"&&r.push(o);return{source:n,target:r}}function $o(e,n,r=ce.Left,o=!1){const i=((n==null?void 0:n.x)??0)+e.internals.positionAbsolute.x,s=((n==null?void 0:n.y)??0)+e.internals.positionAbsolute.y,{width:a,height:l}=n??cr(e);if(o)return{x:i+a/2,y:s+l/2};switch((n==null?void 0:n.position)??r){case ce.Top:return{x:i+a/2,y:s};case ce.Right:return{x:i+a,y:s+l/2};case ce.Bottom:return{x:i+a/2,y:s+l};case ce.Left:return{x:i,y:s+l/2}}}function Gx(e,n){return e&&(n?e.find(r=>r.id===n):e[0])||null}function Ih(e,n){return e?typeof e=="string"?e:`${n?`${n}__`:""}${Object.keys(e).sort().map(o=>`${o}=${e[o]}`).join("&")}`:""}function tG(e,{id:n,defaultColor:r,defaultMarkerStart:o,defaultMarkerEnd:i}){const s=new Set;return e.reduce((a,l)=>([l.markerStart||o,l.markerEnd||i].forEach(c=>{if(c&&typeof c=="object"){const u=Ih(c,n);s.has(u)||(a.push({id:u,color:c.color||r,...c}),s.add(u))}}),a),[]).sort((a,l)=>a.id.localeCompare(l.id))}const aE=1e3,nG=10,Jg={nodeOrigin:[0,0],nodeExtent:ka,elevateNodesOnSelect:!0,zIndexMode:"basic",defaults:{}},rG={...Jg,checkEquality:!0};function e0(e,n){const r={...e};for(const o in n)n[o]!==void 0&&(r[o]=n[o]);return r}function oG(e,n,r){const o=e0(Jg,r);for(const i of e.values())if(i.parentId)n0(i,e,n,o);else{const s=Ja(i,o.nodeOrigin),a=Xi(i.extent)?i.extent:o.nodeExtent,l=Io(s,a,cr(i));i.internals.positionAbsolute=l}}function iG(e,n){if(!e.handles)return e.measured?n==null?void 0:n.internals.handleBounds:void 0;const r=[],o=[];for(const i of e.handles){const s={id:i.id,width:i.width??1,height:i.height??1,nodeId:e.id,x:i.x,y:i.y,position:i.position,type:i.type};i.type==="source"?r.push(s):i.type==="target"&&o.push(s)}return{source:r,target:o}}function t0(e){return e==="manual"}function $h(e,n,r,o={}){var f,d;const i=e0(rG,o),s={i:0},a=new Map(n),l=i!=null&&i.elevateNodesOnSelect&&!t0(i.zIndexMode)?aE:0;let c=e.length>0,u=!1;n.clear(),r.clear();for(const p of e){let g=a.get(p.id);if(i.checkEquality&&p===(g==null?void 0:g.internals.userNode))n.set(p.id,g);else{const v=Ja(p,i.nodeOrigin),w=Xi(p.extent)?p.extent:i.nodeExtent,_=Io(v,w,cr(p));g={...i.defaults,...p,measured:{width:(f=p.measured)==null?void 0:f.width,height:(d=p.measured)==null?void 0:d.height},internals:{positionAbsolute:_,handleBounds:iG(p,g),z:lE(p,l,i.zIndexMode),userNode:p}},n.set(p.id,g)}(g.measured===void 0||g.measured.width===void 0||g.measured.height===void 0)&&!g.hidden&&(c=!1),p.parentId&&n0(g,n,r,o,s),u||(u=p.selected??!1)}return{nodesInitialized:c,hasSelectedNodes:u}}function sG(e,n){if(!e.parentId)return;const r=n.get(e.parentId);r?r.set(e.id,e):n.set(e.parentId,new Map([[e.id,e]]))}function n0(e,n,r,o,i){const{elevateNodesOnSelect:s,nodeOrigin:a,nodeExtent:l,zIndexMode:c}=e0(Jg,o),u=e.parentId,f=n.get(u);if(!f){console.warn(`Parent node ${u} not found. Please make sure that parent nodes are in front of their child nodes in the nodes array.`);return}sG(e,r),i&&!f.parentId&&f.internals.rootParentIndex===void 0&&c==="auto"&&(f.internals.rootParentIndex=++i.i,f.internals.z=f.internals.z+i.i*nG),i&&f.internals.rootParentIndex!==void 0&&(i.i=f.internals.rootParentIndex);const d=s&&!t0(c)?aE:0,{x:p,y:g,z:v}=aG(e,f,a,l,d,c),{positionAbsolute:w}=e.internals,_=p!==w.x||g!==w.y;(_||v!==e.internals.z)&&n.set(e.id,{...e,internals:{...e.internals,positionAbsolute:_?{x:p,y:g}:w,z:v}})}function lE(e,n,r){const o=un(e.zIndex)?e.zIndex:0;return t0(r)?o:o+(e.selected?n:0)}function aG(e,n,r,o,i,s){const{x:a,y:l}=n.internals.positionAbsolute,c=cr(e),u=Ja(e,r),f=Xi(e.extent)?Io(u,e.extent,c):u;let d=Io({x:a+f.x,y:l+f.y},o,c);e.extent==="parent"&&(d=KN(d,c,n));const p=lE(e,i,s),g=n.internals.z??0;return{x:d.x,y:d.y,z:g>=p?g+1:p}}function r0(e,n,r,o=[0,0]){var a;const i=[],s=new Map;for(const l of e){const c=n.get(l.parentId);if(!c)continue;const u=((a=s.get(l.parentId))==null?void 0:a.expandedRect)??Yi(c),f=ZN(u,l.rect);s.set(l.parentId,{expandedRect:f,parent:c})}return s.size>0&&s.forEach(({expandedRect:l,parent:c},u)=>{var x;const f=c.internals.positionAbsolute,d=cr(c),p=c.origin??o,g=l.x<f.x?Math.round(Math.abs(f.x-l.x)):0,v=l.y<f.y?Math.round(Math.abs(f.y-l.y)):0,w=Math.max(d.width,Math.round(l.width)),_=Math.max(d.height,Math.round(l.height)),y=(w-d.width)*p[0],b=(_-d.height)*p[1];(g>0||v>0||y||b)&&(i.push({id:u,type:"position",position:{x:c.position.x-g+y,y:c.position.y-v+b}}),(x=r.get(u))==null||x.forEach(S=>{e.some(C=>C.id===S.id)||i.push({id:S.id,type:"position",position:{x:S.position.x+g,y:S.position.y+v}})})),(d.width<l.width||d.height<l.height||g||v)&&i.push({id:u,type:"dimensions",setAttributes:!0,dimensions:{width:w+(g?p[0]*g-y:0),height:_+(v?p[1]*v-b:0)}})}),i}function lG(e,n,r,o,i,s,a){const l=o==null?void 0:o.querySelector(".xyflow__viewport");let c=!1;if(!l)return{changes:[],updatedInternals:c};const u=[],f=window.getComputedStyle(l),{m22:d}=new window.DOMMatrixReadOnly(f.transform),p=[];for(const g of e.values()){const v=n.get(g.id);if(!v)continue;if(v.hidden){n.set(v.id,{...v,internals:{...v.internals,handleBounds:void 0}}),c=!0;continue}const w=Qg(g.nodeElement),_=v.measured.width!==w.width||v.measured.height!==w.height;if(!!(w.width&&w.height&&(_||!v.internals.handleBounds||g.force))){const b=g.nodeElement.getBoundingClientRect(),x=Xi(v.extent)?v.extent:s;let{positionAbsolute:S}=v.internals;v.parentId&&v.extent==="parent"?S=KN(S,w,n.get(v.parentId)):x&&(S=Io(S,x,w));const C={...v,measured:w,internals:{...v.internals,positionAbsolute:S,handleBounds:{source:Fx("source",g.nodeElement,b,d,v.id),target:Fx("target",g.nodeElement,b,d,v.id)}}};n.set(v.id,C),v.parentId&&n0(C,n,r,{nodeOrigin:i,zIndexMode:a}),c=!0,_&&(u.push({id:v.id,type:"dimensions",dimensions:w}),v.expandParent&&v.parentId&&p.push({id:v.id,parentId:v.parentId,rect:Yi(C,i)}))}}if(p.length>0){const g=r0(p,n,r,i);u.push(...g)}return{changes:u,updatedInternals:c}}async function cG({delta:e,panZoom:n,transform:r,translateExtent:o,width:i,height:s}){if(!n||!e.x&&!e.y)return Promise.resolve(!1);const a=await n.setViewportConstrained({x:r[0]+e.x,y:r[1]+e.y,zoom:r[2]},[[0,0],[i,s]],o),l=!!a&&(a.x!==r[0]||a.y!==r[1]||a.k!==r[2]);return Promise.resolve(l)}function Yx(e,n,r,o,i,s){let a=i;const l=o.get(a)||new Map;o.set(a,l.set(r,n)),a=`${i}-${e}`;const c=o.get(a)||new Map;if(o.set(a,c.set(r,n)),s){a=`${i}-${e}-${s}`;const u=o.get(a)||new Map;o.set(a,u.set(r,n))}}function cE(e,n,r){e.clear(),n.clear();for(const o of r){const{source:i,target:s,sourceHandle:a=null,targetHandle:l=null}=o,c={edgeId:o.id,source:i,target:s,sourceHandle:a,targetHandle:l},u=`${i}-${a}--${s}-${l}`,f=`${s}-${l}--${i}-${a}`;Yx("source",c,f,e,i,a),Yx("target",c,u,e,s,l),n.set(o.id,o)}}function uE(e,n){if(!e.parentId)return!1;const r=n.get(e.parentId);return r?r.selected?!0:uE(r,n):!1}function Xx(e,n,r){var i;let o=e;do{if((i=o==null?void 0:o.matches)!=null&&i.call(o,n))return!0;if(o===r)return!1;o=o==null?void 0:o.parentElement}while(o);return!1}function uG(e,n,r,o){const i=new Map;for(const[s,a]of e)if((a.selected||a.id===o)&&(!a.parentId||!uE(a,e))&&(a.draggable||n&&typeof a.draggable>"u")){const l=e.get(s);l&&i.set(s,{id:s,position:l.position||{x:0,y:0},distance:{x:r.x-l.internals.positionAbsolute.x,y:r.y-l.internals.positionAbsolute.y},extent:l.extent,parentId:l.parentId,origin:l.origin,expandParent:l.expandParent,internals:{positionAbsolute:l.internals.positionAbsolute||{x:0,y:0}},measured:{width:l.measured.width??0,height:l.measured.height??0}})}return i}function Uf({nodeId:e,dragItems:n,nodeLookup:r,dragging:o=!0}){var a,l,c;const i=[];for(const[u,f]of n){const d=(a=r.get(u))==null?void 0:a.internals.userNode;d&&i.push({...d,position:f.position,dragging:o})}if(!e)return[i[0],i];const s=(l=r.get(e))==null?void 0:l.internals.userNode;return[s?{...s,position:((c=n.get(e))==null?void 0:c.position)||s.position,dragging:o}:i[0],i]}function dG({dragItems:e,snapGrid:n,x:r,y:o}){const i=e.values().next().value;if(!i)return null;const s={x:r-i.distance.x,y:o-i.distance.y},a=tl(s,n);return{x:a.x-s.x,y:a.y-s.y}}function fG({onNodeMouseDown:e,getStoreItems:n,onDragStart:r,onDrag:o,onDragStop:i}){let s={x:null,y:null},a=0,l=new Map,c=!1,u={x:0,y:0},f=null,d=!1,p=null,g=!1,v=!1,w=null;function _({noDragClassName:b,handleSelector:x,domNode:S,isSelectable:C,nodeId:k,nodeClickDistance:N=0}){p=st(S);function E({x:D,y:V}){const{nodeLookup:j,nodeExtent:L,snapGrid:I,snapToGrid:z,nodeOrigin:M,onNodeDrag:R,onSelectionDrag:O,onError:W,updateNodePositions:$}=n();s={x:D,y:V};let X=!1;const F=l.size>1,H=F&&L?Ah(el(l)):null,G=F&&z?dG({dragItems:l,snapGrid:I,x:D,y:V}):null;for(const[U,Y]of l){if(!j.has(U))continue;let q={x:D-Y.distance.x,y:V-Y.distance.y};z&&(q=G?{x:Math.round(q.x+G.x),y:Math.round(q.y+G.y)}:tl(q,I));let te=null;if(F&&L&&!Y.extent&&H){const{positionAbsolute:ne}=Y.internals,ue=ne.x-H.x+L[0][0],ye=ne.x+Y.measured.width-H.x2+L[1][0],pe=ne.y-H.y+L[0][1],Ne=ne.y+Y.measured.height-H.y2+L[1][1];te=[[ue,pe],[ye,Ne]]}const{position:J,positionAbsolute:Z}=XN({nodeId:U,nextPosition:q,nodeLookup:j,nodeExtent:te||L,nodeOrigin:M,onError:W});X=X||Y.position.x!==J.x||Y.position.y!==J.y,Y.position=J,Y.internals.positionAbsolute=Z}if(v=v||X,!!X&&($(l,!0),w&&(o||R||!k&&O))){const[U,Y]=Uf({nodeId:k,dragItems:l,nodeLookup:j});o==null||o(w,l,U,Y),R==null||R(w,U,Y),k||O==null||O(w,Y)}}async function P(){if(!f)return;const{transform:D,panBy:V,autoPanSpeed:j,autoPanOnNodeDrag:L}=n();if(!L){c=!1,cancelAnimationFrame(a);return}const[I,z]=qN(u,f,j);(I!==0||z!==0)&&(s.x=(s.x??0)-I/D[2],s.y=(s.y??0)-z/D[2],await V({x:I,y:z})&&E(s)),a=requestAnimationFrame(P)}function T(D){var F;const{nodeLookup:V,multiSelectionActive:j,nodesDraggable:L,transform:I,snapGrid:z,snapToGrid:M,selectNodesOnDrag:R,onNodeDragStart:O,onSelectionDragStart:W,unselectNodesAndEdges:$}=n();d=!0,(!R||!C)&&!j&&k&&((F=V.get(k))!=null&&F.selected||$()),C&&R&&k&&(e==null||e(k));const X=qs(D.sourceEvent,{transform:I,snapGrid:z,snapToGrid:M,containerBounds:f});if(s=X,l=uG(V,L,X,k),l.size>0&&(r||O||!k&&W)){const[H,G]=Uf({nodeId:k,dragItems:l,nodeLookup:V});r==null||r(D.sourceEvent,l,H,G),O==null||O(D.sourceEvent,H,G),k||W==null||W(D.sourceEvent,G)}}const A=Mg().clickDistance(N).on("start",D=>{const{domNode:V,nodeDragThreshold:j,transform:L,snapGrid:I,snapToGrid:z}=n();f=(V==null?void 0:V.getBoundingClientRect())||null,g=!1,v=!1,w=D.sourceEvent,j===0&&T(D),s=qs(D.sourceEvent,{transform:L,snapGrid:I,snapToGrid:z,containerBounds:f}),u=dn(D.sourceEvent,f)}).on("drag",D=>{const{autoPanOnNodeDrag:V,transform:j,snapGrid:L,snapToGrid:I,nodeDragThreshold:z,nodeLookup:M}=n(),R=qs(D.sourceEvent,{transform:j,snapGrid:L,snapToGrid:I,containerBounds:f});if(w=D.sourceEvent,(D.sourceEvent.type==="touchmove"&&D.sourceEvent.touches.length>1||k&&!M.has(k))&&(g=!0),!g){if(!c&&V&&d&&(c=!0,P()),!d){const O=dn(D.sourceEvent,f),W=O.x-u.x,$=O.y-u.y;Math.sqrt(W*W+$*$)>z&&T(D)}(s.x!==R.xSnapped||s.y!==R.ySnapped)&&l&&d&&(u=dn(D.sourceEvent,f),E(R))}}).on("end",D=>{if(!(!d||g)&&(c=!1,d=!1,cancelAnimationFrame(a),l.size>0)){const{nodeLookup:V,updateNodePositions:j,onNodeDragStop:L,onSelectionDragStop:I}=n();if(v&&(j(l,!1),v=!1),i||L||!k&&I){const[z,M]=Uf({nodeId:k,dragItems:l,nodeLookup:V,dragging:!1});i==null||i(D.sourceEvent,l,z,M),L==null||L(D.sourceEvent,z,M),k||I==null||I(D.sourceEvent,M)}}}).filter(D=>{const V=D.target;return!D.button&&(!b||!Xx(V,`.${b}`,S))&&(!x||Xx(V,x,S))});p.call(A)}function y(){p==null||p.on(".drag",null)}return{update:_,destroy:y}}function pG(e,n,r){const o=[],i={x:e.x-r,y:e.y-r,width:r*2,height:r*2};for(const s of n.values())Ea(i,Yi(s))>0&&o.push(s);return o}const hG=250;function mG(e,n,r,o){var l,c;let i=[],s=1/0;const a=pG(e,r,n+hG);for(const u of a){const f=[...((l=u.internals.handleBounds)==null?void 0:l.source)??[],...((c=u.internals.handleBounds)==null?void 0:c.target)??[]];for(const d of f){if(o.nodeId===d.nodeId&&o.type===d.type&&o.id===d.id)continue;const{x:p,y:g}=$o(u,d,d.position,!0),v=Math.sqrt(Math.pow(p-e.x,2)+Math.pow(g-e.y,2));v>n||(v<s?(i=[{...d,x:p,y:g}],s=v):v===s&&i.push({...d,x:p,y:g}))}}if(!i.length)return null;if(i.length>1){const u=o.type==="source"?"target":"source";return i.find(f=>f.type===u)??i[0]}return i[0]}function dE(e,n,r,o,i,s=!1){var u,f,d;const a=o.get(e);if(!a)return null;const l=i==="strict"?(u=a.internals.handleBounds)==null?void 0:u[n]:[...((f=a.internals.handleBounds)==null?void 0:f.source)??[],...((d=a.internals.handleBounds)==null?void 0:d.target)??[]],c=(r?l==null?void 0:l.find(p=>p.id===r):l==null?void 0:l[0])??null;return c&&s?{...c,...$o(a,c,c.position,!0)}:c}function fE(e,n){return e||(n!=null&&n.classList.contains("target")?"target":n!=null&&n.classList.contains("source")?"source":null)}function gG(e,n){let r=null;return n?r=!0:e&&!n&&(r=!1),r}const pE=()=>!0;function yG(e,{connectionMode:n,connectionRadius:r,handleId:o,nodeId:i,edgeUpdaterType:s,isTarget:a,domNode:l,nodeLookup:c,lib:u,autoPanOnConnect:f,flowId:d,panBy:p,cancelConnection:g,onConnectStart:v,onConnect:w,onConnectEnd:_,isValidConnection:y=pE,onReconnectEnd:b,updateConnection:x,getTransform:S,getFromHandle:C,autoPanSpeed:k,dragThreshold:N=1,handleDomNode:E}){const P=eE(e.target);let T=0,A;const{x:D,y:V}=dn(e),j=fE(s,E),L=l==null?void 0:l.getBoundingClientRect();let I=!1;if(!L||!j)return;const z=dE(i,j,o,c,n);if(!z)return;let M=dn(e,L),R=!1,O=null,W=!1,$=null;function X(){if(!f||!L)return;const[J,Z]=qN(M,L,k);p({x:J,y:Z}),T=requestAnimationFrame(X)}const F={...z,nodeId:i,type:j,position:z.position},H=c.get(i);let U={inProgress:!0,isValid:null,from:$o(H,F,ce.Left,!0),fromHandle:F,fromPosition:F.position,fromNode:H,to:M,toHandle:null,toPosition:Ox[F.position],toNode:null,pointer:M};function Y(){I=!0,x(U),v==null||v(e,{nodeId:i,handleId:o,handleType:j})}N===0&&Y();function q(J){if(!I){const{x:Ne,y:mt}=dn(J),qe=Ne-D,Ft=mt-V;if(!(qe*qe+Ft*Ft>N*N))return;Y()}if(!C()||!F){te(J);return}const Z=S();M=dn(J,L),A=mG(nl(M,Z,!1,[1,1]),r,c,F),R||(X(),R=!0);const ne=hE(J,{handle:A,connectionMode:n,fromNodeId:i,fromHandleId:o,fromType:a?"target":"source",isValidConnection:y,doc:P,lib:u,flowId:d,nodeLookup:c});$=ne.handleDomNode,O=ne.connection,W=gG(!!A,ne.isValid);const ue=c.get(i),ye=ue?$o(ue,F,ce.Left,!0):U.from,pe={...U,from:ye,isValid:W,to:ne.toHandle&&W?Pu({x:ne.toHandle.x,y:ne.toHandle.y},Z):M,toHandle:ne.toHandle,toPosition:W&&ne.toHandle?ne.toHandle.position:Ox[F.position],toNode:ne.toHandle?c.get(ne.toHandle.nodeId):null,pointer:M};x(pe),U=pe}function te(J){if(!("touches"in J&&J.touches.length>0)){if(I){(A||$)&&O&&W&&(w==null||w(O));const{inProgress:Z,...ne}=U,ue={...ne,toPosition:U.toHandle?U.toPosition:null};_==null||_(J,ue),s&&(b==null||b(J,ue))}g(),cancelAnimationFrame(T),R=!1,W=!1,O=null,$=null,P.removeEventListener("mousemove",q),P.removeEventListener("mouseup",te),P.removeEventListener("touchmove",q),P.removeEventListener("touchend",te)}}P.addEventListener("mousemove",q),P.addEventListener("mouseup",te),P.addEventListener("touchmove",q),P.addEventListener("touchend",te)}function hE(e,{handle:n,connectionMode:r,fromNodeId:o,fromHandleId:i,fromType:s,doc:a,lib:l,flowId:c,isValidConnection:u=pE,nodeLookup:f}){const d=s==="target",p=n?a.querySelector(`.${l}-flow__handle[data-id="${c}-${n==null?void 0:n.nodeId}-${n==null?void 0:n.id}-${n==null?void 0:n.type}"]`):null,{x:g,y:v}=dn(e),w=a.elementFromPoint(g,v),_=w!=null&&w.classList.contains(`${l}-flow__handle`)?w:p,y={handleDomNode:_,isValid:!1,connection:null,toHandle:null};if(_){const b=fE(void 0,_),x=_.getAttribute("data-nodeid"),S=_.getAttribute("data-handleid"),C=_.classList.contains("connectable"),k=_.classList.contains("connectableend");if(!x||!b)return y;const N={source:d?x:o,sourceHandle:d?S:i,target:d?o:x,targetHandle:d?i:S};y.connection=N;const P=C&&k&&(r===Ui.Strict?d&&b==="source"||!d&&b==="target":x!==o||S!==i);y.isValid=P&&u(N),y.toHandle=dE(x,b,S,f,r,!0)}return y}const Oh={onPointerDown:yG,isValid:hE};function vG({domNode:e,panZoom:n,getTransform:r,getViewScale:o}){const i=st(e);function s({translateExtent:l,width:c,height:u,zoomStep:f=1,pannable:d=!0,zoomable:p=!0,inversePan:g=!1}){const v=x=>{if(x.sourceEvent.type!=="wheel"||!n)return;const S=r(),C=x.sourceEvent.ctrlKey&&Pa()?10:1,k=-x.sourceEvent.deltaY*(x.sourceEvent.deltaMode===1?.05:x.sourceEvent.deltaMode?1:.002)*f,N=S[2]*Math.pow(2,k*C);n.scaleTo(N)};let w=[0,0];const _=x=>{(x.sourceEvent.type==="mousedown"||x.sourceEvent.type==="touchstart")&&(w=[x.sourceEvent.clientX??x.sourceEvent.touches[0].clientX,x.sourceEvent.clientY??x.sourceEvent.touches[0].clientY])},y=x=>{const S=r();if(x.sourceEvent.type!=="mousemove"&&x.sourceEvent.type!=="touchmove"||!n)return;const C=[x.sourceEvent.clientX??x.sourceEvent.touches[0].clientX,x.sourceEvent.clientY??x.sourceEvent.touches[0].clientY],k=[C[0]-w[0],C[1]-w[1]];w=C;const N=o()*Math.max(S[2],Math.log(S[2]))*(g?-1:1),E={x:S[0]-k[0]*N,y:S[1]-k[1]*N},P=[[0,0],[c,u]];n.setViewportConstrained({x:E.x,y:E.y,zoom:S[2]},P,l)},b=Dg().on("start",_).on("zoom",d?y:null).on("zoom.wheel",p?v:null);i.call(b,{})}function a(){i.on("zoom",null)}return{update:s,destroy:a,pointer:Wt}}const $d=e=>({x:e.x,y:e.y,zoom:e.k}),Gf=({x:e,y:n,zoom:r})=>Pd.translate(e,n).scale(r),gi=(e,n)=>e.target.closest(`.${n}`),mE=(e,n)=>n===2&&Array.isArray(e)&&e.includes(2),xG=e=>((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2,Yf=(e,n=0,r=xG,o=()=>{})=>{const i=typeof n=="number"&&n>0;return i||o(),i?e.transition().duration(n).ease(r).on("end",o):e},gE=e=>{const n=e.ctrlKey&&Pa()?10:1;return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*n};function wG({zoomPanValues:e,noWheelClassName:n,d3Selection:r,d3Zoom:o,panOnScrollMode:i,panOnScrollSpeed:s,zoomOnPinch:a,onPanZoomStart:l,onPanZoom:c,onPanZoomEnd:u}){return f=>{if(gi(f,n))return f.ctrlKey&&f.preventDefault(),!1;f.preventDefault(),f.stopImmediatePropagation();const d=r.property("__zoom").k||1;if(f.ctrlKey&&a){const _=Wt(f),y=gE(f),b=d*Math.pow(2,y);o.scaleTo(r,b,_,f);return}const p=f.deltaMode===1?20:1;let g=i===_o.Vertical?0:f.deltaX*p,v=i===_o.Horizontal?0:f.deltaY*p;!Pa()&&f.shiftKey&&i!==_o.Vertical&&(g=f.deltaY*p,v=0),o.translateBy(r,-(g/d)*s,-(v/d)*s,{internal:!0});const w=$d(r.property("__zoom"));clearTimeout(e.panScrollTimeout),e.isPanScrolling?(c==null||c(f,w),e.panScrollTimeout=setTimeout(()=>{u==null||u(f,w),e.isPanScrolling=!1},150)):(e.isPanScrolling=!0,l==null||l(f,w))}}function bG({noWheelClassName:e,preventScrolling:n,d3ZoomHandler:r}){return function(o,i){const s=o.type==="wheel",a=!n&&s&&!o.ctrlKey,l=gi(o,e);if(o.ctrlKey&&s&&l&&o.preventDefault(),a||l)return null;o.preventDefault(),r.call(this,o,i)}}function _G({zoomPanValues:e,onDraggingChange:n,onPanZoomStart:r}){return o=>{var s,a,l;if((s=o.sourceEvent)!=null&&s.internal)return;const i=$d(o.transform);e.mouseButton=((a=o.sourceEvent)==null?void 0:a.button)||0,e.isZoomingOrPanning=!0,e.prevViewport=i,((l=o.sourceEvent)==null?void 0:l.type)==="mousedown"&&n(!0),r&&(r==null||r(o.sourceEvent,i))}}function SG({zoomPanValues:e,panOnDrag:n,onPaneContextMenu:r,onTransformChange:o,onPanZoom:i}){return s=>{var a,l;e.usedRightMouseButton=!!(r&&mE(n,e.mouseButton??0)),(a=s.sourceEvent)!=null&&a.sync||o([s.transform.x,s.transform.y,s.transform.k]),i&&!((l=s.sourceEvent)!=null&&l.internal)&&(i==null||i(s.sourceEvent,$d(s.transform)))}}function CG({zoomPanValues:e,panOnDrag:n,panOnScroll:r,onDraggingChange:o,onPanZoomEnd:i,onPaneContextMenu:s}){return a=>{var l;if(!((l=a.sourceEvent)!=null&&l.internal)&&(e.isZoomingOrPanning=!1,s&&mE(n,e.mouseButton??0)&&!e.usedRightMouseButton&&a.sourceEvent&&s(a.sourceEvent),e.usedRightMouseButton=!1,o(!1),i)){const c=$d(a.transform);e.prevViewport=c,clearTimeout(e.timerId),e.timerId=setTimeout(()=>{i==null||i(a.sourceEvent,c)},r?150:0)}}}function kG({zoomActivationKeyPressed:e,zoomOnScroll:n,zoomOnPinch:r,panOnDrag:o,panOnScroll:i,zoomOnDoubleClick:s,userSelectionActive:a,noWheelClassName:l,noPanClassName:c,lib:u,connectionInProgress:f}){return d=>{var _;const p=e||n,g=r&&d.ctrlKey,v=d.type==="wheel";if(d.button===1&&d.type==="mousedown"&&(gi(d,`${u}-flow__node`)||gi(d,`${u}-flow__edge`)))return!0;if(!o&&!p&&!i&&!s&&!r||a||f&&!v||gi(d,l)&&v||gi(d,c)&&(!v||i&&v&&!e)||!r&&d.ctrlKey&&v)return!1;if(!r&&d.type==="touchstart"&&((_=d.touches)==null?void 0:_.length)>1)return d.preventDefault(),!1;if(!p&&!i&&!g&&v||!o&&(d.type==="mousedown"||d.type==="touchstart")||Array.isArray(o)&&!o.includes(d.button)&&d.type==="mousedown")return!1;const w=Array.isArray(o)&&o.includes(d.button)||!d.button||d.button<=1;return(!d.ctrlKey||v)&&w}}function NG({domNode:e,minZoom:n,maxZoom:r,translateExtent:o,viewport:i,onPanZoom:s,onPanZoomStart:a,onPanZoomEnd:l,onDraggingChange:c}){const u={isZoomingOrPanning:!1,usedRightMouseButton:!1,prevViewport:{},mouseButton:0,timerId:void 0,panScrollTimeout:void 0,isPanScrolling:!1},f=e.getBoundingClientRect(),d=Dg().scaleExtent([n,r]).translateExtent(o),p=st(e).call(d);b({x:i.x,y:i.y,zoom:Gi(i.zoom,n,r)},[[0,0],[f.width,f.height]],o);const g=p.on("wheel.zoom"),v=p.on("dblclick.zoom");d.wheelDelta(gE);function w(A,D){return p?new Promise(V=>{d==null||d.interpolate((D==null?void 0:D.interpolate)==="linear"?Us:wc).transform(Yf(p,D==null?void 0:D.duration,D==null?void 0:D.ease,()=>V(!0)),A)}):Promise.resolve(!1)}function _({noWheelClassName:A,noPanClassName:D,onPaneContextMenu:V,userSelectionActive:j,panOnScroll:L,panOnDrag:I,panOnScrollMode:z,panOnScrollSpeed:M,preventScrolling:R,zoomOnPinch:O,zoomOnScroll:W,zoomOnDoubleClick:$,zoomActivationKeyPressed:X,lib:F,onTransformChange:H,connectionInProgress:G,paneClickDistance:U,selectionOnDrag:Y}){j&&!u.isZoomingOrPanning&&y();const q=L&&!X&&!j;d.clickDistance(Y?1/0:!un(U)||U<0?0:U);const te=q?wG({zoomPanValues:u,noWheelClassName:A,d3Selection:p,d3Zoom:d,panOnScrollMode:z,panOnScrollSpeed:M,zoomOnPinch:O,onPanZoomStart:a,onPanZoom:s,onPanZoomEnd:l}):bG({noWheelClassName:A,preventScrolling:R,d3ZoomHandler:g});if(p.on("wheel.zoom",te,{passive:!1}),!j){const Z=_G({zoomPanValues:u,onDraggingChange:c,onPanZoomStart:a});d.on("start",Z);const ne=SG({zoomPanValues:u,panOnDrag:I,onPaneContextMenu:!!V,onPanZoom:s,onTransformChange:H});d.on("zoom",ne);const ue=CG({zoomPanValues:u,panOnDrag:I,panOnScroll:L,onPaneContextMenu:V,onPanZoomEnd:l,onDraggingChange:c});d.on("end",ue)}const J=kG({zoomActivationKeyPressed:X,panOnDrag:I,zoomOnScroll:W,panOnScroll:L,zoomOnDoubleClick:$,zoomOnPinch:O,userSelectionActive:j,noPanClassName:D,noWheelClassName:A,lib:F,connectionInProgress:G});d.filter(J),$?p.on("dblclick.zoom",v):p.on("dblclick.zoom",null)}function y(){d.on("zoom",null)}async function b(A,D,V){const j=Gf(A),L=d==null?void 0:d.constrain()(j,D,V);return L&&await w(L),new Promise(I=>I(L))}async function x(A,D){const V=Gf(A);return await w(V,D),new Promise(j=>j(V))}function S(A){if(p){const D=Gf(A),V=p.property("__zoom");(V.k!==A.zoom||V.x!==A.x||V.y!==A.y)&&(d==null||d.transform(p,D,null,{sync:!0}))}}function C(){const A=p?on(p.node()):{x:0,y:0,k:1};return{x:A.x,y:A.y,zoom:A.k}}function k(A,D){return p?new Promise(V=>{d==null||d.interpolate((D==null?void 0:D.interpolate)==="linear"?Us:wc).scaleTo(Yf(p,D==null?void 0:D.duration,D==null?void 0:D.ease,()=>V(!0)),A)}):Promise.resolve(!1)}function N(A,D){return p?new Promise(V=>{d==null||d.interpolate((D==null?void 0:D.interpolate)==="linear"?Us:wc).scaleBy(Yf(p,D==null?void 0:D.duration,D==null?void 0:D.ease,()=>V(!0)),A)}):Promise.resolve(!1)}function E(A){d==null||d.scaleExtent(A)}function P(A){d==null||d.translateExtent(A)}function T(A){const D=!un(A)||A<0?0:A;d==null||d.clickDistance(D)}return{update:_,destroy:y,setViewport:x,setViewportConstrained:b,getViewport:C,scaleTo:k,scaleBy:N,setScaleExtent:E,setTranslateExtent:P,syncViewport:S,setClickDistance:T}}var Ki;(function(e){e.Line="line",e.Handle="handle"})(Ki||(Ki={}));function EG({width:e,prevWidth:n,height:r,prevHeight:o,affectsX:i,affectsY:s}){const a=e-n,l=r-o,c=[a>0?1:a<0?-1:0,l>0?1:l<0?-1:0];return a&&i&&(c[0]=c[0]*-1),l&&s&&(c[1]=c[1]*-1),c}function Kx(e){const n=e.includes("right")||e.includes("left"),r=e.includes("bottom")||e.includes("top"),o=e.includes("left"),i=e.includes("top");return{isHorizontal:n,isVertical:r,affectsX:o,affectsY:i}}function vr(e,n){return Math.max(0,n-e)}function xr(e,n){return Math.max(0,e-n)}function Kl(e,n,r){return Math.max(0,n-e,e-r)}function qx(e,n){return e?!n:n}function PG(e,n,r,o,i,s,a,l){let{affectsX:c,affectsY:u}=n;const{isHorizontal:f,isVertical:d}=n,p=f&&d,{xSnapped:g,ySnapped:v}=r,{minWidth:w,maxWidth:_,minHeight:y,maxHeight:b}=o,{x,y:S,width:C,height:k,aspectRatio:N}=e;let E=Math.floor(f?g-e.pointerX:0),P=Math.floor(d?v-e.pointerY:0);const T=C+(c?-E:E),A=k+(u?-P:P),D=-s[0]*C,V=-s[1]*k;let j=Kl(T,w,_),L=Kl(A,y,b);if(a){let M=0,R=0;c&&E<0?M=vr(x+E+D,a[0][0]):!c&&E>0&&(M=xr(x+T+D,a[1][0])),u&&P<0?R=vr(S+P+V,a[0][1]):!u&&P>0&&(R=xr(S+A+V,a[1][1])),j=Math.max(j,M),L=Math.max(L,R)}if(l){let M=0,R=0;c&&E>0?M=xr(x+E,l[0][0]):!c&&E<0&&(M=vr(x+T,l[1][0])),u&&P>0?R=xr(S+P,l[0][1]):!u&&P<0&&(R=vr(S+A,l[1][1])),j=Math.max(j,M),L=Math.max(L,R)}if(i){if(f){const M=Kl(T/N,y,b)*N;if(j=Math.max(j,M),a){let R=0;!c&&!u||c&&!u&&p?R=xr(S+V+T/N,a[1][1])*N:R=vr(S+V+(c?E:-E)/N,a[0][1])*N,j=Math.max(j,R)}if(l){let R=0;!c&&!u||c&&!u&&p?R=vr(S+T/N,l[1][1])*N:R=xr(S+(c?E:-E)/N,l[0][1])*N,j=Math.max(j,R)}}if(d){const M=Kl(A*N,w,_)/N;if(L=Math.max(L,M),a){let R=0;!c&&!u||u&&!c&&p?R=xr(x+A*N+D,a[1][0])/N:R=vr(x+(u?P:-P)*N+D,a[0][0])/N,L=Math.max(L,R)}if(l){let R=0;!c&&!u||u&&!c&&p?R=vr(x+A*N,l[1][0])/N:R=xr(x+(u?P:-P)*N,l[0][0])/N,L=Math.max(L,R)}}}P=P+(P<0?L:-L),E=E+(E<0?j:-j),i&&(p?T>A*N?P=(qx(c,u)?-E:E)/N:E=(qx(c,u)?-P:P)*N:f?(P=E/N,u=c):(E=P*N,c=u));const I=c?x+E:x,z=u?S+P:S;return{width:C+(c?-E:E),height:k+(u?-P:P),x:s[0]*E*(c?-1:1)+I,y:s[1]*P*(u?-1:1)+z}}const yE={width:0,height:0,x:0,y:0},jG={...yE,pointerX:0,pointerY:0,aspectRatio:1};function MG(e){return[[0,0],[e.measured.width,e.measured.height]]}function RG(e,n,r){const o=n.position.x+e.position.x,i=n.position.y+e.position.y,s=e.measured.width??0,a=e.measured.height??0,l=r[0]*s,c=r[1]*a;return[[o-l,i-c],[o+s-l,i+a-c]]}function AG({domNode:e,nodeId:n,getStoreItems:r,onChange:o,onEnd:i}){const s=st(e);let a={controlDirection:Kx("bottom-right"),boundaries:{minWidth:0,minHeight:0,maxWidth:Number.MAX_VALUE,maxHeight:Number.MAX_VALUE},resizeDirection:void 0,keepAspectRatio:!1};function l({controlPosition:u,boundaries:f,keepAspectRatio:d,resizeDirection:p,onResizeStart:g,onResize:v,onResizeEnd:w,shouldResize:_}){let y={...yE},b={...jG};a={boundaries:f,resizeDirection:p,keepAspectRatio:d,controlDirection:Kx(u)};let x,S=null,C=[],k,N,E,P=!1;const T=Mg().on("start",A=>{const{nodeLookup:D,transform:V,snapGrid:j,snapToGrid:L,nodeOrigin:I,paneDomNode:z}=r();if(x=D.get(n),!x)return;S=(z==null?void 0:z.getBoundingClientRect())??null;const{xSnapped:M,ySnapped:R}=qs(A.sourceEvent,{transform:V,snapGrid:j,snapToGrid:L,containerBounds:S});y={width:x.measured.width??0,height:x.measured.height??0,x:x.position.x??0,y:x.position.y??0},b={...y,pointerX:M,pointerY:R,aspectRatio:y.width/y.height},k=void 0,x.parentId&&(x.extent==="parent"||x.expandParent)&&(k=D.get(x.parentId),N=k&&x.extent==="parent"?MG(k):void 0),C=[],E=void 0;for(const[O,W]of D)if(W.parentId===n&&(C.push({id:O,position:{...W.position},extent:W.extent}),W.extent==="parent"||W.expandParent)){const $=RG(W,x,W.origin??I);E?E=[[Math.min($[0][0],E[0][0]),Math.min($[0][1],E[0][1])],[Math.max($[1][0],E[1][0]),Math.max($[1][1],E[1][1])]]:E=$}g==null||g(A,{...y})}).on("drag",A=>{const{transform:D,snapGrid:V,snapToGrid:j,nodeOrigin:L}=r(),I=qs(A.sourceEvent,{transform:D,snapGrid:V,snapToGrid:j,containerBounds:S}),z=[];if(!x)return;const{x:M,y:R,width:O,height:W}=y,$={},X=x.origin??L,{width:F,height:H,x:G,y:U}=PG(b,a.controlDirection,I,a.boundaries,a.keepAspectRatio,X,N,E),Y=F!==O,q=H!==W,te=G!==M&&Y,J=U!==R&&q;if(!te&&!J&&!Y&&!q)return;if((te||J||X[0]===1||X[1]===1)&&($.x=te?G:y.x,$.y=J?U:y.y,y.x=$.x,y.y=$.y,C.length>0)){const ye=G-M,pe=U-R;for(const Ne of C)Ne.position={x:Ne.position.x-ye+X[0]*(F-O),y:Ne.position.y-pe+X[1]*(H-W)},z.push(Ne)}if((Y||q)&&($.width=Y&&(!a.resizeDirection||a.resizeDirection==="horizontal")?F:y.width,$.height=q&&(!a.resizeDirection||a.resizeDirection==="vertical")?H:y.height,y.width=$.width,y.height=$.height),k&&x.expandParent){const ye=X[0]*($.width??0);$.x&&$.x<ye&&(y.x=ye,b.x=b.x-($.x-ye));const pe=X[1]*($.height??0);$.y&&$.y<pe&&(y.y=pe,b.y=b.y-($.y-pe))}const Z=EG({width:y.width,prevWidth:O,height:y.height,prevHeight:W,affectsX:a.controlDirection.affectsX,affectsY:a.controlDirection.affectsY}),ne={...y,direction:Z};(_==null?void 0:_(A,ne))!==!1&&(P=!0,v==null||v(A,ne),o($,z))}).on("end",A=>{P&&(w==null||w(A,{...y}),i==null||i({...y}),P=!1)});s.call(T)}function c(){s.on(".drag",null)}return{update:l,destroy:c}}var vE={exports:{}},xE={};/**
425
- * @license React
426
- * use-sync-external-store-shim/with-selector.production.js
427
- *
428
- * Copyright (c) Meta Platforms, Inc. and affiliates.
429
- *
430
- * This source code is licensed under the MIT license found in the
431
- * LICENSE file in the root directory of this source tree.
432
- */var Od=h,TG=b_;function IG(e,n){return e===n&&(e!==0||1/e===1/n)||e!==e&&n!==n}var $G=typeof Object.is=="function"?Object.is:IG,OG=TG.useSyncExternalStore,DG=Od.useRef,LG=Od.useEffect,zG=Od.useMemo,FG=Od.useDebugValue;xE.useSyncExternalStoreWithSelector=function(e,n,r,o,i){var s=DG(null);if(s.current===null){var a={hasValue:!1,value:null};s.current=a}else a=s.current;s=zG(function(){function c(g){if(!u){if(u=!0,f=g,g=o(g),i!==void 0&&a.hasValue){var v=a.value;if(i(v,g))return d=v}return d=g}if(v=d,$G(f,g))return v;var w=o(g);return i!==void 0&&i(v,w)?(f=g,v):(f=g,d=w)}var u=!1,f,d,p=r===void 0?null:r;return[function(){return c(n())},p===null?void 0:function(){return c(p())}]},[n,r,o,i]);var l=OG(e,s[0],s[1]);return LG(function(){a.hasValue=!0,a.value=l},[l]),FG(l),l};vE.exports=xE;var VG=vE.exports;const BG=Au(VG),HG={},Zx=e=>{let n;const r=new Set,o=(f,d)=>{const p=typeof f=="function"?f(n):f;if(!Object.is(p,n)){const g=n;n=d??(typeof p!="object"||p===null)?p:Object.assign({},n,p),r.forEach(v=>v(n,g))}},i=()=>n,c={setState:o,getState:i,getInitialState:()=>u,subscribe:f=>(r.add(f),()=>r.delete(f)),destroy:()=>{(HG?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),r.clear()}},u=n=e(o,i,c);return c},WG=e=>e?Zx(e):Zx,{useDebugValue:UG}=ot,{useSyncExternalStoreWithSelector:GG}=BG,YG=e=>e;function wE(e,n=YG,r){const o=GG(e.subscribe,e.getState,e.getServerState||e.getInitialState,n,r);return UG(o),o}const Qx=(e,n)=>{const r=WG(e),o=(i,s=n)=>wE(r,i,s);return Object.assign(o,r),o},XG=(e,n)=>e?Qx(e,n):Qx;function Te(e,n){if(Object.is(e,n))return!0;if(typeof e!="object"||e===null||typeof n!="object"||n===null)return!1;if(e instanceof Map&&n instanceof Map){if(e.size!==n.size)return!1;for(const[o,i]of e)if(!Object.is(i,n.get(o)))return!1;return!0}if(e instanceof Set&&n instanceof Set){if(e.size!==n.size)return!1;for(const o of e)if(!n.has(o))return!1;return!0}const r=Object.keys(e);if(r.length!==Object.keys(n).length)return!1;for(const o of r)if(!Object.prototype.hasOwnProperty.call(n,o)||!Object.is(e[o],n[o]))return!1;return!0}const Dd=h.createContext(null),KG=Dd.Provider,bE=In.error001();function xe(e,n){const r=h.useContext(Dd);if(r===null)throw new Error(bE);return wE(r,e,n)}function Ie(){const e=h.useContext(Dd);if(e===null)throw new Error(bE);return h.useMemo(()=>({getState:e.getState,setState:e.setState,subscribe:e.subscribe}),[e])}const Jx={display:"none"},qG={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},_E="react-flow__node-desc",SE="react-flow__edge-desc",ZG="react-flow__aria-live",QG=e=>e.ariaLiveMessage,JG=e=>e.ariaLabelConfig;function eY({rfId:e}){const n=xe(QG);return m.jsx("div",{id:`${ZG}-${e}`,"aria-live":"assertive","aria-atomic":"true",style:qG,children:n})}function tY({rfId:e,disableKeyboardA11y:n}){const r=xe(JG);return m.jsxs(m.Fragment,{children:[m.jsx("div",{id:`${_E}-${e}`,style:Jx,children:n?r["node.a11yDescription.default"]:r["node.a11yDescription.keyboardDisabled"]}),m.jsx("div",{id:`${SE}-${e}`,style:Jx,children:r["edge.a11yDescription.default"]}),!n&&m.jsx(eY,{rfId:e})]})}const Ld=h.forwardRef(({position:e="top-left",children:n,className:r,style:o,...i},s)=>{const a=`${e}`.split("-");return m.jsx("div",{className:Be(["react-flow__panel",r,...a]),style:o,ref:s,...i,children:n})});Ld.displayName="Panel";function nY({proOptions:e,position:n="bottom-right"}){return e!=null&&e.hideAttribution?null:m.jsx(Ld,{position:n,className:"react-flow__attribution","data-message":"Please only hide this attribution when you are subscribed to React Flow Pro: https://pro.reactflow.dev",children:m.jsx("a",{href:"https://reactflow.dev",target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution",children:"React Flow"})})}const rY=e=>{const n=[],r=[];for(const[,o]of e.nodeLookup)o.selected&&n.push(o.internals.userNode);for(const[,o]of e.edgeLookup)o.selected&&r.push(o);return{selectedNodes:n,selectedEdges:r}},ql=e=>e.id;function oY(e,n){return Te(e.selectedNodes.map(ql),n.selectedNodes.map(ql))&&Te(e.selectedEdges.map(ql),n.selectedEdges.map(ql))}function iY({onSelectionChange:e}){const n=Ie(),{selectedNodes:r,selectedEdges:o}=xe(rY,oY);return h.useEffect(()=>{const i={nodes:r,edges:o};e==null||e(i),n.getState().onSelectionChangeHandlers.forEach(s=>s(i))},[r,o,e]),null}const sY=e=>!!e.onSelectionChangeHandlers;function aY({onSelectionChange:e}){const n=xe(sY);return e||n?m.jsx(iY,{onSelectionChange:e}):null}const Dh=typeof window<"u"?h.useLayoutEffect:h.useEffect,CE=[0,0],lY={x:0,y:0,zoom:1},cY=["nodes","edges","defaultNodes","defaultEdges","onConnect","onConnectStart","onConnectEnd","onClickConnectStart","onClickConnectEnd","nodesDraggable","autoPanOnNodeFocus","nodesConnectable","nodesFocusable","edgesFocusable","edgesReconnectable","elevateNodesOnSelect","elevateEdgesOnSelect","minZoom","maxZoom","nodeExtent","onNodesChange","onEdgesChange","elementsSelectable","connectionMode","snapGrid","snapToGrid","translateExtent","connectOnClick","defaultEdgeOptions","fitView","fitViewOptions","onNodesDelete","onEdgesDelete","onDelete","onNodeDrag","onNodeDragStart","onNodeDragStop","onSelectionDrag","onSelectionDragStart","onSelectionDragStop","onMoveStart","onMove","onMoveEnd","noPanClassName","nodeOrigin","autoPanOnConnect","autoPanOnNodeDrag","onError","connectionRadius","isValidConnection","selectNodesOnDrag","nodeDragThreshold","connectionDragThreshold","onBeforeDelete","debug","autoPanSpeed","ariaLabelConfig","zIndexMode"],ew=[...cY,"rfId"],uY=e=>({setNodes:e.setNodes,setEdges:e.setEdges,setMinZoom:e.setMinZoom,setMaxZoom:e.setMaxZoom,setTranslateExtent:e.setTranslateExtent,setNodeExtent:e.setNodeExtent,reset:e.reset,setDefaultNodesAndEdges:e.setDefaultNodesAndEdges}),tw={translateExtent:ka,nodeOrigin:CE,minZoom:.5,maxZoom:2,elementsSelectable:!0,noPanClassName:"nopan",rfId:"1"};function dY(e){const{setNodes:n,setEdges:r,setMinZoom:o,setMaxZoom:i,setTranslateExtent:s,setNodeExtent:a,reset:l,setDefaultNodesAndEdges:c}=xe(uY,Te),u=Ie();Dh(()=>(c(e.defaultNodes,e.defaultEdges),()=>{f.current=tw,l()}),[]);const f=h.useRef(tw);return Dh(()=>{for(const d of ew){const p=e[d],g=f.current[d];p!==g&&(typeof e[d]>"u"||(d==="nodes"?n(p):d==="edges"?r(p):d==="minZoom"?o(p):d==="maxZoom"?i(p):d==="translateExtent"?s(p):d==="nodeExtent"?a(p):d==="ariaLabelConfig"?u.setState({ariaLabelConfig:WU(p)}):d==="fitView"?u.setState({fitViewQueued:p}):d==="fitViewOptions"?u.setState({fitViewOptions:p}):u.setState({[d]:p})))}f.current=e},ew.map(d=>e[d])),null}function nw(){return typeof window>"u"||!window.matchMedia?null:window.matchMedia("(prefers-color-scheme: dark)")}function fY(e){var o;const[n,r]=h.useState(e==="system"?null:e);return h.useEffect(()=>{if(e!=="system"){r(e);return}const i=nw(),s=()=>r(i!=null&&i.matches?"dark":"light");return s(),i==null||i.addEventListener("change",s),()=>{i==null||i.removeEventListener("change",s)}},[e]),n!==null?n:(o=nw())!=null&&o.matches?"dark":"light"}const rw=typeof document<"u"?document:null;function ja(e=null,n={target:rw,actInsideInputWithModifier:!0}){const[r,o]=h.useState(!1),i=h.useRef(!1),s=h.useRef(new Set([])),[a,l]=h.useMemo(()=>{if(e!==null){const u=(Array.isArray(e)?e:[e]).filter(d=>typeof d=="string").map(d=>d.replace("+",`
433
- `).replace(`
434
-
435
- `,`
436
- +`).split(`
437
- `)),f=u.reduce((d,p)=>d.concat(...p),[]);return[u,f]}return[[],[]]},[e]);return h.useEffect(()=>{const c=(n==null?void 0:n.target)??rw,u=(n==null?void 0:n.actInsideInputWithModifier)??!0;if(e!==null){const f=g=>{var _,y;if(i.current=g.ctrlKey||g.metaKey||g.shiftKey||g.altKey,(!i.current||i.current&&!u)&&tE(g))return!1;const w=iw(g.code,l);if(s.current.add(g[w]),ow(a,s.current,!1)){const b=((y=(_=g.composedPath)==null?void 0:_.call(g))==null?void 0:y[0])||g.target,x=(b==null?void 0:b.nodeName)==="BUTTON"||(b==null?void 0:b.nodeName)==="A";n.preventDefault!==!1&&(i.current||!x)&&g.preventDefault(),o(!0)}},d=g=>{const v=iw(g.code,l);ow(a,s.current,!0)?(o(!1),s.current.clear()):s.current.delete(g[v]),g.key==="Meta"&&s.current.clear(),i.current=!1},p=()=>{s.current.clear(),o(!1)};return c==null||c.addEventListener("keydown",f),c==null||c.addEventListener("keyup",d),window.addEventListener("blur",p),window.addEventListener("contextmenu",p),()=>{c==null||c.removeEventListener("keydown",f),c==null||c.removeEventListener("keyup",d),window.removeEventListener("blur",p),window.removeEventListener("contextmenu",p)}}},[e,o]),r}function ow(e,n,r){return e.filter(o=>r||o.length===n.size).some(o=>o.every(i=>n.has(i)))}function iw(e,n){return n.includes(e)?"code":"key"}const pY=()=>{const e=Ie();return h.useMemo(()=>({zoomIn:n=>{const{panZoom:r}=e.getState();return r?r.scaleBy(1.2,n):Promise.resolve(!1)},zoomOut:n=>{const{panZoom:r}=e.getState();return r?r.scaleBy(1/1.2,n):Promise.resolve(!1)},zoomTo:(n,r)=>{const{panZoom:o}=e.getState();return o?o.scaleTo(n,r):Promise.resolve(!1)},getZoom:()=>e.getState().transform[2],setViewport:async(n,r)=>{const{transform:[o,i,s],panZoom:a}=e.getState();return a?(await a.setViewport({x:n.x??o,y:n.y??i,zoom:n.zoom??s},r),Promise.resolve(!0)):Promise.resolve(!1)},getViewport:()=>{const[n,r,o]=e.getState().transform;return{x:n,y:r,zoom:o}},setCenter:async(n,r,o)=>e.getState().setCenter(n,r,o),fitBounds:async(n,r)=>{const{width:o,height:i,minZoom:s,maxZoom:a,panZoom:l}=e.getState(),c=Zg(n,o,i,s,a,(r==null?void 0:r.padding)??.1);return l?(await l.setViewport(c,{duration:r==null?void 0:r.duration,ease:r==null?void 0:r.ease,interpolate:r==null?void 0:r.interpolate}),Promise.resolve(!0)):Promise.resolve(!1)},screenToFlowPosition:(n,r={})=>{const{transform:o,snapGrid:i,snapToGrid:s,domNode:a}=e.getState();if(!a)return n;const{x:l,y:c}=a.getBoundingClientRect(),u={x:n.x-l,y:n.y-c},f=r.snapGrid??i,d=r.snapToGrid??s;return nl(u,o,d,f)},flowToScreenPosition:n=>{const{transform:r,domNode:o}=e.getState();if(!o)return n;const{x:i,y:s}=o.getBoundingClientRect(),a=Pu(n,r);return{x:a.x+i,y:a.y+s}}}),[])};function kE(e,n){const r=[],o=new Map,i=[];for(const s of e)if(s.type==="add"){i.push(s);continue}else if(s.type==="remove"||s.type==="replace")o.set(s.id,[s]);else{const a=o.get(s.id);a?a.push(s):o.set(s.id,[s])}for(const s of n){const a=o.get(s.id);if(!a){r.push(s);continue}if(a[0].type==="remove")continue;if(a[0].type==="replace"){r.push({...a[0].item});continue}const l={...s};for(const c of a)hY(c,l);r.push(l)}return i.length&&i.forEach(s=>{s.index!==void 0?r.splice(s.index,0,{...s.item}):r.push({...s.item})}),r}function hY(e,n){switch(e.type){case"select":{n.selected=e.selected;break}case"position":{typeof e.position<"u"&&(n.position=e.position),typeof e.dragging<"u"&&(n.dragging=e.dragging);break}case"dimensions":{typeof e.dimensions<"u"&&(n.measured={...e.dimensions},e.setAttributes&&((e.setAttributes===!0||e.setAttributes==="width")&&(n.width=e.dimensions.width),(e.setAttributes===!0||e.setAttributes==="height")&&(n.height=e.dimensions.height))),typeof e.resizing=="boolean"&&(n.resizing=e.resizing);break}}}function mY(e,n){return kE(e,n)}function gY(e,n){return kE(e,n)}function fo(e,n){return{id:e,type:"select",selected:n}}function yi(e,n=new Set,r=!1){const o=[];for(const[i,s]of e){const a=n.has(i);!(s.selected===void 0&&!a)&&s.selected!==a&&(r&&(s.selected=a),o.push(fo(s.id,a)))}return o}function sw({items:e=[],lookup:n}){var i;const r=[],o=new Map(e.map(s=>[s.id,s]));for(const[s,a]of e.entries()){const l=n.get(a.id),c=((i=l==null?void 0:l.internals)==null?void 0:i.userNode)??l;c!==void 0&&c!==a&&r.push({id:a.id,item:a,type:"replace"}),c===void 0&&r.push({item:a,type:"add",index:s})}for(const[s]of n)o.get(s)===void 0&&r.push({id:s,type:"remove"});return r}function aw(e){return{id:e.id,type:"remove"}}const lw=e=>IU(e),yY=e=>YN(e);function NE(e){return h.forwardRef(e)}function cw(e){const[n,r]=h.useState(BigInt(0)),[o]=h.useState(()=>vY(()=>r(i=>i+BigInt(1))));return Dh(()=>{const i=o.get();i.length&&(e(i),o.reset())},[n]),o}function vY(e){let n=[];return{get:()=>n,reset:()=>{n=[]},push:r=>{n.push(r),e()}}}const EE=h.createContext(null);function xY({children:e}){const n=Ie(),r=h.useCallback(l=>{const{nodes:c=[],setNodes:u,hasDefaultNodes:f,onNodesChange:d,nodeLookup:p,fitViewQueued:g,onNodesChangeMiddlewareMap:v}=n.getState();let w=c;for(const y of l)w=typeof y=="function"?y(w):y;let _=sw({items:w,lookup:p});for(const y of v.values())_=y(_);f&&u(w),_.length>0?d==null||d(_):g&&window.requestAnimationFrame(()=>{const{fitViewQueued:y,nodes:b,setNodes:x}=n.getState();y&&x(b)})},[]),o=cw(r),i=h.useCallback(l=>{const{edges:c=[],setEdges:u,hasDefaultEdges:f,onEdgesChange:d,edgeLookup:p}=n.getState();let g=c;for(const v of l)g=typeof v=="function"?v(g):v;f?u(g):d&&d(sw({items:g,lookup:p}))},[]),s=cw(i),a=h.useMemo(()=>({nodeQueue:o,edgeQueue:s}),[]);return m.jsx(EE.Provider,{value:a,children:e})}function wY(){const e=h.useContext(EE);if(!e)throw new Error("useBatchContext must be used within a BatchProvider");return e}const bY=e=>!!e.panZoom;function o0(){const e=pY(),n=Ie(),r=wY(),o=xe(bY),i=h.useMemo(()=>{const s=d=>n.getState().nodeLookup.get(d),a=d=>{r.nodeQueue.push(d)},l=d=>{r.edgeQueue.push(d)},c=d=>{var y,b;const{nodeLookup:p,nodeOrigin:g}=n.getState(),v=lw(d)?d:p.get(d.id),w=v.parentId?JN(v.position,v.measured,v.parentId,p,g):v.position,_={...v,position:w,width:((y=v.measured)==null?void 0:y.width)??v.width,height:((b=v.measured)==null?void 0:b.height)??v.height};return Yi(_)},u=(d,p,g={replace:!1})=>{a(v=>v.map(w=>{if(w.id===d){const _=typeof p=="function"?p(w):p;return g.replace&&lw(_)?_:{...w,..._}}return w}))},f=(d,p,g={replace:!1})=>{l(v=>v.map(w=>{if(w.id===d){const _=typeof p=="function"?p(w):p;return g.replace&&yY(_)?_:{...w,..._}}return w}))};return{getNodes:()=>n.getState().nodes.map(d=>({...d})),getNode:d=>{var p;return(p=s(d))==null?void 0:p.internals.userNode},getInternalNode:s,getEdges:()=>{const{edges:d=[]}=n.getState();return d.map(p=>({...p}))},getEdge:d=>n.getState().edgeLookup.get(d),setNodes:a,setEdges:l,addNodes:d=>{const p=Array.isArray(d)?d:[d];r.nodeQueue.push(g=>[...g,...p])},addEdges:d=>{const p=Array.isArray(d)?d:[d];r.edgeQueue.push(g=>[...g,...p])},toObject:()=>{const{nodes:d=[],edges:p=[],transform:g}=n.getState(),[v,w,_]=g;return{nodes:d.map(y=>({...y})),edges:p.map(y=>({...y})),viewport:{x:v,y:w,zoom:_}}},deleteElements:async({nodes:d=[],edges:p=[]})=>{const{nodes:g,edges:v,onNodesDelete:w,onEdgesDelete:_,triggerNodeChanges:y,triggerEdgeChanges:b,onDelete:x,onBeforeDelete:S}=n.getState(),{nodes:C,edges:k}=await zU({nodesToRemove:d,edgesToRemove:p,nodes:g,edges:v,onBeforeDelete:S}),N=k.length>0,E=C.length>0;if(N){const P=k.map(aw);_==null||_(k),b(P)}if(E){const P=C.map(aw);w==null||w(C),y(P)}return(E||N)&&(x==null||x({nodes:C,edges:k})),{deletedNodes:C,deletedEdges:k}},getIntersectingNodes:(d,p=!0,g)=>{const v=Lx(d),w=v?d:c(d),_=g!==void 0;return w?(g||n.getState().nodes).filter(y=>{const b=n.getState().nodeLookup.get(y.id);if(b&&!v&&(y.id===d.id||!b.internals.positionAbsolute))return!1;const x=Yi(_?y:b),S=Ea(x,w);return p&&S>0||S>=x.width*x.height||S>=w.width*w.height}):[]},isNodeIntersecting:(d,p,g=!0)=>{const w=Lx(d)?d:c(d);if(!w)return!1;const _=Ea(w,p);return g&&_>0||_>=p.width*p.height||_>=w.width*w.height},updateNode:u,updateNodeData:(d,p,g={replace:!1})=>{u(d,v=>{const w=typeof p=="function"?p(v):p;return g.replace?{...v,data:w}:{...v,data:{...v.data,...w}}},g)},updateEdge:f,updateEdgeData:(d,p,g={replace:!1})=>{f(d,v=>{const w=typeof p=="function"?p(v):p;return g.replace?{...v,data:w}:{...v,data:{...v.data,...w}}},g)},getNodesBounds:d=>{const{nodeLookup:p,nodeOrigin:g}=n.getState();return $U(d,{nodeLookup:p,nodeOrigin:g})},getHandleConnections:({type:d,id:p,nodeId:g})=>{var v;return Array.from(((v=n.getState().connectionLookup.get(`${g}-${d}${p?`-${p}`:""}`))==null?void 0:v.values())??[])},getNodeConnections:({type:d,handleId:p,nodeId:g})=>{var v;return Array.from(((v=n.getState().connectionLookup.get(`${g}${d?p?`-${d}-${p}`:`-${d}`:""}`))==null?void 0:v.values())??[])},fitView:async d=>{const p=n.getState().fitViewResolver??HU();return n.setState({fitViewQueued:!0,fitViewOptions:d,fitViewResolver:p}),r.nodeQueue.push(g=>[...g]),p.promise}}},[]);return h.useMemo(()=>({...i,...e,viewportInitialized:o}),[o])}const uw=e=>e.selected,_Y=typeof window<"u"?window:void 0;function SY({deleteKeyCode:e,multiSelectionKeyCode:n}){const r=Ie(),{deleteElements:o}=o0(),i=ja(e,{actInsideInputWithModifier:!1}),s=ja(n,{target:_Y});h.useEffect(()=>{if(i){const{edges:a,nodes:l}=r.getState();o({nodes:l.filter(uw),edges:a.filter(uw)}),r.setState({nodesSelectionActive:!1})}},[i]),h.useEffect(()=>{r.setState({multiSelectionActive:s})},[s])}function CY(e){const n=Ie();h.useEffect(()=>{const r=()=>{var i,s,a,l;if(!e.current||!(((s=(i=e.current).checkVisibility)==null?void 0:s.call(i))??!0))return!1;const o=Qg(e.current);(o.height===0||o.width===0)&&((l=(a=n.getState()).onError)==null||l.call(a,"004",In.error004())),n.setState({width:o.width||500,height:o.height||500})};if(e.current){r(),window.addEventListener("resize",r);const o=new ResizeObserver(()=>r());return o.observe(e.current),()=>{window.removeEventListener("resize",r),o&&e.current&&o.unobserve(e.current)}}},[])}const zd={position:"absolute",width:"100%",height:"100%",top:0,left:0},kY=e=>({userSelectionActive:e.userSelectionActive,lib:e.lib,connectionInProgress:e.connection.inProgress});function NY({onPaneContextMenu:e,zoomOnScroll:n=!0,zoomOnPinch:r=!0,panOnScroll:o=!1,panOnScrollSpeed:i=.5,panOnScrollMode:s=_o.Free,zoomOnDoubleClick:a=!0,panOnDrag:l=!0,defaultViewport:c,translateExtent:u,minZoom:f,maxZoom:d,zoomActivationKeyCode:p,preventScrolling:g=!0,children:v,noWheelClassName:w,noPanClassName:_,onViewportChange:y,isControlledViewport:b,paneClickDistance:x,selectionOnDrag:S}){const C=Ie(),k=h.useRef(null),{userSelectionActive:N,lib:E,connectionInProgress:P}=xe(kY,Te),T=ja(p),A=h.useRef();CY(k);const D=h.useCallback(V=>{y==null||y({x:V[0],y:V[1],zoom:V[2]}),b||C.setState({transform:V})},[y,b]);return h.useEffect(()=>{if(k.current){A.current=NG({domNode:k.current,minZoom:f,maxZoom:d,translateExtent:u,viewport:c,onDraggingChange:I=>C.setState(z=>z.paneDragging===I?z:{paneDragging:I}),onPanZoomStart:(I,z)=>{const{onViewportChangeStart:M,onMoveStart:R}=C.getState();R==null||R(I,z),M==null||M(z)},onPanZoom:(I,z)=>{const{onViewportChange:M,onMove:R}=C.getState();R==null||R(I,z),M==null||M(z)},onPanZoomEnd:(I,z)=>{const{onViewportChangeEnd:M,onMoveEnd:R}=C.getState();R==null||R(I,z),M==null||M(z)}});const{x:V,y:j,zoom:L}=A.current.getViewport();return C.setState({panZoom:A.current,transform:[V,j,L],domNode:k.current.closest(".react-flow")}),()=>{var I;(I=A.current)==null||I.destroy()}}},[]),h.useEffect(()=>{var V;(V=A.current)==null||V.update({onPaneContextMenu:e,zoomOnScroll:n,zoomOnPinch:r,panOnScroll:o,panOnScrollSpeed:i,panOnScrollMode:s,zoomOnDoubleClick:a,panOnDrag:l,zoomActivationKeyPressed:T,preventScrolling:g,noPanClassName:_,userSelectionActive:N,noWheelClassName:w,lib:E,onTransformChange:D,connectionInProgress:P,selectionOnDrag:S,paneClickDistance:x})},[e,n,r,o,i,s,a,l,T,g,_,N,w,E,D,P,S,x]),m.jsx("div",{className:"react-flow__renderer",ref:k,style:zd,children:v})}const EY=e=>({userSelectionActive:e.userSelectionActive,userSelectionRect:e.userSelectionRect});function PY(){const{userSelectionActive:e,userSelectionRect:n}=xe(EY,Te);return e&&n?m.jsx("div",{className:"react-flow__selection react-flow__container",style:{width:n.width,height:n.height,transform:`translate(${n.x}px, ${n.y}px)`}}):null}const Xf=(e,n)=>r=>{r.target===n.current&&(e==null||e(r))},jY=e=>({userSelectionActive:e.userSelectionActive,elementsSelectable:e.elementsSelectable,connectionInProgress:e.connection.inProgress,dragging:e.paneDragging});function MY({isSelecting:e,selectionKeyPressed:n,selectionMode:r=Na.Full,panOnDrag:o,paneClickDistance:i,selectionOnDrag:s,onSelectionStart:a,onSelectionEnd:l,onPaneClick:c,onPaneContextMenu:u,onPaneScroll:f,onPaneMouseEnter:d,onPaneMouseMove:p,onPaneMouseLeave:g,children:v}){const w=Ie(),{userSelectionActive:_,elementsSelectable:y,dragging:b,connectionInProgress:x}=xe(jY,Te),S=y&&(e||_),C=h.useRef(null),k=h.useRef(),N=h.useRef(new Set),E=h.useRef(new Set),P=h.useRef(!1),T=M=>{if(P.current||x){P.current=!1;return}c==null||c(M),w.getState().resetSelectedElements(),w.setState({nodesSelectionActive:!1})},A=M=>{if(Array.isArray(o)&&(o!=null&&o.includes(2))){M.preventDefault();return}u==null||u(M)},D=f?M=>f(M):void 0,V=M=>{P.current&&(M.stopPropagation(),P.current=!1)},j=M=>{var H,G;const{domNode:R}=w.getState();if(k.current=R==null?void 0:R.getBoundingClientRect(),!k.current)return;const O=M.target===C.current;if(!O&&!!M.target.closest(".nokey")||!e||!(s&&O||n)||M.button!==0||!M.isPrimary)return;(G=(H=M.target)==null?void 0:H.setPointerCapture)==null||G.call(H,M.pointerId),P.current=!1;const{x:X,y:F}=dn(M.nativeEvent,k.current);w.setState({userSelectionRect:{width:0,height:0,startX:X,startY:F,x:X,y:F}}),O||(M.stopPropagation(),M.preventDefault())},L=M=>{const{userSelectionRect:R,transform:O,nodeLookup:W,edgeLookup:$,connectionLookup:X,triggerNodeChanges:F,triggerEdgeChanges:H,defaultEdgeOptions:G,resetSelectedElements:U}=w.getState();if(!k.current||!R)return;const{x:Y,y:q}=dn(M.nativeEvent,k.current),{startX:te,startY:J}=R;if(!P.current){const pe=n?0:i;if(Math.hypot(Y-te,q-J)<=pe)return;U(),a==null||a(M)}P.current=!0;const Z={startX:te,startY:J,x:Y<te?Y:te,y:q<J?q:J,width:Math.abs(Y-te),height:Math.abs(q-J)},ne=N.current,ue=E.current;N.current=new Set(qg(W,Z,O,r===Na.Partial,!0).map(pe=>pe.id)),E.current=new Set;const ye=(G==null?void 0:G.selectable)??!0;for(const pe of N.current){const Ne=X.get(pe);if(Ne)for(const{edgeId:mt}of Ne.values()){const qe=$.get(mt);qe&&(qe.selectable??ye)&&E.current.add(mt)}}if(!zx(ne,N.current)){const pe=yi(W,N.current,!0);F(pe)}if(!zx(ue,E.current)){const pe=yi($,E.current);H(pe)}w.setState({userSelectionRect:Z,userSelectionActive:!0,nodesSelectionActive:!1})},I=M=>{var R,O;M.button===0&&((O=(R=M.target)==null?void 0:R.releasePointerCapture)==null||O.call(R,M.pointerId),!_&&M.target===C.current&&w.getState().userSelectionRect&&(T==null||T(M)),w.setState({userSelectionActive:!1,userSelectionRect:null}),P.current&&(l==null||l(M),w.setState({nodesSelectionActive:N.current.size>0})))},z=o===!0||Array.isArray(o)&&o.includes(0);return m.jsxs("div",{className:Be(["react-flow__pane",{draggable:z,dragging:b,selection:e}]),onClick:S?void 0:Xf(T,C),onContextMenu:Xf(A,C),onWheel:Xf(D,C),onPointerEnter:S?void 0:d,onPointerMove:S?L:p,onPointerUp:S?I:void 0,onPointerDownCapture:S?j:void 0,onClickCapture:S?V:void 0,onPointerLeave:g,ref:C,style:zd,children:[v,m.jsx(PY,{})]})}function Lh({id:e,store:n,unselect:r=!1,nodeRef:o}){const{addSelectedNodes:i,unselectNodesAndEdges:s,multiSelectionActive:a,nodeLookup:l,onError:c}=n.getState(),u=l.get(e);if(!u){c==null||c("012",In.error012(e));return}n.setState({nodesSelectionActive:!1}),u.selected?(r||u.selected&&a)&&(s({nodes:[u],edges:[]}),requestAnimationFrame(()=>{var f;return(f=o==null?void 0:o.current)==null?void 0:f.blur()})):i([e])}function PE({nodeRef:e,disabled:n=!1,noDragClassName:r,handleSelector:o,nodeId:i,isSelectable:s,nodeClickDistance:a}){const l=Ie(),[c,u]=h.useState(!1),f=h.useRef();return h.useEffect(()=>{f.current=fG({getStoreItems:()=>l.getState(),onNodeMouseDown:d=>{Lh({id:d,store:l,nodeRef:e})},onDragStart:()=>{u(!0)},onDragStop:()=>{u(!1)}})},[]),h.useEffect(()=>{if(!(n||!e.current||!f.current))return f.current.update({noDragClassName:r,handleSelector:o,domNode:e.current,isSelectable:s,nodeId:i,nodeClickDistance:a}),()=>{var d;(d=f.current)==null||d.destroy()}},[r,o,n,s,e,i,a]),c}const RY=e=>n=>n.selected&&(n.draggable||e&&typeof n.draggable>"u");function jE(){const e=Ie();return h.useCallback(r=>{const{nodeExtent:o,snapToGrid:i,snapGrid:s,nodesDraggable:a,onError:l,updateNodePositions:c,nodeLookup:u,nodeOrigin:f}=e.getState(),d=new Map,p=RY(a),g=i?s[0]:5,v=i?s[1]:5,w=r.direction.x*g*r.factor,_=r.direction.y*v*r.factor;for(const[,y]of u){if(!p(y))continue;let b={x:y.internals.positionAbsolute.x+w,y:y.internals.positionAbsolute.y+_};i&&(b=tl(b,s));const{position:x,positionAbsolute:S}=XN({nodeId:y.id,nextPosition:b,nodeLookup:u,nodeExtent:o,nodeOrigin:f,onError:l});y.position=x,y.internals.positionAbsolute=S,d.set(y.id,y)}c(d)},[])}const i0=h.createContext(null),AY=i0.Provider;i0.Consumer;const ME=()=>h.useContext(i0),TY=e=>({connectOnClick:e.connectOnClick,noPanClassName:e.noPanClassName,rfId:e.rfId}),IY=(e,n,r)=>o=>{const{connectionClickStartHandle:i,connectionMode:s,connection:a}=o,{fromHandle:l,toHandle:c,isValid:u}=a,f=(c==null?void 0:c.nodeId)===e&&(c==null?void 0:c.id)===n&&(c==null?void 0:c.type)===r;return{connectingFrom:(l==null?void 0:l.nodeId)===e&&(l==null?void 0:l.id)===n&&(l==null?void 0:l.type)===r,connectingTo:f,clickConnecting:(i==null?void 0:i.nodeId)===e&&(i==null?void 0:i.id)===n&&(i==null?void 0:i.type)===r,isPossibleEndHandle:s===Ui.Strict?(l==null?void 0:l.type)!==r:e!==(l==null?void 0:l.nodeId)||n!==(l==null?void 0:l.id),connectionInProcess:!!l,clickConnectionInProcess:!!i,valid:f&&u}};function $Y({type:e="source",position:n=ce.Top,isValidConnection:r,isConnectable:o=!0,isConnectableStart:i=!0,isConnectableEnd:s=!0,id:a,onConnect:l,children:c,className:u,onMouseDown:f,onTouchStart:d,...p},g){var L,I;const v=a||null,w=e==="target",_=Ie(),y=ME(),{connectOnClick:b,noPanClassName:x,rfId:S}=xe(TY,Te),{connectingFrom:C,connectingTo:k,clickConnecting:N,isPossibleEndHandle:E,connectionInProcess:P,clickConnectionInProcess:T,valid:A}=xe(IY(y,v,e),Te);y||(I=(L=_.getState()).onError)==null||I.call(L,"010",In.error010());const D=z=>{const{defaultEdgeOptions:M,onConnect:R,hasDefaultEdges:O}=_.getState(),W={...M,...z};if(O){const{edges:$,setEdges:X}=_.getState();X(qU(W,$))}R==null||R(W),l==null||l(W)},V=z=>{if(!y)return;const M=nE(z.nativeEvent);if(i&&(M&&z.button===0||!M)){const R=_.getState();Oh.onPointerDown(z.nativeEvent,{handleDomNode:z.currentTarget,autoPanOnConnect:R.autoPanOnConnect,connectionMode:R.connectionMode,connectionRadius:R.connectionRadius,domNode:R.domNode,nodeLookup:R.nodeLookup,lib:R.lib,isTarget:w,handleId:v,nodeId:y,flowId:R.rfId,panBy:R.panBy,cancelConnection:R.cancelConnection,onConnectStart:R.onConnectStart,onConnectEnd:(...O)=>{var W,$;return($=(W=_.getState()).onConnectEnd)==null?void 0:$.call(W,...O)},updateConnection:R.updateConnection,onConnect:D,isValidConnection:r||((...O)=>{var W,$;return(($=(W=_.getState()).isValidConnection)==null?void 0:$.call(W,...O))??!0}),getTransform:()=>_.getState().transform,getFromHandle:()=>_.getState().connection.fromHandle,autoPanSpeed:R.autoPanSpeed,dragThreshold:R.connectionDragThreshold})}M?f==null||f(z):d==null||d(z)},j=z=>{const{onClickConnectStart:M,onClickConnectEnd:R,connectionClickStartHandle:O,connectionMode:W,isValidConnection:$,lib:X,rfId:F,nodeLookup:H,connection:G}=_.getState();if(!y||!O&&!i)return;if(!O){M==null||M(z.nativeEvent,{nodeId:y,handleId:v,handleType:e}),_.setState({connectionClickStartHandle:{nodeId:y,type:e,id:v}});return}const U=eE(z.target),Y=r||$,{connection:q,isValid:te}=Oh.isValid(z.nativeEvent,{handle:{nodeId:y,id:v,type:e},connectionMode:W,fromNodeId:O.nodeId,fromHandleId:O.id||null,fromType:O.type,isValidConnection:Y,flowId:F,doc:U,lib:X,nodeLookup:H});te&&q&&D(q);const J=structuredClone(G);delete J.inProgress,J.toPosition=J.toHandle?J.toHandle.position:null,R==null||R(z,J),_.setState({connectionClickStartHandle:null})};return m.jsx("div",{"data-handleid":v,"data-nodeid":y,"data-handlepos":n,"data-id":`${S}-${y}-${v}-${e}`,className:Be(["react-flow__handle",`react-flow__handle-${n}`,"nodrag",x,u,{source:!w,target:w,connectable:o,connectablestart:i,connectableend:s,clickconnecting:N,connectingfrom:C,connectingto:k,valid:A,connectionindicator:o&&(!P||E)&&(P||T?s:i)}]),onMouseDown:V,onTouchStart:V,onClick:b?j:void 0,ref:g,...p,children:c})}const ju=h.memo(NE($Y));function OY({data:e,isConnectable:n,sourcePosition:r=ce.Bottom}){return m.jsxs(m.Fragment,{children:[e==null?void 0:e.label,m.jsx(ju,{type:"source",position:r,isConnectable:n})]})}function DY({data:e,isConnectable:n,targetPosition:r=ce.Top,sourcePosition:o=ce.Bottom}){return m.jsxs(m.Fragment,{children:[m.jsx(ju,{type:"target",position:r,isConnectable:n}),e==null?void 0:e.label,m.jsx(ju,{type:"source",position:o,isConnectable:n})]})}function LY(){return null}function zY({data:e,isConnectable:n,targetPosition:r=ce.Top}){return m.jsxs(m.Fragment,{children:[m.jsx(ju,{type:"target",position:r,isConnectable:n}),e==null?void 0:e.label]})}const Mu={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}},dw={input:OY,default:DY,output:zY,group:LY};function FY(e){var n,r,o,i;return e.internals.handleBounds===void 0?{width:e.width??e.initialWidth??((n=e.style)==null?void 0:n.width),height:e.height??e.initialHeight??((r=e.style)==null?void 0:r.height)}:{width:e.width??((o=e.style)==null?void 0:o.width),height:e.height??((i=e.style)==null?void 0:i.height)}}const VY=e=>{const{width:n,height:r,x:o,y:i}=el(e.nodeLookup,{filter:s=>!!s.selected});return{width:un(n)?n:null,height:un(r)?r:null,userSelectionActive:e.userSelectionActive,transformString:`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]}) translate(${o}px,${i}px)`}};function BY({onSelectionContextMenu:e,noPanClassName:n,disableKeyboardA11y:r}){const o=Ie(),{width:i,height:s,transformString:a,userSelectionActive:l}=xe(VY,Te),c=jE(),u=h.useRef(null);h.useEffect(()=>{var g;r||(g=u.current)==null||g.focus({preventScroll:!0})},[r]);const f=!l&&i!==null&&s!==null;if(PE({nodeRef:u,disabled:!f}),!f)return null;const d=e?g=>{const v=o.getState().nodes.filter(w=>w.selected);e(g,v)}:void 0,p=g=>{Object.prototype.hasOwnProperty.call(Mu,g.key)&&(g.preventDefault(),c({direction:Mu[g.key],factor:g.shiftKey?4:1}))};return m.jsx("div",{className:Be(["react-flow__nodesselection","react-flow__container",n]),style:{transform:a},children:m.jsx("div",{ref:u,className:"react-flow__nodesselection-rect",onContextMenu:d,tabIndex:r?void 0:-1,onKeyDown:r?void 0:p,style:{width:i,height:s}})})}const fw=typeof window<"u"?window:void 0,HY=e=>({nodesSelectionActive:e.nodesSelectionActive,userSelectionActive:e.userSelectionActive});function RE({children:e,onPaneClick:n,onPaneMouseEnter:r,onPaneMouseMove:o,onPaneMouseLeave:i,onPaneContextMenu:s,onPaneScroll:a,paneClickDistance:l,deleteKeyCode:c,selectionKeyCode:u,selectionOnDrag:f,selectionMode:d,onSelectionStart:p,onSelectionEnd:g,multiSelectionKeyCode:v,panActivationKeyCode:w,zoomActivationKeyCode:_,elementsSelectable:y,zoomOnScroll:b,zoomOnPinch:x,panOnScroll:S,panOnScrollSpeed:C,panOnScrollMode:k,zoomOnDoubleClick:N,panOnDrag:E,defaultViewport:P,translateExtent:T,minZoom:A,maxZoom:D,preventScrolling:V,onSelectionContextMenu:j,noWheelClassName:L,noPanClassName:I,disableKeyboardA11y:z,onViewportChange:M,isControlledViewport:R}){const{nodesSelectionActive:O,userSelectionActive:W}=xe(HY,Te),$=ja(u,{target:fw}),X=ja(w,{target:fw}),F=X||E,H=X||S,G=f&&F!==!0,U=$||W||G;return SY({deleteKeyCode:c,multiSelectionKeyCode:v}),m.jsx(NY,{onPaneContextMenu:s,elementsSelectable:y,zoomOnScroll:b,zoomOnPinch:x,panOnScroll:H,panOnScrollSpeed:C,panOnScrollMode:k,zoomOnDoubleClick:N,panOnDrag:!$&&F,defaultViewport:P,translateExtent:T,minZoom:A,maxZoom:D,zoomActivationKeyCode:_,preventScrolling:V,noWheelClassName:L,noPanClassName:I,onViewportChange:M,isControlledViewport:R,paneClickDistance:l,selectionOnDrag:G,children:m.jsxs(MY,{onSelectionStart:p,onSelectionEnd:g,onPaneClick:n,onPaneMouseEnter:r,onPaneMouseMove:o,onPaneMouseLeave:i,onPaneContextMenu:s,onPaneScroll:a,panOnDrag:F,isSelecting:!!U,selectionMode:d,selectionKeyPressed:$,paneClickDistance:l,selectionOnDrag:G,children:[e,O&&m.jsx(BY,{onSelectionContextMenu:j,noPanClassName:I,disableKeyboardA11y:z})]})})}RE.displayName="FlowRenderer";const WY=h.memo(RE),UY=e=>n=>e?qg(n.nodeLookup,{x:0,y:0,width:n.width,height:n.height},n.transform,!0).map(r=>r.id):Array.from(n.nodeLookup.keys());function GY(e){return xe(h.useCallback(UY(e),[e]),Te)}const YY=e=>e.updateNodeInternals;function XY(){const e=xe(YY),[n]=h.useState(()=>typeof ResizeObserver>"u"?null:new ResizeObserver(r=>{const o=new Map;r.forEach(i=>{const s=i.target.getAttribute("data-id");o.set(s,{id:s,nodeElement:i.target,force:!0})}),e(o)}));return h.useEffect(()=>()=>{n==null||n.disconnect()},[n]),n}function KY({node:e,nodeType:n,hasDimensions:r,resizeObserver:o}){const i=Ie(),s=h.useRef(null),a=h.useRef(null),l=h.useRef(e.sourcePosition),c=h.useRef(e.targetPosition),u=h.useRef(n),f=r&&!!e.internals.handleBounds;return h.useEffect(()=>{s.current&&!e.hidden&&(!f||a.current!==s.current)&&(a.current&&(o==null||o.unobserve(a.current)),o==null||o.observe(s.current),a.current=s.current)},[f,e.hidden]),h.useEffect(()=>()=>{a.current&&(o==null||o.unobserve(a.current),a.current=null)},[]),h.useEffect(()=>{if(s.current){const d=u.current!==n,p=l.current!==e.sourcePosition,g=c.current!==e.targetPosition;(d||p||g)&&(u.current=n,l.current=e.sourcePosition,c.current=e.targetPosition,i.getState().updateNodeInternals(new Map([[e.id,{id:e.id,nodeElement:s.current,force:!0}]])))}},[e.id,n,e.sourcePosition,e.targetPosition]),s}function qY({id:e,onClick:n,onMouseEnter:r,onMouseMove:o,onMouseLeave:i,onContextMenu:s,onDoubleClick:a,nodesDraggable:l,elementsSelectable:c,nodesConnectable:u,nodesFocusable:f,resizeObserver:d,noDragClassName:p,noPanClassName:g,disableKeyboardA11y:v,rfId:w,nodeTypes:_,nodeClickDistance:y,onError:b}){const{node:x,internals:S,isParent:C}=xe(Y=>{const q=Y.nodeLookup.get(e),te=Y.parentLookup.has(e);return{node:q,internals:q.internals,isParent:te}},Te);let k=x.type||"default",N=(_==null?void 0:_[k])||dw[k];N===void 0&&(b==null||b("003",In.error003(k)),k="default",N=(_==null?void 0:_.default)||dw.default);const E=!!(x.draggable||l&&typeof x.draggable>"u"),P=!!(x.selectable||c&&typeof x.selectable>"u"),T=!!(x.connectable||u&&typeof x.connectable>"u"),A=!!(x.focusable||f&&typeof x.focusable>"u"),D=Ie(),V=QN(x),j=KY({node:x,nodeType:k,hasDimensions:V,resizeObserver:d}),L=PE({nodeRef:j,disabled:x.hidden||!E,noDragClassName:p,handleSelector:x.dragHandle,nodeId:e,isSelectable:P,nodeClickDistance:y}),I=jE();if(x.hidden)return null;const z=cr(x),M=FY(x),R=P||E||n||r||o||i,O=r?Y=>r(Y,{...S.userNode}):void 0,W=o?Y=>o(Y,{...S.userNode}):void 0,$=i?Y=>i(Y,{...S.userNode}):void 0,X=s?Y=>s(Y,{...S.userNode}):void 0,F=a?Y=>a(Y,{...S.userNode}):void 0,H=Y=>{const{selectNodesOnDrag:q,nodeDragThreshold:te}=D.getState();P&&(!q||!E||te>0)&&Lh({id:e,store:D,nodeRef:j}),n&&n(Y,{...S.userNode})},G=Y=>{if(!(tE(Y.nativeEvent)||v)){if(HN.includes(Y.key)&&P){const q=Y.key==="Escape";Lh({id:e,store:D,unselect:q,nodeRef:j})}else if(E&&x.selected&&Object.prototype.hasOwnProperty.call(Mu,Y.key)){Y.preventDefault();const{ariaLabelConfig:q}=D.getState();D.setState({ariaLiveMessage:q["node.a11yDescription.ariaLiveMessage"]({direction:Y.key.replace("Arrow","").toLowerCase(),x:~~S.positionAbsolute.x,y:~~S.positionAbsolute.y})}),I({direction:Mu[Y.key],factor:Y.shiftKey?4:1})}}},U=()=>{var ue;if(v||!((ue=j.current)!=null&&ue.matches(":focus-visible")))return;const{transform:Y,width:q,height:te,autoPanOnNodeFocus:J,setCenter:Z}=D.getState();if(!J)return;qg(new Map([[e,x]]),{x:0,y:0,width:q,height:te},Y,!0).length>0||Z(x.position.x+z.width/2,x.position.y+z.height/2,{zoom:Y[2]})};return m.jsx("div",{className:Be(["react-flow__node",`react-flow__node-${k}`,{[g]:E},x.className,{selected:x.selected,selectable:P,parent:C,draggable:E,dragging:L}]),ref:j,style:{zIndex:S.z,transform:`translate(${S.positionAbsolute.x}px,${S.positionAbsolute.y}px)`,pointerEvents:R?"all":"none",visibility:V?"visible":"hidden",...x.style,...M},"data-id":e,"data-testid":`rf__node-${e}`,onMouseEnter:O,onMouseMove:W,onMouseLeave:$,onContextMenu:X,onClick:H,onDoubleClick:F,onKeyDown:A?G:void 0,tabIndex:A?0:void 0,onFocus:A?U:void 0,role:x.ariaRole??(A?"group":void 0),"aria-roledescription":"node","aria-describedby":v?void 0:`${_E}-${w}`,"aria-label":x.ariaLabel,...x.domAttributes,children:m.jsx(AY,{value:e,children:m.jsx(N,{id:e,data:x.data,type:k,positionAbsoluteX:S.positionAbsolute.x,positionAbsoluteY:S.positionAbsolute.y,selected:x.selected??!1,selectable:P,draggable:E,deletable:x.deletable??!0,isConnectable:T,sourcePosition:x.sourcePosition,targetPosition:x.targetPosition,dragging:L,dragHandle:x.dragHandle,zIndex:S.z,parentId:x.parentId,...z})})})}var ZY=h.memo(qY);const QY=e=>({nodesDraggable:e.nodesDraggable,nodesConnectable:e.nodesConnectable,nodesFocusable:e.nodesFocusable,elementsSelectable:e.elementsSelectable,onError:e.onError});function AE(e){const{nodesDraggable:n,nodesConnectable:r,nodesFocusable:o,elementsSelectable:i,onError:s}=xe(QY,Te),a=GY(e.onlyRenderVisibleElements),l=XY();return m.jsx("div",{className:"react-flow__nodes",style:zd,children:a.map(c=>m.jsx(ZY,{id:c,nodeTypes:e.nodeTypes,nodeExtent:e.nodeExtent,onClick:e.onNodeClick,onMouseEnter:e.onNodeMouseEnter,onMouseMove:e.onNodeMouseMove,onMouseLeave:e.onNodeMouseLeave,onContextMenu:e.onNodeContextMenu,onDoubleClick:e.onNodeDoubleClick,noDragClassName:e.noDragClassName,noPanClassName:e.noPanClassName,rfId:e.rfId,disableKeyboardA11y:e.disableKeyboardA11y,resizeObserver:l,nodesDraggable:n,nodesConnectable:r,nodesFocusable:o,elementsSelectable:i,nodeClickDistance:e.nodeClickDistance,onError:s},c))})}AE.displayName="NodeRenderer";const JY=h.memo(AE);function eX(e){return xe(h.useCallback(r=>{if(!e)return r.edges.map(i=>i.id);const o=[];if(r.width&&r.height)for(const i of r.edges){const s=r.nodeLookup.get(i.source),a=r.nodeLookup.get(i.target);s&&a&&YU({sourceNode:s,targetNode:a,width:r.width,height:r.height,transform:r.transform})&&o.push(i.id)}return o},[e]),Te)}const tX=({color:e="none",strokeWidth:n=1})=>{const r={strokeWidth:n,...e&&{stroke:e}};return m.jsx("polyline",{className:"arrow",style:r,strokeLinecap:"round",fill:"none",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4"})},nX=({color:e="none",strokeWidth:n=1})=>{const r={strokeWidth:n,...e&&{stroke:e,fill:e}};return m.jsx("polyline",{className:"arrowclosed",style:r,strokeLinecap:"round",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4 -5,-4"})},pw={[Nu.Arrow]:tX,[Nu.ArrowClosed]:nX};function rX(e){const n=Ie();return h.useMemo(()=>{var i,s;return Object.prototype.hasOwnProperty.call(pw,e)?pw[e]:((s=(i=n.getState()).onError)==null||s.call(i,"009",In.error009(e)),null)},[e])}const oX=({id:e,type:n,color:r,width:o=12.5,height:i=12.5,markerUnits:s="strokeWidth",strokeWidth:a,orient:l="auto-start-reverse"})=>{const c=rX(n);return c?m.jsx("marker",{className:"react-flow__arrowhead",id:e,markerWidth:`${o}`,markerHeight:`${i}`,viewBox:"-10 -10 20 20",markerUnits:s,orient:l,refX:"0",refY:"0",children:m.jsx(c,{color:r,strokeWidth:a})}):null},TE=({defaultColor:e,rfId:n})=>{const r=xe(s=>s.edges),o=xe(s=>s.defaultEdgeOptions),i=h.useMemo(()=>tG(r,{id:n,defaultColor:e,defaultMarkerStart:o==null?void 0:o.markerStart,defaultMarkerEnd:o==null?void 0:o.markerEnd}),[r,o,n,e]);return i.length?m.jsx("svg",{className:"react-flow__marker","aria-hidden":"true",children:m.jsx("defs",{children:i.map(s=>m.jsx(oX,{id:s.id,type:s.type,color:s.color,width:s.width,height:s.height,markerUnits:s.markerUnits,strokeWidth:s.strokeWidth,orient:s.orient},s.id))})}):null};TE.displayName="MarkerDefinitions";var iX=h.memo(TE);function IE({x:e,y:n,label:r,labelStyle:o,labelShowBg:i=!0,labelBgStyle:s,labelBgPadding:a=[2,4],labelBgBorderRadius:l=2,children:c,className:u,...f}){const[d,p]=h.useState({x:1,y:0,width:0,height:0}),g=Be(["react-flow__edge-textwrapper",u]),v=h.useRef(null);return h.useEffect(()=>{if(v.current){const w=v.current.getBBox();p({x:w.x,y:w.y,width:w.width,height:w.height})}},[r]),r?m.jsxs("g",{transform:`translate(${e-d.width/2} ${n-d.height/2})`,className:g,visibility:d.width?"visible":"hidden",...f,children:[i&&m.jsx("rect",{width:d.width+2*a[0],x:-a[0],y:-a[1],height:d.height+2*a[1],className:"react-flow__edge-textbg",style:s,rx:l,ry:l}),m.jsx("text",{className:"react-flow__edge-text",y:d.height/2,dy:"0.3em",ref:v,style:o,children:r}),c]}):null}IE.displayName="EdgeText";const sX=h.memo(IE);function Fd({path:e,labelX:n,labelY:r,label:o,labelStyle:i,labelShowBg:s,labelBgStyle:a,labelBgPadding:l,labelBgBorderRadius:c,interactionWidth:u=20,...f}){return m.jsxs(m.Fragment,{children:[m.jsx("path",{...f,d:e,fill:"none",className:Be(["react-flow__edge-path",f.className])}),u?m.jsx("path",{d:e,fill:"none",strokeOpacity:0,strokeWidth:u,className:"react-flow__edge-interaction"}):null,o&&un(n)&&un(r)?m.jsx(sX,{x:n,y:r,label:o,labelStyle:i,labelShowBg:s,labelBgStyle:a,labelBgPadding:l,labelBgBorderRadius:c}):null]})}function hw({pos:e,x1:n,y1:r,x2:o,y2:i}){return e===ce.Left||e===ce.Right?[.5*(n+o),r]:[n,.5*(r+i)]}function $E({sourceX:e,sourceY:n,sourcePosition:r=ce.Bottom,targetX:o,targetY:i,targetPosition:s=ce.Top}){const[a,l]=hw({pos:r,x1:e,y1:n,x2:o,y2:i}),[c,u]=hw({pos:s,x1:o,y1:i,x2:e,y2:n}),[f,d,p,g]=rE({sourceX:e,sourceY:n,targetX:o,targetY:i,sourceControlX:a,sourceControlY:l,targetControlX:c,targetControlY:u});return[`M${e},${n} C${a},${l} ${c},${u} ${o},${i}`,f,d,p,g]}function OE(e){return h.memo(({id:n,sourceX:r,sourceY:o,targetX:i,targetY:s,sourcePosition:a,targetPosition:l,label:c,labelStyle:u,labelShowBg:f,labelBgStyle:d,labelBgPadding:p,labelBgBorderRadius:g,style:v,markerEnd:w,markerStart:_,interactionWidth:y})=>{const[b,x,S]=$E({sourceX:r,sourceY:o,sourcePosition:a,targetX:i,targetY:s,targetPosition:l}),C=e.isInternal?void 0:n;return m.jsx(Fd,{id:C,path:b,labelX:x,labelY:S,label:c,labelStyle:u,labelShowBg:f,labelBgStyle:d,labelBgPadding:p,labelBgBorderRadius:g,style:v,markerEnd:w,markerStart:_,interactionWidth:y})})}const aX=OE({isInternal:!1}),DE=OE({isInternal:!0});aX.displayName="SimpleBezierEdge";DE.displayName="SimpleBezierEdgeInternal";function LE(e){return h.memo(({id:n,sourceX:r,sourceY:o,targetX:i,targetY:s,label:a,labelStyle:l,labelShowBg:c,labelBgStyle:u,labelBgPadding:f,labelBgBorderRadius:d,style:p,sourcePosition:g=ce.Bottom,targetPosition:v=ce.Top,markerEnd:w,markerStart:_,pathOptions:y,interactionWidth:b})=>{const[x,S,C]=Th({sourceX:r,sourceY:o,sourcePosition:g,targetX:i,targetY:s,targetPosition:v,borderRadius:y==null?void 0:y.borderRadius,offset:y==null?void 0:y.offset,stepPosition:y==null?void 0:y.stepPosition}),k=e.isInternal?void 0:n;return m.jsx(Fd,{id:k,path:x,labelX:S,labelY:C,label:a,labelStyle:l,labelShowBg:c,labelBgStyle:u,labelBgPadding:f,labelBgBorderRadius:d,style:p,markerEnd:w,markerStart:_,interactionWidth:b})})}const zE=LE({isInternal:!1}),FE=LE({isInternal:!0});zE.displayName="SmoothStepEdge";FE.displayName="SmoothStepEdgeInternal";function VE(e){return h.memo(({id:n,...r})=>{var i;const o=e.isInternal?void 0:n;return m.jsx(zE,{...r,id:o,pathOptions:h.useMemo(()=>{var s;return{borderRadius:0,offset:(s=r.pathOptions)==null?void 0:s.offset}},[(i=r.pathOptions)==null?void 0:i.offset])})})}const lX=VE({isInternal:!1}),BE=VE({isInternal:!0});lX.displayName="StepEdge";BE.displayName="StepEdgeInternal";function HE(e){return h.memo(({id:n,sourceX:r,sourceY:o,targetX:i,targetY:s,label:a,labelStyle:l,labelShowBg:c,labelBgStyle:u,labelBgPadding:f,labelBgBorderRadius:d,style:p,markerEnd:g,markerStart:v,interactionWidth:w})=>{const[_,y,b]=sE({sourceX:r,sourceY:o,targetX:i,targetY:s}),x=e.isInternal?void 0:n;return m.jsx(Fd,{id:x,path:_,labelX:y,labelY:b,label:a,labelStyle:l,labelShowBg:c,labelBgStyle:u,labelBgPadding:f,labelBgBorderRadius:d,style:p,markerEnd:g,markerStart:v,interactionWidth:w})})}const cX=HE({isInternal:!1}),WE=HE({isInternal:!0});cX.displayName="StraightEdge";WE.displayName="StraightEdgeInternal";function UE(e){return h.memo(({id:n,sourceX:r,sourceY:o,targetX:i,targetY:s,sourcePosition:a=ce.Bottom,targetPosition:l=ce.Top,label:c,labelStyle:u,labelShowBg:f,labelBgStyle:d,labelBgPadding:p,labelBgBorderRadius:g,style:v,markerEnd:w,markerStart:_,pathOptions:y,interactionWidth:b})=>{const[x,S,C]=oE({sourceX:r,sourceY:o,sourcePosition:a,targetX:i,targetY:s,targetPosition:l,curvature:y==null?void 0:y.curvature}),k=e.isInternal?void 0:n;return m.jsx(Fd,{id:k,path:x,labelX:S,labelY:C,label:c,labelStyle:u,labelShowBg:f,labelBgStyle:d,labelBgPadding:p,labelBgBorderRadius:g,style:v,markerEnd:w,markerStart:_,interactionWidth:b})})}const uX=UE({isInternal:!1}),GE=UE({isInternal:!0});uX.displayName="BezierEdge";GE.displayName="BezierEdgeInternal";const mw={default:GE,straight:WE,step:BE,smoothstep:FE,simplebezier:DE},gw={sourceX:null,sourceY:null,targetX:null,targetY:null,sourcePosition:null,targetPosition:null},dX=(e,n,r)=>r===ce.Left?e-n:r===ce.Right?e+n:e,fX=(e,n,r)=>r===ce.Top?e-n:r===ce.Bottom?e+n:e,yw="react-flow__edgeupdater";function vw({position:e,centerX:n,centerY:r,radius:o=10,onMouseDown:i,onMouseEnter:s,onMouseOut:a,type:l}){return m.jsx("circle",{onMouseDown:i,onMouseEnter:s,onMouseOut:a,className:Be([yw,`${yw}-${l}`]),cx:dX(n,o,e),cy:fX(r,o,e),r:o,stroke:"transparent",fill:"transparent"})}function pX({isReconnectable:e,reconnectRadius:n,edge:r,sourceX:o,sourceY:i,targetX:s,targetY:a,sourcePosition:l,targetPosition:c,onReconnect:u,onReconnectStart:f,onReconnectEnd:d,setReconnecting:p,setUpdateHover:g}){const v=Ie(),w=(S,C)=>{if(S.button!==0)return;const{autoPanOnConnect:k,domNode:N,connectionMode:E,connectionRadius:P,lib:T,onConnectStart:A,cancelConnection:D,nodeLookup:V,rfId:j,panBy:L,updateConnection:I}=v.getState(),z=C.type==="target",M=(W,$)=>{p(!1),d==null||d(W,r,C.type,$)},R=W=>u==null?void 0:u(r,W),O=(W,$)=>{p(!0),f==null||f(S,r,C.type),A==null||A(W,$)};Oh.onPointerDown(S.nativeEvent,{autoPanOnConnect:k,connectionMode:E,connectionRadius:P,domNode:N,handleId:C.id,nodeId:C.nodeId,nodeLookup:V,isTarget:z,edgeUpdaterType:C.type,lib:T,flowId:j,cancelConnection:D,panBy:L,isValidConnection:(...W)=>{var $,X;return((X=($=v.getState()).isValidConnection)==null?void 0:X.call($,...W))??!0},onConnect:R,onConnectStart:O,onConnectEnd:(...W)=>{var $,X;return(X=($=v.getState()).onConnectEnd)==null?void 0:X.call($,...W)},onReconnectEnd:M,updateConnection:I,getTransform:()=>v.getState().transform,getFromHandle:()=>v.getState().connection.fromHandle,dragThreshold:v.getState().connectionDragThreshold,handleDomNode:S.currentTarget})},_=S=>w(S,{nodeId:r.target,id:r.targetHandle??null,type:"target"}),y=S=>w(S,{nodeId:r.source,id:r.sourceHandle??null,type:"source"}),b=()=>g(!0),x=()=>g(!1);return m.jsxs(m.Fragment,{children:[(e===!0||e==="source")&&m.jsx(vw,{position:l,centerX:o,centerY:i,radius:n,onMouseDown:_,onMouseEnter:b,onMouseOut:x,type:"source"}),(e===!0||e==="target")&&m.jsx(vw,{position:c,centerX:s,centerY:a,radius:n,onMouseDown:y,onMouseEnter:b,onMouseOut:x,type:"target"})]})}function hX({id:e,edgesFocusable:n,edgesReconnectable:r,elementsSelectable:o,onClick:i,onDoubleClick:s,onContextMenu:a,onMouseEnter:l,onMouseMove:c,onMouseLeave:u,reconnectRadius:f,onReconnect:d,onReconnectStart:p,onReconnectEnd:g,rfId:v,edgeTypes:w,noPanClassName:_,onError:y,disableKeyboardA11y:b}){let x=xe(Z=>Z.edgeLookup.get(e));const S=xe(Z=>Z.defaultEdgeOptions);x=S?{...S,...x}:x;let C=x.type||"default",k=(w==null?void 0:w[C])||mw[C];k===void 0&&(y==null||y("011",In.error011(C)),C="default",k=(w==null?void 0:w.default)||mw.default);const N=!!(x.focusable||n&&typeof x.focusable>"u"),E=typeof d<"u"&&(x.reconnectable||r&&typeof x.reconnectable>"u"),P=!!(x.selectable||o&&typeof x.selectable>"u"),T=h.useRef(null),[A,D]=h.useState(!1),[V,j]=h.useState(!1),L=Ie(),{zIndex:I,sourceX:z,sourceY:M,targetX:R,targetY:O,sourcePosition:W,targetPosition:$}=xe(h.useCallback(Z=>{const ne=Z.nodeLookup.get(x.source),ue=Z.nodeLookup.get(x.target);if(!ne||!ue)return{zIndex:x.zIndex,...gw};const ye=eG({id:e,sourceNode:ne,targetNode:ue,sourceHandle:x.sourceHandle||null,targetHandle:x.targetHandle||null,connectionMode:Z.connectionMode,onError:y});return{zIndex:GU({selected:x.selected,zIndex:x.zIndex,sourceNode:ne,targetNode:ue,elevateOnSelect:Z.elevateEdgesOnSelect,zIndexMode:Z.zIndexMode}),...ye||gw}},[x.source,x.target,x.sourceHandle,x.targetHandle,x.selected,x.zIndex]),Te),X=h.useMemo(()=>x.markerStart?`url('#${Ih(x.markerStart,v)}')`:void 0,[x.markerStart,v]),F=h.useMemo(()=>x.markerEnd?`url('#${Ih(x.markerEnd,v)}')`:void 0,[x.markerEnd,v]);if(x.hidden||z===null||M===null||R===null||O===null)return null;const H=Z=>{var pe;const{addSelectedEdges:ne,unselectNodesAndEdges:ue,multiSelectionActive:ye}=L.getState();P&&(L.setState({nodesSelectionActive:!1}),x.selected&&ye?(ue({nodes:[],edges:[x]}),(pe=T.current)==null||pe.blur()):ne([e])),i&&i(Z,x)},G=s?Z=>{s(Z,{...x})}:void 0,U=a?Z=>{a(Z,{...x})}:void 0,Y=l?Z=>{l(Z,{...x})}:void 0,q=c?Z=>{c(Z,{...x})}:void 0,te=u?Z=>{u(Z,{...x})}:void 0,J=Z=>{var ne;if(!b&&HN.includes(Z.key)&&P){const{unselectNodesAndEdges:ue,addSelectedEdges:ye}=L.getState();Z.key==="Escape"?((ne=T.current)==null||ne.blur(),ue({edges:[x]})):ye([e])}};return m.jsx("svg",{style:{zIndex:I},children:m.jsxs("g",{className:Be(["react-flow__edge",`react-flow__edge-${C}`,x.className,_,{selected:x.selected,animated:x.animated,inactive:!P&&!i,updating:A,selectable:P}]),onClick:H,onDoubleClick:G,onContextMenu:U,onMouseEnter:Y,onMouseMove:q,onMouseLeave:te,onKeyDown:N?J:void 0,tabIndex:N?0:void 0,role:x.ariaRole??(N?"group":"img"),"aria-roledescription":"edge","data-id":e,"data-testid":`rf__edge-${e}`,"aria-label":x.ariaLabel===null?void 0:x.ariaLabel||`Edge from ${x.source} to ${x.target}`,"aria-describedby":N?`${SE}-${v}`:void 0,ref:T,...x.domAttributes,children:[!V&&m.jsx(k,{id:e,source:x.source,target:x.target,type:x.type,selected:x.selected,animated:x.animated,selectable:P,deletable:x.deletable??!0,label:x.label,labelStyle:x.labelStyle,labelShowBg:x.labelShowBg,labelBgStyle:x.labelBgStyle,labelBgPadding:x.labelBgPadding,labelBgBorderRadius:x.labelBgBorderRadius,sourceX:z,sourceY:M,targetX:R,targetY:O,sourcePosition:W,targetPosition:$,data:x.data,style:x.style,sourceHandleId:x.sourceHandle,targetHandleId:x.targetHandle,markerStart:X,markerEnd:F,pathOptions:"pathOptions"in x?x.pathOptions:void 0,interactionWidth:x.interactionWidth}),E&&m.jsx(pX,{edge:x,isReconnectable:E,reconnectRadius:f,onReconnect:d,onReconnectStart:p,onReconnectEnd:g,sourceX:z,sourceY:M,targetX:R,targetY:O,sourcePosition:W,targetPosition:$,setUpdateHover:D,setReconnecting:j})]})})}var mX=h.memo(hX);const gX=e=>({edgesFocusable:e.edgesFocusable,edgesReconnectable:e.edgesReconnectable,elementsSelectable:e.elementsSelectable,connectionMode:e.connectionMode,onError:e.onError});function YE({defaultMarkerColor:e,onlyRenderVisibleElements:n,rfId:r,edgeTypes:o,noPanClassName:i,onReconnect:s,onEdgeContextMenu:a,onEdgeMouseEnter:l,onEdgeMouseMove:c,onEdgeMouseLeave:u,onEdgeClick:f,reconnectRadius:d,onEdgeDoubleClick:p,onReconnectStart:g,onReconnectEnd:v,disableKeyboardA11y:w}){const{edgesFocusable:_,edgesReconnectable:y,elementsSelectable:b,onError:x}=xe(gX,Te),S=eX(n);return m.jsxs("div",{className:"react-flow__edges",children:[m.jsx(iX,{defaultColor:e,rfId:r}),S.map(C=>m.jsx(mX,{id:C,edgesFocusable:_,edgesReconnectable:y,elementsSelectable:b,noPanClassName:i,onReconnect:s,onContextMenu:a,onMouseEnter:l,onMouseMove:c,onMouseLeave:u,onClick:f,reconnectRadius:d,onDoubleClick:p,onReconnectStart:g,onReconnectEnd:v,rfId:r,onError:x,edgeTypes:o,disableKeyboardA11y:w},C))]})}YE.displayName="EdgeRenderer";const yX=h.memo(YE),vX=e=>`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]})`;function xX({children:e}){const n=xe(vX);return m.jsx("div",{className:"react-flow__viewport xyflow__viewport react-flow__container",style:{transform:n},children:e})}function wX(e){const n=o0(),r=h.useRef(!1);h.useEffect(()=>{!r.current&&n.viewportInitialized&&e&&(setTimeout(()=>e(n),1),r.current=!0)},[e,n.viewportInitialized])}const bX=e=>{var n;return(n=e.panZoom)==null?void 0:n.syncViewport};function _X(e){const n=xe(bX),r=Ie();return h.useEffect(()=>{e&&(n==null||n(e),r.setState({transform:[e.x,e.y,e.zoom]}))},[e,n]),null}function SX(e){return e.connection.inProgress?{...e.connection,to:nl(e.connection.to,e.transform)}:{...e.connection}}function CX(e){return SX}function kX(e){const n=CX();return xe(n,Te)}const NX=e=>({nodesConnectable:e.nodesConnectable,isValid:e.connection.isValid,inProgress:e.connection.inProgress,width:e.width,height:e.height});function EX({containerStyle:e,style:n,type:r,component:o}){const{nodesConnectable:i,width:s,height:a,isValid:l,inProgress:c}=xe(NX,Te);return!(s&&i&&c)?null:m.jsx("svg",{style:e,width:s,height:a,className:"react-flow__connectionline react-flow__container",children:m.jsx("g",{className:Be(["react-flow__connection",GN(l)]),children:m.jsx(XE,{style:n,type:r,CustomComponent:o,isValid:l})})})}const XE=({style:e,type:n=Nr.Bezier,CustomComponent:r,isValid:o})=>{const{inProgress:i,from:s,fromNode:a,fromHandle:l,fromPosition:c,to:u,toNode:f,toHandle:d,toPosition:p,pointer:g}=kX();if(!i)return;if(r)return m.jsx(r,{connectionLineType:n,connectionLineStyle:e,fromNode:a,fromHandle:l,fromX:s.x,fromY:s.y,toX:u.x,toY:u.y,fromPosition:c,toPosition:p,connectionStatus:GN(o),toNode:f,toHandle:d,pointer:g});let v="";const w={sourceX:s.x,sourceY:s.y,sourcePosition:c,targetX:u.x,targetY:u.y,targetPosition:p};switch(n){case Nr.Bezier:[v]=oE(w);break;case Nr.SimpleBezier:[v]=$E(w);break;case Nr.Step:[v]=Th({...w,borderRadius:0});break;case Nr.SmoothStep:[v]=Th(w);break;default:[v]=sE(w)}return m.jsx("path",{d:v,fill:"none",className:"react-flow__connection-path",style:e})};XE.displayName="ConnectionLine";const PX={};function xw(e=PX){h.useRef(e),Ie(),h.useEffect(()=>{},[e])}function jX(){Ie(),h.useRef(!1),h.useEffect(()=>{},[])}function KE({nodeTypes:e,edgeTypes:n,onInit:r,onNodeClick:o,onEdgeClick:i,onNodeDoubleClick:s,onEdgeDoubleClick:a,onNodeMouseEnter:l,onNodeMouseMove:c,onNodeMouseLeave:u,onNodeContextMenu:f,onSelectionContextMenu:d,onSelectionStart:p,onSelectionEnd:g,connectionLineType:v,connectionLineStyle:w,connectionLineComponent:_,connectionLineContainerStyle:y,selectionKeyCode:b,selectionOnDrag:x,selectionMode:S,multiSelectionKeyCode:C,panActivationKeyCode:k,zoomActivationKeyCode:N,deleteKeyCode:E,onlyRenderVisibleElements:P,elementsSelectable:T,defaultViewport:A,translateExtent:D,minZoom:V,maxZoom:j,preventScrolling:L,defaultMarkerColor:I,zoomOnScroll:z,zoomOnPinch:M,panOnScroll:R,panOnScrollSpeed:O,panOnScrollMode:W,zoomOnDoubleClick:$,panOnDrag:X,onPaneClick:F,onPaneMouseEnter:H,onPaneMouseMove:G,onPaneMouseLeave:U,onPaneScroll:Y,onPaneContextMenu:q,paneClickDistance:te,nodeClickDistance:J,onEdgeContextMenu:Z,onEdgeMouseEnter:ne,onEdgeMouseMove:ue,onEdgeMouseLeave:ye,reconnectRadius:pe,onReconnect:Ne,onReconnectStart:mt,onReconnectEnd:qe,noDragClassName:Ft,noWheelClassName:ur,noPanClassName:dr,disableKeyboardA11y:no,nodeExtent:Ho,rfId:ro,viewport:fr,onViewportChange:xn}){return xw(e),xw(n),jX(),wX(r),_X(fr),m.jsx(WY,{onPaneClick:F,onPaneMouseEnter:H,onPaneMouseMove:G,onPaneMouseLeave:U,onPaneContextMenu:q,onPaneScroll:Y,paneClickDistance:te,deleteKeyCode:E,selectionKeyCode:b,selectionOnDrag:x,selectionMode:S,onSelectionStart:p,onSelectionEnd:g,multiSelectionKeyCode:C,panActivationKeyCode:k,zoomActivationKeyCode:N,elementsSelectable:T,zoomOnScroll:z,zoomOnPinch:M,zoomOnDoubleClick:$,panOnScroll:R,panOnScrollSpeed:O,panOnScrollMode:W,panOnDrag:X,defaultViewport:A,translateExtent:D,minZoom:V,maxZoom:j,onSelectionContextMenu:d,preventScrolling:L,noDragClassName:Ft,noWheelClassName:ur,noPanClassName:dr,disableKeyboardA11y:no,onViewportChange:xn,isControlledViewport:!!fr,children:m.jsxs(xX,{children:[m.jsx(yX,{edgeTypes:n,onEdgeClick:i,onEdgeDoubleClick:a,onReconnect:Ne,onReconnectStart:mt,onReconnectEnd:qe,onlyRenderVisibleElements:P,onEdgeContextMenu:Z,onEdgeMouseEnter:ne,onEdgeMouseMove:ue,onEdgeMouseLeave:ye,reconnectRadius:pe,defaultMarkerColor:I,noPanClassName:dr,disableKeyboardA11y:no,rfId:ro}),m.jsx(EX,{style:w,type:v,component:_,containerStyle:y}),m.jsx("div",{className:"react-flow__edgelabel-renderer"}),m.jsx(JY,{nodeTypes:e,onNodeClick:o,onNodeDoubleClick:s,onNodeMouseEnter:l,onNodeMouseMove:c,onNodeMouseLeave:u,onNodeContextMenu:f,nodeClickDistance:J,onlyRenderVisibleElements:P,noPanClassName:dr,noDragClassName:Ft,disableKeyboardA11y:no,nodeExtent:Ho,rfId:ro}),m.jsx("div",{className:"react-flow__viewport-portal"})]})})}KE.displayName="GraphView";const MX=h.memo(KE),ww=({nodes:e,edges:n,defaultNodes:r,defaultEdges:o,width:i,height:s,fitView:a,fitViewOptions:l,minZoom:c=.5,maxZoom:u=2,nodeOrigin:f,nodeExtent:d,zIndexMode:p="basic"}={})=>{const g=new Map,v=new Map,w=new Map,_=new Map,y=o??n??[],b=r??e??[],x=f??[0,0],S=d??ka;cE(w,_,y);const{nodesInitialized:C}=$h(b,g,v,{nodeOrigin:x,nodeExtent:S,zIndexMode:p});let k=[0,0,1];if(a&&i&&s){const N=el(g,{filter:A=>!!((A.width||A.initialWidth)&&(A.height||A.initialHeight))}),{x:E,y:P,zoom:T}=Zg(N,i,s,c,u,(l==null?void 0:l.padding)??.1);k=[E,P,T]}return{rfId:"1",width:i??0,height:s??0,transform:k,nodes:b,nodesInitialized:C,nodeLookup:g,parentLookup:v,edges:y,edgeLookup:_,connectionLookup:w,onNodesChange:null,onEdgesChange:null,hasDefaultNodes:r!==void 0,hasDefaultEdges:o!==void 0,panZoom:null,minZoom:c,maxZoom:u,translateExtent:ka,nodeExtent:S,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionMode:Ui.Strict,domNode:null,paneDragging:!1,noPanClassName:"nopan",nodeOrigin:x,nodeDragThreshold:1,connectionDragThreshold:1,snapGrid:[15,15],snapToGrid:!1,nodesDraggable:!0,nodesConnectable:!0,nodesFocusable:!0,edgesFocusable:!0,edgesReconnectable:!0,elementsSelectable:!0,elevateNodesOnSelect:!0,elevateEdgesOnSelect:!0,selectNodesOnDrag:!0,multiSelectionActive:!1,fitViewQueued:a??!1,fitViewOptions:l,fitViewResolver:null,connection:{...UN},connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,autoPanOnNodeFocus:!0,autoPanSpeed:15,connectionRadius:20,onError:FU,isValidConnection:void 0,onSelectionChangeHandlers:[],lib:"react",debug:!1,ariaLabelConfig:WN,zIndexMode:p,onNodesChangeMiddlewareMap:new Map,onEdgesChangeMiddlewareMap:new Map}},RX=({nodes:e,edges:n,defaultNodes:r,defaultEdges:o,width:i,height:s,fitView:a,fitViewOptions:l,minZoom:c,maxZoom:u,nodeOrigin:f,nodeExtent:d,zIndexMode:p})=>XG((g,v)=>{async function w(){const{nodeLookup:_,panZoom:y,fitViewOptions:b,fitViewResolver:x,width:S,height:C,minZoom:k,maxZoom:N}=v();y&&(await LU({nodes:_,width:S,height:C,panZoom:y,minZoom:k,maxZoom:N},b),x==null||x.resolve(!0),g({fitViewResolver:null}))}return{...ww({nodes:e,edges:n,width:i,height:s,fitView:a,fitViewOptions:l,minZoom:c,maxZoom:u,nodeOrigin:f,nodeExtent:d,defaultNodes:r,defaultEdges:o,zIndexMode:p}),setNodes:_=>{const{nodeLookup:y,parentLookup:b,nodeOrigin:x,elevateNodesOnSelect:S,fitViewQueued:C,zIndexMode:k,nodesSelectionActive:N}=v(),{nodesInitialized:E,hasSelectedNodes:P}=$h(_,y,b,{nodeOrigin:x,nodeExtent:d,elevateNodesOnSelect:S,checkEquality:!0,zIndexMode:k}),T=N&&P;C&&E?(w(),g({nodes:_,nodesInitialized:E,fitViewQueued:!1,fitViewOptions:void 0,nodesSelectionActive:T})):g({nodes:_,nodesInitialized:E,nodesSelectionActive:T})},setEdges:_=>{const{connectionLookup:y,edgeLookup:b}=v();cE(y,b,_),g({edges:_})},setDefaultNodesAndEdges:(_,y)=>{if(_){const{setNodes:b}=v();b(_),g({hasDefaultNodes:!0})}if(y){const{setEdges:b}=v();b(y),g({hasDefaultEdges:!0})}},updateNodeInternals:_=>{const{triggerNodeChanges:y,nodeLookup:b,parentLookup:x,domNode:S,nodeOrigin:C,nodeExtent:k,debug:N,fitViewQueued:E,zIndexMode:P}=v(),{changes:T,updatedInternals:A}=lG(_,b,x,S,C,k,P);A&&(oG(b,x,{nodeOrigin:C,nodeExtent:k,zIndexMode:P}),E?(w(),g({fitViewQueued:!1,fitViewOptions:void 0})):g({}),(T==null?void 0:T.length)>0&&(N&&console.log("React Flow: trigger node changes",T),y==null||y(T)))},updateNodePositions:(_,y=!1)=>{const b=[];let x=[];const{nodeLookup:S,triggerNodeChanges:C,connection:k,updateConnection:N,onNodesChangeMiddlewareMap:E}=v();for(const[P,T]of _){const A=S.get(P),D=!!(A!=null&&A.expandParent&&(A!=null&&A.parentId)&&(T!=null&&T.position)),V={id:P,type:"position",position:D?{x:Math.max(0,T.position.x),y:Math.max(0,T.position.y)}:T.position,dragging:y};if(A&&k.inProgress&&k.fromNode.id===A.id){const j=$o(A,k.fromHandle,ce.Left,!0);N({...k,from:j})}D&&A.parentId&&b.push({id:P,parentId:A.parentId,rect:{...T.internals.positionAbsolute,width:T.measured.width??0,height:T.measured.height??0}}),x.push(V)}if(b.length>0){const{parentLookup:P,nodeOrigin:T}=v(),A=r0(b,S,P,T);x.push(...A)}for(const P of E.values())x=P(x);C(x)},triggerNodeChanges:_=>{const{onNodesChange:y,setNodes:b,nodes:x,hasDefaultNodes:S,debug:C}=v();if(_!=null&&_.length){if(S){const k=mY(_,x);b(k)}C&&console.log("React Flow: trigger node changes",_),y==null||y(_)}},triggerEdgeChanges:_=>{const{onEdgesChange:y,setEdges:b,edges:x,hasDefaultEdges:S,debug:C}=v();if(_!=null&&_.length){if(S){const k=gY(_,x);b(k)}C&&console.log("React Flow: trigger edge changes",_),y==null||y(_)}},addSelectedNodes:_=>{const{multiSelectionActive:y,edgeLookup:b,nodeLookup:x,triggerNodeChanges:S,triggerEdgeChanges:C}=v();if(y){const k=_.map(N=>fo(N,!0));S(k);return}S(yi(x,new Set([..._]),!0)),C(yi(b))},addSelectedEdges:_=>{const{multiSelectionActive:y,edgeLookup:b,nodeLookup:x,triggerNodeChanges:S,triggerEdgeChanges:C}=v();if(y){const k=_.map(N=>fo(N,!0));C(k);return}C(yi(b,new Set([..._]))),S(yi(x,new Set,!0))},unselectNodesAndEdges:({nodes:_,edges:y}={})=>{const{edges:b,nodes:x,nodeLookup:S,triggerNodeChanges:C,triggerEdgeChanges:k}=v(),N=_||x,E=y||b,P=[];for(const A of N){if(!A.selected)continue;const D=S.get(A.id);D&&(D.selected=!1),P.push(fo(A.id,!1))}const T=[];for(const A of E)A.selected&&T.push(fo(A.id,!1));C(P),k(T)},setMinZoom:_=>{const{panZoom:y,maxZoom:b}=v();y==null||y.setScaleExtent([_,b]),g({minZoom:_})},setMaxZoom:_=>{const{panZoom:y,minZoom:b}=v();y==null||y.setScaleExtent([b,_]),g({maxZoom:_})},setTranslateExtent:_=>{var y;(y=v().panZoom)==null||y.setTranslateExtent(_),g({translateExtent:_})},resetSelectedElements:()=>{const{edges:_,nodes:y,triggerNodeChanges:b,triggerEdgeChanges:x,elementsSelectable:S}=v();if(!S)return;const C=y.reduce((N,E)=>E.selected?[...N,fo(E.id,!1)]:N,[]),k=_.reduce((N,E)=>E.selected?[...N,fo(E.id,!1)]:N,[]);b(C),x(k)},setNodeExtent:_=>{const{nodes:y,nodeLookup:b,parentLookup:x,nodeOrigin:S,elevateNodesOnSelect:C,nodeExtent:k,zIndexMode:N}=v();_[0][0]===k[0][0]&&_[0][1]===k[0][1]&&_[1][0]===k[1][0]&&_[1][1]===k[1][1]||($h(y,b,x,{nodeOrigin:S,nodeExtent:_,elevateNodesOnSelect:C,checkEquality:!1,zIndexMode:N}),g({nodeExtent:_}))},panBy:_=>{const{transform:y,width:b,height:x,panZoom:S,translateExtent:C}=v();return cG({delta:_,panZoom:S,transform:y,translateExtent:C,width:b,height:x})},setCenter:async(_,y,b)=>{const{width:x,height:S,maxZoom:C,panZoom:k}=v();if(!k)return Promise.resolve(!1);const N=typeof(b==null?void 0:b.zoom)<"u"?b.zoom:C;return await k.setViewport({x:x/2-_*N,y:S/2-y*N,zoom:N},{duration:b==null?void 0:b.duration,ease:b==null?void 0:b.ease,interpolate:b==null?void 0:b.interpolate}),Promise.resolve(!0)},cancelConnection:()=>{g({connection:{...UN}})},updateConnection:_=>{g({connection:_})},reset:()=>g({...ww()})}},Object.is);function Vd({initialNodes:e,initialEdges:n,defaultNodes:r,defaultEdges:o,initialWidth:i,initialHeight:s,initialMinZoom:a,initialMaxZoom:l,initialFitViewOptions:c,fitView:u,nodeOrigin:f,nodeExtent:d,zIndexMode:p,children:g}){const[v]=h.useState(()=>RX({nodes:e,edges:n,defaultNodes:r,defaultEdges:o,width:i,height:s,fitView:u,minZoom:a,maxZoom:l,fitViewOptions:c,nodeOrigin:f,nodeExtent:d,zIndexMode:p}));return m.jsx(KG,{value:v,children:m.jsx(xY,{children:g})})}function AX({children:e,nodes:n,edges:r,defaultNodes:o,defaultEdges:i,width:s,height:a,fitView:l,fitViewOptions:c,minZoom:u,maxZoom:f,nodeOrigin:d,nodeExtent:p,zIndexMode:g}){return h.useContext(Dd)?m.jsx(m.Fragment,{children:e}):m.jsx(Vd,{initialNodes:n,initialEdges:r,defaultNodes:o,defaultEdges:i,initialWidth:s,initialHeight:a,fitView:l,initialFitViewOptions:c,initialMinZoom:u,initialMaxZoom:f,nodeOrigin:d,nodeExtent:p,zIndexMode:g,children:e})}const TX={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0};function IX({nodes:e,edges:n,defaultNodes:r,defaultEdges:o,className:i,nodeTypes:s,edgeTypes:a,onNodeClick:l,onEdgeClick:c,onInit:u,onMove:f,onMoveStart:d,onMoveEnd:p,onConnect:g,onConnectStart:v,onConnectEnd:w,onClickConnectStart:_,onClickConnectEnd:y,onNodeMouseEnter:b,onNodeMouseMove:x,onNodeMouseLeave:S,onNodeContextMenu:C,onNodeDoubleClick:k,onNodeDragStart:N,onNodeDrag:E,onNodeDragStop:P,onNodesDelete:T,onEdgesDelete:A,onDelete:D,onSelectionChange:V,onSelectionDragStart:j,onSelectionDrag:L,onSelectionDragStop:I,onSelectionContextMenu:z,onSelectionStart:M,onSelectionEnd:R,onBeforeDelete:O,connectionMode:W,connectionLineType:$=Nr.Bezier,connectionLineStyle:X,connectionLineComponent:F,connectionLineContainerStyle:H,deleteKeyCode:G="Backspace",selectionKeyCode:U="Shift",selectionOnDrag:Y=!1,selectionMode:q=Na.Full,panActivationKeyCode:te="Space",multiSelectionKeyCode:J=Pa()?"Meta":"Control",zoomActivationKeyCode:Z=Pa()?"Meta":"Control",snapToGrid:ne,snapGrid:ue,onlyRenderVisibleElements:ye=!1,selectNodesOnDrag:pe,nodesDraggable:Ne,autoPanOnNodeFocus:mt,nodesConnectable:qe,nodesFocusable:Ft,nodeOrigin:ur=CE,edgesFocusable:dr,edgesReconnectable:no,elementsSelectable:Ho=!0,defaultViewport:ro=lY,minZoom:fr=.5,maxZoom:xn=2,translateExtent:Wo=ka,preventScrolling:Bd=!0,nodeExtent:Uo,defaultMarkerColor:rl="#b1b1b7",zoomOnScroll:ol=!0,zoomOnPinch:il=!0,panOnScroll:sl=!1,panOnScrollSpeed:al=.5,panOnScrollMode:ll=_o.Free,zoomOnDoubleClick:K=!0,panOnDrag:he=!0,onPaneClick:de,onPaneMouseEnter:He,onPaneMouseMove:Nt,onPaneMouseLeave:wn,onPaneScroll:oo,onPaneContextMenu:cl,paneClickDistance:ul=1,nodeClickDistance:dl=0,children:io,onReconnect:Et,onReconnectStart:eP,onReconnectEnd:tP,onEdgeContextMenu:nP,onEdgeDoubleClick:rP,onEdgeMouseEnter:oP,onEdgeMouseMove:iP,onEdgeMouseLeave:sP,reconnectRadius:aP=10,onNodesChange:lP,onEdgesChange:cP,noDragClassName:uP="nodrag",noWheelClassName:dP="nowheel",noPanClassName:u0="nopan",fitView:d0,fitViewOptions:f0,connectOnClick:fP,attributionPosition:pP,proOptions:hP,defaultEdgeOptions:mP,elevateNodesOnSelect:gP=!0,elevateEdgesOnSelect:yP=!1,disableKeyboardA11y:p0=!1,autoPanOnConnect:vP,autoPanOnNodeDrag:xP,autoPanSpeed:wP,connectionRadius:bP,isValidConnection:_P,onError:SP,style:CP,id:h0,nodeDragThreshold:kP,connectionDragThreshold:NP,viewport:EP,onViewportChange:PP,width:jP,height:MP,colorMode:RP="light",debug:AP,onScroll:fl,ariaLabelConfig:TP,zIndexMode:m0="basic",...IP},$P){const Hd=h0||"1",OP=fY(RP),DP=h.useCallback(g0=>{g0.currentTarget.scrollTo({top:0,left:0,behavior:"instant"}),fl==null||fl(g0)},[fl]);return m.jsx("div",{"data-testid":"rf__wrapper",...IP,onScroll:DP,style:{...CP,...TX},ref:$P,className:Be(["react-flow",i,OP]),id:h0,role:"application",children:m.jsxs(AX,{nodes:e,edges:n,width:jP,height:MP,fitView:d0,fitViewOptions:f0,minZoom:fr,maxZoom:xn,nodeOrigin:ur,nodeExtent:Uo,zIndexMode:m0,children:[m.jsx(dY,{nodes:e,edges:n,defaultNodes:r,defaultEdges:o,onConnect:g,onConnectStart:v,onConnectEnd:w,onClickConnectStart:_,onClickConnectEnd:y,nodesDraggable:Ne,autoPanOnNodeFocus:mt,nodesConnectable:qe,nodesFocusable:Ft,edgesFocusable:dr,edgesReconnectable:no,elementsSelectable:Ho,elevateNodesOnSelect:gP,elevateEdgesOnSelect:yP,minZoom:fr,maxZoom:xn,nodeExtent:Uo,onNodesChange:lP,onEdgesChange:cP,snapToGrid:ne,snapGrid:ue,connectionMode:W,translateExtent:Wo,connectOnClick:fP,defaultEdgeOptions:mP,fitView:d0,fitViewOptions:f0,onNodesDelete:T,onEdgesDelete:A,onDelete:D,onNodeDragStart:N,onNodeDrag:E,onNodeDragStop:P,onSelectionDrag:L,onSelectionDragStart:j,onSelectionDragStop:I,onMove:f,onMoveStart:d,onMoveEnd:p,noPanClassName:u0,nodeOrigin:ur,rfId:Hd,autoPanOnConnect:vP,autoPanOnNodeDrag:xP,autoPanSpeed:wP,onError:SP,connectionRadius:bP,isValidConnection:_P,selectNodesOnDrag:pe,nodeDragThreshold:kP,connectionDragThreshold:NP,onBeforeDelete:O,debug:AP,ariaLabelConfig:TP,zIndexMode:m0}),m.jsx(MX,{onInit:u,onNodeClick:l,onEdgeClick:c,onNodeMouseEnter:b,onNodeMouseMove:x,onNodeMouseLeave:S,onNodeContextMenu:C,onNodeDoubleClick:k,nodeTypes:s,edgeTypes:a,connectionLineType:$,connectionLineStyle:X,connectionLineComponent:F,connectionLineContainerStyle:H,selectionKeyCode:U,selectionOnDrag:Y,selectionMode:q,deleteKeyCode:G,multiSelectionKeyCode:J,panActivationKeyCode:te,zoomActivationKeyCode:Z,onlyRenderVisibleElements:ye,defaultViewport:ro,translateExtent:Wo,minZoom:fr,maxZoom:xn,preventScrolling:Bd,zoomOnScroll:ol,zoomOnPinch:il,zoomOnDoubleClick:K,panOnScroll:sl,panOnScrollSpeed:al,panOnScrollMode:ll,panOnDrag:he,onPaneClick:de,onPaneMouseEnter:He,onPaneMouseMove:Nt,onPaneMouseLeave:wn,onPaneScroll:oo,onPaneContextMenu:cl,paneClickDistance:ul,nodeClickDistance:dl,onSelectionContextMenu:z,onSelectionStart:M,onSelectionEnd:R,onReconnect:Et,onReconnectStart:eP,onReconnectEnd:tP,onEdgeContextMenu:nP,onEdgeDoubleClick:rP,onEdgeMouseEnter:oP,onEdgeMouseMove:iP,onEdgeMouseLeave:sP,reconnectRadius:aP,defaultMarkerColor:rl,noDragClassName:uP,noWheelClassName:dP,noPanClassName:u0,rfId:Hd,disableKeyboardA11y:p0,nodeExtent:Uo,viewport:EP,onViewportChange:PP}),m.jsx(aY,{onSelectionChange:V}),io,m.jsx(nY,{proOptions:hP,position:pP}),m.jsx(tY,{rfId:Hd,disableKeyboardA11y:p0})]})})}var s0=NE(IX);function $X({dimensions:e,lineWidth:n,variant:r,className:o}){return m.jsx("path",{strokeWidth:n,d:`M${e[0]/2} 0 V${e[1]} M0 ${e[1]/2} H${e[0]}`,className:Be(["react-flow__background-pattern",r,o])})}function OX({radius:e,className:n}){return m.jsx("circle",{cx:e,cy:e,r:e,className:Be(["react-flow__background-pattern","dots",n])})}var Fr;(function(e){e.Lines="lines",e.Dots="dots",e.Cross="cross"})(Fr||(Fr={}));const DX={[Fr.Dots]:1,[Fr.Lines]:1,[Fr.Cross]:6},LX=e=>({transform:e.transform,patternId:`pattern-${e.rfId}`});function qE({id:e,variant:n=Fr.Dots,gap:r=20,size:o,lineWidth:i=1,offset:s=0,color:a,bgColor:l,style:c,className:u,patternClassName:f}){const d=h.useRef(null),{transform:p,patternId:g}=xe(LX,Te),v=o||DX[n],w=n===Fr.Dots,_=n===Fr.Cross,y=Array.isArray(r)?r:[r,r],b=[y[0]*p[2]||1,y[1]*p[2]||1],x=v*p[2],S=Array.isArray(s)?s:[s,s],C=_?[x,x]:b,k=[S[0]*p[2]||1+C[0]/2,S[1]*p[2]||1+C[1]/2],N=`${g}${e||""}`;return m.jsxs("svg",{className:Be(["react-flow__background",u]),style:{...c,...zd,"--xy-background-color-props":l,"--xy-background-pattern-color-props":a},ref:d,"data-testid":"rf__background",children:[m.jsx("pattern",{id:N,x:p[0]%b[0],y:p[1]%b[1],width:b[0],height:b[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${k[0]},-${k[1]})`,children:w?m.jsx(OX,{radius:x/2,className:f}):m.jsx($X,{dimensions:C,lineWidth:i,variant:n,className:f})}),m.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${N})`})]})}qE.displayName="Background";const a0=h.memo(qE);function zX(){return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",children:m.jsx("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"})})}function FX(){return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5",children:m.jsx("path",{d:"M0 0h32v4.2H0z"})})}function VX(){return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30",children:m.jsx("path",{d:"M3.692 4.63c0-.53.4-.938.939-.938h5.215V0H4.708C2.13 0 0 2.054 0 4.63v5.216h3.692V4.631zM27.354 0h-5.2v3.692h5.17c.53 0 .984.4.984.939v5.215H32V4.631A4.624 4.624 0 0027.354 0zm.954 24.83c0 .532-.4.94-.939.94h-5.215v3.768h5.215c2.577 0 4.631-2.13 4.631-4.707v-5.139h-3.692v5.139zm-23.677.94c-.531 0-.939-.4-.939-.94v-5.138H0v5.139c0 2.577 2.13 4.707 4.708 4.707h5.138V25.77H4.631z"})})}function BX(){return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:m.jsx("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0 8 0 4.571 3.429 4.571 7.619v3.048H3.048A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047zm4.724-13.866H7.467V7.619c0-2.59 2.133-4.724 4.723-4.724 2.591 0 4.724 2.133 4.724 4.724v3.048z"})})}function HX(){return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:m.jsx("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0c-4.114 1.828-1.37 2.133.305 2.438 1.676.305 4.42 2.59 4.42 5.181v3.048H3.047A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047z"})})}function Zl({children:e,className:n,...r}){return m.jsx("button",{type:"button",className:Be(["react-flow__controls-button",n]),...r,children:e})}const WX=e=>({isInteractive:e.nodesDraggable||e.nodesConnectable||e.elementsSelectable,minZoomReached:e.transform[2]<=e.minZoom,maxZoomReached:e.transform[2]>=e.maxZoom,ariaLabelConfig:e.ariaLabelConfig});function ZE({style:e,showZoom:n=!0,showFitView:r=!0,showInteractive:o=!0,fitViewOptions:i,onZoomIn:s,onZoomOut:a,onFitView:l,onInteractiveChange:c,className:u,children:f,position:d="bottom-left",orientation:p="vertical","aria-label":g}){const v=Ie(),{isInteractive:w,minZoomReached:_,maxZoomReached:y,ariaLabelConfig:b}=xe(WX,Te),{zoomIn:x,zoomOut:S,fitView:C}=o0(),k=()=>{x(),s==null||s()},N=()=>{S(),a==null||a()},E=()=>{C(i),l==null||l()},P=()=>{v.setState({nodesDraggable:!w,nodesConnectable:!w,elementsSelectable:!w}),c==null||c(!w)},T=p==="horizontal"?"horizontal":"vertical";return m.jsxs(Ld,{className:Be(["react-flow__controls",T,u]),position:d,style:e,"data-testid":"rf__controls","aria-label":g??b["controls.ariaLabel"],children:[n&&m.jsxs(m.Fragment,{children:[m.jsx(Zl,{onClick:k,className:"react-flow__controls-zoomin",title:b["controls.zoomIn.ariaLabel"],"aria-label":b["controls.zoomIn.ariaLabel"],disabled:y,children:m.jsx(zX,{})}),m.jsx(Zl,{onClick:N,className:"react-flow__controls-zoomout",title:b["controls.zoomOut.ariaLabel"],"aria-label":b["controls.zoomOut.ariaLabel"],disabled:_,children:m.jsx(FX,{})})]}),r&&m.jsx(Zl,{className:"react-flow__controls-fitview",onClick:E,title:b["controls.fitView.ariaLabel"],"aria-label":b["controls.fitView.ariaLabel"],children:m.jsx(VX,{})}),o&&m.jsx(Zl,{className:"react-flow__controls-interactive",onClick:P,title:b["controls.interactive.ariaLabel"],"aria-label":b["controls.interactive.ariaLabel"],children:w?m.jsx(HX,{}):m.jsx(BX,{})}),f]})}ZE.displayName="Controls";const l0=h.memo(ZE);function UX({id:e,x:n,y:r,width:o,height:i,style:s,color:a,strokeColor:l,strokeWidth:c,className:u,borderRadius:f,shapeRendering:d,selected:p,onClick:g}){const{background:v,backgroundColor:w}=s||{},_=a||v||w;return m.jsx("rect",{className:Be(["react-flow__minimap-node",{selected:p},u]),x:n,y:r,rx:f,ry:f,width:o,height:i,style:{fill:_,stroke:l,strokeWidth:c},shapeRendering:d,onClick:g?y=>g(y,e):void 0})}const GX=h.memo(UX),YX=e=>e.nodes.map(n=>n.id),Kf=e=>e instanceof Function?e:()=>e;function XX({nodeStrokeColor:e,nodeColor:n,nodeClassName:r="",nodeBorderRadius:o=5,nodeStrokeWidth:i,nodeComponent:s=GX,onClick:a}){const l=xe(YX,Te),c=Kf(n),u=Kf(e),f=Kf(r),d=typeof window>"u"||window.chrome?"crispEdges":"geometricPrecision";return m.jsx(m.Fragment,{children:l.map(p=>m.jsx(qX,{id:p,nodeColorFunc:c,nodeStrokeColorFunc:u,nodeClassNameFunc:f,nodeBorderRadius:o,nodeStrokeWidth:i,NodeComponent:s,onClick:a,shapeRendering:d},p))})}function KX({id:e,nodeColorFunc:n,nodeStrokeColorFunc:r,nodeClassNameFunc:o,nodeBorderRadius:i,nodeStrokeWidth:s,shapeRendering:a,NodeComponent:l,onClick:c}){const{node:u,x:f,y:d,width:p,height:g}=xe(v=>{const w=v.nodeLookup.get(e);if(!w)return{node:void 0,x:0,y:0,width:0,height:0};const _=w.internals.userNode,{x:y,y:b}=w.internals.positionAbsolute,{width:x,height:S}=cr(_);return{node:_,x:y,y:b,width:x,height:S}},Te);return!u||u.hidden||!QN(u)?null:m.jsx(l,{x:f,y:d,width:p,height:g,style:u.style,selected:!!u.selected,className:o(u),color:n(u),borderRadius:i,strokeColor:r(u),strokeWidth:s,shapeRendering:a,onClick:c,id:u.id})}const qX=h.memo(KX);var ZX=h.memo(XX);const QX=200,JX=150,eK=e=>!e.hidden,tK=e=>{const n={x:-e.transform[0]/e.transform[2],y:-e.transform[1]/e.transform[2],width:e.width/e.transform[2],height:e.height/e.transform[2]};return{viewBB:n,boundingRect:e.nodeLookup.size>0?ZN(el(e.nodeLookup,{filter:eK}),n):n,rfId:e.rfId,panZoom:e.panZoom,translateExtent:e.translateExtent,flowWidth:e.width,flowHeight:e.height,ariaLabelConfig:e.ariaLabelConfig}},nK="react-flow__minimap-desc";function QE({style:e,className:n,nodeStrokeColor:r,nodeColor:o,nodeClassName:i="",nodeBorderRadius:s=5,nodeStrokeWidth:a,nodeComponent:l,bgColor:c,maskColor:u,maskStrokeColor:f,maskStrokeWidth:d,position:p="bottom-right",onClick:g,onNodeClick:v,pannable:w=!1,zoomable:_=!1,ariaLabel:y,inversePan:b,zoomStep:x=1,offsetScale:S=5}){const C=Ie(),k=h.useRef(null),{boundingRect:N,viewBB:E,rfId:P,panZoom:T,translateExtent:A,flowWidth:D,flowHeight:V,ariaLabelConfig:j}=xe(tK,Te),L=(e==null?void 0:e.width)??QX,I=(e==null?void 0:e.height)??JX,z=N.width/L,M=N.height/I,R=Math.max(z,M),O=R*L,W=R*I,$=S*R,X=N.x-(O-N.width)/2-$,F=N.y-(W-N.height)/2-$,H=O+$*2,G=W+$*2,U=`${nK}-${P}`,Y=h.useRef(0),q=h.useRef();Y.current=R,h.useEffect(()=>{if(k.current&&T)return q.current=vG({domNode:k.current,panZoom:T,getTransform:()=>C.getState().transform,getViewScale:()=>Y.current}),()=>{var ne;(ne=q.current)==null||ne.destroy()}},[T]),h.useEffect(()=>{var ne;(ne=q.current)==null||ne.update({translateExtent:A,width:D,height:V,inversePan:b,pannable:w,zoomStep:x,zoomable:_})},[w,_,b,x,A,D,V]);const te=g?ne=>{var pe;const[ue,ye]=((pe=q.current)==null?void 0:pe.pointer(ne))||[0,0];g(ne,{x:ue,y:ye})}:void 0,J=v?h.useCallback((ne,ue)=>{const ye=C.getState().nodeLookup.get(ue).internals.userNode;v(ne,ye)},[]):void 0,Z=y??j["minimap.ariaLabel"];return m.jsx(Ld,{position:p,style:{...e,"--xy-minimap-background-color-props":typeof c=="string"?c:void 0,"--xy-minimap-mask-background-color-props":typeof u=="string"?u:void 0,"--xy-minimap-mask-stroke-color-props":typeof f=="string"?f:void 0,"--xy-minimap-mask-stroke-width-props":typeof d=="number"?d*R:void 0,"--xy-minimap-node-background-color-props":typeof o=="string"?o:void 0,"--xy-minimap-node-stroke-color-props":typeof r=="string"?r:void 0,"--xy-minimap-node-stroke-width-props":typeof a=="number"?a:void 0},className:Be(["react-flow__minimap",n]),"data-testid":"rf__minimap",children:m.jsxs("svg",{width:L,height:I,viewBox:`${X} ${F} ${H} ${G}`,className:"react-flow__minimap-svg",role:"img","aria-labelledby":U,ref:k,onClick:te,children:[Z&&m.jsx("title",{id:U,children:Z}),m.jsx(ZX,{onClick:J,nodeColor:o,nodeStrokeColor:r,nodeBorderRadius:s,nodeClassName:i,nodeStrokeWidth:a,nodeComponent:l}),m.jsx("path",{className:"react-flow__minimap-mask",d:`M${X-$},${F-$}h${H+$*2}v${G+$*2}h${-H-$*2}z
438
- M${E.x},${E.y}h${E.width}v${E.height}h${-E.width}z`,fillRule:"evenodd",pointerEvents:"none"})]})})}QE.displayName="MiniMap";h.memo(QE);const rK=e=>n=>e?`${Math.max(1/n.transform[2],1)}`:void 0,oK={[Ki.Line]:"right",[Ki.Handle]:"bottom-right"};function iK({nodeId:e,position:n,variant:r=Ki.Handle,className:o,style:i=void 0,children:s,color:a,minWidth:l=10,minHeight:c=10,maxWidth:u=Number.MAX_VALUE,maxHeight:f=Number.MAX_VALUE,keepAspectRatio:d=!1,resizeDirection:p,autoScale:g=!0,shouldResize:v,onResizeStart:w,onResize:_,onResizeEnd:y}){const b=ME(),x=typeof e=="string"?e:b,S=Ie(),C=h.useRef(null),k=r===Ki.Handle,N=xe(h.useCallback(rK(k&&g),[k,g]),Te),E=h.useRef(null),P=n??oK[r];h.useEffect(()=>{if(!(!C.current||!x))return E.current||(E.current=AG({domNode:C.current,nodeId:x,getStoreItems:()=>{const{nodeLookup:A,transform:D,snapGrid:V,snapToGrid:j,nodeOrigin:L,domNode:I}=S.getState();return{nodeLookup:A,transform:D,snapGrid:V,snapToGrid:j,nodeOrigin:L,paneDomNode:I}},onChange:(A,D)=>{const{triggerNodeChanges:V,nodeLookup:j,parentLookup:L,nodeOrigin:I}=S.getState(),z=[],M={x:A.x,y:A.y},R=j.get(x);if(R&&R.expandParent&&R.parentId){const O=R.origin??I,W=A.width??R.measured.width??0,$=A.height??R.measured.height??0,X={id:R.id,parentId:R.parentId,rect:{width:W,height:$,...JN({x:A.x??R.position.x,y:A.y??R.position.y},{width:W,height:$},R.parentId,j,O)}},F=r0([X],j,L,I);z.push(...F),M.x=A.x?Math.max(O[0]*W,A.x):void 0,M.y=A.y?Math.max(O[1]*$,A.y):void 0}if(M.x!==void 0&&M.y!==void 0){const O={id:x,type:"position",position:{...M}};z.push(O)}if(A.width!==void 0&&A.height!==void 0){const W={id:x,type:"dimensions",resizing:!0,setAttributes:p?p==="horizontal"?"width":"height":!0,dimensions:{width:A.width,height:A.height}};z.push(W)}for(const O of D){const W={...O,type:"position"};z.push(W)}V(z)},onEnd:({width:A,height:D})=>{const V={id:x,type:"dimensions",resizing:!1,dimensions:{width:A,height:D}};S.getState().triggerNodeChanges([V])}})),E.current.update({controlPosition:P,boundaries:{minWidth:l,minHeight:c,maxWidth:u,maxHeight:f},keepAspectRatio:d,resizeDirection:p,onResizeStart:w,onResize:_,onResizeEnd:y,shouldResize:v}),()=>{var A;(A=E.current)==null||A.destroy()}},[P,l,c,u,f,d,w,_,y,v]);const T=P.split("-");return m.jsx("div",{className:Be(["react-flow__resize-control","nodrag",...T,r,o]),ref:C,style:{...i,scale:N,...a&&{[k?"backgroundColor":"borderColor"]:a}},children:s})}h.memo(iK);const bw=3,Ql={screen:0,hook:160,api:340,table:520},zh=220,_w=40;function Jl(e,n){const r=new Map,o=e.length,s=-(o*zh+(o-1)*_w)/2;return e.forEach((a,l)=>{r.set(a,{x:s+l*(zh+_w),y:n})}),r}function Sw(e,n,r){const o=e.map(i=>{const a=(r.get(i)??[]).map(c=>{var u;return((u=n.get(c))==null?void 0:u.x)??0}),l=a.length>0?a.reduce((c,u)=>c+u,0)/a.length:0;return{id:i,avg:l}});return o.sort((i,s)=>i.avg-s.avg),o.map(i=>i.id)}function ec(e){const n={width:zh,padding:"10px 12px",borderRadius:10,border:"1px solid rgba(255, 255, 255, 0.14)",background:"rgba(48, 50, 72, 0.96)",color:"#f2f2f6",fontSize:12,fontFamily:"inherit",boxShadow:"0 2px 10px rgba(0, 0, 0, 0.4)"};return e==="screen"?{...n,borderColor:"rgba(139, 92, 246, 0.9)",background:"linear-gradient(135deg, rgba(139,92,246,0.45) 0%, rgba(58, 48, 90, 0.96) 100%)",boxShadow:"0 2px 14px rgba(139, 92, 246, 0.25)"}:e==="api"?{...n,borderColor:"rgba(139, 92, 246, 0.55)"}:e==="table"?{...n,borderColor:"rgba(34, 197, 94, 0.55)",background:"rgba(38, 58, 48, 0.96)"}:n}function tc(e,n,r){const o=e==="screen"?$a:e==="hook"?oA:e==="api"?Wm:Hm;return m.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:3},children:[m.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6},children:[m.jsx(o,{style:{width:12,height:12,opacity:.7}}),m.jsx("span",{style:{fontWeight:600},children:n})]}),r&&m.jsx("span",{style:{fontFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontSize:10,opacity:.7,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:r})]})}function sK({screen:e,graphs:n,onNodeSelect:r,selectedNodeId:o}){const{nodes:i,edges:s,empty:a}=h.useMemo(()=>{if(!n.ui||!n.api||!n.db)return{nodes:[],edges:[],empty:!0};const y=new Map;for(const F of n.ui.edges)F.type==="imports"&&(y.has(F.source)||y.set(F.source,[]),y.get(F.source).push(F.target));const b=new Set([e.id]);{let F=[e.id];for(let H=0;H<bw&&F.length>0;H++){const G=[];for(const U of F)for(const Y of y.get(U)??[])b.has(Y)||(b.add(Y),G.push(Y));F=G}}const x=new Map;for(const F of n.ui.cross_refs??[])F.type!=="calls_api"&&F.type!=="references_api"||F.layer!=="api"||b.has(F.source)&&(x.has(F.source)||x.set(F.source,[]),x.get(F.source).push(F.target));const S=new Set;for(const F of x.values())for(const H of F)S.add(H);if(S.size===0)return{nodes:[],edges:[],empty:!0};const C=(y.get(e.id)??[]).filter(F=>F!==e.id),k=[],N=new Map;for(const F of C){const H=new Set([F]);let G=[F];for(let Y=0;Y<bw&&G.length>0;Y++){const q=[];for(const te of G)for(const J of y.get(te)??[])H.has(J)||(H.add(J),q.push(J));G=q}const U=new Set;for(const Y of H)for(const q of x.get(Y)??[])U.add(q);U.size>0&&(k.push(F),N.set(F,U))}const E=new Set(x.get(e.id)??[]),P=n.api.nodes.filter(F=>S.has(F.id)),T=new Set,A=new Map;for(const F of P){const H=(F.db_models??[]).map(G=>G);A.set(F.id,H);for(const G of H)T.add(G)}const D=n.db.nodes.filter(F=>T.has(F.name)||T.has(F.name.toLowerCase())),V=new Map;for(const F of D)V.set(F.name,F.id),V.set(F.name.toLowerCase(),F.id);const j=[],L=[],I=Jl([e.id],Ql.screen);j.push({id:`screen:${e.id}`,position:I.get(e.id),data:{label:tc("screen",Gr(e),e.route??void 0)},style:ec("screen"),sourcePosition:"bottom",targetPosition:"top"});const z=[...k].sort((F,H)=>{const G=[...N.get(F)??[]],U=[...N.get(H)??[]],Y=P.map(te=>te.id),q=te=>{const J=te.map(Z=>Y.indexOf(Z)).filter(Z=>Z>=0);return J.length>0?J.reduce((Z,ne)=>Z+ne,0)/J.length:0};return q(G)-q(U)});if(z.length>0){const F=Jl(z,Ql.hook);for(const H of z){const G=H.split("/").pop()??H;j.push({id:`hook:${H}`,position:F.get(H),data:{label:tc("hook",G.replace(/\.tsx?$/,""),H)},style:ec("hook"),sourcePosition:"bottom",targetPosition:"top"}),L.push({id:`e:screen-${H}`,source:`screen:${e.id}`,target:`hook:${H}`,animated:!1,style:{stroke:"rgba(139,92,246,0.95)"}})}}const M=new Map;for(const F of k){const H=j.find(G=>G.id===`hook:${F}`);H&&M.set(F,H.position)}M.set(e.id,I.get(e.id));const R=new Map;for(const F of S){const H=[];E.has(F)&&H.push(e.id);for(const[G,U]of N.entries())U.has(F)&&H.push(G);R.set(F,H)}const O=Sw(P.map(F=>F.id),M,R);if(O.length>0){const F=Jl(O,Ql.api);for(const H of P)j.push({id:`api:${H.id}`,position:F.get(H.id),data:{label:tc("api",`${H.methods.join(",")} ${H.path.split("/").pop()||"/"}`,H.path)},style:ec("api"),sourcePosition:"bottom",targetPosition:"top"});for(const H of E)S.has(H)&&L.push({id:`e:screen-api-${H}`,source:`screen:${e.id}`,target:`api:${H}`,style:{stroke:"rgba(139,92,246,0.95)"}});for(const[H,G]of N.entries())for(const U of G)L.push({id:`e:${H}-${U}`,source:`hook:${H}`,target:`api:${U}`,style:{stroke:"rgba(139,92,246,0.95)"}})}const W=new Map;for(const F of O){const H=j.find(G=>G.id===`api:${F}`);H&&W.set(F,H.position)}const $=new Map;for(const F of P){const H=A.get(F.id)??[];for(const G of H){const U=V.get(G)??V.get(G.toLowerCase());U&&($.has(U)||$.set(U,[]),$.get(U).push(F.id))}}const X=Sw(D.map(F=>F.id),W,$);if(X.length>0){const F=Jl(X,Ql.table);for(const H of D)j.push({id:`table:${H.id}`,position:F.get(H.id),data:{label:tc("table",H.name)},style:ec("table"),sourcePosition:"bottom",targetPosition:"top"});for(const H of P){const G=A.get(H.id)??[];for(const U of G){const Y=V.get(U)??V.get(U.toLowerCase());Y&&L.push({id:`e:${H.id}-${Y}`,source:`api:${H.id}`,target:`table:${Y}`,style:{stroke:"rgba(34,197,94,0.95)"}})}}}return{nodes:j,edges:L,empty:!1}},[e,n]),l=h.useRef(null),c=i,u=s,f=h.useCallback(y=>{const b=l.current;if(!b)return;const x=new Set([y]),S=new Set;for(const C of s)C.source===y&&(x.add(C.target),S.add(C.id)),C.target===y&&(x.add(C.source),S.add(C.id));b.querySelectorAll(".react-flow__node").forEach(C=>{const k=C.getAttribute("data-id")??"";C.style.opacity=x.has(k)?"1":"0.15",C.style.transition="opacity 120ms ease"}),b.querySelectorAll(".react-flow__edge").forEach(C=>{const k=C.getAttribute("data-id")??"",N=S.has(k);C.style.opacity=N?"1":"0.08",C.style.transition="opacity 120ms ease",N&&C.classList.add("animated")})},[s]),d=h.useCallback(()=>{const y=l.current;y&&(y.querySelectorAll(".react-flow__node").forEach(b=>{b.style.opacity="",b.style.transition=""}),y.querySelectorAll(".react-flow__edge").forEach(b=>{b.style.opacity="",b.style.transition="",b.classList.remove("animated")}))},[]),p=h.useCallback((y,b)=>{f(b.id)},[f]),g=h.useCallback(()=>{d()},[d]),v=(y,b)=>{const[x,...S]=b.id.split(":"),C=S.join(":"),k={screen:"ui",hook:"ui",api:"api",table:"db"};r==null||r(C,k[x]??"ui")};if(a)return m.jsx("div",{className:"flex h-full items-center justify-center p-8",children:m.jsxs("div",{className:"text-center",children:[m.jsx("h3",{className:"text-sm font-semibold text-foreground",children:Gr(e)}),m.jsx("p",{className:"mt-2 text-xs text-muted-foreground",children:"No API or database dependencies detected for this screen."})]})});const{focusedNodes:w,focusedEdges:_}=h.useMemo(()=>{var C;if(!o)return{focusedNodes:c,focusedEdges:u};const y=(C=c.find(k=>{const[,...N]=k.id.split(":");return N.join(":")===o}))==null?void 0:C.id;if(!y)return{focusedNodes:c,focusedEdges:u};const b=new Set([y]);for(const k of u)k.source===y&&b.add(k.target),k.target===y&&b.add(k.source);const x=c.filter(k=>b.has(k.id)),S=u.filter(k=>b.has(k.source)&&b.has(k.target));return{focusedNodes:x,focusedEdges:S}},[c,u,o]);return m.jsx("div",{ref:l,className:"relative h-full w-full",children:m.jsx(Vd,{children:m.jsxs(s0,{nodes:w,edges:_,fitView:!0,fitViewOptions:{padding:.3},proOptions:{hideAttribution:!0},minZoom:.2,maxZoom:1.5,nodesDraggable:!1,nodesConnectable:!1,elementsSelectable:!1,onNodeMouseEnter:p,onNodeMouseLeave:g,onNodeClick:v,children:[m.jsx(a0,{color:"rgba(255,255,255,0.05)",gap:24}),m.jsx(l0,{showInteractive:!1})]},o??"full")})})}const Nc=220,Cw=40,aK=110,lK=0,cK=180,Jo=6;function kw(e){const n={width:Nc,padding:"10px 12px",borderRadius:10,border:"1px solid rgba(255, 255, 255, 0.14)",background:"rgba(48, 50, 72, 0.96)",color:"#f2f2f6",fontSize:12,fontFamily:"inherit",boxShadow:"0 2px 10px rgba(0, 0, 0, 0.4)"};return e?{...n,borderColor:"rgba(139, 92, 246, 0.9)",background:"linear-gradient(135deg, rgba(139,92,246,0.45) 0%, rgba(58, 48, 90, 0.96) 100%)",boxShadow:"0 2px 14px rgba(139, 92, 246, 0.25)"}:{...n,cursor:"pointer"}}function Nw(e,n,r){const o=r?Ju:$a;return m.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:3},children:[m.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6},children:[m.jsx(o,{style:{width:12,height:12,opacity:.7}}),m.jsx("span",{style:{fontWeight:600},children:e})]}),n&&m.jsx("span",{style:{fontFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontSize:10,opacity:.7,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:n})]})}function uK({module:e,screens:n,onScreenClick:r}){const{nodes:o,edges:i}=h.useMemo(()=>{const a=[],l=[];Math.max(1,Math.ceil(n.length/Jo)),Math.min(Jo,n.length);const c=0;return a.push({id:`module:${e}`,position:{x:c-Nc/2,y:lK},data:{label:Nw(Ca(e),`${n.length} screens`,!0)},style:kw(!0),sourcePosition:"bottom",targetPosition:"top",selectable:!1,draggable:!1}),n.forEach((u,f)=>{const d=Math.floor(f/Jo),p=f%Jo,g=Math.min(Jo,n.length-d*Jo),v=g*Nc+(g-1)*Cw,_=c-v/2+p*(Nc+Cw),y=cK+d*aK;a.push({id:`screen:${u.id}`,position:{x:_,y},data:{label:Nw(Gr(u),u.route??void 0,!1),screenId:u.id},style:kw(!1),sourcePosition:"bottom",targetPosition:"top",draggable:!1}),l.push({id:`e:module-${u.id}`,source:`module:${e}`,target:`screen:${u.id}`,style:{stroke:"rgba(139,92,246,0.95)"}})}),{nodes:a,edges:l}},[e,n]),s=(a,l)=>{const c=l.data.screenId;c&&r(c)};return m.jsx("div",{className:"h-full w-full",children:m.jsx(Vd,{children:m.jsxs(s0,{nodes:o,edges:i,fitView:!0,fitViewOptions:{padding:.2},proOptions:{hideAttribution:!0},minZoom:.2,maxZoom:1.5,nodesConnectable:!1,onNodeClick:s,children:[m.jsx(a0,{color:"rgba(255,255,255,0.05)",gap:24}),m.jsx(l0,{showInteractive:!1})]})})})}function dK(e,n,r){var o;if(n==="ui"&&r.ui){const i=r.ui.nodes.find(s=>s.id===e);if(i)return{id:i.id,name:i.name,type:i.type,layer:n,route:i.route,module:((o=i.tags)==null?void 0:o.module)??i.module??null,exports:i.exports,tags:i.tags}}if(n==="api"&&r.api){const i=r.api.nodes.find(s=>s.id===e);if(i)return{id:i.id,name:i.name,type:i.type,layer:n,methods:i.methods,path:i.path,db_models:i.db_models,tags:i.tags}}if(n==="db"&&r.db){const i=r.db.nodes.find(s=>s.id===e);if(i)return{id:i.id,name:i.name,type:i.type,layer:n,columns:i.columns,tags:i.tags}}return null}function fK(e,n,r){const o=[];if(n==="ui"&&r.ui)for(const i of r.ui.edges){if(i.source===e){const s=r.ui.nodes.find(a=>a.id===i.target);s&&o.push({nodeId:i.target,nodeName:s.name,edgeType:i.type,direction:"outgoing"})}if(i.target===e){const s=r.ui.nodes.find(a=>a.id===i.source);s&&o.push({nodeId:i.source,nodeName:s.name,edgeType:i.type,direction:"incoming"})}}return o}function pK(e,n){const r=[],o=[];if(!n.ui)return{to:r,from:o};for(const i of n.ui.edges)if(i.type==="navigates"){if(i.source===e){const s=n.ui.nodes.find(a=>a.id===i.target);s&&r.push(s)}if(i.target===e){const s=n.ui.nodes.find(a=>a.id===i.source);s&&o.push(s)}}return{to:r,from:o}}const hK={ui:$a,api:Wm,db:Hm},mK={page:"bg-violet-500/20 text-violet-300",layout:"bg-indigo-500/20 text-indigo-300",component:"bg-blue-500/20 text-blue-300",hook:"bg-sky-500/20 text-sky-300",context:"bg-teal-500/20 text-teal-300",util:"bg-slate-500/20 text-slate-300",config:"bg-amber-500/20 text-amber-300",endpoint:"bg-violet-500/20 text-violet-300",table:"bg-emerald-500/20 text-emerald-300",enum:"bg-orange-500/20 text-orange-300"};function gK({type:e}){const n=mK[e]??"bg-zinc-500/20 text-zinc-300";return m.jsx("span",{className:`inline-flex items-center rounded-full px-2 py-0.5 text-[10px] font-medium uppercase tracking-wider ${n}`,children:e})}function ei({children:e}){return m.jsx("h3",{className:"mb-2 text-[11px] font-semibold uppercase tracking-wider text-slate-400",children:e})}function nc({label:e,edges:n,icon:r,onNavigate:o}){return n.length===0?null:m.jsxs("div",{className:"mb-3",children:[m.jsxs("div",{className:"mb-1.5 flex items-center gap-1.5 text-[10px] font-medium uppercase tracking-wider text-slate-500",children:[m.jsx(r,{className:"h-3 w-3"}),e,m.jsxs("span",{className:"text-slate-600",children:["(",n.length,")"]})]}),m.jsx("ul",{className:"space-y-0.5",children:n.map(i=>m.jsx("li",{children:m.jsxs("button",{type:"button",onClick:()=>o(i.nodeId),className:"flex w-full items-center gap-2 rounded px-2 py-1.5 text-left text-xs text-slate-300 transition-colors hover:bg-slate-700/50 hover:text-slate-100",children:[m.jsx(Li,{className:"h-3 w-3 shrink-0 text-slate-500"}),m.jsx("span",{className:"truncate",children:i.nodeName}),m.jsx("span",{className:"ml-auto shrink-0 text-[10px] text-slate-600",children:i.edgeType})]})},`${i.direction}-${i.edgeType}-${i.nodeId}`))})]})}function yK({filePath:e}){const[n,r]=h.useState(null),[o,i]=h.useState(!0),[s,a]=h.useState(null),l=Bo();if(h.useEffect(()=>{i(!0),a(null),r(null);const u=[e];e.startsWith("src/")||u.push(`src/${e}`);async function f(){for(const d of u)try{const p=await fetch(l("/api/file-content",{path:d}));if(!p.ok)continue;const g=await p.json();r(g.content),i(!1);return}catch{continue}a("File not found"),i(!1)}f()},[e]),o)return m.jsx("p",{className:"px-3 py-2 text-xs text-slate-500",children:"Loading source..."});if(s)return m.jsxs("p",{className:"px-3 py-2 text-xs text-red-400",children:["Failed to load: ",s]});if(!n)return null;const c=n.split(`
439
- `);return m.jsx("div",{className:"overflow-auto rounded border border-slate-700/50 bg-slate-900/80",children:m.jsx("pre",{className:"p-3 text-[11px] leading-[1.6]",children:m.jsx("code",{children:c.map((u,f)=>m.jsxs("div",{className:"flex",children:[m.jsx("span",{className:"mr-4 inline-block w-8 select-none text-right text-slate-600",children:f+1}),m.jsx("span",{className:"flex-1 text-slate-300",children:u||" "})]},f))})})})}function JE({nodeId:e,nodeLayer:n,graphs:r,onClose:o,onNavigate:i}){const s=dK(e,n,r),a=fK(e,n,r),l=n==="ui"?pK(e,r):{to:[],from:[]},c=a.filter(v=>v.edgeType==="renders"&&v.direction==="outgoing"),u=a.filter(v=>v.edgeType==="renders"&&v.direction==="incoming"),f=a.filter(v=>v.edgeType==="imports"&&v.direction==="outgoing"),d=a.filter(v=>v.edgeType==="imports"&&v.direction==="incoming");if(!s)return m.jsx("div",{className:"flex h-full flex-col bg-slate-900/95",children:m.jsxs("div",{className:"flex items-center justify-between border-b border-slate-700/50 px-4 py-3",children:[m.jsx("span",{className:"text-sm text-slate-400",children:"Node not found"}),m.jsx("button",{type:"button",onClick:o,className:"rounded p-1 hover:bg-slate-700/50",children:m.jsx(tu,{className:"h-4 w-4 text-slate-400"})})]})});const p=hK[n],g=v=>i(v,"ui");return m.jsxs("div",{className:"flex h-full flex-col bg-slate-900/95 overflow-hidden",children:[m.jsxs("div",{className:"flex items-center gap-3 border-b border-slate-700/50 px-5 py-4",children:[m.jsx("div",{className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-lg bg-slate-800",children:m.jsx(p,{className:"h-4 w-4 text-slate-400"})}),m.jsxs("div",{className:"min-w-0 flex-1",children:[m.jsxs("div",{className:"flex items-center gap-2",children:[m.jsx("h2",{className:"truncate text-sm font-semibold text-slate-100",children:s.name}),m.jsx(gK,{type:s.type})]}),m.jsx("p",{className:"mt-0.5 truncate font-mono text-[10px] text-slate-500",children:s.id})]}),m.jsx("button",{type:"button",onClick:o,className:"rounded-md p-1.5 text-slate-400 transition-colors hover:bg-slate-700/50 hover:text-slate-200",children:m.jsx(tu,{className:"h-4 w-4"})})]}),m.jsxs("div",{className:"flex-1 overflow-y-auto px-5 py-4 space-y-5",children:[m.jsxs("section",{children:[m.jsx(ei,{children:"Info"}),m.jsxs("div",{className:"space-y-1.5 text-xs",children:[s.module&&m.jsxs("div",{className:"flex items-center gap-2",children:[m.jsx("span",{className:"w-16 shrink-0 text-slate-500",children:"Module"}),m.jsx("span",{className:`text-slate-300 ${s.module==="untagged"?"text-yellow-500/70 italic":""}`,children:s.module})]}),s.route&&m.jsxs("div",{className:"flex items-center gap-2",children:[m.jsx("span",{className:"w-16 shrink-0 text-slate-500",children:"Route"}),m.jsx("span",{className:"font-mono text-slate-300",children:s.route})]}),s.methods&&s.methods.length>0&&m.jsxs("div",{className:"flex items-center gap-2",children:[m.jsx("span",{className:"w-16 shrink-0 text-slate-500",children:"Methods"}),m.jsx("span",{className:"flex gap-1",children:s.methods.map(v=>m.jsx("span",{className:"rounded bg-violet-500/15 px-1.5 py-0.5 font-mono text-[10px] text-violet-300",children:v},v))})]}),s.path&&m.jsxs("div",{className:"flex items-center gap-2",children:[m.jsx("span",{className:"w-16 shrink-0 text-slate-500",children:"Path"}),m.jsx("span",{className:"font-mono text-slate-300",children:s.path})]}),s.exports&&s.exports.length>0&&m.jsxs("div",{className:"flex items-start gap-2",children:[m.jsx("span",{className:"w-16 shrink-0 pt-0.5 text-slate-500",children:"Exports"}),m.jsx("div",{className:"flex flex-wrap gap-1",children:s.exports.map(v=>m.jsx("span",{className:"rounded bg-slate-700/50 px-1.5 py-0.5 font-mono text-[10px] text-slate-300",children:v},v))})]}),s.db_models&&s.db_models.length>0&&m.jsxs("div",{className:"flex items-start gap-2",children:[m.jsx("span",{className:"w-16 shrink-0 pt-0.5 text-slate-500",children:"Models"}),m.jsx("div",{className:"flex flex-wrap gap-1",children:s.db_models.map(v=>m.jsx("span",{className:"rounded bg-emerald-500/15 px-1.5 py-0.5 font-mono text-[10px] text-emerald-300",children:v},v))})]})]})]}),s.tags&&Object.keys(s.tags).length>0&&m.jsxs("section",{children:[m.jsx(ei,{children:"Tags"}),m.jsx("div",{className:"flex flex-wrap gap-1.5",children:Object.entries(s.tags).map(([v,w])=>m.jsxs("span",{className:`inline-flex items-center gap-1 rounded-full px-2 py-0.5 text-[10px] ${v==="module"||v==="screen"?"bg-purple-500/15 text-purple-300":"bg-sky-500/15 text-sky-300"}`,children:[m.jsxs("span",{className:"font-medium",children:[v,":"]}),m.jsx("span",{children:w})]},v))})]}),s.columns&&s.columns.length>0&&m.jsxs("section",{children:[m.jsx(ei,{children:"Columns"}),m.jsx("div",{className:"overflow-hidden rounded border border-slate-700/50",children:m.jsxs("table",{className:"w-full text-xs",children:[m.jsx("thead",{children:m.jsxs("tr",{className:"border-b border-slate-700/50 bg-slate-800/50",children:[m.jsx("th",{className:"px-3 py-1.5 text-left font-medium text-slate-400",children:"Name"}),m.jsx("th",{className:"px-3 py-1.5 text-left font-medium text-slate-400",children:"Type"})]})}),m.jsx("tbody",{children:s.columns.map(v=>m.jsxs("tr",{className:"border-b border-slate-800/50 last:border-0",children:[m.jsx("td",{className:"px-3 py-1.5 font-mono text-slate-300",children:v.name}),m.jsx("td",{className:"px-3 py-1.5 font-mono text-slate-500",children:v.type})]},v.name))})]})})]}),(c.length>0||u.length>0||f.length>0||d.length>0)&&m.jsxs("section",{children:[m.jsx(ei,{children:"Component Tree"}),m.jsx(nc,{label:"Renders",edges:c,icon:B5,onNavigate:g}),m.jsx(nc,{label:"Rendered by",edges:u,icon:Vm,onNavigate:g}),m.jsx(nc,{label:"Imports",edges:f,icon:Ky,onNavigate:g}),m.jsx(nc,{label:"Imported by",edges:d,icon:Ky,onNavigate:g})]}),(l.to.length>0||l.from.length>0)&&m.jsxs("section",{children:[m.jsx(ei,{children:"Navigation"}),l.to.length>0&&m.jsxs("div",{className:"mb-3",children:[m.jsxs("div",{className:"mb-1.5 flex items-center gap-1.5 text-[10px] font-medium uppercase tracking-wider text-slate-500",children:[m.jsx(Xy,{className:"h-3 w-3"}),"Navigates to",m.jsxs("span",{className:"text-slate-600",children:["(",l.to.length,")"]})]}),m.jsx("ul",{className:"space-y-0.5",children:l.to.map(v=>m.jsx("li",{children:m.jsxs("button",{type:"button",onClick:()=>g(v.id),className:"flex w-full items-center gap-2 rounded px-2 py-1.5 text-left text-xs text-slate-300 transition-colors hover:bg-slate-700/50 hover:text-slate-100",children:[m.jsx(Li,{className:"h-3 w-3 shrink-0 text-slate-500"}),m.jsx("span",{className:"truncate",children:v.name}),v.route&&m.jsx("span",{className:"ml-auto shrink-0 font-mono text-[10px] text-slate-600",children:v.route})]})},v.id))})]}),l.from.length>0&&m.jsxs("div",{className:"mb-3",children:[m.jsxs("div",{className:"mb-1.5 flex items-center gap-1.5 text-[10px] font-medium uppercase tracking-wider text-slate-500",children:[m.jsx(Xy,{className:"h-3 w-3"}),"Navigated from",m.jsxs("span",{className:"text-slate-600",children:["(",l.from.length,")"]})]}),m.jsx("ul",{className:"space-y-0.5",children:l.from.map(v=>m.jsx("li",{children:m.jsxs("button",{type:"button",onClick:()=>g(v.id),className:"flex w-full items-center gap-2 rounded px-2 py-1.5 text-left text-xs text-slate-300 transition-colors hover:bg-slate-700/50 hover:text-slate-100",children:[m.jsx(Li,{className:"h-3 w-3 shrink-0 text-slate-500"}),m.jsx("span",{className:"truncate",children:v.name}),v.route&&m.jsx("span",{className:"ml-auto shrink-0 font-mono text-[10px] text-slate-600",children:v.route})]})},v.id))})]})]}),m.jsxs("section",{children:[m.jsx(ei,{children:"Source Code"}),m.jsx(yK,{filePath:s.id})]})]})]})}function vK(){var b;const[e,n]=h.useState(null),[r,o]=h.useState(null),[i,s]=h.useState(null),[a,l]=h.useState(null),[c,u]=h.useState(null),[f,d]=h.useState("ui"),p=Bo();h.useEffect(()=>{fetch(p("/api/raw-graphs")).then(x=>{if(!x.ok)throw new Error(`HTTP ${x.status}`);return x.json()}).then(x=>n(x)).catch(x=>o(String(x)))},[p]);const g=h.useMemo(()=>e!=null&&e.ui?e.ui.nodes.filter(x=>Xg(x)&&Qn(x)):[],[e]),v=h.useMemo(()=>{const x=new Map;for(const N of g){const E=Qn(N);x.has(E)||x.set(E,[]),x.get(E).push(N)}const S=[],C=new Map;for(const[N,E]of x)E.length===1?S.push(...E):C.set(N,E);const k=[...C.entries()].map(([N,E])=>({module:N,screens:E})).sort((N,E)=>E.screens.length-N.screens.length);return S.length>0&&k.push({module:"misc",screens:S}),k.sort((N,E)=>N.module==="untagged"?1:E.module==="untagged"?-1:N.module==="misc"?1:E.module==="misc"?-1:E.screens.length-N.screens.length),k},[g]),w=i??((b=v[0])==null?void 0:b.module)??null,_=h.useMemo(()=>{var x;return w?((x=v.find(S=>S.module===w))==null?void 0:x.screens)??[]:[]},[v,w]),y=h.useMemo(()=>!(e!=null&&e.ui)||!a?null:e.ui.nodes.find(x=>x.id===a)??null,[e,a]);return r?m.jsx(wK,{message:r}):e?m.jsxs("div",{className:"flex h-full min-h-0",children:[m.jsxs("div",{className:`flex w-64 flex-col border-r border-sidebar-border bg-sidebar-background/40 ${c?"hidden":""}`,children:[m.jsxs("div",{className:"border-b border-sidebar-border px-4 py-3",children:[m.jsx("h2",{className:"text-xs font-semibold uppercase tracking-wider text-muted-foreground",children:"Modules"}),m.jsxs("p",{className:"mt-0.5 text-[11px] text-muted-foreground",children:[v.length," modules · ",g.length," screens"]})]}),m.jsx("ul",{className:"flex-1 overflow-y-auto px-2 py-2",children:v.map(x=>{const S=x.module===w;return m.jsx("li",{children:m.jsxs("button",{type:"button",onClick:()=>{s(x.module),l(null),u(null)},className:`flex w-full items-center justify-between rounded-md px-3 py-2 text-sm transition-colors ${S?"bg-sidebar-accent text-foreground":"text-muted-foreground hover:bg-sidebar-accent/50 hover:text-foreground"} ${x.module==="untagged"?"border border-dashed border-yellow-500/30":""}`,children:[m.jsxs("span",{className:"flex items-center gap-2",children:[m.jsx($a,{className:`h-3.5 w-3.5 shrink-0 ${x.module==="untagged"?"text-yellow-500/70":"opacity-70"}`}),Ca(x.module)]}),m.jsx("span",{className:"text-xs tabular-nums text-muted-foreground",children:x.screens.length})]})},x.module)})})]}),m.jsx("div",{className:"flex flex-1 flex-col overflow-hidden",children:y?m.jsxs(m.Fragment,{children:[m.jsxs("div",{className:"flex items-center gap-3 border-b border-sidebar-border px-6 py-4",children:[m.jsxs("button",{type:"button",onClick:()=>{l(null),u(null)},className:"flex items-center gap-1.5 rounded-md border border-sidebar-border px-2.5 py-1 text-xs text-muted-foreground transition-colors hover:bg-sidebar-accent hover:text-foreground",children:[m.jsx(Vm,{className:"h-3 w-3"}),"Back"]}),m.jsxs("div",{className:"min-w-0",children:[m.jsx("h1",{className:"truncate text-lg font-semibold text-foreground",children:Gr(y)}),y.route&&m.jsx("p",{className:"mt-0.5 truncate font-mono text-[11px] text-muted-foreground",children:y.route})]})]}),m.jsx("div",{className:"flex-1 min-h-0",children:m.jsx(sK,{screen:y,graphs:e,selectedNodeId:c,onNodeSelect:(x,S)=>{u(x),d(S)}})})]}):m.jsxs(m.Fragment,{children:[m.jsxs("div",{className:"border-b border-sidebar-border px-6 py-4",children:[m.jsx("h1",{className:"text-lg font-semibold text-foreground",children:w?Ca(w):"Select a module"}),m.jsxs("p",{className:"mt-0.5 text-xs text-muted-foreground",children:[_.length," screens · click a screen to drill in"]})]}),m.jsx("div",{className:"flex-1 min-h-0",children:w&&_.length>0?m.jsx(uK,{module:w,screens:_,onScreenClick:l},w):m.jsx("div",{className:"flex h-full items-center justify-center",children:m.jsx("p",{className:"text-sm text-muted-foreground",children:w?"No screens in this module.":"Select a module."})})})]})}),c&&e&&m.jsx("div",{className:"flex w-[420px] shrink-0 flex-col border-l border-sidebar-border bg-slate-900/95",children:m.jsx(JE,{nodeId:c,nodeLayer:f,graphs:e,onClose:()=>u(null),onNavigate:(x,S)=>{u(x),d(S)}})})]}):m.jsx(xK,{})}function xK(){return m.jsx("div",{className:"flex h-full items-center justify-center",children:m.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading graph data…"})})}function wK({message:e}){return m.jsx("div",{className:"flex h-full items-center justify-center p-8",children:m.jsxs("div",{className:"max-w-md text-center",children:[m.jsx("h2",{className:"text-sm font-semibold text-foreground",children:"Failed to load graph"}),m.jsx("p",{className:"mt-2 text-xs text-muted-foreground",children:e})]})})}function bK(){return m.jsx("div",{className:"flex h-full items-center justify-center p-8",children:m.jsxs("div",{className:"text-center",children:[m.jsx("h1",{className:"text-2xl font-semibold text-foreground",children:"User Journeys"}),m.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:"User journey flowcharts coming soon."})]})})}const _K={admin:"#8b5cf6",auth:"#f59e0b",settings:"#6366f1",project:"#3b82f6",org:"#10b981",root:"#64748b",misc:"#94a3b8"};function Ru(e){return e?_K[e]??`hsl(${Math.abs(SK(e))%360}, 60%, 55%)`:"#64748b"}function SK(e){let n=0;for(let r=0;r<e.length;r++)n=Math.imul(31,n)+e.charCodeAt(r)|0;return n}function CK(e){const n=e.ui.nodes.filter(l=>Xg(l)),r=new Set(n.map(l=>l.id)),o=new Map;for(const l of e.ui.edges)(l.type==="imports"||l.type==="renders")&&(o.has(l.target)||o.set(l.target,new Set),o.get(l.target).add(l.source));function i(l){const c=new Set,u=new Set,f=[l];for(;f.length>0;){const d=f.pop();if(!u.has(d)){if(u.add(d),r.has(d)){c.add(d);continue}for(const p of o.get(d)??[])f.push(p)}}return c}const s=new Map,a=new Map;for(const l of e.ui.edges){if(l.type!=="navigates"||!r.has(l.target))continue;const c=r.has(l.source)?[l.source]:[...i(l.source)];for(const u of c)u!==l.target&&(s.has(u)||s.set(u,new Set),s.get(u).add(l.target),a.has(l.target)||a.set(l.target,new Set),a.get(l.target).add(u))}return{screens:n,screenIdSet:r,outgoing:s,incoming:a}}function kK(e){const n={segment:"/",fullRoute:"/",screen:null,children:[]},r=[...e].sort((o,i)=>(o.route??"").split("/").length-(i.route??"").split("/").length);for(const o of r){if(!o.route)continue;if(o.route==="/"){n.screen=o;continue}const i=o.route.split("/").filter(Boolean);let s=n;for(let a=0;a<i.length;a++){const l=i[a],c="/"+i.slice(0,a+1).join("/");let u=s.children.find(f=>f.segment===l);u||(u={segment:l,fullRoute:c,screen:null,children:[]},s.children.push(u)),s=u}s.screen=o}return n}function c0({node:e,depth:n,onSelect:r,selectedId:o}){var f;const[i,s]=h.useState(n<2),a=e.children.length>0,l=e.screen?Qn(e.screen):null,c=Ru(l),u=((f=e.screen)==null?void 0:f.id)===o;return m.jsxs("div",{children:[m.jsxs("div",{className:`flex items-center gap-1 py-0.5 px-1.5 rounded transition-colors cursor-pointer text-xs ${u?"bg-purple-500/20 text-foreground":"text-muted-foreground hover:bg-white/5 hover:text-foreground"}`,style:{paddingLeft:n*14+4},onClick:()=>{e.screen&&r(e.screen.id),a&&s(!i)},children:[a?m.jsx("button",{onClick:d=>{d.stopPropagation(),s(!i)},className:"p-0.5 shrink-0",children:i?m.jsx(ed,{className:"h-2.5 w-2.5"}):m.jsx(Li,{className:"h-2.5 w-2.5"})}):m.jsx("span",{className:"w-3.5"}),e.screen&&m.jsx("span",{className:"w-1.5 h-1.5 rounded-full shrink-0",style:{backgroundColor:c}}),m.jsx("span",{className:"truncate",children:e.screen?Gr(e.screen):e.segment})]}),i&&a&&e.children.sort((d,p)=>d.segment.localeCompare(p.segment)).map(d=>m.jsx(c0,{node:d,depth:n+1,onSelect:r,selectedId:o},d.fullRoute))]})}const qf=200,en=200,rc=56,Ew=120,ti=30;function NK({focusId:e,screens:n,outgoing:r,incoming:o,onNavigate:i,onDetail:s}){var x,S;const a=h.useRef(null),l=h.useMemo(()=>new Map(n.map(C=>[C.id,C])),[n]),c=l.get(e),{flowNodes:u,flowEdges:f}=h.useMemo(()=>{var j;if(!c)return{flowNodes:[],flowEdges:[]};const C=[...r.get(e)??[]].filter(L=>l.has(L)),k=[...o.get(e)??[]].filter(L=>l.has(L)),N=[],E=[],P=(L,I,z,M)=>{const R=l.get(L),O=Qn(R),W=Ru(O);return{id:L,position:{x:I,y:z},data:{label:m.jsxs("div",{style:{pointerEvents:"none"},children:[m.jsx("div",{style:{fontWeight:M?700:500,fontSize:M?13:11,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:Gr(R)}),m.jsx("div",{style:{fontSize:9,opacity:.5,marginTop:2,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:R.route}),O&&O!=="root"&&m.jsx("div",{style:{fontSize:8,marginTop:2,color:W,textTransform:"uppercase",letterSpacing:"0.05em",fontWeight:500},children:Ca(O)})]})},style:{width:M?en+40:en,height:M?rc+10:rc,background:M?`linear-gradient(135deg, ${W}30, ${W}15)`:`linear-gradient(135deg, ${W}15, ${W}08)`,border:`${M?2:1}px solid ${W}${M?"80":"40"}`,borderRadius:10,padding:"8px 12px",color:"#e2e8f0",cursor:M?"default":"pointer",boxShadow:M?`0 0 20px ${W}20`:"none"},sourcePosition:"bottom",targetPosition:"top"}},A=-(k.length*(en+ti)-ti)/2+en/2;for(let L=0;L<k.length;L++){const I=k[L];N.push(P(I,A+L*(en+ti)-en/2,qf-Ew-rc,!1));const z=((j=r.get(e))==null?void 0:j.has(I))??!1;E.push({id:`in-${I}`,source:I,target:e,type:"smoothstep",animated:!0,style:{stroke:z?"rgba(251,191,36,0.5)":"rgba(139,92,246,0.5)",strokeWidth:1.5,strokeDasharray:z?"4 4":void 0},markerEnd:{type:"arrowclosed",color:z?"rgba(251,191,36,0.7)":"rgba(139,92,246,0.7)"},label:z?"↺":void 0,labelStyle:{fontSize:12,fill:"#fbbf24"}})}N.push(P(e,-en/2-20,qf,!0));const V=-(C.length*(en+ti)-ti)/2+en/2;for(let L=0;L<C.length;L++){const I=C[L];k.includes(I)||(N.push(P(I,V+L*(en+ti)-en/2,qf+Ew+rc+10,!1)),E.push({id:`out-${I}`,source:e,target:I,type:"smoothstep",animated:!0,style:{stroke:"rgba(139,92,246,0.5)",strokeWidth:1.5},markerEnd:{type:"arrowclosed",color:"rgba(139,92,246,0.7)"}}))}return{flowNodes:N,flowEdges:E}},[e,c,l,r,o]),d=h.useCallback(C=>{const k=a.current;if(!k)return;const N=new Set([C]),E=new Set;for(const P of f)P.source===C&&(N.add(P.target),E.add(P.id)),P.target===C&&(N.add(P.source),E.add(P.id));k.querySelectorAll(".react-flow__node").forEach(P=>{P.style.opacity=N.has(P.getAttribute("data-id")??"")?"1":"0.25",P.style.transition="opacity 120ms ease"}),k.querySelectorAll(".react-flow__edge").forEach(P=>{const T=P.getAttribute("data-id")??"";P.style.opacity=E.has(T)?"1":"0.1",P.style.transition="opacity 120ms ease"})},[f]),p=h.useCallback(()=>{const C=a.current;C&&(C.querySelectorAll(".react-flow__node").forEach(k=>{k.style.opacity="",k.style.transition=""}),C.querySelectorAll(".react-flow__edge").forEach(k=>{k.style.opacity="",k.style.transition=""}))},[]),g=h.useCallback((C,k)=>{k.id!==e&&d(k.id)},[d,e]),v=h.useCallback(()=>p(),[p]),w=h.useCallback((C,k)=>{k.id!==e&&i(k.id)},[e,i]),_=h.useCallback((C,k)=>s(k.id),[s]);if(!c)return null;const y=((x=o.get(e))==null?void 0:x.size)??0,b=((S=r.get(e))==null?void 0:S.size)??0;return m.jsxs("div",{className:"flex flex-1 flex-col min-h-0",children:[m.jsxs("div",{className:"px-5 py-3 border-b border-sidebar-border/50",children:[m.jsxs("div",{className:"flex items-center gap-2",children:[m.jsx("span",{className:"w-2.5 h-2.5 rounded-full",style:{backgroundColor:Ru(Qn(c))}}),m.jsx("h2",{className:"text-sm font-semibold text-foreground",children:Gr(c)}),m.jsx("span",{className:"font-mono text-[10px] text-muted-foreground/50",children:c.route})]}),m.jsxs("p",{className:"text-[10px] text-muted-foreground mt-0.5",children:[y," incoming · ",b," outgoing",y===0&&b===0&&" · no navigation links detected",m.jsx("span",{className:"ml-2 opacity-50",children:"click to navigate · double-click for details"})]})]}),m.jsx("div",{ref:a,className:"flex-1 min-h-0",children:m.jsx(Vd,{children:m.jsxs(s0,{nodes:u,edges:f,fitView:!0,fitViewOptions:{padding:.4},proOptions:{hideAttribution:!0},minZoom:.3,maxZoom:1.5,nodesDraggable:!1,nodesConnectable:!1,elementsSelectable:!1,onNodeMouseEnter:g,onNodeMouseLeave:v,onNodeClick:w,onNodeDoubleClick:_,children:[m.jsx(a0,{color:"rgba(255,255,255,0.03)",gap:24}),m.jsx(l0,{showInteractive:!1})]},e)})})]})}function EK({tree:e,noRouteScreens:n,onSelect:r,selectedId:o}){return m.jsxs("div",{className:"flex-1 overflow-y-auto px-4 py-3",children:[m.jsx(c0,{node:e,depth:0,onSelect:r,selectedId:o}),n.length>0&&m.jsxs("div",{className:"mt-4 pt-3 border-t border-sidebar-border",children:[m.jsxs("div",{className:"flex items-center gap-2 mb-1.5 px-1.5",children:[m.jsx(Um,{className:"h-3 w-3 text-yellow-500/70"}),m.jsxs("span",{className:"text-[10px] font-medium text-muted-foreground uppercase tracking-wider",children:["Layouts (",n.length,")"]})]}),n.map(i=>m.jsxs("button",{onClick:()=>r(i.id),className:`flex items-center gap-1.5 w-full px-3 py-0.5 rounded text-xs transition-colors ${o===i.id?"bg-purple-500/15 text-foreground":"text-muted-foreground hover:bg-white/5"}`,children:[m.jsx("span",{className:"w-1.5 h-1.5 rounded-full shrink-0",style:{backgroundColor:Ru(Qn(i))}}),i.name]},i.id))]})]})}function PK(){const[e,n]=h.useState(null),[r,o]=h.useState(null),[i,s]=h.useState(null),[a,l]=h.useState(null),[c,u]=h.useState("visual"),[f,d]=h.useState([]),p=Bo();h.useEffect(()=>{fetch(p("/api/raw-graphs")).then(C=>{if(!C.ok)throw new Error(`HTTP ${C.status}`);return C.json()}).then(C=>n(C)).catch(C=>o(String(C)))},[p]);const{screens:g,outgoing:v,incoming:w,tree:_,noRouteScreens:y,navCount:b}=h.useMemo(()=>{if(!(e!=null&&e.ui))return{screens:[],outgoing:new Map,incoming:new Map,tree:null,noRouteScreens:[],navCount:0};const C=CK(e),k=C.screens.filter(P=>P.route),N=C.screens.filter(P=>!P.route);let E=0;for(const P of C.outgoing.values())E+=P.size;return{screens:C.screens,outgoing:C.outgoing,incoming:C.incoming,tree:kK(k),noRouteScreens:N,navCount:E}},[e]);h.useEffect(()=>{if(!i&&g.length>0){const C=g.find(k=>k.route==="/");s((C==null?void 0:C.id)??g[0].id)}},[g,i]);const x=h.useCallback(C=>{d(k=>i?[...k,i]:k),s(C)},[i]),S=h.useCallback(()=>{d(C=>{const k=[...C],N=k.pop();return N&&s(N),k})},[]);return r?m.jsx("div",{className:"flex h-full items-center justify-center",children:m.jsx("p",{className:"text-sm text-red-400",children:r})}):!e||!_?m.jsx("div",{className:"flex h-full items-center justify-center",children:m.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading..."})}):m.jsxs("div",{className:"flex h-full min-h-0",children:[m.jsxs("div",{className:"flex flex-1 flex-col overflow-hidden",children:[m.jsxs("div",{className:"border-b border-sidebar-border px-6 py-3 flex items-center justify-between",children:[m.jsxs("div",{className:"flex items-center gap-3",children:[c==="visual"&&f.length>0&&m.jsx("button",{onClick:S,className:"p-1 rounded-md hover:bg-white/10 text-muted-foreground hover:text-foreground transition-colors",children:m.jsx(Vm,{className:"h-4 w-4"})}),m.jsx(vA,{className:"h-5 w-5 text-muted-foreground"}),m.jsxs("div",{children:[m.jsx("h1",{className:"text-lg font-semibold text-foreground",children:"Sitemap"}),m.jsxs("p",{className:"mt-0.5 text-xs text-muted-foreground",children:[g.filter(C=>C.route).length," screens · ",b," links"]})]})]}),m.jsxs("div",{className:"flex items-center gap-1 bg-muted/30 rounded-lg p-0.5",children:[m.jsxs("button",{onClick:()=>u("visual"),className:`flex items-center gap-1.5 px-3 py-1.5 rounded-md text-xs font-medium transition-colors ${c==="visual"?"bg-purple-600 text-white":"text-muted-foreground hover:text-foreground"}`,children:[m.jsx(lA,{className:"h-3.5 w-3.5"}),"Visual"]}),m.jsxs("button",{onClick:()=>u("list"),className:`flex items-center gap-1.5 px-3 py-1.5 rounded-md text-xs font-medium transition-colors ${c==="list"?"bg-purple-600 text-white":"text-muted-foreground hover:text-foreground"}`,children:[m.jsx(gA,{className:"h-3.5 w-3.5"}),"List"]})]})]}),c==="list"?m.jsx(EK,{tree:_,noRouteScreens:y,onSelect:C=>{s(C),u("visual")},selectedId:i}):i?m.jsx(NK,{focusId:i,screens:g,outgoing:v,incoming:w,onNavigate:x,onDetail:l}):null]}),c==="visual"&&m.jsxs("div",{className:"w-56 shrink-0 border-l border-sidebar-border overflow-y-auto bg-sidebar-background/30",children:[m.jsx("div",{className:"px-3 py-2 border-b border-sidebar-border/50",children:m.jsx("h3",{className:"text-[10px] font-semibold uppercase tracking-wider text-muted-foreground",children:"All Screens"})}),m.jsx("div",{className:"py-1",children:m.jsx(c0,{node:_,depth:0,onSelect:x,selectedId:i})})]}),a&&e&&m.jsx("div",{className:"flex w-[400px] shrink-0 flex-col border-l border-sidebar-border bg-slate-900/95",children:m.jsx(JE,{nodeId:a,nodeLayer:"ui",graphs:e,onClose:()=>l(null),onNavigate:C=>{l(null),x(C)}})})]})}function Pw({onSelect:e,onClose:n,buildUrl:r}){const[o,i]=h.useState(null),[s,a]=h.useState(!0),l=h.useCallback(async c=>{a(!0);try{const u=await fetch(r("/api/browse-dir",c?{path:c}:void 0));if(!u.ok)throw new Error(`HTTP ${u.status}`);i(await u.json())}catch{}finally{a(!1)}},[]);return h.useEffect(()=>{l()},[l]),o?m.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50",onClick:n,children:m.jsxs("div",{className:"bg-card border border-border rounded-xl w-[480px] max-h-[70vh] flex flex-col",onClick:c=>c.stopPropagation(),children:[m.jsxs("div",{className:"p-4 border-b border-border/50",children:[m.jsx("h3",{className:"text-sm font-semibold mb-1",children:"Select App Directory"}),m.jsx("code",{className:"text-xs text-muted-foreground break-all",children:o.current})]}),m.jsxs("div",{className:"flex-1 overflow-y-auto p-2 min-h-[200px]",children:[s&&m.jsx("div",{className:"text-xs text-muted-foreground p-2",children:"Loading..."}),o.parent&&m.jsxs("button",{onClick:()=>l(o.parent),className:"flex items-center gap-2 w-full px-3 py-2 rounded-lg text-sm text-muted-foreground hover:bg-muted/50 transition-colors",children:[m.jsx(Yy,{className:"h-4 w-4 shrink-0"}),".."]}),o.dirs.map(c=>m.jsxs("button",{onClick:()=>l(`${o.current}/${c}`),className:"flex items-center gap-2 w-full px-3 py-2 rounded-lg text-sm hover:bg-muted/50 transition-colors text-left",children:[m.jsx(Yy,{className:"h-4 w-4 shrink-0 text-purple-400"}),c,m.jsx(Li,{className:"h-3 w-3 ml-auto text-muted-foreground"})]},c)),o.dirs.length===0&&!o.parent&&m.jsx("div",{className:"text-xs text-muted-foreground p-3",children:"No subdirectories"})]}),m.jsxs("div",{className:"p-3 border-t border-border/50 flex items-center justify-between",children:[m.jsx("span",{className:"text-xs text-muted-foreground",children:o.relative==="."?"(project root)":o.relative}),m.jsxs("div",{className:"flex items-center gap-2",children:[m.jsx("button",{onClick:n,className:"px-3 py-1.5 text-sm rounded-lg border border-border/50 hover:bg-muted transition-colors",children:"Cancel"}),m.jsx("button",{onClick:()=>e(o.relative==="."?".":o.relative),className:"px-3 py-1.5 text-sm rounded-lg bg-purple-600 hover:bg-purple-500 text-white font-medium transition-colors",children:"Select This Folder"})]})]})]})}):m.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50",onClick:n,children:m.jsx("div",{className:"bg-card border border-border rounded-xl p-6 w-[480px] text-sm text-muted-foreground",children:"Loading..."})})}function jK(){var Uo,rl,ol,il,sl,al,ll;const[e,n]=h.useState(null),[r,o]=h.useState(!0),[i,s]=h.useState(!1),[a,l]=h.useState(!1),[c,u]=h.useState(null),[f,d]=h.useState(new Set),[p,g]=h.useState([]),[v,w]=h.useState(""),[_,y]=h.useState("crosslayer"),[b,x]=h.useState("api-binding"),[S,C]=h.useState(""),[k,N]=h.useState(null),[E,P]=h.useState(""),[T,A]=h.useState(""),[D,V]=h.useState(null),[j,L]=h.useState(!1),I=Bo(),{projects:z,reloadProjects:M,isMultiProject:R}=Eg(),[O,W]=h.useState([]),[$,X]=h.useState(""),[F,H]=h.useState(""),[G,U]=h.useState(new Set),[Y,q]=h.useState({module:!0,screen:!0}),[te,J]=h.useState([]),[Z,ne]=h.useState([]),[ue,ye]=h.useState(""),[pe,Ne]=h.useState(""),[mt,qe]=h.useState(""),Ft=h.useCallback(async()=>{try{const K=await fetch(I("/api/detected-paths"));K.ok&&N(await K.json())}catch{}},[I]),ur=h.useCallback(async()=>{try{const K=await fetch("/api/projects");if(!K.ok)return;const de=(await K.json()).projects??[];(de.length>1||de.some(He=>He.root!=="."))&&W(de.map(He=>({name:He.name,root:He.root})))}catch{}},[]),dr=h.useCallback(async()=>{var K,he,de,He,Nt,wn,oo,cl,ul,dl;try{const io=await fetch(I("/api/parser-config"));if(!io.ok)throw new Error(`HTTP ${io.status}`);const Et=await io.json();n(Et),d(new Set(((K=Et.config.parsers)==null?void 0:K.disabled)??[])),g(((he=Et.config.parsers)==null?void 0:he.custom)??[]),C(Et.config.port?String(Et.config.port):""),P(((de=Et.config.paths)==null?void 0:de.appDir)??""),A(((He=Et.config.paths)==null?void 0:He.dbDir)??""),U(new Set(((Nt=Et.config.taggers)==null?void 0:Nt.disabled)??[])),q(((wn=Et.config.taggers)==null?void 0:wn.trackUntagged)??{module:!0,screen:!0}),J(((cl=(oo=Et.config.taggers)==null?void 0:oo.module)==null?void 0:cl.rules)??[]),ne(((dl=(ul=Et.config.taggers)==null?void 0:ul.module)==null?void 0:dl.trivialGroups)??[]),o(!1)}catch(io){u(String(io)),o(!1)}},[]);h.useEffect(()=>{dr(),Ft(),ur()},[dr,Ft,ur]);const no=h.useCallback(async()=>{s(!0),l(!1),u(null);try{const K={};G.size>0&&(K.disabled=[...G]),Object.keys(Y).length>0&&(K.trackUntagged=Y);const he={};te.length>0&&(he.rules=te),Z.length>0&&(he.trivialGroups=Z),Object.keys(he).length>0&&(K.module=he);const de=S.trim()?parseInt(S.trim(),10):void 0,He={};E.trim()&&(He.appDir=E.trim()),T.trim()&&(He.dbDir=T.trim());const Nt=Object.keys(He).length>0?He:void 0,wn={...de&&!isNaN(de)&&{port:de},...Nt&&{paths:Nt},parsers:{disabled:[...f],custom:p.length>0?p:void 0},...Object.keys(K).length>0&&{taggers:K}};wn.parsers.disabled.length===0&&delete wn.parsers.disabled,wn.parsers.custom||delete wn.parsers.custom;const oo=await fetch(I("/api/parser-config"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(wn)});if(!oo.ok)throw new Error(`HTTP ${oo.status}`);l(!0),Ft(),setTimeout(()=>l(!1),3e3)}catch(K){u(String(K))}finally{s(!1)}},[f,p,G,Y,te,Z,S,E,T,Ft,I]),Ho=K=>{d(he=>{const de=new Set(he);return de.has(K)?de.delete(K):de.add(K),de})},ro=()=>{if(!v.trim())return;const K={path:v.trim(),layer:_};_==="crosslayer"&&(K.concern=b),g(he=>[...he,K]),w("")},fr=K=>{g(he=>he.filter((de,He)=>He!==K))};if(r)return m.jsx("div",{className:"flex items-center justify-center h-full text-muted-foreground",children:"Loading configuration..."});const xn=K=>K.split("-").map(he=>he[0].toUpperCase()+he.slice(1)).join(" "),Wo=Object.entries((e==null?void 0:e.crosslayerParsers)??{}),Bd=[...((e==null?void 0:e.detection)??[]).map(K=>({...K,layer:K.layers.join(", "),label:K.label||xn(K.id),concern:null})),...Wo.flatMap(([K,he])=>he.map(de=>({id:de.id,layer:K,label:de.label||xn(de.id),detected:!0,layers:[K],concern:K})))];return m.jsxs("div",{className:"h-full overflow-y-auto p-6",children:[m.jsxs("div",{className:"flex items-center justify-between mb-6",children:[m.jsxs("div",{className:"flex items-center gap-3",children:[m.jsx(I_,{className:"h-6 w-6 text-muted-foreground"}),m.jsx("h1",{className:"text-xl font-semibold",children:"Parser Configuration"})]}),m.jsxs("button",{onClick:no,disabled:i,className:"flex items-center gap-2 px-4 py-2 rounded-lg bg-purple-600 hover:bg-purple-500 text-white text-sm font-medium transition-colors disabled:opacity-50",children:[a?m.jsx(go,{className:"h-4 w-4"}):m.jsx(Zy,{className:"h-4 w-4"}),i?"Saving...":a?"Saved":"Save"]})]}),c&&m.jsxs("div",{className:"flex items-center gap-2 p-3 rounded-lg bg-red-500/10 text-red-400 text-sm mb-6",children:[m.jsx(Ci,{className:"h-4 w-4 shrink-0"}),c]}),m.jsxs("section",{className:"mb-6 space-y-3",children:[m.jsx("h2",{className:"text-sm font-medium text-muted-foreground uppercase tracking-wider",children:"Layer Directories"}),m.jsx("p",{className:"text-xs text-muted-foreground",children:"Override auto-detected source directories per layer. Leave empty for auto-detection. Paths are relative to project root."}),m.jsxs("div",{className:"space-y-2",children:[m.jsxs("div",{className:"p-4 rounded-lg border border-border/50 bg-card space-y-2",children:[m.jsxs("div",{className:"flex items-center gap-3",children:[m.jsx("label",{className:"text-sm text-muted-foreground w-24 shrink-0",children:"UI"}),m.jsxs("div",{className:"flex-1 flex items-center gap-2",children:[m.jsx("input",{type:"text",value:E,onChange:K=>P(K.target.value),placeholder:((Uo=k==null?void 0:k.detected)==null?void 0:Uo.appDir)??"src/app",className:"flex-1 px-3 py-1.5 text-sm rounded-lg border border-border/50 bg-background text-foreground placeholder:text-muted-foreground"}),m.jsxs("button",{onClick:()=>V("app"),className:"flex items-center gap-1.5 px-3 py-1.5 text-sm rounded-lg border border-border/50 hover:bg-muted transition-colors",title:"Browse folders",children:[m.jsx(wf,{className:"h-4 w-4"}),"Browse"]}),E&&m.jsx("button",{onClick:()=>P(""),className:"flex items-center gap-1.5 px-2 py-1.5 text-sm rounded-lg border border-border/50 hover:bg-muted transition-colors text-muted-foreground",title:"Reset to auto-detect",children:m.jsx(qy,{className:"h-3.5 w-3.5"})})]})]}),m.jsx("div",{className:"flex items-center gap-2 pl-[108px]",children:(rl=k==null?void 0:k.overrides)!=null&&rl.appDir?m.jsx("span",{className:"inline-flex items-center gap-1 text-xs px-2 py-0.5 rounded-full bg-purple-500/10 text-purple-400",children:"Manual override"}):(ol=k==null?void 0:k.detected)!=null&&ol.appDir?m.jsxs("span",{className:"inline-flex items-center gap-1 text-xs px-2 py-0.5 rounded-full bg-green-500/10 text-green-400",children:[m.jsx(go,{className:"h-3 w-3"}),"Auto-detected: ",k.detected.appDir]}):m.jsxs("span",{className:"inline-flex items-center gap-1 text-xs px-2 py-0.5 rounded-full bg-yellow-500/10 text-yellow-400",children:[m.jsx(Ci,{className:"h-3 w-3"}),"Not detected"]})}),m.jsx("p",{className:"text-xs text-muted-foreground pl-[108px]",children:"Pages and layout directory. Auto-detects src/app or app/."})]}),m.jsx("div",{className:"p-4 rounded-lg border border-border/50 bg-card",children:m.jsxs("div",{className:"flex items-center gap-3",children:[m.jsx("label",{className:"text-sm text-muted-foreground w-24 shrink-0",children:"API"}),m.jsxs("div",{className:"flex-1",children:[m.jsx("span",{className:"text-sm text-muted-foreground",children:((il=k==null?void 0:k.detected)==null?void 0:il.apiDir)??"src/app/api"}),m.jsx("span",{className:"inline-flex items-center gap-1 text-xs px-2 py-0.5 rounded-full bg-muted text-muted-foreground ml-3",children:"Derived from UI dir"})]})]})}),m.jsxs("div",{className:"p-4 rounded-lg border border-border/50 bg-card space-y-2",children:[m.jsxs("div",{className:"flex items-center gap-3",children:[m.jsx("label",{className:"text-sm text-muted-foreground w-24 shrink-0",children:"DB"}),m.jsxs("div",{className:"flex-1 flex items-center gap-2",children:[m.jsx("input",{type:"text",value:T,onChange:K=>A(K.target.value),placeholder:((sl=k==null?void 0:k.detected)==null?void 0:sl.dbDir)??"prisma",className:"flex-1 px-3 py-1.5 text-sm rounded-lg border border-border/50 bg-background text-foreground placeholder:text-muted-foreground"}),m.jsxs("button",{onClick:()=>V("db"),className:"flex items-center gap-1.5 px-3 py-1.5 text-sm rounded-lg border border-border/50 hover:bg-muted transition-colors",title:"Browse folders",children:[m.jsx(wf,{className:"h-4 w-4"}),"Browse"]}),T&&m.jsx("button",{onClick:()=>A(""),className:"flex items-center gap-1.5 px-2 py-1.5 text-sm rounded-lg border border-border/50 hover:bg-muted transition-colors text-muted-foreground",title:"Reset to auto-detect",children:m.jsx(qy,{className:"h-3.5 w-3.5"})})]})]}),m.jsx("div",{className:"flex items-center gap-2 pl-[108px]",children:(al=k==null?void 0:k.overrides)!=null&&al.dbDir?m.jsx("span",{className:"inline-flex items-center gap-1 text-xs px-2 py-0.5 rounded-full bg-purple-500/10 text-purple-400",children:"Manual override"}):(ll=k==null?void 0:k.detected)!=null&&ll.dbDir?m.jsxs("span",{className:"inline-flex items-center gap-1 text-xs px-2 py-0.5 rounded-full bg-green-500/10 text-green-400",children:[m.jsx(go,{className:"h-3 w-3"}),"Auto-detected: ",k.detected.dbDir]}):m.jsxs("span",{className:"inline-flex items-center gap-1 text-xs px-2 py-0.5 rounded-full bg-yellow-500/10 text-yellow-400",children:[m.jsx(Ci,{className:"h-3 w-3"}),"Not detected"]})}),m.jsx("p",{className:"text-xs text-muted-foreground pl-[108px]",children:"Schema and migration directory. Auto-detects prisma/."})]})]})]}),m.jsxs("section",{className:"mb-6 space-y-3",children:[m.jsx("h2",{className:"text-sm font-medium text-muted-foreground uppercase tracking-wider",children:"Server"}),m.jsxs("div",{className:"flex items-center gap-3",children:[m.jsx("label",{className:"text-sm text-muted-foreground w-24 shrink-0",children:"Port"}),m.jsx("input",{type:"text",value:S,onChange:K=>C(K.target.value),placeholder:"Random",className:"w-32 px-3 py-1.5 text-sm rounded-lg border border-border/50 bg-background text-foreground placeholder:text-muted-foreground"}),m.jsx("span",{className:"text-xs text-muted-foreground",children:"Leave empty for random port on each start"})]})]}),m.jsxs("div",{className:"grid grid-cols-1 xl:grid-cols-2 gap-6",children:[m.jsxs("div",{className:"space-y-6",children:[m.jsxs("section",{className:"space-y-3",children:[m.jsx("h2",{className:"text-sm font-medium text-muted-foreground uppercase tracking-wider",children:"Stack Detection"}),m.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-3 xl:grid-cols-1 gap-2",children:((e==null?void 0:e.detection)??[]).map(K=>m.jsxs("div",{className:`flex items-center gap-2 p-3 rounded-lg border ${K.detected?"border-green-500/30 bg-green-500/5":"border-border/50 bg-muted/20 opacity-50"}`,children:[K.detected?m.jsx(go,{className:"h-4 w-4 text-green-500 shrink-0"}):m.jsx(Q5,{className:"h-4 w-4 text-muted-foreground shrink-0"}),m.jsxs("div",{children:[m.jsx("div",{className:"text-sm font-medium",children:K.label||K.id}),m.jsxs("div",{className:"text-xs text-muted-foreground",children:[K.layers.join(", ")," layer"]})]})]},K.id))})]}),Wo.map(([K,he])=>m.jsxs("section",{className:"space-y-3",children:[m.jsxs("h2",{className:"text-sm font-medium text-muted-foreground uppercase tracking-wider",children:[xn(K)," Parsers"]}),m.jsx("div",{className:"space-y-2",children:he.map(de=>m.jsx("div",{className:"flex items-center justify-between p-3 rounded-lg border border-border/50 bg-card",children:m.jsxs("div",{className:"flex items-center gap-3",children:[m.jsx("button",{onClick:()=>Ho(de.id),className:`w-10 h-5 rounded-full transition-colors relative shrink-0 ${f.has(de.id)?"bg-muted":"bg-purple-600"}`,children:m.jsx("span",{className:`block absolute top-0.5 left-0.5 h-4 w-4 rounded-full bg-white transition-all ${f.has(de.id)?"left-0.5":"left-[22px]"}`})}),m.jsxs("div",{children:[m.jsx("div",{className:"text-sm font-medium",children:de.label||xn(de.id)}),m.jsx("div",{className:"text-xs text-muted-foreground",children:de.id})]})]})},de.id))})]},K))]}),m.jsxs("div",{className:"space-y-6",children:[m.jsxs("section",{className:"space-y-3",children:[m.jsx("h2",{className:"text-sm font-medium text-muted-foreground uppercase tracking-wider",children:"Layer Parsers"}),m.jsx("div",{className:"space-y-2",children:Bd.filter(K=>!K.concern).map(K=>m.jsx("div",{className:"flex items-center justify-between p-3 rounded-lg border border-border/50 bg-card",children:m.jsxs("div",{className:"flex items-center gap-3",children:[m.jsx("button",{onClick:()=>Ho(K.id),className:`w-10 h-5 rounded-full transition-colors relative shrink-0 ${f.has(K.id)?"bg-muted":"bg-purple-600"}`,children:m.jsx("span",{className:`block absolute top-0.5 left-0.5 h-4 w-4 rounded-full bg-white transition-all ${f.has(K.id)?"left-0.5":"left-[22px]"}`})}),m.jsxs("div",{children:[m.jsx("div",{className:"text-sm font-medium",children:K.label}),m.jsxs("div",{className:"text-xs text-muted-foreground",children:[K.id," — ",K.layer]})]})]})},K.id))})]}),m.jsxs("section",{className:"space-y-3",children:[m.jsx("h2",{className:"text-sm font-medium text-muted-foreground uppercase tracking-wider",children:"Custom Parsers"}),m.jsx("p",{className:"text-xs text-muted-foreground",children:"JS files exporting a parser object. Path relative to project root."}),p.length>0&&m.jsx("div",{className:"space-y-2",children:p.map((K,he)=>m.jsxs("div",{className:"flex items-center gap-2 p-2 rounded-lg border border-border/50 bg-card",children:[m.jsx("code",{className:"text-xs flex-1 text-muted-foreground",children:K.path}),m.jsx("span",{className:"text-xs px-2 py-0.5 rounded bg-muted text-muted-foreground",children:K.layer}),K.concern&&m.jsx("span",{className:"text-xs px-2 py-0.5 rounded bg-purple-500/10 text-purple-400",children:K.concern}),m.jsx("button",{onClick:()=>fr(he),className:"text-red-400 hover:text-red-300",children:m.jsx(Tl,{className:"h-3.5 w-3.5"})})]},he))}),m.jsxs("div",{className:"flex items-center gap-2",children:[m.jsx("input",{type:"text",value:v,onChange:K=>w(K.target.value),placeholder:"./parsers/my-parser.js",className:"flex-1 px-3 py-1.5 text-sm rounded-lg border border-border/50 bg-background text-foreground placeholder:text-muted-foreground",onKeyDown:K=>K.key==="Enter"&&ro()}),m.jsxs("select",{value:_,onChange:K=>y(K.target.value),className:"px-2 py-1.5 text-sm rounded-lg border border-border/50 bg-background text-foreground",children:[m.jsx("option",{value:"crosslayer",children:"crosslayer"}),m.jsx("option",{value:"ui",children:"ui"}),m.jsx("option",{value:"api",children:"api"}),m.jsx("option",{value:"db",children:"db"})]}),_==="crosslayer"&&m.jsx("input",{type:"text",value:b,onChange:K=>x(K.target.value),placeholder:"api-binding",list:"concern-suggestions",className:"w-32 px-2 py-1.5 text-sm rounded-lg border border-border/50 bg-background text-foreground placeholder:text-muted-foreground"}),m.jsx("button",{onClick:ro,className:"p-1.5 rounded-lg border border-border/50 hover:bg-muted transition-colors",children:m.jsx(Al,{className:"h-4 w-4"})})]}),m.jsx("datalist",{id:"concern-suggestions",children:Wo.map(([K])=>m.jsx("option",{value:K},K))})]})]})]}),m.jsxs("div",{className:"mt-8 border-t border-border/30 pt-6",children:[m.jsxs("div",{className:"flex items-center gap-3 mb-6",children:[m.jsx(VA,{className:"h-5 w-5 text-muted-foreground"}),m.jsx("h2",{className:"text-lg font-semibold",children:"Taggers"})]}),m.jsxs("div",{className:"grid grid-cols-1 xl:grid-cols-2 gap-6",children:[m.jsxs("section",{className:"space-y-3",children:[m.jsx("h3",{className:"text-sm font-medium text-muted-foreground uppercase tracking-wider",children:"Built-in Taggers"}),[{id:"module",label:"Module",description:"Assigns modules from directory structure"},{id:"screen",label:"Screen",description:"Marks pages and layouts as screens"}].map(K=>m.jsxs("div",{className:"p-3 rounded-lg border border-border/50 bg-card space-y-2",children:[m.jsx("div",{className:"flex items-center justify-between",children:m.jsxs("div",{className:"flex items-center gap-3",children:[m.jsx("button",{onClick:()=>U(he=>{const de=new Set(he);return de.has(K.id)?de.delete(K.id):de.add(K.id),de}),className:`w-10 h-5 rounded-full transition-colors relative shrink-0 ${G.has(K.id)?"bg-muted":"bg-purple-600"}`,children:m.jsx("span",{className:`block absolute top-0.5 left-0.5 h-4 w-4 rounded-full bg-white transition-all ${G.has(K.id)?"left-0.5":"left-[22px]"}`})}),m.jsxs("div",{children:[m.jsx("div",{className:"text-sm font-medium",children:K.label}),m.jsx("div",{className:"text-xs text-muted-foreground",children:K.description})]})]})}),m.jsxs("label",{className:"flex items-center gap-2 text-xs text-muted-foreground pl-[52px]",children:[m.jsx("input",{type:"checkbox",checked:Y[K.id]??!0,onChange:he=>q(de=>({...de,[K.id]:he.target.checked})),className:"accent-purple-600"}),"Track untagged nodes"]})]},K.id))]}),m.jsxs("section",{className:"space-y-3",children:[m.jsx("h3",{className:"text-sm font-medium text-muted-foreground uppercase tracking-wider",children:"Module Rules"}),m.jsx("p",{className:"text-xs text-muted-foreground",children:"Custom glob patterns to assign modules. Matched before auto-detection."}),te.length>0&&m.jsx("div",{className:"space-y-2",children:te.map((K,he)=>m.jsxs("div",{className:"flex items-center gap-2 p-2 rounded-lg border border-border/50 bg-card",children:[m.jsx("code",{className:"text-xs flex-1 text-muted-foreground",children:K.match}),m.jsx("span",{className:"text-xs px-2 py-0.5 rounded bg-purple-500/10 text-purple-400",children:K.module}),m.jsx("button",{onClick:()=>J(de=>de.filter((He,Nt)=>Nt!==he)),className:"text-red-400 hover:text-red-300",children:m.jsx(Tl,{className:"h-3.5 w-3.5"})})]},he))}),m.jsxs("div",{className:"flex items-center gap-2",children:[m.jsx("input",{type:"text",value:pe,onChange:K=>Ne(K.target.value),placeholder:"app/(admin)/**",className:"flex-1 px-3 py-1.5 text-sm rounded-lg border border-border/50 bg-background text-foreground placeholder:text-muted-foreground"}),m.jsx("input",{type:"text",value:mt,onChange:K=>qe(K.target.value),placeholder:"admin",className:"w-28 px-3 py-1.5 text-sm rounded-lg border border-border/50 bg-background text-foreground placeholder:text-muted-foreground"}),m.jsx("button",{onClick:()=>{pe.trim()&&mt.trim()&&(J(K=>[...K,{match:pe.trim(),module:mt.trim()}]),Ne(""),qe(""))},className:"p-1.5 rounded-lg border border-border/50 hover:bg-muted transition-colors",children:m.jsx(Al,{className:"h-4 w-4"})})]})]}),m.jsxs("section",{className:"space-y-3",children:[m.jsx("h3",{className:"text-sm font-medium text-muted-foreground uppercase tracking-wider",children:"Trivial Route Groups"}),m.jsx("p",{className:"text-xs text-muted-foreground",children:"Route groups that are auth/layout wrappers, not feature modules. These are skipped during module detection."}),Z.length>0&&m.jsx("div",{className:"flex flex-wrap gap-1.5",children:Z.map((K,he)=>m.jsxs("span",{className:"inline-flex items-center gap-1 rounded-full px-2.5 py-1 text-xs bg-muted text-muted-foreground",children:["(",K,")",m.jsx("button",{onClick:()=>ne(de=>de.filter((He,Nt)=>Nt!==he)),className:"text-red-400 hover:text-red-300 ml-0.5",children:m.jsx(Tl,{className:"h-3 w-3"})})]},he))}),m.jsxs("div",{className:"flex items-center gap-2",children:[m.jsx("input",{type:"text",value:ue,onChange:K=>ye(K.target.value),placeholder:"protected",className:"flex-1 px-3 py-1.5 text-sm rounded-lg border border-border/50 bg-background text-foreground placeholder:text-muted-foreground",onKeyDown:K=>{K.key==="Enter"&&ue.trim()&&(ne(he=>[...he,ue.trim()]),ye(""))}}),m.jsx("button",{onClick:()=>{ue.trim()&&(ne(K=>[...K,ue.trim()]),ye(""))},className:"p-1.5 rounded-lg border border-border/50 hover:bg-muted transition-colors",children:m.jsx(Al,{className:"h-4 w-4"})})]})]})]})]}),m.jsxs("div",{className:"mt-8 border-t border-border/30 pt-6",children:[m.jsxs("div",{className:"flex items-center gap-3 mb-6",children:[m.jsx(Ju,{className:"h-5 w-5 text-muted-foreground"}),m.jsx("h2",{className:"text-lg font-semibold",children:"Projects"})]}),m.jsx("p",{className:"text-xs text-muted-foreground mb-4",children:"Configure sub-projects for monorepo support. Each project gets its own graph, selectable from the header dropdown. Leave empty for single-project mode."}),O.length>0&&m.jsx("div",{className:"space-y-2 mb-4",children:O.map((K,he)=>m.jsxs("div",{className:"flex items-center gap-2 p-3 rounded-lg border border-border/50 bg-card",children:[m.jsx("span",{className:"text-sm font-medium flex-1",children:K.name}),m.jsx("code",{className:"text-xs text-muted-foreground",children:K.root}),m.jsx("button",{onClick:()=>W(de=>de.filter((He,Nt)=>Nt!==he)),className:"text-red-400 hover:text-red-300",children:m.jsx(Tl,{className:"h-3.5 w-3.5"})})]},he))}),m.jsxs("div",{className:"flex items-center gap-2",children:[m.jsx("input",{type:"text",value:$,onChange:K=>X(K.target.value),placeholder:"Project name",className:"w-40 px-3 py-1.5 text-sm rounded-lg border border-border/50 bg-background text-foreground placeholder:text-muted-foreground"}),m.jsxs("div",{className:"flex-1 flex items-center gap-1",children:[m.jsx("input",{type:"text",value:F,onChange:K=>H(K.target.value),placeholder:"Relative path (e.g. apps/dashboard)",className:"flex-1 px-3 py-1.5 text-sm rounded-lg border border-border/50 bg-background text-foreground placeholder:text-muted-foreground"}),m.jsx("button",{onClick:()=>L(!0),className:"p-1.5 rounded-lg border border-border/50 hover:bg-muted transition-colors",title:"Browse folders",children:m.jsx(wf,{className:"h-4 w-4"})})]}),m.jsx("button",{onClick:()=>{$.trim()&&F.trim()&&(W(K=>[...K,{name:$.trim(),root:F.trim()}]),X(""),H(""))},className:"p-1.5 rounded-lg border border-border/50 hover:bg-muted transition-colors",children:m.jsx(Al,{className:"h-4 w-4"})})]}),m.jsxs("button",{onClick:async()=>{try{const K=await fetch("/api/projects",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({projects:O})});if(!K.ok)throw new Error(`HTTP ${K.status}`);M()}catch(K){u(String(K))}},className:"mt-3 flex items-center gap-2 px-4 py-2 rounded-lg bg-purple-600 hover:bg-purple-500 text-white text-sm font-medium transition-colors",children:[m.jsx(Zy,{className:"h-4 w-4"}),"Save Projects"]})]}),D&&D!=="project"&&m.jsx(Pw,{buildUrl:I,onSelect:K=>{D==="app"?P(K):D==="db"&&A(K),V(null)},onClose:()=>V(null)}),j&&m.jsx(Pw,{buildUrl:I,onSelect:K=>{H(K),L(!1)},onClose:()=>L(!1)})]})}const MK=["all","db","api","ui","static"],RK={error:{icon:Ci,color:"text-red-400",bg:"bg-red-500/10",border:"border-red-500/30",label:"Error"},warning:{icon:Um,color:"text-yellow-400",bg:"bg-yellow-500/10",border:"border-yellow-500/30",label:"Warning"},info:{icon:A_,color:"text-blue-400",bg:"bg-blue-500/10",border:"border-blue-500/30",label:"Info"}};function AK(){const[e,n]=h.useState(null),[r,o]=h.useState(!1),[i,s]=h.useState(null),[a,l]=h.useState("all"),[c,u]=h.useState(null),f=Bo(),d=h.useCallback(async()=>{o(!0),s(null);try{const y=await fetch(f("/api/audit",{layer:a}));if(!y.ok)throw new Error(`HTTP ${y.status}`);n(await y.json())}catch(y){s(String(y))}finally{o(!1)}},[a,f]);h.useEffect(()=>{d()},[d]);const p=h.useCallback((y,b)=>{navigator.clipboard.writeText(b),u(y),setTimeout(()=>u(null),2e3)},[]),g=(e==null?void 0:e.reports.reduce((y,b)=>y+b.findings.length,0))??0,v=(e==null?void 0:e.reports.reduce((y,b)=>y+b.summary.errors,0))??0,w=(e==null?void 0:e.reports.reduce((y,b)=>y+b.summary.warnings,0))??0,_=(e==null?void 0:e.reports.reduce((y,b)=>y+b.summary.info,0))??0;return m.jsxs("div",{className:"h-full overflow-y-auto p-6",children:[m.jsxs("div",{className:"flex items-center justify-between mb-6",children:[m.jsxs("div",{className:"flex items-center gap-3",children:[m.jsx($_,{className:"h-6 w-6 text-muted-foreground"}),m.jsx("h1",{className:"text-xl font-semibold",children:"Audit"})]}),m.jsxs("button",{onClick:d,disabled:r,className:"flex items-center gap-2 px-4 py-2 rounded-lg bg-purple-600 hover:bg-purple-500 text-white text-sm font-medium transition-colors disabled:opacity-50",children:[m.jsx(EA,{className:"h-4 w-4"}),r?"Running...":"Run Audit"]})]}),i&&m.jsxs("div",{className:"flex items-center gap-2 p-3 rounded-lg bg-red-500/10 text-red-400 text-sm mb-6",children:[m.jsx(Ci,{className:"h-4 w-4 shrink-0"}),i]}),m.jsx("div",{className:"flex gap-1 mb-6 p-1 rounded-lg bg-muted/30 w-fit",children:MK.map(y=>m.jsx("button",{onClick:()=>l(y),className:`px-4 py-1.5 text-sm rounded-md transition-colors ${a===y?"bg-purple-600 text-white font-medium":"text-muted-foreground hover:text-foreground"}`,children:y},y))}),e&&!r&&m.jsxs("div",{className:"flex items-center gap-4 mb-6 p-3 rounded-lg border border-border/50 bg-card",children:[m.jsxs("span",{className:"text-sm font-medium",children:[g," findings"]}),v>0&&m.jsxs("span",{className:"flex items-center gap-1 text-xs text-red-400",children:[m.jsx(Ci,{className:"h-3 w-3"})," ",v," errors"]}),w>0&&m.jsxs("span",{className:"flex items-center gap-1 text-xs text-yellow-400",children:[m.jsx(Um,{className:"h-3 w-3"})," ",w," warnings"]}),_>0&&m.jsxs("span",{className:"flex items-center gap-1 text-xs text-blue-400",children:[m.jsx(A_,{className:"h-3 w-3"})," ",_," info"]}),g>0&&m.jsxs("button",{onClick:()=>e.prompt&&p("all",e.prompt),className:"ml-auto flex items-center gap-1.5 px-3 py-1 text-xs rounded-md border border-border/50 hover:bg-muted transition-colors",children:[c==="all"?m.jsx(go,{className:"h-3 w-3 text-green-400"}):m.jsx(Gy,{className:"h-3 w-3"}),c==="all"?"Copied":"Copy All as AI Prompt"]})]}),r&&m.jsx("div",{className:"text-sm text-muted-foreground",children:"Running audit checks..."}),e&&!r&&m.jsx("div",{className:"space-y-4",children:e.reports.map(y=>m.jsxs("section",{className:"rounded-lg border border-border/50 bg-card overflow-hidden",children:[m.jsxs("div",{className:"flex items-center justify-between p-4 border-b border-border/30",children:[m.jsxs("div",{className:"flex items-center gap-3",children:[m.jsx("span",{className:"text-xs px-2 py-0.5 rounded bg-muted text-muted-foreground uppercase",children:y.layer}),m.jsx("span",{className:"text-sm font-medium",children:y.check.replace(/_/g," ")}),y.findings.length===0?m.jsxs("span",{className:"text-xs text-green-400 flex items-center gap-1",children:[m.jsx(go,{className:"h-3 w-3"})," passed"]}):m.jsxs("span",{className:"text-xs text-muted-foreground",children:[y.findings.length," finding",y.findings.length!==1?"s":""]})]}),y.findings.length>0&&m.jsxs("button",{onClick:()=>{const b=TK(y);p(y.check,b)},className:"flex items-center gap-1.5 px-2.5 py-1 text-xs rounded-md border border-border/50 hover:bg-muted transition-colors",children:[c===y.check?m.jsx(go,{className:"h-3 w-3 text-green-400"}):m.jsx(Gy,{className:"h-3 w-3"}),c===y.check?"Copied":"Copy as AI Prompt"]})]}),y.findings.length>0&&m.jsx("div",{className:"divide-y divide-border/20",children:y.findings.map(b=>{const x=RK[b.severity],S=x.icon;return m.jsxs("div",{className:`flex items-start gap-3 p-3 ${x.bg}`,children:[m.jsx(S,{className:`h-4 w-4 shrink-0 mt-0.5 ${x.color}`}),m.jsxs("div",{className:"min-w-0 flex-1",children:[m.jsx("div",{className:"text-sm font-medium",children:b.title}),m.jsx("div",{className:"text-xs text-muted-foreground mt-0.5",children:b.detail}),b.file&&m.jsxs("code",{className:"text-xs text-muted-foreground mt-1 block",children:[b.file,b.line?`:${b.line}`:""]})]})]},b.id)})})]},`${y.layer}:${y.check}`))})]})}function TK(e){const n=[];n.push(`Fix these ${e.findings.length} ${e.check.replace(/_/g," ")} issues:
440
- `);for(const r of e.findings){const o=r.severity==="error"?"ERROR":r.severity==="warning"?"WARNING":"INFO",i=r.file?` (${r.file}${r.line?`:${r.line}`:""})`:"";n.push(`- [${o}] ${r.title}${i}`),n.push(` ${r.detail}`)}return n.join(`
441
- `)}function IK(){return m.jsx(kz,{children:m.jsxs("div",{className:"flex h-screen flex-col overflow-hidden bg-background text-foreground",children:[m.jsx(Pz,{}),m.jsxs("div",{className:"flex flex-1 min-h-0",children:[m.jsx(Az,{}),m.jsx("main",{className:"flex-1 min-h-0 overflow-hidden content-gradient",children:m.jsxs(t3,{children:[m.jsx(Bn,{path:"/overview",element:m.jsx(RU,{})}),m.jsx(Bn,{path:"/modules",element:m.jsx(vK,{})}),m.jsx(Bn,{path:"/sitemap",element:m.jsx(PK,{})}),m.jsx(Bn,{path:"/journeys",element:m.jsx(bK,{})}),m.jsx(Bn,{path:"/project-graph",element:m.jsx(jU,{})}),m.jsx(Bn,{path:"/audit",element:m.jsx(AK,{})}),m.jsx(Bn,{path:"/settings",element:m.jsx(jK,{})}),m.jsx(Bn,{path:"*",element:m.jsx(JR,{to:"/overview",replace:!0})})]})})]})]})})}Zf.createRoot(document.getElementById("root")).render(m.jsx(ot.StrictMode,{children:m.jsx(c3,{children:m.jsx(x3,{children:m.jsx(IK,{})})})}));