@gientech/modual 1.4.1 → 1.4.3

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 (329) hide show
  1. package/.editorconfig +38 -0
  2. package/.prettierignore +16 -0
  3. package/.prettierrc +17 -0
  4. package/README.md +129 -129
  5. package/USAGE.md +191 -0
  6. package/bash.exe.stackdump +40 -0
  7. package/components.json +21 -0
  8. package/dist/README.md +129 -0
  9. package/dist/assets/AppLoading-BCu9TPs5.js +414 -0
  10. package/dist/assets/GientechStreamReader-A8zHypyu.js +446 -0
  11. package/dist/assets/LeftOutlined-BdBZ6FSD.js +1 -0
  12. package/{assets → dist/assets}/database.svg +11 -11
  13. package/{assets → dist/assets}/database_add.svg +53 -53
  14. package/{assets → dist/assets}/database_connect.svg +66 -66
  15. package/{assets → dist/assets}/database_upload.svg +29 -29
  16. package/{assets → dist/assets}/defaultWeLogo.svg +14 -14
  17. package/dist/assets/index-B7u9FawR.js +1 -0
  18. package/dist/assets/index-CFlRqq2H.js +585 -0
  19. package/dist/assets/index-CNJZ9j4J.js +1 -0
  20. package/dist/assets/index-DfSHCQcq.js +1289 -0
  21. package/dist/assets/index-DiQ4Me9J.js +1429 -0
  22. package/dist/assets/index-EcdpegTC.js +1 -0
  23. package/dist/assets/index-rydP_SDR.js +21 -0
  24. package/{assets → dist/assets}/mysql.svg +14 -14
  25. package/{assets/plus-B679mjyt.js → dist/assets/plus-ufD39rmY.js} +1 -1
  26. package/{assets/x-CdZQbi--.js → dist/assets/x-_1-UpSBt.js} +1 -1
  27. package/dist/chat.js +151 -0
  28. package/dist/database.js +20 -0
  29. package/dist/databaseId.js +11 -0
  30. package/dist/databaseTable.js +18 -0
  31. package/dist/index.js +14 -0
  32. package/dist/modelManage.js +1 -0
  33. package/dist/package.json +63 -0
  34. package/dist/sensitive.js +1 -0
  35. package/dist/streamFilesReader.js +1 -0
  36. package/{worker → dist/worker}/pdf.worker.min.js +21 -21
  37. package/doc_assets/2.png +0 -0
  38. package/doc_assets/demo.md +27 -0
  39. package/doc_assets/demos/dist-app/assets/index.Dh-ZAS9Z.css +2 -0
  40. package/doc_assets/demos/dist-app/assets/index.Dv8KVW18.js +23699 -0
  41. package/doc_assets/demos/dist-app/assets/index.Dv8KVW18.js.map +1 -0
  42. package/doc_assets/demos/dist-app/index.html +14 -0
  43. package/doc_assets/demos/dist-app/vite.svg +1 -0
  44. package/doc_assets/images/1.png +0 -0
  45. package/doc_assets/images/3.png +0 -0
  46. package/doc_assets/images/component-screenshot.png +1 -0
  47. package/doc_assets/install.md +5 -0
  48. package/eslint.config.js +92 -0
  49. package/index.html +13 -0
  50. package/package.json +93 -47
  51. package/package.json.demo-backup +109 -0
  52. package/postcss.config.cjs +19 -0
  53. package/public/vite.svg +1 -0
  54. package/public/worker/pdf.worker.min.js +22 -0
  55. package/scripts/README.md +133 -0
  56. package/scripts/build-demo.js +88 -0
  57. package/scripts/demo-selector.js +216 -0
  58. package/scripts/dev-demo.js +76 -0
  59. package/scripts/preview-demo.js +130 -0
  60. package/scripts/run-demo.bat +34 -0
  61. package/src/assets/img/downArrow.png +0 -0
  62. package/src/assets/img/excel.png +0 -0
  63. package/src/assets/img/img.png +0 -0
  64. package/src/assets/img/pdf.png +0 -0
  65. package/src/assets/img/ppt.png +0 -0
  66. package/src/assets/img/txt.png +0 -0
  67. package/src/assets/img/word.png +0 -0
  68. package/src/assets/login/homeBg.png +0 -0
  69. package/src/assets/login/left.jpg +0 -0
  70. package/src/assets/login/logoImg.png +0 -0
  71. package/src/examples/LoginPage/index.tsx +18 -0
  72. package/src/examples/chat/components/DrawerGraphPreview.tsx +78 -0
  73. package/src/examples/chat/index.tsx +190 -0
  74. package/src/examples/gientechStreamFilesReader/index.tsx +950 -0
  75. package/src/examples/ragDatabaseDataPage/index.tsx +36 -0
  76. package/src/examples/ragDatabaseIdPage/index.tsx +44 -0
  77. package/src/examples/ragDatabasePage/index.tsx +36 -0
  78. package/src/examples/ragModelManagePage/index.tsx +37 -0
  79. package/src/examples/ragSearchPage/index.tsx +0 -0
  80. package/src/examples/ragSensitiveWordsPage/index.tsx +32 -0
  81. package/src/examples/streamFiles/index.tsx +384 -0
  82. package/src/lib_enter.ts +40 -0
  83. package/src/main.tsx +5 -0
  84. package/src/main.tsx.backup +5 -0
  85. package/src/modules/chat/Conversations/Item.tsx +167 -0
  86. package/src/modules/chat/Conversations/List.tsx +206 -0
  87. package/src/modules/chat/Conversations/groupByTime.ts +39 -0
  88. package/src/modules/chat/Conversations/index.tsx +217 -0
  89. package/src/modules/chat/constants.tsx +33 -0
  90. package/src/modules/chat/data.txt +82 -0
  91. package/src/modules/chat/index.tsx +1941 -0
  92. package/src/modules/chat/types.ts +17 -0
  93. package/src/modules/database/CreateModal.tsx +398 -0
  94. package/src/modules/database/assets/Doris.png +0 -0
  95. package/src/modules/database/assets/PostgreSQL.png +0 -0
  96. package/src/modules/database/assets/SQLServer.png +0 -0
  97. package/src/modules/database/assets/database.svg +11 -0
  98. package/src/modules/database/assets/database_add.svg +53 -0
  99. package/src/modules/database/assets/database_connect.svg +66 -0
  100. package/src/modules/database/assets/database_upload.svg +29 -0
  101. package/src/modules/database/assets/empty.png +0 -0
  102. package/src/modules/database/assets/mysql.svg +14 -0
  103. package/src/modules/database/index.tsx +466 -0
  104. package/src/modules/database/server.ts +196 -0
  105. package/src/modules/databaseId/CustomCom.tsx +156 -0
  106. package/src/modules/databaseId/EditConfig.tsx +268 -0
  107. package/src/modules/databaseId/UploadDrawer.tsx +520 -0
  108. package/src/modules/databaseId/assets/aiOptimize.svg +10 -0
  109. package/src/modules/databaseId/assets/empty.png +0 -0
  110. package/src/modules/databaseId/assets/template.svg +6 -0
  111. package/src/modules/databaseId/assets/upload.svg +9 -0
  112. package/src/modules/databaseId/assets/useTemp.svg +6 -0
  113. package/src/modules/databaseId/index.tsx +734 -0
  114. package/src/modules/databaseId/server.ts +286 -0
  115. package/src/modules/databaseId/style.css +5 -0
  116. package/src/modules/databaseTable/EditRowDrawer.tsx +119 -0
  117. package/src/modules/databaseTable/index.tsx +357 -0
  118. package/src/modules/databaseTable/server.ts +180 -0
  119. package/src/modules/headlessChat/constants.tsx +32 -0
  120. package/src/modules/headlessChat/index.tsx +1063 -0
  121. package/src/modules/headlessChat/types.ts +23 -0
  122. package/src/modules/login/components/Login/LoginBox/index.tsx +102 -0
  123. package/src/modules/login/components/Login/RegisterBox/index.tsx +180 -0
  124. package/src/modules/login/components/Login/index.tsx +100 -0
  125. package/src/modules/login/index.tsx +106 -0
  126. package/src/modules/login/style.css +3 -0
  127. package/src/modules/login/useServices.ts +53 -0
  128. package/src/modules/login/utils.ts +42 -0
  129. package/src/modules/modelManage/ConfigDrawer.tsx +249 -0
  130. package/src/modules/modelManage/assets/empty.png +0 -0
  131. package/src/modules/modelManage/const.ts +50 -0
  132. package/src/modules/modelManage/index.tsx +439 -0
  133. package/src/modules/modelManage/server.ts +185 -0
  134. package/src/modules/nodegraph/index.tsx +1 -0
  135. package/src/modules/search/assets/Icon-history.svg +8 -0
  136. package/src/modules/search/assets/answerAwartar.png +0 -0
  137. package/src/modules/search/assets/doc.png +0 -0
  138. package/src/modules/search/assets/genera.gif +0 -0
  139. package/src/modules/search/assets/icon-robot.svg +9 -0
  140. package/src/modules/search/assets/icon-search-bar.svg +14 -0
  141. package/src/modules/search/assets/icon-sub-title.svg +3 -0
  142. package/src/modules/search/assets/icon-title.svg +9 -0
  143. package/src/modules/search/assets/icon-zoomOut.svg +9 -0
  144. package/src/modules/search/assets/iconAi.svg +9 -0
  145. package/src/modules/search/assets/pdf.png +0 -0
  146. package/src/modules/search/assets/ppt.png +0 -0
  147. package/src/modules/search/assets/search.svg +3 -0
  148. package/src/modules/search/assets/selected.svg +4 -0
  149. package/src/modules/search/assets/txt.png +0 -0
  150. package/src/modules/search/assets/xls.png +0 -0
  151. package/src/modules/search/components/AssisSelect.tsx +137 -0
  152. package/src/modules/search/components/Editor/ChatViewEditor.tsx +261 -0
  153. package/src/modules/search/components/Editor/aichat.css +1 -0
  154. package/src/modules/search/components/Editor/constant.ts +13 -0
  155. package/src/modules/search/components/Editor/index.tsx +113 -0
  156. package/src/modules/search/components/Editor/plugins/autofomatRules.ts +332 -0
  157. package/src/modules/search/components/Editor/plugins/convertImgPlugins.tsx +20 -0
  158. package/src/modules/search/components/Editor/plugins/createIndexes.tsx +38 -0
  159. package/src/modules/search/components/Editor/plugins/displayer.ts +298 -0
  160. package/src/modules/search/components/Editor/plugins/imageClick.tsx +32 -0
  161. package/src/modules/search/components/Editor/plugins/myplugin.tsx +98 -0
  162. package/src/modules/search/components/Editor/ui/avatar.tsx +19 -0
  163. package/src/modules/search/components/Editor/ui/blockquote-element.tsx +21 -0
  164. package/src/modules/search/components/Editor/ui/button.tsx +58 -0
  165. package/src/modules/search/components/Editor/ui/calendar.tsx +68 -0
  166. package/src/modules/search/components/Editor/ui/caption.tsx +46 -0
  167. package/src/modules/search/components/Editor/ui/checkbox.tsx +27 -0
  168. package/src/modules/search/components/Editor/ui/code-block-combobox.tsx +188 -0
  169. package/src/modules/search/components/Editor/ui/code-block-element.css +434 -0
  170. package/src/modules/search/components/Editor/ui/code-block-element.tsx +39 -0
  171. package/src/modules/search/components/Editor/ui/code-leaf.tsx +24 -0
  172. package/src/modules/search/components/Editor/ui/code-line-element.tsx +10 -0
  173. package/src/modules/search/components/Editor/ui/code-syntax-leaf.tsx +21 -0
  174. package/src/modules/search/components/Editor/ui/column-element.tsx +30 -0
  175. package/src/modules/search/components/Editor/ui/column-group-element.tsx +94 -0
  176. package/src/modules/search/components/Editor/ui/command.tsx +75 -0
  177. package/src/modules/search/components/Editor/ui/comment-avatar.tsx +22 -0
  178. package/src/modules/search/components/Editor/ui/comment-create-form.tsx +37 -0
  179. package/src/modules/search/components/Editor/ui/comment-item.tsx +74 -0
  180. package/src/modules/search/components/Editor/ui/comment-leaf.tsx +49 -0
  181. package/src/modules/search/components/Editor/ui/comment-more-dropdown.tsx +42 -0
  182. package/src/modules/search/components/Editor/ui/comment-reply-items.tsx +22 -0
  183. package/src/modules/search/components/Editor/ui/comment-resolve-button.tsx +32 -0
  184. package/src/modules/search/components/Editor/ui/comment-value.tsx +34 -0
  185. package/src/modules/search/components/Editor/ui/comments-popover.tsx +63 -0
  186. package/src/modules/search/components/Editor/ui/date-element.tsx +83 -0
  187. package/src/modules/search/components/Editor/ui/dialog.tsx +63 -0
  188. package/src/modules/search/components/Editor/ui/draggable.tsx +177 -0
  189. package/src/modules/search/components/Editor/ui/dropdown-menu.tsx +180 -0
  190. package/src/modules/search/components/Editor/ui/emoji-input-element.tsx +85 -0
  191. package/src/modules/search/components/Editor/ui/excalidraw-element.tsx +28 -0
  192. package/src/modules/search/components/Editor/ui/fixed-toolbar-buttons.tsx +76 -0
  193. package/src/modules/search/components/Editor/ui/fixed-toolbar.tsx +8 -0
  194. package/src/modules/search/components/Editor/ui/floating-toolbar-buttons.tsx +51 -0
  195. package/src/modules/search/components/Editor/ui/floating-toolbar.tsx +77 -0
  196. package/src/modules/search/components/Editor/ui/heading-element.tsx +48 -0
  197. package/src/modules/search/components/Editor/ui/highlight-leaf.tsx +17 -0
  198. package/src/modules/search/components/Editor/ui/hr-element.tsx +30 -0
  199. package/src/modules/search/components/Editor/ui/icons.tsx +267 -0
  200. package/src/modules/search/components/Editor/ui/image-element.tsx +74 -0
  201. package/src/modules/search/components/Editor/ui/inline-combobox.tsx +368 -0
  202. package/src/modules/search/components/Editor/ui/input.tsx +25 -0
  203. package/src/modules/search/components/Editor/ui/insert-dropdown-menu.tsx +218 -0
  204. package/src/modules/search/components/Editor/ui/kbd-leaf.tsx +20 -0
  205. package/src/modules/search/components/Editor/ui/link-element.tsx +29 -0
  206. package/src/modules/search/components/Editor/ui/link-floating-toolbar.tsx +161 -0
  207. package/src/modules/search/components/Editor/ui/list-element.tsx +30 -0
  208. package/src/modules/search/components/Editor/ui/mark-toolbar-button.tsx +24 -0
  209. package/src/modules/search/components/Editor/ui/media-embed-element.tsx +133 -0
  210. package/src/modules/search/components/Editor/ui/media-popover.tsx +97 -0
  211. package/src/modules/search/components/Editor/ui/mention-element.tsx +43 -0
  212. package/src/modules/search/components/Editor/ui/mention-input-element.tsx +141 -0
  213. package/src/modules/search/components/Editor/ui/mode-dropdown-menu.tsx +93 -0
  214. package/src/modules/search/components/Editor/ui/more-dropdown-menu.tsx +67 -0
  215. package/src/modules/search/components/Editor/ui/paragraph-element.tsx +4 -0
  216. package/src/modules/search/components/Editor/ui/placeholder.tsx +52 -0
  217. package/src/modules/search/components/Editor/ui/popover.tsx +32 -0
  218. package/src/modules/search/components/Editor/ui/resizable.tsx +66 -0
  219. package/src/modules/search/components/Editor/ui/separator.tsx +25 -0
  220. package/src/modules/search/components/Editor/ui/style.less +12 -0
  221. package/src/modules/search/components/Editor/ui/table-cell-element.tsx +143 -0
  222. package/src/modules/search/components/Editor/ui/table-element.tsx +243 -0
  223. package/src/modules/search/components/Editor/ui/table-row-element.tsx +22 -0
  224. package/src/modules/search/components/Editor/ui/tableValue.tsx +135 -0
  225. package/src/modules/search/components/Editor/ui/todo-list-element.tsx +43 -0
  226. package/src/modules/search/components/Editor/ui/toggle-element.tsx +31 -0
  227. package/src/modules/search/components/Editor/ui/toolbar.tsx +157 -0
  228. package/src/modules/search/components/Editor/ui/tooltip.tsx +65 -0
  229. package/src/modules/search/components/Editor/ui/turn-into-dropdown-menu.tsx +160 -0
  230. package/src/modules/search/components/Editor/ui/with-draggables.tsx +175 -0
  231. package/src/modules/search/components/FileList.tsx +287 -0
  232. package/src/modules/search/components/ImageGroupView/index.tsx +85 -0
  233. package/src/modules/search/components/ResultContent.tsx +232 -0
  234. package/src/modules/search/components/SearchInput.tsx +232 -0
  235. package/src/modules/search/components/SearchLanding.tsx +74 -0
  236. package/src/modules/search/components/SearchView.tsx +563 -0
  237. package/src/modules/search/components/SimpleEditor.tsx +158 -0
  238. package/src/modules/search/components/SimpleFileList.tsx +215 -0
  239. package/src/modules/search/index.tsx +10 -0
  240. package/src/modules/search/reademe.md +1 -0
  241. package/src/modules/search/servers/apis.tsx +19 -0
  242. package/src/modules/search/servers/index.ts +184 -0
  243. package/src/modules/search/style.less +503 -0
  244. package/src/modules/search/type.ts +22 -0
  245. package/src/modules/search/utils.ts +34 -0
  246. package/src/modules/sensitive/index.tsx +313 -0
  247. package/src/modules/sensitive/server.ts +122 -0
  248. package/src/modules/streamFilesReader/GientechStreamReader.tsx +1619 -0
  249. package/src/modules/streamFilesReader/components/Header/Toolbar.tsx +0 -0
  250. package/src/modules/streamFilesReader/components/Header/index.tsx +297 -0
  251. package/src/modules/streamFilesReader/index.tsx +3 -0
  252. package/src/style.css +6 -0
  253. package/src/type.d.ts +0 -0
  254. package/src/utils/commonFn.tsx +111 -0
  255. package/src/utils/gientechCommon/components/AppError.tsx +32 -0
  256. package/src/utils/gientechCommon/components/AppLoading.tsx +75 -0
  257. package/src/utils/gientechCommon/components/DeleteModal.tsx +75 -0
  258. package/src/utils/gientechCommon/components/DisplayError.tsx +33 -0
  259. package/src/utils/gientechCommon/components/DisplayLoading.tsx +38 -0
  260. package/src/utils/gientechCommon/components/FeedBackModal.tsx +310 -0
  261. package/src/utils/gientechCommon/components/FileCardCommon.tsx +82 -0
  262. package/src/utils/gientechCommon/components/FileManager/index.tsx +390 -0
  263. package/src/utils/gientechCommon/components/FileManager/style.css +5 -0
  264. package/src/utils/gientechCommon/components/Messages/GientechNewChatWelcome.tsx +296 -0
  265. package/src/utils/gientechCommon/components/Messages/ReferenceCard.tsx +339 -0
  266. package/src/utils/gientechCommon/components/Messages/RetriveItem.tsx +245 -0
  267. package/src/utils/gientechCommon/components/Messages/WebRetriveItem.tsx +209 -0
  268. package/src/utils/gientechCommon/components/Messages/defaultBot.png +0 -0
  269. package/src/utils/gientechCommon/components/Messages/defaultStyleSet.tsx +148 -0
  270. package/src/utils/gientechCommon/components/Messages/defaultWeLogo.svg +14 -0
  271. package/src/utils/gientechCommon/components/RenameModal.tsx +86 -0
  272. package/src/utils/gientechCommon/components/style.less +11 -0
  273. package/src/utils/gientechCommon/configs/commonConfig.ts +2 -0
  274. package/src/utils/gientechCommon/configs/senderConfig.ts +0 -0
  275. package/src/utils/gientechCommon/configs/stylesConfig.ts +142 -0
  276. package/src/utils/gientechCommon/hooks/AichatUseController.tsx +345 -0
  277. package/src/utils/gientechCommon/slate/converters/deserializers.ts +763 -0
  278. package/src/utils/gientechCommon/slate/converters/mockData.ts +232 -0
  279. package/src/utils/gientechCommon/slate/converters/slateConverters.ts +258 -0
  280. package/src/utils/gientechCommon/slate/richElements/index.tsx +499 -0
  281. package/src/utils/gientechCommon/utils/request.ts +37 -0
  282. package/src/utils/gientechCommon/utils/serverFn.ts +172 -0
  283. package/src/utils/index.tsx +126 -0
  284. package/src/utils/testconfigs/demologin/index.tsx +32 -0
  285. package/src/utils/testconfigs/index.ts +53 -0
  286. package/src/vite-env.d.ts +11 -0
  287. package/stats.html +4949 -0
  288. package/tailwind.config.js +170 -0
  289. package/tsconfig.app.json +30 -0
  290. package/tsconfig.app.tsbuildinfo +11 -0
  291. package/tsconfig.json +13 -0
  292. package/tsconfig.node.json +22 -0
  293. package/tsconfig.node.tsbuildinfo +1 -0
  294. package/vite.config.ts +216 -0
  295. package/workflows/release.yml +60 -0
  296. package/assets/AppLoading-ApGI0H_0.js +0 -35
  297. package/assets/GientechStreamReader-BdLx_6Ga.js +0 -146
  298. package/assets/chevron-right-CrkLSPrQ.js +0 -6
  299. package/assets/createLucideIcon-Bj5DlX2s.js +0 -21
  300. package/assets/styled-components.browser.esm-BKnFpJ_S.js +0 -2
  301. package/chat.js +0 -246
  302. package/database.js +0 -20
  303. package/databaseId.js +0 -26
  304. package/databaseTable.js +0 -6
  305. package/index.js +0 -14
  306. package/modelManage.js +0 -1
  307. package/sensitive.js +0 -1
  308. package/streamFilesReader.js +0 -1
  309. /package/{assets → dist/assets}/Doris.png +0 -0
  310. /package/{assets → dist/assets}/PostgreSQL.png +0 -0
  311. /package/{assets → dist/assets}/SQLServer.png +0 -0
  312. /package/{assets → dist/assets}/empty.png +0 -0
  313. /package/{assets → dist/assets}/homeBg.png +0 -0
  314. /package/{assets → dist/assets}/index-CpW6Dhpp.js +0 -0
  315. /package/{assets → dist/assets}/left.jpg +0 -0
  316. /package/{assets → dist/assets}/logoImg.png +0 -0
  317. /package/{assets → dist/assets}/style.css +0 -0
  318. /package/{assets → dist/assets}/style2.css +0 -0
  319. /package/{assets → dist/assets}/style3.css +0 -0
  320. /package/{assets → dist/assets}/style4.css +0 -0
  321. /package/{chat.d.ts → dist/chat.d.ts} +0 -0
  322. /package/{database.d.ts → dist/database.d.ts} +0 -0
  323. /package/{databaseId.d.ts → dist/databaseId.d.ts} +0 -0
  324. /package/{databaseTable.d.ts → dist/databaseTable.d.ts} +0 -0
  325. /package/{index.d.ts → dist/index.d.ts} +0 -0
  326. /package/{modelManage.d.ts → dist/modelManage.d.ts} +0 -0
  327. /package/{sensitive.d.ts → dist/sensitive.d.ts} +0 -0
  328. /package/{streamFilesReader.d.ts → dist/streamFilesReader.d.ts} +0 -0
  329. /package/{vite.svg → dist/vite.svg} +0 -0
