@airporting/integrations-app 0.1.0

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 (124) hide show
  1. package/README.md +3 -0
  2. package/dist/mf/110.js +18 -0
  3. package/dist/mf/110.js.LICENSE.txt +9 -0
  4. package/dist/mf/119.js +1 -0
  5. package/dist/mf/14.js +10 -0
  6. package/dist/mf/14.js.LICENSE.txt +9 -0
  7. package/dist/mf/153.js +10 -0
  8. package/dist/mf/153.js.LICENSE.txt +9 -0
  9. package/dist/mf/182.js +10 -0
  10. package/dist/mf/182.js.LICENSE.txt +9 -0
  11. package/dist/mf/186.js +1 -0
  12. package/dist/mf/193.js +29747 -0
  13. package/dist/mf/193.js.LICENSE.txt +6 -0
  14. package/dist/mf/260.js +1 -0
  15. package/dist/mf/364.js +14 -0
  16. package/dist/mf/378.js +10 -0
  17. package/dist/mf/378.js.LICENSE.txt +9 -0
  18. package/dist/mf/380.js +1 -0
  19. package/dist/mf/541.js +1 -0
  20. package/dist/mf/548.js +10 -0
  21. package/dist/mf/548.js.LICENSE.txt +9 -0
  22. package/dist/mf/588.js +10 -0
  23. package/dist/mf/588.js.LICENSE.txt +9 -0
  24. package/dist/mf/622.js +10 -0
  25. package/dist/mf/622.js.LICENSE.txt +9 -0
  26. package/dist/mf/659.js +1 -0
  27. package/dist/mf/724.js +1 -0
  28. package/dist/mf/732.js +10 -0
  29. package/dist/mf/732.js.LICENSE.txt +9 -0
  30. package/dist/mf/750.js +33 -0
  31. package/dist/mf/750.js.LICENSE.txt +40 -0
  32. package/dist/mf/80.js +1 -0
  33. package/dist/mf/832.js +10 -0
  34. package/dist/mf/832.js.LICENSE.txt +9 -0
  35. package/dist/mf/880.js +1 -0
  36. package/dist/mf/@mf-types/compiled-types/App.d.ts +1 -0
  37. package/dist/mf/@mf-types/compiled-types/connectors.d.ts +2 -0
  38. package/dist/mf/@mf-types/compiled-types/hooks/useAppConfig.d.ts +9 -0
  39. package/dist/mf/@mf-types/compiled-types/providers.d.ts +15 -0
  40. package/dist/mf/@mf-types/connectors.d.ts +2 -0
  41. package/dist/mf/@mf-types.d.ts +3 -0
  42. package/dist/mf/@mf-types.zip +0 -0
  43. package/dist/mf/__federation_expose_connectors.js +10 -0
  44. package/dist/mf/__federation_expose_connectors.js.LICENSE.txt +9 -0
  45. package/dist/mf/index.css +9568 -0
  46. package/dist/mf/index.js +30 -0
  47. package/dist/mf/index.js.LICENSE.txt +29 -0
  48. package/dist/mf/integrations_app.js +5 -0
  49. package/dist/mf/mf-manifest.json +336 -0
  50. package/dist/mf/mf-stats.json +402 -0
  51. package/dist/mf/static/font/HostGrotesk-VariableFont_wght.ttf +0 -0
  52. package/dist/mf/static/font/IBMPlexSans-VariableFont_wdth,wght.ttf +0 -0
  53. package/dist/mf/static/svg/ad.svg +150 -0
  54. package/dist/mf/static/svg/af.svg +81 -0
  55. package/dist/mf/static/svg/arab.svg +109 -0
  56. package/dist/mf/static/svg/as.svg +72 -0
  57. package/dist/mf/static/svg/aw.svg +186 -0
  58. package/dist/mf/static/svg/bm.svg +97 -0
  59. package/dist/mf/static/svg/bn.svg +36 -0
  60. package/dist/mf/static/svg/bo.svg +673 -0
  61. package/dist/mf/static/svg/br.svg +45 -0
  62. package/dist/mf/static/svg/bt.svg +89 -0
  63. package/dist/mf/static/svg/bz.svg +145 -0
  64. package/dist/mf/static/svg/cy.svg +6 -0
  65. package/dist/mf/static/svg/dg.svg +130 -0
  66. package/dist/mf/static/svg/dm.svg +152 -0
  67. package/dist/mf/static/svg/do.svg +122 -0
  68. package/dist/mf/static/svg/eac.svg +48 -0
  69. package/dist/mf/static/svg/ec.svg +138 -0
  70. package/dist/mf/static/svg/eg.svg +38 -0
  71. package/dist/mf/static/svg/es-ga.svg +187 -0
  72. package/dist/mf/static/svg/es.svg +544 -0
  73. package/dist/mf/static/svg/fj.svg +120 -0
  74. package/dist/mf/static/svg/fk.svg +90 -0
  75. package/dist/mf/static/svg/gb-nir.svg +132 -0
  76. package/dist/mf/static/svg/gb-wls.svg +9 -0
  77. package/dist/mf/static/svg/gq.svg +23 -0
  78. package/dist/mf/static/svg/gs.svg +133 -0
  79. package/dist/mf/static/svg/gt.svg +204 -0
  80. package/dist/mf/static/svg/gu.svg +19 -0
  81. package/dist/mf/static/svg/hr.svg +56 -0
  82. package/dist/mf/static/svg/ht.svg +116 -0
  83. package/dist/mf/static/svg/im.svg +36 -0
  84. package/dist/mf/static/svg/io.svg +130 -0
  85. package/dist/mf/static/svg/ir.svg +219 -0
  86. package/dist/mf/static/svg/je.svg +62 -0
  87. package/dist/mf/static/svg/kg.svg +4 -0
  88. package/dist/mf/static/svg/kh.svg +61 -0
  89. package/dist/mf/static/svg/ki.svg +36 -0
  90. package/dist/mf/static/svg/ky.svg +103 -0
  91. package/dist/mf/static/svg/kz.svg +36 -0
  92. package/dist/mf/static/svg/li.svg +43 -0
  93. package/dist/mf/static/svg/lk.svg +22 -0
  94. package/dist/mf/static/svg/md.svg +70 -0
  95. package/dist/mf/static/svg/me.svg +118 -0
  96. package/dist/mf/static/svg/mp.svg +86 -0
  97. package/dist/mf/static/svg/ms.svg +25 -0
  98. package/dist/mf/static/svg/mt.svg +56 -0
  99. package/dist/mf/static/svg/mx.svg +377 -0
  100. package/dist/mf/static/svg/nf.svg +11 -0
  101. package/dist/mf/static/svg/ni.svg +129 -0
  102. package/dist/mf/static/svg/om.svg +115 -0
  103. package/dist/mf/static/svg/pn.svg +53 -0
  104. package/dist/mf/static/svg/pt.svg +57 -0
  105. package/dist/mf/static/svg/py.svg +156 -0
  106. package/dist/mf/static/svg/rs.svg +296 -0
  107. package/dist/mf/static/svg/sa.svg +25 -0
  108. package/dist/mf/static/svg/sh-ac.svg +690 -0
  109. package/dist/mf/static/svg/sh-hl.svg +164 -0
  110. package/dist/mf/static/svg/sh-ta.svg +76 -0
  111. package/dist/mf/static/svg/sm.svg +73 -0
  112. package/dist/mf/static/svg/sv.svg +593 -0
  113. package/dist/mf/static/svg/sx.svg +56 -0
  114. package/dist/mf/static/svg/sz.svg +34 -0
  115. package/dist/mf/static/svg/tc.svg +50 -0
  116. package/dist/mf/static/svg/tm.svg +205 -0
  117. package/dist/mf/static/svg/un.svg +16 -0
  118. package/dist/mf/static/svg/va.svg +190 -0
  119. package/dist/mf/static/svg/vg.svg +59 -0
  120. package/dist/mf/static/svg/vi.svg +28 -0
  121. package/dist/mf/static/svg/xk.svg +5 -0
  122. package/dist/mf/static/svg/zm.svg +27 -0
  123. package/dist/mf/static/svg/zw.svg +21 -0
  124. package/package.json +85 -0
