@launchsecure/launch-kit 0.0.18 → 0.0.19

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 (69) hide show
  1. package/dist/chart-client/assets/index-C8ANseEa.js +441 -0
  2. package/dist/chart-client/index.html +1 -1
  3. package/dist/deck-client/assets/{_baseUniq-2gclQXo7.js → _baseUniq-DsfOm3t_.js} +1 -1
  4. package/dist/deck-client/assets/{arc-DcMY5Wm0.js → arc-NJuvkBv1.js} +1 -1
  5. package/dist/deck-client/assets/{architectureDiagram-Q4EWVU46-B8iirmmJ.js → architectureDiagram-Q4EWVU46-BgrcgZs0.js} +1 -1
  6. package/dist/deck-client/assets/{blockDiagram-DXYQGD6D-B4JBLjmJ.js → blockDiagram-DXYQGD6D-C3XoLi15.js} +1 -1
  7. package/dist/deck-client/assets/{c4Diagram-AHTNJAMY-CojrJAk8.js → c4Diagram-AHTNJAMY-FX2PjLfb.js} +1 -1
  8. package/dist/deck-client/assets/channel-ChQjD1T1.js +1 -0
  9. package/dist/deck-client/assets/{chunk-4BX2VUAB-Bmb_BMDo.js → chunk-4BX2VUAB-D0aqsJV0.js} +1 -1
  10. package/dist/deck-client/assets/{chunk-4TB4RGXK-CumBy8qe.js → chunk-4TB4RGXK-7qRCCAgK.js} +1 -1
  11. package/dist/deck-client/assets/{chunk-55IACEB6-Ka8Hb1wD.js → chunk-55IACEB6-DfHG-iqb.js} +1 -1
  12. package/dist/deck-client/assets/{chunk-EDXVE4YY-B3sIPiQo.js → chunk-EDXVE4YY-DrR52j3B.js} +1 -1
  13. package/dist/deck-client/assets/{chunk-FMBD7UC4-C1tYkaqu.js → chunk-FMBD7UC4-D5KSGATB.js} +1 -1
  14. package/dist/deck-client/assets/{chunk-OYMX7WX6-D7Wacbky.js → chunk-OYMX7WX6-M7hsLRNU.js} +1 -1
  15. package/dist/deck-client/assets/{chunk-QZHKN3VN-ChXI0vO3.js → chunk-QZHKN3VN-1ynAWO2m.js} +1 -1
  16. package/dist/deck-client/assets/{chunk-YZCP3GAM-BXhiqf8u.js → chunk-YZCP3GAM-S2-nGw3D.js} +1 -1
  17. package/dist/deck-client/assets/classDiagram-6PBFFD2Q-B_9iqK1S.js +1 -0
  18. package/dist/deck-client/assets/classDiagram-v2-HSJHXN6E-B_9iqK1S.js +1 -0
  19. package/dist/deck-client/assets/clone-BYt1AMfz.js +1 -0
  20. package/dist/deck-client/assets/{cose-bilkent-S5V4N54A-Bqp3p68D.js → cose-bilkent-S5V4N54A-BcMwozS2.js} +1 -1
  21. package/dist/deck-client/assets/{dagre-KV5264BT-BS-rtyhZ.js → dagre-KV5264BT-DtKMhl_1.js} +1 -1
  22. package/dist/deck-client/assets/{diagram-5BDNPKRD-BIrj9YGI.js → diagram-5BDNPKRD-1plH69us.js} +1 -1
  23. package/dist/deck-client/assets/{diagram-G4DWMVQ6-noHWPIg4.js → diagram-G4DWMVQ6-D_o-BHO3.js} +1 -1
  24. package/dist/deck-client/assets/{diagram-MMDJMWI5-C2qHxvqV.js → diagram-MMDJMWI5-ClZ1LIx6.js} +1 -1
  25. package/dist/deck-client/assets/{diagram-TYMM5635-BytnGQr-.js → diagram-TYMM5635-B8dKHfRh.js} +1 -1
  26. package/dist/deck-client/assets/{erDiagram-SMLLAGMA-BfK5m2YQ.js → erDiagram-SMLLAGMA-CY2aCH7-.js} +1 -1
  27. package/dist/deck-client/assets/{flowDiagram-DWJPFMVM-Cq925G1Z.js → flowDiagram-DWJPFMVM-DZZWHti8.js} +1 -1
  28. package/dist/deck-client/assets/{ganttDiagram-T4ZO3ILL-DhhHPAmj.js → ganttDiagram-T4ZO3ILL-OwGGa6Lu.js} +1 -1
  29. package/dist/deck-client/assets/{gitGraphDiagram-UUTBAWPF-B3Lc0h9q.js → gitGraphDiagram-UUTBAWPF-GKyWD4Qt.js} +1 -1
  30. package/dist/deck-client/assets/{graph-RTawgVWm.js → graph-CORzYQdB.js} +1 -1
  31. package/dist/deck-client/assets/{index-BfIfJXmS.js → index-hiIpM7EP.js} +3 -3
  32. package/dist/deck-client/assets/{infoDiagram-42DDH7IO-BlR584kX.js → infoDiagram-42DDH7IO-DmgqJCcF.js} +1 -1
  33. package/dist/deck-client/assets/{ishikawaDiagram-UXIWVN3A-DygKoNGY.js → ishikawaDiagram-UXIWVN3A-D-1v7knu.js} +1 -1
  34. package/dist/deck-client/assets/{journeyDiagram-VCZTEJTY-BnaiYp9N.js → journeyDiagram-VCZTEJTY-CYrGQE7b.js} +1 -1
  35. package/dist/deck-client/assets/{kanban-definition-6JOO6SKY-BQBUBzJC.js → kanban-definition-6JOO6SKY-BJFDWiH-.js} +1 -1
  36. package/dist/deck-client/assets/{layout-DeZ8HI1T.js → layout-BTFFcaxF.js} +1 -1
  37. package/dist/deck-client/assets/{linear-C6roLi_9.js → linear-DAbl6COS.js} +1 -1
  38. package/dist/deck-client/assets/{min-CbUksbuI.js → min-oWHBrFBm.js} +1 -1
  39. package/dist/deck-client/assets/{mindmap-definition-QFDTVHPH-iNxV62yN.js → mindmap-definition-QFDTVHPH-BTCB0VLO.js} +1 -1
  40. package/dist/deck-client/assets/{pieDiagram-DEJITSTG-DHVA0jaG.js → pieDiagram-DEJITSTG-CUZChWNA.js} +1 -1
  41. package/dist/deck-client/assets/{quadrantDiagram-34T5L4WZ-DBeKKLUQ.js → quadrantDiagram-34T5L4WZ-4M1Um_e4.js} +1 -1
  42. package/dist/deck-client/assets/{requirementDiagram-MS252O5E-CBwITx7p.js → requirementDiagram-MS252O5E-DLzQZ0B3.js} +1 -1
  43. package/dist/deck-client/assets/{sankeyDiagram-XADWPNL6-BtE-1YTU.js → sankeyDiagram-XADWPNL6-DcNgzV3E.js} +1 -1
  44. package/dist/deck-client/assets/{sequenceDiagram-FGHM5R23-DN96yPP2.js → sequenceDiagram-FGHM5R23-CAcI2vC9.js} +1 -1
  45. package/dist/deck-client/assets/{stateDiagram-FHFEXIEX-VUkKC2uJ.js → stateDiagram-FHFEXIEX-CntjTTm5.js} +1 -1
  46. package/dist/deck-client/assets/stateDiagram-v2-QKLJ7IA2-YiaphOU_.js +1 -0
  47. package/dist/deck-client/assets/{timeline-definition-GMOUNBTQ-oUeZhRns.js → timeline-definition-GMOUNBTQ-D8zrit4U.js} +1 -1
  48. package/dist/deck-client/assets/{vennDiagram-DHZGUBPP-D87fK90n.js → vennDiagram-DHZGUBPP-C4SuFPgo.js} +1 -1
  49. package/dist/deck-client/assets/wardley-RL74JXVD-B3F-Olcq.js +162 -0
  50. package/dist/deck-client/assets/{wardleyDiagram-NUSXRM2D-Ca_i0QRA.js → wardleyDiagram-NUSXRM2D-kj73r6f-.js} +1 -1
  51. package/dist/deck-client/assets/{xychartDiagram-5P7HB3ND-CUOJVIvq.js → xychartDiagram-5P7HB3ND-CC_d_Ey3.js} +1 -1
  52. package/dist/deck-client/index.html +1 -1
  53. package/dist/server/chart-serve.js +392 -169
  54. package/dist/server/cli.js +384 -168
  55. package/dist/server/council-entry.js +0 -0
  56. package/dist/server/deck-server/deck-mcp-entry.js +0 -0
  57. package/dist/server/fb-wizard.js +0 -0
  58. package/dist/server/graph-mcp-entry.js +430 -206
  59. package/dist/server/server/cli.js +0 -0
  60. package/dist/server/server/fb-wizard.js +0 -0
  61. package/dist/server/server/graph-mcp-entry.js +0 -0
  62. package/package.json +18 -17
  63. package/dist/chart-client/assets/index-D7x8nz-H.js +0 -441
  64. package/dist/deck-client/assets/channel-ERh5jKXV.js +0 -1
  65. package/dist/deck-client/assets/classDiagram-6PBFFD2Q-CMi1Gaev.js +0 -1
  66. package/dist/deck-client/assets/classDiagram-v2-HSJHXN6E-CMi1Gaev.js +0 -1
  67. package/dist/deck-client/assets/clone-DfWhlD4X.js +0 -1
  68. package/dist/deck-client/assets/stateDiagram-v2-QKLJ7IA2-CA0IjulK.js +0 -1
  69. package/dist/deck-client/assets/wardley-RL74JXVD-DYbYcpDp.js +0 -162
@@ -1,441 +0,0 @@
1
- function EP(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 N1={exports:{}},Tu={},E1={exports:{}},ve={};/**
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 Aa=Symbol.for("react.element"),PP=Symbol.for("react.portal"),jP=Symbol.for("react.fragment"),MP=Symbol.for("react.strict_mode"),RP=Symbol.for("react.profiler"),AP=Symbol.for("react.provider"),TP=Symbol.for("react.context"),IP=Symbol.for("react.forward_ref"),OP=Symbol.for("react.suspense"),$P=Symbol.for("react.memo"),DP=Symbol.for("react.lazy"),m0=Symbol.iterator;function LP(e){return e===null||typeof e!="object"?null:(e=m0&&e[m0]||e["@@iterator"],typeof e=="function"?e:null)}var P1={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},j1=Object.assign,M1={};function Qi(e,n,r){this.props=e,this.context=n,this.refs=M1,this.updater=r||P1}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 R1(){}R1.prototype=Qi.prototype;function zp(e,n,r){this.props=e,this.context=n,this.refs=M1,this.updater=r||P1}var Fp=zp.prototype=new R1;Fp.constructor=zp;j1(Fp,Qi.prototype);Fp.isPureReactComponent=!0;var g0=Array.isArray,A1=Object.prototype.hasOwnProperty,Bp={current:null},T1={key:!0,ref:!0,__self:!0,__source:!0};function I1(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)A1.call(n,o)&&!T1.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:Aa,type:e,key:s,ref:a,props:i,_owner:Bp.current}}function zP(e,n){return{$$typeof:Aa,type:e.type,key:n,ref:e.ref,props:e.props,_owner:e._owner}}function Hp(e){return typeof e=="object"&&e!==null&&e.$$typeof===Aa}function FP(e){var n={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(r){return n[r]})}var v0=/\/+/g;function Ud(e,n){return typeof e=="object"&&e!==null&&e.key!=null?FP(""+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 Aa:case PP:a=!0}}if(a)return a=e,i=i(a),e=o===""?"."+Ud(a,0):o,g0(i)?(r="",e!=null&&(r=e.replace(v0,"$&/")+"/"),oc(i,n,r,"",function(u){return u})):i!=null&&(Hp(i)&&(i=zP(i,r+(!i.key||a&&a.key===i.key?"":(""+i.key).replace(v0,"$&/")+"/")+e)),n.push(i)),1;if(a=0,o=o===""?".":o+":",g0(e))for(var l=0;l<e.length;l++){s=e[l];var c=o+Ud(s,l);a+=oc(s,n,r,c,i)}else if(c=LP(e),typeof c=="function")for(e=c.call(e),l=0;!(s=e.next()).done;)s=s.value,c=o+Ud(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 hl(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 BP(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},HP={ReactCurrentDispatcher:dt,ReactCurrentBatchConfig:ic,ReactCurrentOwner:Bp};function O1(){throw Error("act(...) is not supported in production builds of React.")}ve.Children={map:hl,forEach:function(e,n,r){hl(e,function(){n.apply(this,arguments)},r)},count:function(e){var n=0;return hl(e,function(){n++}),n},toArray:function(e){return hl(e,function(n){return n})||[]},only:function(e){if(!Hp(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};ve.Component=Qi;ve.Fragment=jP;ve.Profiler=RP;ve.PureComponent=zp;ve.StrictMode=MP;ve.Suspense=OP;ve.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=HP;ve.act=O1;ve.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=j1({},e.props),i=e.key,s=e.ref,a=e._owner;if(n!=null){if(n.ref!==void 0&&(s=n.ref,a=Bp.current),n.key!==void 0&&(i=""+n.key),e.type&&e.type.defaultProps)var l=e.type.defaultProps;for(c in n)A1.call(n,c)&&!T1.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:Aa,type:e.type,key:i,ref:s,props:o,_owner:a}};ve.createContext=function(e){return e={$$typeof:TP,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:AP,_context:e},e.Consumer=e};ve.createElement=I1;ve.createFactory=function(e){var n=I1.bind(null,e);return n.type=e,n};ve.createRef=function(){return{current:null}};ve.forwardRef=function(e){return{$$typeof:IP,render:e}};ve.isValidElement=Hp;ve.lazy=function(e){return{$$typeof:DP,_payload:{_status:-1,_result:e},_init:BP}};ve.memo=function(e,n){return{$$typeof:$P,type:e,compare:n===void 0?null:n}};ve.startTransition=function(e){var n=ic.transition;ic.transition={};try{e()}finally{ic.transition=n}};ve.unstable_act=O1;ve.useCallback=function(e,n){return dt.current.useCallback(e,n)};ve.useContext=function(e){return dt.current.useContext(e)};ve.useDebugValue=function(){};ve.useDeferredValue=function(e){return dt.current.useDeferredValue(e)};ve.useEffect=function(e,n){return dt.current.useEffect(e,n)};ve.useId=function(){return dt.current.useId()};ve.useImperativeHandle=function(e,n,r){return dt.current.useImperativeHandle(e,n,r)};ve.useInsertionEffect=function(e,n){return dt.current.useInsertionEffect(e,n)};ve.useLayoutEffect=function(e,n){return dt.current.useLayoutEffect(e,n)};ve.useMemo=function(e,n){return dt.current.useMemo(e,n)};ve.useReducer=function(e,n,r){return dt.current.useReducer(e,n,r)};ve.useRef=function(e){return dt.current.useRef(e)};ve.useState=function(e){return dt.current.useState(e)};ve.useSyncExternalStore=function(e,n,r){return dt.current.useSyncExternalStore(e,n,r)};ve.useTransition=function(){return dt.current.useTransition()};ve.version="18.3.1";E1.exports=ve;var x=E1.exports;const ot=Au(x),Iu=EP({__proto__:null,default:ot},[x]);/**
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 UP=x,VP=Symbol.for("react.element"),WP=Symbol.for("react.fragment"),GP=Object.prototype.hasOwnProperty,YP=UP.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,XP={key:!0,ref:!0,__self:!0,__source:!0};function $1(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)GP.call(n,o)&&!XP.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:VP,type:e,key:s,ref:a,props:i,_owner:YP.current}}Tu.Fragment=WP;Tu.jsx=$1;Tu.jsxs=$1;N1.exports=Tu;var p=N1.exports,qf={},D1={exports:{}},Dt={},L1={exports:{}},z1={};/**
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 $=M.length;M.push(R);e:for(;0<$;){var V=$-1>>>1,O=M[V];if(0<i(O,R))M[V]=R,M[$]=O,$=V;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],$=M.pop();if($!==R){M[0]=$;e:for(var V=0,O=M.length,X=O>>>1;V<X;){var F=2*(V+1)-1,U=M[F],G=F+1,W=M[G];if(0>i(U,$))G<O&&0>i(W,U)?(M[V]=W,M[G]=$,V=G):(M[V]=U,M[F]=$,V=F);else if(G<O&&0>i(W,$))M[V]=W,M[G]=$,V=G;else break e}}return R}function i(M,R){var $=M.sortIndex-R.sortIndex;return $!==0?$: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,h=3,g=!1,v=!1,b=!1,_=typeof setTimeout=="function"?setTimeout:null,m=typeof clearTimeout=="function"?clearTimeout:null,w=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function y(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(b=!1,y(M),!v)if(r(c)!==null)v=!0,I(k);else{var R=r(u);R!==null&&z(S,R.startTime-M)}}function k(M,R){v=!1,b&&(b=!1,m(E),E=-1),g=!0;var $=h;try{for(y(R),d=r(c);d!==null&&(!(d.expirationTime>R)||M&&!T());){var V=d.callback;if(typeof V=="function"){d.callback=null,h=d.priorityLevel;var O=V(d.expirationTime<=R);R=e.unstable_now(),typeof O=="function"?d.callback=O:d===r(c)&&o(c),y(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,h=$,g=!1}}var C=!1,N=null,E=-1,P=5,A=-1;function T(){return!(e.unstable_now()-A<P)}function D(){if(N!==null){var M=e.unstable_now();A=M;var R=!0;try{R=N(!0,M)}finally{R?B():(C=!1,N=null)}}else C=!1}var B;if(typeof w=="function")B=function(){w(D)};else if(typeof MessageChannel<"u"){var j=new MessageChannel,L=j.port2;j.port1.onmessage=D,B=function(){L.postMessage(null)}}else B=function(){_(D,0)};function I(M){N=M,C||(C=!0,B())}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(k))},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 h},e.unstable_getFirstCallbackNode=function(){return r(c)},e.unstable_next=function(M){switch(h){case 1:case 2:case 3:var R=3;break;default:R=h}var $=h;h=R;try{return M()}finally{h=$}},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 $=h;h=M;try{return R()}finally{h=$}},e.unstable_scheduleCallback=function(M,R,$){var V=e.unstable_now();switch(typeof $=="object"&&$!==null?($=$.delay,$=typeof $=="number"&&0<$?V+$:V):$=V,M){case 1:var O=-1;break;case 2:O=250;break;case 5:O=1073741823;break;case 4:O=1e4;break;default:O=5e3}return O=$+O,M={id:f++,callback:R,priorityLevel:M,startTime:$,expirationTime:O,sortIndex:-1},$>V?(M.sortIndex=$,n(u,M),r(c)===null&&M===r(u)&&(b?(m(E),E=-1):b=!0,z(S,$-V))):(M.sortIndex=O,n(c,M),v||g||(v=!0,I(k))),M},e.unstable_shouldYield=T,e.unstable_wrapCallback=function(M){var R=h;return function(){var $=h;h=R;try{return M.apply(this,arguments)}finally{h=$}}}})(z1);L1.exports=z1;var KP=L1.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 qP=x,Ot=KP;function Z(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 F1=new Set,Js={};function Lo(e,n){Mi(e,n),Mi(e+"Capture",n)}function Mi(e,n){for(Js[e]=n,e=0;e<n.length;e++)F1.add(n[e])}var er=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Qf=Object.prototype.hasOwnProperty,QP=/^[: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]*$/,y0={},x0={};function ZP(e){return Qf.call(x0,e)?!0:Qf.call(y0,e)?!1:QP.test(e)?x0[e]=!0:(y0[e]=!0,!1)}function JP(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 ej(e,n,r,o){if(n===null||typeof n>"u"||JP(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 Up=/[\-:]([a-z])/g;function Vp(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(Up,Vp);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(Up,Vp);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(Up,Vp);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 Wp(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")&&(ej(n,r,i,o)&&(r=null),o||i===null?ZP(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 ar=qP.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,pl=Symbol.for("react.element"),ii=Symbol.for("react.portal"),si=Symbol.for("react.fragment"),Gp=Symbol.for("react.strict_mode"),Zf=Symbol.for("react.profiler"),B1=Symbol.for("react.provider"),H1=Symbol.for("react.context"),Yp=Symbol.for("react.forward_ref"),Jf=Symbol.for("react.suspense"),eh=Symbol.for("react.suspense_list"),Xp=Symbol.for("react.memo"),_r=Symbol.for("react.lazy"),U1=Symbol.for("react.offscreen"),w0=Symbol.iterator;function cs(e){return e===null||typeof e!="object"?null:(e=w0&&e[w0]||e["@@iterator"],typeof e=="function"?e:null)}var Le=Object.assign,Vd;function Ps(e){if(Vd===void 0)try{throw Error()}catch(r){var n=r.stack.trim().match(/\n( *(at )?)/);Vd=n&&n[1]||""}return`
34
- `+Vd+e}var Wd=!1;function Gd(e,n){if(!e||Wd)return"";Wd=!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{Wd=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?Ps(e):""}function tj(e){switch(e.tag){case 5:return Ps(e.type);case 16:return Ps("Lazy");case 13:return Ps("Suspense");case 19:return Ps("SuspenseList");case 0:case 2:case 15:return e=Gd(e.type,!1),e;case 11:return e=Gd(e.type.render,!1),e;case 1:return e=Gd(e.type,!0),e;default:return""}}function th(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 si:return"Fragment";case ii:return"Portal";case Zf:return"Profiler";case Gp:return"StrictMode";case Jf:return"Suspense";case eh:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case H1:return(e.displayName||"Context")+".Consumer";case B1:return(e._context.displayName||"Context")+".Provider";case Yp:var n=e.render;return e=e.displayName,e||(e=n.displayName||n.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Xp:return n=e.displayName||null,n!==null?n:th(e.type)||"Memo";case _r:n=e._payload,e=e._init;try{return th(e(n))}catch{}}return null}function nj(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 th(n);case 8:return n===Gp?"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 Hr(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function V1(e){var n=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(n==="checkbox"||n==="radio")}function rj(e){var n=V1(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=rj(e))}function W1(e){if(!e)return!1;var n=e._valueTracker;if(!n)return!0;var r=n.getValue(),o="";return e&&(o=V1(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 nh(e,n){var r=n.checked;return Le({},n,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function b0(e,n){var r=n.defaultValue==null?"":n.defaultValue,o=n.checked!=null?n.checked:n.defaultChecked;r=Hr(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 G1(e,n){n=n.checked,n!=null&&Wp(e,"checked",n,!1)}function rh(e,n){G1(e,n);var r=Hr(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")?oh(e,n.type,r):n.hasOwnProperty("defaultValue")&&oh(e,n.type,Hr(n.defaultValue)),n.checked==null&&n.defaultChecked!=null&&(e.defaultChecked=!!n.defaultChecked)}function _0(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 oh(e,n,r){(n!=="number"||Ec(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var js=Array.isArray;function xi(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=""+Hr(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 ih(e,n){if(n.dangerouslySetInnerHTML!=null)throw Error(Z(91));return Le({},n,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function S0(e,n){var r=n.value;if(r==null){if(r=n.children,n=n.defaultValue,r!=null){if(n!=null)throw Error(Z(92));if(js(r)){if(1<r.length)throw Error(Z(93));r=r[0]}n=r}n==null&&(n=""),r=n}e._wrapperState={initialValue:Hr(r)}}function Y1(e,n){var r=Hr(n.value),o=Hr(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 k0(e){var n=e.textContent;n===e._wrapperState.initialValue&&n!==""&&n!==null&&(e.value=n)}function X1(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 sh(e,n){return e==null||e==="http://www.w3.org/1999/xhtml"?X1(n):e==="http://www.w3.org/2000/svg"&&n==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var gl,K1=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 ea(e,n){if(n){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=n;return}}e.textContent=n}var Ls={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},oj=["Webkit","ms","Moz","O"];Object.keys(Ls).forEach(function(e){oj.forEach(function(n){n=n+e.charAt(0).toUpperCase()+e.substring(1),Ls[n]=Ls[e]})});function q1(e,n,r){return n==null||typeof n=="boolean"||n===""?"":r||typeof n!="number"||n===0||Ls.hasOwnProperty(e)&&Ls[e]?(""+n).trim():n+"px"}function Q1(e,n){e=e.style;for(var r in n)if(n.hasOwnProperty(r)){var o=r.indexOf("--")===0,i=q1(r,n[r],o);r==="float"&&(r="cssFloat"),o?e.setProperty(r,i):e[r]=i}}var ij=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 ah(e,n){if(n){if(ij[e]&&(n.children!=null||n.dangerouslySetInnerHTML!=null))throw Error(Z(137,e));if(n.dangerouslySetInnerHTML!=null){if(n.children!=null)throw Error(Z(60));if(typeof n.dangerouslySetInnerHTML!="object"||!("__html"in n.dangerouslySetInnerHTML))throw Error(Z(61))}if(n.style!=null&&typeof n.style!="object")throw Error(Z(62))}}function lh(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 ch=null;function Kp(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var uh=null,wi=null,bi=null;function C0(e){if(e=Oa(e)){if(typeof uh!="function")throw Error(Z(280));var n=e.stateNode;n&&(n=zu(n),uh(e.stateNode,e.type,n))}}function Z1(e){wi?bi?bi.push(e):bi=[e]:wi=e}function J1(){if(wi){var e=wi,n=bi;if(bi=wi=null,C0(e),n)for(e=0;e<n.length;e++)C0(n[e])}}function ew(e,n){return e(n)}function tw(){}var Yd=!1;function nw(e,n,r){if(Yd)return e(n,r);Yd=!0;try{return ew(e,n,r)}finally{Yd=!1,(wi!==null||bi!==null)&&(tw(),J1())}}function ta(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(Z(231,n,typeof r));return r}var dh=!1;if(er)try{var us={};Object.defineProperty(us,"passive",{get:function(){dh=!0}}),window.addEventListener("test",us,us),window.removeEventListener("test",us,us)}catch{dh=!1}function sj(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 zs=!1,Pc=null,jc=!1,fh=null,aj={onError:function(e){zs=!0,Pc=e}};function lj(e,n,r,o,i,s,a,l,c){zs=!1,Pc=null,sj.apply(aj,arguments)}function cj(e,n,r,o,i,s,a,l,c){if(lj.apply(this,arguments),zs){if(zs){var u=Pc;zs=!1,Pc=null}else throw Error(Z(198));jc||(jc=!0,fh=u)}}function zo(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 rw(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 N0(e){if(zo(e)!==e)throw Error(Z(188))}function uj(e){var n=e.alternate;if(!n){if(n=zo(e),n===null)throw Error(Z(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 N0(i),e;if(s===o)return N0(i),n;s=s.sibling}throw Error(Z(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(Z(189))}}if(r.alternate!==o)throw Error(Z(190))}if(r.tag!==3)throw Error(Z(188));return r.stateNode.current===r?e:n}function ow(e){return e=uj(e),e!==null?iw(e):null}function iw(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var n=iw(e);if(n!==null)return n;e=e.sibling}return null}var sw=Ot.unstable_scheduleCallback,E0=Ot.unstable_cancelCallback,dj=Ot.unstable_shouldYield,fj=Ot.unstable_requestPaint,Fe=Ot.unstable_now,hj=Ot.unstable_getCurrentPriorityLevel,qp=Ot.unstable_ImmediatePriority,aw=Ot.unstable_UserBlockingPriority,Mc=Ot.unstable_NormalPriority,pj=Ot.unstable_LowPriority,lw=Ot.unstable_IdlePriority,Ou=null,Pn=null;function mj(e){if(Pn&&typeof Pn.onCommitFiberRoot=="function")try{Pn.onCommitFiberRoot(Ou,e,void 0,(e.current.flags&128)===128)}catch{}}var fn=Math.clz32?Math.clz32:yj,gj=Math.log,vj=Math.LN2;function yj(e){return e>>>=0,e===0?32:31-(gj(e)/vj|0)|0}var vl=64,yl=4194304;function Ms(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=Ms(l):(s&=a,s!==0&&(o=Ms(s)))}else a=r&~i,a!==0?o=Ms(a):s!==0&&(o=Ms(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 xj(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 wj(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]=xj(l,n)):c<=n&&(e.expiredLanes|=l),s&=~l}}function hh(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function cw(){var e=vl;return vl<<=1,!(vl&4194240)&&(vl=64),e}function Xd(e){for(var n=[],r=0;31>r;r++)n.push(e);return n}function Ta(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 bj(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 Qp(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 Se=0;function uw(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var dw,Zp,fw,hw,pw,ph=!1,xl=[],Rr=null,Ar=null,Tr=null,na=new Map,ra=new Map,Cr=[],_j="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 P0(e,n){switch(e){case"focusin":case"focusout":Rr=null;break;case"dragenter":case"dragleave":Ar=null;break;case"mouseover":case"mouseout":Tr=null;break;case"pointerover":case"pointerout":na.delete(n.pointerId);break;case"gotpointercapture":case"lostpointercapture":ra.delete(n.pointerId)}}function ds(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=Oa(n),n!==null&&Zp(n)),e):(e.eventSystemFlags|=o,n=e.targetContainers,i!==null&&n.indexOf(i)===-1&&n.push(i),e)}function Sj(e,n,r,o,i){switch(n){case"focusin":return Rr=ds(Rr,e,n,r,o,i),!0;case"dragenter":return Ar=ds(Ar,e,n,r,o,i),!0;case"mouseover":return Tr=ds(Tr,e,n,r,o,i),!0;case"pointerover":var s=i.pointerId;return na.set(s,ds(na.get(s)||null,e,n,r,o,i)),!0;case"gotpointercapture":return s=i.pointerId,ra.set(s,ds(ra.get(s)||null,e,n,r,o,i)),!0}return!1}function mw(e){var n=po(e.target);if(n!==null){var r=zo(n);if(r!==null){if(n=r.tag,n===13){if(n=rw(r),n!==null){e.blockedOn=n,pw(e.priority,function(){fw(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=mh(e.domEventName,e.eventSystemFlags,n[0],e.nativeEvent);if(r===null){r=e.nativeEvent;var o=new r.constructor(r.type,r);ch=o,r.target.dispatchEvent(o),ch=null}else return n=Oa(r),n!==null&&Zp(n),e.blockedOn=r,!1;n.shift()}return!0}function j0(e,n,r){sc(e)&&r.delete(n)}function kj(){ph=!1,Rr!==null&&sc(Rr)&&(Rr=null),Ar!==null&&sc(Ar)&&(Ar=null),Tr!==null&&sc(Tr)&&(Tr=null),na.forEach(j0),ra.forEach(j0)}function fs(e,n){e.blockedOn===n&&(e.blockedOn=null,ph||(ph=!0,Ot.unstable_scheduleCallback(Ot.unstable_NormalPriority,kj)))}function oa(e){function n(i){return fs(i,e)}if(0<xl.length){fs(xl[0],e);for(var r=1;r<xl.length;r++){var o=xl[r];o.blockedOn===e&&(o.blockedOn=null)}}for(Rr!==null&&fs(Rr,e),Ar!==null&&fs(Ar,e),Tr!==null&&fs(Tr,e),na.forEach(n),ra.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);)mw(r),r.blockedOn===null&&Cr.shift()}var _i=ar.ReactCurrentBatchConfig,Ac=!0;function Cj(e,n,r,o){var i=Se,s=_i.transition;_i.transition=null;try{Se=1,Jp(e,n,r,o)}finally{Se=i,_i.transition=s}}function Nj(e,n,r,o){var i=Se,s=_i.transition;_i.transition=null;try{Se=4,Jp(e,n,r,o)}finally{Se=i,_i.transition=s}}function Jp(e,n,r,o){if(Ac){var i=mh(e,n,r,o);if(i===null)of(e,n,o,Tc,r),P0(e,o);else if(Sj(i,e,n,r,o))o.stopPropagation();else if(P0(e,o),n&4&&-1<_j.indexOf(e)){for(;i!==null;){var s=Oa(i);if(s!==null&&dw(s),s=mh(e,n,r,o),s===null&&of(e,n,o,Tc,r),s===i)break;i=s}i!==null&&o.stopPropagation()}else of(e,n,o,null,r)}}var Tc=null;function mh(e,n,r,o){if(Tc=null,e=Kp(o),e=po(e),e!==null)if(n=zo(e),n===null)e=null;else if(r=n.tag,r===13){if(e=rw(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 gw(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(hj()){case qp:return 1;case aw:return 4;case Mc:case pj:return 16;case lw:return 536870912;default:return 16}default:return 16}}var Pr=null,em=null,ac=null;function vw(){if(ac)return ac;var e,n=em,r=n.length,o,i="value"in Pr?Pr.value:Pr.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 M0(){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:M0,this.isPropagationStopped=M0,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},tm=Lt(Zi),Ia=Le({},Zi,{view:0,detail:0}),Ej=Lt(Ia),Kd,qd,hs,$u=Le({},Ia,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:nm,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!==hs&&(hs&&e.type==="mousemove"?(Kd=e.screenX-hs.screenX,qd=e.screenY-hs.screenY):qd=Kd=0,hs=e),Kd)},movementY:function(e){return"movementY"in e?e.movementY:qd}}),R0=Lt($u),Pj=Le({},$u,{dataTransfer:0}),jj=Lt(Pj),Mj=Le({},Ia,{relatedTarget:0}),Qd=Lt(Mj),Rj=Le({},Zi,{animationName:0,elapsedTime:0,pseudoElement:0}),Aj=Lt(Rj),Tj=Le({},Zi,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Ij=Lt(Tj),Oj=Le({},Zi,{data:0}),A0=Lt(Oj),$j={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Dj={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"},Lj={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function zj(e){var n=this.nativeEvent;return n.getModifierState?n.getModifierState(e):(e=Lj[e])?!!n[e]:!1}function nm(){return zj}var Fj=Le({},Ia,{key:function(e){if(e.key){var n=$j[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"?Dj[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:nm,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}}),Bj=Lt(Fj),Hj=Le({},$u,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),T0=Lt(Hj),Uj=Le({},Ia,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:nm}),Vj=Lt(Uj),Wj=Le({},Zi,{propertyName:0,elapsedTime:0,pseudoElement:0}),Gj=Lt(Wj),Yj=Le({},$u,{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}),Xj=Lt(Yj),Kj=[9,13,27,32],rm=er&&"CompositionEvent"in window,Fs=null;er&&"documentMode"in document&&(Fs=document.documentMode);var qj=er&&"TextEvent"in window&&!Fs,yw=er&&(!rm||Fs&&8<Fs&&11>=Fs),I0=" ",O0=!1;function xw(e,n){switch(e){case"keyup":return Kj.indexOf(n.keyCode)!==-1;case"keydown":return n.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function ww(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var ai=!1;function Qj(e,n){switch(e){case"compositionend":return ww(n);case"keypress":return n.which!==32?null:(O0=!0,I0);case"textInput":return e=n.data,e===I0&&O0?null:e;default:return null}}function Zj(e,n){if(ai)return e==="compositionend"||!rm&&xw(e,n)?(e=vw(),ac=em=Pr=null,ai=!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 yw&&n.locale!=="ko"?null:n.data;default:return null}}var Jj={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 $0(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n==="input"?!!Jj[e.type]:n==="textarea"}function bw(e,n,r,o){Z1(o),n=Ic(n,"onChange"),0<n.length&&(r=new tm("onChange","change",null,r,o),e.push({event:r,listeners:n}))}var Bs=null,ia=null;function eM(e){Aw(e,0)}function Du(e){var n=ui(e);if(W1(n))return e}function tM(e,n){if(e==="change")return n}var _w=!1;if(er){var Zd;if(er){var Jd="oninput"in document;if(!Jd){var D0=document.createElement("div");D0.setAttribute("oninput","return;"),Jd=typeof D0.oninput=="function"}Zd=Jd}else Zd=!1;_w=Zd&&(!document.documentMode||9<document.documentMode)}function L0(){Bs&&(Bs.detachEvent("onpropertychange",Sw),ia=Bs=null)}function Sw(e){if(e.propertyName==="value"&&Du(ia)){var n=[];bw(n,ia,e,Kp(e)),nw(eM,n)}}function nM(e,n,r){e==="focusin"?(L0(),Bs=n,ia=r,Bs.attachEvent("onpropertychange",Sw)):e==="focusout"&&L0()}function rM(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Du(ia)}function oM(e,n){if(e==="click")return Du(n)}function iM(e,n){if(e==="input"||e==="change")return Du(n)}function sM(e,n){return e===n&&(e!==0||1/e===1/n)||e!==e&&n!==n}var pn=typeof Object.is=="function"?Object.is:sM;function sa(e,n){if(pn(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)||!pn(e[i],n[i]))return!1}return!0}function z0(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function F0(e,n){var r=z0(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=z0(r)}}function kw(e,n){return e&&n?e===n?!0:e&&e.nodeType===3?!1:n&&n.nodeType===3?kw(e,n.parentNode):"contains"in e?e.contains(n):e.compareDocumentPosition?!!(e.compareDocumentPosition(n)&16):!1:!1}function Cw(){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 om(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 aM(e){var n=Cw(),r=e.focusedElem,o=e.selectionRange;if(n!==r&&r&&r.ownerDocument&&kw(r.ownerDocument.documentElement,r)){if(o!==null&&om(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=F0(r,s);var a=F0(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 lM=er&&"documentMode"in document&&11>=document.documentMode,li=null,gh=null,Hs=null,vh=!1;function B0(e,n,r){var o=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;vh||li==null||li!==Ec(o)||(o=li,"selectionStart"in o&&om(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}),Hs&&sa(Hs,o)||(Hs=o,o=Ic(gh,"onSelect"),0<o.length&&(n=new tm("onSelect","select",null,n,r),e.push({event:n,listeners:o}),n.target=li)))}function bl(e,n){var r={};return r[e.toLowerCase()]=n.toLowerCase(),r["Webkit"+e]="webkit"+n,r["Moz"+e]="moz"+n,r}var ci={animationend:bl("Animation","AnimationEnd"),animationiteration:bl("Animation","AnimationIteration"),animationstart:bl("Animation","AnimationStart"),transitionend:bl("Transition","TransitionEnd")},ef={},Nw={};er&&(Nw=document.createElement("div").style,"AnimationEvent"in window||(delete ci.animationend.animation,delete ci.animationiteration.animation,delete ci.animationstart.animation),"TransitionEvent"in window||delete ci.transitionend.transition);function Lu(e){if(ef[e])return ef[e];if(!ci[e])return e;var n=ci[e],r;for(r in n)if(n.hasOwnProperty(r)&&r in Nw)return ef[e]=n[r];return e}var Ew=Lu("animationend"),Pw=Lu("animationiteration"),jw=Lu("animationstart"),Mw=Lu("transitionend"),Rw=new Map,H0="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 Xr(e,n){Rw.set(e,n),Lo(n,[e])}for(var tf=0;tf<H0.length;tf++){var nf=H0[tf],cM=nf.toLowerCase(),uM=nf[0].toUpperCase()+nf.slice(1);Xr(cM,"on"+uM)}Xr(Ew,"onAnimationEnd");Xr(Pw,"onAnimationIteration");Xr(jw,"onAnimationStart");Xr("dblclick","onDoubleClick");Xr("focusin","onFocus");Xr("focusout","onBlur");Xr(Mw,"onTransitionEnd");Mi("onMouseEnter",["mouseout","mouseover"]);Mi("onMouseLeave",["mouseout","mouseover"]);Mi("onPointerEnter",["pointerout","pointerover"]);Mi("onPointerLeave",["pointerout","pointerover"]);Lo("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Lo("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Lo("onBeforeInput",["compositionend","keypress","textInput","paste"]);Lo("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Lo("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Lo("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Rs="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(" "),dM=new Set("cancel close invalid load scroll toggle".split(" ").concat(Rs));function U0(e,n,r){var o=e.type||"unknown-event";e.currentTarget=r,cj(o,n,void 0,e),e.currentTarget=null}function Aw(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=fh,jc=!1,fh=null,e}function Ee(e,n){var r=n[_h];r===void 0&&(r=n[_h]=new Set);var o=e+"__bubble";r.has(o)||(Tw(n,e,2,!1),r.add(o))}function rf(e,n,r){var o=0;n&&(o|=4),Tw(r,e,o,n)}var _l="_reactListening"+Math.random().toString(36).slice(2);function aa(e){if(!e[_l]){e[_l]=!0,F1.forEach(function(r){r!=="selectionchange"&&(dM.has(r)||rf(r,!1,e),rf(r,!0,e))});var n=e.nodeType===9?e:e.ownerDocument;n===null||n[_l]||(n[_l]=!0,rf("selectionchange",!1,n))}}function Tw(e,n,r,o){switch(gw(n)){case 1:var i=Cj;break;case 4:i=Nj;break;default:i=Jp}r=i.bind(null,n,r,e),i=void 0,!dh||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 of(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}nw(function(){var u=s,f=Kp(r),d=[];e:{var h=Rw.get(e);if(h!==void 0){var g=tm,v=e;switch(e){case"keypress":if(lc(r)===0)break e;case"keydown":case"keyup":g=Bj;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=R0;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":g=jj;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":g=Vj;break;case Ew:case Pw:case jw:g=Aj;break;case Mw:g=Gj;break;case"scroll":g=Ej;break;case"wheel":g=Xj;break;case"copy":case"cut":case"paste":g=Ij;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":g=T0}var b=(n&4)!==0,_=!b&&e==="scroll",m=b?h!==null?h+"Capture":null:h;b=[];for(var w=u,y;w!==null;){y=w;var S=y.stateNode;if(y.tag===5&&S!==null&&(y=S,m!==null&&(S=ta(w,m),S!=null&&b.push(la(w,S,y)))),_)break;w=w.return}0<b.length&&(h=new g(h,v,null,r,f),d.push({event:h,listeners:b}))}}if(!(n&7)){e:{if(h=e==="mouseover"||e==="pointerover",g=e==="mouseout"||e==="pointerout",h&&r!==ch&&(v=r.relatedTarget||r.fromElement)&&(po(v)||v[tr]))break e;if((g||h)&&(h=f.window===f?f:(h=f.ownerDocument)?h.defaultView||h.parentWindow:window,g?(v=r.relatedTarget||r.toElement,g=u,v=v?po(v):null,v!==null&&(_=zo(v),v!==_||v.tag!==5&&v.tag!==6)&&(v=null)):(g=null,v=u),g!==v)){if(b=R0,S="onMouseLeave",m="onMouseEnter",w="mouse",(e==="pointerout"||e==="pointerover")&&(b=T0,S="onPointerLeave",m="onPointerEnter",w="pointer"),_=g==null?h:ui(g),y=v==null?h:ui(v),h=new b(S,w+"leave",g,r,f),h.target=_,h.relatedTarget=y,S=null,po(f)===u&&(b=new b(m,w+"enter",v,r,f),b.target=y,b.relatedTarget=_,S=b),_=S,g&&v)t:{for(b=g,m=v,w=0,y=b;y;y=Yo(y))w++;for(y=0,S=m;S;S=Yo(S))y++;for(;0<w-y;)b=Yo(b),w--;for(;0<y-w;)m=Yo(m),y--;for(;w--;){if(b===m||m!==null&&b===m.alternate)break t;b=Yo(b),m=Yo(m)}b=null}else b=null;g!==null&&V0(d,h,g,b,!1),v!==null&&_!==null&&V0(d,_,v,b,!0)}}e:{if(h=u?ui(u):window,g=h.nodeName&&h.nodeName.toLowerCase(),g==="select"||g==="input"&&h.type==="file")var k=tM;else if($0(h))if(_w)k=iM;else{k=rM;var C=nM}else(g=h.nodeName)&&g.toLowerCase()==="input"&&(h.type==="checkbox"||h.type==="radio")&&(k=oM);if(k&&(k=k(e,u))){bw(d,k,r,f);break e}C&&C(e,h,u),e==="focusout"&&(C=h._wrapperState)&&C.controlled&&h.type==="number"&&oh(h,"number",h.value)}switch(C=u?ui(u):window,e){case"focusin":($0(C)||C.contentEditable==="true")&&(li=C,gh=u,Hs=null);break;case"focusout":Hs=gh=li=null;break;case"mousedown":vh=!0;break;case"contextmenu":case"mouseup":case"dragend":vh=!1,B0(d,r,f);break;case"selectionchange":if(lM)break;case"keydown":case"keyup":B0(d,r,f)}var N;if(rm)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 ai?xw(e,r)&&(E="onCompositionEnd"):e==="keydown"&&r.keyCode===229&&(E="onCompositionStart");E&&(yw&&r.locale!=="ko"&&(ai||E!=="onCompositionStart"?E==="onCompositionEnd"&&ai&&(N=vw()):(Pr=f,em="value"in Pr?Pr.value:Pr.textContent,ai=!0)),C=Ic(u,E),0<C.length&&(E=new A0(E,e,null,r,f),d.push({event:E,listeners:C}),N?E.data=N:(N=ww(r),N!==null&&(E.data=N)))),(N=qj?Qj(e,r):Zj(e,r))&&(u=Ic(u,"onBeforeInput"),0<u.length&&(f=new A0("onBeforeInput","beforeinput",null,r,f),d.push({event:f,listeners:u}),f.data=N))}Aw(d,n)})}function la(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=ta(e,r),s!=null&&o.unshift(la(e,s,i)),s=ta(e,n),s!=null&&o.push(la(e,s,i))),e=e.return}return o}function Yo(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function V0(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=ta(r,s),c!=null&&a.unshift(la(r,c,l))):i||(c=ta(r,s),c!=null&&a.push(la(r,c,l)))),r=r.return}a.length!==0&&e.push({event:n,listeners:a})}var fM=/\r\n?/g,hM=/\u0000|\uFFFD/g;function W0(e){return(typeof e=="string"?e:""+e).replace(fM,`
38
- `).replace(hM,"")}function Sl(e,n,r){if(n=W0(n),W0(e)!==n&&r)throw Error(Z(425))}function Oc(){}var yh=null,xh=null;function wh(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 bh=typeof setTimeout=="function"?setTimeout:void 0,pM=typeof clearTimeout=="function"?clearTimeout:void 0,G0=typeof Promise=="function"?Promise:void 0,mM=typeof queueMicrotask=="function"?queueMicrotask:typeof G0<"u"?function(e){return G0.resolve(null).then(e).catch(gM)}:bh;function gM(e){setTimeout(function(){throw e})}function sf(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),oa(n);return}o--}else r!=="$"&&r!=="$?"&&r!=="$!"||o++;r=i}while(r);oa(n)}function Ir(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 Y0(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 Ji=Math.random().toString(36).slice(2),kn="__reactFiber$"+Ji,ca="__reactProps$"+Ji,tr="__reactContainer$"+Ji,_h="__reactEvents$"+Ji,vM="__reactListeners$"+Ji,yM="__reactHandles$"+Ji;function po(e){var n=e[kn];if(n)return n;for(var r=e.parentNode;r;){if(n=r[tr]||r[kn]){if(r=n.alternate,n.child!==null||r!==null&&r.child!==null)for(e=Y0(e);e!==null;){if(r=e[kn])return r;e=Y0(e)}return n}e=r,r=e.parentNode}return null}function Oa(e){return e=e[kn]||e[tr],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function ui(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(Z(33))}function zu(e){return e[ca]||null}var Sh=[],di=-1;function Kr(e){return{current:e}}function je(e){0>di||(e.current=Sh[di],Sh[di]=null,di--)}function Ce(e,n){di++,Sh[di]=e.current,e.current=n}var Ur={},at=Kr(Ur),xt=Kr(!1),ko=Ur;function Ri(e,n){var r=e.type.contextTypes;if(!r)return Ur;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 $c(){je(xt),je(at)}function X0(e,n,r){if(at.current!==Ur)throw Error(Z(168));Ce(at,n),Ce(xt,r)}function Iw(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(Z(108,nj(e)||"Unknown",i));return Le({},r,o)}function Dc(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Ur,ko=at.current,Ce(at,e),Ce(xt,xt.current),!0}function K0(e,n,r){var o=e.stateNode;if(!o)throw Error(Z(169));r?(e=Iw(e,n,ko),o.__reactInternalMemoizedMergedChildContext=e,je(xt),je(at),Ce(at,e)):je(xt),Ce(xt,r)}var Wn=null,Fu=!1,af=!1;function Ow(e){Wn===null?Wn=[e]:Wn.push(e)}function xM(e){Fu=!0,Ow(e)}function qr(){if(!af&&Wn!==null){af=!0;var e=0,n=Se;try{var r=Wn;for(Se=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)),sw(qp,qr),i}finally{Se=n,af=!1}}return null}var fi=[],hi=0,Lc=null,zc=0,Vt=[],Wt=0,Co=null,Yn=1,Xn="";function uo(e,n){fi[hi++]=zc,fi[hi++]=Lc,Lc=e,zc=n}function $w(e,n,r){Vt[Wt++]=Yn,Vt[Wt++]=Xn,Vt[Wt++]=Co,Co=e;var o=Yn;e=Xn;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,Yn=1<<32-fn(n)+i|r<<i|o,Xn=s+e}else Yn=1<<s|r<<i|o,Xn=e}function im(e){e.return!==null&&(uo(e,1),$w(e,1,0))}function sm(e){for(;e===Lc;)Lc=fi[--hi],fi[hi]=null,zc=fi[--hi],fi[hi]=null;for(;e===Co;)Co=Vt[--Wt],Vt[Wt]=null,Xn=Vt[--Wt],Vt[Wt]=null,Yn=Vt[--Wt],Vt[Wt]=null}var At=null,Rt=null,Re=!1,an=null;function Dw(e,n){var r=Yt(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=Ir(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:Yn,overflow:Xn}:null,e.memoizedState={dehydrated:n,treeContext:r,retryLane:1073741824},r=Yt(18,null,null,0),r.stateNode=n,r.return=e,e.child=r,At=e,Rt=null,!0):!1;default:return!1}}function kh(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Ch(e){if(Re){var n=Rt;if(n){var r=n;if(!q0(e,n)){if(kh(e))throw Error(Z(418));n=Ir(r.nextSibling);var o=At;n&&q0(e,n)?Dw(o,r):(e.flags=e.flags&-4097|2,Re=!1,At=e)}}else{if(kh(e))throw Error(Z(418));e.flags=e.flags&-4097|2,Re=!1,At=e}}}function Q0(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;At=e}function kl(e){if(e!==At)return!1;if(!Re)return Q0(e),Re=!0,!1;var n;if((n=e.tag!==3)&&!(n=e.tag!==5)&&(n=e.type,n=n!=="head"&&n!=="body"&&!wh(e.type,e.memoizedProps)),n&&(n=Rt)){if(kh(e))throw Lw(),Error(Z(418));for(;n;)Dw(e,n),n=Ir(n.nextSibling)}if(Q0(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(Z(317));e:{for(e=e.nextSibling,n=0;e;){if(e.nodeType===8){var r=e.data;if(r==="/$"){if(n===0){Rt=Ir(e.nextSibling);break e}n--}else r!=="$"&&r!=="$!"&&r!=="$?"||n++}e=e.nextSibling}Rt=null}}else Rt=At?Ir(e.stateNode.nextSibling):null;return!0}function Lw(){for(var e=Rt;e;)e=Ir(e.nextSibling)}function Ai(){Rt=At=null,Re=!1}function am(e){an===null?an=[e]:an.push(e)}var wM=ar.ReactCurrentBatchConfig;function ps(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(Z(309));var o=r.stateNode}if(!o)throw Error(Z(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(Z(284));if(!r._owner)throw Error(Z(290,e))}return e}function Cl(e,n){throw e=Object.prototype.toString.call(n),Error(Z(31,e==="[object Object]"?"object with keys {"+Object.keys(n).join(", ")+"}":e))}function Z0(e){var n=e._init;return n(e._payload)}function zw(e){function n(m,w){if(e){var y=m.deletions;y===null?(m.deletions=[w],m.flags|=16):y.push(w)}}function r(m,w){if(!e)return null;for(;w!==null;)n(m,w),w=w.sibling;return null}function o(m,w){for(m=new Map;w!==null;)w.key!==null?m.set(w.key,w):m.set(w.index,w),w=w.sibling;return m}function i(m,w){return m=Lr(m,w),m.index=0,m.sibling=null,m}function s(m,w,y){return m.index=y,e?(y=m.alternate,y!==null?(y=y.index,y<w?(m.flags|=2,w):y):(m.flags|=2,w)):(m.flags|=1048576,w)}function a(m){return e&&m.alternate===null&&(m.flags|=2),m}function l(m,w,y,S){return w===null||w.tag!==6?(w=pf(y,m.mode,S),w.return=m,w):(w=i(w,y),w.return=m,w)}function c(m,w,y,S){var k=y.type;return k===si?f(m,w,y.props.children,S,y.key):w!==null&&(w.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===_r&&Z0(k)===w.type)?(S=i(w,y.props),S.ref=ps(m,w,y),S.return=m,S):(S=mc(y.type,y.key,y.props,null,m.mode,S),S.ref=ps(m,w,y),S.return=m,S)}function u(m,w,y,S){return w===null||w.tag!==4||w.stateNode.containerInfo!==y.containerInfo||w.stateNode.implementation!==y.implementation?(w=mf(y,m.mode,S),w.return=m,w):(w=i(w,y.children||[]),w.return=m,w)}function f(m,w,y,S,k){return w===null||w.tag!==7?(w=wo(y,m.mode,S,k),w.return=m,w):(w=i(w,y),w.return=m,w)}function d(m,w,y){if(typeof w=="string"&&w!==""||typeof w=="number")return w=pf(""+w,m.mode,y),w.return=m,w;if(typeof w=="object"&&w!==null){switch(w.$$typeof){case pl:return y=mc(w.type,w.key,w.props,null,m.mode,y),y.ref=ps(m,null,w),y.return=m,y;case ii:return w=mf(w,m.mode,y),w.return=m,w;case _r:var S=w._init;return d(m,S(w._payload),y)}if(js(w)||cs(w))return w=wo(w,m.mode,y,null),w.return=m,w;Cl(m,w)}return null}function h(m,w,y,S){var k=w!==null?w.key:null;if(typeof y=="string"&&y!==""||typeof y=="number")return k!==null?null:l(m,w,""+y,S);if(typeof y=="object"&&y!==null){switch(y.$$typeof){case pl:return y.key===k?c(m,w,y,S):null;case ii:return y.key===k?u(m,w,y,S):null;case _r:return k=y._init,h(m,w,k(y._payload),S)}if(js(y)||cs(y))return k!==null?null:f(m,w,y,S,null);Cl(m,y)}return null}function g(m,w,y,S,k){if(typeof S=="string"&&S!==""||typeof S=="number")return m=m.get(y)||null,l(w,m,""+S,k);if(typeof S=="object"&&S!==null){switch(S.$$typeof){case pl:return m=m.get(S.key===null?y:S.key)||null,c(w,m,S,k);case ii:return m=m.get(S.key===null?y:S.key)||null,u(w,m,S,k);case _r:var C=S._init;return g(m,w,y,C(S._payload),k)}if(js(S)||cs(S))return m=m.get(y)||null,f(w,m,S,k,null);Cl(w,S)}return null}function v(m,w,y,S){for(var k=null,C=null,N=w,E=w=0,P=null;N!==null&&E<y.length;E++){N.index>E?(P=N,N=null):P=N.sibling;var A=h(m,N,y[E],S);if(A===null){N===null&&(N=P);break}e&&N&&A.alternate===null&&n(m,N),w=s(A,w,E),C===null?k=A:C.sibling=A,C=A,N=P}if(E===y.length)return r(m,N),Re&&uo(m,E),k;if(N===null){for(;E<y.length;E++)N=d(m,y[E],S),N!==null&&(w=s(N,w,E),C===null?k=N:C.sibling=N,C=N);return Re&&uo(m,E),k}for(N=o(m,N);E<y.length;E++)P=g(N,m,E,y[E],S),P!==null&&(e&&P.alternate!==null&&N.delete(P.key===null?E:P.key),w=s(P,w,E),C===null?k=P:C.sibling=P,C=P);return e&&N.forEach(function(T){return n(m,T)}),Re&&uo(m,E),k}function b(m,w,y,S){var k=cs(y);if(typeof k!="function")throw Error(Z(150));if(y=k.call(y),y==null)throw Error(Z(151));for(var C=k=null,N=w,E=w=0,P=null,A=y.next();N!==null&&!A.done;E++,A=y.next()){N.index>E?(P=N,N=null):P=N.sibling;var T=h(m,N,A.value,S);if(T===null){N===null&&(N=P);break}e&&N&&T.alternate===null&&n(m,N),w=s(T,w,E),C===null?k=T:C.sibling=T,C=T,N=P}if(A.done)return r(m,N),Re&&uo(m,E),k;if(N===null){for(;!A.done;E++,A=y.next())A=d(m,A.value,S),A!==null&&(w=s(A,w,E),C===null?k=A:C.sibling=A,C=A);return Re&&uo(m,E),k}for(N=o(m,N);!A.done;E++,A=y.next())A=g(N,m,E,A.value,S),A!==null&&(e&&A.alternate!==null&&N.delete(A.key===null?E:A.key),w=s(A,w,E),C===null?k=A:C.sibling=A,C=A);return e&&N.forEach(function(D){return n(m,D)}),Re&&uo(m,E),k}function _(m,w,y,S){if(typeof y=="object"&&y!==null&&y.type===si&&y.key===null&&(y=y.props.children),typeof y=="object"&&y!==null){switch(y.$$typeof){case pl:e:{for(var k=y.key,C=w;C!==null;){if(C.key===k){if(k=y.type,k===si){if(C.tag===7){r(m,C.sibling),w=i(C,y.props.children),w.return=m,m=w;break e}}else if(C.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===_r&&Z0(k)===C.type){r(m,C.sibling),w=i(C,y.props),w.ref=ps(m,C,y),w.return=m,m=w;break e}r(m,C);break}else n(m,C);C=C.sibling}y.type===si?(w=wo(y.props.children,m.mode,S,y.key),w.return=m,m=w):(S=mc(y.type,y.key,y.props,null,m.mode,S),S.ref=ps(m,w,y),S.return=m,m=S)}return a(m);case ii:e:{for(C=y.key;w!==null;){if(w.key===C)if(w.tag===4&&w.stateNode.containerInfo===y.containerInfo&&w.stateNode.implementation===y.implementation){r(m,w.sibling),w=i(w,y.children||[]),w.return=m,m=w;break e}else{r(m,w);break}else n(m,w);w=w.sibling}w=mf(y,m.mode,S),w.return=m,m=w}return a(m);case _r:return C=y._init,_(m,w,C(y._payload),S)}if(js(y))return v(m,w,y,S);if(cs(y))return b(m,w,y,S);Cl(m,y)}return typeof y=="string"&&y!==""||typeof y=="number"?(y=""+y,w!==null&&w.tag===6?(r(m,w.sibling),w=i(w,y),w.return=m,m=w):(r(m,w),w=pf(y,m.mode,S),w.return=m,m=w),a(m)):r(m,w)}return _}var Ti=zw(!0),Fw=zw(!1),Fc=Kr(null),Bc=null,pi=null,lm=null;function cm(){lm=pi=Bc=null}function um(e){var n=Fc.current;je(Fc),e._currentValue=n}function Nh(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 Si(e,n){Bc=e,lm=pi=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&n&&(vt=!0),e.firstContext=null)}function qt(e){var n=e._currentValue;if(lm!==e)if(e={context:e,memoizedValue:n,next:null},pi===null){if(Bc===null)throw Error(Z(308));pi=e,Bc.dependencies={lanes:0,firstContext:e}}else pi=pi.next=e;return n}var mo=null;function dm(e){mo===null?mo=[e]:mo.push(e)}function Bw(e,n,r,o){var i=n.interleaved;return i===null?(r.next=r,dm(n)):(r.next=i.next,i.next=r),n.interleaved=r,nr(e,o)}function nr(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 Sr=!1;function fm(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Hw(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 Or(e,n,r){var o=e.updateQueue;if(o===null)return null;if(o=o.shared,be&2){var i=o.pending;return i===null?n.next=n:(n.next=i.next,i.next=n),o.pending=n,nr(e,r)}return i=o.interleaved,i===null?(n.next=n,dm(o)):(n.next=i.next,i.next=n),o.interleaved=n,nr(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,Qp(e,r)}}function J0(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 Hc(e,n,r,o){var i=e.updateQueue;Sr=!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 h=l.lane,g=l.eventTime;if((o&h)===h){f!==null&&(f=f.next={eventTime:g,lane:0,tag:l.tag,payload:l.payload,callback:l.callback,next:null});e:{var v=e,b=l;switch(h=n,g=r,b.tag){case 1:if(v=b.payload,typeof v=="function"){d=v.call(g,d,h);break e}d=v;break e;case 3:v.flags=v.flags&-65537|128;case 0:if(v=b.payload,h=typeof v=="function"?v.call(g,d,h):v,h==null)break e;d=Le({},d,h);break e;case 2:Sr=!0}}l.callback!==null&&l.lane!==0&&(e.flags|=64,h=i.effects,h===null?i.effects=[l]:h.push(l))}else g={eventTime:g,lane:h,tag:l.tag,payload:l.payload,callback:l.callback,next:null},f===null?(u=f=g,c=d):f=f.next=g,a|=h;if(l=l.next,l===null){if(l=i.shared.pending,l===null)break;h=l,l=h.next,h.next=null,i.lastBaseUpdate=h,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);Eo|=a,e.lanes=a,e.memoizedState=d}}function ev(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(Z(191,i));i.call(o)}}}var $a={},jn=Kr($a),ua=Kr($a),da=Kr($a);function go(e){if(e===$a)throw Error(Z(174));return e}function hm(e,n){switch(Ce(da,n),Ce(ua,e),Ce(jn,$a),e=n.nodeType,e){case 9:case 11:n=(n=n.documentElement)?n.namespaceURI:sh(null,"");break;default:e=e===8?n.parentNode:n,n=e.namespaceURI||null,e=e.tagName,n=sh(n,e)}je(jn),Ce(jn,n)}function Ii(){je(jn),je(ua),je(da)}function Uw(e){go(da.current);var n=go(jn.current),r=sh(n,e.type);n!==r&&(Ce(ua,e),Ce(jn,r))}function pm(e){ua.current===e&&(je(jn),je(ua))}var Oe=Kr(0);function Uc(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 lf=[];function mm(){for(var e=0;e<lf.length;e++)lf[e]._workInProgressVersionPrimary=null;lf.length=0}var uc=ar.ReactCurrentDispatcher,cf=ar.ReactCurrentBatchConfig,No=0,$e=null,We=null,Xe=null,Vc=!1,Us=!1,fa=0,bM=0;function tt(){throw Error(Z(321))}function gm(e,n){if(n===null)return!1;for(var r=0;r<n.length&&r<e.length;r++)if(!pn(e[r],n[r]))return!1;return!0}function vm(e,n,r,o,i,s){if(No=s,$e=n,n.memoizedState=null,n.updateQueue=null,n.lanes=0,uc.current=e===null||e.memoizedState===null?CM:NM,e=r(o,i),Us){s=0;do{if(Us=!1,fa=0,25<=s)throw Error(Z(301));s+=1,Xe=We=null,n.updateQueue=null,uc.current=EM,e=r(o,i)}while(Us)}if(uc.current=Wc,n=We!==null&&We.next!==null,No=0,Xe=We=$e=null,Vc=!1,n)throw Error(Z(300));return e}function ym(){var e=fa!==0;return fa=0,e}function _n(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Xe===null?$e.memoizedState=Xe=e:Xe=Xe.next=e,Xe}function Qt(){if(We===null){var e=$e.alternate;e=e!==null?e.memoizedState:null}else e=We.next;var n=Xe===null?$e.memoizedState:Xe.next;if(n!==null)Xe=n,We=e;else{if(e===null)throw Error(Z(310));We=e,e={memoizedState:We.memoizedState,baseState:We.baseState,baseQueue:We.baseQueue,queue:We.queue,next:null},Xe===null?$e.memoizedState=Xe=e:Xe=Xe.next=e}return Xe}function ha(e,n){return typeof n=="function"?n(e):n}function uf(e){var n=Qt(),r=n.queue;if(r===null)throw Error(Z(311));r.lastRenderedReducer=e;var o=We,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((No&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,$e.lanes|=f,Eo|=f}u=u.next}while(u!==null&&u!==s);c===null?a=o:c.next=l,pn(o,n.memoizedState)||(vt=!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,$e.lanes|=s,Eo|=s,i=i.next;while(i!==e)}else i===null&&(r.lanes=0);return[n.memoizedState,r.dispatch]}function df(e){var n=Qt(),r=n.queue;if(r===null)throw Error(Z(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);pn(s,n.memoizedState)||(vt=!0),n.memoizedState=s,n.baseQueue===null&&(n.baseState=s),r.lastRenderedState=s}return[s,o]}function Vw(){}function Ww(e,n){var r=$e,o=Qt(),i=n(),s=!pn(o.memoizedState,i);if(s&&(o.memoizedState=i,vt=!0),o=o.queue,xm(Xw.bind(null,r,o,e),[e]),o.getSnapshot!==n||s||Xe!==null&&Xe.memoizedState.tag&1){if(r.flags|=2048,pa(9,Yw.bind(null,r,o,i,n),void 0,null),Ke===null)throw Error(Z(349));No&30||Gw(r,n,i)}return i}function Gw(e,n,r){e.flags|=16384,e={getSnapshot:n,value:r},n=$e.updateQueue,n===null?(n={lastEffect:null,stores:null},$e.updateQueue=n,n.stores=[e]):(r=n.stores,r===null?n.stores=[e]:r.push(e))}function Yw(e,n,r,o){n.value=r,n.getSnapshot=o,Kw(n)&&qw(e)}function Xw(e,n,r){return r(function(){Kw(n)&&qw(e)})}function Kw(e){var n=e.getSnapshot;e=e.value;try{var r=n();return!pn(e,r)}catch{return!0}}function qw(e){var n=nr(e,1);n!==null&&hn(n,e,1,-1)}function tv(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:ha,lastRenderedState:e},n.queue=e,e=e.dispatch=kM.bind(null,$e,e),[n.memoizedState,e]}function pa(e,n,r,o){return e={tag:e,create:n,destroy:r,deps:o,next:null},n=$e.updateQueue,n===null?(n={lastEffect:null,stores:null},$e.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 Qw(){return Qt().memoizedState}function dc(e,n,r,o){var i=_n();$e.flags|=e,i.memoizedState=pa(1|n,r,void 0,o===void 0?null:o)}function Bu(e,n,r,o){var i=Qt();o=o===void 0?null:o;var s=void 0;if(We!==null){var a=We.memoizedState;if(s=a.destroy,o!==null&&gm(o,a.deps)){i.memoizedState=pa(n,r,s,o);return}}$e.flags|=e,i.memoizedState=pa(1|n,r,s,o)}function nv(e,n){return dc(8390656,8,e,n)}function xm(e,n){return Bu(2048,8,e,n)}function Zw(e,n){return Bu(4,2,e,n)}function Jw(e,n){return Bu(4,4,e,n)}function eb(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 tb(e,n,r){return r=r!=null?r.concat([e]):null,Bu(4,4,eb.bind(null,n,e),r)}function wm(){}function nb(e,n){var r=Qt();n=n===void 0?null:n;var o=r.memoizedState;return o!==null&&n!==null&&gm(n,o[1])?o[0]:(r.memoizedState=[e,n],e)}function rb(e,n){var r=Qt();n=n===void 0?null:n;var o=r.memoizedState;return o!==null&&n!==null&&gm(n,o[1])?o[0]:(e=e(),r.memoizedState=[e,n],e)}function ob(e,n,r){return No&21?(pn(r,n)||(r=cw(),$e.lanes|=r,Eo|=r,e.baseState=!0),n):(e.baseState&&(e.baseState=!1,vt=!0),e.memoizedState=r)}function _M(e,n){var r=Se;Se=r!==0&&4>r?r:4,e(!0);var o=cf.transition;cf.transition={};try{e(!1),n()}finally{Se=r,cf.transition=o}}function ib(){return Qt().memoizedState}function SM(e,n,r){var o=Dr(e);if(r={lane:o,action:r,hasEagerState:!1,eagerState:null,next:null},sb(e))ab(n,r);else if(r=Bw(e,n,r,o),r!==null){var i=ut();hn(r,e,o,i),lb(r,n,o)}}function kM(e,n,r){var o=Dr(e),i={lane:o,action:r,hasEagerState:!1,eagerState:null,next:null};if(sb(e))ab(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,pn(l,a)){var c=n.interleaved;c===null?(i.next=i,dm(n)):(i.next=c.next,c.next=i),n.interleaved=i;return}}catch{}finally{}r=Bw(e,n,i,o),r!==null&&(i=ut(),hn(r,e,o,i),lb(r,n,o))}}function sb(e){var n=e.alternate;return e===$e||n!==null&&n===$e}function ab(e,n){Us=Vc=!0;var r=e.pending;r===null?n.next=n:(n.next=r.next,r.next=n),e.pending=n}function lb(e,n,r){if(r&4194240){var o=n.lanes;o&=e.pendingLanes,r|=o,n.lanes=r,Qp(e,r)}}var Wc={readContext:qt,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},CM={readContext:qt,useCallback:function(e,n){return _n().memoizedState=[e,n===void 0?null:n],e},useContext:qt,useEffect:nv,useImperativeHandle:function(e,n,r){return r=r!=null?r.concat([e]):null,dc(4194308,4,eb.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=SM.bind(null,$e,e),[o.memoizedState,e]},useRef:function(e){var n=_n();return e={current:e},n.memoizedState=e},useState:tv,useDebugValue:wm,useDeferredValue:function(e){return _n().memoizedState=e},useTransition:function(){var e=tv(!1),n=e[0];return e=_M.bind(null,e[1]),_n().memoizedState=e,[n,e]},useMutableSource:function(){},useSyncExternalStore:function(e,n,r){var o=$e,i=_n();if(Re){if(r===void 0)throw Error(Z(407));r=r()}else{if(r=n(),Ke===null)throw Error(Z(349));No&30||Gw(o,n,r)}i.memoizedState=r;var s={value:r,getSnapshot:n};return i.queue=s,nv(Xw.bind(null,o,s,e),[e]),o.flags|=2048,pa(9,Yw.bind(null,o,s,r,n),void 0,null),r},useId:function(){var e=_n(),n=Ke.identifierPrefix;if(Re){var r=Xn,o=Yn;r=(o&~(1<<32-fn(o)-1)).toString(32)+r,n=":"+n+"R"+r,r=fa++,0<r&&(n+="H"+r.toString(32)),n+=":"}else r=bM++,n=":"+n+"r"+r.toString(32)+":";return e.memoizedState=n},unstable_isNewReconciler:!1},NM={readContext:qt,useCallback:nb,useContext:qt,useEffect:xm,useImperativeHandle:tb,useInsertionEffect:Zw,useLayoutEffect:Jw,useMemo:rb,useReducer:uf,useRef:Qw,useState:function(){return uf(ha)},useDebugValue:wm,useDeferredValue:function(e){var n=Qt();return ob(n,We.memoizedState,e)},useTransition:function(){var e=uf(ha)[0],n=Qt().memoizedState;return[e,n]},useMutableSource:Vw,useSyncExternalStore:Ww,useId:ib,unstable_isNewReconciler:!1},EM={readContext:qt,useCallback:nb,useContext:qt,useEffect:xm,useImperativeHandle:tb,useInsertionEffect:Zw,useLayoutEffect:Jw,useMemo:rb,useReducer:df,useRef:Qw,useState:function(){return df(ha)},useDebugValue:wm,useDeferredValue:function(e){var n=Qt();return We===null?n.memoizedState=e:ob(n,We.memoizedState,e)},useTransition:function(){var e=df(ha)[0],n=Qt().memoizedState;return[e,n]},useMutableSource:Vw,useSyncExternalStore:Ww,useId:ib,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 Eh(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 Hu={isMounted:function(e){return(e=e._reactInternals)?zo(e)===e:!1},enqueueSetState:function(e,n,r){e=e._reactInternals;var o=ut(),i=Dr(e),s=Qn(o,i);s.payload=n,r!=null&&(s.callback=r),n=Or(e,s,i),n!==null&&(hn(n,e,i,o),cc(n,e,i))},enqueueReplaceState:function(e,n,r){e=e._reactInternals;var o=ut(),i=Dr(e),s=Qn(o,i);s.tag=1,s.payload=n,r!=null&&(s.callback=r),n=Or(e,s,i),n!==null&&(hn(n,e,i,o),cc(n,e,i))},enqueueForceUpdate:function(e,n){e=e._reactInternals;var r=ut(),o=Dr(e),i=Qn(r,o);i.tag=2,n!=null&&(i.callback=n),n=Or(e,i,o),n!==null&&(hn(n,e,o,r),cc(n,e,o))}};function rv(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?!sa(r,o)||!sa(i,s):!0}function cb(e,n,r){var o=!1,i=Ur,s=n.contextType;return typeof s=="object"&&s!==null?s=qt(s):(i=wt(n)?ko:at.current,o=n.contextTypes,s=(o=o!=null)?Ri(e,i):Ur),n=new n(r,s),e.memoizedState=n.state!==null&&n.state!==void 0?n.state:null,n.updater=Hu,e.stateNode=n,n._reactInternals=e,o&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=s),n}function ov(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&&Hu.enqueueReplaceState(n,n.state,null)}function Ph(e,n,r,o){var i=e.stateNode;i.props=r,i.state=e.memoizedState,i.refs={},fm(e);var s=n.contextType;typeof s=="object"&&s!==null?i.context=qt(s):(s=wt(n)?ko:at.current,i.context=Ri(e,s)),i.state=e.memoizedState,s=n.getDerivedStateFromProps,typeof s=="function"&&(Eh(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&&Hu.enqueueReplaceState(i,i.state,null),Hc(e,r,i,o),i.state=e.memoizedState),typeof i.componentDidMount=="function"&&(e.flags|=4194308)}function Oi(e,n){try{var r="",o=n;do r+=tj(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 ff(e,n,r){return{value:e,source:null,stack:r??null,digest:n??null}}function jh(e,n){try{console.error(n.value)}catch(r){setTimeout(function(){throw r})}}var PM=typeof WeakMap=="function"?WeakMap:Map;function ub(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,zh=o),jh(e,n)},r}function db(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(){jh(e,n)}}var s=e.stateNode;return s!==null&&typeof s.componentDidCatch=="function"&&(r.callback=function(){jh(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 iv(e,n,r){var o=e.pingCache;if(o===null){o=e.pingCache=new PM;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=HM.bind(null,e,n,r),n.then(e,e))}function sv(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 av(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,Or(r,n,1))),r.lanes|=1),e)}var jM=ar.ReactCurrentOwner,vt=!1;function lt(e,n,r,o){n.child=e===null?Fw(n,null,r,o):Ti(n,e.child,r,o)}function lv(e,n,r,o,i){r=r.render;var s=n.ref;return Si(n,i),o=vm(e,n,r,o,s,i),r=ym(),e!==null&&!vt?(n.updateQueue=e.updateQueue,n.flags&=-2053,e.lanes&=~i,rr(e,n,i)):(Re&&r&&im(n),n.flags|=1,lt(e,n,o,i),n.child)}function cv(e,n,r,o,i){if(e===null){var s=r.type;return typeof s=="function"&&!Pm(s)&&s.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(n.tag=15,n.type=s,fb(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:sa,r(a,o)&&e.ref===n.ref)return rr(e,n,i)}return n.flags|=1,e=Lr(s,o),e.ref=n.ref,e.return=n,n.child=e}function fb(e,n,r,o,i){if(e!==null){var s=e.memoizedProps;if(sa(s,o)&&e.ref===n.ref)if(vt=!1,n.pendingProps=o=s,(e.lanes&i)!==0)e.flags&131072&&(vt=!0);else return n.lanes=e.lanes,rr(e,n,i)}return Mh(e,n,r,o,i)}function hb(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(gi,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(gi,jt),jt|=e,null;n.memoizedState={baseLanes:0,cachePool:null,transitions:null},o=s!==null?s.baseLanes:r,Ce(gi,jt),jt|=o}else s!==null?(o=s.baseLanes|r,n.memoizedState=null):o=r,Ce(gi,jt),jt|=o;return lt(e,n,i,r),n.child}function pb(e,n){var r=n.ref;(e===null&&r!==null||e!==null&&e.ref!==r)&&(n.flags|=512,n.flags|=2097152)}function Mh(e,n,r,o,i){var s=wt(r)?ko:at.current;return s=Ri(n,s),Si(n,i),r=vm(e,n,r,o,s,i),o=ym(),e!==null&&!vt?(n.updateQueue=e.updateQueue,n.flags&=-2053,e.lanes&=~i,rr(e,n,i)):(Re&&o&&im(n),n.flags|=1,lt(e,n,r,i),n.child)}function uv(e,n,r,o,i){if(wt(r)){var s=!0;Dc(n)}else s=!1;if(Si(n,i),n.stateNode===null)fc(e,n),cb(n,r,o),Ph(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=qt(u):(u=wt(r)?ko:at.current,u=Ri(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)&&ov(n,a,o,u),Sr=!1;var h=n.memoizedState;a.state=h,Hc(n,o,a,i),c=n.memoizedState,l!==o||h!==c||xt.current||Sr?(typeof f=="function"&&(Eh(n,r,f,o),c=n.memoizedState),(l=Sr||rv(n,r,l,o,h,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,Hw(e,n),l=n.memoizedProps,u=n.type===n.elementType?l:rn(n.type,l),a.props=u,d=n.pendingProps,h=a.context,c=r.contextType,typeof c=="object"&&c!==null?c=qt(c):(c=wt(r)?ko:at.current,c=Ri(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||h!==c)&&ov(n,a,o,c),Sr=!1,h=n.memoizedState,a.state=h,Hc(n,o,a,i);var v=n.memoizedState;l!==d||h!==v||xt.current||Sr?(typeof g=="function"&&(Eh(n,r,g,o),v=n.memoizedState),(u=Sr||rv(n,r,u,o,h,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&&h===e.memoizedState||(n.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&h===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&&h===e.memoizedState||(n.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&h===e.memoizedState||(n.flags|=1024),o=!1)}return Rh(e,n,r,o,s,i)}function Rh(e,n,r,o,i,s){pb(e,n);var a=(n.flags&128)!==0;if(!o&&!a)return i&&K0(n,r,!1),rr(e,n,s);o=n.stateNode,jM.current=n;var l=a&&typeof r.getDerivedStateFromError!="function"?null:o.render();return n.flags|=1,e!==null&&a?(n.child=Ti(n,e.child,null,s),n.child=Ti(n,null,l,s)):lt(e,n,l,s),n.memoizedState=o.state,i&&K0(n,r,!0),n.child}function mb(e){var n=e.stateNode;n.pendingContext?X0(e,n.pendingContext,n.pendingContext!==n.context):n.context&&X0(e,n.context,!1),hm(e,n.containerInfo)}function dv(e,n,r,o,i){return Ai(),am(i),n.flags|=256,lt(e,n,r,o),n.child}var Ah={dehydrated:null,treeContext:null,retryLane:0};function Th(e){return{baseLanes:e,cachePool:null,transitions:null}}function gb(e,n,r){var o=n.pendingProps,i=Oe.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(Oe,i&1),e===null)return Ch(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=Wu(a,o,0,null),e=wo(e,o,r,null),s.return=n,e.return=n,s.sibling=e,n.child=s,n.child.memoizedState=Th(r),n.memoizedState=Ah,e):bm(n,a));if(i=e.memoizedState,i!==null&&(l=i.dehydrated,l!==null))return MM(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=Lr(i,c),o.subtreeFlags=i.subtreeFlags&14680064),l!==null?s=Lr(l,s):(s=wo(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?Th(r):{baseLanes:a.baseLanes|r,cachePool:null,transitions:a.transitions},s.memoizedState=a,s.childLanes=e.childLanes&~r,n.memoizedState=Ah,o}return s=e.child,e=s.sibling,o=Lr(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 bm(e,n){return n=Wu({mode:"visible",children:n},e.mode,0,null),n.return=e,e.child=n}function Nl(e,n,r,o){return o!==null&&am(o),Ti(n,e.child,null,r),e=bm(n,n.pendingProps.children),e.flags|=2,n.memoizedState=null,e}function MM(e,n,r,o,i,s,a){if(r)return n.flags&256?(n.flags&=-257,o=ff(Error(Z(422))),Nl(e,n,a,o)):n.memoizedState!==null?(n.child=e.child,n.flags|=128,null):(s=o.fallback,i=n.mode,o=Wu({mode:"visible",children:o.children},i,0,null),s=wo(s,i,a,null),s.flags|=2,o.return=n,s.return=n,o.sibling=s,n.child=o,n.mode&1&&Ti(n,e.child,null,a),n.child.memoizedState=Th(a),n.memoizedState=Ah,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(Z(419)),o=ff(s,o,void 0),Nl(e,n,a,o)}if(l=(a&e.childLanes)!==0,vt||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,nr(e,i),hn(o,e,i,-1))}return Em(),o=ff(Error(Z(421))),Nl(e,n,a,o)}return i.data==="$?"?(n.flags|=128,n.child=e.child,n=UM.bind(null,e),i._reactRetry=n,null):(e=s.treeContext,Rt=Ir(i.nextSibling),At=n,Re=!0,an=null,e!==null&&(Vt[Wt++]=Yn,Vt[Wt++]=Xn,Vt[Wt++]=Co,Yn=e.id,Xn=e.overflow,Co=n),n=bm(n,o.children),n.flags|=4096,n)}function fv(e,n,r){e.lanes|=n;var o=e.alternate;o!==null&&(o.lanes|=n),Nh(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 vb(e,n,r){var o=n.pendingProps,i=o.revealOrder,s=o.tail;if(lt(e,n,o.children,r),o=Oe.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&&fv(e,r,n);else if(e.tag===19)fv(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(Oe,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&&Uc(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&&Uc(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 rr(e,n,r){if(e!==null&&(n.dependencies=e.dependencies),Eo|=n.lanes,!(r&n.childLanes))return null;if(e!==null&&n.child!==e.child)throw Error(Z(153));if(n.child!==null){for(e=n.child,r=Lr(e,e.pendingProps),n.child=r,r.return=n;e.sibling!==null;)e=e.sibling,r=r.sibling=Lr(e,e.pendingProps),r.return=n;r.sibling=null}return n.child}function RM(e,n,r){switch(n.tag){case 3:mb(n),Ai();break;case 5:Uw(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(Oe,Oe.current&1),n.flags|=128,null):r&n.child.childLanes?gb(e,n,r):(Ce(Oe,Oe.current&1),e=rr(e,n,r),e!==null?e.sibling:null);Ce(Oe,Oe.current&1);break;case 19:if(o=(r&n.childLanes)!==0,e.flags&128){if(o)return vb(e,n,r);n.flags|=128}if(i=n.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Ce(Oe,Oe.current),o)break;return null;case 22:case 23:return n.lanes=0,hb(e,n,r)}return rr(e,n,r)}var yb,Ih,xb,wb;yb=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}};Ih=function(){};xb=function(e,n,r,o){var i=e.memoizedProps;if(i!==o){e=n.stateNode,go(jn.current);var s=null;switch(r){case"input":i=nh(e,i),o=nh(e,o),s=[];break;case"select":i=Le({},i,{value:void 0}),o=Le({},o,{value:void 0}),s=[];break;case"textarea":i=ih(e,i),o=ih(e,o),s=[];break;default:typeof i.onClick!="function"&&typeof o.onClick=="function"&&(e.onclick=Oc)}ah(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"&&(Js.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"&&(Js.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)}};wb=function(e,n,r,o){r!==o&&(n.flags|=4)};function ms(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 AM(e,n,r){var o=n.pendingProps;switch(sm(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)&&$c(),nt(n),null;case 3:return o=n.stateNode,Ii(),je(xt),je(at),mm(),o.pendingContext&&(o.context=o.pendingContext,o.pendingContext=null),(e===null||e.child===null)&&(kl(n)?n.flags|=4:e===null||e.memoizedState.isDehydrated&&!(n.flags&256)||(n.flags|=1024,an!==null&&(Hh(an),an=null))),Ih(e,n),nt(n),null;case 5:pm(n);var i=go(da.current);if(r=n.type,e!==null&&n.stateNode!=null)xb(e,n,r,o,i),e.ref!==n.ref&&(n.flags|=512,n.flags|=2097152);else{if(!o){if(n.stateNode===null)throw Error(Z(166));return nt(n),null}if(e=go(jn.current),kl(n)){o=n.stateNode,r=n.type;var s=n.memoizedProps;switch(o[kn]=n,o[ca]=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<Rs.length;i++)Ee(Rs[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":b0(o,s),Ee("invalid",o);break;case"select":o._wrapperState={wasMultiple:!!s.multiple},Ee("invalid",o);break;case"textarea":S0(o,s),Ee("invalid",o)}ah(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]):Js.hasOwnProperty(a)&&l!=null&&a==="onScroll"&&Ee("scroll",o)}switch(r){case"input":ml(o),_0(o,s,!0);break;case"textarea":ml(o),k0(o);break;case"select":case"option":break;default:typeof s.onClick=="function"&&(o.onclick=Oc)}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=X1(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[kn]=n,e[ca]=o,yb(e,n,!1,!1),n.stateNode=e;e:{switch(a=lh(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<Rs.length;i++)Ee(Rs[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":b0(e,o),i=nh(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":S0(e,o),i=ih(e,o),Ee("invalid",e);break;default:i=o}ah(r,i),l=i;for(s in l)if(l.hasOwnProperty(s)){var c=l[s];s==="style"?Q1(e,c):s==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,c!=null&&K1(e,c)):s==="children"?typeof c=="string"?(r!=="textarea"||c!=="")&&ea(e,c):typeof c=="number"&&ea(e,""+c):s!=="suppressContentEditableWarning"&&s!=="suppressHydrationWarning"&&s!=="autoFocus"&&(Js.hasOwnProperty(s)?c!=null&&s==="onScroll"&&Ee("scroll",e):c!=null&&Wp(e,s,c,a))}switch(r){case"input":ml(e),_0(e,o,!1);break;case"textarea":ml(e),k0(e);break;case"option":o.value!=null&&e.setAttribute("value",""+Hr(o.value));break;case"select":e.multiple=!!o.multiple,s=o.value,s!=null?xi(e,!!o.multiple,s,!1):o.defaultValue!=null&&xi(e,!!o.multiple,o.defaultValue,!0);break;default:typeof i.onClick=="function"&&(e.onclick=Oc)}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)wb(e,n,e.memoizedProps,o);else{if(typeof o!="string"&&n.stateNode===null)throw Error(Z(166));if(r=go(da.current),go(jn.current),kl(n)){if(o=n.stateNode,r=n.memoizedProps,o[kn]=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[kn]=n,n.stateNode=o}return nt(n),null;case 13:if(je(Oe),o=n.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Re&&Rt!==null&&n.mode&1&&!(n.flags&128))Lw(),Ai(),n.flags|=98560,s=!1;else if(s=kl(n),o!==null&&o.dehydrated!==null){if(e===null){if(!s)throw Error(Z(318));if(s=n.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(Z(317));s[kn]=n}else Ai(),!(n.flags&128)&&(n.memoizedState=null),n.flags|=4;nt(n),s=!1}else an!==null&&(Hh(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||Oe.current&1?Ge===0&&(Ge=3):Em())),n.updateQueue!==null&&(n.flags|=4),nt(n),null);case 4:return Ii(),Ih(e,n),e===null&&aa(n.stateNode.containerInfo),nt(n),null;case 10:return um(n.type._context),nt(n),null;case 17:return wt(n.type)&&$c(),nt(n),null;case 19:if(je(Oe),s=n.memoizedState,s===null)return nt(n),null;if(o=(n.flags&128)!==0,a=s.rendering,a===null)if(o)ms(s,!1);else{if(Ge!==0||e!==null&&e.flags&128)for(e=n.child;e!==null;){if(a=Uc(e),a!==null){for(n.flags|=128,ms(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(Oe,Oe.current&1|2),n.child}e=e.sibling}s.tail!==null&&Fe()>$i&&(n.flags|=128,o=!0,ms(s,!1),n.lanes=4194304)}else{if(!o)if(e=Uc(a),e!==null){if(n.flags|=128,o=!0,r=e.updateQueue,r!==null&&(n.updateQueue=r,n.flags|=4),ms(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,ms(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=Oe.current,Ce(Oe,o?r&1|2:r&1),n):(nt(n),null);case 22:case 23:return Nm(),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(Z(156,n.tag))}function TM(e,n){switch(sm(n),n.tag){case 1:return wt(n.type)&&$c(),e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 3:return Ii(),je(xt),je(at),mm(),e=n.flags,e&65536&&!(e&128)?(n.flags=e&-65537|128,n):null;case 5:return pm(n),null;case 13:if(je(Oe),e=n.memoizedState,e!==null&&e.dehydrated!==null){if(n.alternate===null)throw Error(Z(340));Ai()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 19:return je(Oe),null;case 4:return Ii(),null;case 10:return um(n.type._context),null;case 22:case 23:return Nm(),null;case 24:return null;default:return null}}var El=!1,it=!1,IM=typeof WeakSet=="function"?WeakSet:Set,oe=null;function mi(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 Oh(e,n,r){try{r()}catch(o){ze(e,n,o)}}var hv=!1;function OM(e,n){if(yh=Ac,e=Cw(),om(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,h=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;)h=d,d=g;for(;;){if(d===e)break t;if(h===r&&++u===i&&(l=a),h===s&&++f===o&&(c=a),(g=d.nextSibling)!==null)break;d=h,h=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(xh={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 b=v.memoizedProps,_=v.memoizedState,m=n.stateNode,w=m.getSnapshotBeforeUpdate(n.elementType===n.type?b:rn(n.type,b),_);m.__reactInternalSnapshotBeforeUpdate=w}break;case 3:var y=n.stateNode.containerInfo;y.nodeType===1?y.textContent="":y.nodeType===9&&y.documentElement&&y.removeChild(y.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(Z(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=hv,hv=!1,v}function Vs(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&&Oh(n,r,s)}i=i.next}while(i!==o)}}function Uu(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 $h(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 bb(e){var n=e.alternate;n!==null&&(e.alternate=null,bb(n)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(n=e.stateNode,n!==null&&(delete n[kn],delete n[ca],delete n[_h],delete n[vM],delete n[yM])),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 _b(e){return e.tag===5||e.tag===3||e.tag===4}function pv(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||_b(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 Dh(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=Oc));else if(o!==4&&(e=e.child,e!==null))for(Dh(e,n,r),e=e.sibling;e!==null;)Dh(e,n,r),e=e.sibling}function Lh(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(Lh(e,n,r),e=e.sibling;e!==null;)Lh(e,n,r),e=e.sibling}var Qe=null,sn=!1;function pr(e,n,r){for(r=r.child;r!==null;)Sb(e,n,r),r=r.sibling}function Sb(e,n,r){if(Pn&&typeof Pn.onCommitFiberUnmount=="function")try{Pn.onCommitFiberUnmount(Ou,r)}catch{}switch(r.tag){case 5:it||mi(r,n);case 6:var o=Qe,i=sn;Qe=null,pr(e,n,r),Qe=o,sn=i,Qe!==null&&(sn?(e=Qe,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):Qe.removeChild(r.stateNode));break;case 18:Qe!==null&&(sn?(e=Qe,r=r.stateNode,e.nodeType===8?sf(e.parentNode,r):e.nodeType===1&&sf(e,r),oa(e)):sf(Qe,r.stateNode));break;case 4:o=Qe,i=sn,Qe=r.stateNode.containerInfo,sn=!0,pr(e,n,r),Qe=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)&&Oh(r,n,a),i=i.next}while(i!==o)}pr(e,n,r);break;case 1:if(!it&&(mi(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 mv(e){var n=e.updateQueue;if(n!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new IM),n.forEach(function(o){var i=VM.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:Qe=l.stateNode,sn=!1;break e;case 3:Qe=l.stateNode.containerInfo,sn=!0;break e;case 4:Qe=l.stateNode.containerInfo,sn=!0;break e}l=l.return}if(Qe===null)throw Error(Z(160));Sb(s,a,i),Qe=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;)kb(n,e),n=n.sibling}function kb(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{Vs(3,e,e.return),Uu(3,e)}catch(b){ze(e,e.return,b)}try{Vs(5,e,e.return)}catch(b){ze(e,e.return,b)}}break;case 1:Jt(n,e),bn(e),o&512&&r!==null&&mi(r,r.return);break;case 5:if(Jt(n,e),bn(e),o&512&&r!==null&&mi(r,r.return),e.flags&32){var i=e.stateNode;try{ea(i,"")}catch(b){ze(e,e.return,b)}}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&&G1(i,s),lh(l,a);var u=lh(l,s);for(a=0;a<c.length;a+=2){var f=c[a],d=c[a+1];f==="style"?Q1(i,d):f==="dangerouslySetInnerHTML"?K1(i,d):f==="children"?ea(i,d):Wp(i,f,d,u)}switch(l){case"input":rh(i,s);break;case"textarea":Y1(i,s);break;case"select":var h=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!s.multiple;var g=s.value;g!=null?xi(i,!!s.multiple,g,!1):h!==!!s.multiple&&(s.defaultValue!=null?xi(i,!!s.multiple,s.defaultValue,!0):xi(i,!!s.multiple,s.multiple?[]:"",!1))}i[ca]=s}catch(b){ze(e,e.return,b)}}break;case 6:if(Jt(n,e),bn(e),o&4){if(e.stateNode===null)throw Error(Z(162));i=e.stateNode,s=e.memoizedProps;try{i.nodeValue=s}catch(b){ze(e,e.return,b)}}break;case 3:if(Jt(n,e),bn(e),o&4&&r!==null&&r.memoizedState.isDehydrated)try{oa(n.containerInfo)}catch(b){ze(e,e.return,b)}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&&mv(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(h=oe,g=h.child,h.tag){case 0:case 11:case 14:case 15:Vs(4,h,h.return);break;case 1:mi(h,h.return);var v=h.stateNode;if(typeof v.componentWillUnmount=="function"){o=h,r=h.return;try{n=o,v.props=n.memoizedProps,v.state=n.memoizedState,v.componentWillUnmount()}catch(b){ze(o,r,b)}}break;case 5:mi(h,h.return);break;case 22:if(h.memoizedState!==null){vv(d);continue}}g!==null?(g.return=h,oe=g):vv(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=q1("display",a))}catch(b){ze(e,e.return,b)}}}else if(d.tag===6){if(f===null)try{d.stateNode.nodeValue=u?"":d.memoizedProps}catch(b){ze(e,e.return,b)}}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&&mv(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(_b(r)){var o=r;break e}r=r.return}throw Error(Z(160))}switch(o.tag){case 5:var i=o.stateNode;o.flags&32&&(ea(i,""),o.flags&=-33);var s=pv(e);Lh(e,s,i);break;case 3:case 4:var a=o.stateNode.containerInfo,l=pv(e);Dh(e,l,a);break;default:throw Error(Z(161))}}catch(c){ze(e,e.return,c)}e.flags&=-3}n&4096&&(e.flags&=-4097)}function $M(e,n,r){oe=e,Cb(e)}function Cb(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?yv(i):c!==null?(c.return=a,oe=c):yv(i);for(;s!==null;)oe=s,Cb(s),s=s.sibling;oe=i,El=l,it=u}gv(e)}else i.subtreeFlags&8772&&s!==null?(s.return=i,oe=s):gv(e)}}function gv(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||Uu(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&&ev(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}ev(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&&oa(d)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(Z(163))}it||n.flags&512&&$h(n)}catch(h){ze(n,n.return,h)}}if(n===e){oe=null;break}if(r=n.sibling,r!==null){r.return=n.return,oe=r;break}oe=n.return}}function vv(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 yv(e){for(;oe!==null;){var n=oe;try{switch(n.tag){case 0:case 11:case 15:var r=n.return;try{Uu(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{$h(n)}catch(c){ze(n,s,c)}break;case 5:var a=n.return;try{$h(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 DM=Math.ceil,Gc=ar.ReactCurrentDispatcher,_m=ar.ReactCurrentOwner,Xt=ar.ReactCurrentBatchConfig,be=0,Ke=null,Be=null,Ze=0,jt=0,gi=Kr(0),Ge=0,ma=null,Eo=0,Vu=0,Sm=0,Ws=null,gt=null,km=0,$i=1/0,Vn=null,Yc=!1,zh=null,$r=null,Pl=!1,jr=null,Xc=0,Gs=0,Fh=null,hc=-1,pc=0;function ut(){return be&6?Fe():hc!==-1?hc:hc=Fe()}function Dr(e){return e.mode&1?be&2&&Ze!==0?Ze&-Ze:wM.transition!==null?(pc===0&&(pc=cw()),pc):(e=Se,e!==0||(e=window.event,e=e===void 0?16:gw(e.type)),e):1}function hn(e,n,r,o){if(50<Gs)throw Gs=0,Fh=null,Error(Z(185));Ta(e,r,o),(!(be&2)||e!==Ke)&&(e===Ke&&(!(be&2)&&(Vu|=r),Ge===4&&Nr(e,Ze)),bt(e,o),r===1&&be===0&&!(n.mode&1)&&($i=Fe()+500,Fu&&qr()))}function bt(e,n){var r=e.callbackNode;wj(e,n);var o=Rc(e,e===Ke?Ze:0);if(o===0)r!==null&&E0(r),e.callbackNode=null,e.callbackPriority=0;else if(n=o&-o,e.callbackPriority!==n){if(r!=null&&E0(r),n===1)e.tag===0?xM(xv.bind(null,e)):Ow(xv.bind(null,e)),mM(function(){!(be&6)&&qr()}),r=null;else{switch(uw(o)){case 1:r=qp;break;case 4:r=aw;break;case 16:r=Mc;break;case 536870912:r=lw;break;default:r=Mc}r=Tb(r,Nb.bind(null,e))}e.callbackPriority=n,e.callbackNode=r}}function Nb(e,n){if(hc=-1,pc=0,be&6)throw Error(Z(327));var r=e.callbackNode;if(ki()&&e.callbackNode!==r)return null;var o=Rc(e,e===Ke?Ze:0);if(o===0)return null;if(o&30||o&e.expiredLanes||n)n=Kc(e,o);else{n=o;var i=be;be|=2;var s=Pb();(Ke!==e||Ze!==n)&&(Vn=null,$i=Fe()+500,xo(e,n));do try{FM();break}catch(l){Eb(e,l)}while(!0);cm(),Gc.current=s,be=i,Be!==null?n=0:(Ke=null,Ze=0,n=Ge)}if(n!==0){if(n===2&&(i=hh(e),i!==0&&(o=i,n=Bh(e,i))),n===1)throw r=ma,xo(e,0),Nr(e,o),bt(e,Fe()),r;if(n===6)Nr(e,o);else{if(i=e.current.alternate,!(o&30)&&!LM(i)&&(n=Kc(e,o),n===2&&(s=hh(e),s!==0&&(o=s,n=Bh(e,s))),n===1))throw r=ma,xo(e,0),Nr(e,o),bt(e,Fe()),r;switch(e.finishedWork=i,e.finishedLanes=o,n){case 0:case 1:throw Error(Z(345));case 2:fo(e,gt,Vn);break;case 3:if(Nr(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=bh(fo.bind(null,e,gt,Vn),n);break}fo(e,gt,Vn);break;case 4:if(Nr(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*DM(o/1960))-o,10<o){e.timeoutHandle=bh(fo.bind(null,e,gt,Vn),o);break}fo(e,gt,Vn);break;case 5:fo(e,gt,Vn);break;default:throw Error(Z(329))}}}return bt(e,Fe()),e.callbackNode===r?Nb.bind(null,e):null}function Bh(e,n){var r=Ws;return e.current.memoizedState.isDehydrated&&(xo(e,n).flags|=256),e=Kc(e,n),e!==2&&(n=gt,gt=r,n!==null&&Hh(n)),e}function Hh(e){gt===null?gt=e:gt.push.apply(gt,e)}function LM(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(!pn(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 Nr(e,n){for(n&=~Sm,n&=~Vu,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 xv(e){if(be&6)throw Error(Z(327));ki();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=hh(e);o!==0&&(n=o,r=Bh(e,o))}if(r===1)throw r=ma,xo(e,0),Nr(e,n),bt(e,Fe()),r;if(r===6)throw Error(Z(345));return e.finishedWork=e.current.alternate,e.finishedLanes=n,fo(e,gt,Vn),bt(e,Fe()),null}function Cm(e,n){var r=be;be|=1;try{return e(n)}finally{be=r,be===0&&($i=Fe()+500,Fu&&qr())}}function Po(e){jr!==null&&jr.tag===0&&!(be&6)&&ki();var n=be;be|=1;var r=Xt.transition,o=Se;try{if(Xt.transition=null,Se=1,e)return e()}finally{Se=o,Xt.transition=r,be=n,!(be&6)&&qr()}}function Nm(){jt=gi.current,je(gi)}function xo(e,n){e.finishedWork=null,e.finishedLanes=0;var r=e.timeoutHandle;if(r!==-1&&(e.timeoutHandle=-1,pM(r)),Be!==null)for(r=Be.return;r!==null;){var o=r;switch(sm(o),o.tag){case 1:o=o.type.childContextTypes,o!=null&&$c();break;case 3:Ii(),je(xt),je(at),mm();break;case 5:pm(o);break;case 4:Ii();break;case 13:je(Oe);break;case 19:je(Oe);break;case 10:um(o.type._context);break;case 22:case 23:Nm()}r=r.return}if(Ke=e,Be=e=Lr(e.current,null),Ze=jt=n,Ge=0,ma=null,Sm=Vu=Eo=0,gt=Ws=null,mo!==null){for(n=0;n<mo.length;n++)if(r=mo[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}mo=null}return e}function Eb(e,n){do{var r=Be;try{if(cm(),uc.current=Wc,Vc){for(var o=$e.memoizedState;o!==null;){var i=o.queue;i!==null&&(i.pending=null),o=o.next}Vc=!1}if(No=0,Xe=We=$e=null,Us=!1,fa=0,_m.current=null,r===null||r.return===null){Ge=1,ma=n,Be=null;break}e:{var s=e,a=r.return,l=r,c=n;if(n=Ze,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 h=f.alternate;h?(f.updateQueue=h.updateQueue,f.memoizedState=h.memoizedState,f.lanes=h.lanes):(f.updateQueue=null,f.memoizedState=null)}var g=sv(a);if(g!==null){g.flags&=-257,av(g,a,l,s,n),g.mode&1&&iv(s,u,n),n=g,c=u;var v=n.updateQueue;if(v===null){var b=new Set;b.add(c),n.updateQueue=b}else v.add(c);break e}else{if(!(n&1)){iv(s,u,n),Em();break e}c=Error(Z(426))}}else if(Re&&l.mode&1){var _=sv(a);if(_!==null){!(_.flags&65536)&&(_.flags|=256),av(_,a,l,s,n),am(Oi(c,l));break e}}s=c=Oi(c,l),Ge!==4&&(Ge=2),Ws===null?Ws=[s]:Ws.push(s),s=a;do{switch(s.tag){case 3:s.flags|=65536,n&=-n,s.lanes|=n;var m=ub(s,c,n);J0(s,m);break e;case 1:l=c;var w=s.type,y=s.stateNode;if(!(s.flags&128)&&(typeof w.getDerivedStateFromError=="function"||y!==null&&typeof y.componentDidCatch=="function"&&($r===null||!$r.has(y)))){s.flags|=65536,n&=-n,s.lanes|=n;var S=db(s,l,n);J0(s,S);break e}}s=s.return}while(s!==null)}Mb(r)}catch(k){n=k,Be===r&&r!==null&&(Be=r=r.return);continue}break}while(!0)}function Pb(){var e=Gc.current;return Gc.current=Wc,e===null?Wc:e}function Em(){(Ge===0||Ge===3||Ge===2)&&(Ge=4),Ke===null||!(Eo&268435455)&&!(Vu&268435455)||Nr(Ke,Ze)}function Kc(e,n){var r=be;be|=2;var o=Pb();(Ke!==e||Ze!==n)&&(Vn=null,xo(e,n));do try{zM();break}catch(i){Eb(e,i)}while(!0);if(cm(),be=r,Gc.current=o,Be!==null)throw Error(Z(261));return Ke=null,Ze=0,Ge}function zM(){for(;Be!==null;)jb(Be)}function FM(){for(;Be!==null&&!dj();)jb(Be)}function jb(e){var n=Ab(e.alternate,e,jt);e.memoizedProps=e.pendingProps,n===null?Mb(e):Be=n,_m.current=null}function Mb(e){var n=e;do{var r=n.alternate;if(e=n.return,n.flags&32768){if(r=TM(r,n),r!==null){r.flags&=32767,Be=r;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Ge=6,Be=null;return}}else if(r=AM(r,n,jt),r!==null){Be=r;return}if(n=n.sibling,n!==null){Be=n;return}Be=n=e}while(n!==null);Ge===0&&(Ge=5)}function fo(e,n,r){var o=Se,i=Xt.transition;try{Xt.transition=null,Se=1,BM(e,n,r,o)}finally{Xt.transition=i,Se=o}return null}function BM(e,n,r,o){do ki();while(jr!==null);if(be&6)throw Error(Z(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(Z(177));e.callbackNode=null,e.callbackPriority=0;var s=r.lanes|r.childLanes;if(bj(e,s),e===Ke&&(Be=Ke=null,Ze=0),!(r.subtreeFlags&2064)&&!(r.flags&2064)||Pl||(Pl=!0,Tb(Mc,function(){return ki(),null})),s=(r.flags&15990)!==0,r.subtreeFlags&15990||s){s=Xt.transition,Xt.transition=null;var a=Se;Se=1;var l=be;be|=4,_m.current=null,OM(e,r),kb(r,e),aM(xh),Ac=!!yh,xh=yh=null,e.current=r,$M(r),fj(),be=l,Se=a,Xt.transition=s}else e.current=r;if(Pl&&(Pl=!1,jr=e,Xc=i),s=e.pendingLanes,s===0&&($r=null),mj(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=zh,zh=null,e;return Xc&1&&e.tag!==0&&ki(),s=e.pendingLanes,s&1?e===Fh?Gs++:(Gs=0,Fh=e):Gs=0,qr(),null}function ki(){if(jr!==null){var e=uw(Xc),n=Xt.transition,r=Se;try{if(Xt.transition=null,Se=16>e?16:e,jr===null)var o=!1;else{if(e=jr,jr=null,Xc=0,be&6)throw Error(Z(331));var i=be;for(be|=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:Vs(8,f,s)}var d=f.child;if(d!==null)d.return=f,oe=d;else for(;oe!==null;){f=oe;var h=f.sibling,g=f.return;if(bb(f),f===u){oe=null;break}if(h!==null){h.return=g,oe=h;break}oe=g}}}var v=s.alternate;if(v!==null){var b=v.child;if(b!==null){v.child=null;do{var _=b.sibling;b.sibling=null,b=_}while(b!==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:Vs(9,s,s.return)}var m=s.sibling;if(m!==null){m.return=s.return,oe=m;break e}oe=s.return}}var w=e.current;for(oe=w;oe!==null;){a=oe;var y=a.child;if(a.subtreeFlags&2064&&y!==null)y.return=a,oe=y;else e:for(a=w;oe!==null;){if(l=oe,l.flags&2048)try{switch(l.tag){case 0:case 11:case 15:Uu(9,l)}}catch(k){ze(l,l.return,k)}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(be=i,qr(),Pn&&typeof Pn.onPostCommitFiberRoot=="function")try{Pn.onPostCommitFiberRoot(Ou,e)}catch{}o=!0}return o}finally{Se=r,Xt.transition=n}}return!1}function wv(e,n,r){n=Oi(r,n),n=ub(e,n,1),e=Or(e,n,1),n=ut(),e!==null&&(Ta(e,1,n),bt(e,n))}function ze(e,n,r){if(e.tag===3)wv(e,e,r);else for(;n!==null;){if(n.tag===3){wv(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=Oi(r,e),e=db(n,e,1),n=Or(n,e,1),e=ut(),n!==null&&(Ta(n,1,e),bt(n,e));break}}n=n.return}}function HM(e,n,r){var o=e.pingCache;o!==null&&o.delete(n),n=ut(),e.pingedLanes|=e.suspendedLanes&r,Ke===e&&(Ze&r)===r&&(Ge===4||Ge===3&&(Ze&130023424)===Ze&&500>Fe()-km?xo(e,0):Sm|=r),bt(e,n)}function Rb(e,n){n===0&&(e.mode&1?(n=yl,yl<<=1,!(yl&130023424)&&(yl=4194304)):n=1);var r=ut();e=nr(e,n),e!==null&&(Ta(e,n,r),bt(e,r))}function UM(e){var n=e.memoizedState,r=0;n!==null&&(r=n.retryLane),Rb(e,r)}function VM(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(Z(314))}o!==null&&o.delete(n),Rb(e,r)}var Ab;Ab=function(e,n,r){if(e!==null)if(e.memoizedProps!==n.pendingProps||xt.current)vt=!0;else{if(!(e.lanes&r)&&!(n.flags&128))return vt=!1,RM(e,n,r);vt=!!(e.flags&131072)}else vt=!1,Re&&n.flags&1048576&&$w(n,zc,n.index);switch(n.lanes=0,n.tag){case 2:var o=n.type;fc(e,n),e=n.pendingProps;var i=Ri(n,at.current);Si(n,r),i=vm(null,n,o,e,i,r);var s=ym();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,fm(n),i.updater=Hu,n.stateNode=i,i._reactInternals=n,Ph(n,o,e,r),n=Rh(null,n,o,!0,s,r)):(n.tag=0,Re&&s&&im(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=GM(o),e=rn(o,e),i){case 0:n=Mh(null,n,o,e,r);break e;case 1:n=uv(null,n,o,e,r);break e;case 11:n=lv(null,n,o,e,r);break e;case 14:n=cv(null,n,o,rn(o.type,e),r);break e}throw Error(Z(306,o,""))}return n;case 0:return o=n.type,i=n.pendingProps,i=n.elementType===o?i:rn(o,i),Mh(e,n,o,i,r);case 1:return o=n.type,i=n.pendingProps,i=n.elementType===o?i:rn(o,i),uv(e,n,o,i,r);case 3:e:{if(mb(n),e===null)throw Error(Z(387));o=n.pendingProps,s=n.memoizedState,i=s.element,Hw(e,n),Hc(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=Oi(Error(Z(423)),n),n=dv(e,n,o,r,i);break e}else if(o!==i){i=Oi(Error(Z(424)),n),n=dv(e,n,o,r,i);break e}else for(Rt=Ir(n.stateNode.containerInfo.firstChild),At=n,Re=!0,an=null,r=Fw(n,null,o,r),n.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(Ai(),o===i){n=rr(e,n,r);break e}lt(e,n,o,r)}n=n.child}return n;case 5:return Uw(n),e===null&&Ch(n),o=n.type,i=n.pendingProps,s=e!==null?e.memoizedProps:null,a=i.children,wh(o,i)?a=null:s!==null&&wh(o,s)&&(n.flags|=32),pb(e,n),lt(e,n,a,r),n.child;case 6:return e===null&&Ch(n),null;case 13:return gb(e,n,r);case 4:return hm(n,n.stateNode.containerInfo),o=n.pendingProps,e===null?n.child=Ti(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),lv(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(pn(s.value,a)){if(s.children===i.children&&!xt.current){n=rr(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),Nh(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(Z(341));a.lanes|=r,l=a.alternate,l!==null&&(l.lanes|=r),Nh(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,Si(n,r),i=qt(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),cv(e,n,o,i,r);case 15:return fb(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,Si(n,r),cb(n,o,i),Ph(n,o,i,r),Rh(null,n,o,!0,e,r);case 19:return vb(e,n,r);case 22:return hb(e,n,r)}throw Error(Z(156,n.tag))};function Tb(e,n){return sw(e,n)}function WM(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 Yt(e,n,r,o){return new WM(e,n,r,o)}function Pm(e){return e=e.prototype,!(!e||!e.isReactComponent)}function GM(e){if(typeof e=="function")return Pm(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Yp)return 11;if(e===Xp)return 14}return 2}function Lr(e,n){var r=e.alternate;return r===null?(r=Yt(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")Pm(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case si:return wo(r.children,i,s,n);case Gp:a=8,i|=8;break;case Zf:return e=Yt(12,r,n,i|2),e.elementType=Zf,e.lanes=s,e;case Jf:return e=Yt(13,r,n,i),e.elementType=Jf,e.lanes=s,e;case eh:return e=Yt(19,r,n,i),e.elementType=eh,e.lanes=s,e;case U1:return Wu(r,i,s,n);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case B1:a=10;break e;case H1:a=9;break e;case Yp:a=11;break e;case Xp:a=14;break e;case _r:a=16,o=null;break e}throw Error(Z(130,e==null?e:typeof e,""))}return n=Yt(a,r,n,i),n.elementType=e,n.type=o,n.lanes=s,n}function wo(e,n,r,o){return e=Yt(7,e,o,n),e.lanes=r,e}function Wu(e,n,r,o){return e=Yt(22,e,o,n),e.elementType=U1,e.lanes=r,e.stateNode={isHidden:!1},e}function pf(e,n,r){return e=Yt(6,e,null,n),e.lanes=r,e}function mf(e,n,r){return n=Yt(4,e.children!==null?e.children:[],e.key,n),n.lanes=r,n.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},n}function YM(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=Xd(0),this.expirationTimes=Xd(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Xd(0),this.identifierPrefix=o,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function jm(e,n,r,o,i,s,a,l,c){return e=new YM(e,n,r,l,c),n===1?(n=1,s===!0&&(n|=8)):n=0,s=Yt(3,null,null,n),e.current=s,s.stateNode=e,s.memoizedState={element:o,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},fm(s),e}function XM(e,n,r){var o=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:ii,key:o==null?null:""+o,children:e,containerInfo:n,implementation:r}}function Ib(e){if(!e)return Ur;e=e._reactInternals;e:{if(zo(e)!==e||e.tag!==1)throw Error(Z(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(Z(171))}if(e.tag===1){var r=e.type;if(wt(r))return Iw(e,r,n)}return n}function Ob(e,n,r,o,i,s,a,l,c){return e=jm(r,o,!0,e,i,s,a,l,c),e.context=Ib(null),r=e.current,o=ut(),i=Dr(r),s=Qn(o,i),s.callback=n??null,Or(r,s,i),e.current.lanes=i,Ta(e,i,o),bt(e,o),e}function Gu(e,n,r,o){var i=n.current,s=ut(),a=Dr(i);return r=Ib(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=Or(i,n,a),e!==null&&(hn(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 bv(e,n){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var r=e.retryLane;e.retryLane=r!==0&&r<n?r:n}}function Mm(e,n){bv(e,n),(e=e.alternate)&&bv(e,n)}function KM(){return null}var $b=typeof reportError=="function"?reportError:function(e){console.error(e)};function Rm(e){this._internalRoot=e}Yu.prototype.render=Rm.prototype.render=function(e){var n=this._internalRoot;if(n===null)throw Error(Z(409));Gu(e,n,null,null)};Yu.prototype.unmount=Rm.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var n=e.containerInfo;Po(function(){Gu(null,e,null,null)}),n[tr]=null}};function Yu(e){this._internalRoot=e}Yu.prototype.unstable_scheduleHydration=function(e){if(e){var n=hw();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&&mw(e)}};function Am(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 _v(){}function qM(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=Ob(n,o,e,0,null,!1,!1,"",_v);return e._reactRootContainer=a,e[tr]=a.current,aa(e.nodeType===8?e.parentNode:e),Po(),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=jm(e,0,!1,null,null,!1,!1,"",_v);return e._reactRootContainer=c,e[tr]=c.current,aa(e.nodeType===8?e.parentNode:e),Po(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=qM(r,n,e,i,o);return qc(a)}dw=function(e){switch(e.tag){case 3:var n=e.stateNode;if(n.current.memoizedState.isDehydrated){var r=Ms(n.pendingLanes);r!==0&&(Qp(n,r|1),bt(n,Fe()),!(be&6)&&($i=Fe()+500,qr()))}break;case 13:Po(function(){var o=nr(e,1);if(o!==null){var i=ut();hn(o,e,1,i)}}),Mm(e,1)}};Zp=function(e){if(e.tag===13){var n=nr(e,134217728);if(n!==null){var r=ut();hn(n,e,134217728,r)}Mm(e,134217728)}};fw=function(e){if(e.tag===13){var n=Dr(e),r=nr(e,n);if(r!==null){var o=ut();hn(r,e,n,o)}Mm(e,n)}};hw=function(){return Se};pw=function(e,n){var r=Se;try{return Se=e,n()}finally{Se=r}};uh=function(e,n,r){switch(n){case"input":if(rh(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(Z(90));W1(o),rh(o,i)}}}break;case"textarea":Y1(e,r);break;case"select":n=r.value,n!=null&&xi(e,!!r.multiple,n,!1)}};ew=Cm;tw=Po;var QM={usingClientEntryPoint:!1,Events:[Oa,ui,zu,Z1,J1,Cm]},gs={findFiberByHostInstance:po,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},ZM={bundleType:gs.bundleType,version:gs.version,rendererPackageName:gs.rendererPackageName,rendererConfig:gs.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:ar.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=ow(e),e===null?null:e.stateNode},findFiberByHostInstance:gs.findFiberByHostInstance||KM,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{Ou=jl.inject(ZM),Pn=jl}catch{}}Dt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=QM;Dt.createPortal=function(e,n){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Am(n))throw Error(Z(200));return XM(e,n,null,r)};Dt.createRoot=function(e,n){if(!Am(e))throw Error(Z(299));var r=!1,o="",i=$b;return n!=null&&(n.unstable_strictMode===!0&&(r=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onRecoverableError!==void 0&&(i=n.onRecoverableError)),n=jm(e,1,!1,null,null,r,!1,o,i),e[tr]=n.current,aa(e.nodeType===8?e.parentNode:e),new Rm(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(Z(188)):(e=Object.keys(e).join(","),Error(Z(268,e)));return e=ow(n),e=e===null?null:e.stateNode,e};Dt.flushSync=function(e){return Po(e)};Dt.hydrate=function(e,n,r){if(!Xu(n))throw Error(Z(200));return Ku(null,e,n,!0,r)};Dt.hydrateRoot=function(e,n,r){if(!Am(e))throw Error(Z(405));var o=r!=null&&r.hydratedSources||null,i=!1,s="",a=$b;if(r!=null&&(r.unstable_strictMode===!0&&(i=!0),r.identifierPrefix!==void 0&&(s=r.identifierPrefix),r.onRecoverableError!==void 0&&(a=r.onRecoverableError)),n=Ob(n,null,e,1,r??null,i,!1,s,a),e[tr]=n.current,aa(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(Z(200));return Ku(null,e,n,!1,r)};Dt.unmountComponentAtNode=function(e){if(!Xu(e))throw Error(Z(40));return e._reactRootContainer?(Po(function(){Ku(null,null,e,!1,function(){e._reactRootContainer=null,e[tr]=null})}),!0):!1};Dt.unstable_batchedUpdates=Cm;Dt.unstable_renderSubtreeIntoContainer=function(e,n,r,o){if(!Xu(r))throw Error(Z(200));if(e==null||e._reactInternals===void 0)throw Error(Z(38));return Ku(e,n,r,!1,o)};Dt.version="18.3.1-next-f1338f8080-20240426";function Db(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Db)}catch(e){console.error(e)}}Db(),D1.exports=Dt;var es=D1.exports;const JM=Au(es);var Sv=es;qf.createRoot=Sv.createRoot,qf.hydrateRoot=Sv.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 ga(){return ga=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},ga.apply(this,arguments)}var Mr;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(Mr||(Mr={}));const kv="popstate";function e5(e){e===void 0&&(e={});function n(o,i){let{pathname:s,search:a,hash:l}=o.location;return Uh("",{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:Qc(i)}return n5(n,r,null,e)}function De(e,n){if(e===!1||e===null||typeof e>"u")throw new Error(n)}function Tm(e,n){if(!e){typeof console<"u"&&console.warn(n);try{throw new Error(n)}catch{}}}function t5(){return Math.random().toString(36).substr(2,8)}function Cv(e,n){return{usr:e.state,key:e.key,idx:n}}function Uh(e,n,r,o){return r===void 0&&(r=null),ga({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof n=="string"?ts(n):n,{state:r,key:n&&n.key||o||t5()})}function Qc(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 ts(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 n5(e,n,r,o){o===void 0&&(o={});let{window:i=document.defaultView,v5Compat:s=!1}=o,a=i.history,l=Mr.Pop,c=null,u=f();u==null&&(u=0,a.replaceState(ga({},a.state,{idx:u}),""));function f(){return(a.state||{idx:null}).idx}function d(){l=Mr.Pop;let _=f(),m=_==null?null:_-u;u=_,c&&c({action:l,location:b.location,delta:m})}function h(_,m){l=Mr.Push;let w=Uh(b.location,_,m);u=f()+1;let y=Cv(w,u),S=b.createHref(w);try{a.pushState(y,"",S)}catch(k){if(k instanceof DOMException&&k.name==="DataCloneError")throw k;i.location.assign(S)}s&&c&&c({action:l,location:b.location,delta:1})}function g(_,m){l=Mr.Replace;let w=Uh(b.location,_,m);u=f();let y=Cv(w,u),S=b.createHref(w);a.replaceState(y,"",S),s&&c&&c({action:l,location:b.location,delta:0})}function v(_){let m=i.location.origin!=="null"?i.location.origin:i.location.href,w=typeof _=="string"?_:Qc(_);return w=w.replace(/ $/,"%20"),De(m,"No window.location.(origin|href) available to create URL for href: "+w),new URL(w,m)}let b={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(kv,d),c=_,()=>{i.removeEventListener(kv,d),c=null}},createHref(_){return n(i,_)},createURL:v,encodeLocation(_){let m=v(_);return{pathname:m.pathname,search:m.search,hash:m.hash}},push:h,replace:g,go(_){return a.go(_)}};return b}var Nv;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(Nv||(Nv={}));function r5(e,n,r){return r===void 0&&(r="/"),o5(e,n,r)}function o5(e,n,r,o){let i=typeof n=="string"?ts(n):n,s=Di(i.pathname||"/",r);if(s==null)return null;let a=Lb(e);i5(a);let l=null;for(let c=0;l==null&&c<a.length;++c){let u=g5(s);l=p5(a[c],u)}return l}function Lb(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=zr([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+'".')),Lb(s.children,n,f,u)),!(s.path==null&&!s.index)&&n.push({path:u,score:f5(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 zb(s.path))i(s,a,c)}),n}function zb(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=zb(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 i5(e){e.sort((n,r)=>n.score!==r.score?r.score-n.score:h5(n.routesMeta.map(o=>o.childrenIndex),r.routesMeta.map(o=>o.childrenIndex)))}const s5=/^:[\w-]+$/,a5=3,l5=2,c5=1,u5=10,d5=-2,Ev=e=>e==="*";function f5(e,n){let r=e.split("/"),o=r.length;return r.some(Ev)&&(o+=d5),n&&(o+=l5),r.filter(i=>!Ev(i)).reduce((i,s)=>i+(s5.test(s)?a5:s===""?c5:u5),o)}function h5(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 p5(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=Vh({path:c.relativePath,caseSensitive:c.caseSensitive,end:u},f),h=c.route;if(!d)return null;Object.assign(i,d.params),a.push({params:i,pathname:zr([s,d.pathname]),pathnameBase:b5(zr([s,d.pathnameBase])),route:h}),d.pathnameBase!=="/"&&(s=zr([s,d.pathnameBase]))}return a}function Vh(e,n){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,o]=m5(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:h,isOptional:g}=f;if(h==="*"){let b=l[d]||"";a=s.slice(0,s.length-b.length).replace(/(.)\/+$/,"$1")}const v=l[d];return g&&!v?u[h]=void 0:u[h]=(v||"").replace(/%2F/g,"/"),u},{}),pathname:s,pathnameBase:a,pattern:e}}function m5(e,n,r){n===void 0&&(n=!1),r===void 0&&(r=!0),Tm(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 g5(e){try{return e.split("/").map(n=>decodeURIComponent(n).replace(/\//g,"%2F")).join("/")}catch(n){return Tm(!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 Di(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 v5=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,y5=e=>v5.test(e);function x5(e,n){n===void 0&&(n="/");let{pathname:r,search:o="",hash:i=""}=typeof e=="string"?ts(e):e,s;if(r)if(y5(r))s=r;else{if(r.includes("//")){let a=r;r=r.replace(/\/\/+/g,"/"),Tm(!1,"Pathnames cannot have embedded double slashes - normalizing "+(a+" -> "+r))}r.startsWith("/")?s=Pv(r.substring(1),"/"):s=Pv(r,n)}else s=n;return{pathname:s,search:_5(o),hash:S5(i)}}function Pv(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 gf(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 w5(e){return e.filter((n,r)=>r===0||n.route.path&&n.route.path.length>0)}function Im(e,n){let r=w5(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=ts(e):(i=ga({},e),De(!i.pathname||!i.pathname.includes("?"),gf("?","pathname","search",i)),De(!i.pathname||!i.pathname.includes("#"),gf("#","pathname","hash",i)),De(!i.search||!i.search.includes("#"),gf("#","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 h=a.split("/");for(;h[0]==="..";)h.shift(),d-=1;i.pathname=h.join("/")}l=d>=0?n[d]:"/"}let c=x5(i,l),u=a&&a!=="/"&&a.endsWith("/"),f=(s||a===".")&&r.endsWith("/");return!c.pathname.endsWith("/")&&(u||f)&&(c.pathname+="/"),c}const zr=e=>e.join("/").replace(/\/\/+/g,"/"),b5=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),_5=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,S5=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function k5(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const Fb=["post","put","patch","delete"];new Set(Fb);const C5=["get",...Fb];new Set(C5);/**
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 va(){return va=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},va.apply(this,arguments)}const qu=x.createContext(null),Bb=x.createContext(null),lr=x.createContext(null),Qu=x.createContext(null),Qr=x.createContext({outlet:null,matches:[],isDataRoute:!1}),Hb=x.createContext(null);function N5(e,n){let{relative:r}=n===void 0?{}:n;ns()||De(!1);let{basename:o,navigator:i}=x.useContext(lr),{hash:s,pathname:a,search:l}=Zu(e,{relative:r}),c=a;return o!=="/"&&(c=a==="/"?o:zr([o,a])),i.createHref({pathname:c,search:l,hash:s})}function ns(){return x.useContext(Qu)!=null}function rs(){return ns()||De(!1),x.useContext(Qu).location}function Ub(e){x.useContext(lr).static||x.useLayoutEffect(e)}function Vb(){let{isDataRoute:e}=x.useContext(Qr);return e?z5():E5()}function E5(){ns()||De(!1);let e=x.useContext(qu),{basename:n,future:r,navigator:o}=x.useContext(lr),{matches:i}=x.useContext(Qr),{pathname:s}=rs(),a=JSON.stringify(Im(i,r.v7_relativeSplatPath)),l=x.useRef(!1);return Ub(()=>{l.current=!0}),x.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:zr([n,d.pathname])),(f.replace?o.replace:o.push)(d,f.state,f)},[n,o,a,s,e])}function Zu(e,n){let{relative:r}=n===void 0?{}:n,{future:o}=x.useContext(lr),{matches:i}=x.useContext(Qr),{pathname:s}=rs(),a=JSON.stringify(Im(i,o.v7_relativeSplatPath));return x.useMemo(()=>Om(e,JSON.parse(a),s,r==="path"),[e,a,s,r])}function P5(e,n){return j5(e,n)}function j5(e,n,r,o){ns()||De(!1);let{navigator:i}=x.useContext(lr),{matches:s}=x.useContext(Qr),a=s[s.length-1],l=a?a.params:{};a&&a.pathname;let c=a?a.pathnameBase:"/";a&&a.route;let u=rs(),f;if(n){var d;let _=typeof n=="string"?ts(n):n;c==="/"||(d=_.pathname)!=null&&d.startsWith(c)||De(!1),f=_}else f=u;let h=f.pathname||"/",g=h;if(c!=="/"){let _=c.replace(/^\//,"").split("/");g="/"+h.replace(/^\//,"").split("/").slice(_.length).join("/")}let v=r5(e,{pathname:g}),b=I5(v&&v.map(_=>Object.assign({},_,{params:Object.assign({},l,_.params),pathname:zr([c,i.encodeLocation?i.encodeLocation(_.pathname).pathname:_.pathname]),pathnameBase:_.pathnameBase==="/"?c:zr([c,i.encodeLocation?i.encodeLocation(_.pathnameBase).pathname:_.pathnameBase])})),s,r,o);return n&&b?x.createElement(Qu.Provider,{value:{location:va({pathname:"/",search:"",hash:"",state:null,key:"default"},f),navigationType:Mr.Pop}},b):b}function M5(){let e=L5(),n=k5(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 x.createElement(x.Fragment,null,x.createElement("h2",null,"Unexpected Application Error!"),x.createElement("h3",{style:{fontStyle:"italic"}},n),r?x.createElement("pre",{style:i},r):null,null)}const R5=x.createElement(M5,null);class A5 extends x.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?x.createElement(Qr.Provider,{value:this.props.routeContext},x.createElement(Hb.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function T5(e){let{routeContext:n,match:r,children:o}=e,i=x.useContext(qu);return i&&i.static&&i.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=r.route.id),x.createElement(Qr.Provider,{value:n},o)}function I5(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:h,errors:g}=r,v=d.route.loader&&h[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,h)=>{let g,v=!1,b=null,_=null;r&&(g=l&&d.route.id?l[d.route.id]:void 0,b=d.route.errorElement||R5,c&&(u<0&&h===0?(F5("route-fallback"),v=!0,_=null):u===h&&(v=!0,_=d.route.hydrateFallbackElement||null)));let m=n.concat(a.slice(0,h+1)),w=()=>{let y;return g?y=b:v?y=_:d.route.Component?y=x.createElement(d.route.Component,null):d.route.element?y=d.route.element:y=f,x.createElement(T5,{match:d,routeContext:{outlet:f,matches:m,isDataRoute:r!=null},children:y})};return r&&(d.route.ErrorBoundary||d.route.errorElement||h===0)?x.createElement(A5,{location:r.location,revalidation:r.revalidation,component:b,error:g,children:w(),routeContext:{outlet:null,matches:m,isDataRoute:!0}}):w()},null)}var Wb=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(Wb||{}),Gb=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}(Gb||{});function O5(e){let n=x.useContext(qu);return n||De(!1),n}function $5(e){let n=x.useContext(Bb);return n||De(!1),n}function D5(e){let n=x.useContext(Qr);return n||De(!1),n}function Yb(e){let n=D5(),r=n.matches[n.matches.length-1];return r.route.id||De(!1),r.route.id}function L5(){var e;let n=x.useContext(Hb),r=$5(),o=Yb();return n!==void 0?n:(e=r.errors)==null?void 0:e[o]}function z5(){let{router:e}=O5(Wb.UseNavigateStable),n=Yb(Gb.UseNavigateStable),r=x.useRef(!1);return Ub(()=>{r.current=!0}),x.useCallback(function(i,s){s===void 0&&(s={}),r.current&&(typeof i=="number"?e.navigate(i):e.navigate(i,va({fromRouteId:n},s)))},[e,n])}const jv={};function F5(e,n,r){jv[e]||(jv[e]=!0)}function B5(e,n){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function H5(e){let{to:n,replace:r,state:o,relative:i}=e;ns()||De(!1);let{future:s,static:a}=x.useContext(lr),{matches:l}=x.useContext(Qr),{pathname:c}=rs(),u=Vb(),f=Om(n,Im(l,s.v7_relativeSplatPath),c,i==="path"),d=JSON.stringify(f);return x.useEffect(()=>u(JSON.parse(d),{replace:r,state:o,relative:i}),[u,d,i,r,o]),null}function Un(e){De(!1)}function U5(e){let{basename:n="/",children:r=null,location:o,navigationType:i=Mr.Pop,navigator:s,static:a=!1,future:l}=e;ns()&&De(!1);let c=n.replace(/^\/*/,"/"),u=x.useMemo(()=>({basename:c,navigator:s,static:a,future:va({v7_relativeSplatPath:!1},l)}),[c,l,s,a]);typeof o=="string"&&(o=ts(o));let{pathname:f="/",search:d="",hash:h="",state:g=null,key:v="default"}=o,b=x.useMemo(()=>{let _=Di(f,c);return _==null?null:{location:{pathname:_,search:d,hash:h,state:g,key:v},navigationType:i}},[c,f,d,h,g,v,i]);return b==null?null:x.createElement(lr.Provider,{value:u},x.createElement(Qu.Provider,{children:r,value:b}))}function V5(e){let{children:n,location:r}=e;return P5(Wh(n),r)}new Promise(()=>{});function Wh(e,n){n===void 0&&(n=[]);let r=[];return x.Children.forEach(e,(o,i)=>{if(!x.isValidElement(o))return;let s=[...n,i];if(o.type===x.Fragment){r.push.apply(r,Wh(o.props.children,s));return}o.type!==Un&&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=Wh(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 Zc(){return Zc=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},Zc.apply(this,arguments)}function Xb(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 W5(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function G5(e,n){return e.button===0&&(!n||n==="_self")&&!W5(e)}const Y5=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],X5=["aria-current","caseSensitive","className","end","style","to","viewTransition","children"],K5="6";try{window.__reactRouterVersion=K5}catch{}const q5=x.createContext({isTransitioning:!1}),Q5="startTransition",Mv=Iu[Q5];function Z5(e){let{basename:n,children:r,future:o,window:i}=e,s=x.useRef();s.current==null&&(s.current=e5({window:i,v5Compat:!0}));let a=s.current,[l,c]=x.useState({action:a.action,location:a.location}),{v7_startTransition:u}=o||{},f=x.useCallback(d=>{u&&Mv?Mv(()=>c(d)):c(d)},[c,u]);return x.useLayoutEffect(()=>a.listen(f),[a,f]),x.useEffect(()=>B5(o),[o]),x.createElement(U5,{basename:n,children:r,location:l.location,navigationType:l.action,navigator:a,future:o})}const J5=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",e3=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,t3=x.forwardRef(function(n,r){let{onClick:o,relative:i,reloadDocument:s,replace:a,state:l,target:c,to:u,preventScrollReset:f,viewTransition:d}=n,h=Xb(n,Y5),{basename:g}=x.useContext(lr),v,b=!1;if(typeof u=="string"&&e3.test(u)&&(v=u,J5))try{let y=new URL(window.location.href),S=u.startsWith("//")?new URL(y.protocol+u):new URL(u),k=Di(S.pathname,g);S.origin===y.origin&&k!=null?u=k+S.search+S.hash:b=!0}catch{}let _=N5(u,{relative:i}),m=o3(u,{replace:a,state:l,target:c,preventScrollReset:f,relative:i,viewTransition:d});function w(y){o&&o(y),y.defaultPrevented||m(y)}return x.createElement("a",Zc({},h,{href:v||_,onClick:b||s?o:w,ref:r,target:c}))}),n3=x.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=Xb(n,X5),h=Zu(c,{relative:d.relative}),g=rs(),v=x.useContext(Bb),{navigator:b,basename:_}=x.useContext(lr),m=v!=null&&i3(h)&&u===!0,w=b.encodeLocation?b.encodeLocation(h).pathname:h.pathname,y=g.pathname,S=v&&v.navigation&&v.navigation.location?v.navigation.location.pathname:null;i||(y=y.toLowerCase(),S=S?S.toLowerCase():null,w=w.toLowerCase()),S&&_&&(S=Di(S,_)||S);const k=w!=="/"&&w.endsWith("/")?w.length-1:w.length;let C=y===w||!a&&y.startsWith(w)&&y.charAt(k)==="/",N=S!=null&&(S===w||!a&&S.startsWith(w)&&S.charAt(w.length)==="/"),E={isActive:C,isPending:N,isTransitioning:m},P=C?o:void 0,A;typeof s=="function"?A=s(E):A=[s,C?"active":null,N?"pending":null,m?"transitioning":null].filter(Boolean).join(" ");let T=typeof l=="function"?l(E):l;return x.createElement(t3,Zc({},d,{"aria-current":P,className:A,ref:r,style:T,to:c,viewTransition:u}),typeof f=="function"?f(E):f)});var Gh;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(Gh||(Gh={}));var Rv;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(Rv||(Rv={}));function r3(e){let n=x.useContext(qu);return n||De(!1),n}function o3(e,n){let{target:r,replace:o,state:i,preventScrollReset:s,relative:a,viewTransition:l}=n===void 0?{}:n,c=Vb(),u=rs(),f=Zu(e,{relative:a});return x.useCallback(d=>{if(G5(d,r)){d.preventDefault();let h=o!==void 0?o:Qc(u)===Qc(f);c(e,{replace:h,state:i,preventScrollReset:s,relative:a,viewTransition:l})}},[u,c,f,o,i,r,e,s,a,l])}function i3(e,n){n===void 0&&(n={});let r=x.useContext(q5);r==null&&De(!1);let{basename:o}=r3(Gh.useViewTransitionState),i=Zu(e,{relative:n.relative});if(!r.isTransitioning)return!1;let s=Di(r.currentLocation.pathname,o)||r.currentLocation.pathname,a=Di(r.nextLocation.pathname,o)||r.nextLocation.pathname;return Vh(i.pathname,a)!=null||Vh(i.pathname,s)!=null}const Kb=x.createContext({theme:"system",resolvedTheme:"light",setTheme:()=>{}});function s3(){return x.useContext(Kb)}function a3(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function Av(e){return e==="system"?a3():e}function l3({children:e}){const[n,r]=x.useState(()=>localStorage.getItem("launchpod-theme")||"system"),[o,i]=x.useState(()=>Av(localStorage.getItem("launchpod-theme")||"system")),s=x.useCallback(l=>{const c=Av(l);i(c),document.documentElement.classList.toggle("dark",c==="dark")},[]),a=x.useCallback(l=>{r(l),localStorage.setItem("launchpod-theme",l),s(l)},[s]);return x.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]),p.jsx(Kb.Provider,{value:{theme:n,resolvedTheme:o,setTheme:a},children:e})}function qb(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=qb(e[n]))&&(o&&(o+=" "),o+=r)}else for(r in e)e[r]&&(o&&(o+=" "),o+=r);return o}function Qb(){for(var e,n,r=0,o="",i=arguments.length;r<i;r++)(e=arguments[r])&&(n=qb(e))&&(o&&(o+=" "),o+=n);return o}const c3=(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},u3=(e,n)=>({classGroupId:e,validator:n}),Zb=(e=new Map,n=null,r)=>({nextPart:e,validators:n,classGroupId:r}),Jc="-",Tv=[],d3="arbitrary..",f3=e=>{const n=p3(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:a=>{if(a.startsWith("[")&&a.endsWith("]"))return h3(a);const l=a.split(Jc),c=l[0]===""&&l.length>1?1:0;return Jb(l,c,n)},getConflictingClassGroupIds:(a,l)=>{if(l){const c=o[a],u=r[a];return c?u?c3(u,c):c:u||Tv}return r[a]||Tv}}},Jb=(e,n,r)=>{if(e.length-n===0)return r.classGroupId;const i=e[n],s=r.nextPart.get(i);if(s){const u=Jb(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}},h3=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?d3+o:void 0})(),p3=e=>{const{theme:n,classGroups:r}=e;return m3(r,n)},m3=(e,n)=>{const r=Zb();for(const o in e){const i=e[o];$m(i,r,o,n)}return r},$m=(e,n,r,o)=>{const i=e.length;for(let s=0;s<i;s++){const a=e[s];g3(a,n,r,o)}},g3=(e,n,r,o)=>{if(typeof e=="string"){v3(e,n,r);return}if(typeof e=="function"){y3(e,n,r,o);return}x3(e,n,r,o)},v3=(e,n,r)=>{const o=e===""?n:e_(n,e);o.classGroupId=r},y3=(e,n,r,o)=>{if(w3(e)){$m(e(o),n,r,o);return}n.validators===null&&(n.validators=[]),n.validators.push(u3(r,e))},x3=(e,n,r,o)=>{const i=Object.entries(e),s=i.length;for(let a=0;a<s;a++){const[l,c]=i[a];$m(c,e_(n,l),r,o)}},e_=(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=Zb(),r.nextPart.set(a,l)),r=l}return r},w3=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,b3=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)}}},Yh="!",Iv=":",_3=[],Ov=(e,n,r,o,i)=>({modifiers:e,hasImportantModifier:n,baseClassName:r,maybePostfixModifierPosition:o,isExternal:i}),S3=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 b=0;b<f;b++){const _=i[b];if(a===0&&l===0){if(_===Iv){s.push(i.slice(c,b)),c=b+1;continue}if(_==="/"){u=b;continue}}_==="["?a++:_==="]"?a--:_==="("?l++:_===")"&&l--}const d=s.length===0?i:i.slice(c);let h=d,g=!1;d.endsWith(Yh)?(h=d.slice(0,-1),g=!0):d.startsWith(Yh)&&(h=d.slice(1),g=!0);const v=u&&u>c?u-c:void 0;return Ov(s,g,h,v)};if(n){const i=n+Iv,s=o;o=a=>a.startsWith(i)?s(a.slice(i.length)):Ov(_3,!1,a,void 0,!0)}if(r){const i=o;o=s=>r({className:s,parseClassName:i})}return o},k3=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}},C3=e=>({cache:b3(e.cacheSize),parseClassName:S3(e),sortModifiers:k3(e),...f3(e)}),N3=/\s+/,E3=(e,n)=>{const{parseClassName:r,getClassGroupId:o,getConflictingClassGroupIds:i,sortModifiers:s}=n,a=[],l=e.trim().split(N3);let c="";for(let u=l.length-1;u>=0;u-=1){const f=l[u],{isExternal:d,modifiers:h,hasImportantModifier:g,baseClassName:v,maybePostfixModifierPosition:b}=r(f);if(d){c=f+(c.length>0?" "+c:c);continue}let _=!!b,m=o(_?v.substring(0,b):v);if(!m){if(!_){c=f+(c.length>0?" "+c:c);continue}if(m=o(v),!m){c=f+(c.length>0?" "+c:c);continue}_=!1}const w=h.length===0?"":h.length===1?h[0]:s(h).join(":"),y=g?w+Yh:w,S=y+m;if(a.indexOf(S)>-1)continue;a.push(S);const k=i(m,_);for(let C=0;C<k.length;++C){const N=k[C];a.push(y+N)}c=f+(c.length>0?" "+c:c)}return c},P3=(...e)=>{let n=0,r,o,i="";for(;n<e.length;)(r=e[n++])&&(o=t_(r))&&(i&&(i+=" "),i+=o);return i},t_=e=>{if(typeof e=="string")return e;let n,r="";for(let o=0;o<e.length;o++)e[o]&&(n=t_(e[o]))&&(r&&(r+=" "),r+=n);return r},j3=(e,...n)=>{let r,o,i,s;const a=c=>{const u=n.reduce((f,d)=>d(f),e());return r=C3(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=E3(c,r);return i(c,f),f};return s=a,(...c)=>s(P3(...c))},M3=[],Ve=e=>{const n=r=>r[e]||M3;return n.isThemeGetter=!0,n},n_=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,r_=/^\((?:(\w[\w-]*):)?(.+)\)$/i,R3=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,A3=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,T3=/\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$/,I3=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,O3=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,$3=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,mr=e=>R3.test(e),ge=e=>!!e&&!Number.isNaN(Number(e)),gr=e=>!!e&&Number.isInteger(Number(e)),vf=e=>e.endsWith("%")&&ge(e.slice(0,-1)),Ln=e=>A3.test(e),o_=()=>!0,D3=e=>T3.test(e)&&!I3.test(e),Dm=()=>!1,L3=e=>O3.test(e),z3=e=>$3.test(e),F3=e=>!ie(e)&&!se(e),B3=e=>Zr(e,a_,Dm),ie=e=>n_.test(e),ao=e=>Zr(e,l_,D3),$v=e=>Zr(e,K3,ge),H3=e=>Zr(e,u_,o_),U3=e=>Zr(e,c_,Dm),Dv=e=>Zr(e,i_,Dm),V3=e=>Zr(e,s_,z3),Ml=e=>Zr(e,d_,L3),se=e=>r_.test(e),vs=e=>Fo(e,l_),W3=e=>Fo(e,c_),Lv=e=>Fo(e,i_),G3=e=>Fo(e,a_),Y3=e=>Fo(e,s_),Rl=e=>Fo(e,d_,!0),X3=e=>Fo(e,u_,!0),Zr=(e,n,r)=>{const o=n_.exec(e);return o?o[1]?n(o[1]):r(o[2]):!1},Fo=(e,n,r=!1)=>{const o=r_.exec(e);return o?o[1]?n(o[1]):r:!1},i_=e=>e==="position"||e==="percentage",s_=e=>e==="image"||e==="url",a_=e=>e==="length"||e==="size"||e==="bg-size",l_=e=>e==="length",K3=e=>e==="number",c_=e=>e==="family-name",u_=e=>e==="number"||e==="weight",d_=e=>e==="shadow",q3=()=>{const e=Ve("color"),n=Ve("font"),r=Ve("text"),o=Ve("font-weight"),i=Ve("tracking"),s=Ve("leading"),a=Ve("breakpoint"),l=Ve("container"),c=Ve("spacing"),u=Ve("radius"),f=Ve("shadow"),d=Ve("inset-shadow"),h=Ve("text-shadow"),g=Ve("drop-shadow"),v=Ve("blur"),b=Ve("perspective"),_=Ve("aspect"),m=Ve("ease"),w=Ve("animate"),y=()=>["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"],k=()=>[...S(),se,ie],C=()=>["auto","hidden","clip","visible","scroll"],N=()=>["auto","contain","none"],E=()=>[se,ie,c],P=()=>[mr,"full","auto",...E()],A=()=>[gr,"none","subgrid",se,ie],T=()=>["auto",{span:["full",gr,se,ie]},gr,se,ie],D=()=>[gr,"auto",se,ie],B=()=>["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=()=>[mr,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...E()],M=()=>[mr,"screen","full","dvw","lvw","svw","min","max","fit",...E()],R=()=>[mr,"screen","full","lh","dvh","lvh","svh","min","max","fit",...E()],$=()=>[e,se,ie],V=()=>[...S(),Lv,Dv,{position:[se,ie]}],O=()=>["no-repeat",{repeat:["","x","y","space","round"]}],X=()=>["auto","cover","contain",G3,B3,{size:[se,ie]}],F=()=>[vf,vs,ao],U=()=>["","none","full",u,se,ie],G=()=>["",ge,vs,ao],W=()=>["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=()=>[ge,vf,Lv,Dv],te=()=>["","none",v,se,ie],J=()=>["none",ge,se,ie],Q=()=>["none",ge,se,ie],ne=()=>[ge,se,ie],ue=()=>[mr,"full",...E()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Ln],breakpoint:[Ln],color:[o_],container:[Ln],"drop-shadow":[Ln],ease:["in","out","in-out"],font:[F3],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Ln],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Ln],shadow:[Ln],spacing:["px",ge],text:[Ln],"text-shadow":[Ln],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",mr,ie,se,_]}],container:["container"],columns:[{columns:[ge,ie,se,l]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"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:k()}],overflow:[{overflow:C()}],"overflow-x":[{"overflow-x":C()}],"overflow-y":[{"overflow-y":C()}],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:[gr,"auto",se,ie]}],basis:[{basis:[mr,"full","auto",l,...E()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[ge,mr,"auto","initial","none",ie]}],grow:[{grow:["",ge,se,ie]}],shrink:[{shrink:["",ge,se,ie]}],order:[{order:[gr,"first","last","none",se,ie]}],"grid-cols":[{"grid-cols":A()}],"col-start-end":[{col:T()}],"col-start":[{"col-start":D()}],"col-end":[{"col-end":D()}],"grid-rows":[{"grid-rows":A()}],"row-start-end":[{row:T()}],"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":B()}],"auto-rows":[{"auto-rows":B()}],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,vs,ao]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[o,X3,H3]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",vf,ie]}],"font-family":[{font:[W3,U3,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":[ge,"none",se,$v]}],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:$()}],"text-color":[{text:$()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...W(),"wavy"]}],"text-decoration-thickness":[{decoration:[ge,"from-font","auto",se,ao]}],"text-decoration-color":[{decoration:$()}],"underline-offset":[{"underline-offset":[ge,"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:V()}],"bg-repeat":[{bg:O()}],"bg-size":[{bg:X()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},gr,se,ie],radial:["",se,ie],conic:[gr,se,ie]},Y3,V3]}],"bg-color":[{bg:$()}],"gradient-from-pos":[{from:F()}],"gradient-via-pos":[{via:F()}],"gradient-to-pos":[{to:F()}],"gradient-from":[{from:$()}],"gradient-via":[{via:$()}],"gradient-to":[{to:$()}],rounded:[{rounded:U()}],"rounded-s":[{"rounded-s":U()}],"rounded-e":[{"rounded-e":U()}],"rounded-t":[{"rounded-t":U()}],"rounded-r":[{"rounded-r":U()}],"rounded-b":[{"rounded-b":U()}],"rounded-l":[{"rounded-l":U()}],"rounded-ss":[{"rounded-ss":U()}],"rounded-se":[{"rounded-se":U()}],"rounded-ee":[{"rounded-ee":U()}],"rounded-es":[{"rounded-es":U()}],"rounded-tl":[{"rounded-tl":U()}],"rounded-tr":[{"rounded-tr":U()}],"rounded-br":[{"rounded-br":U()}],"rounded-bl":[{"rounded-bl":U()}],"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:[...W(),"hidden","none"]}],"divide-style":[{divide:[...W(),"hidden","none"]}],"border-color":[{border:$()}],"border-color-x":[{"border-x":$()}],"border-color-y":[{"border-y":$()}],"border-color-s":[{"border-s":$()}],"border-color-e":[{"border-e":$()}],"border-color-bs":[{"border-bs":$()}],"border-color-be":[{"border-be":$()}],"border-color-t":[{"border-t":$()}],"border-color-r":[{"border-r":$()}],"border-color-b":[{"border-b":$()}],"border-color-l":[{"border-l":$()}],"divide-color":[{divide:$()}],"outline-style":[{outline:[...W(),"none","hidden"]}],"outline-offset":[{"outline-offset":[ge,se,ie]}],"outline-w":[{outline:["",ge,vs,ao]}],"outline-color":[{outline:$()}],shadow:[{shadow:["","none",f,Rl,Ml]}],"shadow-color":[{shadow:$()}],"inset-shadow":[{"inset-shadow":["none",d,Rl,Ml]}],"inset-shadow-color":[{"inset-shadow":$()}],"ring-w":[{ring:G()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:$()}],"ring-offset-w":[{"ring-offset":[ge,ao]}],"ring-offset-color":[{"ring-offset":$()}],"inset-ring-w":[{"inset-ring":G()}],"inset-ring-color":[{"inset-ring":$()}],"text-shadow":[{"text-shadow":["none",h,Rl,Ml]}],"text-shadow-color":[{"text-shadow":$()}],opacity:[{opacity:[ge,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":[ge]}],"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":$()}],"mask-image-linear-to-color":[{"mask-linear-to":$()}],"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":$()}],"mask-image-t-to-color":[{"mask-t-to":$()}],"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":$()}],"mask-image-r-to-color":[{"mask-r-to":$()}],"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":$()}],"mask-image-b-to-color":[{"mask-b-to":$()}],"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":$()}],"mask-image-l-to-color":[{"mask-l-to":$()}],"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":$()}],"mask-image-x-to-color":[{"mask-x-to":$()}],"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":$()}],"mask-image-y-to-color":[{"mask-y-to":$()}],"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":$()}],"mask-image-radial-to-color":[{"mask-radial-to":$()}],"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":[ge]}],"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":$()}],"mask-image-conic-to-color":[{"mask-conic-to":$()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:V()}],"mask-repeat":[{mask:O()}],"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:[ge,se,ie]}],contrast:[{contrast:[ge,se,ie]}],"drop-shadow":[{"drop-shadow":["","none",g,Rl,Ml]}],"drop-shadow-color":[{"drop-shadow":$()}],grayscale:[{grayscale:["",ge,se,ie]}],"hue-rotate":[{"hue-rotate":[ge,se,ie]}],invert:[{invert:["",ge,se,ie]}],saturate:[{saturate:[ge,se,ie]}],sepia:[{sepia:["",ge,se,ie]}],"backdrop-filter":[{"backdrop-filter":["","none",se,ie]}],"backdrop-blur":[{"backdrop-blur":te()}],"backdrop-brightness":[{"backdrop-brightness":[ge,se,ie]}],"backdrop-contrast":[{"backdrop-contrast":[ge,se,ie]}],"backdrop-grayscale":[{"backdrop-grayscale":["",ge,se,ie]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[ge,se,ie]}],"backdrop-invert":[{"backdrop-invert":["",ge,se,ie]}],"backdrop-opacity":[{"backdrop-opacity":[ge,se,ie]}],"backdrop-saturate":[{"backdrop-saturate":[ge,se,ie]}],"backdrop-sepia":[{"backdrop-sepia":["",ge,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:[ge,"initial",se,ie]}],ease:[{ease:["linear","initial",m,se,ie]}],delay:[{delay:[ge,se,ie]}],animate:[{animate:["none",w,se,ie]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[b,se,ie]}],"perspective-origin":[{"perspective-origin":k()}],rotate:[{rotate:J()}],"rotate-x":[{"rotate-x":J()}],"rotate-y":[{"rotate-y":J()}],"rotate-z":[{"rotate-z":J()}],scale:[{scale:Q()}],"scale-x":[{"scale-x":Q()}],"scale-y":[{"scale-y":Q()}],"scale-z":[{"scale-z":Q()}],"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:k()}],"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:$()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:$()}],"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",...$()]}],"stroke-w":[{stroke:[ge,vs,ao,$v]}],stroke:[{stroke:["none",...$()]}],"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"]}},Q3=j3(q3);function ae(...e){return Q3(Qb(e))}function f_(e,n=[]){let r=[];function o(s,a){const l=x.createContext(a);l.displayName=s+"Context";const c=r.length;r=[...r,a];const u=d=>{var m;const{scope:h,children:g,...v}=d,b=((m=h==null?void 0:h[e])==null?void 0:m[c])||l,_=x.useMemo(()=>v,Object.values(v));return p.jsx(b.Provider,{value:_,children:g})};u.displayName=s+"Provider";function f(d,h){var b;const g=((b=h==null?void 0:h[e])==null?void 0:b[c])||l,v=x.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=>x.createContext(a));return function(l){const c=(l==null?void 0:l[e])||s;return x.useMemo(()=>({[`__scope${e}`]:{...l,[e]:c}}),[l,c])}};return i.scopeName=e,[o,Z3(i,...n)]}function Z3(...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 x.useMemo(()=>({[`__scope${n.scopeName}`]:a}),[a])}};return r.scopeName=n.scopeName,r}function An(e){const n=x.useRef(e);return x.useEffect(()=>{n.current=e}),x.useMemo(()=>(...r)=>{var o;return(o=n.current)==null?void 0:o.call(n,...r)},[])}var Ye=globalThis!=null&&globalThis.document?x.useLayoutEffect:()=>{};function zv(e,n){if(typeof e=="function")return e(n);e!=null&&(e.current=n)}function Tn(...e){return n=>{let r=!1;const o=e.map(i=>{const s=zv(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():zv(e[i],null)}}}}function xe(...e){return x.useCallback(Tn(...e),e)}var J3=Symbol.for("react.lazy"),eu=Iu[" use ".trim().toString()];function eR(e){return typeof e=="object"&&e!==null&&"then"in e}function h_(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===J3&&"_payload"in e&&eR(e._payload)}function p_(e){const n=tR(e),r=x.forwardRef((o,i)=>{let{children:s,...a}=o;h_(s)&&typeof eu=="function"&&(s=eu(s._payload));const l=x.Children.toArray(s),c=l.find(rR);if(c){const u=c.props.children,f=l.map(d=>d===c?x.Children.count(u)>1?x.Children.only(null):x.isValidElement(u)?u.props.children:null:d);return p.jsx(n,{...a,ref:i,children:x.isValidElement(u)?x.cloneElement(u,void 0,f):null})}return p.jsx(n,{...a,ref:i,children:s})});return r.displayName=`${e}.Slot`,r}var m_=p_("Slot");function tR(e){const n=x.forwardRef((r,o)=>{let{children:i,...s}=r;if(h_(i)&&typeof eu=="function"&&(i=eu(i._payload)),x.isValidElement(i)){const a=iR(i),l=oR(s,i.props);return i.type!==x.Fragment&&(l.ref=o?Tn(o,a):a),x.cloneElement(i,l)}return x.Children.count(i)>1?x.Children.only(null):null});return n.displayName=`${e}.SlotClone`,n}var nR=Symbol("radix.slottable");function rR(e){return x.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===nR}function oR(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 iR(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 sR=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],ht=sR.reduce((e,n)=>{const r=p_(`Primitive.${n}`),o=x.forwardRef((i,s)=>{const{asChild:a,...l}=i,c=a?r:n;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),p.jsx(c,{...l,ref:s})});return o.displayName=`Primitive.${n}`,{...e,[n]:o}},{}),g_={exports:{}},v_={};/**
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 Li=x;function aR(e,n){return e===n&&(e!==0||1/e===1/n)||e!==e&&n!==n}var lR=typeof Object.is=="function"?Object.is:aR,cR=Li.useState,uR=Li.useEffect,dR=Li.useLayoutEffect,fR=Li.useDebugValue;function hR(e,n){var r=n(),o=cR({inst:{value:r,getSnapshot:n}}),i=o[0].inst,s=o[1];return dR(function(){i.value=r,i.getSnapshot=n,yf(i)&&s({inst:i})},[e,r,n]),uR(function(){return yf(i)&&s({inst:i}),e(function(){yf(i)&&s({inst:i})})},[e]),fR(r),r}function yf(e){var n=e.getSnapshot;e=e.value;try{var r=n();return!lR(e,r)}catch{return!0}}function pR(e,n){return n()}var mR=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?pR:hR;v_.useSyncExternalStore=Li.useSyncExternalStore!==void 0?Li.useSyncExternalStore:mR;g_.exports=v_;var y_=g_.exports;function gR(){return y_.useSyncExternalStore(vR,()=>!0,()=>!1)}function vR(){return()=>{}}var Lm="Avatar",[yR]=f_(Lm),[xR,x_]=yR(Lm),w_=x.forwardRef((e,n)=>{const{__scopeAvatar:r,...o}=e,[i,s]=x.useState("idle");return p.jsx(xR,{scope:r,imageLoadingStatus:i,onImageLoadingStatusChange:s,children:p.jsx(ht.span,{...o,ref:n})})});w_.displayName=Lm;var b_="AvatarImage",__=x.forwardRef((e,n)=>{const{__scopeAvatar:r,src:o,onLoadingStatusChange:i=()=>{},...s}=e,a=x_(b_,r),l=wR(o,s),c=An(u=>{i(u),a.onImageLoadingStatusChange(u)});return Ye(()=>{l!=="idle"&&c(l)},[l,c]),l==="loaded"?p.jsx(ht.img,{...s,ref:n,src:o}):null});__.displayName=b_;var S_="AvatarFallback",k_=x.forwardRef((e,n)=>{const{__scopeAvatar:r,delayMs:o,...i}=e,s=x_(S_,r),[a,l]=x.useState(o===void 0);return x.useEffect(()=>{if(o!==void 0){const c=window.setTimeout(()=>l(!0),o);return()=>window.clearTimeout(c)}},[o]),a&&s.imageLoadingStatus!=="loaded"?p.jsx(ht.span,{...i,ref:n}):null});k_.displayName=S_;function Fv(e,n){return e?n?(e.src!==n&&(e.src=n),e.complete&&e.naturalWidth>0?"loaded":"loading"):"error":"idle"}function wR(e,{referrerPolicy:n,crossOrigin:r}){const o=gR(),i=x.useRef(null),s=o?(i.current||(i.current=new window.Image),i.current):null,[a,l]=x.useState(()=>Fv(s,e));return Ye(()=>{l(Fv(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 C_=w_,N_=__,E_=k_;const bR=x.forwardRef(({className:e,...n},r)=>p.jsx(C_,{ref:r,className:ae("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",e),...n}));bR.displayName=C_.displayName;const _R=x.forwardRef(({className:e,...n},r)=>p.jsx(N_,{ref:r,className:ae("aspect-square h-full w-full",e),...n}));_R.displayName=N_.displayName;const SR=x.forwardRef(({className:e,...n},r)=>p.jsx(E_,{ref:r,className:ae("flex h-full w-full items-center justify-center rounded-full bg-primary/10 text-primary font-medium",e),...n}));SR.displayName=E_.displayName;const Bv=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Hv=Qb,zm=(e,n)=>r=>{var o;if((n==null?void 0:n.variants)==null)return Hv(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 h=Bv(f)||Bv(d);return i[u][h]}),l=r&&Object.entries(r).reduce((u,f)=>{let[d,h]=f;return h===void 0||(u[d]=h),u},{}),c=n==null||(o=n.compoundVariants)===null||o===void 0?void 0:o.reduce((u,f)=>{let{class:d,className:h,...g}=f;return Object.entries(g).every(v=>{let[b,_]=v;return Array.isArray(_)?_.includes({...s,...l}[b]):{...s,...l}[b]===_})?[...u,d,h]:u},[]);return Hv(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 P_=(...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 kR=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 CR=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 Uv=e=>{const n=CR(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 NR={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 ER=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 PR=x.forwardRef(({color:e="currentColor",size:n=24,strokeWidth:r=2,absoluteStrokeWidth:o,className:i="",children:s,iconNode:a,...l},c)=>x.createElement("svg",{ref:c,...NR,width:n,height:n,stroke:e,strokeWidth:o?Number(r)*24/Number(n):r,className:P_("lucide",i),...!s&&!ER(l)&&{"aria-hidden":"true"},...l},[...a.map(([u,f])=>x.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 he=(e,n)=>{const r=x.forwardRef(({className:o,...i},s)=>x.createElement(PR,{ref:s,iconNode:n,className:P_(`lucide-${kR(Uv(e))}`,`lucide-${e}`,o),...i}));return r.displayName=Uv(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 jR=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],Fm=he("arrow-left",jR);/**
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 MR=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],RR=he("arrow-right",MR);/**
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 AR=[["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=he("boxes",AR);/**
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 TR=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Bm=he("check",TR);/**
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 IR=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],ed=he("chevron-down",IR);/**
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 OR=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],zi=he("chevron-right",OR);/**
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 $R=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],DR=he("chevron-up",$R);/**
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 LR=[["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=he("circle-alert",LR);/**
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 zR=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],vo=he("circle-check-big",zR);/**
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 FR=[["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"}]],BR=he("circle-x",FR);/**
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 HR=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],UR=he("circle",HR);/**
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 VR=[["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"}]],Vv=he("copy",VR);/**
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 WR=[["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=he("database",WR);/**
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 GR=[["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"}]],YR=he("file-code",GR);/**
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 XR=[["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"}]],xf=he("folder-open",XR);/**
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 KR=[["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"}]],Wv=he("folder",KR);/**
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 qR=[["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"}]],QR=he("git-branch",qR);/**
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 ZR=[["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"}]],Um=he("globe",ZR);/**
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 JR=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],j_=he("info",JR);/**
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 eA=[["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"}]],Da=he("layers",eA);/**
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 tA=[["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"}]],nA=he("layout-dashboard",tA);/**
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 rA=[["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"}]],Gv=he("link",rA);/**
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 oA=[["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"}]],iA=he("list",oA);/**
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 sA=[["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"}]],aA=he("map-pin",sA);/**
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 lA=[["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"}]],cA=he("map",lA);/**
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 uA=[["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"}]],dA=he("moon",uA);/**
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 fA=[["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"}]],hA=he("network",fA);/**
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 pA=[["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"}]],Yv=he("package",pA);/**
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 mA=[["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"}]],gA=he("play",mA);/**
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 vA=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Al=he("plus",vA);/**
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 yA=[["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"}]],M_=he("refresh-cw",yA);/**
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 xA=[["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"}]],Xv=he("rotate-ccw",xA);/**
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 wA=[["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"}]],bA=he("route",wA);/**
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 _A=[["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"}]],Kv=he("save",_A);/**
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 SA=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],kA=he("search",SA);/**
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 CA=[["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"}]],R_=he("settings",CA);/**
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 NA=[["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"}]],A_=he("shield-check",NA);/**
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 EA=[["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"}]],PA=he("sun",EA);/**
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 jA=[["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"}]],MA=he("tag",jA);/**
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 RA=[["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=he("trash-2",RA);/**
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 AA=[["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"}]],Vm=he("triangle-alert",AA);/**
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 TA=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],tu=he("x",TA);/**
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 IA=[["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"}]],OA=he("zap",IA),$A=x.forwardRef(({...e},n)=>p.jsx("nav",{ref:n,"aria-label":"breadcrumb",...e}));$A.displayName="Breadcrumb";const DA=x.forwardRef(({className:e,...n},r)=>p.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}));DA.displayName="BreadcrumbList";const LA=x.forwardRef(({className:e,...n},r)=>p.jsx("li",{ref:r,className:ae("inline-flex items-center gap-1.5",e),...n}));LA.displayName="BreadcrumbItem";const zA=x.forwardRef(({asChild:e,className:n,...r},o)=>{const i=e?m_:"a";return p.jsx(i,{ref:o,className:ae("transition-colors hover:text-foreground",n),...r})});zA.displayName="BreadcrumbLink";const FA=x.forwardRef(({className:e,...n},r)=>p.jsx("span",{ref:r,role:"link","aria-disabled":"true","aria-current":"page",className:ae("font-normal text-foreground",e),...n}));FA.displayName="BreadcrumbPage";const BA=zm("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"}}),T_=x.forwardRef(({className:e,variant:n,size:r,asChild:o=!1,...i},s)=>{const a=o?m_:"button";return p.jsx(a,{className:ae(BA({variant:n,size:r,className:e})),ref:s,...i})});T_.displayName="Button";const HA=x.forwardRef(({className:e,onClick:n,...r},o)=>{const i=x.useRef(null),[s,a]=x.useState(!1);return x.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]),p.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})});HA.displayName="Card";const UA=x.forwardRef(({className:e,...n},r)=>p.jsx("div",{ref:r,className:ae("flex flex-col space-y-1.5 p-6",e),...n}));UA.displayName="CardHeader";const VA=x.forwardRef(({className:e,...n},r)=>p.jsx("div",{ref:r,className:ae("font-semibold leading-none tracking-tight",e),...n}));VA.displayName="CardTitle";const WA=x.forwardRef(({className:e,...n},r)=>p.jsx("div",{ref:r,className:ae("text-sm text-muted-foreground",e),...n}));WA.displayName="CardDescription";const GA=x.forwardRef(({className:e,...n},r)=>p.jsx("div",{ref:r,className:ae("p-6 pt-0",e),...n}));GA.displayName="CardContent";const YA=x.forwardRef(({className:e,...n},r)=>p.jsx("div",{ref:r,className:ae("flex items-center p-6 pt-0",e),...n}));YA.displayName="CardFooter";function XA(e,n){const r=x.createContext(n),o=s=>{const{children:a,...l}=s,c=x.useMemo(()=>l,Object.values(l));return p.jsx(r.Provider,{value:c,children:a})};o.displayName=e+"Provider";function i(s){const a=x.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 Zt(e,n=[]){let r=[];function o(s,a){const l=x.createContext(a),c=r.length;r=[...r,a];const u=d=>{var m;const{scope:h,children:g,...v}=d,b=((m=h==null?void 0:h[e])==null?void 0:m[c])||l,_=x.useMemo(()=>v,Object.values(v));return p.jsx(b.Provider,{value:_,children:g})};u.displayName=s+"Provider";function f(d,h){var b;const g=((b=h==null?void 0:h[e])==null?void 0:b[c])||l,v=x.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=>x.createContext(a));return function(l){const c=(l==null?void 0:l[e])||s;return x.useMemo(()=>({[`__scope${e}`]:{...l,[e]:c}}),[l,c])}};return i.scopeName=e,[o,KA(i,...n)]}function KA(...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 x.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 qA=Iu[" useInsertionEffect ".trim().toString()]||Ye;function La({prop:e,defaultProp:n,onChange:r=()=>{},caller:o}){const[i,s,a]=QA({defaultProp:n,onChange:r}),l=e!==void 0,c=l?e:i;{const f=x.useRef(e!==void 0);x.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=x.useCallback(f=>{var d;if(l){const h=ZA(f)?f(e):f;h!==e&&((d=a.current)==null||d.call(a,h))}else s(f)},[l,e,s,a]);return[c,u]}function QA({defaultProp:e,onChange:n}){const[r,o]=x.useState(e),i=x.useRef(r),s=x.useRef(n);return qA(()=>{s.current=n},[n]),x.useEffect(()=>{var a;i.current!==r&&((a=s.current)==null||a.call(s,r),i.current=r)},[r,i]),[r,o,s]}function ZA(e){return typeof e=="function"}function Wm(e){const n=x.useRef({value:e,previous:e});return x.useMemo(()=>(n.current.value!==e&&(n.current.previous=n.current.value,n.current.value=e),n.current.previous),[e])}function Gm(e){const[n,r]=x.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 JA(e,n){return x.useReducer((r,o)=>n[r][o]??r,e)}var _t=e=>{const{present:n,children:r}=e,o=eT(n),i=typeof r=="function"?r({present:o.isPresent}):x.Children.only(r),s=xe(o.ref,tT(i));return typeof r=="function"||o.isPresent?x.cloneElement(i,{ref:s}):null};_t.displayName="Presence";function eT(e){const[n,r]=x.useState(),o=x.useRef(null),i=x.useRef(e),s=x.useRef("none"),a=e?"mounted":"unmounted",[l,c]=JA(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return x.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 h=s.current,g=Il(u);e?c("MOUNT"):g==="none"||(u==null?void 0:u.display)==="none"?c("UNMOUNT"):c(f&&h!==g?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,c]),Ye(()=>{if(n){let u;const f=n.ownerDocument.defaultView??window,d=g=>{const b=Il(o.current).includes(CSS.escape(g.animationName));if(g.target===n&&b&&(c("ANIMATION_END"),!i.current)){const _=n.style.animationFillMode;n.style.animationFillMode="forwards",u=f.setTimeout(()=>{n.style.animationFillMode==="forwards"&&(n.style.animationFillMode=_)})}},h=g=>{g.target===n&&(s.current=Il(o.current))};return n.addEventListener("animationstart",h),n.addEventListener("animationcancel",d),n.addEventListener("animationend",d),()=>{f.clearTimeout(u),n.removeEventListener("animationstart",h),n.removeEventListener("animationcancel",d),n.removeEventListener("animationend",d)}}else c("ANIMATION_END")},[n,c]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:x.useCallback(u=>{o.current=u?getComputedStyle(u):null,r(u)},[])}}function Il(e){return(e==null?void 0:e.animationName)||"none"}function tT(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 jo(e){const n=nT(e),r=x.forwardRef((o,i)=>{const{children:s,...a}=o,l=x.Children.toArray(s),c=l.find(oT);if(c){const u=c.props.children,f=l.map(d=>d===c?x.Children.count(u)>1?x.Children.only(null):x.isValidElement(u)?u.props.children:null:d);return p.jsx(n,{...a,ref:i,children:x.isValidElement(u)?x.cloneElement(u,void 0,f):null})}return p.jsx(n,{...a,ref:i,children:s})});return r.displayName=`${e}.Slot`,r}function nT(e){const n=x.forwardRef((r,o)=>{const{children:i,...s}=r;if(x.isValidElement(i)){const a=sT(i),l=iT(s,i.props);return i.type!==x.Fragment&&(l.ref=o?Tn(o,a):a),x.cloneElement(i,l)}return x.Children.count(i)>1?x.Children.only(null):null});return n.displayName=`${e}.SlotClone`,n}var I_=Symbol("radix.slottable");function rT(e){const n=({children:r})=>p.jsx(p.Fragment,{children:r});return n.displayName=`${e}.Slottable`,n.__radixId=I_,n}function oT(e){return x.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===I_}function iT(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 sT(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 aT=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],de=aT.reduce((e,n)=>{const r=jo(`Primitive.${n}`),o=x.forwardRef((i,s)=>{const{asChild:a,...l}=i,c=a?r:n;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),p.jsx(c,{...l,ref:s})});return o.displayName=`Primitive.${n}`,{...e,[n]:o}},{});function O_(e,n){e&&es.flushSync(()=>e.dispatchEvent(n))}var td="Checkbox",[lT]=Zt(td),[cT,Ym]=lT(td);function uT(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,[h,g]=La({prop:r,defaultProp:i??!1,onChange:c,caller:td}),[v,b]=x.useState(null),[_,m]=x.useState(null),w=x.useRef(!1),y=v?!!a||!!v.closest("form"):!0,S={checked:h,disabled:s,setChecked:g,control:v,setControl:b,name:l,form:a,value:f,hasConsumerStoppedPropagationRef:w,required:u,defaultChecked:Fr(i)?!1:i,isFormControl:y,bubbleInput:_,setBubbleInput:m};return p.jsx(cT,{scope:n,...S,children:dT(d)?d(S):o})}var $_="CheckboxTrigger",D_=x.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:h,isFormControl:g,bubbleInput:v}=Ym($_,e),b=xe(i,f),_=x.useRef(c);return x.useEffect(()=>{const m=s==null?void 0:s.form;if(m){const w=()=>d(_.current);return m.addEventListener("reset",w),()=>m.removeEventListener("reset",w)}},[s,d]),p.jsx(de.button,{type:"button",role:"checkbox","aria-checked":Fr(c)?"mixed":c,"aria-required":u,"data-state":H_(c),"data-disabled":l?"":void 0,disabled:l,value:a,...o,ref:b,onKeyDown:re(n,m=>{m.key==="Enter"&&m.preventDefault()}),onClick:re(r,m=>{d(w=>Fr(w)?!0:!w),v&&g&&(h.current=m.isPropagationStopped(),h.current||m.stopPropagation())})})});D_.displayName=$_;var Xm=x.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 p.jsx(uT,{__scopeCheckbox:r,checked:i,defaultChecked:s,disabled:l,required:a,onCheckedChange:u,name:o,form:f,value:c,internal_do_not_use_render:({isFormControl:h})=>p.jsxs(p.Fragment,{children:[p.jsx(D_,{...d,ref:n,__scopeCheckbox:r}),h&&p.jsx(B_,{__scopeCheckbox:r})]})})});Xm.displayName=td;var L_="CheckboxIndicator",z_=x.forwardRef((e,n)=>{const{__scopeCheckbox:r,forceMount:o,...i}=e,s=Ym(L_,r);return p.jsx(_t,{present:o||Fr(s.checked)||s.checked===!0,children:p.jsx(de.span,{"data-state":H_(s.checked),"data-disabled":s.disabled?"":void 0,...i,ref:n,style:{pointerEvents:"none",...e.style}})})});z_.displayName=L_;var F_="CheckboxBubbleInput",B_=x.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:h,setBubbleInput:g}=Ym(F_,e),v=xe(r,g),b=Wm(s),_=Gm(o);x.useEffect(()=>{const w=h;if(!w)return;const y=window.HTMLInputElement.prototype,k=Object.getOwnPropertyDescriptor(y,"checked").set,C=!i.current;if(b!==s&&k){const N=new Event("click",{bubbles:C});w.indeterminate=Fr(s),k.call(w,Fr(s)?!1:s),w.dispatchEvent(N)}},[h,b,s,i]);const m=x.useRef(Fr(s)?!1:s);return p.jsx(de.input,{type:"checkbox","aria-hidden":!0,defaultChecked:a??m.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=F_;function dT(e){return typeof e=="function"}function Fr(e){return e==="indeterminate"}function H_(e){return Fr(e)?"indeterminate":e?"checked":"unchecked"}const fT=x.forwardRef(({className:e,...n},r)=>p.jsx(Xm,{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:p.jsx(z_,{className:ae("grid place-content-center text-current"),children:p.jsx(Bm,{className:"h-4 w-4"})})}));fT.displayName=Xm.displayName;var hT=Iu[" useId ".trim().toString()]||(()=>{}),pT=0;function Tt(e){const[n,r]=x.useState(hT());return Ye(()=>{r(o=>o??String(pT++))},[e]),n?`radix-${n}`:""}var qv=1,mT=.9,gT=.8,vT=.17,wf=.1,bf=.999,yT=.9999,xT=.99,wT=/[\\\/_+.#"@\[\(\{&]/,bT=/[\\\/_+.#"@\[\(\{&]/g,_T=/[\s-]/,U_=/[\s-]/g;function Xh(e,n,r,o,i,s,a){if(s===n.length)return i===e.length?qv:xT;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,h,g,v;u>=0;)d=Xh(e,n,r,o,u+1,s+1,a),d>f&&(u===i?d*=qv:wT.test(e.charAt(u-1))?(d*=gT,g=e.slice(i,u-1).match(bT),g&&i>0&&(d*=Math.pow(bf,g.length))):_T.test(e.charAt(u-1))?(d*=mT,v=e.slice(i,u-1).match(U_),v&&i>0&&(d*=Math.pow(bf,v.length))):(d*=vT,i>0&&(d*=Math.pow(bf,u-i))),e.charAt(u)!==n.charAt(s)&&(d*=yT)),(d<wf&&r.charAt(u-1)===o.charAt(s+1)||o.charAt(s+1)===o.charAt(s)&&r.charAt(u-1)!==o.charAt(s))&&(h=Xh(e,n,r,o,u+1,s+2,a),h*wf>d&&(d=h*wf)),d>f&&(f=d),u=r.indexOf(c,u+1);return a[l]=f,f}function Qv(e){return e.toLowerCase().replace(U_," ")}function ST(e,n,r){return e=r&&r.length>0?`${e+" "+r.join(" ")}`:e,Xh(e,n,Qv(e),Qv(n),0,0,{})}function kT(e,n=globalThis==null?void 0:globalThis.document){const r=An(e);x.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 CT="DismissableLayer",Kh="dismissableLayer.update",NT="dismissableLayer.pointerDownOutside",ET="dismissableLayer.focusOutside",Zv,V_=x.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),os=x.forwardRef((e,n)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:s,onInteractOutside:a,onDismiss:l,...c}=e,u=x.useContext(V_),[f,d]=x.useState(null),h=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,g]=x.useState({}),v=xe(n,N=>d(N)),b=Array.from(u.layers),[_]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),m=b.indexOf(_),w=f?b.indexOf(f):-1,y=u.layersWithOutsidePointerEventsDisabled.size>0,S=w>=m,k=MT(N=>{const E=N.target,P=[...u.branches].some(A=>A.contains(E));!S||P||(i==null||i(N),a==null||a(N),N.defaultPrevented||l==null||l())},h),C=RT(N=>{const E=N.target;[...u.branches].some(A=>A.contains(E))||(s==null||s(N),a==null||a(N),N.defaultPrevented||l==null||l())},h);return kT(N=>{w===u.layers.size-1&&(o==null||o(N),!N.defaultPrevented&&l&&(N.preventDefault(),l()))},h),x.useEffect(()=>{if(f)return r&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(Zv=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(f)),u.layers.add(f),Jv(),()=>{r&&u.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=Zv)}},[f,h,r,u]),x.useEffect(()=>()=>{f&&(u.layers.delete(f),u.layersWithOutsidePointerEventsDisabled.delete(f),Jv())},[f,u]),x.useEffect(()=>{const N=()=>g({});return document.addEventListener(Kh,N),()=>document.removeEventListener(Kh,N)},[]),p.jsx(de.div,{...c,ref:v,style:{pointerEvents:y?S?"auto":"none":void 0,...e.style},onFocusCapture:re(e.onFocusCapture,C.onFocusCapture),onBlurCapture:re(e.onBlurCapture,C.onBlurCapture),onPointerDownCapture:re(e.onPointerDownCapture,k.onPointerDownCapture)})});os.displayName=CT;var PT="DismissableLayerBranch",jT=x.forwardRef((e,n)=>{const r=x.useContext(V_),o=x.useRef(null),i=xe(n,o);return x.useEffect(()=>{const s=o.current;if(s)return r.branches.add(s),()=>{r.branches.delete(s)}},[r.branches]),p.jsx(de.div,{...e,ref:i})});jT.displayName=PT;function MT(e,n=globalThis==null?void 0:globalThis.document){const r=An(e),o=x.useRef(!1),i=x.useRef(()=>{});return x.useEffect(()=>{const s=l=>{if(l.target&&!o.current){let c=function(){W_(NT,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 RT(e,n=globalThis==null?void 0:globalThis.document){const r=An(e),o=x.useRef(!1);return x.useEffect(()=>{const i=s=>{s.target&&!o.current&&W_(ET,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 Jv(){const e=new CustomEvent(Kh);document.dispatchEvent(e)}function W_(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?O_(i,s):i.dispatchEvent(s)}var _f="focusScope.autoFocusOnMount",Sf="focusScope.autoFocusOnUnmount",ey={bubbles:!1,cancelable:!0},AT="FocusScope",za=x.forwardRef((e,n)=>{const{loop:r=!1,trapped:o=!1,onMountAutoFocus:i,onUnmountAutoFocus:s,...a}=e,[l,c]=x.useState(null),u=An(i),f=An(s),d=x.useRef(null),h=xe(n,b=>c(b)),g=x.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;x.useEffect(()=>{if(o){let b=function(y){if(g.paused||!l)return;const S=y.target;l.contains(S)?d.current=S:br(d.current,{select:!0})},_=function(y){if(g.paused||!l)return;const S=y.relatedTarget;S!==null&&(l.contains(S)||br(d.current,{select:!0}))},m=function(y){if(document.activeElement===document.body)for(const k of y)k.removedNodes.length>0&&br(l)};document.addEventListener("focusin",b),document.addEventListener("focusout",_);const w=new MutationObserver(m);return l&&w.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",b),document.removeEventListener("focusout",_),w.disconnect()}}},[o,l,g.paused]),x.useEffect(()=>{if(l){ny.add(g);const b=document.activeElement;if(!l.contains(b)){const m=new CustomEvent(_f,ey);l.addEventListener(_f,u),l.dispatchEvent(m),m.defaultPrevented||(TT(LT(G_(l)),{select:!0}),document.activeElement===b&&br(l))}return()=>{l.removeEventListener(_f,u),setTimeout(()=>{const m=new CustomEvent(Sf,ey);l.addEventListener(Sf,f),l.dispatchEvent(m),m.defaultPrevented||br(b??document.body,{select:!0}),l.removeEventListener(Sf,f),ny.remove(g)},0)}}},[l,u,f,g]);const v=x.useCallback(b=>{if(!r&&!o||g.paused)return;const _=b.key==="Tab"&&!b.altKey&&!b.ctrlKey&&!b.metaKey,m=document.activeElement;if(_&&m){const w=b.currentTarget,[y,S]=IT(w);y&&S?!b.shiftKey&&m===S?(b.preventDefault(),r&&br(y,{select:!0})):b.shiftKey&&m===y&&(b.preventDefault(),r&&br(S,{select:!0})):m===w&&b.preventDefault()}},[r,o,g.paused]);return p.jsx(de.div,{tabIndex:-1,...a,ref:h,onKeyDown:v})});za.displayName=AT;function TT(e,{select:n=!1}={}){const r=document.activeElement;for(const o of e)if(br(o,{select:n}),document.activeElement!==r)return}function IT(e){const n=G_(e),r=ty(n,e),o=ty(n.reverse(),e);return[r,o]}function G_(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 ty(e,n){for(const r of e)if(!OT(r,{upTo:n}))return r}function OT(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 $T(e){return e instanceof HTMLInputElement&&"select"in e}function br(e,{select:n=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&$T(e)&&n&&e.select()}}var ny=DT();function DT(){let e=[];return{add(n){const r=e[0];n!==r&&(r==null||r.pause()),e=ry(e,n),e.unshift(n)},remove(n){var r;e=ry(e,n),(r=e[0])==null||r.resume()}}}function ry(e,n){const r=[...e],o=r.indexOf(n);return o!==-1&&r.splice(o,1),r}function LT(e){return e.filter(n=>n.tagName!=="A")}var zT="Portal",is=x.forwardRef((e,n)=>{var l;const{container:r,...o}=e,[i,s]=x.useState(!1);Ye(()=>s(!0),[]);const a=r||i&&((l=globalThis==null?void 0:globalThis.document)==null?void 0:l.body);return a?JM.createPortal(p.jsx(de.div,{...o,ref:n}),a):null});is.displayName=zT;var kf=0;function nd(){x.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??oy()),document.body.insertAdjacentElement("beforeend",e[1]??oy()),kf++,()=>{kf===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(n=>n.remove()),kf--}},[])}function oy(){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 Cn=function(){return Cn=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},Cn.apply(this,arguments)};function Y_(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 FT(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",vc="width-before-scroll-bar",BT="with-scroll-bars-hidden",HT="--removed-body-scroll-bar-size";function Cf(e,n){return typeof e=="function"?e(n):e&&(e.current=n),e}function UT(e,n){var r=x.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 VT=typeof window<"u"?x.useLayoutEffect:x.useEffect,iy=new WeakMap;function WT(e,n){var r=UT(null,function(o){return e.forEach(function(i){return Cf(i,o)})});return VT(function(){var o=iy.get(r);if(o){var i=new Set(o),s=new Set(e),a=r.current;i.forEach(function(l){s.has(l)||Cf(l,null)}),s.forEach(function(l){i.has(l)||Cf(l,a)})}iy.set(r,e)},[e]),r}function GT(e){return e}function YT(e,n){n===void 0&&(n=GT);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 XT(e){e===void 0&&(e={});var n=YT(null);return n.options=Cn({async:!0,ssr:!1},e),n}var X_=function(e){var n=e.sideCar,r=Y_(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 x.createElement(o,Cn({},r))};X_.isSideCarExport=!0;function KT(e,n){return e.useMedium(n),X_}var K_=XT(),Nf=function(){},rd=x.forwardRef(function(e,n){var r=x.useRef(null),o=x.useState({onScrollCapture:Nf,onWheelCapture:Nf,onTouchMoveCapture:Nf}),i=o[0],s=o[1],a=e.forwardProps,l=e.children,c=e.className,u=e.removeScrollBar,f=e.enabled,d=e.shards,h=e.sideCar,g=e.noRelative,v=e.noIsolation,b=e.inert,_=e.allowPinchZoom,m=e.as,w=m===void 0?"div":m,y=e.gapMode,S=Y_(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),k=h,C=WT([r,n]),N=Cn(Cn({},S),i);return x.createElement(x.Fragment,null,f&&x.createElement(k,{sideCar:K_,removeScrollBar:u,shards:d,noRelative:g,noIsolation:v,inert:b,setCallbacks:s,allowPinchZoom:!!_,lockRef:r,gapMode:y}),a?x.cloneElement(x.Children.only(l),Cn(Cn({},N),{ref:C})):x.createElement(w,Cn({},N,{className:c,ref:C}),l))});rd.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};rd.classNames={fullWidth:vc,zeroRight:gc};var qT=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function QT(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var n=qT();return n&&e.setAttribute("nonce",n),e}function ZT(e,n){e.styleSheet?e.styleSheet.cssText=n:e.appendChild(document.createTextNode(n))}function JT(e){var n=document.head||document.getElementsByTagName("head")[0];n.appendChild(e)}var eI=function(){var e=0,n=null;return{add:function(r){e==0&&(n=QT())&&(ZT(n,r),JT(n)),e++},remove:function(){e--,!e&&n&&(n.parentNode&&n.parentNode.removeChild(n),n=null)}}},tI=function(){var e=eI();return function(n,r){x.useEffect(function(){return e.add(n),function(){e.remove()}},[n&&r])}},q_=function(){var e=tI(),n=function(r){var o=r.styles,i=r.dynamic;return e(o,i),null};return n},nI={left:0,top:0,right:0,gap:0},Ef=function(e){return parseInt(e||"",10)||0},rI=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[Ef(r),Ef(o),Ef(i)]},oI=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return nI;var n=rI(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])}},iI=q_(),Ni="data-scroll-locked",sI=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(BT,` {
332
- overflow: hidden `).concat(o,`;
333
- padding-right: `).concat(l,"px ").concat(o,`;
334
- }
335
- body[`).concat(Ni,`] {
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(vc,` {
353
- margin-right: `).concat(l,"px ").concat(o,`;
354
- }
355
-
356
- .`).concat(gc," .").concat(gc,` {
357
- right: 0 `).concat(o,`;
358
- }
359
-
360
- .`).concat(vc," .").concat(vc,` {
361
- margin-right: 0 `).concat(o,`;
362
- }
363
-
364
- body[`).concat(Ni,`] {
365
- `).concat(HT,": ").concat(l,`px;
366
- }
367
- `)},sy=function(){var e=parseInt(document.body.getAttribute(Ni)||"0",10);return isFinite(e)?e:0},aI=function(){x.useEffect(function(){return document.body.setAttribute(Ni,(sy()+1).toString()),function(){var e=sy()-1;e<=0?document.body.removeAttribute(Ni):document.body.setAttribute(Ni,e.toString())}},[])},lI=function(e){var n=e.noRelative,r=e.noImportant,o=e.gapMode,i=o===void 0?"margin":o;aI();var s=x.useMemo(function(){return oI(i)},[i]);return x.createElement(iI,{styles:sI(s,!n,i,r?"":"!important")})},qh=!1;if(typeof window<"u")try{var Ol=Object.defineProperty({},"passive",{get:function(){return qh=!0,!0}});window.addEventListener("test",Ol,Ol),window.removeEventListener("test",Ol,Ol)}catch{qh=!1}var Xo=qh?{passive:!1}:!1,cI=function(e){return e.tagName==="TEXTAREA"},Q_=function(e,n){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return r[n]!=="hidden"&&!(r.overflowY===r.overflowX&&!cI(e)&&r[n]==="visible")},uI=function(e){return Q_(e,"overflowY")},dI=function(e){return Q_(e,"overflowX")},ay=function(e,n){var r=n.ownerDocument,o=n;do{typeof ShadowRoot<"u"&&o instanceof ShadowRoot&&(o=o.host);var i=Z_(e,o);if(i){var s=J_(e,o),a=s[1],l=s[2];if(a>l)return!0}o=o.parentNode}while(o&&o!==r.body);return!1},fI=function(e){var n=e.scrollTop,r=e.scrollHeight,o=e.clientHeight;return[n,r,o]},hI=function(e){var n=e.scrollLeft,r=e.scrollWidth,o=e.clientWidth;return[n,r,o]},Z_=function(e,n){return e==="v"?uI(n):dI(n)},J_=function(e,n){return e==="v"?fI(n):hI(n)},pI=function(e,n){return e==="h"&&n==="rtl"?-1:1},mI=function(e,n,r,o,i){var s=pI(e,window.getComputedStyle(n).direction),a=s*o,l=r.target,c=n.contains(l),u=!1,f=a>0,d=0,h=0;do{if(!l)break;var g=J_(e,l),v=g[0],b=g[1],_=g[2],m=b-_-s*v;(v||m)&&Z_(e,l)&&(d+=m,h+=v);var w=l.parentNode;l=w&&w.nodeType===Node.DOCUMENT_FRAGMENT_NODE?w.host:w}while(!c&&l!==document.body||c&&(n.contains(l)||n===l));return(f&&Math.abs(d)<1||!f&&Math.abs(h)<1)&&(u=!0),u},$l=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},ly=function(e){return[e.deltaX,e.deltaY]},cy=function(e){return e&&"current"in e?e.current:e},gI=function(e,n){return e[0]===n[0]&&e[1]===n[1]},vI=function(e){return`
368
- .block-interactivity-`.concat(e,` {pointer-events: none;}
369
- .allow-interactivity-`).concat(e,` {pointer-events: all;}
370
- `)},yI=0,Ko=[];function xI(e){var n=x.useRef([]),r=x.useRef([0,0]),o=x.useRef(),i=x.useState(yI++)[0],s=x.useState(q_)[0],a=x.useRef(e);x.useEffect(function(){a.current=e},[e]),x.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var b=FT([e.lockRef.current],(e.shards||[]).map(cy),!0).filter(Boolean);return b.forEach(function(_){return _.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),b.forEach(function(_){return _.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var l=x.useCallback(function(b,_){if("touches"in b&&b.touches.length===2||b.type==="wheel"&&b.ctrlKey)return!a.current.allowPinchZoom;var m=$l(b),w=r.current,y="deltaX"in b?b.deltaX:w[0]-m[0],S="deltaY"in b?b.deltaY:w[1]-m[1],k,C=b.target,N=Math.abs(y)>Math.abs(S)?"h":"v";if("touches"in b&&N==="h"&&C.type==="range")return!1;var E=window.getSelection(),P=E&&E.anchorNode,A=P?P===C||P.contains(C):!1;if(A)return!1;var T=ay(N,C);if(!T)return!0;if(T?k=N:(k=N==="v"?"h":"v",T=ay(N,C)),!T)return!1;if(!o.current&&"changedTouches"in b&&(y||S)&&(o.current=k),!k)return!0;var D=o.current||k;return mI(D,_,b,D==="h"?y:S)},[]),c=x.useCallback(function(b){var _=b;if(!(!Ko.length||Ko[Ko.length-1]!==s)){var m="deltaY"in _?ly(_):$l(_),w=n.current.filter(function(k){return k.name===_.type&&(k.target===_.target||_.target===k.shadowParent)&&gI(k.delta,m)})[0];if(w&&w.should){_.cancelable&&_.preventDefault();return}if(!w){var y=(a.current.shards||[]).map(cy).filter(Boolean).filter(function(k){return k.contains(_.target)}),S=y.length>0?l(_,y[0]):!a.current.noIsolation;S&&_.cancelable&&_.preventDefault()}}},[]),u=x.useCallback(function(b,_,m,w){var y={name:b,delta:_,target:m,should:w,shadowParent:wI(m)};n.current.push(y),setTimeout(function(){n.current=n.current.filter(function(S){return S!==y})},1)},[]),f=x.useCallback(function(b){r.current=$l(b),o.current=void 0},[]),d=x.useCallback(function(b){u(b.type,ly(b),b.target,l(b,e.lockRef.current))},[]),h=x.useCallback(function(b){u(b.type,$l(b),b.target,l(b,e.lockRef.current))},[]);x.useEffect(function(){return Ko.push(s),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:h}),document.addEventListener("wheel",c,Xo),document.addEventListener("touchmove",c,Xo),document.addEventListener("touchstart",f,Xo),function(){Ko=Ko.filter(function(b){return b!==s}),document.removeEventListener("wheel",c,Xo),document.removeEventListener("touchmove",c,Xo),document.removeEventListener("touchstart",f,Xo)}},[]);var g=e.removeScrollBar,v=e.inert;return x.createElement(x.Fragment,null,v?x.createElement(s,{styles:vI(i)}):null,g?x.createElement(lI,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function wI(e){for(var n=null;e!==null;)e instanceof ShadowRoot&&(n=e.host,e=e.host),e=e.parentNode;return n}const bI=KT(K_,xI);var Fa=x.forwardRef(function(e,n){return x.createElement(rd,Cn({},e,{ref:n,sideCar:bI}))});Fa.classNames=rd.classNames;var _I=function(e){if(typeof document>"u")return null;var n=Array.isArray(e)?e[0]:e;return n.ownerDocument.body},qo=new WeakMap,Dl=new WeakMap,Ll={},Pf=0,e2=function(e){return e&&(e.host||e2(e.parentNode))},SI=function(e,n){return n.map(function(r){if(e.contains(r))return r;var o=e2(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})},kI=function(e,n,r,o){var i=SI(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(h){if(l.has(h))f(h);else try{var g=h.getAttribute(o),v=g!==null&&g!=="false",b=(qo.get(h)||0)+1,_=(s.get(h)||0)+1;qo.set(h,b),s.set(h,_),a.push(h),b===1&&v&&Dl.set(h,!0),_===1&&h.setAttribute(r,"true"),v||h.setAttribute(o,"true")}catch(m){console.error("aria-hidden: cannot operate on ",h,m)}})};return f(n),l.clear(),Pf++,function(){a.forEach(function(d){var h=qo.get(d)-1,g=s.get(d)-1;qo.set(d,h),s.set(d,g),h||(Dl.has(d)||d.removeAttribute(o),Dl.delete(d)),g||d.removeAttribute(r)}),Pf--,Pf||(qo=new WeakMap,qo=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=_I(e);return i?(o.push.apply(o,Array.from(i.querySelectorAll("[aria-live], script"))),kI(o,i,r,"aria-hidden")):function(){return null}},id="Dialog",[t2]=Zt(id),[CI,vn]=t2(id),n2=e=>{const{__scopeDialog:n,children:r,open:o,defaultOpen:i,onOpenChange:s,modal:a=!0}=e,l=x.useRef(null),c=x.useRef(null),[u,f]=La({prop:o,defaultProp:i??!1,onChange:s,caller:id});return p.jsx(CI,{scope:n,triggerRef:l,contentRef:c,contentId:Tt(),titleId:Tt(),descriptionId:Tt(),open:u,onOpenChange:f,onOpenToggle:x.useCallback(()=>f(d=>!d),[f]),modal:a,children:r})};n2.displayName=id;var r2="DialogTrigger",NI=x.forwardRef((e,n)=>{const{__scopeDialog:r,...o}=e,i=vn(r2,r),s=xe(n,i.triggerRef);return p.jsx(de.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":Qm(i.open),...o,ref:s,onClick:re(e.onClick,i.onOpenToggle)})});NI.displayName=r2;var Km="DialogPortal",[EI,o2]=t2(Km,{forceMount:void 0}),i2=e=>{const{__scopeDialog:n,forceMount:r,children:o,container:i}=e,s=vn(Km,n);return p.jsx(EI,{scope:n,forceMount:r,children:x.Children.map(o,a=>p.jsx(_t,{present:r||s.open,children:p.jsx(is,{asChild:!0,container:i,children:a})}))})};i2.displayName=Km;var nu="DialogOverlay",s2=x.forwardRef((e,n)=>{const r=o2(nu,e.__scopeDialog),{forceMount:o=r.forceMount,...i}=e,s=vn(nu,e.__scopeDialog);return s.modal?p.jsx(_t,{present:o||s.open,children:p.jsx(jI,{...i,ref:n})}):null});s2.displayName=nu;var PI=jo("DialogOverlay.RemoveScroll"),jI=x.forwardRef((e,n)=>{const{__scopeDialog:r,...o}=e,i=vn(nu,r);return p.jsx(Fa,{as:PI,allowPinchZoom:!0,shards:[i.contentRef],children:p.jsx(de.div,{"data-state":Qm(i.open),...o,ref:n,style:{pointerEvents:"auto",...o.style}})})}),Mo="DialogContent",a2=x.forwardRef((e,n)=>{const r=o2(Mo,e.__scopeDialog),{forceMount:o=r.forceMount,...i}=e,s=vn(Mo,e.__scopeDialog);return p.jsx(_t,{present:o||s.open,children:s.modal?p.jsx(MI,{...i,ref:n}):p.jsx(RI,{...i,ref:n})})});a2.displayName=Mo;var MI=x.forwardRef((e,n)=>{const r=vn(Mo,e.__scopeDialog),o=x.useRef(null),i=xe(n,r.contentRef,o);return x.useEffect(()=>{const s=o.current;if(s)return od(s)},[]),p.jsx(l2,{...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())})}),RI=x.forwardRef((e,n)=>{const r=vn(Mo,e.__scopeDialog),o=x.useRef(!1),i=x.useRef(!1);return p.jsx(l2,{...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()}})}),l2=x.forwardRef((e,n)=>{const{__scopeDialog:r,trapFocus:o,onOpenAutoFocus:i,onCloseAutoFocus:s,...a}=e,l=vn(Mo,r),c=x.useRef(null),u=xe(n,c);return nd(),p.jsxs(p.Fragment,{children:[p.jsx(za,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:i,onUnmountAutoFocus:s,children:p.jsx(os,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":Qm(l.open),...a,ref:u,onDismiss:()=>l.onOpenChange(!1)})}),p.jsxs(p.Fragment,{children:[p.jsx(AI,{titleId:l.titleId}),p.jsx(II,{contentRef:c,descriptionId:l.descriptionId})]})]})}),qm="DialogTitle",c2=x.forwardRef((e,n)=>{const{__scopeDialog:r,...o}=e,i=vn(qm,r);return p.jsx(de.h2,{id:i.titleId,...o,ref:n})});c2.displayName=qm;var u2="DialogDescription",d2=x.forwardRef((e,n)=>{const{__scopeDialog:r,...o}=e,i=vn(u2,r);return p.jsx(de.p,{id:i.descriptionId,...o,ref:n})});d2.displayName=u2;var f2="DialogClose",h2=x.forwardRef((e,n)=>{const{__scopeDialog:r,...o}=e,i=vn(f2,r);return p.jsx(de.button,{type:"button",...o,ref:n,onClick:re(e.onClick,()=>i.onOpenChange(!1))})});h2.displayName=f2;function Qm(e){return e?"open":"closed"}var p2="DialogTitleWarning",[XG,m2]=XA(p2,{contentName:Mo,titleName:qm,docsSlug:"dialog"}),AI=({titleId:e})=>{const n=m2(p2),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 x.useEffect(()=>{e&&(document.getElementById(e)||console.error(r))},[r,e]),null},TI="DialogDescriptionWarning",II=({contentRef:e,descriptionId:n})=>{const o=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${m2(TI).contentName}}.`;return x.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},OI=n2,Zm=i2,Ba=s2,Ha=a2,sd=c2,ad=d2,g2=h2,ys='[cmdk-group=""]',jf='[cmdk-group-items=""]',$I='[cmdk-group-heading=""]',v2='[cmdk-item=""]',uy=`${v2}:not([aria-disabled="true"])`,Qh="cmdk-item-select",ri="data-value",DI=(e,n,r)=>ST(e,n,r),y2=x.createContext(void 0),Ua=()=>x.useContext(y2),x2=x.createContext(void 0),Jm=()=>x.useContext(x2),w2=x.createContext(void 0),b2=x.forwardRef((e,n)=>{let r=oi(()=>{var O,X;return{search:"",value:(X=(O=e.value)!=null?O:e.defaultValue)!=null?X:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),o=oi(()=>new Set),i=oi(()=>new Map),s=oi(()=>new Map),a=oi(()=>new Set),l=_2(e),{label:c,children:u,value:f,onValueChange:d,filter:h,shouldFilter:g,loop:v,disablePointerSelection:b=!1,vimBindings:_=!0,...m}=e,w=Tt(),y=Tt(),S=Tt(),k=x.useRef(null),C=XI();Ro(()=>{if(f!==void 0){let O=f.trim();r.current.value=O,N.emit()}},[f]),Ro(()=>{C(6,B)},[]);let N=x.useMemo(()=>({subscribe:O=>(a.current.add(O),()=>a.current.delete(O)),snapshot:()=>r.current,setState:(O,X,F)=>{var U,G,W,Y;if(!Object.is(r.current[O],X)){if(r.current[O]=X,O==="search")D(),A(),C(1,T);else if(O==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let q=document.getElementById(S);q?q.focus():(U=document.getElementById(w))==null||U.focus()}if(C(7,()=>{var q;r.current.selectedItemId=(q=j())==null?void 0:q.id,N.emit()}),F||C(5,B),((G=l.current)==null?void 0:G.value)!==void 0){let q=X??"";(Y=(W=l.current).onValueChange)==null||Y.call(W,q);return}}N.emit()}},emit:()=>{a.current.forEach(O=>O())}}),[]),E=x.useMemo(()=>({value:(O,X,F)=>{var U;X!==((U=s.current.get(O))==null?void 0:U.value)&&(s.current.set(O,{value:X,keywords:F}),r.current.filtered.items.set(O,P(X,F)),C(2,()=>{A(),N.emit()}))},item:(O,X)=>(o.current.add(O),X&&(i.current.has(X)?i.current.get(X).add(O):i.current.set(X,new Set([O]))),C(3,()=>{D(),A(),r.current.value||T(),N.emit()}),()=>{s.current.delete(O),o.current.delete(O),r.current.filtered.items.delete(O);let F=j();C(4,()=>{D(),(F==null?void 0:F.getAttribute("id"))===O&&T(),N.emit()})}),group:O=>(i.current.has(O)||i.current.set(O,new Set),()=>{s.current.delete(O),i.current.delete(O)}),filter:()=>l.current.shouldFilter,label:c||e["aria-label"],getDisablePointerSelection:()=>l.current.disablePointerSelection,listId:w,inputId:S,labelId:y,listInnerRef:k}),[]);function P(O,X){var F,U;let G=(U=(F=l.current)==null?void 0:F.filter)!=null?U:DI;return O?G(O,r.current.search,X):0}function A(){if(!r.current.search||l.current.shouldFilter===!1)return;let O=r.current.filtered.items,X=[];r.current.filtered.groups.forEach(U=>{let G=i.current.get(U),W=0;G.forEach(Y=>{let q=O.get(Y);W=Math.max(q,W)}),X.push([U,W])});let F=k.current;L().sort((U,G)=>{var W,Y;let q=U.getAttribute("id"),te=G.getAttribute("id");return((W=O.get(te))!=null?W:0)-((Y=O.get(q))!=null?Y:0)}).forEach(U=>{let G=U.closest(jf);G?G.appendChild(U.parentElement===G?U:U.closest(`${jf} > *`)):F.appendChild(U.parentElement===F?U:U.closest(`${jf} > *`))}),X.sort((U,G)=>G[1]-U[1]).forEach(U=>{var G;let W=(G=k.current)==null?void 0:G.querySelector(`${ys}[${ri}="${encodeURIComponent(U[0])}"]`);W==null||W.parentElement.appendChild(W)})}function T(){let O=L().find(F=>F.getAttribute("aria-disabled")!=="true"),X=O==null?void 0:O.getAttribute(ri);N.setState("value",X||void 0)}function D(){var O,X,F,U;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 W of o.current){let Y=(X=(O=s.current.get(W))==null?void 0:O.value)!=null?X:"",q=(U=(F=s.current.get(W))==null?void 0:F.keywords)!=null?U:[],te=P(Y,q);r.current.filtered.items.set(W,te),te>0&&G++}for(let[W,Y]of i.current)for(let q of Y)if(r.current.filtered.items.get(q)>0){r.current.filtered.groups.add(W);break}r.current.filtered.count=G}function B(){var O,X,F;let U=j();U&&(((O=U.parentElement)==null?void 0:O.firstChild)===U&&((F=(X=U.closest(ys))==null?void 0:X.querySelector($I))==null||F.scrollIntoView({block:"nearest"})),U.scrollIntoView({block:"nearest"}))}function j(){var O;return(O=k.current)==null?void 0:O.querySelector(`${v2}[aria-selected="true"]`)}function L(){var O;return Array.from(((O=k.current)==null?void 0:O.querySelectorAll(uy))||[])}function I(O){let X=L()[O];X&&N.setState("value",X.getAttribute(ri))}function z(O){var X;let F=j(),U=L(),G=U.findIndex(Y=>Y===F),W=U[G+O];(X=l.current)!=null&&X.loop&&(W=G+O<0?U[U.length-1]:G+O===U.length?U[0]:U[G+O]),W&&N.setState("value",W.getAttribute(ri))}function M(O){let X=j(),F=X==null?void 0:X.closest(ys),U;for(;F&&!U;)F=O>0?GI(F,ys):YI(F,ys),U=F==null?void 0:F.querySelector(uy);U?N.setState("value",U.getAttribute(ri)):z(O)}let R=()=>I(L().length-1),$=O=>{O.preventDefault(),O.metaKey?R():O.altKey?M(1):z(1)},V=O=>{O.preventDefault(),O.metaKey?I(0):O.altKey?M(-1):z(-1)};return x.createElement(ht.div,{ref:n,tabIndex:-1,...m,"cmdk-root":"",onKeyDown:O=>{var X;(X=m.onKeyDown)==null||X.call(m,O);let F=O.nativeEvent.isComposing||O.keyCode===229;if(!(O.defaultPrevented||F))switch(O.key){case"n":case"j":{_&&O.ctrlKey&&$(O);break}case"ArrowDown":{$(O);break}case"p":case"k":{_&&O.ctrlKey&&V(O);break}case"ArrowUp":{V(O);break}case"Home":{O.preventDefault(),I(0);break}case"End":{O.preventDefault(),R();break}case"Enter":{O.preventDefault();let U=j();if(U){let G=new Event(Qh);U.dispatchEvent(G)}}}}},x.createElement("label",{"cmdk-label":"",htmlFor:E.inputId,id:E.labelId,style:qI},c),ld(e,O=>x.createElement(x2.Provider,{value:N},x.createElement(y2.Provider,{value:E},O))))}),LI=x.forwardRef((e,n)=>{var r,o;let i=Tt(),s=x.useRef(null),a=x.useContext(w2),l=Ua(),c=_2(e),u=(o=(r=c.current)==null?void 0:r.forceMount)!=null?o:a==null?void 0:a.forceMount;Ro(()=>{if(!u)return l.item(i,a==null?void 0:a.id)},[u]);let f=S2(i,s,[e.value,e.children,s],e.keywords),d=Jm(),h=Vr(C=>C.value&&C.value===f.current),g=Vr(C=>u||l.filter()===!1?!0:C.search?C.filtered.items.get(i)>0:!0);x.useEffect(()=>{let C=s.current;if(!(!C||e.disabled))return C.addEventListener(Qh,v),()=>C.removeEventListener(Qh,v)},[g,e.onSelect,e.disabled]);function v(){var C,N;b(),(N=(C=c.current).onSelect)==null||N.call(C,f.current)}function b(){d.setState("value",f.current,!0)}if(!g)return null;let{disabled:_,value:m,onSelect:w,forceMount:y,keywords:S,...k}=e;return x.createElement(ht.div,{ref:Tn(s,n),...k,id:i,"cmdk-item":"",role:"option","aria-disabled":!!_,"aria-selected":!!h,"data-disabled":!!_,"data-selected":!!h,onPointerMove:_||l.getDisablePointerSelection()?void 0:b,onClick:_?void 0:v},e.children)}),zI=x.forwardRef((e,n)=>{let{heading:r,children:o,forceMount:i,...s}=e,a=Tt(),l=x.useRef(null),c=x.useRef(null),u=Tt(),f=Ua(),d=Vr(g=>i||f.filter()===!1?!0:g.search?g.filtered.groups.has(a):!0);Ro(()=>f.group(a),[]),S2(a,l,[e.value,e.heading,c]);let h=x.useMemo(()=>({id:a,forceMount:i}),[i]);return x.createElement(ht.div,{ref:Tn(l,n),...s,"cmdk-group":"",role:"presentation",hidden:d?void 0:!0},r&&x.createElement("div",{ref:c,"cmdk-group-heading":"","aria-hidden":!0,id:u},r),ld(e,g=>x.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":r?u:void 0},x.createElement(w2.Provider,{value:h},g))))}),FI=x.forwardRef((e,n)=>{let{alwaysRender:r,...o}=e,i=x.useRef(null),s=Vr(a=>!a.search);return!r&&!s?null:x.createElement(ht.div,{ref:Tn(i,n),...o,"cmdk-separator":"",role:"separator"})}),BI=x.forwardRef((e,n)=>{let{onValueChange:r,...o}=e,i=e.value!=null,s=Jm(),a=Vr(u=>u.search),l=Vr(u=>u.selectedItemId),c=Ua();return x.useEffect(()=>{e.value!=null&&s.setState("search",e.value)},[e.value]),x.createElement(ht.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)}})}),HI=x.forwardRef((e,n)=>{let{children:r,label:o="Suggestions",...i}=e,s=x.useRef(null),a=x.useRef(null),l=Vr(u=>u.selectedItemId),c=Ua();return x.useEffect(()=>{if(a.current&&s.current){let u=a.current,f=s.current,d,h=new ResizeObserver(()=>{d=requestAnimationFrame(()=>{let g=u.offsetHeight;f.style.setProperty("--cmdk-list-height",g.toFixed(1)+"px")})});return h.observe(u),()=>{cancelAnimationFrame(d),h.unobserve(u)}}},[]),x.createElement(ht.div,{ref:Tn(s,n),...i,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":l,"aria-label":o,id:c.listId},ld(e,u=>x.createElement("div",{ref:Tn(a,c.listInnerRef),"cmdk-list-sizer":""},u)))}),UI=x.forwardRef((e,n)=>{let{open:r,onOpenChange:o,overlayClassName:i,contentClassName:s,container:a,...l}=e;return x.createElement(OI,{open:r,onOpenChange:o},x.createElement(Zm,{container:a},x.createElement(Ba,{"cmdk-overlay":"",className:i}),x.createElement(Ha,{"aria-label":e.label,"cmdk-dialog":"",className:s},x.createElement(b2,{ref:n,...l}))))}),VI=x.forwardRef((e,n)=>Vr(r=>r.filtered.count===0)?x.createElement(ht.div,{ref:n,...e,"cmdk-empty":"",role:"presentation"}):null),WI=x.forwardRef((e,n)=>{let{progress:r,children:o,label:i="Loading...",...s}=e;return x.createElement(ht.div,{ref:n,...s,"cmdk-loading":"",role:"progressbar","aria-valuenow":r,"aria-valuemin":0,"aria-valuemax":100,"aria-label":i},ld(e,a=>x.createElement("div",{"aria-hidden":!0},a)))}),St=Object.assign(b2,{List:HI,Item:LI,Input:BI,Group:zI,Separator:FI,Dialog:UI,Empty:VI,Loading:WI});function GI(e,n){let r=e.nextElementSibling;for(;r;){if(r.matches(n))return r;r=r.nextElementSibling}}function YI(e,n){let r=e.previousElementSibling;for(;r;){if(r.matches(n))return r;r=r.previousElementSibling}}function _2(e){let n=x.useRef(e);return Ro(()=>{n.current=e}),n}var Ro=typeof window>"u"?x.useEffect:x.useLayoutEffect;function oi(e){let n=x.useRef();return n.current===void 0&&(n.current=e()),n}function Vr(e){let n=Jm(),r=()=>e(n.snapshot());return x.useSyncExternalStore(n.subscribe,r,r)}function S2(e,n,r,o=[]){let i=x.useRef(),s=Ua();return Ro(()=>{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(ri,l),i.current=l}),i}var XI=()=>{let[e,n]=x.useState(),r=oi(()=>new Map);return Ro(()=>{r.current.forEach(o=>o()),r.current=new Map},[e]),(o,i)=>{r.current.set(o,i),n({})}};function KI(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&&x.isValidElement(n)?x.cloneElement(KI(n),{ref:n.ref},r(n.props.children)):r(n)}var qI={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};const QI=x.forwardRef(({className:e,...n},r)=>p.jsx(St,{ref:r,className:ae("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...n}));QI.displayName=St.displayName;const ZI=x.forwardRef(({className:e,...n},r)=>p.jsxs("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[p.jsx(kA,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),p.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})]}));ZI.displayName=St.Input.displayName;const JI=x.forwardRef(({className:e,onWheel:n,...r},o)=>p.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}));JI.displayName=St.List.displayName;const e4=x.forwardRef((e,n)=>p.jsx(St.Empty,{ref:n,className:"py-6 text-center text-sm",...e}));e4.displayName=St.Empty.displayName;const t4=x.forwardRef(({className:e,...n},r)=>p.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}));t4.displayName=St.Group.displayName;const n4=x.forwardRef(({className:e,...n},r)=>p.jsx(St.Separator,{ref:r,className:ae("-mx-1 h-px bg-border",e),...n}));n4.displayName=St.Separator.displayName;const r4=x.forwardRef(({className:e,...n},r)=>p.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}));r4.displayName=St.Item.displayName;const o4=Zm,k2=x.forwardRef(({className:e,...n},r)=>p.jsx(Ba,{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}));k2.displayName=Ba.displayName;const i4=x.forwardRef(({className:e,children:n,...r},o)=>p.jsxs(o4,{children:[p.jsx(k2,{}),p.jsxs(Ha,{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,p.jsxs(g2,{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:[p.jsx(tu,{className:"h-4 w-4"}),p.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));i4.displayName=Ha.displayName;const s4=x.forwardRef(({className:e,...n},r)=>p.jsx(sd,{ref:r,className:ae("text-lg font-semibold leading-none tracking-tight",e),...n}));s4.displayName=sd.displayName;const a4=x.forwardRef(({className:e,...n},r)=>p.jsx(ad,{ref:r,className:ae("text-sm text-muted-foreground",e),...n}));a4.displayName=ad.displayName;function eg(e){const n=e+"CollectionProvider",[r,o]=Zt(n),[i,s]=r(n,{collectionRef:{current:null},itemMap:new Map}),a=b=>{const{scope:_,children:m}=b,w=ot.useRef(null),y=ot.useRef(new Map).current;return p.jsx(i,{scope:_,itemMap:y,collectionRef:w,children:m})};a.displayName=n;const l=e+"CollectionSlot",c=jo(l),u=ot.forwardRef((b,_)=>{const{scope:m,children:w}=b,y=s(l,m),S=xe(_,y.collectionRef);return p.jsx(c,{ref:S,children:w})});u.displayName=l;const f=e+"CollectionItemSlot",d="data-radix-collection-item",h=jo(f),g=ot.forwardRef((b,_)=>{const{scope:m,children:w,...y}=b,S=ot.useRef(null),k=xe(_,S),C=s(f,m);return ot.useEffect(()=>(C.itemMap.set(S,{ref:S,...y}),()=>void C.itemMap.delete(S))),p.jsx(h,{[d]:"",ref:k,children:w})});g.displayName=f;function v(b){const _=s(e+"CollectionConsumer",b);return ot.useCallback(()=>{const w=_.collectionRef.current;if(!w)return[];const y=Array.from(w.querySelectorAll(`[${d}]`));return Array.from(_.itemMap.values()).sort((C,N)=>y.indexOf(C.ref.current)-y.indexOf(N.ref.current))},[_.collectionRef,_.itemMap])}return[{Provider:a,Slot:u,ItemSlot:g},v,o]}var l4=x.createContext(void 0);function C2(e){const n=x.useContext(l4);return e||n||"ltr"}const c4=["top","right","bottom","left"],Wr=Math.min,Mt=Math.max,ru=Math.round,zl=Math.floor,Mn=e=>({x:e,y:e}),u4={left:"right",right:"left",bottom:"top",top:"bottom"};function Zh(e,n,r){return Mt(e,Wr(n,r))}function or(e,n){return typeof e=="function"?e(n):e}function ir(e){return e.split("-")[0]}function ss(e){return e.split("-")[1]}function tg(e){return e==="x"?"y":"x"}function ng(e){return e==="y"?"height":"width"}function Nn(e){const n=e[0];return n==="t"||n==="b"?"y":"x"}function rg(e){return tg(Nn(e))}function d4(e,n,r){r===void 0&&(r=!1);const o=ss(e),i=rg(e),s=ng(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 f4(e){const n=ou(e);return[Jh(e),n,Jh(n)]}function Jh(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const dy=["left","right"],fy=["right","left"],h4=["top","bottom"],p4=["bottom","top"];function m4(e,n,r){switch(e){case"top":case"bottom":return r?n?fy:dy:n?dy:fy;case"left":case"right":return n?h4:p4;default:return[]}}function g4(e,n,r,o){const i=ss(e);let s=m4(ir(e),r==="start",o);return i&&(s=s.map(a=>a+"-"+i),n&&(s=s.concat(s.map(Jh)))),s}function ou(e){const n=ir(e);return u4[n]+e.slice(n.length)}function v4(e){return{top:0,right:0,bottom:0,left:0,...e}}function N2(e){return typeof e!="number"?v4(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 hy(e,n,r){let{reference:o,floating:i}=e;const s=Nn(n),a=rg(n),l=ng(a),c=ir(n),u=s==="y",f=o.x+o.width/2-i.width/2,d=o.y+o.height/2-i.height/2,h=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(ss(n)){case"start":g[a]-=h*(r&&u?-1:1);break;case"end":g[a]+=h*(r&&u?-1:1);break}return g}async function y4(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:h=!1,padding:g=0}=or(n,e),v=N2(g),_=l[h?d==="floating"?"reference":"floating":d],m=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})),w=d==="floating"?{x:o,y:i,width:a.floating.width,height:a.floating.height}:a.reference,y=await(s.getOffsetParent==null?void 0:s.getOffsetParent(l.floating)),S=await(s.isElement==null?void 0:s.isElement(y))?await(s.getScale==null?void 0:s.getScale(y))||{x:1,y:1}:{x:1,y:1},k=iu(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:w,offsetParent:y,strategy:c}):w);return{top:(m.top-k.top+v.top)/S.y,bottom:(k.bottom-m.bottom+v.bottom)/S.y,left:(m.left-k.left+v.left)/S.x,right:(k.right-m.right+v.right)/S.x}}const x4=50,w4=async(e,n,r)=>{const{placement:o="bottom",strategy:i="absolute",middleware:s=[],platform:a}=r,l=a.detectOverflow?a:{...a,detectOverflow:y4},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}=hy(u,o,c),h=o,g=0;const v={};for(let b=0;b<s.length;b++){const _=s[b];if(!_)continue;const{name:m,fn:w}=_,{x:y,y:S,data:k,reset:C}=await w({x:f,y:d,initialPlacement:o,placement:h,strategy:i,middlewareData:v,rects:u,platform:l,elements:{reference:e,floating:n}});f=y??f,d=S??d,v[m]={...v[m],...k},C&&g<x4&&(g++,typeof C=="object"&&(C.placement&&(h=C.placement),C.rects&&(u=C.rects===!0?await a.getElementRects({reference:e,floating:n,strategy:i}):C.rects),{x:f,y:d}=hy(u,h,c)),b=-1)}return{x:f,y:d,placement:h,strategy:i,middlewareData:v}},b4=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}=or(e,n)||{};if(u==null)return{};const d=N2(f),h={x:r,y:o},g=rg(i),v=ng(g),b=await a.getDimensions(u),_=g==="y",m=_?"top":"left",w=_?"bottom":"right",y=_?"clientHeight":"clientWidth",S=s.reference[v]+s.reference[g]-h[g]-s.floating[v],k=h[g]-s.reference[g],C=await(a.getOffsetParent==null?void 0:a.getOffsetParent(u));let N=C?C[y]:0;(!N||!await(a.isElement==null?void 0:a.isElement(C)))&&(N=l.floating[y]||s.floating[v]);const E=S/2-k/2,P=N/2-b[v]/2-1,A=Wr(d[m],P),T=Wr(d[w],P),D=A,B=N-b[v]-T,j=N/2-b[v]/2+E,L=Zh(D,j,B),I=!c.arrow&&ss(i)!=null&&j!==L&&s.reference[v]/2-(j<D?A:T)-b[v]/2<0,z=I?j<D?j-D:j-B:0;return{[g]:h[g]+z,data:{[g]:L,centerOffset:j-L-z,...I&&{alignmentOffset:z}},reset:I}}}),_4=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:h,fallbackStrategy:g="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:b=!0,..._}=or(e,n);if((r=s.arrow)!=null&&r.alignmentOffset)return{};const m=ir(i),w=Nn(l),y=ir(l)===l,S=await(c.isRTL==null?void 0:c.isRTL(u.floating)),k=h||(y||!b?[ou(l)]:f4(l)),C=v!=="none";!h&&C&&k.push(...g4(l,b,v,S));const N=[l,...k],E=await c.detectOverflow(n,_),P=[];let A=((o=s.flip)==null?void 0:o.overflows)||[];if(f&&P.push(E[m]),d){const j=d4(i,a,S);P.push(E[j[0]],E[j[1]])}if(A=[...A,{placement:i,overflows:P}],!P.every(j=>j<=0)){var T,D;const j=(((T=s.flip)==null?void 0:T.index)||0)+1,L=N[j];if(L&&(!(d==="alignment"?w!==Nn(L):!1)||A.every(M=>Nn(M.placement)===w?M.overflows[0]>0:!0)))return{data:{index:j,overflows:A},reset:{placement:L}};let I=(D=A.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 B;const z=(B=A.filter(M=>{if(C){const R=Nn(M.placement);return R===w||R==="y"}return!0}).map(M=>[M.placement,M.overflows.filter(R=>R>0).reduce((R,$)=>R+$,0)]).sort((M,R)=>M[1]-R[1])[0])==null?void 0:B[0];z&&(I=z);break}case"initialPlacement":I=l;break}if(i!==I)return{reset:{placement:I}}}return{}}}};function py(e,n){return{top:e.top-n.height,right:e.right-n.width,bottom:e.bottom-n.height,left:e.left-n.width}}function my(e){return c4.some(n=>e[n]>=0)}const S4=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(n){const{rects:r,platform:o}=n,{strategy:i="referenceHidden",...s}=or(e,n);switch(i){case"referenceHidden":{const a=await o.detectOverflow(n,{...s,elementContext:"reference"}),l=py(a,r.reference);return{data:{referenceHiddenOffsets:l,referenceHidden:my(l)}}}case"escaped":{const a=await o.detectOverflow(n,{...s,altBoundary:!0}),l=py(a,r.floating);return{data:{escapedOffsets:l,escaped:my(l)}}}default:return{}}}}},E2=new Set(["left","top"]);async function k4(e,n){const{placement:r,platform:o,elements:i}=e,s=await(o.isRTL==null?void 0:o.isRTL(i.floating)),a=ir(r),l=ss(r),c=Nn(r)==="y",u=E2.has(a)?-1:1,f=s&&c?-1:1,d=or(n,e);let{mainAxis:h,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:h*u}:{x:h*u,y:g*f}}const C4=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 k4(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}}}}},N4=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:m=>{let{x:w,y}=m;return{x:w,y}}},...u}=or(e,n),f={x:r,y:o},d=await s.detectOverflow(n,u),h=Nn(ir(i)),g=tg(h);let v=f[g],b=f[h];if(a){const m=g==="y"?"top":"left",w=g==="y"?"bottom":"right",y=v+d[m],S=v-d[w];v=Zh(y,v,S)}if(l){const m=h==="y"?"top":"left",w=h==="y"?"bottom":"right",y=b+d[m],S=b-d[w];b=Zh(y,b,S)}const _=c.fn({...n,[g]:v,[h]:b});return{..._,data:{x:_.x-r,y:_.y-o,enabled:{[g]:a,[h]:l}}}}}},E4=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}=or(e,n),f={x:r,y:o},d=Nn(i),h=tg(d);let g=f[h],v=f[d];const b=or(l,n),_=typeof b=="number"?{mainAxis:b,crossAxis:0}:{mainAxis:0,crossAxis:0,...b};if(c){const y=h==="y"?"height":"width",S=s.reference[h]-s.floating[y]+_.mainAxis,k=s.reference[h]+s.reference[y]-_.mainAxis;g<S?g=S:g>k&&(g=k)}if(u){var m,w;const y=h==="y"?"width":"height",S=E2.has(ir(i)),k=s.reference[d]-s.floating[y]+(S&&((m=a.offset)==null?void 0:m[d])||0)+(S?0:_.crossAxis),C=s.reference[d]+s.reference[y]+(S?0:((w=a.offset)==null?void 0:w[d])||0)-(S?_.crossAxis:0);v<k?v=k:v>C&&(v=C)}return{[h]:g,[d]:v}}}},P4=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}=or(e,n),f=await a.detectOverflow(n,u),d=ir(i),h=ss(i),g=Nn(i)==="y",{width:v,height:b}=s.floating;let _,m;d==="top"||d==="bottom"?(_=d,m=h===(await(a.isRTL==null?void 0:a.isRTL(l.floating))?"start":"end")?"left":"right"):(m=d,_=h==="end"?"top":"bottom");const w=b-f.top-f.bottom,y=v-f.left-f.right,S=Wr(b-f[_],w),k=Wr(v-f[m],y),C=!n.middlewareData.shift;let N=S,E=k;if((r=n.middlewareData.shift)!=null&&r.enabled.x&&(E=y),(o=n.middlewareData.shift)!=null&&o.enabled.y&&(N=w),C&&!h){const A=Mt(f.left,0),T=Mt(f.right,0),D=Mt(f.top,0),B=Mt(f.bottom,0);g?E=v-2*(A!==0||T!==0?A+T:Mt(f.left,f.right)):N=b-2*(D!==0||B!==0?D+B:Mt(f.top,f.bottom))}await c({...n,availableWidth:E,availableHeight:N});const P=await a.getDimensions(l.floating);return v!==P.width||b!==P.height?{reset:{rects:!0}}:{}}}};function cd(){return typeof window<"u"}function as(e){return P2(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=(P2(e)?e.ownerDocument:e.document)||window.document)==null?void 0:n.documentElement}function P2(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 cr(e){return cd()?e instanceof HTMLElement||e instanceof It(e).HTMLElement:!1}function gy(e){return!cd()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof It(e).ShadowRoot}function Va(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 j4(e){return/^(table|td|th)$/.test(as(e))}function ud(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const M4=/transform|translate|scale|rotate|perspective|filter/,R4=/paint|layout|strict|content/,lo=e=>!!e&&e!=="none";let Mf;function og(e){const n=mn(e)?gn(e):e;return lo(n.transform)||lo(n.translate)||lo(n.scale)||lo(n.rotate)||lo(n.perspective)||!ig()&&(lo(n.backdropFilter)||lo(n.filter))||M4.test(n.willChange||"")||R4.test(n.contain||"")}function A4(e){let n=Gr(e);for(;cr(n)&&!Fi(n);){if(og(n))return n;if(ud(n))return null;n=Gr(n)}return null}function ig(){return Mf==null&&(Mf=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Mf}function Fi(e){return/^(html|body|#document)$/.test(as(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 Gr(e){if(as(e)==="html")return e;const n=e.assignedSlot||e.parentNode||gy(e)&&e.host||$n(e);return gy(n)?n.host:n}function j2(e){const n=Gr(e);return Fi(n)?e.ownerDocument?e.ownerDocument.body:e.body:cr(n)&&Va(n)?n:j2(n)}function ya(e,n,r){var o;n===void 0&&(n=[]),r===void 0&&(r=!0);const i=j2(e),s=i===((o=e.ownerDocument)==null?void 0:o.body),a=It(i);if(s){const l=ep(a);return n.concat(a,a.visualViewport||[],Va(i)?i:[],l&&r?ya(l):[])}else return n.concat(i,ya(i,[],r))}function ep(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function M2(e){const n=gn(e);let r=parseFloat(n.width)||0,o=parseFloat(n.height)||0;const i=cr(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 sg(e){return mn(e)?e:e.contextElement}function Ei(e){const n=sg(e);if(!cr(n))return Mn(1);const r=n.getBoundingClientRect(),{width:o,height:i,$:s}=M2(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 T4=Mn(0);function R2(e){const n=It(e);return!ig()||!n.visualViewport?T4:{x:n.visualViewport.offsetLeft,y:n.visualViewport.offsetTop}}function I4(e,n,r){return n===void 0&&(n=!1),!r||n&&r!==It(e)?!1:n}function Ao(e,n,r,o){n===void 0&&(n=!1),r===void 0&&(r=!1);const i=e.getBoundingClientRect(),s=sg(e);let a=Mn(1);n&&(o?mn(o)&&(a=Ei(o)):a=Ei(e));const l=I4(s,r,o)?R2(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 h=It(s),g=o&&mn(o)?It(o):o;let v=h,b=ep(v);for(;b&&o&&g!==v;){const _=Ei(b),m=b.getBoundingClientRect(),w=gn(b),y=m.left+(b.clientLeft+parseFloat(w.paddingLeft))*_.x,S=m.top+(b.clientTop+parseFloat(w.paddingTop))*_.y;c*=_.x,u*=_.y,f*=_.x,d*=_.y,c+=y,u+=S,v=It(b),b=ep(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:Ao($n(e)).left+r}function A2(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 O4(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=cr(o);if((d||!d&&!s)&&((as(o)!=="body"||Va(a))&&(c=dd(o)),d)){const g=Ao(o);u=Ei(o),f.x=g.x+o.clientLeft,f.y=g.y+o.clientTop}const h=a&&!d&&!s?A2(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+h.x,y:r.y*u.y-c.scrollTop*u.y+f.y+h.y}}function $4(e){return Array.from(e.getClientRects())}function D4(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 vy=25;function L4(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=ig();(!f||f&&n==="fixed")&&(l=i.offsetLeft,c=i.offsetTop)}const u=fd(o);if(u<=0){const f=o.ownerDocument,d=f.body,h=getComputedStyle(d),g=f.compatMode==="CSS1Compat"&&parseFloat(h.marginLeft)+parseFloat(h.marginRight)||0,v=Math.abs(o.clientWidth-d.clientWidth-g);v<=vy&&(s-=v)}else u<=vy&&(s+=u);return{width:s,height:a,x:l,y:c}}function z4(e,n){const r=Ao(e,!0,n==="fixed"),o=r.top+e.clientTop,i=r.left+e.clientLeft,s=cr(e)?Ei(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 yy(e,n,r){let o;if(n==="viewport")o=L4(e,r);else if(n==="document")o=D4($n(e));else if(mn(n))o=z4(n,r);else{const i=R2(e);o={x:n.x-i.x,y:n.y-i.y,width:n.width,height:n.height}}return iu(o)}function T2(e,n){const r=Gr(e);return r===n||!mn(r)||Fi(r)?!1:gn(r).position==="fixed"||T2(r,n)}function F4(e,n){const r=n.get(e);if(r)return r;let o=ya(e,[],!1).filter(l=>mn(l)&&as(l)!=="body"),i=null;const s=gn(e).position==="fixed";let a=s?Gr(e):e;for(;mn(a)&&!Fi(a);){const l=gn(a),c=og(a);!c&&l.position==="fixed"&&(i=null),(s?!c&&!i:!c&&l.position==="static"&&!!i&&(i.position==="absolute"||i.position==="fixed")||Va(a)&&!c&&T2(e,a))?o=o.filter(f=>f!==a):i=l,a=Gr(a)}return n.set(e,o),o}function B4(e){let{element:n,boundary:r,rootBoundary:o,strategy:i}=e;const a=[...r==="clippingAncestors"?ud(n)?[]:F4(n,this._c):[].concat(r),o],l=yy(n,a[0],i);let c=l.top,u=l.right,f=l.bottom,d=l.left;for(let h=1;h<a.length;h++){const g=yy(n,a[h],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 H4(e){const{width:n,height:r}=M2(e);return{width:n,height:r}}function U4(e,n,r){const o=cr(n),i=$n(n),s=r==="fixed",a=Ao(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((as(n)!=="body"||Va(i))&&(l=dd(n)),o){const g=Ao(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?A2(i,l):Mn(0),d=a.left+l.scrollLeft-c.x-f.x,h=a.top+l.scrollTop-c.y-f.y;return{x:d,y:h,width:a.width,height:a.height}}function Rf(e){return gn(e).position==="static"}function xy(e,n){if(!cr(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 I2(e,n){const r=It(e);if(ud(e))return r;if(!cr(e)){let i=Gr(e);for(;i&&!Fi(i);){if(mn(i)&&!Rf(i))return i;i=Gr(i)}return r}let o=xy(e,n);for(;o&&j4(o)&&Rf(o);)o=xy(o,n);return o&&Fi(o)&&Rf(o)&&!og(o)?r:o||A4(e)||r}const V4=async function(e){const n=this.getOffsetParent||I2,r=this.getDimensions,o=await r(e.floating);return{reference:U4(e.reference,await n(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function W4(e){return gn(e).direction==="rtl"}const G4={convertOffsetParentRelativeRectToViewportRelativeRect:O4,getDocumentElement:$n,getClippingRect:B4,getOffsetParent:I2,getElementRects:V4,getClientRects:$4,getDimensions:H4,getScale:Ei,isElement:mn,isRTL:W4};function O2(e,n){return e.x===n.x&&e.y===n.y&&e.width===n.width&&e.height===n.height}function Y4(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:h,height:g}=u;if(l||n(),!h||!g)return;const v=zl(d),b=zl(i.clientWidth-(f+h)),_=zl(i.clientHeight-(d+g)),m=zl(f),y={rootMargin:-v+"px "+-b+"px "+-_+"px "+-m+"px",threshold:Mt(0,Wr(1,c))||1};let S=!0;function k(C){const N=C[0].intersectionRatio;if(N!==c){if(!S)return a();N?a(!1,N):o=setTimeout(()=>{a(!1,1e-7)},1e3)}N===1&&!O2(u,e.getBoundingClientRect())&&a(),S=!1}try{r=new IntersectionObserver(k,{...y,root:i.ownerDocument})}catch{r=new IntersectionObserver(k,y)}r.observe(e)}return a(!0),s}function X4(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=sg(e),f=i||s?[...u?ya(u):[],...n?ya(n):[]]:[];f.forEach(m=>{i&&m.addEventListener("scroll",r,{passive:!0}),s&&m.addEventListener("resize",r)});const d=u&&l?Y4(u,r):null;let h=-1,g=null;a&&(g=new ResizeObserver(m=>{let[w]=m;w&&w.target===u&&g&&n&&(g.unobserve(n),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var y;(y=g)==null||y.observe(n)})),r()}),u&&!c&&g.observe(u),n&&g.observe(n));let v,b=c?Ao(e):null;c&&_();function _(){const m=Ao(e);b&&!O2(b,m)&&r(),b=m,v=requestAnimationFrame(_)}return r(),()=>{var m;f.forEach(w=>{i&&w.removeEventListener("scroll",r),s&&w.removeEventListener("resize",r)}),d==null||d(),(m=g)==null||m.disconnect(),g=null,c&&cancelAnimationFrame(v)}}const K4=C4,q4=N4,Q4=_4,Z4=P4,J4=S4,wy=b4,eO=E4,tO=(e,n,r)=>{const o=new Map,i={platform:G4,...r},s={...i.platform,_c:o};return w4(e,n,{...i,platform:s})};var nO=typeof document<"u",rO=function(){},yc=nO?x.useLayoutEffect:rO;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 $2(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function by(e,n){const r=$2(e);return Math.round(n*r)/r}function Af(e){const n=x.useRef(e);return yc(()=>{n.current=e}),n}function oO(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]=x.useState({x:0,y:0,strategy:r,placement:n,middlewareData:{},isPositioned:!1}),[h,g]=x.useState(o);su(h,o)||g(o);const[v,b]=x.useState(null),[_,m]=x.useState(null),w=x.useCallback(M=>{M!==C.current&&(C.current=M,b(M))},[]),y=x.useCallback(M=>{M!==N.current&&(N.current=M,m(M))},[]),S=s||v,k=a||_,C=x.useRef(null),N=x.useRef(null),E=x.useRef(f),P=c!=null,A=Af(c),T=Af(i),D=Af(u),B=x.useCallback(()=>{if(!C.current||!N.current)return;const M={placement:n,strategy:r,middleware:h};T.current&&(M.platform=T.current),tO(C.current,N.current,M).then(R=>{const $={...R,isPositioned:D.current!==!1};j.current&&!su(E.current,$)&&(E.current=$,es.flushSync(()=>{d($)}))})},[h,n,r,T,D]);yc(()=>{u===!1&&E.current.isPositioned&&(E.current.isPositioned=!1,d(M=>({...M,isPositioned:!1})))},[u]);const j=x.useRef(!1);yc(()=>(j.current=!0,()=>{j.current=!1}),[]),yc(()=>{if(S&&(C.current=S),k&&(N.current=k),S&&k){if(A.current)return A.current(S,k,B);B()}},[S,k,B,A,P]);const L=x.useMemo(()=>({reference:C,floating:N,setReference:w,setFloating:y}),[w,y]),I=x.useMemo(()=>({reference:S,floating:k}),[S,k]),z=x.useMemo(()=>{const M={position:r,left:0,top:0};if(!I.floating)return M;const R=by(I.floating,f.x),$=by(I.floating,f.y);return l?{...M,transform:"translate("+R+"px, "+$+"px)",...$2(I.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:R,top:$}},[r,l,I.floating,f.x,f.y]);return x.useMemo(()=>({...f,update:B,refs:L,elements:I,floatingStyles:z}),[f,B,L,I,z])}const iO=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?wy({element:o.current,padding:i}).fn(r):{}:o?wy({element:o,padding:i}).fn(r):{}}}},sO=(e,n)=>{const r=K4(e);return{name:r.name,fn:r.fn,options:[e,n]}},aO=(e,n)=>{const r=q4(e);return{name:r.name,fn:r.fn,options:[e,n]}},lO=(e,n)=>({fn:eO(e).fn,options:[e,n]}),cO=(e,n)=>{const r=Q4(e);return{name:r.name,fn:r.fn,options:[e,n]}},uO=(e,n)=>{const r=Z4(e);return{name:r.name,fn:r.fn,options:[e,n]}},dO=(e,n)=>{const r=J4(e);return{name:r.name,fn:r.fn,options:[e,n]}},fO=(e,n)=>{const r=iO(e);return{name:r.name,fn:r.fn,options:[e,n]}};var hO="Arrow",D2=x.forwardRef((e,n)=>{const{children:r,width:o=10,height:i=5,...s}=e;return p.jsx(de.svg,{...s,ref:n,width:o,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:p.jsx("polygon",{points:"0,0 30,0 15,10"})})});D2.displayName=hO;var pO=D2,L2="Popper",[z2,Jr]=Zt(L2),[KG,F2]=z2(L2),B2="PopperAnchor",H2=x.forwardRef((e,n)=>{const{__scopePopper:r,virtualRef:o,...i}=e,s=F2(B2,r),a=x.useRef(null),l=xe(n,a),c=x.useRef(null);return x.useEffect(()=>{const u=c.current;c.current=(o==null?void 0:o.current)||a.current,u!==c.current&&s.onAnchorChange(c.current)}),o?null:p.jsx(de.div,{...i,ref:l})});H2.displayName=B2;var ag="PopperContent",[mO,gO]=z2(ag),U2=x.forwardRef((e,n)=>{var W,Y,q,te,J,Q;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:h=!1,updatePositionStrategy:g="optimized",onPlaced:v,...b}=e,_=F2(ag,r),[m,w]=x.useState(null),y=xe(n,ne=>w(ne)),[S,k]=x.useState(null),C=Gm(S),N=(C==null?void 0:C.width)??0,E=(C==null?void 0:C.height)??0,P=o+(s!=="center"?"-"+s:""),A=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},T=Array.isArray(u)?u:[u],D=T.length>0,B={padding:A,boundary:T.filter(yO),altBoundary:D},{refs:j,floatingStyles:L,placement:I,isPositioned:z,middlewareData:M}=oO({strategy:"fixed",placement:P,whileElementsMounted:(...ne)=>X4(...ne,{animationFrame:g==="always"}),elements:{reference:_.anchor},middleware:[sO({mainAxis:i+E,alignmentAxis:a}),c&&aO({mainAxis:!0,crossAxis:!1,limiter:d==="partial"?lO():void 0,...B}),c&&cO({...B}),uO({...B,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&&fO({element:S,padding:l}),xO({arrowWidth:N,arrowHeight:E}),h&&dO({strategy:"referenceHidden",...B})]}),[R,$]=G2(I),V=An(v);Ye(()=>{z&&(V==null||V())},[z,V]);const O=(W=M.arrow)==null?void 0:W.x,X=(Y=M.arrow)==null?void 0:Y.y,F=((q=M.arrow)==null?void 0:q.centerOffset)!==0,[U,G]=x.useState();return Ye(()=>{m&&G(window.getComputedStyle(m).zIndex)},[m]),p.jsx("div",{ref:j.setFloating,"data-radix-popper-content-wrapper":"",style:{...L,transform:z?L.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:U,"--radix-popper-transform-origin":[(te=M.transformOrigin)==null?void 0:te.x,(J=M.transformOrigin)==null?void 0:J.y].join(" "),...((Q=M.hide)==null?void 0:Q.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:p.jsx(mO,{scope:r,placedSide:R,onArrowChange:k,arrowX:O,arrowY:X,shouldHideArrow:F,children:p.jsx(de.div,{"data-side":R,"data-align":$,...b,ref:y,style:{...b.style,animation:z?void 0:"none"}})})})});U2.displayName=ag;var V2="PopperArrow",vO={top:"bottom",right:"left",bottom:"top",left:"right"},W2=x.forwardRef(function(n,r){const{__scopePopper:o,...i}=n,s=gO(V2,o),a=vO[s.placedSide];return p.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:p.jsx(pO,{...i,ref:r,style:{...i.style,display:"block"}})})});W2.displayName=V2;function yO(e){return e!==null}var xO=e=>({name:"transformOrigin",options:e,fn(n){var _,m,w;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]=G2(r),d={start:"0%",center:"50%",end:"100%"}[f],h=(((m=i.arrow)==null?void 0:m.x)??0)+l/2,g=(((w=i.arrow)==null?void 0:w.y)??0)+c/2;let v="",b="";return u==="bottom"?(v=a?d:`${h}px`,b=`${-c}px`):u==="top"?(v=a?d:`${h}px`,b=`${o.floating.height+c}px`):u==="right"?(v=`${-c}px`,b=a?d:`${g}px`):u==="left"&&(v=`${o.floating.width+c}px`,b=a?d:`${g}px`),{data:{x:v,y:b}}}});function G2(e){const[n,r="center"]=e.split("-");return[n,r]}var Wa=H2,hd=U2,pd=W2,Tf="rovingFocusGroup.onEntryFocus",wO={bubbles:!1,cancelable:!0},Ga="RovingFocusGroup",[tp,Y2,bO]=eg(Ga),[_O,md]=Zt(Ga,[bO]),[SO,kO]=_O(Ga),X2=x.forwardRef((e,n)=>p.jsx(tp.Provider,{scope:e.__scopeRovingFocusGroup,children:p.jsx(tp.Slot,{scope:e.__scopeRovingFocusGroup,children:p.jsx(CO,{...e,ref:n})})}));X2.displayName=Ga;var CO=x.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,h=x.useRef(null),g=xe(n,h),v=C2(s),[b,_]=La({prop:a,defaultProp:l??null,onChange:c,caller:Ga}),[m,w]=x.useState(!1),y=An(u),S=Y2(r),k=x.useRef(!1),[C,N]=x.useState(0);return x.useEffect(()=>{const E=h.current;if(E)return E.addEventListener(Tf,y),()=>E.removeEventListener(Tf,y)},[y]),p.jsx(SO,{scope:r,orientation:o,dir:v,loop:i,currentTabStopId:b,onItemFocus:x.useCallback(E=>_(E),[_]),onItemShiftTab:x.useCallback(()=>w(!0),[]),onFocusableItemAdd:x.useCallback(()=>N(E=>E+1),[]),onFocusableItemRemove:x.useCallback(()=>N(E=>E-1),[]),children:p.jsx(de.div,{tabIndex:m||C===0?-1:0,"data-orientation":o,...d,ref:g,style:{outline:"none",...e.style},onMouseDown:re(e.onMouseDown,()=>{k.current=!0}),onFocus:re(e.onFocus,E=>{const P=!k.current;if(E.target===E.currentTarget&&P&&!m){const A=new CustomEvent(Tf,wO);if(E.currentTarget.dispatchEvent(A),!A.defaultPrevented){const T=S().filter(I=>I.focusable),D=T.find(I=>I.active),B=T.find(I=>I.id===b),L=[D,B,...T].filter(Boolean).map(I=>I.ref.current);Q2(L,f)}}k.current=!1}),onBlur:re(e.onBlur,()=>w(!1))})})}),K2="RovingFocusGroupItem",q2=x.forwardRef((e,n)=>{const{__scopeRovingFocusGroup:r,focusable:o=!0,active:i=!1,tabStopId:s,children:a,...l}=e,c=Tt(),u=s||c,f=kO(K2,r),d=f.currentTabStopId===u,h=Y2(r),{onFocusableItemAdd:g,onFocusableItemRemove:v,currentTabStopId:b}=f;return x.useEffect(()=>{if(o)return g(),()=>v()},[o,g,v]),p.jsx(tp.ItemSlot,{scope:r,id:u,focusable:o,active:i,children:p.jsx(de.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 m=PO(_,f.orientation,f.dir);if(m!==void 0){if(_.metaKey||_.ctrlKey||_.altKey||_.shiftKey)return;_.preventDefault();let y=h().filter(S=>S.focusable).map(S=>S.ref.current);if(m==="last")y.reverse();else if(m==="prev"||m==="next"){m==="prev"&&y.reverse();const S=y.indexOf(_.currentTarget);y=f.loop?jO(y,S+1):y.slice(S+1)}setTimeout(()=>Q2(y))}}),children:typeof a=="function"?a({isCurrentTabStop:d,hasTabStop:b!=null}):a})})});q2.displayName=K2;var NO={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function EO(e,n){return n!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function PO(e,n,r){const o=EO(e.key,r);if(!(n==="vertical"&&["ArrowLeft","ArrowRight"].includes(o))&&!(n==="horizontal"&&["ArrowUp","ArrowDown"].includes(o)))return NO[o]}function Q2(e,n=!1){const r=document.activeElement;for(const o of e)if(o===r||(o.focus({preventScroll:n}),document.activeElement!==r))return}function jO(e,n){return e.map((r,o)=>e[(n+o)%e.length])}var Z2=X2,J2=q2,np=["Enter"," "],MO=["ArrowDown","PageUp","Home"],eS=["ArrowUp","PageDown","End"],RO=[...MO,...eS],AO={ltr:[...np,"ArrowRight"],rtl:[...np,"ArrowLeft"]},TO={ltr:["ArrowLeft"],rtl:["ArrowRight"]},gd="Menu",[xa,IO,OO]=eg(gd),[Bo,tS]=Zt(gd,[OO,Jr,md]),lg=Jr(),nS=md(),[qG,Ho]=Bo(gd),[QG,Ya]=Bo(gd),$O="MenuAnchor",cg=x.forwardRef((e,n)=>{const{__scopeMenu:r,...o}=e,i=lg(r);return p.jsx(Wa,{...i,...o,ref:n})});cg.displayName=$O;var ug="MenuPortal",[DO,rS]=Bo(ug,{forceMount:void 0}),oS=e=>{const{__scopeMenu:n,forceMount:r,children:o,container:i}=e,s=Ho(ug,n);return p.jsx(DO,{scope:n,forceMount:r,children:p.jsx(_t,{present:r||s.open,children:p.jsx(is,{asChild:!0,container:i,children:o})})})};oS.displayName=ug;var Kt="MenuContent",[LO,dg]=Bo(Kt),iS=x.forwardRef((e,n)=>{const r=rS(Kt,e.__scopeMenu),{forceMount:o=r.forceMount,...i}=e,s=Ho(Kt,e.__scopeMenu),a=Ya(Kt,e.__scopeMenu);return p.jsx(xa.Provider,{scope:e.__scopeMenu,children:p.jsx(_t,{present:o||s.open,children:p.jsx(xa.Slot,{scope:e.__scopeMenu,children:a.modal?p.jsx(zO,{...i,ref:n}):p.jsx(FO,{...i,ref:n})})})})}),zO=x.forwardRef((e,n)=>{const r=Ho(Kt,e.__scopeMenu),o=x.useRef(null),i=xe(n,o);return x.useEffect(()=>{const s=o.current;if(s)return od(s)},[]),p.jsx(fg,{...e,ref:i,trapFocus:r.open,disableOutsidePointerEvents:r.open,disableOutsideScroll:!0,onFocusOutside:re(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>r.onOpenChange(!1)})}),FO=x.forwardRef((e,n)=>{const r=Ho(Kt,e.__scopeMenu);return p.jsx(fg,{...e,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>r.onOpenChange(!1)})}),BO=jo("MenuContent.ScrollLock"),fg=x.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:h,onDismiss:g,disableOutsideScroll:v,...b}=e,_=Ho(Kt,r),m=Ya(Kt,r),w=lg(r),y=nS(r),S=IO(r),[k,C]=x.useState(null),N=x.useRef(null),E=xe(n,N,_.onContentChange),P=x.useRef(0),A=x.useRef(""),T=x.useRef(0),D=x.useRef(null),B=x.useRef("right"),j=x.useRef(0),L=v?Fa:x.Fragment,I=v?{as:BO,allowPinchZoom:!0}:void 0,z=R=>{var W,Y;const $=A.current+R,V=S().filter(q=>!q.disabled),O=document.activeElement,X=(W=V.find(q=>q.ref.current===O))==null?void 0:W.textValue,F=V.map(q=>q.textValue),U=JO(F,$,X),G=(Y=V.find(q=>q.textValue===U))==null?void 0:Y.ref.current;(function q(te){A.current=te,window.clearTimeout(P.current),te!==""&&(P.current=window.setTimeout(()=>q(""),1e3))})($),G&&setTimeout(()=>G.focus())};x.useEffect(()=>()=>window.clearTimeout(P.current),[]),nd();const M=x.useCallback(R=>{var V,O;return B.current===((V=D.current)==null?void 0:V.side)&&t$(R,(O=D.current)==null?void 0:O.area)},[]);return p.jsx(LO,{scope:r,searchRef:A,onItemEnter:x.useCallback(R=>{M(R)&&R.preventDefault()},[M]),onItemLeave:x.useCallback(R=>{var $;M(R)||(($=N.current)==null||$.focus(),C(null))},[M]),onTriggerLeave:x.useCallback(R=>{M(R)&&R.preventDefault()},[M]),pointerGraceTimerRef:T,onPointerGraceIntentChange:x.useCallback(R=>{D.current=R},[]),children:p.jsx(L,{...I,children:p.jsx(za,{asChild:!0,trapped:i,onMountAutoFocus:re(s,R=>{var $;R.preventDefault(),($=N.current)==null||$.focus({preventScroll:!0})}),onUnmountAutoFocus:a,children:p.jsx(os,{asChild:!0,disableOutsidePointerEvents:l,onEscapeKeyDown:u,onPointerDownOutside:f,onFocusOutside:d,onInteractOutside:h,onDismiss:g,children:p.jsx(Z2,{asChild:!0,...y,dir:m.dir,orientation:"vertical",loop:o,currentTabStopId:k,onCurrentTabStopIdChange:C,onEntryFocus:re(c,R=>{m.isUsingKeyboardRef.current||R.preventDefault()}),preventScrollOnEntryFocus:!0,children:p.jsx(hd,{role:"menu","aria-orientation":"vertical","data-state":bS(_.open),"data-radix-menu-content":"",dir:m.dir,...w,...b,ref:E,style:{outline:"none",...b.style},onKeyDown:re(b.onKeyDown,R=>{const V=R.target.closest("[data-radix-menu-content]")===R.currentTarget,O=R.ctrlKey||R.altKey||R.metaKey,X=R.key.length===1;V&&(R.key==="Tab"&&R.preventDefault(),!O&&X&&z(R.key));const F=N.current;if(R.target!==F||!RO.includes(R.key))return;R.preventDefault();const G=S().filter(W=>!W.disabled).map(W=>W.ref.current);eS.includes(R.key)&&G.reverse(),QO(G)}),onBlur:re(e.onBlur,R=>{R.currentTarget.contains(R.target)||(window.clearTimeout(P.current),A.current="")}),onPointerMove:re(e.onPointerMove,wa(R=>{const $=R.target,V=j.current!==R.clientX;if(R.currentTarget.contains($)&&V){const O=R.clientX>j.current?"right":"left";B.current=O,j.current=R.clientX}}))})})})})})})});iS.displayName=Kt;var HO="MenuGroup",hg=x.forwardRef((e,n)=>{const{__scopeMenu:r,...o}=e;return p.jsx(de.div,{role:"group",...o,ref:n})});hg.displayName=HO;var UO="MenuLabel",sS=x.forwardRef((e,n)=>{const{__scopeMenu:r,...o}=e;return p.jsx(de.div,{...o,ref:n})});sS.displayName=UO;var au="MenuItem",_y="menu.itemSelect",vd=x.forwardRef((e,n)=>{const{disabled:r=!1,onSelect:o,...i}=e,s=x.useRef(null),a=Ya(au,e.__scopeMenu),l=dg(au,e.__scopeMenu),c=xe(n,s),u=x.useRef(!1),f=()=>{const d=s.current;if(!r&&d){const h=new CustomEvent(_y,{bubbles:!0,cancelable:!0});d.addEventListener(_y,g=>o==null?void 0:o(g),{once:!0}),O_(d,h),h.defaultPrevented?u.current=!1:a.onClose()}};return p.jsx(aS,{...i,ref:c,disabled:r,onClick:re(e.onClick,f),onPointerDown:d=>{var h;(h=e.onPointerDown)==null||h.call(e,d),u.current=!0},onPointerUp:re(e.onPointerUp,d=>{var h;u.current||(h=d.currentTarget)==null||h.click()}),onKeyDown:re(e.onKeyDown,d=>{const h=l.searchRef.current!=="";r||h&&d.key===" "||np.includes(d.key)&&(d.currentTarget.click(),d.preventDefault())})})});vd.displayName=au;var aS=x.forwardRef((e,n)=>{const{__scopeMenu:r,disabled:o=!1,textValue:i,...s}=e,a=dg(au,r),l=nS(r),c=x.useRef(null),u=xe(n,c),[f,d]=x.useState(!1),[h,g]=x.useState("");return x.useEffect(()=>{const v=c.current;v&&g((v.textContent??"").trim())},[s.children]),p.jsx(xa.ItemSlot,{scope:r,disabled:o,textValue:i??h,children:p.jsx(J2,{asChild:!0,...l,focusable:!o,children:p.jsx(de.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,wa(v=>{o?a.onItemLeave(v):(a.onItemEnter(v),v.defaultPrevented||v.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:re(e.onPointerLeave,wa(v=>a.onItemLeave(v))),onFocus:re(e.onFocus,()=>d(!0)),onBlur:re(e.onBlur,()=>d(!1))})})})}),VO="MenuCheckboxItem",lS=x.forwardRef((e,n)=>{const{checked:r=!1,onCheckedChange:o,...i}=e;return p.jsx(hS,{scope:e.__scopeMenu,checked:r,children:p.jsx(vd,{role:"menuitemcheckbox","aria-checked":lu(r)?"mixed":r,...i,ref:n,"data-state":mg(r),onSelect:re(i.onSelect,()=>o==null?void 0:o(lu(r)?!0:!r),{checkForDefaultPrevented:!1})})})});lS.displayName=VO;var cS="MenuRadioGroup",[WO,GO]=Bo(cS,{value:void 0,onValueChange:()=>{}}),uS=x.forwardRef((e,n)=>{const{value:r,onValueChange:o,...i}=e,s=An(o);return p.jsx(WO,{scope:e.__scopeMenu,value:r,onValueChange:s,children:p.jsx(hg,{...i,ref:n})})});uS.displayName=cS;var dS="MenuRadioItem",fS=x.forwardRef((e,n)=>{const{value:r,...o}=e,i=GO(dS,e.__scopeMenu),s=r===i.value;return p.jsx(hS,{scope:e.__scopeMenu,checked:s,children:p.jsx(vd,{role:"menuitemradio","aria-checked":s,...o,ref:n,"data-state":mg(s),onSelect:re(o.onSelect,()=>{var a;return(a=i.onValueChange)==null?void 0:a.call(i,r)},{checkForDefaultPrevented:!1})})})});fS.displayName=dS;var pg="MenuItemIndicator",[hS,YO]=Bo(pg,{checked:!1}),pS=x.forwardRef((e,n)=>{const{__scopeMenu:r,forceMount:o,...i}=e,s=YO(pg,r);return p.jsx(_t,{present:o||lu(s.checked)||s.checked===!0,children:p.jsx(de.span,{...i,ref:n,"data-state":mg(s.checked)})})});pS.displayName=pg;var XO="MenuSeparator",mS=x.forwardRef((e,n)=>{const{__scopeMenu:r,...o}=e;return p.jsx(de.div,{role:"separator","aria-orientation":"horizontal",...o,ref:n})});mS.displayName=XO;var KO="MenuArrow",gS=x.forwardRef((e,n)=>{const{__scopeMenu:r,...o}=e,i=lg(r);return p.jsx(pd,{...i,...o,ref:n})});gS.displayName=KO;var qO="MenuSub",[ZG,vS]=Bo(qO),As="MenuSubTrigger",yS=x.forwardRef((e,n)=>{const r=Ho(As,e.__scopeMenu),o=Ya(As,e.__scopeMenu),i=vS(As,e.__scopeMenu),s=dg(As,e.__scopeMenu),a=x.useRef(null),{pointerGraceTimerRef:l,onPointerGraceIntentChange:c}=s,u={__scopeMenu:e.__scopeMenu},f=x.useCallback(()=>{a.current&&window.clearTimeout(a.current),a.current=null},[]);return x.useEffect(()=>f,[f]),x.useEffect(()=>{const d=l.current;return()=>{window.clearTimeout(d),c(null)}},[l,c]),p.jsx(cg,{asChild:!0,...u,children:p.jsx(aS,{id:i.triggerId,"aria-haspopup":"menu","aria-expanded":r.open,"aria-controls":i.contentId,"data-state":bS(r.open),...e,ref:Tn(n,i.onTriggerChange),onClick:d=>{var h;(h=e.onClick)==null||h.call(e,d),!(e.disabled||d.defaultPrevented)&&(d.currentTarget.focus(),r.open||r.onOpenChange(!0))},onPointerMove:re(e.onPointerMove,wa(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,wa(d=>{var g,v;f();const h=(g=r.content)==null?void 0:g.getBoundingClientRect();if(h){const b=(v=r.content)==null?void 0:v.dataset.side,_=b==="right",m=_?-5:5,w=h[_?"left":"right"],y=h[_?"right":"left"];s.onPointerGraceIntentChange({area:[{x:d.clientX+m,y:d.clientY},{x:w,y:h.top},{x:y,y:h.top},{x:y,y:h.bottom},{x:w,y:h.bottom}],side:b}),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 h=s.searchRef.current!=="";e.disabled||h&&d.key===" "||AO[o.dir].includes(d.key)&&(r.onOpenChange(!0),(g=r.content)==null||g.focus(),d.preventDefault())})})})});yS.displayName=As;var xS="MenuSubContent",wS=x.forwardRef((e,n)=>{const r=rS(Kt,e.__scopeMenu),{forceMount:o=r.forceMount,...i}=e,s=Ho(Kt,e.__scopeMenu),a=Ya(Kt,e.__scopeMenu),l=vS(xS,e.__scopeMenu),c=x.useRef(null),u=xe(n,c);return p.jsx(xa.Provider,{scope:e.__scopeMenu,children:p.jsx(_t,{present:o||s.open,children:p.jsx(xa.Slot,{scope:e.__scopeMenu,children:p.jsx(fg,{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),h=TO[a.dir].includes(f.key);d&&h&&(s.onOpenChange(!1),(g=l.trigger)==null||g.focus(),f.preventDefault())})})})})})});wS.displayName=xS;function bS(e){return e?"open":"closed"}function lu(e){return e==="indeterminate"}function mg(e){return lu(e)?"indeterminate":e?"checked":"unchecked"}function QO(e){const n=document.activeElement;for(const r of e)if(r===n||(r.focus(),document.activeElement!==n))return}function ZO(e,n){return e.map((r,o)=>e[(n+o)%e.length])}function JO(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=ZO(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 e$(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,h=c.y;f>o!=h>o&&r<(d-u)*(o-f)/(h-f)+u&&(i=!i)}return i}function t$(e,n){if(!n)return!1;const r={x:e.clientX,y:e.clientY};return e$(r,n)}function wa(e){return n=>n.pointerType==="mouse"?e(n):void 0}var n$=cg,r$=oS,o$=iS,i$=hg,s$=sS,a$=vd,l$=lS,c$=uS,u$=fS,d$=pS,f$=mS,h$=gS,p$=yS,m$=wS,_S="DropdownMenu",[g$]=Zt(_S,[tS]),kt=tS(),[JG,SS]=g$(_S),kS="DropdownMenuTrigger",v$=x.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,disabled:o=!1,...i}=e,s=SS(kS,r),a=kt(r);return p.jsx(n$,{asChild:!0,...a,children:p.jsx(de.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:Tn(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())})})})});v$.displayName=kS;var y$="DropdownMenuPortal",CS=e=>{const{__scopeDropdownMenu:n,...r}=e,o=kt(n);return p.jsx(r$,{...o,...r})};CS.displayName=y$;var NS="DropdownMenuContent",ES=x.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...o}=e,i=SS(NS,r),s=kt(r),a=x.useRef(!1);return p.jsx(o$,{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)"}})});ES.displayName=NS;var x$="DropdownMenuGroup",w$=x.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...o}=e,i=kt(r);return p.jsx(i$,{...i,...o,ref:n})});w$.displayName=x$;var b$="DropdownMenuLabel",PS=x.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...o}=e,i=kt(r);return p.jsx(s$,{...i,...o,ref:n})});PS.displayName=b$;var _$="DropdownMenuItem",jS=x.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...o}=e,i=kt(r);return p.jsx(a$,{...i,...o,ref:n})});jS.displayName=_$;var S$="DropdownMenuCheckboxItem",MS=x.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...o}=e,i=kt(r);return p.jsx(l$,{...i,...o,ref:n})});MS.displayName=S$;var k$="DropdownMenuRadioGroup",C$=x.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...o}=e,i=kt(r);return p.jsx(c$,{...i,...o,ref:n})});C$.displayName=k$;var N$="DropdownMenuRadioItem",RS=x.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...o}=e,i=kt(r);return p.jsx(u$,{...i,...o,ref:n})});RS.displayName=N$;var E$="DropdownMenuItemIndicator",AS=x.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...o}=e,i=kt(r);return p.jsx(d$,{...i,...o,ref:n})});AS.displayName=E$;var P$="DropdownMenuSeparator",TS=x.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...o}=e,i=kt(r);return p.jsx(f$,{...i,...o,ref:n})});TS.displayName=P$;var j$="DropdownMenuArrow",M$=x.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...o}=e,i=kt(r);return p.jsx(h$,{...i,...o,ref:n})});M$.displayName=j$;var R$="DropdownMenuSubTrigger",IS=x.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...o}=e,i=kt(r);return p.jsx(p$,{...i,...o,ref:n})});IS.displayName=R$;var A$="DropdownMenuSubContent",OS=x.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...o}=e,i=kt(r);return p.jsx(m$,{...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)"}})});OS.displayName=A$;var T$=CS,$S=ES,DS=PS,LS=jS,zS=MS,FS=RS,BS=AS,HS=TS,US=IS,VS=OS;const I$=x.forwardRef(({className:e,inset:n,children:r,...o},i)=>p.jsxs(US,{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,p.jsx(zi,{className:"ml-auto"})]}));I$.displayName=US.displayName;const O$=x.forwardRef(({className:e,...n},r)=>p.jsx(VS,{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}));O$.displayName=VS.displayName;const $$=x.forwardRef(({className:e,sideOffset:n=4,...r},o)=>p.jsx(T$,{children:p.jsx($S,{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})}));$$.displayName=$S.displayName;const D$=x.forwardRef(({className:e,inset:n,...r},o)=>p.jsx(LS,{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}));D$.displayName=LS.displayName;const L$=x.forwardRef(({className:e,children:n,checked:r,...o},i)=>p.jsxs(zS,{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:[p.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:p.jsx(BS,{children:p.jsx(Bm,{className:"h-4 w-4"})})}),n]}));L$.displayName=zS.displayName;const z$=x.forwardRef(({className:e,children:n,...r},o)=>p.jsxs(FS,{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:[p.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:p.jsx(BS,{children:p.jsx(UR,{className:"h-2 w-2 fill-current"})})}),n]}));z$.displayName=FS.displayName;const F$=x.forwardRef(({className:e,inset:n,...r},o)=>p.jsx(DS,{ref:o,className:ae("px-2 py-1.5 text-sm font-semibold",n&&"pl-8",e),...r}));F$.displayName=DS.displayName;const B$=x.forwardRef(({className:e,...n},r)=>p.jsx(HS,{ref:r,className:ae("-mx-1 my-1 h-px bg-muted",e),...n}));B$.displayName=HS.displayName;const H$=x.forwardRef(({className:e,type:n,...r},o)=>p.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}));H$.displayName="Input";var U$="Label",WS=x.forwardRef((e,n)=>p.jsx(ht.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())}}));WS.displayName=U$;var GS=WS;const V$=zm("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),W$=x.forwardRef(({className:e,...n},r)=>p.jsx(GS,{ref:r,className:ae(V$(),e),...n}));W$.displayName=GS.displayName;var YS="Popover",[XS]=Zt(YS,[Jr]),yd=Jr(),[eY,eo]=XS(YS),KS="PopoverAnchor",G$=x.forwardRef((e,n)=>{const{__scopePopover:r,...o}=e,i=eo(KS,r),s=yd(r),{onCustomAnchorAdd:a,onCustomAnchorRemove:l}=i;return x.useEffect(()=>(a(),()=>l()),[a,l]),p.jsx(Wa,{...s,...o,ref:n})});G$.displayName=KS;var qS="PopoverTrigger",Y$=x.forwardRef((e,n)=>{const{__scopePopover:r,...o}=e,i=eo(qS,r),s=yd(r),a=xe(n,i.triggerRef),l=p.jsx(de.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":tk(i.open),...o,ref:a,onClick:re(e.onClick,i.onOpenToggle)});return i.hasCustomAnchor?l:p.jsx(Wa,{asChild:!0,...s,children:l})});Y$.displayName=qS;var gg="PopoverPortal",[X$,K$]=XS(gg,{forceMount:void 0}),QS=e=>{const{__scopePopover:n,forceMount:r,children:o,container:i}=e,s=eo(gg,n);return p.jsx(X$,{scope:n,forceMount:r,children:p.jsx(_t,{present:r||s.open,children:p.jsx(is,{asChild:!0,container:i,children:o})})})};QS.displayName=gg;var Bi="PopoverContent",ZS=x.forwardRef((e,n)=>{const r=K$(Bi,e.__scopePopover),{forceMount:o=r.forceMount,...i}=e,s=eo(Bi,e.__scopePopover);return p.jsx(_t,{present:o||s.open,children:s.modal?p.jsx(Q$,{...i,ref:n}):p.jsx(Z$,{...i,ref:n})})});ZS.displayName=Bi;var q$=jo("PopoverContent.RemoveScroll"),Q$=x.forwardRef((e,n)=>{const r=eo(Bi,e.__scopePopover),o=x.useRef(null),i=xe(n,o),s=x.useRef(!1);return x.useEffect(()=>{const a=o.current;if(a)return od(a)},[]),p.jsx(Fa,{as:q$,allowPinchZoom:!0,children:p.jsx(JS,{...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})})})}),Z$=x.forwardRef((e,n)=>{const r=eo(Bi,e.__scopePopover),o=x.useRef(!1),i=x.useRef(!1);return p.jsx(JS,{...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()}})}),JS=x.forwardRef((e,n)=>{const{__scopePopover:r,trapFocus:o,onOpenAutoFocus:i,onCloseAutoFocus:s,disableOutsidePointerEvents:a,onEscapeKeyDown:l,onPointerDownOutside:c,onFocusOutside:u,onInteractOutside:f,...d}=e,h=eo(Bi,r),g=yd(r);return nd(),p.jsx(za,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:i,onUnmountAutoFocus:s,children:p.jsx(os,{asChild:!0,disableOutsidePointerEvents:a,onInteractOutside:f,onEscapeKeyDown:l,onPointerDownOutside:c,onFocusOutside:u,onDismiss:()=>h.onOpenChange(!1),children:p.jsx(hd,{"data-state":tk(h.open),role:"dialog",id:h.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)"}})})})}),ek="PopoverClose",J$=x.forwardRef((e,n)=>{const{__scopePopover:r,...o}=e,i=eo(ek,r);return p.jsx(de.button,{type:"button",...o,ref:n,onClick:re(e.onClick,()=>i.onOpenChange(!1))})});J$.displayName=ek;var eD="PopoverArrow",tD=x.forwardRef((e,n)=>{const{__scopePopover:r,...o}=e,i=yd(r);return p.jsx(pd,{...i,...o,ref:n})});tD.displayName=eD;function tk(e){return e?"open":"closed"}var nD=QS,nk=ZS;const rD=x.forwardRef(({className:e,align:n="start",sideOffset:r=4,...o},i)=>p.jsx(nD,{children:p.jsx(nk,{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})}));rD.displayName=nk.displayName;var vg="Progress",yg=100,[oD]=f_(vg),[iD,sD]=oD(vg),rk=x.forwardRef((e,n)=>{const{__scopeProgress:r,value:o=null,max:i,getValueLabel:s=aD,...a}=e;(i||i===0)&&!Sy(i)&&console.error(lD(`${i}`,"Progress"));const l=Sy(i)?i:yg;o!==null&&!ky(o,l)&&console.error(cD(`${o}`,"Progress"));const c=ky(o,l)?o:null,u=cu(c)?s(c,l):void 0;return p.jsx(iD,{scope:r,value:c,max:l,children:p.jsx(ht.div,{"aria-valuemax":l,"aria-valuemin":0,"aria-valuenow":cu(c)?c:void 0,"aria-valuetext":u,role:"progressbar","data-state":sk(c,l),"data-value":c??void 0,"data-max":l,...a,ref:n})})});rk.displayName=vg;var ok="ProgressIndicator",ik=x.forwardRef((e,n)=>{const{__scopeProgress:r,...o}=e,i=sD(ok,r);return p.jsx(ht.div,{"data-state":sk(i.value,i.max),"data-value":i.value??void 0,"data-max":i.max,...o,ref:n})});ik.displayName=ok;function aD(e,n){return`${Math.round(e/n*100)}%`}function sk(e,n){return e==null?"indeterminate":e===n?"complete":"loading"}function cu(e){return typeof e=="number"}function Sy(e){return cu(e)&&!isNaN(e)&&e>0}function ky(e,n){return cu(e)&&!isNaN(e)&&e<=n&&e>=0}function lD(e,n){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${n}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${yg}\`.`}function cD(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 ${yg} if no \`max\` prop is set)
377
- - \`null\` or \`undefined\` if the progress is indeterminate.
378
-
379
- Defaulting to \`null\`.`}var ak=rk,uD=ik;const dD=x.forwardRef(({className:e,value:n,...r},o)=>p.jsx(ak,{ref:o,className:ae("relative h-2 w-full overflow-hidden rounded-full bg-primary/20",e),...r,children:p.jsx(uD,{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(n||0)}%)`}})}));dD.displayName=ak.displayName;function Cy(e,[n,r]){return Math.min(r,Math.max(n,e))}var lk=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"}),fD="VisuallyHidden",ck=x.forwardRef((e,n)=>p.jsx(de.span,{...e,ref:n,style:{...lk,...e.style}}));ck.displayName=fD;var hD=ck,pD=[" ","Enter","ArrowUp","ArrowDown"],mD=[" ","Enter"],xd="Select",[xg,wd,gD]=eg(xd),[ls]=Zt(xd,[gD,Jr]),wg=Jr(),[tY,to]=ls(xd),[nY,vD]=ls(xd),uk="SelectTrigger",dk=x.forwardRef((e,n)=>{const{__scopeSelect:r,disabled:o=!1,...i}=e,s=wg(r),a=to(uk,r),l=a.disabled||o,c=xe(n,a.onTriggerChange),u=wd(r),f=x.useRef("touch"),[d,h,g]=Tk(b=>{const _=u().filter(y=>!y.disabled),m=_.find(y=>y.value===a.value),w=Ik(_,b,m);w!==void 0&&a.onValueChange(w.value)}),v=b=>{l||(a.onOpenChange(!0),g()),b&&(a.triggerPointerDownPosRef.current={x:Math.round(b.pageX),y:Math.round(b.pageY)})};return p.jsx(Wa,{asChild:!0,...s,children:p.jsx(de.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":Ak(a.value)?"":void 0,...i,ref:c,onClick:re(i.onClick,b=>{b.currentTarget.focus(),f.current!=="mouse"&&v(b)}),onPointerDown:re(i.onPointerDown,b=>{f.current=b.pointerType;const _=b.target;_.hasPointerCapture(b.pointerId)&&_.releasePointerCapture(b.pointerId),b.button===0&&b.ctrlKey===!1&&b.pointerType==="mouse"&&(v(b),b.preventDefault())}),onKeyDown:re(i.onKeyDown,b=>{const _=d.current!=="";!(b.ctrlKey||b.altKey||b.metaKey)&&b.key.length===1&&h(b.key),!(_&&b.key===" ")&&pD.includes(b.key)&&(v(),b.preventDefault())})})})});dk.displayName=uk;var fk="SelectValue",yD=x.forwardRef((e,n)=>{const{__scopeSelect:r,className:o,style:i,children:s,placeholder:a="",...l}=e,c=to(fk,r),{onValueNodeHasChildrenChange:u}=c,f=s!==void 0,d=xe(n,c.onValueNodeChange);return Ye(()=>{u(f)},[u,f]),p.jsx(de.span,{...l,ref:d,style:{pointerEvents:"none"},children:Ak(c.value)?p.jsx(p.Fragment,{children:a}):s})});yD.displayName=fk;var xD="SelectIcon",hk=x.forwardRef((e,n)=>{const{__scopeSelect:r,children:o,...i}=e;return p.jsx(de.span,{"aria-hidden":!0,...i,ref:n,children:o||"▼"})});hk.displayName=xD;var wD="SelectPortal",pk=e=>p.jsx(is,{asChild:!0,...e});pk.displayName=wD;var To="SelectContent",mk=x.forwardRef((e,n)=>{const r=to(To,e.__scopeSelect),[o,i]=x.useState();if(Ye(()=>{i(new DocumentFragment)},[]),!r.open){const s=o;return s?es.createPortal(p.jsx(gk,{scope:e.__scopeSelect,children:p.jsx(xg.Slot,{scope:e.__scopeSelect,children:p.jsx("div",{children:e.children})})}),s):null}return p.jsx(vk,{...e,ref:n})});mk.displayName=To;var nn=10,[gk,no]=ls(To),bD="SelectContentImpl",_D=jo("SelectContent.RemoveScroll"),vk=x.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:h,collisionPadding:g,sticky:v,hideWhenDetached:b,avoidCollisions:_,...m}=e,w=to(To,r),[y,S]=x.useState(null),[k,C]=x.useState(null),N=xe(n,W=>S(W)),[E,P]=x.useState(null),[A,T]=x.useState(null),D=wd(r),[B,j]=x.useState(!1),L=x.useRef(!1);x.useEffect(()=>{if(y)return od(y)},[y]),nd();const I=x.useCallback(W=>{const[Y,...q]=D().map(Q=>Q.ref.current),[te]=q.slice(-1),J=document.activeElement;for(const Q of W)if(Q===J||(Q==null||Q.scrollIntoView({block:"nearest"}),Q===Y&&k&&(k.scrollTop=0),Q===te&&k&&(k.scrollTop=k.scrollHeight),Q==null||Q.focus(),document.activeElement!==J))return},[D,k]),z=x.useCallback(()=>I([E,y]),[I,E,y]);x.useEffect(()=>{B&&z()},[B,z]);const{onOpenChange:M,triggerPointerDownPosRef:R}=w;x.useEffect(()=>{if(y){let W={x:0,y:0};const Y=te=>{var J,Q;W={x:Math.abs(Math.round(te.pageX)-(((J=R.current)==null?void 0:J.x)??0)),y:Math.abs(Math.round(te.pageY)-(((Q=R.current)==null?void 0:Q.y)??0))}},q=te=>{W.x<=10&&W.y<=10?te.preventDefault():y.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})}}},[y,M,R]),x.useEffect(()=>{const W=()=>M(!1);return window.addEventListener("blur",W),window.addEventListener("resize",W),()=>{window.removeEventListener("blur",W),window.removeEventListener("resize",W)}},[M]);const[$,V]=Tk(W=>{const Y=D().filter(J=>!J.disabled),q=Y.find(J=>J.ref.current===document.activeElement),te=Ik(Y,W,q);te&&setTimeout(()=>te.ref.current.focus())}),O=x.useCallback((W,Y,q)=>{const te=!L.current&&!q;(w.value!==void 0&&w.value===Y||te)&&(P(W),te&&(L.current=!0))},[w.value]),X=x.useCallback(()=>y==null?void 0:y.focus(),[y]),F=x.useCallback((W,Y,q)=>{const te=!L.current&&!q;(w.value!==void 0&&w.value===Y||te)&&T(W)},[w.value]),U=o==="popper"?rp:yk,G=U===rp?{side:l,sideOffset:c,align:u,alignOffset:f,arrowPadding:d,collisionBoundary:h,collisionPadding:g,sticky:v,hideWhenDetached:b,avoidCollisions:_}:{};return p.jsx(gk,{scope:r,content:y,viewport:k,onViewportChange:C,itemRefCallback:O,selectedItem:E,onItemLeave:X,itemTextRefCallback:F,focusSelectedItem:z,selectedItemText:A,position:o,isPositioned:B,searchRef:$,children:p.jsx(Fa,{as:_D,allowPinchZoom:!0,children:p.jsx(za,{asChild:!0,trapped:w.open,onMountAutoFocus:W=>{W.preventDefault()},onUnmountAutoFocus:re(i,W=>{var Y;(Y=w.trigger)==null||Y.focus({preventScroll:!0}),W.preventDefault()}),children:p.jsx(os,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:a,onFocusOutside:W=>W.preventDefault(),onDismiss:()=>w.onOpenChange(!1),children:p.jsx(U,{role:"listbox",id:w.contentId,"data-state":w.open?"open":"closed",dir:w.dir,onContextMenu:W=>W.preventDefault(),...m,...G,onPlaced:()=>j(!0),ref:N,style:{display:"flex",flexDirection:"column",outline:"none",...m.style},onKeyDown:re(m.onKeyDown,W=>{const Y=W.ctrlKey||W.altKey||W.metaKey;if(W.key==="Tab"&&W.preventDefault(),!Y&&W.key.length===1&&V(W.key),["ArrowUp","ArrowDown","Home","End"].includes(W.key)){let te=D().filter(J=>!J.disabled).map(J=>J.ref.current);if(["ArrowUp","End"].includes(W.key)&&(te=te.slice().reverse()),["ArrowUp","ArrowDown"].includes(W.key)){const J=W.target,Q=te.indexOf(J);te=te.slice(Q+1)}setTimeout(()=>I(te)),W.preventDefault()}})})})})})})});vk.displayName=bD;var SD="SelectItemAlignedPosition",yk=x.forwardRef((e,n)=>{const{__scopeSelect:r,onPlaced:o,...i}=e,s=to(To,r),a=no(To,r),[l,c]=x.useState(null),[u,f]=x.useState(null),d=xe(n,N=>f(N)),h=wd(r),g=x.useRef(!1),v=x.useRef(!0),{viewport:b,selectedItem:_,selectedItemText:m,focusSelectedItem:w}=a,y=x.useCallback(()=>{if(s.trigger&&s.valueNode&&l&&u&&b&&_&&m){const N=s.trigger.getBoundingClientRect(),E=u.getBoundingClientRect(),P=s.valueNode.getBoundingClientRect(),A=m.getBoundingClientRect();if(s.dir!=="rtl"){const J=A.left-E.left,Q=P.left-J,ne=N.left-Q,ue=N.width+ne,ye=Math.max(ue,E.width),pe=window.innerWidth-nn,Ne=Cy(Q,[nn,Math.max(nn,pe-ye)]);l.style.minWidth=ue+"px",l.style.left=Ne+"px"}else{const J=E.right-A.right,Q=window.innerWidth-P.right-J,ne=window.innerWidth-N.right-Q,ue=N.width+ne,ye=Math.max(ue,E.width),pe=window.innerWidth-nn,Ne=Cy(Q,[nn,Math.max(nn,pe-ye)]);l.style.minWidth=ue+"px",l.style.right=Ne+"px"}const T=h(),D=window.innerHeight-nn*2,B=b.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+B+M+z,$=Math.min(_.offsetHeight*5,R),V=window.getComputedStyle(b),O=parseInt(V.paddingTop,10),X=parseInt(V.paddingBottom,10),F=N.top+N.height/2-nn,U=D-F,G=_.offsetHeight/2,W=_.offsetTop+G,Y=L+I+W,q=R-Y;if(Y<=F){const J=T.length>0&&_===T[T.length-1].ref.current;l.style.bottom="0px";const Q=u.clientHeight-b.offsetTop-b.offsetHeight,ne=Math.max(U,G+(J?X:0)+Q+z),ue=Y+ne;l.style.height=ue+"px"}else{const J=T.length>0&&_===T[0].ref.current;l.style.top="0px";const ne=Math.max(F,L+b.offsetTop+(J?O:0)+G)+q;l.style.height=ne+"px",b.scrollTop=Y-F+b.offsetTop}l.style.margin=`${nn}px 0`,l.style.minHeight=$+"px",l.style.maxHeight=D+"px",o==null||o(),requestAnimationFrame(()=>g.current=!0)}},[h,s.trigger,s.valueNode,l,u,b,_,m,s.dir,o]);Ye(()=>y(),[y]);const[S,k]=x.useState();Ye(()=>{u&&k(window.getComputedStyle(u).zIndex)},[u]);const C=x.useCallback(N=>{N&&v.current===!0&&(y(),w==null||w(),v.current=!1)},[y,w]);return p.jsx(CD,{scope:r,contentWrapper:l,shouldExpandOnScrollRef:g,onScrollButtonChange:C,children:p.jsx("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:S},children:p.jsx(de.div,{...i,ref:d,style:{boxSizing:"border-box",maxHeight:"100%",...i.style}})})})});yk.displayName=SD;var kD="SelectPopperPosition",rp=x.forwardRef((e,n)=>{const{__scopeSelect:r,align:o="start",collisionPadding:i=nn,...s}=e,a=wg(r);return p.jsx(hd,{...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)"}})});rp.displayName=kD;var[CD,bg]=ls(To,{}),op="SelectViewport",xk=x.forwardRef((e,n)=>{const{__scopeSelect:r,nonce:o,...i}=e,s=no(op,r),a=bg(op,r),l=xe(n,s.onViewportChange),c=x.useRef(0);return p.jsxs(p.Fragment,{children:[p.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}),p.jsx(xg.Slot,{scope:r,children:p.jsx(de.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:h}=a;if(h!=null&&h.current&&d){const g=Math.abs(c.current-f.scrollTop);if(g>0){const v=window.innerHeight-nn*2,b=parseFloat(d.style.minHeight),_=parseFloat(d.style.height),m=Math.max(b,_);if(m<v){const w=m+g,y=Math.min(v,w),S=w-y;d.style.height=y+"px",d.style.bottom==="0px"&&(f.scrollTop=S>0?S:0,d.style.justifyContent="flex-end")}}}c.current=f.scrollTop})})})]})});xk.displayName=op;var wk="SelectGroup",[ND,ED]=ls(wk),PD=x.forwardRef((e,n)=>{const{__scopeSelect:r,...o}=e,i=Tt();return p.jsx(ND,{scope:r,id:i,children:p.jsx(de.div,{role:"group","aria-labelledby":i,...o,ref:n})})});PD.displayName=wk;var bk="SelectLabel",_k=x.forwardRef((e,n)=>{const{__scopeSelect:r,...o}=e,i=ED(bk,r);return p.jsx(de.div,{id:i.id,...o,ref:n})});_k.displayName=bk;var uu="SelectItem",[jD,Sk]=ls(uu),kk=x.forwardRef((e,n)=>{const{__scopeSelect:r,value:o,disabled:i=!1,textValue:s,...a}=e,l=to(uu,r),c=no(uu,r),u=l.value===o,[f,d]=x.useState(s??""),[h,g]=x.useState(!1),v=xe(n,w=>{var y;return(y=c.itemRefCallback)==null?void 0:y.call(c,w,o,i)}),b=Tt(),_=x.useRef("touch"),m=()=>{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 p.jsx(jD,{scope:r,value:o,disabled:i,textId:b,isSelected:u,onItemTextChange:x.useCallback(w=>{d(y=>y||((w==null?void 0:w.textContent)??"").trim())},[]),children:p.jsx(xg.ItemSlot,{scope:r,value:o,disabled:i,textValue:f,children:p.jsx(de.div,{role:"option","aria-labelledby":b,"data-highlighted":h?"":void 0,"aria-selected":u&&h,"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"&&m()}),onPointerUp:re(a.onPointerUp,()=>{_.current==="mouse"&&m()}),onPointerDown:re(a.onPointerDown,w=>{_.current=w.pointerType}),onPointerMove:re(a.onPointerMove,w=>{var y;_.current=w.pointerType,i?(y=c.onItemLeave)==null||y.call(c):_.current==="mouse"&&w.currentTarget.focus({preventScroll:!0})}),onPointerLeave:re(a.onPointerLeave,w=>{var y;w.currentTarget===document.activeElement&&((y=c.onItemLeave)==null||y.call(c))}),onKeyDown:re(a.onKeyDown,w=>{var S;((S=c.searchRef)==null?void 0:S.current)!==""&&w.key===" "||(mD.includes(w.key)&&m(),w.key===" "&&w.preventDefault())})})})})});kk.displayName=uu;var Ts="SelectItemText",Ck=x.forwardRef((e,n)=>{const{__scopeSelect:r,className:o,style:i,...s}=e,a=to(Ts,r),l=no(Ts,r),c=Sk(Ts,r),u=vD(Ts,r),[f,d]=x.useState(null),h=xe(n,m=>d(m),c.onItemTextChange,m=>{var w;return(w=l.itemTextRefCallback)==null?void 0:w.call(l,m,c.value,c.disabled)}),g=f==null?void 0:f.textContent,v=x.useMemo(()=>p.jsx("option",{value:c.value,disabled:c.disabled,children:g},c.value),[c.disabled,c.value,g]),{onNativeOptionAdd:b,onNativeOptionRemove:_}=u;return Ye(()=>(b(v),()=>_(v)),[b,_,v]),p.jsxs(p.Fragment,{children:[p.jsx(de.span,{id:c.textId,...s,ref:h}),c.isSelected&&a.valueNode&&!a.valueNodeHasChildren?es.createPortal(s.children,a.valueNode):null]})});Ck.displayName=Ts;var Nk="SelectItemIndicator",Ek=x.forwardRef((e,n)=>{const{__scopeSelect:r,...o}=e;return Sk(Nk,r).isSelected?p.jsx(de.span,{"aria-hidden":!0,...o,ref:n}):null});Ek.displayName=Nk;var ip="SelectScrollUpButton",Pk=x.forwardRef((e,n)=>{const r=no(ip,e.__scopeSelect),o=bg(ip,e.__scopeSelect),[i,s]=x.useState(!1),a=xe(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?p.jsx(Mk,{...e,ref:a,onAutoScroll:()=>{const{viewport:l,selectedItem:c}=r;l&&c&&(l.scrollTop=l.scrollTop-c.offsetHeight)}}):null});Pk.displayName=ip;var sp="SelectScrollDownButton",jk=x.forwardRef((e,n)=>{const r=no(sp,e.__scopeSelect),o=bg(sp,e.__scopeSelect),[i,s]=x.useState(!1),a=xe(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?p.jsx(Mk,{...e,ref:a,onAutoScroll:()=>{const{viewport:l,selectedItem:c}=r;l&&c&&(l.scrollTop=l.scrollTop+c.offsetHeight)}}):null});jk.displayName=sp;var Mk=x.forwardRef((e,n)=>{const{__scopeSelect:r,onAutoScroll:o,...i}=e,s=no("SelectScrollButton",r),a=x.useRef(null),l=wd(r),c=x.useCallback(()=>{a.current!==null&&(window.clearInterval(a.current),a.current=null)},[]);return x.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]),p.jsx(de.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()})})}),MD="SelectSeparator",Rk=x.forwardRef((e,n)=>{const{__scopeSelect:r,...o}=e;return p.jsx(de.div,{"aria-hidden":!0,...o,ref:n})});Rk.displayName=MD;var ap="SelectArrow",RD=x.forwardRef((e,n)=>{const{__scopeSelect:r,...o}=e,i=wg(r),s=to(ap,r),a=no(ap,r);return s.open&&a.position==="popper"?p.jsx(pd,{...i,...o,ref:n}):null});RD.displayName=ap;var AD="SelectBubbleInput",TD=x.forwardRef(({__scopeSelect:e,value:n,...r},o)=>{const i=x.useRef(null),s=xe(o,i),a=Wm(n);return x.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]),p.jsx(de.select,{...r,style:{...lk,...r.style},ref:s,defaultValue:n})});TD.displayName=AD;function Ak(e){return e===""||e===void 0}function Tk(e){const n=An(e),r=x.useRef(""),o=x.useRef(0),i=x.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=x.useCallback(()=>{r.current="",window.clearTimeout(o.current)},[]);return x.useEffect(()=>()=>window.clearTimeout(o.current),[]),[r,i,s]}function Ik(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=ID(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 ID(e,n){return e.map((r,o)=>e[(n+o)%e.length])}var Ok=dk,OD=hk,$D=pk,$k=mk,DD=xk,Dk=_k,Lk=kk,LD=Ck,zD=Ek,zk=Pk,Fk=jk,Bk=Rk;const FD=x.forwardRef(({className:e,children:n,...r},o)=>p.jsxs(Ok,{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,p.jsx(OD,{asChild:!0,children:p.jsx(ed,{className:"h-4 w-4 opacity-50"})})]}));FD.displayName=Ok.displayName;const Hk=x.forwardRef(({className:e,...n},r)=>p.jsx(zk,{ref:r,className:ae("flex cursor-default items-center justify-center py-1",e),...n,children:p.jsx(DR,{className:"h-4 w-4"})}));Hk.displayName=zk.displayName;const Uk=x.forwardRef(({className:e,...n},r)=>p.jsx(Fk,{ref:r,className:ae("flex cursor-default items-center justify-center py-1",e),...n,children:p.jsx(ed,{className:"h-4 w-4"})}));Uk.displayName=Fk.displayName;const BD=x.forwardRef(({className:e,children:n,position:r="popper",...o},i)=>p.jsx($D,{children:p.jsxs($k,{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:[p.jsx(Hk,{}),p.jsx(DD,{className:ae("p-1",r==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:n}),p.jsx(Uk,{})]})}));BD.displayName=$k.displayName;const HD=x.forwardRef(({className:e,...n},r)=>p.jsx(Dk,{ref:r,className:ae("px-2 py-1.5 text-sm font-semibold",e),...n}));HD.displayName=Dk.displayName;const UD=x.forwardRef(({className:e,children:n,...r},o)=>p.jsxs(Lk,{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:[p.jsx("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:p.jsx(zD,{children:p.jsx(Bm,{className:"h-4 w-4"})})}),p.jsx(LD,{children:n})]}));UD.displayName=Lk.displayName;const VD=x.forwardRef(({className:e,...n},r)=>p.jsx(Bk,{ref:r,className:ae("-mx-1 my-1 h-px bg-muted",e),...n}));VD.displayName=Bk.displayName;var WD="Separator",Ny="horizontal",GD=["horizontal","vertical"],Vk=x.forwardRef((e,n)=>{const{decorative:r,orientation:o=Ny,...i}=e,s=YD(o)?o:Ny,l=r?{role:"none"}:{"aria-orientation":s==="vertical"?s:void 0,role:"separator"};return p.jsx(ht.div,{"data-orientation":s,...l,...i,ref:n})});Vk.displayName=WD;function YD(e){return GD.includes(e)}var Wk=Vk;const XD=x.forwardRef(({className:e,orientation:n="horizontal",decorative:r=!0,...o},i)=>p.jsx(Wk,{ref:i,decorative:r,orientation:n,className:ae("shrink-0 bg-border",n==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...o}));XD.displayName=Wk.displayName;const KD=Zm,Gk=x.forwardRef(({className:e,...n},r)=>p.jsx(Ba,{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}));Gk.displayName=Ba.displayName;const qD=zm("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"}}),QD=x.forwardRef(({side:e="right",className:n,children:r,...o},i)=>p.jsxs(KD,{children:[p.jsx(Gk,{}),p.jsxs(Ha,{ref:i,className:ae(qD({side:e}),n),...o,children:[p.jsxs(g2,{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:[p.jsx(tu,{className:"h-4 w-4"}),p.jsx("span",{className:"sr-only",children:"Close"})]}),r]})]}));QD.displayName=Ha.displayName;const ZD=x.forwardRef(({className:e,...n},r)=>p.jsx(sd,{ref:r,className:ae("text-lg font-semibold text-foreground",e),...n}));ZD.displayName=sd.displayName;const JD=x.forwardRef(({className:e,...n},r)=>p.jsx(ad,{ref:r,className:ae("text-sm text-muted-foreground",e),...n}));JD.displayName=ad.displayName;var bd="Switch",[eL]=Zt(bd),[tL,nL]=eL(bd),Yk=x.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,[h,g]=x.useState(null),v=xe(n,y=>g(y)),b=x.useRef(!1),_=h?f||!!h.closest("form"):!0,[m,w]=La({prop:i,defaultProp:s??!1,onChange:u,caller:bd});return p.jsxs(tL,{scope:r,checked:m,disabled:l,children:[p.jsx(de.button,{type:"button",role:"switch","aria-checked":m,"aria-required":a,"data-state":Qk(m),"data-disabled":l?"":void 0,disabled:l,value:c,...d,ref:v,onClick:re(e.onClick,y=>{w(S=>!S),_&&(b.current=y.isPropagationStopped(),b.current||y.stopPropagation())})}),_&&p.jsx(qk,{control:h,bubbles:!b.current,name:o,value:c,checked:m,required:a,disabled:l,form:f,style:{transform:"translateX(-100%)"}})]})});Yk.displayName=bd;var Xk="SwitchThumb",Kk=x.forwardRef((e,n)=>{const{__scopeSwitch:r,...o}=e,i=nL(Xk,r);return p.jsx(de.span,{"data-state":Qk(i.checked),"data-disabled":i.disabled?"":void 0,...o,ref:n})});Kk.displayName=Xk;var rL="SwitchBubbleInput",qk=x.forwardRef(({__scopeSwitch:e,control:n,checked:r,bubbles:o=!0,...i},s)=>{const a=x.useRef(null),l=xe(a,s),c=Wm(r),u=Gm(n);return x.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]),p.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}})});qk.displayName=rL;function Qk(e){return e?"checked":"unchecked"}var Zk=Yk,oL=Kk;const iL=x.forwardRef(({className:e,...n},r)=>p.jsx(Zk,{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:p.jsx(oL,{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")})}));iL.displayName=Zk.displayName;function sL(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 lp=1;class aL{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:lp++,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(cL(u)&&!u.ok){s=!1;const d=typeof r.error=="function"?await r.error(`HTTP error! status: ${u.status}`):r.error,h=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:h,...v})}else if(u instanceof Error){s=!1;const d=typeof r.error=="function"?await r.error(u):r.error,h=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:h,...v})}else if(r.success!==void 0){s=!1;const d=typeof r.success=="function"?await r.success(u):r.success,h=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:h,...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)||lp++;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 aL,lL=(e,n)=>{const r=(n==null?void 0:n.id)||lp++;return Ht.addToast({title:e,...n,id:r}),r},cL=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",uL=lL,dL=()=>Ht.toasts,fL=()=>Ht.getActiveToasts();Object.assign(uL,{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:dL,getToasts:fL});sL("[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%)}");var _d="Tabs",[hL]=Zt(_d,[md]),Jk=md(),[pL,_g]=hL(_d),mL=x.forwardRef((e,n)=>{const{__scopeTabs:r,value:o,onValueChange:i,defaultValue:s,orientation:a="horizontal",dir:l,activationMode:c="automatic",...u}=e,f=C2(l),[d,h]=La({prop:o,onChange:i,defaultProp:s??"",caller:_d});return p.jsx(pL,{scope:r,baseId:Tt(),value:d,onValueChange:h,orientation:a,dir:f,activationMode:c,children:p.jsx(de.div,{dir:f,"data-orientation":a,...u,ref:n})})});mL.displayName=_d;var eC="TabsList",tC=x.forwardRef((e,n)=>{const{__scopeTabs:r,loop:o=!0,...i}=e,s=_g(eC,r),a=Jk(r);return p.jsx(Z2,{asChild:!0,...a,orientation:s.orientation,dir:s.dir,loop:o,children:p.jsx(de.div,{role:"tablist","aria-orientation":s.orientation,...i,ref:n})})});tC.displayName=eC;var nC="TabsTrigger",rC=x.forwardRef((e,n)=>{const{__scopeTabs:r,value:o,disabled:i=!1,...s}=e,a=_g(nC,r),l=Jk(r),c=sC(a.baseId,o),u=aC(a.baseId,o),f=o===a.value;return p.jsx(J2,{asChild:!0,...l,focusable:!i,active:f,children:p.jsx(de.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)})})})});rC.displayName=nC;var oC="TabsContent",iC=x.forwardRef((e,n)=>{const{__scopeTabs:r,value:o,forceMount:i,children:s,...a}=e,l=_g(oC,r),c=sC(l.baseId,o),u=aC(l.baseId,o),f=o===l.value,d=x.useRef(f);return x.useEffect(()=>{const h=requestAnimationFrame(()=>d.current=!1);return()=>cancelAnimationFrame(h)},[]),p.jsx(_t,{present:i||f,children:({present:h})=>p.jsx(de.div,{"data-state":f?"active":"inactive","data-orientation":l.orientation,role:"tabpanel","aria-labelledby":c,hidden:!h,id:u,tabIndex:0,...a,ref:n,style:{...e.style,animationDuration:d.current?"0s":void 0},children:h&&s})})});iC.displayName=oC;function sC(e,n){return`${e}-trigger-${n}`}function aC(e,n){return`${e}-content-${n}`}var lC=tC,cC=rC,uC=iC;const gL=x.forwardRef(({className:e,...n},r)=>p.jsx(lC,{ref:r,className:ae("inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",e),...n}));gL.displayName=lC.displayName;const vL=x.forwardRef(({className:e,...n},r)=>p.jsx(cC,{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}));vL.displayName=cC.displayName;const yL=x.forwardRef(({className:e,...n},r)=>p.jsx(uC,{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}));yL.displayName=uC.displayName;const xL=x.forwardRef(({className:e,...n},r)=>p.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}));xL.displayName="Textarea";var[Sd]=Zt("Tooltip",[Jr]),Sg=Jr(),wL="TooltipProvider",Ey="tooltip.open",[rY,dC]=Sd(wL),fC="Tooltip",[oY,Xa]=Sd(fC),cp="TooltipTrigger",bL=x.forwardRef((e,n)=>{const{__scopeTooltip:r,...o}=e,i=Xa(cp,r),s=dC(cp,r),a=Sg(r),l=x.useRef(null),c=xe(n,l,i.onTriggerChange),u=x.useRef(!1),f=x.useRef(!1),d=x.useCallback(()=>u.current=!1,[]);return x.useEffect(()=>()=>document.removeEventListener("pointerup",d),[d]),p.jsx(Wa,{asChild:!0,...a,children:p.jsx(de.button,{"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute,...o,ref:c,onPointerMove:re(e.onPointerMove,h=>{h.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)})})});bL.displayName=cp;var kg="TooltipPortal",[_L,SL]=Sd(kg,{forceMount:void 0}),hC=e=>{const{__scopeTooltip:n,forceMount:r,children:o,container:i}=e,s=Xa(kg,n);return p.jsx(_L,{scope:n,forceMount:r,children:p.jsx(_t,{present:r||s.open,children:p.jsx(is,{asChild:!0,container:i,children:o})})})};hC.displayName=kg;var Hi="TooltipContent",pC=x.forwardRef((e,n)=>{const r=SL(Hi,e.__scopeTooltip),{forceMount:o=r.forceMount,side:i="top",...s}=e,a=Xa(Hi,e.__scopeTooltip);return p.jsx(_t,{present:o||a.open,children:a.disableHoverableContent?p.jsx(mC,{side:i,...s,ref:n}):p.jsx(kL,{side:i,...s,ref:n})})}),kL=x.forwardRef((e,n)=>{const r=Xa(Hi,e.__scopeTooltip),o=dC(Hi,e.__scopeTooltip),i=x.useRef(null),s=xe(n,i),[a,l]=x.useState(null),{trigger:c,onClose:u}=r,f=i.current,{onPointerInTransitChange:d}=o,h=x.useCallback(()=>{l(null),d(!1)},[d]),g=x.useCallback((v,b)=>{const _=v.currentTarget,m={x:v.clientX,y:v.clientY},w=jL(m,_.getBoundingClientRect()),y=ML(m,w),S=RL(b.getBoundingClientRect()),k=TL([...y,...S]);l(k),d(!0)},[d]);return x.useEffect(()=>()=>h(),[h]),x.useEffect(()=>{if(c&&f){const v=_=>g(_,f),b=_=>g(_,c);return c.addEventListener("pointerleave",v),f.addEventListener("pointerleave",b),()=>{c.removeEventListener("pointerleave",v),f.removeEventListener("pointerleave",b)}}},[c,f,g,h]),x.useEffect(()=>{if(a){const v=b=>{const _=b.target,m={x:b.clientX,y:b.clientY},w=(c==null?void 0:c.contains(_))||(f==null?void 0:f.contains(_)),y=!AL(m,a);w?h():y&&(h(),u())};return document.addEventListener("pointermove",v),()=>document.removeEventListener("pointermove",v)}},[c,f,a,u,h]),p.jsx(mC,{...e,ref:s})}),[CL,NL]=Sd(fC,{isInside:!1}),EL=rT("TooltipContent"),mC=x.forwardRef((e,n)=>{const{__scopeTooltip:r,children:o,"aria-label":i,onEscapeKeyDown:s,onPointerDownOutside:a,...l}=e,c=Xa(Hi,r),u=Sg(r),{onClose:f}=c;return x.useEffect(()=>(document.addEventListener(Ey,f),()=>document.removeEventListener(Ey,f)),[f]),x.useEffect(()=>{if(c.trigger){const d=h=>{const g=h.target;g!=null&&g.contains(c.trigger)&&f()};return window.addEventListener("scroll",d,{capture:!0}),()=>window.removeEventListener("scroll",d,{capture:!0})}},[c.trigger,f]),p.jsx(os,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:a,onFocusOutside:d=>d.preventDefault(),onDismiss:f,children:p.jsxs(hd,{"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:[p.jsx(EL,{children:o}),p.jsx(CL,{scope:r,isInside:!0,children:p.jsx(hD,{id:c.contentId,role:"tooltip",children:i||o})})]})})});pC.displayName=Hi;var gC="TooltipArrow",PL=x.forwardRef((e,n)=>{const{__scopeTooltip:r,...o}=e,i=Sg(r);return NL(gC,r).isInside?null:p.jsx(pd,{...i,...o,ref:n})});PL.displayName=gC;function jL(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 ML(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 RL(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 AL(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,h=c.y;f>o!=h>o&&r<(d-u)*(o-f)/(h-f)+u&&(i=!i)}return i}function TL(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),IL(n)}function IL(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 OL=hC,vC=pC;const $L=x.forwardRef(({className:e,sideOffset:n=4,...r},o)=>p.jsx(OL,{children:p.jsx(vC,{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})}));$L.displayName=vC.displayName;function DL(){const{setTheme:e,resolvedTheme:n}=s3();return p.jsxs(T_,{variant:"ghost",size:"icon",className:"relative h-8 w-8",onClick:()=>e(n==="dark"?"light":"dark"),children:[p.jsx(PA,{className:"h-4 w-4 rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0"}),p.jsx(dA,{className:"absolute h-4 w-4 rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100"}),p.jsx("span",{className:"sr-only",children:"Toggle theme"})]})}const yC=x.createContext({activeProject:".",setActiveProject:()=>{},projects:[],isMultiProject:!1,monorepoRoot:"",reloadProjects:async()=>{}});function Cg(){return x.useContext(yC)}function Uo(){const{activeProject:e,isMultiProject:n}=Cg();return x.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 LL({children:e}){const[n,r]=x.useState([]),[o,i]=x.useState("."),[s,a]=x.useState(""),l=x.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]);x.useEffect(()=>{l()},[l]);const c=n.length>1;return p.jsx(yC.Provider,{value:{activeProject:o,setActiveProject:i,projects:n,isMultiProject:c,monorepoRoot:s,reloadProjects:l},children:e})}function zL(){return p.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[p.jsx("circle",{cx:"6",cy:"6",r:"2.5"}),p.jsx("circle",{cx:"18",cy:"6",r:"2.5"}),p.jsx("circle",{cx:"12",cy:"14",r:"2.5"}),p.jsx("circle",{cx:"6",cy:"20",r:"1.8"}),p.jsx("circle",{cx:"18",cy:"20",r:"1.8"}),p.jsx("path",{d:"M7.6 7.6 10.7 12.5"}),p.jsx("path",{d:"M16.4 7.6 13.3 12.5"}),p.jsx("path",{d:"M10.5 15.5 7.2 19"}),p.jsx("path",{d:"M13.5 15.5 16.8 19"})]})}function FL(){var c;const{projects:e,activeProject:n,setActiveProject:r,isMultiProject:o}=Cg(),[i,s]=x.useState(!1),a=x.useRef(null);x.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?p.jsxs("div",{className:"relative",ref:a,children:[p.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,p.jsx(ed,{className:`h-3.5 w-3.5 text-muted-foreground transition-transform ${i?"rotate-180":""}`})]}),i&&p.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=>p.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:[p.jsx("span",{className:"flex-1 truncate",children:u.name}),u.hasGraphs&&p.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-green-500 shrink-0",title:"Graphs generated"})]},u.root))})]}):p.jsx("span",{className:"text-sm font-medium text-muted-foreground px-2",children:l})}function BL(){return p.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:[p.jsxs("span",{className:"logo",children:[p.jsx("span",{className:"logo-icon",children:p.jsx(zL,{})}),p.jsx("span",{className:"logo-text",children:"LaunchChart"})]}),p.jsx("div",{className:"mx-4",children:p.jsx(FL,{})}),p.jsx("div",{className:"ml-auto flex items-center gap-2",children:p.jsx(DL,{})})]})}const HL=[{to:"/overview",label:"Overview",icon:nA},{to:"/modules",label:"Modules",icon:Ju},{to:"/sitemap",label:"Sitemap",icon:cA},{to:"/journeys",label:"User Journeys",icon:bA},{to:"/project-graph",label:"Project Graph",icon:hA},{to:"/audit",label:"Audit",icon:A_},{to:"/settings",label:"Settings",icon:R_}],UL="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",VL="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 WL(){return p.jsx("aside",{className:"hidden lg:flex lg:flex-col w-[var(--sidebar-width)] sidebar-gradient",children:p.jsx("nav",{className:"flex-1 overflow-y-auto px-3 py-4",children:p.jsx("ul",{className:"space-y-1",children:HL.map(e=>{const n=e.icon;return p.jsx("li",{children:p.jsxs(n3,{to:e.to,className:({isActive:r})=>r?UL:VL,children:[p.jsx(n,{className:"h-4 w-4 shrink-0"}),e.label]})},e.to)})})})})}function GL(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 YL(e,n,r){return n=t6(n),n in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}function Py(e,n){return qL(e)||GL(e,n)||xC(e,n)||JL()}function XL(e){return KL(e)||QL(e)||xC(e)||ZL()}function KL(e){if(Array.isArray(e))return up(e)}function qL(e){if(Array.isArray(e))return e}function QL(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function xC(e,n){if(e){if(typeof e=="string")return up(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 up(e,n)}}function up(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 ZL(){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 JL(){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 e6(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 t6(e){var n=e6(e,"string");return typeof n=="symbol"?n:String(n)}var n6=function(n,r){var o=new Set(r);return Object.assign.apply(Object,[{}].concat(XL(Object.entries(n).filter(function(i){var s=Py(i,1),a=s[0];return!o.has(a)}).map(function(i){var s=Py(i,2),a=s[0],l=s[1];return YL({},a,l)}))))};function dp(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 r6(e){if(Array.isArray(e))return e}function o6(e){if(Array.isArray(e))return dp(e)}function i6(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function s6(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 a6(){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 l6(){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 c6(e,n){return r6(e)||s6(e,n)||wC(e,n)||a6()}function jy(e){return o6(e)||i6(e)||wC(e)||l6()}function wC(e,n){if(e){if(typeof e=="string")return dp(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)?dp(e,n):void 0}}function u6(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 x.forwardRef(function(f,d){var h=x.useRef(),g=x.useMemo(function(){var _=Object.fromEntries(u.filter(function(m){return f.hasOwnProperty(m)}).map(function(m){return[m,f[m]]}));return e(_)},[]);My(function(){g(s(h.current))},x.useLayoutEffect),My(function(){return g._destructor instanceof Function?g._destructor:void 0});var v=x.useCallback(function(_){for(var m=arguments.length,w=new Array(m>1?m-1:0),y=1;y<m;y++)w[y-1]=arguments[y];return g[_]instanceof Function?g[_].apply(g,w):void 0},[g]),b=x.useRef({});return Object.keys(n6(f,[].concat(jy(l),jy(u)))).filter(function(_){return b.current[_]!==f[_]}).forEach(function(_){return v(_,f[_])}),b.current=f,x.useImperativeHandle(d,function(){return Object.fromEntries(l.map(function(_){return[_,function(){for(var m=arguments.length,w=new Array(m),y=0;y<m;y++)w[y]=arguments[y];return v.apply(void 0,[_].concat(w))}]}))},[v]),ot.createElement(o,{ref:h})})}function My(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:x.useEffect,r=x.useRef(),o=x.useRef(!1),i=x.useRef(!1),s=x.useState(0),a=c6(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 fp="http://www.w3.org/1999/xhtml";const Ry={svg:"http://www.w3.org/2000/svg",xhtml:fp,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)),Ry.hasOwnProperty(n)?{space:Ry[n],local:e}:e}function d6(e){return function(){var n=this.ownerDocument,r=this.namespaceURI;return r===fp&&n.documentElement.namespaceURI===fp?n.createElement(e):n.createElementNS(r,e)}}function f6(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function bC(e){var n=kd(e);return(n.local?f6:d6)(n)}function h6(){}function Ng(e){return e==null?h6:function(){return this.querySelector(e)}}function p6(e){typeof e!="function"&&(e=Ng(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 $t(o,this._parents)}function m6(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function g6(){return[]}function _C(e){return e==null?g6:function(){return this.querySelectorAll(e)}}function v6(e){return function(){return m6(e.apply(this,arguments))}}function y6(e){typeof e=="function"?e=v6(e):e=_C(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 $t(o,i)}function SC(e){return function(){return this.matches(e)}}function kC(e){return function(n){return n.matches(e)}}var x6=Array.prototype.find;function w6(e){return function(){return x6.call(this.children,e)}}function b6(){return this.firstElementChild}function _6(e){return this.select(e==null?b6:w6(typeof e=="function"?e:kC(e)))}var S6=Array.prototype.filter;function k6(){return Array.from(this.children)}function C6(e){return function(){return S6.call(this.children,e)}}function N6(e){return this.selectAll(e==null?k6:C6(typeof e=="function"?e:kC(e)))}function E6(e){typeof e!="function"&&(e=SC(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 $t(o,this._parents)}function CC(e){return new Array(e.length)}function P6(){return new $t(this._enter||this._groups.map(CC),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 j6(e){return function(){return e}}function M6(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 R6(e,n,r,o,i,s,a){var l,c,u=new Map,f=n.length,d=s.length,h=new Array(f),g;for(l=0;l<f;++l)(c=n[l])&&(h[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(h[l])===c&&(i[l]=c)}function A6(e){return e.__data__}function T6(e,n){if(!arguments.length)return Array.from(this,A6);var r=n?R6:M6,o=this._parents,i=this._groups;typeof e!="function"&&(e=j6(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],h=d.length,g=I6(e.call(f,f&&f.__data__,u,o)),v=g.length,b=l[u]=new Array(v),_=a[u]=new Array(v),m=c[u]=new Array(h);r(f,d,b,_,m,g,n);for(var w=0,y=0,S,k;w<v;++w)if(S=b[w]){for(w>=y&&(y=w+1);!(k=_[y])&&++y<v;);S._next=k||null}}return a=new $t(a,o),a._enter=l,a._exit=c,a}function I6(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function O6(){return new $t(this._exit||this._groups.map(CC),this._parents)}function $6(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 D6(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,h=l[c]=new Array(d),g,v=0;v<d;++v)(g=u[v]||f[v])&&(h[v]=g);for(;c<i;++c)l[c]=r[c];return new $t(l,this._parents)}function L6(){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 z6(e){e||(e=F6);function n(d,h){return d&&h?e(d.__data__,h.__data__):!d-!h}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 $t(i,this._parents).order()}function F6(e,n){return e<n?-1:e>n?1:e>=n?0:NaN}function B6(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function H6(){return Array.from(this)}function U6(){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 V6(){let e=0;for(const n of this)++e;return e}function W6(){return!this.node()}function G6(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 Y6(e){return function(){this.removeAttribute(e)}}function X6(e){return function(){this.removeAttributeNS(e.space,e.local)}}function K6(e,n){return function(){this.setAttribute(e,n)}}function q6(e,n){return function(){this.setAttributeNS(e.space,e.local,n)}}function Q6(e,n){return function(){var r=n.apply(this,arguments);r==null?this.removeAttribute(e):this.setAttribute(e,r)}}function Z6(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 J6(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?X6:Y6:typeof n=="function"?r.local?Z6:Q6:r.local?q6:K6)(r,n))}function NC(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function e8(e){return function(){this.style.removeProperty(e)}}function t8(e,n,r){return function(){this.style.setProperty(e,n,r)}}function n8(e,n,r){return function(){var o=n.apply(this,arguments);o==null?this.style.removeProperty(e):this.style.setProperty(e,o,r)}}function r8(e,n,r){return arguments.length>1?this.each((n==null?e8:typeof n=="function"?n8:t8)(e,n,r??"")):Ui(this.node(),e)}function Ui(e,n){return e.style.getPropertyValue(n)||NC(e).getComputedStyle(e,null).getPropertyValue(n)}function o8(e){return function(){delete this[e]}}function i8(e,n){return function(){this[e]=n}}function s8(e,n){return function(){var r=n.apply(this,arguments);r==null?delete this[e]:this[e]=r}}function a8(e,n){return arguments.length>1?this.each((n==null?o8:typeof n=="function"?s8:i8)(e,n)):this.node()[e]}function EC(e){return e.trim().split(/^|\s+/)}function Eg(e){return e.classList||new PC(e)}function PC(e){this._node=e,this._names=EC(e.getAttribute("class")||"")}PC.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 jC(e,n){for(var r=Eg(e),o=-1,i=n.length;++o<i;)r.add(n[o])}function MC(e,n){for(var r=Eg(e),o=-1,i=n.length;++o<i;)r.remove(n[o])}function l8(e){return function(){jC(this,e)}}function c8(e){return function(){MC(this,e)}}function u8(e,n){return function(){(n.apply(this,arguments)?jC:MC)(this,e)}}function d8(e,n){var r=EC(e+"");if(arguments.length<2){for(var o=Eg(this.node()),i=-1,s=r.length;++i<s;)if(!o.contains(r[i]))return!1;return!0}return this.each((typeof n=="function"?u8:n?l8:c8)(r,n))}function f8(){this.textContent=""}function h8(e){return function(){this.textContent=e}}function p8(e){return function(){var n=e.apply(this,arguments);this.textContent=n??""}}function m8(e){return arguments.length?this.each(e==null?f8:(typeof e=="function"?p8:h8)(e)):this.node().textContent}function g8(){this.innerHTML=""}function v8(e){return function(){this.innerHTML=e}}function y8(e){return function(){var n=e.apply(this,arguments);this.innerHTML=n??""}}function x8(e){return arguments.length?this.each(e==null?g8:(typeof e=="function"?y8:v8)(e)):this.node().innerHTML}function w8(){this.nextSibling&&this.parentNode.appendChild(this)}function b8(){return this.each(w8)}function _8(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function S8(){return this.each(_8)}function k8(e){var n=typeof e=="function"?e:bC(e);return this.select(function(){return this.appendChild(n.apply(this,arguments))})}function C8(){return null}function N8(e,n){var r=typeof e=="function"?e:bC(e),o=n==null?C8:typeof n=="function"?n:Ng(n);return this.select(function(){return this.insertBefore(r.apply(this,arguments),o.apply(this,arguments)||null)})}function E8(){var e=this.parentNode;e&&e.removeChild(this)}function P8(){return this.each(E8)}function j8(){var e=this.cloneNode(!1),n=this.parentNode;return n?n.insertBefore(e,this.nextSibling):e}function M8(){var e=this.cloneNode(!0),n=this.parentNode;return n?n.insertBefore(e,this.nextSibling):e}function R8(e){return this.select(e?M8:j8)}function A8(e){return arguments.length?this.property("__data__",e):this.node().__data__}function T8(e){return function(n){e.call(this,n,this.__data__)}}function I8(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 O8(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 $8(e,n,r){return function(){var o=this.__on,i,s=T8(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 D8(e,n,r){var o=I8(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?$8:O8,i=0;i<s;++i)this.each(l(o[i],n,r));return this}function RC(e,n,r){var o=NC(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 L8(e,n){return function(){return RC(this,e,n)}}function z8(e,n){return function(){return RC(this,e,n.apply(this,arguments))}}function F8(e,n){return this.each((typeof n=="function"?z8:L8)(e,n))}function*B8(){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 AC=[null];function $t(e,n){this._groups=e,this._parents=n}function Ka(){return new $t([[document.documentElement]],AC)}function H8(){return this}$t.prototype=Ka.prototype={constructor:$t,select:p6,selectAll:y6,selectChild:_6,selectChildren:N6,filter:E6,data:T6,enter:P6,exit:O6,join:$6,merge:D6,selection:H8,order:L6,sort:z6,call:B6,nodes:H6,node:U6,size:V6,empty:W6,each:G6,attr:J6,style:r8,property:a8,classed:d8,text:m8,html:x8,raise:b8,lower:S8,append:k8,insert:N8,remove:P8,clone:R8,datum:A8,on:D8,dispatch:F8,[Symbol.iterator]:B8};function st(e){return typeof e=="string"?new $t([[document.querySelector(e)]],[document.documentElement]):new $t([[e]],AC)}function U8(e){let n;for(;n=e.sourceEvent;)e=n;return e}function Ut(e,n){if(e=U8(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 V8={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 W8(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=W8(e+"",r),i,s=-1,a=o.length;if(arguments.length<2){for(;++s<a;)if((i=(e=o[s]).type)&&(i=G8(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]=Ay(r[i],e.name,n);else if(n==null)for(i in r)r[i]=Ay(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 G8(e,n){for(var r=0,o=e.length,i;r<o;++r)if((i=e[r]).name===n)return i.value}function Ay(e,n,r){for(var o=0,i=e.length;o<i;++o)if(e[o].name===n){e[o]=V8,e=e.slice(0,o).concat(e.slice(o+1));break}return r!=null&&e.push({name:n,value:r}),e}const Y8={passive:!1},ba={capture:!0,passive:!1};function If(e){e.stopImmediatePropagation()}function Pi(e){e.preventDefault(),e.stopImmediatePropagation()}function TC(e){var n=e.document.documentElement,r=st(e).on("dragstart.drag",Pi,ba);"onselectstart"in n?r.on("selectstart.drag",Pi,ba):(n.__noselect=n.style.MozUserSelect,n.style.MozUserSelect="none")}function IC(e,n){var r=e.document.documentElement,o=st(e).on("dragstart.drag",null);n&&(o.on("click.drag",Pi,ba),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 hp(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}})}hp.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function X8(e){return!e.ctrlKey&&!e.button}function K8(){return this.parentNode}function q8(e,n){return n??{x:e.x,y:e.y}}function Q8(){return navigator.maxTouchPoints||"ontouchstart"in this}function Pg(){var e=X8,n=K8,r=q8,o=Q8,i={},s=qa("start","drag","end"),a=0,l,c,u,f,d=0;function h(S){S.on("mousedown.drag",g).filter(o).on("touchstart.drag",_).on("touchmove.drag",m,Y8).on("touchend.drag touchcancel.drag",w).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function g(S,k){if(!(f||!e.call(this,S,k))){var C=y(this,n.call(this,S,k),S,k,"mouse");C&&(st(S.view).on("mousemove.drag",v,ba).on("mouseup.drag",b,ba),TC(S.view),If(S),u=!1,l=S.clientX,c=S.clientY,C("start",S))}}function v(S){if(Pi(S),!u){var k=S.clientX-l,C=S.clientY-c;u=k*k+C*C>d}i.mouse("drag",S)}function b(S){st(S.view).on("mousemove.drag mouseup.drag",null),IC(S.view,u),Pi(S),i.mouse("end",S)}function _(S,k){if(e.call(this,S,k)){var C=S.changedTouches,N=n.call(this,S,k),E=C.length,P,A;for(P=0;P<E;++P)(A=y(this,N,S,k,C[P].identifier,C[P]))&&(If(S),A("start",S,C[P]))}}function m(S){var k=S.changedTouches,C=k.length,N,E;for(N=0;N<C;++N)(E=i[k[N].identifier])&&(Pi(S),E("drag",S,k[N]))}function w(S){var k=S.changedTouches,C=k.length,N,E;for(f&&clearTimeout(f),f=setTimeout(function(){f=null},500),N=0;N<C;++N)(E=i[k[N].identifier])&&(If(S),E("end",S,k[N]))}function y(S,k,C,N,E,P){var A=s.copy(),T=Ut(P||C,k),D,B,j;if((j=r.call(S,new hp("beforestart",{sourceEvent:C,target:h,identifier:E,active:a,x:T[0],y:T[1],dx:0,dy:0,dispatch:A}),N))!=null)return D=j.x-T[0]||0,B=j.y-T[1]||0,function L(I,z,M){var R=T,$;switch(I){case"start":i[E]=L,$=a++;break;case"end":delete i[E],--a;case"drag":T=Ut(M||z,k),$=a;break}A.call(I,S,new hp(I,{sourceEvent:z,subject:j,target:h,identifier:E,active:$,x:T[0]+D,y:T[1]+B,dx:T[0]-R[0],dy:T[1]-R[1],dispatch:A}),N)}}return h.filter=function(S){return arguments.length?(e=typeof S=="function"?S:Fl(!!S),h):e},h.container=function(S){return arguments.length?(n=typeof S=="function"?S:Fl(S),h):n},h.subject=function(S){return arguments.length?(r=typeof S=="function"?S:Fl(S),h):r},h.touchable=function(S){return arguments.length?(o=typeof S=="function"?S:Fl(!!S),h):o},h.on=function(){var S=s.on.apply(s,arguments);return S===s?h:S},h.clickDistance=function(S){return arguments.length?(d=(S=+S)*S,h):Math.sqrt(d)},h}function jg(e,n,r){e.prototype=n.prototype=r,r.constructor=e}function OC(e,n){var r=Object.create(e.prototype);for(var o in n)r[o]=n[o];return r}function Qa(){}var _a=.7,fu=1/_a,ji="\\s*([+-]?\\d+)\\s*",Sa="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Rn="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Z8=/^#([0-9a-f]{3,8})$/,J8=new RegExp(`^rgb\\(${ji},${ji},${ji}\\)$`),ez=new RegExp(`^rgb\\(${Rn},${Rn},${Rn}\\)$`),tz=new RegExp(`^rgba\\(${ji},${ji},${ji},${Sa}\\)$`),nz=new RegExp(`^rgba\\(${Rn},${Rn},${Rn},${Sa}\\)$`),rz=new RegExp(`^hsl\\(${Sa},${Rn},${Rn}\\)$`),oz=new RegExp(`^hsla\\(${Sa},${Rn},${Rn},${Sa}\\)$`),Ty={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};jg(Qa,Io,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Iy,formatHex:Iy,formatHex8:iz,formatHsl:sz,formatRgb:Oy,toString:Oy});function Iy(){return this.rgb().formatHex()}function iz(){return this.rgb().formatHex8()}function sz(){return $C(this).formatHsl()}function Oy(){return this.rgb().formatRgb()}function Io(e){var n,r;return e=(e+"").trim().toLowerCase(),(n=Z8.exec(e))?(r=n[1].length,n=parseInt(n[1],16),r===6?$y(n):r===3?new yt(n>>8&15|n>>4&240,n>>4&15|n&240,(n&15)<<4|n&15,1):r===8?Bl(n>>24&255,n>>16&255,n>>8&255,(n&255)/255):r===4?Bl(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=J8.exec(e))?new yt(n[1],n[2],n[3],1):(n=ez.exec(e))?new yt(n[1]*255/100,n[2]*255/100,n[3]*255/100,1):(n=tz.exec(e))?Bl(n[1],n[2],n[3],n[4]):(n=nz.exec(e))?Bl(n[1]*255/100,n[2]*255/100,n[3]*255/100,n[4]):(n=rz.exec(e))?zy(n[1],n[2]/100,n[3]/100,1):(n=oz.exec(e))?zy(n[1],n[2]/100,n[3]/100,n[4]):Ty.hasOwnProperty(e)?$y(Ty[e]):e==="transparent"?new yt(NaN,NaN,NaN,0):null}function $y(e){return new yt(e>>16&255,e>>8&255,e&255,1)}function Bl(e,n,r,o){return o<=0&&(e=n=r=NaN),new yt(e,n,r,o)}function az(e){return e instanceof Qa||(e=Io(e)),e?(e=e.rgb(),new yt(e.r,e.g,e.b,e.opacity)):new yt}function pp(e,n,r,o){return arguments.length===1?az(e):new yt(e,n,r,o??1)}function yt(e,n,r,o){this.r=+e,this.g=+n,this.b=+r,this.opacity=+o}jg(yt,pp,OC(Qa,{brighter(e){return e=e==null?fu:Math.pow(fu,e),new yt(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?_a:Math.pow(_a,e),new yt(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new yt(bo(this.r),bo(this.g),bo(this.b),hu(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:Dy,formatHex:Dy,formatHex8:lz,formatRgb:Ly,toString:Ly}));function Dy(){return`#${yo(this.r)}${yo(this.g)}${yo(this.b)}`}function lz(){return`#${yo(this.r)}${yo(this.g)}${yo(this.b)}${yo((isNaN(this.opacity)?1:this.opacity)*255)}`}function Ly(){const e=hu(this.opacity);return`${e===1?"rgb(":"rgba("}${bo(this.r)}, ${bo(this.g)}, ${bo(this.b)}${e===1?")":`, ${e})`}`}function hu(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function bo(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function yo(e){return e=bo(e),(e<16?"0":"")+e.toString(16)}function zy(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 $C(e){if(e instanceof ln)return new ln(e.h,e.s,e.l,e.opacity);if(e instanceof Qa||(e=Io(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 cz(e,n,r,o){return arguments.length===1?$C(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}jg(ln,cz,OC(Qa,{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?_a:Math.pow(_a,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 yt(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(Fy(this.h),Hl(this.s),Hl(this.l),hu(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=hu(this.opacity);return`${e===1?"hsl(":"hsla("}${Fy(this.h)}, ${Hl(this.s)*100}%, ${Hl(this.l)*100}%${e===1?")":`, ${e})`}`}}));function Fy(e){return e=(e||0)%360,e<0?e+360:e}function Hl(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 Mg=e=>()=>e;function uz(e,n){return function(r){return e+r*n}}function dz(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 fz(e){return(e=+e)==1?DC:function(n,r){return r-n?dz(n,r,e):Mg(isNaN(n)?r:n)}}function DC(e,n){var r=n-e;return r?uz(e,r):Mg(isNaN(e)?n:e)}const pu=function e(n){var r=fz(n);function o(i,s){var a=r((i=pp(i)).r,(s=pp(s)).r),l=r(i.g,s.g),c=r(i.b,s.b),u=DC(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 hz(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 pz(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function mz(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]=Ys(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 gz(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 vz(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]=Ys(e[i],n[i]):o[i]=n[i];return function(s){for(i in r)o[i]=r[i](s);return o}}var mp=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,$f=new RegExp(mp.source,"g");function yz(e){return function(){return e}}function xz(e){return function(n){return e(n)+""}}function LC(e,n){var r=mp.lastIndex=$f.lastIndex=0,o,i,s,a=-1,l=[],c=[];for(e=e+"",n=n+"";(o=mp.exec(e))&&(i=$f.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=$f.lastIndex;return r<n.length&&(s=n.slice(r),l[a]?l[a]+=s:l[++a]=s),l.length<2?c[0]?xz(c[0].x):yz(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 Ys(e,n){var r=typeof n,o;return n==null||r==="boolean"?Mg(n):(r==="number"?Sn:r==="string"?(o=Io(n))?(n=o,pu):LC:n instanceof Io?pu:n instanceof Date?gz:pz(n)?hz:Array.isArray(n)?mz:typeof n.valueOf!="function"&&typeof n.toString!="function"||isNaN(n)?vz:Sn)(e,n)}var By=180/Math.PI,gp={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function zC(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)*By,skewX:Math.atan(c)*By,scaleX:a,scaleY:l}}var Ul;function wz(e){const n=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return n.isIdentity?gp:zC(n.a,n.b,n.c,n.d,n.e,n.f)}function bz(e){return e==null||(Ul||(Ul=document.createElementNS("http://www.w3.org/2000/svg","g")),Ul.setAttribute("transform",e),!(e=Ul.transform.baseVal.consolidate()))?gp:(e=e.matrix,zC(e.a,e.b,e.c,e.d,e.e,e.f))}function FC(e,n,r,o){function i(u){return u.length?u.pop()+" ":""}function s(u,f,d,h,g,v){if(u!==d||f!==h){var b=g.push("translate(",null,n,null,r);v.push({i:b-4,x:Sn(u,d)},{i:b-2,x:Sn(f,h)})}else(d||h)&&g.push("translate("+d+n+h+r)}function a(u,f,d,h){u!==f?(u-f>180?f+=360:f-u>180&&(u+=360),h.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,h){u!==f?h.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,h,g,v){if(u!==d||f!==h){var b=g.push(i(g)+"scale(",null,",",null,")");v.push({i:b-4,x:Sn(u,d)},{i:b-2,x:Sn(f,h)})}else(d!==1||h!==1)&&g.push(i(g)+"scale("+d+","+h+")")}return function(u,f){var d=[],h=[];return u=e(u),f=e(f),s(u.translateX,u.translateY,f.translateX,f.translateY,d,h),a(u.rotate,f.rotate,d,h),l(u.skewX,f.skewX,d,h),c(u.scaleX,u.scaleY,f.scaleX,f.scaleY,d,h),u=f=null,function(g){for(var v=-1,b=h.length,_;++v<b;)d[(_=h[v]).i]=_.x(g);return d.join("")}}}var _z=FC(wz,"px, ","px)","deg)"),Sz=FC(bz,", ",")",")"),kz=1e-12;function Hy(e){return((e=Math.exp(e))+1/e)/2}function Cz(e){return((e=Math.exp(e))-1/e)/2}function Nz(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],h=a[2],g=f-l,v=d-c,b=g*g+v*v,_,m;if(b<kz)m=Math.log(h/u)/n,_=function(N){return[l+N*g,c+N*v,u*Math.exp(n*N*m)]};else{var w=Math.sqrt(b),y=(h*h-u*u+o*b)/(2*u*r*w),S=(h*h-u*u-o*b)/(2*h*r*w),k=Math.log(Math.sqrt(y*y+1)-y),C=Math.log(Math.sqrt(S*S+1)-S);m=(C-k)/n,_=function(N){var E=N*m,P=Hy(k),A=u/(r*w)*(P*Nz(n*E+k)-Cz(k));return[l+A*g,c+A*v,u*P/Hy(n*E+k)]}}return _.duration=m*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 Vi=0,Is=0,xs=0,BC=1e3,mu,Os,gu=0,Oo=0,Cd=0,ka=typeof performance=="object"&&performance.now?performance:Date,HC=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function Rg(){return Oo||(HC(Ez),Oo=ka.now()+Cd)}function Ez(){Oo=0}function vu(){this._call=this._time=this._next=null}vu.prototype=Ag.prototype={constructor:vu,restart:function(e,n,r){if(typeof e!="function")throw new TypeError("callback is not a function");r=(r==null?Rg():+r)+(n==null?0:+n),!this._next&&Os!==this&&(Os?Os._next=this:mu=this,Os=this),this._call=e,this._time=r,vp()},stop:function(){this._call&&(this._call=null,this._time=1/0,vp())}};function Ag(e,n,r){var o=new vu;return o.restart(e,n,r),o}function Pz(){Rg(),++Vi;for(var e=mu,n;e;)(n=Oo-e._time)>=0&&e._call.call(void 0,n),e=e._next;--Vi}function Uy(){Oo=(gu=ka.now())+Cd,Vi=Is=0;try{Pz()}finally{Vi=0,Mz(),Oo=0}}function jz(){var e=ka.now(),n=e-gu;n>BC&&(Cd-=n,gu=e)}function Mz(){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);Os=e,vp(o)}function vp(e){if(!Vi){Is&&(Is=clearTimeout(Is));var n=e-Oo;n>24?(e<1/0&&(Is=setTimeout(Uy,e-ka.now()-Cd)),xs&&(xs=clearInterval(xs))):(xs||(gu=ka.now(),xs=setInterval(jz,BC)),Vi=1,HC(Uy))}}function Vy(e,n,r){var o=new vu;return n=n==null?0:+n,o.restart(i=>{o.stop(),e(i+n)},n,r),o}var Rz=qa("start","end","cancel","interrupt"),Az=[],UC=0,Wy=1,yp=2,bc=3,Gy=4,xp=5,_c=6;function Nd(e,n,r,o,i,s){var a=e.__transition;if(!a)e.__transition={};else if(r in a)return;Tz(e,r,{name:n,index:o,group:i,on:Rz,tween:Az,time:s.time,delay:s.delay,duration:s.duration,ease:s.ease,timer:null,state:UC})}function Tg(e,n){var r=yn(e,n);if(r.state>UC)throw new Error("too late; already scheduled");return r}function Dn(e,n){var r=yn(e,n);if(r.state>bc)throw new Error("too late; already running");return r}function yn(e,n){var r=e.__transition;if(!r||!(r=r[n]))throw new Error("transition not found");return r}function Tz(e,n,r){var o=e.__transition,i;o[n]=r,r.timer=Ag(s,0,r.time);function s(u){r.state=Wy,r.timer.restart(a,r.delay,r.time),r.delay<=u&&a(u-r.delay)}function a(u){var f,d,h,g;if(r.state!==Wy)return c();for(f in o)if(g=o[f],g.name===r.name){if(g.state===bc)return Vy(a);g.state===Gy?(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(Vy(function(){r.state===bc&&(r.state=Gy,r.timer.restart(l,r.delay,r.time),l(u))}),r.state=yp,r.on.call("start",e,e.__data__,r.index,r.group),r.state===yp){for(r.state=bc,i=new Array(h=r.tween.length),f=0,d=-1;f<h;++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=xp,1),d=-1,h=i.length;++d<h;)i[d].call(e,f);r.state===xp&&(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>yp&&o.state<xp,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 Iz(e){return this.each(function(){Sc(this,e)})}function Oz(e,n){var r,o;return function(){var i=Dn(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 $z(e,n,r){var o,i;if(typeof r!="function")throw new Error;return function(){var s=Dn(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 Dz(e,n){var r=this._id;if(e+="",arguments.length<2){for(var o=yn(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?Oz:$z)(r,e,n))}function Ig(e,n,r){var o=e._id;return e.each(function(){var i=Dn(this,o);(i.value||(i.value={}))[n]=r.apply(this,arguments)}),function(i){return yn(i,o).value[n]}}function VC(e,n){var r;return(typeof n=="number"?Sn:n instanceof Io?pu:(r=Io(n))?(n=r,pu):LC)(e,n)}function Lz(e){return function(){this.removeAttribute(e)}}function zz(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Fz(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 Bz(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 Hz(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 Uz(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 Vz(e,n){var r=kd(e),o=r==="transform"?Sz:VC;return this.attrTween(e,typeof n=="function"?(r.local?Uz:Hz)(r,o,Ig(this,"attr."+e,n)):n==null?(r.local?zz:Lz)(r):(r.local?Bz:Fz)(r,o,n))}function Wz(e,n){return function(r){this.setAttribute(e,n.call(this,r))}}function Gz(e,n){return function(r){this.setAttributeNS(e.space,e.local,n.call(this,r))}}function Yz(e,n){var r,o;function i(){var s=n.apply(this,arguments);return s!==o&&(r=(o=s)&&Gz(e,s)),r}return i._value=n,i}function Xz(e,n){var r,o;function i(){var s=n.apply(this,arguments);return s!==o&&(r=(o=s)&&Wz(e,s)),r}return i._value=n,i}function Kz(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?Yz:Xz)(o,n))}function qz(e,n){return function(){Tg(this,e).delay=+n.apply(this,arguments)}}function Qz(e,n){return n=+n,function(){Tg(this,e).delay=n}}function Zz(e){var n=this._id;return arguments.length?this.each((typeof e=="function"?qz:Qz)(n,e)):yn(this.node(),n).delay}function Jz(e,n){return function(){Dn(this,e).duration=+n.apply(this,arguments)}}function e9(e,n){return n=+n,function(){Dn(this,e).duration=n}}function t9(e){var n=this._id;return arguments.length?this.each((typeof e=="function"?Jz:e9)(n,e)):yn(this.node(),n).duration}function n9(e,n){if(typeof n!="function")throw new Error;return function(){Dn(this,e).ease=n}}function r9(e){var n=this._id;return arguments.length?this.each(n9(n,e)):yn(this.node(),n).ease}function o9(e,n){return function(){var r=n.apply(this,arguments);if(typeof r!="function")throw new Error;Dn(this,e).ease=r}}function i9(e){if(typeof e!="function")throw new Error;return this.each(o9(this._id,e))}function s9(e){typeof e!="function"&&(e=SC(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 sr(o,this._parents,this._name,this._id)}function a9(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),h,g=0;g<f;++g)(h=c[g]||u[g])&&(d[g]=h);for(;l<o;++l)a[l]=n[l];return new sr(a,this._parents,this._name,this._id)}function l9(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 c9(e,n,r){var o,i,s=l9(n)?Tg:Dn;return function(){var a=s(this,e),l=a.on;l!==o&&(i=(o=l).copy()).on(n,r),a.on=i}}function u9(e,n){var r=this._id;return arguments.length<2?yn(this.node(),r).on.on(e):this.each(c9(r,e,n))}function d9(e){return function(){var n=this.parentNode;for(var r in this.__transition)if(+r!==e)return;n&&n.removeChild(this)}}function f9(){return this.on("end.remove",d9(this._id))}function h9(e){var n=this._name,r=this._id;typeof e!="function"&&(e=Ng(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,h=0;h<c;++h)(f=l[h])&&(d=e.call(f,f.__data__,h,l))&&("__data__"in f&&(d.__data__=f.__data__),u[h]=d,Nd(u[h],n,r,h,u,yn(f,r)));return new sr(s,this._parents,n,r)}function p9(e){var n=this._name,r=this._id;typeof e!="function"&&(e=_C(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 h=e.call(f,f.__data__,d,c),g,v=yn(f,r),b=0,_=h.length;b<_;++b)(g=h[b])&&Nd(g,n,r,b,h,v);s.push(h),a.push(f)}return new sr(s,a,n,r)}var m9=Ka.prototype.constructor;function g9(){return new m9(this._groups,this._parents)}function v9(e,n){var r,o,i;return function(){var s=Ui(this,e),a=(this.style.removeProperty(e),Ui(this,e));return s===a?null:s===r&&a===o?i:i=n(r=s,o=a)}}function WC(e){return function(){this.style.removeProperty(e)}}function y9(e,n,r){var o,i=r+"",s;return function(){var a=Ui(this,e);return a===i?null:a===o?s:s=n(o=a,r)}}function x9(e,n,r){var o,i,s;return function(){var a=Ui(this,e),l=r(this),c=l+"";return l==null&&(c=l=(this.style.removeProperty(e),Ui(this,e))),a===c?null:a===o&&c===i?s:(i=c,s=n(o=a,l))}}function w9(e,n){var r,o,i,s="style."+n,a="end."+s,l;return function(){var c=Dn(this,e),u=c.on,f=c.value[s]==null?l||(l=WC(n)):void 0;(u!==r||i!==f)&&(o=(r=u).copy()).on(a,i=f),c.on=o}}function b9(e,n,r){var o=(e+="")=="transform"?_z:VC;return n==null?this.styleTween(e,v9(e,o)).on("end.style."+e,WC(e)):typeof n=="function"?this.styleTween(e,x9(e,o,Ig(this,"style."+e,n))).each(w9(this._id,e)):this.styleTween(e,y9(e,o,n),r).on("end.style."+e,null)}function _9(e,n,r){return function(o){this.style.setProperty(e,n.call(this,o),r)}}function S9(e,n,r){var o,i;function s(){var a=n.apply(this,arguments);return a!==i&&(o=(i=a)&&_9(e,a,r)),o}return s._value=n,s}function k9(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,S9(e,n,r??""))}function C9(e){return function(){this.textContent=e}}function N9(e){return function(){var n=e(this);this.textContent=n??""}}function E9(e){return this.tween("text",typeof e=="function"?N9(Ig(this,"text",e)):C9(e==null?"":e+""))}function P9(e){return function(n){this.textContent=e.call(this,n)}}function j9(e){var n,r;function o(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&P9(i)),n}return o._value=e,o}function M9(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,j9(e))}function R9(){for(var e=this._name,n=this._id,r=GC(),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=yn(c,n);Nd(c,e,r,u,a,{time:f.time+f.delay+f.duration,delay:0,duration:f.duration,ease:f.ease})}return new sr(o,this._parents,e,r)}function A9(){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=Dn(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 T9=0;function sr(e,n,r,o){this._groups=e,this._parents=n,this._name=r,this._id=o}function GC(){return++T9}var zn=Ka.prototype;sr.prototype={constructor:sr,select:h9,selectAll:p9,selectChild:zn.selectChild,selectChildren:zn.selectChildren,filter:s9,merge:a9,selection:g9,transition:R9,call:zn.call,nodes:zn.nodes,node:zn.node,size:zn.size,empty:zn.empty,each:zn.each,on:u9,attr:Vz,attrTween:Kz,style:b9,styleTween:k9,text:E9,textTween:M9,remove:f9,tween:Dz,delay:Zz,duration:t9,ease:r9,easeVarying:i9,end:A9,[Symbol.iterator]:zn[Symbol.iterator]};function I9(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var O9={time:null,delay:0,duration:250,ease:I9};function $9(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 D9(e){var n,r;e instanceof sr?(n=e._id,e=e._name):(n=GC(),(r=O9).time=Rg(),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])&&Nd(c,e,n,u,a,r||$9(c,n));return new sr(o,this._parents,e,n)}Ka.prototype.interrupt=Iz;Ka.prototype.transition=D9;const Vl=e=>()=>e;function L9(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 Kn(e,n,r){this.k=e,this.x=n,this.y=r}Kn.prototype={constructor:Kn,scale:function(e){return e===1?this:new Kn(this.k*e,this.x,this.y)},translate:function(e,n){return e===0&n===0?this:new Kn(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 Ed=new Kn(1,0,0);on.prototype=Kn.prototype;function on(e){for(;!e.__zoom;)if(!(e=e.parentNode))return Ed;return e.__zoom}function Df(e){e.stopImmediatePropagation()}function ws(e){e.preventDefault(),e.stopImmediatePropagation()}function z9(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function F9(){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 Yy(){return this.__zoom||Ed}function B9(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function H9(){return navigator.maxTouchPoints||"ontouchstart"in this}function U9(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 Og(){var e=z9,n=F9,r=U9,o=B9,i=H9,s=[0,1/0],a=[[-1/0,-1/0],[1/0,1/0]],l=250,c=wc,u=qa("start","zoom","end"),f,d,h,g=500,v=150,b=0,_=10;function m(j){j.property("__zoom",Yy).on("wheel.zoom",E,{passive:!1}).on("mousedown.zoom",P).on("dblclick.zoom",A).filter(i).on("touchstart.zoom",T).on("touchmove.zoom",D).on("touchend.zoom touchcancel.zoom",B).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}m.transform=function(j,L,I,z){var M=j.selection?j.selection():j;M.property("__zoom",Yy),j!==M?k(j,L,I,z):M.interrupt().each(function(){C(this,arguments).event(z).start().zoom(null,typeof L=="function"?L.apply(this,arguments):L).end()})},m.scaleBy=function(j,L,I,z){m.scaleTo(j,function(){var M=this.__zoom.k,R=typeof L=="function"?L.apply(this,arguments):L;return M*R},I,z)},m.scaleTo=function(j,L,I,z){m.transform(j,function(){var M=n.apply(this,arguments),R=this.__zoom,$=I==null?S(M):typeof I=="function"?I.apply(this,arguments):I,V=R.invert($),O=typeof L=="function"?L.apply(this,arguments):L;return r(y(w(R,O),$,V),M,a)},I,z)},m.translateBy=function(j,L,I,z){m.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)},m.translateTo=function(j,L,I,z,M){m.transform(j,function(){var R=n.apply(this,arguments),$=this.__zoom,V=z==null?S(R):typeof z=="function"?z.apply(this,arguments):z;return r(Ed.translate(V[0],V[1]).scale($.k).translate(typeof L=="function"?-L.apply(this,arguments):-L,typeof I=="function"?-I.apply(this,arguments):-I),R,a)},z,M)};function w(j,L){return L=Math.max(s[0],Math.min(s[1],L)),L===j.k?j:new Kn(L,j.x,j.y)}function y(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 Kn(j.k,z,M)}function S(j){return[(+j[0][0]+ +j[1][0])/2,(+j[0][1]+ +j[1][1])/2]}function k(j,L,I,z){j.on("start.zoom",function(){C(this,arguments).event(z).start()}).on("interrupt.zoom end.zoom",function(){C(this,arguments).event(z).end()}).tween("zoom",function(){var M=this,R=arguments,$=C(M,R).event(z),V=n.apply(M,R),O=I==null?S(V):typeof I=="function"?I.apply(M,R):I,X=Math.max(V[1][0]-V[0][0],V[1][1]-V[0][1]),F=M.__zoom,U=typeof L=="function"?L.apply(M,R):L,G=c(F.invert(O).concat(X/F.k),U.invert(O).concat(X/U.k));return function(W){if(W===1)W=U;else{var Y=G(W),q=X/Y[2];W=new Kn(q,O[0]-Y[0]*q,O[1]-Y[1]*q)}$.zoom(null,W)}})}function C(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 L9(j,{sourceEvent:this.sourceEvent,target:m,transform:this.that.__zoom,dispatch:u}),L)}};function E(j,...L){if(!e.apply(this,arguments))return;var I=C(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=Ut(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()}ws(j),I.wheel=setTimeout($,v),I.zoom("mouse",r(y(w(z,M),I.mouse[0],I.mouse[1]),I.extent,a));function $(){I.wheel=null,I.end()}}function P(j,...L){if(h||!e.apply(this,arguments))return;var I=j.currentTarget,z=C(this,L,!0).event(j),M=st(j.view).on("mousemove.zoom",O,!0).on("mouseup.zoom",X,!0),R=Ut(j,I),$=j.clientX,V=j.clientY;TC(j.view),Df(j),z.mouse=[R,this.__zoom.invert(R)],Sc(this),z.start();function O(F){if(ws(F),!z.moved){var U=F.clientX-$,G=F.clientY-V;z.moved=U*U+G*G>b}z.event(F).zoom("mouse",r(y(z.that.__zoom,z.mouse[0]=Ut(F,I),z.mouse[1]),z.extent,a))}function X(F){M.on("mousemove.zoom mouseup.zoom",null),IC(F.view,z.moved),ws(F),z.event(F).end()}}function A(j,...L){if(e.apply(this,arguments)){var I=this.__zoom,z=Ut(j.changedTouches?j.changedTouches[0]:j,this),M=I.invert(z),R=I.k*(j.shiftKey?.5:2),$=r(y(w(I,R),z,M),n.apply(this,L),a);ws(j),l>0?st(this).transition().duration(l).call(k,$,z,j):st(this).call(m.transform,$,z,j)}}function T(j,...L){if(e.apply(this,arguments)){var I=j.touches,z=I.length,M=C(this,L,j.changedTouches.length===z).event(j),R,$,V,O;for(Df(j),$=0;$<z;++$)V=I[$],O=Ut(V,this),O=[O,this.__zoom.invert(O),V.identifier],M.touch0?!M.touch1&&M.touch0[2]!==O[2]&&(M.touch1=O,M.taps=0):(M.touch0=O,R=!0,M.taps=1+!!f);f&&(f=clearTimeout(f)),R&&(M.taps<2&&(d=O[0],f=setTimeout(function(){f=null},g)),Sc(this),M.start())}}function D(j,...L){if(this.__zooming){var I=C(this,L).event(j),z=j.changedTouches,M=z.length,R,$,V,O;for(ws(j),R=0;R<M;++R)$=z[R],V=Ut($,this),I.touch0&&I.touch0[2]===$.identifier?I.touch0[0]=V:I.touch1&&I.touch1[2]===$.identifier&&(I.touch1[0]=V);if($=I.that.__zoom,I.touch1){var X=I.touch0[0],F=I.touch0[1],U=I.touch1[0],G=I.touch1[1],W=(W=U[0]-X[0])*W+(W=U[1]-X[1])*W,Y=(Y=G[0]-F[0])*Y+(Y=G[1]-F[1])*Y;$=w($,Math.sqrt(W/Y)),V=[(X[0]+U[0])/2,(X[1]+U[1])/2],O=[(F[0]+G[0])/2,(F[1]+G[1])/2]}else if(I.touch0)V=I.touch0[0],O=I.touch0[1];else return;I.zoom("touch",r(y($,V,O),I.extent,a))}}function B(j,...L){if(this.__zooming){var I=C(this,L).event(j),z=j.changedTouches,M=z.length,R,$;for(Df(j),h&&clearTimeout(h),h=setTimeout(function(){h=null},g),R=0;R<M;++R)$=z[R],I.touch0&&I.touch0[2]===$.identifier?delete I.touch0:I.touch1&&I.touch1[2]===$.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&&($=Ut($,this),Math.hypot(d[0]-$[0],d[1]-$[1])<_)){var V=st(this).on("dblclick.zoom");V&&V.apply(this,arguments)}}}return m.wheelDelta=function(j){return arguments.length?(o=typeof j=="function"?j:Vl(+j),m):o},m.filter=function(j){return arguments.length?(e=typeof j=="function"?j:Vl(!!j),m):e},m.touchable=function(j){return arguments.length?(i=typeof j=="function"?j:Vl(!!j),m):i},m.extent=function(j){return arguments.length?(n=typeof j=="function"?j:Vl([[+j[0][0],+j[0][1]],[+j[1][0],+j[1][1]]]),m):n},m.scaleExtent=function(j){return arguments.length?(s[0]=+j[0],s[1]=+j[1],m):[s[0],s[1]]},m.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],m):[[a[0][0],a[0][1]],[a[1][0],a[1][1]]]},m.constrain=function(j){return arguments.length?(r=j,m):r},m.duration=function(j){return arguments.length?(l=+j,m):l},m.interpolate=function(j){return arguments.length?(c=j,m):c},m.on=function(){var j=u.on.apply(u,arguments);return j===u?m:j},m.clickDistance=function(j){return arguments.length?(b=(j=+j)*j,m):Math.sqrt(b)},m.tapDistance=function(j){return arguments.length?(_=+j,m):_},m}class Xy extends Map{constructor(n,r=G9){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(Ky(this,n))}has(n){return super.has(Ky(this,n))}set(n,r){return super.set(V9(this,n),r)}delete(n){return super.delete(W9(this,n))}}function Ky({_intern:e,_key:n},r){const o=n(r);return e.has(o)?e.get(o):r}function V9({_intern:e,_key:n},r){const o=n(r);return e.has(o)?e.get(o):(e.set(o,r),r)}function W9({_intern:e,_key:n},r){const o=n(r);return e.has(o)&&(r=e.get(o),e.delete(o)),r}function G9(e){return e!==null&&typeof e=="object"?e.valueOf():e}function qy(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 Qy(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 Y9(e,n){let r=0;for(let o of e)(o=+o)&&(r+=o);return r}var X9=typeof global=="object"&&global&&global.Object===Object&&global,K9=typeof self=="object"&&self&&self.Object===Object&&self,YC=X9||K9||Function("return this")(),yu=YC.Symbol,XC=Object.prototype,q9=XC.hasOwnProperty,Q9=XC.toString,bs=yu?yu.toStringTag:void 0;function Z9(e){var n=q9.call(e,bs),r=e[bs];try{e[bs]=void 0;var o=!0}catch{}var i=Q9.call(e);return o&&(n?e[bs]=r:delete e[bs]),i}var J9=Object.prototype,eF=J9.toString;function tF(e){return eF.call(e)}var nF="[object Null]",rF="[object Undefined]",Zy=yu?yu.toStringTag:void 0;function oF(e){return e==null?e===void 0?rF:nF:Zy&&Zy in Object(e)?Z9(e):tF(e)}function iF(e){return e!=null&&typeof e=="object"}var sF="[object Symbol]";function aF(e){return typeof e=="symbol"||iF(e)&&oF(e)==sF}var lF=/\s/;function cF(e){for(var n=e.length;n--&&lF.test(e.charAt(n)););return n}var uF=/^\s+/;function dF(e){return e&&e.slice(0,cF(e)+1).replace(uF,"")}function xu(e){var n=typeof e;return e!=null&&(n=="object"||n=="function")}var Jy=NaN,fF=/^[-+]0x[0-9a-f]+$/i,hF=/^0b[01]+$/i,pF=/^0o[0-7]+$/i,mF=parseInt;function ex(e){if(typeof e=="number")return e;if(aF(e))return Jy;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=dF(e);var r=hF.test(e);return r||pF.test(e)?mF(e.slice(2),r?2:8):fF.test(e)?Jy:+e}var Lf=function(){return YC.Date.now()},gF="Expected a function",vF=Math.max,yF=Math.min;function KC(e,n,r){var o,i,s,a,l,c,u=0,f=!1,d=!1,h=!0;if(typeof e!="function")throw new TypeError(gF);n=ex(n)||0,xu(r)&&(f=!!r.leading,d="maxWait"in r,s=d?vF(ex(r.maxWait)||0,n):s,h="trailing"in r?!!r.trailing:h);function g(C){var N=o,E=i;return o=i=void 0,u=C,a=e.apply(E,N),a}function v(C){return u=C,l=setTimeout(m,n),f?g(C):a}function b(C){var N=C-c,E=C-u,P=n-N;return d?yF(P,s-E):P}function _(C){var N=C-c,E=C-u;return c===void 0||N>=n||N<0||d&&E>=s}function m(){var C=Lf();if(_(C))return w(C);l=setTimeout(m,b(C))}function w(C){return l=void 0,h&&o?g(C):(o=i=void 0,a)}function y(){l!==void 0&&clearTimeout(l),u=0,o=c=i=l=void 0}function S(){return l===void 0?a:w(Lf())}function k(){var C=Lf(),N=_(C);if(o=arguments,i=this,c=C,N){if(l===void 0)return v(c);if(d)return clearTimeout(l),l=setTimeout(m,n),g(c)}return l===void 0&&(l=setTimeout(m,n)),a}return k.cancel=y,k.flush=S,k}var xF="Expected a function";function wF(e,n,r){var o=!0,i=!0;if(typeof e!="function")throw new TypeError(xF);return xu(r)&&(o="leading"in r?!!r.leading:o,i="trailing"in r?!!r.trailing:i),KC(e,n,{leading:o,maxWait:n,trailing:i})}var _o=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-_o.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?_o.Bounce.In(e*2)*.5:_o.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}}}}),$s=function(){return performance.now()},qC=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=$s()),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}(),wp={Linear:function(e,n){var r=e.length-1,o=r*n,i=Math.floor(o),s=wp.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}}},QC=function(){function e(){}return e.nextId=function(){return e._nextId++},e._nextId=0,e}(),bp=new qC,tx=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=_o.Linear.None,this._interpolationFunction=wp.Linear,this._chainedTweens=[],this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._id=QC.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=bp,bp.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=$s()),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 h=[l],g=0,v=d.length;g<v;g+=1){var b=this._handleRelativeValue(l,d[g]);if(isNaN(b)){f=!1,console.warn("Found invalid interpolation list. Skipping.");break}h.push(b)}f&&(o[a]=h)}if((u==="object"||c)&&l&&!f){r[a]=c?[]:{};var _=l;for(var m in _)r[a][m]=_[m];i[a]=c?[]:{};var d=o[a];if(!this._isDynamic){var w={};for(var m in d)w[m]=d[m];o[a]=d=w}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=$s()),this._isPaused||!this._isPlaying?this:(this._isPaused=!0,this._pauseStart=n,this)},e.prototype.resume=function(n){return n===void 0&&(n=$s()),!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=_o.Linear.None),this._easingFunction=n,this},e.prototype.interpolation=function(n){return n===void 0&&(n=wp.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=$s()),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 b=Math.trunc(a/l),_=a-b*l,m=Math.min(_/o._duration,1);return m===0&&a===o._duration?1:m},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 h=Math.min(Math.trunc((a-this._duration)/l)+1,this._repeat);isFinite(this._repeat)&&(this._repeat-=h);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*h,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}();QC.nextId;var In=bp;In.getAll.bind(In);In.removeAll.bind(In);In.add.bind(In);In.remove.bind(In);In.update.bind(In);function nx(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 bF(e){if(Array.isArray(e))return e}function _F(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function SF(e,n,r){return Object.defineProperty(e,"prototype",{writable:!1}),e}function kF(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 CF(){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 NF(e,n){return bF(e)||kF(e,n)||EF(e,n)||CF()}function EF(e,n){if(e){if(typeof e=="string")return nx(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)?nx(e,n):void 0}}var PF=SF(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;_F(this,e),this.name=n,this.defaultVal=i,this.triggerUpdate=a,this.onChange=c});function $g(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,h=d===void 0?function(){}:d,g=Object.keys(i).map(function(v){return new PF(v,i[v])});return function v(){for(var b=arguments.length,_=new Array(b),m=0;m<b;m++)_[m]=arguments[m];var w=!!(this instanceof v&&this.constructor),y=w?_.shift():void 0,S=_[0],k=S===void 0?{}:S,C=Object.assign({},r instanceof Function?r(k):r,{initialised:!1}),N={};function E(T){return P(T,k),A(),E}var P=function(D,B){f.call(E,D,C,B),C.initialised=!0},A=KC(function(){C.initialised&&(h.call(E,C,N),N={})},1);return g.forEach(function(T){E[T.name]=D(T);function D(B){var j=B.name,L=B.triggerUpdate,I=L===void 0?!1:L,z=B.onChange,M=z===void 0?function(V,O){}:z,R=B.defaultVal,$=R===void 0?null:R;return function(V){var O=C[j];if(!arguments.length)return O;var X=V===void 0?$:V;return C[j]=X,M.call(E,X,C,O),!N.hasOwnProperty(j)&&(N[j]=O),I&&A(),E}}}),Object.keys(a).forEach(function(T){E[T]=function(){for(var D,B=arguments.length,j=new Array(B),L=0;L<B;L++)j[L]=arguments[L];return(D=a[T]).call.apply(D,[E,C].concat(j))}}),Object.entries(c).forEach(function(T){var D=NF(T,2),B=D[0],j=D[1];return E[B]=E[j]}),E.resetProps=function(){return g.forEach(function(T){E[T.name](T.defaultVal)}),E},E.resetProps(),C._rerender=A,w&&y&&E(y),E}}var _e=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 jF=/^\s+/,MF=/\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=RF(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=ZC(n),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var n=ox(this._r,this._g,this._b);return{h:n.h*360,s:n.s,v:n.v,a:this._a}},toHsvString:function(){var n=ox(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=rx(this._r,this._g,this._b);return{h:n.h*360,s:n.s,l:n.l,a:this._a}},toHslString:function(){var n=rx(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 ix(this._r,this._g,this._b,n)},toHexString:function(n){return"#"+this.toHex(n)},toHex8:function(n){return OF(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:YF[ix(this._r,this._g,this._b,!0)]||!1},toFilter:function(n){var r="#"+sx(this._r,this._g,this._b,this._a),o=r,i=this._gradientType?"GradientType = 1, ":"";if(n){var s=le(n);o="#"+sx(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(zF,arguments)},brighten:function(){return this._applyModification(FF,arguments)},darken:function(){return this._applyModification(BF,arguments)},desaturate:function(){return this._applyModification($F,arguments)},saturate:function(){return this._applyModification(DF,arguments)},greyscale:function(){return this._applyModification(LF,arguments)},spin:function(){return this._applyModification(HF,arguments)},_applyCombination:function(n,r){return n.apply(null,[this].concat([].slice.call(r)))},analogous:function(){return this._applyCombination(WF,arguments)},complement:function(){return this._applyCombination(UF,arguments)},monochromatic:function(){return this._applyCombination(GF,arguments)},splitcomplement:function(){return this._applyCombination(VF,arguments)},triad:function(){return this._applyCombination(ax,[3])},tetrad:function(){return this._applyCombination(ax,[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]=Ds(e[o]));e=r}return le(e,n)};function RF(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=QF(e)),wu(e)=="object"&&(Fn(e.r)&&Fn(e.g)&&Fn(e.b)?(n=AF(e.r,e.g,e.b),a=!0,l=String(e.r).substr(-1)==="%"?"prgb":"rgb"):Fn(e.h)&&Fn(e.s)&&Fn(e.v)?(o=Ds(e.s),i=Ds(e.v),n=IF(e.h,o,i),a=!0,l="hsv"):Fn(e.h)&&Fn(e.s)&&Fn(e.l)&&(o=Ds(e.s),s=Ds(e.l),n=TF(e.h,o,s),a=!0,l="hsl"),e.hasOwnProperty("a")&&(r=e.a)),r=ZC(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 AF(e,n,r){return{r:Me(e,255)*255,g:Me(n,255)*255,b:Me(r,255)*255}}function rx(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 TF(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 ox(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 IF(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 ix(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 OF(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(JC(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 sx(e,n,r,o){var i=[cn(JC(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 $F(e,n){n=n===0?0:n||10;var r=le(e).toHsl();return r.s-=n/100,r.s=Pd(r.s),le(r)}function DF(e,n){n=n===0?0:n||10;var r=le(e).toHsl();return r.s+=n/100,r.s=Pd(r.s),le(r)}function LF(e){return le(e).desaturate(100)}function zF(e,n){n=n===0?0:n||10;var r=le(e).toHsl();return r.l+=n/100,r.l=Pd(r.l),le(r)}function FF(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 BF(e,n){n=n===0?0:n||10;var r=le(e).toHsl();return r.l-=n/100,r.l=Pd(r.l),le(r)}function HF(e,n){var r=le(e).toHsl(),o=(r.h+n)%360;return r.h=o<0?360+o:o,le(r)}function UF(e){var n=le(e).toHsl();return n.h=(n.h+180)%360,le(n)}function ax(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 VF(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 WF(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 GF(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=ZF(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 _p=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"},YF=le.hexNames=XF(_p);function XF(e){var n={};for(var r in e)e.hasOwnProperty(r)&&(n[e[r]]=r);return n}function ZC(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function Me(e,n){KF(e)&&(e="100%");var r=qF(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 Pd(e){return Math.min(1,Math.max(0,e))}function Pt(e){return parseInt(e,16)}function KF(e){return typeof e=="string"&&e.indexOf(".")!=-1&&parseFloat(e)===1}function qF(e){return typeof e=="string"&&e.indexOf("%")!=-1}function cn(e){return e.length==1?"0"+e:""+e}function Ds(e){return e<=1&&(e=e*100+"%"),e}function JC(e){return Math.round(parseFloat(e)*255).toString(16)}function lx(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 Fn(e){return!!tn.CSS_UNIT.exec(e)}function QF(e){e=e.replace(jF,"").replace(MF,"").toLowerCase();var n=!1;if(_p[e])e=_p[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:lx(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:lx(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 ZF(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 Sp(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 JF(e){if(Array.isArray(e))return Sp(e)}function eN(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 e7(e,n){if(n.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function t7(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function Ft(e,n){return e.get(eN(e,n))}function cx(e,n,r){e7(e,n),n.set(e,r)}function ux(e,n,r){return e.set(eN(e,n),r),r}function n7(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,l7(o.key),o)}}function r7(e,n,r){return n&&n7(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function o7(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function i7(){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 s7(e){return JF(e)||o7(e)||c7(e)||i7()}function a7(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 l7(e){var n=a7(e,"string");return typeof n=="symbol"?n:n+""}function c7(e,n){if(e){if(typeof e=="string")return Sp(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)?Sp(e,n):void 0}}var u7=123,d7=function(n){return"#".concat(Math.min(n,Math.pow(2,24)).toString(16).padStart(6,"0"))},tN=function(n,r,o){return(n<<16)+(r<<8)+o},f7=function(n){var r=le(n).toRgb(),o=r.r,i=r.g,s=r.b;return tN(o,i,s)},dx=function(n,r){return n*u7%Math.pow(2,r)},co=new WeakMap,Bn=new WeakMap,h7=function(){function e(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:6;t7(this,e),cx(this,co,void 0),cx(this,Bn,void 0),ux(Bn,this,n),this.reset()}return r7(e,[{key:"reset",value:function(){ux(co,this,["__reserved for background__"])}},{key:"register",value:function(r){if(Ft(co,this).length>=Math.pow(2,24-Ft(Bn,this)))return null;var o=Ft(co,this).length,i=dx(o,Ft(Bn,this)),s=d7(o+(i<<24-Ft(Bn,this)));return Ft(co,this).push(r),s}},{key:"lookup",value:function(r){if(!r)return null;var o=typeof r=="string"?f7(r):tN.apply(void 0,s7(r));if(!o)return null;var i=o&Math.pow(2,24-Ft(Bn,this))-1,s=o>>24-Ft(Bn,this)&Math.pow(2,Ft(Bn,this))-1;return dx(i,Ft(Bn,this))!==s||i>=Ft(co,this).length?null:Ft(co,this)[i]}}])}(),Za,Ae,nN,rN,kr,fx,oN,iN,zf,kc,Xs,sN,Dg,kp,Cp,bu={},_u=[],p7=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,jd=Array.isArray;function En(e,n){for(var r in n)e[r]=n[r];return e}function Lg(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function m7(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?Za.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 Ks(e,a,o,i,null)}function Ks(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??++nN,__i:-1,__u:0};return i==null&&Ae.vnode!=null&&Ae.vnode(s),s}function Md(e){return e.children}function Cc(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 g7(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),zg(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,uN(o,s,i),n.__e=n.__=null,s.__e!=r&&aN(s)}}function aN(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}),aN(e)}function hx(e){(!e.__d&&(e.__d=!0)&&kr.push(e)&&!Su.__r++||fx!=Ae.debounceRendering)&&((fx=Ae.debounceRendering)||oN)(Su)}function Su(){try{for(var e,n=1;kr.length;)kr.length>n&&kr.sort(iN),e=kr.shift(),n=kr.length,g7(e)}finally{kr.length=Su.__r=0}}function lN(e,n,r,o,i,s,a,l,c,u,f){var d,h,g,v,b,_,m,w=o&&o.__k||_u,y=n.length;for(c=v7(r,n,w,c,y),d=0;d<y;d++)(g=r.__k[d])!=null&&(h=g.__i!=-1&&w[g.__i]||bu,g.__i=d,_=zg(e,g,h,i,s,a,l,c,u,f),v=g.__e,g.ref&&h.ref!=g.ref&&(h.ref&&Fg(h.ref,null,g),f.push(g.ref,g.__c||v,g)),b==null&&v!=null&&(b=v),(m=!!(4&g.__u))||h.__k===g.__k?(c=cN(g,c,e,m),m&&h.__e&&(h.__e=null)):typeof g.type=="function"&&_!==void 0?c=_:v&&(c=v.nextSibling),g.__u&=-7);return r.__e=b,c}function v7(e,n,r,o,i){var s,a,l,c,u,f=r.length,d=f,h=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]=Ks(null,a,null,null,null):jd(a)?a=e.__k[s]=Ks(Md,{children:a},null,null,null):a.constructor===void 0&&a.__b>0?a=e.__k[s]=Ks(a.type,a.props,a.key,a.ref?a.ref:null,a.__v):e.__k[s]=a,c=s+h,a.__=e,a.__b=e.__b+1,l=null,(u=a.__i=y7(a,r,c,d))!=-1&&(d--,(l=r[u])&&(l.__u|=2)),l==null||l.__v==null?(u==-1&&(i>f?h--:i<f&&h++),typeof a.type!="function"&&(a.__u|=4)):u!=c&&(u==c-1?h--:u==c+1?h++:(u>c?h--:h++,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)),fN(l,l));return o}function cN(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=cN(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 y7(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 px(e,n,r){n[0]=="-"?e.setProperty(n,r??""):e[n]=r==null?"":typeof r!="number"||p7.test(n)?r:r+"px"}function Wl(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||px(e.style,n,"");if(r)for(n in r)o&&r[n]==o[n]||px(e.style,n,r[n])}else if(n[0]=="o"&&n[1]=="n")s=n!=(n=n.replace(sN,"$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[Xs]=o[Xs]:(r[Xs]=Dg,e.addEventListener(n,s?Cp:kp,s)):e.removeEventListener(n,s?Cp:kp,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 mx(e){return function(n){if(this.l){var r=this.l[n.type+e];if(n[kc]==null)n[kc]=Dg++;else if(n[kc]<r[Xs])return;return r(Ae.event?Ae.event(n):n)}}}function zg(e,n,r,o,i,s,a,l,c,u){var f,d,h,g,v,b,_,m,w,y,S,k,C,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(m=n.props,w=P.prototype&&P.prototype.render,y=(f=P.contextType)&&o[f.__c],S=f?y?y.props.value:f.__:o,r.__c?_=(d=n.__c=r.__c).__=d.__E:(w?n.__c=d=new P(m,S):(n.__c=d=new Cc(m,S),d.constructor=P,d.render=w7),y&&y.sub(d),d.state||(d.state={}),d.__n=o,h=d.__d=!0,d.__h=[],d._sb=[]),w&&d.__s==null&&(d.__s=d.state),w&&P.getDerivedStateFromProps!=null&&(d.__s==d.state&&(d.__s=En({},d.__s)),En(d.__s,P.getDerivedStateFromProps(m,d.__s))),g=d.props,v=d.state,d.__v=n,h)w&&P.getDerivedStateFromProps==null&&d.componentWillMount!=null&&d.componentWillMount(),w&&d.componentDidMount!=null&&d.__h.push(d.componentDidMount);else{if(w&&P.getDerivedStateFromProps==null&&m!==g&&d.componentWillReceiveProps!=null&&d.componentWillReceiveProps(m,S),n.__v==r.__v||!d.__e&&d.shouldComponentUpdate!=null&&d.shouldComponentUpdate(m,d.__s,S)===!1){n.__v!=r.__v&&(d.props=m,d.state=d.__s,d.__d=!1),n.__e=r.__e,n.__k=r.__k,n.__k.some(function(A){A&&(A.__=n)}),_u.push.apply(d.__h,d._sb),d._sb=[],d.__h.length&&a.push(d);break e}d.componentWillUpdate!=null&&d.componentWillUpdate(m,d.__s,S),w&&d.componentDidUpdate!=null&&d.__h.push(function(){d.componentDidUpdate(g,v,b)})}if(d.context=S,d.props=m,d.__P=e,d.__e=!1,k=Ae.__r,C=0,w)d.state=d.__s,d.__d=!1,k&&k(n),f=d.render(d.props,d.state,d.context),_u.push.apply(d.__h,d._sb),d._sb=[];else do d.__d=!1,k&&k(n),f=d.render(d.props,d.state,d.context),d.state=d.__s;while(d.__d&&++C<25);d.state=d.__s,d.getChildContext!=null&&(o=En(En({},o),d.getChildContext())),w&&!h&&d.getSnapshotBeforeUpdate!=null&&(b=d.getSnapshotBeforeUpdate(g,v)),N=f!=null&&f.type===Md&&f.key==null?dN(f.props.children):f,l=lN(e,jd(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(A){if(n.__v=null,c||s!=null)if(A.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--;)Lg(s[E]);Np(n)}else n.__e=r.__e,n.__k=r.__k,A.then||Np(n);Ae.__e(A,n,r)}else s==null&&n.__v==r.__v?(n.__k=r.__k,n.__e=r.__e):l=n.__e=x7(r.__e,n,r,o,i,s,a,c,u);return(f=Ae.diffed)&&f(n),128&n.__u?void 0:l}function Np(e){e&&(e.__c&&(e.__c.__e=!0),e.__k&&e.__k.some(Np))}function uN(e,n,r){for(var o=0;o<r.length;o++)Fg(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 dN(e){return typeof e!="object"||e==null||e.__b>0?e:jd(e)?e.map(dN):En({},e)}function x7(e,n,r,o,i,s,a,l,c){var u,f,d,h,g,v,b,_=r.props||bu,m=n.props,w=n.type;if(w=="svg"?i="http://www.w3.org/2000/svg":w=="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==!!w&&(w?g.localName==w:g.nodeType==3)){e=g,s[u]=null;break}}if(e==null){if(w==null)return document.createTextNode(m);e=document.createElementNS(i,w,m.is&&m),l&&(Ae.__m&&Ae.__m(n,s),l=!1),s=null}if(w==null)_===m||l&&e.data==m||(e.data=m);else{if(s=s&&Za.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 m||u=="value"&&"defaultValue"in m||u=="checked"&&"defaultChecked"in m||Wl(e,u,null,g,i);for(u in m)g=m[u],u=="children"?h=g:u=="dangerouslySetInnerHTML"?f=g:u=="value"?v=g:u=="checked"?b=g:l&&typeof g!="function"||_[u]===g||Wl(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=""),lN(n.type=="template"?e.content:e,jd(h)?h:[h],n,r,o,w=="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--;)Lg(s[u]);l||(u="value",w=="progress"&&v==null?e.removeAttribute("value"):v!=null&&(v!==e[u]||w=="progress"&&!v||w=="option"&&v!=_[u])&&Wl(e,u,v,_[u],i),u="checked",b!=null&&b!=e[u]&&Wl(e,u,b,_[u],i))}return e}function Fg(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 fN(e,n,r){var o,i;if(Ae.unmount&&Ae.unmount(e),(o=e.ref)&&(o.current&&o.current!=e.__e||Fg(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]&&fN(o[i],n,r||typeof e.type!="function");r||Lg(e.__e),e.__c=e.__=e.__e=void 0}function w7(e,n,r){return this.constructor(e,r)}function b7(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=[],zg(n,e=n.__k=m7(Md,null,[e]),i||bu,bu,n.namespaceURI,i?null:n.firstChild?Za.call(n.childNodes):null,s,i?i.__e:n.firstChild,o,a),uN(s,e,a)}function hN(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?Za.call(arguments,2):r),Ks(e.type,l,o||e.key,i||e.ref,null)}Za=_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}},nN=0,rN=function(e){return e!=null&&e.constructor===void 0},Cc.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),hx(this))},Cc.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),hx(this))},Cc.prototype.render=Md,kr=[],oN=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,iN=function(e,n){return e.__v.__b-n.__v.__b},Su.__r=0,zf=Math.random().toString(8),kc="__d"+zf,Xs="__a"+zf,sN=/(PointerCapture)$|Capture$/i,Dg=0,kp=mx(!1),Cp=mx(!0);function gx(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 _7(e){if(Array.isArray(e))return e}function S7(e,n,r){return(n=j7(n))in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}function k7(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 C7(){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 vx(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 N7(e){for(var n=1;n<arguments.length;n++){var r=arguments[n]!=null?arguments[n]:{};n%2?vx(Object(r),!0).forEach(function(o){S7(e,o,r[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):vx(Object(r)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(r,o))})}return e}function E7(e,n){return _7(e)||k7(e,n)||M7(e,n)||C7()}function P7(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 j7(e){var n=P7(e,"string");return typeof n=="symbol"?n:n+""}function ku(e){"@babel/helpers - typeof";return ku=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},ku(e)}function M7(e,n){if(e){if(typeof e=="string")return gx(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)?gx(e,n):void 0}}var Ep=function(n){if(ku(n)!=="object")return n;var r=hN(n);if(r.props){var o;r.props=N7({},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(Ep):Ep(r.props.children))}return r},R7=function(n){return rN(hN(n))},A7=function(n,r){delete r.__k,b7(Ep(n),r)};function T7(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 I7=`.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
- `;T7(I7);var O7=$g({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&&ku(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=E7(u,2),d=f[0],h=f[1];return r.tooltipEl.style(d,h)}),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=Ut(u),d=l.node(),h=d.offsetWidth,g=d.offsetHeight,v=[r.offsetX===null||r.offsetX===void 0?"-".concat(f[0]/h*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):R7(n.content)?(n.tooltipEl.text(""),A7(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 $7(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 D7(e){const n=+this._x.call(null,e);return pN(this.cover(n),n,e)}function pN(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,h;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)==(h=+(u>=c)));return o[h]=i,o[d]=s,e}function L7(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)pN(this,r[s],e[s]);return this}function z7(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 F7(){var e=[];return this.visit(function(n){if(!n.length)do e.push(n.data);while(n=n.next)}),e}function B7(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 H7(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 h=Math.abs(e-+this._x.call(null,c.data));h<n&&(n=h,o=e-h,a=e+h,r=c.data)}return r}function U7(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,h;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,h=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[h]=r:this._root=r),this):(this._root=s,this)}function V7(e){for(var n=0,r=e.length;n<r;++n)this.remove(e[n]);return this}function W7(){return this._root}function G7(){var e=0;return this.visit(function(n){if(!n.length)do++e;while(n=n.next)}),e}function Y7(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 X7(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 K7(e){return e[0]}function q7(e){return arguments.length?(this._x=e,this):this._x}function mN(e,n){var r=new Bg(n??K7,NaN,NaN);return e==null?r:r.addAll(e)}function Bg(e,n,r){this._x=e,this._x0=n,this._x1=r,this._root=void 0}function yx(e){for(var n={data:e.data},r=n;e=e.next;)r=r.next={data:e.data};return n}var Ct=mN.prototype=Bg.prototype;Ct.copy=function(){var e=new Bg(this._x,this._x0,this._x1),n=this._root,r,o;if(!n)return e;if(!n.length)return e._root=yx(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]=yx(o));return e};Ct.add=D7;Ct.addAll=L7;Ct.cover=z7;Ct.data=F7;Ct.extent=B7;Ct.find=H7;Ct.remove=U7;Ct.removeAll=V7;Ct.root=W7;Ct.size=G7;Ct.visit=Y7;Ct.visitAfter=X7;Ct.x=q7;function Q7(e){const n=+this._x.call(null,e),r=+this._y.call(null,e);return gN(this.cover(n,r),n,r,e)}function gN(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,h,g,v,b,_,m,w;if(!s)return e._root=a,e;for(;s.length;)if((b=n>=(d=(l+u)/2))?l=d:u=d,(_=r>=(h=(c+f)/2))?c=h:f=h,i=s,!(s=s[m=_<<1|b]))return i[m]=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[m]=a:e._root=a,e;do i=i?i[m]=new Array(4):e._root=new Array(4),(b=n>=(d=(l+u)/2))?l=d:u=d,(_=r>=(h=(c+f)/2))?c=h:f=h;while((m=_<<1|b)===(w=(v>=h)<<1|g>=d));return i[w]=s,i[m]=a,e}function Z7(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)gN(this,a[r],l[r],e[r]);return this}function J7(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 eB(){var e=[];return this.visit(function(n){if(!n.length)do e.push(n.data);while(n=n.next)}),e}function tB(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 nB(e,n,r){var o,i=this._x0,s=this._y0,a,l,c,u,f=this._x1,d=this._y1,h=[],g=this._root,v,b;for(g&&h.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=h.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,m=(l+u)/2;h.push(new ct(g[3],_,m,c,u),new ct(g[2],a,m,_,u),new ct(g[1],_,l,c,m),new ct(g[0],a,l,_,m)),(b=(n>=m)<<1|e>=_)&&(v=h[h.length-1],h[h.length-1]=h[h.length-1-b],h[h.length-1-b]=v)}else{var w=e-+this._x.call(null,g.data),y=n-+this._y.call(null,g.data),S=w*w+y*y;if(S<r){var k=Math.sqrt(r=S);i=e-k,s=n-k,f=e+k,d=n+k,o=g.data}}return o}function rB(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,h,g,v,b,_,m;if(!r)return this;if(r.length)for(;;){if((v=f>=(h=(a+c)/2))?a=h:c=h,(b=d>=(g=(l+u)/2))?l=g:u=g,n=r,!(r=r[_=b<<1|v]))return this;if(!r.length)break;(n[_+1&3]||n[_+2&3]||n[_+3&3])&&(o=n,m=_)}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[m]=r:this._root=r),this):(this._root=s,this)}function oB(e){for(var n=0,r=e.length;n<r;++n)this.remove(e[n]);return this}function iB(){return this._root}function sB(){var e=0;return this.visit(function(n){if(!n.length)do++e;while(n=n.next)}),e}function aB(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 lB(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 cB(e){return e[0]}function uB(e){return arguments.length?(this._x=e,this):this._x}function dB(e){return e[1]}function fB(e){return arguments.length?(this._y=e,this):this._y}function vN(e,n,r){var o=new Hg(n??cB,r??dB,NaN,NaN,NaN,NaN);return e==null?o:o.addAll(e)}function Hg(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 xx(e){for(var n={data:e.data},r=n;e=e.next;)r=r.next={data:e.data};return n}var pt=vN.prototype=Hg.prototype;pt.copy=function(){var e=new Hg(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=xx(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]=xx(o));return e};pt.add=Q7;pt.addAll=Z7;pt.cover=J7;pt.data=eB;pt.extent=tB;pt.find=nB;pt.remove=rB;pt.removeAll=oB;pt.root=iB;pt.size=sB;pt.visit=aB;pt.visitAfter=lB;pt.x=uB;pt.y=fB;function hB(e){const n=+this._x.call(null,e),r=+this._y.call(null,e),o=+this._z.call(null,e);return yN(this.cover(n,r,o),n,r,o,e)}function yN(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,h=e._y1,g=e._z1,v,b,_,m,w,y,S,k,C,N,E;if(!a)return e._root=l,e;for(;a.length;)if((S=n>=(v=(c+d)/2))?c=v:d=v,(k=r>=(b=(u+h)/2))?u=b:h=b,(C=o>=(_=(f+g)/2))?f=_:g=_,s=a,!(a=a[N=C<<2|k<<1|S]))return s[N]=l,e;if(m=+e._x.call(null,a.data),w=+e._y.call(null,a.data),y=+e._z.call(null,a.data),n===m&&r===w&&o===y)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,(k=r>=(b=(u+h)/2))?u=b:h=b,(C=o>=(_=(f+g)/2))?f=_:g=_;while((N=C<<2|k<<1|S)===(E=(y>=_)<<2|(w>=b)<<1|m>=v));return s[E]=a,s[N]=l,e}function pB(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,h,g,v,b;d<n;++d)isNaN(g=+this._x.call(null,h=e[d]))||isNaN(v=+this._y.call(null,h))||isNaN(b=+this._z.call(null,h))||(r[d]=g,o[d]=v,i[d]=b,g<s&&(s=g),g>c&&(c=g),v<a&&(a=v),v>u&&(u=v),b<l&&(l=b),b>f&&(f=b));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)yN(this,r[d],o[d],i[d],e[d]);return this}function mB(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,h;o>e||e>=a||i>n||n>=l||s>r||r>=c;)switch(h=(r<s)<<2|(n<i)<<1|e<o,d=new Array(8),d[h]=f,f=d,u*=2,h){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 gB(){var e=[];return this.visit(function(n){if(!n.length)do e.push(n.data);while(n=n.next)}),e}function vB(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 ke(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 yB(e,n,r,o){var i,s=this._x0,a=this._y0,l=this._z0,c,u,f,d,h,g,v=this._x1,b=this._y1,_=this._z1,m=[],w=this._root,y,S;for(w&&m.push(new ke(w,s,a,l,v,b,_)),o==null?o=1/0:(s=e-o,a=n-o,l=r-o,v=e+o,b=n+o,_=r+o,o*=o);y=m.pop();)if(!(!(w=y.node)||(c=y.x0)>v||(u=y.y0)>b||(f=y.z0)>_||(d=y.x1)<s||(h=y.y1)<a||(g=y.z1)<l))if(w.length){var k=(c+d)/2,C=(u+h)/2,N=(f+g)/2;m.push(new ke(w[7],k,C,N,d,h,g),new ke(w[6],c,C,N,k,h,g),new ke(w[5],k,u,N,d,C,g),new ke(w[4],c,u,N,k,C,g),new ke(w[3],k,C,f,d,h,N),new ke(w[2],c,C,f,k,h,N),new ke(w[1],k,u,f,d,C,N),new ke(w[0],c,u,f,k,C,N)),(S=(r>=N)<<2|(n>=C)<<1|e>=k)&&(y=m[m.length-1],m[m.length-1]=m[m.length-1-S],m[m.length-1-S]=y)}else{var E=e-+this._x.call(null,w.data),P=n-+this._y.call(null,w.data),A=r-+this._z.call(null,w.data),T=E*E+P*P+A*A;if(T<o){var D=Math.sqrt(o=T);s=e-D,a=n-D,l=r-D,v=e+D,b=n+D,_=r+D,i=w.data}}return i}const xB=(e,n,r,o,i,s)=>Math.sqrt((e-o)**2+(n-i)**2+(r-s)**2);function wB(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,h,g,v,b,_,m)=>{if(!d.length)do{const w=d.data;xB(e,n,r,this._x(w),this._y(w),this._z(w))<=o&&i.push(w)}while(d=d.next);return h>c||g>u||v>f||b<s||_<a||m<l}),i}function bB(e){if(isNaN(h=+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,h,g,v,b,_,m,w,y,S,k,C;if(!r)return this;if(r.length)for(;;){if((w=h>=(b=(a+u)/2))?a=b:u=b,(y=g>=(_=(l+f)/2))?l=_:f=_,(S=v>=(m=(c+d)/2))?c=m:d=m,n=r,!(r=r[k=S<<2|y<<1|w]))return this;if(!r.length)break;(n[k+1&7]||n[k+2&7]||n[k+3&7]||n[k+4&7]||n[k+5&7]||n[k+6&7]||n[k+7&7])&&(o=n,C=k)}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[k]=s:delete n[k],(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[C]=r:this._root=r),this):(this._root=s,this)}function _B(e){for(var n=0,r=e.length;n<r;++n)this.remove(e[n]);return this}function SB(){return this._root}function kB(){var e=0;return this.visit(function(n){if(!n.length)do++e;while(n=n.next)}),e}function CB(e){var n=[],r,o=this._root,i,s,a,l,c,u,f;for(o&&n.push(new ke(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,h=(a+u)/2,g=(l+f)/2;(i=o[7])&&n.push(new ke(i,d,h,g,c,u,f)),(i=o[6])&&n.push(new ke(i,s,h,g,d,u,f)),(i=o[5])&&n.push(new ke(i,d,a,g,c,h,f)),(i=o[4])&&n.push(new ke(i,s,a,g,d,h,f)),(i=o[3])&&n.push(new ke(i,d,h,l,c,u,g)),(i=o[2])&&n.push(new ke(i,s,h,l,d,u,g)),(i=o[1])&&n.push(new ke(i,d,a,l,c,h,g)),(i=o[0])&&n.push(new ke(i,s,a,l,d,h,g))}return this}function NB(e){var n=[],r=[],o;for(this._root&&n.push(new ke(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,h=(a+u)/2,g=(l+f)/2,v=(c+d)/2;(s=i[0])&&n.push(new ke(s,a,l,c,h,g,v)),(s=i[1])&&n.push(new ke(s,h,l,c,u,g,v)),(s=i[2])&&n.push(new ke(s,a,g,c,h,f,v)),(s=i[3])&&n.push(new ke(s,h,g,c,u,f,v)),(s=i[4])&&n.push(new ke(s,a,l,v,h,g,d)),(s=i[5])&&n.push(new ke(s,h,l,v,u,g,d)),(s=i[6])&&n.push(new ke(s,a,g,v,h,f,d)),(s=i[7])&&n.push(new ke(s,h,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 EB(e){return e[0]}function PB(e){return arguments.length?(this._x=e,this):this._x}function jB(e){return e[1]}function MB(e){return arguments.length?(this._y=e,this):this._y}function RB(e){return e[2]}function AB(e){return arguments.length?(this._z=e,this):this._z}function xN(e,n,r,o){var i=new Ug(n??EB,r??jB,o??RB,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 wx(e){for(var n={data:e.data},r=n;e=e.next;)r=r.next={data:e.data};return n}var et=xN.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=wx(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]=wx(o));return e};et.add=hB;et.addAll=pB;et.cover=mB;et.data=gB;et.extent=vB;et.find=yB;et.findAllWithinRadius=wB;et.remove=bB;et.removeAll=_B;et.root=SB;et.size=kB;et.visit=CB;et.visitAfter=NB;et.x=PB;et.y=MB;et.z=AB;function qn(e){return function(){return e}}function Gn(e){return(e()-.5)*1e-6}function TB(e){return e.index}function bx(e,n){var r=e.get(n);if(!r)throw new Error("node not found: "+n);return r}function IB(e){var n=TB,r=h,o,i=qn(30),s,a,l,c,u,f,d=1;e==null&&(e=[]);function h(m){return 1/Math.min(c[m.source.index],c[m.target.index])}function g(m){for(var w=0,y=e.length;w<d;++w)for(var S=0,k,C,N,E=0,P=0,A=0,T,D;S<y;++S)k=e[S],C=k.source,N=k.target,E=N.x+N.vx-C.x-C.vx||Gn(f),l>1&&(P=N.y+N.vy-C.y-C.vy||Gn(f)),l>2&&(A=N.z+N.vz-C.z-C.vz||Gn(f)),T=Math.sqrt(E*E+P*P+A*A),T=(T-s[S])/T*m*o[S],E*=T,P*=T,A*=T,N.vx-=E*(D=u[S]),l>1&&(N.vy-=P*D),l>2&&(N.vz-=A*D),C.vx+=E*(D=1-D),l>1&&(C.vy+=P*D),l>2&&(C.vz+=A*D)}function v(){if(a){var m,w=a.length,y=e.length,S=new Map(a.map((C,N)=>[n(C,N,a),C])),k;for(m=0,c=new Array(w);m<y;++m)k=e[m],k.index=m,typeof k.source!="object"&&(k.source=bx(S,k.source)),typeof k.target!="object"&&(k.target=bx(S,k.target)),c[k.source.index]=(c[k.source.index]||0)+1,c[k.target.index]=(c[k.target.index]||0)+1;for(m=0,u=new Array(y);m<y;++m)k=e[m],u[m]=c[k.source.index]/(c[k.source.index]+c[k.target.index]);o=new Array(y),b(),s=new Array(y),_()}}function b(){if(a)for(var m=0,w=e.length;m<w;++m)o[m]=+r(e[m],m,e)}function _(){if(a)for(var m=0,w=e.length;m<w;++m)s[m]=+i(e[m],m,e)}return g.initialize=function(m,...w){a=m,f=w.find(y=>typeof y=="function")||Math.random,l=w.find(y=>[1,2,3].includes(y))||2,v()},g.links=function(m){return arguments.length?(e=m,v(),g):e},g.id=function(m){return arguments.length?(n=m,g):n},g.iterations=function(m){return arguments.length?(d=+m,g):d},g.strength=function(m){return arguments.length?(r=typeof m=="function"?m:qn(+m),b(),g):r},g.distance=function(m){return arguments.length?(i=typeof m=="function"?m:qn(+m),_(),g):i},g}const OB=1664525,$B=1013904223,_x=4294967296;function DB(){let e=1;return()=>(e=(OB*e+$B)%_x)/_x}var Sx=3;function Ff(e){return e.x}function kx(e){return e.y}function LB(e){return e.z}var zB=10,FB=Math.PI*(3-Math.sqrt(5)),BB=Math.PI*20/(9+Math.sqrt(221));function HB(e,n){n=n||2;var r=Math.min(Sx,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=Ag(g),d=qa("tick","end"),h=DB();e==null&&(e=[]);function g(){v(),d.call("tick",o),i<s&&(f.stop(),d.call("end",o))}function v(m){var w,y=e.length,S;m===void 0&&(m=1);for(var k=0;k<m;++k)for(i+=(l-i)*a,u.forEach(function(C){C(i)}),w=0;w<y;++w)S=e[w],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 b(){for(var m=0,w=e.length,y;m<w;++m){if(y=e[m],y.index=m,y.fx!=null&&(y.x=y.fx),y.fy!=null&&(y.y=y.fy),y.fz!=null&&(y.z=y.fz),isNaN(y.x)||r>1&&isNaN(y.y)||r>2&&isNaN(y.z)){var S=zB*(r>2?Math.cbrt(.5+m):r>1?Math.sqrt(.5+m):m),k=m*FB,C=m*BB;r===1?y.x=S:r===2?(y.x=S*Math.cos(k),y.y=S*Math.sin(k)):(y.x=S*Math.sin(k)*Math.cos(C),y.y=S*Math.cos(k),y.z=S*Math.sin(k)*Math.sin(C))}(isNaN(y.vx)||r>1&&isNaN(y.vy)||r>2&&isNaN(y.vz))&&(y.vx=0,r>1&&(y.vy=0),r>2&&(y.vz=0))}}function _(m){return m.initialize&&m.initialize(e,h,r),m}return b(),o={tick:v,restart:function(){return f.restart(g),o},stop:function(){return f.stop(),o},numDimensions:function(m){return arguments.length?(r=Math.min(Sx,Math.max(1,Math.round(m))),u.forEach(_),o):r},nodes:function(m){return arguments.length?(e=m,b(),u.forEach(_),o):e},alpha:function(m){return arguments.length?(i=+m,o):i},alphaMin:function(m){return arguments.length?(s=+m,o):s},alphaDecay:function(m){return arguments.length?(a=+m,o):+a},alphaTarget:function(m){return arguments.length?(l=+m,o):l},velocityDecay:function(m){return arguments.length?(c=1-m,o):1-c},randomSource:function(m){return arguments.length?(h=m,u.forEach(_),o):h},force:function(m,w){return arguments.length>1?(w==null?u.delete(m):u.set(m,_(w)),o):u.get(m)},find:function(){var m=Array.prototype.slice.call(arguments),w=m.shift()||0,y=(r>1?m.shift():null)||0,S=(r>2?m.shift():null)||0,k=m.shift()||1/0,C=0,N=e.length,E,P,A,T,D,B;for(k*=k,C=0;C<N;++C)D=e[C],E=w-D.x,P=y-(D.y||0),A=S-(D.z||0),T=E*E+P*P+A*A,T<k&&(B=D,k=T);return B},on:function(m,w){return arguments.length>1?(d.on(m,w),o):d.on(m)}}}function UB(){var e,n,r,o,i,s=qn(-30),a,l=1,c=1/0,u=.81;function f(v){var b,_=e.length,m=(n===1?mN(e,Ff):n===2?vN(e,Ff,kx):n===3?xN(e,Ff,kx,LB):null).visitAfter(h);for(i=v,b=0;b<_;++b)r=e[b],m.visit(g)}function d(){if(e){var v,b=e.length,_;for(a=new Array(b),v=0;v<b;++v)_=e[v],a[_.index]=+s(_,v,e)}}function h(v){var b=0,_,m,w=0,y,S,k,C,N=v.length;if(N){for(y=S=k=C=0;C<N;++C)(_=v[C])&&(m=Math.abs(_.value))&&(b+=_.value,w+=m,y+=m*(_.x||0),S+=m*(_.y||0),k+=m*(_.z||0));b*=Math.sqrt(4/N),v.x=y/w,n>1&&(v.y=S/w),n>2&&(v.z=k/w)}else{_=v,_.x=_.data.x,n>1&&(_.y=_.data.y),n>2&&(_.z=_.data.z);do b+=a[_.data.index];while(_=_.next)}v.value=b}function g(v,b,_,m,w){if(!v.value)return!0;var y=[_,m,w][n-1],S=v.x-r.x,k=n>1?v.y-r.y:0,C=n>2?v.z-r.z:0,N=y-b,E=S*S+k*k+C*C;if(N*N/u<E)return E<c&&(S===0&&(S=Gn(o),E+=S*S),n>1&&k===0&&(k=Gn(o),E+=k*k),n>2&&C===0&&(C=Gn(o),E+=C*C),E<l&&(E=Math.sqrt(l*E)),r.vx+=S*v.value*i/E,n>1&&(r.vy+=k*v.value*i/E),n>2&&(r.vz+=C*v.value*i/E)),!0;if(v.length||E>=c)return;(v.data!==r||v.next)&&(S===0&&(S=Gn(o),E+=S*S),n>1&&k===0&&(k=Gn(o),E+=k*k),n>2&&C===0&&(C=Gn(o),E+=C*C),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+=k*N),n>2&&(r.vz+=C*N));while(v=v.next)}return f.initialize=function(v,...b){e=v,o=b.find(_=>typeof _=="function")||Math.random,n=b.find(_=>[1,2,3].includes(_))||2,d()},f.strength=function(v){return arguments.length?(s=typeof v=="function"?v:qn(+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 VB(e,n,r,o){var i,s,a=qn(.1),l,c;typeof e!="function"&&(e=qn(+e)),n==null&&(n=0),r==null&&(r=0),o==null&&(o=0);function u(d){for(var h=0,g=i.length;h<g;++h){var v=i[h],b=v.x-n||1e-6,_=(v.y||0)-r||1e-6,m=(v.z||0)-o||1e-6,w=Math.sqrt(b*b+_*_+m*m),y=(c[h]-w)*l[h]*d/w;v.vx+=b*y,s>1&&(v.vy+=_*y),s>2&&(v.vz+=m*y)}}function f(){if(i){var d,h=i.length;for(l=new Array(h),c=new Array(h),d=0;d<h;++d)c[d]=+e(i[d],d,i),l[d]=isNaN(c[d])?0:+a(i[d],d,i)}}return u.initialize=function(d,...h){i=d,s=h.find(g=>[1,2,3].includes(g))||2,f()},u.strength=function(d){return arguments.length?(a=typeof d=="function"?d:qn(+d),f(),u):a},u.radius=function(d){return arguments.length?(e=typeof d=="function"?d:qn(+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:_s,cos:Hn,sin:Qo,acos:WB,atan2:Ss,sqrt:vr,pow:Bt}=Math;function ks(e){return e<0?-Bt(-e,1/3):Bt(e,1/3)}const wN=Math.PI,Gl=2*wN,yr=wN/2,GB=1e-6,Bf=Number.MAX_SAFE_INTEGER||9007199254740991,Hf=Number.MIN_SAFE_INTEGER||-9007199254740991,YB={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),vr(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,h=0;o===2?(s=[s[0],s[1],s[2],YB],u=l,f=i*e*2,d=c):o===3&&(u=l*i,f=l*e*3,d=i*c*3,h=e*c);const g={x:u*s[0].x+f*s[1].x+d*s[2].x+h*s[3].x,y:u*s[0].y+f*s[1].y+d*s[2].y+h*s[3].y,t:e};return r&&(g.z=u*s[0].z+f*s[1].z+d*s[2].z+h*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 _s(e-n)<=(r||GB)},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 Ss(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 vr(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 _s(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=-Ss(n.p2.y-o,n.p2.x-r),s=function(a){return{x:(a.x-r)*Hn(i)-(a.y-o)*Qo(i),y:(a.x-r)*Qo(i)+(a.y-o)*Hn(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,A=N-2*E+P;if(A!==0){const T=-vr(E*E-N*P),D=-N+E,B=-(T+D)/A,j=-(-T+D)/A;return[B,j].filter(i)}else if(E!==P&&A===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,h=s;if(ee.approximately(u,0)){if(ee.approximately(f,0))return ee.approximately(d,0)?[]:[-h/d].filter(i);const N=vr(d*d-4*f*h),E=2*f;return[(N-d)/E,(-d-N)/E].filter(i)}f/=u,d/=u,h/=u;const g=(3*d-f*f)/3,v=g/3,b=(2*f*f*f-9*f*d+27*h)/27,_=b/2,m=_*_+v*v*v;let w,y,S,k,C;if(m<0){const N=-g/3,E=N*N*N,P=vr(E),A=-b/(2*P),T=A<-1?-1:A>1?1:A,D=WB(T),B=ks(P),j=2*B;return S=j*Hn(D/3)-f/3,k=j*Hn((D+Gl)/3)-f/3,C=j*Hn((D+2*Gl)/3)-f/3,[S,k,C].filter(i)}else{if(m===0)return w=_<0?ks(-_):-ks(_),S=2*w-f/3,k=-w-f/3,[S,k].filter(i);{const N=vr(m);return w=ks(-_+N),y=ks(_+N),[w-y-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=-vr(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),h=ee.compute(e,r),g=d.x*d.x+d.y*d.y;if(o?(s=vr(Bt(d.y*h.z-h.y*d.z,2)+Bt(d.z*h.x-h.z*d.x,2)+Bt(d.x*h.y-h.x*d.y,2)),a=Bt(g+d.z*d.z,3/2)):(s=d.x*h.y-d.y*h.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,b=ee.curvature(e+.001,n,r,o,!0).k;c=(b-u+(u-v))/2,l=(_s(b-u)+_s(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 h=-c/l;if(0<=h&&h<=1)return[h]}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(h){return 0<=h&&h<=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,_s(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,h){return f.indexOf(d)===h})),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*Hn(yr)-i*Qo(yr),c=o*Qo(yr)+i*Hn(yr),u=s*Hn(yr)-a*Qo(yr),f=s*Qo(yr)+a*Hn(yr),d=(e.x+n.x)/2,h=(e.y+n.y)/2,g=(n.x+r.x)/2,v=(n.y+r.y)/2,b=d+l,_=h+c,m=g+u,w=v+f,y=ee.lli8(d,h,b,_,g,v,m,w),S=ee.dist(y,e);let k=Ss(e.y-y.y,e.x-y.x),C=Ss(n.y-y.y,n.x-y.x),N=Ss(r.y-y.y,r.x-y.x),E;return k<N?((k>C||C>N)&&(k+=Gl),k>N&&(E=N,N=k,k=E)):N<C&&C<k?(E=N,N=k,k=E):N+=Gl,y.s=k,y.e=N,y.r=S,y},numberSort:function(e,n){return e-n}};class qs{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 qs(r)}}const{abs:Cs,min:Cx,max:Nx,cos:XB,sin:KB,acos:qB,sqrt:Ns}=Math,QB=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(b){typeof v[b]<"u"&&g.push(v[b])})}),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]}),h=ee.dist(l[0],l[u]);this._linear=d.reduce((g,v)=>g+Cs(v.y),0)<h/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,h=s*f,g=l*u,v=l*f,b={x:r.x-d,y:r.y-h},_={x:r.x+g,y:r.y+v},m=a.A,w={x:m.x+(b.x-m.x)/(1-i),y:m.y+(b.y-m.y)/(1-i)},y={x:m.x+(_.x-m.x)/i,y:m.y+(_.y-m.y)/i},S={x:n.x+(w.x-n.x)/i,y:n.y+(w.y-n.y)/i},k={x:o.x+(y.x-o.x)/(1-i),y:o.y+(y.y-o.y)/(1-i)};return new Pe(n,S,k,o)}static getUtils(){return ee}getUtils(){return Pe.getUtils()}static get PolyBezier(){return qs}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,h;u+=1;for(let g;f<l+c;f+=c)h=this.compute(f),g=ee.dist(n,h),g<u&&(u=g,d=f);return d=d<0?0:d>1?1:d,h=this.compute(d),h.t=d,h.d=u,h}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=Ns(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=Ns(r.x*r.x+r.y*r.y+r.z*r.z),s=Ns(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=Ns(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),Cs(qB(o))<QB/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,Cs(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 h=u[d*r]=ee.copy(s[d*r]);h.x+=(d?l:a)*c[d].n.x,h.y+=(d?l:a)*c[d].n.y}),o?([0,1].forEach(function(d){if(!(r===2&&d)){var h=s[d+1],g={x:h.x-f.x,y:h.y-f.y},v=o?o((d+1)/r):n;o&&!i&&(v=-v);var b=Ns(g.x*g.x+g.y*g.y);g.x/=b,g.y/=b,u[d+1]={x:h.x+v*g.x,y:h.y+v*g.y}}}),new Pe(u)):([0,1].forEach(d=>{if(r===2&&d)return;const h=u[d*r],g=this.derivative(d),v={x:h.x+g.x,y:h.y+g.y};u[d+1]=ee.lli4(h,v,f,s[d+1])}),new Pe(u))}outline(n,r,o,i){if(r=r===void 0?n:r,this._linear){const k=this.normal(0),C=this.points[0],N=this.points[this.points.length-1];let E,P,A;o===void 0&&(o=n,i=r),E={x:C.x+k.x*n,y:C.y+k.y*n},A={x:N.x+k.x*o,y:N.y+k.y*o},P={x:(E.x+A.x)/2,y:(E.y+A.y)/2};const T=[E,P,A];E={x:C.x-k.x*r,y:C.y-k.y*r},A={x:N.x-k.x*i,y:N.y-k.y*i},P={x:(E.x+A.x)/2,y:(E.y+A.y)/2};const D=[A,P,E],B=ee.makeline(D[2],T[0]),j=ee.makeline(T[2],D[0]),L=[B,new Pe(T),j,new Pe(D)];return new qs(L)}const s=this.reduce(),a=s.length,l=[];let c=[],u,f=0,d=this.length();const h=typeof o<"u"&&typeof i<"u";function g(k,C,N,E,P){return function(A){const T=E/N,D=(E+P)/N,B=C-k;return ee.map(A,0,1,k+T*B,k+D*B)}}s.forEach(function(k){const C=k.length();h?(l.push(k.scale(g(n,o,d,f,C))),c.push(k.scale(g(-r,-i,d,f,C)))):(l.push(k.scale(n)),c.push(k.scale(-r))),f+=C}),c=c.map(function(k){return u=k.points,u[3]?k.points=[u[3],u[2],u[1],u[0]]:k.points=[u[2],u[1],u[0]],k}).reverse();const v=l[0].points[0],b=l[a-1].points[l[a-1].points.length-1],_=c[a-1].points[c[a-1].points.length-1],m=c[0].points[0],w=ee.makeline(_,v),y=ee.makeline(b,m),S=[w].concat(l).concat([y]).concat(c);return new qs(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=Cx(n.p1.x,n.p2.x),o=Cx(n.p1.y,n.p2.y),i=Nx(n.p1.x,n.p2.x),s=Nx(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 Cs(u-c)+Cs(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,h=!1,g,v=i,b=1;do if(h=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=h&&!d,g||(b=i),d){if(i>=1){if(u.interval.end=b=1,f=u,i>1){let m={x:u.x+u.r*XB(u.e),y:u.y+u.r*KB(u.e)};u.e+=ee.angle({x:u.x,y:u.y},m,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=b}while(i<1);return r}}function Pp(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 ZB(e){if(Array.isArray(e))return e}function JB(e){if(Array.isArray(e))return Pp(e)}function eH(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function tH(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 nH(){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 rH(){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 oH(e,n){if(e==null)return{};var r,o,i=iH(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 iH(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 sH(e,n){return ZB(e)||tH(e,n)||bN(e,n)||nH()}function aH(e){return JB(e)||eH(e)||bN(e)||rH()}function lH(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 cH(e){var n=lH(e,"string");return typeof n=="symbol"?n:n+""}function bN(e,n){if(e){if(typeof e=="string")return Pp(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)?Pp(e,n):void 0}}var uH=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,h){var g=d.keyAccessor,v=d.isProp,b;if(v){var _=f,m=_[g],w=oH(_,[g].map(cH));b=m,f=w}else b=g(f,h);h+1<i.length?(u.hasOwnProperty(b)||(u[b]={}),u=u[b]):r?(u.hasOwnProperty(b)||(u[b]=[]),u[b].push(f)):u[b]=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=sH(f,2),h=d[0],g=d[1];return l(g,[].concat(aH(u),[h]))})}(s),n instanceof Array&&n.length===0&&a.length===1&&(a[0].keys=[])),a};function dH(e,n){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(n).domain(e);break}return this}const Ex=Symbol("implicit");function _N(){var e=new Xy,n=[],r=[],o=Ex;function i(s){let a=e.get(s);if(a===void 0){if(o!==Ex)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 Xy;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 _N(n,r).unknown(o)},dH.apply(i,arguments),i}function fH(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 hH=fH("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928");function pH(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 mH=`.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
- `;pH(mH);function jp(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 gH(e){if(Array.isArray(e))return e}function vH(e){if(Array.isArray(e))return jp(e)}function Px(e,n,r){if(SN())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 Ca(e,n,r){return(n=SH(n))in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}function SN(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(SN=function(){return!!e})()}function yH(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function xH(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 wH(){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 bH(){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 jx(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?jx(Object(r),!0).forEach(function(o){Ca(e,o,r[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):jx(Object(r)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(r,o))})}return e}function Qs(e,n){return gH(e)||xH(e,n)||kN(e,n)||wH()}function Gt(e){return vH(e)||yH(e)||kN(e)||bH()}function _H(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 SH(e){var n=_H(e,"string");return typeof n=="symbol"?n:n+""}function Mp(e){"@babel/helpers - typeof";return Mp=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},Mp(e)}function kN(e,n){if(e){if(typeof e=="string")return jp(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)?jp(e,n):void 0}}var kH=_N(hH);function Mx(e,n,r){!n||typeof r!="string"||e.filter(function(o){return!o[r]}).forEach(function(o){o[r]=kH(n(o))})}function CH(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,b=g.target,_=S(v),m=S(b);if(!u.hasOwnProperty(_))throw"Missing source node with id: ".concat(_);if(!u.hasOwnProperty(m))throw"Missing target node with id: ".concat(m);var w=u[_],y=u[m];w.out.push(y);function S(k){return Mp(k)==="object"?n(k):k}});var f=[];h(Object.values(u));var d=Object.assign.apply(Object,[{}].concat(Gt(Object.entries(u).filter(function(g){var v=Qs(g,2),b=v[1];return!b.skip}).map(function(g){var v=Qs(g,2),b=v[0],_=v[1];return Ca({},b,_.depth)}))));return d;function h(g){for(var v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],b=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,_=function(){var S=g[m];if(v.indexOf(S)!==-1){var k=[].concat(Gt(v.slice(v.indexOf(S))),[S]).map(function(C){return n(C.data)});return f.some(function(C){return C.length===k.length&&C.every(function(N,E){return N===k[E]})})||(f.push(k),c(k)),1}b>S.depth&&(S.depth=b,h(S.out,[].concat(Gt(v),[S]),b+(S.skip?0:1)))},m=0,w=g.length;m<w;m++)_()}}var NH=2,rt=function(n,r){return r.onNeedsRedraw&&r.onNeedsRedraw()},Rx=function(n,r){if(!r.isShadow){var o=_e(r.linkDirectionalParticles);r.graphData.links.forEach(function(i){var s=Math.round(Math.abs(o(i)));s?i.__photons=Gt(Array(s)).map(function(){return{}}):delete i.__photons})}},Cu=$g({props:{graphData:{default:{nodes:[],links:[]},onChange:function(n,r){r.engineRunning=!1,Rx(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:Rx},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=_e(n.nodeVisibility),c=_e(n.nodeVal),u=_e(n.nodeColor),f=_e(n.nodeCanvasObjectMode),d=n.ctx,h=n.isShadow/n.globalScale,g=n.graphData.nodes.filter(l);d.save(),g.forEach(function(v){var b=f(v);if(n.nodeCanvasObject&&(b==="before"||b==="replace")&&(n.nodeCanvasObject(v,d,n.globalScale),b==="replace")){d.restore();return}var _=Math.sqrt(Math.max(0,c(v)||1))*n.nodeRelSize+h;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&&b==="after"&&n.nodeCanvasObject(v,n.ctx,n.globalScale)}),d.restore()}function i(){var l=_e(n.linkVisibility),c=_e(n.linkColor),u=_e(n.linkWidth),f=_e(n.linkLineDash),d=_e(n.linkCurvature),h=_e(n.linkCanvasObjectMode),g=n.ctx,v=n.isShadow*2,b=n.graphData.links.filter(l);b.forEach(C);var _=[],m=[],w=b;if(n.linkCanvasObject){var y=[],S=[];b.forEach(function(N){return({before:_,after:m,replace:y}[h(N)]||S).push(N)}),w=[].concat(Gt(_),m,S),_=_.concat(y)}g.save(),_.forEach(function(N){return n.linkCanvasObject(N,g,n.globalScale)}),g.restore();var k=uH(w,[c,u,f]);g.save(),Object.entries(k).forEach(function(N){var E=Qs(N,2),P=E[0],A=E[1],T=!P||P==="undefined"?"rgba(0,0,0,0.15)":P;Object.entries(A).forEach(function(D){var B=Qs(D,2),j=B[0],L=B[1],I=(j||1)/n.globalScale+v;Object.entries(L).forEach(function(z){var M=Qs(z,2);M[0];var R=M[1],$=f(R[0]);g.beginPath(),R.forEach(function(V){var O=V.source,X=V.target;if(!(!O||!X||!O.hasOwnProperty("x")||!X.hasOwnProperty("x"))){g.moveTo(O.x,O.y);var F=V.__controlPoints;F?g[F.length===2?"quadraticCurveTo":"bezierCurveTo"].apply(g,Gt(F).concat([X.x,X.y])):g.lineTo(X.x,X.y)}}),g.strokeStyle=T,g.lineWidth=I,g.setLineDash($||[]),g.stroke()})})}),g.restore(),g.save(),m.forEach(function(N){return n.linkCanvasObject(N,g,n.globalScale)}),g.restore();function C(N){var E=d(N);if(!E){N.__controlPoints=null;return}var P=N.source,A=N.target;if(!(!P||!A||!P.hasOwnProperty("x")||!A.hasOwnProperty("x"))){var T=Math.sqrt(Math.pow(A.x-P.x,2)+Math.pow(A.y-P.y,2));if(T>0){var D=Math.atan2(A.y-P.y,A.x-P.x),B=T*E,j={x:(P.x+A.x)/2+B*Math.cos(D-Math.PI/2),y:(P.y+A.y)/2+B*Math.sin(D-Math.PI/2)};N.__controlPoints=[j.x,j.y]}else{var L=E*70;N.__controlPoints=[A.x,A.y-L,A.x+L,A.y]}}}}function s(){var l=1.6,c=.2,u=_e(n.linkDirectionalArrowLength),f=_e(n.linkDirectionalArrowRelPos),d=_e(n.linkVisibility),h=_e(n.linkDirectionalArrowColor||n.linkColor),g=_e(n.nodeVal),v=n.ctx;v.save(),n.graphData.links.filter(d).forEach(function(b){var _=u(b);if(!(!_||_<0)){var m=b.source,w=b.target;if(!(!m||!w||!m.hasOwnProperty("x")||!w.hasOwnProperty("x"))){var y=Math.sqrt(Math.max(0,g(m)||1))*n.nodeRelSize,S=Math.sqrt(Math.max(0,g(w)||1))*n.nodeRelSize,k=Math.min(1,Math.max(0,f(b))),C=h(b)||"rgba(0,0,0,0.28)",N=_/l/2,E=b.__controlPoints&&Px(Pe,[m.x,m.y].concat(Gt(b.__controlPoints),[w.x,w.y])),P=E?function(I){return E.get(I)}:function(I){return{x:m.x+(w.x-m.x)*I||0,y:m.y+(w.y-m.y)*I||0}},A=E?E.length():Math.sqrt(Math.pow(w.x-m.x,2)+Math.pow(w.y-m.y,2)),T=y+_+(A-y-S-_)*k,D=P(T/A),B=P((T-_)/A),j=P((T-_*(1-c))/A),L=Math.atan2(D.y-B.y,D.x-B.x)-Math.PI/2;v.beginPath(),v.moveTo(D.x,D.y),v.lineTo(B.x+N*Math.cos(L),B.y+N*Math.sin(L)),v.lineTo(j.x,j.y),v.lineTo(B.x-N*Math.cos(L),B.y-N*Math.sin(L)),v.fillStyle=C,v.fill()}}}),v.restore()}function a(){var l=_e(n.linkDirectionalParticles),c=_e(n.linkDirectionalParticleSpeed),u=_e(n.linkDirectionalParticleOffset),f=_e(n.linkDirectionalParticleWidth),d=_e(n.linkVisibility),h=_e(n.linkDirectionalParticleColor||n.linkColor),g=n.ctx;g.save(),n.graphData.links.filter(d).forEach(function(v){var b=l(v);if(!(!v.hasOwnProperty("__photons")||!v.__photons.length)){var _=v.source,m=v.target;if(!(!_||!m||!_.hasOwnProperty("x")||!m.hasOwnProperty("x"))){var w=c(v),y=Math.abs(u(v)),S=v.__photons||[],k=Math.max(0,f(v)/2)/Math.sqrt(n.globalScale),C=h(v)||"rgba(0,0,0,0.28)";g.fillStyle=C;var N=v.__controlPoints?Px(Pe,[_.x,_.y].concat(Gt(v.__controlPoints),[m.x,m.y])):null,E=0,P=!1;S.forEach(function(A){var T=!!A.__singleHop;if(A.hasOwnProperty("__progressRatio")||(A.__progressRatio=T?w<0?1:0:(E+y)/b),!T&&E++,A.__progressRatio+=w,A.__progressRatio>=1||A.__progressRatio<0)if(!T)A.__progressRatio=A.__progressRatio%1,A.__progressRatio<0&&A.__progressRatio++;else{P=!0;return}var D=A.__progressRatio,B=N?N.get(D):{x:_.x+(m.x-_.x)*D||0,y:_.y+(m.y-_.y)*D||0};n.linkDirectionalParticleCanvasObject?n.linkDirectionalParticleCanvasObject(B.x,B.y,v,g,n.globalScale):(g.beginPath(),g.arc(B.x,B.y,k,0,2*Math.PI,!1),g.fill())}),P&&(v.__photons=v.__photons.filter(function(A){return!A.__singleHop||A.__progressRatio<=1&&A.__progressRatio>=0}))}}}),g.restore()}},emitParticle:function(n,r){return r&&(!r.__photons&&(r.__photons=[]),r.__photons.push({__singleHop:!0})),this}},stateInit:function(){return{forceLayout:HB().force("link",IB()).force("charge",UB()).force("center",$7()).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&&Mx(n.graphData.nodes,_e(n.nodeAutoColorBy),n.nodeColor),n.linkAutoColorBy!==null&&Mx(n.graphData.links,_e(n.linkAutoColorBy),n.linkColor),n.graphData.links.forEach(function(h){h.source=h[n.linkSource],h.target=h[n.linkTarget]}),n.forceLayout.stop().alpha(1).nodes(n.graphData.nodes);var o=n.forceLayout.force("link");o&&o.id(function(h){return h[n.nodeId]}).links(n.graphData.links);var i=n.dagMode&&CH(n.graphData,function(h){return h[n.nodeId]},{nodeFilter:n.dagNodeFilter,onLoopError:n.onDagError||void 0}),s=Math.max.apply(Math,Gt(Object.values(i||[]))),a=n.dagLevelDistance||n.graphData.nodes.length/(s||1)*NH*(["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(h){return delete h[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(h){return h[f]=u(h)})}n.forceLayout.force("dagRadial",["radialin","radialout"].indexOf(n.dagMode)!==-1?VB(function(h){var g=i[h[n.nodeId]]||-1;return(n.dagMode==="radialin"?s-g:g)*a}).strength(function(h){return n.dagNodeFilter(h)?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 CN(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 h=a[d],g=h[s].apply(h,c);g!==h&&f.push(g)}),f.length?f[0]:this}}}}var EH=800,PH=4,jH=5,NN=CN("forceGraph",Cu),MH=CN(["forceGraph","shadowGraph"],Cu),RH=Object.assign.apply(Object,Gt(["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 Ca({},e,NN.linkProp(e))})).concat(Gt(["nodeRelSize","nodeId","nodeVal","nodeVisibility","linkSource","linkTarget","linkVisibility","linkCurvature"].map(function(e){return Ca({},e,MH.linkProp(e))})))),AH=Object.assign.apply(Object,Gt(["d3Force","d3ReheatSimulation","emitParticle"].map(function(e){return Ca({},e,NN.linkMethod(e))})));function Uf(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 EN(e){var n=window.devicePixelRatio;e.setTransform(n,0,0,n,0,0)}function Ax(e,n,r){e.save(),EN(e),e.clearRect(0,0,n,r),e.restore()}var TH=$g({props:Zo({width:{default:window.innerWidth,onChange:function(n,r){return Uf(r)},triggerUpdate:!1},height:{default:window.innerHeight,onChange:function(n,r){return Uf(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}},RH),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 tx(a()).to(s,i).easing(_o.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 tx({k:i()}).to({k:r},o).easing(_o.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=_e(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:[Qy(s,function(a){return a.x-a.r}),qy(s,function(a){return a.x+a.r})],y:[Qy(s,function(a){return a.y-a.r}),qy(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:[]})}},AH),stateInit:function(){return{lastSetZoom:1,zoom:Og(),forceGraph:new Cu,shadowGraph:new Cu().cooldownTicks(0).nodeColor("__indexColor").linkColor("__indexColor").isShadow(!0),colorTracker:new h7,tweenGroup:new qC}},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,h=window.devicePixelRatio,g=l.x>0&&l.y>0?a.getImageData(l.x*h,l.y*h,1,1):null;return g&&(d=r.colorTracker.lookup(g.data)),d};st(r.canvas).call(Pg().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,h=d.__initialDragPos,g=f,v=on(r.canvas).k,b={x:h.x+(g.x-h.x)/v-d.x,y:h.y+(g.y-h.y)/v-d.y};["x","y"].forEach(function(_){return d["f".concat(_)]=d[_]=h[_]+(g[_]-h[_])/v}),!(!d.__dragged&&jH>=Math.sqrt(Y9(["x","y"].map(function(_){return Math.pow(f[_]-h[_],2)}))))&&(r.forceGraph.d3AlphaTarget(.3).resetCountdown(),r.isPointerDragging=!0,d.__dragged=!0,r.onNodeDrag(d,b))}).on("end",function(f){var d=f.subject,h=d.__initialDragPos,g={x:d.x-h.x,y:d.y-h.y};h.fx===void 0&&(d.fx=void 0),h.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"||_e(r.enableZoomInteraction)(f))&&(f.type==="wheel"||_e(r.enablePanInteraction)(f))}).on("zoom",function(f){var d=f.transform;[s,a].forEach(function(h){EN(h),h.translate(d.x,d.y),h.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()))}),Uf(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=PH/Math.cbrt(r.graphData.nodes.length)),r.needsRedraw=!0)}),r.tooltip=new O7(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 h=g(i);l.x=d.pageX-h.left,l.y=d.pageY-h.top;function g(v){var b=v.getBoundingClientRect(),_=window.pageXOffset||document.documentElement.scrollLeft,m=window.pageYOffset||document.documentElement.scrollTop;return{top:b.top+m,left:b.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 h=r["on".concat(r.hoverObj.type,"Click")];h&&h.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=wF(function(){Ax(a,r.width,r.height),r.shadowGraph.linkWidth(function(d){return _e(r.linkWidth)(d)+r.linkHoverPrecision});var f=on(r.canvas);r.shadowGraph.globalScale(f.k).tickFrame()},EH);r.flushShadowCanvas=u.flush,(this._animationCycle=function f(){var d=!r.autoPauseRedraw||!!r.needsRedraw||r.forceGraph.isEngineRunning()||r.graphData.links.some(function(y){return y.__photons&&y.__photons.length});if(r.needsRedraw=!1,r.enablePointerInteraction){var h=r.isPointerDragging?null:c();if(h!==r.hoverObj){var g=r.hoverObj,v=g?g.type:null,b=h?h.type:null;if(v&&v!==b){var _=r["on".concat(v,"Hover")];_&&_(null,g.d)}if(b){var m=r["on".concat(b,"Hover")];m&&m(h.d,v===b?g.d:null)}r.tooltip.content(h&&_e(r["".concat(h.type.toLowerCase(),"Label")])(h.d)||null),r.canvas.classList[(h&&r["on".concat(b,"Click")]||!h&&r.onBackgroundClick)&&_e(r.showPointerCursor)(h==null?void 0:h.d)?"add":"remove"]("clickable"),r.hoverObj=h}d&&u()}if(d){Ax(s,r.width,r.height);var w=on(r.canvas).k;r.onRenderFramePre&&r.onRenderFramePre(s,w),r.forceGraph.globalScale(w).tickFrame(),r.onRenderFramePost&&r.onRenderFramePost(s,w)}r.tweenGroup.update(),r.animationFrameRequestId=requestAnimationFrame(f)})()},update:function(n){}}),PN={exports:{}},IH="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",OH=IH,$H=OH;function jN(){}function MN(){}MN.resetWarningCache=jN;var DH=function(){function e(o,i,s,a,l,c){if(c!==$H){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:MN,resetWarningCache:jN};return r.PropTypes=r,r};PN.exports=DH();var LH=PN.exports;const H=Au(LH),Rd={width:H.number,height:H.number,graphData:H.shape({nodes:H.arrayOf(H.object).isRequired,links:H.arrayOf(H.object).isRequired}),backgroundColor:H.string,nodeRelSize:H.number,nodeId:H.string,nodeLabel:H.oneOfType([H.string,H.func]),nodeVal:H.oneOfType([H.number,H.string,H.func]),nodeVisibility:H.oneOfType([H.bool,H.string,H.func]),nodeColor:H.oneOfType([H.string,H.func]),nodeAutoColorBy:H.oneOfType([H.string,H.func]),onNodeHover:H.func,onNodeClick:H.func,linkSource:H.string,linkTarget:H.string,linkLabel:H.oneOfType([H.string,H.func]),linkVisibility:H.oneOfType([H.bool,H.string,H.func]),linkColor:H.oneOfType([H.string,H.func]),linkAutoColorBy:H.oneOfType([H.string,H.func]),linkWidth:H.oneOfType([H.number,H.string,H.func]),linkCurvature:H.oneOfType([H.number,H.string,H.func]),linkDirectionalArrowLength:H.oneOfType([H.number,H.string,H.func]),linkDirectionalArrowColor:H.oneOfType([H.string,H.func]),linkDirectionalArrowRelPos:H.oneOfType([H.number,H.string,H.func]),linkDirectionalParticles:H.oneOfType([H.number,H.string,H.func]),linkDirectionalParticleSpeed:H.oneOfType([H.number,H.string,H.func]),linkDirectionalParticleOffset:H.oneOfType([H.number,H.string,H.func]),linkDirectionalParticleWidth:H.oneOfType([H.number,H.string,H.func]),linkDirectionalParticleColor:H.oneOfType([H.string,H.func]),onLinkHover:H.func,onLinkClick:H.func,dagMode:H.oneOf(["td","bu","lr","rl","zin","zout","radialin","radialout"]),dagLevelDistance:H.number,dagNodeFilter:H.func,onDagError:H.func,d3AlphaMin:H.number,d3AlphaDecay:H.number,d3VelocityDecay:H.number,warmupTicks:H.number,cooldownTicks:H.number,cooldownTime:H.number,onEngineTick:H.func,onEngineStop:H.func,getGraphBbox:H.func},RN={zoomToFit:H.func,onNodeRightClick:H.func,onNodeDrag:H.func,onNodeDragEnd:H.func,onLinkRightClick:H.func,linkHoverPrecision:H.number,onBackgroundClick:H.func,onBackgroundRightClick:H.func,showPointerCursor:H.oneOfType([H.bool,H.func]),enablePointerInteraction:H.bool,enableNodeDrag:H.bool},Vg={showNavInfo:H.bool,nodeOpacity:H.number,nodeResolution:H.number,nodeThreeObject:H.oneOfType([H.object,H.string,H.func]),nodeThreeObjectExtend:H.oneOfType([H.bool,H.string,H.func]),nodePositionUpdate:H.func,linkOpacity:H.number,linkResolution:H.number,linkCurveRotation:H.oneOfType([H.number,H.string,H.func]),linkMaterial:H.oneOfType([H.object,H.string,H.func]),linkThreeObject:H.oneOfType([H.object,H.string,H.func]),linkThreeObjectExtend:H.oneOfType([H.bool,H.string,H.func]),linkPositionUpdate:H.func,linkDirectionalArrowResolution:H.number,linkDirectionalParticleResolution:H.number,linkDirectionalParticleThreeObject:H.oneOfType([H.object,H.string,H.func]),forceEngine:H.oneOf(["d3","ngraph"]),ngraphPhysics:H.object,numDimensions:H.oneOf([1,2,3])},zH=Object.assign({},Rd,RN,{linkLineDash:H.oneOfType([H.arrayOf(H.number),H.string,H.func]),nodeCanvasObjectMode:H.oneOfType([H.string,H.func]),nodeCanvasObject:H.func,nodePointerAreaPaint:H.func,linkCanvasObjectMode:H.oneOfType([H.string,H.func]),linkCanvasObject:H.func,linkPointerAreaPaint:H.func,linkDirectionalParticleCanvasObject:H.func,autoPauseRedraw:H.bool,minZoom:H.number,maxZoom:H.number,enableZoomInteraction:H.oneOfType([H.bool,H.func]),enablePanInteraction:H.oneOfType([H.bool,H.func]),onZoom:H.func,onZoomEnd:H.func,onRenderFramePre:H.func,onRenderFramePost:H.func});Object.assign({},Rd,RN,Vg,{enableNavigationControls:H.bool,controlType:H.oneOf(["trackball","orbit","fly"]),rendererConfig:H.object,extraRenderers:H.arrayOf(H.shape({render:H.func.isRequired}))});Object.assign({},Rd,Vg,{nodeDesc:H.oneOfType([H.string,H.func]),linkDesc:H.oneOfType([H.string,H.func])});Object.assign({},Rd,Vg,{markerAttrs:H.object,yOffset:H.number,glScale:H.number});const Wg=u6(TH,{methodNames:["emitParticle","d3Force","d3ReheatSimulation","stopAnimation","pauseAnimation","resumeAnimation","centerAt","zoom","zoomToFit","getGraphBbox","screen2GraphCoords","graph2ScreenCoords"]});Wg.displayName="ForceGraph2D";Wg.propTypes=zH;const Es={ui:"#60a5fa",api:"#34d399",db:"#f59e0b"},FH="rgba(244, 114, 182, 0.6)",BH="rgba(148, 163, 184, 0.25)";function HH(){const[e,n]=x.useState(null),[r,o]=x.useState(null),[i,s]=x.useState(!0),[a,l]=x.useState(!1),[c,u]=x.useState(new Set(["ui","api","db"])),[f,d]=x.useState(null),h=x.useRef(null),[g,v]=x.useState({width:0,height:0}),b=Uo(),_=x.useCallback((y=!1)=>{y?l(!0):s(!0),o(null),fetch(b("/api/project-graph",y?{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)})},[b]);x.useEffect(()=>{_(!1)},[_]),x.useEffect(()=>{if(!h.current)return;const y=h.current,S=()=>v({width:y.clientWidth,height:y.clientHeight});S();const k=new ResizeObserver(S);return k.observe(y),()=>k.disconnect()},[e]);const m=x.useMemo(()=>{if(!e)return{nodes:[],links:[]};const y=e.nodes.filter(C=>c.has(C.layer)),S=new Set(y.map(C=>C.id)),k=e.links.filter(C=>{const N=typeof C.source=="string"?C.source:C.source.id,E=typeof C.target=="string"?C.target:C.target.id;return S.has(N)&&S.has(E)});return{nodes:y,links:k}},[e,c]),w=y=>{const S=new Set(c);S.has(y)?S.delete(y):S.add(y),S.size!==0&&u(S)};return p.jsxs("div",{className:"flex h-full flex-col",children:[p.jsxs("div",{className:"flex flex-wrap items-center gap-3 border-b border-sidebar-border px-6 py-3",children:[p.jsx("h1",{className:"text-lg font-semibold",children:"Project Graph"}),e&&p.jsxs("span",{className:"text-xs text-muted-foreground",children:[m.nodes.length," nodes · ",m.links.length," links"]}),p.jsxs("div",{className:"ml-auto flex items-center gap-2",children:[["ui","api","db"].map(y=>p.jsxs("button",{type:"button",onClick:()=>w(y),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(y)?1:.4,borderColor:c.has(y)?Es[y]:void 0},children:[p.jsx("span",{className:"h-2 w-2 rounded-full",style:{backgroundColor:Es[y]}}),y.toUpperCase(),e&&` (${e.stats.byLayer[y]})`]},y)),p.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"})]})]}),p.jsxs("div",{ref:h,className:"relative flex-1 overflow-hidden",children:[i&&p.jsx("div",{className:"absolute inset-0 flex items-center justify-center text-muted-foreground",children:"Loading graph…"}),r&&p.jsx("div",{className:"absolute inset-0 flex items-center justify-center text-destructive",children:r}),e&&g.width>0&&p.jsx(Wg,{width:g.width,height:g.height,graphData:m,nodeId:"id",nodeLabel:y=>`${y.layer}/${y.type}: ${y.name}`,nodeRelSize:3,nodeColor:y=>Es[y.layer],linkColor:y=>y.cross?FH:BH,linkWidth:y=>y.cross?1:.5,linkDirectionalParticles:0,cooldownTicks:120,onNodeHover:y=>d(y),backgroundColor:"transparent",nodeCanvasObjectMode:()=>"after",nodeCanvasObject:(y,S,k)=>{if(k<1.4||y.x===void 0||y.y===void 0)return;const C=y.name,N=11/k;S.font=`${N}px -apple-system, system-ui, sans-serif`;const E=S.measureText(C).width,P=3/k,A=1.5/k;S.fillStyle="rgba(15, 15, 20, 0.75)",S.fillRect(y.x-E/2-P,y.y+5/k-A,E+P*2,N+A*2),S.textAlign="center",S.textBaseline="top",S.fillStyle=Es[y.layer],S.fillText(C,y.x,y.y+5/k)}}),f&&p.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:[p.jsxs("div",{className:"font-semibold",style:{color:Es[f.layer]},children:[f.layer.toUpperCase()," · ",f.type]}),p.jsx("div",{className:"font-mono",children:f.name}),p.jsx("div",{className:"text-muted-foreground",children:f.path}),f.module&&p.jsxs("div",{className:"text-muted-foreground",children:["module: ",f.module]})]})]})]})}function Jn(e){var n;return((n=e.tags)==null?void 0:n.module)??e.module??null}function Gg(e){var n;return(n=e.tags)!=null&&n.screen?e.tags.screen==="true":e.type==="page"||e.type==="layout"}function Na(e){return e.split(/[-_]/).map(n=>n.charAt(0).toUpperCase()+n.slice(1)).join(" ")}function Yr(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 UH=new Set(["lib","db","config","external","middleware","server-lib","services","mcp","layout","shared-ui"]);function VH(){const[e,n]=x.useState(null),[r,o]=x.useState("loading"),[i,s]=x.useState(null),[a,l]=x.useState(!1),c=Uo(),u=x.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 b=!!(v.ui||v.api||v.db);o(b?"ready":"empty")}catch(g){s(String(g)),o("error")}},[c]);x.useEffect(()=>{u()},[u]);const f=x.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 b=!!(v.ui||v.api||v.db);o(b?"ready":"empty")}catch(g){s(String(g))}finally{l(!1)}},[]),{moduleBuckets:d,counts:h}=x.useMemo(()=>{if(!(e!=null&&e.ui)||!(e!=null&&e.api)||!(e!=null&&e.db))return{moduleBuckets:[],counts:null};const g=e.ui.nodes.filter(w=>Gg(w)&&Jn(w)&&!UH.has(Jn(w))),v=new Map;for(const w of g){const y=Jn(w);v.has(y)||v.set(y,[]),v.get(y).push(w)}const b=[],_=new Map;for(const[w,y]of v)y.length===1?b.push(...y):_.set(w,y);const m=[..._.entries()].map(([w,y])=>({module:w,screens:y})).sort((w,y)=>y.screens.length-w.screens.length);return b.length>0&&m.push({module:"misc",screens:b}),{moduleBuckets:m,counts:{screens:g.length,modules:m.length,endpoints:e.api.nodes.length,tables:e.db.nodes.length,components:e.ui.nodes.filter(w=>w.type==="component").length}}},[e]);return r==="loading"?p.jsx("div",{className:"flex h-full items-center justify-center",children:p.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading overview…"})}):r==="empty"?p.jsx(WH,{onGenerate:f,busy:a,error:i}):r==="error"?p.jsx("div",{className:"flex h-full items-center justify-center p-8",children:p.jsxs("div",{className:"max-w-md text-center",children:[p.jsx("p",{className:"text-sm text-foreground",children:"Failed to load graph"}),p.jsx("p",{className:"mt-2 text-xs text-muted-foreground",children:i}),p.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"})]})}):h?p.jsx("div",{className:"h-full overflow-y-auto",children:p.jsxs("div",{className:"mx-auto max-w-6xl px-8 py-8",children:[p.jsxs("header",{className:"mb-8 flex items-start justify-between gap-4",children:[p.jsxs("div",{children:[p.jsx("h1",{className:"text-2xl font-semibold text-foreground",children:"Project Overview"}),p.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:"A high-level map of the modules, screens, and systems in this project."})]}),p.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:[p.jsx(M_,{className:`h-3 w-3 ${a?"animate-spin":""}`}),a?"Regenerating…":"Regenerate graph"]})]}),i&&p.jsx("div",{className:"mb-4 rounded-md border border-destructive/30 bg-destructive/10 px-3 py-2 text-xs text-destructive",children:i}),p.jsxs("div",{className:"mb-8 grid grid-cols-2 gap-3 md:grid-cols-4",children:[p.jsx(Yl,{icon:p.jsx(Ju,{className:"h-4 w-4"}),label:"Modules",value:h.modules}),p.jsx(Yl,{icon:p.jsx(Da,{className:"h-4 w-4"}),label:"Screens",value:h.screens}),p.jsx(Yl,{icon:p.jsx(Um,{className:"h-4 w-4"}),label:"API endpoints",value:h.endpoints}),p.jsx(Yl,{icon:p.jsx(Hm,{className:"h-4 w-4"}),label:"Database tables",value:h.tables})]}),p.jsxs("section",{children:[p.jsx("h2",{className:"mb-3 text-xs font-semibold uppercase tracking-wider text-muted-foreground",children:"Capability map"}),p.jsx("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-2 xl:grid-cols-3",children:d.map(g=>p.jsx(GH,{module:g.module,screens:g.screens},g.module))})]})]})}):null}function WH({onGenerate:e,busy:n,error:r}){return p.jsx("div",{className:"flex h-full items-center justify-center p-8",children:p.jsxs("div",{className:"max-w-md text-center",children:[p.jsx("div",{className:"mx-auto flex h-12 w-12 items-center justify-center rounded-full bg-sidebar-primary/15 text-sidebar-primary",children:p.jsx(OA,{className:"h-6 w-6"})}),p.jsx("h2",{className:"mt-4 text-lg font-semibold text-foreground",children:"No graph yet"}),p.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."}),p.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:[p.jsx(M_,{className:`h-4 w-4 ${n?"animate-spin":""}`}),n?"Generating…":"Generate graph"]}),p.jsx("p",{className:"mt-3 text-[11px] text-muted-foreground",children:"This scans your source tree — takes a few seconds."}),r&&p.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 p.jsxs("div",{className:"rounded-lg border border-sidebar-border bg-background/40 px-4 py-3",children:[p.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground",children:[e,p.jsx("span",{className:"text-[11px] font-semibold uppercase tracking-wider",children:n})]}),p.jsx("p",{className:"mt-1 text-2xl font-semibold tabular-nums text-foreground",children:r})]})}function GH({module:e,screens:n}){const r=n.slice(0,6),o=n.length-r.length;return p.jsxs("div",{className:"rounded-lg border border-sidebar-border bg-background/40 p-5 transition-colors hover:border-sidebar-primary/50",children:[p.jsxs("div",{className:"mb-3 flex items-center justify-between",children:[p.jsx("h3",{className:"text-base font-semibold text-foreground",children:Na(e)}),p.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"]})]}),p.jsxs("ul",{className:"space-y-1",children:[r.map(i=>p.jsxs("li",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[p.jsx("span",{className:"h-1 w-1 shrink-0 rounded-full bg-sidebar-primary/60"}),p.jsx("span",{className:"truncate text-foreground/90",children:Yr(i)})]},i.id)),o>0&&p.jsxs("li",{className:"pl-3 pt-1 text-[11px] italic text-muted-foreground",children:["+",o," more"]})]})]})}function He(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=He(e[r]))!==""&&(n+=(n&&" ")+o);else for(let r in e)e[r]&&(n+=(n&&" ")+r);return n}const On={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."},Ea=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],AN=["Enter"," ","Escape"],TN={"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 Gi;(function(e){e.Strict="strict",e.Loose="loose"})(Gi||(Gi={}));var So;(function(e){e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal"})(So||(So={}));var Pa;(function(e){e.Partial="partial",e.Full="full"})(Pa||(Pa={}));const IN={inProgress:!1,isValid:null,from:null,fromHandle:null,fromPosition:null,fromNode:null,to:null,toHandle:null,toPosition:null,toNode:null,pointer:null};var Er;(function(e){e.Bezier="default",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e.SimpleBezier="simplebezier"})(Er||(Er={}));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 Tx={[ce.Left]:ce.Right,[ce.Right]:ce.Left,[ce.Top]:ce.Bottom,[ce.Bottom]:ce.Top};function ON(e){return e===null?null:e?"valid":"invalid"}const $N=e=>"id"in e&&"source"in e&&"target"in e,YH=e=>"id"in e&&"position"in e&&!("source"in e)&&!("target"in e),Yg=e=>"id"in e&&"internals"in e&&!("source"in e)&&!("target"in e),Ja=(e,n=[0,0])=>{const{width:r,height:o}=ur(e),i=e.origin??n,s=r*i[0],a=o*i[1];return{x:e.position.x-s,y:e.position.y-a}},XH=(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):Yg(i)?i:n.nodeLookup.get(i.id));const l=a?Eu(a,n.nodeOrigin):{x:0,y:0,x2:0,y2:0};return Ad(o,l)},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return Td(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=Ad(r,Eu(i)),o=!0)}),o?Td(r):{x:0,y:0,width:0,height:0}},Xg=(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:h=!1}=u;if(a&&!d||h)continue;const g=f.width??u.width??u.initialWidth??null,v=f.height??u.height??u.initialHeight??null,b=ja(l,Xi(u)),_=(g??0)*(v??0),m=s&&b>0;(!u.internals.handleBounds||m||b>=_||u.dragging)&&c.push(u)}return c},KH=(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 qH(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 QH({nodes:e,width:n,height:r,panZoom:o,minZoom:i,maxZoom:s},a){if(e.size===0)return Promise.resolve(!0);const l=qH(e,a),c=el(l),u=Kg(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 DN({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",On.error005());else{const g=l.measured.width,v=l.measured.height;g&&v&&(d=[[c,u],[c+g,u+v]])}else l&&Ki(a.extent)&&(d=[[a.extent[0][0]+c,a.extent[0][1]+u],[a.extent[1][0]+c,a.extent[1][1]+u]]);const h=Ki(d)?$o(n,d,a.measured):n;return(a.measured.width===void 0||a.measured.height===void 0)&&(s==null||s("015",On.error015())),{position:{x:h.x-c+(a.measured.width??0)*f[0],y:h.y-u+(a.measured.height??0)*f[1]},positionAbsolute:h}}async function ZH({nodesToRemove:e=[],edgesToRemove:n=[],nodes:r,edges:o,onBeforeDelete:i}){const s=new Set(e.map(h=>h.id)),a=[];for(const h of r){if(h.deletable===!1)continue;const g=s.has(h.id),v=!g&&h.parentId&&a.find(b=>b.id===h.parentId);(g||v)&&a.push(h)}const l=new Set(n.map(h=>h.id)),c=o.filter(h=>h.deletable!==!1),f=KH(a,c);for(const h of c)l.has(h.id)&&!f.find(v=>v.id===h.id)&&f.push(h);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 Yi=(e,n=0,r=1)=>Math.min(Math.max(e,n),r),$o=(e={x:0,y:0},n,r)=>({x:Yi(e.x,n[0][0],n[1][0]-((r==null?void 0:r.width)??0)),y:Yi(e.y,n[0][1],n[1][1]-((r==null?void 0:r.height)??0))});function LN(e,n,r){const{width:o,height:i}=ur(r),{x:s,y:a}=r.internals.positionAbsolute;return $o(e,[[s,a],[s+o,a+i]],n)}const Ix=(e,n,r)=>e<n?Yi(Math.abs(e-n),1,n)/n:e>r?-Yi(Math.abs(e-r),1,n)/n:0,zN=(e,n,r=15,o=40)=>{const i=Ix(e.x,o,n.width-o)*r,s=Ix(e.y,o,n.height-o)*r;return[i,s]},Ad=(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)}),Rp=({x:e,y:n,width:r,height:o})=>({x:e,y:n,x2:e+r,y2:n+o}),Td=({x:e,y:n,x2:r,y2:o})=>({x:e,y:n,width:r-e,height:o-n}),Xi=(e,n=[0,0])=>{var i,s;const{x:r,y:o}=Yg(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}=Yg(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)}},FN=(e,n)=>Td(Ad(Rp(e),Rp(n))),ja=(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)},Ox=e=>un(e.width)&&un(e.height)&&un(e.x)&&un(e.y),un=e=>!isNaN(e)&&isFinite(e),JH=(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 Jo(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 eU(e,n,r){if(typeof e=="string"||typeof e=="number"){const o=Jo(e,r),i=Jo(e,n);return{top:o,right:i,bottom:o,left:i,x:i*2,y:o*2}}if(typeof e=="object"){const o=Jo(e.top??e.y??0,r),i=Jo(e.bottom??e.y??0,r),s=Jo(e.left??e.x??0,n),a=Jo(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 tU(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 Kg=(e,n,r,o,i,s)=>{const a=eU(s,n,r),l=(n-a.x)/e.width,c=(r-a.y)/e.height,u=Math.min(l,c),f=Yi(u,o,i),d=e.x+e.width/2,h=e.y+e.height/2,g=n/2-d*f,v=r/2-h*f,b=tU(e,g,v,f,n,r),_={left:Math.min(b.left-a.left,0),top:Math.min(b.top-a.top,0),right:Math.min(b.right-a.right,0),bottom:Math.min(b.bottom-a.bottom,0)};return{x:g-_.left+_.right,y:v-_.top+_.bottom,zoom:f}},Ma=()=>{var e;return typeof navigator<"u"&&((e=navigator==null?void 0:navigator.userAgent)==null?void 0:e.indexOf("Mac"))>=0};function Ki(e){return e!=null&&e!=="parent"}function ur(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 BN(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 HN(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 $x(e,n){if(e.size!==n.size)return!1;for(const r of e)if(!n.has(r))return!1;return!0}function nU(){let e,n;return{promise:new Promise((o,i)=>{e=o,n=i}),resolve:e,reject:n}}function rU(e){return{...TN,...e||{}}}function Zs(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}),UN=e=>{var n;return((n=e==null?void 0:e.getRootNode)==null?void 0:n.call(e))||(window==null?void 0:window.document)},oU=["INPUT","SELECT","TEXTAREA"];function VN(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:oU.includes(n.nodeName)||n.hasAttribute("contenteditable")||!!n.closest(".nokey")}const WN=e=>"clientX"in e,dn=(e,n)=>{var s,a;const r=WN(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)}},Dx=(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 GN({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 Lx({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 YN({sourceX:e,sourceY:n,sourcePosition:r=ce.Bottom,targetX:o,targetY:i,targetPosition:s=ce.Top,curvature:a=.25}){const[l,c]=Lx({pos:r,x1:e,y1:n,x2:o,y2:i,c:a}),[u,f]=Lx({pos:s,x1:o,y1:i,x2:e,y2:n,c:a}),[d,h,g,v]=GN({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,h,g,v]}function XN({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 iU({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 sU({sourceNode:e,targetNode:n,width:r,height:o,transform:i}){const s=Ad(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 ja(a,Td(s))>0}const aU=({source:e,sourceHandle:n,target:r,targetHandle:o})=>`xy-edge__${e}${n||""}-${r}${o||""}`,lU=(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)),cU=(e,n,r={})=>{if(!e.source||!e.target)return n;const o=r.getEdgeId||aU;let i;return $N(e)?i={...e}:i={...e,id:o(e)},lU(i,n)?n:(i.sourceHandle===null&&delete i.sourceHandle,i.targetHandle===null&&delete i.targetHandle,n.concat(i))};function KN({sourceX:e,sourceY:n,targetX:r,targetY:o}){const[i,s,a,l]=XN({sourceX:e,sourceY:n,targetX:r,targetY:o});return[`M ${e},${n}L ${r},${o}`,i,s,a,l]}const zx={[ce.Left]:{x:-1,y:0},[ce.Right]:{x:1,y:0},[ce.Top]:{x:0,y:-1},[ce.Bottom]:{x:0,y:1}},uU=({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},Fx=(e,n)=>Math.sqrt(Math.pow(n.x-e.x,2)+Math.pow(n.y-e.y,2));function dU({source:e,sourcePosition:n=ce.Bottom,target:r,targetPosition:o=ce.Top,center:i,offset:s,stepPosition:a}){const l=zx[n],c=zx[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=uU({source:u,sourcePosition:n,target:f}),h=d.x!==0?"x":"y",g=d[h];let v=[],b,_;const m={x:0,y:0},w={x:0,y:0},[,,y,S]=XN({sourceX:e.x,sourceY:e.y,targetX:r.x,targetY:r.y});if(l[h]*c[h]===-1){h==="x"?(b=i.x??u.x+(f.x-u.x)*a,_=i.y??(u.y+f.y)/2):(b=i.x??(u.x+f.x)/2,_=i.y??u.y+(f.y-u.y)*a);const E=[{x:b,y:u.y},{x:b,y:f.y}],P=[{x:u.x,y:_},{x:f.x,y:_}];l[h]===g?v=h==="x"?E:P:v=h==="x"?P:E}else{const E=[{x:u.x,y:f.y}],P=[{x:f.x,y:u.y}];if(h==="x"?v=l.x===g?P:E:v=l.y===g?E:P,n===o){const j=Math.abs(e[h]-r[h]);if(j<=s){const L=Math.min(s-1,s-j);l[h]===g?m[h]=(u[h]>e[h]?-1:1)*L:w[h]=(f[h]>r[h]?-1:1)*L}}if(n!==o){const j=h==="x"?"y":"x",L=l[h]===c[j],I=u[j]>f[j],z=u[j]<f[j];(l[h]===1&&(!L&&I||L&&z)||l[h]!==1&&(!L&&z||L&&I))&&(v=h==="x"?E:P)}const A={x:u.x+m.x,y:u.y+m.y},T={x:f.x+w.x,y:f.y+w.y},D=Math.max(Math.abs(A.x-v[0].x),Math.abs(T.x-v[0].x)),B=Math.max(Math.abs(A.y-v[0].y),Math.abs(T.y-v[0].y));D>=B?(b=(A.x+T.x)/2,_=v[0].y):(b=v[0].x,_=(A.y+T.y)/2)}const k={x:u.x+m.x,y:u.y+m.y},C={x:f.x+w.x,y:f.y+w.y};return[[e,...k.x!==v[0].x||k.y!==v[0].y?[k]:[],...v,...C.x!==v[v.length-1].x||C.y!==v[v.length-1].y?[C]:[],r],b,_,y,S]}function fU(e,n,r,o){const i=Math.min(Fx(e,n)/2,Fx(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 Ap({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,h,g,v,b]=dU({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 m=1;m<d.length-1;m++)_+=fU(d[m-1],d[m],d[m+1],a);return _+=`L${d[d.length-1].x} ${d[d.length-1].y}`,[_,h,g,v,b]}function Bx(e){var n;return e&&!!(e.internals.handleBounds||(n=e.handles)!=null&&n.length)&&!!(e.measured.width||e.width||e.initialWidth)}function hU(e){var d;const{sourceNode:n,targetNode:r}=e;if(!Bx(n)||!Bx(r))return null;const o=n.internals.handleBounds||Hx(n.handles),i=r.internals.handleBounds||Hx(r.handles),s=Ux((o==null?void 0:o.source)??[],e.sourceHandle),a=Ux(e.connectionMode===Gi.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",On.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=Do(n,s,l),f=Do(r,a,c);return{sourceX:u.x,sourceY:u.y,targetX:f.x,targetY:f.y,sourcePosition:l,targetPosition:c}}function Hx(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 Do(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??ur(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 Ux(e,n){return e&&(n?e.find(r=>r.id===n):e[0])||null}function Tp(e,n){return e?typeof e=="string"?e:`${n?`${n}__`:""}${Object.keys(e).sort().map(o=>`${o}=${e[o]}`).join("&")}`:""}function pU(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=Tp(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 qN=1e3,mU=10,Qg={nodeOrigin:[0,0],nodeExtent:Ea,elevateNodesOnSelect:!0,zIndexMode:"basic",defaults:{}},gU={...Qg,checkEquality:!0};function Zg(e,n){const r={...e};for(const o in n)n[o]!==void 0&&(r[o]=n[o]);return r}function vU(e,n,r){const o=Zg(Qg,r);for(const i of e.values())if(i.parentId)e0(i,e,n,o);else{const s=Ja(i,o.nodeOrigin),a=Ki(i.extent)?i.extent:o.nodeExtent,l=$o(s,a,ur(i));i.internals.positionAbsolute=l}}function yU(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 Jg(e){return e==="manual"}function Ip(e,n,r,o={}){var f,d;const i=Zg(gU,o),s={i:0},a=new Map(n),l=i!=null&&i.elevateNodesOnSelect&&!Jg(i.zIndexMode)?qN:0;let c=e.length>0,u=!1;n.clear(),r.clear();for(const h of e){let g=a.get(h.id);if(i.checkEquality&&h===(g==null?void 0:g.internals.userNode))n.set(h.id,g);else{const v=Ja(h,i.nodeOrigin),b=Ki(h.extent)?h.extent:i.nodeExtent,_=$o(v,b,ur(h));g={...i.defaults,...h,measured:{width:(f=h.measured)==null?void 0:f.width,height:(d=h.measured)==null?void 0:d.height},internals:{positionAbsolute:_,handleBounds:yU(h,g),z:QN(h,l,i.zIndexMode),userNode:h}},n.set(h.id,g)}(g.measured===void 0||g.measured.width===void 0||g.measured.height===void 0)&&!g.hidden&&(c=!1),h.parentId&&e0(g,n,r,o,s),u||(u=h.selected??!1)}return{nodesInitialized:c,hasSelectedNodes:u}}function xU(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 e0(e,n,r,o,i){const{elevateNodesOnSelect:s,nodeOrigin:a,nodeExtent:l,zIndexMode:c}=Zg(Qg,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}xU(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*mU),i&&f.internals.rootParentIndex!==void 0&&(i.i=f.internals.rootParentIndex);const d=s&&!Jg(c)?qN:0,{x:h,y:g,z:v}=wU(e,f,a,l,d,c),{positionAbsolute:b}=e.internals,_=h!==b.x||g!==b.y;(_||v!==e.internals.z)&&n.set(e.id,{...e,internals:{...e.internals,positionAbsolute:_?{x:h,y:g}:b,z:v}})}function QN(e,n,r){const o=un(e.zIndex)?e.zIndex:0;return Jg(r)?o:o+(e.selected?n:0)}function wU(e,n,r,o,i,s){const{x:a,y:l}=n.internals.positionAbsolute,c=ur(e),u=Ja(e,r),f=Ki(e.extent)?$o(u,e.extent,c):u;let d=$o({x:a+f.x,y:l+f.y},o,c);e.extent==="parent"&&(d=LN(d,c,n));const h=QN(e,i,s),g=n.internals.z??0;return{x:d.x,y:d.y,z:g>=h?g+1:h}}function t0(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)??Xi(c),f=FN(u,l.rect);s.set(l.parentId,{expandedRect:f,parent:c})}return s.size>0&&s.forEach(({expandedRect:l,parent:c},u)=>{var y;const f=c.internals.positionAbsolute,d=ur(c),h=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,b=Math.max(d.width,Math.round(l.width)),_=Math.max(d.height,Math.round(l.height)),m=(b-d.width)*h[0],w=(_-d.height)*h[1];(g>0||v>0||m||w)&&(i.push({id:u,type:"position",position:{x:c.position.x-g+m,y:c.position.y-v+w}}),(y=r.get(u))==null||y.forEach(S=>{e.some(k=>k.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:b+(g?h[0]*g-m:0),height:_+(v?h[1]*v-w:0)}})}),i}function bU(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),h=[];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 b=qg(g.nodeElement),_=v.measured.width!==b.width||v.measured.height!==b.height;if(!!(b.width&&b.height&&(_||!v.internals.handleBounds||g.force))){const w=g.nodeElement.getBoundingClientRect(),y=Ki(v.extent)?v.extent:s;let{positionAbsolute:S}=v.internals;v.parentId&&v.extent==="parent"?S=LN(S,b,n.get(v.parentId)):y&&(S=$o(S,y,b));const k={...v,measured:b,internals:{...v.internals,positionAbsolute:S,handleBounds:{source:Dx("source",g.nodeElement,w,d,v.id),target:Dx("target",g.nodeElement,w,d,v.id)}}};n.set(v.id,k),v.parentId&&e0(k,n,r,{nodeOrigin:i,zIndexMode:a}),c=!0,_&&(u.push({id:v.id,type:"dimensions",dimensions:b}),v.expandParent&&v.parentId&&h.push({id:v.id,parentId:v.parentId,rect:Xi(k,i)}))}}if(h.length>0){const g=t0(h,n,r,i);u.push(...g)}return{changes:u,updatedInternals:c}}async function _U({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 Vx(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 ZN(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}`;Vx("source",c,f,e,i,a),Vx("target",c,u,e,s,l),n.set(o.id,o)}}function JN(e,n){if(!e.parentId)return!1;const r=n.get(e.parentId);return r?r.selected?!0:JN(r,n):!1}function Wx(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 SU(e,n,r,o){const i=new Map;for(const[s,a]of e)if((a.selected||a.id===o)&&(!a.parentId||!JN(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 Vf({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 kU({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 CU({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,h=null,g=!1,v=!1,b=null;function _({noDragClassName:w,handleSelector:y,domNode:S,isSelectable:k,nodeId:C,nodeClickDistance:N=0}){h=st(S);function E({x:D,y:B}){const{nodeLookup:j,nodeExtent:L,snapGrid:I,snapToGrid:z,nodeOrigin:M,onNodeDrag:R,onSelectionDrag:$,onError:V,updateNodePositions:O}=n();s={x:D,y:B};let X=!1;const F=l.size>1,U=F&&L?Rp(el(l)):null,G=F&&z?kU({dragItems:l,snapGrid:I,x:D,y:B}):null;for(const[W,Y]of l){if(!j.has(W))continue;let q={x:D-Y.distance.x,y:B-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&&U){const{positionAbsolute:ne}=Y.internals,ue=ne.x-U.x+L[0][0],ye=ne.x+Y.measured.width-U.x2+L[1][0],pe=ne.y-U.y+L[0][1],Ne=ne.y+Y.measured.height-U.y2+L[1][1];te=[[ue,pe],[ye,Ne]]}const{position:J,positionAbsolute:Q}=DN({nodeId:W,nextPosition:q,nodeLookup:j,nodeExtent:te||L,nodeOrigin:M,onError:V});X=X||Y.position.x!==J.x||Y.position.y!==J.y,Y.position=J,Y.internals.positionAbsolute=Q}if(v=v||X,!!X&&(O(l,!0),b&&(o||R||!C&&$))){const[W,Y]=Vf({nodeId:C,dragItems:l,nodeLookup:j});o==null||o(b,l,W,Y),R==null||R(b,W,Y),C||$==null||$(b,Y)}}async function P(){if(!f)return;const{transform:D,panBy:B,autoPanSpeed:j,autoPanOnNodeDrag:L}=n();if(!L){c=!1,cancelAnimationFrame(a);return}const[I,z]=zN(u,f,j);(I!==0||z!==0)&&(s.x=(s.x??0)-I/D[2],s.y=(s.y??0)-z/D[2],await B({x:I,y:z})&&E(s)),a=requestAnimationFrame(P)}function A(D){var F;const{nodeLookup:B,multiSelectionActive:j,nodesDraggable:L,transform:I,snapGrid:z,snapToGrid:M,selectNodesOnDrag:R,onNodeDragStart:$,onSelectionDragStart:V,unselectNodesAndEdges:O}=n();d=!0,(!R||!k)&&!j&&C&&((F=B.get(C))!=null&&F.selected||O()),k&&R&&C&&(e==null||e(C));const X=Zs(D.sourceEvent,{transform:I,snapGrid:z,snapToGrid:M,containerBounds:f});if(s=X,l=SU(B,L,X,C),l.size>0&&(r||$||!C&&V)){const[U,G]=Vf({nodeId:C,dragItems:l,nodeLookup:B});r==null||r(D.sourceEvent,l,U,G),$==null||$(D.sourceEvent,U,G),C||V==null||V(D.sourceEvent,G)}}const T=Pg().clickDistance(N).on("start",D=>{const{domNode:B,nodeDragThreshold:j,transform:L,snapGrid:I,snapToGrid:z}=n();f=(B==null?void 0:B.getBoundingClientRect())||null,g=!1,v=!1,b=D.sourceEvent,j===0&&A(D),s=Zs(D.sourceEvent,{transform:L,snapGrid:I,snapToGrid:z,containerBounds:f}),u=dn(D.sourceEvent,f)}).on("drag",D=>{const{autoPanOnNodeDrag:B,transform:j,snapGrid:L,snapToGrid:I,nodeDragThreshold:z,nodeLookup:M}=n(),R=Zs(D.sourceEvent,{transform:j,snapGrid:L,snapToGrid:I,containerBounds:f});if(b=D.sourceEvent,(D.sourceEvent.type==="touchmove"&&D.sourceEvent.touches.length>1||C&&!M.has(C))&&(g=!0),!g){if(!c&&B&&d&&(c=!0,P()),!d){const $=dn(D.sourceEvent,f),V=$.x-u.x,O=$.y-u.y;Math.sqrt(V*V+O*O)>z&&A(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:B,updateNodePositions:j,onNodeDragStop:L,onSelectionDragStop:I}=n();if(v&&(j(l,!1),v=!1),i||L||!C&&I){const[z,M]=Vf({nodeId:C,dragItems:l,nodeLookup:B,dragging:!1});i==null||i(D.sourceEvent,l,z,M),L==null||L(D.sourceEvent,z,M),C||I==null||I(D.sourceEvent,M)}}}).filter(D=>{const B=D.target;return!D.button&&(!w||!Wx(B,`.${w}`,S))&&(!y||Wx(B,y,S))});h.call(T)}function m(){h==null||h.on(".drag",null)}return{update:_,destroy:m}}function NU(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())ja(i,Xi(s))>0&&o.push(s);return o}const EU=250;function PU(e,n,r,o){var l,c;let i=[],s=1/0;const a=NU(e,r,n+EU);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:h,y:g}=Do(u,d,d.position,!0),v=Math.sqrt(Math.pow(h-e.x,2)+Math.pow(g-e.y,2));v>n||(v<s?(i=[{...d,x:h,y:g}],s=v):v===s&&i.push({...d,x:h,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 eE(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(h=>h.id===r):l==null?void 0:l[0])??null;return c&&s?{...c,...Do(a,c,c.position,!0)}:c}function tE(e,n){return e||(n!=null&&n.classList.contains("target")?"target":n!=null&&n.classList.contains("source")?"source":null)}function jU(e,n){let r=null;return n?r=!0:e&&!n&&(r=!1),r}const nE=()=>!0;function MU(e,{connectionMode:n,connectionRadius:r,handleId:o,nodeId:i,edgeUpdaterType:s,isTarget:a,domNode:l,nodeLookup:c,lib:u,autoPanOnConnect:f,flowId:d,panBy:h,cancelConnection:g,onConnectStart:v,onConnect:b,onConnectEnd:_,isValidConnection:m=nE,onReconnectEnd:w,updateConnection:y,getTransform:S,getFromHandle:k,autoPanSpeed:C,dragThreshold:N=1,handleDomNode:E}){const P=UN(e.target);let A=0,T;const{x:D,y:B}=dn(e),j=tE(s,E),L=l==null?void 0:l.getBoundingClientRect();let I=!1;if(!L||!j)return;const z=eE(i,j,o,c,n);if(!z)return;let M=dn(e,L),R=!1,$=null,V=!1,O=null;function X(){if(!f||!L)return;const[J,Q]=zN(M,L,C);h({x:J,y:Q}),A=requestAnimationFrame(X)}const F={...z,nodeId:i,type:j,position:z.position},U=c.get(i);let W={inProgress:!0,isValid:null,from:Do(U,F,ce.Left,!0),fromHandle:F,fromPosition:F.position,fromNode:U,to:M,toHandle:null,toPosition:Tx[F.position],toNode:null,pointer:M};function Y(){I=!0,y(W),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,zt=mt-B;if(!(qe*qe+zt*zt>N*N))return;Y()}if(!k()||!F){te(J);return}const Q=S();M=dn(J,L),T=PU(nl(M,Q,!1,[1,1]),r,c,F),R||(X(),R=!0);const ne=rE(J,{handle:T,connectionMode:n,fromNodeId:i,fromHandleId:o,fromType:a?"target":"source",isValidConnection:m,doc:P,lib:u,flowId:d,nodeLookup:c});O=ne.handleDomNode,$=ne.connection,V=jU(!!T,ne.isValid);const ue=c.get(i),ye=ue?Do(ue,F,ce.Left,!0):W.from,pe={...W,from:ye,isValid:V,to:ne.toHandle&&V?Pu({x:ne.toHandle.x,y:ne.toHandle.y},Q):M,toHandle:ne.toHandle,toPosition:V&&ne.toHandle?ne.toHandle.position:Tx[F.position],toNode:ne.toHandle?c.get(ne.toHandle.nodeId):null,pointer:M};y(pe),W=pe}function te(J){if(!("touches"in J&&J.touches.length>0)){if(I){(T||O)&&$&&V&&(b==null||b($));const{inProgress:Q,...ne}=W,ue={...ne,toPosition:W.toHandle?W.toPosition:null};_==null||_(J,ue),s&&(w==null||w(J,ue))}g(),cancelAnimationFrame(A),R=!1,V=!1,$=null,O=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 rE(e,{handle:n,connectionMode:r,fromNodeId:o,fromHandleId:i,fromType:s,doc:a,lib:l,flowId:c,isValidConnection:u=nE,nodeLookup:f}){const d=s==="target",h=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),b=a.elementFromPoint(g,v),_=b!=null&&b.classList.contains(`${l}-flow__handle`)?b:h,m={handleDomNode:_,isValid:!1,connection:null,toHandle:null};if(_){const w=tE(void 0,_),y=_.getAttribute("data-nodeid"),S=_.getAttribute("data-handleid"),k=_.classList.contains("connectable"),C=_.classList.contains("connectableend");if(!y||!w)return m;const N={source:d?y:o,sourceHandle:d?S:i,target:d?o:y,targetHandle:d?i:S};m.connection=N;const P=k&&C&&(r===Gi.Strict?d&&w==="source"||!d&&w==="target":y!==o||S!==i);m.isValid=P&&u(N),m.toHandle=eE(y,w,S,f,r,!0)}return m}const Op={onPointerDown:MU,isValid:rE};function RU({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:h=!0,inversePan:g=!1}){const v=y=>{if(y.sourceEvent.type!=="wheel"||!n)return;const S=r(),k=y.sourceEvent.ctrlKey&&Ma()?10:1,C=-y.sourceEvent.deltaY*(y.sourceEvent.deltaMode===1?.05:y.sourceEvent.deltaMode?1:.002)*f,N=S[2]*Math.pow(2,C*k);n.scaleTo(N)};let b=[0,0];const _=y=>{(y.sourceEvent.type==="mousedown"||y.sourceEvent.type==="touchstart")&&(b=[y.sourceEvent.clientX??y.sourceEvent.touches[0].clientX,y.sourceEvent.clientY??y.sourceEvent.touches[0].clientY])},m=y=>{const S=r();if(y.sourceEvent.type!=="mousemove"&&y.sourceEvent.type!=="touchmove"||!n)return;const k=[y.sourceEvent.clientX??y.sourceEvent.touches[0].clientX,y.sourceEvent.clientY??y.sourceEvent.touches[0].clientY],C=[k[0]-b[0],k[1]-b[1]];b=k;const N=o()*Math.max(S[2],Math.log(S[2]))*(g?-1:1),E={x:S[0]-C[0]*N,y:S[1]-C[1]*N},P=[[0,0],[c,u]];n.setViewportConstrained({x:E.x,y:E.y,zoom:S[2]},P,l)},w=Og().on("start",_).on("zoom",d?m:null).on("zoom.wheel",h?v:null);i.call(w,{})}function a(){i.on("zoom",null)}return{update:s,destroy:a,pointer:Ut}}const Id=e=>({x:e.x,y:e.y,zoom:e.k}),Wf=({x:e,y:n,zoom:r})=>Ed.translate(e,n).scale(r),vi=(e,n)=>e.target.closest(`.${n}`),oE=(e,n)=>n===2&&Array.isArray(e)&&e.includes(2),AU=e=>((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2,Gf=(e,n=0,r=AU,o=()=>{})=>{const i=typeof n=="number"&&n>0;return i||o(),i?e.transition().duration(n).ease(r).on("end",o):e},iE=e=>{const n=e.ctrlKey&&Ma()?10:1;return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*n};function TU({zoomPanValues:e,noWheelClassName:n,d3Selection:r,d3Zoom:o,panOnScrollMode:i,panOnScrollSpeed:s,zoomOnPinch:a,onPanZoomStart:l,onPanZoom:c,onPanZoomEnd:u}){return f=>{if(vi(f,n))return f.ctrlKey&&f.preventDefault(),!1;f.preventDefault(),f.stopImmediatePropagation();const d=r.property("__zoom").k||1;if(f.ctrlKey&&a){const _=Ut(f),m=iE(f),w=d*Math.pow(2,m);o.scaleTo(r,w,_,f);return}const h=f.deltaMode===1?20:1;let g=i===So.Vertical?0:f.deltaX*h,v=i===So.Horizontal?0:f.deltaY*h;!Ma()&&f.shiftKey&&i!==So.Vertical&&(g=f.deltaY*h,v=0),o.translateBy(r,-(g/d)*s,-(v/d)*s,{internal:!0});const b=Id(r.property("__zoom"));clearTimeout(e.panScrollTimeout),e.isPanScrolling?(c==null||c(f,b),e.panScrollTimeout=setTimeout(()=>{u==null||u(f,b),e.isPanScrolling=!1},150)):(e.isPanScrolling=!0,l==null||l(f,b))}}function IU({noWheelClassName:e,preventScrolling:n,d3ZoomHandler:r}){return function(o,i){const s=o.type==="wheel",a=!n&&s&&!o.ctrlKey,l=vi(o,e);if(o.ctrlKey&&s&&l&&o.preventDefault(),a||l)return null;o.preventDefault(),r.call(this,o,i)}}function OU({zoomPanValues:e,onDraggingChange:n,onPanZoomStart:r}){return o=>{var s,a,l;if((s=o.sourceEvent)!=null&&s.internal)return;const i=Id(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 $U({zoomPanValues:e,panOnDrag:n,onPaneContextMenu:r,onTransformChange:o,onPanZoom:i}){return s=>{var a,l;e.usedRightMouseButton=!!(r&&oE(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,Id(s.transform)))}}function DU({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&&oE(n,e.mouseButton??0)&&!e.usedRightMouseButton&&a.sourceEvent&&s(a.sourceEvent),e.usedRightMouseButton=!1,o(!1),i)){const c=Id(a.transform);e.prevViewport=c,clearTimeout(e.timerId),e.timerId=setTimeout(()=>{i==null||i(a.sourceEvent,c)},r?150:0)}}}function LU({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 h=e||n,g=r&&d.ctrlKey,v=d.type==="wheel";if(d.button===1&&d.type==="mousedown"&&(vi(d,`${u}-flow__node`)||vi(d,`${u}-flow__edge`)))return!0;if(!o&&!h&&!i&&!s&&!r||a||f&&!v||vi(d,l)&&v||vi(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(!h&&!i&&!g&&v||!o&&(d.type==="mousedown"||d.type==="touchstart")||Array.isArray(o)&&!o.includes(d.button)&&d.type==="mousedown")return!1;const b=Array.isArray(o)&&o.includes(d.button)||!d.button||d.button<=1;return(!d.ctrlKey||v)&&b}}function zU({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=Og().scaleExtent([n,r]).translateExtent(o),h=st(e).call(d);w({x:i.x,y:i.y,zoom:Yi(i.zoom,n,r)},[[0,0],[f.width,f.height]],o);const g=h.on("wheel.zoom"),v=h.on("dblclick.zoom");d.wheelDelta(iE);function b(T,D){return h?new Promise(B=>{d==null||d.interpolate((D==null?void 0:D.interpolate)==="linear"?Ys:wc).transform(Gf(h,D==null?void 0:D.duration,D==null?void 0:D.ease,()=>B(!0)),T)}):Promise.resolve(!1)}function _({noWheelClassName:T,noPanClassName:D,onPaneContextMenu:B,userSelectionActive:j,panOnScroll:L,panOnDrag:I,panOnScrollMode:z,panOnScrollSpeed:M,preventScrolling:R,zoomOnPinch:$,zoomOnScroll:V,zoomOnDoubleClick:O,zoomActivationKeyPressed:X,lib:F,onTransformChange:U,connectionInProgress:G,paneClickDistance:W,selectionOnDrag:Y}){j&&!u.isZoomingOrPanning&&m();const q=L&&!X&&!j;d.clickDistance(Y?1/0:!un(W)||W<0?0:W);const te=q?TU({zoomPanValues:u,noWheelClassName:T,d3Selection:h,d3Zoom:d,panOnScrollMode:z,panOnScrollSpeed:M,zoomOnPinch:$,onPanZoomStart:a,onPanZoom:s,onPanZoomEnd:l}):IU({noWheelClassName:T,preventScrolling:R,d3ZoomHandler:g});if(h.on("wheel.zoom",te,{passive:!1}),!j){const Q=OU({zoomPanValues:u,onDraggingChange:c,onPanZoomStart:a});d.on("start",Q);const ne=$U({zoomPanValues:u,panOnDrag:I,onPaneContextMenu:!!B,onPanZoom:s,onTransformChange:U});d.on("zoom",ne);const ue=DU({zoomPanValues:u,panOnDrag:I,panOnScroll:L,onPaneContextMenu:B,onPanZoomEnd:l,onDraggingChange:c});d.on("end",ue)}const J=LU({zoomActivationKeyPressed:X,panOnDrag:I,zoomOnScroll:V,panOnScroll:L,zoomOnDoubleClick:O,zoomOnPinch:$,userSelectionActive:j,noPanClassName:D,noWheelClassName:T,lib:F,connectionInProgress:G});d.filter(J),O?h.on("dblclick.zoom",v):h.on("dblclick.zoom",null)}function m(){d.on("zoom",null)}async function w(T,D,B){const j=Wf(T),L=d==null?void 0:d.constrain()(j,D,B);return L&&await b(L),new Promise(I=>I(L))}async function y(T,D){const B=Wf(T);return await b(B,D),new Promise(j=>j(B))}function S(T){if(h){const D=Wf(T),B=h.property("__zoom");(B.k!==T.zoom||B.x!==T.x||B.y!==T.y)&&(d==null||d.transform(h,D,null,{sync:!0}))}}function k(){const T=h?on(h.node()):{x:0,y:0,k:1};return{x:T.x,y:T.y,zoom:T.k}}function C(T,D){return h?new Promise(B=>{d==null||d.interpolate((D==null?void 0:D.interpolate)==="linear"?Ys:wc).scaleTo(Gf(h,D==null?void 0:D.duration,D==null?void 0:D.ease,()=>B(!0)),T)}):Promise.resolve(!1)}function N(T,D){return h?new Promise(B=>{d==null||d.interpolate((D==null?void 0:D.interpolate)==="linear"?Ys:wc).scaleBy(Gf(h,D==null?void 0:D.duration,D==null?void 0:D.ease,()=>B(!0)),T)}):Promise.resolve(!1)}function E(T){d==null||d.scaleExtent(T)}function P(T){d==null||d.translateExtent(T)}function A(T){const D=!un(T)||T<0?0:T;d==null||d.clickDistance(D)}return{update:_,destroy:m,setViewport:y,setViewportConstrained:w,getViewport:k,scaleTo:C,scaleBy:N,setScaleExtent:E,setTranslateExtent:P,syncViewport:S,setClickDistance:A}}var qi;(function(e){e.Line="line",e.Handle="handle"})(qi||(qi={}));function FU({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 Gx(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 xr(e,n){return Math.max(0,n-e)}function wr(e,n){return Math.max(0,e-n)}function Kl(e,n,r){return Math.max(0,n-e,e-r)}function Yx(e,n){return e?!n:n}function BU(e,n,r,o,i,s,a,l){let{affectsX:c,affectsY:u}=n;const{isHorizontal:f,isVertical:d}=n,h=f&&d,{xSnapped:g,ySnapped:v}=r,{minWidth:b,maxWidth:_,minHeight:m,maxHeight:w}=o,{x:y,y:S,width:k,height:C,aspectRatio:N}=e;let E=Math.floor(f?g-e.pointerX:0),P=Math.floor(d?v-e.pointerY:0);const A=k+(c?-E:E),T=C+(u?-P:P),D=-s[0]*k,B=-s[1]*C;let j=Kl(A,b,_),L=Kl(T,m,w);if(a){let M=0,R=0;c&&E<0?M=xr(y+E+D,a[0][0]):!c&&E>0&&(M=wr(y+A+D,a[1][0])),u&&P<0?R=xr(S+P+B,a[0][1]):!u&&P>0&&(R=wr(S+T+B,a[1][1])),j=Math.max(j,M),L=Math.max(L,R)}if(l){let M=0,R=0;c&&E>0?M=wr(y+E,l[0][0]):!c&&E<0&&(M=xr(y+A,l[1][0])),u&&P>0?R=wr(S+P,l[0][1]):!u&&P<0&&(R=xr(S+T,l[1][1])),j=Math.max(j,M),L=Math.max(L,R)}if(i){if(f){const M=Kl(A/N,m,w)*N;if(j=Math.max(j,M),a){let R=0;!c&&!u||c&&!u&&h?R=wr(S+B+A/N,a[1][1])*N:R=xr(S+B+(c?E:-E)/N,a[0][1])*N,j=Math.max(j,R)}if(l){let R=0;!c&&!u||c&&!u&&h?R=xr(S+A/N,l[1][1])*N:R=wr(S+(c?E:-E)/N,l[0][1])*N,j=Math.max(j,R)}}if(d){const M=Kl(T*N,b,_)/N;if(L=Math.max(L,M),a){let R=0;!c&&!u||u&&!c&&h?R=wr(y+T*N+D,a[1][0])/N:R=xr(y+(u?P:-P)*N+D,a[0][0])/N,L=Math.max(L,R)}if(l){let R=0;!c&&!u||u&&!c&&h?R=xr(y+T*N,l[1][0])/N:R=wr(y+(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&&(h?A>T*N?P=(Yx(c,u)?-E:E)/N:E=(Yx(c,u)?-P:P)*N:f?(P=E/N,u=c):(E=P*N,c=u));const I=c?y+E:y,z=u?S+P:S;return{width:k+(c?-E:E),height:C+(u?-P:P),x:s[0]*E*(c?-1:1)+I,y:s[1]*P*(u?-1:1)+z}}const sE={width:0,height:0,x:0,y:0},HU={...sE,pointerX:0,pointerY:0,aspectRatio:1};function UU(e){return[[0,0],[e.measured.width,e.measured.height]]}function VU(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 WU({domNode:e,nodeId:n,getStoreItems:r,onChange:o,onEnd:i}){const s=st(e);let a={controlDirection:Gx("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:h,onResizeStart:g,onResize:v,onResizeEnd:b,shouldResize:_}){let m={...sE},w={...HU};a={boundaries:f,resizeDirection:h,keepAspectRatio:d,controlDirection:Gx(u)};let y,S=null,k=[],C,N,E,P=!1;const A=Pg().on("start",T=>{const{nodeLookup:D,transform:B,snapGrid:j,snapToGrid:L,nodeOrigin:I,paneDomNode:z}=r();if(y=D.get(n),!y)return;S=(z==null?void 0:z.getBoundingClientRect())??null;const{xSnapped:M,ySnapped:R}=Zs(T.sourceEvent,{transform:B,snapGrid:j,snapToGrid:L,containerBounds:S});m={width:y.measured.width??0,height:y.measured.height??0,x:y.position.x??0,y:y.position.y??0},w={...m,pointerX:M,pointerY:R,aspectRatio:m.width/m.height},C=void 0,y.parentId&&(y.extent==="parent"||y.expandParent)&&(C=D.get(y.parentId),N=C&&y.extent==="parent"?UU(C):void 0),k=[],E=void 0;for(const[$,V]of D)if(V.parentId===n&&(k.push({id:$,position:{...V.position},extent:V.extent}),V.extent==="parent"||V.expandParent)){const O=VU(V,y,V.origin??I);E?E=[[Math.min(O[0][0],E[0][0]),Math.min(O[0][1],E[0][1])],[Math.max(O[1][0],E[1][0]),Math.max(O[1][1],E[1][1])]]:E=O}g==null||g(T,{...m})}).on("drag",T=>{const{transform:D,snapGrid:B,snapToGrid:j,nodeOrigin:L}=r(),I=Zs(T.sourceEvent,{transform:D,snapGrid:B,snapToGrid:j,containerBounds:S}),z=[];if(!y)return;const{x:M,y:R,width:$,height:V}=m,O={},X=y.origin??L,{width:F,height:U,x:G,y:W}=BU(w,a.controlDirection,I,a.boundaries,a.keepAspectRatio,X,N,E),Y=F!==$,q=U!==V,te=G!==M&&Y,J=W!==R&&q;if(!te&&!J&&!Y&&!q)return;if((te||J||X[0]===1||X[1]===1)&&(O.x=te?G:m.x,O.y=J?W:m.y,m.x=O.x,m.y=O.y,k.length>0)){const ye=G-M,pe=W-R;for(const Ne of k)Ne.position={x:Ne.position.x-ye+X[0]*(F-$),y:Ne.position.y-pe+X[1]*(U-V)},z.push(Ne)}if((Y||q)&&(O.width=Y&&(!a.resizeDirection||a.resizeDirection==="horizontal")?F:m.width,O.height=q&&(!a.resizeDirection||a.resizeDirection==="vertical")?U:m.height,m.width=O.width,m.height=O.height),C&&y.expandParent){const ye=X[0]*(O.width??0);O.x&&O.x<ye&&(m.x=ye,w.x=w.x-(O.x-ye));const pe=X[1]*(O.height??0);O.y&&O.y<pe&&(m.y=pe,w.y=w.y-(O.y-pe))}const Q=FU({width:m.width,prevWidth:$,height:m.height,prevHeight:V,affectsX:a.controlDirection.affectsX,affectsY:a.controlDirection.affectsY}),ne={...m,direction:Q};(_==null?void 0:_(T,ne))!==!1&&(P=!0,v==null||v(T,ne),o(O,z))}).on("end",T=>{P&&(b==null||b(T,{...m}),i==null||i({...m}),P=!1)});s.call(A)}function c(){s.on(".drag",null)}return{update:l,destroy:c}}var aE={exports:{}},lE={};/**
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=x,GU=y_;function YU(e,n){return e===n&&(e!==0||1/e===1/n)||e!==e&&n!==n}var XU=typeof Object.is=="function"?Object.is:YU,KU=GU.useSyncExternalStore,qU=Od.useRef,QU=Od.useEffect,ZU=Od.useMemo,JU=Od.useDebugValue;lE.useSyncExternalStoreWithSelector=function(e,n,r,o,i){var s=qU(null);if(s.current===null){var a={hasValue:!1,value:null};s.current=a}else a=s.current;s=ZU(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,XU(f,g))return v;var b=o(g);return i!==void 0&&i(v,b)?(f=g,v):(f=g,d=b)}var u=!1,f,d,h=r===void 0?null:r;return[function(){return c(n())},h===null?void 0:function(){return c(h())}]},[n,r,o,i]);var l=KU(e,s[0],s[1]);return QU(function(){a.hasValue=!0,a.value=l},[l]),JU(l),l};aE.exports=lE;var eV=aE.exports;const tV=Au(eV),nV={},Xx=e=>{let n;const r=new Set,o=(f,d)=>{const h=typeof f=="function"?f(n):f;if(!Object.is(h,n)){const g=n;n=d??(typeof h!="object"||h===null)?h:Object.assign({},n,h),r.forEach(v=>v(n,g))}},i=()=>n,c={setState:o,getState:i,getInitialState:()=>u,subscribe:f=>(r.add(f),()=>r.delete(f)),destroy:()=>{(nV?"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},rV=e=>e?Xx(e):Xx,{useDebugValue:oV}=ot,{useSyncExternalStoreWithSelector:iV}=tV,sV=e=>e;function cE(e,n=sV,r){const o=iV(e.subscribe,e.getState,e.getServerState||e.getInitialState,n,r);return oV(o),o}const Kx=(e,n)=>{const r=rV(e),o=(i,s=n)=>cE(r,i,s);return Object.assign(o,r),o},aV=(e,n)=>e?Kx(e,n):Kx;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 $d=x.createContext(null),lV=$d.Provider,uE=On.error001();function we(e,n){const r=x.useContext($d);if(r===null)throw new Error(uE);return cE(r,e,n)}function Ie(){const e=x.useContext($d);if(e===null)throw new Error(uE);return x.useMemo(()=>({getState:e.getState,setState:e.setState,subscribe:e.subscribe}),[e])}const qx={display:"none"},cV={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},dE="react-flow__node-desc",fE="react-flow__edge-desc",uV="react-flow__aria-live",dV=e=>e.ariaLiveMessage,fV=e=>e.ariaLabelConfig;function hV({rfId:e}){const n=we(dV);return p.jsx("div",{id:`${uV}-${e}`,"aria-live":"assertive","aria-atomic":"true",style:cV,children:n})}function pV({rfId:e,disableKeyboardA11y:n}){const r=we(fV);return p.jsxs(p.Fragment,{children:[p.jsx("div",{id:`${dE}-${e}`,style:qx,children:n?r["node.a11yDescription.default"]:r["node.a11yDescription.keyboardDisabled"]}),p.jsx("div",{id:`${fE}-${e}`,style:qx,children:r["edge.a11yDescription.default"]}),!n&&p.jsx(hV,{rfId:e})]})}const Dd=x.forwardRef(({position:e="top-left",children:n,className:r,style:o,...i},s)=>{const a=`${e}`.split("-");return p.jsx("div",{className:He(["react-flow__panel",r,...a]),style:o,ref:s,...i,children:n})});Dd.displayName="Panel";function mV({proOptions:e,position:n="bottom-right"}){return e!=null&&e.hideAttribution?null:p.jsx(Dd,{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:p.jsx("a",{href:"https://reactflow.dev",target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution",children:"React Flow"})})}const gV=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 vV(e,n){return Te(e.selectedNodes.map(ql),n.selectedNodes.map(ql))&&Te(e.selectedEdges.map(ql),n.selectedEdges.map(ql))}function yV({onSelectionChange:e}){const n=Ie(),{selectedNodes:r,selectedEdges:o}=we(gV,vV);return x.useEffect(()=>{const i={nodes:r,edges:o};e==null||e(i),n.getState().onSelectionChangeHandlers.forEach(s=>s(i))},[r,o,e]),null}const xV=e=>!!e.onSelectionChangeHandlers;function wV({onSelectionChange:e}){const n=we(xV);return e||n?p.jsx(yV,{onSelectionChange:e}):null}const $p=typeof window<"u"?x.useLayoutEffect:x.useEffect,hE=[0,0],bV={x:0,y:0,zoom:1},_V=["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"],Qx=[..._V,"rfId"],SV=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}),Zx={translateExtent:Ea,nodeOrigin:hE,minZoom:.5,maxZoom:2,elementsSelectable:!0,noPanClassName:"nopan",rfId:"1"};function kV(e){const{setNodes:n,setEdges:r,setMinZoom:o,setMaxZoom:i,setTranslateExtent:s,setNodeExtent:a,reset:l,setDefaultNodesAndEdges:c}=we(SV,Te),u=Ie();$p(()=>(c(e.defaultNodes,e.defaultEdges),()=>{f.current=Zx,l()}),[]);const f=x.useRef(Zx);return $p(()=>{for(const d of Qx){const h=e[d],g=f.current[d];h!==g&&(typeof e[d]>"u"||(d==="nodes"?n(h):d==="edges"?r(h):d==="minZoom"?o(h):d==="maxZoom"?i(h):d==="translateExtent"?s(h):d==="nodeExtent"?a(h):d==="ariaLabelConfig"?u.setState({ariaLabelConfig:rU(h)}):d==="fitView"?u.setState({fitViewQueued:h}):d==="fitViewOptions"?u.setState({fitViewOptions:h}):u.setState({[d]:h})))}f.current=e},Qx.map(d=>e[d])),null}function Jx(){return typeof window>"u"||!window.matchMedia?null:window.matchMedia("(prefers-color-scheme: dark)")}function CV(e){var o;const[n,r]=x.useState(e==="system"?null:e);return x.useEffect(()=>{if(e!=="system"){r(e);return}const i=Jx(),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=Jx())!=null&&o.matches?"dark":"light"}const e1=typeof document<"u"?document:null;function Ra(e=null,n={target:e1,actInsideInputWithModifier:!0}){const[r,o]=x.useState(!1),i=x.useRef(!1),s=x.useRef(new Set([])),[a,l]=x.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,h)=>d.concat(...h),[]);return[u,f]}return[[],[]]},[e]);return x.useEffect(()=>{const c=(n==null?void 0:n.target)??e1,u=(n==null?void 0:n.actInsideInputWithModifier)??!0;if(e!==null){const f=g=>{var _,m;if(i.current=g.ctrlKey||g.metaKey||g.shiftKey||g.altKey,(!i.current||i.current&&!u)&&VN(g))return!1;const b=n1(g.code,l);if(s.current.add(g[b]),t1(a,s.current,!1)){const w=((m=(_=g.composedPath)==null?void 0:_.call(g))==null?void 0:m[0])||g.target,y=(w==null?void 0:w.nodeName)==="BUTTON"||(w==null?void 0:w.nodeName)==="A";n.preventDefault!==!1&&(i.current||!y)&&g.preventDefault(),o(!0)}},d=g=>{const v=n1(g.code,l);t1(a,s.current,!0)?(o(!1),s.current.clear()):s.current.delete(g[v]),g.key==="Meta"&&s.current.clear(),i.current=!1},h=()=>{s.current.clear(),o(!1)};return c==null||c.addEventListener("keydown",f),c==null||c.addEventListener("keyup",d),window.addEventListener("blur",h),window.addEventListener("contextmenu",h),()=>{c==null||c.removeEventListener("keydown",f),c==null||c.removeEventListener("keyup",d),window.removeEventListener("blur",h),window.removeEventListener("contextmenu",h)}}},[e,o]),r}function t1(e,n,r){return e.filter(o=>r||o.length===n.size).some(o=>o.every(i=>n.has(i)))}function n1(e,n){return n.includes(e)?"code":"key"}const NV=()=>{const e=Ie();return x.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=Kg(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 pE(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)EV(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 EV(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 PV(e,n){return pE(e,n)}function jV(e,n){return pE(e,n)}function ho(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(ho(s.id,a)))}return o}function r1({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 o1(e){return{id:e.id,type:"remove"}}const i1=e=>YH(e),MV=e=>$N(e);function mE(e){return x.forwardRef(e)}function s1(e){const[n,r]=x.useState(BigInt(0)),[o]=x.useState(()=>RV(()=>r(i=>i+BigInt(1))));return $p(()=>{const i=o.get();i.length&&(e(i),o.reset())},[n]),o}function RV(e){let n=[];return{get:()=>n,reset:()=>{n=[]},push:r=>{n.push(r),e()}}}const gE=x.createContext(null);function AV({children:e}){const n=Ie(),r=x.useCallback(l=>{const{nodes:c=[],setNodes:u,hasDefaultNodes:f,onNodesChange:d,nodeLookup:h,fitViewQueued:g,onNodesChangeMiddlewareMap:v}=n.getState();let b=c;for(const m of l)b=typeof m=="function"?m(b):m;let _=r1({items:b,lookup:h});for(const m of v.values())_=m(_);f&&u(b),_.length>0?d==null||d(_):g&&window.requestAnimationFrame(()=>{const{fitViewQueued:m,nodes:w,setNodes:y}=n.getState();m&&y(w)})},[]),o=s1(r),i=x.useCallback(l=>{const{edges:c=[],setEdges:u,hasDefaultEdges:f,onEdgesChange:d,edgeLookup:h}=n.getState();let g=c;for(const v of l)g=typeof v=="function"?v(g):v;f?u(g):d&&d(r1({items:g,lookup:h}))},[]),s=s1(i),a=x.useMemo(()=>({nodeQueue:o,edgeQueue:s}),[]);return p.jsx(gE.Provider,{value:a,children:e})}function TV(){const e=x.useContext(gE);if(!e)throw new Error("useBatchContext must be used within a BatchProvider");return e}const IV=e=>!!e.panZoom;function n0(){const e=NV(),n=Ie(),r=TV(),o=we(IV),i=x.useMemo(()=>{const s=d=>n.getState().nodeLookup.get(d),a=d=>{r.nodeQueue.push(d)},l=d=>{r.edgeQueue.push(d)},c=d=>{var m,w;const{nodeLookup:h,nodeOrigin:g}=n.getState(),v=i1(d)?d:h.get(d.id),b=v.parentId?HN(v.position,v.measured,v.parentId,h,g):v.position,_={...v,position:b,width:((m=v.measured)==null?void 0:m.width)??v.width,height:((w=v.measured)==null?void 0:w.height)??v.height};return Xi(_)},u=(d,h,g={replace:!1})=>{a(v=>v.map(b=>{if(b.id===d){const _=typeof h=="function"?h(b):h;return g.replace&&i1(_)?_:{...b,..._}}return b}))},f=(d,h,g={replace:!1})=>{l(v=>v.map(b=>{if(b.id===d){const _=typeof h=="function"?h(b):h;return g.replace&&MV(_)?_:{...b,..._}}return b}))};return{getNodes:()=>n.getState().nodes.map(d=>({...d})),getNode:d=>{var h;return(h=s(d))==null?void 0:h.internals.userNode},getInternalNode:s,getEdges:()=>{const{edges:d=[]}=n.getState();return d.map(h=>({...h}))},getEdge:d=>n.getState().edgeLookup.get(d),setNodes:a,setEdges:l,addNodes:d=>{const h=Array.isArray(d)?d:[d];r.nodeQueue.push(g=>[...g,...h])},addEdges:d=>{const h=Array.isArray(d)?d:[d];r.edgeQueue.push(g=>[...g,...h])},toObject:()=>{const{nodes:d=[],edges:h=[],transform:g}=n.getState(),[v,b,_]=g;return{nodes:d.map(m=>({...m})),edges:h.map(m=>({...m})),viewport:{x:v,y:b,zoom:_}}},deleteElements:async({nodes:d=[],edges:h=[]})=>{const{nodes:g,edges:v,onNodesDelete:b,onEdgesDelete:_,triggerNodeChanges:m,triggerEdgeChanges:w,onDelete:y,onBeforeDelete:S}=n.getState(),{nodes:k,edges:C}=await ZH({nodesToRemove:d,edgesToRemove:h,nodes:g,edges:v,onBeforeDelete:S}),N=C.length>0,E=k.length>0;if(N){const P=C.map(o1);_==null||_(C),w(P)}if(E){const P=k.map(o1);b==null||b(k),m(P)}return(E||N)&&(y==null||y({nodes:k,edges:C})),{deletedNodes:k,deletedEdges:C}},getIntersectingNodes:(d,h=!0,g)=>{const v=Ox(d),b=v?d:c(d),_=g!==void 0;return b?(g||n.getState().nodes).filter(m=>{const w=n.getState().nodeLookup.get(m.id);if(w&&!v&&(m.id===d.id||!w.internals.positionAbsolute))return!1;const y=Xi(_?m:w),S=ja(y,b);return h&&S>0||S>=y.width*y.height||S>=b.width*b.height}):[]},isNodeIntersecting:(d,h,g=!0)=>{const b=Ox(d)?d:c(d);if(!b)return!1;const _=ja(b,h);return g&&_>0||_>=h.width*h.height||_>=b.width*b.height},updateNode:u,updateNodeData:(d,h,g={replace:!1})=>{u(d,v=>{const b=typeof h=="function"?h(v):h;return g.replace?{...v,data:b}:{...v,data:{...v.data,...b}}},g)},updateEdge:f,updateEdgeData:(d,h,g={replace:!1})=>{f(d,v=>{const b=typeof h=="function"?h(v):h;return g.replace?{...v,data:b}:{...v,data:{...v.data,...b}}},g)},getNodesBounds:d=>{const{nodeLookup:h,nodeOrigin:g}=n.getState();return XH(d,{nodeLookup:h,nodeOrigin:g})},getHandleConnections:({type:d,id:h,nodeId:g})=>{var v;return Array.from(((v=n.getState().connectionLookup.get(`${g}-${d}${h?`-${h}`:""}`))==null?void 0:v.values())??[])},getNodeConnections:({type:d,handleId:h,nodeId:g})=>{var v;return Array.from(((v=n.getState().connectionLookup.get(`${g}${d?h?`-${d}-${h}`:`-${d}`:""}`))==null?void 0:v.values())??[])},fitView:async d=>{const h=n.getState().fitViewResolver??nU();return n.setState({fitViewQueued:!0,fitViewOptions:d,fitViewResolver:h}),r.nodeQueue.push(g=>[...g]),h.promise}}},[]);return x.useMemo(()=>({...i,...e,viewportInitialized:o}),[o])}const a1=e=>e.selected,OV=typeof window<"u"?window:void 0;function $V({deleteKeyCode:e,multiSelectionKeyCode:n}){const r=Ie(),{deleteElements:o}=n0(),i=Ra(e,{actInsideInputWithModifier:!1}),s=Ra(n,{target:OV});x.useEffect(()=>{if(i){const{edges:a,nodes:l}=r.getState();o({nodes:l.filter(a1),edges:a.filter(a1)}),r.setState({nodesSelectionActive:!1})}},[i]),x.useEffect(()=>{r.setState({multiSelectionActive:s})},[s])}function DV(e){const n=Ie();x.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",On.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 Ld={position:"absolute",width:"100%",height:"100%",top:0,left:0},LV=e=>({userSelectionActive:e.userSelectionActive,lib:e.lib,connectionInProgress:e.connection.inProgress});function zV({onPaneContextMenu:e,zoomOnScroll:n=!0,zoomOnPinch:r=!0,panOnScroll:o=!1,panOnScrollSpeed:i=.5,panOnScrollMode:s=So.Free,zoomOnDoubleClick:a=!0,panOnDrag:l=!0,defaultViewport:c,translateExtent:u,minZoom:f,maxZoom:d,zoomActivationKeyCode:h,preventScrolling:g=!0,children:v,noWheelClassName:b,noPanClassName:_,onViewportChange:m,isControlledViewport:w,paneClickDistance:y,selectionOnDrag:S}){const k=Ie(),C=x.useRef(null),{userSelectionActive:N,lib:E,connectionInProgress:P}=we(LV,Te),A=Ra(h),T=x.useRef();DV(C);const D=x.useCallback(B=>{m==null||m({x:B[0],y:B[1],zoom:B[2]}),w||k.setState({transform:B})},[m,w]);return x.useEffect(()=>{if(C.current){T.current=zU({domNode:C.current,minZoom:f,maxZoom:d,translateExtent:u,viewport:c,onDraggingChange:I=>k.setState(z=>z.paneDragging===I?z:{paneDragging:I}),onPanZoomStart:(I,z)=>{const{onViewportChangeStart:M,onMoveStart:R}=k.getState();R==null||R(I,z),M==null||M(z)},onPanZoom:(I,z)=>{const{onViewportChange:M,onMove:R}=k.getState();R==null||R(I,z),M==null||M(z)},onPanZoomEnd:(I,z)=>{const{onViewportChangeEnd:M,onMoveEnd:R}=k.getState();R==null||R(I,z),M==null||M(z)}});const{x:B,y:j,zoom:L}=T.current.getViewport();return k.setState({panZoom:T.current,transform:[B,j,L],domNode:C.current.closest(".react-flow")}),()=>{var I;(I=T.current)==null||I.destroy()}}},[]),x.useEffect(()=>{var B;(B=T.current)==null||B.update({onPaneContextMenu:e,zoomOnScroll:n,zoomOnPinch:r,panOnScroll:o,panOnScrollSpeed:i,panOnScrollMode:s,zoomOnDoubleClick:a,panOnDrag:l,zoomActivationKeyPressed:A,preventScrolling:g,noPanClassName:_,userSelectionActive:N,noWheelClassName:b,lib:E,onTransformChange:D,connectionInProgress:P,selectionOnDrag:S,paneClickDistance:y})},[e,n,r,o,i,s,a,l,A,g,_,N,b,E,D,P,S,y]),p.jsx("div",{className:"react-flow__renderer",ref:C,style:Ld,children:v})}const FV=e=>({userSelectionActive:e.userSelectionActive,userSelectionRect:e.userSelectionRect});function BV(){const{userSelectionActive:e,userSelectionRect:n}=we(FV,Te);return e&&n?p.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 Yf=(e,n)=>r=>{r.target===n.current&&(e==null||e(r))},HV=e=>({userSelectionActive:e.userSelectionActive,elementsSelectable:e.elementsSelectable,connectionInProgress:e.connection.inProgress,dragging:e.paneDragging});function UV({isSelecting:e,selectionKeyPressed:n,selectionMode:r=Pa.Full,panOnDrag:o,paneClickDistance:i,selectionOnDrag:s,onSelectionStart:a,onSelectionEnd:l,onPaneClick:c,onPaneContextMenu:u,onPaneScroll:f,onPaneMouseEnter:d,onPaneMouseMove:h,onPaneMouseLeave:g,children:v}){const b=Ie(),{userSelectionActive:_,elementsSelectable:m,dragging:w,connectionInProgress:y}=we(HV,Te),S=m&&(e||_),k=x.useRef(null),C=x.useRef(),N=x.useRef(new Set),E=x.useRef(new Set),P=x.useRef(!1),A=M=>{if(P.current||y){P.current=!1;return}c==null||c(M),b.getState().resetSelectedElements(),b.setState({nodesSelectionActive:!1})},T=M=>{if(Array.isArray(o)&&(o!=null&&o.includes(2))){M.preventDefault();return}u==null||u(M)},D=f?M=>f(M):void 0,B=M=>{P.current&&(M.stopPropagation(),P.current=!1)},j=M=>{var U,G;const{domNode:R}=b.getState();if(C.current=R==null?void 0:R.getBoundingClientRect(),!C.current)return;const $=M.target===k.current;if(!$&&!!M.target.closest(".nokey")||!e||!(s&&$||n)||M.button!==0||!M.isPrimary)return;(G=(U=M.target)==null?void 0:U.setPointerCapture)==null||G.call(U,M.pointerId),P.current=!1;const{x:X,y:F}=dn(M.nativeEvent,C.current);b.setState({userSelectionRect:{width:0,height:0,startX:X,startY:F,x:X,y:F}}),$||(M.stopPropagation(),M.preventDefault())},L=M=>{const{userSelectionRect:R,transform:$,nodeLookup:V,edgeLookup:O,connectionLookup:X,triggerNodeChanges:F,triggerEdgeChanges:U,defaultEdgeOptions:G,resetSelectedElements:W}=b.getState();if(!C.current||!R)return;const{x:Y,y:q}=dn(M.nativeEvent,C.current),{startX:te,startY:J}=R;if(!P.current){const pe=n?0:i;if(Math.hypot(Y-te,q-J)<=pe)return;W(),a==null||a(M)}P.current=!0;const Q={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(Xg(V,Q,$,r===Pa.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=O.get(mt);qe&&(qe.selectable??ye)&&E.current.add(mt)}}if(!$x(ne,N.current)){const pe=yi(V,N.current,!0);F(pe)}if(!$x(ue,E.current)){const pe=yi(O,E.current);U(pe)}b.setState({userSelectionRect:Q,userSelectionActive:!0,nodesSelectionActive:!1})},I=M=>{var R,$;M.button===0&&(($=(R=M.target)==null?void 0:R.releasePointerCapture)==null||$.call(R,M.pointerId),!_&&M.target===k.current&&b.getState().userSelectionRect&&(A==null||A(M)),b.setState({userSelectionActive:!1,userSelectionRect:null}),P.current&&(l==null||l(M),b.setState({nodesSelectionActive:N.current.size>0})))},z=o===!0||Array.isArray(o)&&o.includes(0);return p.jsxs("div",{className:He(["react-flow__pane",{draggable:z,dragging:w,selection:e}]),onClick:S?void 0:Yf(A,k),onContextMenu:Yf(T,k),onWheel:Yf(D,k),onPointerEnter:S?void 0:d,onPointerMove:S?L:h,onPointerUp:S?I:void 0,onPointerDownCapture:S?j:void 0,onClickCapture:S?B:void 0,onPointerLeave:g,ref:k,style:Ld,children:[v,p.jsx(BV,{})]})}function Dp({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",On.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 vE({nodeRef:e,disabled:n=!1,noDragClassName:r,handleSelector:o,nodeId:i,isSelectable:s,nodeClickDistance:a}){const l=Ie(),[c,u]=x.useState(!1),f=x.useRef();return x.useEffect(()=>{f.current=CU({getStoreItems:()=>l.getState(),onNodeMouseDown:d=>{Dp({id:d,store:l,nodeRef:e})},onDragStart:()=>{u(!0)},onDragStop:()=>{u(!1)}})},[]),x.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 VV=e=>n=>n.selected&&(n.draggable||e&&typeof n.draggable>"u");function yE(){const e=Ie();return x.useCallback(r=>{const{nodeExtent:o,snapToGrid:i,snapGrid:s,nodesDraggable:a,onError:l,updateNodePositions:c,nodeLookup:u,nodeOrigin:f}=e.getState(),d=new Map,h=VV(a),g=i?s[0]:5,v=i?s[1]:5,b=r.direction.x*g*r.factor,_=r.direction.y*v*r.factor;for(const[,m]of u){if(!h(m))continue;let w={x:m.internals.positionAbsolute.x+b,y:m.internals.positionAbsolute.y+_};i&&(w=tl(w,s));const{position:y,positionAbsolute:S}=DN({nodeId:m.id,nextPosition:w,nodeLookup:u,nodeExtent:o,nodeOrigin:f,onError:l});m.position=y,m.internals.positionAbsolute=S,d.set(m.id,m)}c(d)},[])}const r0=x.createContext(null),WV=r0.Provider;r0.Consumer;const xE=()=>x.useContext(r0),GV=e=>({connectOnClick:e.connectOnClick,noPanClassName:e.noPanClassName,rfId:e.rfId}),YV=(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===Gi.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 XV({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,...h},g){var L,I;const v=a||null,b=e==="target",_=Ie(),m=xE(),{connectOnClick:w,noPanClassName:y,rfId:S}=we(GV,Te),{connectingFrom:k,connectingTo:C,clickConnecting:N,isPossibleEndHandle:E,connectionInProcess:P,clickConnectionInProcess:A,valid:T}=we(YV(m,v,e),Te);m||(I=(L=_.getState()).onError)==null||I.call(L,"010",On.error010());const D=z=>{const{defaultEdgeOptions:M,onConnect:R,hasDefaultEdges:$}=_.getState(),V={...M,...z};if($){const{edges:O,setEdges:X}=_.getState();X(cU(V,O))}R==null||R(V),l==null||l(V)},B=z=>{if(!m)return;const M=WN(z.nativeEvent);if(i&&(M&&z.button===0||!M)){const R=_.getState();Op.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:b,handleId:v,nodeId:m,flowId:R.rfId,panBy:R.panBy,cancelConnection:R.cancelConnection,onConnectStart:R.onConnectStart,onConnectEnd:(...$)=>{var V,O;return(O=(V=_.getState()).onConnectEnd)==null?void 0:O.call(V,...$)},updateConnection:R.updateConnection,onConnect:D,isValidConnection:r||((...$)=>{var V,O;return((O=(V=_.getState()).isValidConnection)==null?void 0:O.call(V,...$))??!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:$,connectionMode:V,isValidConnection:O,lib:X,rfId:F,nodeLookup:U,connection:G}=_.getState();if(!m||!$&&!i)return;if(!$){M==null||M(z.nativeEvent,{nodeId:m,handleId:v,handleType:e}),_.setState({connectionClickStartHandle:{nodeId:m,type:e,id:v}});return}const W=UN(z.target),Y=r||O,{connection:q,isValid:te}=Op.isValid(z.nativeEvent,{handle:{nodeId:m,id:v,type:e},connectionMode:V,fromNodeId:$.nodeId,fromHandleId:$.id||null,fromType:$.type,isValidConnection:Y,flowId:F,doc:W,lib:X,nodeLookup:U});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 p.jsx("div",{"data-handleid":v,"data-nodeid":m,"data-handlepos":n,"data-id":`${S}-${m}-${v}-${e}`,className:He(["react-flow__handle",`react-flow__handle-${n}`,"nodrag",y,u,{source:!b,target:b,connectable:o,connectablestart:i,connectableend:s,clickconnecting:N,connectingfrom:k,connectingto:C,valid:T,connectionindicator:o&&(!P||E)&&(P||A?s:i)}]),onMouseDown:B,onTouchStart:B,onClick:w?j:void 0,ref:g,...h,children:c})}const ju=x.memo(mE(XV));function KV({data:e,isConnectable:n,sourcePosition:r=ce.Bottom}){return p.jsxs(p.Fragment,{children:[e==null?void 0:e.label,p.jsx(ju,{type:"source",position:r,isConnectable:n})]})}function qV({data:e,isConnectable:n,targetPosition:r=ce.Top,sourcePosition:o=ce.Bottom}){return p.jsxs(p.Fragment,{children:[p.jsx(ju,{type:"target",position:r,isConnectable:n}),e==null?void 0:e.label,p.jsx(ju,{type:"source",position:o,isConnectable:n})]})}function QV(){return null}function ZV({data:e,isConnectable:n,targetPosition:r=ce.Top}){return p.jsxs(p.Fragment,{children:[p.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}},l1={input:KV,default:qV,output:ZV,group:QV};function JV(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 eW=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 tW({onSelectionContextMenu:e,noPanClassName:n,disableKeyboardA11y:r}){const o=Ie(),{width:i,height:s,transformString:a,userSelectionActive:l}=we(eW,Te),c=yE(),u=x.useRef(null);x.useEffect(()=>{var g;r||(g=u.current)==null||g.focus({preventScroll:!0})},[r]);const f=!l&&i!==null&&s!==null;if(vE({nodeRef:u,disabled:!f}),!f)return null;const d=e?g=>{const v=o.getState().nodes.filter(b=>b.selected);e(g,v)}:void 0,h=g=>{Object.prototype.hasOwnProperty.call(Mu,g.key)&&(g.preventDefault(),c({direction:Mu[g.key],factor:g.shiftKey?4:1}))};return p.jsx("div",{className:He(["react-flow__nodesselection","react-flow__container",n]),style:{transform:a},children:p.jsx("div",{ref:u,className:"react-flow__nodesselection-rect",onContextMenu:d,tabIndex:r?void 0:-1,onKeyDown:r?void 0:h,style:{width:i,height:s}})})}const c1=typeof window<"u"?window:void 0,nW=e=>({nodesSelectionActive:e.nodesSelectionActive,userSelectionActive:e.userSelectionActive});function wE({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:h,onSelectionEnd:g,multiSelectionKeyCode:v,panActivationKeyCode:b,zoomActivationKeyCode:_,elementsSelectable:m,zoomOnScroll:w,zoomOnPinch:y,panOnScroll:S,panOnScrollSpeed:k,panOnScrollMode:C,zoomOnDoubleClick:N,panOnDrag:E,defaultViewport:P,translateExtent:A,minZoom:T,maxZoom:D,preventScrolling:B,onSelectionContextMenu:j,noWheelClassName:L,noPanClassName:I,disableKeyboardA11y:z,onViewportChange:M,isControlledViewport:R}){const{nodesSelectionActive:$,userSelectionActive:V}=we(nW,Te),O=Ra(u,{target:c1}),X=Ra(b,{target:c1}),F=X||E,U=X||S,G=f&&F!==!0,W=O||V||G;return $V({deleteKeyCode:c,multiSelectionKeyCode:v}),p.jsx(zV,{onPaneContextMenu:s,elementsSelectable:m,zoomOnScroll:w,zoomOnPinch:y,panOnScroll:U,panOnScrollSpeed:k,panOnScrollMode:C,zoomOnDoubleClick:N,panOnDrag:!O&&F,defaultViewport:P,translateExtent:A,minZoom:T,maxZoom:D,zoomActivationKeyCode:_,preventScrolling:B,noWheelClassName:L,noPanClassName:I,onViewportChange:M,isControlledViewport:R,paneClickDistance:l,selectionOnDrag:G,children:p.jsxs(UV,{onSelectionStart:h,onSelectionEnd:g,onPaneClick:n,onPaneMouseEnter:r,onPaneMouseMove:o,onPaneMouseLeave:i,onPaneContextMenu:s,onPaneScroll:a,panOnDrag:F,isSelecting:!!W,selectionMode:d,selectionKeyPressed:O,paneClickDistance:l,selectionOnDrag:G,children:[e,$&&p.jsx(tW,{onSelectionContextMenu:j,noPanClassName:I,disableKeyboardA11y:z})]})})}wE.displayName="FlowRenderer";const rW=x.memo(wE),oW=e=>n=>e?Xg(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 iW(e){return we(x.useCallback(oW(e),[e]),Te)}const sW=e=>e.updateNodeInternals;function aW(){const e=we(sW),[n]=x.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 x.useEffect(()=>()=>{n==null||n.disconnect()},[n]),n}function lW({node:e,nodeType:n,hasDimensions:r,resizeObserver:o}){const i=Ie(),s=x.useRef(null),a=x.useRef(null),l=x.useRef(e.sourcePosition),c=x.useRef(e.targetPosition),u=x.useRef(n),f=r&&!!e.internals.handleBounds;return x.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]),x.useEffect(()=>()=>{a.current&&(o==null||o.unobserve(a.current),a.current=null)},[]),x.useEffect(()=>{if(s.current){const d=u.current!==n,h=l.current!==e.sourcePosition,g=c.current!==e.targetPosition;(d||h||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 cW({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:h,noPanClassName:g,disableKeyboardA11y:v,rfId:b,nodeTypes:_,nodeClickDistance:m,onError:w}){const{node:y,internals:S,isParent:k}=we(Y=>{const q=Y.nodeLookup.get(e),te=Y.parentLookup.has(e);return{node:q,internals:q.internals,isParent:te}},Te);let C=y.type||"default",N=(_==null?void 0:_[C])||l1[C];N===void 0&&(w==null||w("003",On.error003(C)),C="default",N=(_==null?void 0:_.default)||l1.default);const E=!!(y.draggable||l&&typeof y.draggable>"u"),P=!!(y.selectable||c&&typeof y.selectable>"u"),A=!!(y.connectable||u&&typeof y.connectable>"u"),T=!!(y.focusable||f&&typeof y.focusable>"u"),D=Ie(),B=BN(y),j=lW({node:y,nodeType:C,hasDimensions:B,resizeObserver:d}),L=vE({nodeRef:j,disabled:y.hidden||!E,noDragClassName:h,handleSelector:y.dragHandle,nodeId:e,isSelectable:P,nodeClickDistance:m}),I=yE();if(y.hidden)return null;const z=ur(y),M=JV(y),R=P||E||n||r||o||i,$=r?Y=>r(Y,{...S.userNode}):void 0,V=o?Y=>o(Y,{...S.userNode}):void 0,O=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,U=Y=>{const{selectNodesOnDrag:q,nodeDragThreshold:te}=D.getState();P&&(!q||!E||te>0)&&Dp({id:e,store:D,nodeRef:j}),n&&n(Y,{...S.userNode})},G=Y=>{if(!(VN(Y.nativeEvent)||v)){if(AN.includes(Y.key)&&P){const q=Y.key==="Escape";Dp({id:e,store:D,unselect:q,nodeRef:j})}else if(E&&y.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})}}},W=()=>{var ue;if(v||!((ue=j.current)!=null&&ue.matches(":focus-visible")))return;const{transform:Y,width:q,height:te,autoPanOnNodeFocus:J,setCenter:Q}=D.getState();if(!J)return;Xg(new Map([[e,y]]),{x:0,y:0,width:q,height:te},Y,!0).length>0||Q(y.position.x+z.width/2,y.position.y+z.height/2,{zoom:Y[2]})};return p.jsx("div",{className:He(["react-flow__node",`react-flow__node-${C}`,{[g]:E},y.className,{selected:y.selected,selectable:P,parent:k,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:B?"visible":"hidden",...y.style,...M},"data-id":e,"data-testid":`rf__node-${e}`,onMouseEnter:$,onMouseMove:V,onMouseLeave:O,onContextMenu:X,onClick:U,onDoubleClick:F,onKeyDown:T?G:void 0,tabIndex:T?0:void 0,onFocus:T?W:void 0,role:y.ariaRole??(T?"group":void 0),"aria-roledescription":"node","aria-describedby":v?void 0:`${dE}-${b}`,"aria-label":y.ariaLabel,...y.domAttributes,children:p.jsx(WV,{value:e,children:p.jsx(N,{id:e,data:y.data,type:C,positionAbsoluteX:S.positionAbsolute.x,positionAbsoluteY:S.positionAbsolute.y,selected:y.selected??!1,selectable:P,draggable:E,deletable:y.deletable??!0,isConnectable:A,sourcePosition:y.sourcePosition,targetPosition:y.targetPosition,dragging:L,dragHandle:y.dragHandle,zIndex:S.z,parentId:y.parentId,...z})})})}var uW=x.memo(cW);const dW=e=>({nodesDraggable:e.nodesDraggable,nodesConnectable:e.nodesConnectable,nodesFocusable:e.nodesFocusable,elementsSelectable:e.elementsSelectable,onError:e.onError});function bE(e){const{nodesDraggable:n,nodesConnectable:r,nodesFocusable:o,elementsSelectable:i,onError:s}=we(dW,Te),a=iW(e.onlyRenderVisibleElements),l=aW();return p.jsx("div",{className:"react-flow__nodes",style:Ld,children:a.map(c=>p.jsx(uW,{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))})}bE.displayName="NodeRenderer";const fW=x.memo(bE);function hW(e){return we(x.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&&sU({sourceNode:s,targetNode:a,width:r.width,height:r.height,transform:r.transform})&&o.push(i.id)}return o},[e]),Te)}const pW=({color:e="none",strokeWidth:n=1})=>{const r={strokeWidth:n,...e&&{stroke:e}};return p.jsx("polyline",{className:"arrow",style:r,strokeLinecap:"round",fill:"none",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4"})},mW=({color:e="none",strokeWidth:n=1})=>{const r={strokeWidth:n,...e&&{stroke:e,fill:e}};return p.jsx("polyline",{className:"arrowclosed",style:r,strokeLinecap:"round",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4 -5,-4"})},u1={[Nu.Arrow]:pW,[Nu.ArrowClosed]:mW};function gW(e){const n=Ie();return x.useMemo(()=>{var i,s;return Object.prototype.hasOwnProperty.call(u1,e)?u1[e]:((s=(i=n.getState()).onError)==null||s.call(i,"009",On.error009(e)),null)},[e])}const vW=({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=gW(n);return c?p.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:p.jsx(c,{color:r,strokeWidth:a})}):null},_E=({defaultColor:e,rfId:n})=>{const r=we(s=>s.edges),o=we(s=>s.defaultEdgeOptions),i=x.useMemo(()=>pU(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?p.jsx("svg",{className:"react-flow__marker","aria-hidden":"true",children:p.jsx("defs",{children:i.map(s=>p.jsx(vW,{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};_E.displayName="MarkerDefinitions";var yW=x.memo(_E);function SE({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,h]=x.useState({x:1,y:0,width:0,height:0}),g=He(["react-flow__edge-textwrapper",u]),v=x.useRef(null);return x.useEffect(()=>{if(v.current){const b=v.current.getBBox();h({x:b.x,y:b.y,width:b.width,height:b.height})}},[r]),r?p.jsxs("g",{transform:`translate(${e-d.width/2} ${n-d.height/2})`,className:g,visibility:d.width?"visible":"hidden",...f,children:[i&&p.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}),p.jsx("text",{className:"react-flow__edge-text",y:d.height/2,dy:"0.3em",ref:v,style:o,children:r}),c]}):null}SE.displayName="EdgeText";const xW=x.memo(SE);function zd({path:e,labelX:n,labelY:r,label:o,labelStyle:i,labelShowBg:s,labelBgStyle:a,labelBgPadding:l,labelBgBorderRadius:c,interactionWidth:u=20,...f}){return p.jsxs(p.Fragment,{children:[p.jsx("path",{...f,d:e,fill:"none",className:He(["react-flow__edge-path",f.className])}),u?p.jsx("path",{d:e,fill:"none",strokeOpacity:0,strokeWidth:u,className:"react-flow__edge-interaction"}):null,o&&un(n)&&un(r)?p.jsx(xW,{x:n,y:r,label:o,labelStyle:i,labelShowBg:s,labelBgStyle:a,labelBgPadding:l,labelBgBorderRadius:c}):null]})}function d1({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 kE({sourceX:e,sourceY:n,sourcePosition:r=ce.Bottom,targetX:o,targetY:i,targetPosition:s=ce.Top}){const[a,l]=d1({pos:r,x1:e,y1:n,x2:o,y2:i}),[c,u]=d1({pos:s,x1:o,y1:i,x2:e,y2:n}),[f,d,h,g]=GN({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,h,g]}function CE(e){return x.memo(({id:n,sourceX:r,sourceY:o,targetX:i,targetY:s,sourcePosition:a,targetPosition:l,label:c,labelStyle:u,labelShowBg:f,labelBgStyle:d,labelBgPadding:h,labelBgBorderRadius:g,style:v,markerEnd:b,markerStart:_,interactionWidth:m})=>{const[w,y,S]=kE({sourceX:r,sourceY:o,sourcePosition:a,targetX:i,targetY:s,targetPosition:l}),k=e.isInternal?void 0:n;return p.jsx(zd,{id:k,path:w,labelX:y,labelY:S,label:c,labelStyle:u,labelShowBg:f,labelBgStyle:d,labelBgPadding:h,labelBgBorderRadius:g,style:v,markerEnd:b,markerStart:_,interactionWidth:m})})}const wW=CE({isInternal:!1}),NE=CE({isInternal:!0});wW.displayName="SimpleBezierEdge";NE.displayName="SimpleBezierEdgeInternal";function EE(e){return x.memo(({id:n,sourceX:r,sourceY:o,targetX:i,targetY:s,label:a,labelStyle:l,labelShowBg:c,labelBgStyle:u,labelBgPadding:f,labelBgBorderRadius:d,style:h,sourcePosition:g=ce.Bottom,targetPosition:v=ce.Top,markerEnd:b,markerStart:_,pathOptions:m,interactionWidth:w})=>{const[y,S,k]=Ap({sourceX:r,sourceY:o,sourcePosition:g,targetX:i,targetY:s,targetPosition:v,borderRadius:m==null?void 0:m.borderRadius,offset:m==null?void 0:m.offset,stepPosition:m==null?void 0:m.stepPosition}),C=e.isInternal?void 0:n;return p.jsx(zd,{id:C,path:y,labelX:S,labelY:k,label:a,labelStyle:l,labelShowBg:c,labelBgStyle:u,labelBgPadding:f,labelBgBorderRadius:d,style:h,markerEnd:b,markerStart:_,interactionWidth:w})})}const PE=EE({isInternal:!1}),jE=EE({isInternal:!0});PE.displayName="SmoothStepEdge";jE.displayName="SmoothStepEdgeInternal";function ME(e){return x.memo(({id:n,...r})=>{var i;const o=e.isInternal?void 0:n;return p.jsx(PE,{...r,id:o,pathOptions:x.useMemo(()=>{var s;return{borderRadius:0,offset:(s=r.pathOptions)==null?void 0:s.offset}},[(i=r.pathOptions)==null?void 0:i.offset])})})}const bW=ME({isInternal:!1}),RE=ME({isInternal:!0});bW.displayName="StepEdge";RE.displayName="StepEdgeInternal";function AE(e){return x.memo(({id:n,sourceX:r,sourceY:o,targetX:i,targetY:s,label:a,labelStyle:l,labelShowBg:c,labelBgStyle:u,labelBgPadding:f,labelBgBorderRadius:d,style:h,markerEnd:g,markerStart:v,interactionWidth:b})=>{const[_,m,w]=KN({sourceX:r,sourceY:o,targetX:i,targetY:s}),y=e.isInternal?void 0:n;return p.jsx(zd,{id:y,path:_,labelX:m,labelY:w,label:a,labelStyle:l,labelShowBg:c,labelBgStyle:u,labelBgPadding:f,labelBgBorderRadius:d,style:h,markerEnd:g,markerStart:v,interactionWidth:b})})}const _W=AE({isInternal:!1}),TE=AE({isInternal:!0});_W.displayName="StraightEdge";TE.displayName="StraightEdgeInternal";function IE(e){return x.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:h,labelBgBorderRadius:g,style:v,markerEnd:b,markerStart:_,pathOptions:m,interactionWidth:w})=>{const[y,S,k]=YN({sourceX:r,sourceY:o,sourcePosition:a,targetX:i,targetY:s,targetPosition:l,curvature:m==null?void 0:m.curvature}),C=e.isInternal?void 0:n;return p.jsx(zd,{id:C,path:y,labelX:S,labelY:k,label:c,labelStyle:u,labelShowBg:f,labelBgStyle:d,labelBgPadding:h,labelBgBorderRadius:g,style:v,markerEnd:b,markerStart:_,interactionWidth:w})})}const SW=IE({isInternal:!1}),OE=IE({isInternal:!0});SW.displayName="BezierEdge";OE.displayName="BezierEdgeInternal";const f1={default:OE,straight:TE,step:RE,smoothstep:jE,simplebezier:NE},h1={sourceX:null,sourceY:null,targetX:null,targetY:null,sourcePosition:null,targetPosition:null},kW=(e,n,r)=>r===ce.Left?e-n:r===ce.Right?e+n:e,CW=(e,n,r)=>r===ce.Top?e-n:r===ce.Bottom?e+n:e,p1="react-flow__edgeupdater";function m1({position:e,centerX:n,centerY:r,radius:o=10,onMouseDown:i,onMouseEnter:s,onMouseOut:a,type:l}){return p.jsx("circle",{onMouseDown:i,onMouseEnter:s,onMouseOut:a,className:He([p1,`${p1}-${l}`]),cx:kW(n,o,e),cy:CW(r,o,e),r:o,stroke:"transparent",fill:"transparent"})}function NW({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:h,setUpdateHover:g}){const v=Ie(),b=(S,k)=>{if(S.button!==0)return;const{autoPanOnConnect:C,domNode:N,connectionMode:E,connectionRadius:P,lib:A,onConnectStart:T,cancelConnection:D,nodeLookup:B,rfId:j,panBy:L,updateConnection:I}=v.getState(),z=k.type==="target",M=(V,O)=>{h(!1),d==null||d(V,r,k.type,O)},R=V=>u==null?void 0:u(r,V),$=(V,O)=>{h(!0),f==null||f(S,r,k.type),T==null||T(V,O)};Op.onPointerDown(S.nativeEvent,{autoPanOnConnect:C,connectionMode:E,connectionRadius:P,domNode:N,handleId:k.id,nodeId:k.nodeId,nodeLookup:B,isTarget:z,edgeUpdaterType:k.type,lib:A,flowId:j,cancelConnection:D,panBy:L,isValidConnection:(...V)=>{var O,X;return((X=(O=v.getState()).isValidConnection)==null?void 0:X.call(O,...V))??!0},onConnect:R,onConnectStart:$,onConnectEnd:(...V)=>{var O,X;return(X=(O=v.getState()).onConnectEnd)==null?void 0:X.call(O,...V)},onReconnectEnd:M,updateConnection:I,getTransform:()=>v.getState().transform,getFromHandle:()=>v.getState().connection.fromHandle,dragThreshold:v.getState().connectionDragThreshold,handleDomNode:S.currentTarget})},_=S=>b(S,{nodeId:r.target,id:r.targetHandle??null,type:"target"}),m=S=>b(S,{nodeId:r.source,id:r.sourceHandle??null,type:"source"}),w=()=>g(!0),y=()=>g(!1);return p.jsxs(p.Fragment,{children:[(e===!0||e==="source")&&p.jsx(m1,{position:l,centerX:o,centerY:i,radius:n,onMouseDown:_,onMouseEnter:w,onMouseOut:y,type:"source"}),(e===!0||e==="target")&&p.jsx(m1,{position:c,centerX:s,centerY:a,radius:n,onMouseDown:m,onMouseEnter:w,onMouseOut:y,type:"target"})]})}function EW({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:h,onReconnectEnd:g,rfId:v,edgeTypes:b,noPanClassName:_,onError:m,disableKeyboardA11y:w}){let y=we(Q=>Q.edgeLookup.get(e));const S=we(Q=>Q.defaultEdgeOptions);y=S?{...S,...y}:y;let k=y.type||"default",C=(b==null?void 0:b[k])||f1[k];C===void 0&&(m==null||m("011",On.error011(k)),k="default",C=(b==null?void 0:b.default)||f1.default);const N=!!(y.focusable||n&&typeof y.focusable>"u"),E=typeof d<"u"&&(y.reconnectable||r&&typeof y.reconnectable>"u"),P=!!(y.selectable||o&&typeof y.selectable>"u"),A=x.useRef(null),[T,D]=x.useState(!1),[B,j]=x.useState(!1),L=Ie(),{zIndex:I,sourceX:z,sourceY:M,targetX:R,targetY:$,sourcePosition:V,targetPosition:O}=we(x.useCallback(Q=>{const ne=Q.nodeLookup.get(y.source),ue=Q.nodeLookup.get(y.target);if(!ne||!ue)return{zIndex:y.zIndex,...h1};const ye=hU({id:e,sourceNode:ne,targetNode:ue,sourceHandle:y.sourceHandle||null,targetHandle:y.targetHandle||null,connectionMode:Q.connectionMode,onError:m});return{zIndex:iU({selected:y.selected,zIndex:y.zIndex,sourceNode:ne,targetNode:ue,elevateOnSelect:Q.elevateEdgesOnSelect,zIndexMode:Q.zIndexMode}),...ye||h1}},[y.source,y.target,y.sourceHandle,y.targetHandle,y.selected,y.zIndex]),Te),X=x.useMemo(()=>y.markerStart?`url('#${Tp(y.markerStart,v)}')`:void 0,[y.markerStart,v]),F=x.useMemo(()=>y.markerEnd?`url('#${Tp(y.markerEnd,v)}')`:void 0,[y.markerEnd,v]);if(y.hidden||z===null||M===null||R===null||$===null)return null;const U=Q=>{var pe;const{addSelectedEdges:ne,unselectNodesAndEdges:ue,multiSelectionActive:ye}=L.getState();P&&(L.setState({nodesSelectionActive:!1}),y.selected&&ye?(ue({nodes:[],edges:[y]}),(pe=A.current)==null||pe.blur()):ne([e])),i&&i(Q,y)},G=s?Q=>{s(Q,{...y})}:void 0,W=a?Q=>{a(Q,{...y})}:void 0,Y=l?Q=>{l(Q,{...y})}:void 0,q=c?Q=>{c(Q,{...y})}:void 0,te=u?Q=>{u(Q,{...y})}:void 0,J=Q=>{var ne;if(!w&&AN.includes(Q.key)&&P){const{unselectNodesAndEdges:ue,addSelectedEdges:ye}=L.getState();Q.key==="Escape"?((ne=A.current)==null||ne.blur(),ue({edges:[y]})):ye([e])}};return p.jsx("svg",{style:{zIndex:I},children:p.jsxs("g",{className:He(["react-flow__edge",`react-flow__edge-${k}`,y.className,_,{selected:y.selected,animated:y.animated,inactive:!P&&!i,updating:T,selectable:P}]),onClick:U,onDoubleClick:G,onContextMenu:W,onMouseEnter:Y,onMouseMove:q,onMouseLeave:te,onKeyDown:N?J:void 0,tabIndex:N?0:void 0,role:y.ariaRole??(N?"group":"img"),"aria-roledescription":"edge","data-id":e,"data-testid":`rf__edge-${e}`,"aria-label":y.ariaLabel===null?void 0:y.ariaLabel||`Edge from ${y.source} to ${y.target}`,"aria-describedby":N?`${fE}-${v}`:void 0,ref:A,...y.domAttributes,children:[!B&&p.jsx(C,{id:e,source:y.source,target:y.target,type:y.type,selected:y.selected,animated:y.animated,selectable:P,deletable:y.deletable??!0,label:y.label,labelStyle:y.labelStyle,labelShowBg:y.labelShowBg,labelBgStyle:y.labelBgStyle,labelBgPadding:y.labelBgPadding,labelBgBorderRadius:y.labelBgBorderRadius,sourceX:z,sourceY:M,targetX:R,targetY:$,sourcePosition:V,targetPosition:O,data:y.data,style:y.style,sourceHandleId:y.sourceHandle,targetHandleId:y.targetHandle,markerStart:X,markerEnd:F,pathOptions:"pathOptions"in y?y.pathOptions:void 0,interactionWidth:y.interactionWidth}),E&&p.jsx(NW,{edge:y,isReconnectable:E,reconnectRadius:f,onReconnect:d,onReconnectStart:h,onReconnectEnd:g,sourceX:z,sourceY:M,targetX:R,targetY:$,sourcePosition:V,targetPosition:O,setUpdateHover:D,setReconnecting:j})]})})}var PW=x.memo(EW);const jW=e=>({edgesFocusable:e.edgesFocusable,edgesReconnectable:e.edgesReconnectable,elementsSelectable:e.elementsSelectable,connectionMode:e.connectionMode,onError:e.onError});function $E({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:h,onReconnectStart:g,onReconnectEnd:v,disableKeyboardA11y:b}){const{edgesFocusable:_,edgesReconnectable:m,elementsSelectable:w,onError:y}=we(jW,Te),S=hW(n);return p.jsxs("div",{className:"react-flow__edges",children:[p.jsx(yW,{defaultColor:e,rfId:r}),S.map(k=>p.jsx(PW,{id:k,edgesFocusable:_,edgesReconnectable:m,elementsSelectable:w,noPanClassName:i,onReconnect:s,onContextMenu:a,onMouseEnter:l,onMouseMove:c,onMouseLeave:u,onClick:f,reconnectRadius:d,onDoubleClick:h,onReconnectStart:g,onReconnectEnd:v,rfId:r,onError:y,edgeTypes:o,disableKeyboardA11y:b},k))]})}$E.displayName="EdgeRenderer";const MW=x.memo($E),RW=e=>`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]})`;function AW({children:e}){const n=we(RW);return p.jsx("div",{className:"react-flow__viewport xyflow__viewport react-flow__container",style:{transform:n},children:e})}function TW(e){const n=n0(),r=x.useRef(!1);x.useEffect(()=>{!r.current&&n.viewportInitialized&&e&&(setTimeout(()=>e(n),1),r.current=!0)},[e,n.viewportInitialized])}const IW=e=>{var n;return(n=e.panZoom)==null?void 0:n.syncViewport};function OW(e){const n=we(IW),r=Ie();return x.useEffect(()=>{e&&(n==null||n(e),r.setState({transform:[e.x,e.y,e.zoom]}))},[e,n]),null}function $W(e){return e.connection.inProgress?{...e.connection,to:nl(e.connection.to,e.transform)}:{...e.connection}}function DW(e){return $W}function LW(e){const n=DW();return we(n,Te)}const zW=e=>({nodesConnectable:e.nodesConnectable,isValid:e.connection.isValid,inProgress:e.connection.inProgress,width:e.width,height:e.height});function FW({containerStyle:e,style:n,type:r,component:o}){const{nodesConnectable:i,width:s,height:a,isValid:l,inProgress:c}=we(zW,Te);return!(s&&i&&c)?null:p.jsx("svg",{style:e,width:s,height:a,className:"react-flow__connectionline react-flow__container",children:p.jsx("g",{className:He(["react-flow__connection",ON(l)]),children:p.jsx(DE,{style:n,type:r,CustomComponent:o,isValid:l})})})}const DE=({style:e,type:n=Er.Bezier,CustomComponent:r,isValid:o})=>{const{inProgress:i,from:s,fromNode:a,fromHandle:l,fromPosition:c,to:u,toNode:f,toHandle:d,toPosition:h,pointer:g}=LW();if(!i)return;if(r)return p.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:h,connectionStatus:ON(o),toNode:f,toHandle:d,pointer:g});let v="";const b={sourceX:s.x,sourceY:s.y,sourcePosition:c,targetX:u.x,targetY:u.y,targetPosition:h};switch(n){case Er.Bezier:[v]=YN(b);break;case Er.SimpleBezier:[v]=kE(b);break;case Er.Step:[v]=Ap({...b,borderRadius:0});break;case Er.SmoothStep:[v]=Ap(b);break;default:[v]=KN(b)}return p.jsx("path",{d:v,fill:"none",className:"react-flow__connection-path",style:e})};DE.displayName="ConnectionLine";const BW={};function g1(e=BW){x.useRef(e),Ie(),x.useEffect(()=>{},[e])}function HW(){Ie(),x.useRef(!1),x.useEffect(()=>{},[])}function LE({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:h,onSelectionEnd:g,connectionLineType:v,connectionLineStyle:b,connectionLineComponent:_,connectionLineContainerStyle:m,selectionKeyCode:w,selectionOnDrag:y,selectionMode:S,multiSelectionKeyCode:k,panActivationKeyCode:C,zoomActivationKeyCode:N,deleteKeyCode:E,onlyRenderVisibleElements:P,elementsSelectable:A,defaultViewport:T,translateExtent:D,minZoom:B,maxZoom:j,preventScrolling:L,defaultMarkerColor:I,zoomOnScroll:z,zoomOnPinch:M,panOnScroll:R,panOnScrollSpeed:$,panOnScrollMode:V,zoomOnDoubleClick:O,panOnDrag:X,onPaneClick:F,onPaneMouseEnter:U,onPaneMouseMove:G,onPaneMouseLeave:W,onPaneScroll:Y,onPaneContextMenu:q,paneClickDistance:te,nodeClickDistance:J,onEdgeContextMenu:Q,onEdgeMouseEnter:ne,onEdgeMouseMove:ue,onEdgeMouseLeave:ye,reconnectRadius:pe,onReconnect:Ne,onReconnectStart:mt,onReconnectEnd:qe,noDragClassName:zt,noWheelClassName:dr,noPanClassName:fr,disableKeyboardA11y:ro,nodeExtent:Vo,rfId:oo,viewport:hr,onViewportChange:xn}){return g1(e),g1(n),HW(),TW(r),OW(hr),p.jsx(rW,{onPaneClick:F,onPaneMouseEnter:U,onPaneMouseMove:G,onPaneMouseLeave:W,onPaneContextMenu:q,onPaneScroll:Y,paneClickDistance:te,deleteKeyCode:E,selectionKeyCode:w,selectionOnDrag:y,selectionMode:S,onSelectionStart:h,onSelectionEnd:g,multiSelectionKeyCode:k,panActivationKeyCode:C,zoomActivationKeyCode:N,elementsSelectable:A,zoomOnScroll:z,zoomOnPinch:M,zoomOnDoubleClick:O,panOnScroll:R,panOnScrollSpeed:$,panOnScrollMode:V,panOnDrag:X,defaultViewport:T,translateExtent:D,minZoom:B,maxZoom:j,onSelectionContextMenu:d,preventScrolling:L,noDragClassName:zt,noWheelClassName:dr,noPanClassName:fr,disableKeyboardA11y:ro,onViewportChange:xn,isControlledViewport:!!hr,children:p.jsxs(AW,{children:[p.jsx(MW,{edgeTypes:n,onEdgeClick:i,onEdgeDoubleClick:a,onReconnect:Ne,onReconnectStart:mt,onReconnectEnd:qe,onlyRenderVisibleElements:P,onEdgeContextMenu:Q,onEdgeMouseEnter:ne,onEdgeMouseMove:ue,onEdgeMouseLeave:ye,reconnectRadius:pe,defaultMarkerColor:I,noPanClassName:fr,disableKeyboardA11y:ro,rfId:oo}),p.jsx(FW,{style:b,type:v,component:_,containerStyle:m}),p.jsx("div",{className:"react-flow__edgelabel-renderer"}),p.jsx(fW,{nodeTypes:e,onNodeClick:o,onNodeDoubleClick:s,onNodeMouseEnter:l,onNodeMouseMove:c,onNodeMouseLeave:u,onNodeContextMenu:f,nodeClickDistance:J,onlyRenderVisibleElements:P,noPanClassName:fr,noDragClassName:zt,disableKeyboardA11y:ro,nodeExtent:Vo,rfId:oo}),p.jsx("div",{className:"react-flow__viewport-portal"})]})})}LE.displayName="GraphView";const UW=x.memo(LE),v1=({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:h="basic"}={})=>{const g=new Map,v=new Map,b=new Map,_=new Map,m=o??n??[],w=r??e??[],y=f??[0,0],S=d??Ea;ZN(b,_,m);const{nodesInitialized:k}=Ip(w,g,v,{nodeOrigin:y,nodeExtent:S,zIndexMode:h});let C=[0,0,1];if(a&&i&&s){const N=el(g,{filter:T=>!!((T.width||T.initialWidth)&&(T.height||T.initialHeight))}),{x:E,y:P,zoom:A}=Kg(N,i,s,c,u,(l==null?void 0:l.padding)??.1);C=[E,P,A]}return{rfId:"1",width:i??0,height:s??0,transform:C,nodes:w,nodesInitialized:k,nodeLookup:g,parentLookup:v,edges:m,edgeLookup:_,connectionLookup:b,onNodesChange:null,onEdgesChange:null,hasDefaultNodes:r!==void 0,hasDefaultEdges:o!==void 0,panZoom:null,minZoom:c,maxZoom:u,translateExtent:Ea,nodeExtent:S,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionMode:Gi.Strict,domNode:null,paneDragging:!1,noPanClassName:"nopan",nodeOrigin:y,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:{...IN},connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,autoPanOnNodeFocus:!0,autoPanSpeed:15,connectionRadius:20,onError:JH,isValidConnection:void 0,onSelectionChangeHandlers:[],lib:"react",debug:!1,ariaLabelConfig:TN,zIndexMode:h,onNodesChangeMiddlewareMap:new Map,onEdgesChangeMiddlewareMap:new Map}},VW=({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:h})=>aV((g,v)=>{async function b(){const{nodeLookup:_,panZoom:m,fitViewOptions:w,fitViewResolver:y,width:S,height:k,minZoom:C,maxZoom:N}=v();m&&(await QH({nodes:_,width:S,height:k,panZoom:m,minZoom:C,maxZoom:N},w),y==null||y.resolve(!0),g({fitViewResolver:null}))}return{...v1({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:h}),setNodes:_=>{const{nodeLookup:m,parentLookup:w,nodeOrigin:y,elevateNodesOnSelect:S,fitViewQueued:k,zIndexMode:C,nodesSelectionActive:N}=v(),{nodesInitialized:E,hasSelectedNodes:P}=Ip(_,m,w,{nodeOrigin:y,nodeExtent:d,elevateNodesOnSelect:S,checkEquality:!0,zIndexMode:C}),A=N&&P;k&&E?(b(),g({nodes:_,nodesInitialized:E,fitViewQueued:!1,fitViewOptions:void 0,nodesSelectionActive:A})):g({nodes:_,nodesInitialized:E,nodesSelectionActive:A})},setEdges:_=>{const{connectionLookup:m,edgeLookup:w}=v();ZN(m,w,_),g({edges:_})},setDefaultNodesAndEdges:(_,m)=>{if(_){const{setNodes:w}=v();w(_),g({hasDefaultNodes:!0})}if(m){const{setEdges:w}=v();w(m),g({hasDefaultEdges:!0})}},updateNodeInternals:_=>{const{triggerNodeChanges:m,nodeLookup:w,parentLookup:y,domNode:S,nodeOrigin:k,nodeExtent:C,debug:N,fitViewQueued:E,zIndexMode:P}=v(),{changes:A,updatedInternals:T}=bU(_,w,y,S,k,C,P);T&&(vU(w,y,{nodeOrigin:k,nodeExtent:C,zIndexMode:P}),E?(b(),g({fitViewQueued:!1,fitViewOptions:void 0})):g({}),(A==null?void 0:A.length)>0&&(N&&console.log("React Flow: trigger node changes",A),m==null||m(A)))},updateNodePositions:(_,m=!1)=>{const w=[];let y=[];const{nodeLookup:S,triggerNodeChanges:k,connection:C,updateConnection:N,onNodesChangeMiddlewareMap:E}=v();for(const[P,A]of _){const T=S.get(P),D=!!(T!=null&&T.expandParent&&(T!=null&&T.parentId)&&(A!=null&&A.position)),B={id:P,type:"position",position:D?{x:Math.max(0,A.position.x),y:Math.max(0,A.position.y)}:A.position,dragging:m};if(T&&C.inProgress&&C.fromNode.id===T.id){const j=Do(T,C.fromHandle,ce.Left,!0);N({...C,from:j})}D&&T.parentId&&w.push({id:P,parentId:T.parentId,rect:{...A.internals.positionAbsolute,width:A.measured.width??0,height:A.measured.height??0}}),y.push(B)}if(w.length>0){const{parentLookup:P,nodeOrigin:A}=v(),T=t0(w,S,P,A);y.push(...T)}for(const P of E.values())y=P(y);k(y)},triggerNodeChanges:_=>{const{onNodesChange:m,setNodes:w,nodes:y,hasDefaultNodes:S,debug:k}=v();if(_!=null&&_.length){if(S){const C=PV(_,y);w(C)}k&&console.log("React Flow: trigger node changes",_),m==null||m(_)}},triggerEdgeChanges:_=>{const{onEdgesChange:m,setEdges:w,edges:y,hasDefaultEdges:S,debug:k}=v();if(_!=null&&_.length){if(S){const C=jV(_,y);w(C)}k&&console.log("React Flow: trigger edge changes",_),m==null||m(_)}},addSelectedNodes:_=>{const{multiSelectionActive:m,edgeLookup:w,nodeLookup:y,triggerNodeChanges:S,triggerEdgeChanges:k}=v();if(m){const C=_.map(N=>ho(N,!0));S(C);return}S(yi(y,new Set([..._]),!0)),k(yi(w))},addSelectedEdges:_=>{const{multiSelectionActive:m,edgeLookup:w,nodeLookup:y,triggerNodeChanges:S,triggerEdgeChanges:k}=v();if(m){const C=_.map(N=>ho(N,!0));k(C);return}k(yi(w,new Set([..._]))),S(yi(y,new Set,!0))},unselectNodesAndEdges:({nodes:_,edges:m}={})=>{const{edges:w,nodes:y,nodeLookup:S,triggerNodeChanges:k,triggerEdgeChanges:C}=v(),N=_||y,E=m||w,P=[];for(const T of N){if(!T.selected)continue;const D=S.get(T.id);D&&(D.selected=!1),P.push(ho(T.id,!1))}const A=[];for(const T of E)T.selected&&A.push(ho(T.id,!1));k(P),C(A)},setMinZoom:_=>{const{panZoom:m,maxZoom:w}=v();m==null||m.setScaleExtent([_,w]),g({minZoom:_})},setMaxZoom:_=>{const{panZoom:m,minZoom:w}=v();m==null||m.setScaleExtent([w,_]),g({maxZoom:_})},setTranslateExtent:_=>{var m;(m=v().panZoom)==null||m.setTranslateExtent(_),g({translateExtent:_})},resetSelectedElements:()=>{const{edges:_,nodes:m,triggerNodeChanges:w,triggerEdgeChanges:y,elementsSelectable:S}=v();if(!S)return;const k=m.reduce((N,E)=>E.selected?[...N,ho(E.id,!1)]:N,[]),C=_.reduce((N,E)=>E.selected?[...N,ho(E.id,!1)]:N,[]);w(k),y(C)},setNodeExtent:_=>{const{nodes:m,nodeLookup:w,parentLookup:y,nodeOrigin:S,elevateNodesOnSelect:k,nodeExtent:C,zIndexMode:N}=v();_[0][0]===C[0][0]&&_[0][1]===C[0][1]&&_[1][0]===C[1][0]&&_[1][1]===C[1][1]||(Ip(m,w,y,{nodeOrigin:S,nodeExtent:_,elevateNodesOnSelect:k,checkEquality:!1,zIndexMode:N}),g({nodeExtent:_}))},panBy:_=>{const{transform:m,width:w,height:y,panZoom:S,translateExtent:k}=v();return _U({delta:_,panZoom:S,transform:m,translateExtent:k,width:w,height:y})},setCenter:async(_,m,w)=>{const{width:y,height:S,maxZoom:k,panZoom:C}=v();if(!C)return Promise.resolve(!1);const N=typeof(w==null?void 0:w.zoom)<"u"?w.zoom:k;return await C.setViewport({x:y/2-_*N,y:S/2-m*N,zoom:N},{duration:w==null?void 0:w.duration,ease:w==null?void 0:w.ease,interpolate:w==null?void 0:w.interpolate}),Promise.resolve(!0)},cancelConnection:()=>{g({connection:{...IN}})},updateConnection:_=>{g({connection:_})},reset:()=>g({...v1()})}},Object.is);function Fd({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:h,children:g}){const[v]=x.useState(()=>VW({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:h}));return p.jsx(lV,{value:v,children:p.jsx(AV,{children:g})})}function WW({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:h,zIndexMode:g}){return x.useContext($d)?p.jsx(p.Fragment,{children:e}):p.jsx(Fd,{initialNodes:n,initialEdges:r,defaultNodes:o,defaultEdges:i,initialWidth:s,initialHeight:a,fitView:l,initialFitViewOptions:c,initialMinZoom:u,initialMaxZoom:f,nodeOrigin:d,nodeExtent:h,zIndexMode:g,children:e})}const GW={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0};function YW({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:h,onConnect:g,onConnectStart:v,onConnectEnd:b,onClickConnectStart:_,onClickConnectEnd:m,onNodeMouseEnter:w,onNodeMouseMove:y,onNodeMouseLeave:S,onNodeContextMenu:k,onNodeDoubleClick:C,onNodeDragStart:N,onNodeDrag:E,onNodeDragStop:P,onNodesDelete:A,onEdgesDelete:T,onDelete:D,onSelectionChange:B,onSelectionDragStart:j,onSelectionDrag:L,onSelectionDragStop:I,onSelectionContextMenu:z,onSelectionStart:M,onSelectionEnd:R,onBeforeDelete:$,connectionMode:V,connectionLineType:O=Er.Bezier,connectionLineStyle:X,connectionLineComponent:F,connectionLineContainerStyle:U,deleteKeyCode:G="Backspace",selectionKeyCode:W="Shift",selectionOnDrag:Y=!1,selectionMode:q=Pa.Full,panActivationKeyCode:te="Space",multiSelectionKeyCode:J=Ma()?"Meta":"Control",zoomActivationKeyCode:Q=Ma()?"Meta":"Control",snapToGrid:ne,snapGrid:ue,onlyRenderVisibleElements:ye=!1,selectNodesOnDrag:pe,nodesDraggable:Ne,autoPanOnNodeFocus:mt,nodesConnectable:qe,nodesFocusable:zt,nodeOrigin:dr=hE,edgesFocusable:fr,edgesReconnectable:ro,elementsSelectable:Vo=!0,defaultViewport:oo=bV,minZoom:hr=.5,maxZoom:xn=2,translateExtent:Wo=Ea,preventScrolling:Bd=!0,nodeExtent:Go,defaultMarkerColor:rl="#b1b1b7",zoomOnScroll:ol=!0,zoomOnPinch:il=!0,panOnScroll:sl=!1,panOnScrollSpeed:al=.5,panOnScrollMode:ll=So.Free,zoomOnDoubleClick:K=!0,panOnDrag:me=!0,onPaneClick:fe,onPaneMouseEnter:Ue,onPaneMouseMove:Nt,onPaneMouseLeave:wn,onPaneScroll:io,onPaneContextMenu:cl,paneClickDistance:ul=1,nodeClickDistance:dl=0,children:so,onReconnect:Et,onReconnectStart:UE,onReconnectEnd:VE,onEdgeContextMenu:WE,onEdgeDoubleClick:GE,onEdgeMouseEnter:YE,onEdgeMouseMove:XE,onEdgeMouseLeave:KE,reconnectRadius:qE=10,onNodesChange:QE,onEdgesChange:ZE,noDragClassName:JE="nodrag",noWheelClassName:eP="nowheel",noPanClassName:l0="nopan",fitView:c0,fitViewOptions:u0,connectOnClick:tP,attributionPosition:nP,proOptions:rP,defaultEdgeOptions:oP,elevateNodesOnSelect:iP=!0,elevateEdgesOnSelect:sP=!1,disableKeyboardA11y:d0=!1,autoPanOnConnect:aP,autoPanOnNodeDrag:lP,autoPanSpeed:cP,connectionRadius:uP,isValidConnection:dP,onError:fP,style:hP,id:f0,nodeDragThreshold:pP,connectionDragThreshold:mP,viewport:gP,onViewportChange:vP,width:yP,height:xP,colorMode:wP="light",debug:bP,onScroll:fl,ariaLabelConfig:_P,zIndexMode:h0="basic",...SP},kP){const Hd=f0||"1",CP=CV(wP),NP=x.useCallback(p0=>{p0.currentTarget.scrollTo({top:0,left:0,behavior:"instant"}),fl==null||fl(p0)},[fl]);return p.jsx("div",{"data-testid":"rf__wrapper",...SP,onScroll:NP,style:{...hP,...GW},ref:kP,className:He(["react-flow",i,CP]),id:f0,role:"application",children:p.jsxs(WW,{nodes:e,edges:n,width:yP,height:xP,fitView:c0,fitViewOptions:u0,minZoom:hr,maxZoom:xn,nodeOrigin:dr,nodeExtent:Go,zIndexMode:h0,children:[p.jsx(kV,{nodes:e,edges:n,defaultNodes:r,defaultEdges:o,onConnect:g,onConnectStart:v,onConnectEnd:b,onClickConnectStart:_,onClickConnectEnd:m,nodesDraggable:Ne,autoPanOnNodeFocus:mt,nodesConnectable:qe,nodesFocusable:zt,edgesFocusable:fr,edgesReconnectable:ro,elementsSelectable:Vo,elevateNodesOnSelect:iP,elevateEdgesOnSelect:sP,minZoom:hr,maxZoom:xn,nodeExtent:Go,onNodesChange:QE,onEdgesChange:ZE,snapToGrid:ne,snapGrid:ue,connectionMode:V,translateExtent:Wo,connectOnClick:tP,defaultEdgeOptions:oP,fitView:c0,fitViewOptions:u0,onNodesDelete:A,onEdgesDelete:T,onDelete:D,onNodeDragStart:N,onNodeDrag:E,onNodeDragStop:P,onSelectionDrag:L,onSelectionDragStart:j,onSelectionDragStop:I,onMove:f,onMoveStart:d,onMoveEnd:h,noPanClassName:l0,nodeOrigin:dr,rfId:Hd,autoPanOnConnect:aP,autoPanOnNodeDrag:lP,autoPanSpeed:cP,onError:fP,connectionRadius:uP,isValidConnection:dP,selectNodesOnDrag:pe,nodeDragThreshold:pP,connectionDragThreshold:mP,onBeforeDelete:$,debug:bP,ariaLabelConfig:_P,zIndexMode:h0}),p.jsx(UW,{onInit:u,onNodeClick:l,onEdgeClick:c,onNodeMouseEnter:w,onNodeMouseMove:y,onNodeMouseLeave:S,onNodeContextMenu:k,onNodeDoubleClick:C,nodeTypes:s,edgeTypes:a,connectionLineType:O,connectionLineStyle:X,connectionLineComponent:F,connectionLineContainerStyle:U,selectionKeyCode:W,selectionOnDrag:Y,selectionMode:q,deleteKeyCode:G,multiSelectionKeyCode:J,panActivationKeyCode:te,zoomActivationKeyCode:Q,onlyRenderVisibleElements:ye,defaultViewport:oo,translateExtent:Wo,minZoom:hr,maxZoom:xn,preventScrolling:Bd,zoomOnScroll:ol,zoomOnPinch:il,zoomOnDoubleClick:K,panOnScroll:sl,panOnScrollSpeed:al,panOnScrollMode:ll,panOnDrag:me,onPaneClick:fe,onPaneMouseEnter:Ue,onPaneMouseMove:Nt,onPaneMouseLeave:wn,onPaneScroll:io,onPaneContextMenu:cl,paneClickDistance:ul,nodeClickDistance:dl,onSelectionContextMenu:z,onSelectionStart:M,onSelectionEnd:R,onReconnect:Et,onReconnectStart:UE,onReconnectEnd:VE,onEdgeContextMenu:WE,onEdgeDoubleClick:GE,onEdgeMouseEnter:YE,onEdgeMouseMove:XE,onEdgeMouseLeave:KE,reconnectRadius:qE,defaultMarkerColor:rl,noDragClassName:JE,noWheelClassName:eP,noPanClassName:l0,rfId:Hd,disableKeyboardA11y:d0,nodeExtent:Go,viewport:gP,onViewportChange:vP}),p.jsx(wV,{onSelectionChange:B}),so,p.jsx(mV,{proOptions:rP,position:nP}),p.jsx(pV,{rfId:Hd,disableKeyboardA11y:d0})]})})}var o0=mE(YW);function XW({dimensions:e,lineWidth:n,variant:r,className:o}){return p.jsx("path",{strokeWidth:n,d:`M${e[0]/2} 0 V${e[1]} M0 ${e[1]/2} H${e[0]}`,className:He(["react-flow__background-pattern",r,o])})}function KW({radius:e,className:n}){return p.jsx("circle",{cx:e,cy:e,r:e,className:He(["react-flow__background-pattern","dots",n])})}var Br;(function(e){e.Lines="lines",e.Dots="dots",e.Cross="cross"})(Br||(Br={}));const qW={[Br.Dots]:1,[Br.Lines]:1,[Br.Cross]:6},QW=e=>({transform:e.transform,patternId:`pattern-${e.rfId}`});function zE({id:e,variant:n=Br.Dots,gap:r=20,size:o,lineWidth:i=1,offset:s=0,color:a,bgColor:l,style:c,className:u,patternClassName:f}){const d=x.useRef(null),{transform:h,patternId:g}=we(QW,Te),v=o||qW[n],b=n===Br.Dots,_=n===Br.Cross,m=Array.isArray(r)?r:[r,r],w=[m[0]*h[2]||1,m[1]*h[2]||1],y=v*h[2],S=Array.isArray(s)?s:[s,s],k=_?[y,y]:w,C=[S[0]*h[2]||1+k[0]/2,S[1]*h[2]||1+k[1]/2],N=`${g}${e||""}`;return p.jsxs("svg",{className:He(["react-flow__background",u]),style:{...c,...Ld,"--xy-background-color-props":l,"--xy-background-pattern-color-props":a},ref:d,"data-testid":"rf__background",children:[p.jsx("pattern",{id:N,x:h[0]%w[0],y:h[1]%w[1],width:w[0],height:w[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${C[0]},-${C[1]})`,children:b?p.jsx(KW,{radius:y/2,className:f}):p.jsx(XW,{dimensions:k,lineWidth:i,variant:n,className:f})}),p.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${N})`})]})}zE.displayName="Background";const i0=x.memo(zE);function ZW(){return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",children:p.jsx("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"})})}function JW(){return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5",children:p.jsx("path",{d:"M0 0h32v4.2H0z"})})}function eG(){return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30",children:p.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 tG(){return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:p.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 nG(){return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:p.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 Ql({children:e,className:n,...r}){return p.jsx("button",{type:"button",className:He(["react-flow__controls-button",n]),...r,children:e})}const rG=e=>({isInteractive:e.nodesDraggable||e.nodesConnectable||e.elementsSelectable,minZoomReached:e.transform[2]<=e.minZoom,maxZoomReached:e.transform[2]>=e.maxZoom,ariaLabelConfig:e.ariaLabelConfig});function FE({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:h="vertical","aria-label":g}){const v=Ie(),{isInteractive:b,minZoomReached:_,maxZoomReached:m,ariaLabelConfig:w}=we(rG,Te),{zoomIn:y,zoomOut:S,fitView:k}=n0(),C=()=>{y(),s==null||s()},N=()=>{S(),a==null||a()},E=()=>{k(i),l==null||l()},P=()=>{v.setState({nodesDraggable:!b,nodesConnectable:!b,elementsSelectable:!b}),c==null||c(!b)},A=h==="horizontal"?"horizontal":"vertical";return p.jsxs(Dd,{className:He(["react-flow__controls",A,u]),position:d,style:e,"data-testid":"rf__controls","aria-label":g??w["controls.ariaLabel"],children:[n&&p.jsxs(p.Fragment,{children:[p.jsx(Ql,{onClick:C,className:"react-flow__controls-zoomin",title:w["controls.zoomIn.ariaLabel"],"aria-label":w["controls.zoomIn.ariaLabel"],disabled:m,children:p.jsx(ZW,{})}),p.jsx(Ql,{onClick:N,className:"react-flow__controls-zoomout",title:w["controls.zoomOut.ariaLabel"],"aria-label":w["controls.zoomOut.ariaLabel"],disabled:_,children:p.jsx(JW,{})})]}),r&&p.jsx(Ql,{className:"react-flow__controls-fitview",onClick:E,title:w["controls.fitView.ariaLabel"],"aria-label":w["controls.fitView.ariaLabel"],children:p.jsx(eG,{})}),o&&p.jsx(Ql,{className:"react-flow__controls-interactive",onClick:P,title:w["controls.interactive.ariaLabel"],"aria-label":w["controls.interactive.ariaLabel"],children:b?p.jsx(nG,{}):p.jsx(tG,{})}),f]})}FE.displayName="Controls";const s0=x.memo(FE);function oG({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:h,onClick:g}){const{background:v,backgroundColor:b}=s||{},_=a||v||b;return p.jsx("rect",{className:He(["react-flow__minimap-node",{selected:h},u]),x:n,y:r,rx:f,ry:f,width:o,height:i,style:{fill:_,stroke:l,strokeWidth:c},shapeRendering:d,onClick:g?m=>g(m,e):void 0})}const iG=x.memo(oG),sG=e=>e.nodes.map(n=>n.id),Xf=e=>e instanceof Function?e:()=>e;function aG({nodeStrokeColor:e,nodeColor:n,nodeClassName:r="",nodeBorderRadius:o=5,nodeStrokeWidth:i,nodeComponent:s=iG,onClick:a}){const l=we(sG,Te),c=Xf(n),u=Xf(e),f=Xf(r),d=typeof window>"u"||window.chrome?"crispEdges":"geometricPrecision";return p.jsx(p.Fragment,{children:l.map(h=>p.jsx(cG,{id:h,nodeColorFunc:c,nodeStrokeColorFunc:u,nodeClassNameFunc:f,nodeBorderRadius:o,nodeStrokeWidth:i,NodeComponent:s,onClick:a,shapeRendering:d},h))})}function lG({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:h,height:g}=we(v=>{const b=v.nodeLookup.get(e);if(!b)return{node:void 0,x:0,y:0,width:0,height:0};const _=b.internals.userNode,{x:m,y:w}=b.internals.positionAbsolute,{width:y,height:S}=ur(_);return{node:_,x:m,y:w,width:y,height:S}},Te);return!u||u.hidden||!BN(u)?null:p.jsx(l,{x:f,y:d,width:h,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 cG=x.memo(lG);var uG=x.memo(aG);const dG=200,fG=150,hG=e=>!e.hidden,pG=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?FN(el(e.nodeLookup,{filter:hG}),n):n,rfId:e.rfId,panZoom:e.panZoom,translateExtent:e.translateExtent,flowWidth:e.width,flowHeight:e.height,ariaLabelConfig:e.ariaLabelConfig}},mG="react-flow__minimap-desc";function BE({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:h="bottom-right",onClick:g,onNodeClick:v,pannable:b=!1,zoomable:_=!1,ariaLabel:m,inversePan:w,zoomStep:y=1,offsetScale:S=5}){const k=Ie(),C=x.useRef(null),{boundingRect:N,viewBB:E,rfId:P,panZoom:A,translateExtent:T,flowWidth:D,flowHeight:B,ariaLabelConfig:j}=we(pG,Te),L=(e==null?void 0:e.width)??dG,I=(e==null?void 0:e.height)??fG,z=N.width/L,M=N.height/I,R=Math.max(z,M),$=R*L,V=R*I,O=S*R,X=N.x-($-N.width)/2-O,F=N.y-(V-N.height)/2-O,U=$+O*2,G=V+O*2,W=`${mG}-${P}`,Y=x.useRef(0),q=x.useRef();Y.current=R,x.useEffect(()=>{if(C.current&&A)return q.current=RU({domNode:C.current,panZoom:A,getTransform:()=>k.getState().transform,getViewScale:()=>Y.current}),()=>{var ne;(ne=q.current)==null||ne.destroy()}},[A]),x.useEffect(()=>{var ne;(ne=q.current)==null||ne.update({translateExtent:T,width:D,height:B,inversePan:w,pannable:b,zoomStep:y,zoomable:_})},[b,_,w,y,T,D,B]);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?x.useCallback((ne,ue)=>{const ye=k.getState().nodeLookup.get(ue).internals.userNode;v(ne,ye)},[]):void 0,Q=m??j["minimap.ariaLabel"];return p.jsx(Dd,{position:h,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:He(["react-flow__minimap",n]),"data-testid":"rf__minimap",children:p.jsxs("svg",{width:L,height:I,viewBox:`${X} ${F} ${U} ${G}`,className:"react-flow__minimap-svg",role:"img","aria-labelledby":W,ref:C,onClick:te,children:[Q&&p.jsx("title",{id:W,children:Q}),p.jsx(uG,{onClick:J,nodeColor:o,nodeStrokeColor:r,nodeBorderRadius:s,nodeClassName:i,nodeStrokeWidth:a,nodeComponent:l}),p.jsx("path",{className:"react-flow__minimap-mask",d:`M${X-O},${F-O}h${U+O*2}v${G+O*2}h${-U-O*2}z
438
- M${E.x},${E.y}h${E.width}v${E.height}h${-E.width}z`,fillRule:"evenodd",pointerEvents:"none"})]})})}BE.displayName="MiniMap";x.memo(BE);const gG=e=>n=>e?`${Math.max(1/n.transform[2],1)}`:void 0,vG={[qi.Line]:"right",[qi.Handle]:"bottom-right"};function yG({nodeId:e,position:n,variant:r=qi.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:h,autoScale:g=!0,shouldResize:v,onResizeStart:b,onResize:_,onResizeEnd:m}){const w=xE(),y=typeof e=="string"?e:w,S=Ie(),k=x.useRef(null),C=r===qi.Handle,N=we(x.useCallback(gG(C&&g),[C,g]),Te),E=x.useRef(null),P=n??vG[r];x.useEffect(()=>{if(!(!k.current||!y))return E.current||(E.current=WU({domNode:k.current,nodeId:y,getStoreItems:()=>{const{nodeLookup:T,transform:D,snapGrid:B,snapToGrid:j,nodeOrigin:L,domNode:I}=S.getState();return{nodeLookup:T,transform:D,snapGrid:B,snapToGrid:j,nodeOrigin:L,paneDomNode:I}},onChange:(T,D)=>{const{triggerNodeChanges:B,nodeLookup:j,parentLookup:L,nodeOrigin:I}=S.getState(),z=[],M={x:T.x,y:T.y},R=j.get(y);if(R&&R.expandParent&&R.parentId){const $=R.origin??I,V=T.width??R.measured.width??0,O=T.height??R.measured.height??0,X={id:R.id,parentId:R.parentId,rect:{width:V,height:O,...HN({x:T.x??R.position.x,y:T.y??R.position.y},{width:V,height:O},R.parentId,j,$)}},F=t0([X],j,L,I);z.push(...F),M.x=T.x?Math.max($[0]*V,T.x):void 0,M.y=T.y?Math.max($[1]*O,T.y):void 0}if(M.x!==void 0&&M.y!==void 0){const $={id:y,type:"position",position:{...M}};z.push($)}if(T.width!==void 0&&T.height!==void 0){const V={id:y,type:"dimensions",resizing:!0,setAttributes:h?h==="horizontal"?"width":"height":!0,dimensions:{width:T.width,height:T.height}};z.push(V)}for(const $ of D){const V={...$,type:"position"};z.push(V)}B(z)},onEnd:({width:T,height:D})=>{const B={id:y,type:"dimensions",resizing:!1,dimensions:{width:T,height:D}};S.getState().triggerNodeChanges([B])}})),E.current.update({controlPosition:P,boundaries:{minWidth:l,minHeight:c,maxWidth:u,maxHeight:f},keepAspectRatio:d,resizeDirection:h,onResizeStart:b,onResize:_,onResizeEnd:m,shouldResize:v}),()=>{var T;(T=E.current)==null||T.destroy()}},[P,l,c,u,f,d,b,_,m,v]);const A=P.split("-");return p.jsx("div",{className:He(["react-flow__resize-control","nodrag",...A,r,o]),ref:k,style:{...i,scale:N,...a&&{[C?"backgroundColor":"borderColor"]:a}},children:s})}x.memo(yG);const y1=3,Zl={screen:0,hook:160,api:340,table:520},Lp=220,x1=40;function Jl(e,n){const r=new Map,o=e.length,s=-(o*Lp+(o-1)*x1)/2;return e.forEach((a,l)=>{r.set(a,{x:s+l*(Lp+x1),y:n})}),r}function w1(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:Lp,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"?Da:e==="hook"?YR:e==="api"?Um:Hm;return p.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:3},children:[p.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6},children:[p.jsx(o,{style:{width:12,height:12,opacity:.7}}),p.jsx("span",{style:{fontWeight:600},children:n})]}),r&&p.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 xG({screen:e,graphs:n,onNodeSelect:r,selectedNodeId:o}){const{nodes:i,edges:s,empty:a}=x.useMemo(()=>{if(!n.ui||!n.api||!n.db)return{nodes:[],edges:[],empty:!0};const m=new Map;for(const F of n.ui.edges)F.type==="imports"&&(m.has(F.source)||m.set(F.source,[]),m.get(F.source).push(F.target));const w=new Set([e.id]);{let F=[e.id];for(let U=0;U<y1&&F.length>0;U++){const G=[];for(const W of F)for(const Y of m.get(W)??[])w.has(Y)||(w.add(Y),G.push(Y));F=G}}const y=new Map;for(const F of n.ui.cross_refs??[])F.type!=="calls_api"&&F.type!=="references_api"||F.layer!=="api"||w.has(F.source)&&(y.has(F.source)||y.set(F.source,[]),y.get(F.source).push(F.target));const S=new Set;for(const F of y.values())for(const U of F)S.add(U);if(S.size===0)return{nodes:[],edges:[],empty:!0};const k=(m.get(e.id)??[]).filter(F=>F!==e.id),C=[],N=new Map;for(const F of k){const U=new Set([F]);let G=[F];for(let Y=0;Y<y1&&G.length>0;Y++){const q=[];for(const te of G)for(const J of m.get(te)??[])U.has(J)||(U.add(J),q.push(J));G=q}const W=new Set;for(const Y of U)for(const q of y.get(Y)??[])W.add(q);W.size>0&&(C.push(F),N.set(F,W))}const E=new Set(y.get(e.id)??[]),P=n.api.nodes.filter(F=>S.has(F.id)),A=new Set,T=new Map;for(const F of P){const U=(F.db_models??[]).map(G=>G);T.set(F.id,U);for(const G of U)A.add(G)}const D=n.db.nodes.filter(F=>A.has(F.name)||A.has(F.name.toLowerCase())),B=new Map;for(const F of D)B.set(F.name,F.id),B.set(F.name.toLowerCase(),F.id);const j=[],L=[],I=Jl([e.id],Zl.screen);j.push({id:`screen:${e.id}`,position:I.get(e.id),data:{label:tc("screen",Yr(e),e.route??void 0)},style:ec("screen"),sourcePosition:"bottom",targetPosition:"top"});const z=[...C].sort((F,U)=>{const G=[...N.get(F)??[]],W=[...N.get(U)??[]],Y=P.map(te=>te.id),q=te=>{const J=te.map(Q=>Y.indexOf(Q)).filter(Q=>Q>=0);return J.length>0?J.reduce((Q,ne)=>Q+ne,0)/J.length:0};return q(G)-q(W)});if(z.length>0){const F=Jl(z,Zl.hook);for(const U of z){const G=U.split("/").pop()??U;j.push({id:`hook:${U}`,position:F.get(U),data:{label:tc("hook",G.replace(/\.tsx?$/,""),U)},style:ec("hook"),sourcePosition:"bottom",targetPosition:"top"}),L.push({id:`e:screen-${U}`,source:`screen:${e.id}`,target:`hook:${U}`,animated:!1,style:{stroke:"rgba(139,92,246,0.95)"}})}}const M=new Map;for(const F of C){const U=j.find(G=>G.id===`hook:${F}`);U&&M.set(F,U.position)}M.set(e.id,I.get(e.id));const R=new Map;for(const F of S){const U=[];E.has(F)&&U.push(e.id);for(const[G,W]of N.entries())W.has(F)&&U.push(G);R.set(F,U)}const $=w1(P.map(F=>F.id),M,R);if($.length>0){const F=Jl($,Zl.api);for(const U of P)j.push({id:`api:${U.id}`,position:F.get(U.id),data:{label:tc("api",`${U.methods.join(",")} ${U.path.split("/").pop()||"/"}`,U.path)},style:ec("api"),sourcePosition:"bottom",targetPosition:"top"});for(const U of E)S.has(U)&&L.push({id:`e:screen-api-${U}`,source:`screen:${e.id}`,target:`api:${U}`,style:{stroke:"rgba(139,92,246,0.95)"}});for(const[U,G]of N.entries())for(const W of G)L.push({id:`e:${U}-${W}`,source:`hook:${U}`,target:`api:${W}`,style:{stroke:"rgba(139,92,246,0.95)"}})}const V=new Map;for(const F of $){const U=j.find(G=>G.id===`api:${F}`);U&&V.set(F,U.position)}const O=new Map;for(const F of P){const U=T.get(F.id)??[];for(const G of U){const W=B.get(G)??B.get(G.toLowerCase());W&&(O.has(W)||O.set(W,[]),O.get(W).push(F.id))}}const X=w1(D.map(F=>F.id),V,O);if(X.length>0){const F=Jl(X,Zl.table);for(const U of D)j.push({id:`table:${U.id}`,position:F.get(U.id),data:{label:tc("table",U.name)},style:ec("table"),sourcePosition:"bottom",targetPosition:"top"});for(const U of P){const G=T.get(U.id)??[];for(const W of G){const Y=B.get(W)??B.get(W.toLowerCase());Y&&L.push({id:`e:${U.id}-${Y}`,source:`api:${U.id}`,target:`table:${Y}`,style:{stroke:"rgba(34,197,94,0.95)"}})}}}return{nodes:j,edges:L,empty:!1}},[e,n]),l=x.useRef(null),c=i,u=s,f=x.useCallback(m=>{const w=l.current;if(!w)return;const y=new Set([m]),S=new Set;for(const k of s)k.source===m&&(y.add(k.target),S.add(k.id)),k.target===m&&(y.add(k.source),S.add(k.id));w.querySelectorAll(".react-flow__node").forEach(k=>{const C=k.getAttribute("data-id")??"";k.style.opacity=y.has(C)?"1":"0.15",k.style.transition="opacity 120ms ease"}),w.querySelectorAll(".react-flow__edge").forEach(k=>{const C=k.getAttribute("data-id")??"",N=S.has(C);k.style.opacity=N?"1":"0.08",k.style.transition="opacity 120ms ease",N&&k.classList.add("animated")})},[s]),d=x.useCallback(()=>{const m=l.current;m&&(m.querySelectorAll(".react-flow__node").forEach(w=>{w.style.opacity="",w.style.transition=""}),m.querySelectorAll(".react-flow__edge").forEach(w=>{w.style.opacity="",w.style.transition="",w.classList.remove("animated")}))},[]),h=x.useCallback((m,w)=>{f(w.id)},[f]),g=x.useCallback(()=>{d()},[d]),v=(m,w)=>{const[y,...S]=w.id.split(":"),k=S.join(":"),C={screen:"ui",hook:"ui",api:"api",table:"db"};r==null||r(k,C[y]??"ui")};if(a)return p.jsx("div",{className:"flex h-full items-center justify-center p-8",children:p.jsxs("div",{className:"text-center",children:[p.jsx("h3",{className:"text-sm font-semibold text-foreground",children:Yr(e)}),p.jsx("p",{className:"mt-2 text-xs text-muted-foreground",children:"No API or database dependencies detected for this screen."})]})});const{focusedNodes:b,focusedEdges:_}=x.useMemo(()=>{var k;if(!o)return{focusedNodes:c,focusedEdges:u};const m=(k=c.find(C=>{const[,...N]=C.id.split(":");return N.join(":")===o}))==null?void 0:k.id;if(!m)return{focusedNodes:c,focusedEdges:u};const w=new Set([m]);for(const C of u)C.source===m&&w.add(C.target),C.target===m&&w.add(C.source);const y=c.filter(C=>w.has(C.id)),S=u.filter(C=>w.has(C.source)&&w.has(C.target));return{focusedNodes:y,focusedEdges:S}},[c,u,o]);return p.jsx("div",{ref:l,className:"relative h-full w-full",children:p.jsx(Fd,{children:p.jsxs(o0,{nodes:b,edges:_,fitView:!0,fitViewOptions:{padding:.3},proOptions:{hideAttribution:!0},minZoom:.2,maxZoom:1.5,nodesDraggable:!1,nodesConnectable:!1,elementsSelectable:!1,onNodeMouseEnter:h,onNodeMouseLeave:g,onNodeClick:v,children:[p.jsx(i0,{color:"rgba(255,255,255,0.05)",gap:24}),p.jsx(s0,{showInteractive:!1})]},o??"full")})})}const Nc=220,b1=40,wG=110,bG=0,_G=180,ei=6;function _1(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 S1(e,n,r){const o=r?Ju:Da;return p.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:3},children:[p.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6},children:[p.jsx(o,{style:{width:12,height:12,opacity:.7}}),p.jsx("span",{style:{fontWeight:600},children:e})]}),n&&p.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 SG({module:e,screens:n,onScreenClick:r}){const{nodes:o,edges:i}=x.useMemo(()=>{const a=[],l=[];Math.max(1,Math.ceil(n.length/ei)),Math.min(ei,n.length);const c=0;return a.push({id:`module:${e}`,position:{x:c-Nc/2,y:bG},data:{label:S1(Na(e),`${n.length} screens`,!0)},style:_1(!0),sourcePosition:"bottom",targetPosition:"top",selectable:!1,draggable:!1}),n.forEach((u,f)=>{const d=Math.floor(f/ei),h=f%ei,g=Math.min(ei,n.length-d*ei),v=g*Nc+(g-1)*b1,_=c-v/2+h*(Nc+b1),m=_G+d*wG;a.push({id:`screen:${u.id}`,position:{x:_,y:m},data:{label:S1(Yr(u),u.route??void 0,!1),screenId:u.id},style:_1(!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 p.jsx("div",{className:"h-full w-full",children:p.jsx(Fd,{children:p.jsxs(o0,{nodes:o,edges:i,fitView:!0,fitViewOptions:{padding:.2},proOptions:{hideAttribution:!0},minZoom:.2,maxZoom:1.5,nodesConnectable:!1,onNodeClick:s,children:[p.jsx(i0,{color:"rgba(255,255,255,0.05)",gap:24}),p.jsx(s0,{showInteractive:!1})]})})})}function kG(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 CG(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 NG(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 EG={ui:Da,api:Um,db:Hm},PG={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 jG({type:e}){const n=PG[e]??"bg-zinc-500/20 text-zinc-300";return p.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 ti({children:e}){return p.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:p.jsxs("div",{className:"mb-3",children:[p.jsxs("div",{className:"mb-1.5 flex items-center gap-1.5 text-[10px] font-medium uppercase tracking-wider text-slate-500",children:[p.jsx(r,{className:"h-3 w-3"}),e,p.jsxs("span",{className:"text-slate-600",children:["(",n.length,")"]})]}),p.jsx("ul",{className:"space-y-0.5",children:n.map(i=>p.jsx("li",{children:p.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:[p.jsx(zi,{className:"h-3 w-3 shrink-0 text-slate-500"}),p.jsx("span",{className:"truncate",children:i.nodeName}),p.jsx("span",{className:"ml-auto shrink-0 text-[10px] text-slate-600",children:i.edgeType})]})},`${i.direction}-${i.edgeType}-${i.nodeId}`))})]})}function MG({filePath:e}){const[n,r]=x.useState(null),[o,i]=x.useState(!0),[s,a]=x.useState(null),l=Uo();if(x.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 h=await fetch(l("/api/file-content",{path:d}));if(!h.ok)continue;const g=await h.json();r(g.content),i(!1);return}catch{continue}a("File not found"),i(!1)}f()},[e]),o)return p.jsx("p",{className:"px-3 py-2 text-xs text-slate-500",children:"Loading source..."});if(s)return p.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 p.jsx("div",{className:"overflow-auto rounded border border-slate-700/50 bg-slate-900/80",children:p.jsx("pre",{className:"p-3 text-[11px] leading-[1.6]",children:p.jsx("code",{children:c.map((u,f)=>p.jsxs("div",{className:"flex",children:[p.jsx("span",{className:"mr-4 inline-block w-8 select-none text-right text-slate-600",children:f+1}),p.jsx("span",{className:"flex-1 text-slate-300",children:u||" "})]},f))})})})}function HE({nodeId:e,nodeLayer:n,graphs:r,onClose:o,onNavigate:i}){const s=kG(e,n,r),a=CG(e,n,r),l=n==="ui"?NG(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 p.jsx("div",{className:"flex h-full flex-col bg-slate-900/95",children:p.jsxs("div",{className:"flex items-center justify-between border-b border-slate-700/50 px-4 py-3",children:[p.jsx("span",{className:"text-sm text-slate-400",children:"Node not found"}),p.jsx("button",{type:"button",onClick:o,className:"rounded p-1 hover:bg-slate-700/50",children:p.jsx(tu,{className:"h-4 w-4 text-slate-400"})})]})});const h=EG[n],g=v=>i(v,"ui");return p.jsxs("div",{className:"flex h-full flex-col bg-slate-900/95 overflow-hidden",children:[p.jsxs("div",{className:"flex items-center gap-3 border-b border-slate-700/50 px-5 py-4",children:[p.jsx("div",{className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-lg bg-slate-800",children:p.jsx(h,{className:"h-4 w-4 text-slate-400"})}),p.jsxs("div",{className:"min-w-0 flex-1",children:[p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx("h2",{className:"truncate text-sm font-semibold text-slate-100",children:s.name}),p.jsx(jG,{type:s.type})]}),p.jsx("p",{className:"mt-0.5 truncate font-mono text-[10px] text-slate-500",children:s.id})]}),p.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:p.jsx(tu,{className:"h-4 w-4"})})]}),p.jsxs("div",{className:"flex-1 overflow-y-auto px-5 py-4 space-y-5",children:[p.jsxs("section",{children:[p.jsx(ti,{children:"Info"}),p.jsxs("div",{className:"space-y-1.5 text-xs",children:[s.module&&p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx("span",{className:"w-16 shrink-0 text-slate-500",children:"Module"}),p.jsx("span",{className:`text-slate-300 ${s.module==="untagged"?"text-yellow-500/70 italic":""}`,children:s.module})]}),s.route&&p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx("span",{className:"w-16 shrink-0 text-slate-500",children:"Route"}),p.jsx("span",{className:"font-mono text-slate-300",children:s.route})]}),s.methods&&s.methods.length>0&&p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx("span",{className:"w-16 shrink-0 text-slate-500",children:"Methods"}),p.jsx("span",{className:"flex gap-1",children:s.methods.map(v=>p.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&&p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx("span",{className:"w-16 shrink-0 text-slate-500",children:"Path"}),p.jsx("span",{className:"font-mono text-slate-300",children:s.path})]}),s.exports&&s.exports.length>0&&p.jsxs("div",{className:"flex items-start gap-2",children:[p.jsx("span",{className:"w-16 shrink-0 pt-0.5 text-slate-500",children:"Exports"}),p.jsx("div",{className:"flex flex-wrap gap-1",children:s.exports.map(v=>p.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&&p.jsxs("div",{className:"flex items-start gap-2",children:[p.jsx("span",{className:"w-16 shrink-0 pt-0.5 text-slate-500",children:"Models"}),p.jsx("div",{className:"flex flex-wrap gap-1",children:s.db_models.map(v=>p.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&&p.jsxs("section",{children:[p.jsx(ti,{children:"Tags"}),p.jsx("div",{className:"flex flex-wrap gap-1.5",children:Object.entries(s.tags).map(([v,b])=>p.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:[p.jsxs("span",{className:"font-medium",children:[v,":"]}),p.jsx("span",{children:b})]},v))})]}),s.columns&&s.columns.length>0&&p.jsxs("section",{children:[p.jsx(ti,{children:"Columns"}),p.jsx("div",{className:"overflow-hidden rounded border border-slate-700/50",children:p.jsxs("table",{className:"w-full text-xs",children:[p.jsx("thead",{children:p.jsxs("tr",{className:"border-b border-slate-700/50 bg-slate-800/50",children:[p.jsx("th",{className:"px-3 py-1.5 text-left font-medium text-slate-400",children:"Name"}),p.jsx("th",{className:"px-3 py-1.5 text-left font-medium text-slate-400",children:"Type"})]})}),p.jsx("tbody",{children:s.columns.map(v=>p.jsxs("tr",{className:"border-b border-slate-800/50 last:border-0",children:[p.jsx("td",{className:"px-3 py-1.5 font-mono text-slate-300",children:v.name}),p.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)&&p.jsxs("section",{children:[p.jsx(ti,{children:"Component Tree"}),p.jsx(nc,{label:"Renders",edges:c,icon:RR,onNavigate:g}),p.jsx(nc,{label:"Rendered by",edges:u,icon:Fm,onNavigate:g}),p.jsx(nc,{label:"Imports",edges:f,icon:Yv,onNavigate:g}),p.jsx(nc,{label:"Imported by",edges:d,icon:Yv,onNavigate:g})]}),(l.to.length>0||l.from.length>0)&&p.jsxs("section",{children:[p.jsx(ti,{children:"Navigation"}),l.to.length>0&&p.jsxs("div",{className:"mb-3",children:[p.jsxs("div",{className:"mb-1.5 flex items-center gap-1.5 text-[10px] font-medium uppercase tracking-wider text-slate-500",children:[p.jsx(Gv,{className:"h-3 w-3"}),"Navigates to",p.jsxs("span",{className:"text-slate-600",children:["(",l.to.length,")"]})]}),p.jsx("ul",{className:"space-y-0.5",children:l.to.map(v=>p.jsx("li",{children:p.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:[p.jsx(zi,{className:"h-3 w-3 shrink-0 text-slate-500"}),p.jsx("span",{className:"truncate",children:v.name}),v.route&&p.jsx("span",{className:"ml-auto shrink-0 font-mono text-[10px] text-slate-600",children:v.route})]})},v.id))})]}),l.from.length>0&&p.jsxs("div",{className:"mb-3",children:[p.jsxs("div",{className:"mb-1.5 flex items-center gap-1.5 text-[10px] font-medium uppercase tracking-wider text-slate-500",children:[p.jsx(Gv,{className:"h-3 w-3"}),"Navigated from",p.jsxs("span",{className:"text-slate-600",children:["(",l.from.length,")"]})]}),p.jsx("ul",{className:"space-y-0.5",children:l.from.map(v=>p.jsx("li",{children:p.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:[p.jsx(zi,{className:"h-3 w-3 shrink-0 text-slate-500"}),p.jsx("span",{className:"truncate",children:v.name}),v.route&&p.jsx("span",{className:"ml-auto shrink-0 font-mono text-[10px] text-slate-600",children:v.route})]})},v.id))})]})]}),p.jsxs("section",{children:[p.jsx(ti,{children:"Source Code"}),p.jsx(MG,{filePath:s.id})]})]})]})}function RG(){var w;const[e,n]=x.useState(null),[r,o]=x.useState(null),[i,s]=x.useState(null),[a,l]=x.useState(null),[c,u]=x.useState(null),[f,d]=x.useState("ui"),h=Uo();x.useEffect(()=>{fetch(h("/api/raw-graphs")).then(y=>{if(!y.ok)throw new Error(`HTTP ${y.status}`);return y.json()}).then(y=>n(y)).catch(y=>o(String(y)))},[h]);const g=x.useMemo(()=>e!=null&&e.ui?e.ui.nodes.filter(y=>Gg(y)&&Jn(y)):[],[e]),v=x.useMemo(()=>{const y=new Map;for(const N of g){const E=Jn(N);y.has(E)||y.set(E,[]),y.get(E).push(N)}const S=[],k=new Map;for(const[N,E]of y)E.length===1?S.push(...E):k.set(N,E);const C=[...k.entries()].map(([N,E])=>({module:N,screens:E})).sort((N,E)=>E.screens.length-N.screens.length);return S.length>0&&C.push({module:"misc",screens:S}),C.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),C},[g]),b=i??((w=v[0])==null?void 0:w.module)??null,_=x.useMemo(()=>{var y;return b?((y=v.find(S=>S.module===b))==null?void 0:y.screens)??[]:[]},[v,b]),m=x.useMemo(()=>!(e!=null&&e.ui)||!a?null:e.ui.nodes.find(y=>y.id===a)??null,[e,a]);return r?p.jsx(TG,{message:r}):e?p.jsxs("div",{className:"flex h-full min-h-0",children:[p.jsxs("div",{className:`flex w-64 flex-col border-r border-sidebar-border bg-sidebar-background/40 ${c?"hidden":""}`,children:[p.jsxs("div",{className:"border-b border-sidebar-border px-4 py-3",children:[p.jsx("h2",{className:"text-xs font-semibold uppercase tracking-wider text-muted-foreground",children:"Modules"}),p.jsxs("p",{className:"mt-0.5 text-[11px] text-muted-foreground",children:[v.length," modules · ",g.length," screens"]})]}),p.jsx("ul",{className:"flex-1 overflow-y-auto px-2 py-2",children:v.map(y=>{const S=y.module===b;return p.jsx("li",{children:p.jsxs("button",{type:"button",onClick:()=>{s(y.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"} ${y.module==="untagged"?"border border-dashed border-yellow-500/30":""}`,children:[p.jsxs("span",{className:"flex items-center gap-2",children:[p.jsx(Da,{className:`h-3.5 w-3.5 shrink-0 ${y.module==="untagged"?"text-yellow-500/70":"opacity-70"}`}),Na(y.module)]}),p.jsx("span",{className:"text-xs tabular-nums text-muted-foreground",children:y.screens.length})]})},y.module)})})]}),p.jsx("div",{className:"flex flex-1 flex-col overflow-hidden",children:m?p.jsxs(p.Fragment,{children:[p.jsxs("div",{className:"flex items-center gap-3 border-b border-sidebar-border px-6 py-4",children:[p.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:[p.jsx(Fm,{className:"h-3 w-3"}),"Back"]}),p.jsxs("div",{className:"min-w-0",children:[p.jsx("h1",{className:"truncate text-lg font-semibold text-foreground",children:Yr(m)}),m.route&&p.jsx("p",{className:"mt-0.5 truncate font-mono text-[11px] text-muted-foreground",children:m.route})]})]}),p.jsx("div",{className:"flex-1 min-h-0",children:p.jsx(xG,{screen:m,graphs:e,selectedNodeId:c,onNodeSelect:(y,S)=>{u(y),d(S)}})})]}):p.jsxs(p.Fragment,{children:[p.jsxs("div",{className:"border-b border-sidebar-border px-6 py-4",children:[p.jsx("h1",{className:"text-lg font-semibold text-foreground",children:b?Na(b):"Select a module"}),p.jsxs("p",{className:"mt-0.5 text-xs text-muted-foreground",children:[_.length," screens · click a screen to drill in"]})]}),p.jsx("div",{className:"flex-1 min-h-0",children:b&&_.length>0?p.jsx(SG,{module:b,screens:_,onScreenClick:l},b):p.jsx("div",{className:"flex h-full items-center justify-center",children:p.jsx("p",{className:"text-sm text-muted-foreground",children:b?"No screens in this module.":"Select a module."})})})]})}),c&&e&&p.jsx("div",{className:"flex w-[420px] shrink-0 flex-col border-l border-sidebar-border bg-slate-900/95",children:p.jsx(HE,{nodeId:c,nodeLayer:f,graphs:e,onClose:()=>u(null),onNavigate:(y,S)=>{u(y),d(S)}})})]}):p.jsx(AG,{})}function AG(){return p.jsx("div",{className:"flex h-full items-center justify-center",children:p.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading graph data…"})})}function TG({message:e}){return p.jsx("div",{className:"flex h-full items-center justify-center p-8",children:p.jsxs("div",{className:"max-w-md text-center",children:[p.jsx("h2",{className:"text-sm font-semibold text-foreground",children:"Failed to load graph"}),p.jsx("p",{className:"mt-2 text-xs text-muted-foreground",children:e})]})})}function IG(){return p.jsx("div",{className:"flex h-full items-center justify-center p-8",children:p.jsxs("div",{className:"text-center",children:[p.jsx("h1",{className:"text-2xl font-semibold text-foreground",children:"User Journeys"}),p.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:"User journey flowcharts coming soon."})]})})}const OG={admin:"#8b5cf6",auth:"#f59e0b",settings:"#6366f1",project:"#3b82f6",org:"#10b981",root:"#64748b",misc:"#94a3b8"};function Ru(e){return e?OG[e]??`hsl(${Math.abs($G(e))%360}, 60%, 55%)`:"#64748b"}function $G(e){let n=0;for(let r=0;r<e.length;r++)n=Math.imul(31,n)+e.charCodeAt(r)|0;return n}function DG(e){const n=e.ui.nodes.filter(l=>Gg(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 h of o.get(d)??[])f.push(h)}}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 LG(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 a0({node:e,depth:n,onSelect:r,selectedId:o}){var f;const[i,s]=x.useState(n<2),a=e.children.length>0,l=e.screen?Jn(e.screen):null,c=Ru(l),u=((f=e.screen)==null?void 0:f.id)===o;return p.jsxs("div",{children:[p.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?p.jsx("button",{onClick:d=>{d.stopPropagation(),s(!i)},className:"p-0.5 shrink-0",children:i?p.jsx(ed,{className:"h-2.5 w-2.5"}):p.jsx(zi,{className:"h-2.5 w-2.5"})}):p.jsx("span",{className:"w-3.5"}),e.screen&&p.jsx("span",{className:"w-1.5 h-1.5 rounded-full shrink-0",style:{backgroundColor:c}}),p.jsx("span",{className:"truncate",children:e.screen?Yr(e.screen):e.segment})]}),i&&a&&e.children.sort((d,h)=>d.segment.localeCompare(h.segment)).map(d=>p.jsx(a0,{node:d,depth:n+1,onSelect:r,selectedId:o},d.fullRoute))]})}const Kf=200,en=200,rc=56,k1=120,ni=30;function zG({focusId:e,screens:n,outgoing:r,incoming:o,onNavigate:i,onDetail:s}){var y,S;const a=x.useRef(null),l=x.useMemo(()=>new Map(n.map(k=>[k.id,k])),[n]),c=l.get(e),{flowNodes:u,flowEdges:f}=x.useMemo(()=>{var j;if(!c)return{flowNodes:[],flowEdges:[]};const k=[...r.get(e)??[]].filter(L=>l.has(L)),C=[...o.get(e)??[]].filter(L=>l.has(L)),N=[],E=[],P=(L,I,z,M)=>{const R=l.get(L),$=Jn(R),V=Ru($);return{id:L,position:{x:I,y:z},data:{label:p.jsxs("div",{style:{pointerEvents:"none"},children:[p.jsx("div",{style:{fontWeight:M?700:500,fontSize:M?13:11,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:Yr(R)}),p.jsx("div",{style:{fontSize:9,opacity:.5,marginTop:2,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:R.route}),$&&$!=="root"&&p.jsx("div",{style:{fontSize:8,marginTop:2,color:V,textTransform:"uppercase",letterSpacing:"0.05em",fontWeight:500},children:Na($)})]})},style:{width:M?en+40:en,height:M?rc+10:rc,background:M?`linear-gradient(135deg, ${V}30, ${V}15)`:`linear-gradient(135deg, ${V}15, ${V}08)`,border:`${M?2:1}px solid ${V}${M?"80":"40"}`,borderRadius:10,padding:"8px 12px",color:"#e2e8f0",cursor:M?"default":"pointer",boxShadow:M?`0 0 20px ${V}20`:"none"},sourcePosition:"bottom",targetPosition:"top"}},T=-(C.length*(en+ni)-ni)/2+en/2;for(let L=0;L<C.length;L++){const I=C[L];N.push(P(I,T+L*(en+ni)-en/2,Kf-k1-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,Kf,!0));const B=-(k.length*(en+ni)-ni)/2+en/2;for(let L=0;L<k.length;L++){const I=k[L];C.includes(I)||(N.push(P(I,B+L*(en+ni)-en/2,Kf+k1+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=x.useCallback(k=>{const C=a.current;if(!C)return;const N=new Set([k]),E=new Set;for(const P of f)P.source===k&&(N.add(P.target),E.add(P.id)),P.target===k&&(N.add(P.source),E.add(P.id));C.querySelectorAll(".react-flow__node").forEach(P=>{P.style.opacity=N.has(P.getAttribute("data-id")??"")?"1":"0.25",P.style.transition="opacity 120ms ease"}),C.querySelectorAll(".react-flow__edge").forEach(P=>{const A=P.getAttribute("data-id")??"";P.style.opacity=E.has(A)?"1":"0.1",P.style.transition="opacity 120ms ease"})},[f]),h=x.useCallback(()=>{const k=a.current;k&&(k.querySelectorAll(".react-flow__node").forEach(C=>{C.style.opacity="",C.style.transition=""}),k.querySelectorAll(".react-flow__edge").forEach(C=>{C.style.opacity="",C.style.transition=""}))},[]),g=x.useCallback((k,C)=>{C.id!==e&&d(C.id)},[d,e]),v=x.useCallback(()=>h(),[h]),b=x.useCallback((k,C)=>{C.id!==e&&i(C.id)},[e,i]),_=x.useCallback((k,C)=>s(C.id),[s]);if(!c)return null;const m=((y=o.get(e))==null?void 0:y.size)??0,w=((S=r.get(e))==null?void 0:S.size)??0;return p.jsxs("div",{className:"flex flex-1 flex-col min-h-0",children:[p.jsxs("div",{className:"px-5 py-3 border-b border-sidebar-border/50",children:[p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx("span",{className:"w-2.5 h-2.5 rounded-full",style:{backgroundColor:Ru(Jn(c))}}),p.jsx("h2",{className:"text-sm font-semibold text-foreground",children:Yr(c)}),p.jsx("span",{className:"font-mono text-[10px] text-muted-foreground/50",children:c.route})]}),p.jsxs("p",{className:"text-[10px] text-muted-foreground mt-0.5",children:[m," incoming · ",w," outgoing",m===0&&w===0&&" · no navigation links detected",p.jsx("span",{className:"ml-2 opacity-50",children:"click to navigate · double-click for details"})]})]}),p.jsx("div",{ref:a,className:"flex-1 min-h-0",children:p.jsx(Fd,{children:p.jsxs(o0,{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:b,onNodeDoubleClick:_,children:[p.jsx(i0,{color:"rgba(255,255,255,0.03)",gap:24}),p.jsx(s0,{showInteractive:!1})]},e)})})]})}function FG({tree:e,noRouteScreens:n,onSelect:r,selectedId:o}){return p.jsxs("div",{className:"flex-1 overflow-y-auto px-4 py-3",children:[p.jsx(a0,{node:e,depth:0,onSelect:r,selectedId:o}),n.length>0&&p.jsxs("div",{className:"mt-4 pt-3 border-t border-sidebar-border",children:[p.jsxs("div",{className:"flex items-center gap-2 mb-1.5 px-1.5",children:[p.jsx(Vm,{className:"h-3 w-3 text-yellow-500/70"}),p.jsxs("span",{className:"text-[10px] font-medium text-muted-foreground uppercase tracking-wider",children:["Layouts (",n.length,")"]})]}),n.map(i=>p.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:[p.jsx("span",{className:"w-1.5 h-1.5 rounded-full shrink-0",style:{backgroundColor:Ru(Jn(i))}}),i.name]},i.id))]})]})}function BG(){const[e,n]=x.useState(null),[r,o]=x.useState(null),[i,s]=x.useState(null),[a,l]=x.useState(null),[c,u]=x.useState("visual"),[f,d]=x.useState([]),h=Uo();x.useEffect(()=>{fetch(h("/api/raw-graphs")).then(k=>{if(!k.ok)throw new Error(`HTTP ${k.status}`);return k.json()}).then(k=>n(k)).catch(k=>o(String(k)))},[h]);const{screens:g,outgoing:v,incoming:b,tree:_,noRouteScreens:m,navCount:w}=x.useMemo(()=>{if(!(e!=null&&e.ui))return{screens:[],outgoing:new Map,incoming:new Map,tree:null,noRouteScreens:[],navCount:0};const k=DG(e),C=k.screens.filter(P=>P.route),N=k.screens.filter(P=>!P.route);let E=0;for(const P of k.outgoing.values())E+=P.size;return{screens:k.screens,outgoing:k.outgoing,incoming:k.incoming,tree:LG(C),noRouteScreens:N,navCount:E}},[e]);x.useEffect(()=>{if(!i&&g.length>0){const k=g.find(C=>C.route==="/");s((k==null?void 0:k.id)??g[0].id)}},[g,i]);const y=x.useCallback(k=>{d(C=>i?[...C,i]:C),s(k)},[i]),S=x.useCallback(()=>{d(k=>{const C=[...k],N=C.pop();return N&&s(N),C})},[]);return r?p.jsx("div",{className:"flex h-full items-center justify-center",children:p.jsx("p",{className:"text-sm text-red-400",children:r})}):!e||!_?p.jsx("div",{className:"flex h-full items-center justify-center",children:p.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading..."})}):p.jsxs("div",{className:"flex h-full min-h-0",children:[p.jsxs("div",{className:"flex flex-1 flex-col overflow-hidden",children:[p.jsxs("div",{className:"border-b border-sidebar-border px-6 py-3 flex items-center justify-between",children:[p.jsxs("div",{className:"flex items-center gap-3",children:[c==="visual"&&f.length>0&&p.jsx("button",{onClick:S,className:"p-1 rounded-md hover:bg-white/10 text-muted-foreground hover:text-foreground transition-colors",children:p.jsx(Fm,{className:"h-4 w-4"})}),p.jsx(aA,{className:"h-5 w-5 text-muted-foreground"}),p.jsxs("div",{children:[p.jsx("h1",{className:"text-lg font-semibold text-foreground",children:"Sitemap"}),p.jsxs("p",{className:"mt-0.5 text-xs text-muted-foreground",children:[g.filter(k=>k.route).length," screens · ",w," links"]})]})]}),p.jsxs("div",{className:"flex items-center gap-1 bg-muted/30 rounded-lg p-0.5",children:[p.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:[p.jsx(QR,{className:"h-3.5 w-3.5"}),"Visual"]}),p.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:[p.jsx(iA,{className:"h-3.5 w-3.5"}),"List"]})]})]}),c==="list"?p.jsx(FG,{tree:_,noRouteScreens:m,onSelect:k=>{s(k),u("visual")},selectedId:i}):i?p.jsx(zG,{focusId:i,screens:g,outgoing:v,incoming:b,onNavigate:y,onDetail:l}):null]}),c==="visual"&&p.jsxs("div",{className:"w-56 shrink-0 border-l border-sidebar-border overflow-y-auto bg-sidebar-background/30",children:[p.jsx("div",{className:"px-3 py-2 border-b border-sidebar-border/50",children:p.jsx("h3",{className:"text-[10px] font-semibold uppercase tracking-wider text-muted-foreground",children:"All Screens"})}),p.jsx("div",{className:"py-1",children:p.jsx(a0,{node:_,depth:0,onSelect:y,selectedId:i})})]}),a&&e&&p.jsx("div",{className:"flex w-[400px] shrink-0 flex-col border-l border-sidebar-border bg-slate-900/95",children:p.jsx(HE,{nodeId:a,nodeLayer:"ui",graphs:e,onClose:()=>l(null),onNavigate:k=>{l(null),y(k)}})})]})}function C1({onSelect:e,onClose:n,buildUrl:r}){const[o,i]=x.useState(null),[s,a]=x.useState(!0),l=x.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 x.useEffect(()=>{l()},[l]),o?p.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50",onClick:n,children:p.jsxs("div",{className:"bg-card border border-border rounded-xl w-[480px] max-h-[70vh] flex flex-col",onClick:c=>c.stopPropagation(),children:[p.jsxs("div",{className:"p-4 border-b border-border/50",children:[p.jsx("h3",{className:"text-sm font-semibold mb-1",children:"Select App Directory"}),p.jsx("code",{className:"text-xs text-muted-foreground break-all",children:o.current})]}),p.jsxs("div",{className:"flex-1 overflow-y-auto p-2 min-h-[200px]",children:[s&&p.jsx("div",{className:"text-xs text-muted-foreground p-2",children:"Loading..."}),o.parent&&p.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:[p.jsx(Wv,{className:"h-4 w-4 shrink-0"}),".."]}),o.dirs.map(c=>p.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:[p.jsx(Wv,{className:"h-4 w-4 shrink-0 text-purple-400"}),c,p.jsx(zi,{className:"h-3 w-3 ml-auto text-muted-foreground"})]},c)),o.dirs.length===0&&!o.parent&&p.jsx("div",{className:"text-xs text-muted-foreground p-3",children:"No subdirectories"})]}),p.jsxs("div",{className:"p-3 border-t border-border/50 flex items-center justify-between",children:[p.jsx("span",{className:"text-xs text-muted-foreground",children:o.relative==="."?"(project root)":o.relative}),p.jsxs("div",{className:"flex items-center gap-2",children:[p.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"}),p.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"})]})]})]})}):p.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50",onClick:n,children:p.jsx("div",{className:"bg-card border border-border rounded-xl p-6 w-[480px] text-sm text-muted-foreground",children:"Loading..."})})}function HG(){var Go,rl,ol,il,sl,al,ll;const[e,n]=x.useState(null),[r,o]=x.useState(!0),[i,s]=x.useState(!1),[a,l]=x.useState(!1),[c,u]=x.useState(null),[f,d]=x.useState(new Set),[h,g]=x.useState([]),[v,b]=x.useState(""),[_,m]=x.useState("crosslayer"),[w,y]=x.useState("api-binding"),[S,k]=x.useState(""),[C,N]=x.useState(null),[E,P]=x.useState(""),[A,T]=x.useState(""),[D,B]=x.useState(null),[j,L]=x.useState(!1),I=Uo(),{projects:z,reloadProjects:M,isMultiProject:R}=Cg(),[$,V]=x.useState([]),[O,X]=x.useState(""),[F,U]=x.useState(""),[G,W]=x.useState(new Set),[Y,q]=x.useState({module:!0,screen:!0}),[te,J]=x.useState([]),[Q,ne]=x.useState([]),[ue,ye]=x.useState(""),[pe,Ne]=x.useState(""),[mt,qe]=x.useState(""),zt=x.useCallback(async()=>{try{const K=await fetch(I("/api/detected-paths"));K.ok&&N(await K.json())}catch{}},[I]),dr=x.useCallback(async()=>{try{const K=await fetch("/api/projects");if(!K.ok)return;const fe=(await K.json()).projects??[];(fe.length>1||fe.some(Ue=>Ue.root!=="."))&&V(fe.map(Ue=>({name:Ue.name,root:Ue.root})))}catch{}},[]),fr=x.useCallback(async()=>{var K,me,fe,Ue,Nt,wn,io,cl,ul,dl;try{const so=await fetch(I("/api/parser-config"));if(!so.ok)throw new Error(`HTTP ${so.status}`);const Et=await so.json();n(Et),d(new Set(((K=Et.config.parsers)==null?void 0:K.disabled)??[])),g(((me=Et.config.parsers)==null?void 0:me.custom)??[]),k(Et.config.port?String(Et.config.port):""),P(((fe=Et.config.paths)==null?void 0:fe.appDir)??""),T(((Ue=Et.config.paths)==null?void 0:Ue.dbDir)??""),W(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=(io=Et.config.taggers)==null?void 0:io.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(so){u(String(so)),o(!1)}},[]);x.useEffect(()=>{fr(),zt(),dr()},[fr,zt,dr]);const ro=x.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 me={};te.length>0&&(me.rules=te),Q.length>0&&(me.trivialGroups=Q),Object.keys(me).length>0&&(K.module=me);const fe=S.trim()?parseInt(S.trim(),10):void 0,Ue={};E.trim()&&(Ue.appDir=E.trim()),A.trim()&&(Ue.dbDir=A.trim());const Nt=Object.keys(Ue).length>0?Ue:void 0,wn={...fe&&!isNaN(fe)&&{port:fe},...Nt&&{paths:Nt},parsers:{disabled:[...f],custom:h.length>0?h: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 io=await fetch(I("/api/parser-config"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(wn)});if(!io.ok)throw new Error(`HTTP ${io.status}`);l(!0),zt(),setTimeout(()=>l(!1),3e3)}catch(K){u(String(K))}finally{s(!1)}},[f,h,G,Y,te,Q,S,E,A,zt,I]),Vo=K=>{d(me=>{const fe=new Set(me);return fe.has(K)?fe.delete(K):fe.add(K),fe})},oo=()=>{if(!v.trim())return;const K={path:v.trim(),layer:_};_==="crosslayer"&&(K.concern=w),g(me=>[...me,K]),b("")},hr=K=>{g(me=>me.filter((fe,Ue)=>Ue!==K))};if(r)return p.jsx("div",{className:"flex items-center justify-center h-full text-muted-foreground",children:"Loading configuration..."});const xn=K=>K.split("-").map(me=>me[0].toUpperCase()+me.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,me])=>me.map(fe=>({id:fe.id,layer:K,label:fe.label||xn(fe.id),detected:!0,layers:[K],concern:K})))];return p.jsxs("div",{className:"h-full overflow-y-auto p-6",children:[p.jsxs("div",{className:"flex items-center justify-between mb-6",children:[p.jsxs("div",{className:"flex items-center gap-3",children:[p.jsx(R_,{className:"h-6 w-6 text-muted-foreground"}),p.jsx("h1",{className:"text-xl font-semibold",children:"Parser Configuration"})]}),p.jsxs("button",{onClick:ro,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?p.jsx(vo,{className:"h-4 w-4"}):p.jsx(Kv,{className:"h-4 w-4"}),i?"Saving...":a?"Saved":"Save"]})]}),c&&p.jsxs("div",{className:"flex items-center gap-2 p-3 rounded-lg bg-red-500/10 text-red-400 text-sm mb-6",children:[p.jsx(Ci,{className:"h-4 w-4 shrink-0"}),c]}),p.jsxs("section",{className:"mb-6 space-y-3",children:[p.jsx("h2",{className:"text-sm font-medium text-muted-foreground uppercase tracking-wider",children:"Layer Directories"}),p.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."}),p.jsxs("div",{className:"space-y-2",children:[p.jsxs("div",{className:"p-4 rounded-lg border border-border/50 bg-card space-y-2",children:[p.jsxs("div",{className:"flex items-center gap-3",children:[p.jsx("label",{className:"text-sm text-muted-foreground w-24 shrink-0",children:"UI"}),p.jsxs("div",{className:"flex-1 flex items-center gap-2",children:[p.jsx("input",{type:"text",value:E,onChange:K=>P(K.target.value),placeholder:((Go=C==null?void 0:C.detected)==null?void 0:Go.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"}),p.jsxs("button",{onClick:()=>B("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:[p.jsx(xf,{className:"h-4 w-4"}),"Browse"]}),E&&p.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:p.jsx(Xv,{className:"h-3.5 w-3.5"})})]})]}),p.jsx("div",{className:"flex items-center gap-2 pl-[108px]",children:(rl=C==null?void 0:C.overrides)!=null&&rl.appDir?p.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=C==null?void 0:C.detected)!=null&&ol.appDir?p.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:[p.jsx(vo,{className:"h-3 w-3"}),"Auto-detected: ",C.detected.appDir]}):p.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:[p.jsx(Ci,{className:"h-3 w-3"}),"Not detected"]})}),p.jsx("p",{className:"text-xs text-muted-foreground pl-[108px]",children:"Pages and layout directory. Auto-detects src/app or app/."})]}),p.jsx("div",{className:"p-4 rounded-lg border border-border/50 bg-card",children:p.jsxs("div",{className:"flex items-center gap-3",children:[p.jsx("label",{className:"text-sm text-muted-foreground w-24 shrink-0",children:"API"}),p.jsxs("div",{className:"flex-1",children:[p.jsx("span",{className:"text-sm text-muted-foreground",children:((il=C==null?void 0:C.detected)==null?void 0:il.apiDir)??"src/app/api"}),p.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"})]})]})}),p.jsxs("div",{className:"p-4 rounded-lg border border-border/50 bg-card space-y-2",children:[p.jsxs("div",{className:"flex items-center gap-3",children:[p.jsx("label",{className:"text-sm text-muted-foreground w-24 shrink-0",children:"DB"}),p.jsxs("div",{className:"flex-1 flex items-center gap-2",children:[p.jsx("input",{type:"text",value:A,onChange:K=>T(K.target.value),placeholder:((sl=C==null?void 0:C.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"}),p.jsxs("button",{onClick:()=>B("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:[p.jsx(xf,{className:"h-4 w-4"}),"Browse"]}),A&&p.jsx("button",{onClick:()=>T(""),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:p.jsx(Xv,{className:"h-3.5 w-3.5"})})]})]}),p.jsx("div",{className:"flex items-center gap-2 pl-[108px]",children:(al=C==null?void 0:C.overrides)!=null&&al.dbDir?p.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=C==null?void 0:C.detected)!=null&&ll.dbDir?p.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:[p.jsx(vo,{className:"h-3 w-3"}),"Auto-detected: ",C.detected.dbDir]}):p.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:[p.jsx(Ci,{className:"h-3 w-3"}),"Not detected"]})}),p.jsx("p",{className:"text-xs text-muted-foreground pl-[108px]",children:"Schema and migration directory. Auto-detects prisma/."})]})]})]}),p.jsxs("section",{className:"mb-6 space-y-3",children:[p.jsx("h2",{className:"text-sm font-medium text-muted-foreground uppercase tracking-wider",children:"Server"}),p.jsxs("div",{className:"flex items-center gap-3",children:[p.jsx("label",{className:"text-sm text-muted-foreground w-24 shrink-0",children:"Port"}),p.jsx("input",{type:"text",value:S,onChange:K=>k(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"}),p.jsx("span",{className:"text-xs text-muted-foreground",children:"Leave empty for random port on each start"})]})]}),p.jsxs("div",{className:"grid grid-cols-1 xl:grid-cols-2 gap-6",children:[p.jsxs("div",{className:"space-y-6",children:[p.jsxs("section",{className:"space-y-3",children:[p.jsx("h2",{className:"text-sm font-medium text-muted-foreground uppercase tracking-wider",children:"Stack Detection"}),p.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=>p.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?p.jsx(vo,{className:"h-4 w-4 text-green-500 shrink-0"}):p.jsx(BR,{className:"h-4 w-4 text-muted-foreground shrink-0"}),p.jsxs("div",{children:[p.jsx("div",{className:"text-sm font-medium",children:K.label||K.id}),p.jsxs("div",{className:"text-xs text-muted-foreground",children:[K.layers.join(", ")," layer"]})]})]},K.id))})]}),Wo.map(([K,me])=>p.jsxs("section",{className:"space-y-3",children:[p.jsxs("h2",{className:"text-sm font-medium text-muted-foreground uppercase tracking-wider",children:[xn(K)," Parsers"]}),p.jsx("div",{className:"space-y-2",children:me.map(fe=>p.jsx("div",{className:"flex items-center justify-between p-3 rounded-lg border border-border/50 bg-card",children:p.jsxs("div",{className:"flex items-center gap-3",children:[p.jsx("button",{onClick:()=>Vo(fe.id),className:`w-10 h-5 rounded-full transition-colors relative shrink-0 ${f.has(fe.id)?"bg-muted":"bg-purple-600"}`,children:p.jsx("span",{className:`block absolute top-0.5 left-0.5 h-4 w-4 rounded-full bg-white transition-all ${f.has(fe.id)?"left-0.5":"left-[22px]"}`})}),p.jsxs("div",{children:[p.jsx("div",{className:"text-sm font-medium",children:fe.label||xn(fe.id)}),p.jsx("div",{className:"text-xs text-muted-foreground",children:fe.id})]})]})},fe.id))})]},K))]}),p.jsxs("div",{className:"space-y-6",children:[p.jsxs("section",{className:"space-y-3",children:[p.jsx("h2",{className:"text-sm font-medium text-muted-foreground uppercase tracking-wider",children:"Layer Parsers"}),p.jsx("div",{className:"space-y-2",children:Bd.filter(K=>!K.concern).map(K=>p.jsx("div",{className:"flex items-center justify-between p-3 rounded-lg border border-border/50 bg-card",children:p.jsxs("div",{className:"flex items-center gap-3",children:[p.jsx("button",{onClick:()=>Vo(K.id),className:`w-10 h-5 rounded-full transition-colors relative shrink-0 ${f.has(K.id)?"bg-muted":"bg-purple-600"}`,children:p.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]"}`})}),p.jsxs("div",{children:[p.jsx("div",{className:"text-sm font-medium",children:K.label}),p.jsxs("div",{className:"text-xs text-muted-foreground",children:[K.id," — ",K.layer]})]})]})},K.id))})]}),p.jsxs("section",{className:"space-y-3",children:[p.jsx("h2",{className:"text-sm font-medium text-muted-foreground uppercase tracking-wider",children:"Custom Parsers"}),p.jsx("p",{className:"text-xs text-muted-foreground",children:"JS files exporting a parser object. Path relative to project root."}),h.length>0&&p.jsx("div",{className:"space-y-2",children:h.map((K,me)=>p.jsxs("div",{className:"flex items-center gap-2 p-2 rounded-lg border border-border/50 bg-card",children:[p.jsx("code",{className:"text-xs flex-1 text-muted-foreground",children:K.path}),p.jsx("span",{className:"text-xs px-2 py-0.5 rounded bg-muted text-muted-foreground",children:K.layer}),K.concern&&p.jsx("span",{className:"text-xs px-2 py-0.5 rounded bg-purple-500/10 text-purple-400",children:K.concern}),p.jsx("button",{onClick:()=>hr(me),className:"text-red-400 hover:text-red-300",children:p.jsx(Tl,{className:"h-3.5 w-3.5"})})]},me))}),p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx("input",{type:"text",value:v,onChange:K=>b(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"&&oo()}),p.jsxs("select",{value:_,onChange:K=>m(K.target.value),className:"px-2 py-1.5 text-sm rounded-lg border border-border/50 bg-background text-foreground",children:[p.jsx("option",{value:"crosslayer",children:"crosslayer"}),p.jsx("option",{value:"ui",children:"ui"}),p.jsx("option",{value:"api",children:"api"}),p.jsx("option",{value:"db",children:"db"})]}),_==="crosslayer"&&p.jsx("input",{type:"text",value:w,onChange:K=>y(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"}),p.jsx("button",{onClick:oo,className:"p-1.5 rounded-lg border border-border/50 hover:bg-muted transition-colors",children:p.jsx(Al,{className:"h-4 w-4"})})]}),p.jsx("datalist",{id:"concern-suggestions",children:Wo.map(([K])=>p.jsx("option",{value:K},K))})]})]})]}),p.jsxs("div",{className:"mt-8 border-t border-border/30 pt-6",children:[p.jsxs("div",{className:"flex items-center gap-3 mb-6",children:[p.jsx(MA,{className:"h-5 w-5 text-muted-foreground"}),p.jsx("h2",{className:"text-lg font-semibold",children:"Taggers"})]}),p.jsxs("div",{className:"grid grid-cols-1 xl:grid-cols-2 gap-6",children:[p.jsxs("section",{className:"space-y-3",children:[p.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=>p.jsxs("div",{className:"p-3 rounded-lg border border-border/50 bg-card space-y-2",children:[p.jsx("div",{className:"flex items-center justify-between",children:p.jsxs("div",{className:"flex items-center gap-3",children:[p.jsx("button",{onClick:()=>W(me=>{const fe=new Set(me);return fe.has(K.id)?fe.delete(K.id):fe.add(K.id),fe}),className:`w-10 h-5 rounded-full transition-colors relative shrink-0 ${G.has(K.id)?"bg-muted":"bg-purple-600"}`,children:p.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]"}`})}),p.jsxs("div",{children:[p.jsx("div",{className:"text-sm font-medium",children:K.label}),p.jsx("div",{className:"text-xs text-muted-foreground",children:K.description})]})]})}),p.jsxs("label",{className:"flex items-center gap-2 text-xs text-muted-foreground pl-[52px]",children:[p.jsx("input",{type:"checkbox",checked:Y[K.id]??!0,onChange:me=>q(fe=>({...fe,[K.id]:me.target.checked})),className:"accent-purple-600"}),"Track untagged nodes"]})]},K.id))]}),p.jsxs("section",{className:"space-y-3",children:[p.jsx("h3",{className:"text-sm font-medium text-muted-foreground uppercase tracking-wider",children:"Module Rules"}),p.jsx("p",{className:"text-xs text-muted-foreground",children:"Custom glob patterns to assign modules. Matched before auto-detection."}),te.length>0&&p.jsx("div",{className:"space-y-2",children:te.map((K,me)=>p.jsxs("div",{className:"flex items-center gap-2 p-2 rounded-lg border border-border/50 bg-card",children:[p.jsx("code",{className:"text-xs flex-1 text-muted-foreground",children:K.match}),p.jsx("span",{className:"text-xs px-2 py-0.5 rounded bg-purple-500/10 text-purple-400",children:K.module}),p.jsx("button",{onClick:()=>J(fe=>fe.filter((Ue,Nt)=>Nt!==me)),className:"text-red-400 hover:text-red-300",children:p.jsx(Tl,{className:"h-3.5 w-3.5"})})]},me))}),p.jsxs("div",{className:"flex items-center gap-2",children:[p.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"}),p.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"}),p.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:p.jsx(Al,{className:"h-4 w-4"})})]})]}),p.jsxs("section",{className:"space-y-3",children:[p.jsx("h3",{className:"text-sm font-medium text-muted-foreground uppercase tracking-wider",children:"Trivial Route Groups"}),p.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."}),Q.length>0&&p.jsx("div",{className:"flex flex-wrap gap-1.5",children:Q.map((K,me)=>p.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,")",p.jsx("button",{onClick:()=>ne(fe=>fe.filter((Ue,Nt)=>Nt!==me)),className:"text-red-400 hover:text-red-300 ml-0.5",children:p.jsx(Tl,{className:"h-3 w-3"})})]},me))}),p.jsxs("div",{className:"flex items-center gap-2",children:[p.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(me=>[...me,ue.trim()]),ye(""))}}),p.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:p.jsx(Al,{className:"h-4 w-4"})})]})]})]})]}),p.jsxs("div",{className:"mt-8 border-t border-border/30 pt-6",children:[p.jsxs("div",{className:"flex items-center gap-3 mb-6",children:[p.jsx(Ju,{className:"h-5 w-5 text-muted-foreground"}),p.jsx("h2",{className:"text-lg font-semibold",children:"Projects"})]}),p.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."}),$.length>0&&p.jsx("div",{className:"space-y-2 mb-4",children:$.map((K,me)=>p.jsxs("div",{className:"flex items-center gap-2 p-3 rounded-lg border border-border/50 bg-card",children:[p.jsx("span",{className:"text-sm font-medium flex-1",children:K.name}),p.jsx("code",{className:"text-xs text-muted-foreground",children:K.root}),p.jsx("button",{onClick:()=>V(fe=>fe.filter((Ue,Nt)=>Nt!==me)),className:"text-red-400 hover:text-red-300",children:p.jsx(Tl,{className:"h-3.5 w-3.5"})})]},me))}),p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx("input",{type:"text",value:O,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"}),p.jsxs("div",{className:"flex-1 flex items-center gap-1",children:[p.jsx("input",{type:"text",value:F,onChange:K=>U(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"}),p.jsx("button",{onClick:()=>L(!0),className:"p-1.5 rounded-lg border border-border/50 hover:bg-muted transition-colors",title:"Browse folders",children:p.jsx(xf,{className:"h-4 w-4"})})]}),p.jsx("button",{onClick:()=>{O.trim()&&F.trim()&&(V(K=>[...K,{name:O.trim(),root:F.trim()}]),X(""),U(""))},className:"p-1.5 rounded-lg border border-border/50 hover:bg-muted transition-colors",children:p.jsx(Al,{className:"h-4 w-4"})})]}),p.jsxs("button",{onClick:async()=>{try{const K=await fetch("/api/projects",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({projects:$})});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:[p.jsx(Kv,{className:"h-4 w-4"}),"Save Projects"]})]}),D&&D!=="project"&&p.jsx(C1,{buildUrl:I,onSelect:K=>{D==="app"?P(K):D==="db"&&T(K),B(null)},onClose:()=>B(null)}),j&&p.jsx(C1,{buildUrl:I,onSelect:K=>{U(K),L(!1)},onClose:()=>L(!1)})]})}const UG=["all","db","api","ui","static"],VG={error:{icon:Ci,color:"text-red-400",bg:"bg-red-500/10",border:"border-red-500/30",label:"Error"},warning:{icon:Vm,color:"text-yellow-400",bg:"bg-yellow-500/10",border:"border-yellow-500/30",label:"Warning"},info:{icon:j_,color:"text-blue-400",bg:"bg-blue-500/10",border:"border-blue-500/30",label:"Info"}};function WG(){const[e,n]=x.useState(null),[r,o]=x.useState(!1),[i,s]=x.useState(null),[a,l]=x.useState("all"),[c,u]=x.useState(null),f=Uo(),d=x.useCallback(async()=>{o(!0),s(null);try{const m=await fetch(f("/api/audit",{layer:a}));if(!m.ok)throw new Error(`HTTP ${m.status}`);n(await m.json())}catch(m){s(String(m))}finally{o(!1)}},[a,f]);x.useEffect(()=>{d()},[d]);const h=x.useCallback((m,w)=>{navigator.clipboard.writeText(w),u(m),setTimeout(()=>u(null),2e3)},[]),g=(e==null?void 0:e.reports.reduce((m,w)=>m+w.findings.length,0))??0,v=(e==null?void 0:e.reports.reduce((m,w)=>m+w.summary.errors,0))??0,b=(e==null?void 0:e.reports.reduce((m,w)=>m+w.summary.warnings,0))??0,_=(e==null?void 0:e.reports.reduce((m,w)=>m+w.summary.info,0))??0;return p.jsxs("div",{className:"h-full overflow-y-auto p-6",children:[p.jsxs("div",{className:"flex items-center justify-between mb-6",children:[p.jsxs("div",{className:"flex items-center gap-3",children:[p.jsx(A_,{className:"h-6 w-6 text-muted-foreground"}),p.jsx("h1",{className:"text-xl font-semibold",children:"Audit"})]}),p.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:[p.jsx(gA,{className:"h-4 w-4"}),r?"Running...":"Run Audit"]})]}),i&&p.jsxs("div",{className:"flex items-center gap-2 p-3 rounded-lg bg-red-500/10 text-red-400 text-sm mb-6",children:[p.jsx(Ci,{className:"h-4 w-4 shrink-0"}),i]}),p.jsx("div",{className:"flex gap-1 mb-6 p-1 rounded-lg bg-muted/30 w-fit",children:UG.map(m=>p.jsx("button",{onClick:()=>l(m),className:`px-4 py-1.5 text-sm rounded-md transition-colors ${a===m?"bg-purple-600 text-white font-medium":"text-muted-foreground hover:text-foreground"}`,children:m},m))}),e&&!r&&p.jsxs("div",{className:"flex items-center gap-4 mb-6 p-3 rounded-lg border border-border/50 bg-card",children:[p.jsxs("span",{className:"text-sm font-medium",children:[g," findings"]}),v>0&&p.jsxs("span",{className:"flex items-center gap-1 text-xs text-red-400",children:[p.jsx(Ci,{className:"h-3 w-3"})," ",v," errors"]}),b>0&&p.jsxs("span",{className:"flex items-center gap-1 text-xs text-yellow-400",children:[p.jsx(Vm,{className:"h-3 w-3"})," ",b," warnings"]}),_>0&&p.jsxs("span",{className:"flex items-center gap-1 text-xs text-blue-400",children:[p.jsx(j_,{className:"h-3 w-3"})," ",_," info"]}),g>0&&p.jsxs("button",{onClick:()=>e.prompt&&h("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"?p.jsx(vo,{className:"h-3 w-3 text-green-400"}):p.jsx(Vv,{className:"h-3 w-3"}),c==="all"?"Copied":"Copy All as AI Prompt"]})]}),r&&p.jsx("div",{className:"text-sm text-muted-foreground",children:"Running audit checks..."}),e&&!r&&p.jsx("div",{className:"space-y-4",children:e.reports.map(m=>p.jsxs("section",{className:"rounded-lg border border-border/50 bg-card overflow-hidden",children:[p.jsxs("div",{className:"flex items-center justify-between p-4 border-b border-border/30",children:[p.jsxs("div",{className:"flex items-center gap-3",children:[p.jsx("span",{className:"text-xs px-2 py-0.5 rounded bg-muted text-muted-foreground uppercase",children:m.layer}),p.jsx("span",{className:"text-sm font-medium",children:m.check.replace(/_/g," ")}),m.findings.length===0?p.jsxs("span",{className:"text-xs text-green-400 flex items-center gap-1",children:[p.jsx(vo,{className:"h-3 w-3"})," passed"]}):p.jsxs("span",{className:"text-xs text-muted-foreground",children:[m.findings.length," finding",m.findings.length!==1?"s":""]})]}),m.findings.length>0&&p.jsxs("button",{onClick:()=>{const w=GG(m);h(m.check,w)},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===m.check?p.jsx(vo,{className:"h-3 w-3 text-green-400"}):p.jsx(Vv,{className:"h-3 w-3"}),c===m.check?"Copied":"Copy as AI Prompt"]})]}),m.findings.length>0&&p.jsx("div",{className:"divide-y divide-border/20",children:m.findings.map(w=>{const y=VG[w.severity],S=y.icon;return p.jsxs("div",{className:`flex items-start gap-3 p-3 ${y.bg}`,children:[p.jsx(S,{className:`h-4 w-4 shrink-0 mt-0.5 ${y.color}`}),p.jsxs("div",{className:"min-w-0 flex-1",children:[p.jsx("div",{className:"text-sm font-medium",children:w.title}),p.jsx("div",{className:"text-xs text-muted-foreground mt-0.5",children:w.detail}),w.file&&p.jsxs("code",{className:"text-xs text-muted-foreground mt-1 block",children:[w.file,w.line?`:${w.line}`:""]})]})]},w.id)})})]},`${m.layer}:${m.check}`))})]})}function GG(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 YG(){return p.jsx(LL,{children:p.jsxs("div",{className:"flex h-screen flex-col overflow-hidden bg-background text-foreground",children:[p.jsx(BL,{}),p.jsxs("div",{className:"flex flex-1 min-h-0",children:[p.jsx(WL,{}),p.jsx("main",{className:"flex-1 min-h-0 overflow-hidden content-gradient",children:p.jsxs(V5,{children:[p.jsx(Un,{path:"/overview",element:p.jsx(VH,{})}),p.jsx(Un,{path:"/modules",element:p.jsx(RG,{})}),p.jsx(Un,{path:"/sitemap",element:p.jsx(BG,{})}),p.jsx(Un,{path:"/journeys",element:p.jsx(IG,{})}),p.jsx(Un,{path:"/project-graph",element:p.jsx(HH,{})}),p.jsx(Un,{path:"/audit",element:p.jsx(WG,{})}),p.jsx(Un,{path:"/settings",element:p.jsx(HG,{})}),p.jsx(Un,{path:"*",element:p.jsx(H5,{to:"/overview",replace:!0})})]})})]})]})})}qf.createRoot(document.getElementById("root")).render(p.jsx(ot.StrictMode,{children:p.jsx(Z5,{children:p.jsx(l3,{children:p.jsx(YG,{})})})}));