@fudanda/admin-antd 0.0.0-stage → 2.20261024.1-beta.1

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 (482) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +58 -3
  3. package/THIRD_PARTY_NOTICES.md +55 -0
  4. package/dist/assets/libarchive-DxGirPmi.wasm +0 -0
  5. package/dist/assets/pdfium-BJ2Yip8Q.wasm +0 -0
  6. package/dist/assets/ppt-font-cjk-DxgKpThH.otf +0 -0
  7. package/dist/assets/ppt-native-Cz5DBbag.wasm +0 -0
  8. package/dist/assets/pptx.worker-CtaL8LO_.js +30 -0
  9. package/dist/assets/worker-C5LZNsKY.mjs +1650 -0
  10. package/dist/assets/worker-CDeo9jS-.js +40 -0
  11. package/dist/assets/worker-bundle-Dx5mKZOL.js +6 -0
  12. package/dist/automation.d.ts +3 -0
  13. package/dist/automation.js +15 -0
  14. package/dist/chunks/App-DNjXLysb.js +79 -0
  15. package/dist/chunks/AppModal-DJzQA6FR.js +1 -0
  16. package/dist/chunks/ArcBaseAdmin-BZrHGq2f.js +1 -0
  17. package/dist/chunks/ConfigurableTable-DzmZDd8F.js +55 -0
  18. package/dist/chunks/DashboardPage-BohGodSl.js +22 -0
  19. package/dist/chunks/DataScopePanel-B2-x8Jcz.js +1 -0
  20. package/dist/chunks/DateTimeText-CIt0Qy45.js +1 -0
  21. package/dist/chunks/DepartmentsPage-DMWY__Y_.js +1 -0
  22. package/dist/chunks/DictTag-2-adKbYg.js +1 -0
  23. package/dist/chunks/DictsPage-DILDyHi-.js +15 -0
  24. package/dist/chunks/EditFormModal-DNHOZHxM.js +1 -0
  25. package/dist/chunks/EmptyIllustration-DUC3RZmF.js +1 -0
  26. package/dist/chunks/EntityContextRuntime-DMklAv-k.js +1 -0
  27. package/dist/chunks/EntityContextRuntime-sslBZqYD.js +1 -0
  28. package/dist/chunks/EntityRelationButton-DWn1rC2J.js +8 -0
  29. package/dist/chunks/ExportButton-AzH4D0oW.js +1 -0
  30. package/dist/chunks/FileNameCell-DPyi64Rv.js +1 -0
  31. package/dist/chunks/FileStorageConfigsPage-CzuOgeK0.js +15 -0
  32. package/dist/chunks/FileTypeIcon-DIih3XQG.js +1 -0
  33. package/dist/chunks/FileViewerPreviewPanel-CMqVtGCr.js +41 -0
  34. package/dist/chunks/FilesPage-BaEBCOCs.js +43 -0
  35. package/dist/chunks/IdentitySecurityPage-BO7nY8id.js +1 -0
  36. package/dist/chunks/JsonPreviewPanel-Dhbza-Uu.js +1 -0
  37. package/dist/chunks/LogStatsScaffold-CLycj3da.js +1 -0
  38. package/dist/chunks/LoginLogsPage-DTmHi8u0.js +1 -0
  39. package/dist/chunks/LoginLogsTable-DVmHnC6V.js +1 -0
  40. package/dist/chunks/MarkdownPreviewPanel-DoiaAeRv.js +51 -0
  41. package/dist/chunks/MasterDetailLayout-sjPWw8BI.js +8 -0
  42. package/dist/chunks/MemberAssignmentSheet-Czbt6_zv.js +1 -0
  43. package/dist/chunks/MenuCommandPalette-BCOzf-Kq.js +8 -0
  44. package/dist/chunks/MenusPage-DN8DTGB1.js +1 -0
  45. package/dist/chunks/ModalFooter-RMlvqrO9.js +1 -0
  46. package/dist/chunks/MonacoPreviewPanel-Dnz7xpWP.js +1 -0
  47. package/dist/chunks/NavListPanel-vjIOIqK0.js +1 -0
  48. package/dist/chunks/OnlineSessionsPage-FoHYZKlR.js +1 -0
  49. package/dist/chunks/OperationLogsPage-BeRnGcBJ.js +1 -0
  50. package/dist/chunks/OperationLogsTable-COI-Lp-y.js +1 -0
  51. package/dist/chunks/PDFPreviewPanel-BIQuBnZZ.js +37 -0
  52. package/dist/chunks/PasswordInput-DGEJO9yx.js +1 -0
  53. package/dist/chunks/PositionsPage-DohI0luX.js +1 -0
  54. package/dist/chunks/PreferencesSheetBody-B9niQABW.js +43 -0
  55. package/dist/chunks/ProfilePage-CVTRv7xb.js +15 -0
  56. package/dist/chunks/RelationPanel-B1X6AVaM.js +36 -0
  57. package/dist/chunks/ResponsiveTableActions-y54aSdhs.js +1 -0
  58. package/dist/chunks/RolesPage-CtUw93L8.js +1 -0
  59. package/dist/chunks/ScrollArea-DqjJmHDN.js +11 -0
  60. package/dist/chunks/SearchToolbar-CvgYKUjr.js +1 -0
  61. package/dist/chunks/SessionClientTag-DIwnYodW.js +22 -0
  62. package/dist/chunks/SessionConflictModal-BLNuDsN_.js +1 -0
  63. package/dist/chunks/SettingRow-DVNmTJWC.js +1 -0
  64. package/dist/chunks/SettingsPage-BRnCxYQm.js +26 -0
  65. package/dist/chunks/StatCard-Czjfs0fa.js +4 -0
  66. package/dist/chunks/UTIF-QUtClmQd.js +1 -0
  67. package/dist/chunks/UserAvatar-B8CFnTCn.js +1 -0
  68. package/dist/chunks/UserDisplay-J0Re8z-7.js +1 -0
  69. package/dist/chunks/UserGroupsPage-CNwbejx-.js +1 -0
  70. package/dist/chunks/UserLogsPanels-BHeSxWrk.js +36 -0
  71. package/dist/chunks/UserTransferSelect-CAeyxdor.js +22 -0
  72. package/dist/chunks/UsersPage-BXt9fOru.js +36 -0
  73. package/dist/chunks/abnfDiagram-VCTEODGH-Z6OhNjoW.js +1 -0
  74. package/dist/chunks/activity-DBu4axwF.js +8 -0
  75. package/dist/chunks/arc-B3K1fDeF.js +1 -0
  76. package/dist/chunks/architecture-7GRP2DOG-CMtoOwin.js +1 -0
  77. package/dist/chunks/architectureDiagram-5GKGNRK7-V5A7S5fY.js +36 -0
  78. package/dist/chunks/archive-B_IKvysI.js +72 -0
  79. package/dist/chunks/array-BrHhzP_A.js +1 -0
  80. package/dist/chunks/arrow-left-CsxBMzKY.js +8 -0
  81. package/dist/chunks/avsc-C0VoJRmm.js +160 -0
  82. package/dist/chunks/blockDiagram-I7D4REHJ-CFKGJkc_.js +129 -0
  83. package/dist/chunks/browser-BKLM0ThC-mnGPrtB_.js +1 -0
  84. package/dist/chunks/browser-index-JqxD-45S.js +1 -0
  85. package/dist/chunks/builtin_esm-external-require-react-BsBndGeN.js +1 -0
  86. package/dist/chunks/bundle-DbfUnEV1.js +29 -0
  87. package/dist/chunks/c4Diagram-7LVT6UL2-BqYYoXPe.js +38 -0
  88. package/dist/chunks/channel-C9Dr7Z-W.js +1 -0
  89. package/dist/chunks/chart-data-DImT_Mzn.js +5 -0
  90. package/dist/chunks/chart-renderer-k-Rd8vdL.js +7 -0
  91. package/dist/chunks/chevron-down-mn2tSKQd.js +8 -0
  92. package/dist/chunks/chevron-right-EBApfX6q.js +15 -0
  93. package/dist/chunks/chevrons-up-down-2M6hY6wt.js +15 -0
  94. package/dist/chunks/chunk-2E4U76K2-DNbbdpCx.js +1 -0
  95. package/dist/chunks/chunk-2Q5K7J3B-CmAE3Vs0.js +1 -0
  96. package/dist/chunks/chunk-2ZTRR5NV-BjsSRgBv.js +2 -0
  97. package/dist/chunks/chunk-3Z5EZCMW-uYiqz-6y.js +1 -0
  98. package/dist/chunks/chunk-4HAMMTFA-Aw59LwS3.js +62 -0
  99. package/dist/chunks/chunk-5V3GS4D5-B_CVcJic.js +1 -0
  100. package/dist/chunks/chunk-5VM5RSS4-DMlsEAcl.js +15 -0
  101. package/dist/chunks/chunk-6AZGARVD-CgAiC5mV.js +1 -0
  102. package/dist/chunks/chunk-6EIED4P4-CXz5D9B0.js +1 -0
  103. package/dist/chunks/chunk-6K3QC6MW-DtaQ52mY.js +1 -0
  104. package/dist/chunks/chunk-6TQVIW2G-D0YDxefI.js +1 -0
  105. package/dist/chunks/chunk-747NJXEK-DGoElbDa.js +2 -0
  106. package/dist/chunks/chunk-75Z2AOVW-IO9R6faP.js +2 -0
  107. package/dist/chunks/chunk-CLGD4ZFX-tRS89bnq.js +1 -0
  108. package/dist/chunks/chunk-DU6HZSFF-Bx48E1rg.js +125 -0
  109. package/dist/chunks/chunk-F27PBJKO-DtLva7y0.js +1 -0
  110. package/dist/chunks/chunk-FOHPRMQF-B8MMrnxV.js +255 -0
  111. package/dist/chunks/chunk-GMAD6QVW-D41KnniX.js +72 -0
  112. package/dist/chunks/chunk-GVQU2GXP-CVzgM_ui.js +1 -0
  113. package/dist/chunks/chunk-I5DQTOEV-CoecQT42.js +1 -0
  114. package/dist/chunks/chunk-ICYGCRZG-lH3opfCY.js +1 -0
  115. package/dist/chunks/chunk-IH6LHLGP-tD-j3Rsy.js +1 -0
  116. package/dist/chunks/chunk-IMKFNOWR-CL9pLQhV.js +231 -0
  117. package/dist/chunks/chunk-JWPE2WC7-Wk0BVLn5.js +1 -0
  118. package/dist/chunks/chunk-KI3K4JFJ-C-3Y_9er.js +1 -0
  119. package/dist/chunks/chunk-L3NEJ4N5-CmvrS7Dt.js +1 -0
  120. package/dist/chunks/chunk-LNGE3PJU-BP1fsJRz.js +34 -0
  121. package/dist/chunks/chunk-OSK3NFVY-C9uWOXTC.js +10 -0
  122. package/dist/chunks/chunk-OUJLGHUK-Cm55l9bx.js +2 -0
  123. package/dist/chunks/chunk-P2QGCYS3-C9bc1yiM.js +1 -0
  124. package/dist/chunks/chunk-POPQ4Y6H-P1s5xaxM.js +1 -0
  125. package/dist/chunks/chunk-PWAF6VOD-IORmPx9D.js +1 -0
  126. package/dist/chunks/chunk-SHT3W25Y-Bip4melZ.js +168 -0
  127. package/dist/chunks/chunk-SVP7TREG-BKCgUOuy.js +88 -0
  128. package/dist/chunks/chunk-TICWLB2K-12W2EmSx.js +206 -0
  129. package/dist/chunks/chunk-TLUHSLCS-DsqF476v.js +1 -0
  130. package/dist/chunks/chunk-UY3FDG6J-71d_M6t3.js +1 -0
  131. package/dist/chunks/chunk-XHIXRSVI-C2X1-xC6.js +1 -0
  132. package/dist/chunks/chunk-XXDRQBXY-Bl6AoSZF.js +1 -0
  133. package/dist/chunks/chunk-Y2CYZVJY-DjEHBC-3.js +1 -0
  134. package/dist/chunks/circle-check-RKAno__V.js +8 -0
  135. package/dist/chunks/circle-x-BB5x-D-8.js +8 -0
  136. package/dist/chunks/classDiagram-ZZMXUADV-CZrpYcfK.js +1 -0
  137. package/dist/chunks/classDiagram-v2-VYDZK3BY-CZrpYcfK.js +1 -0
  138. package/dist/chunks/clipboard-ERcMSMRH.js +1 -0
  139. package/dist/chunks/clock-CniP1gZS.js +8 -0
  140. package/dist/chunks/confirm-BtBBEqk8.js +1 -0
  141. package/dist/chunks/controls-C5dPckUT.js +1 -0
  142. package/dist/chunks/copy-ofLPH1I0.js +8 -0
  143. package/dist/chunks/cose-bilkent-JH36ORCC-D9OUqkk5.js +1 -0
  144. package/dist/chunks/createLucideIcon-BtwfYE6A.js +83 -0
  145. package/dist/chunks/cynefin-OW5HDTMX-B8_kUynj.js +1 -0
  146. package/dist/chunks/cynefinDiagram-5FMLGOSQ-DhQChnCg.js +62 -0
  147. package/dist/chunks/cytoscape.esm-wDUnleWx.js +339 -0
  148. package/dist/chunks/dagre-GXQ25YYZ-CfbwC_a5.js +4 -0
  149. package/dist/chunks/dagre-ZVAWSfFw.js +1 -0
  150. package/dist/chunks/data-B05HzECj.js +28 -0
  151. package/dist/chunks/date-picker-CPUxgHVv.js +1 -0
  152. package/dist/chunks/defaultLocale-BvxIcb9Y.js +1 -0
  153. package/dist/chunks/deleteAction-CCocr5uV.js +1 -0
  154. package/dist/chunks/diagram-D9cwc7QH.js +5 -0
  155. package/dist/chunks/diagram-S7CK7UJ4-DVPbdtMm.js +30 -0
  156. package/dist/chunks/diagram-UQ7AKVKN-D_ZBhGLL.js +41 -0
  157. package/dist/chunks/diagram-VSXAHHWV-Dqypp-OX.js +3 -0
  158. package/dist/chunks/diagram-VX7I27RA-CbWJVJ_L.js +24 -0
  159. package/dist/chunks/diagram-Z3DM3KII-CUyP4-RY.js +24 -0
  160. package/dist/chunks/direct-engine-thps0u7R.js +5 -0
  161. package/dist/chunks/dist-Bauqz5on.js +1 -0
  162. package/dist/chunks/dist-CWj_XYki.js +1 -0
  163. package/dist/chunks/dist-D_KGQS7-.js +11 -0
  164. package/dist/chunks/dist-DdW4yNBK.js +1 -0
  165. package/dist/chunks/docx-preview-CPN81HCr.js +11 -0
  166. package/dist/chunks/download--5IybXxz.js +8 -0
  167. package/dist/chunks/drawing-D2Qrun-P.js +48 -0
  168. package/dist/chunks/ebnfDiagram-PWID7BFC-C5NMigjm.js +1 -0
  169. package/dist/chunks/ellipsis-Dux1Nxa5.js +8 -0
  170. package/dist/chunks/email-ByshRsFv.js +61 -0
  171. package/dist/chunks/emailHtml-BAKcRhSm.js +1 -0
  172. package/dist/chunks/erDiagram-RLTQ6QDP-B5rUHJPJ.js +99 -0
  173. package/dist/chunks/eventmodeling-NTZA5JFV-C74no5BH.js +1 -0
  174. package/dist/chunks/export-BkwewH6Q.js +1 -0
  175. package/dist/chunks/export-DlTz5dc2.js +341 -0
  176. package/dist/chunks/eye-off-BtJoIT5n.js +8 -0
  177. package/dist/chunks/feedback-BnjMKZpz.js +1 -0
  178. package/dist/chunks/file-utils-DyvnVEoH.js +1 -0
  179. package/dist/chunks/fit-CsnhEncA.js +1 -0
  180. package/dist/chunks/flowDiagram-HODETNUW-BuMvaSeo.js +1 -0
  181. package/dist/chunks/form-CQutQFiD.js +1 -0
  182. package/dist/chunks/funnel-BwQjQI4Y.js +8 -0
  183. package/dist/chunks/ganttDiagram-EL5Y4UJY-DIAlbvVg.js +292 -0
  184. package/dist/chunks/geo-DR0fL7r2.js +38 -0
  185. package/dist/chunks/gitGraph-4MIJSDKK-Ce5mOfp1.js +1 -0
  186. package/dist/chunks/gitGraphDiagram-WWUBYQGX-DN3G9xiQ.js +106 -0
  187. package/dist/chunks/graphlib-CYBMTUbW.js +1 -0
  188. package/dist/chunks/icons-CbRx5Om7.js +1 -0
  189. package/dist/chunks/illustrations-DT1eq6jI.js +1 -0
  190. package/dist/chunks/image-ez9hvzKT.js +17 -0
  191. package/dist/chunks/index.es-OAWlVkoK.js +16 -0
  192. package/dist/chunks/info-A6RAGUB7-BP6lMBIR.js +1 -0
  193. package/dist/chunks/info-BQa8C31Y.js +8 -0
  194. package/dist/chunks/infoDiagram-27XIBGKW-BhQtr_Ti.js +2 -0
  195. package/dist/chunks/init-Ca_Ibf4y.js +1 -0
  196. package/dist/chunks/ishikawaDiagram-5VMMS53U-CLR6CAi4.js +70 -0
  197. package/dist/chunks/journeyDiagram-3NMN7TZE-_-Q7sjsP.js +139 -0
  198. package/dist/chunks/json-viewer-DHYRjY8I.js +1 -0
  199. package/dist/chunks/jszip.min-hNOoGCeG.js +14 -0
  200. package/dist/chunks/kanban-definition-UXKFOSKX-D97mHeUZ.js +89 -0
  201. package/dist/chunks/katex-D5qu7EYh.js +257 -0
  202. package/dist/chunks/layout-grid-Bp9bwiQZ.js +8 -0
  203. package/dist/chunks/lib-BlRm3nk1.js +15 -0
  204. package/dist/chunks/lib-C1nFUu19.js +4 -0
  205. package/dist/chunks/lib-CqYXBtHb.js +1 -0
  206. package/dist/chunks/libarchive-DRzzJvQl.js +7 -0
  207. package/dist/chunks/line-BV7qVRkM.js +1 -0
  208. package/dist/chunks/line-qVHaOdPp.js +1 -0
  209. package/dist/chunks/linear-DXABSWHW.js +1 -0
  210. package/dist/chunks/list-0CbyOlT9.js +1 -0
  211. package/dist/chunks/list-DCcWnjUg.js +8 -0
  212. package/dist/chunks/listTableProps-DDynsnLF.js +1 -0
  213. package/dist/chunks/log-in-OzbNes8i.js +8 -0
  214. package/dist/chunks/lucide-react-VfAPsQQ5.js +8 -0
  215. package/dist/chunks/maplibre-gl-Bxi83GUP.js +819 -0
  216. package/dist/chunks/maplibre-shared-Oo0L8Lll.js +6 -0
  217. package/dist/chunks/maximize-CnmQ11E7.js +8 -0
  218. package/dist/chunks/media-DoGe_p4O.js +1 -0
  219. package/dist/chunks/menu-mQgsexFx.js +15 -0
  220. package/dist/chunks/mermaid-parser.core-DvCAQkzY.js +3 -0
  221. package/dist/chunks/mermaid.core-CxOC6yPr.js +15 -0
  222. package/dist/chunks/messages-CFyOVxEM.js +1 -0
  223. package/dist/chunks/mindmap-definition-YA3MSWOX-A2UgnMwx.js +96 -0
  224. package/dist/chunks/minimize-Bpau_zCe.js +8 -0
  225. package/dist/chunks/msg-BzZbudMm.js +7 -0
  226. package/dist/chunks/ofd-C7DKqJ6Z.js +33 -0
  227. package/dist/chunks/ofd-DrJyXIpS.js +14 -0
  228. package/dist/chunks/openDocument-DGzqlyJg.js +12 -0
  229. package/dist/chunks/options-B65xkxOY.js +1 -0
  230. package/dist/chunks/ordinal-NuFkISw7.js +1 -0
  231. package/dist/chunks/packet-AYTQ26CC-DS6h3a5l.js +1 -0
  232. package/dist/chunks/panzoom.es-DnuzxUQi.js +1 -0
  233. package/dist/chunks/parse-6ZQGx714.js +1 -0
  234. package/dist/chunks/parser-DC3PvpL4.js +72 -0
  235. package/dist/chunks/path-VUNELGFR.js +1 -0
  236. package/dist/chunks/pegDiagram-XKGWAZYB-DxQqpKfh.js +1 -0
  237. package/dist/chunks/pie-WAS4IAKB-BsaegmNA.js +1 -0
  238. package/dist/chunks/pieDiagram-E7YTZNPT-BUsnkTkJ.js +39 -0
  239. package/dist/chunks/postal-mime-DMcA5b7k.js +28 -0
  240. package/dist/chunks/ppt-B0WY5Gks.js +30 -0
  241. package/dist/chunks/ppt-BIiNnCyj.js +1 -0
  242. package/dist/chunks/pptx-DX5KDFZ7.js +109 -0
  243. package/dist/chunks/preload-helper-C-73SErw.js +1 -0
  244. package/dist/chunks/print-mask-Dguzv0rv.js +17 -0
  245. package/dist/chunks/printLayout-oeudvFkr.js +34 -0
  246. package/dist/chunks/printMask-LefOTJqk.js +8 -0
  247. package/dist/chunks/psd-hjeNFQZ-.js +36 -0
  248. package/dist/chunks/purify.es-BsWMI_aG.js +5 -0
  249. package/dist/chunks/quadrantDiagram-AXDQQJYC-BmQNSzhY.js +7 -0
  250. package/dist/chunks/radar-RG4KPBEZ-BoHdw2h7.js +1 -0
  251. package/dist/chunks/railroad-74A4TZTK-BifJffb4.js +1 -0
  252. package/dist/chunks/railroad-abnf-HS5TGJTU-CMEPumRO.js +1 -0
  253. package/dist/chunks/railroad-ebnf-LZEXJU2U-B06BgAeN.js +1 -0
  254. package/dist/chunks/railroad-peg-WCYAUIDC-CMjriUEs.js +1 -0
  255. package/dist/chunks/railroadDiagram-O6MQD6OU-B2t5KY26.js +1 -0
  256. package/dist/chunks/react-runtime-x2lFbSKq.js +11 -0
  257. package/dist/chunks/refresh-cw-Dz8O9-Hp.js +8 -0
  258. package/dist/chunks/rendered-slot-YhfmcMJr.js +1 -0
  259. package/dist/chunks/requirementDiagram-BXWQKSXE-CBBfNOAp.js +84 -0
  260. package/dist/chunks/rolldown-runtime-BKuNeK48.js +1 -0
  261. package/dist/chunks/rotate-ccw-D2__Zisi.js +8 -0
  262. package/dist/chunks/rotate-cw-BSTVLlWY.js +8 -0
  263. package/dist/chunks/rough.esm-CVrpq1dW.js +1 -0
  264. package/dist/chunks/sankeyDiagram-P5KCCOFB-Cp8SrFyb.js +40 -0
  265. package/dist/chunks/save-w-NwiMMY.js +8 -0
  266. package/dist/chunks/search-DYZU68h1.js +8 -0
  267. package/dist/chunks/search-filters-CRIhZ0gL.js +1 -0
  268. package/dist/chunks/sequenceDiagram-WJ2MYXX4-PDtVfEoj.js +162 -0
  269. package/dist/chunks/shield-alert-De_Hx56I.js +8 -0
  270. package/dist/chunks/sizeCapture-INFHLROL-DA-kAaXB.js +1 -0
  271. package/dist/chunks/skeleton-CrjMjJNr.js +1 -0
  272. package/dist/chunks/spreadsheet-BzbBEhmY.js +1 -0
  273. package/dist/chunks/spreadsheet-LR3SOG-x.js +58 -0
  274. package/dist/chunks/sql-wasm-browser-CFddXd9f.js +2 -0
  275. package/dist/chunks/src-C1iDJpBK.js +1 -0
  276. package/dist/chunks/src-vLpLkuQx.js +1 -0
  277. package/dist/chunks/stateDiagram-D77RDMKH-C1Sx8KUD.js +1 -0
  278. package/dist/chunks/stateDiagram-v2-MP3YSRHH-7wYLSzBX.js +1 -0
  279. package/dist/chunks/swimlanes-42K2YHIH-BmybX9eL.js +1 -0
  280. package/dist/chunks/swimlanesDiagram-VR7AAH4N-DxhXklfm.js +8 -0
  281. package/dist/chunks/tabs-BobA_IcO.js +1 -0
  282. package/dist/chunks/theme-controller-D-ATwFal.js +1 -0
  283. package/dist/chunks/timeline-definition-24CTP7MA-QS9QNm2i.js +120 -0
  284. package/dist/chunks/tinycolor-CG1wnM-U.js +1 -0
  285. package/dist/chunks/togeojson.es-BE8iM7U6.js +1 -0
  286. package/dist/chunks/toolbar-controls-CThS0xuP.js +15 -0
  287. package/dist/chunks/trash-tHBT8Mpw.js +8 -0
  288. package/dist/chunks/treeView-Q6P3EWNA-CN0l7whJ.js +1 -0
  289. package/dist/chunks/treemap-WGGIJYW6-C4P1fQxS.js +1 -0
  290. package/dist/chunks/typography-DKK_iHcj.js +1 -0
  291. package/dist/chunks/ui-BFsHoY7a.js +1 -0
  292. package/dist/chunks/ui-utils-ClxYogUQ.js +1 -0
  293. package/dist/chunks/upload-M-n6woFv.js +8 -0
  294. package/dist/chunks/useCrudOperationColumn-D935tixd.js +1 -0
  295. package/dist/chunks/useListPage-CbcOQG4m.js +1 -0
  296. package/dist/chunks/useModalViewport-HF7te75S.js +1 -0
  297. package/dist/chunks/useRowSelection-4GOMFmjG.js +1 -0
  298. package/dist/chunks/useStatusToggle-B2qZaoc-.js +1 -0
  299. package/dist/chunks/user-round-kYfBkPNu.js +15 -0
  300. package/dist/chunks/users-BXZLb4TY.js +8 -0
  301. package/dist/chunks/vennDiagram-4TSXK5OY-CVd73ycc.js +34 -0
  302. package/dist/chunks/view-B8ZvC8z3.js +1 -0
  303. package/dist/chunks/viewer-Ct88ypIL.js +24 -0
  304. package/dist/chunks/wardley-WFR3VGLG-cG9pRFwD.js +1 -0
  305. package/dist/chunks/wardleyDiagram-VM6X3IG4-B42d0Gqz.js +78 -0
  306. package/dist/chunks/wordDoc-BZY3ZnxN.js +152 -0
  307. package/dist/chunks/wordDocx-Bt2mlB3C.js +77 -0
  308. package/dist/chunks/wordMl-Y_ghyTZ8.js +1 -0
  309. package/dist/chunks/worker-engine-B4e92GsN.js +17369 -0
  310. package/dist/chunks/x-Ak9hw1R9.js +8 -0
  311. package/dist/chunks/xmind-CF9YwkOD.js +58 -0
  312. package/dist/chunks/xychartDiagram-S5SC5T6Z-B_Owv9Ho.js +7 -0
  313. package/dist/file-viewer/flyfish-viewer-assets.json +46 -0
  314. package/dist/file-viewer/vendor/docx/docx.worker.js +5 -0
  315. package/dist/file-viewer/vendor/docx/jszip.min.js +13 -0
  316. package/dist/file-viewer/vendor/xlsx/sheet.worker.js +107 -0
  317. package/dist/file-viewer/wasm/data/sql-wasm.wasm +0 -0
  318. package/dist/index.d.ts +5 -0
  319. package/dist/index.js +1 -0
  320. package/dist/public/avatars/avatar-01.svg +1 -0
  321. package/dist/public/avatars/avatar-02.svg +1 -0
  322. package/dist/public/avatars/avatar-03.svg +1 -0
  323. package/dist/public/avatars/avatar-04.svg +1 -0
  324. package/dist/public/avatars/avatar-05.svg +1 -0
  325. package/dist/public/avatars/avatar-06.svg +1 -0
  326. package/dist/public/avatars/avatar-07.svg +1 -0
  327. package/dist/public/avatars/avatar-08.svg +1 -0
  328. package/dist/public/avatars/avatar-09.svg +1 -0
  329. package/dist/public/avatars/avatar-10.svg +1 -0
  330. package/dist/public/avatars/avatar-11.svg +1 -0
  331. package/dist/public/avatars/avatar-12.svg +1 -0
  332. package/dist/public/monaco/vs/abap-D-t0cyap.js +1 -0
  333. package/dist/public/monaco/vs/apex-CcIm7xu6.js +1 -0
  334. package/dist/public/monaco/vs/assets/css.worker-URu8fCFR.js +97 -0
  335. package/dist/public/monaco/vs/assets/editor.worker-lj3bdIIn.js +30 -0
  336. package/dist/public/monaco/vs/assets/editorWebWorkerMain-CA_vMoUU.js +30 -0
  337. package/dist/public/monaco/vs/assets/html.worker-D1SL3iM8.js +474 -0
  338. package/dist/public/monaco/vs/assets/json.worker-CoJx_OPf.js +62 -0
  339. package/dist/public/monaco/vs/assets/ts.worker-BWKtMYOk.js +67722 -0
  340. package/dist/public/monaco/vs/azcli-BA0tQDCg.js +1 -0
  341. package/dist/public/monaco/vs/basic-languages/monaco.contribution.js +1 -0
  342. package/dist/public/monaco/vs/bat-C397hTD6.js +1 -0
  343. package/dist/public/monaco/vs/bicep-DF5aW17k.js +2 -0
  344. package/dist/public/monaco/vs/cameligo-plsz8qhj.js +1 -0
  345. package/dist/public/monaco/vs/clojure-Y2auQMzK.js +1 -0
  346. package/dist/public/monaco/vs/coffee-Bu45yuWE.js +1 -0
  347. package/dist/public/monaco/vs/cpp-CkKPQIni.js +1 -0
  348. package/dist/public/monaco/vs/csharp-CX28MZyh.js +1 -0
  349. package/dist/public/monaco/vs/csp-D8uWnyxW.js +1 -0
  350. package/dist/public/monaco/vs/css-CaeNmE3S.js +3 -0
  351. package/dist/public/monaco/vs/css.worker-CyhWkhHo.js +1 -0
  352. package/dist/public/monaco/vs/cssMode-CV6Ay48H.js +1 -0
  353. package/dist/public/monaco/vs/cypher-DVThT8BS.js +1 -0
  354. package/dist/public/monaco/vs/dart-CmGfCvrO.js +1 -0
  355. package/dist/public/monaco/vs/dockerfile-CZqqYdch.js +1 -0
  356. package/dist/public/monaco/vs/ecl-30fUercY.js +1 -0
  357. package/dist/public/monaco/vs/editor/editor.main.css +1 -0
  358. package/dist/public/monaco/vs/editor/editor.main.js +1 -0
  359. package/dist/public/monaco/vs/editor-KLE6jdfb.js +831 -0
  360. package/dist/public/monaco/vs/editor.js +1 -0
  361. package/dist/public/monaco/vs/editorWorkerHost-fVE1cjcC.js +35 -0
  362. package/dist/public/monaco/vs/elixir-xjPaIfzF.js +1 -0
  363. package/dist/public/monaco/vs/flow9-DqtmStfK.js +1 -0
  364. package/dist/public/monaco/vs/freemarker2-FWreY7v7.js +3 -0
  365. package/dist/public/monaco/vs/fsharp-BOMdg4U1.js +1 -0
  366. package/dist/public/monaco/vs/go-D_hbi-Jt.js +1 -0
  367. package/dist/public/monaco/vs/graphql-CKUU4kLG.js +1 -0
  368. package/dist/public/monaco/vs/handlebars-CZi4pHCH.js +1 -0
  369. package/dist/public/monaco/vs/hcl-DTaboeZW.js +1 -0
  370. package/dist/public/monaco/vs/html-j_7ZTNRU.js +1 -0
  371. package/dist/public/monaco/vs/html.worker-CA3iAimZ.js +1 -0
  372. package/dist/public/monaco/vs/htmlMode-27by_KM4.js +1 -0
  373. package/dist/public/monaco/vs/index-049xrXrp.js +1 -0
  374. package/dist/public/monaco/vs/index-CBVt3dzv.js +5 -0
  375. package/dist/public/monaco/vs/index.js +1 -0
  376. package/dist/public/monaco/vs/ini-CsNwO04R.js +1 -0
  377. package/dist/public/monaco/vs/initialize-DL0l1TGY.js +1 -0
  378. package/dist/public/monaco/vs/java-CI4ZMsH9.js +1 -0
  379. package/dist/public/monaco/vs/javascript-DTJl4Jn1.js +1 -0
  380. package/dist/public/monaco/vs/json.worker-BizpAl9O.js +1 -0
  381. package/dist/public/monaco/vs/jsonMode-DLUiMUrI.js +1 -0
  382. package/dist/public/monaco/vs/julia-BwzEvaQw.js +1 -0
  383. package/dist/public/monaco/vs/kotlin-IUYPiTV8.js +1 -0
  384. package/dist/public/monaco/vs/language/css/monaco.contribution.js +1 -0
  385. package/dist/public/monaco/vs/language/html/monaco.contribution.js +1 -0
  386. package/dist/public/monaco/vs/language/json/monaco.contribution.js +1 -0
  387. package/dist/public/monaco/vs/language/typescript/monaco.contribution.js +1 -0
  388. package/dist/public/monaco/vs/less-C0eDYdqa.js +2 -0
  389. package/dist/public/monaco/vs/lexon-iON-Kj97.js +1 -0
  390. package/dist/public/monaco/vs/liquid-CLJYelW6.js +1 -0
  391. package/dist/public/monaco/vs/loader.js +1368 -0
  392. package/dist/public/monaco/vs/lspLanguageFeatures-BIkJOWLw.js +2 -0
  393. package/dist/public/monaco/vs/lua-DtygF91M.js +1 -0
  394. package/dist/public/monaco/vs/m3-CsR4AuFi.js +1 -0
  395. package/dist/public/monaco/vs/main-BEx-Fmlo.js +15 -0
  396. package/dist/public/monaco/vs/main-DsK8pnKg.js +3 -0
  397. package/dist/public/monaco/vs/markdown-C_rD0bIw.js +1 -0
  398. package/dist/public/monaco/vs/mdx-CpzZIPHF.js +1 -0
  399. package/dist/public/monaco/vs/mips-CiYP61RB.js +1 -0
  400. package/dist/public/monaco/vs/monaco.contribution-9cKT3C7t.js +1 -0
  401. package/dist/public/monaco/vs/monaco.contribution-BE88ZNGY.js +1 -0
  402. package/dist/public/monaco/vs/monaco.contribution-BPhsneLd.js +1 -0
  403. package/dist/public/monaco/vs/monaco.contribution-BgRy6xDf.js +1 -0
  404. package/dist/public/monaco/vs/msdax-C38-sJlp.js +1 -0
  405. package/dist/public/monaco/vs/mysql-CdtbpvbG.js +1 -0
  406. package/dist/public/monaco/vs/nls/lang/cs.d.ts +1 -0
  407. package/dist/public/monaco/vs/nls/lang/cs.js +9 -0
  408. package/dist/public/monaco/vs/nls/lang/de.d.ts +1 -0
  409. package/dist/public/monaco/vs/nls/lang/de.js +9 -0
  410. package/dist/public/monaco/vs/nls/lang/es.d.ts +1 -0
  411. package/dist/public/monaco/vs/nls/lang/es.js +9 -0
  412. package/dist/public/monaco/vs/nls/lang/fr.d.ts +1 -0
  413. package/dist/public/monaco/vs/nls/lang/fr.js +9 -0
  414. package/dist/public/monaco/vs/nls/lang/it.d.ts +1 -0
  415. package/dist/public/monaco/vs/nls/lang/it.js +9 -0
  416. package/dist/public/monaco/vs/nls/lang/ja.d.ts +1 -0
  417. package/dist/public/monaco/vs/nls/lang/ja.js +9 -0
  418. package/dist/public/monaco/vs/nls/lang/ko.d.ts +1 -0
  419. package/dist/public/monaco/vs/nls/lang/ko.js +9 -0
  420. package/dist/public/monaco/vs/nls/lang/pl.d.ts +1 -0
  421. package/dist/public/monaco/vs/nls/lang/pl.js +9 -0
  422. package/dist/public/monaco/vs/nls/lang/pt-br.d.ts +1 -0
  423. package/dist/public/monaco/vs/nls/lang/pt-br.js +9 -0
  424. package/dist/public/monaco/vs/nls/lang/ru.d.ts +1 -0
  425. package/dist/public/monaco/vs/nls/lang/ru.js +9 -0
  426. package/dist/public/monaco/vs/nls/lang/tr.d.ts +1 -0
  427. package/dist/public/monaco/vs/nls/lang/tr.js +9 -0
  428. package/dist/public/monaco/vs/nls/lang/zh-cn.d.ts +1 -0
  429. package/dist/public/monaco/vs/nls/lang/zh-cn.js +9 -0
  430. package/dist/public/monaco/vs/nls/lang/zh-tw.d.ts +1 -0
  431. package/dist/public/monaco/vs/nls/lang/zh-tw.js +9 -0
  432. package/dist/public/monaco/vs/nls.messages-loader.js +1 -0
  433. package/dist/public/monaco/vs/objective-c-CntZFaHX.js +1 -0
  434. package/dist/public/monaco/vs/pascal-r6kuqfl_.js +1 -0
  435. package/dist/public/monaco/vs/pascaligo-BiXoTmXh.js +1 -0
  436. package/dist/public/monaco/vs/perl-DABw_TcH.js +1 -0
  437. package/dist/public/monaco/vs/pgsql-me_jFXeX.js +1 -0
  438. package/dist/public/monaco/vs/php-D_kh-9LK.js +1 -0
  439. package/dist/public/monaco/vs/pla-VfZjczW0.js +1 -0
  440. package/dist/public/monaco/vs/postiats-BBSzz8Pk.js +1 -0
  441. package/dist/public/monaco/vs/powerquery-Dt-g_2cc.js +1 -0
  442. package/dist/public/monaco/vs/powershell-B-7ap1zc.js +1 -0
  443. package/dist/public/monaco/vs/protobuf-BmtuEB1A.js +2 -0
  444. package/dist/public/monaco/vs/pug-BRpRNeEb.js +1 -0
  445. package/dist/public/monaco/vs/python-CqWUUgfu.js +1 -0
  446. package/dist/public/monaco/vs/qsharp-BzsFaUU9.js +1 -0
  447. package/dist/public/monaco/vs/r-f8dDdrp4.js +1 -0
  448. package/dist/public/monaco/vs/razor-hok5y9Km.js +1 -0
  449. package/dist/public/monaco/vs/redis-fvZQY4PI.js +1 -0
  450. package/dist/public/monaco/vs/redshift-45Et0LQi.js +1 -0
  451. package/dist/public/monaco/vs/restructuredtext-C7UUFKFD.js +1 -0
  452. package/dist/public/monaco/vs/ruby-CZO8zYTz.js +1 -0
  453. package/dist/public/monaco/vs/rust-Bfetafyc.js +1 -0
  454. package/dist/public/monaco/vs/sb-3GYllVck.js +1 -0
  455. package/dist/public/monaco/vs/scala-foMgrKo1.js +1 -0
  456. package/dist/public/monaco/vs/scheme-CHdMtr7p.js +1 -0
  457. package/dist/public/monaco/vs/scss-C1cmLt9V.js +3 -0
  458. package/dist/public/monaco/vs/shell-ClXCKCEW.js +1 -0
  459. package/dist/public/monaco/vs/solidity-MZ6ExpPy.js +1 -0
  460. package/dist/public/monaco/vs/sophia-DWkuSsPQ.js +1 -0
  461. package/dist/public/monaco/vs/sparql-AUGFYSyk.js +1 -0
  462. package/dist/public/monaco/vs/sql-32GpJSV2.js +1 -0
  463. package/dist/public/monaco/vs/st-CuDFIVZ_.js +1 -0
  464. package/dist/public/monaco/vs/swift-t-PfMj7W.js +1 -0
  465. package/dist/public/monaco/vs/systemverilog-Ch4vA8Yt.js +1 -0
  466. package/dist/public/monaco/vs/tcl-D74tq1nH.js +1 -0
  467. package/dist/public/monaco/vs/toggleHighContrast-qGX7E9o7.js +61 -0
  468. package/dist/public/monaco/vs/ts.worker-2QLmBukE.js +1 -0
  469. package/dist/public/monaco/vs/tsMode-B0S_kp2q.js +11 -0
  470. package/dist/public/monaco/vs/twig-C6taOxMV.js +1 -0
  471. package/dist/public/monaco/vs/typescript-_2t_511t.js +1 -0
  472. package/dist/public/monaco/vs/typespec-8OfoLt6R.js +1 -0
  473. package/dist/public/monaco/vs/vb-Dyb2648j.js +1 -0
  474. package/dist/public/monaco/vs/wgsl-BhLXMOR0.js +298 -0
  475. package/dist/public/monaco/vs/workers-BBttULjf.js +1 -0
  476. package/dist/public/monaco/vs/xml-cZjNDqDT.js +1 -0
  477. package/dist/public/monaco/vs/yaml-A1fOIdH6.js +1 -0
  478. package/dist/src-LbWcrSWe.js +3 -0
  479. package/dist/styles.css +2 -0
  480. package/dist/styles.d.ts +1 -0
  481. package/dist/types.d.ts +1 -0
  482. package/package.json +113 -4
