@jenesei-software/jenesei-kit-react 1.3.9 → 1.3.10

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 (260) hide show
  1. package/build/{area-Dnq78ow6.js → area-BYuHpaUX.js} +2 -2
  2. package/build/{area-Dnq78ow6.js.map → area-BYuHpaUX.js.map} +1 -1
  3. package/build/{area-DnAf310m.cjs → area-C6XuN6wk.cjs} +2 -2
  4. package/build/{area-DnAf310m.cjs.map → area-C6XuN6wk.cjs.map} +1 -1
  5. package/build/{area-CFZW3T1g.js → area-CkM4ZN2F.js} +2 -2
  6. package/build/{area-CFZW3T1g.js.map → area-CkM4ZN2F.js.map} +1 -1
  7. package/build/{area-C3wR_pPr.cjs → area-oZm7ewxw.cjs} +2 -2
  8. package/build/{area-C3wR_pPr.cjs.map → area-oZm7ewxw.cjs.map} +1 -1
  9. package/build/area-preview.cjs.js +1 -1
  10. package/build/area-preview.es.js +1 -1
  11. package/build/area-skeleton.cjs.js +1 -1
  12. package/build/area-skeleton.es.js +1 -1
  13. package/build/build-info.txt +3 -3
  14. package/build/component--jGdo2yq.cjs +2 -0
  15. package/build/component--jGdo2yq.cjs.map +1 -0
  16. package/build/component-B1bvPlyB.cjs +90 -0
  17. package/build/component-B1bvPlyB.cjs.map +1 -0
  18. package/build/{component-DHq4T6Ku.cjs → component-BYox4gmt.cjs} +2 -2
  19. package/build/{component-DHq4T6Ku.cjs.map → component-BYox4gmt.cjs.map} +1 -1
  20. package/build/component-C67KboOB.cjs +245 -0
  21. package/build/component-C67KboOB.cjs.map +1 -0
  22. package/build/{component-BiNPQpCQ.cjs → component-CY7lfJVv.cjs} +2 -2
  23. package/build/{component-BiNPQpCQ.cjs.map → component-CY7lfJVv.cjs.map} +1 -1
  24. package/build/{component-DfxlJBGv.js → component-CvW0MIM8.js} +3 -3
  25. package/build/{component-DfxlJBGv.js.map → component-CvW0MIM8.js.map} +1 -1
  26. package/build/{component-C4ULY0c6.js → component-DJYgewYg.js} +20 -9
  27. package/build/component-DJYgewYg.js.map +1 -0
  28. package/build/component-DKMsOpqH.js +710 -0
  29. package/build/component-DKMsOpqH.js.map +1 -0
  30. package/build/{component-Bzw_uobM.js → component-DaXKDHnc.js} +48 -7
  31. package/build/component-DaXKDHnc.js.map +1 -0
  32. package/build/{component-CQ8fy2gK.js → component-WUYE2soZ.js} +2 -2
  33. package/build/{component-CQ8fy2gK.js.map → component-WUYE2soZ.js.map} +1 -1
  34. package/build/component-accordion.cjs.js +1 -1
  35. package/build/component-accordion.es.js +1 -1
  36. package/build/component-button-group.cjs.js +1 -1
  37. package/build/component-button-group.d.ts +18 -1
  38. package/build/component-button-group.es.js +1 -1
  39. package/build/component-button.cjs.js +1 -1
  40. package/build/component-button.d.ts +21 -2
  41. package/build/component-button.es.js +1 -1
  42. package/build/component-checkbox-group.cjs.js +1 -1
  43. package/build/component-checkbox-group.d.ts +20 -3
  44. package/build/component-checkbox-group.es.js +1 -1
  45. package/build/component-checkbox.cjs.js +1 -1
  46. package/build/component-checkbox.d.ts +21 -2
  47. package/build/component-checkbox.es.js +1 -1
  48. package/build/component-date-picker.cjs.js +1 -1
  49. package/build/component-date-picker.d.ts +35 -37
  50. package/build/component-date-picker.es.js +1 -1
  51. package/build/component-icon.cjs.js +1 -1
  52. package/build/component-icon.es.js +1 -1
  53. package/build/component-image-button.cjs.js +1 -1
  54. package/build/component-image-button.d.ts +18 -1
  55. package/build/component-image-button.es.js +1 -1
  56. package/build/component-image-select.cjs.js +1 -1
  57. package/build/component-image-select.d.ts +18 -1
  58. package/build/component-image-select.es.js +1 -1
  59. package/build/component-image-slider.cjs.js +1 -1
  60. package/build/component-image-slider.es.js +1 -1
  61. package/build/component-image.cjs.js +1 -1
  62. package/build/component-image.es.js +1 -1
  63. package/build/component-input-otp.cjs.js +1 -1
  64. package/build/component-input-otp.d.ts +51 -5
  65. package/build/component-input-otp.es.js +1 -1
  66. package/build/component-input.cjs.js +1 -1
  67. package/build/component-input.d.ts +62 -14
  68. package/build/component-input.es.js +2 -2
  69. package/build/component-map.cjs.js +1 -1
  70. package/build/component-map.es.js +1 -1
  71. package/build/component-pagination.cjs.js +1 -1
  72. package/build/component-pagination.d.ts +18 -1
  73. package/build/component-pagination.es.js +1 -1
  74. package/build/component-range.cjs.js +1 -1
  75. package/build/component-range.d.ts +50 -4
  76. package/build/component-range.es.js +1 -1
  77. package/build/component-select.cjs.js +1 -1
  78. package/build/component-select.d.ts +48 -7
  79. package/build/component-select.es.js +1 -1
  80. package/build/component-textarea.cjs.js +1 -1
  81. package/build/component-textarea.d.ts +50 -7
  82. package/build/component-textarea.es.js +1 -1
  83. package/build/component-toggle.cjs.js +1 -1
  84. package/build/component-toggle.d.ts +51 -2
  85. package/build/component-toggle.es.js +1 -1
  86. package/build/component-tooltip.cjs.js +1 -1
  87. package/build/component-tooltip.d.ts +14 -2
  88. package/build/component-tooltip.es.js +1 -1
  89. package/build/component-typography.cjs.js +1 -1
  90. package/build/component-typography.d.ts +27 -13
  91. package/build/component-typography.es.js +7 -6
  92. package/build/component-typography.es.js.map +1 -1
  93. package/build/{component.components-H_qAeBHw.cjs → component.components-CeKyOsDE.cjs} +2 -2
  94. package/build/{component.components-H_qAeBHw.cjs.map → component.components-CeKyOsDE.cjs.map} +1 -1
  95. package/build/{component.components-DX0DVix5.js → component.components-f-tFdB6f.js} +4 -4
  96. package/build/{component.components-DX0DVix5.js.map → component.components-f-tFdB6f.js.map} +1 -1
  97. package/build/{component.constants-veAUxKBd.cjs → component.constants-B9xzGc3A.cjs} +2 -2
  98. package/build/{component.constants-veAUxKBd.cjs.map → component.constants-B9xzGc3A.cjs.map} +1 -1
  99. package/build/{component.constants-DjYLZpyY.js → component.constants-BrJrCmlA.js} +2 -2
  100. package/build/{component.constants-DjYLZpyY.js.map → component.constants-BrJrCmlA.js.map} +1 -1
  101. package/build/{component.constants-DwRduxMm.cjs → component.constants-DRPyaSU8.cjs} +3 -3
  102. package/build/{component.constants-DwRduxMm.cjs.map → component.constants-DRPyaSU8.cjs.map} +1 -1
  103. package/build/{component.constants-C7DGbAC8.js → component.constants-amkB3VHg.js} +7 -7
  104. package/build/{component.constants-C7DGbAC8.js.map → component.constants-amkB3VHg.js.map} +1 -1
  105. package/build/component.functions-D9ffjEok.cjs +8 -0
  106. package/build/component.functions-D9ffjEok.cjs.map +1 -0
  107. package/build/component.functions-DNW6h8kk.js +12 -0
  108. package/build/component.functions-DNW6h8kk.js.map +1 -0
  109. package/build/{component.styles-5CVyEjEh.js → component.styles--PEjCgcA.js} +51 -23
  110. package/build/component.styles--PEjCgcA.js.map +1 -0
  111. package/build/{component.styles-C3hYZJGh.js → component.styles-B0FFHGeN.js} +26 -20
  112. package/build/component.styles-B0FFHGeN.js.map +1 -0
  113. package/build/{component.styles-C1p3V7H6.js → component.styles-BDKsgd6y.js} +32 -19
  114. package/build/component.styles-BDKsgd6y.js.map +1 -0
  115. package/build/{component.styles-Cje8zTpf.cjs → component.styles-BELwxHxh.cjs} +7 -7
  116. package/build/component.styles-BELwxHxh.cjs.map +1 -0
  117. package/build/{component.styles-DpgkACgI.js → component.styles-BGYbrzvh.js} +2 -2
  118. package/build/{component.styles-DpgkACgI.js.map → component.styles-BGYbrzvh.js.map} +1 -1
  119. package/build/{component.styles-DSle6iuF.cjs → component.styles-BKnUDWqO.cjs} +2 -2
  120. package/build/{component.styles-DSle6iuF.cjs.map → component.styles-BKnUDWqO.cjs.map} +1 -1
  121. package/build/{component.styles-DLU0S0KI.cjs → component.styles-BTsmbWT6.cjs} +2 -2
  122. package/build/{component.styles-DLU0S0KI.cjs.map → component.styles-BTsmbWT6.cjs.map} +1 -1
  123. package/build/{component.styles-DYS_AJ9F.js → component.styles-BbwS_Ekx.js} +9 -10
  124. package/build/{component.styles-DYS_AJ9F.js.map → component.styles-BbwS_Ekx.js.map} +1 -1
  125. package/build/component.styles-BeRVOt5T.cjs +137 -0
  126. package/build/{component.styles-Crx4pACx.cjs.map → component.styles-BeRVOt5T.cjs.map} +1 -1
  127. package/build/component.styles-BpvpyZax.cjs +73 -0
  128. package/build/component.styles-BpvpyZax.cjs.map +1 -0
  129. package/build/{component.styles-BirbSbuD.js → component.styles-CPWNnqqm.js} +3 -3
  130. package/build/{component.styles-BirbSbuD.js.map → component.styles-CPWNnqqm.js.map} +1 -1
  131. package/build/component.styles-CsB9986a.cjs +99 -0
  132. package/build/component.styles-CsB9986a.cjs.map +1 -0
  133. package/build/{component.styles-5Xz_H-fR.js → component.styles-DARNjy9P.js} +32 -11
  134. package/build/component.styles-DARNjy9P.js.map +1 -0
  135. package/build/{component.styles-CggIUAVx.js → component.styles-DOnQEUrI.js} +20 -9
  136. package/build/{component.styles-CggIUAVx.js.map → component.styles-DOnQEUrI.js.map} +1 -1
  137. package/build/{component.styles-Bm3Ec-Kd.js → component.styles-DS0ofW1Y.js} +3 -3
  138. package/build/{component.styles-Bm3Ec-Kd.js.map → component.styles-DS0ofW1Y.js.map} +1 -1
  139. package/build/component.styles-DWGUgUoF.cjs +21 -0
  140. package/build/component.styles-DWGUgUoF.cjs.map +1 -0
  141. package/build/{component.styles-DX_3POUD.js → component.styles-DjoG6jr2.js} +3 -3
  142. package/build/{component.styles-DX_3POUD.js.map → component.styles-DjoG6jr2.js.map} +1 -1
  143. package/build/{component.styles-Bfhg18CX.cjs → component.styles-Dpo373cZ.cjs} +2 -2
  144. package/build/{component.styles-Bfhg18CX.cjs.map → component.styles-Dpo373cZ.cjs.map} +1 -1
  145. package/build/{component.styles-v0YYECwW.js → component.styles-VrNFgg1_.js} +32 -12
  146. package/build/component.styles-VrNFgg1_.js.map +1 -0
  147. package/build/{component.styles-DhAMCZ71.cjs → component.styles-ZU_GyVub.cjs} +2 -2
  148. package/build/{component.styles-DhAMCZ71.cjs.map → component.styles-ZU_GyVub.cjs.map} +1 -1
  149. package/build/component.styles-gZHy-64x.cjs +13 -0
  150. package/build/component.styles-gZHy-64x.cjs.map +1 -0
  151. package/build/{component.styles--Ug3PJQ6.cjs → component.styles-iHE8mmya.cjs} +7 -7
  152. package/build/{component.styles--Ug3PJQ6.cjs.map → component.styles-iHE8mmya.cjs.map} +1 -1
  153. package/build/component.styles-mhkAuWyU.cjs +225 -0
  154. package/build/component.styles-mhkAuWyU.cjs.map +1 -0
  155. package/build/component.styles-nl99kkS3.js +94 -0
  156. package/build/component.styles-nl99kkS3.js.map +1 -0
  157. package/build/{component.types-BzBjcohg.js → component.types-CSnoBg2y.js} +94 -67
  158. package/build/component.types-CSnoBg2y.js.map +1 -0
  159. package/build/component.types-CWp0NPUN.cjs +171 -0
  160. package/build/component.types-CWp0NPUN.cjs.map +1 -0
  161. package/build/context-app.cjs.js +1 -1
  162. package/build/context-app.es.js +1 -1
  163. package/build/context-dialog.cjs.js +1 -1
  164. package/build/context-dialog.d.ts +11 -4
  165. package/build/context-dialog.es.js +1 -1
  166. package/build/context-sonner.cjs.js +1 -1
  167. package/build/context-sonner.d.ts +42 -7
  168. package/build/context-sonner.es.js +1 -1
  169. package/build/context.constants-ByXsACU7.cjs +32 -0
  170. package/build/context.constants-ByXsACU7.cjs.map +1 -0
  171. package/build/context.constants-CTr1U0kI.cjs +98 -0
  172. package/build/context.constants-CTr1U0kI.cjs.map +1 -0
  173. package/build/{context.constants-B9Yk6CGe.js → context.constants-CvkvB0XC.js} +8 -5
  174. package/build/context.constants-CvkvB0XC.js.map +1 -0
  175. package/build/{context.constants-Bz_5itIx.js → context.constants-DRimaVcG.js} +26 -9
  176. package/build/context.constants-DRimaVcG.js.map +1 -0
  177. package/build/{context.hooks-BDEwJHqB.cjs → context.hooks-DOygH-Yj.cjs} +3 -3
  178. package/build/{context.hooks-BDEwJHqB.cjs.map → context.hooks-DOygH-Yj.cjs.map} +1 -1
  179. package/build/{context.hooks-DTdppyho.js → context.hooks-kga1DMrX.js} +4 -4
  180. package/build/{context.hooks-DTdppyho.js.map → context.hooks-kga1DMrX.js.map} +1 -1
  181. package/build/floating-ui.react--v70Xky9.cjs +2 -0
  182. package/build/floating-ui.react--v70Xky9.cjs.map +1 -0
  183. package/build/{component-BoHvC24Q.js → floating-ui.react-Byi6bLb1.js} +17 -704
  184. package/build/floating-ui.react-Byi6bLb1.js.map +1 -0
  185. package/build/index.cjs.js +1 -1
  186. package/build/index.d.ts +83 -89
  187. package/build/index.es.js +55 -53
  188. package/build/index.es.js.map +1 -1
  189. package/build/style-D3Lbn1EL.cjs +32 -0
  190. package/build/style-D3Lbn1EL.cjs.map +1 -0
  191. package/build/{style-mc2ST5fY.cjs → style-Df37KnoJ.cjs} +47 -18
  192. package/build/style-Df37KnoJ.cjs.map +1 -0
  193. package/build/{style-BgcnmVAY.js → style-RL73t3JD.js} +63 -20
  194. package/build/style-RL73t3JD.js.map +1 -0
  195. package/build/style-add.cjs.js +1 -1
  196. package/build/style-add.d.ts +57 -5
  197. package/build/style-add.es.js +11 -10
  198. package/build/style-error.cjs.js +1 -1
  199. package/build/style-error.d.ts +42 -1
  200. package/build/style-error.es.js +1 -1
  201. package/build/style-fRZ6xrVp.cjs.map +1 -1
  202. package/build/style-plT9Ah7t.js.map +1 -1
  203. package/build/style-theme.cjs.js +1 -1
  204. package/build/style-theme.d.ts +2 -2
  205. package/build/style-theme.es.js +1 -1
  206. package/build/{style-BQ653xOS.js → style-uVTmdhsH.js} +14 -5
  207. package/build/style-uVTmdhsH.js.map +1 -0
  208. package/build/{theme.global-CFUz5Asg.js → theme.global-BgERDJ4e.js} +36 -1
  209. package/build/theme.global-BgERDJ4e.js.map +1 -0
  210. package/build/{theme.global-B9t2Fi10.cjs → theme.global-CcoD5bPP.cjs} +2 -2
  211. package/build/theme.global-CcoD5bPP.cjs.map +1 -0
  212. package/build/{use-DTZ8c8_g.js → use-DLVWi2kS.js} +6 -6
  213. package/build/{use-DTZ8c8_g.js.map → use-DLVWi2kS.js.map} +1 -1
  214. package/build/{use-D7IsSb34.cjs → use-Dg449cuf.cjs} +2 -2
  215. package/build/{use-D7IsSb34.cjs.map → use-Dg449cuf.cjs.map} +1 -1
  216. package/package.json +1 -1
  217. package/build/component-BoHvC24Q.js.map +0 -1
  218. package/build/component-Bzw_uobM.js.map +0 -1
  219. package/build/component-C4ULY0c6.js.map +0 -1
  220. package/build/component-CACoGUK9.cjs +0 -251
  221. package/build/component-CACoGUK9.cjs.map +0 -1
  222. package/build/component-Dn-VRY7-.cjs +0 -2
  223. package/build/component-Dn-VRY7-.cjs.map +0 -1
  224. package/build/component-u_42PteJ.cjs +0 -90
  225. package/build/component-u_42PteJ.cjs.map +0 -1
  226. package/build/component.styles-5CVyEjEh.js.map +0 -1
  227. package/build/component.styles-5Xz_H-fR.js.map +0 -1
  228. package/build/component.styles-8tkaznu_.cjs +0 -21
  229. package/build/component.styles-8tkaznu_.cjs.map +0 -1
  230. package/build/component.styles-BuzZQhqS.cjs +0 -73
  231. package/build/component.styles-BuzZQhqS.cjs.map +0 -1
  232. package/build/component.styles-C1p3V7H6.js.map +0 -1
  233. package/build/component.styles-C3hYZJGh.js.map +0 -1
  234. package/build/component.styles-CISd4naT.cjs +0 -13
  235. package/build/component.styles-CISd4naT.cjs.map +0 -1
  236. package/build/component.styles-Cje8zTpf.cjs.map +0 -1
  237. package/build/component.styles-CpFA5YrM.js +0 -71
  238. package/build/component.styles-CpFA5YrM.js.map +0 -1
  239. package/build/component.styles-Crx4pACx.cjs +0 -137
  240. package/build/component.styles-Db3HLiuV.cjs +0 -99
  241. package/build/component.styles-Db3HLiuV.cjs.map +0 -1
  242. package/build/component.styles-o7GmI4Ap.cjs +0 -225
  243. package/build/component.styles-o7GmI4Ap.cjs.map +0 -1
  244. package/build/component.styles-v0YYECwW.js.map +0 -1
  245. package/build/component.types-BzBjcohg.js.map +0 -1
  246. package/build/component.types-ydMLhabS.cjs +0 -174
  247. package/build/component.types-ydMLhabS.cjs.map +0 -1
  248. package/build/context.constants-B9Yk6CGe.js.map +0 -1
  249. package/build/context.constants-Bz_5itIx.js.map +0 -1
  250. package/build/context.constants-CTfUKury.cjs +0 -32
  251. package/build/context.constants-CTfUKury.cjs.map +0 -1
  252. package/build/context.constants-CV8ycctl.cjs +0 -100
  253. package/build/context.constants-CV8ycctl.cjs.map +0 -1
  254. package/build/style-B5u4pW5G.cjs +0 -32
  255. package/build/style-B5u4pW5G.cjs.map +0 -1
  256. package/build/style-BQ653xOS.js.map +0 -1
  257. package/build/style-BgcnmVAY.js.map +0 -1
  258. package/build/style-mc2ST5fY.cjs.map +0 -1
  259. package/build/theme.global-B9t2Fi10.cjs.map +0 -1
  260. package/build/theme.global-CFUz5Asg.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"context.hooks-BDEwJHqB.cjs","sources":["../src/contexts/context-app/context.tsx","../src/contexts/context-app/context.styles.ts","../src/contexts/context-app/context.hooks.ts"],"sourcesContent":["import { Preview, PreviewAdditionalProps } from '@local/areas/preview'\nimport { IThemePaletteKeys, JeneseiPalette } from '@local/theme'\n\nimport { createContext, FC, useCallback, useEffect, useState } from 'react'\n\nimport { useScreenWidth } from '../context-screen-width'\nimport {\n AppContextProps,\n ProviderAppOutlet,\n ProviderAppOutletChildren,\n ProviderAppOutletFooter,\n ProviderAppOutletHeader,\n ProviderAppOutletLeftAside,\n ProviderAppOutletNav,\n ProviderAppOutletNotification,\n ProviderAppOutletRightAside,\n ProviderAppProps,\n ProviderAppWrapper\n} from '.'\n\nexport const AppContext = createContext<AppContextProps | null>(null)\n\n/**\n * ProviderApp component is a context context that manages various application-level states\n * such as background color, status bar color, background image, title, and description.\n * It uses several custom hooks to handle these states and provides them via the AppContext.\n *\n * @component\n *\n * @param {ProviderAppProps} props - The properties passed to the ProviderApp component.\n * @param {string} props.defaultBgColor - The default background color.\n * @param {string} props.defaultStatusBarColor - The default status bar color.\n * @param {string} [props.defaultBgImage] - The default background image.\n * @param {string} [props.defaultTitle] - The default title.\n * @param {string} [props.defaultDescription] - The default description.\n * @param {boolean} [props.isScrollOutlet] - Determines if the outlet should be scrollable.\n * @param {object} [props.footer] - The footer component and its properties.\n * @param {object} [props.notification] - The notification component and its properties.\n * @param {object} [props.header] - The header component and its properties.\n * @param {object} [props.nav] - The navigation component and its properties.\n * @param {object} [props.leftAside] - The left aside component and its properties.\n * @param {object} [props.rightAside] - The right aside component and its properties.\n * @param {React.ReactNode} props.children - The children components to be rendered inside the ProviderApp.\n *\n * @returns {JSX.Element} The rendered ProviderApp component.\n */\nexport const ProviderApp: FC<ProviderAppProps> = props => {\n const { bgColor, changeBgColor, historyBgColor, setDefaultBgColor } = useBgColor(props.defaultBgColor)\n const { statusBarColor, changeStatusBarColor, historyStatusBarColor, setDefaultStatusBarColor } = useStatusBarColor(\n props.defaultStatusBarColor\n )\n const { bgImage, changeBgImage, historyBgImage, setDefaultBgImage } = useBgImage(props.defaultBgImage || null)\n const { title, changeTitle, setHistoryTitle, setDefaultTitle } = useTitle(props.defaultTitle || null)\n const { description, changeDescription, historyDescription, setDefaultDescription } = useDescription(\n props.defaultDescription\n )\n const { changePreview, previewProps } = usePreview(props.defaultPreview)\n const { screenActual } = useScreenWidth()\n\n return (\n <AppContext.Provider\n value={{\n changePreview,\n changeStatusBarColor,\n changeBgColor,\n changeBgImage,\n changeTitle,\n changeDescription,\n historyStatusBarColor,\n historyBgColor,\n historyBgImage,\n setHistoryTitle,\n historyDescription,\n setDefaultStatusBarColor,\n setDefaultBgColor,\n setDefaultBgImage,\n setDefaultTitle,\n setDefaultDescription\n }}\n >\n <title>{title}</title>\n <meta name=\"description\" content={description} />\n <meta name=\"theme-color\" content={JeneseiPalette[statusBarColor]} />\n <meta name=\"apple-mobile-web-app-status-bar-style\" content=\"default\" />\n <meta name=\"mobile-web-app-capable\" content=\"yes\" />\n <Preview {...previewProps}>\n <ProviderAppWrapper $bgColor={bgColor} $bgImage={bgImage}>\n <ProviderAppOutlet\n $isScrollOutlet={props.isScrollOutlet}\n $footer={props.footer}\n $notification={props.notification}\n $header={props.header}\n $nav={props.nav}\n $leftAside={props.leftAside}\n $rightAside={props.rightAside}\n >\n {props.notification?.length && props.notification?.length?.[screenActual] ? (\n <ProviderAppOutletNotification $notification={props.notification}>\n {props.notification?.component || null}\n </ProviderAppOutletNotification>\n ) : null}\n\n {props.header?.length && props.header?.length?.[screenActual] ? (\n <ProviderAppOutletHeader $header={props.header}>\n {props.header?.component || null}\n </ProviderAppOutletHeader>\n ) : null}\n\n {props.nav?.length && props.nav?.length?.[screenActual] ? (\n <ProviderAppOutletNav $nav={props.nav}>{props.nav?.component || null}</ProviderAppOutletNav>\n ) : null}\n\n {props.leftAside?.length && props.leftAside?.length?.[screenActual] ? (\n <ProviderAppOutletLeftAside $leftAside={props.leftAside}>\n {props.leftAside?.component || null}\n </ProviderAppOutletLeftAside>\n ) : null}\n\n <ProviderAppOutletChildren $isScrollOutlet={props.isScrollOutlet} $main={props.main}>{props.children}</ProviderAppOutletChildren>\n\n {props.rightAside?.length && props.rightAside?.length?.[screenActual] ? (\n <ProviderAppOutletRightAside $rightAside={props.rightAside}>\n {props.rightAside?.component || null}\n </ProviderAppOutletRightAside>\n ) : null}\n\n {props.footer?.length && props.footer?.length?.[screenActual] ? (\n <ProviderAppOutletFooter $footer={props.footer}>\n {props.footer?.component || null}\n </ProviderAppOutletFooter>\n ) : null}\n </ProviderAppOutlet>\n </ProviderAppWrapper>\n </Preview>\n </AppContext.Provider>\n )\n}\n\n/**\n * Custom hook to manage preview properties.\n */\nconst usePreview = (defaultPreview: ProviderAppProps['defaultPreview']) => {\n const [previewProps, setPreviewProps] = useState(defaultPreview || { visible: true, defaultVisible: true })\n\n const changePreview = useCallback((newPreviewProps: PreviewAdditionalProps) => {\n setPreviewProps(newPreviewProps)\n }, [])\n\n useEffect(() => {\n if (defaultPreview) setPreviewProps(defaultPreview)\n }, [defaultPreview])\n\n return { previewProps, changePreview }\n}\n\n/**\n * Custom hook to manage background color state with history tracking.\n */\ntype BgColorState = {\n bgColor: IThemePaletteKeys\n bgColorHistory: IThemePaletteKeys[]\n bgColorIndex: number\n}\n\nexport const useBgColor = (defaultColor: IThemePaletteKeys) => {\n const [state, setState] = useState<BgColorState>({\n bgColor: defaultColor,\n bgColorHistory: [defaultColor],\n bgColorIndex: 0\n })\n\n const changeBgColor = useCallback((color: IThemePaletteKeys) => {\n setState(prev => {\n const newHistory = [...prev.bgColorHistory.slice(0, prev.bgColorIndex + 1), color]\n return {\n bgColor: color,\n bgColorHistory: newHistory,\n bgColorIndex: newHistory.length - 1\n }\n })\n }, [])\n\n const historyBgColor = useCallback((steps: number) => {\n setState(prev => {\n const newIndex = prev.bgColorIndex + steps\n if (newIndex >= 0 && newIndex < prev.bgColorHistory.length) {\n return {\n ...prev,\n bgColor: prev.bgColorHistory[newIndex],\n bgColorIndex: newIndex\n }\n }\n return prev\n })\n }, [])\n\n const setDefaultBgColor = useCallback(() => {\n setState({\n bgColor: defaultColor,\n bgColorHistory: [defaultColor],\n bgColorIndex: 0\n })\n }, [defaultColor])\n\n useEffect(() => {\n setState({\n bgColor: defaultColor,\n bgColorHistory: [defaultColor],\n bgColorIndex: 0\n })\n }, [defaultColor])\n\n return {\n bgColor: state.bgColor,\n changeBgColor,\n historyBgColor,\n setDefaultBgColor,\n bgColorIndex: state.bgColorIndex\n }\n}\n\n/**\n * Custom hook to manage the status bar color with history tracking.\n */\ntype StatusBarColorState = {\n statusBarColor: IThemePaletteKeys\n statusBarColorHistory: IThemePaletteKeys[]\n statusBarColorIndex: number\n}\n\nexport const useStatusBarColor = (defaultColor: IThemePaletteKeys) => {\n const [state, setState] = useState<StatusBarColorState>({\n statusBarColor: defaultColor,\n statusBarColorHistory: [defaultColor],\n statusBarColorIndex: 0\n })\n\n const changeStatusBarColor = useCallback((color: IThemePaletteKeys) => {\n setState(prev => {\n const newHistory = [...prev.statusBarColorHistory.slice(0, prev.statusBarColorIndex + 1), color]\n return {\n statusBarColor: color,\n statusBarColorHistory: newHistory,\n statusBarColorIndex: newHistory.length - 1\n }\n })\n }, [])\n\n const historyStatusBarColor = useCallback((steps: number) => {\n setState(prev => {\n const newIndex = prev.statusBarColorIndex + steps\n if (newIndex >= 0 && newIndex < prev.statusBarColorHistory.length) {\n return {\n ...prev,\n statusBarColor: prev.statusBarColorHistory[newIndex],\n statusBarColorIndex: newIndex\n }\n }\n return prev\n })\n }, [])\n\n const setDefaultStatusBarColor = useCallback(() => {\n setState({\n statusBarColor: defaultColor,\n statusBarColorHistory: [defaultColor],\n statusBarColorIndex: 0\n })\n }, [defaultColor])\n\n useEffect(() => {\n setState({\n statusBarColor: defaultColor,\n statusBarColorHistory: [defaultColor],\n statusBarColorIndex: 0\n })\n }, [defaultColor])\n\n return {\n statusBarColor: state.statusBarColor,\n changeStatusBarColor,\n historyStatusBarColor,\n setDefaultStatusBarColor,\n statusBarColorIndex: state.statusBarColorIndex\n }\n}\n\n/**\n * Custom hook to manage background images with history.\n */\ntype BgImageState = {\n bgImage: string | null\n bgImageHistory: (string | null)[]\n bgImageIndex: number\n}\n\nexport const useBgImage = (defaultImage: string | null) => {\n const [state, setState] = useState<BgImageState>({\n bgImage: defaultImage,\n bgImageHistory: [defaultImage],\n bgImageIndex: 0\n })\n\n const changeBgImage = useCallback((image: string | null) => {\n setState(prev => {\n const newHistory = [...prev.bgImageHistory.slice(0, prev.bgImageIndex + 1), image]\n return {\n bgImage: image,\n bgImageHistory: newHistory,\n bgImageIndex: newHistory.length - 1\n }\n })\n }, [])\n\n const historyBgImage = useCallback((steps: number) => {\n setState(prev => {\n const newIndex = prev.bgImageIndex + steps\n if (newIndex >= 0 && newIndex < prev.bgImageHistory.length) {\n return {\n ...prev,\n bgImage: prev.bgImageHistory[newIndex],\n bgImageIndex: newIndex\n }\n }\n return prev\n })\n }, [])\n\n const setDefaultBgImage = useCallback(() => {\n setState({\n bgImage: defaultImage,\n bgImageHistory: [defaultImage],\n bgImageIndex: 0\n })\n }, [defaultImage])\n\n useEffect(() => {\n setState({\n bgImage: defaultImage,\n bgImageHistory: [defaultImage],\n bgImageIndex: 0\n })\n }, [defaultImage])\n\n return {\n bgImage: state.bgImage,\n changeBgImage,\n historyBgImage,\n setDefaultBgImage,\n bgImageIndex: state.bgImageIndex\n }\n}\n\ntype TitleState = {\n title: string | null\n titleHistory: (string | null)[]\n titleIndex: number\n}\n/**\n * Custom hook to manage the document title with history tracking.\n */\nconst useTitle = (defaultTitle: string | null) => {\n const [state, setState] = useState<TitleState>({\n title: defaultTitle,\n titleHistory: [defaultTitle],\n titleIndex: 0\n })\n\n const changeTitle = useCallback((newTitle: string | null) => {\n setState(prev => {\n const newHistory = [...prev.titleHistory.slice(0, prev.titleIndex + 1), newTitle]\n return {\n title: newTitle,\n titleHistory: newHistory,\n titleIndex: newHistory.length - 1\n }\n })\n }, [])\n\n const setHistoryTitle = useCallback((steps: number) => {\n setState(prev => {\n const newIndex = prev.titleIndex + steps\n if (newIndex >= 0 && newIndex < prev.titleHistory.length) {\n return {\n ...prev,\n title: prev.titleHistory[newIndex],\n titleIndex: newIndex\n }\n }\n return prev\n })\n }, [])\n\n const setDefaultTitle = useCallback(() => {\n setState({\n title: defaultTitle,\n titleHistory: [defaultTitle],\n titleIndex: 0\n })\n }, [defaultTitle])\n\n useEffect(() => {\n setState({\n title: defaultTitle,\n titleHistory: [defaultTitle],\n titleIndex: 0\n })\n }, [defaultTitle])\n\n return {\n title: state.title,\n titleIndex: state.titleIndex,\n titleHistory: state.titleHistory,\n changeTitle,\n setHistoryTitle,\n setDefaultTitle\n }\n}\n\n/**\n * Custom hook to manage a description with history tracking.\n */\ntype DescriptionState = {\n description: string\n descriptionHistory: string[]\n descriptionIndex: number\n}\n\nexport const useDescription = (defaultDescription: string) => {\n const [state, setState] = useState<DescriptionState>({\n description: defaultDescription,\n descriptionHistory: [defaultDescription],\n descriptionIndex: 0\n })\n\n const changeDescription = useCallback((newDescription: string) => {\n setState(prev => {\n const newHistory = [...prev.descriptionHistory.slice(0, prev.descriptionIndex + 1), newDescription]\n return {\n description: newDescription,\n descriptionHistory: newHistory,\n descriptionIndex: newHistory.length - 1\n }\n })\n }, [])\n\n const historyDescription = useCallback((steps: number) => {\n setState(prev => {\n const newIndex = prev.descriptionIndex + steps\n if (newIndex >= 0 && newIndex < prev.descriptionHistory.length) {\n return {\n ...prev,\n description: prev.descriptionHistory[newIndex],\n descriptionIndex: newIndex\n }\n }\n return prev\n })\n }, [])\n\n const setDefaultDescription = useCallback(() => {\n setState({\n description: defaultDescription,\n descriptionHistory: [defaultDescription],\n descriptionIndex: 0\n })\n }, [defaultDescription])\n\n useEffect(() => {\n setState({\n description: defaultDescription,\n descriptionHistory: [defaultDescription],\n descriptionIndex: 0\n })\n }, [defaultDescription])\n\n return {\n description: state.description,\n changeDescription,\n historyDescription,\n setDefaultDescription,\n descriptionIndex: state.descriptionIndex\n }\n}\n","import { addGridTransition } from '@local/styles/add';\nimport { JeneseiPalette } from '@local/theme';\n\nimport { css, styled } from 'styled-components';\n\nimport { ScreenWidthProps } from '../context-screen-width';\nimport { ProviderAppOutletChildrenProps, ProviderAppOutletProps, ProviderAppWrapperProps } from '.';\n\nexport const ProviderAppWrapper = styled.div<ProviderAppWrapperProps>`\n display: flex;\n flex-direction: column;\n max-width: 100dvw;\n min-height: 100dvh;\n width: 100%;\n overflow: hidden;\n position: relative;\n\n background-color: ${(props) => JeneseiPalette[props.$bgColor]};\n background-image: url(${(props) => props.$bgImage});\n`;\n\nconst generateGridTemplateAreas = (props: ProviderAppOutletProps) => {\n let templateAreas = `\n \"notification notification notification\"\n \"header header header\"\n \"nav nav nav\"\n \"leftAside children rightAside\"\n \"footer footer footer\"\n `;\n\n templateAreas = `\n \"notification notification notification\"\n \"${props.$leftAside?.isTopHeader ? 'leftAside' : 'header'} header ${props.$rightAside?.isTopHeader ? 'rightAside' : 'header'}\"\n \"${props.$leftAside?.isTopHeader ? 'leftAside' : props.$leftAside?.isTopNav ? 'leftAside' : 'nav'} nav ${props.$rightAside?.isTopHeader ? 'rightAside' : props.$rightAside?.isTopNav ? 'rightAside' : 'nav'}\"\n \"leftAside children rightAside\"\n \"${props.$leftAside?.isTopFooter ? 'leftAside' : 'footer'} footer ${props.$rightAside?.isTopFooter ? 'rightAside' : 'footer'}\"\n `;\n\n return templateAreas;\n};\n\nfunction toStyledAppOutletCSS(props: {\n leftAsideWidth: string;\n rightAsideWidth: string;\n notificationHeight: string;\n headerHeight: string;\n navHeight: string;\n footerHeight: string;\n}) {\n return css`\n grid-template-columns: ${() => `${props.leftAsideWidth} 1fr ${props.rightAsideWidth}`};\n grid-template-rows: ${() =>\n `${props.notificationHeight} ${props.headerHeight} ${props.navHeight} 1fr ${props.footerHeight}`};\n `;\n}\nconst addSXAppOutlet = css<ProviderAppOutletProps>`\n ${(props) => {\n const leftAsideWidth = props.$leftAside?.length?.default;\n const rightAsideWidth = props.$rightAside?.length?.default;\n const notificationHeight = props.$notification?.length?.default;\n const headerHeight = props.$header?.length?.default;\n const navHeight = props.$nav?.length?.default;\n const footerHeight = props.$footer?.length?.default;\n return toStyledAppOutletCSS({\n leftAsideWidth: leftAsideWidth ?? '0px',\n rightAsideWidth: rightAsideWidth ?? '0px',\n notificationHeight: notificationHeight ?? '0px',\n headerHeight: headerHeight ?? '0px',\n navHeight: navHeight ?? '0px',\n footerHeight: footerHeight ?? '0px',\n });\n }}\n ${(props) => {\n const leftAsideWidth = props.$leftAside?.length;\n const rightAsideWidth = props.$rightAside?.length;\n const notificationHeight = props.$notification?.length;\n const headerHeight = props.$header?.length;\n const navHeight = props.$nav?.length;\n const footerHeight = props.$footer?.length;\n\n return Object.entries(props.theme.screens)\n .filter(([key]) => key !== 'default')\n .map(([key]) => {\n const deviceKey = key as keyof ScreenWidthProps<string | null>;\n const screenWidth = props.theme.screens[deviceKey]?.width;\n if (!screenWidth) return null;\n return css`\n @media (max-width: ${screenWidth}px) {\n ${toStyledAppOutletCSS({\n leftAsideWidth: leftAsideWidth && leftAsideWidth[deviceKey] ? leftAsideWidth[deviceKey] : '0px',\n rightAsideWidth: rightAsideWidth && rightAsideWidth[deviceKey] ? rightAsideWidth[deviceKey] : '0px',\n notificationHeight:\n notificationHeight && notificationHeight[deviceKey] ? notificationHeight[deviceKey] : '0px',\n headerHeight: headerHeight && headerHeight[deviceKey] ? headerHeight[deviceKey] : '0px',\n navHeight: navHeight && navHeight[deviceKey] ? navHeight[deviceKey] : '0px',\n footerHeight: footerHeight && footerHeight[deviceKey] ? footerHeight[deviceKey] : '0px',\n })}\n }\n `;\n });\n }}\n`;\nexport const ProviderAppOutlet = styled.div<ProviderAppOutletProps>`\n display: grid;\n width: 100%;\n height: 100%;\n\n overflow-y: auto;\n overflow-x: hidden;\n scrollbar-gutter: stable;\n \n min-height: 100dvh;\n max-height: 100dvh;\n \n ${addGridTransition};\n\n ${(props) => `\n grid-template-areas: ${generateGridTemplateAreas(props)};\n `}\n\n ${addSXAppOutlet};\n`;\n\nexport const ProviderAppOutletChildren = styled.main<ProviderAppOutletChildrenProps>`\n z-index: ${(props) => props?.$main?.zIndex ?? 'auto'};\n display: flex;\n grid-area: children;\n max-width: 100%;\n max-height: 100%;\n overflow: ${(props) => (props.$isScrollOutlet ? 'auto' : 'visible')};\n scrollbar-gutter: stable;\n`;\n\nexport const ProviderAppOutletNotification = styled.section<ProviderAppOutletProps>`\n z-index: ${(props) => props?.$notification?.zIndex ?? 'auto'};\n grid-area: notification;\n display: flex;\n`;\n\nexport const ProviderAppOutletHeader = styled.header<ProviderAppOutletProps>`\n z-index: ${(props) => props?.$header?.zIndex ?? 'auto'};\n grid-area: header;\n display: flex;\n`;\n\nexport const ProviderAppOutletFooter = styled.footer<ProviderAppOutletProps>`\n z-index: ${(props) => props?.$footer?.zIndex ?? 'auto'};\n grid-area: footer;\n display: flex;\n`;\n\nexport const ProviderAppOutletNav = styled.nav<ProviderAppOutletProps>`\n z-index: ${(props) => props?.$nav?.zIndex ?? 'auto'};\n grid-area: nav;\n display: flex;\n`;\n\nexport const ProviderAppOutletLeftAside = styled.aside<ProviderAppOutletProps>`\n z-index: ${(props) => props?.$leftAside?.zIndex ?? 'auto'};\n grid-area: leftAside;\n display: flex;\n`;\n\nexport const ProviderAppOutletRightAside = styled.aside<ProviderAppOutletProps>`\n z-index: ${(props) => props?.$rightAside?.zIndex ?? 'auto'};\n grid-area: rightAside;\n display: flex;\n`;\n","import { useContext } from 'react'\n\nimport { AppContext } from '.'\n\n/**\n * Custom hook to access the AppContext.\n */\nexport const useApp = () => {\n const context = useContext(AppContext)\n if (!context) {\n throw new Error('useApp must be used within an ProviderApp')\n }\n return context\n}\n"],"names":["AppContext","createContext","usePreview","defaultPreview","previewProps","setPreviewProps","useState","visible","defaultVisible","changePreview","useCallback","newPreviewProps","useEffect","useBgColor","defaultColor","state","setState","bgColor","bgColorHistory","bgColorIndex","changeBgColor","color","prev","newHistory","slice","length","historyBgColor","steps","newIndex","setDefaultBgColor","useStatusBarColor","statusBarColor","statusBarColorHistory","statusBarColorIndex","changeStatusBarColor","historyStatusBarColor","setDefaultStatusBarColor","useBgImage","defaultImage","bgImage","bgImageHistory","bgImageIndex","changeBgImage","image","historyBgImage","setDefaultBgImage","useTitle","defaultTitle","title","titleHistory","titleIndex","changeTitle","newTitle","setHistoryTitle","setDefaultTitle","useDescription","defaultDescription","description","descriptionHistory","descriptionIndex","changeDescription","newDescription","historyDescription","setDefaultDescription","ProviderAppWrapper","styled","div","props","JeneseiPalette","$bgColor","$bgImage","toStyledAppOutletCSS","css","leftAsideWidth","rightAsideWidth","notificationHeight","headerHeight","navHeight","footerHeight","addSXAppOutlet","_b","_a","$leftAside","default","_d","_c","$rightAside","_f","_e","$notification","_h","_g","$header","_j","_i","$nav","_l","_k","$footer","Object","entries","theme","screens","filter","key","map","deviceKey","screenWidth","width","ProviderAppOutlet","addGridTransition","templateAreas","isTopHeader","isTopNav","isTopFooter","generateGridTemplateAreas","ProviderAppOutletChildren","main","$main","zIndex","$isScrollOutlet","ProviderAppOutletNotification","section","ProviderAppOutletHeader","header","ProviderAppOutletFooter","footer","ProviderAppOutletNav","nav","ProviderAppOutletLeftAside","aside","ProviderAppOutletRightAside","defaultBgColor","defaultStatusBarColor","defaultBgImage","screenActual","useScreenWidth","jsxs","Provider","value","children","jsx","name","content","Preview","isScrollOutlet","notification","leftAside","rightAside","component","_m","_o","_n","_q","_s","_r","_u","_w","_v","context","useContext","Error"],"mappings":"mQAoBaA,EAAaC,EAAAA,cAAsC,MAyH1DC,EAAcC,IAClB,MAAOC,EAAcC,GAAmBC,WAASH,GAAkB,CAAEI,SAAS,EAAMC,gBAAgB,IAE9FC,EAAgBC,cAAaC,IACjCN,EAAgBM,IACf,IAMH,OAJAC,EAAAA,UAAU,KACJT,KAAgCA,IACnC,CAACA,IAEG,CAAEC,eAAcK,kBAYZI,EAAcC,IACzB,MAAOC,EAAOC,GAAYV,WAAuB,CAC/CW,QAASH,EACTI,eAAgB,CAACJ,GACjBK,aAAc,IAGVC,EAAgBV,cAAaW,IACjCL,EAASM,IACP,MAAMC,EAAa,IAAID,EAAKJ,eAAeM,MAAM,EAAGF,EAAKH,aAAe,GAAIE,GAC5E,MAAO,CACLJ,QAASI,EACTH,eAAgBK,EAChBJ,aAAcI,EAAWE,OAAS,MAGrC,IAEGC,EAAiBhB,cAAaiB,IAClCX,EAASM,IACP,MAAMM,EAAWN,EAAKH,aAAeQ,EACrC,OAAIC,GAAY,GAAKA,EAAWN,EAAKJ,eAAeO,OAC3C,IACFH,EACHL,QAASK,EAAKJ,eAAeU,GAC7BT,aAAcS,GAGXN,KAER,IAEGO,EAAoBnB,EAAAA,YAAY,KACpCM,EAAS,CACPC,QAASH,EACTI,eAAgB,CAACJ,GACjBK,aAAc,KAEf,CAACL,IAUJ,OARAF,EAAAA,UAAU,KACRI,EAAS,CACPC,QAASH,EACTI,eAAgB,CAACJ,GACjBK,aAAc,KAEf,CAACL,IAEG,CACLG,QAASF,EAAME,QACfG,gBACAM,iBACAG,oBACAV,aAAcJ,EAAMI,eAaXW,EAAqBhB,IAChC,MAAOC,EAAOC,GAAYV,WAA8B,CACtDyB,eAAgBjB,EAChBkB,sBAAuB,CAAClB,GACxBmB,oBAAqB,IAGjBC,EAAuBxB,cAAaW,IACxCL,EAASM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M6D,IAAMY,qBAAMZ,cAAKqB,YAAa,OAC9D,MAEH,OAAAC,EAAAnF,EAAMgF,gBAAN,EAAAG,EAAiB7H,UAAU,OAAA8H,EAAA,OAAAC,EAAArF,EAAMgF,gBAAN,EAAAK,EAAiB/H,aAAjB,EAAA8H,EAA0BhB,KACpDM,EAAAA,kBAAAA,IAACZ,EAAA,CAA2B/C,WAAYf,EAAMgF,UAC3CP,qBAAMO,oBAAWE,YAAa,OAE/B,KAEJR,EAAAA,kBAAAA,IAACzB,GAA0BI,gBAAiBrD,EAAM8E,eAAgB3B,MAAOnD,EAAMkD,KAAOuB,SAAAzE,EAAMyE,YAE3F,OAAAa,EAAAtF,EAAMiF,iBAAN,EAAAK,EAAkBhI,UAAU,OAAAiI,EAAA,OAAAC,EAAAxF,EAAMiF,iBAAN,EAAAO,EAAkBlI,aAAlB,EAAAiI,EAA2BnB,KACtDM,EAAAA,kBAAAA,IAACV,EAAA,CAA4B7C,YAAanB,EAAMiF,WAC7CR,qBAAMQ,qBAAYC,YAAa,OAEhC,MAEH,OAAAO,EAAAzF,EAAM2D,aAAN,EAAA8B,EAAcnI,UAAU,OAAAoI,EAAA,OAAAC,EAAA3F,EAAM2D,aAAN,EAAAgC,EAAcrI,aAAd,EAAAoI,EAAuBtB,KAC9CM,wBAAChB,EAAA,CAAwB3B,QAAS/B,EAAM2D,OACrCc,qBAAMd,iBAAQuB,YAAa,OAE5B,kVE3HM,KACpB,MAAMU,EAAUC,EAAAA,WAAWhK,GAC3B,IAAK+J,EACH,MAAM,IAAIE,MAAM,6CAElB,OAAOF"}