package/dist/mf/378.js ADDED
@@ -0,0 +1,10 @@
1
+ /*! For license information please see 378.js.LICENSE.txt */
2
+ "use strict";(globalThis["chunk_integrations_app"]=globalThis["chunk_integrations_app"]||[]).push([["378"],{631:function(__unused_webpack_module,exports){/**
3
+ * @license React
4
+ * react-jsx-runtime.production.js
5
+ *
6
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
7
+ *
8
+ * This source code is licensed under the MIT license found in the
9
+ * LICENSE file in the root directory of this source tree.
10
+ */var REACT_ELEMENT_TYPE=Symbol.for("react.transitional.element"),REACT_FRAGMENT_TYPE=Symbol.for("react.fragment");function jsxProd(type,config,maybeKey){var key=null;void 0!==maybeKey&&(key=""+maybeKey);void 0!==config.key&&(key=""+config.key);if("key"in config){maybeKey={};for(var propName in config)"key"!==propName&&(maybeKey[propName]=config[propName])}else maybeKey=config;config=maybeKey.ref;return{$$typeof:REACT_ELEMENT_TYPE,type:type,key:key,ref:void 0!==config?config:null,props:maybeKey}}exports.Fragment=REACT_FRAGMENT_TYPE;exports.jsx=jsxProd;exports.jsxs=jsxProd},5893:function(module,__unused_webpack_exports,__webpack_require__){module.exports=__webpack_require__(631)}}]);
@@ -0,0 +1,9 @@
1
+ /**
2
+ * @license React
3
+ * react-jsx-runtime.production.js
4
+ *
5
+ * Copyright (c) Meta Platforms, Inc. and 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
+ */
package/dist/mf/380.js ADDED
@@ -0,0 +1 @@
1
+ "use strict";(globalThis["chunk_integrations_app"]=globalThis["chunk_integrations_app"]||[]).push([["380"],{1469:function(__unused_webpack___webpack_module__,__webpack_exports__,__webpack_require__){__webpack_require__.r(__webpack_exports__);__webpack_require__.d(__webpack_exports__,{AirButton:()=>AirButton,BankAccountsChart:()=>BankAccountsChart,BankAccountsChartTooltip:()=>BankAccountsChartTooltip,BlurSpot:()=>BlurSpot,COLORS_EMOJI:()=>COLORS_EMOJI,Circle:()=>Circle,CompanyLogo:()=>CompanyLogo,CompanySelector:()=>CompanySelector,Field:()=>Field,IconArrowUp:()=>IconArrowUp,IconCalculator:()=>IconCalculator,IconCheck:()=>IconCheck,IconCoin:()=>IconCoin,IconConnector:()=>IconConnector,IconCross:()=>IconCross,IconDashboard:()=>IconDashboard,IconDoubleLeft:()=>IconDoubleLeft,IconExternalLink:()=>IconExternalLink,IconLogOut:()=>IconLogOut,IconLogo:()=>IconLogo,IconRepeat:()=>IconRepeat,IconStar:()=>IconStar,KPICard:()=>KPICard,KPICardBankAccountsChart:()=>KPICardBankAccountsChart,LanguageSwitcher:()=>LanguageSwitcher,Logo:()=>Logo,PillTrend:()=>PillTrend,RxState:()=>RxState,SearchBox:()=>SearchBox,THEME_COLORS:()=>THEME_COLORS,ZIndex:()=>zIndex_ZIndex,cssVarResolver:()=>cssVarResolver,formatCurrency:()=>formatCurrency,formatCurrencyCompact:()=>formatCurrencyCompact,formatDateLocale:()=>formatDateLocale,formatPercent:()=>formatPercent,getLocaleDateFormat:()=>getLocaleDateFormat,isoday:()=>isoday,nbhy:()=>nbhy,parseDateFr:()=>parseDateFr,parseDateLocale:()=>parseDateLocale,theme:()=>theme_theme,useRxState:()=>useRxState,useRxStateDebounced:()=>useRxStateDebounced,useRxStateOr:()=>useRxStateOr});var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(5893);var _mantine_core__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(3215);var _mantine_charts__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(4002);var _mantine_hooks__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(3828);var date_fns__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(4828);var lodash_es__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__(8269);var radash__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__(3040);var react__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__(9063);var _tabler_icons_react__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__(5865);var _tanstack_react_query__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__(2760);var react_i18next__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__(4099);function Circle({style,size,...rest}){return/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_mantine_core__WEBPACK_IMPORTED_MODULE_1__.Paper,{radius:"50%",bg:"dark.4",w:size,h:size,style:{display:"flex",flexWrap:"wrap",justifyContent:"center",alignContent:"center",...style},...rest})}function IconArrowUp({color="currentColor",size=24,rotate=0,...props}){return/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("svg",{width:size,height:size,fill:"none",xmlns:"http://www.w3.org/2000/svg",transform:`rotate(${rotate})`,...props,children:/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("path",{d:"M9 13.5L12 10.5L15 13.5",stroke:color,strokeWidth:"1.5",strokeLinecap:"square",strokeLinejoin:"round"})})}function IconCalculator({color="currentColor",size=24,...props}){return/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("svg",{width:size,height:size,fill:"none",xmlns:"http://www.w3.org/2000/svg",...props,children:[/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("rect",{x:"4",y:"2",width:"16",height:"19",rx:"1",stroke:color,strokeWidth:"1.5"}),/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("rect",{x:"7",y:"6",width:"10",height:"4",fill:color}),/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("rect",{x:"7.5",y:"12.5",width:"1",height:"1",stroke:color}),/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("rect",{x:"11.5",y:"12.5",width:"1",height:"1",stroke:color}),/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("rect",{x:"15.5",y:"12.5",width:"1",height:"5",stroke:color}),/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("rect",{x:"11.5",y:"16.5",width:"1",height:"1",stroke:color}),/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("rect",{x:"7.5",y:"16.5",width:"1",height:"1",stroke:color})]})}function IconCheck({color="currentColor",size=16,...props}){return/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("svg",{width:size,height:size,fill:"none",stroke:color,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",...props,children:/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("path",{d:"M13.3346 4L6.0013 11.3333L2.66797 8",strokeWidth:"1.25",strokeLinecap:"square",strokeLinejoin:"round"})})}function IconCoin({color="currentColor",size=24,...props}){return/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("svg",{width:size,height:size,fill:"none",xmlns:"http://www.w3.org/2000/svg",...props,children:[/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("ellipse",{cx:"12.0004",cy:"9.72212",rx:"10.0004",ry:"3.33345",stroke:color,strokeWidth:"1.5"}),/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("path",{d:"M12.0004 18.6119C9.94456 18.6119 8.03366 18.4051 6.4446 18.0505M12.0004 18.6119V13.0561M12.0004 18.6119C14.0561 18.6119 15.9671 18.4051 17.5561 18.0505M2 9.72266V15.2784C2 16.4342 3.76454 17.4525 6.4446 18.0505M22.0007 9.72266V15.2784C22.0007 16.4342 20.2362 17.4525 17.5561 18.0505M6.4446 11.945V18.0505M17.5561 12.5005L17.5561 18.0505",stroke:color,strokeWidth:"1.5"})]})}function IconConnector({color="currentColor",size=24,...props}){return/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("svg",{width:size,height:size,fill:"none",xmlns:"http://www.w3.org/2000/svg",...props,children:[/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("g",{clipPath:"url(#clip0_2605_1876)",children:/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M18.3688 0.797175C19.6952 -0.195659 21.5754 0.0747827 22.5682 1.40122C23.5611 2.72767 23.2906 4.60781 21.9642 5.60064C20.9814 6.33624 19.6947 6.37837 18.6901 5.81135L13.2118 10.3012C13.7118 11.0797 14.0019 12.0059 14.0019 12.9999C14.0019 13.77 13.8278 14.4994 13.5168 15.151L16.0949 17.8695C17.2392 17.3161 18.6561 17.5353 19.5775 18.5069C20.7177 19.7091 20.6673 21.6079 19.4651 22.748C18.2629 23.8882 16.3641 23.8378 15.224 22.6356C14.348 21.712 14.1748 20.3771 14.6867 19.291L12.2915 16.7654C11.4123 17.5341 10.2615 17.9999 9.00189 17.9999C6.24046 17.9999 4.00189 15.7613 4.00189 12.9999C4.00189 11.5656 4.60582 10.2723 5.57327 9.36057L4.35098 6.87732C3.01379 7.07665 1.6641 6.34735 1.13207 5.03948C0.507758 3.50476 1.24579 1.7545 2.78052 1.13019C4.31525 0.50587 6.06551 1.24391 6.68982 2.77864C7.14163 3.8893 6.87995 5.11283 6.11916 5.94081L7.28211 8.30351C7.81835 8.10709 8.3976 7.99989 9.00189 7.99989C10.0434 7.99989 11.0105 8.31833 11.8112 8.86316L17.376 4.30245C16.8897 3.0748 17.2609 1.62646 18.3688 0.797175ZM9.00189 15.9999C10.6587 15.9999 12.0019 14.6567 12.0019 12.9999C12.0019 11.343 10.6587 9.99989 9.00189 9.99989C7.34503 9.99989 6.00189 11.343 6.00189 12.9999C6.00189 14.6567 7.34503 15.9999 9.00189 15.9999Z",fill:color})}),/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("defs",{children:/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("clipPath",{id:"clip0_2605_1876",children:/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("rect",{width:"24",height:"24",fill:"white"})})})]})}function IconCross({color="currentColor",size=16,...props}){return/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("svg",{width:size,height:size,fill:"none",stroke:color,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",...props,children:/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("path",{d:"M4 4L12 12M12 4L4 12",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})})}function IconDashboard({color="currentColor",size=24,...props}){return/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("svg",{width:size,height:size,fill:"none",xmlns:"http://www.w3.org/2000/svg",...props,children:[/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("path",{d:"M19 3H5C3.89543 3 3 3.89543 3 5V19C3 20.1046 3.89543 21 5 21H19C20.1046 21 21 20.1046 21 19V5C21 3.89543 20.1046 3 19 3Z",stroke:color,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("path",{d:"M3 9H21",stroke:color,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("path",{d:"M9 21V9",stroke:color,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]})}function IconDoubleLeft({color="currentColor",size=24,...props}){return/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("svg",{width:size,height:size,fill:"none",xmlns:"http://www.w3.org/2000/svg",...props,children:[/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("path",{d:"M11 15L8 12L11 9",stroke:color,strokeWidth:"1.5",strokeLinecap:"square",strokeLinejoin:"round"}),/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("path",{d:"M16 15L13 12L16 9",stroke:color,strokeWidth:"1.5",strokeLinecap:"square",strokeLinejoin:"round"})]})}function IconExternalLink({color="currentColor",size=24,...props}){return/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("svg",{width:size,height:size,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...props,children:/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("path",{d:"M10 9L15 9M15 9L15 14M15 9L9 15",stroke:color,strokeWidth:"1.5",strokeLinecap:"square",strokeLinejoin:"round"})})}function IconLogo(props){return/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("svg",{width:"88",height:"19",fill:"none",xmlns:"http://www.w3.org/2000/svg",...props,children:/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("path",{d:"M0.038 14L4.883 0.699999H7.904L12.768 14H9.956L5.852 2.144H6.935L2.831 14H0.038ZM2.28 11.017L2.983 8.946H9.823L10.526 11.017H2.28ZM13.4867 14V4.576H16.1467V14H13.4867ZM13.6007 3.075V0.604999H16.0707V3.075H13.6007ZM17.5131 14V4.576H20.1731V6.001C20.4264 5.53233 20.7431 5.165 21.1231 4.899C21.5031 4.62033 21.9338 4.481 22.4151 4.481H23.5741V6.837H22.1491C21.6804 6.837 21.3004 6.95733 21.0091 7.198C20.7178 7.43867 20.5024 7.79967 20.3631 8.281C20.2364 8.74967 20.1731 9.326 20.1731 10.01V14H17.5131ZM24.7874 18.18V4.576H27.4474V5.868C27.7514 5.46267 28.1441 5.108 28.6254 4.804C29.1194 4.5 29.7528 4.348 30.5254 4.348C31.3994 4.348 32.1848 4.56333 32.8814 4.994C33.5781 5.42467 34.1291 6.01367 34.5344 6.761C34.9398 7.50833 35.1424 8.357 35.1424 9.307C35.1424 10.2443 34.9398 11.0867 34.5344 11.834C34.1291 12.5813 33.5781 13.1703 32.8814 13.601C32.1848 14.019 31.3994 14.228 30.5254 14.228C29.8288 14.228 29.2208 14.1013 28.7014 13.848C28.1948 13.5947 27.7768 13.24 27.4474 12.784V18.18H24.7874ZM29.8984 11.91C30.3924 11.91 30.8294 11.796 31.2094 11.568C31.6021 11.34 31.9061 11.0297 32.1214 10.637C32.3368 10.2443 32.4444 9.801 32.4444 9.307C32.4444 8.80033 32.3368 8.35067 32.1214 7.958C31.9061 7.55267 31.6021 7.236 31.2094 7.008C30.8294 6.78 30.3924 6.666 29.8984 6.666C29.4044 6.666 28.9674 6.78 28.5874 7.008C28.2074 7.236 27.9098 7.54633 27.6944 7.939C27.4791 8.33167 27.3714 8.78133 27.3714 9.288C27.3714 9.79467 27.4791 10.2443 27.6944 10.637C27.9098 11.0297 28.2074 11.34 28.5874 11.568C28.9674 11.796 29.4044 11.91 29.8984 11.91ZM40.9671 14.228C40.0171 14.228 39.1558 14.019 38.3831 13.601C37.6231 13.183 37.0151 12.6003 36.5591 11.853C36.1158 11.1057 35.8941 10.2507 35.8941 9.288C35.8941 8.31267 36.1158 7.45767 36.5591 6.723C37.0151 5.97567 37.6295 5.393 38.4021 4.975C39.1748 4.557 40.0298 4.348 40.9671 4.348C41.9171 4.348 42.7721 4.557 43.5321 4.975C44.3048 5.393 44.9128 5.97567 45.3561 6.723C45.8121 7.45767 46.0401 8.31267 46.0401 9.288C46.0401 10.2507 45.8121 11.1057 45.3561 11.853C44.9128 12.6003 44.3048 13.183 43.5321 13.601C42.7721 14.019 41.9171 14.228 40.9671 14.228ZM40.9671 11.929C41.3978 11.929 41.7905 11.834 42.1451 11.644C42.4998 11.4413 42.7785 11.1437 42.9811 10.751C43.1965 10.3583 43.3041 9.87067 43.3041 9.288C43.3041 8.70533 43.1965 8.21767 42.9811 7.825C42.7658 7.43233 42.4808 7.141 42.1261 6.951C41.7841 6.74833 41.4041 6.647 40.9861 6.647C40.5555 6.647 40.1628 6.74833 39.8081 6.951C39.4535 7.141 39.1685 7.43233 38.9531 7.825C38.7378 8.205 38.6301 8.69267 38.6301 9.288C38.6301 9.87067 38.7315 10.3583 38.9341 10.751C39.1495 11.1437 39.4345 11.4413 39.7891 11.644C40.1438 11.834 40.5365 11.929 40.9671 11.929ZM47.1264 14V4.576H49.7864V6.001C50.0397 5.53233 50.3564 5.165 50.7364 4.899C51.1164 4.62033 51.547 4.481 52.0284 4.481H53.1874V6.837H51.7624C51.2937 6.837 50.9137 6.95733 50.6224 7.198C50.331 7.43867 50.1157 7.79967 49.9764 8.281C49.8497 8.74967 49.7864 9.326 49.7864 10.01V14H47.1264ZM58.3717 14C57.713 14 57.1557 13.924 56.6997 13.772C56.2564 13.62 55.9207 13.3287 55.6927 12.898C55.4647 12.4547 55.3507 11.8213 55.3507 10.998V6.799H53.7357V4.576H55.3507V1.992H58.0107V4.576H60.3287V6.799H58.0107V10.675C58.0107 10.9663 58.0424 11.188 58.1057 11.34C58.169 11.492 58.283 11.5997 58.4477 11.663C58.625 11.7137 58.8594 11.739 59.1507 11.739H60.2717V14H58.3717ZM61.1166 14V4.576H63.7766V14H61.1166ZM61.2306 3.075V0.604999H63.7006V3.075H61.2306ZM65.143 14V4.576H67.803V5.963C68.107 5.469 68.5187 5.07633 69.038 4.785C69.57 4.49367 70.1907 4.348 70.9 4.348C72.0907 4.348 73.0027 4.728 73.636 5.488C74.2693 6.23533 74.586 7.31833 74.586 8.737V14H71.926V8.984C71.926 8.21133 71.7677 7.62233 71.451 7.217C71.147 6.799 70.6593 6.59 69.988 6.59C69.3547 6.59 68.829 6.818 68.411 7.274C68.0057 7.71733 67.803 8.338 67.803 9.136V14H65.143ZM81.2614 18.408C80.4634 18.408 79.6907 18.275 78.9434 18.009C78.2087 17.7557 77.5817 17.344 77.0624 16.774C76.543 16.204 76.2327 15.463 76.1314 14.551H78.7724C78.8737 15.0323 79.146 15.4123 79.5894 15.691C80.0454 15.9697 80.5837 16.109 81.2044 16.109C81.6477 16.109 82.0594 16.014 82.4394 15.824C82.8194 15.6467 83.1234 15.368 83.3514 14.988C83.5794 14.6207 83.6934 14.1457 83.6934 13.563V12.423C83.5034 12.7143 83.2627 12.9803 82.9714 13.221C82.68 13.4617 82.3317 13.658 81.9264 13.81C81.5337 13.9493 81.0777 14.019 80.5584 14.019C79.659 14.019 78.8484 13.81 78.1264 13.392C77.417 12.9613 76.8534 12.3787 76.4354 11.644C76.03 10.9093 75.8274 10.086 75.8274 9.174C75.8274 8.262 76.03 7.445 76.4354 6.723C76.8534 5.98833 77.417 5.412 78.1264 4.994C78.8484 4.56333 79.659 4.348 80.5584 4.348C81.255 4.348 81.8694 4.48733 82.4014 4.766C82.946 5.04467 83.3767 5.393 83.6934 5.811V4.576H86.3534V13.411C86.3534 14.513 86.119 15.4313 85.6504 16.166C85.1817 16.9133 84.561 17.4707 83.7884 17.838C83.0157 18.218 82.1734 18.408 81.2614 18.408ZM81.1094 11.72C81.6287 11.72 82.0784 11.606 82.4584 11.378C82.8384 11.15 83.136 10.846 83.3514 10.466C83.5667 10.086 83.6744 9.66167 83.6744 9.193C83.6744 8.71167 83.5667 8.281 83.3514 7.901C83.136 7.521 82.8384 7.22333 82.4584 7.008C82.0784 6.78 81.6287 6.666 81.1094 6.666C80.6027 6.666 80.153 6.78 79.7604 7.008C79.3804 7.22333 79.0827 7.521 78.8674 7.901C78.652 8.26833 78.5444 8.69267 78.5444 9.174C78.5444 9.64267 78.652 10.0733 78.8674 10.466C79.0827 10.846 79.3804 11.15 79.7604 11.378C80.153 11.606 80.6027 11.72 81.1094 11.72Z",fill:"#F3F3F3"})})}function IconLogOut({color="currentColor",size=24,...props}){return/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("svg",{width:size,height:size,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...props,children:[/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("path",{d:"M9 21H5C4.46957 21 3.96086 20.7893 3.58579 20.4142C3.21071 20.0391 3 19.5304 3 19V5C3 4.46957 3.21071 3.96086 3.58579 3.58579C3.96086 3.21071 4.46957 3 5 3H9",stroke:color,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("path",{d:"M16 17L21 12L16 7",stroke:color,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("path",{d:"M21 12H9",stroke:color,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]})}function IconRepeat({color="currentColor",size=24,...props}){return/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("svg",{width:size,height:size,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...props,children:[/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("path",{d:"M15 1L20 5L15 9",stroke:color,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("path",{d:"M4 11V9C4 7.93913 4.3746 6.92172 5.0414 6.17157C5.70819 5.42143 6.61256 5 7.55556 5H20",stroke:color,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("path",{d:"M9 23L4 19L9 15",stroke:color,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("path",{d:"M20 13V15C20 16.0609 19.6254 17.0783 18.9586 17.8284C18.2918 18.5786 17.3874 19 16.4444 19H4",stroke:color,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]})}function IconStar({color="currentColor",size=24,...props}){return/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("svg",{width:size,height:size,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...props,children:[/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("path",{d:"M17.0178 1.76042C17.1521 1.26989 17.8479 1.26989 17.9822 1.76042L18.4798 3.57689C18.5237 3.73719 18.6444 3.86519 18.8019 3.91844L20.5994 4.52635C21.0525 4.67958 21.0525 5.32042 20.5994 5.47365L18.8019 6.08156C18.6444 6.13481 18.5237 6.26281 18.4798 6.42311L17.9822 8.23958C17.8479 8.73011 17.1521 8.73011 17.0178 8.23958L16.5202 6.42311C16.4763 6.26281 16.3556 6.13481 16.1981 6.08156L14.4006 5.47365C13.9475 5.32042 13.9475 4.67958 14.4006 4.52635L16.1981 3.91844C16.3556 3.86519 16.4763 3.73719 16.5202 3.57689L17.0178 1.76042Z",fill:color}),/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("path",{d:"M9.83203 3.12891L11.7554 10.4793L18.332 12.6289L11.7554 14.7785L9.83203 22.1289L7.9087 14.7785L1.33203 12.6289L7.9087 10.4793L9.83203 3.12891Z",stroke:color,strokeWidth:"1.5",strokeLinejoin:"round"})]})}function AirButton({children,href,onClick,rightSection,...rest}){return/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_mantine_core__WEBPACK_IMPORTED_MODULE_1__.Button,{size:"md",justify:"start",styles:{label:{flex:1}},rightSection:/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment,{children:[rightSection,href&&/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Circle,{bg:"dark.4",size:24,ml:"auto",children:/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(IconExternalLink,{})})]}),onClick:e=>{onClick?.(e);if(href)open(href,"_blank")},...rest,children:children})}const THEME_COLORS=["green","blue","yellow","pink","cyan","orange","grape","teal"];const COLORS_EMOJI={red:"\uD83D\uDD34",orange:"\uD83D\uDFE0",yellow:"\uD83D\uDFE1",green:"\uD83D\uDFE2",blue:"\uD83D\uDD35",purple:"\uD83D\uDFE3",brown:"\uD83D\uDFE4"};function formatDateLocale(date,opts){if(!date)return null;return(0,date_fns__WEBPACK_IMPORTED_MODULE_4__.intlFormat)(date,{month:"2-digit",day:"2-digit",year:"numeric",...opts},{locale:"fr"})}function getLocaleDateFormat(locale){const getPatternForPart=part=>{switch(part.type){case"day":return"d".repeat(part.value.length);case"month":return"M".repeat(part.value.length);case"year":return"y".repeat(part.value.length);case"literal":return part.value}};return new Intl.DateTimeFormat(locale).formatToParts(new Date("2022-01-02")).map(getPatternForPart).join("")}function isoday(date){if(!date)return null;if(date instanceof Date&&isNaN(date.getTime()))return null;return(0,date_fns__WEBPACK_IMPORTED_MODULE_4__.formatISO)(date,{representation:"date"})}function parseDateFr(date){return(0,date_fns__WEBPACK_IMPORTED_MODULE_4__.parse)(date,"dd/MM/yyyy",new Date)}function parseDateLocale(date){if(!date)return null;const res=(0,date_fns__WEBPACK_IMPORTED_MODULE_4__.parse)(date,getLocaleDateFormat("fr"),new Date);if(!(0,date_fns__WEBPACK_IMPORTED_MODULE_4__.isValid)(res))return null;return res}var _computedKey,_computedKey1;_computedKey=0,_computedKey1=1;class RxState extends Array{[_computedKey];[_computedKey1];constructor(value,dispatch){super();this[0]=value;this[1]=dispatch}get value(){return this[0]}get dispatch(){return this[1]}set value(value){this.dispatch(value)}}function useRxState(value){const state=(0,react__WEBPACK_IMPORTED_MODULE_7__.useState)(value);return new RxState(state[0],state[1])}function useRxStateDebounced(from,delay=300){const debounced=useRxState(from.value);const handler=(0,react__WEBPACK_IMPORTED_MODULE_7__.useRef)(null);(0,react__WEBPACK_IMPORTED_MODULE_7__.useEffect)(()=>{if(handler.current)clearTimeout(handler.current);handler.current=setTimeout(()=>{from.value=debounced.value},delay);return()=>{if(handler.current)clearTimeout(handler.current)}},[debounced.value,delay]);return debounced}function useRxStateOr(state,or){const fallbackValue=useRxState(or);const fallback=or instanceof RxState?or:fallbackValue;return state??fallback}function nbhy(){return String.fromCharCode(8209)}function formatCurrency(value,opts){const formatted=new Intl.NumberFormat(navigator.language,{style:"currency",currency:"eur",signDisplay:"exceptZero",...opts}).format(value);return formatted.replaceAll("-",nbhy())}function formatCurrencyCompact(value,opts){return formatCurrency(value,{maximumFractionDigits:Math.abs(Number(value))>1e6||Math.abs(Number(value))<1e4?2:Math.abs(Number(value))<1e5?1:0,notation:"compact",...opts})}function formatPercent(value,opts){const formatted=new Intl.NumberFormat(navigator.language,{style:"percent",signDisplay:"exceptZero",...opts}).format(value);return formatted.replaceAll("-",nbhy())}var zIndex_ZIndex=/*#__PURE__*/function(ZIndex){ZIndex[ZIndex["TableHeader"]=1]="TableHeader";ZIndex[ZIndex["TableScrollbar"]=2]="TableScrollbar";ZIndex[ZIndex["ChartTooltip"]=3]="ChartTooltip";ZIndex[ZIndex["Loader"]=9999]="Loader";return ZIndex}({});const BankAccountsChartTooltip=/*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_7__.forwardRef)((props,ref)=>{const{balance,accounts,detailed}=props;const themed=(0,_mantine_core__WEBPACK_IMPORTED_MODULE_1__.useMantineTheme)();const d=isoday(parseDateLocale(balance.date));return/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_mantine_core__WEBPACK_IMPORTED_MODULE_1__.Paper,{p:"xs",withBorder:true,shadow:"md",radius:"md",style:{maxHeight:600,overflow:"auto",filter:"drop-shadow(0 0 2px rgba(0, 0, 0, 0.5))",backdropFilter:"blur(6px)"},ref:ref,bg:(0,_mantine_core__WEBPACK_IMPORTED_MODULE_1__.alpha)(themed.colors.dark[9],.3),children:[(0,date_fns__WEBPACK_IMPORTED_MODULE_4__.isAfter)(d,new Date)?/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_mantine_core__WEBPACK_IMPORTED_MODULE_1__.Text,{fz:10,c:"dimmed",children:"pr\xe9visionnel"}):null,/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_mantine_core__WEBPACK_IMPORTED_MODULE_1__.Group,{justify:"space-between",gap:4,mb:10,align:"center",children:[/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_mantine_core__WEBPACK_IMPORTED_MODULE_1__.Text,{fz:14,fw:"bold",children:balance.date}),/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_mantine_core__WEBPACK_IMPORTED_MODULE_1__.Text,{fz:14,fw:"bolder",c:balance.accounts.total>=0?"green":"red",children:formatCurrencyCompact(balance.accounts.total)})]}),detailed?Object.entries(balance.accounts).filter(([accountId,amount])=>"total"!=accountId&&0!=amount).map(([accountId,amount],i)=>{const account=accounts[accountId];if(!account)return;return/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_mantine_core__WEBPACK_IMPORTED_MODULE_1__.Group,{mb:5,align:"center",children:[/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Circle,{bg:themed.colors[THEME_COLORS[(i+1)%THEME_COLORS.length]][9],size:10}),/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_mantine_core__WEBPACK_IMPORTED_MODULE_1__.Text,{c:"dimmed",children:account.display_name}),/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_mantine_core__WEBPACK_IMPORTED_MODULE_1__.Text,{fz:12,ml:"auto",children:formatCurrencyCompact(amount)})]},accountId)}):null]})});function BankAccountsChart(props){const{hovered:hoveredProps,showIndividualBalances,showReferenceLines="hover",showToday,legend,detail,xAxisProps,accounts,...rest}=props;const theme=(0,_mantine_core__WEBPACK_IMPORTED_MODULE_1__.useMantineTheme)();const hovered=useRxStateDebounced(useRxStateOr(hoveredProps,null),200);const tooltipref=(0,react__WEBPACK_IMPORTED_MODULE_7__.useRef)(null);(0,_mantine_hooks__WEBPACK_IMPORTED_MODULE_3__.useWindowEvent)("wheel",e=>{if(!tooltipref.current)return;e.preventDefault();tooltipref.current.scrollBy(0,e.deltaY)},{passive:false});const data=(0,react__WEBPACK_IMPORTED_MODULE_7__.useMemo)(()=>{const all=[];for(const[name,data]of(0,lodash_es__WEBPACK_IMPORTED_MODULE_5__.entries)(accounts)){const d=data;for(const[day,balance]of Object.entries(d.balance)){const date=formatDateLocale(day);let existing=all.find(x=>x.date===date);if(!existing){existing={date,label:new Date(isoday(day)).getTime(),accounts:{total:0,unassigned:0}};all.push(existing)}existing.accounts[name]=balance.amount;if(!(0,date_fns__WEBPACK_IMPORTED_MODULE_4__.isBefore)(day,(0,date_fns__WEBPACK_IMPORTED_MODULE_4__.startOfDay)(new Date)))existing.accounts.total_future=existing.accounts.total;if(!(0,date_fns__WEBPACK_IMPORTED_MODULE_4__.isAfter)(day,new Date))existing.accounts.total_past=existing.accounts.total}}return all},[accounts]);const{low,high}=(0,react__WEBPACK_IMPORTED_MODULE_7__.useMemo)(()=>{const values=[...Object.values(data).map(x=>x.accounts.total)];let low=(0,radash__WEBPACK_IMPORTED_MODULE_6__.min)(values)??0;low=low>0?.9*low:1.1*low;let high=(0,radash__WEBPACK_IMPORTED_MODULE_6__.max)(values)??0;high=high>0?1.05*high:.9*high;return{low,high}},[data.length]);return(0,react__WEBPACK_IMPORTED_MODULE_7__.useMemo)(()=>/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_mantine_charts__WEBPACK_IMPORTED_MODULE_2__.AreaChart,{data:data,dataKey:"label",xAxisProps:{tickFormatter:value=>(0,date_fns__WEBPACK_IMPORTED_MODULE_4__.formatDate)(new Date(value),"dd/MM"),...xAxisProps},strokeWidth:2,dotProps:{r:0,strokeWidth:1},activeDotProps:{r:3,strokeWidth:1},withXAxis:"high"==detail,withYAxis:true,gridAxis:"x",yAxisProps:high&&low?{allowDataOverflow:true,domain:[low,high]}:void 0,series:showIndividualBalances?Object.values(accounts).filter(x=>"total"!=x.accountId).map(x=>({name:"accounts."+x.accountId,color:THEME_COLORS[Object.values(accounts).indexOf(x)%THEME_COLORS.length],label:x.display_name})):[{name:"accounts.total_past",color:theme.primaryColor,label:"Solde"},{name:"accounts.total_future",color:theme.primaryColor,label:"Solde",strokeDasharray:"3 5"}],connectNulls:false,withLegend:legend,legendProps:{verticalAlign:"bottom"},curveType:"bump",type:"stacked",referenceLines:(0,radash__WEBPACK_IMPORTED_MODULE_6__.sift)([false!==showToday&&{x:new Date(isoday(new Date)).getTime(),color:(0,_mantine_core__WEBPACK_IMPORTED_MODULE_1__.alpha)(theme.colors.blue[5],1),label:"auj."},...("hover"!=showReferenceLines||hovered.value)&&"never"!=showReferenceLines&&data.length?[...(0,date_fns__WEBPACK_IMPORTED_MODULE_4__.eachMonthOfInterval)({start:parseDateLocale(data[0].date),end:parseDateLocale(data[data.length-1].date)}).map(x=>({x:new Date(isoday(x)).getTime(),color:(0,_mantine_core__WEBPACK_IMPORTED_MODULE_1__.alpha)(theme.colors.gray[5],.3),label:(0,date_fns__WEBPACK_IMPORTED_MODULE_4__.formatDate)(x,"MMMM"),labelPosition:"top"}))]:[]]),withGradient:true,fillOpacity:.1,valueFormatter:value=>formatCurrency(value,{notation:"compact"}),tooltipAnimationDuration:100,tooltipProps:{wrapperStyle:{zIndex:zIndex_ZIndex.ChartTooltip},content:props=>{const balance=props.payload?.[0]?.payload??null;setTimeout(()=>hovered.value=balance,100);if(!balance)return null;return/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(BankAccountsChartTooltip,{balance:balance,accounts:accounts,detailed:showIndividualBalances,ref:tooltipref})}},...rest}),[JSON.stringify(Object.keys(accounts)),showIndividualBalances,tooltipref,showReferenceLines,high,low,legend,detail])}function BlurSpot({pos="bottom"}){const theme=(0,_mantine_core__WEBPACK_IMPORTED_MODULE_1__.useMantineTheme)();const spotStyle=options=>({position:"fixed",width:options.width??"800px",height:options.height??"800px",top:options.top,left:options.left,right:options.right,bottom:options.bottom,background:options.background??`radial-gradient(circle, ${theme.colors[theme.primaryColor][9]}, ${theme.colors[theme.primaryColor][6]} 50%, ${theme.colors[theme.primaryColor][9]})`,filter:`blur(${options.blur||150}px)`,transform:`rotate(${options.rotation||0}deg)`,pointerEvents:"none",zIndex:-1,opacity:options.opacity??.3});return/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div",{style:{position:"fixed",mixBlendMode:"screen"},children:["bottom"==pos&&/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div",{className:"blur-spot",style:spotStyle({width:"700px",bottom:"-50%",left:"-10%",rotation:20})}),"top"==pos&&/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div",{className:"blur-spot",style:spotStyle({width:"300px",top:"-50%",right:"15%",rotation:-20,opacity:.2})})]})}const Logo=/*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_7__.forwardRef)(({url,...rest},ref)=>{const theme=(0,_mantine_core__WEBPACK_IMPORTED_MODULE_1__.useMantineTheme)();return/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_mantine_core__WEBPACK_IMPORTED_MODULE_1__.Image,{ref:ref,src:url.includes("img.logo.dev")||url.includes("media.airporting")?url:getLogo(url),radius:12,fit:"contain",bd:`3px solid ${(0,_mantine_core__WEBPACK_IMPORTED_MODULE_1__.alpha)(theme.white,.11)}`,w:20,style:{aspectRatio:1},...rest})});Logo.displayName="Logo";const getLogo=url=>`https://img.logo.dev/${url}?token=pk_BVN4OQv0Qs-bnqjdIgTppg`;const CompanyLogo=/*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_7__.forwardRef)(({slug,...rest},ref)=>/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Logo,{ref:ref,url:`https://s3.dualstack.eu-west-3.amazonaws.com/media.airporting/companies/${slug}.png`,fallbackSrc:"https://s3.dualstack.eu-west-3.amazonaws.com/media.airporting/companies/undefined.png",...rest}));CompanyLogo.displayName="CompanyLogo";class HttpClient{baseUrl="";securityData=null;securityWorker;abortControllers=new Map;customFetch=(...fetchParams)=>fetch(...fetchParams);baseApiParams={credentials:"same-origin",headers:{},redirect:"follow",referrerPolicy:"no-referrer"};constructor(apiConfig={}){Object.assign(this,apiConfig)}setSecurityData=data=>{this.securityData=data};encodeQueryParam(key,value){const encodedKey=encodeURIComponent(key);return`${encodedKey}=${encodeURIComponent("number"==typeof value?value:`${value}`)}`}addQueryParam(query,key){return this.encodeQueryParam(key,query[key])}addArrayQueryParam(query,key){const value=query[key];return value.map(v=>this.encodeQueryParam(key,v)).join("&")}toQueryString(rawQuery){const query=rawQuery||{};const keys=Object.keys(query).filter(key=>void 0!==query[key]);return keys.map(key=>Array.isArray(query[key])?this.addArrayQueryParam(query,key):this.addQueryParam(query,key)).join("&")}addQueryParams(rawQuery){const queryString=this.toQueryString(rawQuery);return queryString?`?${queryString}`:""}contentFormatters={["application/json"]:input=>null!==input&&("object"==typeof input||"string"==typeof input)?JSON.stringify(input):input,["application/vnd.api+json"]:input=>null!==input&&("object"==typeof input||"string"==typeof input)?JSON.stringify(input):input,["text/plain"]:input=>null!==input&&"string"!=typeof input?JSON.stringify(input):input,["multipart/form-data"]:input=>Object.keys(input||{}).reduce((formData,key)=>{const property=input[key];formData.append(key,property instanceof Blob?property:"object"==typeof property&&null!==property?JSON.stringify(property):`${property}`);return formData},new FormData),["application/x-www-form-urlencoded"]:input=>this.toQueryString(input)};mergeRequestParams(params1,params2){return{...this.baseApiParams,...params1,...params2||{},headers:{...this.baseApiParams.headers||{},...params1.headers||{},...params2&&params2.headers||{}}}}createAbortSignal=cancelToken=>{if(this.abortControllers.has(cancelToken)){const abortController=this.abortControllers.get(cancelToken);if(abortController)return abortController.signal;return}const abortController=new AbortController;this.abortControllers.set(cancelToken,abortController);return abortController.signal};abortRequest=cancelToken=>{const abortController=this.abortControllers.get(cancelToken);if(abortController){abortController.abort();this.abortControllers.delete(cancelToken)}};request=async({body,secure,path,type,query,format,baseUrl,cancelToken,...params})=>{const secureParams=("boolean"==typeof secure?secure:this.baseApiParams.secure)&&this.securityWorker&&await this.securityWorker(this.securityData)||{};const requestParams=this.mergeRequestParams(params,secureParams);const queryString=query&&this.toQueryString(query);const payloadFormatter=this.contentFormatters[type||"application/json"];const responseFormat=format||requestParams.format;return this.customFetch(`${baseUrl||this.baseUrl||""}${path}${queryString?`?${queryString}`:""}`,{...requestParams,headers:{...requestParams.headers||{},...type&&"multipart/form-data"!==type?{"Content-Type":type}:{}},signal:(cancelToken?this.createAbortSignal(cancelToken):requestParams.signal)||null,body:null==body?null:payloadFormatter(body)}).then(async response=>{const r=response.clone();r.data=null;r.error=null;const data=responseFormat?await response[responseFormat]().then(data=>{if(r.ok)r.data=data;else r.error=data;return r}).catch(e=>{r.error=e;return r}):r;if(cancelToken)this.abortControllers.delete(cancelToken);if(!response.ok)throw data;return data})}}class AppApi{http;constructor(http){this.http=http}getHello=(params={})=>this.http.request({path:"/",method:"GET",format:"json",...params});users={getMeV1:(params={})=>this.http.request({path:"/v1/users/me",method:"GET",secure:true,format:"json",...params})};chart={getCashBalanceAccountsV1:(query,params={})=>this.http.request({path:"/v1/chart/cash_balance/accounts",method:"GET",query:query,format:"json",...params})};dashboard={getDashboardV1:(companyId,params={})=>this.http.request({path:`/v1/dashboard/${companyId}`,method:"GET",format:"json",...params})};auth={authCallbackCredentialsCreate:(data,params={})=>this.http.request({path:"/v1/auth/callback/credentials",method:"POST",body:data,type:"application/x-www-form-urlencoded",...params}),authCsrfList:(params={})=>this.http.request({path:"/v1/auth/csrf",method:"GET",format:"json",...params}),authSessionList:(params={})=>this.http.request({path:"/v1/auth/session",method:"GET",format:"json",...params}),authSignoutCreate:(data,params={})=>this.http.request({path:"/v1/auth/signout",method:"POST",body:data,type:"application/x-www-form-urlencoded",format:"json",...params})}}function useApi(){const client=new HttpClient({baseUrl:(void 0).PUBLIC_APP_API_URL,baseApiParams:{headers:{},credentials:"include"}});return new AppApi(client)}function useGetUsersMeQuery(){const api=useApi();const query=(0,_tanstack_react_query__WEBPACK_IMPORTED_MODULE_9__.useQuery)({queryKey:["users","me"],queryFn:async()=>await api.users.getMeV1().then(x=>x.data)});return query}const Field=({prop,val})=>{if(!val)return null;return/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_mantine_core__WEBPACK_IMPORTED_MODULE_1__.Group,{justify:"space-between",children:[/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_mantine_core__WEBPACK_IMPORTED_MODULE_1__.Text,{c:"dimmed",children:[prop,":"]}),/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_mantine_core__WEBPACK_IMPORTED_MODULE_1__.Text,{children:[" ",val]})]})};function SearchBox({children,values,selected,onChange,showDetails}){const[search,setSearch]=(0,react__WEBPACK_IMPORTED_MODULE_7__.useState)("");const[preview,setPreview]=(0,react__WEBPACK_IMPORTED_MODULE_7__.useState)(selected??null);const itemElems=react__WEBPACK_IMPORTED_MODULE_7__.useRef(new Map);const scrollarea=(0,react__WEBPACK_IMPORTED_MODULE_7__.useRef)(null);const[popopen,setPopopen]=(0,react__WEBPACK_IMPORTED_MODULE_7__.useState)(false);const theme=(0,_mantine_core__WEBPACK_IMPORTED_MODULE_1__.useMantineTheme)();const filtered=values.filter(item=>item.label.toLowerCase().includes(search.toLowerCase().trim()));const options=filtered.map(item=>/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_mantine_core__WEBPACK_IMPORTED_MODULE_1__.Button,{ref:ref=>{if(ref)itemElems.current.set(item.value,ref)},variant:selected===item.value?"filled":preview===item.value?"light":"subtle",color:selected===item.value?theme.colors[theme.primaryColor][9]:"gray",size:"xs",justify:"start",onClick:()=>{clickItem(item.value)},onMouseEnter:()=>setPreview(item.value),children:item.label},item.value));function clickItem(value){onChange?.(value);setPreview(value);setPopopen(false)}(0,react__WEBPACK_IMPORTED_MODULE_7__.useEffect)(()=>{setPreview(filtered[0]?.value)},[search]);(0,react__WEBPACK_IMPORTED_MODULE_7__.useEffect)(()=>{if(preview)focusItem(preview)},[preview]);(0,react__WEBPACK_IMPORTED_MODULE_7__.useEffect)(()=>{setTimeout(()=>{if(preview)focusItem(preview)},200)},[popopen]);(0,react__WEBPACK_IMPORTED_MODULE_7__.useEffect)(()=>{setPreview(selected??null)},[selected]);function focusItem(value){const item=itemElems.current.get(value);if(item&&scrollarea.current){if(item.offsetTop+item.offsetHeight>scrollarea.current.offsetHeight+scrollarea.current.scrollTop)scrollarea.current.scrollTo({top:item.offsetTop+item.offsetHeight-scrollarea.current.offsetHeight});if(item.offsetTop<scrollarea.current.scrollTop||item.offsetTop+item.offsetHeight>scrollarea.current.offsetHeight+scrollarea.current.scrollTop)scrollarea.current.scrollTo({top:item.offsetTop})}}const content=/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_mantine_core__WEBPACK_IMPORTED_MODULE_1__.Group,{align:"flex-start",wrap:"nowrap",children:[/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_mantine_core__WEBPACK_IMPORTED_MODULE_1__.Stack,{children:[/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_mantine_core__WEBPACK_IMPORTED_MODULE_1__.TextInput,{value:search,onChange:event=>setSearch(event.currentTarget.value),placeholder:"Rechercher",autoFocus:true,onKeyDown:(0,_mantine_hooks__WEBPACK_IMPORTED_MODULE_3__.getHotkeyHandler)([["enter",()=>preview&&clickItem(preview)],["escape",()=>setSearch("")],["arrowUp",()=>setPreview(filtered[filtered.findIndex(x=>x.value===preview)-1]?.value)],["arrowDown",()=>setPreview(filtered[filtered.findIndex(x=>x.value===preview)+1]?.value)]])}),/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_mantine_core__WEBPACK_IMPORTED_MODULE_1__.ScrollArea,{h:300,scrollbars:"y",type:"auto",viewportRef:scrollarea,children:[/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_mantine_core__WEBPACK_IMPORTED_MODULE_1__.Stack,{gap:0,children:options}),0===filtered.length&&/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_mantine_core__WEBPACK_IMPORTED_MODULE_1__.Text,{c:"dimmed",flex:1,ta:"center",children:"Aucun resultat"})]})]}),preview&&showDetails&&/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment,{children:[/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_mantine_core__WEBPACK_IMPORTED_MODULE_1__.Divider,{orientation:"vertical"}),showDetails(preview)]})]});if(!children)return content;return/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_mantine_core__WEBPACK_IMPORTED_MODULE_1__.Popover,{opened:popopen,onChange:setPopopen,children:[/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_mantine_core__WEBPACK_IMPORTED_MODULE_1__.Popover.Target,{children:/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div",{onClick:()=>setPopopen(true),children:children})}),/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_mantine_core__WEBPACK_IMPORTED_MODULE_1__.Popover.Dropdown,{children:content})]})}function CompanySelector({children,selected,onChange}){const me=useGetUsersMeQuery();return/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(SearchBox,{values:me.data?.companies.map(c=>({label:c.display_name,value:c.id.toString()}))??[],selected:selected,onChange:onChange,showDetails:x=>{const comp=me.data?.companies.find(c=>c.id.toString()===x);return/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_mantine_core__WEBPACK_IMPORTED_MODULE_1__.Stack,{gap:4,children:[/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(CompanyLogo,{slug:comp?.slug,w:48,mb:"md"}),/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Field,{prop:"Nom",val:comp?.display_name}),/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Field,{prop:"SIREN",val:comp?.siren_number}),/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Field,{prop:"Dirigeant",val:comp?.leader}),/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Field,{prop:"Adresse",val:comp?.address})]})},children:children??/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_mantine_core__WEBPACK_IMPORTED_MODULE_1__.Button,{flex:1,size:"md",variant:"subtle",color:"gray",leftSection:/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_tabler_icons_react__WEBPACK_IMPORTED_MODULE_8__.IconRepeat,{}),justify:"start",children:"Changer d'entreprise"})})}function IconMore({color="currentColor",size=24,...props}){return/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("svg",{width:size,height:size,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...props,children:[/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("circle",{cx:"17.168",cy:"7.5",r:"1.5",fill:color}),/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("circle",{cx:"17.168",cy:"12.5",r:"1.5",fill:color}),/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("circle",{cx:"17.168",cy:"17.5",r:"1.5",fill:color})]})}function IconTrendingUp({color="currentColor",size=24,transform,...props}){return/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("svg",{width:size,height:size,viewBox:"0 0 24 24",fill:"none",style:{transform},xmlns:"http://www.w3.org/2000/svg",...props,children:[/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("path",{d:"M23 6L13.5 15.5L8.5 10.5L1 18",stroke:color,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("path",{d:"M17 6H23V12",stroke:color,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]})}function KPICard({children,title,subtitle,topSection,trend,menu,...rest}){const theme=(0,_mantine_core__WEBPACK_IMPORTED_MODULE_1__.useMantineTheme)();return/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_mantine_core__WEBPACK_IMPORTED_MODULE_1__.Card,{bg:"dark.4",miw:260,p:"sm",...rest,children:/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_mantine_core__WEBPACK_IMPORTED_MODULE_1__.Stack,{gap:12,children:[/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_mantine_core__WEBPACK_IMPORTED_MODULE_1__.Group,{justify:"space-between",align:"start",children:[/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_mantine_core__WEBPACK_IMPORTED_MODULE_1__.Stack,{children:[title&&/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_mantine_core__WEBPACK_IMPORTED_MODULE_1__.Title,{order:4,children:title}),topSection]}),/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(KPICardMenu,{parameters:menu?.parameters,children:/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(IconMore,{color:theme.colors.gray[7],cursor:"pointer"})})]}),/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_mantine_core__WEBPACK_IMPORTED_MODULE_1__.Divider,{}),/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_mantine_core__WEBPACK_IMPORTED_MODULE_1__.Group,{justify:"space-between",children:[/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_mantine_core__WEBPACK_IMPORTED_MODULE_1__.Stack,{gap:6,flex:1,children:[trend&&/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(IconTrendingUp,{transform:"down"==trend?"scaleY(-1)":void 0}),subtitle&&/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_mantine_core__WEBPACK_IMPORTED_MODULE_1__.Text,{fw:500,fz:16,c:theme.primaryColor,children:subtitle}),children]}),/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_tabler_icons_react__WEBPACK_IMPORTED_MODULE_8__.IconHelpCircle,{color:theme.colors.dark[0],style:{alignSelf:"flex-end"}})]})]})})}function KPICardMenu({parameters,children}){return/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_mantine_core__WEBPACK_IMPORTED_MODULE_1__.Menu,{shadow:"md",width:200,children:[/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_mantine_core__WEBPACK_IMPORTED_MODULE_1__.Menu.Target,{children:children}),/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_mantine_core__WEBPACK_IMPORTED_MODULE_1__.Menu.Dropdown,{children:[parameters&&/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment,{children:[/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_mantine_core__WEBPACK_IMPORTED_MODULE_1__.Menu.Label,{children:"Param\xe8tres"}),parameters,/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_mantine_core__WEBPACK_IMPORTED_MODULE_1__.Menu.Divider,{})]}),/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_mantine_core__WEBPACK_IMPORTED_MODULE_1__.Menu.Label,{children:"Organisation"}),/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_mantine_core__WEBPACK_IMPORTED_MODULE_1__.Menu.Sub,{children:[/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_mantine_core__WEBPACK_IMPORTED_MODULE_1__.Menu.Sub.Target,{children:/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_mantine_core__WEBPACK_IMPORTED_MODULE_1__.Menu.Sub.Item,{leftSection:/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_tabler_icons_react__WEBPACK_IMPORTED_MODULE_8__.IconArrowsMove,{size:14}),children:"D\xe9placer"})}),/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_mantine_core__WEBPACK_IMPORTED_MODULE_1__.Menu.Sub.Dropdown,{children:[/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_mantine_core__WEBPACK_IMPORTED_MODULE_1__.Menu.Item,{leftSection:/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_tabler_icons_react__WEBPACK_IMPORTED_MODULE_8__.IconArrowBarLeft,{size:14}),children:"Gauche"}),/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_mantine_core__WEBPACK_IMPORTED_MODULE_1__.Menu.Item,{leftSection:/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_tabler_icons_react__WEBPACK_IMPORTED_MODULE_8__.IconArrowBarRight,{size:14}),children:"Droite"})]})]}),/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_mantine_core__WEBPACK_IMPORTED_MODULE_1__.Menu.Item,{color:"red",leftSection:/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_tabler_icons_react__WEBPACK_IMPORTED_MODULE_8__.IconTrash,{size:14}),children:"Supprimer ce KPI"})]})]})}function KPICardBankAccountsChart({accounts,...rest}){const detailed=useRxState(false);return/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(KPICard,{title:"Cash position (k€)",w:"100%",menu:{parameters:[/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_mantine_core__WEBPACK_IMPORTED_MODULE_1__.Menu.Item,{children:/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_mantine_core__WEBPACK_IMPORTED_MODULE_1__.Checkbox,{label:"D\xe9tails par compte",checked:detailed.value,onChange:x=>detailed.value=x.target.checked})})]},...rest,children:accounts?/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(BankAccountsChart,{showIndividualBalances:detailed.value,h:200,accounts:accounts,detail:"high",showToday:false,showReferenceLines:"never",xAxisProps:{ticks:(0,date_fns__WEBPACK_IMPORTED_MODULE_4__.eachMonthOfInterval)({start:(0,date_fns__WEBPACK_IMPORTED_MODULE_4__.subMonths)(new Date,6),end:new Date}).map(d=>new Date(isoday(d)).getTime()),tickFormatter:v=>{v=new Date(v);return(0,date_fns__WEBPACK_IMPORTED_MODULE_4__.intlFormat)(v,{month:"short"},{locale:"fr"})}}}):/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_mantine_core__WEBPACK_IMPORTED_MODULE_1__.Skeleton,{h:200,w:"100%"})})}const languages={en:{label:"English",flag:"us"},fr:{label:"Fran\xe7ais",flag:"fr"},es:{label:"Espa\xf1ol",flag:"es"}};const flag=lang=>/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("span",{className:`fi fi-${languages[lang].flag}`});function LanguageSwitcher(props){const{i18n}=(0,react_i18next__WEBPACK_IMPORTED_MODULE_10__.useTranslation)();const lang=i18n.language;return/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_mantine_core__WEBPACK_IMPORTED_MODULE_1__.Group,{...props,children:/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_mantine_core__WEBPACK_IMPORTED_MODULE_1__.Menu,{shadow:"md",width:180,children:[/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_mantine_core__WEBPACK_IMPORTED_MODULE_1__.Menu.Target,{children:/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_mantine_core__WEBPACK_IMPORTED_MODULE_1__.Button,{variant:"default",children:/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_mantine_core__WEBPACK_IMPORTED_MODULE_1__.Group,{gap:"xs",children:[flag(lang)," ",lang.toUpperCase()]})})}),/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_mantine_core__WEBPACK_IMPORTED_MODULE_1__.Menu.Dropdown,{children:(0,radash__WEBPACK_IMPORTED_MODULE_6__.listify)(languages,(key,{label})=>/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_mantine_core__WEBPACK_IMPORTED_MODULE_1__.Menu.Item,{onClick:()=>i18n.changeLanguage(key),disabled:lang===key,children:/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_mantine_core__WEBPACK_IMPORTED_MODULE_1__.Group,{children:[flag(key)," ",label]})},key))})]})})}function PillTrend({children,trend,...rest}){const theme=(0,_mantine_core__WEBPACK_IMPORTED_MODULE_1__.useMantineTheme)();return/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_mantine_core__WEBPACK_IMPORTED_MODULE_1__.Pill,{bg:(0,_mantine_core__WEBPACK_IMPORTED_MODULE_1__.alpha)(theme.colors["up"==trend?"teal":"red"][6],.3),...rest,children:/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_mantine_core__WEBPACK_IMPORTED_MODULE_1__.Group,{gap:4,wrap:"nowrap",align:"center",children:["up"==trend?/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_tabler_icons_react__WEBPACK_IMPORTED_MODULE_8__.IconArrowBigUpFilled,{size:10,color:theme.colors.teal[2]}):/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_tabler_icons_react__WEBPACK_IMPORTED_MODULE_8__.IconArrowBigDownFilled,{size:10,color:theme.colors.red[5]}),children]})})}const theme_theme=(0,_mantine_core__WEBPACK_IMPORTED_MODULE_1__.createTheme)({primaryColor:"teal",fontFamily:"Host Grotesk",headings:{sizes:{h1:{fontSize:"28px",fontWeight:"500"},h2:{fontSize:"22px",fontWeight:"500"},h3:{fontSize:"18px",fontWeight:"500"},h4:{fontSize:"16px",fontWeight:"500"},h5:{fontSize:"14px",fontWeight:"500"},h6:{fontSize:"12px",fontWeight:"500"}}},fontSizes:{lg:"16px",md:"14px",sm:"12px",xs:"10px"},colors:{dark:["#a4a4a4",(0,_mantine_core__WEBPACK_IMPORTED_MODULE_1__.alpha)("var(--mantine-color-white)",.2),(0,_mantine_core__WEBPACK_IMPORTED_MODULE_1__.alpha)("var(--mantine-color-white)",.15),(0,_mantine_core__WEBPACK_IMPORTED_MODULE_1__.alpha)("var(--mantine-color-white)",.1),(0,_mantine_core__WEBPACK_IMPORTED_MODULE_1__.alpha)("var(--mantine-color-white)",.05),"#474747","#363636","#282828","#1e1e1e","#121212"]},components:{Button:_mantine_core__WEBPACK_IMPORTED_MODULE_1__.Button.extend({styles:(_theme,props)=>({root:{border:"filled"!=props.variant&&props.variant?void 0:"none"},label:{fontWeight:"500"}})}),Checkbox:_mantine_core__WEBPACK_IMPORTED_MODULE_1__.Checkbox.extend({styles:{input:{border:"none"}},defaultProps:{icon:props=>/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(IconCheck,{...props})}}),TextInput:_mantine_core__WEBPACK_IMPORTED_MODULE_1__.TextInput.extend({styles:{label:{marginBottom:"8px"}}}),PasswordInput:_mantine_core__WEBPACK_IMPORTED_MODULE_1__.PasswordInput.extend({styles:{label:{marginBottom:"8px"}}}),Input:_mantine_core__WEBPACK_IMPORTED_MODULE_1__.Input.extend({styles:{input:{borderRadius:"10px",backgroundColor:"var(--mantine-color-body)"}}}),MenuDropdown:_mantine_core__WEBPACK_IMPORTED_MODULE_1__.MenuDropdown.extend({defaultProps:{bg:"var(--mantine-color-dark-7)"}}),Popover:_mantine_core__WEBPACK_IMPORTED_MODULE_1__.Popover.extend({defaultProps:{radius:"8px"},styles:{dropdown:{background:"var(--mantine-color-dark-7)",borderColor:"var(--mantine-color-dark-1)"}}}),Divider:_mantine_core__WEBPACK_IMPORTED_MODULE_1__.Divider.extend({defaultProps:{color:(0,_mantine_core__WEBPACK_IMPORTED_MODULE_1__.alpha)("var(--mantine-color-white)",.1)}}),Badge:_mantine_core__WEBPACK_IMPORTED_MODULE_1__.Badge.extend({styles:{root:{borderRadius:"4px",fontWeight:"400",fontFamily:"IBM Plex Sans"}}}),Modal:_mantine_core__WEBPACK_IMPORTED_MODULE_1__.Modal.extend({styles:{content:{borderRadius:10,backgroundColor:"var(--mantine-color-dark-9)"},header:{backgroundColor:"var(--mantine-color-dark-9)"}}}),Drawer:_mantine_core__WEBPACK_IMPORTED_MODULE_1__.Drawer.extend({styles:{content:{backgroundColor:"var(--mantine-color-dark-9)"},header:{backgroundColor:"var(--mantine-color-dark-9)"}}}),Paper:_mantine_core__WEBPACK_IMPORTED_MODULE_1__.Paper.extend({styles:{root:{backgroundColor:"var(--mantine-color-dark-8)"}}})}});const cssVarResolver=theme=>({variables:{},light:{"--mantine-color-text":"var(--mantine-color-black)"},dark:{"--mantine-radius-default":"10px","--checkbox-radius":"4px","--mantine-color-text":"var(--mantine-color-white)","--mantine-color-body":"#090909","--mantine-color-placeholder":"var(--mantine-color-dark-0)","--mantine-color-dimmed":"var(--mantine-color-dark-0)","--button-bg":`linear-gradient(90deg, ${(0,_mantine_core__WEBPACK_IMPORTED_MODULE_1__.darken)(theme.colors[theme.primaryColor][9],.3)} -10%, ${theme.colors[theme.primaryColor][8]} 100%)`,"--mantine-color-default":"var(--mantine-color-dark-3)","--mantine-color-default-border":"var(--mantine-color-dark-2)","--mantine-color-default-hover":"var(--mantine-color-dark-2)"}})}}]);
package/dist/mf/541.js ADDED
@@ -0,0 +1 @@
1
+ "use strict";(globalThis["chunk_integrations_app"]=globalThis["chunk_integrations_app"]||[]).push([["541"],{281:function(__unused_webpack___webpack_module__,__webpack_exports__,__webpack_require__){__webpack_require__.r(__webpack_exports__);__webpack_require__.d(__webpack_exports__,{useOrientation:()=>useOrientation,clamp:()=>clamp,useDebouncedValue:()=>useDebouncedValue,useMutationObserver:()=>useMutationObserver,useResizeObserver:()=>useResizeObserver,useSet:()=>useSet,randomId:()=>randomId,useShallowEffect:()=>useShallowEffect,useThrottledState:()=>useThrottledState,mergeRefs:()=>mergeRefs,usePrevious:()=>usePrevious,useLongPress:()=>useLongPress,useReducedMotion:()=>useReducedMotion,useSetState:()=>useSetState,readLocalStorageValue:()=>readLocalStorageValue,useCounter:()=>useCounter,useValidatedState:()=>useValidatedState,useDebouncedState:()=>useDebouncedState,useMove:()=>useMove,useFileDialog:()=>useFileDialog,useClipboard:()=>useClipboard,useIsomorphicEffect:()=>useIsomorphicEffect,useLogger:()=>useLogger,useIdle:()=>useIdle,useElementSize:()=>useElementSize,useClickOutside:()=>useClickOutside,shallowEqual:()=>shallowEqual,useNetwork:()=>useNetwork,useEyeDropper:()=>useEyeDropper,useId:()=>useId,range:()=>range,useMediaQuery:()=>useMediaQuery,useRadialMove:()=>useRadialMove,useHotkeys:()=>useHotkeys,useSelection:()=>useSelection,useWindowEvent:()=>useWindowEvent,useInterval:()=>useInterval,useHeadroom:()=>useHeadroom,useSessionStorage:()=>useSessionStorage,useDebouncedCallback:()=>useDebouncedCallback,useDocumentTitle:()=>useDocumentTitle,useFocusTrap:()=>useFocusTrap,useHash:()=>useHash,upperFirst:()=>upperFirst,useThrottledValue:()=>useThrottledValue,useOs:()=>useOs,normalizeRadialValue:()=>normalizeRadialValue,useDocumentVisibility:()=>useDocumentVisibility,useHover:()=>useHover,useMap:()=>useMap,useScrollIntoView:()=>useScrollIntoView,useFocusReturn:()=>useFocusReturn,usePageLeave:()=>usePageLeave,useMergedRef:()=>useMergedRef,useDidUpdate:()=>useDidUpdate,useInViewport:()=>useInViewport,useIsFirstRender:()=>useIsFirstRender,usePagination:()=>usePagination,useMouse:()=>useMouse,useFavicon:()=>useFavicon,useQueue:()=>useQueue,useTimeout:()=>useTimeout,useToggle:()=>useToggle,useColorScheme:()=>useColorScheme,useEventListener:()=>useEventListener,useFullscreen:()=>useFullscreen,useIntersection:()=>useIntersection,useLocalStorage:()=>useLocalStorage,useFocusWithin:()=>useFocusWithin,useMounted:()=>useMounted,assignRef:()=>assignRef,useThrottledCallback:()=>useThrottledCallback,useStateHistory:()=>useStateHistory,useViewportSize:()=>useViewportSize,getHotkeyHandler:()=>getHotkeyHandler,useCallbackRef:()=>useCallbackRef,useTextSelection:()=>useTextSelection,useWindowScroll:()=>useWindowScroll,useDisclosure:()=>useDisclosure,readSessionStorageValue:()=>readSessionStorageValue,clampUseMovePosition:()=>clampUseMovePosition,useInputState:()=>useInputState,useForceUpdate:()=>useForceUpdate,useFetch:()=>useFetch,useListState:()=>useListState,lowerFirst:()=>lowerFirst,useScrollSpy:()=>useScrollSpy,useUncontrolled:()=>useUncontrolled});"use client";function clamp(value,min,max){if(void 0===min&&void 0===max)return value;if(void 0!==min&&void 0===max)return Math.max(value,min);if(void 0===min&&void 0!==max)return Math.min(value,max);return Math.min(Math.max(value,min),max)}"use client";function lowerFirst(value){return"string"!=typeof value?"":value.charAt(0).toLowerCase()+value.slice(1)}"use client";function randomId(prefix="mantine-"){return`${prefix}${Math.random().toString(36).slice(2,11)}`}"use client";function range(start,end){const length=Math.abs(end-start)+1;const reversed=start>end;if(!reversed)return Array.from({length},(_,index)=>index+start);return Array.from({length},(_,index)=>start-index)}"use client";function shallowEqual(a,b){if(a===b)return true;if(Number.isNaN(a)&&Number.isNaN(b))return true;if(!(a instanceof Object)||!(b instanceof Object))return false;const keys=Object.keys(a);const{length}=keys;if(length!==Object.keys(b).length)return false;for(let i=0;i<length;i+=1){const key=keys[i];if(!(key in b))return false;if(a[key]!==b[key]&&!(Number.isNaN(a[key])&&Number.isNaN(b[key])))return false}return true}"use client";function upperFirst(value){return"string"!=typeof value?"":value.charAt(0).toUpperCase()+value.slice(1)}var index_js_=__webpack_require__(9063);"use client";function useCallbackRef(callback){const callbackRef=(0,index_js_.useRef)(callback);(0,index_js_.useEffect)(()=>{callbackRef.current=callback});return(0,index_js_.useMemo)(()=>(...args)=>callbackRef.current?.(...args),[])}"use client";function useDebouncedCallback(callback,options){const{delay,flushOnUnmount,leading}="number"==typeof options?{delay:options,flushOnUnmount:false,leading:false}:options;const handleCallback=useCallbackRef(callback);const debounceTimerRef=(0,index_js_.useRef)(0);const lastCallback=(0,index_js_.useMemo)(()=>{const currentCallback=Object.assign((...args)=>{window.clearTimeout(debounceTimerRef.current);const isFirstCall=currentCallback._isFirstCall;currentCallback._isFirstCall=false;function clearTimeoutAndLeadingRef(){window.clearTimeout(debounceTimerRef.current);debounceTimerRef.current=0;currentCallback._isFirstCall=true}if(leading&&isFirstCall){handleCallback(...args);const resetLeadingState=()=>{clearTimeoutAndLeadingRef()};const flush2=()=>{if(0!==debounceTimerRef.current){clearTimeoutAndLeadingRef();handleCallback(...args)}};const cancel2=()=>{clearTimeoutAndLeadingRef()};currentCallback.flush=flush2;currentCallback.cancel=cancel2;debounceTimerRef.current=window.setTimeout(resetLeadingState,delay);return}if(leading&&!isFirstCall){const flush2=()=>{if(0!==debounceTimerRef.current){clearTimeoutAndLeadingRef();handleCallback(...args)}};const cancel2=()=>{clearTimeoutAndLeadingRef()};currentCallback.flush=flush2;currentCallback.cancel=cancel2;const resetLeadingState=()=>{clearTimeoutAndLeadingRef()};debounceTimerRef.current=window.setTimeout(resetLeadingState,delay);return}const flush=()=>{if(0!==debounceTimerRef.current){clearTimeoutAndLeadingRef();handleCallback(...args)}};const cancel=()=>{clearTimeoutAndLeadingRef()};currentCallback.flush=flush;currentCallback.cancel=cancel;debounceTimerRef.current=window.setTimeout(flush,delay)},{flush:()=>{},cancel:()=>{},_isFirstCall:true});return currentCallback},[handleCallback,delay,leading]);(0,index_js_.useEffect)(()=>()=>{if(flushOnUnmount)lastCallback.flush();else lastCallback.cancel()},[lastCallback,flushOnUnmount]);return lastCallback}"use client";const DEFAULT_EVENTS=["mousedown","touchstart"];function useClickOutside(callback,events,nodes){const ref=(0,index_js_.useRef)(null);const eventsList=events||DEFAULT_EVENTS;(0,index_js_.useEffect)(()=>{const listener=event=>{const{target}=event??{};if(Array.isArray(nodes)){const shouldIgnore=!document.body.contains(target)&&"HTML"!==target.tagName;const shouldTrigger=nodes.every(node=>!!node&&!event.composedPath().includes(node));shouldTrigger&&!shouldIgnore&&callback()}else if(ref.current&&!ref.current.contains(target))callback()};eventsList.forEach(fn=>document.addEventListener(fn,listener));return()=>{eventsList.forEach(fn=>document.removeEventListener(fn,listener))}},[ref,callback,nodes]);return ref}"use client";function useClipboard(options={timeout:2e3}){const[error,setError]=(0,index_js_.useState)(null);const[copied,setCopied]=(0,index_js_.useState)(false);const[copyTimeout,setCopyTimeout]=(0,index_js_.useState)(null);const handleCopyResult=value=>{window.clearTimeout(copyTimeout);setCopyTimeout(window.setTimeout(()=>setCopied(false),options.timeout));setCopied(value)};const copy=value=>{if("clipboard"in navigator)navigator.clipboard.writeText(value).then(()=>handleCopyResult(true)).catch(err=>setError(err));else setError(new Error("useClipboard: navigator.clipboard is not supported"))};const reset=()=>{setCopied(false);setError(null);window.clearTimeout(copyTimeout)};return{copy,reset,error,copied}}"use client";function attachMediaListener(query,callback){try{query.addEventListener("change",callback);return()=>query.removeEventListener("change",callback)}catch(e){query.addListener(callback);return()=>query.removeListener(callback)}}function getInitialValue(query,initialValue){if("undefined"!=typeof window&&"matchMedia"in window)return window.matchMedia(query).matches;return false}function useMediaQuery(query,initialValue,{getInitialValueInEffect}={getInitialValueInEffect:true}){const[matches,setMatches]=(0,index_js_.useState)(getInitialValueInEffect?initialValue:getInitialValue(query));const queryRef=(0,index_js_.useRef)(null);(0,index_js_.useEffect)(()=>{if("matchMedia"in window){queryRef.current=window.matchMedia(query);setMatches(queryRef.current.matches);return attachMediaListener(queryRef.current,event=>setMatches(event.matches))}},[query]);return matches||false}"use client";function useColorScheme(initialValue,options){return useMediaQuery("(prefers-color-scheme: dark)","dark"===initialValue,options)?"dark":"light"}"use client";const DEFAULT_OPTIONS={min:-1/0,max:1/0};function useCounter(initialValue=0,options){const{min,max}={...DEFAULT_OPTIONS,...options};const[count,setCount]=(0,index_js_.useState)(clamp(initialValue,min,max));const increment=(0,index_js_.useCallback)(()=>setCount(current=>clamp(current+1,min,max)),[min,max]);const decrement=(0,index_js_.useCallback)(()=>setCount(current=>clamp(current-1,min,max)),[min,max]);const set=(0,index_js_.useCallback)(value=>setCount(clamp(value,min,max)),[min,max]);const reset=(0,index_js_.useCallback)(()=>setCount(clamp(initialValue,min,max)),[initialValue,min,max]);return[count,{increment,decrement,set,reset}]}"use client";function useDebouncedState(defaultValue,wait,options={leading:false}){const[value,setValue]=(0,index_js_.useState)(defaultValue);const timeoutRef=(0,index_js_.useRef)(null);const leadingRef=(0,index_js_.useRef)(true);const clearTimeout1=()=>window.clearTimeout(timeoutRef.current);(0,index_js_.useEffect)(()=>clearTimeout1,[]);const debouncedSetValue=(0,index_js_.useCallback)(newValue=>{clearTimeout1();if(leadingRef.current&&options.leading)setValue(newValue);else timeoutRef.current=window.setTimeout(()=>{leadingRef.current=true;setValue(newValue)},wait);leadingRef.current=false},[options.leading]);return[value,debouncedSetValue]}"use client";function useDebouncedValue(value,wait,options={leading:false}){const[_value,setValue]=(0,index_js_.useState)(value);const mountedRef=(0,index_js_.useRef)(false);const timeoutRef=(0,index_js_.useRef)(null);const cooldownRef=(0,index_js_.useRef)(false);const cancel=()=>window.clearTimeout(timeoutRef.current);(0,index_js_.useEffect)(()=>{if(mountedRef.current)if(!cooldownRef.current&&options.leading){cooldownRef.current=true;setValue(value)}else{cancel();timeoutRef.current=window.setTimeout(()=>{cooldownRef.current=false;setValue(value)},wait)}},[value,options.leading,wait]);(0,index_js_.useEffect)(()=>{mountedRef.current=true;return cancel},[]);return[_value,cancel]}"use client";const useIsomorphicEffect="undefined"!=typeof document?index_js_.useLayoutEffect:index_js_.useEffect;"use client";function useDocumentTitle(title){useIsomorphicEffect(()=>{if("string"==typeof title&&title.trim().length>0)document.title=title.trim()},[title])}"use client";function useDocumentVisibility(){const[documentVisibility,setDocumentVisibility]=(0,index_js_.useState)("visible");(0,index_js_.useEffect)(()=>{const listener=()=>setDocumentVisibility(document.visibilityState);document.addEventListener("visibilitychange",listener);return()=>document.removeEventListener("visibilitychange",listener)},[]);return documentVisibility}"use client";function useDidUpdate(fn,dependencies){const mounted=(0,index_js_.useRef)(false);(0,index_js_.useEffect)(()=>()=>{mounted.current=false},[]);(0,index_js_.useEffect)(()=>{if(mounted.current)return fn();mounted.current=true},dependencies)}"use client";function useFocusReturn({opened,shouldReturnFocus=true}){const lastActiveElement=(0,index_js_.useRef)(null);const returnFocus=()=>{if(lastActiveElement.current&&"focus"in lastActiveElement.current&&"function"==typeof lastActiveElement.current.focus)lastActiveElement.current?.focus({preventScroll:true})};useDidUpdate(()=>{let timeout=-1;const clearFocusTimeout=event=>{if("Tab"===event.key)window.clearTimeout(timeout)};document.addEventListener("keydown",clearFocusTimeout);if(opened)lastActiveElement.current=document.activeElement;else if(shouldReturnFocus)timeout=window.setTimeout(returnFocus,10);return()=>{window.clearTimeout(timeout);document.removeEventListener("keydown",clearFocusTimeout)}},[opened,shouldReturnFocus]);return returnFocus}"use client";const TABBABLE_NODES=/input|select|textarea|button|object/;const FOCUS_SELECTOR="a, input, select, textarea, button, object, [tabindex]";function tabbable_hidden(element){return"none"===element.style.display}function visible(element){const isHidden=element.getAttribute("aria-hidden")||element.getAttribute("hidden")||"hidden"===element.getAttribute("type");if(isHidden)return false;let parentElement=element;while(parentElement){if(parentElement===document.body||11===parentElement.nodeType)break;if(tabbable_hidden(parentElement))return false;parentElement=parentElement.parentNode}return true}function getElementTabIndex(element){let tabIndex=element.getAttribute("tabindex");if(null===tabIndex)tabIndex=void 0;return parseInt(tabIndex,10)}function focusable(element){const nodeName=element.nodeName.toLowerCase();const isTabIndexNotNaN=!Number.isNaN(getElementTabIndex(element));const res=TABBABLE_NODES.test(nodeName)&&!element.disabled||(element instanceof HTMLAnchorElement?element.href||isTabIndexNotNaN:isTabIndexNotNaN);return res&&visible(element)}function tabbable_tabbable(element){const tabIndex=getElementTabIndex(element);const isTabIndexNaN=Number.isNaN(tabIndex);return(isTabIndexNaN||tabIndex>=0)&&focusable(element)}function findTabbableDescendants(element){return Array.from(element.querySelectorAll(FOCUS_SELECTOR)).filter(tabbable_tabbable)}"use client";function scopeTab(node,event){const tabbable=findTabbableDescendants(node);if(!tabbable.length)return void event.preventDefault();const finalTabbable=tabbable[event.shiftKey?0:tabbable.length-1];const root=node.getRootNode();let leavingFinalTabbable=finalTabbable===root.activeElement||node===root.activeElement;const activeElement=root.activeElement;const activeElementIsRadio="INPUT"===activeElement.tagName&&"radio"===activeElement.getAttribute("type");if(activeElementIsRadio){const activeRadioGroup=tabbable.filter(element=>"radio"===element.getAttribute("type")&&element.getAttribute("name")===activeElement.getAttribute("name"));leavingFinalTabbable=activeRadioGroup.includes(finalTabbable)}if(!leavingFinalTabbable)return;event.preventDefault();const target=tabbable[event.shiftKey?tabbable.length-1:0];if(target)target.focus()}"use client";function useFocusTrap(active=true){const ref=(0,index_js_.useRef)(null);const focusNode=node=>{let focusElement=node.querySelector("[data-autofocus]");if(!focusElement){const children=Array.from(node.querySelectorAll(FOCUS_SELECTOR));focusElement=children.find(tabbable_tabbable)||children.find(focusable)||null;if(!focusElement&&focusable(node))focusElement=node}if(focusElement)focusElement.focus({preventScroll:true})};const setRef=(0,index_js_.useCallback)(node=>{if(!active)return;if(null===node)return;if(ref.current===node)return;if(node){setTimeout(()=>{if(node.getRootNode())focusNode(node)});ref.current=node}else ref.current=null},[active]);(0,index_js_.useEffect)(()=>{if(!active)return;ref.current&&setTimeout(()=>focusNode(ref.current));const handleKeyDown=event=>{if("Tab"===event.key&&ref.current)scopeTab(ref.current,event)};document.addEventListener("keydown",handleKeyDown);return()=>document.removeEventListener("keydown",handleKeyDown)},[active]);return setRef}"use client";const reducer=value=>(value+1)%1e6;function useForceUpdate(){const[,update]=(0,index_js_.useReducer)(reducer,0);return update}"use client";const __useId=index_js_["useId".toString()]||(()=>void 0);function useReactId(){const id=__useId();return id?`mantine-${id.replace(/:/g,"")}`:""}"use client";function useId(staticId){const reactId=useReactId();const[uuid,setUuid]=(0,index_js_.useState)(reactId);useIsomorphicEffect(()=>{setUuid(randomId())},[]);if("string"==typeof staticId)return staticId;if("undefined"==typeof window)return reactId;return uuid}"use client";const use_idle_DEFAULT_OPTIONS={events:["keydown","mousemove","touchmove","click","scroll","wheel"],initialState:true};function useIdle(timeout,options){const{events,initialState}={...use_idle_DEFAULT_OPTIONS,...options};const[idle,setIdle]=(0,index_js_.useState)(initialState);const timer=(0,index_js_.useRef)(-1);(0,index_js_.useEffect)(()=>{const handleEvents=()=>{setIdle(false);if(timer.current)window.clearTimeout(timer.current);timer.current=window.setTimeout(()=>{setIdle(true)},timeout)};events.forEach(event=>document.addEventListener(event,handleEvents));timer.current=window.setTimeout(()=>{setIdle(true)},timeout);return()=>{events.forEach(event=>document.removeEventListener(event,handleEvents));window.clearTimeout(timer.current);timer.current=-1}},[timeout]);return idle}"use client";function useInterval(fn,interval,{autoInvoke=false}={}){const[active,setActive]=(0,index_js_.useState)(false);const intervalRef=(0,index_js_.useRef)(null);const fnRef=(0,index_js_.useRef)(null);const start=(0,index_js_.useCallback)(()=>{setActive(old=>{if(!old&&(!intervalRef.current||-1===intervalRef.current))intervalRef.current=window.setInterval(fnRef.current,interval);return true})},[]);const stop=(0,index_js_.useCallback)(()=>{setActive(false);window.clearInterval(intervalRef.current||-1);intervalRef.current=-1},[]);const toggle=(0,index_js_.useCallback)(()=>{if(active)stop();else start()},[active]);(0,index_js_.useEffect)(()=>{fnRef.current=fn;active&&start();return stop},[fn,active,interval]);(0,index_js_.useEffect)(()=>{if(autoInvoke)start()},[]);return{start,stop,toggle,active}}"use client";function useListState(initialValue=[]){const[state,setState]=(0,index_js_.useState)(initialValue);const append=(...items)=>setState(current=>[...current,...items]);const prepend=(...items)=>setState(current=>[...items,...current]);const insert=(index,...items)=>setState(current=>[...current.slice(0,index),...items,...current.slice(index)]);const apply=fn=>setState(current=>current.map((item,index)=>fn(item,index)));const remove=(...indices)=>setState(current=>current.filter((_,index)=>!indices.includes(index)));const pop=()=>setState(current=>{const cloned=[...current];cloned.pop();return cloned});const shift=()=>setState(current=>{const cloned=[...current];cloned.shift();return cloned});const reorder=({from,to})=>setState(current=>{const cloned=[...current];const item=current[from];cloned.splice(from,1);cloned.splice(to,0,item);return cloned});const swap=({from,to})=>setState(current=>{const cloned=[...current];const fromItem=cloned[from];const toItem=cloned[to];cloned.splice(to,1,fromItem);cloned.splice(from,1,toItem);return cloned});const setItem=(index,item)=>setState(current=>{const cloned=[...current];cloned[index]=item;return cloned});const setItemProp=(index,prop,value)=>setState(current=>{const cloned=[...current];cloned[index]={...cloned[index],[prop]:value};return cloned});const applyWhere=(condition,fn)=>setState(current=>current.map((item,index)=>condition(item,index)?fn(item,index):item));const filter=fn=>{setState(current=>current.filter(fn))};return[state,{setState,append,prepend,insert,pop,shift,apply,applyWhere,remove,reorder,swap,setItem,setItemProp,filter}]}"use client";function useWindowEvent(type,listener,options){(0,index_js_.useEffect)(()=>{window.addEventListener(type,listener,options);return()=>window.removeEventListener(type,listener,options)},[type,listener])}"use client";function serializeJSON(value,hookName="use-local-storage"){try{return JSON.stringify(value)}catch(error){throw new Error(`@mantine/hooks ${hookName}: Failed to serialize the value`)}}function deserializeJSON(value){try{return value&&JSON.parse(value)}catch{return value}}function createStorageHandler(type){const getItem=key=>{try{return window[type].getItem(key)}catch(error){console.warn("use-local-storage: Failed to get value from storage, localStorage is blocked");return null}};const setItem=(key,value)=>{try{window[type].setItem(key,value)}catch(error){console.warn("use-local-storage: Failed to set value to storage, localStorage is blocked")}};const removeItem=key=>{try{window[type].removeItem(key)}catch(error){console.warn("use-local-storage: Failed to remove value from storage, localStorage is blocked")}};return{getItem,setItem,removeItem}}function createStorage(type,hookName){const eventName="localStorage"===type?"mantine-local-storage":"mantine-session-storage";const{getItem,setItem,removeItem}=createStorageHandler(type);return function({key,defaultValue,getInitialValueInEffect=true,sync=true,deserialize=deserializeJSON,serialize=value=>serializeJSON(value,hookName)}){const readStorageValue=(0,index_js_.useCallback)(skipStorage=>{let storageBlockedOrSkipped;try{storageBlockedOrSkipped="undefined"==typeof window||!(type in window)||null===window[type]||!!skipStorage}catch(_e){storageBlockedOrSkipped=true}if(storageBlockedOrSkipped)return defaultValue;const storageValue=getItem(key);return null!==storageValue?deserialize(storageValue):defaultValue},[key,defaultValue]);const[value,setValue]=(0,index_js_.useState)(readStorageValue(getInitialValueInEffect));const setStorageValue=(0,index_js_.useCallback)(val=>{if(val instanceof Function)setValue(current=>{const result=val(current);setItem(key,serialize(result));queueMicrotask(()=>{window.dispatchEvent(new CustomEvent(eventName,{detail:{key,value:val(current)}}))});return result});else{setItem(key,serialize(val));window.dispatchEvent(new CustomEvent(eventName,{detail:{key,value:val}}));setValue(val)}},[key]);const removeStorageValue=(0,index_js_.useCallback)(()=>{removeItem(key);window.dispatchEvent(new CustomEvent(eventName,{detail:{key,value:defaultValue}}))},[]);useWindowEvent("storage",event=>{if(sync){if(event.storageArea===window[type]&&event.key===key)setValue(deserialize(event.newValue??void 0))}});useWindowEvent(eventName,event=>{if(sync){if(event.detail.key===key)setValue(event.detail.value)}});(0,index_js_.useEffect)(()=>{if(void 0!==defaultValue&&void 0===value)setStorageValue(defaultValue)},[defaultValue,value,setStorageValue]);(0,index_js_.useEffect)(()=>{const val=readStorageValue();void 0!==val&&setStorageValue(val)},[key]);return[void 0===value?defaultValue:value,setStorageValue,removeStorageValue]}}function readValue(type){const{getItem}=createStorageHandler(type);return function({key,defaultValue,deserialize=deserializeJSON}){let storageBlockedOrSkipped;try{storageBlockedOrSkipped="undefined"==typeof window||!(type in window)||null===window[type]}catch(_e){storageBlockedOrSkipped=true}if(storageBlockedOrSkipped)return defaultValue;const storageValue=getItem(key);return null!==storageValue?deserialize(storageValue):defaultValue}}"use client";function useLocalStorage(props){return createStorage("localStorage","use-local-storage")(props)}const readLocalStorageValue=readValue("localStorage");"use client";function useSessionStorage(props){return createStorage("sessionStorage","use-session-storage")(props)}const readSessionStorageValue=readValue("sessionStorage");"use client";function assignRef(ref,value){if("function"==typeof ref)return ref(value);if("object"==typeof ref&&null!==ref&&"current"in ref)ref.current=value}function mergeRefs(...refs){const cleanupMap=/* @__PURE__ */new Map;return node=>{refs.forEach(ref=>{const cleanup=assignRef(ref,node);if(cleanup)cleanupMap.set(ref,cleanup)});if(cleanupMap.size>0)return()=>{refs.forEach(ref=>{const cleanup=cleanupMap.get(ref);if(cleanup&&"function"==typeof cleanup)cleanup();else assignRef(ref,null)});cleanupMap.clear()}}}function useMergedRef(...refs){return(0,index_js_.useCallback)(mergeRefs(...refs),refs)}"use client";function useMouse(options={resetOnExit:false}){const[position,setPosition]=(0,index_js_.useState)({x:0,y:0});const ref=(0,index_js_.useRef)(null);const setMousePosition=event=>{if(ref.current){const rect=event.currentTarget.getBoundingClientRect();const x=Math.max(0,Math.round(event.pageX-rect.left-(window.scrollX||window.scrollX)));const y=Math.max(0,Math.round(event.pageY-rect.top-(window.scrollY||window.scrollY)));setPosition({x,y})}else setPosition({x:event.clientX,y:event.clientY})};const resetMousePosition=()=>setPosition({x:0,y:0});(0,index_js_.useEffect)(()=>{const element=ref?.current?ref.current:document;element.addEventListener("mousemove",setMousePosition);if(options.resetOnExit)element.addEventListener("mouseleave",resetMousePosition);return()=>{element.removeEventListener("mousemove",setMousePosition);if(options.resetOnExit)element.removeEventListener("mouseleave",resetMousePosition)}},[ref.current]);return{ref,...position}}"use client";function clampUseMovePosition(position){return{x:clamp(position.x,0,1),y:clamp(position.y,0,1)}}function useMove(onChange,handlers,dir="ltr"){const mounted=(0,index_js_.useRef)(false);const isSliding=(0,index_js_.useRef)(false);const frame=(0,index_js_.useRef)(0);const[active,setActive]=(0,index_js_.useState)(false);const cleanupRef=(0,index_js_.useRef)(null);(0,index_js_.useEffect)(()=>{mounted.current=true},[]);const refCallback=(0,index_js_.useCallback)(node=>{if(cleanupRef.current){cleanupRef.current();cleanupRef.current=null}if(!node)return;const onScrub=({x,y})=>{cancelAnimationFrame(frame.current);frame.current=requestAnimationFrame(()=>{if(mounted.current&&node){node.style.userSelect="none";const rect=node.getBoundingClientRect();if(rect.width&&rect.height){const _x=clamp((x-rect.left)/rect.width,0,1);onChange({x:"ltr"===dir?_x:1-_x,y:clamp((y-rect.top)/rect.height,0,1)})}}})};const bindEvents=()=>{document.addEventListener("mousemove",onMouseMove);document.addEventListener("mouseup",stopScrubbing);document.addEventListener("touchmove",onTouchMove,{passive:false});document.addEventListener("touchend",stopScrubbing)};const unbindEvents=()=>{document.removeEventListener("mousemove",onMouseMove);document.removeEventListener("mouseup",stopScrubbing);document.removeEventListener("touchmove",onTouchMove);document.removeEventListener("touchend",stopScrubbing)};const startScrubbing=()=>{if(!isSliding.current&&mounted.current){isSliding.current=true;"function"==typeof handlers?.onScrubStart&&handlers.onScrubStart();setActive(true);bindEvents()}};const stopScrubbing=()=>{if(isSliding.current&&mounted.current){isSliding.current=false;setActive(false);unbindEvents();setTimeout(()=>{"function"==typeof handlers?.onScrubEnd&&handlers.onScrubEnd()},0)}};const onMouseDown=event=>{startScrubbing();event.preventDefault();onMouseMove(event)};const onMouseMove=event=>onScrub({x:event.clientX,y:event.clientY});const onTouchStart=event=>{if(event.cancelable)event.preventDefault();startScrubbing();onTouchMove(event)};const onTouchMove=event=>{if(event.cancelable)event.preventDefault();onScrub({x:event.changedTouches[0].clientX,y:event.changedTouches[0].clientY})};node.addEventListener("mousedown",onMouseDown);node.addEventListener("touchstart",onTouchStart,{passive:false});cleanupRef.current=()=>{node.removeEventListener("mousedown",onMouseDown);node.removeEventListener("touchstart",onTouchStart)}},[dir,onChange]);return{ref:refCallback,active}}"use client";function useUncontrolled({value,defaultValue,finalValue,onChange=()=>{}}){const[uncontrolledValue,setUncontrolledValue]=(0,index_js_.useState)(void 0!==defaultValue?defaultValue:finalValue);const handleUncontrolledChange=(val,...payload)=>{setUncontrolledValue(val);onChange?.(val,...payload)};if(void 0!==value)return[value,onChange,true];return[uncontrolledValue,handleUncontrolledChange,false]}"use client";function use_pagination_range(start,end){const length=end-start+1;return Array.from({length},(_,index)=>index+start)}const DOTS="dots";function usePagination({total,siblings=1,boundaries=1,page,initialPage=1,onChange}){const _total=Math.max(Math.trunc(total),0);const[activePage,setActivePage]=useUncontrolled({value:page,onChange,defaultValue:initialPage,finalValue:initialPage});const setPage=pageNumber=>{if(pageNumber<=0)setActivePage(1);else pageNumber>_total?setActivePage(_total):setActivePage(pageNumber)};const next=()=>setPage(activePage+1);const previous=()=>setPage(activePage-1);const first=()=>setPage(1);const last=()=>setPage(_total);const paginationRange=(0,index_js_.useMemo)(()=>{const totalPageNumbers=2*siblings+3+2*boundaries;if(totalPageNumbers>=_total)return use_pagination_range(1,_total);const leftSiblingIndex=Math.max(activePage-siblings,boundaries);const rightSiblingIndex=Math.min(activePage+siblings,_total-boundaries);const shouldShowLeftDots=leftSiblingIndex>boundaries+2;const shouldShowRightDots=rightSiblingIndex<_total-(boundaries+1);if(!shouldShowLeftDots&&shouldShowRightDots){const leftItemCount=2*siblings+boundaries+2;return[...use_pagination_range(1,leftItemCount),DOTS,...use_pagination_range(_total-(boundaries-1),_total)]}if(shouldShowLeftDots&&!shouldShowRightDots){const rightItemCount=boundaries+1+2*siblings;return[...use_pagination_range(1,boundaries),DOTS,...use_pagination_range(_total-rightItemCount,_total)]}return[...use_pagination_range(1,boundaries),DOTS,...use_pagination_range(leftSiblingIndex,rightSiblingIndex),DOTS,...use_pagination_range(_total-boundaries+1,_total)]},[_total,siblings,activePage]);return{range:paginationRange,active:activePage,setPage,next,previous,first,last}}"use client";function useQueue({initialValues=[],limit}){const[state,setState]=(0,index_js_.useState)({state:initialValues.slice(0,limit),queue:initialValues.slice(limit)});const add=(...items)=>setState(current=>{const results=[...current.state,...current.queue,...items];return{state:results.slice(0,limit),queue:results.slice(limit)}});const update=fn=>setState(current=>{const results=fn([...current.state,...current.queue]);return{state:results.slice(0,limit),queue:results.slice(limit)}});const cleanQueue=()=>setState(current=>({state:current.state,queue:[]}));return{state:state.state,queue:state.queue,add,update,cleanQueue}}"use client";function usePageLeave(onPageLeave){(0,index_js_.useEffect)(()=>{document.documentElement.addEventListener("mouseleave",onPageLeave);return()=>document.documentElement.removeEventListener("mouseleave",onPageLeave)},[])}"use client";function useReducedMotion(initialValue,options){return useMediaQuery("(prefers-reduced-motion: reduce)",initialValue,options)}"use client";function useScrollIntoView({duration=1250,axis="y",onScrollFinish,easing=easeInOutQuad,offset=0,cancelable=true,isList=false}={}){const frameID=(0,index_js_.useRef)(0);const startTime=(0,index_js_.useRef)(0);const shouldStop=(0,index_js_.useRef)(false);const scrollableRef=(0,index_js_.useRef)(null);const targetRef=(0,index_js_.useRef)(null);const reducedMotion=useReducedMotion();const cancel=()=>{if(frameID.current)cancelAnimationFrame(frameID.current)};const scrollIntoView=(0,index_js_.useCallback)(({alignment="start"}={})=>{shouldStop.current=false;if(frameID.current)cancel();const start=getScrollStart({parent:scrollableRef.current,axis})??0;const change=getRelativePosition({parent:scrollableRef.current,target:targetRef.current,axis,alignment,offset,isList})-(scrollableRef.current?0:start);function animateScroll(){if(0===startTime.current)startTime.current=performance.now();const now=performance.now();const elapsed=now-startTime.current;const t=reducedMotion||0===duration?1:elapsed/duration;const distance=start+change*easing(t);setScrollParam({parent:scrollableRef.current,axis,distance});if(!shouldStop.current&&t<1)frameID.current=requestAnimationFrame(animateScroll);else{"function"==typeof onScrollFinish&&onScrollFinish();startTime.current=0;frameID.current=0;cancel()}}animateScroll()},[axis,duration,easing,isList,offset,onScrollFinish,reducedMotion]);const handleStop=()=>{if(cancelable)shouldStop.current=true};useWindowEvent("wheel",handleStop,{passive:true});useWindowEvent("touchmove",handleStop,{passive:true});(0,index_js_.useEffect)(()=>cancel,[]);return{scrollableRef,targetRef,scrollIntoView,cancel}}function easeInOutQuad(t){return t<.5?2*t*t:-1+(4-2*t)*t}function getRelativePosition({axis,target,parent,alignment,offset,isList}){if(!target||!parent&&"undefined"==typeof document)return 0;const isCustomParent=!!parent;const parentElement=parent||document.body;const parentPosition=parentElement.getBoundingClientRect();const targetPosition=target.getBoundingClientRect();const getDiff=property=>targetPosition[property]-parentPosition[property];if("y"===axis){const diff=getDiff("top");if(0===diff)return 0;if("start"===alignment){const distance=diff-offset;const shouldScroll=distance<=targetPosition.height*(isList?0:1)||!isList;return shouldScroll?distance:0}const parentHeight=isCustomParent?parentPosition.height:window.innerHeight;if("end"===alignment){const distance=diff+offset-parentHeight+targetPosition.height;const shouldScroll=distance>=-targetPosition.height*(isList?0:1)||!isList;return shouldScroll?distance:0}if("center"===alignment)return diff-parentHeight/2+targetPosition.height/2;return 0}if("x"===axis){const diff=getDiff("left");if(0===diff)return 0;if("start"===alignment){const distance=diff-offset;const shouldScroll=distance<=targetPosition.width||!isList;return shouldScroll?distance:0}const parentWidth=isCustomParent?parentPosition.width:window.innerWidth;if("end"===alignment){const distance=diff+offset-parentWidth+targetPosition.width;const shouldScroll=distance>=-targetPosition.width||!isList;return shouldScroll?distance:0}if("center"===alignment)return diff-parentWidth/2+targetPosition.width/2}return 0}function getScrollStart({axis,parent}){if(!parent&&"undefined"==typeof document)return 0;const method="y"===axis?"scrollTop":"scrollLeft";if(parent)return parent[method];const{body,documentElement}=document;return body[method]+documentElement[method]}function setScrollParam({axis,parent,distance}){if(!parent&&"undefined"==typeof document)return;const method="y"===axis?"scrollTop":"scrollLeft";if(parent)parent[method]=distance;else{const{body,documentElement}=document;body[method]=distance;documentElement[method]=distance}}"use client";const defaultState={x:0,y:0,width:0,height:0,top:0,left:0,bottom:0,right:0};function useResizeObserver(options){const frameID=(0,index_js_.useRef)(0);const ref=(0,index_js_.useRef)(null);const[rect,setRect]=(0,index_js_.useState)(defaultState);const observer=(0,index_js_.useMemo)(()=>"undefined"!=typeof window?new ResizeObserver(entries=>{const entry=entries[0];if(entry){cancelAnimationFrame(frameID.current);frameID.current=requestAnimationFrame(()=>{if(ref.current){const boxSize=entry.borderBoxSize?.[0]||entry.contentBoxSize?.[0];if(boxSize){const width=boxSize.inlineSize;const height=boxSize.blockSize;setRect({width,height,x:entry.contentRect.x,y:entry.contentRect.y,top:entry.contentRect.top,left:entry.contentRect.left,bottom:entry.contentRect.bottom,right:entry.contentRect.right})}else setRect(entry.contentRect)}})}}):null,[]);(0,index_js_.useEffect)(()=>{if(ref.current)observer?.observe(ref.current,options);return()=>{observer?.disconnect();if(frameID.current)cancelAnimationFrame(frameID.current)}},[ref.current]);return[ref,rect]}function useElementSize(options){const[ref,{width,height}]=useResizeObserver(options);return{ref,width,height}}"use client";function shallowCompare(prevValue,currValue){if(!prevValue||!currValue)return false;if(prevValue===currValue)return true;if(prevValue.length!==currValue.length)return false;for(let i=0;i<prevValue.length;i+=1)if(!shallowEqual(prevValue[i],currValue[i]))return false;return true}function useShallowCompare(dependencies){const ref=(0,index_js_.useRef)([]);const updateRef=(0,index_js_.useRef)(0);if(!shallowCompare(ref.current,dependencies)){ref.current=dependencies;updateRef.current+=1}return[updateRef.current]}function useShallowEffect(cb,dependencies){(0,index_js_.useEffect)(cb,useShallowCompare(dependencies))}"use client";function useToggle(options=[false,true]){const[[option],toggle]=(0,index_js_.useReducer)((state,action)=>{const value=action instanceof Function?action(state[0]):action;const index=Math.abs(state.indexOf(value));return state.slice(index).concat(state.slice(0,index))},options);return[option,toggle]}"use client";const eventListerOptions={passive:true};function useViewportSize(){const[windowSize,setWindowSize]=(0,index_js_.useState)({width:0,height:0});const setSize=(0,index_js_.useCallback)(()=>{setWindowSize({width:window.innerWidth||0,height:window.innerHeight||0})},[]);useWindowEvent("resize",setSize,eventListerOptions);useWindowEvent("orientationchange",setSize,eventListerOptions);(0,index_js_.useEffect)(setSize,[]);return windowSize}"use client";function getScrollPosition(){return"undefined"!=typeof window?{x:window.scrollX,y:window.scrollY}:{x:0,y:0}}function scrollTo({x,y}){if("undefined"!=typeof window){const scrollOptions={behavior:"smooth"};if("number"==typeof x)scrollOptions.left=x;if("number"==typeof y)scrollOptions.top=y;window.scrollTo(scrollOptions)}}function useWindowScroll(){const[position,setPosition]=(0,index_js_.useState)({x:0,y:0});useWindowEvent("scroll",()=>setPosition(getScrollPosition()));useWindowEvent("resize",()=>setPosition(getScrollPosition()));(0,index_js_.useEffect)(()=>{setPosition(getScrollPosition())},[]);return[position,scrollTo]}"use client";function useIntersection(options){const[entry,setEntry]=(0,index_js_.useState)(null);const observer=(0,index_js_.useRef)(null);const ref=(0,index_js_.useCallback)(element=>{if(observer.current){observer.current.disconnect();observer.current=null}if(null===element)return void setEntry(null);observer.current=new IntersectionObserver(([_entry])=>{setEntry(_entry)},options);observer.current.observe(element)},[options?.rootMargin,options?.root,options?.threshold]);return{ref,entry}}"use client";function useHash({getInitialValueInEffect=true}={}){const[hash,setHash]=(0,index_js_.useState)(getInitialValueInEffect?"":window.location.hash||"");const setHashHandler=value=>{const valueWithHash=value.startsWith("#")?value:`#${value}`;window.location.hash=valueWithHash;setHash(valueWithHash)};useWindowEvent("hashchange",()=>{const newHash=window.location.hash;if(hash!==newHash)setHash(newHash)});(0,index_js_.useEffect)(()=>{if(getInitialValueInEffect)setHash(window.location.hash)},[]);return[hash,setHashHandler]}"use client";const keyNameMap={" ":"space",ArrowLeft:"arrowleft",ArrowRight:"arrowright",ArrowUp:"arrowup",ArrowDown:"arrowdown",Escape:"escape",Esc:"escape",esc:"escape",Enter:"enter",Tab:"tab",Backspace:"backspace",Delete:"delete",Insert:"insert",Home:"home",End:"end",PageUp:"pageup",PageDown:"pagedown","+":"plus","-":"minus","*":"asterisk","/":"slash"};function normalizeKey(key){const lowerKey=key.replace("Key","").toLowerCase();return keyNameMap[key]||lowerKey}function parseHotkey(hotkey){const keys=hotkey.toLowerCase().split("+").map(part=>part.trim());const modifiers={alt:keys.includes("alt"),ctrl:keys.includes("ctrl"),meta:keys.includes("meta"),mod:keys.includes("mod"),shift:keys.includes("shift"),plus:keys.includes("[plus]")};const reservedKeys=["alt","ctrl","meta","shift","mod"];const freeKey=keys.find(key=>!reservedKeys.includes(key));return{...modifiers,key:"[plus]"===freeKey?"+":freeKey}}function isExactHotkey(hotkey,event,usePhysicalKeys){const{alt,ctrl,meta,mod,shift,key}=hotkey;const{altKey,ctrlKey,metaKey,shiftKey,key:pressedKey,code:pressedCode}=event;if(alt!==altKey)return false;if(mod){if(!ctrlKey&&!metaKey)return false}else{if(ctrl!==ctrlKey)return false;if(meta!==metaKey)return false}if(shift!==shiftKey)return false;if(key&&(usePhysicalKeys?normalizeKey(pressedCode)===normalizeKey(key):normalizeKey(pressedKey??pressedCode)===normalizeKey(key)))return true;return false}function getHotkeyMatcher(hotkey,usePhysicalKeys){return event=>isExactHotkey(parseHotkey(hotkey),event,usePhysicalKeys)}function getHotkeyHandler(hotkeys){return event=>{const _event="nativeEvent"in event?event.nativeEvent:event;hotkeys.forEach(([hotkey,handler,options={preventDefault:true,usePhysicalKeys:false}])=>{if(getHotkeyMatcher(hotkey,options.usePhysicalKeys)(_event)){if(options.preventDefault)event.preventDefault();handler(_event)}})}}"use client";function shouldFireEvent(event,tagsToIgnore,triggerOnContentEditable=false){if(event.target instanceof HTMLElement){if(triggerOnContentEditable)return!tagsToIgnore.includes(event.target.tagName);return!event.target.isContentEditable&&!tagsToIgnore.includes(event.target.tagName)}return true}function useHotkeys(hotkeys,tagsToIgnore=["INPUT","TEXTAREA","SELECT"],triggerOnContentEditable=false){(0,index_js_.useEffect)(()=>{const keydownListener=event=>{hotkeys.forEach(([hotkey,handler,options={preventDefault:true,usePhysicalKeys:false}])=>{if(getHotkeyMatcher(hotkey,options.usePhysicalKeys)(event)&&shouldFireEvent(event,tagsToIgnore,triggerOnContentEditable)){if(options.preventDefault)event.preventDefault();handler(event)}})};document.documentElement.addEventListener("keydown",keydownListener);return()=>document.documentElement.removeEventListener("keydown",keydownListener)},[hotkeys])}"use client";function getFullscreenElement(){const _document=window.document;const fullscreenElement=_document.fullscreenElement||_document.webkitFullscreenElement||_document.mozFullScreenElement||_document.msFullscreenElement;return fullscreenElement}function exitFullscreen(){const _document=window.document;if("function"==typeof _document.exitFullscreen)return _document.exitFullscreen();if("function"==typeof _document.msExitFullscreen)return _document.msExitFullscreen();if("function"==typeof _document.webkitExitFullscreen)return _document.webkitExitFullscreen();if("function"==typeof _document.mozCancelFullScreen)return _document.mozCancelFullScreen();return null}function enterFullScreen(element){const _element=element;return _element.requestFullscreen?.()||_element.msRequestFullscreen?.()||_element.webkitEnterFullscreen?.()||_element.webkitRequestFullscreen?.()||_element.mozRequestFullscreen?.()}const prefixes=["","webkit","moz","ms"];function addEvents(element,{onFullScreen,onError}){prefixes.forEach(prefix=>{element.addEventListener(`${prefix}fullscreenchange`,onFullScreen);element.addEventListener(`${prefix}fullscreenerror`,onError)});return()=>{prefixes.forEach(prefix=>{element.removeEventListener(`${prefix}fullscreenchange`,onFullScreen);element.removeEventListener(`${prefix}fullscreenerror`,onError)})}}function useFullscreen(){const[fullscreen,setFullscreen]=(0,index_js_.useState)(false);const _ref=(0,index_js_.useRef)(null);const handleFullscreenChange=(0,index_js_.useCallback)(event=>{setFullscreen(event.target===getFullscreenElement())},[setFullscreen]);const handleFullscreenError=(0,index_js_.useCallback)(event=>{setFullscreen(false);console.error(`[@mantine/hooks] use-fullscreen: Error attempting full-screen mode method: ${event} (${event.target})`)},[setFullscreen]);const toggle=(0,index_js_.useCallback)(async()=>{if(getFullscreenElement())await exitFullscreen();else await enterFullScreen(_ref.current)},[]);const ref=(0,index_js_.useCallback)(element=>{if(null===element)_ref.current=window.document.documentElement;else _ref.current=element},[]);(0,index_js_.useEffect)(()=>{if(!_ref.current&&window.document){_ref.current=window.document.documentElement;return addEvents(_ref.current,{onFullScreen:handleFullscreenChange,onError:handleFullscreenError})}if(_ref.current)return addEvents(_ref.current,{onFullScreen:handleFullscreenChange,onError:handleFullscreenError})},[_ref.current]);return{ref,toggle,fullscreen}}"use client";function useLogger(componentName,props){(0,index_js_.useEffect)(()=>{console.log(`${componentName} mounted`,...props);return()=>console.log(`${componentName} unmounted`)},[]);useDidUpdate(()=>{console.log(`${componentName} updated`,...props)},props);return null}"use client";function useHover(){const[hovered,setHovered]=(0,index_js_.useState)(false);const previousNode=(0,index_js_.useRef)(null);const handleMouseEnter=(0,index_js_.useCallback)(()=>{setHovered(true)},[]);const handleMouseLeave=(0,index_js_.useCallback)(()=>{setHovered(false)},[]);const ref=(0,index_js_.useCallback)(node=>{if(previousNode.current){previousNode.current.removeEventListener("mouseenter",handleMouseEnter);previousNode.current.removeEventListener("mouseleave",handleMouseLeave)}if(node){node.addEventListener("mouseenter",handleMouseEnter);node.addEventListener("mouseleave",handleMouseLeave)}previousNode.current=node},[handleMouseEnter,handleMouseLeave]);return{ref,hovered}}"use client";function useValidatedState(initialValue,validate,initialValidationState){const[value,setValue]=(0,index_js_.useState)(initialValue);const[lastValidValue,setLastValidValue]=(0,index_js_.useState)(validate(initialValue)?initialValue:void 0);const[valid,setValid]=(0,index_js_.useState)("boolean"==typeof initialValidationState?initialValidationState:validate(initialValue));const onChange=val=>{if(validate(val)){setLastValidValue(val);setValid(true)}else setValid(false);setValue(val)};return[{value,lastValidValue,valid},onChange]}"use client";function isMacOS(userAgent){const macosPattern=/(Macintosh)|(MacIntel)|(MacPPC)|(Mac68K)/i;return macosPattern.test(userAgent)}function isIOS(userAgent){const iosPattern=/(iPhone)|(iPad)|(iPod)/i;return iosPattern.test(userAgent)}function isWindows(userAgent){const windowsPattern=/(Win32)|(Win64)|(Windows)|(WinCE)/i;return windowsPattern.test(userAgent)}function isAndroid(userAgent){const androidPattern=/Android/i;return androidPattern.test(userAgent)}function isLinux(userAgent){const linuxPattern=/Linux/i;return linuxPattern.test(userAgent)}function isChromeOS(userAgent){const chromePattern=/CrOS/i;return chromePattern.test(userAgent)}function getOS(){if("undefined"==typeof window)return"undetermined";const{userAgent}=window.navigator;if(isIOS(userAgent)||isMacOS(userAgent)&&"ontouchend"in document)return"ios";if(isMacOS(userAgent))return"macos";if(isWindows(userAgent))return"windows";if(isAndroid(userAgent))return"android";if(isLinux(userAgent))return"linux";if(isChromeOS(userAgent))return"chromeos";return"undetermined"}function useOs(options={getValueInEffect:true}){const[value,setValue]=(0,index_js_.useState)(options.getValueInEffect?"undetermined":getOS());useIsomorphicEffect(()=>{if(options.getValueInEffect)setValue(getOS)},[]);return value}"use client";function useSetState(initialState){const[state,setState]=(0,index_js_.useState)(initialState);const _setState=(0,index_js_.useCallback)(statePartial=>setState(current=>({...current,..."function"==typeof statePartial?statePartial(current):statePartial})),[]);return[state,_setState]}"use client";function getInputOnChange(setValue){return val=>{if(val)if("function"==typeof val)setValue(val);else if("object"==typeof val&&"nativeEvent"in val){const{currentTarget}=val;"checkbox"===currentTarget.type?setValue(currentTarget.checked):setValue(currentTarget.value)}else setValue(val);else setValue(val)}}function useInputState(initialState){const[value,setValue]=(0,index_js_.useState)(initialState);return[value,getInputOnChange(setValue)]}"use client";function useEventListener(type,listener,options){const previousListener=(0,index_js_.useRef)(null);const previousNode=(0,index_js_.useRef)(null);const callbackRef=(0,index_js_.useCallback)(node=>{if(!node)return;if(previousNode.current&&previousListener.current)previousNode.current.removeEventListener(type,previousListener.current,options);node.addEventListener(type,listener,options);previousNode.current=node;previousListener.current=listener},[type,listener,options]);(0,index_js_.useEffect)(()=>()=>{if(previousNode.current&&previousListener.current)previousNode.current.removeEventListener(type,previousListener.current,options)},[type,options]);return callbackRef}"use client";function useDisclosure(initialState=false,options={}){const[opened,setOpened]=(0,index_js_.useState)(initialState);const open=(0,index_js_.useCallback)(()=>{setOpened(isOpened=>{if(!isOpened){options.onOpen?.();return true}return isOpened})},[options.onOpen]);const close=(0,index_js_.useCallback)(()=>{setOpened(isOpened=>{if(isOpened){options.onClose?.();return false}return isOpened})},[options.onClose]);const toggle=(0,index_js_.useCallback)(()=>{opened?close():open()},[close,open,opened]);return[opened,{open,close,toggle}]}"use client";function containsRelatedTarget(event){if(event.currentTarget instanceof HTMLElement&&event.relatedTarget instanceof HTMLElement)return event.currentTarget.contains(event.relatedTarget);return false}function useFocusWithin({onBlur,onFocus}={}){const[focused,setFocused]=(0,index_js_.useState)(false);const focusedRef=(0,index_js_.useRef)(false);const previousNode=(0,index_js_.useRef)(null);const _setFocused=(0,index_js_.useCallback)(value=>{setFocused(value);focusedRef.current=value},[]);const handleFocusIn=(0,index_js_.useCallback)(event=>{if(!focusedRef.current){_setFocused(true);onFocus?.(event)}},[onFocus]);const handleFocusOut=(0,index_js_.useCallback)(event=>{if(focusedRef.current&&!containsRelatedTarget(event)){_setFocused(false);onBlur?.(event)}},[onBlur]);const callbackRef=(0,index_js_.useCallback)(node=>{if(!node)return;if(previousNode.current){previousNode.current.removeEventListener("focusin",handleFocusIn);previousNode.current.removeEventListener("focusout",handleFocusOut)}node.addEventListener("focusin",handleFocusIn);node.addEventListener("focusout",handleFocusOut)},[handleFocusIn,handleFocusOut]);(0,index_js_.useEffect)(()=>()=>{if(previousNode.current){previousNode.current.removeEventListener("focusin",handleFocusIn);previousNode.current.removeEventListener("focusout",handleFocusOut)}},[]);return{ref:callbackRef,focused}}"use client";function getConnection(){if("undefined"==typeof navigator)return{};const _navigator=navigator;const connection=_navigator.connection||_navigator.mozConnection||_navigator.webkitConnection;if(!connection)return{};return{downlink:connection?.downlink,downlinkMax:connection?.downlinkMax,effectiveType:connection?.effectiveType,rtt:connection?.rtt,saveData:connection?.saveData,type:connection?.type}}function useNetwork(){const[status,setStatus]=(0,index_js_.useState)({online:true});const handleConnectionChange=(0,index_js_.useCallback)(()=>setStatus(current=>({...current,...getConnection()})),[]);useWindowEvent("online",()=>setStatus({online:true,...getConnection()}));useWindowEvent("offline",()=>setStatus({online:false,...getConnection()}));(0,index_js_.useEffect)(()=>{const _navigator=navigator;if(_navigator.connection){setStatus({online:_navigator.onLine,...getConnection()});_navigator.connection.addEventListener("change",handleConnectionChange);return()=>_navigator.connection.removeEventListener("change",handleConnectionChange)}if("boolean"==typeof _navigator.onLine)setStatus(current=>({...current,online:_navigator.onLine}))},[]);return status}"use client";function useTimeout(callback,delay,options={autoInvoke:false}){const timeoutRef=(0,index_js_.useRef)(null);const start=(0,index_js_.useCallback)((...args)=>{if(!timeoutRef.current)timeoutRef.current=window.setTimeout(()=>{callback(args);timeoutRef.current=null},delay)},[delay]);const clear=(0,index_js_.useCallback)(()=>{if(timeoutRef.current){window.clearTimeout(timeoutRef.current);timeoutRef.current=null}},[]);(0,index_js_.useEffect)(()=>{if(options.autoInvoke)start();return clear},[clear,start]);return{start,clear}}"use client";function useTextSelection(){const forceUpdate=useForceUpdate();const[selection,setSelection]=(0,index_js_.useState)(null);const handleSelectionChange=()=>{setSelection(document.getSelection());forceUpdate()};(0,index_js_.useEffect)(()=>{setSelection(document.getSelection());document.addEventListener("selectionchange",handleSelectionChange);return()=>document.removeEventListener("selectionchange",handleSelectionChange)},[]);return selection}"use client";function usePrevious(value){const ref=(0,index_js_.useRef)(void 0);(0,index_js_.useEffect)(()=>{ref.current=value},[value]);return ref.current}"use client";const MIME_TYPES={ico:"image/x-icon",png:"image/png",svg:"image/svg+xml",gif:"image/gif"};function useFavicon(url){const link=(0,index_js_.useRef)(null);useIsomorphicEffect(()=>{if(!url)return;if(!link.current){const existingElements=document.querySelectorAll('link[rel*="icon"]');existingElements.forEach(element2=>document.head.removeChild(element2));const element=document.createElement("link");element.rel="shortcut icon";link.current=element;document.querySelector("head").appendChild(element)}const splittedUrl=url.split(".");link.current.setAttribute("type",MIME_TYPES[splittedUrl[splittedUrl.length-1].toLowerCase()]);link.current.setAttribute("href",url)},[url])}"use client";const isFixed=(current,fixedAt)=>current<=fixedAt;const isPinnedOrReleased=(current,fixedAt,isCurrentlyPinnedRef,isScrollingUp,onPin,onRelease)=>{const isInFixedPosition=isFixed(current,fixedAt);if(isInFixedPosition&&!isCurrentlyPinnedRef.current){isCurrentlyPinnedRef.current=true;onPin?.()}else if(isInFixedPosition||!isScrollingUp||isCurrentlyPinnedRef.current){if(!isInFixedPosition&&isCurrentlyPinnedRef.current){isCurrentlyPinnedRef.current=false;onRelease?.()}}else{isCurrentlyPinnedRef.current=true;onPin?.()}};const useScrollDirection=()=>{const[lastScrollTop,setLastScrollTop]=(0,index_js_.useState)(0);const[isScrollingUp,setIsScrollingUp]=(0,index_js_.useState)(false);const[isResizing,setIsResizing]=(0,index_js_.useState)(false);(0,index_js_.useEffect)(()=>{let resizeTimer;const onResize=()=>{setIsResizing(true);clearTimeout(resizeTimer);resizeTimer=setTimeout(()=>{setIsResizing(false)},300)};const onScroll=()=>{if(isResizing)return;const currentScrollTop=window.scrollY||document.documentElement.scrollTop;setIsScrollingUp(currentScrollTop<lastScrollTop);setLastScrollTop(currentScrollTop)};window.addEventListener("scroll",onScroll);window.addEventListener("resize",onResize);return()=>{window.removeEventListener("scroll",onScroll);window.removeEventListener("resize",onResize)}},[lastScrollTop,isResizing]);return isScrollingUp};function useHeadroom({fixedAt=0,onPin,onFix,onRelease}={}){const isCurrentlyPinnedRef=(0,index_js_.useRef)(false);const isScrollingUp=useScrollDirection();const[{y:scrollPosition}]=useWindowScroll();useIsomorphicEffect(()=>{isPinnedOrReleased(scrollPosition,fixedAt,isCurrentlyPinnedRef,isScrollingUp,onPin,onRelease)},[scrollPosition]);useIsomorphicEffect(()=>{if(isFixed(scrollPosition,fixedAt))onFix?.()},[scrollPosition,fixedAt,onFix]);if(isFixed(scrollPosition,fixedAt)||isScrollingUp)return true;return false}"use client";function useEyeDropper(){const[supported,setSupported]=(0,index_js_.useState)(false);useIsomorphicEffect(()=>{setSupported("undefined"!=typeof window&&!isOpera()&&"EyeDropper"in window)},[]);const open=(0,index_js_.useCallback)((options={})=>{if(supported){const eyeDropper=new window.EyeDropper;return eyeDropper.open(options)}return Promise.resolve(void 0)},[supported]);return{supported,open}}function isOpera(){return navigator.userAgent.includes("OPR")}"use client";function useInViewport(){const observer=(0,index_js_.useRef)(null);const[inViewport,setInViewport]=(0,index_js_.useState)(false);const ref=(0,index_js_.useCallback)(node=>{if("undefined"!=typeof IntersectionObserver){if(node&&!observer.current)observer.current=new IntersectionObserver(entries=>setInViewport(entries.some(entry=>entry.isIntersecting)));else observer.current?.disconnect();if(node)observer.current?.observe(node);else setInViewport(false)}},[]);return{ref,inViewport}}"use client";function useMutationObserver(callback,options,target){const observer=(0,index_js_.useRef)(null);const ref=(0,index_js_.useRef)(null);(0,index_js_.useEffect)(()=>{const targetElement="function"==typeof target?target():target;if(targetElement||ref.current){observer.current=new MutationObserver(callback);observer.current.observe(targetElement||ref.current,options)}return()=>{observer.current?.disconnect()}},[callback,options]);return ref}"use client";function useMounted(){const[mounted,setMounted]=(0,index_js_.useState)(false);(0,index_js_.useEffect)(()=>setMounted(true),[]);return mounted}"use client";function useStateHistory(initialValue){const[state,setState]=(0,index_js_.useState)({history:[initialValue],current:0});const set=(0,index_js_.useCallback)(val=>setState(currentState=>{const nextState=[...currentState.history.slice(0,currentState.current+1),val];return{history:nextState,current:nextState.length-1}}),[]);const back=(0,index_js_.useCallback)((steps=1)=>setState(currentState=>({history:currentState.history,current:Math.max(0,currentState.current-steps)})),[]);const forward=(0,index_js_.useCallback)((steps=1)=>setState(currentState=>({history:currentState.history,current:Math.min(currentState.history.length-1,currentState.current+steps)})),[]);const reset=(0,index_js_.useCallback)(()=>{setState({history:[initialValue],current:0})},[initialValue]);const handlers=(0,index_js_.useMemo)(()=>({back,forward,reset,set}),[back,forward,reset,set]);return[state.history[state.current],handlers,state]}"use client";function useMap(initialState){const mapRef=(0,index_js_.useRef)(new Map(initialState));const forceUpdate=useForceUpdate();mapRef.current.set=(...args)=>{Map.prototype.set.apply(mapRef.current,args);forceUpdate();return mapRef.current};mapRef.current.clear=(...args)=>{Map.prototype.clear.apply(mapRef.current,args);forceUpdate()};mapRef.current.delete=(...args)=>{const res=Map.prototype.delete.apply(mapRef.current,args);forceUpdate();return res};return mapRef.current}"use client";function readonlySetLikeToSet(input){if(input instanceof Set)return input;const result=/* @__PURE__ */new Set;for(const item of input)result.add(item);return result}function useSet(values){const setRef=(0,index_js_.useRef)(new Set(values));const forceUpdate=useForceUpdate();setRef.current.add=(...args)=>{const res=Set.prototype.add.apply(setRef.current,args);forceUpdate();return res};setRef.current.clear=(...args)=>{Set.prototype.clear.apply(setRef.current,args);forceUpdate()};setRef.current.delete=(...args)=>{const res=Set.prototype.delete.apply(setRef.current,args);forceUpdate();return res};setRef.current.union=other=>{const result=new Set(setRef.current);readonlySetLikeToSet(other).forEach(item=>result.add(item));return result};setRef.current.intersection=other=>{const result=/* @__PURE__ */new Set;const otherSet=readonlySetLikeToSet(other);setRef.current.forEach(item=>{if(otherSet.has(item))result.add(item)});return result};setRef.current.difference=other=>{const result=/* @__PURE__ */new Set;const otherSet=readonlySetLikeToSet(other);setRef.current.forEach(item=>{if(!otherSet.has(item))result.add(item)});return result};setRef.current.symmetricDifference=other=>{const result=/* @__PURE__ */new Set;const otherSet=readonlySetLikeToSet(other);setRef.current.forEach(item=>{if(!otherSet.has(item))result.add(item)});otherSet.forEach(item=>{if(!setRef.current.has(item))result.add(item)});return result};return setRef.current}"use client";function useThrottledCallbackWithClearTimeout(callback,wait){const handleCallback=useCallbackRef(callback);const latestInArgsRef=(0,index_js_.useRef)(null);const latestOutArgsRef=(0,index_js_.useRef)(null);const active=(0,index_js_.useRef)(true);const waitRef=(0,index_js_.useRef)(wait);const timeoutRef=(0,index_js_.useRef)(-1);const clearTimeout1=()=>window.clearTimeout(timeoutRef.current);const callThrottledCallback=(0,index_js_.useCallback)((...args)=>{handleCallback(...args);latestInArgsRef.current=args;latestOutArgsRef.current=args;active.current=false},[handleCallback]);const timerCallback=(0,index_js_.useCallback)(()=>{if(latestInArgsRef.current&&latestInArgsRef.current!==latestOutArgsRef.current){callThrottledCallback(...latestInArgsRef.current);timeoutRef.current=window.setTimeout(timerCallback,waitRef.current)}else active.current=true},[callThrottledCallback]);const throttled=(0,index_js_.useCallback)((...args)=>{if(active.current){callThrottledCallback(...args);timeoutRef.current=window.setTimeout(timerCallback,waitRef.current)}else latestInArgsRef.current=args},[callThrottledCallback,timerCallback]);(0,index_js_.useEffect)(()=>{waitRef.current=wait},[wait]);return[throttled,clearTimeout1]}function useThrottledCallback(callback,wait){return useThrottledCallbackWithClearTimeout(callback,wait)[0]}"use client";function useThrottledState(defaultValue,wait){const[value,setValue]=(0,index_js_.useState)(defaultValue);const[setThrottledValue,clearTimeout1]=useThrottledCallbackWithClearTimeout(setValue,wait);(0,index_js_.useEffect)(()=>clearTimeout1,[]);return[value,setThrottledValue]}"use client";function useThrottledValue(value,wait){const[throttledValue,setThrottledValue]=(0,index_js_.useState)(value);const valueRef=(0,index_js_.useRef)(value);const[throttledSetValue,clearTimeout1]=useThrottledCallbackWithClearTimeout(setThrottledValue,wait);(0,index_js_.useEffect)(()=>{if(value!==valueRef.current){valueRef.current=value;throttledSetValue(value)}},[throttledSetValue,value]);(0,index_js_.useEffect)(()=>clearTimeout1,[]);return throttledValue}"use client";function useIsFirstRender(){const renderRef=(0,index_js_.useRef)(true);if(true===renderRef.current){renderRef.current=false;return true}return renderRef.current}"use client";function use_orientation_getInitialValue(initialValue,getInitialValueInEffect){if(getInitialValueInEffect)return initialValue;if("undefined"!=typeof window&&"screen"in window)return{angle:window.screen.orientation?.angle??initialValue.angle,type:window.screen.orientation?.type??initialValue.type};return initialValue}function useOrientation({defaultAngle=0,defaultType="landscape-primary",getInitialValueInEffect=true}={}){const[orientation,setOrientation]=(0,index_js_.useState)(use_orientation_getInitialValue({angle:defaultAngle,type:defaultType},getInitialValueInEffect));const handleOrientationChange=event=>{const target=event.currentTarget;setOrientation({angle:target?.angle||0,type:target?.type||"landscape-primary"})};useIsomorphicEffect(()=>{window.screen.orientation?.addEventListener("change",handleOrientationChange);return()=>window.screen.orientation?.removeEventListener("change",handleOrientationChange)},[]);return orientation}"use client";function useFetch(url,{autoInvoke=true,...options}={}){const[data,setData]=(0,index_js_.useState)(null);const[loading,setLoading]=(0,index_js_.useState)(false);const[error,setError]=(0,index_js_.useState)(null);const controller=(0,index_js_.useRef)(null);const refetch=(0,index_js_.useCallback)(()=>{if(controller.current)controller.current.abort();controller.current=new AbortController;setLoading(true);return fetch(url,{signal:controller.current.signal,...options}).then(res=>res.json()).then(res=>{setData(res);setLoading(false);return res}).catch(err=>{setLoading(false);if("AbortError"!==err.name)setError(err);return err})},[url]);const abort=(0,index_js_.useCallback)(()=>{if(controller.current)controller.current?.abort("")},[]);(0,index_js_.useEffect)(()=>{if(autoInvoke)refetch();return()=>{if(controller.current)controller.current.abort("")}},[refetch,autoInvoke]);return{data,loading,error,refetch,abort}}"use client";function radiansToDegrees(radians){return 180/Math.PI*radians}function getElementCenter(element){const rect=element.getBoundingClientRect();return[rect.left+rect.width/2,rect.top+rect.height/2]}function getAngle(coordinates,element){const center=getElementCenter(element);const x=coordinates[0]-center[0];const y=coordinates[1]-center[1];const deg=radiansToDegrees(Math.atan2(x,y))+180;return 360-deg}function toFixed(value,digits){return parseFloat(value.toFixed(digits))}function getDigitsAfterDot(value){return value.toString().split(".")[1]?.length||0}function normalizeRadialValue(degree,step){const clamped=clamp(degree,0,360);const high=Math.ceil(clamped/step);const low=Math.round(clamped/step);return toFixed(high>=clamped/step?high*step===360?0:high*step:low*step,getDigitsAfterDot(step))}function useRadialMove(onChange,{step=.01,onChangeEnd,onScrubStart,onScrubEnd}={}){const mounted=(0,index_js_.useRef)(false);const[active,setActive]=(0,index_js_.useState)(false);(0,index_js_.useEffect)(()=>{mounted.current=true},[]);const refCallback=(0,index_js_.useCallback)(node=>{const update=(event,done=false)=>{if(node){node.style.userSelect="none";const deg=getAngle([event.clientX,event.clientY],node);const newValue=normalizeRadialValue(deg,step||1);onChange(newValue);done&&onChangeEnd?.(newValue)}};const beginTracking=()=>{onScrubStart?.();setActive(true);document.addEventListener("mousemove",handleMouseMove,false);document.addEventListener("mouseup",handleMouseUp,false);document.addEventListener("touchmove",handleTouchMove,{passive:false});document.addEventListener("touchend",handleTouchEnd,false)};const endTracking=()=>{onScrubEnd?.();setActive(false);document.removeEventListener("mousemove",handleMouseMove,false);document.removeEventListener("mouseup",handleMouseUp,false);document.removeEventListener("touchmove",handleTouchMove,false);document.removeEventListener("touchend",handleTouchEnd,false)};const onMouseDown=event=>{beginTracking();update(event)};const handleMouseMove=event=>{update(event)};const handleMouseUp=event=>{update(event,true);endTracking()};const handleTouchMove=event=>{event.preventDefault();update(event.touches[0])};const handleTouchEnd=event=>{update(event.changedTouches[0],true);endTracking()};const handleTouchStart=event=>{event.preventDefault();beginTracking();update(event.touches[0])};node?.addEventListener("mousedown",onMouseDown);node?.addEventListener("touchstart",handleTouchStart,{passive:false});return()=>{if(node){node.removeEventListener("mousedown",onMouseDown);node.removeEventListener("touchstart",handleTouchStart)}}},[onChange]);return{ref:refCallback,active}}"use client";function getHeadingsData(headings,getDepth,getValue){const result=[];for(let i=0;i<headings.length;i+=1){const heading=headings[i];result.push({depth:getDepth(heading),value:getValue(heading),id:heading.id||randomId(),getNode:()=>heading.id?document.getElementById(heading.id):heading})}return result}function getActiveElement(rects){if(0===rects.length)return -1;const closest=rects.reduce((acc,item,index)=>{if(Math.abs(acc.position)<Math.abs(item.y))return acc;return{index,position:item.y}},{index:0,position:rects[0].y});return closest.index}function getDefaultDepth(element){return Number(element.tagName[1])}function getDefaultValue(element){return element.textContent||""}function useScrollSpy({selector="h1, h2, h3, h4, h5, h6",getDepth=getDefaultDepth,getValue=getDefaultValue,scrollHost}={}){const[active,setActive]=(0,index_js_.useState)(-1);const[initialized,setInitialized]=(0,index_js_.useState)(false);const[data,setData]=(0,index_js_.useState)([]);const headingsRef=(0,index_js_.useRef)([]);const handleScroll=()=>{setActive(getActiveElement(headingsRef.current.map(d=>d.getNode().getBoundingClientRect())))};const initialize=()=>{const headings=getHeadingsData(Array.from(document.querySelectorAll(selector)),getDepth,getValue);headingsRef.current=headings;setInitialized(true);setData(headings);setActive(getActiveElement(headings.map(d=>d.getNode().getBoundingClientRect())))};(0,index_js_.useEffect)(()=>{initialize();const _scrollHost=scrollHost||window;_scrollHost.addEventListener("scroll",handleScroll);return()=>_scrollHost.removeEventListener("scroll",handleScroll)},[]);return{reinitialize:initialize,active,initialized,data}}"use client";const defaultOptions={multiple:true,accept:"*"};function getInitialFilesList(files){if(!files)return null;if(files instanceof FileList)return files;const result=new DataTransfer;for(const file of files)result.items.add(file);return result.files}function createInput(options){if("undefined"==typeof document)return null;const input=document.createElement("input");input.type="file";if(options.accept)input.accept=options.accept;if(options.multiple)input.multiple=options.multiple;if(options.capture)input.capture=options.capture;if(options.directory)input.webkitdirectory=options.directory;input.style.display="none";return input}function useFileDialog(input={}){const options={...defaultOptions,...input};const[files,setFiles]=(0,index_js_.useState)(getInitialFilesList(options.initialFiles));const inputRef=(0,index_js_.useRef)(null);const handleChange=(0,index_js_.useCallback)(event=>{const target=event.target;if(target?.files){setFiles(target.files);options.onChange?.(target.files)}},[options.onChange]);const createAndSetupInput=(0,index_js_.useCallback)(()=>{inputRef.current?.remove();inputRef.current=createInput(options);if(inputRef.current){inputRef.current.addEventListener("change",handleChange,{once:true});document.body.appendChild(inputRef.current)}},[options,handleChange]);useIsomorphicEffect(()=>{createAndSetupInput();return()=>inputRef.current?.remove()},[]);const reset=(0,index_js_.useCallback)(()=>{setFiles(null);options.onChange?.(null)},[options.onChange]);const open=(0,index_js_.useCallback)(()=>{if(options.resetOnOpen)reset();createAndSetupInput();inputRef.current?.click()},[options.resetOnOpen,reset,createAndSetupInput]);return{files,open,reset}}"use client";function useLongPress(onLongPress,options={}){const{threshold=400,onStart,onFinish,onCancel}=options;const isLongPressActive=(0,index_js_.useRef)(false);const isPressed=(0,index_js_.useRef)(false);const timeout=(0,index_js_.useRef)(-1);(0,index_js_.useEffect)(()=>()=>window.clearTimeout(timeout.current),[]);return(0,index_js_.useMemo)(()=>{if("function"!=typeof onLongPress)return{};const start=event=>{if(!isMouseEvent(event)&&!isTouchEvent(event))return;if(onStart)onStart(event);isPressed.current=true;timeout.current=window.setTimeout(()=>{onLongPress(event);isLongPressActive.current=true},threshold)};const cancel=event=>{if(!isMouseEvent(event)&&!isTouchEvent(event))return;if(isLongPressActive.current){if(onFinish)onFinish(event)}else if(isPressed.current){if(onCancel)onCancel(event)}isLongPressActive.current=false;isPressed.current=false;if(timeout.current)window.clearTimeout(timeout.current)};return{onMouseDown:start,onMouseUp:cancel,onMouseLeave:cancel,onTouchStart:start,onTouchEnd:cancel}},[onLongPress,threshold,onCancel,onFinish,onStart])}function isTouchEvent(event){return window.TouchEvent?event.nativeEvent instanceof TouchEvent:"touches"in event.nativeEvent}function isMouseEvent(event){return event.nativeEvent instanceof MouseEvent}"use client";function useSelection(input){const[selectionSet,setSelectionSet]=(0,index_js_.useState)(new Set(input.defaultSelection||[]));useDidUpdate(()=>{if(input.resetSelectionOnDataChange)setSelectionSet(/* @__PURE__ */new Set)},[input.data,input.resetSelectionOnDataChange]);const select=(0,index_js_.useCallback)(selected=>{setSelectionSet(state=>{if(!state.has(selected)){const newSet=new Set(state);newSet.add(selected);return newSet}return state})},[]);const deselect=(0,index_js_.useCallback)(deselected=>{setSelectionSet(state=>{if(state.has(deselected)){const newSet=new Set(state);newSet.delete(deselected);return newSet}return state})},[]);const toggle=(0,index_js_.useCallback)(toggled=>{setSelectionSet(state=>{const newSet=new Set(state);if(state.has(toggled))newSet.delete(toggled);else newSet.add(toggled);return newSet})},[]);const resetSelection=(0,index_js_.useCallback)(()=>{setSelectionSet(/* @__PURE__ */new Set)},[]);const setSelection=(0,index_js_.useCallback)(selection=>{setSelectionSet(new Set(selection))},[]);const isAllSelected=(0,index_js_.useCallback)(()=>{if(0===input.data.length)return false;return input.data.every(item=>selectionSet.has(item))},[selectionSet,input.data]);const isSomeSelected=(0,index_js_.useCallback)(()=>input.data.some(item=>selectionSet.has(item)),[selectionSet,input.data]);return[Array.from(selectionSet),{select,deselect,toggle,isAllSelected,isSomeSelected,setSelection,resetSelection}]}}}]);
package/dist/mf/548.js ADDED
@@ -0,0 +1,10 @@
1
+ /*! For license information please see 548.js.LICENSE.txt */
2
+ "use strict";(globalThis["chunk_integrations_app"]=globalThis["chunk_integrations_app"]||[]).push([["548"],{631:function(__unused_webpack_module,exports){/**
3
+ * @license React
4
+ * react-jsx-runtime.production.js
5
+ *
6
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
7
+ *
8
+ * This source code is licensed under the MIT license found in the
9
+ * LICENSE file in the root directory of this source tree.
10
+ */var REACT_ELEMENT_TYPE=Symbol.for("react.transitional.element"),REACT_FRAGMENT_TYPE=Symbol.for("react.fragment");function jsxProd(type,config,maybeKey){var key=null;void 0!==maybeKey&&(key=""+maybeKey);void 0!==config.key&&(key=""+config.key);if("key"in config){maybeKey={};for(var propName in config)"key"!==propName&&(maybeKey[propName]=config[propName])}else maybeKey=config;config=maybeKey.ref;return{$$typeof:REACT_ELEMENT_TYPE,type:type,key:key,ref:void 0!==config?config:null,props:maybeKey}}exports.Fragment=REACT_FRAGMENT_TYPE;exports.jsx=jsxProd;exports.jsxs=jsxProd},5893:function(module,__unused_webpack_exports,__webpack_require__){module.exports=__webpack_require__(631)},3308:function(__unused_webpack___webpack_module__,__webpack_exports__,__webpack_require__){__webpack_require__.r(__webpack_exports__);__webpack_require__.d(__webpack_exports__,{updateContextModal:()=>events_updateContextModal,closeAllModals:()=>closeAllModals,updateModal:()=>events_updateModal,ModalsProvider:()=>ModalsProvider,openContextModal:()=>events_openContextModal,openConfirmModal:()=>events_openConfirmModal,closeModal:()=>events_closeModal,modals:()=>events_modals,openModal:()=>events_openModal,useModals:()=>useModals});var jsx_runtime=__webpack_require__(5893);var index_js_=__webpack_require__(9063);var index_mjs_=__webpack_require__(3215);var esm_index_mjs_=__webpack_require__(3828);"use client";const ModalsContext=(0,index_js_.createContext)(null);ModalsContext.displayName="@mantine/modals/ModalsContext";"use client";function useModals(){const ctx=(0,index_js_.useContext)(ModalsContext);if(!ctx)throw new Error("[@mantine/modals] useModals hook was called outside of context, wrap your app with ModalsProvider component");return ctx}"use client";function ConfirmModal({id,cancelProps,confirmProps,labels={cancel:"",confirm:""},closeOnConfirm=true,closeOnCancel=true,groupProps,onCancel,onConfirm,children}){const{cancel:cancelLabel,confirm:confirmLabel}=labels;const ctx=useModals();const handleCancel=event=>{"function"==typeof cancelProps?.onClick&&cancelProps?.onClick(event);"function"==typeof onCancel&&onCancel();closeOnCancel&&ctx.closeModal(id)};const handleConfirm=event=>{"function"==typeof confirmProps?.onClick&&confirmProps?.onClick(event);"function"==typeof onConfirm&&onConfirm();closeOnConfirm&&ctx.closeModal(id)};return/* @__PURE__ */(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[children&&/* @__PURE__ */(0,jsx_runtime.jsx)(index_mjs_.Box,{mb:"md",children}),/* @__PURE__ */(0,jsx_runtime.jsxs)(index_mjs_.Group,{mt:children?0:"md",justify:"flex-end",...groupProps,children:[/* @__PURE__ */(0,jsx_runtime.jsx)(index_mjs_.Button,{variant:"default",...cancelProps,onClick:handleCancel,children:cancelProps?.children||cancelLabel}),/* @__PURE__ */(0,jsx_runtime.jsx)(index_mjs_.Button,{...confirmProps,onClick:handleConfirm,children:confirmProps?.children||confirmLabel})]})]})}"use client";const[useModalsEvents,createEvent]=(0,index_mjs_.createUseExternalEvents)("mantine-modals");const events_openModal=payload=>{const id=payload.modalId||(0,esm_index_mjs_.randomId)();createEvent("openModal")({...payload,modalId:id});return id};const events_openConfirmModal=payload=>{const id=payload.modalId||(0,esm_index_mjs_.randomId)();createEvent("openConfirmModal")({...payload,modalId:id});return id};const events_openContextModal=payload=>{const id=payload.modalId||(0,esm_index_mjs_.randomId)();createEvent("openContextModal")({...payload,modalId:id});return id};const events_closeModal=createEvent("closeModal");const closeAllModals=createEvent("closeAllModals");const events_updateModal=payload=>createEvent("updateModal")(payload);const events_updateContextModal=payload=>createEvent("updateContextModal")(payload);const events_modals={open:events_openModal,close:events_closeModal,closeAll:closeAllModals,openConfirmModal:events_openConfirmModal,openContextModal:events_openContextModal,updateModal:events_updateModal,updateContextModal:events_updateContextModal};"use client";function handleCloseModal(modal,canceled){if(canceled&&"confirm"===modal.type)modal.props.onCancel?.();modal.props.onClose?.()}function modalsReducer(state,action){switch(action.type){case"OPEN":return{current:action.modal,modals:[...state.modals,action.modal]};case"CLOSE":{const modal=state.modals.find(m=>m.id===action.modalId);if(!modal)return state;handleCloseModal(modal,action.canceled);const remainingModals=state.modals.filter(m=>m.id!==action.modalId);return{current:remainingModals[remainingModals.length-1]||state.current,modals:remainingModals}}case"CLOSE_ALL":if(!state.modals.length)return state;state.modals.concat().reverse().forEach(modal=>{handleCloseModal(modal,action.canceled)});return{current:state.current,modals:[]};case"UPDATE":{const{modalId,newProps}=action;const updatedModals=state.modals.map(modal=>{if(modal.id!==modalId)return modal;if("content"===modal.type||"confirm"===modal.type)return{...modal,props:{...modal.props,...newProps}};if("context"===modal.type)return{...modal,props:{...modal.props,...newProps,innerProps:{...modal.props.innerProps,...newProps.innerProps}}};return modal});const currentModal=state.current?.id===modalId?updatedModals.find(modal=>modal.id===modalId)||state.current:state.current;return{...state,modals:updatedModals,current:currentModal}}default:return state}}"use client";function separateConfirmModalProps(props){if(!props)return{confirmProps:{},modalProps:{}};const{id,children,onCancel,onConfirm,closeOnConfirm,closeOnCancel,cancelProps,confirmProps,groupProps,labels,...others}=props;return{confirmProps:{id,children,onCancel,onConfirm,closeOnConfirm,closeOnCancel,cancelProps,confirmProps,groupProps,labels},modalProps:{id,...others}}}function ModalsProvider({children,modalProps,labels,modals}){const[state,dispatch]=(0,index_js_.useReducer)(modalsReducer,{modals:[],current:null});const stateRef=(0,index_js_.useRef)(state);stateRef.current=state;const closeAll=(0,index_js_.useCallback)(canceled=>{dispatch({type:"CLOSE_ALL",canceled})},[stateRef,dispatch]);const openModal=(0,index_js_.useCallback)(({modalId,...props})=>{const id=modalId||(0,esm_index_mjs_.randomId)();dispatch({type:"OPEN",modal:{id,type:"content",props}});return id},[dispatch]);const openConfirmModal=(0,index_js_.useCallback)(({modalId,...props})=>{const id=modalId||(0,esm_index_mjs_.randomId)();dispatch({type:"OPEN",modal:{id,type:"confirm",props}});return id},[dispatch]);const openContextModal=(0,index_js_.useCallback)((modal,{modalId,...props})=>{const id=modalId||(0,esm_index_mjs_.randomId)();dispatch({type:"OPEN",modal:{id,type:"context",props,ctx:modal}});return id},[dispatch]);const closeModal=(0,index_js_.useCallback)((id,canceled)=>{dispatch({type:"CLOSE",modalId:id,canceled})},[stateRef,dispatch]);const updateModal=(0,index_js_.useCallback)(({modalId,...newProps})=>{dispatch({type:"UPDATE",modalId,newProps})},[dispatch]);const updateContextModal=(0,index_js_.useCallback)(({modalId,...newProps})=>{dispatch({type:"UPDATE",modalId,newProps})},[dispatch]);useModalsEvents({openModal,openConfirmModal,openContextModal:({modal,...payload})=>openContextModal(modal,payload),closeModal,closeContextModal:closeModal,closeAllModals:closeAll,updateModal,updateContextModal});const ctx={modalProps:modalProps||{},modals:state.modals,openModal,openConfirmModal,openContextModal,closeModal,closeContextModal:closeModal,closeAll,updateModal,updateContextModal};const getCurrentModal=()=>{const currentModal=stateRef.current.current;switch(currentModal?.type){case"context":{const{innerProps,...rest}=currentModal.props;const ContextModal=modals[currentModal.ctx];return{modalProps:rest,content:/* @__PURE__ */(0,jsx_runtime.jsx)(ContextModal,{innerProps,context:ctx,id:currentModal.id})}}case"confirm":{const{modalProps:separatedModalProps,confirmProps:separatedConfirmProps}=separateConfirmModalProps(currentModal.props);return{modalProps:separatedModalProps,content:/* @__PURE__ */(0,jsx_runtime.jsx)(ConfirmModal,{...separatedConfirmProps,id:currentModal.id,labels:currentModal.props.labels||labels})}}case"content":{const{children:currentModalChildren,...rest}=currentModal.props;return{modalProps:rest,content:currentModalChildren}}default:return{modalProps:{},content:null}}};const{modalProps:currentModalProps,content}=getCurrentModal();return/* @__PURE__ */(0,jsx_runtime.jsxs)(ModalsContext.Provider,{value:ctx,children:[/* @__PURE__ */(0,jsx_runtime.jsx)(index_mjs_.Modal,{zIndex:(0,index_mjs_.getDefaultZIndex)("modal")+1,...modalProps,...currentModalProps,opened:state.modals.length>0,onClose:()=>closeModal(state.current?.id),children:content}),children]})}}}]);
@@ -0,0 +1,9 @@
1
+ /**
2
+ * @license React
3
+ * react-jsx-runtime.production.js
4
+ *
5
+ * Copyright (c) Meta Platforms, Inc. and 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
+ */
package/dist/mf/588.js ADDED
@@ -0,0 +1,10 @@
1
+ /*! For license information please see 588.js.LICENSE.txt */
2
+ "use strict";(globalThis["chunk_integrations_app"]=globalThis["chunk_integrations_app"]||[]).push([["588"],{631:function(__unused_webpack_module,exports){/**
3
+ * @license React
4
+ * react-jsx-runtime.production.js
5
+ *
6
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
7
+ *
8
+ * This source code is licensed under the MIT license found in the
9
+ * LICENSE file in the root directory of this source tree.
10
+ */var REACT_ELEMENT_TYPE=Symbol.for("react.transitional.element"),REACT_FRAGMENT_TYPE=Symbol.for("react.fragment");function jsxProd(type,config,maybeKey){var key=null;void 0!==maybeKey&&(key=""+maybeKey);void 0!==config.key&&(key=""+config.key);if("key"in config){maybeKey={};for(var propName in config)"key"!==propName&&(maybeKey[propName]=config[propName])}else maybeKey=config;config=maybeKey.ref;return{$$typeof:REACT_ELEMENT_TYPE,type:type,key:key,ref:void 0!==config?config:null,props:maybeKey}}exports.Fragment=REACT_FRAGMENT_TYPE;exports.jsx=jsxProd;exports.jsxs=jsxProd},5893:function(module,__unused_webpack_exports,__webpack_require__){module.exports=__webpack_require__(631)}}]);
@@ -0,0 +1,9 @@
1
+ /**
2
+ * @license React
3
+ * react-jsx-runtime.production.js
4
+ *
5
+ * Copyright (c) Meta Platforms, Inc. and 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
+ */
package/dist/mf/622.js ADDED
@@ -0,0 +1,10 @@
1
+ /*! For license information please see 622.js.LICENSE.txt */
2
+ "use strict";(globalThis["chunk_integrations_app"]=globalThis["chunk_integrations_app"]||[]).push([["622"],{7015:function(__unused_webpack_module,exports,__webpack_require__){/**
3
+ * @license React
4
+ * react-dom.production.js
5
+ *
6
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
7
+ *
8
+ * This source code is licensed under the MIT license found in the
9
+ * LICENSE file in the root directory of this source tree.
10
+ */var React=__webpack_require__(9063);function formatProdErrorMessage(code){var url="https://react.dev/errors/"+code;if(1<arguments.length){url+="?args[]="+encodeURIComponent(arguments[1]);for(var i=2;i<arguments.length;i++)url+="&args[]="+encodeURIComponent(arguments[i])}return"Minified React error #"+code+"; visit "+url+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function noop(){}var Internals={d:{f:noop,r:function(){throw Error(formatProdErrorMessage(522))},D:noop,C:noop,L:noop,m:noop,X:noop,S:noop,M:noop},p:0,findDOMNode:null},REACT_PORTAL_TYPE=Symbol.for("react.portal");function createPortal$1(children,containerInfo,implementation){var key=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:REACT_PORTAL_TYPE,key:null==key?null:""+key,children:children,containerInfo:containerInfo,implementation:implementation}}var ReactSharedInternals=React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function getCrossOriginStringAs(as,input){if("font"===as)return"";if("string"==typeof input)return"use-credentials"===input?input:""}exports.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Internals;exports.createPortal=function(children,container){var key=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!container||1!==container.nodeType&&9!==container.nodeType&&11!==container.nodeType)throw Error(formatProdErrorMessage(299));return createPortal$1(children,container,null,key)};exports.flushSync=function(fn){var previousTransition=ReactSharedInternals.T,previousUpdatePriority=Internals.p;try{if(ReactSharedInternals.T=null,Internals.p=2,fn)return fn()}finally{ReactSharedInternals.T=previousTransition,Internals.p=previousUpdatePriority,Internals.d.f()}};exports.preconnect=function(href,options){"string"==typeof href&&(options?(options=options.crossOrigin,options="string"==typeof options?"use-credentials"===options?options:"":void 0):options=null,Internals.d.C(href,options))};exports.prefetchDNS=function(href){"string"==typeof href&&Internals.d.D(href)};exports.preinit=function(href,options){if("string"==typeof href&&options&&"string"==typeof options.as){var as=options.as,crossOrigin=getCrossOriginStringAs(as,options.crossOrigin),integrity="string"==typeof options.integrity?options.integrity:void 0,fetchPriority="string"==typeof options.fetchPriority?options.fetchPriority:void 0;"style"===as?Internals.d.S(href,"string"==typeof options.precedence?options.precedence:void 0,{crossOrigin:crossOrigin,integrity:integrity,fetchPriority:fetchPriority}):"script"===as&&Internals.d.X(href,{crossOrigin:crossOrigin,integrity:integrity,fetchPriority:fetchPriority,nonce:"string"==typeof options.nonce?options.nonce:void 0})}};exports.preinitModule=function(href,options){if("string"==typeof href)if("object"==typeof options&&null!==options){if(null==options.as||"script"===options.as){var crossOrigin=getCrossOriginStringAs(options.as,options.crossOrigin);Internals.d.M(href,{crossOrigin:crossOrigin,integrity:"string"==typeof options.integrity?options.integrity:void 0,nonce:"string"==typeof options.nonce?options.nonce:void 0})}}else null==options&&Internals.d.M(href)};exports.preload=function(href,options){if("string"==typeof href&&"object"==typeof options&&null!==options&&"string"==typeof options.as){var as=options.as,crossOrigin=getCrossOriginStringAs(as,options.crossOrigin);Internals.d.L(href,as,{crossOrigin:crossOrigin,integrity:"string"==typeof options.integrity?options.integrity:void 0,nonce:"string"==typeof options.nonce?options.nonce:void 0,type:"string"==typeof options.type?options.type:void 0,fetchPriority:"string"==typeof options.fetchPriority?options.fetchPriority:void 0,referrerPolicy:"string"==typeof options.referrerPolicy?options.referrerPolicy:void 0,imageSrcSet:"string"==typeof options.imageSrcSet?options.imageSrcSet:void 0,imageSizes:"string"==typeof options.imageSizes?options.imageSizes:void 0,media:"string"==typeof options.media?options.media:void 0})}};exports.preloadModule=function(href,options){if("string"==typeof href)if(options){var crossOrigin=getCrossOriginStringAs(options.as,options.crossOrigin);Internals.d.m(href,{as:"string"==typeof options.as&&"script"!==options.as?options.as:void 0,crossOrigin:crossOrigin,integrity:"string"==typeof options.integrity?options.integrity:void 0})}else Internals.d.m(href)};exports.requestFormReset=function(form){Internals.d.r(form)};exports.unstable_batchedUpdates=function(fn,a){return fn(a)};exports.useFormState=function(action,initialState,permalink){return ReactSharedInternals.H.useFormState(action,initialState,permalink)};exports.useFormStatus=function(){return ReactSharedInternals.H.useHostTransitionStatus()};exports.version="19.1.1"},5970:function(module,__unused_webpack_exports,__webpack_require__){function checkDCE(){if("undefined"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__||"function"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)return;try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(checkDCE)}catch(err){console.error(err)}}checkDCE();module.exports=__webpack_require__(7015)}}]);
@@ -0,0 +1,9 @@
1
+ /**
2
+ * @license React
3
+ * react-dom.production.js
4
+ *
5
+ * Copyright (c) Meta Platforms, Inc. and 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
+ */