@@ -0,0 +1 @@
1
+ import{i as e,t}from"./rolldown-runtime-BKuNeK48.js";var n=/* @__PURE__ */ t((e=>{var t=typeof Uint8Array<`u`&&typeof Uint16Array<`u`&&typeof Int32Array<`u`;function n(e,t){return Object.prototype.hasOwnProperty.call(e,t)}e.assign=function(e){for(var t=Array.prototype.slice.call(arguments,1);t.length;){var r=t.shift();if(r){if(typeof r!=`object`)throw TypeError(r+`must be non-object`);for(var i in r)n(r,i)&&(e[i]=r[i])}}return e},e.shrinkBuf=function(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)};var r={arraySet:function(e,t,n,r,i){if(t.subarray&&e.subarray)e.set(t.subarray(n,n+r),i);else for(var a=0;a<r;a++)e[i+a]=t[n+a]},flattenChunks:function(e){var t,n,r=0,i,a,o;for(t=0,n=e.length;t<n;t++)r+=e[t].length;for(o=new Uint8Array(r),i=0,t=0,n=e.length;t<n;t++)a=e[t],o.set(a,i),i+=a.length;return o}},i={arraySet:function(e,t,n,r,i){for(var a=0;a<r;a++)e[i+a]=t[n+a]},flattenChunks:function(e){return[].concat.apply([],e)}};e.setTyped=function(t){t?(e.Buf8=Uint8Array,e.Buf16=Uint16Array,e.Buf32=Int32Array,e.assign(e,r)):(e.Buf8=Array,e.Buf16=Array,e.Buf32=Array,e.assign(e,i))},e.setTyped(t)})),r=/* @__PURE__ */ t((e=>{var t=n(),r=4,i=0,a=1,o=2;function s(e){for(var t=e.length;--t>=0;)e[t]=0}var c=0,l=1,u=2,d=3,f=258,p=29,m=256,h=m+1+p,g=30,_=19,v=2*h+1,y=15,b=16,x=7,S=256,C=16,w=17,T=18,E=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],D=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],O=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],k=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],A=512,j=Array((h+2)*2);s(j);var M=Array(g*2);s(M);var N=Array(A);s(N);var P=Array(f-d+1);s(P);var F=Array(p);s(F);var I=Array(g);s(I);function L(e,t,n,r,i){this.static_tree=e,this.extra_bits=t,this.extra_base=n,this.elems=r,this.max_length=i,this.has_stree=e&&e.length}var R,z,ee;function te(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function B(e){return e<256?N[e]:N[256+(e>>>7)]}function ne(e,t){e.pending_buf[e.pending++]=t&255,e.pending_buf[e.pending++]=t>>>8&255}function V(e,t,n){e.bi_valid>b-n?(e.bi_buf|=t<<e.bi_valid&65535,ne(e,e.bi_buf),e.bi_buf=t>>b-e.bi_valid,e.bi_valid+=n-b):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=n)}function re(e,t,n){V(e,n[t*2],n[t*2+1])}function ie(e,t){var n=0;do n|=e&1,e>>>=1,n<<=1;while(--t>0);return n>>>1}function ae(e){e.bi_valid===16?(ne(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=e.bi_buf&255,e.bi_buf>>=8,e.bi_valid-=8)}function H(e,t){var n=t.dyn_tree,r=t.max_code,i=t.stat_desc.static_tree,a=t.stat_desc.has_stree,o=t.stat_desc.extra_bits,s=t.stat_desc.extra_base,c=t.stat_desc.max_length,l,u,d,f,p,m,h=0;for(f=0;f<=y;f++)e.bl_count[f]=0;for(n[e.heap[e.heap_max]*2+1]=0,l=e.heap_max+1;l<v;l++)u=e.heap[l],f=n[n[u*2+1]*2+1]+1,f>c&&(f=c,h++),n[u*2+1]=f,!(u>r)&&(e.bl_count[f]++,p=0,u>=s&&(p=o[u-s]),m=n[u*2],e.opt_len+=m*(f+p),a&&(e.static_len+=m*(i[u*2+1]+p)));if(h!==0){do{for(f=c-1;e.bl_count[f]===0;)f--;e.bl_count[f]--,e.bl_count[f+1]+=2,e.bl_count[c]--,h-=2}while(h>0);for(f=c;f!==0;f--)for(u=e.bl_count[f];u!==0;)d=e.heap[--l],!(d>r)&&(n[d*2+1]!==f&&(e.opt_len+=(f-n[d*2+1])*n[d*2],n[d*2+1]=f),u--)}}function oe(e,t,n){for(var r=Array(y+1),i=0,a=1,o;a<=y;a++)r[a]=i=i+n[a-1]<<1;for(o=0;o<=t;o++){var s=e[o*2+1];s!==0&&(e[o*2]=ie(r[s]++,s))}}function se(){var e,t,n,r,i,a=Array(y+1);for(n=0,r=0;r<p-1;r++)for(F[r]=n,e=0;e<1<<E[r];e++)P[n++]=r;for(P[n-1]=r,i=0,r=0;r<16;r++)for(I[r]=i,e=0;e<1<<D[r];e++)N[i++]=r;for(i>>=7;r<g;r++)for(I[r]=i<<7,e=0;e<1<<D[r]-7;e++)N[256+i++]=r;for(t=0;t<=y;t++)a[t]=0;for(e=0;e<=143;)j[e*2+1]=8,e++,a[8]++;for(;e<=255;)j[e*2+1]=9,e++,a[9]++;for(;e<=279;)j[e*2+1]=7,e++,a[7]++;for(;e<=287;)j[e*2+1]=8,e++,a[8]++;for(oe(j,h+1,a),e=0;e<g;e++)M[e*2+1]=5,M[e*2]=ie(e,5);R=new L(j,E,m+1,h,y),z=new L(M,D,0,g,y),ee=new L([],O,0,_,x)}function ce(e){for(var t=0;t<h;t++)e.dyn_ltree[t*2]=0;for(t=0;t<g;t++)e.dyn_dtree[t*2]=0;for(t=0;t<_;t++)e.bl_tree[t*2]=0;e.dyn_ltree[S*2]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0}function le(e){e.bi_valid>8?ne(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function ue(e,n,r,i){le(e),i&&(ne(e,r),ne(e,~r)),t.arraySet(e.pending_buf,e.window,n,r,e.pending),e.pending+=r}function U(e,t,n,r){var i=t*2,a=n*2;return e[i]<e[a]||e[i]===e[a]&&r[t]<=r[n]}function de(e,t,n){for(var r=e.heap[n],i=n<<1;i<=e.heap_len&&(i<e.heap_len&&U(t,e.heap[i+1],e.heap[i],e.depth)&&i++,!U(t,r,e.heap[i],e.depth));)e.heap[n]=e.heap[i],n=i,i<<=1;e.heap[n]=r}function fe(e,t,n){var r,i,a=0,o,s;if(e.last_lit!==0)do r=e.pending_buf[e.d_buf+a*2]<<8|e.pending_buf[e.d_buf+a*2+1],i=e.pending_buf[e.l_buf+a],a++,r===0?re(e,i,t):(o=P[i],re(e,o+m+1,t),s=E[o],s!==0&&(i-=F[o],V(e,i,s)),r--,o=B(r),re(e,o,n),s=D[o],s!==0&&(r-=I[o],V(e,r,s)));while(a<e.last_lit);re(e,S,t)}function W(e,t){var n=t.dyn_tree,r=t.stat_desc.static_tree,i=t.stat_desc.has_stree,a=t.stat_desc.elems,o,s,c=-1,l;for(e.heap_len=0,e.heap_max=v,o=0;o<a;o++)n[o*2]===0?n[o*2+1]=0:(e.heap[++e.heap_len]=c=o,e.depth[o]=0);for(;e.heap_len<2;)l=e.heap[++e.heap_len]=c<2?++c:0,n[l*2]=1,e.depth[l]=0,e.opt_len--,i&&(e.static_len-=r[l*2+1]);for(t.max_code=c,o=e.heap_len>>1;o>=1;o--)de(e,n,o);l=a;do o=e.heap[1],e.heap[1]=e.heap[e.heap_len--],de(e,n,1),s=e.heap[1],e.heap[--e.heap_max]=o,e.heap[--e.heap_max]=s,n[l*2]=n[o*2]+n[s*2],e.depth[l]=(e.depth[o]>=e.depth[s]?e.depth[o]:e.depth[s])+1,n[o*2+1]=n[s*2+1]=l,e.heap[1]=l++,de(e,n,1);while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],H(e,t),oe(n,c,e.bl_count)}function G(e,t,n){var r,i=-1,a,o=t[1],s=0,c=7,l=4;for(o===0&&(c=138,l=3),t[(n+1)*2+1]=65535,r=0;r<=n;r++)a=o,o=t[(r+1)*2+1],!(++s<c&&a===o)&&(s<l?e.bl_tree[a*2]+=s:a===0?s<=10?e.bl_tree[w*2]++:e.bl_tree[T*2]++:(a!==i&&e.bl_tree[a*2]++,e.bl_tree[C*2]++),s=0,i=a,o===0?(c=138,l=3):a===o?(c=6,l=3):(c=7,l=4))}function K(e,t,n){var r,i=-1,a,o=t[1],s=0,c=7,l=4;for(o===0&&(c=138,l=3),r=0;r<=n;r++)if(a=o,o=t[(r+1)*2+1],!(++s<c&&a===o)){if(s<l)do re(e,a,e.bl_tree);while(--s!==0);else a===0?s<=10?(re(e,w,e.bl_tree),V(e,s-3,3)):(re(e,T,e.bl_tree),V(e,s-11,7)):(a!==i&&(re(e,a,e.bl_tree),s--),re(e,C,e.bl_tree),V(e,s-3,2));s=0,i=a,o===0?(c=138,l=3):a===o?(c=6,l=3):(c=7,l=4)}}function pe(e){var t;for(G(e,e.dyn_ltree,e.l_desc.max_code),G(e,e.dyn_dtree,e.d_desc.max_code),W(e,e.bl_desc),t=_-1;t>=3&&e.bl_tree[k[t]*2+1]===0;t--);return e.opt_len+=3*(t+1)+5+5+4,t}function q(e,t,n,r){var i;for(V(e,t-257,5),V(e,n-1,5),V(e,r-4,4),i=0;i<r;i++)V(e,e.bl_tree[k[i]*2+1],3);K(e,e.dyn_ltree,t-1),K(e,e.dyn_dtree,n-1)}function J(e){for(var t=4093624447,n=0;n<=31;n++,t>>>=1)if(t&1&&e.dyn_ltree[n*2]!==0)return i;if(e.dyn_ltree[18]!==0||e.dyn_ltree[20]!==0||e.dyn_ltree[26]!==0)return a;for(n=32;n<m;n++)if(e.dyn_ltree[n*2]!==0)return a;return i}var me=!1;function Y(e){me||=(se(),!0),e.l_desc=new te(e.dyn_ltree,R),e.d_desc=new te(e.dyn_dtree,z),e.bl_desc=new te(e.bl_tree,ee),e.bi_buf=0,e.bi_valid=0,ce(e)}function X(e,t,n,r){V(e,(c<<1)+ +!!r,3),ue(e,t,n,!0)}function he(e){V(e,l<<1,3),re(e,S,j),ae(e)}function ge(e,t,n,i){var a,s,c=0;e.level>0?(e.strm.data_type===o&&(e.strm.data_type=J(e)),W(e,e.l_desc),W(e,e.d_desc),c=pe(e),a=e.opt_len+3+7>>>3,s=e.static_len+3+7>>>3,s<=a&&(a=s)):a=s=n+5,n+4<=a&&t!==-1?X(e,t,n,i):e.strategy===r||s===a?(V(e,(l<<1)+ +!!i,3),fe(e,j,M)):(V(e,(u<<1)+ +!!i,3),q(e,e.l_desc.max_code+1,e.d_desc.max_code+1,c+1),fe(e,e.dyn_ltree,e.dyn_dtree)),ce(e),i&&le(e)}function Z(e,t,n){return e.pending_buf[e.d_buf+e.last_lit*2]=t>>>8&255,e.pending_buf[e.d_buf+e.last_lit*2+1]=t&255,e.pending_buf[e.l_buf+e.last_lit]=n&255,e.last_lit++,t===0?e.dyn_ltree[n*2]++:(e.matches++,t--,e.dyn_ltree[(P[n]+m+1)*2]++,e.dyn_dtree[B(t)*2]++),e.last_lit===e.lit_bufsize-1}e._tr_init=Y,e._tr_stored_block=X,e._tr_flush_block=ge,e._tr_tally=Z,e._tr_align=he})),i=/* @__PURE__ */ t(((e,t)=>{function n(e,t,n,r){for(var i=e&65535,a=e>>>16&65535,o=0;n!==0;){o=n>2e3?2e3:n,n-=o;do i=i+t[r++]|0,a=a+i|0;while(--o);i%=65521,a%=65521}return i|a<<16}t.exports=n})),a=/* @__PURE__ */ t(((e,t)=>{function n(){for(var e,t=[],n=0;n<256;n++){e=n;for(var r=0;r<8;r++)e=e&1?3988292384^e>>>1:e>>>1;t[n]=e}return t}var r=n();function i(e,t,n,i){var a=r,o=i+n;e^=-1;for(var s=i;s<o;s++)e=e>>>8^a[(e^t[s])&255];return e^-1}t.exports=i})),o=/* @__PURE__ */ t(((e,t)=>{t.exports={2:`need dictionary`,1:`stream end`,0:``,"-1":`file error`,"-2":`stream error`,"-3":`data error`,"-4":`insufficient memory`,"-5":`buffer error`,"-6":`incompatible version`}})),s=/* @__PURE__ */ t((e=>{var t=n(),s=r(),c=i(),l=a(),u=o(),d=0,f=1,p=3,m=4,h=5,g=0,_=1,v=-2,y=-3,b=-5,x=-1,S=1,C=2,w=3,T=4,E=0,D=2,O=8,k=9,A=15,j=8,M=286,N=30,P=19,F=2*M+1,I=15,L=3,R=258,z=R+L+1,ee=32,te=42,B=69,ne=73,V=91,re=103,ie=113,ae=666,H=1,oe=2,se=3,ce=4,le=3;function ue(e,t){return e.msg=u[t],t}function U(e){return(e<<1)-(e>4?9:0)}function de(e){for(var t=e.length;--t>=0;)e[t]=0}function fe(e){var n=e.state,r=n.pending;r>e.avail_out&&(r=e.avail_out),r!==0&&(t.arraySet(e.output,n.pending_buf,n.pending_out,r,e.next_out),e.next_out+=r,n.pending_out+=r,e.total_out+=r,e.avail_out-=r,n.pending-=r,n.pending===0&&(n.pending_out=0))}function W(e,t){s._tr_flush_block(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,fe(e.strm)}function G(e,t){e.pending_buf[e.pending++]=t}function K(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=t&255}function pe(e,n,r,i){var a=e.avail_in;return a>i&&(a=i),a===0?0:(e.avail_in-=a,t.arraySet(n,e.input,e.next_in,a,r),e.state.wrap===1?e.adler=c(e.adler,n,a,r):e.state.wrap===2&&(e.adler=l(e.adler,n,a,r)),e.next_in+=a,e.total_in+=a,a)}function q(e,t){var n=e.max_chain_length,r=e.strstart,i,a,o=e.prev_length,s=e.nice_match,c=e.strstart>e.w_size-z?e.strstart-(e.w_size-z):0,l=e.window,u=e.w_mask,d=e.prev,f=e.strstart+R,p=l[r+o-1],m=l[r+o];e.prev_length>=e.good_match&&(n>>=2),s>e.lookahead&&(s=e.lookahead);do if(i=t,l[i+o]===m&&l[i+o-1]===p&&l[i]===l[r]&&l[++i]===l[r+1]){r+=2,i++;do;while(l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&r<f);if(a=R-(f-r),r=f-R,a>o){if(e.match_start=t,o=a,a>=s)break;p=l[r+o-1],m=l[r+o]}}while((t=d[t&u])>c&&--n!==0);return o<=e.lookahead?o:e.lookahead}function J(e){var n=e.w_size,r,i,a,o,s;do{if(o=e.window_size-e.lookahead-e.strstart,e.strstart>=n+(n-z)){t.arraySet(e.window,e.window,n,n,0),e.match_start-=n,e.strstart-=n,e.block_start-=n,i=e.hash_size,r=i;do a=e.head[--r],e.head[r]=a>=n?a-n:0;while(--i);i=n,r=i;do a=e.prev[--r],e.prev[r]=a>=n?a-n:0;while(--i);o+=n}if(e.strm.avail_in===0)break;if(i=pe(e.strm,e.window,e.strstart+e.lookahead,o),e.lookahead+=i,e.lookahead+e.insert>=L)for(s=e.strstart-e.insert,e.ins_h=e.window[s],e.ins_h=(e.ins_h<<e.hash_shift^e.window[s+1])&e.hash_mask;e.insert&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[s+L-1])&e.hash_mask,e.prev[s&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=s,s++,e.insert--,!(e.lookahead+e.insert<L)););}while(e.lookahead<z&&e.strm.avail_in!==0)}function me(e,t){var n=65535;for(n>e.pending_buf_size-5&&(n=e.pending_buf_size-5);;){if(e.lookahead<=1){if(J(e),e.lookahead===0&&t===d)return H;if(e.lookahead===0)break}e.strstart+=e.lookahead,e.lookahead=0;var r=e.block_start+n;if((e.strstart===0||e.strstart>=r)&&(e.lookahead=e.strstart-r,e.strstart=r,W(e,!1),e.strm.avail_out===0)||e.strstart-e.block_start>=e.w_size-z&&(W(e,!1),e.strm.avail_out===0))return H}return e.insert=0,t===m?(W(e,!0),e.strm.avail_out===0?se:ce):(e.strstart>e.block_start&&(W(e,!1),e.strm.avail_out),H)}function Y(e,t){for(var n,r;;){if(e.lookahead<z){if(J(e),e.lookahead<z&&t===d)return H;if(e.lookahead===0)break}if(n=0,e.lookahead>=L&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+L-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),n!==0&&e.strstart-n<=e.w_size-z&&(e.match_length=q(e,n)),e.match_length>=L){if(r=s._tr_tally(e,e.strstart-e.match_start,e.match_length-L),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=L){e.match_length--;do e.strstart++,e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+L-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart;while(--e.match_length!==0);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+1])&e.hash_mask}else r=s._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(r&&(W(e,!1),e.strm.avail_out===0))return H}return e.insert=e.strstart<L-1?e.strstart:L-1,t===m?(W(e,!0),e.strm.avail_out===0?se:ce):e.last_lit&&(W(e,!1),e.strm.avail_out===0)?H:oe}function X(e,t){for(var n,r,i;;){if(e.lookahead<z){if(J(e),e.lookahead<z&&t===d)return H;if(e.lookahead===0)break}if(n=0,e.lookahead>=L&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+L-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=L-1,n!==0&&e.prev_length<e.max_lazy_match&&e.strstart-n<=e.w_size-z&&(e.match_length=q(e,n),e.match_length<=5&&(e.strategy===S||e.match_length===L&&e.strstart-e.match_start>4096)&&(e.match_length=L-1)),e.prev_length>=L&&e.match_length<=e.prev_length){i=e.strstart+e.lookahead-L,r=s._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-L),e.lookahead-=e.prev_length-1,e.prev_length-=2;do++e.strstart<=i&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+L-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart);while(--e.prev_length!==0);if(e.match_available=0,e.match_length=L-1,e.strstart++,r&&(W(e,!1),e.strm.avail_out===0))return H}else if(e.match_available){if(r=s._tr_tally(e,0,e.window[e.strstart-1]),r&&W(e,!1),e.strstart++,e.lookahead--,e.strm.avail_out===0)return H}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&=(r=s._tr_tally(e,0,e.window[e.strstart-1]),0),e.insert=e.strstart<L-1?e.strstart:L-1,t===m?(W(e,!0),e.strm.avail_out===0?se:ce):e.last_lit&&(W(e,!1),e.strm.avail_out===0)?H:oe}function he(e,t){for(var n,r,i,a,o=e.window;;){if(e.lookahead<=R){if(J(e),e.lookahead<=R&&t===d)return H;if(e.lookahead===0)break}if(e.match_length=0,e.lookahead>=L&&e.strstart>0&&(i=e.strstart-1,r=o[i],r===o[++i]&&r===o[++i]&&r===o[++i])){a=e.strstart+R;do;while(r===o[++i]&&r===o[++i]&&r===o[++i]&&r===o[++i]&&r===o[++i]&&r===o[++i]&&r===o[++i]&&r===o[++i]&&i<a);e.match_length=R-(a-i),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=L?(n=s._tr_tally(e,1,e.match_length-L),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(n=s._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),n&&(W(e,!1),e.strm.avail_out===0))return H}return e.insert=0,t===m?(W(e,!0),e.strm.avail_out===0?se:ce):e.last_lit&&(W(e,!1),e.strm.avail_out===0)?H:oe}function ge(e,t){for(var n;;){if(e.lookahead===0&&(J(e),e.lookahead===0)){if(t===d)return H;break}if(e.match_length=0,n=s._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,n&&(W(e,!1),e.strm.avail_out===0))return H}return e.insert=0,t===m?(W(e,!0),e.strm.avail_out===0?se:ce):e.last_lit&&(W(e,!1),e.strm.avail_out===0)?H:oe}function Z(e,t,n,r,i){this.good_length=e,this.max_lazy=t,this.nice_length=n,this.max_chain=r,this.func=i}var Q=[new Z(0,0,0,0,me),new Z(4,4,8,4,Y),new Z(4,5,16,8,Y),new Z(4,6,32,32,Y),new Z(4,4,16,16,X),new Z(8,16,32,32,X),new Z(8,16,128,128,X),new Z(8,32,128,256,X),new Z(32,128,258,1024,X),new Z(32,258,258,4096,X)];function _e(e){e.window_size=2*e.w_size,de(e.head),e.max_lazy_match=Q[e.level].max_lazy,e.good_match=Q[e.level].good_length,e.nice_match=Q[e.level].nice_length,e.max_chain_length=Q[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=L-1,e.match_available=0,e.ins_h=0}function ve(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=O,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new t.Buf16(F*2),this.dyn_dtree=new t.Buf16((2*N+1)*2),this.bl_tree=new t.Buf16((2*P+1)*2),de(this.dyn_ltree),de(this.dyn_dtree),de(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new t.Buf16(I+1),this.heap=new t.Buf16(2*M+1),de(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new t.Buf16(2*M+1),de(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function ye(e){var t;return!e||!e.state?ue(e,v):(e.total_in=e.total_out=0,e.data_type=D,t=e.state,t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap?te:ie,e.adler=t.wrap===2?0:1,t.last_flush=d,s._tr_init(t),g)}function be(e){var t=ye(e);return t===g&&_e(e.state),t}function xe(e,t){return!e||!e.state||e.state.wrap!==2?v:(e.state.gzhead=t,g)}function Se(e,n,r,i,a,o){if(!e)return v;var s=1;if(n===x&&(n=6),i<0?(s=0,i=-i):i>15&&(s=2,i-=16),a<1||a>k||r!==O||i<8||i>15||n<0||n>9||o<0||o>T)return ue(e,v);i===8&&(i=9);var c=new ve;return e.state=c,c.strm=e,c.wrap=s,c.gzhead=null,c.w_bits=i,c.w_size=1<<c.w_bits,c.w_mask=c.w_size-1,c.hash_bits=a+7,c.hash_size=1<<c.hash_bits,c.hash_mask=c.hash_size-1,c.hash_shift=~~((c.hash_bits+L-1)/L),c.window=new t.Buf8(c.w_size*2),c.head=new t.Buf16(c.hash_size),c.prev=new t.Buf16(c.w_size),c.lit_bufsize=1<<a+6,c.pending_buf_size=c.lit_bufsize*4,c.pending_buf=new t.Buf8(c.pending_buf_size),c.d_buf=1*c.lit_bufsize,c.l_buf=3*c.lit_bufsize,c.level=n,c.strategy=o,c.method=r,be(e)}function Ce(e,t){return Se(e,t,O,A,j,E)}function $(e,t){var n,r,i,a;if(!e||!e.state||t>h||t<0)return e?ue(e,v):v;if(r=e.state,!e.output||!e.input&&e.avail_in!==0||r.status===ae&&t!==m)return ue(e,e.avail_out===0?b:v);if(r.strm=e,n=r.last_flush,r.last_flush=t,r.status===te){if(r.wrap===2)e.adler=0,G(r,31),G(r,139),G(r,8),r.gzhead?(G(r,+!!r.gzhead.text+(r.gzhead.hcrc?2:0)+(r.gzhead.extra?4:0)+(r.gzhead.name?8:0)+(r.gzhead.comment?16:0)),G(r,r.gzhead.time&255),G(r,r.gzhead.time>>8&255),G(r,r.gzhead.time>>16&255),G(r,r.gzhead.time>>24&255),G(r,r.level===9?2:r.strategy>=C||r.level<2?4:0),G(r,r.gzhead.os&255),r.gzhead.extra&&r.gzhead.extra.length&&(G(r,r.gzhead.extra.length&255),G(r,r.gzhead.extra.length>>8&255)),r.gzhead.hcrc&&(e.adler=l(e.adler,r.pending_buf,r.pending,0)),r.gzindex=0,r.status=B):(G(r,0),G(r,0),G(r,0),G(r,0),G(r,0),G(r,r.level===9?2:r.strategy>=C||r.level<2?4:0),G(r,le),r.status=ie);else{var o=O+(r.w_bits-8<<4)<<8,c=-1;c=r.strategy>=C||r.level<2?0:r.level<6?1:r.level===6?2:3,o|=c<<6,r.strstart!==0&&(o|=ee),o+=31-o%31,r.status=ie,K(r,o),r.strstart!==0&&(K(r,e.adler>>>16),K(r,e.adler&65535)),e.adler=1}}if(r.status===B){if(r.gzhead.extra){for(i=r.pending;r.gzindex<(r.gzhead.extra.length&65535)&&!(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>i&&(e.adler=l(e.adler,r.pending_buf,r.pending-i,i)),fe(e),i=r.pending,r.pending===r.pending_buf_size));)G(r,r.gzhead.extra[r.gzindex]&255),r.gzindex++;r.gzhead.hcrc&&r.pending>i&&(e.adler=l(e.adler,r.pending_buf,r.pending-i,i)),r.gzindex===r.gzhead.extra.length&&(r.gzindex=0,r.status=ne)}else r.status=ne}if(r.status===ne){if(r.gzhead.name){i=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>i&&(e.adler=l(e.adler,r.pending_buf,r.pending-i,i)),fe(e),i=r.pending,r.pending===r.pending_buf_size)){a=1;break}a=r.gzindex<r.gzhead.name.length?r.gzhead.name.charCodeAt(r.gzindex++)&255:0,G(r,a)}while(a!==0);r.gzhead.hcrc&&r.pending>i&&(e.adler=l(e.adler,r.pending_buf,r.pending-i,i)),a===0&&(r.gzindex=0,r.status=V)}else r.status=V}if(r.status===V){if(r.gzhead.comment){i=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>i&&(e.adler=l(e.adler,r.pending_buf,r.pending-i,i)),fe(e),i=r.pending,r.pending===r.pending_buf_size)){a=1;break}a=r.gzindex<r.gzhead.comment.length?r.gzhead.comment.charCodeAt(r.gzindex++)&255:0,G(r,a)}while(a!==0);r.gzhead.hcrc&&r.pending>i&&(e.adler=l(e.adler,r.pending_buf,r.pending-i,i)),a===0&&(r.status=re)}else r.status=re}if(r.status===re&&(r.gzhead.hcrc?(r.pending+2>r.pending_buf_size&&fe(e),r.pending+2<=r.pending_buf_size&&(G(r,e.adler&255),G(r,e.adler>>8&255),e.adler=0,r.status=ie)):r.status=ie),r.pending!==0){if(fe(e),e.avail_out===0)return r.last_flush=-1,g}else if(e.avail_in===0&&U(t)<=U(n)&&t!==m)return ue(e,b);if(r.status===ae&&e.avail_in!==0)return ue(e,b);if(e.avail_in!==0||r.lookahead!==0||t!==d&&r.status!==ae){var u=r.strategy===C?ge(r,t):r.strategy===w?he(r,t):Q[r.level].func(r,t);if((u===se||u===ce)&&(r.status=ae),u===H||u===se)return e.avail_out===0&&(r.last_flush=-1),g;if(u===oe&&(t===f?s._tr_align(r):t!==h&&(s._tr_stored_block(r,0,0,!1),t===p&&(de(r.head),r.lookahead===0&&(r.strstart=0,r.block_start=0,r.insert=0))),fe(e),e.avail_out===0))return r.last_flush=-1,g}return t===m?r.wrap<=0?_:(r.wrap===2?(G(r,e.adler&255),G(r,e.adler>>8&255),G(r,e.adler>>16&255),G(r,e.adler>>24&255),G(r,e.total_in&255),G(r,e.total_in>>8&255),G(r,e.total_in>>16&255),G(r,e.total_in>>24&255)):(K(r,e.adler>>>16),K(r,e.adler&65535)),fe(e),r.wrap>0&&(r.wrap=-r.wrap),r.pending===0?_:g):g}function we(e){var t;return!e||!e.state?v:(t=e.state.status,t!==te&&t!==B&&t!==ne&&t!==V&&t!==re&&t!==ie&&t!==ae?ue(e,v):(e.state=null,t===ie?ue(e,y):g))}function Te(e,n){var r=n.length,i,a,o,s,l,u,d,f;if(!e||!e.state||(i=e.state,s=i.wrap,s===2||s===1&&i.status!==te||i.lookahead))return v;for(s===1&&(e.adler=c(e.adler,n,r,0)),i.wrap=0,r>=i.w_size&&(s===0&&(de(i.head),i.strstart=0,i.block_start=0,i.insert=0),f=new t.Buf8(i.w_size),t.arraySet(f,n,r-i.w_size,i.w_size,0),n=f,r=i.w_size),l=e.avail_in,u=e.next_in,d=e.input,e.avail_in=r,e.next_in=0,e.input=n,J(i);i.lookahead>=L;){a=i.strstart,o=i.lookahead-(L-1);do i.ins_h=(i.ins_h<<i.hash_shift^i.window[a+L-1])&i.hash_mask,i.prev[a&i.w_mask]=i.head[i.ins_h],i.head[i.ins_h]=a,a++;while(--o);i.strstart=a,i.lookahead=L-1,J(i)}return i.strstart+=i.lookahead,i.block_start=i.strstart,i.insert=i.lookahead,i.lookahead=0,i.match_length=i.prev_length=L-1,i.match_available=0,e.next_in=u,e.input=d,e.avail_in=l,i.wrap=s,g}e.deflateInit=Ce,e.deflateInit2=Se,e.deflateReset=be,e.deflateResetKeep=ye,e.deflateSetHeader=xe,e.deflate=$,e.deflateEnd=we,e.deflateSetDictionary=Te,e.deflateInfo=`pako deflate (from Nodeca project)`})),c=/* @__PURE__ */ t((e=>{var t=n(),r=!0,i=!0;try{String.fromCharCode.apply(null,[0])}catch{r=!1}try{String.fromCharCode.apply(null,/* @__PURE__ */ new Uint8Array(1))}catch{i=!1}for(var a=new t.Buf8(256),o=0;o<256;o++)a[o]=o>=252?6:o>=248?5:o>=240?4:o>=224?3:o>=192?2:1;a[254]=a[254]=1,e.string2buf=function(e){var n,r,i,a,o,s=e.length,c=0;for(a=0;a<s;a++)r=e.charCodeAt(a),(r&64512)==55296&&a+1<s&&(i=e.charCodeAt(a+1),(i&64512)==56320&&(r=65536+(r-55296<<10)+(i-56320),a++)),c+=r<128?1:r<2048?2:r<65536?3:4;for(n=new t.Buf8(c),o=0,a=0;o<c;a++)r=e.charCodeAt(a),(r&64512)==55296&&a+1<s&&(i=e.charCodeAt(a+1),(i&64512)==56320&&(r=65536+(r-55296<<10)+(i-56320),a++)),r<128?n[o++]=r:r<2048?(n[o++]=192|r>>>6,n[o++]=128|r&63):r<65536?(n[o++]=224|r>>>12,n[o++]=128|r>>>6&63,n[o++]=128|r&63):(n[o++]=240|r>>>18,n[o++]=128|r>>>12&63,n[o++]=128|r>>>6&63,n[o++]=128|r&63);return n};function s(e,n){if(n<65534&&(e.subarray&&i||!e.subarray&&r))return String.fromCharCode.apply(null,t.shrinkBuf(e,n));for(var a=``,o=0;o<n;o++)a+=String.fromCharCode(e[o]);return a}e.buf2binstring=function(e){return s(e,e.length)},e.binstring2buf=function(e){for(var n=new t.Buf8(e.length),r=0,i=n.length;r<i;r++)n[r]=e.charCodeAt(r);return n},e.buf2string=function(e,t){var n,r,i,o,c=t||e.length,l=Array(c*2);for(r=0,n=0;n<c;)if(i=e[n++],i<128)l[r++]=i;else if(o=a[i],o>4)l[r++]=65533,n+=o-1;else{for(i&=o===2?31:o===3?15:7;o>1&&n<c;)i=i<<6|e[n++]&63,o--;o>1?l[r++]=65533:i<65536?l[r++]=i:(i-=65536,l[r++]=55296|i>>10&1023,l[r++]=56320|i&1023)}return s(l,r)},e.utf8border=function(e,t){var n;for(t||=e.length,t>e.length&&(t=e.length),n=t-1;n>=0&&(e[n]&192)==128;)n--;return n<0||n===0?t:n+a[e[n]]>t?n:t}})),l=/* @__PURE__ */ t(((e,t)=>{function n(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg=``,this.state=null,this.data_type=2,this.adler=0}t.exports=n})),u=/* @__PURE__ */ t((e=>{var t=s(),r=n(),i=c(),a=o(),u=l(),d=Object.prototype.toString,f=0,p=4,m=0,h=1,g=2,_=-1,v=0,y=8;function b(e){if(!(this instanceof b))return new b(e);this.options=r.assign({level:_,method:y,chunkSize:16384,windowBits:15,memLevel:8,strategy:v,to:``},e||{});var n=this.options;n.raw&&n.windowBits>0?n.windowBits=-n.windowBits:n.gzip&&n.windowBits>0&&n.windowBits<16&&(n.windowBits+=16),this.err=0,this.msg=``,this.ended=!1,this.chunks=[],this.strm=new u,this.strm.avail_out=0;var o=t.deflateInit2(this.strm,n.level,n.method,n.windowBits,n.memLevel,n.strategy);if(o!==m)throw Error(a[o]);if(n.header&&t.deflateSetHeader(this.strm,n.header),n.dictionary){var s=typeof n.dictionary==`string`?i.string2buf(n.dictionary):d.call(n.dictionary)===`[object ArrayBuffer]`?new Uint8Array(n.dictionary):n.dictionary;if(o=t.deflateSetDictionary(this.strm,s),o!==m)throw Error(a[o]);this._dict_set=!0}}b.prototype.push=function(e,n){var a=this.strm,o=this.options.chunkSize,s,c;if(this.ended)return!1;c=n===~~n?n:n===!0?p:f,a.input=typeof e==`string`?i.string2buf(e):d.call(e)===`[object ArrayBuffer]`?new Uint8Array(e):e,a.next_in=0,a.avail_in=a.input.length;do{if(a.avail_out===0&&(a.output=new r.Buf8(o),a.next_out=0,a.avail_out=o),s=t.deflate(a,c),s!==h&&s!==m)return this.onEnd(s),this.ended=!0,!1;(a.avail_out===0||a.avail_in===0&&(c===p||c===g))&&(this.options.to===`string`?this.onData(i.buf2binstring(r.shrinkBuf(a.output,a.next_out))):this.onData(r.shrinkBuf(a.output,a.next_out)))}while((a.avail_in>0||a.avail_out===0)&&s!==h);return c===p?(s=t.deflateEnd(this.strm),this.onEnd(s),this.ended=!0,s===m):(c===g&&(this.onEnd(m),a.avail_out=0),!0)},b.prototype.onData=function(e){this.chunks.push(e)},b.prototype.onEnd=function(e){e===m&&(this.result=this.options.to===`string`?this.chunks.join(``):r.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function x(e,t){var n=new b(t);if(n.push(e,!0),n.err)throw n.msg||a[n.err];return n.result}function S(e,t){return t||={},t.raw=!0,x(e,t)}function C(e,t){return t||={},t.gzip=!0,x(e,t)}e.Deflate=b,e.deflate=x,e.deflateRaw=S,e.gzip=C})),d=/* @__PURE__ */ t(((e,t)=>{t.exports=function(e,t){var n=e.state,r=e.next_in,i,a,o,s,c,l,u,d,f,p,m,h,g,_,v,y,b,x,S,C,w,T=e.input,E;i=r+(e.avail_in-5),a=e.next_out,E=e.output,o=a-(t-e.avail_out),s=a+(e.avail_out-257),c=n.dmax,l=n.wsize,u=n.whave,d=n.wnext,f=n.window,p=n.hold,m=n.bits,h=n.lencode,g=n.distcode,_=(1<<n.lenbits)-1,v=(1<<n.distbits)-1;top:do{m<15&&(p+=T[r++]<<m,m+=8,p+=T[r++]<<m,m+=8),y=h[p&_];dolen:for(;;){if(b=y>>>24,p>>>=b,m-=b,b=y>>>16&255,b===0)E[a++]=y&65535;else if(b&16){x=y&65535,b&=15,b&&(m<b&&(p+=T[r++]<<m,m+=8),x+=p&(1<<b)-1,p>>>=b,m-=b),m<15&&(p+=T[r++]<<m,m+=8,p+=T[r++]<<m,m+=8),y=g[p&v];dodist:for(;;){if(b=y>>>24,p>>>=b,m-=b,b=y>>>16&255,b&16){if(S=y&65535,b&=15,m<b&&(p+=T[r++]<<m,m+=8,m<b&&(p+=T[r++]<<m,m+=8)),S+=p&(1<<b)-1,S>c){e.msg=`invalid distance too far back`,n.mode=30;break top}if(p>>>=b,m-=b,b=a-o,S>b){if(b=S-b,b>u&&n.sane){e.msg=`invalid distance too far back`,n.mode=30;break top}if(C=0,w=f,d===0){if(C+=l-b,b<x){x-=b;do E[a++]=f[C++];while(--b);C=a-S,w=E}}else if(d<b){if(C+=l+d-b,b-=d,b<x){x-=b;do E[a++]=f[C++];while(--b);if(C=0,d<x){b=d,x-=b;do E[a++]=f[C++];while(--b);C=a-S,w=E}}}else if(C+=d-b,b<x){x-=b;do E[a++]=f[C++];while(--b);C=a-S,w=E}for(;x>2;)E[a++]=w[C++],E[a++]=w[C++],E[a++]=w[C++],x-=3;x&&(E[a++]=w[C++],x>1&&(E[a++]=w[C++]))}else{C=a-S;do E[a++]=E[C++],E[a++]=E[C++],E[a++]=E[C++],x-=3;while(x>2);x&&(E[a++]=E[C++],x>1&&(E[a++]=E[C++]))}}else if(b&64){e.msg=`invalid distance code`,n.mode=30;break top}else{y=g[(y&65535)+(p&(1<<b)-1)];continue dodist}break}}else if(!(b&64)){y=h[(y&65535)+(p&(1<<b)-1)];continue dolen}else if(b&32){n.mode=12;break top}else{e.msg=`invalid literal/length code`,n.mode=30;break top}break}}while(r<i&&a<s);x=m>>3,r-=x,m-=x<<3,p&=(1<<m)-1,e.next_in=r,e.next_out=a,e.avail_in=r<i?5+(i-r):5-(r-i),e.avail_out=a<s?257+(s-a):257-(a-s),n.hold=p,n.bits=m}})),f=/* @__PURE__ */ t(((e,t)=>{var r=n(),i=15,a=852,o=592,s=0,c=1,l=2,u=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],d=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],f=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],p=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];t.exports=function(e,t,n,m,h,g,_,v){var y=v.bits,b=0,x=0,S=0,C=0,w=0,T=0,E=0,D=0,O=0,k=0,A,j,M,N,P,F=null,I=0,L,R=new r.Buf16(i+1),z=new r.Buf16(i+1),ee=null,te=0,B,ne,V;for(b=0;b<=i;b++)R[b]=0;for(x=0;x<m;x++)R[t[n+x]]++;for(w=y,C=i;C>=1&&R[C]===0;C--);if(w>C&&(w=C),C===0)return h[g++]=20971520,h[g++]=20971520,v.bits=1,0;for(S=1;S<C&&R[S]===0;S++);for(w<S&&(w=S),D=1,b=1;b<=i;b++)if(D<<=1,D-=R[b],D<0)return-1;if(D>0&&(e===s||C!==1))return-1;for(z[1]=0,b=1;b<i;b++)z[b+1]=z[b]+R[b];for(x=0;x<m;x++)t[n+x]!==0&&(_[z[t[n+x]]++]=x);if(e===s?(F=ee=_,L=19):e===c?(F=u,I-=257,ee=d,te-=257,L=256):(F=f,ee=p,L=-1),k=0,x=0,b=S,P=g,T=w,E=0,M=-1,O=1<<w,N=O-1,e===c&&O>a||e===l&&O>o)return 1;for(;;){B=b-E,_[x]<L?(ne=0,V=_[x]):_[x]>L?(ne=ee[te+_[x]],V=F[I+_[x]]):(ne=96,V=0),A=1<<b-E,j=1<<T,S=j;do j-=A,h[P+(k>>E)+j]=B<<24|ne<<16|V;while(j!==0);for(A=1<<b-1;k&A;)A>>=1;if(A===0?k=0:(k&=A-1,k+=A),x++,--R[b]===0){if(b===C)break;b=t[n+_[x]]}if(b>w&&(k&N)!==M){for(E===0&&(E=w),P+=S,T=b-E,D=1<<T;T+E<C&&(D-=R[T+E],!(D<=0));)T++,D<<=1;if(O+=1<<T,e===c&&O>a||e===l&&O>o)return 1;M=k&N,h[M]=w<<24|T<<16|P-g}}return k!==0&&(h[P+k]=b-E<<24|4194304),v.bits=w,0}})),p=/* @__PURE__ */ t((e=>{var t=n(),r=i(),o=a(),s=d(),c=f(),l=0,u=1,p=2,m=4,h=5,g=6,_=0,v=1,y=2,b=-2,x=-3,S=-4,C=-5,w=8,T=1,E=2,D=3,O=4,k=5,A=6,j=7,M=8,N=9,P=10,F=11,I=12,L=13,R=14,z=15,ee=16,te=17,B=18,ne=19,V=20,re=21,ie=22,ae=23,H=24,oe=25,se=26,ce=27,le=28,ue=29,U=30,de=31,fe=32,W=852,G=592,K=15;function pe(e){return(e>>>24&255)+(e>>>8&65280)+((e&65280)<<8)+((e&255)<<24)}function q(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new t.Buf16(320),this.work=new t.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function J(e){var n;return!e||!e.state?b:(n=e.state,e.total_in=e.total_out=n.total=0,e.msg=``,n.wrap&&(e.adler=n.wrap&1),n.mode=T,n.last=0,n.havedict=0,n.dmax=32768,n.head=null,n.hold=0,n.bits=0,n.lencode=n.lendyn=new t.Buf32(W),n.distcode=n.distdyn=new t.Buf32(G),n.sane=1,n.back=-1,_)}function me(e){var t;return!e||!e.state?b:(t=e.state,t.wsize=0,t.whave=0,t.wnext=0,J(e))}function Y(e,t){var n,r;return!e||!e.state||(r=e.state,t<0?(n=0,t=-t):(n=(t>>4)+1,t<48&&(t&=15)),t&&(t<8||t>15))?b:(r.window!==null&&r.wbits!==t&&(r.window=null),r.wrap=n,r.wbits=t,me(e))}function X(e,t){var n,r;return e?(r=new q,e.state=r,r.window=null,n=Y(e,t),n!==_&&(e.state=null),n):b}function he(e){return X(e,K)}var ge=!0,Z,Q;function _e(e){if(ge){var n;for(Z=new t.Buf32(512),Q=new t.Buf32(32),n=0;n<144;)e.lens[n++]=8;for(;n<256;)e.lens[n++]=9;for(;n<280;)e.lens[n++]=7;for(;n<288;)e.lens[n++]=8;for(c(u,e.lens,0,288,Z,0,e.work,{bits:9}),n=0;n<32;)e.lens[n++]=5;c(p,e.lens,0,32,Q,0,e.work,{bits:5}),ge=!1}e.lencode=Z,e.lenbits=9,e.distcode=Q,e.distbits=5}function ve(e,n,r,i){var a,o=e.state;return o.window===null&&(o.wsize=1<<o.wbits,o.wnext=0,o.whave=0,o.window=new t.Buf8(o.wsize)),i>=o.wsize?(t.arraySet(o.window,n,r-o.wsize,o.wsize,0),o.wnext=0,o.whave=o.wsize):(a=o.wsize-o.wnext,a>i&&(a=i),t.arraySet(o.window,n,r-i,a,o.wnext),i-=a,i?(t.arraySet(o.window,n,r-i,i,0),o.wnext=i,o.whave=o.wsize):(o.wnext+=a,o.wnext===o.wsize&&(o.wnext=0),o.whave<o.wsize&&(o.whave+=a))),0}function ye(e,n){var i,a,d,f,W,G,K,q,J,me,Y,X,he,ge,Z=0,Q,ye,be,xe,Se,Ce,$,we,Te=new t.Buf8(4),Ee,De,Oe=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!e||!e.state||!e.output||!e.input&&e.avail_in!==0)return b;i=e.state,i.mode===I&&(i.mode=L),W=e.next_out,d=e.output,K=e.avail_out,f=e.next_in,a=e.input,G=e.avail_in,q=i.hold,J=i.bits,me=G,Y=K,we=_;inf_leave:for(;;)switch(i.mode){case T:if(i.wrap===0){i.mode=L;break}for(;J<16;){if(G===0)break inf_leave;G--,q+=a[f++]<<J,J+=8}if(i.wrap&2&&q===35615){i.check=0,Te[0]=q&255,Te[1]=q>>>8&255,i.check=o(i.check,Te,2,0),q=0,J=0,i.mode=E;break}if(i.flags=0,i.head&&(i.head.done=!1),!(i.wrap&1)||(((q&255)<<8)+(q>>8))%31){e.msg=`incorrect header check`,i.mode=U;break}if((q&15)!==w){e.msg=`unknown compression method`,i.mode=U;break}if(q>>>=4,J-=4,$=(q&15)+8,i.wbits===0)i.wbits=$;else if($>i.wbits){e.msg=`invalid window size`,i.mode=U;break}i.dmax=1<<$,e.adler=i.check=1,i.mode=q&512?P:I,q=0,J=0;break;case E:for(;J<16;){if(G===0)break inf_leave;G--,q+=a[f++]<<J,J+=8}if(i.flags=q,(i.flags&255)!==w){e.msg=`unknown compression method`,i.mode=U;break}if(i.flags&57344){e.msg=`unknown header flags set`,i.mode=U;break}i.head&&(i.head.text=q>>8&1),i.flags&512&&(Te[0]=q&255,Te[1]=q>>>8&255,i.check=o(i.check,Te,2,0)),q=0,J=0,i.mode=D;case D:for(;J<32;){if(G===0)break inf_leave;G--,q+=a[f++]<<J,J+=8}i.head&&(i.head.time=q),i.flags&512&&(Te[0]=q&255,Te[1]=q>>>8&255,Te[2]=q>>>16&255,Te[3]=q>>>24&255,i.check=o(i.check,Te,4,0)),q=0,J=0,i.mode=O;case O:for(;J<16;){if(G===0)break inf_leave;G--,q+=a[f++]<<J,J+=8}i.head&&(i.head.xflags=q&255,i.head.os=q>>8),i.flags&512&&(Te[0]=q&255,Te[1]=q>>>8&255,i.check=o(i.check,Te,2,0)),q=0,J=0,i.mode=k;case k:if(i.flags&1024){for(;J<16;){if(G===0)break inf_leave;G--,q+=a[f++]<<J,J+=8}i.length=q,i.head&&(i.head.extra_len=q),i.flags&512&&(Te[0]=q&255,Te[1]=q>>>8&255,i.check=o(i.check,Te,2,0)),q=0,J=0}else i.head&&(i.head.extra=null);i.mode=A;case A:if(i.flags&1024&&(X=i.length,X>G&&(X=G),X&&(i.head&&($=i.head.extra_len-i.length,i.head.extra||(i.head.extra=Array(i.head.extra_len)),t.arraySet(i.head.extra,a,f,X,$)),i.flags&512&&(i.check=o(i.check,a,X,f)),G-=X,f+=X,i.length-=X),i.length))break inf_leave;i.length=0,i.mode=j;case j:if(i.flags&2048){if(G===0)break inf_leave;X=0;do $=a[f+X++],i.head&&$&&i.length<65536&&(i.head.name+=String.fromCharCode($));while($&&X<G);if(i.flags&512&&(i.check=o(i.check,a,X,f)),G-=X,f+=X,$)break inf_leave}else i.head&&(i.head.name=null);i.length=0,i.mode=M;case M:if(i.flags&4096){if(G===0)break inf_leave;X=0;do $=a[f+X++],i.head&&$&&i.length<65536&&(i.head.comment+=String.fromCharCode($));while($&&X<G);if(i.flags&512&&(i.check=o(i.check,a,X,f)),G-=X,f+=X,$)break inf_leave}else i.head&&(i.head.comment=null);i.mode=N;case N:if(i.flags&512){for(;J<16;){if(G===0)break inf_leave;G--,q+=a[f++]<<J,J+=8}if(q!==(i.check&65535)){e.msg=`header crc mismatch`,i.mode=U;break}q=0,J=0}i.head&&(i.head.hcrc=i.flags>>9&1,i.head.done=!0),e.adler=i.check=0,i.mode=I;break;case P:for(;J<32;){if(G===0)break inf_leave;G--,q+=a[f++]<<J,J+=8}e.adler=i.check=pe(q),q=0,J=0,i.mode=F;case F:if(i.havedict===0)return e.next_out=W,e.avail_out=K,e.next_in=f,e.avail_in=G,i.hold=q,i.bits=J,y;e.adler=i.check=1,i.mode=I;case I:if(n===h||n===g)break inf_leave;case L:if(i.last){q>>>=J&7,J-=J&7,i.mode=ce;break}for(;J<3;){if(G===0)break inf_leave;G--,q+=a[f++]<<J,J+=8}switch(i.last=q&1,q>>>=1,--J,q&3){case 0:i.mode=R;break;case 1:if(_e(i),i.mode=V,n===g){q>>>=2,J-=2;break inf_leave}break;case 2:i.mode=te;break;case 3:e.msg=`invalid block type`,i.mode=U}q>>>=2,J-=2;break;case R:for(q>>>=J&7,J-=J&7;J<32;){if(G===0)break inf_leave;G--,q+=a[f++]<<J,J+=8}if((q&65535)!=(q>>>16^65535)){e.msg=`invalid stored block lengths`,i.mode=U;break}if(i.length=q&65535,q=0,J=0,i.mode=z,n===g)break inf_leave;case z:i.mode=ee;case ee:if(X=i.length,X){if(X>G&&(X=G),X>K&&(X=K),X===0)break inf_leave;t.arraySet(d,a,f,X,W),G-=X,f+=X,K-=X,W+=X,i.length-=X;break}i.mode=I;break;case te:for(;J<14;){if(G===0)break inf_leave;G--,q+=a[f++]<<J,J+=8}if(i.nlen=(q&31)+257,q>>>=5,J-=5,i.ndist=(q&31)+1,q>>>=5,J-=5,i.ncode=(q&15)+4,q>>>=4,J-=4,i.nlen>286||i.ndist>30){e.msg=`too many length or distance symbols`,i.mode=U;break}i.have=0,i.mode=B;case B:for(;i.have<i.ncode;){for(;J<3;){if(G===0)break inf_leave;G--,q+=a[f++]<<J,J+=8}i.lens[Oe[i.have++]]=q&7,q>>>=3,J-=3}for(;i.have<19;)i.lens[Oe[i.have++]]=0;if(i.lencode=i.lendyn,i.lenbits=7,Ee={bits:i.lenbits},we=c(l,i.lens,0,19,i.lencode,0,i.work,Ee),i.lenbits=Ee.bits,we){e.msg=`invalid code lengths set`,i.mode=U;break}i.have=0,i.mode=ne;case ne:for(;i.have<i.nlen+i.ndist;){for(;Z=i.lencode[q&(1<<i.lenbits)-1],Q=Z>>>24,ye=Z>>>16&255,be=Z&65535,!(Q<=J);){if(G===0)break inf_leave;G--,q+=a[f++]<<J,J+=8}if(be<16)q>>>=Q,J-=Q,i.lens[i.have++]=be;else{if(be===16){for(De=Q+2;J<De;){if(G===0)break inf_leave;G--,q+=a[f++]<<J,J+=8}if(q>>>=Q,J-=Q,i.have===0){e.msg=`invalid bit length repeat`,i.mode=U;break}$=i.lens[i.have-1],X=3+(q&3),q>>>=2,J-=2}else if(be===17){for(De=Q+3;J<De;){if(G===0)break inf_leave;G--,q+=a[f++]<<J,J+=8}q>>>=Q,J-=Q,$=0,X=3+(q&7),q>>>=3,J-=3}else{for(De=Q+7;J<De;){if(G===0)break inf_leave;G--,q+=a[f++]<<J,J+=8}q>>>=Q,J-=Q,$=0,X=11+(q&127),q>>>=7,J-=7}if(i.have+X>i.nlen+i.ndist){e.msg=`invalid bit length repeat`,i.mode=U;break}for(;X--;)i.lens[i.have++]=$}}if(i.mode===U)break;if(i.lens[256]===0){e.msg=`invalid code -- missing end-of-block`,i.mode=U;break}if(i.lenbits=9,Ee={bits:i.lenbits},we=c(u,i.lens,0,i.nlen,i.lencode,0,i.work,Ee),i.lenbits=Ee.bits,we){e.msg=`invalid literal/lengths set`,i.mode=U;break}if(i.distbits=6,i.distcode=i.distdyn,Ee={bits:i.distbits},we=c(p,i.lens,i.nlen,i.ndist,i.distcode,0,i.work,Ee),i.distbits=Ee.bits,we){e.msg=`invalid distances set`,i.mode=U;break}if(i.mode=V,n===g)break inf_leave;case V:i.mode=re;case re:if(G>=6&&K>=258){e.next_out=W,e.avail_out=K,e.next_in=f,e.avail_in=G,i.hold=q,i.bits=J,s(e,Y),W=e.next_out,d=e.output,K=e.avail_out,f=e.next_in,a=e.input,G=e.avail_in,q=i.hold,J=i.bits,i.mode===I&&(i.back=-1);break}for(i.back=0;Z=i.lencode[q&(1<<i.lenbits)-1],Q=Z>>>24,ye=Z>>>16&255,be=Z&65535,!(Q<=J);){if(G===0)break inf_leave;G--,q+=a[f++]<<J,J+=8}if(ye&&!(ye&240)){for(xe=Q,Se=ye,Ce=be;Z=i.lencode[Ce+((q&(1<<xe+Se)-1)>>xe)],Q=Z>>>24,ye=Z>>>16&255,be=Z&65535,!(xe+Q<=J);){if(G===0)break inf_leave;G--,q+=a[f++]<<J,J+=8}q>>>=xe,J-=xe,i.back+=xe}if(q>>>=Q,J-=Q,i.back+=Q,i.length=be,ye===0){i.mode=se;break}if(ye&32){i.back=-1,i.mode=I;break}if(ye&64){e.msg=`invalid literal/length code`,i.mode=U;break}i.extra=ye&15,i.mode=ie;case ie:if(i.extra){for(De=i.extra;J<De;){if(G===0)break inf_leave;G--,q+=a[f++]<<J,J+=8}i.length+=q&(1<<i.extra)-1,q>>>=i.extra,J-=i.extra,i.back+=i.extra}i.was=i.length,i.mode=ae;case ae:for(;Z=i.distcode[q&(1<<i.distbits)-1],Q=Z>>>24,ye=Z>>>16&255,be=Z&65535,!(Q<=J);){if(G===0)break inf_leave;G--,q+=a[f++]<<J,J+=8}if(!(ye&240)){for(xe=Q,Se=ye,Ce=be;Z=i.distcode[Ce+((q&(1<<xe+Se)-1)>>xe)],Q=Z>>>24,ye=Z>>>16&255,be=Z&65535,!(xe+Q<=J);){if(G===0)break inf_leave;G--,q+=a[f++]<<J,J+=8}q>>>=xe,J-=xe,i.back+=xe}if(q>>>=Q,J-=Q,i.back+=Q,ye&64){e.msg=`invalid distance code`,i.mode=U;break}i.offset=be,i.extra=ye&15,i.mode=H;case H:if(i.extra){for(De=i.extra;J<De;){if(G===0)break inf_leave;G--,q+=a[f++]<<J,J+=8}i.offset+=q&(1<<i.extra)-1,q>>>=i.extra,J-=i.extra,i.back+=i.extra}if(i.offset>i.dmax){e.msg=`invalid distance too far back`,i.mode=U;break}i.mode=oe;case oe:if(K===0)break inf_leave;if(X=Y-K,i.offset>X){if(X=i.offset-X,X>i.whave&&i.sane){e.msg=`invalid distance too far back`,i.mode=U;break}X>i.wnext?(X-=i.wnext,he=i.wsize-X):he=i.wnext-X,X>i.length&&(X=i.length),ge=i.window}else ge=d,he=W-i.offset,X=i.length;X>K&&(X=K),K-=X,i.length-=X;do d[W++]=ge[he++];while(--X);i.length===0&&(i.mode=re);break;case se:if(K===0)break inf_leave;d[W++]=i.length,K--,i.mode=re;break;case ce:if(i.wrap){for(;J<32;){if(G===0)break inf_leave;G--,q|=a[f++]<<J,J+=8}if(Y-=K,e.total_out+=Y,i.total+=Y,Y&&(e.adler=i.check=i.flags?o(i.check,d,Y,W-Y):r(i.check,d,Y,W-Y)),Y=K,(i.flags?q:pe(q))!==i.check){e.msg=`incorrect data check`,i.mode=U;break}q=0,J=0}i.mode=le;case le:if(i.wrap&&i.flags){for(;J<32;){if(G===0)break inf_leave;G--,q+=a[f++]<<J,J+=8}if(q!==(i.total|0)){e.msg=`incorrect length check`,i.mode=U;break}q=0,J=0}i.mode=ue;case ue:we=v;break inf_leave;case U:we=x;break inf_leave;case de:return S;case fe:default:return b}return e.next_out=W,e.avail_out=K,e.next_in=f,e.avail_in=G,i.hold=q,i.bits=J,(i.wsize||Y!==e.avail_out&&i.mode<U&&(i.mode<ce||n!==m))&&ve(e,e.output,e.next_out,Y-e.avail_out)?(i.mode=de,S):(me-=e.avail_in,Y-=e.avail_out,e.total_in+=me,e.total_out+=Y,i.total+=Y,i.wrap&&Y&&(e.adler=i.check=i.flags?o(i.check,d,Y,e.next_out-Y):r(i.check,d,Y,e.next_out-Y)),e.data_type=i.bits+(i.last?64:0)+(i.mode===I?128:0)+(i.mode===V||i.mode===z?256:0),(me===0&&Y===0||n===m)&&we===_&&(we=C),we)}function be(e){if(!e||!e.state)return b;var t=e.state;return t.window&&=null,e.state=null,_}function xe(e,t){var n;return!e||!e.state||(n=e.state,!(n.wrap&2))?b:(n.head=t,t.done=!1,_)}function Se(e,t){var n=t.length,i,a,o;return!e||!e.state||(i=e.state,i.wrap!==0&&i.mode!==F)?b:i.mode===F&&(a=1,a=r(a,t,n,0),a!==i.check)?x:(o=ve(e,t,n,n),o?(i.mode=de,S):(i.havedict=1,_))}e.inflateReset=me,e.inflateReset2=Y,e.inflateResetKeep=J,e.inflateInit=he,e.inflateInit2=X,e.inflate=ye,e.inflateEnd=be,e.inflateGetHeader=xe,e.inflateSetDictionary=Se,e.inflateInfo=`pako inflate (from Nodeca project)`})),m=/* @__PURE__ */ t(((e,t)=>{t.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}})),h=/* @__PURE__ */ t(((e,t)=>{function n(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name=``,this.comment=``,this.hcrc=0,this.done=!1}t.exports=n})),g=/* @__PURE__ */ t((e=>{var t=p(),r=n(),i=c(),a=m(),s=o(),u=l(),d=h(),f=Object.prototype.toString;function g(e){if(!(this instanceof g))return new g(e);this.options=r.assign({chunkSize:16384,windowBits:0,to:``},e||{});var n=this.options;n.raw&&n.windowBits>=0&&n.windowBits<16&&(n.windowBits=-n.windowBits,n.windowBits===0&&(n.windowBits=-15)),n.windowBits>=0&&n.windowBits<16&&!(e&&e.windowBits)&&(n.windowBits+=32),n.windowBits>15&&n.windowBits<48&&(n.windowBits&15||(n.windowBits|=15)),this.err=0,this.msg=``,this.ended=!1,this.chunks=[],this.strm=new u,this.strm.avail_out=0;var o=t.inflateInit2(this.strm,n.windowBits);if(o!==a.Z_OK||(this.header=new d,t.inflateGetHeader(this.strm,this.header),n.dictionary&&(typeof n.dictionary==`string`?n.dictionary=i.string2buf(n.dictionary):f.call(n.dictionary)===`[object ArrayBuffer]`&&(n.dictionary=new Uint8Array(n.dictionary)),n.raw&&(o=t.inflateSetDictionary(this.strm,n.dictionary),o!==a.Z_OK))))throw Error(s[o])}g.prototype.push=function(e,n){var o=this.strm,s=this.options.chunkSize,c=this.options.dictionary,l,u,d,p,m,h=!1;if(this.ended)return!1;u=n===~~n?n:n===!0?a.Z_FINISH:a.Z_NO_FLUSH,o.input=typeof e==`string`?i.binstring2buf(e):f.call(e)===`[object ArrayBuffer]`?new Uint8Array(e):e,o.next_in=0,o.avail_in=o.input.length;do{if(o.avail_out===0&&(o.output=new r.Buf8(s),o.next_out=0,o.avail_out=s),l=t.inflate(o,a.Z_NO_FLUSH),l===a.Z_NEED_DICT&&c&&(l=t.inflateSetDictionary(this.strm,c)),l===a.Z_BUF_ERROR&&h===!0&&(l=a.Z_OK,h=!1),l!==a.Z_STREAM_END&&l!==a.Z_OK)return this.onEnd(l),this.ended=!0,!1;o.next_out&&(o.avail_out===0||l===a.Z_STREAM_END||o.avail_in===0&&(u===a.Z_FINISH||u===a.Z_SYNC_FLUSH))&&(this.options.to===`string`?(d=i.utf8border(o.output,o.next_out),p=o.next_out-d,m=i.buf2string(o.output,d),o.next_out=p,o.avail_out=s-p,p&&r.arraySet(o.output,o.output,d,p,0),this.onData(m)):this.onData(r.shrinkBuf(o.output,o.next_out))),o.avail_in===0&&o.avail_out===0&&(h=!0)}while((o.avail_in>0||o.avail_out===0)&&l!==a.Z_STREAM_END);return l===a.Z_STREAM_END&&(u=a.Z_FINISH),u===a.Z_FINISH?(l=t.inflateEnd(this.strm),this.onEnd(l),this.ended=!0,l===a.Z_OK):(u===a.Z_SYNC_FLUSH&&(this.onEnd(a.Z_OK),o.avail_out=0),!0)},g.prototype.onData=function(e){this.chunks.push(e)},g.prototype.onEnd=function(e){e===a.Z_OK&&(this.result=this.options.to===`string`?this.chunks.join(``):r.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function _(e,t){var n=new g(t);if(n.push(e,!0),n.err)throw n.msg||s[n.err];return n.result}function v(e,t){return t||={},t.raw=!0,_(e,t)}e.Inflate=g,e.inflate=_,e.inflateRaw=v,e.ungzip=_})),_=/* @__PURE__ */ t(((e,t)=>{var r=n().assign,i=u(),a=g(),o=m(),s={};r(s,i,a,o),t.exports=s})),v=/* @__PURE__ */ t(((t,n)=>{(function(){var t={};typeof n==`object`?n.exports=t:self.UTIF=t;var r=typeof e==`function`?_():self.pako;function i(){typeof process>`u`&&console.log.apply(console,arguments)}(function(e,t){(function(){var t=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},n=function(){function e(e){this.message=`JPEG error: `+e}return e.prototype=Error(),e.prototype.name=`JpegError`,e.constructor=e}(),r=function(){function e(e,t){this.message=e,this.g=t}return e.prototype=Error(),e.prototype.name=`DNLMarkerError`,e.constructor=e}();(function(){function i(){this.M=null,this.B=-1}function a(e,t){for(var n=0,r=[],i,a,o=16;0<o&&!e[o-1];)o--;r.push({children:[],index:0});var s=r[0],c;for(i=0;i<o;i++){for(a=0;a<e[i];a++){for(s=r.pop(),s.children[s.index]=t[n];0<s.index;)s=r.pop();for(s.index++,r.push(s);r.length<=i;)r.push(c={children:[],index:0}),s.children[s.index]=c.children,s=c;n++}i+1<o&&(r.push(c={children:[],index:0}),s.children[s.index]=c.children,s=c)}return r[0].children}function o(e,i,a,o,s,u,d,f,p){function m(){if(0<D)return D--,E>>D&1;if(E=e[i++],E===255){var t=e[i++];if(t){if(t===220&&C){i+=2;var o=e[i++]<<8|e[i++];if(0<o&&o!==a.g)throw new r(`Found DNL marker (0xFFDC) while parsing scan data`,o)}throw new n(`unexpected marker `+(E<<8|t).toString(16))}}return D=7,E>>>7}function h(e){for(;;){if(e=e[m()],typeof e==`number`)return e;if((e===void 0?`undefined`:t(e))!==`object`)throw new n(`invalid huffman sequence`)}}function g(e){for(var t=0;0<e;)t=t<<1|m(),e--;return t}function _(e){if(e===1)return m()===1?1:-1;var t=g(e);return t>=1<<e-1?t:t+(-1<<e)+1}function v(e,t){var n=h(e.D);for(n=n===0?0:_(n),e.a[t]=e.m+=n,n=1;64>n;){var r=h(e.o),i=r&15;if(r>>=4,i===0){if(15>r)break;n+=16}else n+=r,e.a[t+l[n]]=_(i),n++}}function y(e,t){var n=h(e.D);n=n===0?0:_(n)<<p,e.a[t]=e.m+=n}function b(e,t){e.a[t]|=m()<<p}function x(e,t){if(0<O)O--;else for(var n=u;n<=d;){var r=h(e.o),i=r&15;if(r>>=4,i===0){if(15>r){O=g(r)+(1<<r)-1;break}n+=16}else n+=r,e.a[t+l[n]]=_(i)*(1<<p),n++}}function S(e,t){for(var r=u,i=0,a;r<=d;){a=t+l[r];var o=0>e.a[a]?-1:1;switch(k){case 0:if(i=h(e.o),a=i&15,i>>=4,a===0)15>i?(O=g(i)+(1<<i),k=4):(i=16,k=1);else{if(a!==1)throw new n(`invalid ACn encoding`);A=_(a),k=i?2:3}continue;case 1:case 2:e.a[a]?e.a[a]+=o*(m()<<p):(i--,i===0&&(k=k===2?3:0));break;case 3:e.a[a]?e.a[a]+=o*(m()<<p):(e.a[a]=A<<p,k=0);break;case 4:e.a[a]&&(e.a[a]+=o*(m()<<p))}r++}k===4&&(O--,O===0&&(k=0))}for(var C=9<arguments.length&&arguments[9]!==void 0&&arguments[9],w=a.P,T=i,E=0,D=0,O=0,k=0,A,j=o.length,M,N,P,F,I=a.S?u===0?f===0?y:b:f===0?x:S:v,L=0,R=j===1?o[0].c*o[0].l:w*a.O,z,ee;L<R;){var te=s?Math.min(R-L,s):R;for(M=0;M<j;M++)o[M].m=0;if(O=0,j===1){var B=o[0];for(F=0;F<te;F++)I(B,64*((B.c+1)*(L/B.c|0)+L%B.c)),L++}else for(F=0;F<te;F++){for(M=0;M<j;M++)for(B=o[M],z=B.h,ee=B.j,N=0;N<ee;N++)for(P=0;P<z;P++)I(B,64*((B.c+1)*((L/w|0)*B.j+N)+(L%w*B.h+P)));L++}if(D=0,(B=c(e,i))&&B.f&&((0,_util.warn)(`decodeScan - unexpected MCU data, current marker is: `+B.f),i=B.offset),B&&=B.F,!B||65280>=B)throw new n(`marker was not found`);if(65488<=B&&65495>=B)i+=2;else break}return(B=c(e,i))&&B.f&&((0,_util.warn)(`decodeScan - unexpected Scan data, current marker is: `+B.f),i=B.offset),i-T}function s(e,t){for(var r=t.c,i=t.l,a=/* @__PURE__ */ new Int16Array(64),o=0;o<i;o++)for(var s=0;s<r;s++){var c=64*((t.c+1)*o+s),l=a,u=t.G,d=t.a;if(!u)throw new n(`missing required Quantization Table.`);for(var f=0;64>f;f+=8){var p=d[c+f],m=d[c+f+1],h=d[c+f+2],g=d[c+f+3],_=d[c+f+4],v=d[c+f+5],y=d[c+f+6],b=d[c+f+7];if(p*=u[f],(m|h|g|_|v|y|b)===0)p=5793*p+512>>10,l[f]=p,l[f+1]=p,l[f+2]=p,l[f+3]=p,l[f+4]=p,l[f+5]=p,l[f+6]=p,l[f+7]=p;else{m*=u[f+1],h*=u[f+2],g*=u[f+3],_*=u[f+4],v*=u[f+5],y*=u[f+6],b*=u[f+7];var x=5793*p+128>>8,S=5793*_+128>>8,C=h,w=y;_=2896*(m-b)+128>>8,b=2896*(m+b)+128>>8,g<<=4,v<<=4,x=x+S+1>>1,S=x-S,p=3784*C+1567*w+128>>8,C=1567*C-3784*w+128>>8,w=p,_=_+v+1>>1,v=_-v,b=b+g+1>>1,g=b-g,x=x+w+1>>1,w=x-w,S=S+C+1>>1,C=S-C,p=2276*_+3406*b+2048>>12,_=3406*_-2276*b+2048>>12,b=p,p=799*g+4017*v+2048>>12,g=4017*g-799*v+2048>>12,v=p,l[f]=x+b,l[f+7]=x-b,l[f+1]=S+v,l[f+6]=S-v,l[f+2]=C+g,l[f+5]=C-g,l[f+3]=w+_,l[f+4]=w-_}}for(u=0;8>u;++u)p=l[u],m=l[u+8],h=l[u+16],g=l[u+24],_=l[u+32],v=l[u+40],y=l[u+48],b=l[u+56],(m|h|g|_|v|y|b)===0?(p=5793*p+8192>>14,p=-2040>p?0:2024<=p?255:p+2056>>4,d[c+u]=p,d[c+u+8]=p,d[c+u+16]=p,d[c+u+24]=p,d[c+u+32]=p,d[c+u+40]=p,d[c+u+48]=p,d[c+u+56]=p):(x=5793*p+2048>>12,S=5793*_+2048>>12,C=h,w=y,_=2896*(m-b)+2048>>12,b=2896*(m+b)+2048>>12,x=(x+S+1>>1)+4112,S=x-S,p=3784*C+1567*w+2048>>12,C=1567*C-3784*w+2048>>12,w=p,_=_+v+1>>1,v=_-v,b=b+g+1>>1,g=b-g,x=x+w+1>>1,w=x-w,S=S+C+1>>1,C=S-C,p=2276*_+3406*b+2048>>12,_=3406*_-2276*b+2048>>12,b=p,p=799*g+4017*v+2048>>12,g=4017*g-799*v+2048>>12,v=p,p=x+b,b=x-b,m=S+v,y=S-v,h=C+g,v=C-g,g=w+_,_=w-_,p=16>p?0:4080<=p?255:p>>4,m=16>m?0:4080<=m?255:m>>4,h=16>h?0:4080<=h?255:h>>4,g=16>g?0:4080<=g?255:g>>4,_=16>_?0:4080<=_?255:_>>4,v=16>v?0:4080<=v?255:v>>4,y=16>y?0:4080<=y?255:y>>4,b=16>b?0:4080<=b?255:b>>4,d[c+u]=p,d[c+u+8]=m,d[c+u+16]=h,d[c+u+24]=g,d[c+u+32]=_,d[c+u+40]=v,d[c+u+48]=y,d[c+u+56]=b)}return t.a}function c(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:t,r=e.length-1;if(n=n<t?n:t,t>=r)return null;var i=e[t]<<8|e[t+1];if(65472<=i&&65534>=i)return{f:null,F:i,offset:t};for(var a=e[n]<<8|e[n+1];!(65472<=a&&65534>=a);){if(++n>=r)return null;a=e[n]<<8|e[n+1]}return{f:i.toString(16),F:a,offset:n}}var l=new Uint8Array([0,1,8,16,9,2,3,10,17,24,32,25,18,11,4,5,12,19,26,33,40,48,41,34,27,20,13,6,7,14,21,28,35,42,49,56,57,50,43,36,29,22,15,23,30,37,44,51,58,59,52,45,38,31,39,46,53,60,61,54,47,55,62,63]);i.prototype={parse:function(e){function t(){var t=e[p]<<8|e[p+1];return p+=2,t}function i(){var n=t();n=p+n-2;var r=c(e,n,p);return r&&r.f&&((0,_util.warn)(`readDataBlock - incorrect length, current marker is: `+r.f),n=r.offset),n=e.subarray(p,n),p+=n.length,n}function u(e){for(var t=Math.ceil(e.v/8/e.s),n=Math.ceil(e.g/8/e.u),r=0;r<e.b.length;r++){D=e.b[r];var i=Math.ceil(Math.ceil(e.v/8)*D.h/e.s),a=Math.ceil(Math.ceil(e.g/8)*D.j/e.u);D.a=new Int16Array(64*n*D.j*(t*D.h+1)),D.c=i,D.l=a}e.P=t,e.O=n}var d=(1<arguments.length&&arguments[1]!==void 0?arguments[1]:{}).N,f=d===void 0?null:d,p=0,m=null,h=0;d=[];var g=[],_=[],v=t();if(v!==65496)throw new n(`SOI not found`);for(v=t();v!==65497;){switch(v){case 65504:case 65505:case 65506:case 65507:case 65508:case 65509:case 65510:case 65511:case 65512:case 65513:case 65514:case 65515:case 65516:case 65517:case 65518:case 65519:case 65534:var y=i();v===65518&&y[0]===65&&y[1]===100&&y[2]===111&&y[3]===98&&y[4]===101&&(m={version:y[5]<<8|y[6],Y:y[7]<<8|y[8],Z:y[9]<<8|y[10],W:y[11]});break;case 65499:v=t()+p-2;for(var b;p<v;){var x=e[p++],S=/* @__PURE__ */ new Uint16Array(64);if(!(x>>4))for(y=0;64>y;y++)b=l[y],S[b]=e[p++];else if(x>>4==1)for(y=0;64>y;y++)b=l[y],S[b]=t();else throw new n(`DQT - invalid table spec`);d[x&15]=S}break;case 65472:case 65473:case 65474:if(C)throw new n(`Only single frame JPEGs supported`);t();var C={};for(C.X=v===65473,C.S=v===65474,C.precision=e[p++],v=t(),C.g=f||v,C.v=t(),C.b=[],C.C={},y=e[p++],v=S=x=0;v<y;v++){b=e[p];var w=e[p+1]>>4,T=e[p+1]&15;x<w&&(x=w),S<T&&(S=T),w=C.b.push({h:w,j:T,T:e[p+2],G:null}),C.C[b]=w-1,p+=3}C.s=x,C.u=S,u(C);break;case 65476:for(b=t(),v=2;v<b;){for(x=e[p++],S=/* @__PURE__ */ new Uint8Array(16),y=w=0;16>y;y++,p++)w+=S[y]=e[p];for(T=new Uint8Array(w),y=0;y<w;y++,p++)T[y]=e[p];v+=17+w,(x>>4?g:_)[x&15]=a(S,T)}break;case 65501:t();var E=t();break;case 65498:for(y=++h===1&&!f,t(),x=e[p++],b=[],v=0;v<x;v++){S=C.C[e[p++]];var D=C.b[S];S=e[p++],D.D=_[S>>4],D.o=g[S&15],b.push(D)}v=e[p++],x=e[p++],S=e[p++];try{var O=o(e,p,C,b,E,v,x,S>>4,S&15,y);p+=O}catch(t){if(t instanceof r)return(0,_util.warn)(`Attempting to re-parse JPEG image using "scanLines" parameter found in DNL marker (0xFFDC) segment.`),this.parse(e,{N:t.g});throw t}break;case 65500:p+=4;break;case 65535:e[p]!==255&&p--;break;default:if(e[p-3]===255&&192<=e[p-2]&&254>=e[p-2])p-=3;else if((y=c(e,p-2))&&y.f)(0,_util.warn)(`JpegImage.parse - unexpected data, current marker is: `+y.f),p=y.offset;else throw new n(`unknown marker `+v.toString(16))}v=t()}for(this.width=C.v,this.height=C.g,this.A=m,this.b=[],v=0;v<C.b.length;v++)D=C.b[v],(E=d[D.T])&&(D.G=E),this.b.push({R:s(C,D),U:D.h/C.s,V:D.j/C.u,c:D.c,l:D.l});this.i=this.b.length},L:function(e,t){var n=this.width/e,r=this.height/t,i,a,o=this.b.length,s=e*t*o,c=new Uint8ClampedArray(s),l=new Uint32Array(e);for(a=0;a<o;a++){var u=this.b[a],d=u.U*n,f=u.V*r,p=a,m=u.R,h=u.c+1<<3;for(i=0;i<e;i++)u=0|i*d,l[i]=(u&4294967288)<<3|u&7;for(d=0;d<t;d++)for(u=0|d*f,u=h*(u&4294967288)|(u&7)<<3,i=0;i<e;i++)c[p]=m[u+l[i]],p+=o}if(r=this.M)for(a=0;a<s;)for(n=u=0;u<o;u++,a++,n+=2)c[a]=(c[a]*r[n]>>8)+r[n+1];return c},w:function(){return this.A?!!this.A.W:this.i===3?this.B!==0:this.B===1},I:function(e){for(var t,n,r,i=0,a=e.length;i<a;i+=3)t=e[i],n=e[i+1],r=e[i+2],e[i]=t-179.456+1.402*r,e[i+1]=t+135.459-.344*n-.714*r,e[i+2]=t-226.816+1.772*n;return e},K:function(e){for(var t,n,r,i,a=0,o=0,s=e.length;o<s;o+=4)t=e[o],n=e[o+1],r=e[o+2],i=e[o+3],e[a++]=-122.67195406894+n*(-660635669420364e-19*n+.000437130475926232*r-54080610064599e-18*t+.00048449797120281*i-.154362151871126)+r*(-.000957964378445773*r+.000817076911346625*t-.00477271405408747*i+1.53380253221734)+t*(.000961250184130688*t-.00266257332283933*i+.48357088451265)+i*(-.000336197177618394*i+.484791561490776),e[a++]=107.268039397724+n*(219927104525741e-19*n-.000640992018297945*r+.000659397001245577*t+.000426105652938837*i-.176491792462875)+r*(-.000778269941513683*r+.00130872261408275*t+.000770482631801132*i-.151051492775562)+t*(.00126935368114843*t-.00265090189010898*i+.25802910206845)+i*(-.000318913117588328*i-.213742400323665),e[a++]=-20.810012546947+n*(-.000570115196973677*n-263409051004589e-19*r+.0020741088115012*t-.00288260236853442*i+.814272968359295)+r*(-153496057440975e-19*r-.000132689043961446*t+.000560833691242812*i-.195152027534049)+t*(.00174418132927582*t-.00255243321439347*i+.116935020465145)+i*(-.000343531996510555*i+.24165260232407);return e.subarray(0,a)},J:function(e){for(var t,n,r,i=0,a=e.length;i<a;i+=4)t=e[i],n=e[i+1],r=e[i+2],e[i]=434.456-t-1.402*r,e[i+1]=119.541-t+.344*n+.714*r,e[i+2]=481.816-t-1.772*n;return e},H:function(e){for(var t,n,r,i,a=0,o=1/255,s=0,c=e.length;s<c;s+=4)t=e[s]*o,n=e[s+1]*o,r=e[s+2]*o,i=e[s+3]*o,e[a++]=255+t*(-4.387332384609988*t+54.48615194189176*n+18.82290502165302*r+212.25662451639585*i-285.2331026137004)+n*(1.7149763477362134*n-5.6096736904047315*r-17.873870861415444*i-5.497006427196366)+r*(-2.5217340131683033*r-21.248923337353073*i+17.5119270841813)-i*(21.86122147463605*i+189.48180835922747),e[a++]=255+t*(8.841041422036149*t+60.118027045597366*n+6.871425592049007*r+31.159100130055922*i-79.2970844816548)+n*(-15.310361306967817*n+17.575251261109482*r+131.35250912493976*i-190.9453302588951)+r*(4.444339102852739*r+9.8632861493405*i-24.86741582555878)-i*(20.737325471181034*i+187.80453709719578),e[a++]=255+t*(.8842522430003296*t+8.078677503112928*n+30.89978309703729*r-.23883238689178934*i-14.183576799673286)+n*(10.49593273432072*n+63.02378494754052*r+50.606957656360734*i-112.23884253719248)+r*(.03296041114873217*r+115.60384449646641*i-193.58209356861505)-i*(22.33816807309886*i+180.12613974708367);return e.subarray(0,a)},getData:function(e,t,r){if(4<this.i)throw new n(`Unsupported color mode`);if(e=this.L(e,t),this.i===1&&r){r=e.length,t=new Uint8ClampedArray(3*r);for(var i=0,a=0;a<r;a++){var o=e[a];t[i++]=o,t[i++]=o,t[i++]=o}return t}if(this.i===3&&this.w())return this.I(e);if(this.i===4){if(this.w())return r?this.K(e):this.J(e);if(r)return this.H(e)}return e}},e.JpegDecoder=i})()})(),e.encodeImage=function(t,n,r,i){var a={t256:[n],t257:[r],t258:[8,8,8,8],t259:[1],t262:[2],t273:[1e3],t277:[4],t278:[r],t279:[n*r*4],t282:[1],t283:[1],t284:[1],t286:[0],t287:[0],t296:[1],t305:[`Photopea (UTIF.js)`],t338:[1]};if(i)for(var o in i)a[o]=i[o];for(var s=new Uint8Array(e.encode([a])),c=new Uint8Array(t),l=new Uint8Array(1e3+n*r*4),o=0;o<s.length;o++)l[o]=s[o];for(var o=0;o<c.length;o++)l[1e3+o]=c[o];return l.buffer},e.encode=function(t){var n=/* @__PURE__ */ new Uint8Array(2e4),r=4,i=e._binBE;n[0]=77,n[1]=77,n[3]=42;var a=8;i.writeUint(n,r,a),r+=4;for(var o=0;o<t.length;o++){var s=e._writeIFD(i,n,a,t[o]);a=s[1],o<t.length-1&&i.writeUint(n,s[0],a)}return n.slice(0,a).buffer},e.decode=function(t){e.decode._decodeG3.allow2D=null;var n=new Uint8Array(t),r=0,i=e._binBE.readASCII(n,r,2);r+=2;var a=i==`II`?e._binLE:e._binBE;a.readUshort(n,r),r+=2;var o=a.readUint(n,r);r+=4;for(var s=[];;){var c=e._readIFD(a,n,o,s,0,!1);if(o=a.readUint(n,c),o==0)break}return s},e.decodeImage=function(t,n,r){var a=new Uint8Array(t),o=e._binBE.readASCII(a,0,2);if(n.t256!=null){n.isLE=o==`II`,n.width=n.t256[0],n.height=n.t257[0];var s=n.t259?n.t259[0]:1,c=n.t266?n.t266[0]:1;n.t284&&n.t284[0]==2&&i(`PlanarConfiguration 2 should not be used!`);var l=n.t258?Math.min(32,n.t258[0])*n.t258.length:n.t277?n.t277[0]:1;s==1&&n.t279!=null&&n.t278&&n.t262[0]==32803&&(l=Math.round(n.t279[0]*8/(n.width*n.t278[0])));var u=Math.ceil(n.width*l/8)*8,d=n.t273;d??=n.t324;var f=n.t279;s==1&&d.length==1&&(f=[n.height*(u>>>3)]),f??=n.t325;var p=new Uint8Array(n.height*(u>>>3)),m=0;if(n.t322!=null){for(var h=n.t322[0],g=n.t323[0],_=Math.floor((n.width+h-1)/h),v=Math.floor((n.height+g-1)/g),y=new Uint8Array(Math.ceil(h*g*l/8)|0),b=0;b<v;b++)for(var x=0;x<_;x++){for(var S=b*_+x,C=0;C<y.length;C++)y[C]=0;e.decode._decompress(n,r,a,d[S],f[S],s,y,0,c),s==6?p=y:e._copyTile(y,Math.ceil(h*l/8)|0,g,p,Math.ceil(n.width*l/8)|0,n.height,Math.ceil(x*h*l/8)|0,b*g)}m=p.length*8}else{var w=n.t278?n.t278[0]:n.height;w=Math.min(w,n.height);for(var S=0;S<d.length;S++)e.decode._decompress(n,r,a,d[S],f[S],s,p,Math.ceil(m/8)|0,c),m+=u*w;m=Math.min(m,p.length*8)}n.data=new Uint8Array(p.buffer,0,Math.ceil(m/8)|0)}},e.decode._decompress=function(n,r,a,o,s,c,l,u,d){if(c==1||s==l.length&&c!=32767)for(var f=0;f<s;f++)l[u+f]=a[o+f];else if(c==3)e.decode._decodeG3(a,o,s,l,u,n.width,d);else if(c==4)e.decode._decodeG4(a,o,s,l,u,n.width,d);else if(c==5)e.decode._decodeLZW(a,o,l,u);else if(c==6)e.decode._decodeOldJPEG(n,a,o,s,l,u);else if(c==7)e.decode._decodeNewJPEG(n,a,o,s,l,u);else if(c==8)for(var p=new Uint8Array(a.buffer,o,s),m=t.inflate(p),h=0;h<m.length;h++)l[u+h]=m[h];else c==32767?e.decode._decodeARW(n,a,o,s,l,u):c==32773?e.decode._decodePackBits(a,o,s,l,u):c==32809?e.decode._decodeThunder(a,o,s,l,u):c==34713?e.decode._decodeNikon(n,r,a,o,s,l,u):i(`Unknown compression`,c);var g=n.t258?Math.min(32,n.t258[0]):1,_=n.t277?n.t277[0]:1,v=g*_>>>3,y=n.t278?n.t278[0]:n.height,b=Math.ceil(g*_*n.width/8);if(g==16&&!n.isLE&&n.t33422==null)for(var x=0;x<y;x++)for(var S=u+x*b,C=1;C<b;C+=2){var w=l[S+C];l[S+C]=l[S+C-1],l[S+C-1]=w}if(n.t317&&n.t317[0]==2)for(var x=0;x<y;x++){var T=u+x*b;if(g==16)for(var f=v;f<b;f+=2){var E=(l[T+f+1]<<8|l[T+f])+(l[T+f-v+1]<<8|l[T+f-v]);l[T+f]=E&255,l[T+f+1]=E>>>8&255}else if(_==3)for(var f=3;f<b;f+=3)l[T+f]=l[T+f]+l[T+f-3]&255,l[T+f+1]=l[T+f+1]+l[T+f-2]&255,l[T+f+2]=l[T+f+2]+l[T+f-1]&255;else for(var f=v;f<b;f++)l[T+f]=l[T+f]+l[T+f-v]&255}},e.decode._ljpeg_diff=function(t,n,r){var i=e.decode._getbithuff,a=i(t,n,r[0],r),o=i(t,n,a,0);return o&1<<a-1||(o-=(1<<a)-1),o},e.decode._decodeARW=function(t,n,r,i,a,o){var s=t.t256[0],c=t.t257[0],l=t.t258[0],u=t.isLE?e._binLE:e._binBE;if(s*c!=i&&s*c*1.5!=i){c+=8;var d=[r,0,0,0],f=/* @__PURE__ */ new Uint16Array(32770),p=[3857,3856,3599,3342,3085,2828,2571,2314,2057,1800,1543,1286,1029,772,771,768,514,513],m,h,g,_,v,y=0,b=e.decode._ljpeg_diff;for(f[0]=15,g=m=0;m<18;m++)for(var x=32768>>>(p[m]>>>8),h=0;h<x;h++)f[++g]=p[m];for(_=s;_--;)for(v=0;v<c+1;v+=2)if(v==c&&(v=1),y+=b(n,d,f),v<c){var S=y&4095;e.decode._putsF(a,(v*s+_)*l,S<<16-l)}}else if(s*c*1.5==i)for(var m=0;m<i;m+=3){var C=n[r+m+0],w=n[r+m+1],T=n[r+m+2];a[o+m]=w<<4|C>>>4,a[o+m+1]=C<<4|T>>>4,a[o+m+2]=T<<4|w>>>4}else{var E=/* @__PURE__ */ new Uint16Array(16),v,_,D,O,k,A,j,M,N,m,P,F=new Uint8Array(s+1);for(v=0;v<c;v++){for(var I=0;I<s;I++)F[I]=n[r++];for(P=0,_=0;_<s-30;P+=16){for(O=2047&(D=u.readUint(F,P)),k=2047&D>>>11,A=15&D>>>22,j=15&D>>>26,M=0;M<4&&128<<M<=O-k;M++);for(N=30,m=0;m<16;m++)m==A?E[m]=O:m==j?E[m]=k:(E[m]=((u.readUshort(F,P+(N>>3))>>>(N&7)&127)<<M)+k,E[m]>2047&&(E[m]=2047),N+=7);for(m=0;m<16;m++,_+=2){var S=E[m]<<1;e.decode._putsF(a,(v*s+_)*l,S<<16-l)}_-=_&1?1:31}}}},e.decode._decodeNikon=function(t,n,r,i,a,o,s){var c=[[0,0,1,5,1,1,1,1,1,1,2,0,0,0,0,0,0,5,4,3,6,2,7,1,0,8,9,11,10,12],[0,0,1,5,1,1,1,1,1,1,2,0,0,0,0,0,0,57,90,56,39,22,5,4,3,2,1,0,11,12,12],[0,0,1,4,2,3,1,2,0,0,0,0,0,0,0,0,0,5,4,6,3,7,2,8,1,9,0,10,11,12],[0,0,1,4,3,1,1,1,1,1,2,0,0,0,0,0,0,5,6,4,7,8,3,9,2,1,0,10,11,12,13,14],[0,0,1,5,1,1,1,1,1,1,1,2,0,0,0,0,0,8,92,75,58,41,7,6,5,4,3,2,1,0,13,14],[0,0,1,4,2,2,3,1,2,0,0,0,0,0,0,0,0,7,6,8,5,9,4,10,3,11,12,2,0,1,13,14]],l=t.t256[0],u=t.t257[0],d=t.t258[0],f=0,p=0,m=e.decode._make_decoder,h=e.decode._getbithuff,g=n[0].exifIFD.makerNote,_=g.t150?g.t150:g.t140,v=0,y=_[v++],b=_[v++];(y==73||b==88)&&(v+=2110),y==70&&(f=2),d==14&&(f+=3);for(var x=[[0,0],[0,0]],S=t.isLE?e._binLE:e._binBE,C=0;C<2;C++)for(var w=0;w<2;w++)x[C][w]=S.readShort(_,v),v+=2;var T=1<<d&32767,E=0,D=S.readShort(_,v);v+=2,D>1&&(E=Math.floor(T/(D-1))),y==68&&b==32&&E>0&&(p=S.readShort(_,562));var C,O,k,A,j,M,N=[0,0],P=m(c[f]),F=[i,0,0,0];for(O=0;O<u;O++)for(p&&O==p&&(P=m(c[f+1])),k=0;k<l;k++){C=h(r,F,P[0],P),A=C&15,j=C>>>4,M=(h(r,F,A-j,0)<<1)+1<<j>>>1,M&1<<A-1||(M-=(1<<A)-(j==0)),k<2?N[k]=x[O&1][k]+=M:N[k&1]+=M;var I=Math.min(Math.max(N[k&1],0),(1<<d)-1),L=(O*l+k)*d;e.decode._putsF(o,L,I<<16-d)}},e.decode._putsF=function(e,t,n){n<<=8-(t&7);var r=t>>>3;e[r]|=n>>>16,e[r+1]|=n>>>8,e[r+2]|=n},e.decode._getbithuff=function(t,n,r,i){var a=0;e.decode._get_byte;var o,s=n[0],c=n[1],l=n[2],u=n[3];if(r==0||l<0)return 0;for(;!u&&l<r&&(o=t[s++])!=-1&&!(u=a&&o==255&&t[s++]);)c=(c<<8)+o,l+=8;if(o=c<<32-l>>>32-r,i?(l-=i[o+1]>>>8,o=i[o+1]&255):l-=r,l<0)throw`e`;return n[0]=s,n[1]=c,n[2]=l,n[3]=u,o},e.decode._make_decoder=function(e){var t,n,r,i,a,o=[];for(t=16;t!=0&&!e[t];t--);var s=17;for(o[0]=t,r=n=1;n<=t;n++)for(i=0;i<e[n];i++,++s)for(a=0;a<1<<t-n;a++)r<=1<<t&&(o[r++]=n<<8|e[s]);return o},e.decode._decodeNewJPEG=function(t,n,r,i,a,o){var s=t.t347,c=s?s.length:0,l=new Uint8Array(c+i);if(s){for(var u=216,d=217,f=0,p=0;p<c-1&&(s[p]!=255||s[p+1]!=d);p++)l[f++]=s[p];var m=n[r],h=n[r+1];(m!=255||h!=u)&&(l[f++]=m,l[f++]=h);for(var p=2;p<i;p++)l[f++]=n[r+p]}else for(var p=0;p<i;p++)l[p]=n[r+p];if(t.t262[0]==32803||t.t262[0]==34892){var g=t.t258[0],_=e.LosslessJpegDecode(l),v=_.length;if(g==16){if(t.isLE)for(var p=0;p<v;p++)a[o+(p<<1)]=_[p]&255,a[o+(p<<1)+1]=_[p]>>>8;else for(var p=0;p<v;p++)a[o+(p<<1)]=_[p]>>>8,a[o+(p<<1)+1]=_[p]&255}else if(g==14||g==12)for(var y=16-g,p=0;p<v;p++)e.decode._putsF(a,p*g,_[p]<<y);else throw Error(`unsupported bit depth `+g)}else{var b=new e.JpegDecoder;b.parse(l);for(var x=b.getData(b.width,b.height),p=0;p<x.length;p++)a[o+p]=x[p]}t.t262[0]==6&&(t.t262[0]=2)},e.decode._decodeOldJPEGInit=function(e,t,n,r){var a=216,o=219,s=196,c=221,l=192,u=218,d=0,f=0,p,m,h=!1,g,_,v,y=e.t513,b=y?y[0]:0,x=e.t514,S=x?x[0]:0,C=e.t324||e.t273||y,w=e.t530,T=0,E=0,D=e.t277?e.t277[0]:1,O=e.t515;if(C&&(f=C[0],h=C.length>1),!h){if(t[n]==255&&t[n+1]==a)return{jpegOffset:n};if(y!=null&&(t[n+b]==255&&t[n+b+1]==a?d=n+b:i(`JPEGInterchangeFormat does not point to SOI`),x==null?i(`JPEGInterchangeFormatLength field is missing`):(b>=f||b+S<=f)&&i(`JPEGInterchangeFormatLength field value is invalid`),d!=null))return{jpegOffset:d}}if(w!=null&&(T=w[0],E=w[1]),y!=null&&x!=null){if(S>=2&&b+S<=f){for(p=t[n+b+S-2]==255&&t[n+b+S-1]==a?new Uint8Array(S-2):new Uint8Array(S),g=0;g<p.length;g++)p[g]=t[n+b+g];i(`Incorrect JPEG interchange format: using JPEGInterchangeFormat offset to derive tables`)}else i(`JPEGInterchangeFormat+JPEGInterchangeFormatLength > offset to first strip or tile`)}if(p==null){var k=0,A=[];A[k++]=255,A[k++]=a;var j=e.t519;if(j==null)throw Error(`JPEGQTables tag is missing`);for(g=0;g<j.length;g++)for(A[k++]=255,A[k++]=o,A[k++]=0,A[k++]=67,A[k++]=g,_=0;_<64;_++)A[k++]=t[n+j[g]+_];for(v=0;v<2;v++){var M=e[v==0?`t520`:`t521`];if(M==null)throw Error((v==0?`JPEGDCTables`:`JPEGACTables`)+` tag is missing`);for(g=0;g<M.length;g++){A[k++]=255,A[k++]=s;var N=19;for(_=0;_<16;_++)N+=t[n+M[g]+_];for(A[k++]=N>>>8,A[k++]=N&255,A[k++]=g|v<<4,_=0;_<16;_++)A[k++]=t[n+M[g]+_];for(_=0;_<N;_++)A[k++]=t[n+M[g]+16+_]}}if(A[k++]=255,A[k++]=l,A[k++]=0,A[k++]=8+3*D,A[k++]=8,A[k++]=e.height>>>8&255,A[k++]=e.height&255,A[k++]=e.width>>>8&255,A[k++]=e.width&255,A[k++]=D,D==1)A[k++]=1,A[k++]=17,A[k++]=0;else for(g=0;g<3;g++)A[k++]=g+1,A[k++]=g==0?(T&15)<<4|E&15:17,A[k++]=g;O!=null&&O[0]!=0&&(A[k++]=255,A[k++]=c,A[k++]=0,A[k++]=4,A[k++]=O[0]>>>8&255,A[k++]=O[0]&255),p=new Uint8Array(A)}var P=-1;for(g=0;g<p.length-1;){if(p[g]==255&&p[g+1]==l){P=g;break}g++}if(P==-1){var F=new Uint8Array(p.length+10+3*D);F.set(p);var I=p.length;if(P=p.length,p=F,p[I++]=255,p[I++]=l,p[I++]=0,p[I++]=8+3*D,p[I++]=8,p[I++]=e.height>>>8&255,p[I++]=e.height&255,p[I++]=e.width>>>8&255,p[I++]=e.width&255,p[I++]=D,D==1)p[I++]=1,p[I++]=17,p[I++]=0;else for(g=0;g<3;g++)p[I++]=g+1,p[I++]=g==0?(T&15)<<4|E&15:17,p[I++]=g}if(t[f]==255&&t[f+1]==u){var L=t[f+2]<<8|t[f+3];for(m=new Uint8Array(L+2),m[0]=t[f],m[1]=t[f+1],m[2]=t[f+2],m[3]=t[f+3],g=0;g<L-2;g++)m[g+4]=t[f+g+4]}else{m=new Uint8Array(8+2*D);var R=0;if(m[R++]=255,m[R++]=u,m[R++]=0,m[R++]=6+2*D,m[R++]=D,D==1)m[R++]=1,m[R++]=0;else for(g=0;g<3;g++)m[R++]=g+1,m[R++]=g<<4|g;m[R++]=0,m[R++]=63,m[R++]=0}return{jpegOffset:n,tables:p,sosMarker:m,sofPosition:P}},e.decode._decodeOldJPEG=function(t,n,r,i,a,o){var s,c,l,u,d,f=e.decode._decodeOldJPEGInit(t,n,r,i);if(f.jpegOffset!=null)for(c=r+i-f.jpegOffset,u=new Uint8Array(c),s=0;s<c;s++)u[s]=n[f.jpegOffset+s];else{for(l=f.tables.length,u=new Uint8Array(l+f.sosMarker.length+i+2),u.set(f.tables),d=l,u[f.sofPosition+5]=t.height>>>8&255,u[f.sofPosition+6]=t.height&255,u[f.sofPosition+7]=t.width>>>8&255,u[f.sofPosition+8]=t.width&255,(n[r]!=255||n[r+1]!=SOS)&&(u.set(f.sosMarker,d),d+=sosMarker.length),s=0;s<i;s++)u[d++]=n[r+s];u[d++]=255,u[d++]=EOI}var p=new e.JpegDecoder;p.parse(u);for(var m=p.getData(p.width,p.height),s=0;s<m.length;s++)a[o+s]=m[s];t.t262&&t.t262[0]==6&&(t.t262[0]=2)},e.decode._decodePackBits=function(e,t,n,r,i){for(var a=new Int8Array(e.buffer),o=new Int8Array(r.buffer),s=t+n;t<s;){var c=a[t];if(t++,c>=0&&c<128)for(var l=0;l<c+1;l++)o[i]=a[t],i++,t++;if(c>=-127&&c<0){for(var l=0;l<-c+1;l++)o[i]=a[t],i++;t++}}},e.decode._decodeThunder=function(e,t,n,r,i){for(var a=[0,1,0,-1],o=[0,1,2,3,0,-3,-2,-1],s=t+n,c=i*2,l=0;t<s;){var u=e[t],d=u>>>6,f=u&63;if(t++,d==3&&(l=f&15,r[c>>>1]|=l<<4*(1-c&1),c++),d==0)for(var p=0;p<f;p++)r[c>>>1]|=l<<4*(1-c&1),c++;if(d==2)for(var p=0;p<2;p++){var m=f>>>3*(1-p)&7;m!=4&&(l+=o[m],r[c>>>1]|=l<<4*(1-c&1),c++)}if(d==1)for(var p=0;p<3;p++){var m=f>>>2*(2-p)&3;m!=2&&(l+=a[m],r[c>>>1]|=l<<4*(1-c&1),c++)}}},e.decode._dmap={1:0,"011":1,"000011":2,"0000011":3,"010":-1,"000010":-2,"0000010":-3},e.decode._lens=(function(){var e=function(e,t,n,r){for(var i=0;i<t.length;i++)e[t[i]]=n+i*r},t=`00110101,000111,0111,1000,1011,1100,1110,1111,10011,10100,00111,01000,001000,000011,110100,110101,101010,101011,0100111,0001100,0001000,0010111,0000011,0000100,0101000,0101011,0010011,0100100,0011000,00000010,00000011,00011010,00011011,00010010,00010011,00010100,00010101,00010110,00010111,00101000,00101001,00101010,00101011,00101100,00101101,00000100,00000101,00001010,00001011,01010010,01010011,01010100,01010101,00100100,00100101,01011000,01011001,01011010,01011011,01001010,01001011,00110010,00110011,00110100`,n=`0000110111,010,11,10,011,0011,0010,00011,000101,000100,0000100,0000101,0000111,00000100,00000111,000011000,0000010111,0000011000,0000001000,00001100111,00001101000,00001101100,00000110111,00000101000,00000010111,00000011000,000011001010,000011001011,000011001100,000011001101,000001101000,000001101001,000001101010,000001101011,000011010010,000011010011,000011010100,000011010101,000011010110,000011010111,000001101100,000001101101,000011011010,000011011011,000001010100,000001010101,000001010110,000001010111,000001100100,000001100101,000001010010,000001010011,000000100100,000000110111,000000111000,000000100111,000000101000,000001011000,000001011001,000000101011,000000101100,000001011010,000001100110,000001100111`,r=`11011,10010,010111,0110111,00110110,00110111,01100100,01100101,01101000,01100111,011001100,011001101,011010010,011010011,011010100,011010101,011010110,011010111,011011000,011011001,011011010,011011011,010011000,010011001,010011010,011000,010011011`,i=`0000001111,000011001000,000011001001,000001011011,000000110011,000000110100,000000110101,0000001101100,0000001101101,0000001001010,0000001001011,0000001001100,0000001001101,0000001110010,0000001110011,0000001110100,0000001110101,0000001110110,0000001110111,0000001010010,0000001010011,0000001010100,0000001010101,0000001011010,0000001011011,0000001100100,0000001100101`,a=`00000001000,00000001100,00000001101,000000010010,000000010011,000000010100,000000010101,000000010110,000000010111,000000011100,000000011101,000000011110,000000011111`;t=t.split(`,`),n=n.split(`,`),r=r.split(`,`),i=i.split(`,`),a=a.split(`,`);var o={},s={};return e(o,t,0,1),e(o,r,64,64),e(o,a,1792,64),e(s,n,0,1),e(s,i,64,64),e(s,a,1792,64),[o,s]})(),e.decode._decodeG4=function(t,n,r,i,a,o,s){for(var c=e.decode,l=n<<3,u=0,d=``,f=[],p=[],m=0;m<o;m++)p.push(0);p=c._makeDiff(p);for(var h=0,g=0,_=0,v=0,y=0,b=0,x=``,S=0,C=Math.ceil(o/8)*8;l>>>3<n+r;){_=c._findDiff(p,h+(h==0?0:1),1-y),v=c._findDiff(p,_,y);var w=0;if(s==1&&(w=t[l>>>3]>>>7-(l&7)&1),s==2&&(w=t[l>>>3]>>>(l&7)&1),l++,d+=w,x==`H`){if(c._lens[y][d]!=null){var T=c._lens[y][d];d=``,u+=T,T<64&&(c._addNtimes(f,u,y),h+=u,y=1-y,u=0,S--,S==0&&(x=``))}}else d==`0001`&&(d=``,c._addNtimes(f,v-h,y),h=v),d==`001`&&(d=``,x=`H`,S=2),c._dmap[d]!=null&&(g=_+c._dmap[d],c._addNtimes(f,g-h,y),h=g,d=``,y=1-y);f.length==o&&x==``&&(c._writeBits(f,i,a*8+b*C),y=0,b++,h=0,p=c._makeDiff(f),f=[])}},e.decode._findDiff=function(e,t,n){for(var r=0;r<e.length;r+=2)if(e[r]>=t&&e[r+1]==n)return e[r]},e.decode._makeDiff=function(e){var t=[];e[0]==1&&t.push(0,1);for(var n=1;n<e.length;n++)e[n-1]!=e[n]&&t.push(n,e[n]);return t.push(e.length,0,e.length,1),t},e.decode._decodeG3=function(t,n,r,i,a,o,s){for(var c=e.decode,l=n<<3,u=0,d=``,f=[],p=[],m=0;m<o;m++)f.push(0);for(var h=0,g=0,_=0,v=0,y=0,b=-1,x=``,S=0,C=!1,w=Math.ceil(o/8)*8;l>>>3<n+r;){_=c._findDiff(p,h+(h==0?0:1),1-y),v=c._findDiff(p,_,y);var T=0;if(s==1&&(T=t[l>>>3]>>>7-(l&7)&1),s==2&&(T=t[l>>>3]>>>(l&7)&1),l++,d+=T,C){if(c._lens[y][d]!=null){var E=c._lens[y][d];d=``,u+=E,E<64&&(c._addNtimes(f,u,y),y=1-y,u=0)}}else if(x==`H`){if(c._lens[y][d]!=null){var E=c._lens[y][d];d=``,u+=E,E<64&&(c._addNtimes(f,u,y),h+=u,y=1-y,u=0,S--,S==0&&(x=``))}}else d==`0001`&&(d=``,c._addNtimes(f,v-h,y),h=v),d==`001`&&(d=``,x=`H`,S=2),c._dmap[d]!=null&&(g=_+c._dmap[d],c._addNtimes(f,g-h,y),h=g,d=``,y=1-y);d.endsWith(`000000000001`)&&(b>=0&&c._writeBits(f,i,a*8+b*w),s==1&&(C=(t[l>>>3]>>>7-(l&7)&1)==1),s==2&&(C=(t[l>>>3]>>>(l&7)&1)==1),l++,c._decodeG3.allow2D??(c._decodeG3.allow2D=C),c._decodeG3.allow2D||(C=!0,l--),d=``,y=0,b++,h=0,p=c._makeDiff(f),f=[])}f.length==o&&c._writeBits(f,i,a*8+b*w)},e.decode._addNtimes=function(e,t,n){for(var r=0;r<t;r++)e.push(n)},e.decode._writeBits=function(e,t,n){for(var r=0;r<e.length;r++)t[n+r>>>3]|=e[r]<<7-(n+r&7)},e.decode._decodeLZW=function(t,n,r,i){if(e.decode._lzwTab==null){for(var a=/* @__PURE__ */ new Uint32Array(65535),o=/* @__PURE__ */ new Uint16Array(65535),s=/* @__PURE__ */ new Uint8Array(2e6),c=0;c<256;c++)s[c<<2]=c,a[c]=c<<2,o[c]=1;e.decode._lzwTab=[a,o,s]}for(var l=e.decode._copyData,u=e.decode._lzwTab[0],d=e.decode._lzwTab[1],s=e.decode._lzwTab[2],f=258,p=1032,m=9,h=n<<3,g=256,_=257,v=0,y=0,b=0;v=t[h>>>3]<<16|t[h+8>>>3]<<8|t[h+16>>>3],y=v>>24-(h&7)-m&(1<<m)-1,h+=m,y!=_;){if(y==g){if(m=9,f=258,p=1032,v=t[h>>>3]<<16|t[h+8>>>3]<<8|t[h+16>>>3],y=v>>24-(h&7)-m&(1<<m)-1,h+=m,y==_)break;r[i]=y,i++}else if(y<f){var x=u[y],S=d[y];if(l(s,x,r,i,S),i+=S,b>=f)u[f]=p,s[u[f]]=x[0],d[f]=1,p=p+1+3&-4,f++;else{u[f]=p;var C=u[b],w=d[b];l(s,C,s,p,w),s[p+w]=s[x],w++,d[f]=w,f++,p=p+w+3&-4}f+1==1<<m&&m++}else{if(b>=f)u[f]=p,d[f]=0,f++;else{u[f]=p;var C=u[b],w=d[b];l(s,C,s,p,w),s[p+w]=s[p],w++,d[f]=w,f++,l(s,p,r,i,w),i+=w,p=p+w+3&-4}f+1==1<<m&&m++}b=y}},e.decode._copyData=function(e,t,n,r,i){for(var a=0;a<i;a+=4)n[r+a]=e[t+a],n[r+a+1]=e[t+a+1],n[r+a+2]=e[t+a+2],n[r+a+3]=e[t+a+3]},e.tags={},e.ttypes={256:3,257:3,258:3,259:3,262:3,273:4,274:3,277:3,278:4,279:4,282:5,283:5,284:3,286:5,287:5,296:3,305:2,306:2,338:3,513:4,514:4,34665:4},e._readIFD=function(t,n,r,a,o,s){var c=t.readUshort(n,r);r+=2;var l={};a.push(l),s&&i(` `.repeat(o),a.length-1,`>>>----------------`);for(var u=0;u<c;u++){var d=t.readUshort(n,r);r+=2;var f=t.readUshort(n,r);r+=2;var p=t.readUint(n,r);r+=4;var m=t.readUint(n,r);r+=4;var h=[];if((f==1||f==7)&&(h=new Uint8Array(n.buffer,p<5?r-4:m,p)),f==2){var g=p<5?r-4:m;n[g]<128?h.push(t.readASCII(n,g,p-1)):h=new Uint8Array(n.buffer,g,p-1)}if(f==3)for(var _=0;_<p;_++)h.push(t.readUshort(n,(p<3?r-4:m)+2*_));if(f==4)for(var _=0;_<p;_++)h.push(t.readUint(n,(p<2?r-4:m)+4*_));if(f==5)for(var _=0;_<p;_++)h.push(t.readUint(n,m+_*8)/t.readUint(n,m+_*8+4));if(f==8)for(var _=0;_<p;_++)h.push(t.readShort(n,(p<3?r-4:m)+2*_));if(f==9)for(var _=0;_<p;_++)h.push(t.readInt(n,(p<2?r-4:m)+4*_));if(f==10)for(var _=0;_<p;_++)h.push(t.readInt(n,m+_*8)/t.readInt(n,m+_*8+4));if(f==11)for(var _=0;_<p;_++)h.push(t.readFloat(n,m+_*4));if(f==12)for(var _=0;_<p;_++)h.push(t.readDouble(n,m+_*8));if(l[`t`+d]=h,p!=0&&h.length==0&&i(`unknown TIFF tag type: `,f,`num:`,p),s&&i(` `.repeat(o),d,f,e.tags[d],h),!(d==330&&l.t272&&l.t272[0]==`DSLR-A100`)&&(d==330||d==34665||d==50740&&t.readUshort(n,t.readUint(h,0))<300)){for(var v=d==50740?[t.readUint(h,0)]:h,y=[],_=0;_<v.length;_++)e._readIFD(t,n,v[_],y,o+1,s);d==330&&(l.subIFD=y),d==34665&&(l.exifIFD=y[0]),d==50740&&(l.dngPrvt=y[0])}if(d==37500){var b=h;if(t.readASCII(b,0,5)==`Nikon`)l.makerNote=e.decode(b.slice(10).buffer)[0];else if(t.readUshort(n,m)<300){var x=[];e._readIFD(t,n,m,x,o+1,s),l.makerNote=x[0]}}}return s&&i(` `.repeat(o),`<<<---------------`),r},e._writeIFD=function(t,n,r,i){var a=Object.keys(i);t.writeUshort(n,r,a.length),r+=2;for(var o=r+a.length*12+4,s=0;s<a.length;s++){var c=a[s],l=parseInt(c.slice(1)),u=e.ttypes[l];if(u==null)throw Error(`unknown type of tag: `+l);var d=i[c];u==2&&(d=d[0]+`\0`);var f=d.length;t.writeUshort(n,r,l),r+=2,t.writeUshort(n,r,u),r+=2,t.writeUint(n,r,f),r+=4;var p=[-1,1,1,2,4,8,0,0,0,0,0,0,8][u]*f,m=r;if(p>4&&(t.writeUint(n,r,o),m=o),u==2&&t.writeASCII(n,m,d),u==3)for(var h=0;h<f;h++)t.writeUshort(n,m+2*h,d[h]);if(u==4)for(var h=0;h<f;h++)t.writeUint(n,m+4*h,d[h]);if(u==5)for(var h=0;h<f;h++)t.writeUint(n,m+8*h,Math.round(d[h]*1e4)),t.writeUint(n,m+8*h+4,1e4);if(u==12)for(var h=0;h<f;h++)t.writeDouble(n,m+8*h,d[h]);p>4&&(p+=p&1,o+=p),r+=4}return[r,o]},e.toRGBA8=function(e){var t=e.width,n=e.height,r=t*n,a=r*4,o=e.data,s=new Uint8Array(r*4),c=e.t262?e.t262[0]:2,l=e.t258?Math.min(32,e.t258[0]):1;if(c==0)for(var u=Math.ceil(l*t/8),d=0;d<n;d++){var f=d*u,p=d*t;if(l==1)for(var m=0;m<t;m++){var h=p+m<<2,g=o[f+(m>>3)]>>7-(m&7)&1;s[h]=s[h+1]=s[h+2]=(1-g)*255,s[h+3]=255}if(l==4)for(var m=0;m<t;m++){var h=p+m<<2,g=o[f+(m>>1)]>>4-4*(m&1)&15;s[h]=s[h+1]=s[h+2]=(15-g)*17,s[h+3]=255}if(l==8)for(var m=0;m<t;m++){var h=p+m<<2,g=o[f+m];s[h]=s[h+1]=s[h+2]=255-g,s[h+3]=255}}else if(c==1)for(var u=Math.ceil(l*t/8),d=0;d<n;d++){var f=d*u,p=d*t;if(l==1)for(var m=0;m<t;m++){var h=p+m<<2,g=o[f+(m>>3)]>>7-(m&7)&1;s[h]=s[h+1]=s[h+2]=g*255,s[h+3]=255}if(l==2)for(var m=0;m<t;m++){var h=p+m<<2,g=o[f+(m>>2)]>>6-2*(m&3)&3;s[h]=s[h+1]=s[h+2]=g*85,s[h+3]=255}if(l==8)for(var m=0;m<t;m++){var h=p+m<<2,g=o[f+m];s[h]=s[h+1]=s[h+2]=g,s[h+3]=255}if(l==16)for(var m=0;m<t;m++){var h=p+m<<2,g=o[f+(2*m+1)];s[h]=s[h+1]=s[h+2]=Math.min(255,g),s[h+3]=255}}else if(c==2){var _=e.t258?e.t258.length:3;if(l==8){if(_==4)for(var m=0;m<a;m++)s[m]=o[m];if(_==3)for(var m=0;m<r;m++){var h=m<<2,v=m*3;s[h]=o[v],s[h+1]=o[v+1],s[h+2]=o[v+2],s[h+3]=255}}else{if(_==4)for(var m=0;m<r;m++){var h=m<<2,v=m*8+1;s[h]=o[v],s[h+1]=o[v+2],s[h+2]=o[v+4],s[h+3]=o[v+6]}if(_==3)for(var m=0;m<r;m++){var h=m<<2,v=m*6+1;s[h]=o[v],s[h+1]=o[v+2],s[h+2]=o[v+4],s[h+3]=255}}}else if(c==3)for(var y=e.t320,m=0;m<r;m++){var h=m<<2,b=o[m];s[h]=y[b]>>8,s[h+1]=y[256+b]>>8,s[h+2]=y[512+b]>>8,s[h+3]=255}else if(c==5)for(var _=e.t258?e.t258.length:4,x=+(_>4),m=0;m<r;m++){var h=m<<2,S=m*_,C=255-o[S],w=255-o[S+1],T=255-o[S+2],E=(255-o[S+3])*(1/255);s[h]=~~(C*E+.5),s[h+1]=~~(w*E+.5),s[h+2]=~~(T*E+.5),s[h+3]=255*(1-x)+o[S+4]*x}else i(`Unknown Photometric interpretation: `+c);return s},e.replaceIMG=function(t){t??=document.getElementsByTagName(`img`);for(var n=[`tif`,`tiff`,`dng`,`cr2`,`nef`],r=0;r<t.length;r++){var i=t[r],a=i.getAttribute(`src`);if(a!=null){var o=a.split(`.`).pop().toLowerCase();if(n.indexOf(o)!=-1){var s=new XMLHttpRequest;e._xhrs.push(s),e._imgs.push(i),s.open(`GET`,a),s.responseType=`arraybuffer`,s.onload=e._imgLoaded,s.send()}}}},e._xhrs=[],e._imgs=[],e._imgLoaded=function(t){var n=t.target.response,r=e.decode(n),i=r,a=0,o=i[0];r[0].subIFD&&(i=i.concat(r[0].subIFD));for(var s=0;s<i.length;s++){var c=i[s];if(!(c.t258==null||c.t258.length<3)){var l=c.t256*c.t257;l>a&&(a=l,o=c)}}e.decodeImage(n,o,r);var u=e.toRGBA8(o),d=o.width,f=o.height,p=e._xhrs.indexOf(t.target),c=e._imgs[p];e._xhrs.splice(p,1),e._imgs.splice(p,1);var m=document.createElement(`canvas`);m.width=d,m.height=f;for(var h=m.getContext(`2d`),g=h.createImageData(d,f),s=0;s<u.length;s++)g.data[s]=u[s];h.putImageData(g,0,0),c.setAttribute(`src`,m.toDataURL())},e._binBE={nextZero:function(e,t){for(;e[t]!=0;)t++;return t},readUshort:function(e,t){return e[t]<<8|e[t+1]},readShort:function(t,n){var r=e._binBE.ui8;return r[0]=t[n+1],r[1]=t[n+0],e._binBE.i16[0]},readInt:function(t,n){var r=e._binBE.ui8;return r[0]=t[n+3],r[1]=t[n+2],r[2]=t[n+1],r[3]=t[n+0],e._binBE.i32[0]},readUint:function(t,n){var r=e._binBE.ui8;return r[0]=t[n+3],r[1]=t[n+2],r[2]=t[n+1],r[3]=t[n+0],e._binBE.ui32[0]},readASCII:function(e,t,n){for(var r=``,i=0;i<n;i++)r+=String.fromCharCode(e[t+i]);return r},readFloat:function(t,n){for(var r=e._binBE.ui8,i=0;i<4;i++)r[i]=t[n+3-i];return e._binBE.fl32[0]},readDouble:function(t,n){for(var r=e._binBE.ui8,i=0;i<8;i++)r[i]=t[n+7-i];return e._binBE.fl64[0]},writeUshort:function(e,t,n){e[t]=n>>8&255,e[t+1]=n&255},writeUint:function(e,t,n){e[t]=n>>24&255,e[t+1]=n>>16&255,e[t+2]=n>>8&255,e[t+3]=(n|0)&255},writeASCII:function(e,t,n){for(var r=0;r<n.length;r++)e[t+r]=n.charCodeAt(r)},writeDouble:function(t,n,r){e._binBE.fl64[0]=r;for(var i=0;i<8;i++)t[n+i]=e._binBE.ui8[7-i]}},e._binBE.ui8=/* @__PURE__ */ new Uint8Array(8),e._binBE.i16=new Int16Array(e._binBE.ui8.buffer),e._binBE.i32=new Int32Array(e._binBE.ui8.buffer),e._binBE.ui32=new Uint32Array(e._binBE.ui8.buffer),e._binBE.fl32=new Float32Array(e._binBE.ui8.buffer),e._binBE.fl64=new Float64Array(e._binBE.ui8.buffer),e._binLE={nextZero:e._binBE.nextZero,readUshort:function(e,t){return e[t+1]<<8|e[t]},readShort:function(t,n){var r=e._binBE.ui8;return r[0]=t[n+0],r[1]=t[n+1],e._binBE.i16[0]},readInt:function(t,n){var r=e._binBE.ui8;return r[0]=t[n+0],r[1]=t[n+1],r[2]=t[n+2],r[3]=t[n+3],e._binBE.i32[0]},readUint:function(t,n){var r=e._binBE.ui8;return r[0]=t[n+0],r[1]=t[n+1],r[2]=t[n+2],r[3]=t[n+3],e._binBE.ui32[0]},readASCII:e._binBE.readASCII,readFloat:function(t,n){for(var r=e._binBE.ui8,i=0;i<4;i++)r[i]=t[n+i];return e._binBE.fl32[0]},readDouble:function(t,n){for(var r=e._binBE.ui8,i=0;i<8;i++)r[i]=t[n+i];return e._binBE.fl64[0]}},e._copyTile=function(e,t,n,r,i,a,o,s){for(var c=Math.min(t,i-o),l=Math.min(n,a-s),u=0;u<l;u++)for(var d=(s+u)*i+o,f=u*t,p=0;p<c;p++)r[d+p]=e[f+p]},e.LosslessJpegDecode=function(){function e(e){this.w=e,this.N=0,this._=0,this.G=0}e.prototype={t:function(e){this.N=Math.max(0,Math.min(this.w.length,e))},i:function(){return this.w[this.N++]},l:function(){var e=this.N;return this.N+=2,this.w[e]<<8|this.w[e+1]},J:function(){return this._==0&&(this.G=this.w[this.N],this.N+=1+(this.G+1>>>8),this._=8),this.G>>>--this._&1},Z:function(e){var t=this._,n=this.G,r=Math.min(t,e);e-=r,t-=r;for(var i=n>>>t&(1<<r)-1;e>0;)n=this.w[this.N],this.N+=1+(n+1>>>8),r=Math.min(8,e),e-=r,t=8-r,i<<=r,i|=n>>>t&(1<<r)-1;return this._=t,this.G=n,i}};var t={};t.X=function(){return[0,0,-1]},t.s=function(e,n,r){e[t.Y(e,0,r)+2]=n},t.Y=function(e,n,r){if(e[n+2]!=-1)return 0;if(r==0)return n;for(var i=0;i<2;i++){e[n+i]==0&&(e[n+i]=e.length,e.push(0),e.push(0),e.push(-1));var a=t.Y(e,e[n+i],r-1);if(a!=0)return a}return 0},t.B=function(e,t){for(var n=0,r=0,i=0,a=t._,o=t.G,s=t.N;;)if(a==0&&(o=t.w[s],s+=1+(o+1>>>8),a=8),i=o>>>--a&1,n=e[n+i],r=e[n+2],r!=-1)return t._=a,t.G=o,t.N=s,r;return-1};function n(t){this.z=new e(t),this.D(this.z)}n.prototype={$:function(e,t){this.Q=e.i(),this.F=e.l(),this.o=e.l();var n=this.O=e.i();this.L=[];for(var r=0;r<n;r++){var i=e.i();e.i(),e.i(),this.L[i]=r}e.t(e.N+t-(6+n*3))},e:function(){var e=0,n=this.z.i();this.H??={};for(var r=this.H[n]=t.X(),i=[],a=0;a<16;a++)i[a]=this.z.i(),e+=i[a];for(var a=0;a<16;a++)for(var o=0;o<i[a];o++)t.s(r,this.z.i(),a+1);return e+17},W:function(e){for(;e>0;)e-=this.e()},p:function(e,t){var n=e.i();this.U||=[];for(var r=0;r<n;r++){var i=e.i(),a=e.i();this.U[this.L[i]]=this.H[a>>>4]}this.g=e.i(),e.t(e.N+t-(2+n*2))},D:function(e){var t=!1,r=e.l();if(r===n.q)do{var r=e.l(),i=e.l()-2;switch(r){case n.m:this.$(e,i);break;case n.K:this.W(i);break;case n.V:this.p(e,i),t=!0;break;default:e.t(e.N+i)}}while(!t)},I:function(e,n){var r=t.B(n,e);if(r==16)return-32768;var i=e.Z(r);return i&1<<r-1||(i-=(1<<r)-1),i},B:function(e,t){for(var n=this.z,r=this.O,i=this.F,a=this.I,o=this.g,s=this.o*r,c=this.U,l=0;l<r;l++)e[l]=a(n,c[l])+(1<<this.Q-1);for(var u=r;u<s;u+=r)for(var l=0;l<r;l++)e[u+l]=a(n,c[l])+e[u+l-r];for(var d=t,f=1;f<i;f++){for(var l=0;l<r;l++)e[d+l]=a(n,c[l])+e[d+l-t];for(var u=r;u<s;u+=r)for(var l=0;l<r;l++){var p=d+u+l,m=e[p-r];o==6&&(m=e[p-t]+(m-e[p-r-t]>>>1)),e[p]=m+a(n,c[l])}d+=t}}},n.m=65475,n.K=65476,n.q=65496,n.V=65498;function r(e){var t=new n(e),r=new(t.Q>8?Uint16Array:Uint8Array)(t.o*t.F*t.O),i=t.o*t.O;return t.B(r,i),r}return r}()})(t,r)})()}));export default v();
@@ -0,0 +1 @@
1
+ import{n as e}from"./rolldown-runtime-BKuNeK48.js";import{UserAvatar as t}from"@fudanda/elements-antd";function n(){return(n=e((()=>{})))()}export{n,t};
@@ -0,0 +1 @@
1
+ import{n as e}from"./rolldown-runtime-BKuNeK48.js";import{t}from"./typography-DKK_iHcj.js";import{C as n}from"./ui-BFsHoY7a.js";import{jsx as r}from"react/jsx-runtime";import{formatUserLabel as i}from"@fudanda/react-core/utils/user-labels";function a({username:e,nickname:n}){return e?/* @__PURE__ */ r(t.Text,{ellipsis:{showTooltip:!0},style:{maxWidth:`100%`},children:i(e,n)}):/* @__PURE__ */ r(`span`,{style:{color:`var(--arc-antd-color-text-2)`},children:`-`})}function o(){return(o=e((()=>{n()})))()}export{o as n,a as t};
@@ -0,0 +1 @@
1
+ import{n as e}from"./rolldown-runtime-BKuNeK48.js";import{o as t}from"./controls-C5dPckUT.js";import{t as n}from"./typography-DKK_iHcj.js";import{i as r,r as ee}from"./feedback-BnjMKZpz.js";import{_ as i,g as a,i as te,l as o,n as s,o as c,r as ne,s as re,t as ie}from"./ConfigurableTable-DzmZDd8F.js";import{r as ae,s as l,t as oe}from"./toolbar-controls-CThS0xuP.js";import{n as u,t as d}from"./refresh-cw-Dz8O9-Hp.js";import{n as f,t as se}from"./users-BXZLb4TY.js";import{t as p}from"./form-CQutQFiD.js";import{C as m,_ as h,a as g,d as ce,g as _,r as le,y as v}from"./ui-BFsHoY7a.js";import{n as ue,t as y}from"./useStatusToggle-B2qZaoc-.js";import{r as b,t as de}from"./deleteAction-CCocr5uV.js";import{n as fe,t as x}from"./useCrudOperationColumn-D935tixd.js";import{n as pe,t as S}from"./useRowSelection-4GOMFmjG.js";import{n as me,t as C}from"./useListPage-CbcOQG4m.js";import{a as w,i as he,n as ge,o as _e,r as T}from"./EditFormModal-DNHOZHxM.js";import{n as E,t as ve}from"./AppModal-DJzQA6FR.js";import{n as D,r as ye,t as be}from"./MemberAssignmentSheet-Czbt6_zv.js";import{useEffect as O,useMemo as k,useState as A}from"react";import{Fragment as j,jsx as M,jsxs as N}from"react/jsx-runtime";import{useDictItems as xe}from"@fudanda/react-core/hooks/useDictItems";import{userGroupContract as P}from"@fudanda/react-core/lib/native-operations";import{usePermission as Se}from"@fudanda/react-core/hooks/usePermission";import{useAllUsers as Ce}from"@fudanda/react-core/hooks/queries/users";import{departmentsToTreeData as we,useFlatDepartments as Te}from"@fudanda/react-core/hooks/queries/departments";import{useAllPositions as Ee}from"@fudanda/react-core/hooks/queries/positions";import{useAllRoles as De}from"@fudanda/react-core/hooks/queries/roles";import{useAssignUserGroupMembers as Oe,useAssignUserGroupRoles as ke,useDeleteUserGroups as Ae,useSaveUserGroup as F,useSyncUserGroup as je,useUserGroupDetail as Me,useUserGroupList as Ne,useUserGroupMembers as Pe,useUserGroupRoles as Fe,useUserGroupRulePreview as Ie}from"@fudanda/react-core/hooks/queries/user-groups";function I(){let{options:e}=xe(`common_status`),{hasPermission:i}=Se(),{selectedRowKeys:s,clear:c,rowSelection:l}=pe(),u=me({contract:P,useList:Ne,table:{empty:`暂无数据`,rowSelection:l}}),{tableProps:f}=u,m=Ce(),y=Te(),b=(m.data??[]).map(e=>({id:e.id,username:e.username,nickname:e.nickname,avatar:e.avatar,email:e.email,departmentId:e.departmentId,departmentName:e.departmentName})),x=k(()=>y.data??[],[y.data]),[S,C]=A(!1),[w,T]=A(null),[E,D]=A([]),I=Pe(w?.id,S),[L,R]=A(null),[z,B]=A(!1),[V,H]=A(null),[U,W]=A([]),G=Fe(V?.id,z),K=De(),Le=F(),q=Ie(),J=je(),Re=Ee(),Y=_e({entityName:`用户组`,save:he(Le,{create:P.create.input.shape.body,update:P.update.input.shape.body}),useDetail:Me,defaults:{status:`enabled`,memberMode:`static`,roleIds:[],userIds:[]},labelPosition:`top`,toValues:e=>({name:e.name,code:e.code,description:e.description??void 0,ownerId:e.ownerId??void 0,status:e.status,memberMode:e.memberMode??`static`,memberRule:e.memberRule??void 0,roleIds:e.rolePreview?.map(e=>e.id)??[]}),beforeSave:(e,{editing:t})=>({...e,description:e.description||void 0,ownerId:e.ownerId??void 0,memberRule:e.memberMode===`dynamic`?e.memberRule??void 0:void 0,...t?{clearFields:[...e.description?[]:[`description`],...e.ownerId==null?[`ownerId`]:[],...e.memberMode!==`dynamic`||!e.memberRule?[`memberRule`]:[]]}:{}})}),ze=F(),X=Ae(),Z=Oe(),Q=ke(),Be=ue({toggle:(e,t)=>ze.mutateAsync({id:e.id,values:{status:t?`enabled`:`disabled`}}),confirmDisable:e=>({danger:!0,title:`确认禁用用户组「${e.name}」?`,content:`禁用后该用户组将不可选择。`,okText:`确认禁用`}),disabled:!i(`system:user-groups:update`)}),Ve=k(()=>we(x,{keepEmptyChildren:!0}),[x]);O(()=>{S&&D((I.data??[]).map(e=>e.id))},[S,I.data]),O(()=>{z&&W((G.data??[]).map(e=>e.id))},[z,G.data]),O(()=>{Y.modalProps.visible||R(null)},[Y.modalProps.visible]);let He=()=>{s.length&&de({title:`确认删除选中的 ${s.length} 个用户组?`,content:`删除后无法恢复,请确认操作`,run:()=>X.mutateAsync(s),onDeleted:c})},Ue=e=>{T(e),C(!0)},$=e=>{H(e),B(!0)},We=async()=>{V&&(await Q.mutateAsync({params:{id:V.id},body:{roleIds:U}}),r.success(`角色已更新,组内成员即时生效`),B(!1),H(null))},Ge=async()=>{w&&(await Z.mutateAsync({params:{id:w.id},body:{userIds:E}}),C(!1))},Ke=fe({permission:`system:user-groups`,edit:e=>{Y.openEdit(e)},remove:X,title:`确定要删除该用户组吗?`,extra:e=>[{key:`members`,label:`成员`,hidden:!i(`system:user-groups:assign`),onClick:()=>{Ue(e)}},{key:`roles`,label:`角色`,hidden:!i(`system:user-groups:assign`),onClick:()=>{$(e)}},{key:`sync`,label:`同步`,hidden:e.memberMode!==`dynamic`||!i(`system:user-groups:assign`),onClick:()=>{J.mutate({params:{id:e.id}},{onSuccess:()=>r.success(`成员已按规则同步`)})}}],width:240,desktopInlineKeys:[`members`,`roles`,`edit`]}),qe=[{title:`用户组名称`,dataIndex:`name`,width:200,render:o},{title:`编码`,dataIndex:`code`,width:180,render:o},{title:`描述`,dataIndex:`description`,render:o},{title:`负责人`,dataIndex:`ownerName`,width:120,render:e=>e||ne},{title:`成员模式`,dataIndex:`memberMode`,width:110,render:(e,t)=>e===`dynamic`?/* @__PURE__ */ N(v,{color:`teal`,children:[`动态`,t.ruleSyncedAt?``:`(未同步)`]}):/* @__PURE__ */ M(v,{color:`grey`,children:`静态`})},ye({dataIndex:`memberPreview`,width:150,getPreview:e=>e.memberPreview,getCount:e=>e.memberCount,getScope:e=>({type:`userGroup`,id:e.id,name:e.name})}),re({title:`角色`,dataIndex:`rolePreview`,width:260,contentWidth:228,getItems:e=>(e??[]).map(e=>({key:String(e.id),label:e.name})),tagColor:`blue`,popoverWidth:240,empty:/* @__PURE__ */ M(v,{color:`grey`,children:`无角色`}),onClick:i(`system:user-groups:assign`)?$:void 0}),te,Be.column(),Ke];return/* @__PURE__ */ N(`div`,{className:`page-container`,children:[/* @__PURE__ */ M(ie,{searchConfig:a({page:u,filters:[`keyword`,`status`],create:/* @__PURE__ */ M(ae,{permission:`system:user-groups:create`,onClick:Y.openCreate}),actions:s.length>0&&i(`system:user-groups:delete`)&&/* @__PURE__ */ M(oe,{count:s.length,onClick:He}),filterTitle:`用户组筛选`,actionTitle:`用户组操作`}),columns:qe,...f}),/* @__PURE__ */ M(ge,{modal:Y,width:520,okText:`确定`,children:({formState:t})=>{let r=t.values.memberMode??`static`;return/* @__PURE__ */ N(j,{children:[/* @__PURE__ */ M(p.Input,{field:`name`,label:`名称`,placeholder:`请输入用户组名称`,rules:[{required:!0,message:`请输入用户组名称`}]}),/* @__PURE__ */ M(p.Input,{field:`code`,label:`编码`,placeholder:`字母数字下划线`,rules:[{required:!0,message:`请输入用户组编码`},{pattern:/^\w+$/,message:`编码只能包含字母、数字和下划线`}]}),/* @__PURE__ */ M(p.Select,{field:`ownerId`,label:`负责人`,placeholder:`请选择负责人(可选)`,style:{width:`100%`},filter:!0,showClear:!0,optionList:b.map(e=>({value:e.id,label:`${e.nickname} (${e.username})`}))}),/* @__PURE__ */ M(p.Select,{field:`status`,label:`状态`,style:{width:`100%`},optionList:e}),/* @__PURE__ */ M(p.Select,{field:`roleIds`,label:`角色`,placeholder:`请选择角色(可选)`,style:{width:`100%`},multiple:!0,filter:!0,showClear:!0,optionList:(K.data??[]).map(e=>({value:e.id,label:`${e.name}(${e.code})`}))}),!Y.editing&&r===`static`&&/* @__PURE__ */ M(p.Select,{field:`userIds`,label:`成员`,placeholder:`请选择成员(可选)`,style:{width:`100%`},multiple:!0,filter:!0,showClear:!0,optionList:b.map(e=>({value:e.id,label:`${e.nickname}(${e.username})`}))}),/* @__PURE__ */ N(p.RadioGroup,{field:`memberMode`,label:`成员模式`,type:`button`,extraText:r===`dynamic`?`成员由规则自动维护:用户的部门/岗位/状态变化后自动加入或退出,不可手工增删`:`成员由管理员手工维护`,children:[/* @__PURE__ */ M(p.Radio,{value:`static`,children:`静态(手工维护)`}),/* @__PURE__ */ M(p.Radio,{value:`dynamic`,children:`动态(按规则自动维护)`})]}),r===`dynamic`&&/* @__PURE__ */ N(`div`,{style:{border:`1px solid var(--arc-antd-color-border)`,borderRadius:`var(--arc-antd-border-radius-medium)`,padding:`4px 16px 16px`,margin:`12px 0`},children:[/* @__PURE__ */ M(p.TreeSelect,{field:`memberRule.departmentIds`,label:`命中部门`,placeholder:`选择部门(可多选)`,style:{width:`100%`},multiple:!0,filterTreeNode:!0,showClear:!0,leafOnly:!1,treeData:Ve}),/* @__PURE__ */ M(p.Switch,{field:`memberRule.includeSubDepartments`,label:`包含子部门`,checkedText:`是`,uncheckedText:`否`}),/* @__PURE__ */ M(p.Select,{field:`memberRule.positionIds`,label:`命中岗位`,placeholder:`选择岗位(可多选)`,extraText:`多个岗位满足任一即可;与部门条件同时设置时须同时满足`,style:{width:`100%`},multiple:!0,filter:!0,showClear:!0,optionList:(Re.data??[]).map(e=>({value:e.id,label:e.name}))}),/* @__PURE__ */ M(p.Select,{field:`memberRule.includeUserIds`,label:`强制包含`,placeholder:`选择用户(可选)`,extraText:`规则之外的例外成员`,style:{width:`100%`},multiple:!0,filter:!0,showClear:!0,optionList:b.map(e=>({value:e.id,label:`${e.nickname} (${e.username})`}))}),/* @__PURE__ */ M(p.Select,{field:`memberRule.excludeUserIds`,label:`强制排除`,placeholder:`选择用户(可选)`,extraText:`优先级最高,命中规则也不会加入`,style:{width:`100%`},multiple:!0,filter:!0,showClear:!0,optionList:b.map(e=>({value:e.id,label:`${e.nickname} (${e.username})`}))}),/* @__PURE__ */ N(_,{vertical:!0,align:`start`,spacing:8,style:{width:`100%`,marginTop:12},children:[/* @__PURE__ */ M(g,{theme:`light`,loading:q.isPending,onClick:()=>{let e=t.values.memberRule??{};q.mutate({body:{groupId:Y.editing?.id,memberRule:e}},{onSuccess:R})},children:`预览成员变化`}),L&&/* @__PURE__ */ N(`div`,{style:{fontSize:12,lineHeight:`20px`,width:`100%`},children:[/* @__PURE__ */ N(n.Text,{type:`secondary`,children:[`目标成员 `,L.total,` 人:新加入 `,L.joiningCount,` 人,移除 `,L.leavingCount,` 人`]}),L.joining.length>0&&/* @__PURE__ */ N(`div`,{style:{marginTop:4},children:[/* @__PURE__ */ M(n.Text,{type:`success`,children:`加入:`}),/* @__PURE__ */ N(_,{wrap:!0,spacing:4,children:[L.joining.map(e=>/* @__PURE__ */ M(v,{size:`small`,color:`green`,children:e.nickname},e.id)),L.joiningCount>L.joining.length&&/* @__PURE__ */ N(v,{size:`small`,children:[`+`,L.joiningCount-L.joining.length]})]})]}),L.leaving.length>0&&/* @__PURE__ */ N(`div`,{style:{marginTop:4},children:[/* @__PURE__ */ M(n.Text,{type:`danger`,children:`移除:`}),/* @__PURE__ */ N(_,{wrap:!0,spacing:4,children:[L.leaving.map(e=>/* @__PURE__ */ M(v,{size:`small`,color:`red`,children:e.nickname},e.id)),L.leavingCount>L.leaving.length&&/* @__PURE__ */ N(v,{size:`small`,children:[`+`,L.leavingCount-L.leaving.length]})]})]})]})]})]}),/* @__PURE__ */ M(p.TextArea,{field:`description`,label:`描述`,placeholder:`请输入描述(可选)`,maxCount:256})]})}}),w?.memberMode===`dynamic`?/* @__PURE__ */ M(ee,{title:/* @__PURE__ */ N(_,{children:[/* @__PURE__ */ M(se,{size:16}),/* @__PURE__ */ N(`span`,{children:[`成员管理 - `,w?.name]}),/* @__PURE__ */ M(v,{color:`teal`,size:`small`,children:`动态`})]}),visible:S,onCancel:()=>C(!1),width:720,footer:/* @__PURE__ */ N(`div`,{style:{display:`flex`,justifyContent:`flex-end`,gap:8},children:[/* @__PURE__ */ M(g,{onClick:()=>C(!1),children:`关闭`}),i(`system:user-groups:assign`)&&/* @__PURE__ */ M(g,{type:`primary`,icon:/* @__PURE__ */ M(d,{size:14}),loading:J.isPending,onClick:()=>{w&&J.mutate({params:{id:w.id}},{onSuccess:()=>r.success(`成员已按规则同步`)})},children:`立即同步`})]}),children:/* @__PURE__ */ N(_,{vertical:!0,align:`start`,spacing:12,style:{width:`100%`},children:[/* @__PURE__ */ M(le,{fullMode:!1,type:`info`,closeIcon:null,description:`成员由规则自动维护,不可手工增删;需要例外时请在编辑规则中使用强制包含/排除名单。${w.ruleSyncedAt?`最近同步:`+w.ruleSyncedAt:`尚未同步`}`,style:{width:`100%`}}),/* @__PURE__ */ M(h,{spinning:I.isFetching,style:{width:`100%`},children:(I.data??[]).length===0?/* @__PURE__ */ M(ce,{title:`暂无成员`,description:`当前没有用户命中该组规则`,style:{padding:`32px 0`}}):/* @__PURE__ */ M(_,{wrap:!0,spacing:6,children:(I.data??[]).map(e=>/* @__PURE__ */ N(v,{size:`large`,children:[e.nickname,`(`,e.username,`)`]},e.id))})})]})}):/* @__PURE__ */ M(be,{title:`成员管理 - ${w?.name??``}`,visible:S,onCancel:()=>C(!1),users:b,value:E,onChange:D,departments:x,canSave:I.isSuccess,saveLoading:Z.isPending,onSave:Ge}),/* @__PURE__ */ M(ve,{title:`分配角色 — ${V?.name??``}`,visible:z,onCancel:()=>{B(!1),H(null)},onOk:We,okButtonProps:{disabled:!G.isSuccess},confirmLoading:Q.isPending,width:480,children:/* @__PURE__ */ N(h,{spinning:G.isFetching||K.isFetching,children:[/* @__PURE__ */ M(`div`,{style:{marginBottom:8,fontSize:12,color:`var(--arc-antd-color-text-2)`},children:`组内成员将自动继承所选角色的菜单与数据权限(与成员直接分配的角色取并集)`}),/* @__PURE__ */ M(t,{multiple:!0,filter:!0,placeholder:`请选择角色`,style:{width:`100%`},value:U,onChange:e=>W(e??[]),optionList:(K.data??[]).map(e=>({value:e.id,label:`${e.name}(${e.code})`}))})]})})]})}function L(){return(L=e((()=>{m(),u(),f(),E(),s(),c(),w(),l(),b(),i(),S(),y(),x(),D(),C(),T()})))()}L();export{I as default};
@@ -0,0 +1,36 @@
1
+ import{n as e}from"./rolldown-runtime-BKuNeK48.js";import{i as t}from"./feedback-BnjMKZpz.js";import{n}from"./media-DoGe_p4O.js";import{v as r,y as i}from"./ConfigurableTable-DzmZDd8F.js";import{a,n as o,o as s,r as c,t as l}from"./search-filters-CRIhZ0gL.js";import{n as u,t as d}from"./createLucideIcon-BtwfYE6A.js";import{a as f,o as p,s as m}from"./toolbar-controls-CThS0xuP.js";import{n as h,t as g}from"./rotate-ccw-D2__Zisi.js";import{n as _,t as v}from"./rotate-cw-BSTVLlWY.js";import{C as y,a as b,g as x}from"./ui-BFsHoY7a.js";import{n as S,t as ee}from"./rendered-slot-YhfmcMJr.js";import{n as te,t as ne}from"./SearchToolbar-CvgYKUjr.js";import{n as re,t as ie}from"./AppModal-DJzQA6FR.js";import{n as ae,t as oe}from"./LoginLogsTable-DVmHnC6V.js";import{n as se,t as ce}from"./OperationLogsTable-COI-Lp-y.js";import{useEffect as le,useMemo as ue,useRef as C,useState as w}from"react";import{Fragment as T,jsx as E,jsxs as D}from"react/jsx-runtime";import{enumValueOf as O}from"@fudanda/shared/core";import{useRenderedSlot as de}from"@fudanda/react-core/hooks/useRenderedSlot";import{useFilterQuery as fe}from"@fudanda/react-core/hooks/useFilterQuery";import{useListSearch as k}from"@fudanda/react-core/hooks/useListSearch";import{formatDateTimeRangeForApi as A}from"@fudanda/react-core/utils/date";import{useAdminPaths as pe}from"@fudanda/react-core/admin/runtime";import{LOGIN_EVENT_TYPES as me,LOGIN_EVENT_TYPE_OPTIONS as he,LOGIN_STATUSES as ge,LOGIN_STATUS_OPTIONS as _e}from"@fudanda/shared/identity";import{profileKeys as j,useProfileLoginLogs as ve,useProfileOperationLogs as ye}from"@fudanda/react-core/hooks/queries/profile";import{operationLogKeys as be,useOperationLogList as xe}from"@fudanda/react-core/hooks/queries/operation-logs";import{loginLogKeys as Se,useLoginLogList as Ce}from"@fudanda/react-core/hooks/queries/login-logs";import{OPERATION_LOG_RESULTS as we,OPERATION_LOG_RESULT_OPTIONS as Te}from"@fudanda/shared/platform";var M,N;function P(){return(P=e((()=>{
2
+ /**
3
+ * @license lucide-react v1.53.0 - ISC
4
+ *
5
+ * This source code is licensed under the ISC license.
6
+ * See the LICENSE file in the root directory of this source tree.
7
+ */
8
+ u(),M={name:`camera`,size:24,node:[[`path`,{d:`M13.997 4a2 2 0 0 1 1.76 1.05l.486.9A2 2 0 0 0 18.003 7H20a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h1.997a2 2 0 0 0 1.759-1.048l.489-.904A2 2 0 0 1 10.004 4z`,key:`18u6gg`}],[`circle`,{cx:`12`,cy:`13`,r:`3`,key:`1vg3eu`}]]},M.node,N=d(M)})))()}var F,I;function L(){return(L=e((()=>{
9
+ /**
10
+ * @license lucide-react v1.53.0 - ISC
11
+ *
12
+ * This source code is licensed under the ISC license.
13
+ * See the LICENSE file in the root directory of this source tree.
14
+ */
15
+ u(),F={name:`circle-check-big`,size:24,node:[[`path`,{d:`M21.801 10A10 10 0 1 1 17 3.335`,key:`yps3ct`}],[`path`,{d:`m9 11 3 3L22 4`,key:`1pflzl`}]],aliases:[`check-circle`]},F.node,I=d(F)})))()}var R,z;function B(){return(B=e((()=>{
16
+ /**
17
+ * @license lucide-react v1.53.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
+ */
22
+ u(),R={name:`circle`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}]]},R.node,z=d(R)})))()}var V,H;function U(){return(U=e((()=>{
23
+ /**
24
+ * @license lucide-react v1.53.0 - ISC
25
+ *
26
+ * This source code is licensed under the ISC license.
27
+ * See the LICENSE file in the root directory of this source tree.
28
+ */
29
+ u(),V={name:`zoom-in`,size:24,node:[[`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`}]]},V.node,H=d(V)})))()}var W,G;function K(){return(K=e((()=>{
30
+ /**
31
+ * @license lucide-react v1.53.0 - ISC
32
+ *
33
+ * This source code is licensed under the ISC license.
34
+ * See the LICENSE file in the root directory of this source tree.
35
+ */
36
+ u(),W={name:`zoom-out`,size:24,node:[[`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`}]]},W.node,G=d(W)})))()}function q(e){let{create:t,actions:n,mobileActions:i,filterTitle:a,actionTitle:o,className:s}=e,c,l,u,d;if(e.page){let t=r({page:e.page,specs:e.filters,overrides:e.overrides});c=t.keyword.length?t.keyword:void 0,l=t.filters.length||e.extraFilters?/* @__PURE__ */ D(T,{children:[t.filters,e.extraFilters]}):void 0,{onSearch:u,onReset:d}=e.page.toolbarProps}else({keyword:c,filters:l,onSearch:u,onReset:d}=e);let m=de(),h=J(t)||J(n)?/* @__PURE__ */ D(T,{children:[t,/* @__PURE__ */ E(ee,{ref:m.probeRef,children:n})]}):void 0;return/* @__PURE__ */ E(ne,{className:s,primary:/* @__PURE__ */ D(T,{children:[c,l,/* @__PURE__ */ E(p,{onClick:u}),/* @__PURE__ */ E(f,{onClick:d})]}),actions:h,mobilePrimary:/* @__PURE__ */ D(T,{children:[c,/* @__PURE__ */ E(p,{onClick:u}),t]}),mobileFilters:J(l)?l:void 0,mobileActions:i??(m.rendered?n:!1),filterTitle:a,actionTitle:o,onFilterApply:u,onFilterReset:d})}var J;function Y(){return(Y=e((()=>{te(),m(),S(),i(),J=e=>!!e&&!(Array.isArray(e)&&e.length===0)})))()}function Ee(e){if(!Number.isFinite(e))return null;let t=Number((Math.round(e/Q)*Q).toFixed(2));return Math.min(Z,Math.max(X,t))}function De({file:e,confirmLoading:t,onCancel:r,onConfirm:i}){let a=C(null),o=C(``),[s,c]=w(``),[l,u]=w(0),[d,f]=w(1),p=e=>{o.current.startsWith(`blob:`)&&URL.revokeObjectURL(o.current),o.current=e,c(e)};le(()=>{if(u(0),f(1),!e)p(``);else return p(URL.createObjectURL(e)),()=>{p(``)}},[e]);function m(e){u(t=>((t+e)%360+360)%360)}function h(e){if(e===void 0)return;let t=Ee(typeof e==`number`?e:e[0]);t!==null&&f(t)}function _(e){f(t=>Ee(Number((t+e).toFixed(2)))??t)}function y(){let e=a.current?.getCropperCanvas();e&&e.toBlob(e=>{e&&i(e)},`image/jpeg`,.85)}return/* @__PURE__ */ D(ie,{title:`裁剪头像`,visible:e!==null,onCancel:r,footer:/* @__PURE__ */ D(x,{children:[/* @__PURE__ */ E(b,{onClick:r,children:`取消`}),/* @__PURE__ */ E(b,{type:`primary`,loading:t,onClick:y,children:`确认并上传`})]}),width:520,centered:!0,children:[/* @__PURE__ */ E(`div`,{style:{width:`100%`,height:380},children:s&&/* @__PURE__ */ E(n,{ref:a,src:s,shape:`round`,aspectRatio:1,showResizeBox:!0,rotate:l,zoom:d,minZoom:X,maxZoom:Z,zoomStep:Q,onZoomChange:h,style:{width:`100%`,height:`100%`}})}),/* @__PURE__ */ D(`div`,{style:{display:`flex`,justifyContent:`center`,gap:12,marginTop:12},children:[/* @__PURE__ */ E(b,{icon:/* @__PURE__ */ E(g,{size:14}),size:`small`,theme:`borderless`,onClick:()=>m(-90),children:`向左旋转`}),/* @__PURE__ */ E(b,{icon:/* @__PURE__ */ E(v,{size:14}),size:`small`,theme:`borderless`,onClick:()=>m(90),children:`向右旋转`})]}),/* @__PURE__ */ D(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`center`,gap:12,marginTop:8},children:[/* @__PURE__ */ E(b,{icon:/* @__PURE__ */ E(G,{size:14}),size:`small`,theme:`borderless`,"aria-label":`缩小`,disabled:d<=X,onClick:()=>_(-.1),children:`缩小`}),/* @__PURE__ */ D(`span`,{style:{fontSize:12,color:`var(--arc-antd-color-text-2)`,minWidth:44,textAlign:`center`},children:[d.toFixed(1),`x`]}),/* @__PURE__ */ E(b,{icon:/* @__PURE__ */ E(H,{size:14}),size:`small`,theme:`borderless`,"aria-label":`放大`,disabled:d>=Z,onClick:()=>_(Q),children:`放大`})]})]})}var X,Z,Q;function Oe(){return(Oe=e((()=>{y(),h(),_(),U(),K(),re(),X=.1,Z=3,Q=.1})))()}function ke({onUploaded:e,uploadBlob:n,maxSizeMB:r=2}){let i=C(null),[a,o]=w(null),[s,c]=w(!1);function l(e){let n=e.target.files?.[0];n&&(e.target.value=``,n.type.startsWith(`image/`)?n.size>r*1024*1024?t.warning(`图片不能超过 ${r}MB`):o(n):t.warning(`请选择图片文件`))}async function u(r){let i;c(!0);try{i=await n(r)}catch(e){t.error(e instanceof Error&&e.message?e.message:`上传失败`);return}finally{c(!1)}await e(i)!==!1&&o(null)}return{cropFile:a,uploading:s,openFilePicker:()=>i.current?.click(),fileInputProps:{ref:i,type:`file`,accept:`image/*`,style:{display:`none`},onChange:l},cropperProps:{file:a,onCancel:()=>o(null),onConfirm:e=>{u(e)}}}}function Ae(){return(Ae=e((()=>{y()})))()}function je({visible:e,currentAvatar:t,confirmLoading:n,uploadBlob:r,onCancel:i,onSelect:a,onRemove:o}){let{assetBasePath:s}=pe(),c=Array.from({length:12},(e,t)=>`${s}avatars/avatar-${String(t+1).padStart(2,`0`)}.svg`),l=ke({uploadBlob:r,onUploaded:e=>{a(e)}}),u=l.uploading||(n??!1);return/* @__PURE__ */ D(T,{children:[/* @__PURE__ */ D(ie,{title:`更换头像`,visible:e,onCancel:i,footer:null,width:480,centered:!0,children:[/* @__PURE__ */ D(`div`,{style:{marginBottom:16},children:[/* @__PURE__ */ E(`div`,{style:{fontSize:13,color:`var(--arc-antd-color-text-2)`,marginBottom:12},children:`预设头像`}),/* @__PURE__ */ E(`div`,{className:`auto-grid`,style:{"--auto-grid-min":`80px`,"--auto-grid-cols":4,"--auto-grid-gap":`12px`},children:c.map(e=>/* @__PURE__ */ E(`button`,{type:`button`,onClick:()=>a(e),style:{border:t===e?`2px solid var(--arc-antd-color-primary)`:`2px solid transparent`,borderRadius:`var(--arc-antd-border-radius-medium)`,padding:4,cursor:`pointer`,background:`var(--arc-antd-color-fill-0)`,display:`flex`,alignItems:`center`,justifyContent:`center`,transition:`border-color 0.2s`},onMouseEnter:n=>{t!==e&&(n.currentTarget.style.borderColor=`var(--arc-antd-color-primary-light-hover)`)},onMouseLeave:n=>{t!==e&&(n.currentTarget.style.borderColor=`transparent`)},children:/* @__PURE__ */ E(`img`,{src:e,alt:`预设头像`,width:72,height:72,style:{borderRadius:`var(--arc-antd-border-radius-small)`,display:`block`},loading:`lazy`})},e))})]}),/* @__PURE__ */ D(`div`,{style:{borderTop:`1px solid var(--arc-antd-color-border)`,paddingTop:16},children:[/* @__PURE__ */ E(`div`,{style:{fontSize:13,color:`var(--arc-antd-color-text-2)`,marginBottom:8},children:`本地上传(≤ 2MB,上传后可裁剪、旋转、缩放)`}),/* @__PURE__ */ D(`div`,{style:{display:`flex`,gap:8},children:[/* @__PURE__ */ E(b,{icon:/* @__PURE__ */ E(N,{size:14}),loading:l.uploading,onClick:l.openFilePicker,children:`选择图片`}),t&&o&&/* @__PURE__ */ E(b,{theme:`borderless`,type:`danger`,onClick:o,children:`移除头像`})]}),/* @__PURE__ */ E(`input`,{...l.fileInputProps})]})]}),/* @__PURE__ */ E(De,{...l.cropperProps,confirmLoading:u})]})}function $(){return($=e((()=>{y(),P(),re(),Oe(),Ae()})))()}function Me(e){if(!e)return 0;if(e.length<6)return 1;let t=0;return/[a-z]/.test(e)&&t++,/[A-Z]/.test(e)&&t++,/\d/.test(e)&&t++,/[^a-zA-Z0-9]/.test(e)&&t++,e.length>=10&&t++,t<=1?1:t===2?2:t===3?3:4}function Ne({password:e,policy:t}){let n=ue(()=>Me(e),[e]);if(!e)return null;let{label:r,color:i}=Pe[n],a=t?[...t.requireUppercase?[{label:`含大写字母`,ok:/[A-Z]/.test(e)}]:[],...t.requireSpecialChar?[{label:`含特殊字符`,ok:/[^a-zA-Z0-9]/.test(e)}]:[]]:null,o=t?e.length>=t.minLength:null,s=t?`至少 ${t.minLength} 位`:null;return/* @__PURE__ */ D(`div`,{style:{padding:`4px 0`},children:[/* @__PURE__ */ D(`div`,{style:{display:`flex`,alignItems:`center`,gap:8},children:[/* @__PURE__ */ E(`div`,{style:{display:`flex`,gap:3,flex:1},children:[1,2,3,4].map(e=>/* @__PURE__ */ E(`div`,{style:{flex:1,height:4,borderRadius:`var(--arc-antd-border-radius-small)`,background:e<=n?i:`var(--arc-antd-color-fill-2)`,transition:`background 0.25s ease`}},e))}),/* @__PURE__ */ E(`span`,{style:{fontSize:12,fontWeight:600,color:i,minWidth:28,textAlign:`right`},children:r}),s!==null&&/* @__PURE__ */ D(`div`,{style:{display:`flex`,alignItems:`center`,gap:3,flexShrink:0},children:[o?/* @__PURE__ */ E(I,{size:11,style:{flexShrink:0,color:`var(--arc-antd-color-success)`}}):/* @__PURE__ */ E(z,{size:11,style:{flexShrink:0,color:`var(--arc-antd-color-text-3)`}}),/* @__PURE__ */ E(`span`,{style:{fontSize:12,color:o?`var(--arc-antd-color-success)`:`var(--arc-antd-color-text-3)`,transition:`color 0.2s`},children:s})]})]}),a&&a.length>0&&/* @__PURE__ */ E(`div`,{style:{display:`flex`,flexWrap:`wrap`,gap:`3px 14px`,marginTop:5},children:a.map(({label:e,ok:t})=>/* @__PURE__ */ D(`div`,{style:{display:`flex`,alignItems:`center`,gap:4,fontSize:12,color:t?`var(--arc-antd-color-success)`:`var(--arc-antd-color-text-3)`,transition:`color 0.2s`},children:[E(t?I:z,{size:11,style:{flexShrink:0}}),/* @__PURE__ */ E(`span`,{children:e})]},e))})]})}var Pe;function Fe(){return(Fe=e((()=>{L(),B(),Pe={0:{label:``,color:`transparent`},1:{label:`弱`,color:`var(--arc-antd-color-danger)`},2:{label:`一般`,color:`var(--arc-antd-color-warning)`},3:{label:`良好`,color:`var(--arc-antd-color-info)`},4:{label:`强`,color:`var(--arc-antd-color-success)`}}})))()}function Ie(e,t,n){let r=n.kind===`user`?n.userId:void 0;return ue(()=>({listKey:r===void 0?e:[...t,`user`,r],extraKeys:r===void 0?void 0:[t]}),[e,t,r])}function Le({scope:e,enabled:t=!0,columnSettingsKey:n}){let r=e.kind===`self`,{listKey:i,extraKeys:s}=Ie(j.loginLogs,Se.lists,e),{page:c,pageSize:u,buildPagination:d,bind:f,submittedParams:p,handleSearch:m,handleReset:h}=k({defaults:{eventType:void 0,status:void 0,timeRange:null},listKey:i,extraKeys:s}),g={page:c,pageSize:u,...fe({eventType:O(me,p.eventType),status:O(ge,p.status),...A(p.timeRange)})},_=ve(g,t&&r),v=Ce({...g,userId:e.kind===`user`?e.userId:void 0},t&&!r),y=r?_:v,b=y.data?.list??[],x=y.data?.total??0;return/* @__PURE__ */ D(T,{children:[/* @__PURE__ */ E(q,{filters:/* @__PURE__ */ D(T,{children:[/* @__PURE__ */ E(o,{placeholder:`全部事件`,items:he,...f(`eventType`)}),/* @__PURE__ */ E(a,{items:_e,...f(`status`)}),/* @__PURE__ */ E(l,{...f(`timeRange`)})]}),onSearch:m,onReset:h,filterTitle:`登录记录筛选`}),/* @__PURE__ */ E(oe,{loading:y.isFetching,dataSource:b,onRefresh:()=>void y.refetch(),columnSettingsKey:n,pagination:d(x)})]})}function Re({scope:e,enabled:t=!0,columnSettingsKey:n}){let r=e.kind===`self`,{listKey:i,extraKeys:s}=Ie(j.operationLogs,be.lists,e),{page:u,pageSize:d,buildPagination:f,bind:p,bindKeyword:m,submittedParams:h,handleSearch:g,handleReset:_}=k({defaults:{module:``,description:``,method:void 0,path:``,ip:``,status:void 0,content:``,impersonated:void 0,timeRange:null},listKey:i,extraKeys:s}),v={page:u,pageSize:d,...fe({module:h.module,description:h.description,method:h.method,path:h.path,ip:h.ip,status:O(we,h.status),content:h.content,impersonated:h.impersonated===`true`||h.impersonated!==`false`&&void 0,...A(h.timeRange)})},y=ye(v,t&&r),b=xe({...v,userId:e.kind===`user`?e.userId:void 0},t&&!r),x=r?y:b,S=x.data?.list??[],ee=x.data?.total??0;return/* @__PURE__ */ D(T,{children:[/* @__PURE__ */ E(q,{filters:/* @__PURE__ */ D(T,{children:[/* @__PURE__ */ E(c,{placeholder:`请输入功能模块`,...m(`module`),width:160}),/* @__PURE__ */ E(c,{placeholder:`请输入操作描述`,...m(`description`),width:160}),/* @__PURE__ */ E(o,{placeholder:`全部请求方法`,items:ze,...p(`method`),width:140}),/* @__PURE__ */ E(c,{placeholder:`请输入请求路径`,...m(`path`),width:180}),/* @__PURE__ */ E(c,{placeholder:`请输入 IP 地址`,...m(`ip`),width:160}),/* @__PURE__ */ E(c,{placeholder:`请求/变更内容包含…`,...m(`content`),width:180}),/* @__PURE__ */ E(a,{items:Te,...p(`status`)}),/* @__PURE__ */ E(o,{placeholder:`全部操作来源`,items:Be,...p(`impersonated`),width:140}),/* @__PURE__ */ E(l,{...p(`timeRange`)})]}),onSearch:g,onReset:_,filterTitle:`操作记录筛选`}),/* @__PURE__ */ E(ce,{loading:x.isFetching,dataSource:S,onRefresh:()=>void x.refetch(),columnSettingsKey:n,pagination:f(ee)})]})}var ze,Be;function Ve(){return(Ve=e((()=>{s(),Y(),ae(),se(),ze=[`GET`,`POST`,`PUT`,`PATCH`,`DELETE`].map(e=>({value:e,label:e})),Be=[{value:`true`,label:`仅模拟操作`},{value:`false`,label:`仅本人操作`}]})))()}export{Fe as a,I as c,Ne as i,L as l,Re as n,je as o,Ve as r,$ as s,Le as t};
@@ -0,0 +1,22 @@
1
+ import{n as e,t}from"./rolldown-runtime-BKuNeK48.js";import{a as n,i as r,t as i}from"./controls-C5dPckUT.js";import{t as a}from"./typography-DKK_iHcj.js";import{n as o}from"./feedback-BnjMKZpz.js";import{d as s,p as c}from"./ConfigurableTable-DzmZDd8F.js";import{o as l,r as u}from"./search-filters-CRIhZ0gL.js";import{n as d,t as f}from"./x-Ak9hw1R9.js";import{n as p}from"./list-0CbyOlT9.js";import{C as m,d as h,g,n as _,t as v,y}from"./ui-BFsHoY7a.js";import{n as b,t as x}from"./UserAvatar-B8CFnTCn.js";import{t as S}from"./builtin_esm-external-require-react-BsBndGeN.js";import{createContext as ee,useCallback as C,useContext as te,useEffect as w,useMemo as T,useState as E}from"react";import{Fragment as ne,jsx as D,jsxs as O}from"react/jsx-runtime";import{usePagination as re}from"@fudanda/react-core/hooks/usePagination";import{textMatches as k}from"@fudanda/react-core/utils/pinyin";import{usePinyinReady as ie}from"@fudanda/react-core/hooks/usePinyinReady";import{useScopeMembers as ae}from"@fudanda/react-core/hooks/queries/scope-members";function oe(){return te(A)?.defaultOptions??{}}var A;function se(){return(se=e((()=>{A=ee(null)})))()}function ce(e){return typeof e==`function`}function le(e,...t){return ce(e)?e(...t):e}/* @__NO_SIDE_EFFECTS__ */
2
+ function ue({update:e,notify:t,unwatched:n}){return{link:r,unlink:i,propagate:a,checkDirty:o,shallowPropagate:s};function r(e,t,n){let r=t.depsTail;if(r!==void 0&&r.dep===e)return;let i=r===void 0?t.deps:r.nextDep;if(i!==void 0&&i.dep===e){i.version=n,t.depsTail=i;return}let a=e.subsTail;if(a!==void 0&&a.version===n&&a.sub===t)return;let o=t.depsTail=e.subsTail={version:n,dep:e,sub:t,prevDep:r,nextDep:i,prevSub:a,nextSub:void 0};i!==void 0&&(i.prevDep=o),r===void 0?t.deps=o:r.nextDep=o,a===void 0?e.subs=o:a.nextSub=o}function i(e,t=e.sub){let r=e.dep,i=e.prevDep,a=e.nextDep,o=e.nextSub,s=e.prevSub;return a===void 0?t.depsTail=i:a.prevDep=i,i===void 0?t.deps=a:i.nextDep=a,o===void 0?r.subsTail=s:o.prevSub=s,s===void 0?(r.subs=o)===void 0&&n(r):s.nextSub=o,a}function a(e){let n=e.nextSub,r;top:do{let i=e.sub,a=i.flags;if(a&60?a&12?a&4?!(a&48)&&c(e,i)?(i.flags=a|40,a&=1):a=0:i.flags=a&-9|32:a=0:i.flags=a|32,a&2&&t(i),a&1){let t=i.subs;if(t!==void 0){let i=(e=t).nextSub;i!==void 0&&(r={value:n,prev:r},n=i);continue}}if((e=n)!==void 0)n=e.nextSub;else{for(;r!==void 0;)if(e=r.value,r=r.prev,e!==void 0){n=e.nextSub;continue top}break}}while(1)}function o(t,n){let r,i=0,a=!1;top:do{let o=t.dep,c=o.flags;if(n.flags&16)a=!0;else if((c&17)==17){if(e(o)){let e=o.subs;e.nextSub!==void 0&&s(e),a=!0}}else if((c&33)==33){(t.nextSub!==void 0||t.prevSub!==void 0)&&(r={value:t,prev:r}),t=o.deps,n=o,++i;continue}if(!a){let e=t.nextDep;if(e!==void 0){t=e;continue}}for(;i--;){let i=n.subs,o=i.nextSub!==void 0;if(o?(t=r.value,r=r.prev):t=i,a){if(e(n)){o&&s(i),n=t.sub;continue}a=!1}else n.flags&=-33;n=t.sub;let c=t.nextDep;if(c!==void 0){t=c;continue top}}return a}while(1)}function s(e){do{let n=e.sub,r=n.flags;(r&48)==32&&(n.flags=r|16,(r&6)==2&&t(n))}while((e=e.nextSub)!==void 0)}function c(e,t){let n=t.depsTail;for(;n!==void 0;){if(n===e)return!0;n=n.prevDep}return!1}}function j(e,t,n){let r=typeof e==`object`,i=r?e:void 0;return{next:(r?e.next:e)?.bind(i),error:(r?e.error:t)?.bind(i),complete:(r?e.complete:n)?.bind(i)}}function M(e){let t=e.depsTail,n=t===void 0?e.deps:t.nextDep;for(;n!==void 0;)n=I(n,e)}function de(){if(!(U>0)){for(;B<V;){let e=N[B];N[B++]=void 0,e.notify()}B=0,V=0}}function fe(e,t){let n=typeof e==`function`,r=e,i={_snapshot:n?void 0:e,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:+!n,get(){return H!==void 0&&F(i,H,P),i._snapshot},subscribe(e){let t=j(e),n={current:!1},r=pe(()=>{i.get(),n.current?t.next?.(i._snapshot):n.current=!0});return{unsubscribe:()=>{r.stop()}}},_update(e){let a=H,o=t?.compare??Object.is;if(n)H=i,++P,i.depsTail=void 0;else if(e===void 0)return!1;n&&(i.flags=5);try{let t=i._snapshot,a=typeof e==`function`?e(t):e===void 0&&n?r(t):e;return t===void 0||!o(t,a)?(i._snapshot=a,!0):!1}finally{H=a,n&&(i.flags&=-5),M(i)}}};return n?(i.flags=17,i.get=function(){let e=i.flags;if(e&16||e&32&&R(i.deps,i)){if(i._update()){let e=i.subs;e!==void 0&&z(e)}}else e&32&&(i.flags=e&-33);return H!==void 0&&F(i,H,P),i._snapshot}):i.set=function(e){if(i._update(e)){let e=i.subs;e!==void 0&&(L(e),z(e),de())}},i}function pe(e){let t=()=>{let t=H;H=n,++P,n.depsTail=void 0,n.flags=6;try{return e()}finally{H=t,n.flags&=-5,M(n)}},n={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:6,notify(){let e=this.flags;e&16||e&32&&R(this.deps,this)?t():this.flags=2},stop(){this.flags=0,this.depsTail=void 0,M(this)}};return t(),n}var N,P,F,I,L,R,z,B,V,H,U;function W(){return(W=e((()=>{N=[],P=0,{link:F,unlink:I,propagate:L,checkDirty:R,shallowPropagate:z}=/* @__PURE__ */ ue({update(e){return e._update()},notify(e){N[V++]=e,e.flags&=-3},unwatched(e){e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=17,M(e))}}),B=0,V=0,U=0})))()}var G;function K(){return(K=e((()=>{W(),G=class{constructor(e,t){this.atom=fe(e),this.get=this.get.bind(this),this.setState=this.setState.bind(this),this.subscribe=this.subscribe.bind(this),t&&(this.actions=t(this))}setState(e){this.atom.set(e)}get state(){return this.atom.get()}get(){return this.state}subscribe(e){return this.atom.subscribe(j(e))}}})))()}function q(e,t){if(Object.is(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(let[n,r]of e)if(!t.has(n)||!Object.is(r,t.get(n)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();let n=J(e);if(n.length!==J(t).length)return!1;for(let r=0;r<n.length;r++)if(!Object.prototype.hasOwnProperty.call(t,n[r])||!Object.is(e[n[r]],t[n[r]]))return!1;return!0}function J(e){return Object.keys(e).concat(Object.getOwnPropertySymbols(e))}var Y;function me(){return(me=e((()=>{Y=class{#e;constructor({pluginId:e}){this.#e=e}getPluginId(){return this.#e}createEventPayload(e,t){return{type:`${this.#e}:${e}`,payload:t,pluginId:this.#e}}emit(e,t){}on(e,t,n){return()=>{}}onAll(e){return()=>{}}onAllPluginEvents(e){return()=>{}}}})))()}var he;function ge(){return(ge=e((()=>{me(),he=Y})))()}function _e(e,t){xe.set(e,t)}function ve(e){if(e!==void 0)try{return JSON.parse(JSON.stringify(e))}catch{return null}}function ye(e){return typeof e.get==`function`?e.get():e.state}function be(e){return{key:e.key,store:{state:ve(ye(e.store))},options:ve(e.options)}}var xe,Se,Ce,X;function we(){return(we=e((()=>{ge(),xe=/* @__PURE__ */ new Map,Se=class extends he{constructor(e){super({pluginId:`pacer`,debug:e?.debug,reconnectEveryMs:1e3})}},Ce=(e,t)=>{let n=t.key;n&&(_e(n,t),X.emit(e,be({...t,key:n})))},X=new Se})))()}
3
+ /**
4
+ * @license React
5
+ * use-sync-external-store-shim.production.js
6
+ *
7
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
8
+ *
9
+ * This source code is licensed under the MIT license found in the
10
+ * LICENSE file in the root directory of this source tree.
11
+ */
12
+ var Te=/* @__PURE__ */ t((e=>{var t=S();function n(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var r=typeof Object.is==`function`?Object.is:n,i=t.useState,a=t.useEffect,o=t.useLayoutEffect,s=t.useDebugValue;function c(e,t){var n=t(),r=i({inst:{value:n,getSnapshot:t}}),c=r[0].inst,u=r[1];return o(function(){c.value=n,c.getSnapshot=t,l(c)&&u({inst:c})},[e,n,t]),a(function(){return l(c)&&u({inst:c}),e(function(){l(c)&&u({inst:c})})},[e]),s(n),n}function l(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!r(e,n)}catch{return!0}}function u(e,t){return t()}var d=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?u:c;e.useSyncExternalStore=t.useSyncExternalStore===void 0?d:t.useSyncExternalStore})),Ee=/* @__PURE__ */ t(((e,t)=>{t.exports=Te()})),De=/* @__PURE__ */ t((e=>{
13
+ /**
14
+ * @license React
15
+ * use-sync-external-store-shim/with-selector.production.js
16
+ *
17
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
18
+ *
19
+ * This source code is licensed under the MIT license found in the
20
+ * LICENSE file in the root directory of this source tree.
21
+ */
22
+ var t=S(),n=Ee();function r(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var i=typeof Object.is==`function`?Object.is:r,a=n.useSyncExternalStore,o=t.useRef,s=t.useEffect,c=t.useMemo,l=t.useDebugValue;e.useSyncExternalStoreWithSelector=function(e,t,n,r,u){var d=o(null);if(d.current===null){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=c(function(){function e(e){if(!a){if(a=!0,o=e,e=r(e),u!==void 0&&f.hasValue){var t=f.value;if(u(t,e))return s=t}return s=e}if(t=s,i(o,e))return t;var n=r(e);return u!==void 0&&u(t,n)?(o=e,t):(o=e,s=n)}var a=!1,o,s,c=n===void 0?null:n;return[function(){return e(t())},c===null?void 0:function(){return e(c())}]},[t,n,r,u]);var p=a(e,d[0],d[1]);return s(function(){f.hasValue=!0,f.value=p},[p]),l(p),p}})),Oe=/* @__PURE__ */ t(((e,t)=>{t.exports=De()}));function ke(e,t){return e===t}function Ae(e,t=e=>e,n){let r=n?.compare??ke,i=C(t=>{let{unsubscribe:n}=e.subscribe(t);return n},[e]),a=C(()=>e.get(),[e]);return(0,je.useSyncExternalStoreWithSelector)(i,a,a,t,r)}var je;function Me(){return(Me=e((()=>{je=Oe()})))()}function Ne(){return{canLeadingExecute:!0,executionCount:0,isPending:!1,lastArgs:void 0,status:`idle`,maybeExecuteCount:0}}var Pe,Z;function Fe(){return(Fe=e((()=>{we(),K(),Pe={enabled:!0,leading:!1,trailing:!0,wait:0},Z=class{#e;constructor(e,t){this.fn=e,this.store=new G(Ne()),this.setOptions=e=>{this.options={...this.options,...e},this.#n()||this.cancel()},this.#t=e=>{this.store.setState(t=>{let n={...t,...e},{isPending:r}=n;return{...n,status:this.#n()?r?`pending`:`idle`:`disabled`}}),Ce(`Debouncer`,this)},this.#n=()=>!!le(this.options.enabled,this),this.#r=()=>le(this.options.wait,this),this.maybeExecute=(...e)=>{if(!this.#n())return;this.#t({maybeExecuteCount:this.store.state.maybeExecuteCount+1});let t=!1;this.options.leading&&this.store.state.canLeadingExecute&&(this.#t({canLeadingExecute:!1}),t=!0,this.#i(...e)),this.options.trailing&&this.#t({isPending:!0,lastArgs:e}),this.#e&&clearTimeout(this.#e),this.#e=setTimeout(()=>{this.#t({canLeadingExecute:!0}),this.options.trailing&&!t&&this.#i(...e)},this.#r())},this.#i=(...e)=>{this.#n()&&(this.fn(...e),this.#t({executionCount:this.store.state.executionCount+1,isPending:!1,lastArgs:void 0}),this.options.onExecute?.(e,this))},this.flush=()=>{this.store.state.isPending&&this.store.state.lastArgs&&(this.#a(),this.#i(...this.store.state.lastArgs))},this.#a=()=>{this.#e&&=(clearTimeout(this.#e),void 0)},this.cancel=()=>{this.#a(),this.#t({canLeadingExecute:!0,isPending:!1})},this.reset=()=>{this.#t(Ne())},this.key=t.key,this.options={...Pe,...t},this.#t(this.options.initialState??{}),this.key&&X.on(`d-Debouncer`,e=>{e.payload.key===this.key&&(this.#t(e.payload.store.state),this.setOptions(e.payload.options))})}#t;#n;#r;#i;#a}})))()}function Ie(e,t,n=()=>({})){let r={...oe().debouncer,...t},[i]=E(()=>{let t=new Z(e,r);return t.Subscribe=function(e){let n=Ae(t.store,e.selector,{compare:q});return typeof e.children==`function`?e.children(n):e.children},t});i.fn=e,i.setOptions(r),w(()=>()=>{r.onUnmount?r.onUnmount(i):i.cancel()},[]);let a=Ae(i.store,n,{compare:q});return T(()=>({...i,state:a}),[i,a])}function Le(){return(Le=e((()=>{se(),Me(),Fe()})))()}function Re(e,t,n){let[r,i]=E(e),a=Ie(i,t,n);return[r,a.maybeExecute,a]}function ze(){return(ze=e((()=>{Le()})))()}function Be(e,t,n){let[r,i,a]=Re(e,t,n);return w(()=>{i(e)},[e,i]),[r,a]}function Ve(){return(Ve=e((()=>{ze()})))()}function He({preview:e,count:t,scope:n}){let[r,i]=E(!1),a=e??[],o=t??0;if(o===0)return/* @__PURE__ */ D(y,{color:`blue`,children:`0`});let s=/* @__PURE__ */ O(g,{spacing:6,children:[/* @__PURE__ */ D(_,{maxCount:4,size:`extra-extra-small`,overlapFrom:`end`,children:a.map(e=>/* @__PURE__ */ D(v,{style:{width:22,height:22,minWidth:22,lineHeight:`22px`,fontSize:12,cursor:`inherit`},src:e.avatar??void 0,alt:e.nickname,color:`light-blue`,title:e.nickname,children:e.nickname?.[0]},e.id))}),/* @__PURE__ */ D(y,{color:`blue`,style:{flexShrink:0},children:o})]});return n?/* @__PURE__ */ O(ne,{children:[/* @__PURE__ */ D(`button`,{type:`button`,onClick:()=>i(!0),"aria-label":`查看${Q[n.type]}「${n.name}」的 ${o} 名成员`,style:{display:`inline-flex`,alignItems:`center`,padding:0,border:`none`,background:`transparent`,cursor:`pointer`,font:`inherit`,color:`inherit`},children:s}),r&&/* @__PURE__ */ D(Ue,{scope:n,total:o,onClose:()=>i(!1)})]}):s}function Ue({scope:e,total:t,onClose:n}){let[r,i]=E(``),[c,l]=E(``),{page:d,pageSize:f,setPage:m,resetPage:_}=re(),y=ae(e.type,e.id,{page:d,pageSize:f,keyword:c||void 0}),b=y.data,[x]=Be(r.trim(),{wait:300});return w(()=>{l(e=>e===x?e:(_(),x))},[x,_]),/* @__PURE__ */ O(o,{title:`${Q[e.type]}「${e.name}」成员`,visible:!0,onCancel:n,footer:null,width:640,closeOnEsc:!0,children:[/* @__PURE__ */ O(g,{style:{width:`100%`,marginBottom:8},children:[/* @__PURE__ */ D(u,{placeholder:`搜索昵称 / 用户名`,value:r,onChange:i}),/* @__PURE__ */ O(a.Text,{type:`tertiary`,size:`small`,children:[`共 `,t,` 人`]})]}),/* @__PURE__ */ D(p,{size:`small`,loading:y.isFetching,dataSource:b?.list??[],grid:{span:12},emptyContent:/* @__PURE__ */ D(h,{description:c?`没有匹配「${c}」的成员`:`暂无成员`}),renderItem:e=>/* @__PURE__ */ D(p.Item,{style:{padding:`8px 4px`},header:/* @__PURE__ */ D(v,{size:`small`,src:e.avatar??void 0,color:`light-blue`,alt:e.nickname,children:e.nickname?.[0]}),main:/* @__PURE__ */ O(`div`,{style:{minWidth:0},children:[/* @__PURE__ */ D(a.Text,{ellipsis:{showTooltip:!0},style:{maxWidth:`100%`},children:e.nickname}),/* @__PURE__ */ D(`div`,{children:/* @__PURE__ */ D(a.Text,{type:`tertiary`,size:`small`,ellipsis:{showTooltip:!0},style:{maxWidth:`100%`},children:e.username})})]})},e.id)}),(b?.total??0)>f&&/* @__PURE__ */ D(`div`,{style:{display:`flex`,justifyContent:`flex-end`,marginTop:8},children:/* @__PURE__ */ D(s,{size:`small`,hoverShowPageSelect:!0,currentPage:d,pageSize:f,total:b?.total??0,onPageChange:m})})]})}var Q;function We(){return(We=e((()=>{Ve(),m(),l(),Q={department:`部门`,role:`角色`,position:`岗位`,userGroup:`用户组`}})))()}function Ge(e,t){let n=new Map(e.map(e=>[e.id,e])),r=/* @__PURE__ */ new Map,i=[];e.forEach(e=>{let t=e.parentId&&n.has(e.parentId)?e.parentId:0;if(t){r.has(t)||r.set(t,[]);let n=r.get(t);n&&n.push(e.id)}else i.push(e.id)});let a=/* @__PURE__ */ new Map,o=/* @__PURE__ */ new Set;t.forEach(e=>{let t=e._departmentId??null;if(t!==null&&n.has(t)){a.has(t)||a.set(t,[]);let n=a.get(t);n&&n.push(e),o.add(e.value)}});function s(e){let t=n.get(e);if(!t)return null;let i=(r.get(e)??[]).map(s).filter(e=>e!==null),o=a.get(e)??[],c=[...i,...o];return{key:`dept-${e}`,value:`dept-${e}`,label:t.name,disabled:!0,children:c}}let c=[];i.forEach(e=>{let t=s(e);t&&c.push(t)});let l=t.filter(e=>!o.has(e.value));return l.length>0&&c.push({key:`dept-none`,value:`dept-none`,label:`无部门`,disabled:!0,children:l}),c}function Ke(e){let t=/* @__PURE__ */ new Map,n=[];e.forEach(e=>{if(e._departmentName){t.has(e._departmentName)||t.set(e._departmentName,[]);let n=t.get(e._departmentName);n&&n.push(e)}else n.push(e)});let r=[];return t.forEach((e,t)=>{r.push({key:`dept-${t}`,value:`dept-${t}`,label:t,disabled:!0,children:e})}),n.length>0&&r.push({key:`dept-none`,value:`dept-none`,label:`无部门`,disabled:!0,children:n}),r}function qe({dataSource:e,value:t,onChange:a,departments:o}){let[s,l]=E(`flat`);ie();let u=T(()=>e.map(e=>({key:String(e.id),value:e.id,label:e.nickname,disabled:!1,_username:e.username,_avatar:e.avatar,_departmentName:e.departmentName,_departmentId:e.departmentId})),[e]),d=(e,t)=>k(t._username??``,e)||k(t.label??``,e)||k(t._departmentName??``,e),p=e=>/* @__PURE__ */ D(`div`,{style:{height:52,boxSizing:`border-box`,display:`flex`,alignItems:`center`,padding:`0 12px`},children:/* @__PURE__ */ D(i,{onChange:()=>e.onChange(e.value),checked:e.checked,style:{display:`flex`,alignItems:`center`,width:`100%`},children:/* @__PURE__ */ O(`div`,{style:{display:`flex`,alignItems:`center`,gap:10,minWidth:0},children:[/* @__PURE__ */ D(x,{name:e.label,avatar:e._avatar,size:32,style:{flexShrink:0}}),/* @__PURE__ */ O(`div`,{style:{minWidth:0},children:[/* @__PURE__ */ O(`div`,{style:{fontSize:14,lineHeight:`20px`,overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`},children:[e.label,/* @__PURE__ */ D(`span`,{style:{fontSize:12,color:`var(--arc-antd-color-text-2)`,marginLeft:4,fontWeight:400},children:e._username})]}),e._departmentName&&/* @__PURE__ */ D(`div`,{style:{fontSize:12,lineHeight:`16px`,color:`var(--arc-antd-color-text-2)`,overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`},children:e._departmentName})]})]})})},e.key),m=e=>/* @__PURE__ */ O(`div`,{style:{height:52,boxSizing:`border-box`,display:`flex`,alignItems:`center`,padding:`0 12px`,gap:10,justifyContent:`space-between`},children:[/* @__PURE__ */ D(x,{name:e.label,avatar:e._avatar,size:32,style:{flexShrink:0}}),/* @__PURE__ */ O(`div`,{style:{flex:1,minWidth:0},children:[/* @__PURE__ */ O(`div`,{style:{fontSize:14,lineHeight:`20px`,overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`},children:[e.label,/* @__PURE__ */ D(`span`,{style:{fontSize:12,color:`var(--arc-antd-color-text-2)`,marginLeft:4,fontWeight:400},children:e._username})]}),e._departmentName&&/* @__PURE__ */ D(`div`,{style:{fontSize:12,lineHeight:`16px`,color:`var(--arc-antd-color-text-2)`,overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`},children:e._departmentName})]}),/* @__PURE__ */ D(f,{size:14,onClick:e.onRemove,style:{cursor:`pointer`,color:`var(--arc-antd-color-text-2)`,flexShrink:0}})]},e.key),h=T(()=>o&&o.length>0?Ge(o,u):Ke(u),[o,u]),g=C((e,t)=>{let n=t;return n._username?k(n._username,e)||k(n.label??``,e)||k(n._departmentName??``,e):!1},[]),_=C((e,t)=>{let n=t;return n._username?/* @__PURE__ */ O(`div`,{style:{display:`flex`,alignItems:`center`,gap:8},children:[/* @__PURE__ */ D(x,{name:n.label??``,avatar:n._avatar,size:24,style:{flexShrink:0}}),/* @__PURE__ */ D(`span`,{style:{fontSize:14},children:n.label}),/* @__PURE__ */ D(`span`,{style:{fontSize:12,color:`var(--arc-antd-color-text-2)`},children:n._username})]}):/* @__PURE__ */ D(`span`,{style:{fontSize:13,fontWeight:500},children:e})},[]),v={style:{width:`100%`},value:t,onChange:e=>a(e||[]),renderSelectedItem:m,inputProps:{placeholder:`搜索姓名、账号、部门`},emptyContent:{left:`暂无可选用户`,right:`暂无成员`,search:`无匹配用户`}};return/* @__PURE__ */ O(`div`,{children:[/* @__PURE__ */ D(`div`,{style:{marginBottom:8,display:`flex`,justifyContent:`flex-end`},children:/* @__PURE__ */ O(n,{value:s,onChange:e=>l(e.target.value),type:`button`,children:[/* @__PURE__ */ D(r,{value:`flat`,children:`列表`}),/* @__PURE__ */ D(r,{value:`tree`,children:`部门树`})]})}),s===`flat`?/* @__PURE__ */ D(c,{...v,dataSource:u,filter:d,renderSourceItem:p}):/* @__PURE__ */ D(c,{...v,type:`treeList`,dataSource:h,filter:!0,treeProps:{filterTreeNode:g,renderLabel:_,disableStrictly:!1}})]})}function $(){return($=e((()=>{m(),d(),b()})))()}export{We as i,$ as n,He as r,qe as t};
@@ -0,0 +1,36 @@
1
+ import{n as e}from"./rolldown-runtime-BKuNeK48.js";import{o as t}from"./controls-C5dPckUT.js";import{t as n}from"./typography-DKK_iHcj.js";import{i as r,n as i,r as a}from"./feedback-BnjMKZpz.js";import{n as o,t as s}from"./tabs-BobA_IcO.js";import{_ as c,a as l,f as u,g as d,i as f,l as p,n as m,o as h,r as g,s as _,t as v}from"./ConfigurableTable-DzmZDd8F.js";import{a as y,o as b,r as x,t as ee}from"./search-filters-CRIhZ0gL.js";import{n as S,t as C}from"./createLucideIcon-BtwfYE6A.js";import{n as te,t as ne}from"./MasterDetailLayout-sjPWw8BI.js";import{n as re,r as ie,s as w,t as ae}from"./toolbar-controls-CThS0xuP.js";import{a as oe,i as se,n as ce,o as le,r as ue,s as de,t as fe}from"./UserLogsPanels-BHeSxWrk.js";import{n as pe,t as me}from"./chevron-down-mn2tSKQd.js";import{i as T,n as he,r as ge,t as _e}from"./chevrons-up-down-2M6hY6wt.js";import{n as ve,t as ye}from"./copy-ofLPH1I0.js";import{n as be,t as xe}from"./eye-off-BtJoIT5n.js";import{n as Se,r as Ce}from"./EntityRelationButton-DWn1rC2J.js";import{n as we,t as Te}from"./upload-M-n6woFv.js";import{i as Ee,s as De,t as E}from"./form-CQutQFiD.js";import{C as D,S as O,a as k,g as Oe,h as A,l as ke,o as j,u as M,y as N}from"./ui-BFsHoY7a.js";import{i as P,r as Ae,t as je}from"./confirm-BtBBEqk8.js";import{n as Me,t as Ne}from"./useStatusToggle-B2qZaoc-.js";import{n as Pe,t as Fe}from"./ResponsiveTableActions-y54aSdhs.js";import{n as Ie,r as Le,t as Re}from"./deleteAction-CCocr5uV.js";import{n as ze}from"./listTableProps-DDynsnLF.js";import{n as Be,t as Ve}from"./DateTimeText-CIt0Qy45.js";import{a as He,i as Ue,o as We,r as Ge,t as Ke}from"./EditFormModal-DNHOZHxM.js";import{n as qe,t as Je}from"./ModalFooter-RMlvqrO9.js";import{n as F,r as Ye}from"./clipboard-ERcMSMRH.js";import{n as Xe,t as Ze}from"./UserAvatar-B8CFnTCn.js";import{n as I,t as Qe}from"./AppModal-DJzQA6FR.js";import{n as $e,t as L}from"./PasswordInput-DGEJO9yx.js";import{n as et,t as tt}from"./DictTag-2-adKbYg.js";import{n as nt,t as rt}from"./ExportButton-AzH4D0oW.js";import{a as it,i as at,n as ot,r as st,t as ct}from"./DataScopePanel-B2-x8Jcz.js";import{useCallback as lt,useEffect as ut,useMemo as R,useRef as z,useState as B}from"react";import{Fragment as V,jsx as H,jsxs as U}from"react/jsx-runtime";import{abortSubmit as dt}from"@fudanda/react-core/lib/abort-submit";import{USER_STATUSES as ft,buildTree as W,enumValueOf as pt}from"@fudanda/shared/core";import{useDictItems as mt}from"@fudanda/react-core/hooks/useDictItems";import{goTransport as ht}from"@fudanda/react-core/lib/go-transport";import{identityDirectoryContract as G,userContract as gt}from"@fudanda/react-core/lib/native-operations";import{api as _t,useApiMutation as vt}from"@fudanda/react-core/lib/contract-query";import{usePermission as yt}from"@fudanda/react-core/hooks/usePermission";import{useFilterQuery as bt}from"@fudanda/react-core/hooks/useFilterQuery";import{useListSearch as xt}from"@fudanda/react-core/hooks/useListSearch";import{formatDateForApi as St,formatDateTimeRangeForApi as Ct}from"@fudanda/react-core/utils/date";import{useListDeepLink as wt}from"@fudanda/react-core/hooks/useListDeepLink";import{useAssignUserRoles as Tt,useBatchUserPassword as Et,useBatchUserStatus as Dt,useDeleteUsers as Ot,useKickUserSessions as kt,useResetUserPassword as At,useSaveUser as jt,useSaveUserDataPermission as K,useSaveUserMenus as Mt,useUnlockUser as Nt,useUserDataPermission as Pt,useUserDetail as Ft,useUserEffectivePermissions as It,useUserList as Lt,userKeys as Rt}from"@fudanda/react-core/hooks/queries/users";import{useAuth as zt}from"@fudanda/react-core/hooks/useAuth";import{useMenuTree as Bt}from"@fudanda/react-core/hooks/queries/menus";import{downloadBlob as Vt}from"@fudanda/react-core/utils/download";import{useIdentityCapabilities as Ht}from"@fudanda/react-core/hooks/queries/auth-public";import{DATA_SCOPES as Ut,mostPermissiveDataScope as Wt}from"@fudanda/shared/identity";import{uploadAvatarBlobToFileCenter as Gt}from"@fudanda/react-core/utils/avatar-upload";import{formatPasswordPolicyHint as Kt}from"@fudanda/shared/settings";import{useMySettings as qt}from"@fudanda/react-core/hooks/queries/settings";import{isAllKeysExpanded as Jt}from"@fudanda/react-core/hooks/useTreeExpansion";import{departmentsToTreeData as Yt,useFlatDepartments as Xt}from"@fudanda/react-core/hooks/queries/departments";import{useAllPositions as Zt}from"@fudanda/react-core/hooks/queries/positions";import{useAllRoles as Qt}from"@fudanda/react-core/hooks/queries/roles";import{useRevealedValue as $t}from"@fudanda/react-core/components/sensitive/useRevealedValue";import{useSensitiveFormFields as en}from"@fudanda/react-core/hooks/useSensitiveFormFields";import{useDirectoryCreate as tn,useDirectoryProvision as nn,useDirectorySync as rn,useDirectorySyncStatus as q,useDirectoryUpdate as an}from"@fudanda/react-core/hooks/queries/identity-directory";import{transferTemplate as on,transferUsers as J}from"@fudanda/shared/api/transfers";var sn,cn;function ln(){return(ln=e((()=>{
2
+ /**
3
+ * @license lucide-react v1.53.0 - ISC
4
+ *
5
+ * This source code is licensed under the ISC license.
6
+ * See the LICENSE file in the root directory of this source tree.
7
+ */
8
+ S(),sn={name:`building-complex`,size:24,node:[[`path`,{d:`M10 12h4`,key:`a56b0p`}],[`path`,{d:`M10 8h4`,key:`1sr2af`}],[`path`,{d:`M14 21v-3a2 2 0 0 0-4 0v3`,key:`1rgiei`}],[`path`,{d:`M6 10H4a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-2`,key:`secmi2`}],[`path`,{d:`M6 21V5a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v16`,key:`16ra0t`}]],aliases:[`building-2`]},sn.node,cn=C(sn)})))()}var un,dn;function Y(){return(Y=e((()=>{
9
+ /**
10
+ * @license lucide-react v1.53.0 - ISC
11
+ *
12
+ * This source code is licensed under the ISC license.
13
+ * See the LICENSE file in the root directory of this source tree.
14
+ */
15
+ S(),un={name:`eye`,size:24,node:[[`path`,{d:`M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0`,key:`1nclc0`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]},un.node,dn=C(un)})))()}var fn,pn;function mn(){return(mn=e((()=>{
16
+ /**
17
+ * @license lucide-react v1.53.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
+ */
22
+ S(),fn={name:`key-round`,size:24,node:[[`path`,{d:`M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z`,key:`1s6t7t`}],[`circle`,{cx:`16.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`w0ekpg`}]]},fn.node,pn=C(fn)})))()}var hn,gn;function X(){return(X=e((()=>{
23
+ /**
24
+ * @license lucide-react v1.53.0 - ISC
25
+ *
26
+ * This source code is licensed under the ISC license.
27
+ * See the LICENSE file in the root directory of this source tree.
28
+ */
29
+ S(),hn={name:`pencil-line`,size:24,node:[[`path`,{d:`M13 21h8`,key:`1jsn5i`}],[`path`,{d:`m15 5 4 4`,key:`1mk7zo`}],[`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`}]]},hn.node,gn=C(hn)})))()}var Z,_n;function vn(){return(vn=e((()=>{
30
+ /**
31
+ * @license lucide-react v1.53.0 - ISC
32
+ *
33
+ * This source code is licensed under the ISC license.
34
+ * See the LICENSE file in the root directory of this source tree.
35
+ */
36
+ S(),Z={name:`undo-2`,size:24,node:[[`path`,{d:`M9 14 4 9l5-5`,key:`102s5s`}],[`path`,{d:`M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11`,key:`f3b9sd`}]]},Z.node,_n=C(Z)})))()}function yn({selectedRowKeys:e,clearSelection:t,run:n,disableLabel:a=`停用`,confirm:o=`disable`,entity:s=`项`,confirmContent:c,danger:l=!1,successMessage:u}){return async d=>{let f=[...e];if(f.length===0)return;let p=d===`enabled`?`启用`:a,m=async()=>{await n(f,d),t(),r.success(u?.(d,f.length)??`批量${p}成功`)};if(!(o===`always`||o===`disable`&&d===`disabled`))return m();let h={title:`确认批量${p}选中的 ${f.length} ${s}?`,content:c?.(d,f.length),onOk:m};l&&d===`disabled`?je(h):i.confirm(h)}}function bn(){return(bn=e((()=>{D(),P()})))()}function xn({control:e,field:t,label:r,...i}){let a=Ee(),o=e.record?.id??0,s=$t({entity:e.entity,id:o,field:t}),c=e.record?.[t],l=typeof c==`string`&&c?c:g;if(e.isLocked(t)){let o=s.revealed??l;return/* @__PURE__ */ H(E.Slot,{label:r,children:/* @__PURE__ */ U(Oe,{spacing:4,wrap:!0,className:`sensitive-form-locked`,children:[/* @__PURE__ */ H(n.Text,{className:`sensitive-form-locked__value`,children:o}),s.canReveal&&(s.revealed===null?/* @__PURE__ */ H(O,{content:`查看明文(记录审计)`,children:/* @__PURE__ */ H(k,{size:`small`,theme:`borderless`,type:`tertiary`,icon:/* @__PURE__ */ H(dn,{size:14}),loading:s.revealing,"aria-label":`查看明文`,onClick:()=>void s.show()})}):/* @__PURE__ */ H(O,{content:`收起明文`,children:/* @__PURE__ */ H(k,{size:`small`,theme:`borderless`,type:`tertiary`,icon:/* @__PURE__ */ H(xe,{size:14}),"aria-label":`收起明文`,onClick:s.hide})})),/* @__PURE__ */ H(k,{size:`small`,theme:`borderless`,icon:/* @__PURE__ */ H(gn,{size:14}),disabled:i.disabled,onClick:()=>{e.unlock(t),a.setValue(t,s.revealed??``)},children:`修改`})]})})}let u=e.isUnlocked(t);return/* @__PURE__ */ H(E.Input,{...i,field:t,label:r,extraText:u?/* @__PURE__ */ U(Oe,{spacing:4,children:[/* @__PURE__ */ H(n.Text,{type:`tertiary`,size:`small`,children:`留空则保持原值不变`}),/* @__PURE__ */ H(k,{size:`small`,theme:`borderless`,type:`tertiary`,icon:/* @__PURE__ */ H(_n,{size:12}),onClick:()=>{e.relock(t),a.setValue(t,c)},children:`取消修改`})]}):i.extraText})}function Sn(){return(Sn=e((()=>{D(),Y(),be(),X(),vn(),h()})))()}function Cn({administrator:e}){let t=q(e),r=rn();return e?/* @__PURE__ */ U(Oe,{wrap:!0,children:[/* @__PURE__ */ H(k,{loading:r.isPending||t.data?.running,disabled:!t.data||t.data.running,onClick:()=>{r.mutateAsync({}).catch(()=>{})},children:`同步统一账户`}),/* @__PURE__ */ U(n.Text,{type:`tertiary`,children:[`最近成功同步:`,t.data?.lastSuccessAt?/* @__PURE__ */ H(Ve,{value:t.data.lastSuccessAt,mode:`absolute`}):`尚未完成`]}),(t.isError||t.data?.error)&&/* @__PURE__ */ H(n.Text,{type:`danger`,children:t.data?.error||`无法读取同步状态`})]}):null}function wn({user:e,onClose:t}){let n=en({entity:`User`,fields:Tn,record:e??null}),i=tn(),a=an(),o=z(null),[s]=B(()=>crypto.randomUUID()),[c,l]=B(!1),[u,d]=B(``),f=nn(s,c),p=async()=>{if(!o.current||c)return;let u;try{let c=await o.current.validate();if(e){let t=G.update.input.shape.body.parse(n.strip(c));await a.mutateAsync({params:{id:e.id},body:t})}else{let e=c;u=G.create.input.shape.body.parse({...e,requestId:s,displayName:e.displayName??``,email:e.email??``,phone:e.phone??``}),await i.mutateAsync({body:u})}r.success(e?`统一资料已更新`:`统一账户已创建,请在本应用分配权限`),t()}catch(e){u&&l(!0),d(e instanceof Error?e.message:String(e))}finally{o.current?.setValue(`initialPassword`,``),u&&(u.initialPassword=``)}};return/* @__PURE__ */ U(Qe,{title:e?`统一账户资料`:`创建统一账户`,visible:!0,onCancel:t,onOk:()=>{p()},confirmLoading:i.isPending||a.isPending,okButtonProps:{disabled:c},children:[/* @__PURE__ */ U(E,{getFormApi:e=>{o.current=e},initValues:{displayName:e?.externalDisplayName||e?.nickname||``,email:e?.email||``,phone:e?.phone||``},children:[!e&&/* @__PURE__ */ H(E.Input,{field:`username`,label:`统一用户名`,rules:[{required:!0}]}),/* @__PURE__ */ H(E.Input,{field:`displayName`,label:`显示名`}),/* @__PURE__ */ H(xn,{control:n,field:`email`,label:`邮箱`}),/* @__PURE__ */ H(xn,{control:n,field:`phone`,label:`手机`}),!e&&/* @__PURE__ */ H(L,{field:`initialPassword`,label:`初始密码`,autoComplete:`new-password`,rules:[{required:!0}]})]}),/* @__PURE__ */ H(`p`,{children:`角色、部门和本应用停用状态在“本应用权限”中设置。密码后续修改和 MFA 由 Casdoor 管理。`}),u&&/* @__PURE__ */ H(`p`,{role:`alert`,children:u}),c&&/* @__PURE__ */ H(k,{loading:f.isFetching,onClick:()=>{f.refetch().then(({data:e})=>{e?.status===`complete`?(r.success(`开户已确认,请刷新用户列表`),t()):d(`开户结果尚未确认,请稍后再次查询。不会重新发送初始密码。`)})},children:`查询开户结果`})]})}var Tn;function En(){return(En=e((()=>{D(),I(),Be(),$e(),Sn(),Tn=[`email`,`phone`]})))()}function Dn({userId:e,userName:t,visible:n,onClose:i}){let[a,c]=B([]),[l,u]=B([]),[d,f]=B([]),[p,m]=B([]),[h,g]=B([]),[_,v]=B(`direct`),y=Bt({enabled:n}),b=It(e,n),x=Mt();ut(()=>{n&&v(`direct`)},[n,e]),ut(()=>{n&&b.data&&(c(b.data.directMenuIds),u(b.data.roleMenuIds),f(b.data.groupMenuIds??[]),m(b.data.groups??[]),g(b.data.effectiveMenuIds))},[n,b.data]);let ee=async()=>{await x.mutateAsync({params:{id:e},body:{menuIds:a}}),r.success(`菜单权限已更新`);let t=/* @__PURE__ */ new Set([...a,...l,...d]);g([...t]),i()};function S(){let e=b.data?.menuSources??{},t={};for(let n of h){let r=(e[String(n)]??[]).map(e=>/* @__PURE__ */ H(N,{size:`small`,color:e===`用户直接授权`?`green`:e.includes(`用户组:`)?`orange`:`blue`,children:e},e));t[String(n)]=/* @__PURE__ */ H(Oe,{spacing:4,style:{marginLeft:4},children:r})}return t}return/* @__PURE__ */ H(Qe,{title:`菜单权限 — ${t}`,visible:n,onCancel:i,footer:_===`effective`?null:/* @__PURE__ */ H(Je,{onCancel:i,onOk:ee,okText:`保存`,loading:x.isPending,disabled:!b.isSuccess}),width:640,children:/* @__PURE__ */ U(o,{collapsible:`auto`,activeKey:_,onChange:v,children:[/* @__PURE__ */ H(s,{tab:`直接授权`,itemKey:`direct`,children:/* @__PURE__ */ H(at,{allMenus:y.data??[],checkedMenuIds:a,onChange:c,loading:y.isFetching||b.isFetching})}),/* @__PURE__ */ U(s,{tab:`最终有效权限`,itemKey:`effective`,children:[/* @__PURE__ */ U(`div`,{style:{marginBottom:8,fontSize:12,color:`var(--arc-antd-color-text-2)`},children:[/* @__PURE__ */ H(`div`,{children:`最终权限 = 角色权限 ∪ 用户组继承 ∪ 用户直接授权,仅供预览`}),/* @__PURE__ */ U(`div`,{style:{display:`grid`,gridTemplateColumns:`88px minmax(0, 1fr)`,columnGap:8,rowGap:6,alignItems:`start`,marginTop:6},children:[/* @__PURE__ */ H(`span`,{children:`权限来源:`}),/* @__PURE__ */ H(`div`,{style:{display:`flex`,flexWrap:`wrap`,gap:6},children:[...new Set(Object.values(b.data?.menuSources??{}).flat())].map(e=>/* @__PURE__ */ H(N,{size:`small`,color:e===`用户直接授权`?`green`:e.includes(`用户组:`)?`orange`:`blue`,children:e},e))}),p.length>0&&/* @__PURE__ */ U(V,{children:[/* @__PURE__ */ H(`span`,{children:`继承自用户组:`}),/* @__PURE__ */ H(`div`,{style:{display:`flex`,flexWrap:`wrap`,gap:6},children:p.map(e=>/* @__PURE__ */ H(N,{size:`small`,color:`orange`,children:e.name},e.id))})]})]})]}),/* @__PURE__ */ H(at,{allMenus:y.data??[],checkedMenuIds:h,loading:y.isFetching||b.isFetching,readonly:!0,labelSuffix:S()})]})]})})}function On(){return(On=e((()=>{D(),I(),it(),qe()})))()}function kn(e){return e===null?`未设置`:ct.find(t=>t.value===e)?.label??e}function An(e){return Wt(e)??`self`}function jn({userId:e,userName:t,visible:n,deptTree:i,onClose:a}){let o=R(()=>W(i.map(e=>({...e,children:[]})),{keepEmptyChildren:!0}),[i]),[s,c]=B(null),[l,u]=B([]),[d,f]=B(null),[p,m]=B([]),[h,g]=B(null),[_,v]=B([]),[y,b]=B([]),x=Pt(e,n),ee=K();ut(()=>{n&&x.data&&(c(x.data.userDataScope??null),u(x.data.deptScopeIds),f(x.data.roleDataScope??null),m(x.data.roleDeptScopeIds),g(x.data.groupDataScope??null),v(x.data.groupDeptScopeIds??[]),b(x.data.groups??[]))},[n,x.data]);let S=async()=>{await ee.mutateAsync({params:{id:e},body:{dataScope:pt(Ut,s),deptScopeIds:s===`custom`?l:[]}}),r.success(`数据权限已更新`),a()},C=An([s,d,h]),te=C===`custom`?[.../* @__PURE__ */ new Set([...s===`custom`?l:[],...p,..._])]:[];return/* @__PURE__ */ U(Qe,{title:`数据权限 — ${t}`,visible:n,onCancel:a,onOk:S,okButtonProps:{disabled:!x.isSuccess},confirmLoading:ee.isPending,width:440,children:[/* @__PURE__ */ U(`div`,{style:{marginBottom:12},children:[/* @__PURE__ */ H(Q,{strong:!0,style:{display:`block`,marginBottom:6},children:`角色数据权限(只读)`}),/* @__PURE__ */ H(ot,{dataScope:d??`self`,deptScopeIds:p,deptTree:o,loading:x.isFetching,readonly:!0})]}),y.length>0&&/* @__PURE__ */ U(V,{children:[/* @__PURE__ */ H(ke,{margin:12}),/* @__PURE__ */ U(`div`,{style:{marginBottom:12},children:[/* @__PURE__ */ U(Q,{strong:!0,style:{display:`block`,marginBottom:6},children:[`用户组继承权限(只读)`,y.map(e=>/* @__PURE__ */ H(N,{size:`small`,color:`orange`,style:{marginLeft:6},children:e.name},e.id))]}),/* @__PURE__ */ H(ot,{dataScope:h??`self`,deptScopeIds:_,deptTree:o,loading:x.isFetching,readonly:!0})]})]}),/* @__PURE__ */ H(ke,{margin:12}),/* @__PURE__ */ U(`div`,{style:{marginBottom:12},children:[/* @__PURE__ */ H(Q,{strong:!0,style:{display:`block`,marginBottom:6},children:`用户直接权限`}),/* @__PURE__ */ H(ot,{dataScope:s,deptScopeIds:l,deptTree:o,onScopeChange:c,onDeptIdsChange:u,loading:x.isFetching,nullable:!0})]}),/* @__PURE__ */ H(ke,{margin:12}),/* @__PURE__ */ U(`div`,{children:[/* @__PURE__ */ U(Q,{strong:!0,style:{display:`block`,marginBottom:6},children:[`最终有效权限:`,/* @__PURE__ */ H(Q,{type:`secondary`,style:{fontWeight:`normal`,marginLeft:8},children:kn(C)})]}),/* @__PURE__ */ H(ot,{dataScope:C,deptScopeIds:te,deptTree:o,loading:x.isFetching,readonly:!0})]})]})}var Q;function Mn(){return(Mn=e((()=>{D(),I(),st(),{Text:Q}=n})))()}function Nn({visible:e,user:t,onClose:n,onUpdated:i}){let a=vt(gt.update,{requestOptions:{silent:!0},invalidate:e=>{e.invalidateQueries({queryKey:Rt.lists}),e.invalidateQueries({queryKey:Rt.detail(t.id)})}}),o=async e=>(await a.mutateAsync({params:{id:t.id},body:e===null?{clearFields:[`avatar`]}:{avatar:e}}),_t(gt.detail,{params:{id:t.id}}));async function s(e){try{i(await o(e)),r.success(`头像已更新`),n()}catch(e){r.error(e instanceof Error&&e.message?e.message:`头像更新失败`)}}function c(){Ae({title:`确定要移除该用户头像吗?`,content:`移除后将使用昵称缩写作为默认头像。`,onOk:async()=>{try{i(await o(null)),r.success(`头像已移除`),n()}catch(e){r.error(e instanceof Error&&e.message?e.message:`移除失败`)}}})}return/* @__PURE__ */ H(le,{visible:e,currentAvatar:t.avatar,confirmLoading:a.isPending,uploadBlob:Gt,onCancel:n,onSelect:e=>void s(e),onRemove:t.avatar?c:void 0})}function Pn(){return(Pn=e((()=>{D(),de(),P()})))()}function Fn({userId:e,userName:t,visible:n,canViewLoginLogs:r,canViewOperationLogs:i,onClose:c}){let l=r?`login`:`operation`,[u,d]=B(l);return ut(()=>{n||d(l)},[n,l]),/* @__PURE__ */ H(a,{title:`登录与操作记录 · ${t}`,visible:n,onCancel:c,width:1180,bodyStyle:{padding:`0 16px 16px`},closeOnEsc:!0,children:/* @__PURE__ */ U(o,{collapsible:`auto`,type:`line`,activeKey:u,onChange:e=>d(e),children:[r&&/* @__PURE__ */ H(s,{tab:`登录记录`,itemKey:`login`,children:/* @__PURE__ */ H(fe,{scope:{kind:`user`,userId:e},enabled:n&&u===`login`,columnSettingsKey:`user-logs-login-logs`})}),i&&/* @__PURE__ */ H(s,{tab:`操作记录`,itemKey:`operation`,children:/* @__PURE__ */ H(ce,{scope:{kind:`user`,userId:e},enabled:n&&u===`operation`,columnSettingsKey:`user-logs-operation-logs`})})]})})}function In(){return(In=e((()=>{D(),ue()})))()}function Ln({entity:e,title:a,label:o=`导入`,beforeSubmit:s,onFinished:c}){let l=z(null),d=z(!1),[f,p]=B(!1),[m,h]=B(`error`),[g,_]=B(null),[v,y]=B(!1),b=e=>{(!s||s())&&(d.current=e,l.current?.click())},x=async e=>{y(!0),p(!0),_(null);try{let t=await ht.upload(J,{body:{file:e,dryRun:d.current?`true`:`false`,duplicate:m}});_(t),d.current||c?.()}catch(e){r.error(e instanceof Error?e.message:`导入失败`),y(!1)}finally{p(!1)}},ee=async()=>{let e=await(await ht.download(on)).blob();Vt(e,`${a}导入模板.xlsx`)};return e===`identity.users`?/* @__PURE__ */ U(V,{children:[/* @__PURE__ */ H(`input`,{ref:l,type:`file`,accept:`.xlsx`,style:{display:`none`},onChange:e=>{let t=e.target.files?.[0];e.target.value=``,t&&x(t)}}),/* @__PURE__ */ H(M,{trigger:`click`,position:`bottomLeft`,clickToHide:!0,render:/* @__PURE__ */ U(M.Menu,{children:[/* @__PURE__ */ H(M.Item,{onClick:()=>b(!1),children:`上传文件导入`}),/* @__PURE__ */ H(M.Item,{onClick:()=>b(!0),children:`预检文件(仅校验不落库)`}),/* @__PURE__ */ H(M.Item,{onClick:()=>void ee(),children:`下载导入模板`}),/* @__PURE__ */ H(M.Item,{children:/* @__PURE__ */ H(t,{"aria-label":`重复数据处理`,value:m,onChange:e=>h(e),optionList:[{value:`error`,label:`重复时报错`},{value:`skip`,label:`跳过重复用户`},{value:`update`,label:`更新已有用户`}]})})]}),children:/* @__PURE__ */ U(k,{icon:/* @__PURE__ */ H(Te,{size:14}),loading:f,children:[o,` `,/* @__PURE__ */ H(me,{size:12})]})}),/* @__PURE__ */ H(i,{title:`${a}导入`,visible:v,maskClosable:!1,closable:!f,onCancel:()=>y(!1),width:640,footer:/* @__PURE__ */ H(k,{type:`primary`,disabled:f,onClick:()=>y(!1),children:`完成`}),children:f?/* @__PURE__ */ H(n.Text,{children:`正在同步处理,请等待当前请求完成。`}):g&&/* @__PURE__ */ U(V,{children:[g.dryRun&&/* @__PURE__ */ H(n.Text,{type:`warning`,children:`预检模式:仅校验数据,不写入任何记录。`}),/* @__PURE__ */ U(n.Paragraph,{children:[`共 `,g.total,` 行,成功 `,g.success,`,失败 `,g.failed,`,跳过 `,g.skipped]}),/* @__PURE__ */ H(u,{rowKey:`row`,size:`small`,dataSource:g.rows,columns:[{title:`行`,dataIndex:`row`,width:70},{title:`内容`,dataIndex:`label`},{title:`结果`,dataIndex:`status`,width:80,render:e=>/* @__PURE__ */ H(N,{color:e===`failed`?`red`:e===`success`?`green`:`grey`,children:e===`failed`?`失败`:e===`success`?`成功`:`跳过`})},{title:`说明`,dataIndex:`message`}],pagination:{pageSize:8}})]})})]}):null}function Rn(){return(Rn=e((()=>{D(),pe(),we()})))()}function zn(e){return/* @__PURE__ */ H(Ln,{...e})}function Bn(){return(Bn=e((()=>{Rn()})))()}function Vn({entity:e,id:t,field:r,value:i}){let a=$t({entity:e,id:t,field:r});if(i==null||i===``)return/* @__PURE__ */ H(n.Text,{type:`quaternary`,children:g});let o=a.isMasked&&a.canReveal,s=a.revealed??i;return/* @__PURE__ */ U(`span`,{className:`sensitive-text`,children:[/* @__PURE__ */ H(n.Text,{ellipsis:{showTooltip:!0},style:{minWidth:0},children:s}),o&&(a.revealed===null?/* @__PURE__ */ H(O,{content:`查看明文(记录审计)`,children:/* @__PURE__ */ H(k,{size:`small`,theme:`borderless`,type:`tertiary`,icon:/* @__PURE__ */ H(dn,{size:14}),loading:a.revealing,"aria-label":`查看明文`,onClick:()=>void a.show()})}):/* @__PURE__ */ U(V,{children:[/* @__PURE__ */ H(O,{content:`复制明文`,children:/* @__PURE__ */ H(k,{size:`small`,theme:`borderless`,type:`tertiary`,icon:/* @__PURE__ */ H(ye,{size:14}),"aria-label":`复制明文`,onClick:()=>void F(a.revealed??``)})}),/* @__PURE__ */ H(O,{content:`收起`,children:/* @__PURE__ */ H(k,{size:`small`,theme:`borderless`,type:`tertiary`,icon:/* @__PURE__ */ H(xe,{size:14}),"aria-label":`收起明文`,onClick:a.hide})})]}))]})}function Hn(){return(Hn=e((()=>{D(),ve(),Y(),be(),Ye(),h()})))()}function $(e){return e.username.trim().toLowerCase()===`admin`}function Un(){let{hasPermission:e}=yt(),{updateUser:n,user:i}=zt(),{page:a,pageSize:o,buildPagination:s,draftParams:c,bind:u,bindKeyword:m,submittedParams:h,handleSearch:g,applySearch:b,handleReset:S}=xt({defaults:Wn,listKey:Rt.lists});wt([`keyword`],e=>b({...Wn,keyword:e.keyword??``}));let[C,te]=B(!1),w=z(null),[oe,ce]=B(null),[le,ue]=B(!1),[de,fe]=B(null),[pe,me]=B(!1),[T,he]=B(null),[ve,ye]=B(!1),[be,xe]=B([]),[Ce,we]=B(null),[Te,Ee]=B(!1),[D,O]=B(null),[ke,M]=B(!1),P=Ht().data?.externalLogin===!0,[Ae,Ne]=B(null),[Pe,Le]=B(``),[Be,Ve]=B(``),[He,Ge]=B(``),{items:qe}=mt(`common_status`),{options:Je}=mt(`user_gender`),[F,Ye]=B([]),[Xe,I]=B([]),$e=e(`system:role:list`),et=e(`system:department:list`),nt=e(`system:position:list`),it=Qt({enabled:$e}),at=Xt({enabled:et}),ot=Zt({enabled:nt}),st=qt(),ct=it.data??Kn,W=at.data??qn,ht=ot.data??Jn,G=st.data?.identitySecurity.password??null,_t=bt({keyword:h.keyword,phone:h.phone,departmentId:h.departmentId,status:pt(ft,h.status),...Ct(h.timeRange)}),vt=Lt({page:a,pageSize:o,..._t}),K=vt.data?.list??Gn,Mt=jt(),Pt=At(),Bt=Ot(),Vt=Nt(),Ut=Dt(),Wt=Dt(),Gt=Et(),$t=Tt(),tn=It(T?.id,ve),nn=kt(),rn=z(null),q=We({entityName:`用户`,save:Ue(Mt,{create:gt.create.input.shape.body,update:gt.update.input.shape.body}),useDetail:Ft,defaults:{positionIds:[],roleIds:[],status:`enabled`},toValues:e=>({username:e.username,nickname:e.nickname,email:e.email??void 0,phone:e.phone??void 0,gender:e.gender??void 0,birthDate:e.birthDate??void 0,departmentId:e.departmentId??void 0,positionIds:e.positionIds??e.positions?.map(e=>e.id)??[],roleIds:e.roles.map(e=>e.id),status:e.status}),beforeSave:(e,{editing:t})=>{let n=rn.current,i=n?n.strip(e):e,a=[];t&&(i.departmentId??a.push(`departmentId`),`email`in i&&!i.email&&a.push(`email`),`phone`in i&&!i.phone&&a.push(`phone`),i.gender||a.push(`gender`),i.birthDate||a.push(`birthDate`));let o={username:i.username,nickname:i.nickname,email:i.email||void 0,phone:i.phone||void 0,departmentId:i.departmentId??void 0,gender:i.gender||void 0,birthDate:i.birthDate?St(i.birthDate):void 0,positionIds:i.positionIds??[],roleIds:i.roleIds??[],status:i.status,...t?{clearFields:a}:{password:i.password}};return`email`in i||delete o.email,`phone`in i||delete o.phone,t&&$(t)&&i.status===`disabled`&&(r.warning(`admin 账号不允许禁用`),dt(`admin_status_forbidden`)),P?{departmentId:o.departmentId,positionIds:o.positionIds,roleIds:o.roleIds,status:o.status,clearFields:i.departmentId==null?[`departmentId`]:[]}:o},labelWidth:72}),an=q.editing,on=en({entity:`User`,fields:[`email`,`phone`],record:an});rn.current=on;let J=We({save:{mutateAsync:async({id:e,values:t})=>(e??dt(`missing_user`),await Pt.mutateAsync({params:{id:e},body:{password:t.password}}),{}),isPending:!1},beforeSave:e=>(e.password!==e.confirmPassword&&(r.error(`两次密码输入不一致`),dt(`password_not_match`)),e),successMessage:()=>`密码修改成功`,onSaved:()=>Ve(``)}),sn=e(`system:log:login`),ln=e(`system:log:operation`),un=sn||ln,dn=R(()=>{if(!K.length)return 0;let e=new Set(F);return K.filter(t=>e.has(t.id)&&!$(t)).length},[K,F]),Y=R(()=>{if(!K.length)return[];let e=new Set(F);return K.filter(t=>e.has(t.id)&&!$(t)).map(e=>e.id)},[K,F]),fn=Me({toggle:(e,t)=>Wt.mutateAsync({body:{ids:[e.id],status:t?`enabled`:`disabled`}}),confirmDisable:e=>({danger:!0,title:`确认停用用户「${e.nickname??e.username}」?`,content:`停用后该用户将无法登录。`,okText:`确认停用`}),disabled:t=>$(t)||!e(`system:user:update`)}),mn=yn({selectedRowKeys:Y,clearSelection:()=>Ye([]),run:(e,t)=>Ut.mutateAsync({body:{ids:e,status:t}}),confirm:`always`,entity:`个用户`,confirmContent:e=>e===`disabled`?`停用后该用户将无法登录。`:`启用后该用户可正常登录。`,danger:!0}),hn=()=>{let e=K.filter(e=>F.includes(e.id)&&!$(e)).map(e=>e.id);e.length===0?r.warning(`admin 账号不允许删除`):Re({title:`确认删除选中的 ${e.length} 个用户?`,content:`删除后无法恢复,请谨慎操作。`,run:()=>Bt.mutateAsync(e),successMessage:`批量删除成功`,onDeleted:()=>Ye([])})},gn=R(()=>Yt(W,{keepEmptyChildren:!0}),[W]),X=R(()=>W.map(e=>String(e.id)),[W]),Z=z(!1);ut(()=>{Z.current||W.length===0||(Z.current=!0,I(X))},[X,W.length]);let _n=Jt(Xe,X);function vn(){I(_n?[]:X)}let bn=R(()=>ht.map(e=>({value:e.id,label:e.name})),[ht]),Sn=q.openCreate,Tn=q.openEdit,En=J.openEdit,{mutateAsync:On}=Vt,kn=lt(async e=>{await On({params:{id:e}}),r.success(`已清除登录验证码要求`)},[On]),{mutateAsync:An}=nn,{refetch:Q}=vt,Mn=R(()=>[{title:`用户`,dataIndex:`nickname`,minWidth:260,ellipsis:{showTitle:!1},render:(e,t)=>/* @__PURE__ */ U(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,minWidth:0},children:[/* @__PURE__ */ H(`span`,{title:t.isOnline?`在线`:`离线`,style:{flexShrink:0,width:8,height:8,borderRadius:`50%`,background:t.isOnline?`var(--arc-antd-color-success)`:`var(--arc-antd-color-fill-2)`,display:`inline-block`,boxShadow:t.isOnline?`0 0 0 2px color-mix(in srgb, var(--arc-antd-color-success) 20%, transparent)`:void 0}}),/* @__PURE__ */ H(Ze,{name:t.nickname||t.username,avatar:t.avatar,size:24}),/* @__PURE__ */ U(`span`,{className:`table-cell-ellipsis`,title:`${t.externalDisplayName||t.nickname}(${t.externalUsername||t.username})`,children:[t.externalDisplayName||t.nickname,`(`,t.externalUsername||t.username,`)`,t.accountSource===`casdoor`&&/* @__PURE__ */ U(N,{size:`small`,children:[`Casdoor · `,t.remoteStatus===`active`?`有效`:`停用或删除`]})]}),t.loginChallengeRequired&&/* @__PURE__ */ H(N,{size:`small`,color:`orange`,style:{flexShrink:0},children:`需验证码`})]})},{title:`手机号码`,dataIndex:`phone`,width:150,render:(e,t)=>/* @__PURE__ */ H(Vn,{entity:`User`,id:t.id,field:`phone`,value:e})},{title:`邮箱`,dataIndex:`email`,defaultHidden:!0,width:240,render:(e,t)=>/* @__PURE__ */ H(Vn,{entity:`User`,id:t.id,field:`email`,value:e})},{title:`部门`,dataIndex:`departmentName`,width:140,render:p},{..._({title:`岗位`,dataIndex:`positions`,width:160,contentWidth:128,getItems:e=>(e??[]).map(e=>({key:String(e.id),label:e.name})),tagColor:`purple`,popoverWidth:200,empty:/* @__PURE__ */ H(N,{color:`grey`,children:`无岗位`})}),defaultHidden:!0},_({title:`角色`,dataIndex:`roles`,width:180,contentWidth:148,getItems:e=>e.map(e=>({key:String(e.id),label:e.name})),tagColor:`blue`,popoverWidth:240,empty:/* @__PURE__ */ H(N,{color:`grey`,children:`无角色`})}),{title:`性别`,dataIndex:`gender`,defaultHidden:!0,width:80,render:e=>e?/* @__PURE__ */ H(tt,{dictCode:`user_gender`,value:e}):null},l(`最近登录`,`lastLoginAt`,{defaultHidden:!0}),l(`最近活跃`,`lastActiveAt`,{defaultHidden:!0}),{title:`关联信息`,key:`relations`,defaultHidden:!0,width:120,render:(e,t)=>/* @__PURE__ */ H(Se,{entityRef:{type:`identity.user`,key:String(t.id)}})},{...f,defaultHidden:!0},fn.column(),Fe({width:180,desktopInlineKeys:[`edit`,`delete`],actions:t=>{let n=$(t);return[{key:`edit`,label:P?`本应用权限`:`编辑`,hidden:!e(`system:user:update`),onClick:()=>{Tn(t)}},{key:`directory-profile`,label:`统一账户资料`,hidden:!P||!e(`system:user:update`),onClick:()=>Ne(t)},Ie({hidden:P||!e(`system:user:delete`),disabled:n,disabledReason:`admin 账号不允许删除`,title:`确定要删除该用户吗?`,run:()=>Bt.mutateAsync([t.id])}),{key:`avatar`,label:`管理头像`,hidden:P||!e(`system:user:update`),onClick:()=>{we(t),Ee(!0)}},{key:`password`,label:`修改密码`,hidden:P||!e(`system:user:update`),onClick:()=>{En(t)}},{key:`unlock`,label:`清除登录验证码要求`,hidden:!t.loginChallengeRequired||!e(`system:user:update`),onClick:()=>kn(t.id)},{key:`logs`,label:`登录与操作记录`,hidden:!un,onClick:()=>{O(t),M(!0)}},{key:`menu-permission`,label:`菜单权限`,hidden:!e(`system:user:assign`),onClick:()=>{ce(t),ue(!0)}},{key:`assign-role`,label:`分配角色`,hidden:!e(`system:user:assign`),onClick:()=>{he(t),xe(t.roles.map(e=>e.id)),ye(!0)}},{key:`data-permission`,label:`数据权限`,hidden:!e(`system:user:assign`),onClick:()=>{fe(t),me(!0)}},{key:`force-logout`,label:`强制下线`,danger:!0,dividerBefore:!0,hidden:!e(`system:session:forceLogout`),disabled:!t.isOnline,disabledReason:`该用户当前不在线`,onClick:()=>{je({title:`强制下线`,content:`确定要强制下线用户「${t.nickname}(${t.username})」的全部会话吗?`,onOk:async()=>{await An({params:{id:t.id}}),r.success(`已强制下线`),Q()}})}}]}})],[P,e,fn,Bt,kn,An,Q,Tn,En,un]),[Pn,In]=B(!1),[Ln,Rn]=B(!1),Bn=/* @__PURE__ */ U(`div`,{className:`users-dept-sidebar`,children:[/* @__PURE__ */ H(ne.Header,{className:`users-dept-sidebar-title`,style:{padding:`10px 12px`,minHeight:44,marginBottom:4},extra:/* @__PURE__ */ H(k,{className:`users-dept-tree-action`,theme:`borderless`,size:`small`,icon:H(_n?ge:_e,{size:14}),onClick:vn,children:_n?`全部折叠`:`全部展开`}),children:/* @__PURE__ */ H(`span`,{className:`users-dept-sidebar-title-text`,children:`组织架构`})}),/* @__PURE__ */ H(De,{treeData:gn,expandedKeys:Xe,value:c.departmentId===void 0?void 0:String(c.departmentId),filterTreeNode:!0,showFilteredOnly:!0,searchPlaceholder:`全部部门`,onExpand:e=>{I(e.map(String))},onSelect:e=>{let t=e,n=t?Number(t):void 0,r={...c,departmentId:n};b(r),In(!1)},style:{width:`100%`}})]}),Hn=(e=!1)=>/* @__PURE__ */ H(k,{theme:`borderless`,icon:/* @__PURE__ */ H(cn,{size:14}),onClick:()=>In(!0),style:{display:e||Ln?void 0:`none`},children:`按部门`}),Un=()=>/* @__PURE__ */ U(V,{children:[!P&&dn>0&&e(`system:user:delete`)&&/* @__PURE__ */ H(ae,{count:dn,onClick:hn}),Y.length>0&&e(`system:user:update`)&&/* @__PURE__ */ U(V,{children:[/* @__PURE__ */ H(re,{count:Y.length,onChange:mn,danger:!0}),!P&&/* @__PURE__ */ U(k,{theme:`light`,icon:/* @__PURE__ */ H(pn,{size:14}),onClick:()=>te(!0),children:[`批量修改密码 (`,Y.length,`)`]})]})]}),Yn=()=>!P&&e(`system:user:import`)?/* @__PURE__ */ H(zn,{entity:`identity.users`,title:`用户`,onFinished:()=>void Q()}):null;return/* @__PURE__ */ U(`div`,{className:`page-container page-container--stretch`,children:[/* @__PURE__ */ H(ne,{master:Bn,detail:/* @__PURE__ */ H(`div`,{className:`users-content`,children:/* @__PURE__ */ H(v,{searchConfig:d({keyword:/* @__PURE__ */ H(x,{placeholder:`搜索用户名/昵称/邮箱`,...m(`keyword`),width:260}),filters:/* @__PURE__ */ U(V,{children:[/* @__PURE__ */ H(x,{placeholder:`搜索手机号码`,...m(`phone`),width:180}),/* @__PURE__ */ H(y,{items:qe,...u(`status`)}),/* @__PURE__ */ H(ee,{placeholder:[`开始时间`,`结束时间`],...u(`timeRange`)})]}),onSearch:g,onReset:S,create:/* @__PURE__ */ H(ie,{permission:`system:user:create`,onClick:()=>P?Ne(!0):Sn()}),actions:/* @__PURE__ */ U(V,{children:[Hn(),Un(),/* @__PURE__ */ H(rt,{entity:`system.users`,query:_t,watermark:!1,permission:`system:user:export`}),Yn(),P&&/* @__PURE__ */ H(Cn,{administrator:i?.roles.some(e=>e.code===`super_admin`)??!1})]}),filterTitle:`用户筛选`,actionTitle:`用户操作`}),columns:Mn,...ze(vt,{pagination:s,empty:`暂无数据`,rowSelection:{selectedRowKeys:F,onChange:e=>{let t=(e??[]).map(Number),n=new Set(t),i=K.filter(e=>$(e)).map(e=>e.id),a=t.filter(e=>!i.includes(e));a.length<t.length&&i.some(e=>n.has(e))&&r.warning(`admin 账号不支持批量删除`),Ye(a)}}})})}),defaultSize:220,minSize:160,maxSize:400,showDetail:!Pn,onMasterBack:()=>In(!1),masterBackLabel:`返回用户列表`,onResponsiveChange:Rn,persistKey:`users`,style:{flex:1,minHeight:0,overflow:`hidden`}}),Ae&&/* @__PURE__ */ H(wn,{user:Ae===!0?void 0:Ae,onClose:()=>{Ne(null),Q()}}),/* @__PURE__ */ U(Ke,{modal:q,okButtonProps:{disabled:q.detailLoading},width:660,children:[an?/* @__PURE__ */ U(V,{children:[/* @__PURE__ */ U(A,{gutter:16,children:[/* @__PURE__ */ H(j,{span:12,children:/* @__PURE__ */ H(E.Input,{field:`username`,label:`用户名`,disabled:!0})}),/* @__PURE__ */ H(j,{span:12,children:/* @__PURE__ */ H(E.Input,{field:`nickname`,label:`昵称`,disabled:P,placeholder:`请输入昵称`,rules:[{required:!0,message:`请输入昵称`}]})})]}),/* @__PURE__ */ H(A,{gutter:16,children:/* @__PURE__ */ H(j,{span:12,children:/* @__PURE__ */ H(xn,{control:on,disabled:P,field:`phone`,label:`手机号码`,placeholder:`请输入手机号码`,rules:[{pattern:/^1[3-9]\d{9}$/,message:`请输入正确的手机号码`}]})})})]}):/* @__PURE__ */ U(V,{children:[/* @__PURE__ */ U(A,{gutter:16,children:[/* @__PURE__ */ H(j,{span:12,children:/* @__PURE__ */ H(E.Input,{field:`username`,label:`用户名`,placeholder:`请输入用户名`,rules:[{required:!0,message:`请输入用户名`}]})}),/* @__PURE__ */ H(j,{span:12,children:/* @__PURE__ */ H(E.Input,{field:`nickname`,label:`昵称`,disabled:P,placeholder:`请输入昵称`,rules:[{required:!0,message:`请输入昵称`}]})})]}),/* @__PURE__ */ U(A,{gutter:16,children:[/* @__PURE__ */ H(j,{span:12,children:/* @__PURE__ */ H(L,{field:`password`,label:`密码`,placeholder:`请输入密码`,rules:[{required:!0,message:`请输入密码`}],onChange:e=>Le(String(e??``)),helpText:/* @__PURE__ */ H(se,{password:Pe,policy:G})})}),/* @__PURE__ */ H(j,{span:12,children:/* @__PURE__ */ H(E.Input,{field:`phone`,label:`手机号码`,placeholder:`请输入手机号码`,rules:[{pattern:/^1[3-9]\d{9}$/,message:`请输入正确的手机号码`}]})})]})]}),/* @__PURE__ */ U(A,{gutter:16,children:[/* @__PURE__ */ H(j,{span:12,children:/* @__PURE__ */ H(xn,{control:on,field:`email`,disabled:P,label:`邮箱`,placeholder:`请输入邮箱`,rules:[{type:`email`,message:`邮箱格式不正确`}]})}),/* @__PURE__ */ H(j,{span:12,children:/* @__PURE__ */ H(E.TreeSelect,{field:`departmentId`,label:`所属部门`,disabled:!et,style:{width:`100%`},treeData:gn,placeholder:`请选择所属部门`,filterTreeNode:!0,showClear:!0})})]}),/* @__PURE__ */ U(A,{gutter:16,children:[/* @__PURE__ */ H(j,{span:12,children:/* @__PURE__ */ H(E.Select,{field:`positionIds`,label:`岗位`,disabled:!nt,style:{width:`100%`},multiple:!0,filter:!0,showClear:!0,optionList:bn,placeholder:`请选择岗位`})}),/* @__PURE__ */ H(j,{span:12,children:/* @__PURE__ */ H(E.Select,{field:`roleIds`,label:`角色`,disabled:!$e,style:{width:`100%`},multiple:!0,filter:!0,optionList:ct.map(e=>({value:e.id,label:e.name})),placeholder:`请选择角色`})})]}),/* @__PURE__ */ U(A,{gutter:16,children:[/* @__PURE__ */ H(j,{span:12,children:/* @__PURE__ */ H(E.Select,{field:`gender`,disabled:P,label:`性别`,style:{width:`100%`},showClear:!0,optionList:Je,placeholder:`请选择性别`})}),/* @__PURE__ */ H(j,{span:12,children:/* @__PURE__ */ H(E.DatePicker,{field:`birthDate`,disabled:P,label:`出生日期`,type:`date`,style:{width:`100%`},placeholder:`请选择出生日期`,showClear:!0})})]}),/* @__PURE__ */ H(A,{gutter:16,children:/* @__PURE__ */ H(j,{span:12,children:/* @__PURE__ */ H(E.Select,{field:`status`,label:`状态`,style:{width:`100%`},optionList:qe.map(e=>({value:e.value,label:e.label,disabled:an?$(an)&&e.value===`disabled`:!1})),placeholder:`请选择状态`})})})]}),/* @__PURE__ */ U(Ke,{modal:J,title:J.editing?`修改密码 - ${J.editing.nickname}`:`修改密码`,onCancel:()=>{J.close(),Ve(``)},width:420,children:[/* @__PURE__ */ H(L,{field:`password`,label:`新密码`,placeholder:`请输入新密码`,rules:[{required:!0,message:`请输入新密码`},{min:6,message:`密码至少 6 个字符`}],onChange:e=>Ve(String(e??``)),helpText:/* @__PURE__ */ H(se,{password:Be,policy:G})}),/* @__PURE__ */ H(L,{field:`confirmPassword`,label:`确认密码`,placeholder:`请再次输入新密码`,rules:[{required:!0,message:`请确认新密码`}]})]}),!1,/* @__PURE__ */ H(Qe,{title:`批量修改密码(共 ${Y.length} 个用户)`,visible:C,onCancel:()=>{te(!1),w.current?.setValues({password:``,confirmPassword:``}),Ge(``)},confirmLoading:Gt.isPending,onOk:async()=>{if(w.current)try{let e=await w.current.validate();if(e.password!==e.confirmPassword){w.current.setError(`confirmPassword`,`两次密码输入不一致`);return}await Gt.mutateAsync({body:{ids:Y,password:e.password}}),r.success(`密码修改成功`),te(!1),w.current.setValues({password:``,confirmPassword:``}),Ge(``),Ye([])}catch{}},children:/* @__PURE__ */ U(E,{getFormApi:e=>{w.current=e},labelPosition:`left`,labelWidth:90,children:[/* @__PURE__ */ H(L,{field:`password`,label:`新密码`,placeholder:G?Kt(G):`请输入新密码`,rules:[{required:!0,message:`请输入新密码`}],onChange:e=>Ge(String(e??``)),helpText:/* @__PURE__ */ H(se,{password:He,policy:G})}),/* @__PURE__ */ H(L,{field:`confirmPassword`,label:`确认密码`,placeholder:`请再次输入新密码`,rules:[{required:!0,message:`请确认密码`}]})]})}),Ce&&/* @__PURE__ */ H(Nn,{visible:Te,user:Ce,onClose:()=>Ee(!1),onUpdated:e=>{vt.refetch(),we(e),n(e)}}),D&&/* @__PURE__ */ H(Fn,{visible:ke,userId:D.id,userName:`${D.nickname||D.username}(${D.username})`,canViewLoginLogs:sn,canViewOperationLogs:ln,onClose:()=>M(!1)}),oe&&/* @__PURE__ */ H(Dn,{userId:oe.id,userName:oe.nickname||oe.username,visible:le,onClose:()=>ue(!1)}),de&&/* @__PURE__ */ H(jn,{userId:de.id,userName:de.nickname||de.username,visible:pe,deptTree:W,onClose:()=>me(!1)}),/* @__PURE__ */ U(Qe,{title:`分配角色——${T?.nickname||T?.username||``}`,visible:ve,onCancel:()=>ye(!1),confirmLoading:$t.isPending,onOk:async()=>{T&&(await $t.mutateAsync({params:{id:T.id},body:{roleIds:be}}),r.success(`角色分配成功`),ye(!1))},okText:`保存`,cancelText:`取消`,width:480,children:[/* @__PURE__ */ U(`div`,{children:[/* @__PURE__ */ H(`div`,{style:{marginBottom:6,fontSize:13,fontWeight:600},children:`直接分配角色`}),/* @__PURE__ */ H(t,{multiple:!0,filter:!0,showClear:!0,style:{width:`100%`},value:be,onChange:e=>xe(e??[]),optionList:ct.map(e=>({value:e.id,label:e.name})),placeholder:`请选择要分配的角色`})]}),/* @__PURE__ */ U(`div`,{style:{marginTop:18,paddingTop:14,borderTop:`1px solid var(--arc-antd-color-border)`},children:[/* @__PURE__ */ H(`div`,{style:{marginBottom:6,fontSize:13,fontWeight:600},children:`用户组继承角色`}),/* @__PURE__ */ H(`div`,{style:{marginBottom:8,fontSize:12,color:`var(--arc-antd-color-text-2)`},children:`以下角色由用户组自动继承,只能在用户组中调整。`}),tn.isFetching?/* @__PURE__ */ H(`div`,{style:{color:`var(--arc-antd-color-text-2)`,fontSize:12},children:`正在加载继承关系…`}):tn.data?.inheritedRoles.length?/* @__PURE__ */ H(Oe,{spacing:6,wrap:!0,children:tn.data.inheritedRoles.map(e=>/* @__PURE__ */ U(N,{color:`orange`,style:{marginBottom:4},children:[e.name,`(来自:`,e.groupNames.join(`、`),`)`]},e.id))}):/* @__PURE__ */ H(`div`,{style:{color:`var(--arc-antd-color-text-2)`,fontSize:12},children:`暂无用户组继承角色`})]})]})]})}var Wn,Gn,Kn,qn,Jn;function Yn(){return(Yn=e((()=>{En(),$e(),Ce(),D(),he(),T(),ln(),mn(),Xe(),oe(),et(),I(),m(),te(),Pe(),h(),On(),Mn(),Pn(),In(),nt(),Bn(),w(),b(),P(),bn(),Le(),c(),Ne(),He(),Sn(),Hn(),Ge(),Wn={keyword:``,phone:``,status:void 0,timeRange:null,departmentId:void 0},Gn=[],Kn=[],qn=[],Jn=[]})))()}Yn();export{Un as default};
@@ -0,0 +1 @@
1
+ import{n as e}from"./rolldown-runtime-BKuNeK48.js";import{n as t}from"./chunk-XHIXRSVI-C2X1-xC6.js";import{n,r}from"./chunk-Y2CYZVJY-DjEHBC-3.js";import{C as i,w as a}from"./src-C1iDJpBK.js";import{j as o}from"./chunk-DU6HZSFF-Bx48E1rg.js";import{t as s}from"./chunk-CLGD4ZFX-tRS89bnq.js";import{i as c,n as l,r as u,t as d}from"./chunk-SVP7TREG-BKCgUOuy.js";import{n as f,t as p}from"./chunk-JWPE2WC7-Wk0BVLn5.js";import{n as m,t as h}from"./mermaid-parser.core-DvCAQkzY.js";var g,_,v,y,b,x,S,C,w;function T(){return(T=e((()=>{u(),p(),s(),o(),i(),r(),m(),g=t().RailroadAbnf.parser.LangiumParser,_=/* @__PURE__ */ n(e=>{let t=e.alternatives.map(v);return t.length===1?t[0]:{type:`choice`,alternatives:t}},`transformAlternation`),v=/* @__PURE__ */ n(e=>{let t=e.elements.map(b);return t.length===1?t[0]:{type:`sequence`,elements:t}},`transformConcatenation`),y=/* @__PURE__ */ n(e=>{if(e.includes(`*`)){let[t,n]=e.split(`*`);return{min:t?parseInt(t,10):0,max:n?parseInt(n,10):1/0}}let t=parseInt(e,10);return{min:t,max:t}},`parseRepeat`),b=/* @__PURE__ */ n(e=>{let t=x(e.primary);if(!e.repeat)return t;let{min:n,max:r}=y(e.repeat);return n===0&&r===1?{type:`optional`,element:t}:{type:`repetition`,element:t,min:n,max:r}},`transformElement`),x=/* @__PURE__ */ n(e=>{switch(e.$type){case`AbnfStringLiteral`:return{type:`terminal`,value:e.value};case`AbnfNumVal`:return{type:`terminal`,value:e.value};case`AbnfRuleName`:return{type:`nonterminal`,name:e.name};case`AbnfGroup`:return _(e.element);case`AbnfOptionalGroup`:return{type:`optional`,element:_(e.element)};default:throw Error(`Unsupported ABNF primary node: ${e.$type}`)}},`transformPrimary`),S=/* @__PURE__ */ n(e=>({name:e.name,definition:_(e.definition)}),`transformRule`),C=/* @__PURE__ */ n(e=>{f(e,d),e.title&&d.setTitle(e.title),e.rules.map(e=>d.addRule(S(e)))},`populateDb`),w={parser:{parse:/* @__PURE__ */ n(e=>{d.clear(),a.debug(`[ABNF Parser] Starting Langium parse`);let t=g.parse(e);if(t.lexerErrors.length>0||t.parserErrors.length>0)throw new h(t);let n=t.value;a.debug(`[ABNF Parser] Parsed rules:`,n.rules.length),C(n),a.debug(`[ABNF Parser] Parse complete`)},`parse`),parser:{yy:d}},db:d,renderer:c,styles:l}})))()}T();export{w as diagram};
@@ -0,0 +1,8 @@
1
+ import{n as e}from"./rolldown-runtime-BKuNeK48.js";import{n as t,t as n}from"./createLucideIcon-BtwfYE6A.js";var r,i;function a(){return(a=e((()=>{
2
+ /**
3
+ * @license lucide-react v1.53.0 - ISC
4
+ *
5
+ * This source code is licensed under the ISC license.
6
+ * See the LICENSE file in the root directory of this source tree.
7
+ */
8
+ t(),r={name:`activity`,size:24,node:[[`path`,{d:`M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2`,key:`169zse`}]]},r.node,i=n(r)})))()}export{a as n,i as t};
@@ -0,0 +1 @@
1
+ import{n as e}from"./rolldown-runtime-BKuNeK48.js";import{n as t,r as n,t as r}from"./path-VUNELGFR.js";import{a as i,c as a,d as o,f as s,h as c,i as l,l as u,m as d,n as f,o as p,p as m,r as h,u as g}from"./dist-DdW4yNBK.js";function _(e){return e.innerRadius}function v(e){return e.outerRadius}function y(e){return e.startAngle}function b(e){return e.endAngle}function x(e){return e&&e.padAngle}function S(e,t,n,r,i,a,o,s){var c=n-e,l=r-t,u=o-i,d=s-a,f=d*c-u*l;if(!(f*f<1e-12))return f=(u*(t-a)-d*(e-i))/f,[e+f*c,t+f*l]}function C(e,t,n,r,i,a,o){var s=e-n,c=t-r,l=(o?a:-a)/d(s*s+c*c),u=l*c,f=-l*s,p=e+u,m=t+f,h=n+u,_=r+f,v=(p+h)/2,y=(m+_)/2,b=h-p,x=_-m,S=b*b+x*x,C=i-a,w=p*_-h*m,T=(x<0?-1:1)*d(g(0,C*C*S-w*w)),E=(w*x-b*T)/S,D=(-w*b-x*T)/S,O=(w*x+b*T)/S,k=(-w*b+x*T)/S,A=E-v,j=D-y,M=O-v,N=k-y;return A*A+j*j>M*M+N*N&&(E=O,D=k),{cx:E,cy:D,x01:-u,y01:-f,x11:E*(i/C-1),y11:D*(i/C-1)}}function w(){var e=_,r=v,u=n(0),g=null,w=y,T=b,E=x,D=null,O=t(k);function k(){var t,n,_=+e.apply(this,arguments),v=+r.apply(this,arguments),y=w.apply(this,arguments)-a,b=T.apply(this,arguments)-a,x=f(b-y),k=b>y;if(D||=t=O(),v<_&&(n=v,v=_,_=n),!(v>1e-12))D.moveTo(0,0);else if(x>c-1e-12)D.moveTo(v*p(y),v*m(y)),D.arc(0,0,v,y,b,!k),_>1e-12&&(D.moveTo(_*p(b),_*m(b)),D.arc(0,0,_,b,y,k));else{var A=y,j=b,M=y,N=b,P=x,F=x,I=E.apply(this,arguments)/2,L=I>1e-12&&(g?+g.apply(this,arguments):d(_*_+v*v)),R=o(f(v-_)/2,+u.apply(this,arguments)),z=R,B=R,V,H;if(L>1e-12){var U=l(L/_*m(I)),W=l(L/v*m(I));(P-=U*2)>1e-12?(U*=k?1:-1,M+=U,N-=U):(P=0,M=N=(y+b)/2),(F-=W*2)>1e-12?(W*=k?1:-1,A+=W,j-=W):(F=0,A=j=(y+b)/2)}var G=v*p(A),K=v*m(A),q=_*p(N),J=_*m(N);if(R>1e-12){var Y=v*p(j),X=v*m(j),Z=_*p(M),Q=_*m(M),$;if(x<s){if($=S(G,K,Z,Q,Y,X,q,J)){var ee=G-$[0],te=K-$[1],ne=Y-$[0],re=X-$[1],ie=1/m(h((ee*ne+te*re)/(d(ee*ee+te*te)*d(ne*ne+re*re)))/2),ae=d($[0]*$[0]+$[1]*$[1]);z=o(R,(_-ae)/(ie-1)),B=o(R,(v-ae)/(ie+1))}else z=B=0}}F>1e-12?B>1e-12?(V=C(Z,Q,G,K,v,B,k),H=C(Y,X,q,J,v,B,k),D.moveTo(V.cx+V.x01,V.cy+V.y01),B<R?D.arc(V.cx,V.cy,B,i(V.y01,V.x01),i(H.y01,H.x01),!k):(D.arc(V.cx,V.cy,B,i(V.y01,V.x01),i(V.y11,V.x11),!k),D.arc(0,0,v,i(V.cy+V.y11,V.cx+V.x11),i(H.cy+H.y11,H.cx+H.x11),!k),D.arc(H.cx,H.cy,B,i(H.y11,H.x11),i(H.y01,H.x01),!k))):(D.moveTo(G,K),D.arc(0,0,v,A,j,!k)):D.moveTo(G,K),!(_>1e-12)||!(P>1e-12)?D.lineTo(q,J):z>1e-12?(V=C(q,J,Y,X,_,-z,k),H=C(G,K,Z,Q,_,-z,k),D.lineTo(V.cx+V.x01,V.cy+V.y01),z<R?D.arc(V.cx,V.cy,z,i(V.y01,V.x01),i(H.y01,H.x01),!k):(D.arc(V.cx,V.cy,z,i(V.y01,V.x01),i(V.y11,V.x11),!k),D.arc(0,0,_,i(V.cy+V.y11,V.cx+V.x11),i(H.cy+H.y11,H.cx+H.x11),k),D.arc(H.cx,H.cy,z,i(H.y11,H.x11),i(H.y01,H.x01),!k))):D.arc(0,0,_,N,M,k)}if(D.closePath(),t)return D=null,t+``||null}return k.centroid=function(){var t=(+e.apply(this,arguments)+ +r.apply(this,arguments))/2,n=(+w.apply(this,arguments)+ +T.apply(this,arguments))/2-s/2;return[p(n)*t,m(n)*t]},k.innerRadius=function(t){return arguments.length?(e=typeof t==`function`?t:n(+t),k):e},k.outerRadius=function(e){return arguments.length?(r=typeof e==`function`?e:n(+e),k):r},k.cornerRadius=function(e){return arguments.length?(u=typeof e==`function`?e:n(+e),k):u},k.padRadius=function(e){return arguments.length?(g=e==null?null:typeof e==`function`?e:n(+e),k):g},k.startAngle=function(e){return arguments.length?(w=typeof e==`function`?e:n(+e),k):w},k.endAngle=function(e){return arguments.length?(T=typeof e==`function`?e:n(+e),k):T},k.padAngle=function(e){return arguments.length?(E=typeof e==`function`?e:n(+e),k):E},k.context=function(e){return arguments.length?(D=e??null,k):D},k}function T(){return(T=e((()=>{u(),r()})))()}export{T as n,w as t};
@@ -0,0 +1 @@
1
+ import{n as e}from"./rolldown-runtime-BKuNeK48.js";import{w as t}from"./chunk-FOHPRMQF-B8MMrnxV.js";import{n,r}from"./chunk-6AZGARVD-CgAiC5mV.js";function i(){return(i=e((()=>{r(),t()})))()}i();export{n as createArchitectureServices};