1
+ {"version":3,"file":"context.hooks-DOygH-Yj.cjs","sources":["../src/contexts/context-app/context.tsx","../src/contexts/context-app/context.styles.ts","../src/contexts/context-app/context.hooks.ts"],"sourcesContent":["import { Preview, PreviewAdditionalProps } from '@local/areas/preview'\nimport { IThemePaletteKeys, JeneseiPalette } from '@local/theme'\n\nimport { createContext, FC, useCallback, useEffect, useState } from 'react'\n\nimport { useScreenWidth } from '../context-screen-width'\nimport {\n AppContextProps,\n ProviderAppOutlet,\n ProviderAppOutletChildren,\n ProviderAppOutletFooter,\n ProviderAppOutletHeader,\n ProviderAppOutletLeftAside,\n ProviderAppOutletNav,\n ProviderAppOutletNotification,\n ProviderAppOutletRightAside,\n ProviderAppProps,\n ProviderAppWrapper\n} from '.'\n\nexport const AppContext = createContext<AppContextProps | null>(null)\n\n/**\n * ProviderApp component is a context context that manages various application-level states\n * such as background color, status bar color, background image, title, and description.\n * It uses several custom hooks to handle these states and provides them via the AppContext.\n *\n * @component\n *\n * @param {ProviderAppProps} props - The properties passed to the ProviderApp component.\n * @param {string} props.defaultBgColor - The default background color.\n * @param {string} props.defaultStatusBarColor - The default status bar color.\n * @param {string} [props.defaultBgImage] - The default background image.\n * @param {string} [props.defaultTitle] - The default title.\n * @param {string} [props.defaultDescription] - The default description.\n * @param {boolean} [props.isScrollOutlet] - Determines if the outlet should be scrollable.\n * @param {object} [props.footer] - The footer component and its properties.\n * @param {object} [props.notification] - The notification component and its properties.\n * @param {object} [props.header] - The header component and its properties.\n * @param {object} [props.nav] - The navigation component and its properties.\n * @param {object} [props.leftAside] - The left aside component and its properties.\n * @param {object} [props.rightAside] - The right aside component and its properties.\n * @param {React.ReactNode} props.children - The children components to be rendered inside the ProviderApp.\n *\n * @returns {JSX.Element} The rendered ProviderApp component.\n */\nexport const ProviderApp: FC<ProviderAppProps> = props => {\n const { bgColor, changeBgColor, historyBgColor, setDefaultBgColor } = useBgColor(props.defaultBgColor)\n const { statusBarColor, changeStatusBarColor, historyStatusBarColor, setDefaultStatusBarColor } = useStatusBarColor(\n props.defaultStatusBarColor\n )\n const { bgImage, changeBgImage, historyBgImage, setDefaultBgImage } = useBgImage(props.defaultBgImage || null)\n const { title, changeTitle, setHistoryTitle, setDefaultTitle } = useTitle(props.defaultTitle || null)\n const { description, changeDescription, historyDescription, setDefaultDescription } = useDescription(\n props.defaultDescription\n )\n const { changePreview, previewProps } = usePreview(props.defaultPreview)\n const { screenActual } = useScreenWidth()\n\n return (\n <AppContext.Provider\n value={{\n changePreview,\n changeStatusBarColor,\n changeBgColor,\n changeBgImage,\n changeTitle,\n changeDescription,\n historyStatusBarColor,\n historyBgColor,\n historyBgImage,\n setHistoryTitle,\n historyDescription,\n setDefaultStatusBarColor,\n setDefaultBgColor,\n setDefaultBgImage,\n setDefaultTitle,\n setDefaultDescription\n }}\n >\n <title>{title}</title>\n <meta name=\"description\" content={description} />\n <meta name=\"theme-color\" content={JeneseiPalette[statusBarColor]} />\n <meta name=\"apple-mobile-web-app-status-bar-style\" content=\"default\" />\n <meta name=\"mobile-web-app-capable\" content=\"yes\" />\n <Preview {...previewProps}>\n <ProviderAppWrapper $bgColor={bgColor} $bgImage={bgImage}>\n <ProviderAppOutlet\n $isScrollOutlet={props.isScrollOutlet}\n $footer={props.footer}\n $notification={props.notification}\n $header={props.header}\n $nav={props.nav}\n $leftAside={props.leftAside}\n $rightAside={props.rightAside}\n >\n {props.notification?.length && props.notification?.length?.[screenActual] ? (\n <ProviderAppOutletNotification $notification={props.notification}>\n {props.notification?.component || null}\n </ProviderAppOutletNotification>\n ) : null}\n\n {props.header?.length && props.header?.length?.[screenActual] ? (\n <ProviderAppOutletHeader $header={props.header}>\n {props.header?.component || null}\n </ProviderAppOutletHeader>\n ) : null}\n\n {props.nav?.length && props.nav?.length?.[screenActual] ? (\n <ProviderAppOutletNav $nav={props.nav}>{props.nav?.component || null}</ProviderAppOutletNav>\n ) : null}\n\n {props.leftAside?.length && props.leftAside?.length?.[screenActual] ? (\n <ProviderAppOutletLeftAside $leftAside={props.leftAside}>\n {props.leftAside?.component || null}\n </ProviderAppOutletLeftAside>\n ) : null}\n\n <ProviderAppOutletChildren $isScrollOutlet={props.isScrollOutlet} $main={props.main}>{props.children}</ProviderAppOutletChildren>\n\n {props.rightAside?.length && props.rightAside?.length?.[screenActual] ? (\n <ProviderAppOutletRightAside $rightAside={props.rightAside}>\n {props.rightAside?.component || null}\n </ProviderAppOutletRightAside>\n ) : null}\n\n {props.footer?.length && props.footer?.length?.[screenActual] ? (\n <ProviderAppOutletFooter $footer={props.footer}>\n {props.footer?.component || null}\n </ProviderAppOutletFooter>\n ) : null}\n </ProviderAppOutlet>\n </ProviderAppWrapper>\n </Preview>\n </AppContext.Provider>\n )\n}\n\n/**\n * Custom hook to manage preview properties.\n */\nconst usePreview = (defaultPreview: ProviderAppProps['defaultPreview']) => {\n const [previewProps, setPreviewProps] = useState(defaultPreview || { visible: true, defaultVisible: true })\n\n const changePreview = useCallback((newPreviewProps: PreviewAdditionalProps) => {\n setPreviewProps(newPreviewProps)\n }, [])\n\n useEffect(() => {\n if (defaultPreview) setPreviewProps(defaultPreview)\n }, [defaultPreview])\n\n return { previewProps, changePreview }\n}\n\n/**\n * Custom hook to manage background color state with history tracking.\n */\ntype BgColorState = {\n bgColor: IThemePaletteKeys\n bgColorHistory: IThemePaletteKeys[]\n bgColorIndex: number\n}\n\nexport const useBgColor = (defaultColor: IThemePaletteKeys) => {\n const [state, setState] = useState<BgColorState>({\n bgColor: defaultColor,\n bgColorHistory: [defaultColor],\n bgColorIndex: 0\n })\n\n const changeBgColor = useCallback((color: IThemePaletteKeys) => {\n setState(prev => {\n const newHistory = [...prev.bgColorHistory.slice(0, prev.bgColorIndex + 1), color]\n return {\n bgColor: color,\n bgColorHistory: newHistory,\n bgColorIndex: newHistory.length - 1\n }\n })\n }, [])\n\n const historyBgColor = useCallback((steps: number) => {\n setState(prev => {\n const newIndex = prev.bgColorIndex + steps\n if (newIndex >= 0 && newIndex < prev.bgColorHistory.length) {\n return {\n ...prev,\n bgColor: prev.bgColorHistory[newIndex],\n bgColorIndex: newIndex\n }\n }\n return prev\n })\n }, [])\n\n const setDefaultBgColor = useCallback(() => {\n setState({\n bgColor: defaultColor,\n bgColorHistory: [defaultColor],\n bgColorIndex: 0\n })\n }, [defaultColor])\n\n useEffect(() => {\n setState({\n bgColor: defaultColor,\n bgColorHistory: [defaultColor],\n bgColorIndex: 0\n })\n }, [defaultColor])\n\n return {\n bgColor: state.bgColor,\n changeBgColor,\n historyBgColor,\n setDefaultBgColor,\n bgColorIndex: state.bgColorIndex\n }\n}\n\n/**\n * Custom hook to manage the status bar color with history tracking.\n */\ntype StatusBarColorState = {\n statusBarColor: IThemePaletteKeys\n statusBarColorHistory: IThemePaletteKeys[]\n statusBarColorIndex: number\n}\n\nexport const useStatusBarColor = (defaultColor: IThemePaletteKeys) => {\n const [state, setState] = useState<StatusBarColorState>({\n statusBarColor: defaultColor,\n statusBarColorHistory: [defaultColor],\n statusBarColorIndex: 0\n })\n\n const changeStatusBarColor = useCallback((color: IThemePaletteKeys) => {\n setState(prev => {\n const newHistory = [...prev.statusBarColorHistory.slice(0, prev.statusBarColorIndex + 1), color]\n return {\n statusBarColor: color,\n statusBarColorHistory: newHistory,\n statusBarColorIndex: newHistory.length - 1\n }\n })\n }, [])\n\n const historyStatusBarColor = useCallback((steps: number) => {\n setState(prev => {\n const newIndex = prev.statusBarColorIndex + steps\n if (newIndex >= 0 && newIndex < prev.statusBarColorHistory.length) {\n return {\n ...prev,\n statusBarColor: prev.statusBarColorHistory[newIndex],\n statusBarColorIndex: newIndex\n }\n }\n return prev\n })\n }, [])\n\n const setDefaultStatusBarColor = useCallback(() => {\n setState({\n statusBarColor: defaultColor,\n statusBarColorHistory: [defaultColor],\n statusBarColorIndex: 0\n })\n }, [defaultColor])\n\n useEffect(() => {\n setState({\n statusBarColor: defaultColor,\n statusBarColorHistory: [defaultColor],\n statusBarColorIndex: 0\n })\n }, [defaultColor])\n\n return {\n statusBarColor: state.statusBarColor,\n changeStatusBarColor,\n historyStatusBarColor,\n setDefaultStatusBarColor,\n statusBarColorIndex: state.statusBarColorIndex\n }\n}\n\n/**\n * Custom hook to manage background images with history.\n */\ntype BgImageState = {\n bgImage: string | null\n bgImageHistory: (string | null)[]\n bgImageIndex: number\n}\n\nexport const useBgImage = (defaultImage: string | null) => {\n const [state, setState] = useState<BgImageState>({\n bgImage: defaultImage,\n bgImageHistory: [defaultImage],\n bgImageIndex: 0\n })\n\n const changeBgImage = useCallback((image: string | null) => {\n setState(prev => {\n const newHistory = [...prev.bgImageHistory.slice(0, prev.bgImageIndex + 1), image]\n return {\n bgImage: image,\n bgImageHistory: newHistory,\n bgImageIndex: newHistory.length - 1\n }\n })\n }, [])\n\n const historyBgImage = useCallback((steps: number) => {\n setState(prev => {\n const newIndex = prev.bgImageIndex + steps\n if (newIndex >= 0 && newIndex < prev.bgImageHistory.length) {\n return {\n ...prev,\n bgImage: prev.bgImageHistory[newIndex],\n bgImageIndex: newIndex\n }\n }\n return prev\n })\n }, [])\n\n const setDefaultBgImage = useCallback(() => {\n setState({\n bgImage: defaultImage,\n bgImageHistory: [defaultImage],\n bgImageIndex: 0\n })\n }, [defaultImage])\n\n useEffect(() => {\n setState({\n bgImage: defaultImage,\n bgImageHistory: [defaultImage],\n bgImageIndex: 0\n })\n }, [defaultImage])\n\n return {\n bgImage: state.bgImage,\n changeBgImage,\n historyBgImage,\n setDefaultBgImage,\n bgImageIndex: state.bgImageIndex\n }\n}\n\ntype TitleState = {\n title: string | null\n titleHistory: (string | null)[]\n titleIndex: number\n}\n/**\n * Custom hook to manage the document title with history tracking.\n */\nconst useTitle = (defaultTitle: string | null) => {\n const [state, setState] = useState<TitleState>({\n title: defaultTitle,\n titleHistory: [defaultTitle],\n titleIndex: 0\n })\n\n const changeTitle = useCallback((newTitle: string | null) => {\n setState(prev => {\n const newHistory = [...prev.titleHistory.slice(0, prev.titleIndex + 1), newTitle]\n return {\n title: newTitle,\n titleHistory: newHistory,\n titleIndex: newHistory.length - 1\n }\n })\n }, [])\n\n const setHistoryTitle = useCallback((steps: number) => {\n setState(prev => {\n const newIndex = prev.titleIndex + steps\n if (newIndex >= 0 && newIndex < prev.titleHistory.length) {\n return {\n ...prev,\n title: prev.titleHistory[newIndex],\n titleIndex: newIndex\n }\n }\n return prev\n })\n }, [])\n\n const setDefaultTitle = useCallback(() => {\n setState({\n title: defaultTitle,\n titleHistory: [defaultTitle],\n titleIndex: 0\n })\n }, [defaultTitle])\n\n useEffect(() => {\n setState({\n title: defaultTitle,\n titleHistory: [defaultTitle],\n titleIndex: 0\n })\n }, [defaultTitle])\n\n return {\n title: state.title,\n titleIndex: state.titleIndex,\n titleHistory: state.titleHistory,\n changeTitle,\n setHistoryTitle,\n setDefaultTitle\n }\n}\n\n/**\n * Custom hook to manage a description with history tracking.\n */\ntype DescriptionState = {\n description: string\n descriptionHistory: string[]\n descriptionIndex: number\n}\n\nexport const useDescription = (defaultDescription: string) => {\n const [state, setState] = useState<DescriptionState>({\n description: defaultDescription,\n descriptionHistory: [defaultDescription],\n descriptionIndex: 0\n })\n\n const changeDescription = useCallback((newDescription: string) => {\n setState(prev => {\n const newHistory = [...prev.descriptionHistory.slice(0, prev.descriptionIndex + 1), newDescription]\n return {\n description: newDescription,\n descriptionHistory: newHistory,\n descriptionIndex: newHistory.length - 1\n }\n })\n }, [])\n\n const historyDescription = useCallback((steps: number) => {\n setState(prev => {\n const newIndex = prev.descriptionIndex + steps\n if (newIndex >= 0 && newIndex < prev.descriptionHistory.length) {\n return {\n ...prev,\n description: prev.descriptionHistory[newIndex],\n descriptionIndex: newIndex\n }\n }\n return prev\n })\n }, [])\n\n const setDefaultDescription = useCallback(() => {\n setState({\n description: defaultDescription,\n descriptionHistory: [defaultDescription],\n descriptionIndex: 0\n })\n }, [defaultDescription])\n\n useEffect(() => {\n setState({\n description: defaultDescription,\n descriptionHistory: [defaultDescription],\n descriptionIndex: 0\n })\n }, [defaultDescription])\n\n return {\n description: state.description,\n changeDescription,\n historyDescription,\n setDefaultDescription,\n descriptionIndex: state.descriptionIndex\n }\n}\n","import { addGridTransition } from '@local/styles/add';\nimport { JeneseiPalette } from '@local/theme';\n\nimport { css, styled } from 'styled-components';\n\nimport { ScreenWidthProps } from '../context-screen-width';\nimport { ProviderAppOutletChildrenProps, ProviderAppOutletProps, ProviderAppWrapperProps } from '.';\n\nexport const ProviderAppWrapper = styled.div<ProviderAppWrapperProps>`\n display: flex;\n flex-direction: column;\n max-width: 100dvw;\n min-height: 100dvh;\n width: 100%;\n overflow: hidden;\n position: relative;\n\n background-color: ${(props) => JeneseiPalette[props.$bgColor]};\n background-image: url(${(props) => props.$bgImage});\n`;\n\nconst generateGridTemplateAreas = (props: ProviderAppOutletProps) => {\n let templateAreas = `\n \"notification notification notification\"\n \"header header header\"\n \"nav nav nav\"\n \"leftAside children rightAside\"\n \"footer footer footer\"\n `;\n\n templateAreas = `\n \"notification notification notification\"\n \"${props.$leftAside?.isTopHeader ? 'leftAside' : 'header'} header ${props.$rightAside?.isTopHeader ? 'rightAside' : 'header'}\"\n \"${props.$leftAside?.isTopHeader ? 'leftAside' : props.$leftAside?.isTopNav ? 'leftAside' : 'nav'} nav ${props.$rightAside?.isTopHeader ? 'rightAside' : props.$rightAside?.isTopNav ? 'rightAside' : 'nav'}\"\n \"leftAside children rightAside\"\n \"${props.$leftAside?.isTopFooter ? 'leftAside' : 'footer'} footer ${props.$rightAside?.isTopFooter ? 'rightAside' : 'footer'}\"\n `;\n\n return templateAreas;\n};\n\nfunction toStyledAppOutletCSS(props: {\n leftAsideWidth: string;\n rightAsideWidth: string;\n notificationHeight: string;\n headerHeight: string;\n navHeight: string;\n footerHeight: string;\n}) {\n return css`\n grid-template-columns: ${() => `${props.leftAsideWidth} 1fr ${props.rightAsideWidth}`};\n grid-template-rows: ${() =>\n `${props.notificationHeight} ${props.headerHeight} ${props.navHeight} 1fr ${props.footerHeight}`};\n `;\n}\nconst addSXAppOutlet = css<ProviderAppOutletProps>`\n ${(props) => {\n const leftAsideWidth = props.$leftAside?.length?.default;\n const rightAsideWidth = props.$rightAside?.length?.default;\n const notificationHeight = props.$notification?.length?.default;\n const headerHeight = props.$header?.length?.default;\n const navHeight = props.$nav?.length?.default;\n const footerHeight = props.$footer?.length?.default;\n return toStyledAppOutletCSS({\n leftAsideWidth: leftAsideWidth ?? '0px',\n rightAsideWidth: rightAsideWidth ?? '0px',\n notificationHeight: notificationHeight ?? '0px',\n headerHeight: headerHeight ?? '0px',\n navHeight: navHeight ?? '0px',\n footerHeight: footerHeight ?? '0px',\n });\n }}\n ${(props) => {\n const leftAsideWidth = props.$leftAside?.length;\n const rightAsideWidth = props.$rightAside?.length;\n const notificationHeight = props.$notification?.length;\n const headerHeight = props.$header?.length;\n const navHeight = props.$nav?.length;\n const footerHeight = props.$footer?.length;\n\n return Object.entries(props.theme.screens)\n .filter(([key]) => key !== 'default')\n .map(([key]) => {\n const deviceKey = key as keyof ScreenWidthProps<string | null>;\n const screenWidth = props.theme.screens[deviceKey]?.width;\n if (!screenWidth) return null;\n return css`\n @media (max-width: ${screenWidth}px) {\n ${toStyledAppOutletCSS({\n leftAsideWidth: leftAsideWidth && leftAsideWidth[deviceKey] ? leftAsideWidth[deviceKey] : '0px',\n rightAsideWidth: rightAsideWidth && rightAsideWidth[deviceKey] ? rightAsideWidth[deviceKey] : '0px',\n notificationHeight:\n notificationHeight && notificationHeight[deviceKey] ? notificationHeight[deviceKey] : '0px',\n headerHeight: headerHeight && headerHeight[deviceKey] ? headerHeight[deviceKey] : '0px',\n navHeight: navHeight && navHeight[deviceKey] ? navHeight[deviceKey] : '0px',\n footerHeight: footerHeight && footerHeight[deviceKey] ? footerHeight[deviceKey] : '0px',\n })}\n }\n `;\n });\n }}\n`;\nexport const ProviderAppOutlet = styled.div<ProviderAppOutletProps>`\n display: grid;\n width: 100%;\n height: 100%;\n\n overflow-y: auto;\n overflow-x: hidden;\n scrollbar-gutter: stable;\n \n min-height: 100dvh;\n max-height: 100dvh;\n \n ${addGridTransition};\n\n ${(props) => `\n grid-template-areas: ${generateGridTemplateAreas(props)};\n `}\n\n ${addSXAppOutlet};\n`;\n\nexport const ProviderAppOutletChildren = styled.main<ProviderAppOutletChildrenProps>`\n z-index: ${(props) => props?.$main?.zIndex ?? 'auto'};\n display: flex;\n grid-area: children;\n max-width: 100%;\n max-height: 100%;\n overflow: ${(props) => (props.$isScrollOutlet ? 'auto' : 'visible')};\n scrollbar-gutter: stable;\n`;\n\nexport const ProviderAppOutletNotification = styled.section<ProviderAppOutletProps>`\n z-index: ${(props) => props?.$notification?.zIndex ?? 'auto'};\n grid-area: notification;\n display: flex;\n`;\n\nexport const ProviderAppOutletHeader = styled.header<ProviderAppOutletProps>`\n z-index: ${(props) => props?.$header?.zIndex ?? 'auto'};\n grid-area: header;\n display: flex;\n`;\n\nexport const ProviderAppOutletFooter = styled.footer<ProviderAppOutletProps>`\n z-index: ${(props) => props?.$footer?.zIndex ?? 'auto'};\n grid-area: footer;\n display: flex;\n`;\n\nexport const ProviderAppOutletNav = styled.nav<ProviderAppOutletProps>`\n z-index: ${(props) => props?.$nav?.zIndex ?? 'auto'};\n grid-area: nav;\n display: flex;\n`;\n\nexport const ProviderAppOutletLeftAside = styled.aside<ProviderAppOutletProps>`\n z-index: ${(props) => props?.$leftAside?.zIndex ?? 'auto'};\n grid-area: leftAside;\n display: flex;\n`;\n\nexport const ProviderAppOutletRightAside = styled.aside<ProviderAppOutletProps>`\n z-index: ${(props) => props?.$rightAside?.zIndex ?? 'auto'};\n grid-area: rightAside;\n display: flex;\n`;\n","import { useContext } from 'react'\n\nimport { AppContext } from '.'\n\n/**\n * Custom hook to access the AppContext.\n */\nexport const useApp = () => {\n const context = useContext(AppContext)\n if (!context) {\n throw new Error('useApp must be used within an ProviderApp')\n }\n return context\n}\n"],"names":["AppContext","createContext","usePreview","defaultPreview","previewProps","setPreviewProps","useState","visible","defaultVisible","changePreview","useCallback","newPreviewProps","useEffect","useBgColor","defaultColor","state","setState","bgColor","bgColorHistory","bgColorIndex","changeBgColor","color","prev","newHistory","slice","length","historyBgColor","steps","newIndex","setDefaultBgColor","useStatusBarColor","statusBarColor","statusBarColorHistory","statusBarColorIndex","changeStatusBarColor","historyStatusBarColor","setDefaultStatusBarColor","useBgImage","defaultImage","bgImage","bgImageHistory","bgImageIndex","changeBgImage","image","historyBgImage","setDefaultBgImage","useTitle","defaultTitle","title","titleHistory","titleIndex","changeTitle","newTitle","setHistoryTitle","setDefaultTitle","useDescription","defaultDescription","description","descriptionHistory","descriptionIndex","changeDescription","newDescription","historyDescription","setDefaultDescription","ProviderAppWrapper","styled","div","props","JeneseiPalette","$bgColor","$bgImage","toStyledAppOutletCSS","css","leftAsideWidth","rightAsideWidth","notificationHeight","headerHeight","navHeight","footerHeight","addSXAppOutlet","_b","_a","$leftAside","default","_d","_c","$rightAside","_f","_e","$notification","_h","_g","$header","_j","_i","$nav","_l","_k","$footer","Object","entries","theme","screens","filter","key","map","deviceKey","screenWidth","width","ProviderAppOutlet","addGridTransition","templateAreas","isTopHeader","isTopNav","isTopFooter","generateGridTemplateAreas","ProviderAppOutletChildren","main","$main","zIndex","$isScrollOutlet","ProviderAppOutletNotification","section","ProviderAppOutletHeader","header","ProviderAppOutletFooter","footer","ProviderAppOutletNav","nav","ProviderAppOutletLeftAside","aside","ProviderAppOutletRightAside","defaultBgColor","defaultStatusBarColor","defaultBgImage","screenActual","useScreenWidth","jsxs","Provider","value","children","jsx","name","content","Preview","isScrollOutlet","notification","leftAside","rightAside","component","_m","_o","_n","_q","_s","_r","_u","_w","_v","context","useContext","Error"],"mappings":"mQAoBaA,EAAaC,EAAAA,cAAsC,MAyH1DC,EAAcC,IAClB,MAAOC,EAAcC,GAAmBC,WAASH,GAAkB,CAAEI,SAAS,EAAMC,gBAAgB,IAE9FC,EAAgBC,cAAaC,IACjCN,EAAgBM,IACf,IAMH,OAJAC,EAAAA,UAAU,KACJT,KAAgCA,IACnC,CAACA,IAEG,CAAEC,eAAcK,kBAYZI,EAAcC,IACzB,MAAOC,EAAOC,GAAYV,WAAuB,CAC/CW,QAASH,EACTI,eAAgB,CAACJ,GACjBK,aAAc,IAGVC,EAAgBV,cAAaW,IACjCL,EAASM,IACP,MAAMC,EAAa,IAAID,EAAKJ,eAAeM,MAAM,EAAGF,EAAKH,aAAe,GAAIE,GAC5E,MAAO,CACLJ,QAASI,EACTH,eAAgBK,E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YAAanB,EAAMiF,WAC7CR,qBAAMQ,qBAAYC,YAAa,OAEhC,MAEH,OAAAO,EAAAzF,EAAM2D,aAAN,EAAA8B,EAAcnI,UAAU,OAAAoI,EAAA,OAAAC,EAAA3F,EAAM2D,aAAN,EAAAgC,EAAcrI,aAAd,EAAAoI,EAAuBtB,KAC9CM,wBAAChB,EAAA,CAAwB3B,QAAS/B,EAAM2D,OACrCc,qBAAMd,iBAAQuB,YAAa,OAE5B,kVE3HM,KACpB,MAAMU,EAAUC,EAAAA,WAAWhK,GAC3B,IAAK+J,EACH,MAAM,IAAIE,MAAM,6CAElB,OAAOF"}
@@ -1,9 +1,9 @@
1
1
  import { createContext, useState, useCallback, useEffect, useContext } from "react";