@@ -1,35 +0,0 @@
1
- import St,{createContext as De,Children as en,cloneElement as nn,Component as rn,useState as At,useEffect as Tt,useMemo as on}from"react";import{jsx as k,jsxs as R}from"react/jsx-runtime";import{Input as zt,Form as wt,ConfigProvider as an,Modal as sn,Button as Lt,Tree as un,Tag as ln}from"antd";import{C as cn}from"./chevron-right-CrkLSPrQ.js";var Kn=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Me(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function qn(t){if(Object.prototype.hasOwnProperty.call(t,"__esModule"))return t;var e=t.default;if(typeof e=="function"){var n=function a(){return this instanceof a?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};n.prototype=e.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(t).forEach(function(a){var g=Object.getOwnPropertyDescriptor(t,a);Object.defineProperty(n,a,g.get?g:{enumerable:!0,get:function(){return t[a]}})}),n}var Bt={exports:{}},fn=Bt.exports,_e;function dn(){return _e||(_e=1,(function(t,e){(function(n,a){t.exports=a()})(fn,(function(){var n=1e3,a=6e4,g=36e5,i="millisecond",s="second",r="minute",d="hour",u="day",C="week",v="month",I="quarter",E="year",A="date",l="Invalid Date",x=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,$=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,V={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(D){var y=["th","st","nd","rd"],p=D%100;return"["+D+(y[(p-20)%10]||y[p]||y[0])+"]"}},X=function(D,y,p){var w=String(D);return!w||w.length>=y?D:""+Array(y+1-w.length).join(p)+D},et={s:X,z:function(D){var y=-D.utcOffset(),p=Math.abs(y),w=Math.floor(p/60),o=p%60;return(y<=0?"+":"-")+X(w,2,"0")+":"+X(o,2,"0")},m:function D(y,p){if(y.date()<p.date())return-D(p,y);var w=12*(p.year()-y.year())+(p.month()-y.month()),o=y.clone().add(w,v),_=p-o<0,F=y.clone().add(w+(_?-1:1),v);return+(-(w+(p-o)/(_?o-F:F-o))||0)},a:function(D){return D<0?Math.ceil(D)||0:Math.floor(D)},p:function(D){return{M:v,y:E,w:C,d:u,D:A,h:d,m:r,s,ms:i,Q:I}[D]||String(D||"").toLowerCase().replace(/s$/,"")},u:function(D){return D===void 0}},q="en",Q={};Q[q]=V;var nt="$isDayjsObject",W=function(D){return D instanceof rt||!(!D||!D[nt])},ot=function D(y,p,w){var o;if(!y)return q;if(typeof y=="string"){var _=y.toLowerCase();Q[_]&&(o=_),p&&(Q[_]=p,o=_);var F=y.split("-");if(!o&&F.length>1)return D(F[0])}else{var b=y.name;Q[b]=y,o=b}return!w&&o&&(q=o),o||!w&&q},P=function(D,y){if(W(D))return D.clone();var p=typeof y=="object"?y:{};return p.date=D,p.args=arguments,new rt(p)},T=et;T.l=ot,T.i=W,T.w=function(D,y){return P(D,{locale:y.$L,utc:y.$u,x:y.$x,$offset:y.$offset})};var rt=(function(){function D(p){this.$L=ot(p.locale,null,!0),this.parse(p),this.$x=this.$x||p.x||{},this[nt]=!0}var y=D.prototype;return y.parse=function(p){this.$d=(function(w){var o=w.date,_=w.utc;if(o===null)return new Date(NaN);if(T.u(o))return new Date;if(o instanceof Date)return new Date(o);if(typeof o=="string"&&!/Z$/i.test(o)){var F=o.match(x);if(F){var b=F[2]-1||0,h=(F[7]||"0").substring(0,3);return _?new Date(Date.UTC(F[1],b,F[3]||1,F[4]||0,F[5]||0,F[6]||0,h)):new Date(F[1],b,F[3]||1,F[4]||0,F[5]||0,F[6]||0,h)}}return new Date(o)})(p),this.init()},y.init=function(){var p=this.$d;this.$y=p.getFullYear(),this.$M=p.getMonth(),this.$D=p.getDate(),this.$W=p.getDay(),this.$H=p.getHours(),this.$m=p.getMinutes(),this.$s=p.getSeconds(),this.$ms=p.getMilliseconds()},y.$utils=function(){return T},y.isValid=function(){return this.$d.toString()!==l},y.isSame=function(p,w){var o=P(p);return this.startOf(w)<=o&&o<=this.endOf(w)},y.isAfter=function(p,w){return P(p)<this.startOf(w)},y.isBefore=function(p,w){return this.endOf(w)<P(p)},y.$g=function(p,w,o){return T.u(p)?this[w]:this.set(o,p)},y.unix=function(){return Math.floor(this.valueOf()/1e3)},y.valueOf=function(){return this.$d.getTime()},y.startOf=function(p,w){var o=this,_=!!T.u(w)||w,F=T.p(p),b=function(L,U){var J=T.w(o.$u?Date.UTC(o.$y,U,L):new Date(o.$y,U,L),o);return _?J:J.endOf(u)},h=function(L,U){return T.w(o.toDate()[L].apply(o.toDate("s"),(_?[0,0,0,0]:[23,59,59,999]).slice(U)),o)},c=this.$W,f=this.$M,S=this.$D,O="set"+(this.$u?"UTC":"");switch(F){case E:return _?b(1,0):b(31,11);case v:return _?b(1,f):b(0,f+1);case C:var M=this.$locale().weekStart||0,B=(c<M?c+7:c)-M;return b(_?S-B:S+(6-B),f);case u:case A:return h(O+"Hours",0);case d:return h(O+"Minutes",1);case r:return h(O+"Seconds",2);case s:return h(O+"Milliseconds",3);default:return this.clone()}},y.endOf=function(p){return this.startOf(p,!1)},y.$set=function(p,w){var o,_=T.p(p),F="set"+(this.$u?"UTC":""),b=(o={},o[u]=F+"Date",o[A]=F+"Date",o[v]=F+"Month",o[E]=F+"FullYear",o[d]=F+"Hours",o[r]=F+"Minutes",o[s]=F+"Seconds",o[i]=F+"Milliseconds",o)[_],h=_===u?this.$D+(w-this.$W):w;if(_===v||_===E){var c=this.clone().set(A,1);c.$d[b](h),c.init(),this.$d=c.set(A,Math.min(this.$D,c.daysInMonth())).$d}else b&&this.$d[b](h);return this.init(),this},y.set=function(p,w){return this.clone().$set(p,w)},y.get=function(p){return this[T.p(p)]()},y.add=function(p,w){var o,_=this;p=Number(p);var F=T.p(w),b=function(f){var S=P(_);return T.w(S.date(S.date()+Math.round(f*p)),_)};if(F===v)return this.set(v,this.$M+p);if(F===E)return this.set(E,this.$y+p);if(F===u)return b(1);if(F===C)return b(7);var h=(o={},o[r]=a,o[d]=g,o[s]=n,o)[F]||1,c=this.$d.getTime()+p*h;return T.w(c,this)},y.subtract=function(p,w){return this.add(-1*p,w)},y.format=function(p){var w=this,o=this.$locale();if(!this.isValid())return o.invalidDate||l;var _=p||"YYYY-MM-DDTHH:mm:ssZ",F=T.z(this),b=this.$H,h=this.$m,c=this.$M,f=o.weekdays,S=o.months,O=o.meridiem,M=function(U,J,Y,N){return U&&(U[J]||U(w,_))||Y[J].slice(0,N)},B=function(U){return T.s(b%12||12,U,"0")},L=O||function(U,J,Y){var N=U<12?"AM":"PM";return Y?N.toLowerCase():N};return _.replace($,(function(U,J){return J||(function(Y){switch(Y){case"YY":return String(w.$y).slice(-2);case"YYYY":return T.s(w.$y,4,"0");case"M":return c+1;case"MM":return T.s(c+1,2,"0");case"MMM":return M(o.monthsShort,c,S,3);case"MMMM":return M(S,c);case"D":return w.$D;case"DD":return T.s(w.$D,2,"0");case"d":return String(w.$W);case"dd":return M(o.weekdaysMin,w.$W,f,2);case"ddd":return M(o.weekdaysShort,w.$W,f,3);case"dddd":return f[w.$W];case"H":return String(b);case"HH":return T.s(b,2,"0");case"h":return B(1);case"hh":return B(2);case"a":return L(b,h,!0);case"A":return L(b,h,!1);case"m":return String(h);case"mm":return T.s(h,2,"0");case"s":return String(w.$s);case"ss":return T.s(w.$s,2,"0");case"SSS":return T.s(w.$ms,3,"0");case"Z":return F}return null})(U)||F.replace(":","")}))},y.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},y.diff=function(p,w,o){var _,F=this,b=T.p(w),h=P(p),c=(h.utcOffset()-this.utcOffset())*a,f=this-h,S=function(){return T.m(F,h)};switch(b){case E:_=S()/12;break;case v:_=S();break;case I:_=S()/3;break;case C:_=(f-c)/6048e5;break;case u:_=(f-c)/864e5;break;case d:_=f/g;break;case r:_=f/a;break;case s:_=f/n;break;default:_=f}return o?_:T.a(_)},y.daysInMonth=function(){return this.endOf(v).$D},y.$locale=function(){return Q[this.$L]},y.locale=function(p,w){if(!p)return this.$L;var o=this.clone(),_=ot(p,w,!0);return _&&(o.$L=_),o},y.clone=function(){return T.w(this.$d,this)},y.toDate=function(){return new Date(this.valueOf())},y.toJSON=function(){return this.isValid()?this.toISOString():null},y.toISOString=function(){return this.$d.toISOString()},y.toString=function(){return this.$d.toUTCString()},D})(),at=rt.prototype;return P.prototype=at,[["$ms",i],["$s",s],["$m",r],["$H",d],["$W",u],["$M",v],["$y",E],["$D",A]].forEach((function(D){at[D[1]]=function(y){return this.$g(y,D[0],D[1])}})),P.extend=function(D,y){return D.$i||(D(y,rt,P),D.$i=!0),P},P.locale=ot,P.isDayjs=W,P.unix=function(D){return P(1e3*D)},P.en=Q[q],P.Ls=Q,P.p={},P}))})(Bt)),Bt.exports}var pn=dn();const Hn=Me(pn);/*! @license Rematrix v0.2.2
2
-
3
- Copyright 2018 Fisssion LLC.
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in
13
- all copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
- THE SOFTWARE.
22
- */function Xt(t){if(t.constructor!==Array)throw new TypeError("Expected array.");if(t.length===16)return t;if(t.length===6){var e=Ft();return e[0]=t[0],e[1]=t[1],e[4]=t[2],e[5]=t[3],e[12]=t[4],e[13]=t[5],e}throw new RangeError("Expected array with either 6 or 16 values.")}function Ft(){for(var t=[],e=0;e<16;e++)e%5==0?t.push(1):t.push(0);return t}function hn(t,e){for(var n=Xt(t),a=Xt(e),g=[],i=0;i<4;i++)for(var s=[n[i],n[i+4],n[i+8],n[i+12]],r=0;r<4;r++){var d=r*4,u=[a[d],a[d+1],a[d+2],a[d+3]],C=s[0]*u[0]+s[1]*u[1]+s[2]*u[2]+s[3]*u[3];g[i+d]=C}return g}function mn(t){if(typeof t=="string"){var e=t.match(/matrix(3d)?\(([^)]+)\)/);if(e){var n=e[2].split(", ").map(parseFloat);return Xt(n)}}return Ft()}function gn(t){var e=Ft();return e[0]=t,e}function yn(t){var e=Ft();return e[5]=t,e}function vn(t){var e=Ft();return e[12]=t,e}function _n(t){var e=Ft();return e[13]=t,e}var Rt=function(t){return typeof t=="number"},Ie=function(t){return typeof t=="function"},$e=function(t){return Object.prototype.toString.call(t)==="[object Object]"},Ct=function(t){return Array.prototype.slice.apply(t)},Te=function(t){var e=t.reduce(function(n,a){return n[a]=(n[a]||0)+1,n},{});return Object.keys(e).filter(function(n){return e[n]>1})};function pt(t){return[].slice.call(arguments,1).forEach(function(e){if(e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])}),t}var Qt,Jt=function(t,e,n){return t+(e-t)*n},Ne={__proto__:null,isNumber:Rt,isFunction:Ie,isObject:$e,toArray:Ct,getDuplicateValsAsStrings:Te,assign:pt,tweenProp:Jt},te="data-flip-id",ee="data-inverse-flip-id",ne="data-portal-key",bn="data-exit-container",Ut={__proto__:null,DATA_FLIP_ID:te,DATA_INVERSE_FLIP_ID:ee,DATA_FLIP_CONFIG:"data-flip-config",DATA_PORTAL_KEY:ne},Gt={noWobble:{stiffness:200,damping:26},gentle:{stiffness:120,damping:14},veryGentle:{stiffness:130,damping:17},wobbly:{stiffness:180,damping:12},stiff:{stiffness:260,damping:26}},be=function(t){return $e(t)?t:Object.keys(Gt).indexOf(t)>-1?Gt[t]:{}};typeof window<"u"&&(Qt=window.requestAnimationFrame);var An=Qt=Qt||function(t){window.setTimeout(t,1e3/60)},Sn=Date.now(),En=typeof performance=="object"&&typeof performance.now=="function"?function(){return performance.now()}:function(){return Date.now()-Sn};function ke(t,e){var n=t.indexOf(e);n!==-1&&t.splice(n,1)}var xn=(function(){function t(){}return t.prototype.run=function(){var e=this;An(function(){e.springSystem.loop(En())})},t})(),Wt=function(){this.position=0,this.velocity=0},wn=0,tt=.001,Cn=(function(){function t(n){this._id="s"+wn++,this._springSystem=n,this.listeners=[],this._startValue=0,this._currentState=new Wt,this._displacementFromRestThreshold=.001,this._endValue=0,this._overshootClampingEnabled=!1,this._previousState=new Wt,this._restSpeedThreshold=.001,this._tempState=new Wt,this._timeAccumulator=0,this._wasAtRest=!0,this._cachedSpringConfig={}}var e=t.prototype;return e.getId=function(){return this._id},e.destroy=function(){this.listeners=[],this._springSystem.deregisterSpring(this)},e.setSpringConfig=function(n){return this._springConfig=n,this},e.getCurrentValue=function(){return this._currentState.position},e.getDisplacementDistanceForState=function(n){return Math.abs(this._endValue-n.position)},e.setEndValue=function(n){if(n===this._endValue)return this;if(this.prevEndValue=n,this._endValue===n&&this.isAtRest())return this;this._startValue=this.getCurrentValue(),this._endValue=n,this._springSystem.activateSpring(this.getId());for(var a=0,g=this.listeners.length;a<g;a++){var i=this.listeners[a].onSpringEndStateChange;i&&i(this)}return this},e.setVelocity=function(n){return n===this._currentState.velocity||(this._currentState.velocity=n,this._springSystem.activateSpring(this.getId())),this},e.setCurrentValue=function(n){this._startValue=n,this._currentState.position=n;for(var a=0,g=this.listeners.length;a<g;a++){var i=this.listeners[a];i.onSpringUpdate&&i.onSpringUpdate(this)}return this},e.setAtRest=function(){return this._endValue=this._currentState.position,this._tempState.position=this._currentState.position,this._currentState.velocity=0,this},e.setOvershootClampingEnabled=function(n){return this._overshootClampingEnabled=n,this},e.isOvershooting=function(){var n=this._startValue,a=this._endValue;return this._springConfig.tension>0&&(n<a&&this.getCurrentValue()>a||n>a&&this.getCurrentValue()<a)},e.advance=function(n,a){var g=this.isAtRest();if(!g||!this._wasAtRest){var i=a;a>.064&&(i=.064),this._timeAccumulator+=i;for(var s,r,d,u,C,v,I=this._springConfig.tension,E=this._springConfig.friction,A=this._currentState.position,l=this._currentState.velocity,x=this._tempState.position,$=this._tempState.velocity;this._timeAccumulator>=tt;)this._timeAccumulator-=tt,this._timeAccumulator<tt&&(this._previousState.position=A,this._previousState.velocity=l),r=I*(this._endValue-x)-E*l,u=I*(this._endValue-(x=A+(s=l)*tt*.5))-E*($=l+r*tt*.5),v=I*(this._endValue-(x=A+(d=$)*tt*.5))-E*($=l+u*tt*.5),x=A+(C=$)*tt,A+=1/6*(s+2*(d+C)+($=l+v*tt))*tt,l+=1/6*(r+2*(u+v)+(I*(this._endValue-x)-E*$))*tt;this._tempState.position=x,this._tempState.velocity=$,this._currentState.position=A,this._currentState.velocity=l,this._timeAccumulator>0&&this._interpolate(this._timeAccumulator/tt),(this.isAtRest()||this._overshootClampingEnabled&&this.isOvershooting())&&(this._springConfig.tension>0?(this._startValue=this._endValue,this._currentState.position=this._endValue):(this._endValue=this._currentState.position,this._startValue=this._endValue),this.setVelocity(0),g=!0);var V=!1;this._wasAtRest&&(this._wasAtRest=!1,V=!0);var X=!1;g&&(this._wasAtRest=!0,X=!0),this.notifyPositionUpdated(V,X)}},e.notifyPositionUpdated=function(n,a){var g=this;this.listeners.filter(Boolean).forEach(function(i){n&&i.onSpringActivate&&!g._onActivateCalled&&(i.onSpringActivate(g),g._onActivateCalled=!0),i.onSpringUpdate&&i.onSpringUpdate(g),a&&i.onSpringAtRest&&i.onSpringAtRest(g)})},e.systemShouldAdvance=function(){return!this.isAtRest()||!this.wasAtRest()},e.wasAtRest=function(){return this._wasAtRest},e.isAtRest=function(){return Math.abs(this._currentState.velocity)<this._restSpeedThreshold&&(this.getDisplacementDistanceForState(this._currentState)<=this._displacementFromRestThreshold||this._springConfig.tension===0)},e._interpolate=function(n){this._currentState.position=this._currentState.position*n+this._previousState.position*(1-n),this._currentState.velocity=this._currentState.velocity*n+this._previousState.velocity*(1-n)},e.addListener=function(n){return this.listeners.push(n),this},e.addOneTimeListener=function(n){var a=this;return Object.keys(n).forEach(function(g){var i;n[g]=(i=n[g],function(){i.apply(void 0,[].slice.call(arguments)),a.removeListener(n)})}),this.listeners.push(n),this},e.removeListener=function(n){return ke(this.listeners,n),this},t})(),je=(function(){function t(n){this.looper=n||new xn,this.looper.springSystem=this,this.listeners=[],this._activeSprings=[],this._idleSpringIndices=[],this._isIdle=!0,this._lastTimeMillis=-1,this._springRegistry={}}var e=t.prototype;return e.createSpring=function(n,a){return this.createSpringWithConfig({tension:n,friction:a})},e.createSpringWithConfig=function(n){var a=new Cn(this);return this.registerSpring(a),a.setSpringConfig(n),a},e.getIsIdle=function(){return this._isIdle},e.registerSpring=function(n){this._springRegistry[n.getId()]=n},e.deregisterSpring=function(n){ke(this._activeSprings,n),delete this._springRegistry[n.getId()]},e.advance=function(n,a){for(var g=this;this._idleSpringIndices.length>0;)this._idleSpringIndices.pop();for(this._activeSprings.filter(Boolean).forEach(function(s){s.systemShouldAdvance()?s.advance(n/1e3,a/1e3):g._idleSpringIndices.push(g._activeSprings.indexOf(s))});this._idleSpringIndices.length>0;){var i=this._idleSpringIndices.pop();i>=0&&this._activeSprings.splice(i,1)}},e.loop=function(n){var a;this._lastTimeMillis===-1&&(this._lastTimeMillis=n-1);var g=n-this._lastTimeMillis;this._lastTimeMillis=n;var i=0,s=this.listeners.length;for(i=0;i<s;i++)(a=this.listeners[i]).onBeforeIntegrate&&a.onBeforeIntegrate(this);for(this.advance(n,g),this._activeSprings.length===0&&(this._isIdle=!0,this._lastTimeMillis=-1),i=0;i<s;i++)(a=this.listeners[i]).onAfterIntegrate&&a.onAfterIntegrate(this);this._isIdle||this.looper.run()},e.activateSpring=function(n){var a=this._springRegistry[n];this._activeSprings.indexOf(a)===-1&&this._activeSprings.push(a),this.getIsIdle()&&(this._isIdle=!1,this.looper.run())},t})(),Fn=new je,Pe=function(t){var e=t.springConfig,n=e.overshootClamping,a=t.getOnUpdateFunc,g=t.onAnimationEnd,i=t.onSpringActivate,s=Fn.createSpring(e.stiffness,e.damping);s.setOvershootClampingEnabled(!!n);var r={onSpringActivate:i,onSpringAtRest:function(){s.destroy(),g()},onSpringUpdate:a({spring:s,onAnimationEnd:g})};return s.addListener(r),s},Ae=function(t){var e=Pe(t);return e.setEndValue(1),e},Se=function(t,e){if(e===void 0&&(e={}),t&&t.length){e.reverse&&t.reverse();var n,a=typeof(n=e.speed)!="number"?1.1:1+Math.min(Math.max(5*n,0),5),g=1/Math.max(Math.min(t.length,100),10),i=t.map(function(s,r){var d=s.getOnUpdateFunc;return s.getOnUpdateFunc=function(u){var C=d(u);return function(v){var I=v.getCurrentValue();(I=I<.01?0:I>.99?1:I)>=g&&i[r+1]&&i[r+1](Math.max(Math.min(I*a,1),0)),C(v)}},s}).map(function(s){var r=Pe(s);if(r)return r.setEndValue.bind(r)}).filter(Boolean);i[0]&&i[0](1)}},Ee=function(t){return[0,1,4,5,12,13].map(function(e){return t[e]})},xe=function(t){return t.top<window.innerHeight&&t.bottom>0&&t.left<window.innerWidth&&t.right>0};function we(t){return JSON.parse(t.dataset.flipConfig||"{}")}var Ue=function(t,e){var n;return pt(t,((n={})[e[0]]=e[1],n))},Be=function(t,e){return Ct(e?document.querySelectorAll("["+ne+'="'+e+'"]'):t.querySelectorAll("["+te+"]"))},Re=function(t){return t.map(function(e){return[e,e.getBoundingClientRect()]})},On=function(t){var e=t.cachedOrderedFlipIds,n=e===void 0?[]:e,a=t.inProgressAnimations,g=a===void 0?{}:a,i=t.flippedElementPositionsBeforeUpdate,s=i===void 0?{}:i,r=t.flipCallbacks,d=r===void 0?{}:r,u=t.containerEl,C=t.applyTransformOrigin,v=t.spring,I=t.debug,E=t.portalKey,A=t.staggerConfig,l=A===void 0?{}:A,x=t.decisionData,$=x===void 0?{}:x,V=t.handleEnterUpdateDelete,X=t.onComplete,et=t.onStart;if(!window.matchMedia("(prefers-reduced-motion: reduce)").matches){var q,Q=Re(Be((q={element:u,portalKey:E}).element,q.portalKey)).map(function(o){var _=o[0],F=o[1],b=window.getComputedStyle(_);return[_.dataset.flipId,{element:_,rect:F,opacity:parseFloat(b.opacity),transform:b.transform}]}).reduce(Ue,{}),nt=(function(o){var _=o.containerEl,F=o.portalKey;return F?(function(b){return function(h){return Ct(document.querySelectorAll("["+ne+'="'+b+'"]'+h))}})(F):_?(function(b){var h=Math.random().toFixed(5);return b.dataset.flipperId=h,function(c){return Ct(b.querySelectorAll('[data-flipper-id="'+h+'"] '+c))}})(_):function(){return[]}})({containerEl:u,portalKey:E}),W=(function(o){return function(_){return o("["+te+'="'+_+'"]')[0]}})(nt),ot=function(o){return s[o]&&Q[o]},P=Object.keys(s).concat(Object.keys(Q)).filter(function(o){return!ot(o)}),T={flipCallbacks:d,getElement:W,flippedElementPositionsBeforeUpdate:s,flippedElementPositionsAfterUpdate:Q,inProgressAnimations:g,decisionData:$},rt=(function(o){var _,F=o.unflippedIds,b=o.flipCallbacks,h=o.getElement,c=o.flippedElementPositionsBeforeUpdate,f=o.flippedElementPositionsAfterUpdate,S=o.inProgressAnimations,O=o.decisionData,M=F.filter(function(N){return f[N]}).filter(function(N){return b[N]&&b[N].onAppear}),B=F.filter(function(N){return c[N]&&b[N]&&b[N].onExit}),L=new Promise(function(N){_=N}),U=[],J=0,Y=B.map(function(N,lt){var it=c[N].domDataForExitAnimations,Z=it.element,ct=it.parent,ht=it.childPosition,st=ht.top,Nt=ht.left,mt=ht.width,gt=ht.height;getComputedStyle(ct).position==="static"&&(ct.style.position="relative"),Z.style.transform="matrix(1, 0, 0, 1, 0, 0)",Z.style.position="absolute",Z.style.top=st+"px",Z.style.left=Nt+"px",Z.style.height=gt+"px",Z.style.width=mt+"px";var yt=U.filter(function(Ot){return Ot[0]===ct})[0];yt||(yt=[ct,document.createDocumentFragment()],U.push(yt)),yt[1].appendChild(Z),J+=1;var Et=function(){try{ct.removeChild(Z)}catch{}finally{(J-=1)==0&&_()}};return S[N]={stop:Et},function(){return b[N].onExit(Z,lt,Et,O)}});return U.forEach(function(N){N[0].appendChild(N[1])}),Y.length||_(),{hideEnteringElements:function(){M.forEach(function(N){var lt=h(N);lt&&(lt.style.opacity="0")})},animateEnteringElements:function(){M.forEach(function(N,lt){var it=h(N);it&&b[N].onAppear(it,lt,O)})},animateExitingElements:function(){return Y.forEach(function(N){return N()}),L}}})(pt({},T,{unflippedIds:P})),at=rt.hideEnteringElements,D=rt.animateEnteringElements,y=rt.animateExitingElements,p=pt({},T,{containerEl:u,flippedIds:n.filter(ot),applyTransformOrigin:C,spring:v,debug:I,staggerConfig:l,scopedSelector:nt,onComplete:X});et&&et(u,$);var w=(function(o){var _,F=o.flippedIds,b=o.flipCallbacks,h=o.inProgressAnimations,c=o.flippedElementPositionsBeforeUpdate,f=o.flippedElementPositionsAfterUpdate,S=o.applyTransformOrigin,O=o.spring,M=o.getElement,B=o.debug,L=o.staggerConfig,U=L===void 0?{}:L,J=o.decisionData,Y=J===void 0?{}:J,N=o.onComplete,lt=o.containerEl,it=new Promise(function(m){_=m});if(N&&it.then(function(){return N(lt,Y)}),!F.length)return function(){return _([]),it};var Z=[],ct=M(F[0]),ht=ct?ct.ownerDocument.querySelector("body"):document.querySelector("body");Te(F);var st=F.map(function(m){var j=c[m].rect,K=f[m].rect,Dt=c[m].opacity,re=f[m].opacity,ie=K.width<1||K.height<1,z=f[m].element;if(!xe(j)&&!xe(K)||!z)return!1;var oe,ae,se,ut=we(z),ue=(se=(ae=(oe={flipperSpring:O,flippedSpring:ut.spring})===void 0?{}:oe).flippedSpring,pt({},Gt.noWobble,be(ae.flipperSpring),be(se))),le=ut.stagger===!0?"default":ut.stagger,He={element:z,id:m,stagger:le,springConfig:ue};if(b[m]&&b[m].shouldFlip&&!b[m].shouldFlip(Y.previous,Y.current))return!1;var We=Math.abs(j.left-K.left)+Math.abs(j.top-K.top),ze=Math.abs(j.width-K.width)+Math.abs(j.height-K.height),Xe=Math.abs(re-Dt);if(j.height===0&&K.height===0||j.width===0&&K.width===0||We<.5&&ze<.5&&Xe<.01)return!1;var ce=mn(f[m].transform),vt={matrix:ce},ft={matrix:[]},Mt=[ce];ut.translate&&(Mt.push(vn(j.left-K.left)),Mt.push(_n(j.top-K.top))),ut.scale&&(Mt.push(gn(Math.max(j.width,1)/Math.max(K.width,1))),Mt.push(yn(Math.max(j.height,1)/Math.max(K.height,1)))),ut.opacity&&(ft.opacity=Dt,vt.opacity=re);var kt=[];if(!b[m]||!b[m].shouldInvert||b[m].shouldInvert(Y.previous,Y.current)){var Qe=(function(H,G){return Ct(H.querySelectorAll("["+ee+'="'+G+'"]'))})(z,m);kt=Qe.map(function(H){return[H,we(H)]})}ft.matrix=Ee(Mt.reduce(hn)),vt.matrix=Ee(vt.matrix);var Kt,fe=(function(H){var G=H.element,_t=H.invertedChildren,It=H.body;return function(xt){var bt=xt.matrix,jt=xt.opacity,qt=xt.forceMinVals;if(Rt(jt)&&(G.style.opacity=jt+""),qt&&(G.style.minHeight="1px",G.style.minWidth="1px"),bt){var Ge=(function($t){return"matrix("+$t.join(", ")+")"})(bt);G.style.transform=Ge,_t&&(function($t){var Pt=$t.matrix,Ze=$t.body;$t.invertedChildren.forEach(function(he){var me=he[0],ge=he[1];if(Ze.contains(me)){var ye=Pt[0],ve=Pt[3],tn=Pt[5],dt={translateX:0,translateY:0,scaleX:1,scaleY:1},Ht="";ge.translate&&(dt.translateX=-Pt[4]/ye,dt.translateY=-tn/ve,Ht+="translate("+dt.translateX+"px, "+dt.translateY+"px)"),ge.scale&&(dt.scaleX=1/ye,dt.scaleY=1/ve,Ht+=" scale("+dt.scaleX+", "+dt.scaleY+")"),me.style.transform=Ht}})})({invertedChildren:_t,matrix:bt,body:It})}}})({element:z,invertedChildren:kt,body:ht});if(b[m]&&b[m].onComplete){var Je=b[m].onComplete;Kt=function(){return Je(z,Y)}}var de=Rt(ft.opacity)&&Rt(vt.opacity)&&ft.opacity!==vt.opacity,pe=!1;return pt({},He,{stagger:le,springConfig:ue,getOnUpdateFunc:function(H){var G=H.spring,_t=H.onAnimationEnd;return h[m]={destroy:G.destroy.bind(G),onAnimationEnd:_t},function(It){b[m]&&b[m].onSpringUpdate&&b[m].onSpringUpdate(It.getCurrentValue()),pe||(pe=!0,b[m]&&b[m].onStart&&b[m].onStart(z,Y));var xt=It.getCurrentValue();if(ht.contains(z)){var bt={matrix:[]};bt.matrix=ft.matrix.map(function(jt,qt){return Jt(jt,vt.matrix[qt],xt)}),de&&(bt.opacity=Jt(ft.opacity,vt.opacity,xt)),fe(bt)}else It.destroy()}},initializeFlip:function(){fe({matrix:ft.matrix,opacity:de?ft.opacity:void 0,forceMinVals:ie}),b[m]&&b[m].onStartImmediate&&b[m].onStartImmediate(z,Y),ut.transformOrigin?z.style.transformOrigin=ut.transformOrigin:S&&(z.style.transformOrigin="0 0"),kt.forEach(function(H){var G=H[0],_t=H[1];_t.transformOrigin?G.style.transformOrigin=_t.transformOrigin:S&&(G.style.transformOrigin="0 0")})},onAnimationEnd:function(H){delete h[m],Ie(Kt)&&Kt(),z.style.transform="",kt.forEach(function(G){G[0].style.transform=""}),ie&&z&&(z.style.minHeight="",z.style.minWidth=""),H||(Z.push(m),Z.length>=st.length&&_(Z))},delayUntil:ut.delayUntil})}).filter(Boolean);if(st.forEach(function(m){return(0,m.initializeFlip)()}),B)return function(){};var Nt=st.filter(function(m){return m.delayUntil&&(j=m.delayUntil,st.filter(function(K){return K.id===j}).length);var j}),mt={},gt={},yt={};Nt.forEach(function(m){m.stagger?(yt[m.stagger]=!0,gt[m.delayUntil]?gt[m.delayUntil].push(m.stagger):gt[m.delayUntil]=[m.stagger]):mt[m.delayUntil]?mt[m.delayUntil].push(m):mt[m.delayUntil]=[m]});var Et=st.filter(function(m){return m.stagger}).reduce(function(m,j){return m[j.stagger]?m[j.stagger].push(j):m[j.stagger]=[j],m},{}),Ot=st.filter(function(m){return Nt.indexOf(m)===-1});return Ot.forEach(function(m){m.onSpringActivate=function(){mt[m.id]&&mt[m.id].forEach(Ae),gt[m.id]&&Object.keys(gt[m.id].reduce(function(j,K){var Dt;return pt(j,((Dt={})[K]=!0,Dt))},{})).forEach(function(j){Se(Et[j],U[j])})}}),function(){return st.length||_([]),Ot.filter(function(m){return!m.stagger}).forEach(Ae),Object.keys(Et).forEach(function(m){yt[m]||Se(Et[m],U[m])}),it}})(p);V?V({hideEnteringElements:at,animateEnteringElements:D,animateExitingElements:y,animateFlippedElements:w}):(at(),y().then(D),w())}},Dn=function(t){var e=t.element,n=t.flipCallbacks,a=n===void 0?{}:n,g=t.inProgressAnimations,i=g===void 0?{}:g,s=Be(e,t.portalKey),r=Ct(e.querySelectorAll("["+ee+"]")),d={},u=[],C={};s.filter(function(E){return a&&a[E.dataset.flipId]&&a[E.dataset.flipId].onExit}).forEach(function(E){var A=E.parentNode;if(E.closest){var l=E.closest("["+bn+"]");l&&(A=l)}var x=u.findIndex(function($){return $[0]===A});x===-1&&(u.push([A,A.getBoundingClientRect()]),x=u.length-1),d[E.dataset.flipId]=u[x][1],C[E.dataset.flipId]=A});var v=Re(s),I=v.map(function(E){var A=E[0],l=E[1],x={};if(a&&a[A.dataset.flipId]&&a[A.dataset.flipId].onExit){var $=d[A.dataset.flipId];pt(x,{element:A,parent:C[A.dataset.flipId],childPosition:{top:l.top-$.top,left:l.left-$.left,width:l.width,height:l.height}})}return[A.dataset.flipId,{rect:l,opacity:parseFloat(window.getComputedStyle(A).opacity||"1"),domDataForExitAnimations:x}]}).reduce(Ue,{});return(function(E,A){Object.keys(E).forEach(function(l){E[l].destroy&&E[l].destroy(),E[l].onAnimationEnd&&E[l].onAnimationEnd(!0),delete E[l]}),A.forEach(function(l){l.style.transform="",l.style.opacity=""})})(i,s.concat(r)),{flippedElementPositions:I,cachedOrderedFlipIds:v.map(function(E){return E[0].dataset.flipId})}};new je;function Yt(){return Yt=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t},Yt.apply(this,arguments)}function Zt(t,e){return Zt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Zt(t,e)}function Ve(t,e){if(t==null)return{};var n,a,g={},i=Object.keys(t);for(a=0;a<i.length;a++)e.indexOf(n=i[a])>=0||(g[n]=t[n]);return g}var Le=De({}),Ye=De("portal"),Mn=(function(t){var e,n;function a(){for(var i,s=arguments.length,r=new Array(s),d=0;d<s;d++)r[d]=arguments[d];return(i=t.call.apply(t,[this].concat(r))||this).inProgressAnimations={},i.flipCallbacks={},i.el=void 0,i}n=t,(e=a).prototype=Object.create(n.prototype),e.prototype.constructor=e,Zt(e,n);var g=a.prototype;return g.getSnapshotBeforeUpdate=function(i){return i.flipKey!==this.props.flipKey&&this.el?Dn({element:this.el,flipCallbacks:this.flipCallbacks,inProgressAnimations:this.inProgressAnimations,portalKey:this.props.portalKey}):null},g.componentDidUpdate=function(i,s,r){this.props.flipKey!==i.flipKey&&this.el&&On({flippedElementPositionsBeforeUpdate:r.flippedElementPositions,cachedOrderedFlipIds:r.cachedOrderedFlipIds,containerEl:this.el,inProgressAnimations:this.inProgressAnimations,flipCallbacks:this.flipCallbacks,applyTransformOrigin:this.props.applyTransformOrigin,spring:this.props.spring,debug:this.props.debug,portalKey:this.props.portalKey,staggerConfig:this.props.staggerConfig,handleEnterUpdateDelete:this.props.handleEnterUpdateDelete,decisionData:{previous:i.decisionData,current:this.props.decisionData},onComplete:this.props.onComplete,onStart:this.props.onStart})},g.render=function(){var i=this,s=this.props,r=s.portalKey,d=St.createElement(Le.Provider,{value:this.flipCallbacks},St.createElement(s.element,{className:s.className,ref:function(u){return i.el=u}},this.props.children));return r&&(d=St.createElement(Ye.Provider,{value:r},d)),d},a})(rn);Mn.defaultProps={applyTransformOrigin:!0,element:"div"};var In=["children","flipId","inverseFlipId","portalKey"],$n=["children","flipId","shouldFlip","shouldInvert","onAppear","onStart","onStartImmediate","onComplete","onExit","onSpringUpdate"],Ce=function(t){var e,n=t.children,a=t.flipId,g=t.inverseFlipId,i=t.portalKey,s=Ve(t,In),r=n,d=(function(C){return typeof C=="function"})(r);if(!d)try{r=en.only(n)}catch{throw new Error("Each Flipped component must wrap a single child")}s.scale||s.translate||s.opacity||Ne.assign(s,{translate:!0,scale:!0,opacity:!0});var u=((e={})[Ut.DATA_FLIP_CONFIG]=JSON.stringify(s),e);return a!==void 0?u[Ut.DATA_FLIP_ID]=String(a):g&&(u[Ut.DATA_INVERSE_FLIP_ID]=String(g)),i!==void 0&&(u[Ut.DATA_PORTAL_KEY]=i),d?r(u):nn(r,u)},Tn=function(t){var e=t.children,n=t.flipId,a=t.shouldFlip,g=t.shouldInvert,i=t.onAppear,s=t.onStart,r=t.onStartImmediate,d=t.onComplete,u=t.onExit,C=t.onSpringUpdate,v=Ve(t,$n);return e?v.inverseFlipId?St.createElement(Ce,Yt({},v),e):St.createElement(Ye.Consumer,null,function(I){return St.createElement(Le.Consumer,null,function(E){return Ne.isObject(E)&&n&&(E[n]={shouldFlip:a,shouldInvert:g,onAppear:i,onStart:s,onStartImmediate:r,onComplete:d,onExit:u,onSpringUpdate:C}),St.createElement(Ce,Yt({flipId:n},v,{portalKey:I}),e)})}):null};Tn.displayName="Flipped";var Vt={exports:{}};/*!
23
- * clipboard.js v2.0.11
24
- * https://clipboardjs.com/
25
- *
26
- * Licensed MIT © Zeno Rocha
27
- */var Nn=Vt.exports,Fe;function kn(){return Fe||(Fe=1,(function(t,e){(function(a,g){t.exports=g()})(Nn,function(){return(function(){var n={686:(function(i,s,r){r.d(s,{default:function(){return b}});var d=r(279),u=r.n(d),C=r(370),v=r.n(C),I=r(817),E=r.n(I);function A(h){try{return document.execCommand(h)}catch{return!1}}var l=function(c){var f=E()(c);return A("cut"),f},x=l;function $(h){var c=document.documentElement.getAttribute("dir")==="rtl",f=document.createElement("textarea");f.style.fontSize="12pt",f.style.border="0",f.style.padding="0",f.style.margin="0",f.style.position="absolute",f.style[c?"right":"left"]="-9999px";var S=window.pageYOffset||document.documentElement.scrollTop;return f.style.top="".concat(S,"px"),f.setAttribute("readonly",""),f.value=h,f}var V=function(c,f){var S=$(c);f.container.appendChild(S);var O=E()(S);return A("copy"),S.remove(),O},X=function(c){var f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{container:document.body},S="";return typeof c=="string"?S=V(c,f):c instanceof HTMLInputElement&&!["text","search","url","tel","password"].includes(c==null?void 0:c.type)?S=V(c.value,f):(S=E()(c),A("copy")),S},et=X;function q(h){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?q=function(f){return typeof f}:q=function(f){return f&&typeof Symbol=="function"&&f.constructor===Symbol&&f!==Symbol.prototype?"symbol":typeof f},q(h)}var Q=function(){var c=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},f=c.action,S=f===void 0?"copy":f,O=c.container,M=c.target,B=c.text;if(S!=="copy"&&S!=="cut")throw new Error('Invalid "action" value, use either "copy" or "cut"');if(M!==void 0)if(M&&q(M)==="object"&&M.nodeType===1){if(S==="copy"&&M.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if(S==="cut"&&(M.hasAttribute("readonly")||M.hasAttribute("disabled")))throw new Error(`Invalid "target" attribute. You can't cut text from elements with "readonly" or "disabled" attributes`)}else throw new Error('Invalid "target" value, use a valid Element');if(B)return et(B,{container:O});if(M)return S==="cut"?x(M):et(M,{container:O})},nt=Q;function W(h){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?W=function(f){return typeof f}:W=function(f){return f&&typeof Symbol=="function"&&f.constructor===Symbol&&f!==Symbol.prototype?"symbol":typeof f},W(h)}function ot(h,c){if(!(h instanceof c))throw new TypeError("Cannot call a class as a function")}function P(h,c){for(var f=0;f<c.length;f++){var S=c[f];S.enumerable=S.enumerable||!1,S.configurable=!0,"value"in S&&(S.writable=!0),Object.defineProperty(h,S.key,S)}}function T(h,c,f){return c&&P(h.prototype,c),f&&P(h,f),h}function rt(h,c){if(typeof c!="function"&&c!==null)throw new TypeError("Super expression must either be null or a function");h.prototype=Object.create(c&&c.prototype,{constructor:{value:h,writable:!0,configurable:!0}}),c&&at(h,c)}function at(h,c){return at=Object.setPrototypeOf||function(S,O){return S.__proto__=O,S},at(h,c)}function D(h){var c=w();return function(){var S=o(h),O;if(c){var M=o(this).constructor;O=Reflect.construct(S,arguments,M)}else O=S.apply(this,arguments);return y(this,O)}}function y(h,c){return c&&(W(c)==="object"||typeof c=="function")?c:p(h)}function p(h){if(h===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return h}function w(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function o(h){return o=Object.setPrototypeOf?Object.getPrototypeOf:function(f){return f.__proto__||Object.getPrototypeOf(f)},o(h)}function _(h,c){var f="data-clipboard-".concat(h);if(c.hasAttribute(f))return c.getAttribute(f)}var F=(function(h){rt(f,h);var c=D(f);function f(S,O){var M;return ot(this,f),M=c.call(this),M.resolveOptions(O),M.listenClick(S),M}return T(f,[{key:"resolveOptions",value:function(){var O=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.action=typeof O.action=="function"?O.action:this.defaultAction,this.target=typeof O.target=="function"?O.target:this.defaultTarget,this.text=typeof O.text=="function"?O.text:this.defaultText,this.container=W(O.container)==="object"?O.container:document.body}},{key:"listenClick",value:function(O){var M=this;this.listener=v()(O,"click",function(B){return M.onClick(B)})}},{key:"onClick",value:function(O){var M=O.delegateTarget||O.currentTarget,B=this.action(M)||"copy",L=nt({action:B,container:this.container,target:this.target(M),text:this.text(M)});this.emit(L?"success":"error",{action:B,text:L,trigger:M,clearSelection:function(){M&&M.focus(),window.getSelection().removeAllRanges()}})}},{key:"defaultAction",value:function(O){return _("action",O)}},{key:"defaultTarget",value:function(O){var M=_("target",O);if(M)return document.querySelector(M)}},{key:"defaultText",value:function(O){return _("text",O)}},{key:"destroy",value:function(){this.listener.destroy()}}],[{key:"copy",value:function(O){var M=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{container:document.body};return et(O,M)}},{key:"cut",value:function(O){return x(O)}},{key:"isSupported",value:function(){var O=arguments.length>0&&arguments[0]!==void 0?arguments[0]:["copy","cut"],M=typeof O=="string"?[O]:O,B=!!document.queryCommandSupported;return M.forEach(function(L){B=B&&!!document.queryCommandSupported(L)}),B}}]),f})(u()),b=F}),828:(function(i){var s=9;if(typeof Element<"u"&&!Element.prototype.matches){var r=Element.prototype;r.matches=r.matchesSelector||r.mozMatchesSelector||r.msMatchesSelector||r.oMatchesSelector||r.webkitMatchesSelector}function d(u,C){for(;u&&u.nodeType!==s;){if(typeof u.matches=="function"&&u.matches(C))return u;u=u.parentNode}}i.exports=d}),438:(function(i,s,r){var d=r(828);function u(I,E,A,l,x){var $=v.apply(this,arguments);return I.addEventListener(A,$,x),{destroy:function(){I.removeEventListener(A,$,x)}}}function C(I,E,A,l,x){return typeof I.addEventListener=="function"?u.apply(null,arguments):typeof A=="function"?u.bind(null,document).apply(null,arguments):(typeof I=="string"&&(I=document.querySelectorAll(I)),Array.prototype.map.call(I,function($){return u($,E,A,l,x)}))}function v(I,E,A,l){return function(x){x.delegateTarget=d(x.target,E),x.delegateTarget&&l.call(I,x)}}i.exports=C}),879:(function(i,s){s.node=function(r){return r!==void 0&&r instanceof HTMLElement&&r.nodeType===1},s.nodeList=function(r){var d=Object.prototype.toString.call(r);return r!==void 0&&(d==="[object NodeList]"||d==="[object HTMLCollection]")&&"length"in r&&(r.length===0||s.node(r[0]))},s.string=function(r){return typeof r=="string"||r instanceof String},s.fn=function(r){var d=Object.prototype.toString.call(r);return d==="[object Function]"}}),370:(function(i,s,r){var d=r(879),u=r(438);function C(A,l,x){if(!A&&!l&&!x)throw new Error("Missing required arguments");if(!d.string(l))throw new TypeError("Second argument must be a String");if(!d.fn(x))throw new TypeError("Third argument must be a Function");if(d.node(A))return v(A,l,x);if(d.nodeList(A))return I(A,l,x);if(d.string(A))return E(A,l,x);throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList")}function v(A,l,x){return A.addEventListener(l,x),{destroy:function(){A.removeEventListener(l,x)}}}function I(A,l,x){return Array.prototype.forEach.call(A,function($){$.addEventListener(l,x)}),{destroy:function(){Array.prototype.forEach.call(A,function($){$.removeEventListener(l,x)})}}}function E(A,l,x){return u(document.body,A,l,x)}i.exports=C}),817:(function(i){function s(r){var d;if(r.nodeName==="SELECT")r.focus(),d=r.value;else if(r.nodeName==="INPUT"||r.nodeName==="TEXTAREA"){var u=r.hasAttribute("readonly");u||r.setAttribute("readonly",""),r.select(),r.setSelectionRange(0,r.value.length),u||r.removeAttribute("readonly"),d=r.value}else{r.hasAttribute("contenteditable")&&r.focus();var C=window.getSelection(),v=document.createRange();v.selectNodeContents(r),C.removeAllRanges(),C.addRange(v),d=C.toString()}return d}i.exports=s}),279:(function(i){function s(){}s.prototype={on:function(r,d,u){var C=this.e||(this.e={});return(C[r]||(C[r]=[])).push({fn:d,ctx:u}),this},once:function(r,d,u){var C=this;function v(){C.off(r,v),d.apply(u,arguments)}return v._=d,this.on(r,v,u)},emit:function(r){var d=[].slice.call(arguments,1),u=((this.e||(this.e={}))[r]||[]).slice(),C=0,v=u.length;for(C;C<v;C++)u[C].fn.apply(u[C].ctx,d);return this},off:function(r,d){var u=this.e||(this.e={}),C=u[r],v=[];if(C&&d)for(var I=0,E=C.length;I<E;I++)C[I].fn!==d&&C[I].fn._!==d&&v.push(C[I]);return v.length?u[r]=v:delete u[r],this}},i.exports=s,i.exports.TinyEmitter=s})},a={};function g(i){if(a[i])return a[i].exports;var s=a[i]={exports:{}};return n[i](s,s.exports,g),s.exports}return(function(){g.n=function(i){var s=i&&i.__esModule?function(){return i.default}:function(){return i};return g.d(s,{a:s}),s}})(),(function(){g.d=function(i,s){for(var r in s)g.o(s,r)&&!g.o(i,r)&&Object.defineProperty(i,r,{enumerable:!0,get:s[r]})}})(),(function(){g.o=function(i,s){return Object.prototype.hasOwnProperty.call(i,s)}})(),g(686)})().default})})(Vt)),Vt.exports}var jn=kn();const Wn=Me(jn),Pn="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAACRSURBVHgB7ZJBCsQgDEWTmQvMncT7dOuqmY3iai6kMN31UmIjdNFFKuk+DwKahP9ABDAMQyTnvHCtT/ZjjIs0e0nN1hr03kkjGTu8+0PEjzR/S81a6+6cQz6S9x5KKdsknLi+IQRSC07JfybRhE8FM4k2fICgIKVE/MYrF427NlwtuEpOgSr8MUNy9x0Nw7jnAFsnZ7Uu5CkqAAAAAElFTkSuQmCC",{TextArea:Oe}=zt,{useForm:Un}=wt,Ke={\u56DE\u7B54\u4E0D\u4F73:"ansPoor",\u683C\u5F0F\u95EE\u9898:"formatError",\u7406\u89E3\u95EE\u9898\u6709\u8BEF:"harmfulInfo",\u5176\u4ED6:"othres"},zn=({open:t,setOpen:e,feedBackList:n,handleConfirm:a})=>{const g={header:{padding:"20px 24px",borderBottom:"1px solid #F0F0F0",margin:0},body:{padding:"16px 24px 20px 24px",borderBottom:"1px solid #F0F0F0"},mask:{},footer:{padding:"16px 24px",margin:0},content:{padding:0,borderRadius:"4px",width:"563px"}},[i]=Un(),[s,r]=At({}),d=async()=>{try{const u=await i.validateFields();e(!1);const C={...u};Object.entries(s||{}).forEach(v=>{const[I,E]=v;E&&(C[Ke[I]]=E)}),a(C)}catch(u){console.log(u);return}};return Tt(()=>{t||(i.resetFields(),r(null))},[t]),k(an,{modal:{styles:g},children:R(sn,{open:t,onCancel:()=>e(!1),title:k("div",{className:"text-[16px] text-[#2A2A2A] font-bold leading-[1]",children:"\u611F\u8C22\u60A8\u7684\u53CD\u9988\uFF01\u8FD9\u5C06\u5E2E\u52A9\u6211\u4EEC\u4E0D\u65AD\u4F18\u5316\u4E0E\u63D0\u5347\u3002"}),footer:R("div",{children:[k(Lt,{className:"mr-[16px] w-[76px]",onClick:()=>{e(!1)},children:"\u53D6\u6D88"}),k(Lt,{type:"primary",className:"w-[76px] border-none",onClick:d,children:"\u786E\u8BA4"})]}),children:[k(Bn,{feedBackList:n,treeSelectResult:s,setTreeSelectResult:r}),R(wt,{form:i,layout:"vertical",children:[k(wt.Item,{name:"supplementExplain",label:"\u8865\u5145\u63CF\u8FF0",children:k(Oe,{})})," ",k(wt.Item,{name:"idealAnswer",label:"\u60A8\u89C9\u5F97\u66F4\u597D\u7684\u56DE\u7B54\u662F\u4EC0\u4E48\uFF1F",children:k(Oe,{})}),k(wt.Item,{name:"userPhone",label:"\u8054\u7CFB\u7535\u8BDD",children:k(zt,{})}),k(wt.Item,{name:"deptName",label:"\u90E8\u95E8",children:k(zt,{})})]})]})})},Bn=({feedBackList:t,treeSelectResult:e,setTreeSelectResult:n})=>{const[a,g]=At(!1),[i,s]=At([]),[r,d]=At([]),[u,C]=At([]),[v,I]=At(null),E=on(()=>(d([]),v!=null&&v.items?[{title:"\u5168\u9009",key:"\u5168\u9009",children:v.items.map(l=>({title:l,key:l}))}]:[]),[v]),A=l=>{C(x=>Array.isArray(x)&&Array.isArray(r)?Object.entries(e).reduce((V,X)=>{const[et,q]=X,nt=(q?q.split(";"):[]).filter(W=>W!==l);return n(W=>({...W||{},[et]:nt.join(";")})),[...V,...nt]},[]):x)};return Tt(()=>{if(s(["\u5168\u9009"]),!e||!(v!=null&&v.que_name))return;const l=e[v.que_name]||"",x=l?l.split(";"):[];d(x)},[E,a]),Tt(()=>{e===null&&(C([]),I(null),d([]))},[e]),Tt(()=>{console.log("treeSelectResult",e),console.log("selectedValue",u),console.log("feedBackList",t),console.log("pKey",Ke),console.log("selectedParent",v)},[e,u]),R("div",{className:"relative mb-[24px] z-20",children:[R("div",{className:"absolute w-full z-10",children:[R("div",{className:"h-[32px] box-border flex items-center justify-between border-[1px] border-solid border-[#D9D9D9] rounded-[4px] cursor-pointer",onClick:()=>g(!a),children:[k("div",{className:"ml-[16px]",children:"\u95EE\u9898\u7C7B\u578B"}),k("img",{src:Pn,width:24,height:24,className:"mr-[16px]"})]}),R("div",{style:{display:a?"":"none"},className:"h-[288px] rounded-[4px] shadow-md mt-[4px] bg-white",children:[R("div",{className:"h-[248px] flex",style:{borderBottom:"1px solid #F0F0F0"},children:[k("div",{className:"w-[203px] px-[8px] py-[8px]",style:{borderRight:"1px solid #F0F0F0"},children:t.map((l,x)=>{var $;return R("div",{className:"rounded-[4px] h-[32px] cursor-pointer flex items-center",style:{backgroundColor:(v==null?void 0:v.que_name)===l.que_name?"#E6F4FF":""},children:[k("div",{className:"h-full w-full leading-[32px]",onClick:()=>{I(l)},children:R("div",{className:"ml-[8px] text-[14px] text-[#2A2A2A]",children:[l.que_name,"(",e&&e[l.que_name]?e[l.que_name].split(";").length:0,"/",($=l==null?void 0:l.items)==null?void 0:$.length,")"]})}),k(cn,{className:"mr-[8px] w-3 h-3 text-[rgba(0,0,0,0.45)]"})]},x)})}),k("div",{className:"selfTree h-full flex-1 mt-[8px] ml-[16px]",children:k(un,{checkable:!0,defaultSelectedKeys:["0-1"],treeData:E,blockNode:!0,checkedKeys:r,expandedKeys:i,onCheck:l=>{Array.isArray(l)&&n(x=>({...x||{},[(v==null?void 0:v.que_name)||""]:(l||[]).filter($=>$!=="\u5168\u9009").join(";")})),d(l)}})})]}),R("div",{className:"flex justify-end h-[40px] items-center",children:[k(Lt,{size:"small",className:"mr-[8px]",onClick:()=>g(!1),children:"\u53D6\u6D88"}),k(Lt,{size:"small",type:"primary",className:"border-none mr-[16px]",onClick:()=>{C(l=>Array.isArray(l)&&Array.isArray(r)?Object.values(e).reduce(($,V)=>[...$,...V?V.split(";"):[]],[]):l),g(!1)},children:"\u786E\u8BA4"})]})]})]}),k("div",{className:"h-[32px]"}),!!(u!=null&&u.length)&&R("div",{children:[R("div",{className:"mt-[5px] text-[12px] text-[#555555]",children:["\u5DF2\u9009\u62E9 ",u.length," \u4E2A"]}),(u||[]).map(l=>{let x="";return Object.entries(e||{}).forEach($=>{const[V,X]=$;X.indexOf(l)>-1&&(x=V)}),R(ln,{closable:!0,className:"mt-[5px]",onClose:()=>A(l),children:[x,"\uFF08",l,"\uFF09"]},l)})]})]})};function Xn(){const[t,e]=At(0);return Tt(()=>{let n;return t<98?n=setTimeout(()=>{e(a=>a+Math.random()*6+1)},80):t<100&&(n=setTimeout(()=>e(100),400)),()=>clearTimeout(n)},[t]),R("div",{className:"flex flex-col justify-center items-center min-h-screen bg-gradient-to-br from-[#EEF4FF] via-white to-[#F5F8FF]",children:[R("div",{className:"mb-8 flex flex-col items-center",children:[k("div",{className:"mt-6 text-2xl font-semibold text-[#222222] tracking-wide",children:"\u5C0F\u9CB8\u667A\u80FD\u4F1A\u8BDD\u52A9\u624B"}),k("div",{className:"mt-2 text-sm text-[#555555]",children:"\u8BA9\u667A\u80FD\u5BF9\u8BDD\u66F4\u7B80\u5355"})]}),R("div",{className:"relative w-80 max-w-sm",children:[k("div",{className:"w-full h-2 bg-[#EEF4FF] rounded-full overflow-hidden shadow-inner",children:k("div",{className:"h-full bg-gradient-to-r from-[#2B69FF] to-[#8F91FF] transition-all duration-300 ease-out",style:{width:`${Math.min(t,100)}%`}})}),R("div",{className:"absolute -right-2 top-5 text-sm text-[#555555]",children:[Math.min(Math.round(t),100),"%"]})]}),R("div",{className:"mt-8 flex flex-col items-center gap-2",children:[k("div",{className:"text-sm text-[#555555] animate-pulse",children:"\u6B63\u5728\u521D\u59CB\u5316\u5E94\u7528"}),k("div",{className:"text-xs text-[#888888]",children:"\u9996\u6B21\u52A0\u8F7D\u53EF\u80FD\u9700\u8981\u4E00\u4E9B\u65F6\u95F4\uFF0C\u8BF7\u8010\u5FC3\u7B49\u5F85"})]})]})}const qe=document.createElement("style");qe.textContent=`
28
- .animate-bounce-slow {
29
- animation: bounce 2.2s cubic-bezier(0.4, 0, 0.2, 1) infinite;
30
- }
31
- @keyframes bounce {
32
- 0%, 100% { transform: translateY(0); }
33
- 50% { transform: translateY(-12px); }
34
- }
35
- `;document.head.appendChild(qe);export{Xn as A,Wn as C,zn as F,Me as a,Kn as c,Hn as d,qn as g,Mn as h,Tn as v};
@@ -1,146 +0,0 @@
1
- import{jsxs as $,jsx as s,Fragment as hu}from"react/jsx-runtime";import Nu,{useState as k,useRef as L,useEffect as uu,useCallback as l,useMemo as zu}from"react";import{d as O}from"./styled-components.browser.esm-BKnFpJ_S.js";import cu from"axios";import{parseFile as gu,Fviewer as lu}from"@mxmweb/fviewer";import{c as H}from"./createLucideIcon-Bj5DlX2s.js";import{C as Tu}from"./chevron-right-CrkLSPrQ.js";import{X as uo}from"./x-CdZQbi--.js";/**
2
- * @license lucide-react v0.456.0 - ISC
3
- *
4
- * This source code is licensed under the ISC license.
5
- * See the LICENSE file in the root directory of this source tree.
6
- */const oo=H("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/**
7
- * @license lucide-react v0.456.0 - ISC
8
- *
9
- * This source code is licensed under the ISC license.
10
- * See the LICENSE file in the root directory of this source tree.
11
- */const eo=H("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/**
12
- * @license lucide-react v0.456.0 - ISC
13
- *
14
- * This source code is licensed under the ISC license.
15
- * See the LICENSE file in the root directory of this source tree.
16
- */const to=H("Pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);/**
17
- * @license lucide-react v0.456.0 - ISC
18
- *
19
- * This source code is licensed under the ISC license.
20
- * See the LICENSE file in the root directory of this source tree.
21
- */const no=H("RotateCcw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);/**
22
- * @license lucide-react v0.456.0 - ISC
23
- *
24
- * This source code is licensed under the ISC license.
25
- * See the LICENSE file in the root directory of this source tree.
26
- */const ro=H("RotateCw",[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]]);/**
27
- * @license lucide-react v0.456.0 - ISC
28
- *
29
- * This source code is licensed under the ISC license.
30
- * See the LICENSE file in the root directory of this source tree.
31
- */const ao=H("ZoomIn",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65",key:"13gj7c"}],["line",{x1:"11",x2:"11",y1:"8",y2:"14",key:"1vmskp"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11",key:"durymu"}]]);/**
32
- * @license lucide-react v0.456.0 - ISC
33
- *
34
- * This source code is licensed under the ISC license.
35
- * See the LICENSE file in the root directory of this source tree.
36
- */const so=H("ZoomOut",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65",key:"13gj7c"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11",key:"durymu"}]]),co=O.div`
37
- display: flex;
38
- align-items: center;
39
- padding: 0px 12px;
40
- justify-content: space-between;
41
- padding: ${n=>n.$theme.space.padding};
42
- border-bottom: 1px solid ${n=>n.$theme.colors.border};
43
- background: ${n=>n.$theme.colors.background};
44
- min-height: 52px;
45
- `,lo=O.div`
46
- display: flex;
47
- align-items: center;
48
- gap: 8px;
49
- flex: 1;
50
- min-width: 0;
51
- `,Fo=O.div`
52
- font-size: 14px;
53
- font-weight: 500;
54
- color: ${n=>n.$theme.colors.text};
55
- white-space: nowrap;
56
- overflow: hidden;
57
- text-overflow: ellipsis;
58
- `,io=O.div`
59
- font-size: 12px;
60
- color: ${n=>n.$theme.colors.disabledText};
61
- white-space: nowrap;
62
- `,Do=O.div`
63
- display: flex;
64
- align-items: center;
65
- gap: 4px;
66
- `,v=O.button`
67
- display: flex;
68
- align-items: center;
69
- justify-content: center;
70
- width: 32px;
71
- height: 32px;
72
- border: none;
73
- border-radius: ${n=>n.$theme.space.radius};
74
- background: ${n=>n.$active?n.$theme.colors.primary+"20":"transparent"};
75
- color: ${n=>n.$active?n.$theme.colors.primary:n.$theme.colors.text};
76
- cursor: pointer;
77
- transition: all 0.2s ease;
78
-
79
- &:hover {
80
- background: ${n=>n.$theme.colors.primary+"10"};
81
- color: ${n=>n.$theme.colors.primary};
82
- }
83
-
84
- &:disabled {
85
- opacity: 0.5;
86
- cursor: not-allowed;
87
- }
88
- `,ho=O.div`
89
- font-size: 12px;
90
- color: ${n=>n.$theme.colors.disabledText};
91
- min-width: 40px;
92
- text-align: center;
93
- `,go={colors:{primary:"#007bff",secondary:"#6c757d",success:"#008000",warning:"#FFA500",error:"#FF0000",info:"#0000FF",background:"#f8f9fa",text:"#343a40",border:"#dee2e6",disabled:"#808080",disabledBackground:"#F5F5F5",disabledText:"#808080"},space:{sidebar:"md",size:"md",radius:"md",padding:"md",margin:"md",shadow:"md",lineHeight:"md"}},Mu=Nu.memo(({fileName:n="\u672A\u77E5\u6587\u4EF6",currentPage:d=1,totalPage:e=0,tools:E={annotation:!0,download:!0,zoom:!0,close:!0,navigation:!0,rotate:!0},styles:I,onPrevPage:ou,onNextPage:h,onZoomIn:U,onZoomOut:g,onAnnotationToggle:A,onDownload:i,onRotateLeft:c,onRotateRight:V,onClose:x,scale:C=1,isAnnotating:W=!1,className:eu})=>{const F=(I==null?void 0:I.theme)||go;return console.log("Header\u7EC4\u4EF6\u6E32\u67D3 - currentPage:",d,"totalPage:",e),$(co,{$theme:F,className:eu,children:[s(lo,{$theme:F,children:s(Fo,{$theme:F,children:n})}),$(Do,{$theme:F,children:[E.navigation&&$(hu,{children:[s(v,{$theme:F,onClick:ou,disabled:d<=1,title:"\u4E0A\u4E00\u9875",children:s(oo,{size:16})}),e>0&&$(io,{$theme:F,children:[d," / ",e]}),s(v,{$theme:F,onClick:h,disabled:!e||d>=e,title:"\u4E0B\u4E00\u9875",children:s(Tu,{size:16})})]}),E.zoom&&$(hu,{children:[s(v,{$theme:F,onClick:g,disabled:C<=.3,title:"\u7F29\u5C0F",children:s(so,{size:16})}),$(ho,{$theme:F,children:[Math.round(C*100),"%"]}),s(v,{$theme:F,onClick:U,disabled:C>=3,title:"\u653E\u5927",children:s(ao,{size:16})})]}),E.annotation&&s(v,{$theme:F,$active:W,onClick:A,title:W?"\u9000\u51FA\u6807\u6CE8":"\u5F00\u59CB\u6807\u6CE8",children:s(to,{size:16})}),E.download&&s(v,{$theme:F,onClick:i,title:"\u4E0B\u8F7D",children:s(eo,{size:16})}),E.rotate&&$(hu,{children:[s(v,{$theme:F,onClick:c,title:"\u5411\u5DE6\u65CB\u8F6C",children:s(no,{size:16})}),s(v,{$theme:F,onClick:V,title:"\u5411\u53F3\u65CB\u8F6C",children:s(ro,{size:16})})]}),E.close&&s(v,{$theme:F,onClick:x,title:"\u5173\u95ED",children:s(uo,{size:16})})]})]})}),Cu=O.div`
94
- display: flex;
95
- flex-direction: column;
96
- height: 100%;
97
- width: 100%;
98
- background: ${n=>n.$theme.colors.background};
99
- border: 1px solid ${n=>n.$theme.colors.border};
100
- border-radius: ${n=>n.$theme.space.radius};
101
- overflow: hidden;
102
- min-height: 0;
103
- position: relative; // 添加相对定位,用于loading遮罩的绝对定位
104
-
105
- /* 添加动画样式 */
106
- @keyframes spin {
107
- 0% {
108
- transform: rotate(0deg);
109
- }
110
- 100% {
111
- transform: rotate(360deg);
112
- }
113
- }
114
- `,Co=({status:n,theme:d})=>$("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",height:"100%",padding:"40px",background:d.colors.background},children:[$("div",{style:{position:"relative",width:"80px",height:"80px",marginBottom:"24px"},children:[s("div",{style:{width:"60px",height:"80px",background:d.colors.primary,borderRadius:"8px 8px 0 0",position:"relative",margin:"0 auto"},children:s("div",{style:{position:"absolute",top:"0",right:"0",width:"0",height:"0",borderStyle:"solid",borderWidth:"0 20px 20px 0",borderColor:`transparent ${d.colors.background} transparent transparent`}})}),s("div",{style:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",width:"20px",height:"20px",borderRadius:"50%",background:d.colors.background,animation:"pulse 1.5s ease-in-out infinite"}})]}),s("div",{style:{fontSize:"16px",fontWeight:"500",color:d.colors.text,marginBottom:"8px",textAlign:"center"},children:n}),s("div",{style:{width:"200px",height:"4px",background:d.colors.border,borderRadius:"2px",overflow:"hidden",position:"relative"},children:s("div",{style:{width:"30%",height:"100%",background:d.colors.primary,borderRadius:"2px",animation:"loading-progress 2s ease-in-out infinite"}})}),s("style",{children:`
115
- @keyframes pulse {
116
- 0%, 100% {
117
- opacity: 1;
118
- transform: translate(-50%, -50%) scale(1);
119
- }
120
- 50% {
121
- opacity: 0.5;
122
- transform: translate(-50%, -50%) scale(1.1);
123
- }
124
- }
125
-
126
- @keyframes loading-progress {
127
- 0% {
128
- transform: translateX(-100%);
129
- }
130
- 50% {
131
- transform: translateX(0%);
132
- }
133
- 100% {
134
- transform: translateX(100%);
135
- }
136
- }
137
- `})]}),fo=O.div`
138
- display: flex;
139
- flex-direction: column;
140
- align-items: center;
141
- justify-content: center;
142
- height: 100%;
143
- color: ${n=>n.$theme.colors.error};
144
- text-align: center;
145
- padding: 20px;
146
- `,mo="http://10.15.12.13:9005/proxy/index/knowledgeBase/file/stream",b=300*1e3,Bo={colors:{primary:"#007bff",secondary:"#6c757d",success:"#008000",warning:"#FFA500",error:"#FF0000",info:"#0000FF",background:"#f8f9fa",text:"#343a40",border:"#dee2e6",disabled:"#808080",disabledBackground:"#F5F5F5",disabledText:"#808080"},space:{sidebar:"12px",size:"12px",radius:"4px",padding:"8px 12px",margin:"4px",shadow:"0 2px 4px rgba(0,0,0,0.1)",lineHeight:"1.5"}},yo=({convertedFilePath:n,fileName:d,fileType:e,csrfToken:E,initialPage:I=1,initialZoom:ou=1,totalPages:h,annotations:U=[],pageSize:g=5,streamApiUrl:A=mo,authorization:i,eventsEmit:c=()=>{},tools:V,styles:x,customComponents:C,className:W,headerClass:eu,contentClass:F})=>{const[tu,f]=k(!0),[fu,m]=k("\u6B63\u5728\u52A0\u8F7D\u6587\u6863..."),[nu,j]=k(null),[P,S]=k(I),[B,Y]=k(h||0),[R,Lu]=k(ou),[N,du]=k(0),[Su,mu]=k(null),[Bu,Eu]=k(null),[K,wu]=k(""),[ku,Fu]=k(null),[$u,pu]=k(null),[xu,iu]=k({}),z=L(!1),ru=L(!1),J=L({}),y=L({}),Q=L(null),Ku=L(null),X=L(I),bu=L(0);bu.current+=1,console.log("[GientechStreamReader] render count:",bu.current),console.log("[GientechStreamReader] props snapshot (early):",{fileType:e,currentPage:P,totalPages:B,hasMarkdown:!!K,hasImage:!!Bu,hasText:!!ku,hasHtml:!!$u,isLoading:tu,error:nu});const q=(x==null?void 0:x.theme)||Bo;uu(()=>{z.current=!1,ru.current=!1},[e,n]);const Z=l(()=>{const u={annotation:!0,download:!0,zoom:!0,close:!0,navigation:!0,rotate:!1};let o;switch(e){case"pdf":case"pdf_slides":o={...u,annotation:!1,download:!1,navigation:!0,rotate:!1};break;case"image":o={...u,annotation:!1,download:!1,navigation:!1,rotate:!0,zoom:!0};break;case"markdown":case"markdown_table":o={...u,annotation:!1,download:!1,navigation:!1,rotate:!1,zoom:!1};break;case"text":case"html":case"unknown":o={...u,annotation:!1,download:!1,navigation:!1,rotate:!1,zoom:!1};break;default:o=u}return V?{...o,...V}:o},[e,V])(),M=l((u,o)=>{const r=Math.floor((u-1)/o)*o+1;return`${r}-${r+o-1}`},[]),Au=l(async u=>{var p;if(!(e==="pdf"||e==="pdf_slides"))return console.log(`\u6587\u4EF6\u7C7B\u578B ${e} \u4E0D\u662FPDF\uFF0C\u8DF3\u8FC7\u7F13\u5B58\u68C0\u67E5`),null;console.log(`\u68C0\u67E5\u9875\u9762 ${u} \u662F\u5426\u5728\u7F13\u5B58\u4E2D`);const r=J.current[u];if(r&&Date.now()-r.timestamp<b)return console.log(`\u4F7F\u7528\u5355\u4E2A\u9875\u9762\u7F13\u5B58: ${u}`),r.pdfDocument?(console.log(`\u76F4\u63A5\u8FD4\u56DE\u7F13\u5B58\u7684PDF\u6587\u6863: ${u}`),r.pdfDocument):null;const t=M(u,g),a=y.current[t];if(console.log(`\u68C0\u67E5chunk\u7F13\u5B58: ${t}, \u5B58\u5728: ${!!a}, \u5305\u542B\u9875\u9762: ${((p=a==null?void 0:a.pages)==null?void 0:p.join(", "))||"\u65E0"}`),a&&Date.now()-a.timestamp<b){if(a.pages.includes(u))return console.log(`\u4F7F\u7528chunk\u7F13\u5B58: ${u} (chunk: ${t})`),a.pdfDocument?(console.log(`\u76F4\u63A5\u8FD4\u56DE\u7F13\u5B58\u7684PDF\u6587\u6863: ${u}`),a.pdfDocument):null;console.log(`\u9875\u9762 ${u} \u4E0D\u5728chunk ${t} \u4E2D\uFF0Cchunk\u5305\u542B: ${a.pages.join(", ")}`)}return console.log(`\u9875\u9762 ${u} \u4E0D\u5728\u4EFB\u4F55\u7F13\u5B58\u4E2D\uFF0C\u9700\u8981\u91CD\u65B0\u8BF7\u6C42`),null},[g,M,e]),Pu=l(async u=>{var o;try{if(!(e==="pdf"||e==="pdf_slides"))throw console.log(`\u6587\u4EF6\u7C7B\u578B ${e} \u4E0D\u9700\u8981\u5206\u9875\u53C2\u6570\uFF0C\u83B7\u53D6\u5B8C\u6574\u5185\u5BB9`),new Error(`\u6587\u4EF6\u7C7B\u578B ${e} \u4E0D\u652F\u6301\u5206\u9875\u52A0\u8F7D`);const t=Math.floor((u-1)/g)*g+1,a=M(u,g);console.log(`\u8BF7\u6C42PDF chunk\u6570\u636E: ${t} (\u5305\u542B\u9875\u9762 ${t}-${t+g-1})`);const p={"Content-Type":"application/json"};i&&(p.Authorization=i),E&&(p["X-CSRF-TOKEN-IN"]=E);const w={convertedFilePath:n,pageNo:t,pageSize:g},D=await cu.post(A,w,{headers:p,responseType:"arraybuffer"}),G=D.headers["x-csrf-token-out"]||D.headers["X-CSRF-TOKEN-OUT"];G&&(console.log("\u83B7\u53D6\u5230\u54CD\u5E94\u5934\u4E2D\u7684CSRF Token:",G),c("request_finish",G));const T=Array.from({length:g},(wo,Vu)=>t+Vu);return y.current[a]={data:D.data,pages:T,timestamp:Date.now(),totalPages:h},console.log(`\u7F13\u5B58PDF chunk\u6570\u636E: ${a}, \u5305\u542B\u9875\u9762: ${T.join(", ")}, \u8BF7\u6C42\u7684\u9875\u9762: ${u}`),console.log("\u5F53\u524D\u6240\u6709\u7F13\u5B58:",Object.keys(y.current)),D.data}catch(r){throw console.error("\u83B7\u53D6PDF stream\u6570\u636E\u5931\u8D25:",r),new Error(`PDF\u8BF7\u6C42\u5931\u8D25: ${((o=r.response)==null?void 0:o.status)||"\u7F51\u7EDC\u9519\u8BEF"}`)}},[A,n,g,i,M,h,B,e,c]),Du=l(async(u,o=!1)=>{var t;if(!u)return;if(!(e==="pdf"||e==="pdf_slides"))return console.log(`\u6587\u4EF6\u7C7B\u578B ${e} \u4E0D\u662FPDF\uFF0C\u8DF3\u8FC7PDF\u52A0\u8F7D\u903B\u8F91`),null;try{o?(f(!0),m("\u6B63\u5728\u52A0\u8F7DPDF\u6587\u6863...")):(f(!0),m(`\u6B63\u5728\u52A0\u8F7D\u7B2C ${u} \u9875...`)),j(null),console.log(`\u5F00\u59CB\u52A0\u8F7DPDF\u9875\u9762: ${u}, \u521D\u59CB\u52A0\u8F7D: ${o}`);const a=await Au(u);if(a)return console.log(`\u4F7F\u7528\u7F13\u5B58\u7684PDF\u6587\u6863: ${u}`),mu(a),f(!1),m(""),console.log(`\u9875\u9762 ${u} \u52A0\u8F7D\u5B8C\u6210\uFF08\u4F7F\u7528\u7F13\u5B58\uFF09`),a;const p=await Pu(u),w=await gu(p,{fileName:d||"Stream\u6587\u6863",fileType:"pdf",token:i});if(w.error)throw new Error(w.error);if(w.type!=="pdf"||!((t=w.content)!=null&&t.document))throw new Error("\u89E3\u6790\u7ED3\u679C\u4E0D\u662F\u6709\u6548\u7684PDF\u6587\u6863");const D=w.content.document;console.log("\u8BBE\u7F6EPDF\u6587\u6863:",D),console.log("PDF\u6587\u6863\u7C7B\u578B:",typeof D),console.log("PDF\u6587\u6863\u65B9\u6CD5:",D?Object.getOwnPropertyNames(Object.getPrototypeOf(D)):"\u65E0\u6587\u6863"),console.log("PDF\u6587\u6863\u9875\u6570:",D?D.numPages:"\u65E0\u9875\u6570"),console.log("\u5F53\u524D\u8BF7\u6C42\u7684\u9875\u9762:",u),console.log("PDF\u6587\u6863\u5305\u542B\u7684\u9875\u9762\u8303\u56F4:",D?`1-${D.numPages}`:"\u65E0\u9875\u6570"),mu(D);const G=M(u,g);if(y.current[G]&&(y.current[G].pdfDocument=D,console.log(`\u7F13\u5B58PDF\u6587\u6863\u5230chunk: ${G}`)),h)console.log(`\u4F7F\u7528\u7528\u6237\u4F20\u5165\u7684\u603B\u9875\u6570: ${h}`),Y(h);else if(D&&D.numPages){const T=D.numPages;console.log(`\u7528\u6237\u672A\u4F20\u5165\u603B\u9875\u6570\uFF0C\u4ECEPDF\u6587\u6863\u83B7\u53D6\u5B9E\u9645\u603B\u9875\u6570: ${T}`),Y(T)}return f(!1),m(""),console.log(`\u9875\u9762 ${u} \u52A0\u8F7D\u5B8C\u6210`),D}catch(a){throw console.error("PDF\u52A0\u8F7D\u5931\u8D25:",a),j(a.message||"PDF\u52A0\u8F7D\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5"),f(!1),m(""),a}},[Pu,d,i,B,Au,M,g,e]),Ru=l(u=>{if(!(e==="pdf"||e==="pdf_slides"))return!1;const r=J.current[u];if(r&&Date.now()-r.timestamp<b)return!!r.pdfDocument;const t=M(u,g),a=y.current[t];return a&&Date.now()-a.timestamp<b?a.pages.includes(u)&&!!a.pdfDocument:!1},[g,M,e]),yu=l(()=>{console.log("\u68C0\u67E5markdown\u5185\u5BB9\u662F\u5426\u5728\u7F13\u5B58\u4E2D");const u=Q.current;return u&&Date.now()-u.timestamp<b?(console.log("\u4F7F\u7528markdown\u5185\u5BB9\u7F13\u5B58"),u.data):(console.log("markdown\u5185\u5BB9\u4E0D\u5728\u7F13\u5B58\u4E2D\uFF0C\u9700\u8981\u91CD\u65B0\u8BF7\u6C42"),null)},[]),_u=l(async()=>{var u;try{console.log("\u8BF7\u6C42\u5B8C\u6574markdown\u6570\u636E");const o={"Content-Type":"application/json"};i&&(o.Authorization=i),E&&(o["X-CSRF-TOKEN-IN"]=E);const r={convertedFilePath:n};console.log("\u53D1\u9001markdown\u8BF7\u6C42:",r);const t=await cu.post(A,r,{headers:o,responseType:"text"}),a=t.headers["x-csrf-token-out"]||t.headers["X-CSRF-TOKEN-OUT"];return a&&(console.log("\u83B7\u53D6\u5230\u54CD\u5E94\u5934\u4E2D\u7684CSRF Token:",a),c("request_finish",a)),console.log("markdown\u54CD\u5E94\u72B6\u6001:",t.status),console.log("markdown\u54CD\u5E94\u6570\u636E\u957F\u5EA6:",((u=t.data)==null?void 0:u.length)||0),t.data}catch(o){throw console.error("\u83B7\u53D6markdown\u6570\u636E\u5931\u8D25:",o),new Error(`\u83B7\u53D6markdown\u6570\u636E\u5931\u8D25: ${o.message}`)}},[n,i,A,c]),Xu=l(async()=>{try{f(!0),m("\u6B63\u5728\u52A0\u8F7Dmarkdown\u6587\u6863..."),j(null),console.log("\u5F00\u59CB\u52A0\u8F7D\u5B8C\u6574markdown\u6587\u6863");const u=yu();if(u)return console.log("\u4F7F\u7528\u7F13\u5B58\u7684markdown\u5185\u5BB9"),wu(u),f(!1),m(""),u;const o=await _u();return Q.current={data:o,timestamp:Date.now()},wu(o),f(!1),m(""),console.log("\u5B8C\u6574markdown\u6587\u6863\u52A0\u8F7D\u5B8C\u6210"),o}catch(u){throw console.error("markdown\u52A0\u8F7D\u5931\u8D25:",u),j(u.message||"markdown\u52A0\u8F7D\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5"),f(!1),m(""),u}},[_u,yu]),Iu=l(async()=>{try{const u={"Content-Type":"application/json"};i&&(u.Authorization=i),E&&(u["X-CSRF-TOKEN-IN"]=E);const o={convertedFilePath:n},r=await cu.post(A,o,{headers:u,responseType:"arraybuffer"}),t=r.headers["x-csrf-token-out"]||r.headers["X-CSRF-TOKEN-OUT"];return t&&(console.log("\u83B7\u53D6\u5230\u54CD\u5E94\u5934\u4E2D\u7684CSRF Token:",t),c("request_finish",t)),r.data}catch(u){throw console.error("\u83B7\u53D6\u56FE\u7247\u6570\u636E\u5931\u8D25:",u),new Error(`\u83B7\u53D6\u56FE\u7247\u6570\u636E\u5931\u8D25: ${u.message}`)}},[n,i,A,c]),qu=l(async()=>{try{f(!0),m("\u6B63\u5728\u52A0\u8F7D\u56FE\u7247..."),j(null);const u=await Iu(),o=await gu(u,{fileName:d||"\u56FE\u7247",fileType:"image",token:i});if(o.error)throw new Error(o.error);if(o.type!=="image"||!o.content)throw new Error("\u89E3\u6790\u7ED3\u679C\u4E0D\u662F\u6709\u6548\u7684\u56FE\u7247");return Eu(o.content),f(!1),m(""),o.content}catch(u){throw console.error("\u56FE\u7247\u52A0\u8F7D\u5931\u8D25:",u),j(u.message||"\u56FE\u7247\u52A0\u8F7D\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5"),f(!1),m(""),u}},[i,d,Iu]),vu=l(async()=>{var u;try{console.log(`\u8BF7\u6C42\u901A\u7528\u6587\u4EF6\u6570\u636E\uFF0C\u6587\u4EF6\u7C7B\u578B: ${e}`);const o={"Content-Type":"application/json"};i&&(o.Authorization=i),E&&(o["X-CSRF-TOKEN-IN"]=E);const r={convertedFilePath:n};console.log("\u53D1\u9001\u901A\u7528\u6587\u4EF6\u8BF7\u6C42:",r);const t=await cu.post(A,r,{headers:o,responseType:"arraybuffer"}),a=t.headers["x-csrf-token-out"]||t.headers["X-CSRF-TOKEN-OUT"];return a&&(console.log("\u83B7\u53D6\u5230\u54CD\u5E94\u5934\u4E2D\u7684CSRF Token:",a),c("request_finish",a)),console.log("\u901A\u7528\u6587\u4EF6\u54CD\u5E94\u72B6\u6001:",t.status),console.log("\u901A\u7528\u6587\u4EF6\u54CD\u5E94\u6570\u636E\u957F\u5EA6:",((u=t.data)==null?void 0:u.byteLength)||0),t.data}catch(o){throw console.error("\u83B7\u53D6\u901A\u7528\u6587\u4EF6\u6570\u636E\u5931\u8D25:",o),new Error(`\u83B7\u53D6\u901A\u7528\u6587\u4EF6\u6570\u636E\u5931\u8D25: ${o.message}`)}},[n,i,A,c]),Zu=l(async()=>{try{if(console.log("=== loadGenericDocument \u88AB\u8C03\u7528 ==="),console.log("\u8C03\u7528\u6808:",new Error().stack),console.log("\u5F53\u524D\u65F6\u95F4:",new Date().toISOString()),z.current){console.log(`\u901A\u7528\u6587\u6863\u6B63\u5728\u52A0\u8F7D\u4E2D\uFF0C\u5FFD\u7565\u91CD\u590D\u8BF7\u6C42\uFF0C\u6587\u4EF6\u7C7B\u578B: ${e}`);return}if(ru.current){console.log(`\u901A\u7528\u6587\u6863\u5DF2\u7ECF\u52A0\u8F7D\u8FC7\uFF0C\u5FFD\u7565\u91CD\u590D\u8BF7\u6C42\uFF0C\u6587\u4EF6\u7C7B\u578B: ${e}`);return}const u=`${e}_${n}`,o=xu[u];if(console.log(`\u68C0\u67E5\u901A\u7528\u6587\u6863\u7F13\u5B58\uFF0Ckey: ${u}, \u7F13\u5B58\u5B58\u5728: ${!!o}, \u7F13\u5B58\u65F6\u95F4: ${o?Date.now()-o.timestamp:"N/A"}ms`),o&&Date.now()-o.timestamp<b)return console.log(`\u4F7F\u7528\u7F13\u5B58\u7684\u901A\u7528\u6587\u6863\u5185\u5BB9\uFF0C\u6587\u4EF6\u7C7B\u578B: ${e}`),e==="text"&&o.content?Fu(o.content):e==="html"&&o.content&&pu(o.content),S(1),Y(h||1),f(!1),m(""),o.content;z.current=!0,f(!0),m(`\u6B63\u5728\u52A0\u8F7D${e}\u6587\u6863...`),j(null),console.log(`\u5F00\u59CB\u52A0\u8F7D\u901A\u7528\u6587\u6863\uFF0C\u6587\u4EF6\u7C7B\u578B: ${e}`);const r=await vu(),t=await gu(r,{fileName:d||`${e}\u6587\u6863`,fileType:e,token:i});if(t.error)throw new Error(t.error);let a=null;if(t.type==="text"&&t.content)Fu(t.content),a=t.content;else if(t.type==="html"&&t.content)pu(t.content),a=t.content;else if(t.type==="image"&&t.content)Eu(t.content),a=t.content;else{const w=new TextDecoder("utf-8").decode(r);Fu({type:"text",content:w}),a={type:"text",content:w}}if(a){const p=`${e}_${n}`,w={...xu,[p]:{content:a,timestamp:Date.now()}};iu(w),console.log(`\u901A\u7528\u6587\u6863\u5185\u5BB9\u5DF2\u7F13\u5B58\uFF0C\u6587\u4EF6\u7C7B\u578B: ${e}, \u7F13\u5B58\u952E: ${p}`),console.log("\u5F53\u524D\u7F13\u5B58\u72B6\u6001:",w)}return f(!1),m(""),z.current=!1,ru.current=!0,console.log(`\u901A\u7528\u6587\u6863\u52A0\u8F7D\u5B8C\u6210\uFF0C\u6587\u4EF6\u7C7B\u578B: ${e}`),t}catch(u){throw console.error("\u901A\u7528\u6587\u6863\u52A0\u8F7D\u5931\u8D25:",u),j(u.message||"\u901A\u7528\u6587\u6863\u52A0\u8F7D\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5"),f(!1),m(""),z.current=!1,ru.current=!0,u}},[vu,d,i]),au=l(async u=>{if(u===X.current)return;if(tu){console.log("\u9875\u9762\u6B63\u5728\u52A0\u8F7D\u4E2D\uFF0C\u5FFD\u7565\u7FFB\u9875\u8BF7\u6C42");return}if(!(e==="pdf"||e==="pdf_slides")){console.log(`\u6587\u4EF6\u7C7B\u578B ${e} \u4E0D\u652F\u6301\u7FFB\u9875\uFF0C\u5FFD\u7565\u7FFB\u9875\u8BF7\u6C42`);return}console.log("PDF\u9875\u9762\u53D8\u5316:",u,"\u5F53\u524D\u9875:",X.current),console.log(`\u9875\u9762 ${u} \u662F\u5426\u5728\u7F13\u5B58\u4E2D:`,Ru(u)),X.current=u,S(u);try{await Du(u,!1),c("pageChange",{pageNumber:u,totalPages:h||B})}catch(r){console.error("PDF\u9875\u9762\u52A0\u8F7D\u5931\u8D25:",r);const t=X.current;S(t)}},[Du,B,c,Ru,tu,e]);uu(()=>{X.current=P,console.log("\u5F53\u524D\u9875\u72B6\u6001\u66F4\u65B0:",P)},[P]);const su=l(u=>{Lu(u),c("zoomChange",{scale:u})},[c]),Ou=l(()=>{c("viewer:close")},[c]),Gu=l(()=>{const u=Math.min(3,R+.1);su(u)},[R,su]),Hu=l(()=>{const u=Math.max(.3,R-.1);su(u)},[R,su]),Uu=l(()=>{const u=(N-90+360)%360;du(u),c("rotateChange",{rotation:u})},[N,c]),Wu=l(()=>{const u=(N+90)%360;du(u),c("rotateChange",{rotation:u})},[N,c]),Yu=l(()=>{if(!(e==="pdf"||e==="pdf_slides")){console.log(`\u6587\u4EF6\u7C7B\u578B ${e} \u4E0D\u652F\u6301\u7FFB\u9875\uFF0C\u5FFD\u7565\u7FFB\u9875\u8BF7\u6C42`);return}const o=X.current-1;o>=1&&au(o)},[au,e]),Ju=l(()=>{if(!(e==="pdf"||e==="pdf_slides")){console.log(`\u6587\u4EF6\u7C7B\u578B ${e} \u4E0D\u652F\u6301\u7FFB\u9875\uFF0C\u5FFD\u7565\u7FFB\u9875\u8BF7\u6C42`);return}const o=X.current+1,r=h||B;r&&o<=r&&au(o)},[B,au,e]),ju=l(()=>{const u=Date.now();Object.keys(J.current).forEach(o=>{const r=J.current[parseInt(o)];u-r.timestamp>b&&(delete J.current[parseInt(o)],console.log(`\u6E05\u7406\u8FC7\u671F\u9875\u9762\u7F13\u5B58: ${o}`))}),Object.keys(y.current).forEach(o=>{const r=y.current[o];u-r.timestamp>b&&(delete y.current[o],console.log(`\u6E05\u7406\u8FC7\u671Fchunk\u7F13\u5B58: ${o}`))}),Q.current&&u-Q.current.timestamp>b&&(Q.current=null,console.log("\u6E05\u7406\u8FC7\u671Fmarkdown\u5185\u5BB9\u7F13\u5B58")),iu(o=>{const r={...o};return Object.keys(r).forEach(t=>{u-r[t].timestamp>b&&(delete r[t],console.log(`\u6E05\u7406\u8FC7\u671F\u901A\u7528\u6587\u4EF6\u7F13\u5B58: ${t}`))}),r})},[]),_=l(()=>{if(d)return d;try{const u=new URL(n);return decodeURIComponent(u.pathname.split("/").pop()||"")||"Stream\u6587\u6863"}catch{const u=n.split("/");return decodeURIComponent(u[u.length-1])||"Stream\u6587\u6863"}},[n,d]);if(uu(()=>{const u=setInterval(ju,b);return()=>clearInterval(u)},[ju]),uu(()=>()=>{J.current={},y.current={},Q.current=null,iu({}),console.log("\u7EC4\u4EF6\u5378\u8F7D\uFF0C\u6E05\u7406\u6240\u6709\u7F13\u5B58")},[]),uu(()=>{console.log("=== useEffect \u88AB\u89E6\u53D1 ==="),console.log("\u89E6\u53D1\u65F6\u95F4:",new Date().toISOString()),console.log("\u89E6\u53D1\u539F\u56E0:",{initialPage:I,fileType:e}),(async()=>{try{const o=e==="pdf"||e==="pdf_slides",r=o&&I||1;console.log("\u5F00\u59CB\u521D\u59CB\u52A0\u8F7D\uFF0C\u6587\u4EF6\u7C7B\u578B:",e,"\u6709\u6548\u9875\u7801:",r,"\u662F\u5426PDF:",o),e==="markdown"||e==="markdown_table"?(await Xu(),S(1),Y(h||1),c("pageChange",{pageNumber:1,totalPages:h||1})):e==="image"?(await qu(),S(1),Y(h||1),du(0),c("pageChange",{pageNumber:1,totalPages:h||1})):o?(await Du(r,!0),S(r),setTimeout(()=>{c("pageChange",{pageNumber:r,totalPages:h||B})},0)):(console.log("=== \u521D\u59CB\u52A0\u8F7D\uFF1A\u4F7F\u7528\u901A\u7528\u52A0\u8F7D\u51FD\u6570\u5904\u7406\u6587\u4EF6\u7C7B\u578B ===",e),await Zu(),S(1),Y(h||1),c("pageChange",{pageNumber:1,totalPages:h||1}))}catch(o){console.error("\u521D\u59CB\u52A0\u8F7D\u5931\u8D25:",o)}})()},[I,e,n]),nu)return s(Cu,{$theme:q,className:W,children:C!=null&&C.ErrorComponent?s(C.ErrorComponent,{error:nu,theme:q}):$(fo,{$theme:q,children:[s("div",{children:"\u52A0\u8F7D\u5931\u8D25"}),s("div",{style:{fontSize:"12px",marginTop:"8px"},children:nu})]})});const Qu=zu(()=>Math.floor((P-1)/g)*g+1,[P,g]);return tu?$(Cu,{$theme:q,className:W,children:[s(Mu,{fileName:_(),currentPage:P,totalPage:B,scale:R,isAnnotating:!1,tools:Z,styles:x,onPrevPage:()=>{},onNextPage:()=>{},onZoomIn:()=>{},onZoomOut:()=>{},onAnnotationToggle:()=>{},onDownload:()=>{},onClose:Ou,className:eu}),C!=null&&C.LoadingComponent?s(C.LoadingComponent,{status:fu,theme:q}):s(Co,{status:fu,theme:q})]}):$(Cu,{$theme:q,className:W,children:[s(Mu,{fileName:_(),currentPage:P,totalPage:B,scale:R,isAnnotating:!1,tools:{...Z,navigation:e==="pdf"||e==="pdf_slides"?Z.navigation:!1,rotate:e==="image"},styles:x,onPrevPage:Yu,onNextPage:Ju,onZoomIn:Gu,onZoomOut:Hu,onRotateLeft:e==="image"?Uu:void 0,onRotateRight:e==="image"?Wu:void 0,onAnnotationToggle:()=>{},onDownload:()=>{},onClose:Ou,className:eu}),e==="markdown"||e==="markdown_table"?$("div",{ref:Ku,style:{flex:1,overflow:"auto",position:"relative"},className:F,children:[s(lu,{data:{content:K,..._()&&{fileName:_()},...e&&{fileType:e},...B&&{totalPages:B}},annotationData:U,totalPage:B,currentPage:P,scale:R,eventsEmit:(u,o)=>{console.log("Fviewer\u4E8B\u4EF6:",u,o),c(u==="md_annotation_add"?"md_annotation_add":u==="table_annotation_add"?"table_annotation_add":u,o)},styles:x,tools:Z,customComponents:C,contentClass:F}),(console.log("=== \u4F20\u9012\u7ED9Fviewer\u7684markdown\u5185\u5BB9 ==="),console.log("markdownContent:",K),console.log("markdownContent\u957F\u5EA6:",K.length),console.log("markdownContent\u524D100\u5B57\u7B26:",K.substring(0,100)),console.log("markdownContent\u540E100\u5B57\u7B26:",K.substring(K.length-100)),null)]}):e==="image"?s(lu,{data:{content:Bu,..._()&&{fileName:_()},...e&&{fileType:e}},annotationData:U,totalPage:1,currentPage:1,scale:R,rotation:N,eventsEmit:c,styles:x,tools:{...Z,navigation:!1,rotate:!0},customComponents:C,contentClass:F}):e==="pdf"||e==="pdf_slides"?s(lu,{data:{content:{document:Su},..._()&&{fileName:_()},...e&&{fileType:e},...B&&{totalPages:B},pdfStartPage:Qu},annotationData:U,totalPage:B,currentPage:P,scale:R,initialZoom:ou,eventsEmit:(u,o)=>{console.log("Fviewer\u4E8B\u4EF6:",u,o),u==="scaleChange"&&console.log("\u6536\u5230\u7F29\u653E\u53D8\u5316\u4E8B\u4EF6:",o),c(u,o)},styles:x,tools:Z,customComponents:C,contentClass:F}):s(lu,{data:{content:ku||$u||{type:"text",content:"\u6587\u4EF6\u5185\u5BB9\u52A0\u8F7D\u4E2D..."},..._()&&{fileName:_()},...e&&{fileType:e}},annotationData:U,totalPage:1,currentPage:1,scale:R,eventsEmit:c,styles:x,tools:{...Z,navigation:!1},customComponents:C,contentClass:F})]})};export{yo as G};
@@ -1,6 +0,0 @@
1
- import{c as t}from"./createLucideIcon-Bj5DlX2s.js";/**
2
- * @license lucide-react v0.456.0 - ISC
3
- *
4
- * This source code is licensed under the ISC license.
5
- * See the LICENSE file in the root directory of this source tree.
6
- */const h=t("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);export{h as C};
@@ -1,21 +0,0 @@
1
- import{forwardRef as i,createElement as a}from"react";/**
2
- * @license lucide-react v0.456.0 - ISC
3
- *
4
- * This source code is licensed under the ISC license.
5
- * See the LICENSE file in the root directory of this source tree.
6
- */const p=r=>r.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),c=(...r)=>r.filter((e,t,o)=>!!e&&e.trim()!==""&&o.indexOf(e)===t).join(" ").trim();/**
7
- * @license lucide-react v0.456.0 - ISC
8
- *
9
- * This source code is licensed under the ISC license.
10
- * See the LICENSE file in the root directory of this source tree.
11
- */var f={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
12
- * @license lucide-react v0.456.0 - ISC
13
- *
14
- * This source code is licensed under the ISC license.
15
- * See the LICENSE file in the root directory of this source tree.
16
- */const g=i(({color:r="currentColor",size:e=24,strokeWidth:t=2,absoluteStrokeWidth:o,className:s="",children:n,iconNode:u,...l},m)=>a("svg",{ref:m,...f,width:e,height:e,stroke:r,strokeWidth:o?Number(t)*24/Number(e):t,className:c("lucide",s),...l},[...u.map(([d,w])=>a(d,w)),...Array.isArray(n)?n:[n]]));/**
17
- * @license lucide-react v0.456.0 - ISC
18
- *
19
- * This source code is licensed under the ISC license.
20
- * See the LICENSE file in the root directory of this source tree.
21
- */const C=(r,e)=>{const t=i(({className:o,...s},n)=>a(g,{ref:n,iconNode:e,className:c(`lucide-${p(r)}`,o),...s}));return t.displayName=`${r}`,t};export{C as c};
@@ -1,2 +0,0 @@
1
- import nt,{createElement as Le,useContext as Me}from"react";var R=function(){return R=Object.assign||function(e){for(var r,n=1,s=arguments.length;n<s;n++){r=arguments[n];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},R.apply(this,arguments)};function vt(t,e,r){if(r||arguments.length===2)for(var n=0,s=e.length,o;n<s;n++)(o||!(n in e))&&(o||(o=Array.prototype.slice.call(e,0,n)),o[n]=e[n]);return t.concat(o||Array.prototype.slice.call(e))}var v="-ms-",rt="-moz-",h="-webkit-",fe="comm",Ct="rule",Mt="decl",Ye="@import",pe="@keyframes",We="@layer",he=Math.abs,Yt=String.fromCharCode,Tt=Object.assign;function qe(t,e){return _(t,0)^45?(((e<<2^_(t,0))<<2^_(t,1))<<2^_(t,2))<<2^_(t,3):0}function de(t){return t.trim()}function T(t,e){return(t=e.exec(t))?t[0]:t}function u(t,e,r){return t.replace(e,r)}function dt(t,e,r){return t.indexOf(e,r)}function _(t,e){return t.charCodeAt(e)|0}function H(t,e,r){return t.slice(e,r)}function O(t){return t.length}function le(t){return t.length}function et(t,e){return e.push(t),t}function He(t,e){return t.map(e).join("")}function Zt(t,e){return t.filter(function(r){return!T(r,e)})}var At=1,K=1,ge=0,k=0,I=0,Q="";function xt(t,e,r,n,s,o,a,c){return{value:t,root:e,parent:r,type:n,props:s,children:o,line:At,column:K,length:a,return:"",siblings:c}}function F(t,e){return Tt(xt("",null,null,"",null,null,0,t.siblings),t,{length:-t.length},e)}function W(t){for(;t.root;)t=F(t.root,{children:[t]});et(t,t.siblings)}function Ke(){return I}function Ue(){return I=k>0?_(Q,--k):0,K--,I===10&&(K=1,At--),I}function N(){return I=k<ge?_(Q,k++):0,K++,I===10&&(K=1,At++),I}function L(){return _(Q,k)}function lt(){return k}function It(t,e){return H(Q,t,e)}function jt(t){switch(t){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function Ze(t){return At=K=1,ge=O(Q=t),k=0,[]}function Je(t){return Q="",t}function kt(t){return de(It(k-1,zt(t===91?t+2:t===40?t+1:t)))}function Qe(t){for(;(I=L())&&I<33;)N();return jt(t)>2||jt(I)>3?"":" "}function Ve(t,e){for(;--e&&N()&&!(I<48||I>102||I>57&&I<65||I>70&&I<97););return It(t,lt()+(e<6&&L()==32&&N()==32))}function zt(t){for(;N();)switch(I){case t:return k;case 34:case 39:t!==34&&t!==39&&zt(I);break;case 40:t===41&&zt(t);break;case 92:N();break}return k}function Xe(t,e){for(;N()&&t+I!==57;)if(t+I===84&&L()===47)break;return"/*"+It(e,k-1)+"*"+Yt(t===47?t:N())}function tr(t){for(;!jt(L());)N();return It(t,k)}function er(t){return Je(gt("",null,null,null,[""],t=Ze(t),0,[0],t))}function gt(t,e,r,n,s,o,a,c,i){for(var l=0,d=0,g=a,m=0,p=0,S=0,A=1,$=1,x=1,w=0,b="",C=s,E=o,y=n,f=b;$;)switch(S=w,w=N()){case 40:if(S!=108&&_(f,g-1)==58){dt(f+=u(kt(w),"&","&\f"),"&\f",he(l?c[l-1]:0))!=-1&&(x=-1);break}case 34:case 39:case 91:f+=kt(w);break;case 9:case 10:case 13:case 32:f+=Qe(S);break;case 92:f+=Ve(lt()-1,7);continue;case 47:switch(L()){case 42:case 47:et(rr(Xe(N(),lt()),e,r,i),i);break;default:f+="/"}break;case 123*A:c[l++]=O(f)*x;case 125*A:case 59:case 0:switch(w){case 0:case 125:$=0;case 59+d:x==-1&&(f=u(f,/\f/g,"")),p>0&&O(f)-g&&et(p>32?Qt(f+";",n,r,g-1,i):Qt(u(f," ","")+";",n,r,g-2,i),i);break;case 59:f+=";";default:if(et(y=Jt(f,e,r,l,d,s,c,b,C=[],E=[],g,o),o),w===123)if(d===0)gt(f,e,y,y,C,o,g,c,E);else switch(m===99&&_(f,3)===110?100:m){case 100:case 108:case 109:case 115:gt(t,y,y,n&&et(Jt(t,y,y,0,0,s,c,b,s,C=[],g,E),E),s,E,g,c,n?C:E);break;default:gt(f,y,y,y,[""],E,0,c,E)}}l=d=p=0,A=x=1,b=f="",g=a;break;case 58:g=1+O(f),p=S;default:if(A<1){if(w==123)--A;else if(w==125&&A++==0&&Ue()==125)continue}switch(f+=Yt(w),w*A){case 38:x=d>0?1:(f+="\f",-1);break;case 44:c[l++]=(O(f)-1)*x,x=1;break;case 64:L()===45&&(f+=kt(N())),m=L(),d=g=O(b=f+=tr(lt())),w++;break;case 45:S===45&&O(f)==2&&(A=0)}}return o}function Jt(t,e,r,n,s,o,a,c,i,l,d,g){for(var m=s-1,p=s===0?o:[""],S=le(p),A=0,$=0,x=0;A<n;++A)for(var w=0,b=H(t,m+1,m=he($=a[A])),C=t;w<S;++w)(C=de($>0?p[w]+" "+b:u(b,/&\f/g,p[w])))&&(i[x++]=C);return xt(t,e,r,s===0?Ct:c,i,l,d,g)}function rr(t,e,r,n){return xt(t,e,r,fe,Yt(Ke()),H(t,2,-2),0,n)}function Qt(t,e,r,n,s){return xt(t,e,r,Mt,H(t,0,n),H(t,n+1,-1),n,s)}function me(t,e,r){switch(qe(t,e)){case 5103:return h+"print-"+t+t;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return h+t+t;case 4789:return rt+t+t;case 5349:case 4246:case 4810:case 6968:case 2756:return h+t+rt+t+v+t+t;case 5936:switch(_(t,e+11)){case 114:return h+t+v+u(t,/[svh]\w+-[tblr]{2}/,"tb")+t;case 108:return h+t+v+u(t,/[svh]\w+-[tblr]{2}/,"tb-rl")+t;case 45:return h+t+v+u(t,/[svh]\w+-[tblr]{2}/,"lr")+t}case 6828:case 4268:case 2903:return h+t+v+t+t;case 6165:return h+t+v+"flex-"+t+t;case 5187:return h+t+u(t,/(\w+).+(:[^]+)/,h+"box-$1$2"+v+"flex-$1$2")+t;case 5443:return h+t+v+"flex-item-"+u(t,/flex-|-self/g,"")+(T(t,/flex-|baseline/)?"":v+"grid-row-"+u(t,/flex-|-self/g,""))+t;case 4675:return h+t+v+"flex-line-pack"+u(t,/align-content|flex-|-self/g,"")+t;case 5548:return h+t+v+u(t,"shrink","negative")+t;case 5292:return h+t+v+u(t,"basis","preferred-size")+t;case 6060:return h+"box-"+u(t,"-grow","")+h+t+v+u(t,"grow","positive")+t;case 4554:return h+u(t,/([^-])(transform)/g,"$1"+h+"$2")+t;case 6187:return u(u(u(t,/(zoom-|grab)/,h+"$1"),/(image-set)/,h+"$1"),t,"")+t;case 5495:case 3959:return u(t,/(image-set\([^]*)/,h+"$1$`$1");case 4968:return u(u(t,/(.+:)(flex-)?(.*)/,h+"box-pack:$3"+v+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+h+t+t;case 4200:if(!T(t,/flex-|baseline/))return v+"grid-column-align"+H(t,e)+t;break;case 2592:case 3360:return v+u(t,"template-","")+t;case 4384:case 3616:return r&&r.some(function(n,s){return e=s,T(n.props,/grid-\w+-end/)})?~dt(t+(r=r[e].value),"span",0)?t:v+u(t,"-start","")+t+v+"grid-row-span:"+(~dt(r,"span",0)?T(r,/\d+/):+T(r,/\d+/)-+T(t,/\d+/))+";":v+u(t,"-start","")+t;case 4896:case 4128:return r&&r.some(function(n){return T(n.props,/grid-\w+-start/)})?t:v+u(u(t,"-end","-span"),"span ","")+t;case 4095:case 3583:case 4068:case 2532:return u(t,/(.+)-inline(.+)/,h+"$1$2")+t;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(O(t)-1-e>6)switch(_(t,e+1)){case 109:if(_(t,e+4)!==45)break;case 102:return u(t,/(.+:)(.+)-([^]+)/,"$1"+h+"$2-$3$1"+rt+(_(t,e+3)==108?"$3":"$2-$3"))+t;case 115:return~dt(t,"stretch",0)?me(u(t,"stretch","fill-available"),e,r)+t:t}break;case 5152:case 5920:return u(t,/(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/,function(n,s,o,a,c,i,l){return v+s+":"+o+l+(a?v+s+"-span:"+(c?i:+i-+o)+l:"")+t});case 4949:if(_(t,e+6)===121)return u(t,":",":"+h)+t;break;case 6444:switch(_(t,_(t,14)===45?18:11)){case 120:return u(t,/(.+:)([^;\s!]+)(;|(\s+)?!.+)?/,"$1"+h+(_(t,14)===45?"inline-":"")+"box$3$1"+h+"$2$3$1"+v+"$2box$3")+t;case 100:return u(t,":",":"+v)+t}break;case 5719:case 2647:case 2135:case 3927:case 2391:return u(t,"scroll-","scroll-snap-")+t}return t}function bt(t,e){for(var r="",n=0;n<t.length;n++)r+=e(t[n],n,t,e)||"";return r}function nr(t,e,r,n){switch(t.type){case We:if(t.children.length)break;case Ye:case Mt:return t.return=t.return||t.value;case fe:return"";case pe:return t.return=t.value+"{"+bt(t.children,n)+"}";case Ct:if(!O(t.value=t.props.join(",")))return""}return O(r=bt(t.children,n))?t.return=t.value+"{"+r+"}":""}function sr(t){var e=le(t);return function(r,n,s,o){for(var a="",c=0;c<e;c++)a+=t[c](r,n,s,o)||"";return a}}function or(t){return function(e){e.root||(e=e.return)&&t(e)}}function ar(t,e,r,n){if(t.length>-1&&!t.return)switch(t.type){case Mt:t.return=me(t.value,t.length,r);return;case pe:return bt([F(t,{value:u(t.value,"@","@"+h)})],n);case Ct:if(t.length)return He(r=t.props,function(s){switch(T(s,n=/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":W(F(t,{props:[u(s,/:(read-\w+)/,":"+rt+"$1")]})),W(F(t,{props:[s]})),Tt(t,{props:Zt(r,n)});break;case"::placeholder":W(F(t,{props:[u(s,/:(plac\w+)/,":"+h+"input-$1")]})),W(F(t,{props:[u(s,/:(plac\w+)/,":"+rt+"$1")]})),W(F(t,{props:[u(s,/:(plac\w+)/,v+"input-$1")]})),W(F(t,{props:[s]})),Tt(t,{props:Zt(r,n)});break}return""})}}var ir={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},P={},U=typeof process<"u"&&P!==void 0&&(P.REACT_APP_SC_ATTR||P.SC_ATTR)||"data-styled",ye="active",ve="data-styled-version",Et="6.1.19",Wt=`/*!sc*/
2
- `,St=typeof window<"u"&&typeof document<"u",cr=!!(typeof SC_DISABLE_SPEEDY=="boolean"?SC_DISABLE_SPEEDY:typeof process<"u"&&P!==void 0&&P.REACT_APP_SC_DISABLE_SPEEDY!==void 0&&P.REACT_APP_SC_DISABLE_SPEEDY!==""?P.REACT_APP_SC_DISABLE_SPEEDY!=="false"&&P.REACT_APP_SC_DISABLE_SPEEDY:typeof process<"u"&&P!==void 0&&P.SC_DISABLE_SPEEDY!==void 0&&P.SC_DISABLE_SPEEDY!==""&&P.SC_DISABLE_SPEEDY!=="false"&&P.SC_DISABLE_SPEEDY),_t=Object.freeze([]),Z=Object.freeze({});function ur(t,e,r){return r===void 0&&(r=Z),t.theme!==r.theme&&t.theme||e||r.theme}var be=new Set(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","track","u","ul","use","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"]),fr=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,pr=/(^-|-$)/g;function Vt(t){return t.replace(fr,"-").replace(pr,"")}var hr=/(a)(d)/gi,pt=52,Xt=function(t){return String.fromCharCode(t+(t>25?39:97))};function Ft(t){var e,r="";for(e=Math.abs(t);e>pt;e=e/pt|0)r=Xt(e%pt)+r;return(Xt(e%pt)+r).replace(hr,"$1-$2")}var Nt,Se=5381,q=function(t,e){for(var r=e.length;r;)t=33*t^e.charCodeAt(--r);return t},we=function(t){return q(Se,t)};function dr(t){return Ft(we(t)>>>0)}function lr(t){return t.displayName||t.name||"Component"}function Ot(t){return typeof t=="string"&&!0}var Ce=typeof Symbol=="function"&&Symbol.for,Ae=Ce?Symbol.for("react.memo"):60115,gr=Ce?Symbol.for("react.forward_ref"):60112,mr={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},yr={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},xe={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},vr=((Nt={})[gr]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},Nt[Ae]=xe,Nt);function te(t){return("type"in(e=t)&&e.type.$$typeof)===Ae?xe:"$$typeof"in t?vr[t.$$typeof]:mr;var e}var br=Object.defineProperty,Sr=Object.getOwnPropertyNames,ee=Object.getOwnPropertySymbols,wr=Object.getOwnPropertyDescriptor,Cr=Object.getPrototypeOf,re=Object.prototype;function Ie(t,e,r){if(typeof e!="string"){if(re){var n=Cr(e);n&&n!==re&&Ie(t,n,r)}var s=Sr(e);ee&&(s=s.concat(ee(e)));for(var o=te(t),a=te(e),c=0;c<s.length;++c){var i=s[c];if(!(i in yr||r&&r[i]||a&&i in a||o&&i in o)){var l=wr(e,i);try{br(t,i,l)}catch{}}}}return t}function J(t){return typeof t=="function"}function qt(t){return typeof t=="object"&&"styledComponentId"in t}function B(t,e){return t&&e?"".concat(t," ").concat(e):t||e||""}function ne(t,e){if(t.length===0)return"";for(var r=t[0],n=1;n<t.length;n++)r+=t[n];return r}function st(t){return t!==null&&typeof t=="object"&&t.constructor.name===Object.name&&!("props"in t&&t.$$typeof)}function Gt(t,e,r){if(r===void 0&&(r=!1),!r&&!st(t)&&!Array.isArray(t))return e;if(Array.isArray(e))for(var n=0;n<e.length;n++)t[n]=Gt(t[n],e[n]);else if(st(e))for(var n in e)t[n]=Gt(t[n],e[n]);return t}function Ht(t,e){Object.defineProperty(t,"toString",{value:e})}function ot(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];return new Error("An error occurred. See https://github.com/styled-components/styled-components/blob/main/packages/styled-components/src/utils/errors.md#".concat(t," for more information.").concat(e.length>0?" Args: ".concat(e.join(", ")):""))}var Ar=(function(){function t(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e}return t.prototype.indexOfGroup=function(e){for(var r=0,n=0;n<e;n++)r+=this.groupSizes[n];return r},t.prototype.insertRules=function(e,r){if(e>=this.groupSizes.length){for(var n=this.groupSizes,s=n.length,o=s;e>=o;)if((o<<=1)<0)throw ot(16,"".concat(e));this.groupSizes=new Uint32Array(o),this.groupSizes.set(n),this.length=o;for(var a=s;a<o;a++)this.groupSizes[a]=0}for(var c=this.indexOfGroup(e+1),i=(a=0,r.length);a<i;a++)this.tag.insertRule(c,r[a])&&(this.groupSizes[e]++,c++)},t.prototype.clearGroup=function(e){if(e<this.length){var r=this.groupSizes[e],n=this.indexOfGroup(e),s=n+r;this.groupSizes[e]=0;for(var o=n;o<s;o++)this.tag.deleteRule(n)}},t.prototype.getGroup=function(e){var r="";if(e>=this.length||this.groupSizes[e]===0)return r;for(var n=this.groupSizes[e],s=this.indexOfGroup(e),o=s+n,a=s;a<o;a++)r+="".concat(this.tag.getRule(a)).concat(Wt);return r},t})(),mt=new Map,wt=new Map,yt=1,ht=function(t){if(mt.has(t))return mt.get(t);for(;wt.has(yt);)yt++;var e=yt++;return mt.set(t,e),wt.set(e,t),e},xr=function(t,e){yt=e+1,mt.set(t,e),wt.set(e,t)},Ir="style[".concat(U,"][").concat(ve,'="').concat(Et,'"]'),Er=new RegExp("^".concat(U,'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)')),_r=function(t,e,r){for(var n,s=r.split(","),o=0,a=s.length;o<a;o++)(n=s[o])&&t.registerName(e,n)},Rr=function(t,e){for(var r,n=((r=e.textContent)!==null&&r!==void 0?r:"").split(Wt),s=[],o=0,a=n.length;o<a;o++){var c=n[o].trim();if(c){var i=c.match(Er);if(i){var l=0|parseInt(i[1],10),d=i[2];l!==0&&(xr(d,l),_r(t,d,i[3]),t.getTag().insertRules(l,s)),s.length=0}else s.push(c)}}},se=function(t){for(var e=document.querySelectorAll(Ir),r=0,n=e.length;r<n;r++){var s=e[r];s&&s.getAttribute(U)!==ye&&(Rr(t,s),s.parentNode&&s.parentNode.removeChild(s))}};function $r(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:null}var Ee=function(t){var e=document.head,r=t||e,n=document.createElement("style"),s=(function(c){var i=Array.from(c.querySelectorAll("style[".concat(U,"]")));return i[i.length-1]})(r),o=s!==void 0?s.nextSibling:null;n.setAttribute(U,ye),n.setAttribute(ve,Et);var a=$r();return a&&n.setAttribute("nonce",a),r.insertBefore(n,o),n},Pr=(function(){function t(e){this.element=Ee(e),this.element.appendChild(document.createTextNode("")),this.sheet=(function(r){if(r.sheet)return r.sheet;for(var n=document.styleSheets,s=0,o=n.length;s<o;s++){var a=n[s];if(a.ownerNode===r)return a}throw ot(17)})(this.element),this.length=0}return t.prototype.insertRule=function(e,r){try{return this.sheet.insertRule(r,e),this.length++,!0}catch{return!1}},t.prototype.deleteRule=function(e){this.sheet.deleteRule(e),this.length--},t.prototype.getRule=function(e){var r=this.sheet.cssRules[e];return r&&r.cssText?r.cssText:""},t})(),kr=(function(){function t(e){this.element=Ee(e),this.nodes=this.element.childNodes,this.length=0}return t.prototype.insertRule=function(e,r){if(e<=this.length&&e>=0){var n=document.createTextNode(r);return this.element.insertBefore(n,this.nodes[e]||null),this.length++,!0}return!1},t.prototype.deleteRule=function(e){this.element.removeChild(this.nodes[e]),this.length--},t.prototype.getRule=function(e){return e<this.length?this.nodes[e].textContent:""},t})(),Nr=(function(){function t(e){this.rules=[],this.length=0}return t.prototype.insertRule=function(e,r){return e<=this.length&&(this.rules.splice(e,0,r),this.length++,!0)},t.prototype.deleteRule=function(e){this.rules.splice(e,1),this.length--},t.prototype.getRule=function(e){return e<this.length?this.rules[e]:""},t})(),oe=St,Or={isServer:!St,useCSSOMInjection:!cr},_e=(function(){function t(e,r,n){e===void 0&&(e=Z),r===void 0&&(r={});var s=this;this.options=R(R({},Or),e),this.gs=r,this.names=new Map(n),this.server=!!e.isServer,!this.server&&St&&oe&&(oe=!1,se(this)),Ht(this,function(){return(function(o){for(var a=o.getTag(),c=a.length,i="",l=function(g){var m=(function(x){return wt.get(x)})(g);if(m===void 0)return"continue";var p=o.names.get(m),S=a.getGroup(g);if(p===void 0||!p.size||S.length===0)return"continue";var A="".concat(U,".g").concat(g,'[id="').concat(m,'"]'),$="";p!==void 0&&p.forEach(function(x){x.length>0&&($+="".concat(x,","))}),i+="".concat(S).concat(A,'{content:"').concat($,'"}').concat(Wt)},d=0;d<c;d++)l(d);return i})(s)})}return t.registerId=function(e){return ht(e)},t.prototype.rehydrate=function(){!this.server&&St&&se(this)},t.prototype.reconstructWithOptions=function(e,r){return r===void 0&&(r=!0),new t(R(R({},this.options),e),this.gs,r&&this.names||void 0)},t.prototype.allocateGSInstance=function(e){return this.gs[e]=(this.gs[e]||0)+1},t.prototype.getTag=function(){return this.tag||(this.tag=(e=(function(r){var n=r.useCSSOMInjection,s=r.target;return r.isServer?new Nr(s):n?new Pr(s):new kr(s)})(this.options),new Ar(e)));var e},t.prototype.hasNameForId=function(e,r){return this.names.has(e)&&this.names.get(e).has(r)},t.prototype.registerName=function(e,r){if(ht(e),this.names.has(e))this.names.get(e).add(r);else{var n=new Set;n.add(r),this.names.set(e,n)}},t.prototype.insertRules=function(e,r,n){this.registerName(e,r),this.getTag().insertRules(ht(e),n)},t.prototype.clearNames=function(e){this.names.has(e)&&this.names.get(e).clear()},t.prototype.clearRules=function(e){this.getTag().clearGroup(ht(e)),this.clearNames(e)},t.prototype.clearTag=function(){this.tag=void 0},t})(),Dr=/&/g,Tr=/^\s*\/\/.*$/gm;function Re(t,e){return t.map(function(r){return r.type==="rule"&&(r.value="".concat(e," ").concat(r.value),r.value=r.value.replaceAll(",",",".concat(e," ")),r.props=r.props.map(function(n){return"".concat(e," ").concat(n)})),Array.isArray(r.children)&&r.type!=="@keyframes"&&(r.children=Re(r.children,e)),r})}function jr(t){var e,r,n,s=Z,o=s.options,a=o===void 0?Z:o,c=s.plugins,i=c===void 0?_t:c,l=function(m,p,S){return S.startsWith(r)&&S.endsWith(r)&&S.replaceAll(r,"").length>0?".".concat(e):m},d=i.slice();d.push(function(m){m.type===Ct&&m.value.includes("&")&&(m.props[0]=m.props[0].replace(Dr,r).replace(n,l))}),a.prefix&&d.push(ar),d.push(nr);var g=function(m,p,S,A){p===void 0&&(p=""),S===void 0&&(S=""),A===void 0&&(A="&"),e=A,r=p,n=new RegExp("\\".concat(r,"\\b"),"g");var $=m.replace(Tr,""),x=er(S||p?"".concat(S," ").concat(p," { ").concat($," }"):$);a.namespace&&(x=Re(x,a.namespace));var w=[];return bt(x,sr(d.concat(or(function(b){return w.push(b)})))),w};return g.hash=i.length?i.reduce(function(m,p){return p.name||ot(15),q(m,p.name)},Se).toString():"",g}var zr=new _e,Bt=jr(),$e=nt.createContext({shouldForwardProp:void 0,styleSheet:zr,stylis:Bt});$e.Consumer;nt.createContext(void 0);function ae(){return Me($e)}var Fr=(function(){function t(e,r){var n=this;this.inject=function(s,o){o===void 0&&(o=Bt);var a=n.name+o.hash;s.hasNameForId(n.id,a)||s.insertRules(n.id,a,o(n.rules,a,"@keyframes"))},this.name=e,this.id="sc-keyframes-".concat(e),this.rules=r,Ht(this,function(){throw ot(12,String(n.name))})}return t.prototype.getName=function(e){return e===void 0&&(e=Bt),this.name+e.hash},t})(),Gr=function(t){return t>="A"&&t<="Z"};function ie(t){for(var e="",r=0;r<t.length;r++){var n=t[r];if(r===1&&n==="-"&&t[0]==="-")return t;Gr(n)?e+="-"+n.toLowerCase():e+=n}return e.startsWith("ms-")?"-"+e:e}var Pe=function(t){return t==null||t===!1||t===""},ke=function(t){var e,r,n=[];for(var s in t){var o=t[s];t.hasOwnProperty(s)&&!Pe(o)&&(Array.isArray(o)&&o.isCss||J(o)?n.push("".concat(ie(s),":"),o,";"):st(o)?n.push.apply(n,vt(vt(["".concat(s," {")],ke(o),!1),["}"],!1)):n.push("".concat(ie(s),": ").concat((e=s,(r=o)==null||typeof r=="boolean"||r===""?"":typeof r!="number"||r===0||e in ir||e.startsWith("--")?String(r).trim():"".concat(r,"px")),";")))}return n};function M(t,e,r,n){if(Pe(t))return[];if(qt(t))return[".".concat(t.styledComponentId)];if(J(t)){if(!J(o=t)||o.prototype&&o.prototype.isReactComponent||!e)return[t];var s=t(e);return M(s,e,r,n)}var o;return t instanceof Fr?r?(t.inject(r,n),[t.getName(n)]):[t]:st(t)?ke(t):Array.isArray(t)?Array.prototype.concat.apply(_t,t.map(function(a){return M(a,e,r,n)})):[t.toString()]}function Br(t){for(var e=0;e<t.length;e+=1){var r=t[e];if(J(r)&&!qt(r))return!1}return!0}var Lr=we(Et),Mr=(function(){function t(e,r,n){this.rules=e,this.staticRulesId="",this.isStatic=(n===void 0||n.isStatic)&&Br(e),this.componentId=r,this.baseHash=q(Lr,r),this.baseStyle=n,_e.registerId(r)}return t.prototype.generateAndInjectStyles=function(e,r,n){var s=this.baseStyle?this.baseStyle.generateAndInjectStyles(e,r,n):"";if(this.isStatic&&!n.hash)if(this.staticRulesId&&r.hasNameForId(this.componentId,this.staticRulesId))s=B(s,this.staticRulesId);else{var o=ne(M(this.rules,e,r,n)),a=Ft(q(this.baseHash,o)>>>0);if(!r.hasNameForId(this.componentId,a)){var c=n(o,".".concat(a),void 0,this.componentId);r.insertRules(this.componentId,a,c)}s=B(s,a),this.staticRulesId=a}else{for(var i=q(this.baseHash,n.hash),l="",d=0;d<this.rules.length;d++){var g=this.rules[d];if(typeof g=="string")l+=g;else if(g){var m=ne(M(g,e,r,n));i=q(i,m+d),l+=m}}if(l){var p=Ft(i>>>0);r.hasNameForId(this.componentId,p)||r.insertRules(this.componentId,p,n(l,".".concat(p),void 0,this.componentId)),s=B(s,p)}}return s},t})(),Ne=nt.createContext(void 0);Ne.Consumer;var Dt={};function Yr(t,e,r){var n=qt(t),s=t,o=!Ot(t),a=e.attrs,c=a===void 0?_t:a,i=e.componentId,l=i===void 0?(function(C,E){var y=typeof C!="string"?"sc":Vt(C);Dt[y]=(Dt[y]||0)+1;var f="".concat(y,"-").concat(dr(Et+y+Dt[y]));return E?"".concat(E,"-").concat(f):f})(e.displayName,e.parentComponentId):i,d=e.displayName,g=d===void 0?(function(C){return Ot(C)?"styled.".concat(C):"Styled(".concat(lr(C),")")})(t):d,m=e.displayName&&e.componentId?"".concat(Vt(e.displayName),"-").concat(e.componentId):e.componentId||l,p=n&&s.attrs?s.attrs.concat(c).filter(Boolean):c,S=e.shouldForwardProp;if(n&&s.shouldForwardProp){var A=s.shouldForwardProp;if(e.shouldForwardProp){var $=e.shouldForwardProp;S=function(C,E){return A(C,E)&&$(C,E)}}else S=A}var x=new Mr(r,m,n?s.componentStyle:void 0);function w(C,E){return(function(y,f,Y){var at=y.attrs,De=y.componentStyle,Te=y.defaultProps,je=y.foldedComponentIds,ze=y.styledComponentId,Fe=y.target,Ge=nt.useContext(Ne),Be=ae(),Rt=y.shouldForwardProp||Be.shouldForwardProp,Kt=ur(f,Ge,Te)||Z,D=(function(ct,X,ut){for(var tt,G=R(R({},X),{className:void 0,theme:ut}),Pt=0;Pt<ct.length;Pt+=1){var ft=J(tt=ct[Pt])?tt(G):tt;for(var z in ft)G[z]=z==="className"?B(G[z],ft[z]):z==="style"?R(R({},G[z]),ft[z]):ft[z]}return X.className&&(G.className=B(G.className,X.className)),G})(at,f,Kt),it=D.as||Fe,V={};for(var j in D)D[j]===void 0||j[0]==="$"||j==="as"||j==="theme"&&D.theme===Kt||(j==="forwardedAs"?V.as=D.forwardedAs:Rt&&!Rt(j,it)||(V[j]=D[j]));var Ut=(function(ct,X){var ut=ae(),tt=ct.generateAndInjectStyles(X,ut.styleSheet,ut.stylis);return tt})(De,D),$t=B(je,ze);return Ut&&($t+=" "+Ut),D.className&&($t+=" "+D.className),V[Ot(it)&&!be.has(it)?"class":"className"]=$t,Y&&(V.ref=Y),Le(it,V)})(b,C,E)}w.displayName=g;var b=nt.forwardRef(w);return b.attrs=p,b.componentStyle=x,b.displayName=g,b.shouldForwardProp=S,b.foldedComponentIds=n?B(s.foldedComponentIds,s.styledComponentId):"",b.styledComponentId=m,b.target=n?s.target:t,Object.defineProperty(b,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(C){this._foldedDefaultProps=n?(function(E){for(var y=[],f=1;f<arguments.length;f++)y[f-1]=arguments[f];for(var Y=0,at=y;Y<at.length;Y++)Gt(E,at[Y],!0);return E})({},s.defaultProps,C):C}}),Ht(b,function(){return".".concat(b.styledComponentId)}),o&&Ie(b,t,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0}),b}function ce(t,e){for(var r=[t[0]],n=0,s=e.length;n<s;n+=1)r.push(e[n],t[n+1]);return r}var ue=function(t){return Object.assign(t,{isCss:!0})};function Wr(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];if(J(t)||st(t))return ue(M(ce(_t,vt([t],e,!0))));var n=t;return e.length===0&&n.length===1&&typeof n[0]=="string"?M(n):ue(M(ce(n,e)))}function Lt(t,e,r){if(r===void 0&&(r=Z),!e)throw ot(1,e);var n=function(s){for(var o=[],a=1;a<arguments.length;a++)o[a-1]=arguments[a];return t(e,r,Wr.apply(void 0,vt([s],o,!1)))};return n.attrs=function(s){return Lt(t,e,R(R({},r),{attrs:Array.prototype.concat(r.attrs,s).filter(Boolean)}))},n.withConfig=function(s){return Lt(t,e,R(R({},r),s))},n}var Oe=function(t){return Lt(Yr,t)},qr=Oe;be.forEach(function(t){qr[t]=Oe(t)});export{qr as d};