2
2
  import { j as jsxRuntimeExports } from "./jsx-runtime-BrDlu8eK.js";
3
- import { P as Preview } from "./area-Dnq78ow6.js";
4
- import { J as JeneseiPalette } from "./theme.global-CFUz5Asg.js";
3
+ import { P as Preview } from "./area-BYuHpaUX.js";
4
+ import { J as JeneseiPalette } from "./theme.global-BgERDJ4e.js";
5
5
  import { u as useScreenWidth } from "./context.hooks-BmwyZ1p3.js";
6
- import { d as addGridTransition } from "./style-BgcnmVAY.js";
6
+ import { e as addGridTransition } from "./style-RL73t3JD.js";
7
7
  import { styled, css } from "styled-components";
8
8
  const AppContext = createContext(null);
9
9
  const ProviderApp = (props) => {
@@ -524,4 +524,4 @@ export {
524
524
  useApp as m,
525
525
  useBgColor as u
526
526
  };
527
- //# sourceMappingURL=context.hooks-DTdppyho.js.map
527
+ //# sourceMappingURL=context.hooks-kga1DMrX.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"context.hooks-DTdppyho.js","sources":["../src/contexts/context-app/context.tsx","../src/contexts/context-app/context.styles.ts","../src/contexts/context-app/context.hooks.ts"],"sourcesContent":["import { Preview, PreviewAdditionalProps } from '@local/areas/preview'\nimport { IThemePaletteKeys, JeneseiPalette } from '@local/theme'\n\nimport { createContext, FC, useCallback, useEffect, useState } from 'react'\n\nimport { useScreenWidth } from '../context-screen-width'\nimport {\n AppContextProps,\n ProviderAppOutlet,\n ProviderAppOutletChildren,\n ProviderAppOutletFooter,\n ProviderAppOutletHeader,\n ProviderAppOutletLeftAside,\n ProviderAppOutletNav,\n ProviderAppOutletNotification,\n ProviderAppOutletRightAside,\n ProviderAppProps,\n ProviderAppWrapper\n} from '.'\n\nexport const AppContext = createContext<AppContextProps | null>(null)\n\n/**\n * ProviderApp component is a context context that manages various application-level states\n * such as background color, status bar color, background image, title, and description.\n * It uses several custom hooks to handle these states and provides them via the AppContext.\n *\n * @component\n *\n * @param {ProviderAppProps} props - The properties passed to the ProviderApp component.\n * @param {string} props.defaultBgColor - The default background color.\n * @param {string} props.defaultStatusBarColor - The default status bar color.\n * @param {string} [props.defaultBgImage] - The default background image.\n * @param {string} [props.defaultTitle] - The default title.\n * @param {string} [props.defaultDescription] - The default description.\n * @param {boolean} [props.isScrollOutlet] - Determines if the outlet should be scrollable.\n * @param {object} [props.footer] - The footer component and its properties.\n * @param {object} [props.notification] - The notification component and its properties.\n * @param {object} [props.header] - The header component and its properties.\n * @param {object} [props.nav] - The navigation component and its properties.\n * @param {object} [props.leftAside] - The left aside component and its properties.\n * @param {object} [props.rightAside] - The right aside component and its properties.\n * @param {React.ReactNode} props.children - The children components to be rendered inside the ProviderApp.\n *\n * @returns {JSX.Element} The rendered ProviderApp component.\n */\nexport const ProviderApp: FC<ProviderAppProps> = props => {\n const { bgColor, changeBgColor, historyBgColor, setDefaultBgColor } = useBgColor(props.defaultBgColor)\n const { statusBarColor, changeStatusBarColor, historyStatusBarColor, setDefaultStatusBarColor } = useStatusBarColor(\n props.defaultStatusBarColor\n )\n const { bgImage, changeBgImage, historyBgImage, setDefaultBgImage } = useBgImage(props.defaultBgImage || null)\n const { title, changeTitle, setHistoryTitle, setDefaultTitle } = useTitle(props.defaultTitle || null)\n const { description, changeDescription, historyDescription, setDefaultDescription } = useDescription(\n props.defaultDescription\n )\n const { changePreview, previewProps } = usePreview(props.defaultPreview)\n const { screenActual } = useScreenWidth()\n\n return (\n <AppContext.Provider\n value={{\n changePreview,\n changeStatusBarColor,\n changeBgColor,\n changeBgImage,\n changeTitle,\n changeDescription,\n historyStatusBarColor,\n historyBgColor,\n historyBgImage,\n setHistoryTitle,\n historyDescription,\n setDefaultStatusBarColor,\n setDefaultBgColor,\n setDefaultBgImage,\n setDefaultTitle,\n setDefaultDescription\n }}\n >\n <title>{title}</title>\n <meta name=\"description\" content={description} />\n <meta name=\"theme-color\" content={JeneseiPalette[statusBarColor]} />\n <meta name=\"apple-mobile-web-app-status-bar-style\" content=\"default\" />\n <meta name=\"mobile-web-app-capable\" content=\"yes\" />\n <Preview {...previewProps}>\n <ProviderAppWrapper $bgColor={bgColor} $bgImage={bgImage}>\n <ProviderAppOutlet\n $isScrollOutlet={props.isScrollOutlet}\n $footer={props.footer}\n $notification={props.notification}\n $header={props.header}\n $nav={props.nav}\n $leftAside={props.leftAside}\n $rightAside={props.rightAside}\n >\n {props.notification?.length && props.notification?.length?.[screenActual] ? (\n <ProviderAppOutletNotification $notification={props.notification}>\n {props.notification?.component || null}\n </ProviderAppOutletNotification>\n ) : null}\n\n {props.header?.length && props.header?.length?.[screenActual] ? (\n <ProviderAppOutletHeader $header={props.header}>\n {props.header?.component || null}\n </ProviderAppOutletHeader>\n ) : null}\n\n {props.nav?.length && props.nav?.length?.[screenActual] ? (\n <ProviderAppOutletNav $nav={props.nav}>{props.nav?.component || null}</ProviderAppOutletNav>\n ) : null}\n\n {props.leftAside?.length && props.leftAside?.length?.[screenActual] ? (\n <ProviderAppOutletLeftAside $leftAside={props.leftAside}>\n {props.leftAside?.component || null}\n </ProviderAppOutletLeftAside>\n ) : null}\n\n <ProviderAppOutletChildren $isScrollOutlet={props.isScrollOutlet} $main={props.main}>{props.children}</ProviderAppOutletChildren>\n\n {props.rightAside?.length && props.rightAside?.length?.[screenActual] ? (\n <ProviderAppOutletRightAside $rightAside={props.rightAside}>\n {props.rightAside?.component || null}\n </ProviderAppOutletRightAside>\n ) : null}\n\n {props.footer?.length && props.footer?.length?.[screenActual] ? (\n <ProviderAppOutletFooter $footer={props.footer}>\n {props.footer?.component || null}\n </ProviderAppOutletFooter>\n ) : null}\n </ProviderAppOutlet>\n </ProviderAppWrapper>\n </Preview>\n </AppContext.Provider>\n )\n}\n\n/**\n * Custom hook to manage preview properties.\n */\nconst usePreview = (defaultPreview: ProviderAppProps['defaultPreview']) => {\n const [previewProps, setPreviewProps] = useState(defaultPreview || { visible: true, defaultVisible: true })\n\n const changePreview = useCallback((newPreviewProps: PreviewAdditionalProps) => {\n setPreviewProps(newPreviewProps)\n }, [])\n\n useEffect(() => {\n if (defaultPreview) setPreviewProps(defaultPreview)\n }, [defaultPreview])\n\n return { previewProps, changePreview }\n}\n\n/**\n * Custom hook to manage background color state with history tracking.\n */\ntype BgColorState = {\n bgColor: IThemePaletteKeys\n bgColorHistory: IThemePaletteKeys[]\n bgColorIndex: number\n}\n\nexport const useBgColor = (defaultColor: IThemePaletteKeys) => {\n const [state, setState] = useState<BgColorState>({\n bgColor: defaultColor,\n bgColorHistory: [defaultColor],\n bgColorIndex: 0\n })\n\n const changeBgColor = useCallback((color: IThemePaletteKeys) => {\n setState(prev => {\n const newHistory = [...prev.bgColorHistory.slice(0, prev.bgColorIndex + 1), color]\n return {\n bgColor: color,\n bgColorHistory: newHistory,\n bgColorIndex: newHistory.length - 1\n }\n })\n }, [])\n\n const historyBgColor = useCallback((steps: number) => {\n setState(prev => {\n const newIndex = prev.bgColorIndex + steps\n if (newIndex >= 0 && newIndex < prev.bgColorHistory.length) {\n return {\n ...prev,\n bgColor: prev.bgColorHistory[newIndex],\n bgColorIndex: newIndex\n }\n }\n return prev\n })\n }, [])\n\n const setDefaultBgColor = useCallback(() => {\n setState({\n bgColor: defaultColor,\n bgColorHistory: [defaultColor],\n bgColorIndex: 0\n })\n }, [defaultColor])\n\n useEffect(() => {\n setState({\n bgColor: defaultColor,\n bgColorHistory: [defaultColor],\n bgColorIndex: 0\n })\n }, [defaultColor])\n\n return {\n bgColor: state.bgColor,\n changeBgColor,\n historyBgColor,\n setDefaultBgColor,\n bgColorIndex: state.bgColorIndex\n }\n}\n\n/**\n * Custom hook to manage the status bar color with history tracking.\n */\ntype StatusBarColorState = {\n statusBarColor: IThemePaletteKeys\n statusBarColorHistory: IThemePaletteKeys[]\n statusBarColorIndex: number\n}\n\nexport const useStatusBarColor = (defaultColor: IThemePaletteKeys) => {\n const [state, setState] = useState<StatusBarColorState>({\n statusBarColor: defaultColor,\n statusBarColorHistory: [defaultColor],\n statusBarColorIndex: 0\n })\n\n const changeStatusBarColor = useCallback((color: IThemePaletteKeys) => {\n setState(prev => {\n const newHistory = [...prev.statusBarColorHistory.slice(0, prev.statusBarColorIndex + 1), color]\n return {\n statusBarColor: color,\n statusBarColorHistory: newHistory,\n statusBarColorIndex: newHistory.length - 1\n }\n })\n }, [])\n\n const historyStatusBarColor = useCallback((steps: number) => {\n setState(prev => {\n const newIndex = prev.statusBarColorIndex + steps\n if (newIndex >= 0 && newIndex < prev.statusBarColorHistory.length) {\n return {\n ...prev,\n statusBarColor: prev.statusBarColorHistory[newIndex],\n statusBarColorIndex: newIndex\n }\n }\n return prev\n })\n }, [])\n\n const setDefaultStatusBarColor = useCallback(() => {\n setState({\n statusBarColor: defaultColor,\n statusBarColorHistory: [defaultColor],\n statusBarColorIndex: 0\n })\n }, [defaultColor])\n\n useEffect(() => {\n setState({\n statusBarColor: defaultColor,\n statusBarColorHistory: [defaultColor],\n statusBarColorIndex: 0\n })\n }, [defaultColor])\n\n return {\n statusBarColor: state.statusBarColor,\n changeStatusBarColor,\n historyStatusBarColor,\n setDefaultStatusBarColor,\n statusBarColorIndex: state.statusBarColorIndex\n }\n}\n\n/**\n * Custom hook to manage background images with history.\n */\ntype BgImageState = {\n bgImage: string | null\n bgImageHistory: (string | null)[]\n bgImageIndex: number\n}\n\nexport const useBgImage = (defaultImage: string | null) => {\n const [state, setState] = useState<BgImageState>({\n bgImage: defaultImage,\n bgImageHistory: [defaultImage],\n bgImageIndex: 0\n })\n\n const changeBgImage = useCallback((image: string | null) => {\n setState(prev => {\n const newHistory = [...prev.bgImageHistory.slice(0, prev.bgImageIndex + 1), image]\n return {\n bgImage: image,\n bgImageHistory: newHistory,\n bgImageIndex: newHistory.length - 1\n }\n })\n }, [])\n\n const historyBgImage = useCallback((steps: number) => {\n setState(prev => {\n const newIndex = prev.bgImageIndex + steps\n if (newIndex >= 0 && newIndex < prev.bgImageHistory.length) {\n return {\n ...prev,\n bgImage: prev.bgImageHistory[newIndex],\n bgImageIndex: newIndex\n }\n }\n return prev\n })\n }, [])\n\n const setDefaultBgImage = useCallback(() => {\n setState({\n bgImage: defaultImage,\n bgImageHistory: [defaultImage],\n bgImageIndex: 0\n })\n }, [defaultImage])\n\n useEffect(() => {\n setState({\n bgImage: defaultImage,\n bgImageHistory: [defaultImage],\n bgImageIndex: 0\n })\n }, [defaultImage])\n\n return {\n bgImage: state.bgImage,\n changeBgImage,\n historyBgImage,\n setDefaultBgImage,\n bgImageIndex: state.bgImageIndex\n }\n}\n\ntype TitleState = {\n title: string | null\n titleHistory: (string | null)[]\n titleIndex: number\n}\n/**\n * Custom hook to manage the document title with history tracking.\n */\nconst useTitle = (defaultTitle: string | null) => {\n const [state, setState] = useState<TitleState>({\n title: defaultTitle,\n titleHistory: [defaultTitle],\n titleIndex: 0\n })\n\n const changeTitle = useCallback((newTitle: string | null) => {\n setState(prev => {\n const newHistory = [...prev.titleHistory.slice(0, prev.titleIndex + 1), newTitle]\n return {\n title: newTitle,\n titleHistory: newHistory,\n titleIndex: newHistory.length - 1\n }\n })\n }, [])\n\n const setHistoryTitle = useCallback((steps: number) => {\n setState(prev => {\n const newIndex = prev.titleIndex + steps\n if (newIndex >= 0 && newIndex < prev.titleHistory.length) {\n return {\n ...prev,\n title: prev.titleHistory[newIndex],\n titleIndex: newIndex\n }\n }\n return prev\n })\n }, [])\n\n const setDefaultTitle = useCallback(() => {\n setState({\n title: defaultTitle,\n titleHistory: [defaultTitle],\n titleIndex: 0\n })\n }, [defaultTitle])\n\n useEffect(() => {\n setState({\n title: defaultTitle,\n titleHistory: [defaultTitle],\n titleIndex: 0\n })\n }, [defaultTitle])\n\n return {\n title: state.title,\n titleIndex: state.titleIndex,\n titleHistory: state.titleHistory,\n changeTitle,\n setHistoryTitle,\n setDefaultTitle\n }\n}\n\n/**\n * Custom hook to manage a description with history tracking.\n */\ntype DescriptionState = {\n description: string\n descriptionHistory: string[]\n descriptionIndex: number\n}\n\nexport const useDescription = (defaultDescription: string) => {\n const [state, setState] = useState<DescriptionState>({\n description: defaultDescription,\n descriptionHistory: [defaultDescription],\n descriptionIndex: 0\n })\n\n const changeDescription = useCallback((newDescription: string) => {\n setState(prev => {\n const newHistory = [...prev.descriptionHistory.slice(0, prev.descriptionIndex + 1), newDescription]\n return {\n description: newDescription,\n descriptionHistory: newHistory,\n descriptionIndex: newHistory.length - 1\n }\n })\n }, [])\n\n const historyDescription = useCallback((steps: number) => {\n setState(prev => {\n const newIndex = prev.descriptionIndex + steps\n if (newIndex >= 0 && newIndex < prev.descriptionHistory.length) {\n return {\n ...prev,\n description: prev.descriptionHistory[newIndex],\n descriptionIndex: newIndex\n }\n }\n return prev\n })\n }, [])\n\n const setDefaultDescription = useCallback(() => {\n setState({\n description: defaultDescription,\n descriptionHistory: [defaultDescription],\n descriptionIndex: 0\n })\n }, [defaultDescription])\n\n useEffect(() => {\n setState({\n description: defaultDescription,\n descriptionHistory: [defaultDescription],\n descriptionIndex: 0\n })\n }, [defaultDescription])\n\n return {\n description: state.description,\n changeDescription,\n historyDescription,\n setDefaultDescription,\n descriptionIndex: state.descriptionIndex\n }\n}\n","import { addGridTransition } from '@local/styles/add';\nimport { JeneseiPalette } from '@local/theme';\n\nimport { css, styled } from 'styled-components';\n\nimport { ScreenWidthProps } from '../context-screen-width';\nimport { ProviderAppOutletChildrenProps, ProviderAppOutletProps, ProviderAppWrapperProps } from '.';\n\nexport const ProviderAppWrapper = styled.div<ProviderAppWrapperProps>`\n display: flex;\n flex-direction: column;\n max-width: 100dvw;\n min-height: 100dvh;\n width: 100%;\n overflow: hidden;\n position: relative;\n\n background-color: ${(props) => JeneseiPalette[props.$bgColor]};\n background-image: url(${(props) => props.$bgImage});\n`;\n\nconst generateGridTemplateAreas = (props: ProviderAppOutletProps) => {\n let templateAreas = `\n \"notification notification notification\"\n \"header header header\"\n \"nav nav nav\"\n \"leftAside children rightAside\"\n \"footer footer footer\"\n `;\n\n templateAreas = `\n \"notification notification notification\"\n \"${props.$leftAside?.isTopHeader ? 'leftAside' : 'header'} header ${props.$rightAside?.isTopHeader ? 'rightAside' : 'header'}\"\n \"${props.$leftAside?.isTopHeader ? 'leftAside' : props.$leftAside?.isTopNav ? 'leftAside' : 'nav'} nav ${props.$rightAside?.isTopHeader ? 'rightAside' : props.$rightAside?.isTopNav ? 'rightAside' : 'nav'}\"\n \"leftAside children rightAside\"\n \"${props.$leftAside?.isTopFooter ? 'leftAside' : 'footer'} footer ${props.$rightAside?.isTopFooter ? 'rightAside' : 'footer'}\"\n `;\n\n return templateAreas;\n};\n\nfunction toStyledAppOutletCSS(props: {\n leftAsideWidth: string;\n rightAsideWidth: string;\n notificationHeight: string;\n headerHeight: string;\n navHeight: string;\n footerHeight: string;\n}) {\n return css`\n grid-template-columns: ${() => `${props.leftAsideWidth} 1fr ${props.rightAsideWidth}`};\n grid-template-rows: ${() =>\n `${props.notificationHeight} ${props.headerHeight} ${props.navHeight} 1fr ${props.footerHeight}`};\n `;\n}\nconst addSXAppOutlet = css<ProviderAppOutletProps>`\n ${(props) => {\n const leftAsideWidth = props.$leftAside?.length?.default;\n const rightAsideWidth = props.$rightAside?.length?.default;\n const notificationHeight = props.$notification?.length?.default;\n const headerHeight = props.$header?.length?.default;\n const navHeight = props.$nav?.length?.default;\n const footerHeight = props.$footer?.length?.default;\n return toStyledAppOutletCSS({\n leftAsideWidth: leftAsideWidth ?? '0px',\n rightAsideWidth: rightAsideWidth ?? '0px',\n notificationHeight: notificationHeight ?? '0px',\n headerHeight: headerHeight ?? '0px',\n navHeight: navHeight ?? '0px',\n footerHeight: footerHeight ?? '0px',\n });\n }}\n ${(props) => {\n const leftAsideWidth = props.$leftAside?.length;\n const rightAsideWidth = props.$rightAside?.length;\n const notificationHeight = props.$notification?.length;\n const headerHeight = props.$header?.length;\n const navHeight = props.$nav?.length;\n const footerHeight = props.$footer?.length;\n\n return Object.entries(props.theme.screens)\n .filter(([key]) => key !== 'default')\n .map(([key]) => {\n const deviceKey = key as keyof ScreenWidthProps<string | null>;\n const screenWidth = props.theme.screens[deviceKey]?.width;\n if (!screenWidth) return null;\n return css`\n @media (max-width: ${screenWidth}px) {\n ${toStyledAppOutletCSS({\n leftAsideWidth: leftAsideWidth && leftAsideWidth[deviceKey] ? leftAsideWidth[deviceKey] : '0px',\n rightAsideWidth: rightAsideWidth && rightAsideWidth[deviceKey] ? rightAsideWidth[deviceKey] : '0px',\n notificationHeight:\n notificationHeight && notificationHeight[deviceKey] ? notificationHeight[deviceKey] : '0px',\n headerHeight: headerHeight && headerHeight[deviceKey] ? headerHeight[deviceKey] : '0px',\n navHeight: navHeight && navHeight[deviceKey] ? navHeight[deviceKey] : '0px',\n footerHeight: footerHeight && footerHeight[deviceKey] ? footerHeight[deviceKey] : '0px',\n })}\n }\n `;\n });\n }}\n`;\nexport const ProviderAppOutlet = styled.div<ProviderAppOutletProps>`\n display: grid;\n width: 100%;\n height: 100%;\n\n overflow-y: auto;\n overflow-x: hidden;\n scrollbar-gutter: stable;\n \n min-height: 100dvh;\n max-height: 100dvh;\n \n ${addGridTransition};\n\n ${(props) => `\n grid-template-areas: ${generateGridTemplateAreas(props)};\n `}\n\n ${addSXAppOutlet};\n`;\n\nexport const ProviderAppOutletChildren = styled.main<ProviderAppOutletChildrenProps>`\n z-index: ${(props) => props?.$main?.zIndex ?? 'auto'};\n display: flex;\n grid-area: children;\n max-width: 100%;\n max-height: 100%;\n overflow: ${(props) => (props.$isScrollOutlet ? 'auto' : 'visible')};\n scrollbar-gutter: stable;\n`;\n\nexport const ProviderAppOutletNotification = styled.section<ProviderAppOutletProps>`\n z-index: ${(props) => props?.$notification?.zIndex ?? 'auto'};\n grid-area: notification;\n display: flex;\n`;\n\nexport const ProviderAppOutletHeader = styled.header<ProviderAppOutletProps>`\n z-index: ${(props) => props?.$header?.zIndex ?? 'auto'};\n grid-area: header;\n display: flex;\n`;\n\nexport const ProviderAppOutletFooter = styled.footer<ProviderAppOutletProps>`\n z-index: ${(props) => props?.$footer?.zIndex ?? 'auto'};\n grid-area: footer;\n display: flex;\n`;\n\nexport const ProviderAppOutletNav = styled.nav<ProviderAppOutletProps>`\n z-index: ${(props) => props?.$nav?.zIndex ?? 'auto'};\n grid-area: nav;\n display: flex;\n`;\n\nexport const ProviderAppOutletLeftAside = styled.aside<ProviderAppOutletProps>`\n z-index: ${(props) => props?.$leftAside?.zIndex ?? 'auto'};\n grid-area: leftAside;\n display: flex;\n`;\n\nexport const ProviderAppOutletRightAside = styled.aside<ProviderAppOutletProps>`\n z-index: ${(props) => props?.$rightAside?.zIndex ?? 'auto'};\n grid-area: rightAside;\n display: flex;\n`;\n","import { useContext } from 'react'\n\nimport { AppContext } from '.'\n\n/**\n * Custom hook to access the AppContext.\n */\nexport const useApp = () => {\n const context = useContext(AppContext)\n if (!context) {\n throw new Error('useApp must be used within an ProviderApp')\n }\n return context\n}\n"],"names":["jsxs","jsx","_a"],"mappings":";;;;;;;AAoBO,MAAM,aAAa,cAAsC,IAAI;AA0B7D,MAAM,cAAoC,CAAA,UAAS;;AACxD,QAAM,EAAE,SAAS,eAAe,gBAAgB,sBAAsB,WAAW,MAAM,cAAc;AACrG,QAAM,EAAE,gBAAgB,sBAAsB,uBAAuB,6BAA6B;AAAA,IAChG,MAAM;AAAA,EAAA;AAER,QAAM,EAAE,SAAS,eAAe,gBAAgB,sBAAsB,WAAW,MAAM,kBAAkB,IAAI;AAC7G,QAAM,EAAE,OAAO,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2C;AAAA,EAAA;AAE7D,SAAO;AACT;"}
1
+ {"version":3,"file":"context.hooks-kga1DMrX.js","sources":["../src/contexts/context-app/context.tsx","../src/contexts/context-app/context.styles.ts","../src/contexts/context-app/context.hooks.ts"],"sourcesContent":["import { Preview, PreviewAdditionalProps } from '@local/areas/preview'\nimport { IThemePaletteKeys, JeneseiPalette } from '@local/theme'\n\nimport { createContext, FC, useCallback, useEffect, useState } from 'react'\n\nimport { useScreenWidth } from '../context-screen-width'\nimport {\n AppContextProps,\n ProviderAppOutlet,\n ProviderAppOutletChildren,\n ProviderAppOutletFooter,\n ProviderAppOutletHeader,\n ProviderAppOutletLeftAside,\n ProviderAppOutletNav,\n ProviderAppOutletNotification,\n ProviderAppOutletRightAside,\n ProviderAppProps,\n ProviderAppWrapper\n} from '.'\n\nexport const AppContext = createContext<AppContextProps | null>(null)\n\n/**\n * ProviderApp component is a context context that manages various application-level states\n * such as background color, status bar color, background image, title, and description.\n * It uses several custom hooks to handle these states and provides them via the AppContext.\n *\n * @component\n *\n * @param {ProviderAppProps} props - The properties passed to the ProviderApp component.\n * @param {string} props.defaultBgColor - The default background color.\n * @param {string} props.defaultStatusBarColor - The default status bar color.\n * @param {string} [props.defaultBgImage] - The default background image.\n * @param {string} [props.defaultTitle] - The default title.\n * @param {string} [props.defaultDescription] - The default description.\n * @param {boolean} [props.isScrollOutlet] - Determines if the outlet should be scrollable.\n * @param {object} [props.footer] - The footer component and its properties.\n * @param {object} [props.notification] - The notification component and its properties.\n * @param {object} [props.header] - The header component and its properties.\n * @param {object} [props.nav] - The navigation component and its properties.\n * @param {object} [props.leftAside] - The left aside component and its properties.\n * @param {object} [props.rightAside] - The right aside component and its properties.\n * @param {React.ReactNode} props.children - The children components to be rendered inside the ProviderApp.\n *\n * @returns {JSX.Element} The rendered ProviderApp component.\n */\nexport const ProviderApp: FC<ProviderAppProps> = props => {\n const { bgColor, changeBgColor, historyBgColor, setDefaultBgColor } = useBgColor(props.defaultBgColor)\n const { statusBarColor, changeStatusBarColor, historyStatusBarColor, setDefaultStatusBarColor } = useStatusBarColor(\n props.defaultStatusBarColor\n )\n const { bgImage, changeBgImage, historyBgImage, setDefaultBgImage } = useBgImage(props.defaultBgImage || null)\n const { title, changeTitle, setHistoryTitle, setDefaultTitle } = useTitle(props.defaultTitle || null)\n const { description, changeDescription, historyDescription, setDefaultDescription } = useDescription(\n props.defaultDescription\n )\n const { changePreview, previewProps } = usePreview(props.defaultPreview)\n const { screenActual } = useScreenWidth()\n\n return (\n <AppContext.Provider\n value={{\n changePreview,\n changeStatusBarColor,\n changeBgColor,\n changeBgImage,\n changeTitle,\n changeDescription,\n historyStatusBarColor,\n historyBgColor,\n historyBgImage,\n setHistoryTitle,\n historyDescription,\n setDefaultStatusBarColor,\n setDefaultBgColor,\n setDefaultBgImage,\n setDefaultTitle,\n setDefaultDescription\n }}\n >\n <title>{title}</title>\n <meta name=\"description\" content={description} />\n <meta name=\"theme-color\" content={JeneseiPalette[statusBarColor]} />\n <meta name=\"apple-mobile-web-app-status-bar-style\" content=\"default\" />\n <meta name=\"mobile-web-app-capable\" content=\"yes\" />\n <Preview {...previewProps}>\n <ProviderAppWrapper $bgColor={bgColor} $bgImage={bgImage}>\n <ProviderAppOutlet\n $isScrollOutlet={props.isScrollOutlet}\n $footer={props.footer}\n $notification={props.notification}\n $header={props.header}\n $nav={props.nav}\n $leftAside={props.leftAside}\n $rightAside={props.rightAside}\n >\n {props.notification?.length && props.notification?.length?.[screenActual] ? (\n <ProviderAppOutletNotification $notification={props.notification}>\n {props.notification?.component || null}\n </ProviderAppOutletNotification>\n ) : null}\n\n {props.header?.length && props.header?.length?.[screenActual] ? (\n <ProviderAppOutletHeader $header={props.header}>\n {props.header?.component || null}\n </ProviderAppOutletHeader>\n ) : null}\n\n {props.nav?.length && props.nav?.length?.[screenActual] ? (\n <ProviderAppOutletNav $nav={props.nav}>{props.nav?.component || null}</ProviderAppOutletNav>\n ) : null}\n\n {props.leftAside?.length && props.leftAside?.length?.[screenActual] ? (\n <ProviderAppOutletLeftAside $leftAside={props.leftAside}>\n {props.leftAside?.component || null}\n </ProviderAppOutletLeftAside>\n ) : null}\n\n <ProviderAppOutletChildren $isScrollOutlet={props.isScrollOutlet} $main={props.main}>{props.children}</ProviderAppOutletChildren>\n\n {props.rightAside?.length && props.rightAside?.length?.[screenActual] ? (\n <ProviderAppOutletRightAside $rightAside={props.rightAside}>\n {props.rightAside?.component || null}\n </ProviderAppOutletRightAside>\n ) : null}\n\n {props.footer?.length && props.footer?.length?.[screenActual] ? (\n <ProviderAppOutletFooter $footer={props.footer}>\n {props.footer?.component || null}\n </ProviderAppOutletFooter>\n ) : null}\n </ProviderAppOutlet>\n </ProviderAppWrapper>\n </Preview>\n </AppContext.Provider>\n )\n}\n\n/**\n * Custom hook to manage preview properties.\n */\nconst usePreview = (defaultPreview: ProviderAppProps['defaultPreview']) => {\n const [previewProps, setPreviewProps] = useState(defaultPreview || { visible: true, defaultVisible: true })\n\n const changePreview = useCallback((newPreviewProps: PreviewAdditionalProps) => {\n setPreviewProps(newPreviewProps)\n }, [])\n\n useEffect(() => {\n if (defaultPreview) setPreviewProps(defaultPreview)\n }, [defaultPreview])\n\n return { previewProps, changePreview }\n}\n\n/**\n * Custom hook to manage background color state with history tracking.\n */\ntype BgColorState = {\n bgColor: IThemePaletteKeys\n bgColorHistory: IThemePaletteKeys[]\n bgColorIndex: number\n}\n\nexport const useBgColor = (defaultColor: IThemePaletteKeys) => {\n const [state, setState] = useState<BgColorState>({\n bgColor: defaultColor,\n bgColorHistory: [defaultColor],\n bgColorIndex: 0\n })\n\n const changeBgColor = useCallback((color: IThemePaletteKeys) => {\n setState(prev => {\n const newHistory = [...prev.bgColorHistory.slice(0, prev.bgColorIndex + 1), color]\n return {\n bgColor: color,\n bgColorHistory: newHistory,\n bgColorIndex: newHistory.length - 1\n }\n })\n }, [])\n\n const historyBgColor = useCallback((steps: number) => {\n setState(prev => {\n const newIndex = prev.bgColorIndex + steps\n if (newIndex >= 0 && newIndex < prev.bgColorHistory.length) {\n return {\n ...prev,\n bgColor: prev.bgColorHistory[newIndex],\n bgColorIndex: newIndex\n }\n }\n return prev\n })\n }, [])\n\n const setDefaultBgColor = useCallback(() => {\n setState({\n bgColor: defaultColor,\n bgColorHistory: [defaultColor],\n bgColorIndex: 0\n })\n }, [defaultColor])\n\n useEffect(() => {\n setState({\n bgColor: defaultColor,\n bgColorHistory: [defaultColor],\n bgColorIndex: 0\n })\n }, [defaultColor])\n\n return {\n bgColor: state.bgColor,\n changeBgColor,\n historyBgColor,\n setDefaultBgColor,\n bgColorIndex: state.bgColorIndex\n }\n}\n\n/**\n * Custom hook to manage the status bar color with history tracking.\n */\ntype StatusBarColorState = {\n statusBarColor: IThemePaletteKeys\n statusBarColorHistory: IThemePaletteKeys[]\n statusBarColorIndex: number\n}\n\nexport const useStatusBarColor = (defaultColor: IThemePaletteKeys) => {\n const [state, setState] = useState<StatusBarColorState>({\n statusBarColor: defaultColor,\n statusBarColorHistory: [defaultColor],\n statusBarColorIndex: 0\n })\n\n const changeStatusBarColor = useCallback((color: IThemePaletteKeys) => {\n setState(prev => {\n const newHistory = [...prev.statusBarColorHistory.slice(0, prev.statusBarColorIndex + 1), color]\n return {\n statusBarColor: color,\n statusBarColorHistory: newHistory,\n statusBarColorIndex: newHistory.length - 1\n }\n })\n }, [])\n\n const historyStatusBarColor = useCallback((steps: number) => {\n setState(prev => {\n const newIndex = prev.statusBarColorIndex + steps\n if (newIndex >= 0 && newIndex < prev.statusBarColorHistory.length) {\n return {\n ...prev,\n statusBarColor: prev.statusBarColorHistory[newIndex],\n statusBarColorIndex: newIndex\n }\n }\n return prev\n })\n }, [])\n\n const setDefaultStatusBarColor = useCallback(() => {\n setState({\n statusBarColor: defaultColor,\n statusBarColorHistory: [defaultColor],\n statusBarColorIndex: 0\n })\n }, [defaultColor])\n\n useEffect(() => {\n setState({\n statusBarColor: defaultColor,\n statusBarColorHistory: [defaultColor],\n statusBarColorIndex: 0\n })\n }, [defaultColor])\n\n return {\n statusBarColor: state.statusBarColor,\n changeStatusBarColor,\n historyStatusBarColor,\n setDefaultStatusBarColor,\n statusBarColorIndex: state.statusBarColorIndex\n }\n}\n\n/**\n * Custom hook to manage background images with history.\n */\ntype BgImageState = {\n bgImage: string | null\n bgImageHistory: (string | null)[]\n bgImageIndex: number\n}\n\nexport const useBgImage = (defaultImage: string | null) => {\n const [state, setState] = useState<BgImageState>({\n bgImage: defaultImage,\n bgImageHistory: [defaultImage],\n bgImageIndex: 0\n })\n\n const changeBgImage = useCallback((image: string | null) => {\n setState(prev => {\n const newHistory = [...prev.bgImageHistory.slice(0, prev.bgImageIndex + 1), image]\n return {\n bgImage: image,\n bgImageHistory: newHistory,\n bgImageIndex: newHistory.length - 1\n }\n })\n }, [])\n\n const historyBgImage = useCallback((steps: number) => {\n setState(prev => {\n const newIndex = prev.bgImageIndex + steps\n if (newIndex >= 0 && newIndex < prev.bgImageHistory.length) {\n return {\n ...prev,\n bgImage: prev.bgImageHistory[newIndex],\n bgImageIndex: newIndex\n }\n }\n return prev\n })\n }, [])\n\n const setDefaultBgImage = useCallback(() => {\n setState({\n bgImage: defaultImage,\n bgImageHistory: [defaultImage],\n bgImageIndex: 0\n })\n }, [defaultImage])\n\n useEffect(() => {\n setState({\n bgImage: defaultImage,\n bgImageHistory: [defaultImage],\n bgImageIndex: 0\n })\n }, [defaultImage])\n\n return {\n bgImage: state.bgImage,\n changeBgImage,\n historyBgImage,\n setDefaultBgImage,\n bgImageIndex: state.bgImageIndex\n }\n}\n\ntype TitleState = {\n title: string | null\n titleHistory: (string | null)[]\n titleIndex: number\n}\n/**\n * Custom hook to manage the document title with history tracking.\n */\nconst useTitle = (defaultTitle: string | null) => {\n const [state, setState] = useState<TitleState>({\n title: defaultTitle,\n titleHistory: [defaultTitle],\n titleIndex: 0\n })\n\n const changeTitle = useCallback((newTitle: string | null) => {\n setState(prev => {\n const newHistory = [...prev.titleHistory.slice(0, prev.titleIndex + 1), newTitle]\n return {\n title: newTitle,\n titleHistory: newHistory,\n titleIndex: newHistory.length - 1\n }\n })\n }, [])\n\n const setHistoryTitle = useCallback((steps: number) => {\n setState(prev => {\n const newIndex = prev.titleIndex + steps\n if (newIndex >= 0 && newIndex < prev.titleHistory.length) {\n return {\n ...prev,\n title: prev.titleHistory[newIndex],\n titleIndex: newIndex\n }\n }\n return prev\n })\n }, [])\n\n const setDefaultTitle = useCallback(() => {\n setState({\n title: defaultTitle,\n titleHistory: [defaultTitle],\n titleIndex: 0\n })\n }, [defaultTitle])\n\n useEffect(() => {\n setState({\n title: defaultTitle,\n titleHistory: [defaultTitle],\n titleIndex: 0\n })\n }, [defaultTitle])\n\n return {\n title: state.title,\n titleIndex: state.titleIndex,\n titleHistory: state.titleHistory,\n changeTitle,\n setHistoryTitle,\n setDefaultTitle\n }\n}\n\n/**\n * Custom hook to manage a description with history tracking.\n */\ntype DescriptionState = {\n description: string\n descriptionHistory: string[]\n descriptionIndex: number\n}\n\nexport const useDescription = (defaultDescription: string) => {\n const [state, setState] = useState<DescriptionState>({\n description: defaultDescription,\n descriptionHistory: [defaultDescription],\n descriptionIndex: 0\n })\n\n const changeDescription = useCallback((newDescription: string) => {\n setState(prev => {\n const newHistory = [...prev.descriptionHistory.slice(0, prev.descriptionIndex + 1), newDescription]\n return {\n description: newDescription,\n descriptionHistory: newHistory,\n descriptionIndex: newHistory.length - 1\n }\n })\n }, [])\n\n const historyDescription = useCallback((steps: number) => {\n setState(prev => {\n const newIndex = prev.descriptionIndex + steps\n if (newIndex >= 0 && newIndex < prev.descriptionHistory.length) {\n return {\n ...prev,\n description: prev.descriptionHistory[newIndex],\n descriptionIndex: newIndex\n }\n }\n return prev\n })\n }, [])\n\n const setDefaultDescription = useCallback(() => {\n setState({\n description: defaultDescription,\n descriptionHistory: [defaultDescription],\n descriptionIndex: 0\n })\n }, [defaultDescription])\n\n useEffect(() => {\n setState({\n description: defaultDescription,\n descriptionHistory: [defaultDescription],\n descriptionIndex: 0\n })\n }, [defaultDescription])\n\n return {\n description: state.description,\n changeDescription,\n historyDescription,\n setDefaultDescription,\n descriptionIndex: state.descriptionIndex\n }\n}\n","import { addGridTransition } from '@local/styles/add';\nimport { JeneseiPalette } from '@local/theme';\n\nimport { css, styled } from 'styled-components';\n\nimport { ScreenWidthProps } from '../context-screen-width';\nimport { ProviderAppOutletChildrenProps, ProviderAppOutletProps, ProviderAppWrapperProps } from '.';\n\nexport const ProviderAppWrapper = styled.div<ProviderAppWrapperProps>`\n display: flex;\n flex-direction: column;\n max-width: 100dvw;\n min-height: 100dvh;\n width: 100%;\n overflow: hidden;\n position: relative;\n\n background-color: ${(props) => JeneseiPalette[props.$bgColor]};\n background-image: url(${(props) => props.$bgImage});\n`;\n\nconst generateGridTemplateAreas = (props: ProviderAppOutletProps) => {\n let templateAreas = `\n \"notification notification notification\"\n \"header header header\"\n \"nav nav nav\"\n \"leftAside children rightAside\"\n \"footer footer footer\"\n `;\n\n templateAreas = `\n \"notification notification notification\"\n \"${props.$leftAside?.isTopHeader ? 'leftAside' : 'header'} header ${props.$rightAside?.isTopHeader ? 'rightAside' : 'header'}\"\n \"${props.$leftAside?.isTopHeader ? 'leftAside' : props.$leftAside?.isTopNav ? 'leftAside' : 'nav'} nav ${props.$rightAside?.isTopHeader ? 'rightAside' : props.$rightAside?.isTopNav ? 'rightAside' : 'nav'}\"\n \"leftAside children rightAside\"\n \"${props.$leftAside?.isTopFooter ? 'leftAside' : 'footer'} footer ${props.$rightAside?.isTopFooter ? 'rightAside' : 'footer'}\"\n `;\n\n return templateAreas;\n};\n\nfunction toStyledAppOutletCSS(props: {\n leftAsideWidth: string;\n rightAsideWidth: string;\n notificationHeight: string;\n headerHeight: string;\n navHeight: string;\n footerHeight: string;\n}) {\n return css`\n grid-template-columns: ${() => `${props.leftAsideWidth} 1fr ${props.rightAsideWidth}`};\n grid-template-rows: ${() =>\n `${props.notificationHeight} ${props.headerHeight} ${props.navHeight} 1fr ${props.footerHeight}`};\n `;\n}\nconst addSXAppOutlet = css<ProviderAppOutletProps>`\n ${(props) => {\n const leftAsideWidth = props.$leftAside?.length?.default;\n const rightAsideWidth = props.$rightAside?.length?.default;\n const notificationHeight = props.$notification?.length?.default;\n const headerHeight = props.$header?.length?.default;\n const navHeight = props.$nav?.length?.default;\n const footerHeight = props.$footer?.length?.default;\n return toStyledAppOutletCSS({\n leftAsideWidth: leftAsideWidth ?? '0px',\n rightAsideWidth: rightAsideWidth ?? '0px',\n notificationHeight: notificationHeight ?? '0px',\n headerHeight: headerHeight ?? '0px',\n navHeight: navHeight ?? '0px',\n footerHeight: footerHeight ?? '0px',\n });\n }}\n ${(props) => {\n const leftAsideWidth = props.$leftAside?.length;\n const rightAsideWidth = props.$rightAside?.length;\n const notificationHeight = props.$notification?.length;\n const headerHeight = props.$header?.length;\n const navHeight = props.$nav?.length;\n const footerHeight = props.$footer?.length;\n\n return Object.entries(props.theme.screens)\n .filter(([key]) => key !== 'default')\n .map(([key]) => {\n const deviceKey = key as keyof ScreenWidthProps<string | null>;\n const screenWidth = props.theme.screens[deviceKey]?.width;\n if (!screenWidth) return null;\n return css`\n @media (max-width: ${screenWidth}px) {\n ${toStyledAppOutletCSS({\n leftAsideWidth: leftAsideWidth && leftAsideWidth[deviceKey] ? leftAsideWidth[deviceKey] : '0px',\n rightAsideWidth: rightAsideWidth && rightAsideWidth[deviceKey] ? rightAsideWidth[deviceKey] : '0px',\n notificationHeight:\n notificationHeight && notificationHeight[deviceKey] ? notificationHeight[deviceKey] : '0px',\n headerHeight: headerHeight && headerHeight[deviceKey] ? headerHeight[deviceKey] : '0px',\n navHeight: navHeight && navHeight[deviceKey] ? navHeight[deviceKey] : '0px',\n footerHeight: footerHeight && footerHeight[deviceKey] ? footerHeight[deviceKey] : '0px',\n })}\n }\n `;\n });\n }}\n`;\nexport const ProviderAppOutlet = styled.div<ProviderAppOutletProps>`\n display: grid;\n width: 100%;\n height: 100%;\n\n overflow-y: auto;\n overflow-x: hidden;\n scrollbar-gutter: stable;\n \n min-height: 100dvh;\n max-height: 100dvh;\n \n ${addGridTransition};\n\n ${(props) => `\n grid-template-areas: ${generateGridTemplateAreas(props)};\n `}\n\n ${addSXAppOutlet};\n`;\n\nexport const ProviderAppOutletChildren = styled.main<ProviderAppOutletChildrenProps>`\n z-index: ${(props) => props?.$main?.zIndex ?? 'auto'};\n display: flex;\n grid-area: children;\n max-width: 100%;\n max-height: 100%;\n overflow: ${(props) => (props.$isScrollOutlet ? 'auto' : 'visible')};\n scrollbar-gutter: stable;\n`;\n\nexport const ProviderAppOutletNotification = styled.section<ProviderAppOutletProps>`\n z-index: ${(props) => props?.$notification?.zIndex ?? 'auto'};\n grid-area: notification;\n display: flex;\n`;\n\nexport const ProviderAppOutletHeader = styled.header<ProviderAppOutletProps>`\n z-index: ${(props) => props?.$header?.zIndex ?? 'auto'};\n grid-area: header;\n display: flex;\n`;\n\nexport const ProviderAppOutletFooter = styled.footer<ProviderAppOutletProps>`\n z-index: ${(props) => props?.$footer?.zIndex ?? 'auto'};\n grid-area: footer;\n display: flex;\n`;\n\nexport const ProviderAppOutletNav = styled.nav<ProviderAppOutletProps>`\n z-index: ${(props) => props?.$nav?.zIndex ?? 'auto'};\n grid-area: nav;\n display: flex;\n`;\n\nexport const ProviderAppOutletLeftAside = styled.aside<ProviderAppOutletProps>`\n z-index: ${(props) => props?.$leftAside?.zIndex ?? 'auto'};\n grid-area: leftAside;\n display: flex;\n`;\n\nexport const ProviderAppOutletRightAside = styled.aside<ProviderAppOutletProps>`\n z-index: ${(props) => props?.$rightAside?.zIndex ?? 'auto'};\n grid-area: rightAside;\n display: flex;\n`;\n","import { useContext } from 'react'\n\nimport { AppContext } from '.'\n\n/**\n * Custom hook to access the AppContext.\n */\nexport const useApp = () => {\n const context = useContext(AppContext)\n if (!context) {\n throw new Error('useApp must be used within an ProviderApp')\n }\n return context\n}\n"],"names":["jsxs","jsx","_a"],"mappings":";;;;;;;AAoBO,MAAM,aAAa,cAAsC,IAAI;AA0B7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mBAAmB,WAAU;AAAA,CAAM;AAAA;AAAA;AAAA;AAKpD,MAAM,8BAA8B,OAAO;AAAA,aACrC,CAAC,UAAA;;AAAU,+CAAO,gBAAP,mBAAoB,WAAU;AAAA,CAAM;AAAA;AAAA;AAAA;AC7JrD,MAAM,SAAS,MAAM;AAC1B,QAAM,UAAU,WAAW,UAAU;AACrC,MAAI,CAAC,SAAS;AACZ,UAAM,IAAI,MAAM,2CAA2C;AAAA,EAAA;AAE7D,SAAO;AACT;"}
@@ -0,0 +1,2 @@
1
+ "use strict";const e=require("react");require("./jsx-runtime-BcGej2Kr.cjs");const t=require("react-dom");function n(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e)for(const n in e)if("default"!==n){const o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:()=>e[n]})}return t.default=e,Object.freeze(t)}const o=n(e),r=n(t);function i(){return"undefined"!=typeof window}function l(e){return u(e)?(e.nodeName||"").toLowerCase():"#document"}function c(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function s(e){var t;return null==(t=(u(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function u(e){return!!i()&&(e instanceof Node||e instanceof c(e).Node)}function f(e){return!!i()&&(e instanceof Element||e instanceof c(e).Element)}function a(e){return!!i()&&(e instanceof HTMLElement||e instanceof c(e).HTMLElement)}function d(e){return!(!i()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof c(e).ShadowRoot)}function m(e){const{overflow:t,overflowX:n,overflowY:o,display:r}=w(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&!["inline","contents"].includes(r)}function p(e){return["table","td","th"].includes(l(e))}function g(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch(n){return!1}})}function h(e){const t=y(),n=f(e)?w(e):e;return["transform","translate","scale","rotate","perspective"].some(e=>!!n[e]&&"none"!==n[e])||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||["transform","translate","scale","rotate","perspective","filter"].some(e=>(n.willChange||"").includes(e))||["paint","layout","strict","content"].some(e=>(n.contain||"").includes(e))}function y(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function x(e){return["html","body","#document"].includes(l(e))}function w(e){return c(e).getComputedStyle(e)}function v(e){return f(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function b(e){if("html"===l(e))return e;const t=e.assignedSlot||e.parentNode||d(e)&&e.host||s(e);return d(t)?t.host:t}function R(e){const t=b(e);return x(t)?e.ownerDocument?e.ownerDocument.body:e.body:a(t)&&m(t)?t:R(t)}function E(e,t,n){var o;void 0===t&&(t=[]),void 0===n&&(n=!0);const r=R(e),i=r===(null==(o=e.ownerDocument)?void 0:o.body),l=c(r);if(i){const e=C(l);return t.concat(l,l.visualViewport||[],m(r)?r:[],e&&n?E(e):[])}return t.concat(r,E(r,[],n))}function C(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const S=Math.min,L=Math.max,T=Math.round,O=Math.floor,A=e=>({x:e,y:e}),M={left:"right",right:"left",bottom:"top",top:"bottom"},P={start:"end",end:"start"};function D(e,t,n){return L(e,S(t,n))}function k(e,t){return"function"==typeof e?e(t):e}function F(e){return e.split("-")[0]}function B(e){return e.split("-")[1]}function V(e){return"x"===e?"y":"x"}function j(e){return"y"===e?"height":"width"}function N(e){return["top","bottom"].includes(F(e))?"y":"x"}function H(e){return V(N(e))}function W(e){return e.replace(/start|end/g,e=>P[e])}function I(e){return e.replace(/left|right|bottom|top/g,e=>M[e])}function z(e){const{x:t,y:n,width:o,height:r}=e;return{width:o,height:r,top:n,left:t,right:t+o,bottom:n+r,x:t,y:n}}var _="undefined"!=typeof document?e.useLayoutEffect:function(){};const q={...o}.useInsertionEffect||(e=>e());function $(e,t,n){let{reference:o,floating:r}=e;const i=N(t),l=H(t),c=j(l),s=F(t),u="y"===i,f=o.x+o.width/2-r.width/2,a=o.y+o.height/2-r.height/2,d=o[c]/2-r[c]/2;let m;switch(s){case"top":m={x:f,y:o.y-r.height};break;case"bottom":m={x:f,y:o.y+o.height};break;case"right":m={x:o.x+o.width,y:a};break;case"left":m={x:o.x-r.width,y:a};break;default:m={x:o.x,y:o.y}}switch(B(t)){case"start":m[l]-=d*(n&&u?-1:1);break;case"end":m[l]+=d*(n&&u?-1:1)}return m}async function U(e,t){var n;void 0===t&&(t={});const{x:o,y:r,platform:i,rects:l,elements:c,strategy:s}=e,{boundary:u="clippingAncestors",rootBoundary:f="viewport",elementContext:a="floating",altBoundary:d=!1,padding:m=0}=k(t,e),p=function(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}(m),g=c[d?"floating"===a?"reference":"floating":a],h=z(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(g)))||n?g:g.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(c.floating)),boundary:u,rootBoundary:f,strategy:s})),y="floating"===a?{x:o,y:r,width:l.floating.width,height:l.floating.height}:l.reference,x=await(null==i.getOffsetParent?void 0:i.getOffsetParent(c.floating)),w=await(null==i.isElement?void 0:i.isElement(x))&&await(null==i.getScale?void 0:i.getScale(x))||{x:1,y:1},v=z(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:y,offsetParent:x,strategy:s}):y);return{top:(h.top-v.top+p.top)/w.y,bottom:(v.bottom-h.bottom+p.bottom)/w.y,left:(h.left-v.left+p.left)/w.x,right:(v.right-h.right+p.right)/w.x}}function X(e){const t=w(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const r=a(e),i=r?e.offsetWidth:n,l=r?e.offsetHeight:o,c=T(n)!==i||T(o)!==l;return c&&(n=i,o=l),{width:n,height:o,$:c}}function Y(e){return f(e)?e:e.contextElement}function G(e){const t=Y(e);if(!a(t))return A(1);const n=t.getBoundingClientRect(),{width:o,height:r,$:i}=X(t);let l=(i?T(n.width):n.width)/o,c=(i?T(n.height):n.height)/r;return l&&Number.isFinite(l)||(l=1),c&&Number.isFinite(c)||(c=1),{x:l,y:c}}const J=A(0);function K(e){const t=c(e);return y()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:J}function Q(e,t,n,o){void 0===t&&(t=!1),void 0===n&&(n=!1);const r=e.getBoundingClientRect(),i=Y(e);let l=A(1);t&&(o?f(o)&&(l=G(o)):l=G(e));const s=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==c(e))&&t}(i,n,o)?K(i):A(0);let u=(r.left+s.x)/l.x,a=(r.top+s.y)/l.y,d=r.width/l.x,m=r.height/l.y;if(i){const e=c(i),t=o&&f(o)?c(o):o;let n=e,r=C(n);for(;r&&o&&t!==n;){const e=G(r),t=r.getBoundingClientRect(),o=w(r),i=t.left+(r.clientLeft+parseFloat(o.paddingLeft))*e.x,l=t.top+(r.clientTop+parseFloat(o.paddingTop))*e.y;u*=e.x,a*=e.y,d*=e.x,m*=e.y,u+=i,a+=l,n=c(r),r=C(n)}}return z({width:d,height:m,x:u,y:a})}function Z(e,t){const n=v(e).scrollLeft;return t?t.left+n:Q(s(e)).left+n}function ee(e,t,n){void 0===n&&(n=!1);const o=e.getBoundingClientRect();return{x:o.left+t.scrollLeft-(n?0:Z(e,o)),y:o.top+t.scrollTop}}function te(e,t,n){let o;if("viewport"===t)o=function(e,t){const n=c(e),o=s(e),r=n.visualViewport;let i=o.clientWidth,l=o.clientHeight,u=0,f=0;if(r){i=r.width,l=r.height;const e=y();(!e||e&&"fixed"===t)&&(u=r.offsetLeft,f=r.offsetTop)}return{width:i,height:l,x:u,y:f}}(e,n);else if("document"===t)o=function(e){const t=s(e),n=v(e),o=e.ownerDocument.body,r=L(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),i=L(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let l=-n.scrollLeft+Z(e);const c=-n.scrollTop;return"rtl"===w(o).direction&&(l+=L(t.clientWidth,o.clientWidth)-r),{width:r,height:i,x:l,y:c}}(s(e));else if(f(t))o=function(e,t){const n=Q(e,!0,"fixed"===t),o=n.top+e.clientTop,r=n.left+e.clientLeft,i=a(e)?G(e):A(1);return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:r*i.x,y:o*i.y}}(t,n);else{const n=K(e);o={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return z(o)}function ne(e,t){const n=b(e);return!(n===t||!f(n)||x(n))&&("fixed"===w(n).position||ne(n,t))}function oe(e,t,n){const o=a(t),r=s(t),i="fixed"===n,c=Q(e,!0,i,t);let u={scrollLeft:0,scrollTop:0};const f=A(0);function d(){f.x=Z(r)}if(o||!o&&!i)if(("body"!==l(t)||m(r))&&(u=v(t)),o){const e=Q(t,!0,i,t);f.x=e.x+t.clientLeft,f.y=e.y+t.clientTop}else r&&d();i&&!o&&r&&d();const p=!r||o||i?A(0):ee(r,u);return{x:c.left+u.scrollLeft-f.x-p.x,y:c.top+u.scrollTop-f.y-p.y,width:c.width,height:c.height}}function re(e){return"static"===w(e).position}function ie(e,t){if(!a(e)||"fixed"===w(e).position)return null;if(t)return t(e);let n=e.offsetParent;return s(e)===n&&(n=n.ownerDocument.body),n}function le(e,t){const n=c(e);if(g(e))return n;if(!a(e)){let t=b(e);for(;t&&!x(t);){if(f(t)&&!re(t))return t;t=b(t)}return n}let o=ie(e,t);for(;o&&p(o)&&re(o);)o=ie(o,t);return o&&x(o)&&re(o)&&!h(o)?n:o||function(e){let t=b(e);for(;a(t)&&!x(t);){if(h(t))return t;if(g(t))return null;t=b(t)}return null}(e)||n}const ce={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:o,strategy:r}=e;const i="fixed"===r,c=s(o),u=!!t&&g(t.floating);if(o===c||u&&i)return n;let f={scrollLeft:0,scrollTop:0},d=A(1);const p=A(0),h=a(o);if((h||!h&&!i)&&(("body"!==l(o)||m(c))&&(f=v(o)),a(o))){const e=Q(o);d=G(o),p.x=e.x+o.clientLeft,p.y=e.y+o.clientTop}const y=!c||h||i?A(0):ee(c,f,!0);return{width:n.width*d.x,height:n.height*d.y,x:n.x*d.x-f.scrollLeft*d.x+p.x+y.x,y:n.y*d.y-f.scrollTop*d.y+p.y+y.y}},getDocumentElement:s,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:o,strategy:r}=e;const i=[..."clippingAncestors"===n?g(t)?[]:function(e,t){const n=t.get(e);if(n)return n;let o=E(e,[],!1).filter(e=>f(e)&&"body"!==l(e)),r=null;const i="fixed"===w(e).position;let c=i?b(e):e;for(;f(c)&&!x(c);){const t=w(c),n=h(c);n||"fixed"!==t.position||(r=null),(i?!n&&!r:!n&&"static"===t.position&&r&&["absolute","fixed"].includes(r.position)||m(c)&&!n&&ne(e,c))?o=o.filter(e=>e!==c):r=t,c=b(c)}return t.set(e,o),o}(t,this._c):[].concat(n),o],c=i[0],s=i.reduce((e,n)=>{const o=te(t,n,r);return e.top=L(o.top,e.top),e.right=S(o.right,e.right),e.bottom=S(o.bottom,e.bottom),e.left=L(o.left,e.left),e},te(t,c,r));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}},getOffsetParent:le,getElementRects:async function(e){const t=this.getOffsetParent||le,n=this.getDimensions,o=await n(e.floating);return{reference:oe(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:n}=X(e);return{width:t,height:n}},getScale:G,isElement:f,isRTL:function(e){return"rtl"===w(e).direction}};function se(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}const ue=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,o;const{x:r,y:i,placement:l,middlewareData:c}=t,s=await async function(e,t){const{placement:n,platform:o,elements:r}=e,i=await(null==o.isRTL?void 0:o.isRTL(r.floating)),l=F(n),c=B(n),s="y"===N(n),u=["left","top"].includes(l)?-1:1,f=i&&s?-1:1,a=k(t,e);let{mainAxis:d,crossAxis:m,alignmentAxis:p}="number"==typeof a?{mainAxis:a,crossAxis:0,alignmentAxis:null}:{mainAxis:a.mainAxis||0,crossAxis:a.crossAxis||0,alignmentAxis:a.alignmentAxis};return c&&"number"==typeof p&&(m="end"===c?-1*p:p),s?{x:m*f,y:d*u}:{x:d*u,y:m*f}}(t,e);return l===(null==(n=c.offset)?void 0:n.placement)&&null!=(o=c.arrow)&&o.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:l}}}}},fe=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:r}=t,{mainAxis:i=!0,crossAxis:l=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...s}=k(e,t),u={x:n,y:o},f=await U(t,s),a=N(F(r)),d=V(a);let m=u[d],p=u[a];if(i){const e="y"===d?"bottom":"right";m=D(m+f["y"===d?"top":"left"],m,m-f[e])}if(l){const e="y"===a?"bottom":"right";p=D(p+f["y"===a?"top":"left"],p,p-f[e])}const g=c.fn({...t,[d]:m,[a]:p});return{...g,data:{x:g.x-n,y:g.y-o,enabled:{[d]:i,[a]:l}}}}}},ae=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,o;const{placement:r,middlewareData:i,rects:l,initialPlacement:c,platform:s,elements:u}=t,{mainAxis:f=!0,crossAxis:a=!0,fallbackPlacements:d,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:g=!0,...h}=k(e,t);if(null!=(n=i.arrow)&&n.alignmentOffset)return{};const y=F(r),x=N(c),w=F(c)===c,v=await(null==s.isRTL?void 0:s.isRTL(u.floating)),b=d||(w||!g?[I(c)]:function(e){const t=I(e);return[W(e),t,W(t)]}(c)),R="none"!==p;!d&&R&&b.push(...function(e,t,n,o){const r=B(e);let i=function(e,t,n){const o=["left","right"],r=["right","left"],i=["top","bottom"],l=["bottom","top"];switch(e){case"top":case"bottom":return n?t?r:o:t?o:r;case"left":case"right":return t?i:l;default:return[]}}(F(e),"start"===n,o);return r&&(i=i.map(e=>e+"-"+r),t&&(i=i.concat(i.map(W)))),i}(c,g,p,v));const E=[c,...b],C=await U(t,h),S=[];let L=(null==(o=i.flip)?void 0:o.overflows)||[];if(f&&S.push(C[y]),a){const e=function(e,t,n){void 0===n&&(n=!1);const o=B(e),r=H(e),i=j(r);let l="x"===r?o===(n?"end":"start")?"right":"left":"start"===o?"bottom":"top";return t.reference[i]>t.floating[i]&&(l=I(l)),[l,I(l)]}(r,l,v);S.push(C[e[0]],C[e[1]])}if(L=[...L,{placement:r,overflows:S}],!S.every(e=>e<=0)){var T,O;const e=((null==(T=i.flip)?void 0:T.index)||0)+1,t=E[e];if(t){if(!("alignment"===a&&x!==N(t))||L.every(e=>e.overflows[0]>0&&N(e.placement)===x))return{data:{index:e,overflows:L},reset:{placement:t}}}let n=null==(O=L.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:O.placement;if(!n)switch(m){case"bestFit":{var A;const e=null==(A=L.filter(e=>{if(R){const t=N(e.placement);return t===x||"y"===t}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0])?void 0:A[0];e&&(n=e);break}case"initialPlacement":n=c}if(r!==n)return{reset:{placement:n}}}return{}}}},de=(e,t,n)=>{const o=new Map,r={platform:ce,...n},i={...r.platform,_c:o};return(async(e,t,n)=>{const{placement:o="bottom",strategy:r="absolute",middleware:i=[],platform:l}=n,c=i.filter(Boolean),s=await(null==l.isRTL?void 0:l.isRTL(t));let u=await l.getElementRects({reference:e,floating:t,strategy:r}),{x:f,y:a}=$(u,o,s),d=o,m={},p=0;for(let g=0;g<c.length;g++){const{name:n,fn:i}=c[g],{x:h,y:y,data:x,reset:w}=await i({x:f,y:a,initialPlacement:o,placement:d,strategy:r,middlewareData:m,rects:u,platform:l,elements:{reference:e,floating:t}});f=null!=h?h:f,a=null!=y?y:a,m={...m,[n]:{...m[n],...x}},w&&p<=50&&(p++,"object"==typeof w&&(w.placement&&(d=w.placement),w.rects&&(u=!0===w.rects?await l.getElementRects({reference:e,floating:t,strategy:r}):w.rects),({x:f,y:a}=$(u,d,s))),g=-1)}return{x:f,y:a,placement:d,strategy:r,middlewareData:m}})(e,t,{...r,platform:i})};var me="undefined"!=typeof document?e.useLayoutEffect:function(){};function pe(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let n,o,r;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(o=n;0!==o--;)if(!pe(e[o],t[o]))return!1;return!0}if(r=Object.keys(e),n=r.length,n!==Object.keys(t).length)return!1;for(o=n;0!==o--;)if(!{}.hasOwnProperty.call(t,r[o]))return!1;for(o=n;0!==o--;){const n=r[o];if(("_owner"!==n||!e.$$typeof)&&!pe(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function ge(e){if("undefined"==typeof window)return 1;return(e.ownerDocument.defaultView||window).devicePixelRatio||1}function he(e,t){const n=ge(e);return Math.round(t*n)/n}function ye(e){const t=o.useRef(e);return me(()=>{t.current=e}),t}const xe={...o};let we=!1,ve=0;const be=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+ve++;const Re=xe.useId||function(){const[e,t]=o.useState(()=>we?be():void 0);return _(()=>{null==e&&t(be())},[]),o.useEffect(()=>{we=!0},[]),e};let Ee;"production"!==process.env.NODE_ENV&&(Ee=new Set);const Ce=o.createContext(null),Se=o.createContext(null);function Le(e){const{open:t=!1,onOpenChange:n,elements:r}=e,i=Re(),l=o.useRef({}),[c]=o.useState(()=>function(){const e=new Map;return{emit(t,n){var o;null==(o=e.get(t))||o.forEach(e=>e(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){var o;null==(o=e.get(t))||o.delete(n)}}}()),s=null!=((null==(u=o.useContext(Ce))?void 0:u.id)||null);var u;if("production"!==process.env.NODE_ENV){const e=r.reference;e&&!f(e)&&function(){for(var e,t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];const r="Floating UI: "+n.join(" ");var i;null!=(e=Ee)&&e.has(r)||(null==(i=Ee)||i.add(r),console.error(r))}("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[a,d]=o.useState(r.reference),m=function(e){const t=o.useRef(()=>{if("production"!==process.env.NODE_ENV)throw new Error("Cannot call an event handler while rendering.")});return q(()=>{t.current=e}),o.useCallback(function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return null==t.current?void 0:t.current(...n)},[])}((e,t,o)=>{l.current.openEvent=e?t:void 0,c.emit("openchange",{open:e,event:t,reason:o,nested:s}),null==n||n(e,t,o)}),p=o.useMemo(()=>({setPositionReference:d}),[]),g=o.useMemo(()=>({reference:a||r.reference||null,floating:r.floating||null,domReference:r.reference}),[a,r.reference,r.floating]);return o.useMemo(()=>({dataRef:l,open:t,onOpenChange:m,elements:g,events:c,floatingId:i,refs:p}),[t,m,g,c,i,p])}exports.autoUpdate=function(e,t,n,o){void 0===o&&(o={});const{ancestorScroll:r=!0,ancestorResize:i=!0,elementResize:l="function"==typeof ResizeObserver,layoutShift:c="function"==typeof IntersectionObserver,animationFrame:u=!1}=o,f=Y(e),a=r||i?[...f?E(f):[],...E(t)]:[];a.forEach(e=>{r&&e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)});const d=f&&c?function(e,t){let n,o=null;const r=s(e);function i(){var e;clearTimeout(n),null==(e=o)||e.disconnect(),o=null}return function l(c,s){void 0===c&&(c=!1),void 0===s&&(s=1),i();const u=e.getBoundingClientRect(),{left:f,top:a,width:d,height:m}=u;if(c||t(),!d||!m)return;const p={rootMargin:-O(a)+"px "+-O(r.clientWidth-(f+d))+"px "+-O(r.clientHeight-(a+m))+"px "+-O(f)+"px",threshold:L(0,S(1,s))||1};let g=!0;function h(t){const o=t[0].intersectionRatio;if(o!==s){if(!g)return l();o?l(!1,o):n=setTimeout(()=>{l(!1,1e-7)},1e3)}1!==o||se(u,e.getBoundingClientRect())||l(),g=!1}try{o=new IntersectionObserver(h,{...p,root:r.ownerDocument})}catch(y){o=new IntersectionObserver(h,p)}o.observe(e)}(!0),i}(f,n):null;let m,p=-1,g=null;l&&(g=new ResizeObserver(e=>{let[o]=e;o&&o.target===f&&g&&(g.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var e;null==(e=g)||e.observe(t)})),n()}),f&&!u&&g.observe(f),g.observe(t));let h=u?Q(e):null;return u&&function t(){const o=Q(e);h&&!se(h,o)&&n();h=o,m=requestAnimationFrame(t)}(),n(),()=>{var e;a.forEach(e=>{r&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)}),null==d||d(),null==(e=g)||e.disconnect(),g=null,u&&cancelAnimationFrame(m)}},exports.flip=(e,t)=>({...ae(e),options:[e,t]}),exports.offset=(e,t)=>({...ue(e),options:[e,t]}),exports.shift=(e,t)=>({...fe(e),options:[e,t]}),exports.useFloating=function(e){void 0===e&&(e={});const{nodeId:t}=e,n=Le({...e,elements:{reference:null,floating:null,...e.elements}}),i=e.rootContext||n,l=i.elements,[c,s]=o.useState(null),[u,a]=o.useState(null),d=(null==l?void 0:l.domReference)||c,m=o.useRef(null),p=o.useContext(Se);_(()=>{d&&(m.current=d)},[d]);const g=function(e){void 0===e&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:i=[],platform:l,elements:{reference:c,floating:s}={},transform:u=!0,whileElementsMounted:f,open:a}=e,[d,m]=o.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,g]=o.useState(i);pe(p,i)||g(i);const[h,y]=o.useState(null),[x,w]=o.useState(null),v=o.useCallback(e=>{e!==C.current&&(C.current=e,y(e))},[]),b=o.useCallback(e=>{e!==S.current&&(S.current=e,w(e))},[]),R=c||h,E=s||x,C=o.useRef(null),S=o.useRef(null),L=o.useRef(d),T=null!=f,O=ye(f),A=ye(l),M=ye(a),P=o.useCallback(()=>{if(!C.current||!S.current)return;const e={placement:t,strategy:n,middleware:p};A.current&&(e.platform=A.current),de(C.current,S.current,e).then(e=>{const t={...e,isPositioned:!1!==M.current};D.current&&!pe(L.current,t)&&(L.current=t,r.flushSync(()=>{m(t)}))})},[p,t,n,A,M]);me(()=>{!1===a&&L.current.isPositioned&&(L.current.isPositioned=!1,m(e=>({...e,isPositioned:!1})))},[a]);const D=o.useRef(!1);me(()=>(D.current=!0,()=>{D.current=!1}),[]),me(()=>{if(R&&(C.current=R),E&&(S.current=E),R&&E){if(O.current)return O.current(R,E,P);P()}},[R,E,P,O,T]);const k=o.useMemo(()=>({reference:C,floating:S,setReference:v,setFloating:b}),[v,b]),F=o.useMemo(()=>({reference:R,floating:E}),[R,E]),B=o.useMemo(()=>{const e={position:n,left:0,top:0};if(!F.floating)return e;const t=he(F.floating,d.x),o=he(F.floating,d.y);return u?{...e,transform:"translate("+t+"px, "+o+"px)",...ge(F.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:o}},[n,u,F.floating,d.x,d.y]);return o.useMemo(()=>({...d,update:P,refs:k,elements:F,floatingStyles:B}),[d,P,k,F,B])}({...e,elements:{...l,...u&&{reference:u}}}),h=o.useCallback(e=>{const t=f(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),getClientRects:()=>e.getClientRects(),contextElement:e}:e;a(t),g.refs.setReference(t)},[g.refs]),y=o.useCallback(e=>{(f(e)||null===e)&&(m.current=e,s(e)),(f(g.refs.reference.current)||null===g.refs.reference.current||null!==e&&!f(e))&&g.refs.setReference(e)},[g.refs]),x=o.useMemo(()=>({...g.refs,setReference:y,setPositionReference:h,domReference:m}),[g.refs,y,h]),w=o.useMemo(()=>({...g.elements,domReference:d}),[g.elements,d]),v=o.useMemo(()=>({...g,...i,refs:x,elements:w,nodeId:t}),[g,x,w,t,i]);return _(()=>{i.dataRef.current.floatingContext=v;const e=null==p?void 0:p.nodesRef.current.find(e=>e.id===t);e&&(e.context=v)}),o.useMemo(()=>({...g,context:v,refs:x,elements:w}),[g,x,w,v])},exports.useMergeRefs=function(e){const t=o.useRef(void 0),n=o.useCallback(t=>{const n=e.map(e=>{if(null!=e){if("function"==typeof e){const n=e,o=n(t);return"function"==typeof o?o:()=>{n(null)}}return e.current=t,()=>{e.current=null}}});return()=>{n.forEach(e=>null==e?void 0:e())}},e);return o.useMemo(()=>e.every(e=>null==e)?null:e=>{t.current&&(t.current(),t.current=void 0),null!=e&&(t.current=n(e))},e)};
2
+ //# sourceMappingURL=floating-ui.react--v70Xky9.cjs.map