@txgw/payout-components 1.1.3 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (253) hide show
  1. package/dist/{AMIS-DAyIQg_G.js → AMIS-yQ-qSYx6.js} +1 -1
  2. package/dist/Action-O_zoRC90.js +1 -0
  3. package/dist/{Alert-Cp-q4PfW.js → Alert-M2uguZ2-.js} +1 -1
  4. package/dist/{AnchorNav-DRtBwJHB.js → AnchorNav-CLxVBebc.js} +1 -1
  5. package/dist/App-DCX5cbgG.js +1 -0
  6. package/dist/Audio-DHE_mJFM.js +1 -0
  7. package/dist/{Avatar-qROBlWC5.js → Avatar-BcduLEa3.js} +1 -1
  8. package/dist/BarCode-CGrg59dd.js +1 -0
  9. package/dist/{BarCode-9qcb_QZV.js → BarCode-uhJMrOnK.js} +1 -1
  10. package/dist/{Breadcrumb-CnYLTLG2.js → Breadcrumb-Bu2GK1JP.js} +1 -1
  11. package/dist/ButtonGroup-DlC6ck_w.js +1 -0
  12. package/dist/{ButtonGroupSelect-Br9QO7Ah.js → ButtonGroupSelect-e98karBC.js} +1 -1
  13. package/dist/{ButtonToolbar-DAXNty4L.js → ButtonToolbar-CVU9Sl3O.js} +1 -1
  14. package/dist/CRUD-BC-reZZf.js +1 -0
  15. package/dist/CRUD2-FL2Lf3lg.js +1 -0
  16. package/dist/{Calendar-DjdYB26f.js → Calendar-nMyeGsYx.js} +1 -1
  17. package/dist/Card-D0gZnuZy.js +1 -0
  18. package/dist/{Card2-Cu31YvK5.js → Card2-Clwjsydz.js} +1 -1
  19. package/dist/Cards-Bjesu3b3.js +1 -0
  20. package/dist/Carousel-BX16BlEp.js +1 -0
  21. package/dist/ChainedSelect-HNkJ3-dh.js +1 -0
  22. package/dist/{Chart-k2n3KbeJ.js → Chart-agJkN0ZL.js} +1 -1
  23. package/dist/{ChartRadios-Cv_E9P7l.js → ChartRadios-Bzxejcn5.js} +1 -1
  24. package/dist/Checkbox-LJ5JWlGH.js +1 -0
  25. package/dist/Checkboxes-Dai8FX75.js +1 -0
  26. package/dist/{Code-D4_QKMQI.js → Code-CssmXCo1.js} +1 -1
  27. package/dist/Collapse-CxdrbTCt.js +1 -0
  28. package/dist/{CollapseGroup-DsF-EgIN.js → CollapseGroup-DSVqVNzd.js} +1 -1
  29. package/dist/{Color-xBgwFhyM.js → Color-D_IajbVk.js} +1 -1
  30. package/dist/ColorPicker-D7vbsyrO.js +1 -0
  31. package/dist/{ColumnToggler-B4_p_fol.js → ColumnToggler-CHKOkn5W.js} +1 -1
  32. package/dist/ColumnToggler-CNtsoshN.js +1 -0
  33. package/dist/Combo-BY-auuRw.js +1 -0
  34. package/dist/{ConditionBuilder-C6y4Niek.js → ConditionBuilder-CcARxcMo.js} +1 -1
  35. package/dist/{Container-DIwv0W3y.js → Container-DJSLtDAJ.js} +1 -1
  36. package/dist/{Control-BsINOFFV.js → Control-DSGWLqqF.js} +1 -1
  37. package/dist/{Custom-UqWqkCBN.js → Custom-BYHmBkth.js} +1 -1
  38. package/dist/{Date-CwyL0i2y.js → Date-B63AkW7Z.js} +1 -1
  39. package/dist/{DateRange-BbK8plpl.js → DateRange-DJOatHqc.js} +1 -1
  40. package/dist/Dialog-kgjY-B2R.js +1 -0
  41. package/dist/{DiffEditor-DYtkyXuj.js → DiffEditor-DVtcPH19.js} +1 -1
  42. package/dist/{Divider-Dh3DN6al.js → Divider-Bhz9wUzQ.js} +1 -1
  43. package/dist/Drawer-Chy6lJ0Z.js +1 -0
  44. package/dist/DropDownButton-BWs-Bt8i.js +1 -0
  45. package/dist/{Each-BUw57vY9.js → Each-BOfQOLuK.js} +1 -1
  46. package/dist/FieldSet-B0nSnSUc.js +1 -0
  47. package/dist/{Flex-C0hNuyOd.js → Flex-CPhW10VO.js} +1 -1
  48. package/dist/{Formula-BtEwGFmI.js → Formula-DcsJiszb.js} +1 -1
  49. package/dist/{Grid2D-BxnTgVoa.js → Grid2D-CdxZo60p.js} +1 -1
  50. package/dist/{GridNav-COV2whrb.js → GridNav-Ygo_GK3C.js} +1 -1
  51. package/dist/{Group-BYOqgaHQ.js → Group-DDAf-7uz.js} +1 -1
  52. package/dist/HBox-ifP1wPkX.js +1 -0
  53. package/dist/{Hidden-SDRqFPHU.js → Hidden-BR6IyG0j.js} +1 -1
  54. package/dist/{IFrame-BKPZpwD9.js → IFrame-BxqJ3U9V.js} +1 -1
  55. package/dist/Icon-CRwFwe54.js +1 -0
  56. package/dist/IconPicker-BaSn0ir6.js +1 -0
  57. package/dist/IconSelect-B06M_oDf.js +1 -0
  58. package/dist/{IconSelectStore-Cw4MsRUx.js → IconSelectStore-CR8CK_X5.js} +1 -1
  59. package/dist/Image-CTRm12Jc.js +1 -0
  60. package/dist/{Images-BTTEJClc.js → Images-D46XKnM8.js} +1 -1
  61. package/dist/{InputArray-DvmG1NbU.js → InputArray-VGWKyEK3.js} +1 -1
  62. package/dist/InputCity-D2F8LhKN.js +1 -0
  63. package/dist/{InputColor-CuGveT2B.js → InputColor-DnQoK0vq.js} +1 -1
  64. package/dist/{InputDate-CPNZ8Ql_.js → InputDate-Dh59pmr9.js} +1 -1
  65. package/dist/{InputDateRange-CUJbjbXA.js → InputDateRange-CEYcs3US.js} +1 -1
  66. package/dist/InputExcel-44jxNcRm.js +1 -0
  67. package/dist/InputFile-BXCmkHsj.js +1 -0
  68. package/dist/{InputFormula-BlWsaRgO.js → InputFormula-BbBUGVDB.js} +1 -1
  69. package/dist/{InputGroup-B0iNRBoA.js → InputGroup-DC6UhjCD.js} +1 -1
  70. package/dist/InputImage-5cMEXqDt.js +1 -0
  71. package/dist/{InputMonthRange-CVWXFyng.js → InputMonthRange-vWfEBcgt.js} +1 -1
  72. package/dist/{InputNumber-WVrrdK5K.js → InputNumber-BroZeI3k.js} +1 -1
  73. package/dist/{InputQuarterRange-DlPmxZUk.js → InputQuarterRange-B-RgvEyL.js} +1 -1
  74. package/dist/InputRange-Bs7KposT.js +1 -0
  75. package/dist/{InputRating-CoWIusTr.js → InputRating-Cu5964Ql.js} +1 -1
  76. package/dist/{InputRepeat-vtLHisDx.js → InputRepeat-Cv2fEcrY.js} +1 -1
  77. package/dist/InputRichText-BdMa6WfT.js +1 -0
  78. package/dist/{InputSignature-BaRJvLQA.js → InputSignature-DIuwKNcw.js} +1 -1
  79. package/dist/InputSubForm-Bj00jcae.js +1 -0
  80. package/dist/InputTable-ByM68rOw.js +1 -0
  81. package/dist/InputTag-idylaKEe.js +1 -0
  82. package/dist/InputText-Cj2wp6S0.js +1 -0
  83. package/dist/InputTree-B0aSRjss.js +1 -0
  84. package/dist/{InputVerificationCode-CXfWRO0c.js → InputVerificationCode-DWmHV08K.js} +1 -1
  85. package/dist/{InputYearRange-a9R28Zzo.js → InputYearRange-D0V1t9TC.js} +1 -1
  86. package/dist/{JSONSchema-ydPGt5BM.js → JSONSchema-BNYO4lHp.js} +1 -1
  87. package/dist/{JSONSchemaEditor-DhAE991v.js → JSONSchemaEditor-DOUw4cjR.js} +1 -1
  88. package/dist/{Json-DlDI6pYj.js → Json-ChJFz16a.js} +1 -1
  89. package/dist/{Link-K8pf_CH7.js → Link-Bu3ve8g0.js} +1 -1
  90. package/dist/List-9MVmmygK.js +1 -0
  91. package/dist/{ListSelect-C5_rPp8r.js → ListSelect-CbUhVvRd.js} +1 -1
  92. package/dist/{LocationPicker-CpZbckdW.js → LocationPicker-CVmG_PU4.js} +1 -1
  93. package/dist/Log-CFLunOAF.js +1 -0
  94. package/dist/{Mapping-DKEV0yFA.js → Mapping-C6YMHlDX.js} +1 -1
  95. package/dist/{Markdown-DOG-PWSW.js → Markdown-j5efZcgS.js} +1 -1
  96. package/dist/{Markdown-DQXPWcZy.js → Markdown-pNRSLVqI.js} +1 -1
  97. package/dist/MatrixCheckboxes-CUi1N0RM.js +1 -0
  98. package/dist/{MultilineText-nDqbzJcx.js → MultilineText-CjvXXqrp.js} +1 -1
  99. package/dist/Nav-CwSHGiwE.js +1 -0
  100. package/dist/NestedSelect-BfkZhH1O.js +1 -0
  101. package/dist/{Number-Bw_bgJ20.js → Number-1fqsX9DH.js} +1 -1
  102. package/dist/OfficeViewer-DwIQUl66.js +1 -0
  103. package/dist/{Operation-DC_y6Ub7.js → Operation-B1HwrneV.js} +1 -1
  104. package/dist/Page-Ed_OjLiq.js +1 -0
  105. package/dist/{Pagination-CCe6HayL.js → Pagination-6lMmNWPI.js} +1 -1
  106. package/dist/{PaginationWrapper-BlFp9wjh.js → PaginationWrapper-BkSRXIPs.js} +1 -1
  107. package/dist/Panel-DdwXHCry.js +1 -0
  108. package/dist/Password-D7hJHKSJ.js +1 -0
  109. package/dist/Picker-BZNqS92p.js +1 -0
  110. package/dist/{Plain-Dwci4N2e.js → Plain-D7nwMMVt.js} +1 -1
  111. package/dist/{Portlet-CNgfI1Ub.js → Portlet-BNPvph0w.js} +1 -1
  112. package/dist/{Progress-XZb5-ThE.js → Progress-CATKwBwk.js} +1 -1
  113. package/dist/{Property-D2a_Ul3S.js → Property-Bbw6J0EJ.js} +1 -1
  114. package/dist/{QRCode-DHU1RQet.js → QRCode-C1Sz2px4.js} +1 -1
  115. package/dist/{Radio-C7BdmAKp.js → Radio-Bp4A9ifj.js} +1 -1
  116. package/dist/{Radios-BwjWo-L1.js → Radios-BiON9miU.js} +1 -1
  117. package/dist/Remark-Dsxb2TwD.js +1 -0
  118. package/dist/{RichText-D9hUcBuE.js → RichText-Ck_YZ4kC.js} +1 -1
  119. package/dist/{SearchBox-Bh3PIe-b.js → SearchBox-M-dkIVTh.js} +1 -1
  120. package/dist/Select-BGyJvCHF.js +1 -0
  121. package/dist/Service-7EfZof-E.js +1 -0
  122. package/dist/{Shape-C4o5GSeA.js → Shape-DGo5yg6n.js} +1 -1
  123. package/dist/{Slider-DHYsoPVj.js → Slider-CZP8_8w7.js} +1 -1
  124. package/dist/{SparkLine-BBXL561Q.js → SparkLine-BMxbCqBr.js} +1 -1
  125. package/dist/Spinner-D8gjgMqi.js +1 -0
  126. package/dist/{StaticHoc-CJgNJAEY.js → StaticHoc-D0pM2bgC.js} +1 -1
  127. package/dist/Status-CVO4FFCM.js +1 -0
  128. package/dist/{Steps-UlgTNiB1.js → Steps-D7IGq2Hh.js} +1 -1
  129. package/dist/Switch-DamAp7Z0.js +1 -0
  130. package/dist/{SwitchContainer-D70l_KaN.js → SwitchContainer-CMXoJ9rv.js} +1 -1
  131. package/dist/Table-DaePlnJ2.js +1 -0
  132. package/dist/Table2-DZv7wQuy.js +1 -0
  133. package/dist/{TableView-Df0guEBC.js → TableView-DoAcciT3.js} +1 -1
  134. package/dist/{Tabs-Dh9SVot3.js → Tabs-9QLYiuKd.js} +1 -1
  135. package/dist/TabsTransfer-CYt2Ydo2.js +1 -0
  136. package/dist/TabsTransferPicker-DbFyy-8j.js +1 -0
  137. package/dist/{Tag-ChRcdATW.js → Tag-mYOYI2_I.js} +1 -1
  138. package/dist/Tasks-BLnNJBWx.js +1 -0
  139. package/dist/{Textarea-CIqPVCY2.js → Textarea-sYiziBNB.js} +1 -1
  140. package/dist/{Timeline-D7CXypET.js → Timeline-BAxKRm5L.js} +1 -1
  141. package/dist/TooltipWrapper-C09x-Vn9.js +1 -0
  142. package/dist/{Tpl-cTs7jhV_.js → Tpl-ByPycBij.js} +1 -1
  143. package/dist/Transfer-B0VVG1X5.js +1 -0
  144. package/dist/TransferPicker-D2BR3RwX.js +1 -0
  145. package/dist/TreeSelect-V8WAsBlR.js +1 -0
  146. package/dist/{UUID-BARmlnTb.js → UUID-9JqGMHov.js} +1 -1
  147. package/dist/{UserSelect-D6S_lRVG.js → UserSelect-DU-DqXMl.js} +1 -1
  148. package/dist/{VBox-BAzEQR4R.js → VBox-DObThecs.js} +1 -1
  149. package/dist/{Video-fb-VaQF8.js → Video-C8IgYvL_.js} +1 -1
  150. package/dist/{WebComponent-Cc6mYGsA.js → WebComponent-qhqdvgNC.js} +1 -1
  151. package/dist/Wizard-OfhcHrBG.js +1 -0
  152. package/dist/{Words-eY9320eX.js → Words-BIdMoCe8.js} +1 -1
  153. package/dist/{Wrapper-DHBwNSd-.js → Wrapper-DJrZT8db.js} +1 -1
  154. package/dist/{PopUp-CJyUTmjT.js → _castFunction-CQMNP8A1.js} +104 -104
  155. package/dist/beneficiary-form-DWYNuxQk.js +10 -0
  156. package/dist/{client-vLe_PnLn.js → client-CGP9wC59.js} +1 -1
  157. package/dist/crypto-js-_p8NjmHX.js +1 -0
  158. package/dist/{doc-CxGb1TfN.js → doc-C6E4JfQ4.js} +1 -1
  159. package/dist/es-DoSNZEgs.js +1 -0
  160. package/dist/esm-DMJQA23h.js +4 -0
  161. package/dist/esm-Dgr2t9Jm.js +27 -0
  162. package/dist/esm-lQQ8f-8c.js +1 -0
  163. package/dist/function-AxX-od3p.js +3 -0
  164. package/dist/index.css +1 -1
  165. package/dist/index.d.ts +26 -0
  166. package/dist/index.js +1 -1
  167. package/dist/isEqual-CABQKVnq.js +1 -0
  168. package/dist/{main-C5HXsudB.js → main-BtAz1nDN.js} +1 -1
  169. package/dist/{objectSpread2-DFRX1WB4.js → objectSpread2-EZn5iNnc.js} +1 -1
  170. package/dist/{omitBy-DBIyJYy7.js → omitBy-DzRksfoy.js} +1 -1
  171. package/dist/{papaparse.min-BtfDBTEy.js → papaparse.min-DVFqGzF3.js} +1 -1
  172. package/dist/{react-COOgDf_T.js → react-CWkhIp2c.js} +1 -1
  173. package/dist/{react-cropper.es-DzdYLVvj.js → react-cropper.es-0hTsGdEg.js} +1 -1
  174. package/dist/react-dom-CCQ2gErg.js +1 -0
  175. package/dist/request-CLLl5Hjd.js +1 -0
  176. package/dist/rolldown-runtime-DXzHzmmG.js +1 -0
  177. package/dist/xor-D3F4ghdw.js +1 -0
  178. package/package.json +6 -6
  179. package/dist/Action-Clb8i0X2.js +0 -1
  180. package/dist/App-D5D3gmNS.js +0 -1
  181. package/dist/Audio-ezDzOZ39.js +0 -1
  182. package/dist/BarCode-6Po-8p4f.js +0 -1
  183. package/dist/ButtonGroup-B3gS_-Ep.js +0 -1
  184. package/dist/CRUD-B--j--TM.js +0 -1
  185. package/dist/CRUD2-Czfh3c6d.js +0 -1
  186. package/dist/Card-By-PXs2S.js +0 -1
  187. package/dist/Cards-5ddE2SUr.js +0 -1
  188. package/dist/Carousel-hMJwhzad.js +0 -1
  189. package/dist/ChainedSelect-BVw16VhH.js +0 -1
  190. package/dist/Checkbox-DhLJdAC3.js +0 -1
  191. package/dist/Checkboxes-BxYxzZa5.js +0 -1
  192. package/dist/Collapse-CEnYSzni.js +0 -1
  193. package/dist/ColorPicker-D-WUp5Oc.js +0 -1
  194. package/dist/ColumnToggler-BSPIBpte.js +0 -1
  195. package/dist/Combo-OgMxOSk_.js +0 -1
  196. package/dist/Dialog-B9w6XNSa.js +0 -1
  197. package/dist/Drawer-CBRwH0Bt.js +0 -1
  198. package/dist/DropDownButton-DQLBn8hV.js +0 -1
  199. package/dist/FieldSet-CAP6ZdK6.js +0 -1
  200. package/dist/HBox-WD6QODEX.js +0 -1
  201. package/dist/Icon-CF0MfUgx.js +0 -1
  202. package/dist/IconPicker-DtgLB7Li.js +0 -1
  203. package/dist/IconSelect-f1Lu6X5l.js +0 -1
  204. package/dist/Image-DqR0gBiu.js +0 -1
  205. package/dist/InputCity-KNg6Eygl.js +0 -1
  206. package/dist/InputExcel-DmiEkGzr.js +0 -1
  207. package/dist/InputFile-BBimXXKp.js +0 -1
  208. package/dist/InputImage-DV2_-1UV.js +0 -1
  209. package/dist/InputRange-BtbO0-Q3.js +0 -1
  210. package/dist/InputRichText-CDtNI74S.js +0 -1
  211. package/dist/InputSubForm-DN437CKg.js +0 -1
  212. package/dist/InputTable-4VS50n9k.js +0 -1
  213. package/dist/InputTag-CyraIqPe.js +0 -1
  214. package/dist/InputText-YV-KWQFV.js +0 -1
  215. package/dist/InputTree-Bgtw4o8_.js +0 -1
  216. package/dist/List-DLVcqN93.js +0 -1
  217. package/dist/Log-D7Yg8q24.js +0 -1
  218. package/dist/MatrixCheckboxes-DfJ5M8qG.js +0 -1
  219. package/dist/Nav-Cm6e_dal.js +0 -1
  220. package/dist/NestedSelect-LIGunxlP.js +0 -1
  221. package/dist/OfficeViewer-BT_jACpM.js +0 -1
  222. package/dist/Page-C90C-uXp.js +0 -1
  223. package/dist/Panel-BQBXJkJg.js +0 -1
  224. package/dist/Password-BRgzVD-R.js +0 -1
  225. package/dist/Picker-BFbwyiE1.js +0 -1
  226. package/dist/Remark-Q40Cl_Fm.js +0 -1
  227. package/dist/Select-20F0bgFJ.js +0 -1
  228. package/dist/Service-CuSQipPk.js +0 -1
  229. package/dist/Spinner-CsRzfkv4.js +0 -1
  230. package/dist/Status-KxvNWOcw.js +0 -1
  231. package/dist/Switch-C0aCyqKu.js +0 -1
  232. package/dist/Table-BaDaN8MH.js +0 -1
  233. package/dist/Table2-DqyJ5B5M.js +0 -1
  234. package/dist/TabsTransfer-DakjSBBq.js +0 -1
  235. package/dist/TabsTransferPicker-CCMRPC1d.js +0 -1
  236. package/dist/Tasks-C8oQeM6A.js +0 -1
  237. package/dist/TooltipWrapper-CtUc05W4.js +0 -1
  238. package/dist/Transfer-_RgCe9xE.js +0 -1
  239. package/dist/TransferPicker-DS450Cwo.js +0 -1
  240. package/dist/TreeSelect-ipE2Adb0.js +0 -1
  241. package/dist/Wizard-B5v3sXNf.js +0 -1
  242. package/dist/beneficiary-form-BT1hMT9A.js +0 -10
  243. package/dist/crypto-js-DfHtkI6b.js +0 -1
  244. package/dist/es-Dm57cZR7.js +0 -1
  245. package/dist/esm-Byma-6B-.js +0 -4
  246. package/dist/esm-CM4fvlfi.js +0 -27
  247. package/dist/esm-CrR9dHH3.js +0 -1
  248. package/dist/function-CrEuBBd9.js +0 -3
  249. package/dist/isEqual-DiNKNUz9.js +0 -1
  250. package/dist/mi18n-react.esm-CNXlHzVT.js +0 -1
  251. package/dist/react-dom-D_0O8_TK.js +0 -1
  252. package/dist/rolldown-runtime-Cmsah3SL.js +0 -1
  253. package/dist/xor-NaloR5U3.js +0 -1
@@ -0,0 +1 @@
1
+ import{o as e}from"./rolldown-runtime-DXzHzmmG.js";import{t}from"./react-CWkhIp2c.js";import{a as n,i as r,n as o,o as i,r as s,t as a}from"./tslib.es6-TRdqp4ac.js";import{F as l,cn as c,di as u,ht as d,in as p,sn as h,vi as m}from"./esm-DMJQA23h.js";import{Nt as f}from"./esm-Dgr2t9Jm.js";import{a as v}from"./_castFunction-CQMNP8A1.js";import{t as g}from"./StaticHoc-D0pM2bgC.js";var k=/* @__PURE__ */e(t()),y=function(e){function t(t){var n=e.call(this,t)||this;return n.mounted=!1,n.toDispose=[],n.state={columns:t.columns||[],rows:t.rows||[],loading:!1},n.toggleItem=n.toggleItem.bind(n),n.reload=n.reload.bind(n),n.initOptions=n.initOptions.bind(n),n.mounted=!0,n}return r(t,e),t.prototype.componentDidMount=function(){var e=this.props,t=e.formInited,n=e.addHook,r=e.formItem;r&&this.toDispose.push(t||!n?r.addInitHook(this.initOptions):n(this.initOptions,"init"))},t.prototype.componentDidUpdate=function(e){var t=this.props;if(e.columns!==t.columns||e.rows!==t.rows)this.setState({columns:t.columns||[],rows:t.rows||[]});else if(t.formInited&&(t.source!==e.source||e.data!==t.data)){var n=p(e.source,e.data,{ignoreData:!0}),r=p(t.source,t.data,{ignoreData:!0});n.url!==r.url&&c(r.url)&&this.reload()}},t.prototype.componentWillUnmount=function(){this.mounted=!1,this.toDispose.forEach(function(e){return e()}),this.toDispose=[]},t.prototype.doAction=function(e,t,n){var r,o,i=this.props,s=i.resetValue,a=i.onChange,l=i.formStore,c=i.store,u=i.name,d=null==e?void 0:e.actionType;if("clear"===d)null==a||a("");else if("reset"===d){var p=null!==(o=m(null!==(r=null==l?void 0:l.pristine)&&void 0!==r?r:null==c?void 0:c.pristine,u))&&void 0!==o?o:s;null==a||a(null!=p?p:"")}},t.prototype.initOptions=function(e){return o(this,void 0,void 0,function(){var t,r,o;return n(this,function(n){switch(n.label){case 0:return[4,this.reload()];case 1:return n.sent(),t=this.props,r=t.formItem,o=t.name,r?(r.value&&u(e,o,r.value),[2]):[2]}})})},t.prototype.reload=function(){return o(this,void 0,void 0,function(){var e,t,r,o,i,s,l=this;return n(this,function(n){switch(n.label){case 0:if(e=this.props,t=e.source,r=e.data,o=e.env,i=e.onChange,s=e.translate,!h(t,r)||this.state.loading)return[2];if(!o||!o.fetcher)throw new Error("fetcher is required");return[4,new Promise(function(e,n){if(!l.mounted)return e();l.setState({loading:!0},function(){if(!l.mounted)return e();o.fetcher(t,r).then(function(n){if(!n.ok)throw new Error(n.msg||s("fetchFailed"));if(!l.mounted)return e();l.setState({loading:!1,rows:n.data.rows||[],columns:n.data.columns||[]},function(){t&&t.replaceData;var r=n.data.value;r&&(r=t.replaceData?r:function(e,t,n){return e.map(function(e,r){return e.map(function(e,o){return a(a(a({},t[r]),n[o]),e)})})}(r,l.state.columns,l.state.rows),i(r)),e()})}).catch(function(t){return l.setState({error:t,loading:!1},function(){return e()})})})})];case 1:return[2,n.sent()]}})})},t.prototype.toggleItem=function(e,t,r){return o(this,void 0,void 0,function(){var o,i,s,l,c,u,p,h,m,f,v,g,k;return n(this,function(n){switch(n.label){case 0:if(o=this.state,i=o.columns,s=o.rows,l=this.props,c=l.multiple,u=l.singleSelectMode,p=l.dispatchEvent,l.data,h=this.props.value||b(i,s),c)h[t][r]=a(a({},h[t][r]),{checked:e});else if("row"===u)for(v=0,f=i.length;v<f;v++)h[v][r]=a(a({},h[v][r]),{checked:t===v?e:!e});else if("column"===u)for(m=0,f=s.length;m<f;m++)h[t][m]=a(a({},h[t][m]),{checked:r===m?e:!e});else for(m=0,f=s.length;m<f;m++)for(v=0,g=i.length;v<g;v++)h[v][m]=a(a({},h[v][m]),{checked:t===v&&r===m?e:!e});return[4,p("change",d(this.props,{value:h.concat()}))];case 1:return(null==(k=n.sent())?void 0:k.prevented)||this.props.onChange(h.concat()),[2]}})})},t.prototype.isColumChecked=function(e,t){var n=e[t];return!!n&&n.some(function(e){return e&&e.checked})},t.prototype.isColumnPartialChecked=function(e,t){var n=e[t];if(!n||1==n.length)return!1;var r=n[0].checked;return n.some(function(e){return e.checked!==r})&&!n.every(function(e){return e.checked===r})},t.prototype.toggleColumnCheckAll=function(e,t,r){return o(this,void 0,void 0,function(){var o,i;return n(this,function(n){switch(n.label){case 0:o=t[r],i=0,n.label=1;case 1:return i<o.length?[4,this.toggleItem(e,r,i)]:[3,4];case 2:n.sent(),n.label=3;case 3:return i++,[3,1];case 4:return[2]}})})},t.prototype.isRowChecked=function(e,t){return e&&e.some(function(e){return e[t]&&e[t].checked})},t.prototype.isRowPartialChecked=function(e,t){if(!e||1==e.length)return!1;var n=e[0][t].checked;return e.some(function(e){return n!==e[t].checked})&&!e.every(function(e){return e.checked})},t.prototype.toggleRowCheckAll=function(e,t,r){return o(this,void 0,void 0,function(){var o;return n(this,function(n){switch(n.label){case 0:o=0,n.label=1;case 1:return o<t.length?[4,this.toggleItem(e,o,r)]:[3,4];case 2:n.sent(),n.label=3;case 3:return o++,[3,1];case 4:return[2]}})})},t.prototype.renderInput=function(e){var t=this;void 0===e&&(e=!1);var n=this.state,r=n.columns,o=n.rows,i=this.props,s=i.rowLabel,a=i.disabled,l=i.classnames,c=i.multiple,u=i.textAlign,d=i.xCheckAll,p=i.yCheckAll,h=i.testIdBuilder,m=i.mobileUI,v=this.props.value||b(r,o);return k.createElement("div",{className:l("Table m-b-none",{"is-mobile":m})},k.createElement("div",{className:l("Table-content")},k.createElement("table",{className:l("Table-table")},k.createElement("thead",null,k.createElement("tr",null,k.createElement("th",null,s),r.map(function(n,r){return k.createElement("th",{key:r,className:"text-"+(u||c?"left":"center")},c&&p?k.createElement(f,{type:"checkbox",disabled:e||a,checked:t.isColumChecked(v,r),partial:t.isColumnPartialChecked(v,r),onChange:function(e){return t.toggleColumnCheckAll(e,v,r)}}):null,n.label)}))),k.createElement("tbody",null,o.map(function(n,o){return k.createElement("tr",{key:o},k.createElement("td",null,c&&d?k.createElement(f,{type:"checkbox",disabled:e||a,checked:t.isRowChecked(v,o),partial:t.isRowPartialChecked(v,o),onChange:function(e){return t.toggleRowCheckAll(e,v,o)},testIdBuilder:null==h?void 0:h.getChild(o)}):null,n.label,n.description||n.desc?k.createElement("span",{className:"m-l-xs text-muted text-xs"},n.description||n.desc):null),r.map(function(n,r){return k.createElement("td",{key:r,className:"text-"+(u||c?"left":"center")},k.createElement(f,{type:c?"checkbox":"radio",disabled:e||a,checked:!!(v[r]&&v[r][o]&&v[r][o].checked),onChange:function(e){return t.toggleItem(e,r,o)},testIdBuilder:null==h?void 0:h.getChild("".concat(r,"-").concat(o))}))}))})))))},t.prototype.renderStatic=function(e){void 0===e&&(e="-");var t=this.props,n=t.className;t.render;var r=t.classnames,o=this.state.error;return k.createElement("div",{key:"input",className:r("MatrixControl",n||"")},o?e:this.renderInput(!0))},t.prototype.render=function(){var e=this.props,t=e.className;e.render;var n=e.classnames,r=e.loadingConfig,o=this.state,i=o.error,s=o.loading;return k.createElement("div",{key:"input",className:n("MatrixControl",t||"")},i?k.createElement("div",{className:n("MatrixControl-error Alert Alert--danger")},String(i)):this.renderInput(),k.createElement(v,{size:"lg",overlay:!0,key:"info",show:s,loadingConfig:r}))},t.defaultProps={columns:[],rows:[],multiple:!0,singleSelectMode:"column"},s([g(),i("design:type",Function),i("design:paramtypes",[]),i("design:returntype",void 0)],t.prototype,"render",null),t}(k.Component);function b(e,t){return Array.isArray(e)||(e=[]),Array.isArray(t)||(t=[]),e.map(function(e){return t.map(function(t){return a(a(a({},t),e),{checked:!1})})})}var C=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),s([l({type:"matrix-checkboxes",strictMode:!1,sizeMutable:!1})],t)}(y);export{C as MatrixRenderer,y as default};
@@ -1 +1 @@
1
- import{o as t}from"./rolldown-runtime-Cmsah3SL.js";import{t as r}from"./react-COOgDf_T.js";import{i as n,r as o,t as e}from"./tslib.es6-TRdqp4ac.js";import{$n as s,Xr as i,it as a}from"./esm-Byma-6B-.js";import{u as p}from"./esm-CM4fvlfi.js";var u=/* @__PURE__ */t(r()),m=function(t){function r(){return null!==t&&t.apply(this,arguments)||this}return n(r,t),r.prototype.render=function(){var t=s(this.props,function(t){return t.text?i(t.text,t.data,"| raw"):void 0});return u.createElement(p,e({},this.props,{text:t}))},r}(u.Component),l=function(t){function r(){return null!==t&&t.apply(this,arguments)||this}return n(r,t),o([a({type:"multiline-text"})],r)}(m);export{m as MultilineTextField,l as MultilineTextFieldRenderer};
1
+ import{o as t}from"./rolldown-runtime-DXzHzmmG.js";import{t as r}from"./react-CWkhIp2c.js";import{i as n,r as o,t as e}from"./tslib.es6-TRdqp4ac.js";import{$n as s,Xr as i,it as a}from"./esm-DMJQA23h.js";import{u as p}from"./esm-Dgr2t9Jm.js";var u=/* @__PURE__ */t(r()),m=function(t){function r(){return null!==t&&t.apply(this,arguments)||this}return n(r,t),r.prototype.render=function(){var t=s(this.props,function(t){return t.text?i(t.text,t.data,"| raw"):void 0});return u.createElement(p,e({},this.props,{text:t}))},r}(u.Component),l=function(t){function r(){return null!==t&&t.apply(this,arguments)||this}return n(r,t),o([a({type:"multiline-text"})],r)}(m);export{m as MultilineTextField,l as MultilineTextFieldRenderer};
@@ -0,0 +1 @@
1
+ import{o as e}from"./rolldown-runtime-DXzHzmmG.js";import{t}from"./react-CWkhIp2c.js";import{a as n,c as o,i as r,n as i,o as a,r as l,t as d}from"./tslib.es6-TRdqp4ac.js";import{Bi as s,E as u,Er as c,Ii as p,Ir as f,Jn as v,Nn as h,Rr as g,Tr as m,Vi as y,X as b,Xr as C,br as k,cr as w,dt as N,fn as I,it as S,oi as E,pn as O,qn as A,qr as L,sn as R,tt as x,ui as D,ut as _,yr as F}from"./esm-DMJQA23h.js";import{t as P}from"./isEqual-CABQKVnq.js";import{t as j}from"./react-dom-CCQ2gErg.js";import{G as T,c as B,ht as M,r as U}from"./esm-Dgr2t9Jm.js";import{a as K,c as q}from"./_castFunction-CQMNP8A1.js";var z=/* @__PURE__ */e(t()),V=/* @__PURE__ */e(j()),X=/* @__PURE__ */e(P()),W=/* @__PURE__ */e(y()),J=/* @__PURE__ */e(O()),Y=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.startPoint={y:0,x:0},t.menuParentRef=z.createRef(),t.state={keyword:"",filteredLinks:[]},t}return r(t,e),t.prototype.handleClick=function(e,t){return i(this,void 0,void 0,function(){var o,r,i;return n(this,function(n){switch(n.label){case 0:return o=this.props,r=o.env,i=o.onSelect,e&&e.to&&(null==r||r.tracker({eventType:"link",eventData:{label:e.label,link:e.to}})),[4,null==i?void 0:i(e,t)];case 1:return n.sent(),[2,!1]}})})},t.prototype.handleChange=function(e){return i(this,void 0,void 0,function(){var t;return n(this,function(n){return(t=this.props.onChange)&&t(e),[2]})})},t.prototype.toggleLink=function(e,t,n){var o,r;null===(r=(o=this.props).onToggle)||void 0===r||r.call(o,e,t,n)},t.prototype.getDropInfo=function(e,t,n){var o,r,i,a=this.props,l=a.dragOnSameLevel,d=a.indentSize,s=e.target.getBoundingClientRect(),u=null===(o=this.dragNode)||void 0===o?void 0:o.link,c=s.top,p=s.height,f=s.width,v=e.clientY,h=e.clientX,g=n*(null!==(r=parseInt(d,10))&&void 0!==r?r:16),m=g+.2*f;return i=v>=c+p/2?"bottom":"top",!l&&"bottom"===i&&h>=this.startPoint.x+m&&(i="self"),{nodeId:t,dragLink:u,position:i,rect:s,height:p,left:g}},t.prototype.updateDropIndicator=function(e){var t,n=this.props,o=n.dragOnSameLevel,r=n.overflow,i=e.target.querySelector("a"),a=null==i?void 0:i.getAttribute("data-id"),l=Number(null==i?void 0:i.getAttribute("data-depth")),d=r&&r.enable&&r.wrapperComponent||"ul";if(o&&(null===(t=this.dragNode)||void 0===t?void 0:t.node.closest("".concat(d,'[role="menu"]')))!==(null==i?void 0:i.closest("".concat(d,'[role="menu"]'))))return this.setState({dropIndicator:void 0}),void(this.dropInfo=null);this.dropInfo=this.getDropInfo(e,a,l);var s=this.dropInfo,u=s.position,c=s.rect,p=s.dragLink,f=s.height,v=s.left;if(a===(null==p?void 0:p.__id))return this.setState({dropIndicator:void 0}),void(this.dropInfo=null);var h=(0,V.findDOMNode)(this).firstChild;if("self"===u){var g={top:c.top-h.getBoundingClientRect().top,left:v,width:h.getBoundingClientRect().width-v,height:f,opacity:.2};(!this.state.dropIndicator||this.state.dropIndicator&&!(0,X.default)(this.state.dropIndicator,g))&&this.setState({dropIndicator:g})}else g={top:("bottom"===u?c.top+c.height:c.top)-h.getBoundingClientRect().top,left:v,width:h.getBoundingClientRect().width-v},(!this.state.dropIndicator||this.state.dropIndicator&&!(0,X.default)(this.state.dropIndicator,g))&&this.setState({dropIndicator:g})},t.prototype.handleDragStart=function(e){var t=this;return function(n){n.stopPropagation();var o=n.currentTarget;n.dataTransfer.effectAllowed="copyMove",n.dataTransfer.setDragImage(o,0,0),t.dragNode={node:o,link:e},t.dropInfo=null,t.startPoint={x:n.clientX,y:n.clientY},o.addEventListener("dragend",t.handleDragEnd),document.body.addEventListener("dragover",t.handleDragOver)}},t.prototype.handleDragOver=function(e){if(e.preventDefault(),e.stopPropagation(),this.dragNode){var t=e.target.querySelector("a");(null==t?void 0:t.getAttribute("data-id"))&&this.updateDropIndicator(e)}},t.prototype.handleDragEnd=function(e){var t,n,o;e.preventDefault(),e.stopPropagation(),this.setState({dropIndicator:void 0});var r=e.currentTarget,i=r.getAttribute("data-id");if(!i){var a=r.querySelector("a");a&&(i=a.getAttribute("data-id"))}var l=null===(t=this.dropInfo)||void 0===t?void 0:t.nodeId;this.dropInfo&&l&&i!==l&&(r.removeEventListener("dragend",this.handleDragEnd),document.body.removeEventListener("dragover",this.handleDragOver),null===(o=(n=this.props).onDragUpdate)||void 0===o||o.call(n,this.dropInfo),this.dragNode=null,this.dropInfo=null)},t.prototype.normalizeNavigations=function(e,t){var n=this,o=this.props,r=o.level,i=o.stacked,a=o.mode,l=o.itemActions,s=o.render,u=o.popOverContainer,c=o.env,p=o.classnames,f=o.data,v=o.collapsed;if(!e)return[];if(r&&t>r)return[];var h=v&&1===t;return e.filter(function(e){return!(!0===e.hidden||!1===e.visible)}).map(function(e){var o=[],r=[];e.icon&&(Array.isArray(e.icon)?e.icon:[e.icon]).forEach(function(e,t){if(z.isValidElement(e))o.push(e);else if((0,W.default)(e))o.push(z.createElement(q,{key:"icon-".concat(t),cx:p,icon:e,className:h?"":"mr-2"}));else if(e&&D(e)){var n="after"===e.position,i=z.createElement(q,{key:"icon-".concat(t),cx:p,icon:e.icon||e,className:h?"":n?"ml-2":"mr-2"});n?r.push(i):o.push(i)}});var v="string"==typeof e.label?C(e.label,f):z.isValidElement(e.label)?z.cloneElement(e.label):s("inline",e.label),g=i&&"float"!==a&&!e.expanded&&e.overflow&&D(e.overflow)&&e.overflow.enable,m=e.children;if(g){var y=e.overflow,b=y.maxVisibleCount,k=y.overflowIndicator,w=void 0===k?"fa fa-ellipsis-h":k,N=y.overflowLabel,I=y.overflowClassName,S=b||2;S<((null==m?void 0:m.length)||0)&&(m=null==m?void 0:m.map(function(t,n){return d(d({},t),{label:n===S?z.createElement("span",{className:p(I)},z.createElement(q,{icon:w,className:"icon Nav-item-icon"}),N&&D(N)?s("nav-overflow-label",N):N):t.label,hidden:n>S||e.hidden,expandMore:n===S})}))}return{link:e,label:v,labelExtra:r.length?z.createElement("i",{className:p("Nav-Menu-item-icon-after")},r):null,icon:o.length?z.createElement("i",null,o):null,children:m?n.normalizeNavigations(m,"group"===e.mode?t:t+1):[],path:e.to,open:e.unfolded,extra:l?s("inline",l,{data:E(f,e),popOverContainer:u||(c&&c.getModalContainer?c.getModalContainer:function(){return document.body}),closeOnClick:!0}):null,disabled:!!e.disabled,disabledTip:e.disabledTip,hidden:e.hidden,className:e.className,mode:e.mode}})},t.prototype.handleSearch=function(e){return i(this,void 0,void 0,function(){var t,o,r,i,a,l,u;return n(this,function(n){return t=this.props,o=t.links,r=t.searchConfig,i=void 0===r?{}:r,a=(0,J.default)(null!=o?o:[]),l=null==i?void 0:i.matchFunc,e?(l&&"string"==typeof l?l=I(l,"link","keyword"):"function"==typeof l||(l=function(e,t){var n,o;return(null===(n=s([e],t,{keys:["label","title","key"],threshold:s.rankings.CONTAINS}))||void 0===n?void 0:n.length)||(null==e?void 0:e.children)&&(null===(o=e.children)||void 0===o?void 0:o.length)>0}),u=function(e,t){var n=function(e,o){if(l(o,t))return e.push(d(d({},o),{unfolded:!0})),e;if(Array.isArray(o.children)){var r=o.children.reduce(n,[]);r.length&&e.push(d(d({},o),{unfolded:!0,children:r}))}return e};return e.reduce(n,[])},this.setState({keyword:e,filteredLinks:u(a,e)}),[2]):(this.setState({keyword:"",filteredLinks:[]}),[2])})})},t.prototype.renderSearchBox=function(){var e,t,n,o=this.props,r=o.classnames,i=o.searchable,a=o.searchConfig,l=void 0===a?{}:a,d=this.state.keyword;return z.createElement(z.Fragment,null,i?z.createElement(T,{className:r("Nav-SearchBox",null==l?void 0:l.className),mini:null!==(e=l.mini)&&void 0!==e&&e,enhance:null!==(t=l.enhance)&&void 0!==t&&t,clearable:null===(n=l.clearable)||void 0===n||n,searchImediately:l.searchImediately,placeholder:l.placeholder,defaultValue:"",value:null!=d?d:"",onSearch:this.handleSearch,onChange:c}):null)},t.prototype.render=function(){var e,t=this,n=this.props,o=n.className,r=n.style,i=n.stacked,a=n.mode,l=n.classnames,d=n.links,s=n.loading,c=n.overflow,p=n.loadingConfig,f=n.itemBadge,v=n.badge,h=n.data,g=n.location,m=n.collapsed,y=n.expandIcon,C=n.indentSize,k=n.accordion,w=n.draggable,N=n.themeColor,I=n.expandPosition,S=n.popupClassName,E=n.disabled,O=n.id,A=n.render,L=n.popOverContainer,R=n.env,x=n.searchable,_=n.testIdBuilder,F=n.classPrefix,P=this.state,j=P.dropIndicator,T=P.filteredLinks,M=null;if(c&&D(c)&&c.enable){var V=c.overflowIndicator,X=void 0===V?"fa fa-ellipsis-h":V,W=c.overflowLabel,J=c.overflowClassName;M=z.createElement("span",{className:l(J)},z.createElement(q,{icon:X,className:"icon Nav-item-icon"}),W&&D(W)?A("nav-overflow-label",W):W)}var Y=null,G="";if(r)try{Y=u(r,h);var Z=JSON.stringify(Y).replace(/\,/g,";").replace(/\"/g,"").replace(/[A-Z]/g,function(e){return"-"+e.toLowerCase()});G=l("Nav-PopupClassName-".concat(O)),document.getElementById(G)||b({style:".".concat(G," ").concat(Z),classId:G})}catch(ee){}var $=Array.isArray(T)&&T.length>0?T:d,H=function(e,n){return z.createElement(z.Fragment,null,Array.isArray($)?z.createElement(B,{navigations:t.normalizeNavigations($,1),isActive:function(e,t){if(void 0===t&&(t=""),e.link&&void 0!==e.link.active)return e.link.active;var n=e.path;return!(g.pathname!==n)},isOpen:function(e){return!!e.open},stacked:!!i,mode:a,testIdBuilder:_,themeColor:N,onSelect:function(e,o){return new Promise(function(r){t.handleClick(e,o),setTimeout(function(){null==n||n(),r(void 0)},100)})},onToggle:t.toggleLink,onChange:t.handleChange,renderLink:function(e){return e.link},badge:f||v,collapsed:m,overflowedIndicator:M,overflowMaxCount:null==c?void 0:c.maxVisibleCount,overflowedIndicatorPopupClassName:l(null==c?void 0:c.overflowPopoverClassName),overflowSuffix:(null==c?void 0:c.overflowSuffix)?A("nav-overflow-suffix",null==c?void 0:c.overflowSuffix):null,overflowItemWidth:null==c?void 0:c.itemWidth,overflowComponent:null==c?void 0:c.wrapperComponent,overflowStyle:null==c?void 0:c.style,popupClassName:"".concat(S||"").concat(G?" ".concat(G):""),expandIcon:y?"string"==typeof y?y:A("expand-icon",y):null,expandBefore:"after"!==I,inlineIndent:C,accordion:k,draggable:w,data:h,disabled:E,onDragStart:t.handleDragStart,disabledOverflow:e,popOverContainer:L||(R&&R.getModalContainer?R.getModalContainer:function(){return document.body})}):null,z.createElement(K,{show:!!s,overlay:!0,loadingConfig:p}))},Q=!i&&(null==c?void 0:c.enable)&&"swipe"===c.mode?Array.isArray($)?z.createElement(U,{classPrefix:F,classnames:l,getScrollParentElement:function(){var e=l("Nav-Menu-root");return t.menuParentRef.current?t.menuParentRef.current.querySelector(".".concat(e)):void 0},activeChildClassName:[l("Nav-Menu-item-selected"),l("Nav-Menu-submenu-selected")]},function(e){return H(!0,e)}):null:H(!1);return z.createElement("div",{className:l("Nav",o,(e={},e["Nav-horizontal"]=!i,e["Nav--searchable"]=!!x,e)),style:Y,ref:this.menuParentRef},x?z.createElement(z.Fragment,null,this.renderSearchBox(),Q):Q,j?z.createElement("div",{className:l("Nav-dropIndicator"),style:j}):null)},t.defaultProps={indentSize:16},l([h,a("design:type",Function),a("design:paramtypes",[Object,Number]),a("design:returntype",Promise)],t.prototype,"handleClick",null),l([h,a("design:type",Function),a("design:paramtypes",[Array]),a("design:returntype",Promise)],t.prototype,"handleChange",null),l([h,a("design:type",Function),a("design:paramtypes",[Object,Number,Boolean]),a("design:returntype",void 0)],t.prototype,"toggleLink",null),l([h,a("design:type",Function),a("design:paramtypes",[DragEvent,String,Number]),a("design:returntype",Object)],t.prototype,"getDropInfo",null),l([h,a("design:type",Function),a("design:paramtypes",[DragEvent]),a("design:returntype",void 0)],t.prototype,"updateDropIndicator",null),l([h,a("design:type",Function),a("design:paramtypes",[Object]),a("design:returntype",void 0)],t.prototype,"handleDragStart",null),l([h,a("design:type",Function),a("design:paramtypes",[DragEvent]),a("design:returntype",void 0)],t.prototype,"handleDragOver",null),l([h,a("design:type",Function),a("design:paramtypes",[DragEvent]),a("design:returntype",void 0)],t.prototype,"handleDragEnd",null),l([h,a("design:type",Function),a("design:paramtypes",[String]),a("design:returntype",Promise)],t.prototype,"handleSearch",null),t}(z.Component),G=x(Y),Z=M({adaptor:function(e,t){var n=Array.isArray(e)?e:e.links||e.options||e.items||e.rows;if(!Array.isArray(n))throw new Error("payload.data.options is not array.");return n},afterLoad:function(e,t,o){return i(void 0,void 0,void 0,function(){var r,i,a;return n(this,function(n){switch(n.label){case 0:return r=o.dispatchEvent,i=o.data,[4,r("loaded",E(i,{data:e.value,items:e.links}))];case 1:return(null==(a=n.sent())?void 0:a.prevented)||e.value&&!f(t,function(e){return e.active})&&o.env.jumpTo(C(e.value,o.data),void 0,o.data),[2]}})})},normalizeConfig:function(e,t,n,o){if(Array.isArray(e)&&"toggle"!==o){var r=n.data,i=n.env,a=n.unfoldedField,l=n.foldedField,s=n.location,u=n.level,c=n.defaultOpenLevel,p=n.disabled,f=n.valueField,v=function(e,t){return!p&&!e.disabled&&(o&&!["location-change","data-change"].includes(o)&&void 0!==e.active?e.active:t===u&&!!A(e.children||[],function(t){return!!(t.hasOwnProperty("to")&&i&&i.isCurrentUrl(C(t.to,r),e))})||(e.activeOn?L(e.activeOn,r)||L(e.activeOn,s):!!(e.hasOwnProperty("to")&&null!==e.to&&i&&i.isCurrentUrl(C(e.to,r),e))))};e=m(e,function(e,n,o){var i,s=d(d(d({},e),_(e,r)),{active:v(e,o),__id:null!==(i=e.__id)&&void 0!==i?i:w()}),u=null;return!e.defer&&f&&e[f]&&(u=A(t||[],function(t){return t[f]===e[f]})),s.unfolded=u?k(u,{unfoldedField:a,foldedField:l}):void 0!==e.unfolded?k(s,{unfoldedField:a,foldedField:l}):!!(c&&o<=c)||e.children&&!!A(e.children,function(e,t,n){return v(e,o+n)}),s},1,!0)}return e},beforeDeferLoad:function(e,t,n){return g(n,t,1,d(d({},e),{loading:!0}))},afterDeferLoad:function(e,t,o,r,a){var l,s,u,c;return i(this,void 0,void 0,function(){var i,p,f,v,h;return n(this,function(n){switch(n.label){case 0:return i=a.dispatchEvent,p=a.data,[4,i("loaded",E(p,{data:o.data,item:d({},e)}))];case 1:return(null==(f=n.sent())?void 0:f.prevented)?[2]:(v=d(d({},e),{loading:!1,loaded:!0,error:o.ok?void 0:o.msg}),h=Array.isArray(o.data)?o.data:(null===(l=o.data)||void 0===l?void 0:l.links)||(null===(s=o.data)||void 0===s?void 0:s.options)||(null===(u=o.data)||void 0===u?void 0:u.items)||(null===(c=o.data)||void 0===c?void 0:c.rows),Array.isArray(h)&&(v.children=h.concat(),v.unfolded=!0),[2,g(r,t,1,v)])}})})}})(function(e){function t(t){var n=e.call(this,t)||this;return n.state={currentKey:t.showKey||"",collapsed:t.collapsed||!1},n.toggleLink=n.toggleLink.bind(n),n.handleSelect=n.handleSelect.bind(n),n.dragUpdate=n.dragUpdate.bind(n),n.handleChange=n.handleChange.bind(n),null==t||t.onRef(n),n}return r(t,e),t.prototype.componentDidMount=function(){Array.isArray(this.props.links)&&this.props.updateConfig(this.props.links,"mount")},t.prototype.componentDidUpdate=function(e,t){(0,X.default)(this.props.location,e.location)?(0,X.default)(this.props.links,e.links)?F(this.props.data,e.data,!1,void 0,void 0,10)&&this.props.updateConfig(this.props.config,"data-change"):this.props.updateConfig(this.props.links,"update"):this.props.updateConfig(this.props.config,"location-change"),e.defaultOpenLevel!==this.props.defaultOpenLevel&&this.props.updateConfig(this.props.config,"update"),e.collapsed!==this.props.collapsed&&this.setState({collapsed:this.props.collapsed}),t.collapsed!==this.state.collapsed&&this.props.dispatchEvent("collapsed",E(this.props.data,{collapsed:this.state.collapsed}))},t.prototype.getCurrentLink=function(e){var t=null,n=this.props,o=n.config,r=n.data,i=n.valueField,a=p(e,r,"| raw");return e&&(t=A(o,function(e){return i?e[i]===a:e.label==a||e.key==a})),t},t.prototype.toggleLink=function(e,t,o){return i(this,void 0,void 0,function(){var t,r,i,a,l,s,u,c,p,f,v;return n(this,function(n){switch(n.label){case 0:return t=this.props,r=t.config,i=t.updateConfig,a=t.deferLoad,l=t.dispatchEvent,s=t.stacked,u=t.mode,c=t.accordion,p=t.data,f=s&&"float"!==u&&c,[4,l("toggled",E(p,{item:d({},e),open:void 0!==o?!o:!e.unfolded}))];case 1:return(null==(v=n.sent())?void 0:v.prevented)||(e.defer&&!e.loaded?a(e):i(m(r,function(t){return e.__id===t.__id?d(d({},t),{unfolded:void 0!==o?!o:!t.unfolded}):d(d({},t),{unfolded:f?!!A(t.children||[],function(t){return t===e}):t.unfolded})}),"toggle")),[2]}})})},t.prototype.dragUpdate=function(e){var t,o;return i(this,void 0,void 0,function(){var r,i,a,l,d,s;return n(this,function(n){switch(n.label){case 0:return r=this.props.config,i=e.nodeId,a=e.dragLink,l=e.position,a&&(d=v(r,function(e){return e.__id===a.__id}),r=g(r,d,1),"self"===l?m(r,function(e){return e.__id===i&&(e.children||(e.children=[]),e.children.push(a)),e}):(s=v(r,function(e){return e.__id===i}),"bottom"===l&&s&&s.push(s.pop()+1),r=g(r,s,0,a))),this.props.updateConfig(r,"update"),null===(o=(t=this.props).onOrderChange)||void 0===o||o.call(t,r),[4,this.saveOrder(m(r,function(e){for(var t in e)/^__.*$/.test(t)&&delete e[t];return e}))];case 1:return n.sent(),[2]}})})},t.prototype.saveOrder=function(e){return i(this,void 0,void 0,function(){var t,o,r,i,a;return n(this,function(n){switch(n.label){case 0:return t=this.props,o=t.saveOrderApi,r=t.env,i=t.data,a=t.reload,o&&R(o)?[4,null==r?void 0:r.fetcher(o,E(i,{data:e}),{method:"post"})]:[3,2];case 1:return n.sent(),a(),[3,3];case 2:this.props.onOrderChange||null==r||r.alert("NAV saveOrderApi is required!"),n.label=3;case 3:return[2]}})})},t.prototype.expandLink=function(e){var t=this.props,n=t.config;(0,t.updateConfig)(m(n,function(t){return A((null==t?void 0:t.children)||[],function(t){return t.__id===e.__id})?d(d({},t),{expanded:!0}):d({},t)}),"expand")},t.prototype.handleChange=function(e){var t=this.props,n=t.dispatchEvent,o=t.data;setTimeout(function(){n("change",E(o,{value:e}))})},t.prototype.handleSelect=function(e,t){return i(this,void 0,void 0,function(){var o,r,i,a,l,s,u,c,p;return n(this,function(n){switch(n.label){case 0:return o=this.props,r=o.onSelect,i=o.env,a=o.data,l=o.level,s=o.dispatchEvent,u=o.updateConfig,c=o.config,[4,s("click",E(a,{item:d({},e)}))];case 1:return(null==(p=n.sent())?void 0:p.prevented)||r&&!1===r(e)?[2]:t===l?(u(m(c,function(t){return d(d({},t),{active:t.__id===e.__id})}),"select"),[2]):e.expandMore?(this.expandLink(e),[2]):e.to?(null==i||i.jumpTo(C(e.to,a),e,a),[2]):[2]}})})},t.prototype.render=function(){var e=this.props,t=e.disabled,n=e.loading,r=e.config;e.deferLoad,e.updateConfig;var i=o(e,["disabled","loading","config","deferLoad","updateConfig"]),a=this.getCurrentLink(this.state.currentKey);return z.createElement(G,d({},i,{loading:n,links:(null==a?void 0:a.children)||r,collapsed:this.state.collapsed,disabled:t||n,onSelect:this.handleSelect,onToggle:this.toggleLink,onChange:this.handleChange,onDragUpdate:this.dragUpdate}))},t}(z.Component)),$=function(e){function t(t,n){var o=e.call(this,t)||this;return o.remoteRef=void 0,n.registerComponent(o),o}return r(t,e),t.prototype.remoteConfigRef=function(e){this.remoteRef=e},t.prototype.getRef=function(e){this.navRef=e},t.prototype.componentDidUpdate=function(e){this.remoteRef&&this.props.source!==e.source&&this.remoteRef.syncConfig()},t.prototype.componentWillUnmount=function(){this.context.unRegisterComponent(this)},t.prototype.doAction=function(e,t,n,o){var r,i=null==e?void 0:e.actionType,a=(null==o?void 0:o.value)||(null===(r=null==e?void 0:e.data)||void 0===r?void 0:r.value);if("updateItems"===i){var l=this.props.valueField,d=[];if(a)if(Array.isArray(a)){if(a.length>0){var s=a.find(function(e){return e.children&&e.children.length});if(s){var u=l?s[l]:(null==s?void 0:s.key)||(null==s?void 0:s.label);this.navRef.state.currentKey!==u&&(this.navRef.setState({currentKey:u}),d=s.children)}else this.navRef.setState({currentKey:""})}}else if("string"==typeof a&&this.navRef.state.currentKey!==a){this.navRef.setState({currentKey:a});var c=this.navRef.getCurrentLink(a);d=null==c?void 0:c.children}if(d.length>0){var p=this.props,f=p.env,v=p.data,h=A(d,function(e){return f&&f.isCurrentUrl(C(e.to,v),e)});null==f||f.jumpTo(C(h?h.to:d[0].to,v),void 0,v)}}else if("collapse"===i){var g=void 0!==a?a:!this.navRef.state.collapsed;this.navRef.setState({collapsed:g})}else"reset"===i&&this.navRef.setState({currentKey:""})},t.prototype.reload=function(e,t,n){var o;if(t)return this.receive(t);var r=this.props,i=r.data;r.translate;var a=n?E(i,n):i;null===(o=this.remoteRef)||void 0===o||o.loadConfig(a)},t.prototype.receive=function(e){this.reload(void 0,void 0,e)},t.prototype.render=function(){var e=this.props,t=e.id,n=o(e,["id"]);return z.createElement(Z,d({},n,{id:t||w(),onRef:this.getRef,reload:this.reload,remoteConfigRef:this.remoteConfigRef}))},t.contextType=N,l([h,a("design:type",Function),a("design:paramtypes",[Object]),a("design:returntype",void 0)],t.prototype,"remoteConfigRef",null),l([h,a("design:type",Function),a("design:paramtypes",[Object]),a("design:returntype",void 0)],t.prototype,"getRef",null),l([h,a("design:type",Function),a("design:paramtypes",[String,Object,Object]),a("design:returntype",void 0)],t.prototype,"reload",null),l([h,a("design:type",Function),a("design:paramtypes",[Object]),a("design:returntype",void 0)],t.prototype,"receive",null),l([S({type:"nav",alias:["navigation"],name:"nav"}),a("design:paramtypes",[Object,Object])],t)}(z.Component);export{Y as Navigation,$ as NavigationRenderer,G as default};
@@ -0,0 +1 @@
1
+ import{o as e,t}from"./rolldown-runtime-DXzHzmmG.js";import{t as n}from"./react-CWkhIp2c.js";import{a as s,i,n as r,o as l,r as a,t as o}from"./tslib.es6-TRdqp4ac.js";import{B as u,Bi as c,Gn as d,J as p,L as h,Nn as m,O as v,P as y,R as f,W as g,Yn as C,Z as b,Zi as k,ai as N,ar as O,ht as S,ir as E,or as F,qi as w,vi as P,xn as j,zr as x}from"./esm-DMJQA23h.js";import{F as R}from"./function-AxX-od3p.js";import{t as V}from"./react-dom-CCQ2gErg.js";import{E as A,Nt as T,T as I,q as M}from"./esm-Dgr2t9Jm.js";import{a as B,c as L,n as D}from"./_castFunction-CQMNP8A1.js";import{t as K}from"./StaticHoc-D0pM2bgC.js";import{t as z}from"./xor-D3F4ghdw.js";var W=/* @__PURE__ */t((e,t)=>{var n=j(),s=w(),i=R(),r=k(),l=s(function(e){return i(n(e,1,r,!0))});t.exports=l}),U=/* @__PURE__ */e(n()),q=/* @__PURE__ */e(V()),H=/* @__PURE__ */e(z()),Z=/* @__PURE__ */e(W()),G=/* @__PURE__ */e(A()),J=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.outTarget=U.createRef(),t.state={isOpened:!1,isFocused:!1,inputValue:"",stack:[t.props.options]},t}return i(t,e),t.prototype.domRef=function(e){this.target=e},t.prototype.componentDidUpdate=function(e){e.options!==this.props.options&&this.setState({stack:[this.props.options]})},t.prototype.doAction=function(e,t,n){var s,i,r=this.props,l=r.resetValue,a=r.onChange,o=r.formStore,u=r.store,c=r.name,d=null==e?void 0:e.actionType;if("clear"===d)null==a||a("");else if("reset"===d){var p=null!==(i=P(null!==(s=null==o?void 0:o.pristine)&&void 0!==s?s:null==u?void 0:u.pristine,c))&&void 0!==i?i:l;null==a||a(null!=p?p:"")}},t.prototype.dispatchEvent=function(e,t){return void 0===t&&(t={}),r(this,void 0,void 0,function(){var n,i,r,l,a,u,c;return s(this,function(s){switch(s.label){case 0:return n=this.props,i=n.dispatchEvent,r=n.options,l=n.multiple,a=n.value,u=n.selectedOptions,[4,i(e,S(this.props,o({options:r,items:r,value:a,selectedItems:l?u:u[0]},t)))];case 1:return[2,!!(null==(c=s.sent())?void 0:c.prevented)]}})})},t.prototype.isParentNode=function(e){return Array.isArray(e.children)&&e.children.length>0},t.prototype.handleOutClick=function(e){var t;e.stopPropagation(),this.outTargetWidth=null===(t=this.outTarget.current)||void 0===t?void 0:t.clientWidth,e.defaultPrevented||this.setState(function(e){return{isOpened:!e.isOpened}})},t.prototype.handleResultClear=function(){this.setState({inputValue:void 0})},t.prototype.close=function(){this.setState({isOpened:!1})},t.prototype.removeItem=function(e,t){return r(this,void 0,void 0,function(){var n,i,r,l;return s(this,function(s){switch(s.label){case 0:return n=this.props,i=n.onChange,r=n.selectedOptions,t&&t.stopPropagation(),r.splice(e,1),l=this.getValue(),[4,this.dispatchEvent("change",{value:l})];case 1:return s.sent()||i(l),[2]}})})},t.prototype.renderValue=function(e,t){var n=this.props,s=n.classnames,i=n.labelField,r=n.valueField,l=n.options,a=n.hideNodePathLabel,o=this.state.inputValue||"",u=N(o);if(a)return v(e[i||"label"]);var c=E(l,e,!0),d=v(e[i||"label"]),p=c?c.map(function(e){return v(e[i||"label"])}).join(" / "):d;return U.createElement("span",{className:s("Select-valueLabel"),key:t||e[r||"value"],title:p},c?c.map(function(e,t){var n=v(e[i||"label"]),s=e[r||"value"],l=t===c.length-1;return U.createElement("span",{key:t},u.test(s)||u.test(n)?g(n,o):n,!l&&" / ")}):d)},t.prototype.handleOptionClick=function(e){return r(this,void 0,void 0,function(){var t,n,i,r,l,a,o,u,c;return s(this,function(s){switch(s.label){case 0:return t=this.props,n=t.multiple,i=t.onChange,r=t.joinValues,l=t.extractValue,a=t.valueField,o=t.onlyLeaf,n||void 0===(u=r||l?e[a||"value"]:e)||o&&this.isParentNode(e)?[2]:[4,this.dispatchEvent("change",{value:u,selectedItems:e})];case 1:return(c=s.sent())||i(u),c||this.handleResultClear(),this.setState({stack:[this.props.options]}),this.close(),[2]}})})},t.prototype.handleCheck=function(e,t,n){return r(this,void 0,void 0,function(){var i,r,l,a,o,u,c,d,p,h,m,v,y,f,g,b,k,N,O,S,E;return s(this,function(s){switch(s.label){case 0:if(i=this.props,r=i.onChange,l=i.selectedOptions,a=i.joinValues,o=i.delimiter,u=i.extractValue,c=i.withChildren,d=i.onlyChildren,p=i.cascade,h=i.options,m=i.onlyLeaf,v=this.state.stack,y=this.props.valueField||"value",m&&!Array.isArray(e)&&this.isParentNode(e))return[2];if(!Array.isArray(e)&&e.children&&e.children.length&&"number"==typeof t&&(v[t]?v.splice(t+1,1,e.children):v.push(e.children)),f=l,b=function(e){return(0,G.default)(C(Array.isArray(e)?e:[e],function(e){return e.children&&e.children.length?null:e}))},Array.isArray(e)?(c?e=C(e):d&&(e=b(e)),g=f.length===e.length?[]:e):Array.isArray(e.children)?p?g=(0,H.default)(f,[e]):c?(e=C([e]),k=e.every(function(e){return!!~f.indexOf(e)}),g=(k?H.default:Z.default)(f,e)):d?(e=b(e),k=e.every(function(e){return!!~f.indexOf(e)}),g=(k?H.default:Z.default)(f,e)):(g=f.filter(function(t){return!~C([e]).indexOf(t)}),!~f.indexOf(e)&&g.push(e)):g=(0,H.default)(f,[e]),!p)for(N=e;(null==(O=F(h,N))?void 0:O.value)&&O.children.every(function(e){return~g.indexOf(e)});)O.children.forEach(function(e){var t=g.indexOf(e);!~t||c||d||g.splice(t,1)}),d||g.push(O),N=O;return S=a?g.map(function(e){return e[y]}).join(o):u?g.map(function(e){return e[y]}):g,[4,this.dispatchEvent("change",{value:S,selectedItems:e})];case 1:return(E=s.sent())||r(S),E||this.handleResultClear(),n&&this.setState({stack:[this.props.options]}),[2]}})})},t.prototype.allChecked=function(e){var t=this,n=this.props,s=n.selectedOptions,i=n.withChildren,r=n.onlyChildren;return e.every(function(e){return(i||r)&&e.children?t.allChecked(e.children):s.some(function(t){return t===e})})},t.prototype.partialChecked=function(e){var t=this;return e.some(function(e){return e.children&&t.partialChecked(e.children)||t.props.selectedOptions.some(function(t){return t===e})})},t.prototype.reload=function(e,t){var n=this.props.reloadOptions;n&&n(e,t)},t.prototype.getValue=function(){var e=this.props,t=e.selectedOptions,n=e.joinValues,s=e.valueField,i=e.extractValue,r=e.delimiter,l=e.value;return n?l=t.map(function(e){return e[s||"value"]}).join(r||","):i&&(l=t.map(function(e){return e[s||"value"]})),l},t.prototype.onFocus=function(e){return r(this,void 0,void 0,function(){var t,n,i,r;return s(this,function(s){switch(s.label){case 0:return t=this.props,n=t.onFocus,i=t.disabled,r=this.getValue(),i||this.state.isOpened?[3,2]:(this.setState({isFocused:!0}),[4,this.dispatchEvent("focus",{value:r})]);case 1:s.sent()||n&&n(e),s.label=2;case 2:return[2]}})})},t.prototype.onBlur=function(e){return r(this,void 0,void 0,function(){var t,n;return s(this,function(s){switch(s.label){case 0:return t=this.props.onBlur,n=this.getValue(),this.setState({isFocused:!1}),[4,this.dispatchEvent("blur",{value:n})];case 1:return s.sent()||t&&t(e),[2]}})})},t.prototype.getTarget=function(){return this.target||(this.target=(0,q.findDOMNode)(this)),this.target},t.prototype.handleKeyPress=function(e){" "===e.key&&(this.handleOutClick(e),e.preventDefault())},t.prototype.handleInputKeyDown=function(e){var t=this.state.inputValue,n=this.props,s=n.multiple,i=n.selectedOptions;"Backspace"===e.key&&!t&&i.length&&s&&this.removeItem(i.length-1)},t.prototype.handleInputChange=function(e){var t=this.props,n=t.options,s=t.labelField,i=t.valueField,r=e&&this.state.isOpened?d(n,function(t,n,r,l){return!!c([t].concat(l),e,{keys:[s||"label",i||"value"],threshold:c.rankings.CONTAINS}).length||!(!t.children||!t.children.length)},1,!0):n.concat();this.setState({inputValue:e,stack:[r]})},t.prototype.handleResultChange=function(e){return r(this,void 0,void 0,function(){var t,n,i,r,l,a,o,u;return s(this,function(s){switch(s.label){case 0:return t=this.props,n=t.joinValues,i=t.extractValue,r=t.delimiter,l=t.valueField,a=t.onChange,o=t.multiple,u=Array.isArray(e)?e.concat():[],o||u.length?[3,2]:[4,this.dispatchEvent("change",{value:""})];case 1:return s.sent()||a(""),[2];case 2:return(n||i)&&(u=e.map(function(e){return e[l||"value"]})),n&&(u=u.join(r||",")),[4,this.dispatchEvent("change",{value:u})];case 3:return s.sent()||a(u),[2]}})})},t.prototype.getMenuSelectMenuStyle=function(){var e=this.props.options,t=this.outTargetWidth,n=O(e),s={};return t&&(s={width:t/n}),s},t.prototype.renderOptions=function(){var e=this,t=this.props,n=t.multiple,s=t.selectedOptions,i=t.classnames,r=t.options,l=t.disabled,a=t.checkAll,u=t.checkAllLabel,c=t.translate,d=t.labelField,p=t.menuClassName,h=t.cascade,m=t.onlyChildren,y=t.testIdBuilder,f=this.props.valueField||"value",g=this.state.stack,C=this.partialChecked(r),b=this.allChecked(r);return U.createElement(U.Fragment,null,g.map(function(t,g){return U.createElement("div",{key:g,className:i("NestedSelect-menu",p),style:e.getMenuSelectMenuStyle()},n&&a&&0===g?U.createElement("div",{className:i("NestedSelect-option","checkall")},U.createElement(T,{size:"sm",onChange:e.handleCheck.bind(e,t),checked:C,partial:C&&!b}),U.createElement("span",{onClick:e.handleCheck.bind(e,t)},c(u))):null,t.map(function(t,a){var u=null==y?void 0:y.getChild("menu-".concat(g)).getChild(t.value||a),c=E(r,t),p=null==c?void 0:c.some(function(e){return!!~s.indexOf(e)}),C=!h&&n&&p,b=null==c?void 0:c.some(function(e){return!!e.disabled}),k=C||t.disabled||b||!!l,N=!(!t.children||!e.partialChecked(t.children)),O=C||!!~s.indexOf(t);!O&&m&&n&&e.isParentNode(t)&&e.allChecked(t.children)&&(O=!0);var S=v(t[d||"label"]);return U.createElement("div",{key:a,className:i("NestedSelect-option",{"is-active":!k&&(O||!h&&N)}),onMouseEnter:e.onMouseEnter.bind(e,t,g)},n?U.createElement(T,{size:"sm",onChange:e.handleCheck.bind(e,t,g,!1),trueValue:t[f],checked:O||!h&&N,partial:!O,disabled:k,testIdBuilder:null==u?void 0:u.getChild("checkbox")}):null,U.createElement("div",o({className:i("NestedSelect-optionLabel",{"is-disabled":k}),onClick:function(){return!k&&(n?e.handleCheck(t,g):e.handleOptionClick(t))},title:S},null==u?void 0:u.getTestId()),S),t.children&&t.children.length?U.createElement("div",o({className:i("NestedSelect-optionArrowRight",{"is-disabled":k})},null==u?void 0:u.getChild("arrow-right").getTestId()),U.createElement(L,{icon:"right-arrow-bold",className:"icon"})):null)}))}))},t.prototype.renderSearchResult=function(){var e=this,t=this.state,n=t.stack,s=t.inputValue,i=this.props,r=i.classnames,l=i.translate,a=i.options,o=i.labelField,u=i.valueField,c=i.cascade,d=i.selectedOptions,p=i.multiple,h=i.disabled,m=i.onlyChildren,v=i.render,y=this.props.noResultsText;y&&(y=v("noResultText",l(y)));var f=N(s||""),g=C(n[0]).filter(function(e){return!(!f.test(e[u||"value"])&&!f.test(e[o||"label"]))});return U.createElement("div",{className:r("NestedSelect-menu"),style:this.getMenuSelectMenuStyle()},g.length?g.map(function(t,n){var s=E(a,t),i=!c&&p&&(null==s?void 0:s.some(function(e){return!!~d.indexOf(e)})),l=i||t.disabled||!!h||(null==s?void 0:s.some(function(e){return!!e.disabled})),o=!(!t.children||!e.partialChecked(t.children)),u=i||!!~d.indexOf(t);return!u&&m&&e.isParentNode(t)&&e.allChecked(t.children)&&(u=!0),U.createElement("div",{className:r("NestedSelect-option",{"is-active":!l&&(u||!c&&o)}),key:n},U.createElement("div",{className:r("NestedSelect-optionLabel",{"is-disabled":l}),onClick:function(){!l&&(p?e.handleCheck(t,t.value,!0):e.handleOptionClick(t))}},e.renderValue(t,t.value)))}):U.createElement("div",{className:r("NestedSelect-option",{"no-result":!0})},y))},t.prototype.onMouseEnter=function(e,t,n){var s=this.state.stack;t+=1;var i=e.children;i&&i.length?s[t]?s.splice(t,1,i):s.push(i):s[t]&&s.splice(t,1),this.setState({stack:s.slice(0,t+1)})},t.prototype.renderOuter=function(){var e=this,t=this.props,n=t.popOverContainer,s=t.translate,i=t.classnames,r=t.options,l=t.render,a=t.id,c=t.themeCss,d=!!this.state.inputValue,p=this.props.noResultsText;p&&(p=l("noResultText",s(p)));var m=U.createElement(u,{disabled:!this.state.isOpened,onRootClose:this.close},function(t){return U.createElement("div",{className:i("NestedSelect-menuOuter"),ref:t},d?e.renderSearchResult():r.length?e.renderOptions():U.createElement("div",{className:i("NestedSelect-noResult")},p))});return U.createElement(f,{target:this.getTarget,container:n||function(){return(0,q.findDOMNode)(e)},placement:"auto",show:!0},U.createElement(h,{className:i("NestedSelect-popover",b(o(o({},this.props),{name:"nestedSelectPopoverClassName",id:a,themeCss:c})))},m))},t.prototype.render=function(){var e,t=this.props,n=t.className,s=t.style,i=t.disabled,r=t.classnames,l=t.multiple,a=t.placeholder,u=t.translate,c=t.inline,d=t.searchable,h=t.selectedOptions,m=t.clearable,v=t.loading,y=t.borderMode,f=t.mobileUI;t.popOverContainer;var g=t.env,C=t.testIdBuilder,k=t.loadingConfig,N=t.maxTagCount,O=t.overflowTagPopover,S=this.props,E=S.classPrefix,F=S.themeCss,w=S.id;return U.createElement("div",{className:r("NestedSelectControl",n),ref:this.outTarget,style:s},U.createElement(M,{mobileUI:f,maxTagCount:N,overflowTagPopover:O,disabled:i,ref:this.domRef,placeholder:u(null!=a?a:"placeholder.empty"),inputPlaceholder:"",className:r("NestedSelect",(e={"NestedSelect--inline":c,"NestedSelect--single":!l,"NestedSelect--multi":l,"NestedSelect--searchable":d,"is-opened":this.state.isOpened,"is-focused":this.state.isFocused},e["NestedSelect--border".concat(x(y))]=y,e),b(o(o({},this.props),{name:"nestedSelectControlClassName",id:w,themeCss:F}))),result:l?h:h.length?h[0]:"",onResultClick:this.handleOutClick,value:this.state.inputValue,onChange:this.handleInputChange,onResultChange:this.handleResultChange,onClear:this.handleResultClear,itemRender:this.renderValue,onKeyPress:this.handleKeyPress,onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.handleInputKeyDown,clearable:m,hasDropDownArrow:!0,allowInput:d&&!f,testIdBuilder:C},v?U.createElement(B,{loadingConfig:k,size:"sm"}):void 0),f?U.createElement(D,{className:r("NestedSelect-popup"),container:g.getModalContainer,isShow:this.state.isOpened,onHide:this.close,showConfirm:!1,showClose:!1},U.createElement(I,o({onClose:this.close},this.props,{onChange:this.handleResultChange,options:this.props.options.slice(),value:h}))):this.state.isOpened?this.renderOuter():null,U.createElement(p,o({},this.props,{config:{themeCss:F,classNames:[{key:"nestedSelectControlClassName",weights:{hover:{suf:".is-clickable:not(.is-disabled)"},focused:{suf:".is-opened:not(.is-mobile)"},disabled:{suf:".is-disabled"}}},{key:"nestedSelectPopoverClassName",weights:{default:{suf:" .".concat(E,"NestedSelect-option")},hover:{suf:" .".concat(E,"NestedSelect-option.is-highlight")},focused:{inner:".".concat(E,"NestedSelect-option.is-active")}}}],id:w},env:g})))},t.defaultProps={cascade:!1,withChildren:!1,onlyChildren:!1,onlyLeaf:!1,searchPromptText:"Select.searchPromptText",noResultsText:"noResult",checkAll:!0,checkAllLabel:"Select.checkAll",hideNodePathLabel:!1},a([m,l("design:type",Function),l("design:paramtypes",[Object]),l("design:returntype",void 0)],t.prototype,"domRef",null),a([m,l("design:type",Function),l("design:paramtypes",[String,Object]),l("design:returntype",Promise)],t.prototype,"dispatchEvent",null),a([m,l("design:type",Function),l("design:paramtypes",[Object]),l("design:returntype",void 0)],t.prototype,"handleOutClick",null),a([m,l("design:type",Function),l("design:paramtypes",[]),l("design:returntype",void 0)],t.prototype,"handleResultClear",null),a([m,l("design:type",Function),l("design:paramtypes",[]),l("design:returntype",void 0)],t.prototype,"close",null),a([m,l("design:type",Function),l("design:paramtypes",[Object,Object]),l("design:returntype",void 0)],t.prototype,"renderValue",null),a([m,l("design:type",Function),l("design:paramtypes",[Object]),l("design:returntype",Promise)],t.prototype,"handleOptionClick",null),a([m,l("design:type",Function),l("design:paramtypes",[Object,Number,Boolean]),l("design:returntype",Promise)],t.prototype,"handleCheck",null),a([m,l("design:type",Function),l("design:paramtypes",[]),l("design:returntype",void 0)],t.prototype,"getValue",null),a([m,l("design:type",Function),l("design:paramtypes",[Object]),l("design:returntype",Promise)],t.prototype,"onFocus",null),a([m,l("design:type",Function),l("design:paramtypes",[Object]),l("design:returntype",Promise)],t.prototype,"onBlur",null),a([m,l("design:type",Function),l("design:paramtypes",[]),l("design:returntype",void 0)],t.prototype,"getTarget",null),a([m,l("design:type",Function),l("design:paramtypes",[Object]),l("design:returntype",void 0)],t.prototype,"handleKeyPress",null),a([m,l("design:type",Function),l("design:paramtypes",[Object]),l("design:returntype",void 0)],t.prototype,"handleInputKeyDown",null),a([m,l("design:type",Function),l("design:paramtypes",[String]),l("design:returntype",void 0)],t.prototype,"handleInputChange",null),a([m,l("design:type",Function),l("design:paramtypes",[Array]),l("design:returntype",Promise)],t.prototype,"handleResultChange",null),a([m,l("design:type",Function),l("design:paramtypes",[]),l("design:returntype",void 0)],t.prototype,"getMenuSelectMenuStyle",null),a([K(),l("design:type",Function),l("design:paramtypes",[]),l("design:returntype",void 0)],t.prototype,"render",null),t}(U.Component),Y=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),a([y({type:"nested-select"})],t)}(J),_=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),a([y({type:"cascader-select"})],t)}(J);export{_ as CascaderSelectControlRenderer,Y as NestedSelectControlRenderer,J as default};
@@ -1 +1 @@
1
- import{o as e}from"./rolldown-runtime-Cmsah3SL.js";import{t}from"./react-COOgDf_T.js";import{i as r,r as n}from"./tslib.es6-TRdqp4ac.js";import{$n as a,Si as s,St as i,it as l,ni as o,v as p,wi as u}from"./esm-Byma-6B-.js";var m=/* @__PURE__ */e(t()),f=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.render=function(){var e=this.props,t=e.placeholder,r=e.kilobitSeparator,n=e.precision,l=e.prefix,f=e.affix,c=e.suffix,d=e.percent,h=e.unitOptions,y=e.className,b=e.style,N=e.classnames,x=e.translate,g=m.createElement("span",{className:"text-muted"},t),v=a(this.props),E="";if("string"==typeof v&&h&&h.length&&(E=i(h).map(function(e){return e.value}).find(function(e){return v.endsWith(e)})||"")&&(v=v.replace(E,"")),"number"==typeof v||"string"==typeof v)if("string"==typeof v&&n&&(v=o(parseFloat(v))),isNaN(v))g=!1;else if(d){var F="number"==typeof d?d:0,j=100*(v=parseFloat(v)||0),S=Math.pow(10,F);v=(Math.round(j*S)/S).toFixed(F)+"%",g=m.createElement("span",null,v)}else"number"==typeof v&&n&&(v=s(u(v),".",n)),r&&(v=p(v,n)),g=m.createElement("span",null,v);return g=g?m.createElement(m.Fragment,null,l,g,E,null!=f?f:c):m.createElement("span",{className:"text-danger"},x("Number.invalid")),m.createElement("span",{className:N("NumberField",y),style:b},g)},t.defaultProps={placeholder:"-",kilobitSeparator:!0},t}(m.Component),c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),n([l({type:"number"})],t)}(f);export{f as NumberField,c as NumberFieldRenderer};
1
+ import{o as e}from"./rolldown-runtime-DXzHzmmG.js";import{t}from"./react-CWkhIp2c.js";import{i as r,r as n}from"./tslib.es6-TRdqp4ac.js";import{$n as a,Si as s,St as i,it as l,ni as o,v as p,wi as u}from"./esm-DMJQA23h.js";var m=/* @__PURE__ */e(t()),f=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.render=function(){var e=this.props,t=e.placeholder,r=e.kilobitSeparator,n=e.precision,l=e.prefix,f=e.affix,c=e.suffix,d=e.percent,h=e.unitOptions,y=e.className,b=e.style,N=e.classnames,x=e.translate,g=m.createElement("span",{className:"text-muted"},t),v=a(this.props),E="";if("string"==typeof v&&h&&h.length&&(E=i(h).map(function(e){return e.value}).find(function(e){return v.endsWith(e)})||"")&&(v=v.replace(E,"")),"number"==typeof v||"string"==typeof v)if("string"==typeof v&&n&&(v=o(parseFloat(v))),isNaN(v))g=!1;else if(d){var F="number"==typeof d?d:0,j=100*(v=parseFloat(v)||0),S=Math.pow(10,F);v=(Math.round(j*S)/S).toFixed(F)+"%",g=m.createElement("span",null,v)}else"number"==typeof v&&n&&(v=s(u(v),".",n)),r&&(v=p(v,n)),g=m.createElement("span",null,v);return g=g?m.createElement(m.Fragment,null,l,g,E,null!=f?f:c):m.createElement("span",{className:"text-danger"},x("Number.invalid")),m.createElement("span",{className:N("NumberField",y),style:b},g)},t.defaultProps={placeholder:"-",kilobitSeparator:!0},t}(m.Component),c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),n([l({type:"number"})],t)}(f);export{f as NumberField,c as NumberFieldRenderer};
@@ -0,0 +1 @@
1
+ import{o as t}from"./rolldown-runtime-DXzHzmmG.js";import{t as e}from"./react-CWkhIp2c.js";import{a as r,i as n,n as i,o,r as s,t as a}from"./tslib.es6-TRdqp4ac.js";import{Ii as l,Xr as c,an as d,dt as u,it as p,oi as f}from"./esm-DMJQA23h.js";import"./esm-Dgr2t9Jm.js";import{a as h}from"./_castFunction-CQMNP8A1.js";var v=/* @__PURE__ */t(e()),m=function(t){function e(e){var r=t.call(this,e)||this;return r.rootElement=v.createRef(),r.state={loading:!1},r}return n(e,t),e.prototype.componentDidMount=function(){var t;(null===(t=this.rootElement)||void 0===t?void 0:t.current)&&this.renderWord()},e.prototype.componentDidUpdate=function(t){var e,r,n=this;if(!this.state.loading){var i=this.props;d(t.src,i.src,t.data,i.data)&&this.fetchWord().then(function(){n.renderWord()}),i.name&&t.data[i.name]!==i.data[i.name]&&this.renderWord(),JSON.stringify(t.wordOptions)===JSON.stringify(i.wordOptions)&&t.display===i.display||this.renderWord(),(null===(e=i.wordOptions)||void 0===e?void 0:e.enableVar)&&(i.trackExpression&&c(i.trackExpression,i.data)!==c(t.trackExpression,t.data)?this.renderWord():null===(r=this.office)||void 0===r||r.updateVariable())}},e.prototype.doAction=function(t,e,r,n){var i,o,s=null==t?void 0:t.actionType;"saveAs"===s&&(null===(i=this.office)||void 0===i||i.download((null==n?void 0:n.name)||this.fileName)),"print"===s&&(null===(o=this.office)||void 0===o||o.print())},e.prototype.evalVar=function(t,e){var r=this.props.data;return l("${"+t+"}",f(e,r),"| raw")},e.prototype.renderWord=function(){return i(this,void 0,void 0,function(){var t,e,n;return r(this,function(r){switch(r.label){case 0:return t=this.props,e=t.src,n=t.name,e?this.document?[3,2]:[4,this.fetchWord()]:[3,4];case 1:r.sent(),r.label=2;case 2:return[4,this.renderRemoteWord()];case 3:return r.sent(),[3,5];case 4:n&&this.renderFormFile(),r.label=5;case 5:return[2]}})})},e.prototype.fetchWord=function(){var t;return i(this,void 0,void 0,function(){var e,n,i,o,s,a,c,d;return r(this,function(r){switch(r.label){case 0:if(e=this.props,n=e.env,i=e.src,o=e.data,s=e.translate,"string"==typeof(c=i?l(i,o,"| raw"):void 0)?(a=c,this.fileName=a.split("/").pop()):"object"==typeof c&&"string"==typeof c.value&&(a=c.value,this.fileName=c.name||a.split("/").pop()),!a)return console.warn("file src is empty"),[2];this.finalSrc=a,this.setState({loading:!0}),r.label=1;case 1:return r.trys.push([1,3,4,5]),[4,n.fetcher(a,o,{responseType:"arraybuffer"})];case 2:return d=r.sent(),this.document=d.data,[3,5];case 3:return r.sent(),(null===(t=this.rootElement)||void 0===t?void 0:t.current)&&(this.rootElement.current.innerHTML=s("loadingFailed")+" url:"+a),[3,5];case 4:return this.setState({loading:!1}),[7];case 5:return[2]}})})},e.prototype.initOffice=function(t,e){return i(this,void 0,void 0,function(){var n,i,o,s,l;return r(this,function(r){switch(r.label){case 0:return n=this.props,i=n.wordOptions,o=n.excelOptions,n.env,n.src,s=n.data,n.translate,[4,(0,t.createOfficeViewer)(e||this.document,{},this.finalSrc)];case 1:return(l=r.sent())instanceof t.Word?(l.updateOptions(a(a({},i),{data:s,evalVar:this.evalVar.bind(this)})),[3,4]):[3,2];case 2:return l instanceof t.Excel?(l.updateOptions(a(a({},o),{data:s,evalVar:this.evalVar.bind(this)})),[4,l.loadExcel()]):[3,4];case 3:r.sent(),r.label=4;case 4:return[2,l]}})})},e.prototype.renderRemoteWord=function(){return i(this,void 0,void 0,function(){var t,e,n=this;return r(this,function(o){return(t=this.props).wordOptions,t.excelOptions,t.env,t.src,t.data,e=t.display,t.translate,this.document?(import("./esm-lQQ8f-8c.js").then(function(t){return i(n,void 0,void 0,function(){var n,i,o;return r(this,function(r){switch(r.label){case 0:return[4,this.initOffice(t)];case 1:return n=r.sent(),!1!==e?n.render(null===(i=this.rootElement)||void 0===i?void 0:i.current):!1===e&&(null===(o=this.rootElement)||void 0===o?void 0:o.current)&&(this.rootElement.current.innerHTML=""),this.office=n,this.setState({loading:!1}),[2]}})})}),[2]):[2]})})},e.prototype.renderFormFile=function(){var t=this;this.setState({loading:!0});var e=this.props;e.wordOptions;var n=e.name,o=e.data,s=e.display,a=o[n];if(a instanceof File){var l=new FileReader;l.onload=function(e){var n=l.result;import("./esm-lQQ8f-8c.js").then(function(e){return i(t,void 0,void 0,function(){var t,i,o;return r(this,function(r){switch(r.label){case 0:return[4,this.initOffice(e,n)];case 1:return t=r.sent(),!1!==s?t.render(null===(i=this.rootElement)||void 0===i?void 0:i.current):!1===s&&(null===(o=this.rootElement)||void 0===o?void 0:o.current)&&(this.rootElement.current.innerHTML=""),this.office=t,this.setState({loading:!1}),[2]}})})})},l.readAsArrayBuffer(a)}else this.setState({loading:!1})},e.prototype.render=function(){var t=this.props,e=t.classnames;t.translate;var r=t.className,n=t.loading,i=void 0!==n&&n,o=t.src,s=t.name,a=t.display,l=t.loadingConfig;return v.createElement("div",null,!1!==a&&!o&&!s&&v.createElement("svg",{width:"100%",height:"100",xmlns:"http://www.w3.org/2000/svg"},v.createElement("rect",{x:"0",y:"0",width:"100%",height:"100",style:{fill:"#F7F7F9"}}),v.createElement("text",{x:"50%",y:"50%",fontSize:"18",textAnchor:"middle",alignmentBaseline:"middle",fontFamily:"monospace, sans-serif",fill:"#555555"},"office viewer")),v.createElement("div",{ref:this.rootElement,className:e("office-viewer",r)}),v.createElement(h,{overlay:!0,key:"info",show:i&&this.state.loading,loadingConfig:l}))},e}(v.Component),y=function(t){function e(e,r){var n=t.call(this,e)||this;return r.registerComponent(n),n}return n(e,t),e.prototype.componentWillUnmount=function(){var e;null===(e=t.prototype.componentWillUnmount)||void 0===e||e.call(this),this.context.unRegisterComponent(this)},e.contextType=u,s([p({type:"office-viewer"}),o("design:paramtypes",[Object,Object])],e)}(m);export{y as OfficeViewerRenderer,m as default};
@@ -1 +1 @@
1
- import{o as t}from"./rolldown-runtime-Cmsah3SL.js";import{t as e}from"./react-COOgDf_T.js";import{i as r,r as n,t as s}from"./tslib.es6-TRdqp4ac.js";import{it as o}from"./esm-Byma-6B-.js";var i=/* @__PURE__ */t(e()),l=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.prototype.render=function(){var t=this.props,e=t.className,r=t.style,n=t.buttons,o=t.render,l=t.classnames,a=t.testIdBuilder;return i.createElement("div",{className:l("OperationField",e),style:r},Array.isArray(n)?n.map(function(t,e){return o("".concat(e),s({type:"button",size:t.size||"sm",level:t.level||(t.icon&&!t.label?"link":"")},t),{key:e,testIdBuilder:null==a?void 0:a.getChild("button-".concat(t.testid||t.id||e))})}):null)},e.propsList=["buttons","label"],e.defaultProps={},e}(i.Component),a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),n([o({type:"operation"})],e)}(l);export{l as OperationField,a as OperationFieldRenderer};
1
+ import{o as t}from"./rolldown-runtime-DXzHzmmG.js";import{t as e}from"./react-CWkhIp2c.js";import{i as r,r as n,t as s}from"./tslib.es6-TRdqp4ac.js";import{it as o}from"./esm-DMJQA23h.js";var i=/* @__PURE__ */t(e()),l=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.prototype.render=function(){var t=this.props,e=t.className,r=t.style,n=t.buttons,o=t.render,l=t.classnames,a=t.testIdBuilder;return i.createElement("div",{className:l("OperationField",e),style:r},Array.isArray(n)?n.map(function(t,e){return o("".concat(e),s({type:"button",size:t.size||"sm",level:t.level||(t.icon&&!t.label?"link":"")},t),{key:e,testIdBuilder:null==a?void 0:a.getChild("button-".concat(t.testid||t.id||e))})}):null)},e.propsList=["buttons","label"],e.defaultProps={},e}(i.Component),a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),n([o({type:"operation"})],e)}(l);export{l as OperationField,a as OperationFieldRenderer};
@@ -0,0 +1 @@
1
+ import{o as e}from"./rolldown-runtime-DXzHzmmG.js";import{t}from"./react-CWkhIp2c.js";import{a,i as o,n,o as s,r as i,s as r,t as l,u as d}from"./tslib.es6-TRdqp4ac.js";import{E as p,Fn as c,J as h,Nn as u,Nt as m,Xr as v,Z as f,an as y,dt as g,ft as C,it as b,oa as D,oi as N,qr as w,sn as S,xr as A,yr as k}from"./esm-DMJQA23h.js";import{H as M,nt as E}from"./esm-Dgr2t9Jm.js";import{a as x}from"./_castFunction-CQMNP8A1.js";var T=/* @__PURE__ */e(t()),P=function(e){function t(t){var a=e.call(this,t)||this;return c(a,["handleAction","handleChange","handleBulkChange","handleQuery","handleDialogConfirm","handleDialogClose","handleDrawerConfirm","handleDrawerClose","handleClick","reload","silentReload","initInterval"]),a.style=document.createElement("style"),a.style.setAttribute("data-page",""),document.getElementsByTagName("head")[0].appendChild(a.style),a.updateStyle(),a.varStyle=document.createElement("style"),a.varStyle.setAttribute("data-vars",""),document.getElementsByTagName("head")[0].appendChild(a.varStyle),a.updateVarStyle(),a}return o(t,e),t.prototype.updateStyle=function(){this.props.css||this.props.mobileCSS?this.style.innerHTML="\n ".concat(this.buildCSS(this.props.css),"\n\n @media (max-width: 768px) {\n ").concat(this.buildCSS(this.props.mobileCSS),"\n }\n "):this.style.innerHTML=""},t.prototype.buildCSS=function(e){if(!e)return"";var t="";for(var a in e){var o=e[a],n="";for(var s in o){var i="",r=o[s];if("string"==typeof r)n+=" ".concat(s,": ").concat(r,";\n");else{for(var l in r)i+=" ".concat(l,":").concat(r[l],";");n+=" ".concat(s," {").concat(i,"}\n")}}t+="\n ".concat(a," {\n ").concat(n,"\n }\n ")}return t},t.prototype.updateVarStyle=function(){var e=this.props.cssVars,t="";if(e){for(var a in e)if(a.startsWith("--")){if(-1!==a.indexOf(":"))continue;var o=e[a];if("string"==typeof o&&(-1!==o.indexOf("expression(")||-1!==o.indexOf(";")))continue;t+="".concat(a,": ").concat(o,"; \n")}this.varStyle.innerHTML="\n :root {\n ".concat(t,"\n }\n ")}},t.prototype.componentDidMount=function(){return n(this,void 0,void 0,function(){var e,t,o,n,s,i,r,l,d,p;return a(this,function(a){switch(a.label){case 0:return e=this.props,t=e.initApi,o=e.initFetch,n=e.initFetchOn,s=e.store,i=e.messages,r=e.data,l=e.dispatchEvent,d=e.env,this.mounted=!0,[4,l("init",r,this)];case 1:return p=a.sent(),(null==d?void 0:d.tracker)&&d.tracker({eventType:"pageLoaded"},this.props),(null==p?void 0:p.prevented)||!D(s)||S(t,s.data,o,n)&&s.fetchInitData(t,s.data,{successMessage:i&&i.fetchSuccess,errorMessage:i&&i.fetchFailed}).then(this.initInterval),[2]}})})},t.prototype.componentDidUpdate=function(e){var t=this.props,a=t.store,o=t.initApi;if(t.initFetchOn&&t.initFetch&&!e.initFetch||!1!==t.initFetch&&y(e.initApi,o,e.data,t.data)){var n=t.messages;S(o,a.data)&&a.fetchData(o,a.data,{successMessage:n&&n.fetchSuccess,errorMessage:n&&n.fetchFailed}).then(this.initInterval)}JSON.stringify(t.css)===JSON.stringify(e.css)&&JSON.stringify(t.mobileCSS)===JSON.stringify(e.mobileCSS)||this.updateStyle(),JSON.stringify(t.cssVars)!==JSON.stringify(e.cssVars)&&this.updateVarStyle(),k(e.defaultData,t.defaultData)&&a.reInitData(t.defaultData)},t.prototype.componentWillUnmount=function(){var e,t;this.mounted=!1,clearTimeout(this.timer),this.style&&(null===(e=this.style.parentNode)||void 0===e||e.removeChild(this.style)),this.varStyle&&(null===(t=this.varStyle.parentNode)||void 0===t||t.removeChild(this.varStyle))},t.prototype.reloadTarget=function(e,t){},t.prototype.handleAction=function(e,t,o,s,i){var r=this;void 0===s&&(s=!1);var l=this.props,d=l.env,p=l.store,c=l.messages,h=l.onAction;if("dialog"===t.actionType)return p.setCurrentAction(t,this.props.resolveDefinitions),new Promise(function(e){p.openDialog(o,void 0,function(a,o){var n;null===(n=t.callback)||void 0===n||n.call(t,a,o),e({confirmed:a,value:o})},i||r.context)});if("drawer"===t.actionType)return p.setCurrentAction(t,this.props.resolveDefinitions),new Promise(function(e){p.openDrawer(o,void 0,function(a,o){var n;null===(n=t.callback)||void 0===n||n.call(t,a,o),e({confirmed:a,value:o})},i)});if("ajax"===t.actionType){if(p.setCurrentAction(t,this.props.resolveDefinitions),!S(t.api,o))return;return p.saveRemote(t.api,o,{successMessage:t.messages&&t.messages.success||c&&c.saveSuccess,errorMessage:t.messages&&t.messages.failed||c&&c.saveSuccess}).then(function(){return n(r,void 0,void 0,function(){var e;return a(this,function(a){switch(a.label){case 0:return t.feedback&&A(t.feedback,p.data)?[4,this.openFeedback(t.feedback,p.data)]:[3,2];case 1:a.sent(),a.label=2;case 2:return(e=t.redirect&&v(t.redirect,p.data))&&d.jumpTo(e,t,p.data),t.reload&&this.reloadTarget(C(t.reload,p.data),p.data),[2]}})})}).catch(function(e){if(s||t.countDown)throw e})}return h(e,t,o,s,i||this.context)},t.prototype.handleQuery=function(e){return this.props.initApi?!((null==e?void 0:e.hasOwnProperty("orderBy"))&&!y(this.props.initApi,this.props.initApi,this.props.store.data,N(this.props.store.data,e)))&&void this.receive(e):!!this.props.onQuery&&this.props.onQuery(e)},t.prototype.handleDialogConfirm=function(e,t){for(var a=[],o=2;o<arguments.length;o++)a[o-2]=arguments[o];var n=this.props.store;t.mergeData&&1===e.length&&e[0]&&n.updateData(e[0]);var s=n.action.dialog;s&&s.onConfirm&&!1===s.onConfirm.apply(s,d([e,t],r(a),!1))||n.closeDialog(!0,e)},t.prototype.handleDialogClose=function(e){void 0===e&&(e=!1),this.props.store.closeDialog(e)},t.prototype.handleDrawerConfirm=function(e,t){for(var a=[],o=2;o<arguments.length;o++)a[o-2]=arguments[o];var n=this.props.store;t.mergeData&&1===e.length&&e[0]&&n.updateData(e[0]);var s=n.action.dialog;s&&s.onConfirm&&!1===s.onConfirm.apply(s,d([e,t],r(a),!1))||n.closeDrawer(!0,e)},t.prototype.handleDrawerClose=function(){this.props.store.closeDrawer(!1)},t.prototype.handleClick=function(e){var t,a=e.target,o=this.props.env,n="A"===a.tagName&&a.hasAttribute("data-link")?a.getAttribute("data-link"):null===(t=a.closest("a[data-link]"))||void 0===t?void 0:t.getAttribute("data-link");o&&n&&(o.jumpTo(n,void 0,this.props.data),e.preventDefault())},t.prototype.handleResizeMouseDown=function(e){3!=e.nativeEvent.which&&(this.codeWrap=e.currentTarget.parentElement,document.addEventListener("mousemove",this.handleResizeMouseMove),document.addEventListener("mouseup",this.handleResizeMouseUp),this.startX=e.clientX,this.startWidth=this.codeWrap.offsetWidth)},t.prototype.handleResizeMouseMove=function(e){var t=this.props,a=t.asideMinWidth,o=void 0===a?160:a,n=t.asideMaxWidth,s=void 0===n?350:n,i=t.asidePosition,r=e.clientX-this.startX,l="right"===i?this.startWidth-r:this.startWidth+r,d=Math.min(Math.max(l,o),s);this.codeWrap.style.cssText+="width: ".concat(d,"px")},t.prototype.handleResizeMouseUp=function(){document.removeEventListener("mousemove",this.handleResizeMouseMove),document.removeEventListener("mouseup",this.handleResizeMouseUp)},t.prototype.openFeedback=function(e,t){var a=this;return new Promise(function(o){var n=a.props.store;n.setCurrentAction({type:"button",actionType:"dialog",dialog:e},a.props.resolveDefinitions),n.openDialog(t,void 0,function(e){o(e)},a.context)})},t.prototype.reload=function(e,t,o,s,i){return n(this,void 0,void 0,function(){var e,o,n,r;return a(this,function(a){switch(a.label){case 0:return t?[2,this.receive(t,void 0,i)]:(e=this.props,o=e.store,n=e.initApi,clearTimeout(this.timer),S(n,o.data)?[4,o.fetchData(n,o.data,{silent:s})]:[3,2]);case 1:r=a.sent(),this.initInterval(r),a.label=2;case 2:return[2,o.data]}})})},t.prototype.receive=function(e,t,a){this.props.store.updateData(e,void 0,a),this.reload()},t.prototype.silentReload=function(e,t){this.reload(t,void 0,void 0,!0)},t.prototype.initInterval=function(e){var t,a=this.props,o=a.interval,n=a.silentPolling,s=a.stopAutoRefreshWhen,i=a.data,r=a.dispatchEvent,d=a.store;return r("inited",N(i,l(l({},null==e?void 0:e.data),{responseData:(null==e?void 0:e.ok)?null!==(t=null==e?void 0:e.data)&&void 0!==t?t:{}:e,responseStatus:void 0===(null==e?void 0:e.status)?(null==d?void 0:d.error)?1:0:null==e?void 0:e.status,responseMsg:(null==e?void 0:e.msg)||(null==d?void 0:d.msg)}))),null!=e&&e.ok&&o&&this.mounted&&(!s||!w(s,i))&&(this.timer=setTimeout(n?this.silentReload:this.reload,Math.max(o,1e3))),e},t.prototype.handleRefresh=function(){return n(this,void 0,void 0,function(){var e,t,o,n;return a(this,function(a){switch(a.label){case 0:return e=this.props,t=e.dispatchEvent,o=e.data,[4,t("pullRefresh",o)];case 1:return(null==(n=a.sent())?void 0:n.prevented)||this.reload(),[2]}})})},t.prototype.handleChange=function(e,t,a,o){var n=this.props,s=n.store,i=n.onChange;"string"==typeof t&&t&&s.changeValue(t,e,o),null==i||i.apply(null,arguments)},t.prototype.handleBulkChange=function(e){var t,a;null===(a=null===(t=this.props.store)||void 0===t?void 0:t.updateData)||void 0===a||a.call(t,e)},t.prototype.renderHeader=function(){var e=this.props,t=e.title,a=e.subTitle,o=e.remark,n=e.remarkPlacement,s=e.headerClassName,i=e.toolbarClassName,r=e.toolbar,d=e.render,p=e.store,c=e.initApi,h=e.popOverContainer,u=e.env,m=e.classnames,v=e.regions;e.translate;var y,g,C=e.id,b=e.themeCss,D={onAction:this.handleAction,onQuery:c?this.handleQuery:void 0,onChange:this.handleChange,onBulkChange:this.handleBulkChange,pageLoading:p.loading};return(Array.isArray(v)?~v.indexOf("header"):t||a)&&(y=T.createElement("div",{className:m("Page-header",s,f(l(l({},this.props),{name:"headerControlClassName",id:C,themeCss:b})))},t?T.createElement("h2",{className:m("Page-title",f(l(l({},this.props),{name:"titleControlClassName",id:C,themeCss:b})))},d("title",t,D),o?d("remark",{type:"remark",tooltip:o,placement:n||"bottom",container:h||u.getModalContainer}):null):null,a&&T.createElement("small",{className:m("Page-subTitle")},d("subTitle",a,D)))),(Array.isArray(v)?~v.indexOf("toolbar"):r)&&(g=T.createElement("div",{className:m("Page-toolbar",i,f(l(l({},this.props),{name:"toolbarControlClassName",id:C,themeCss:b})))},d("toolbar",r||"",D))),y&&g?T.createElement("div",{className:m("Page-headerRow")},y,g):y||g},t.prototype.renderContent=function(e){var t=this.props,a=t.store,o=t.body,n=t.bodyClassName,s=t.render,i=t.classnames,r=t.showErrorMsg,d=t.regions;t.translate;var p=t.loadingConfig;t.initApi;var c=t.id,h=t.env,u=t.themeCss;return T.createElement("div",{className:i("Page-content")},T.createElement("div",{className:i("Page-main")},this.renderHeader(),T.createElement("div",{className:i("Page-body",n,f(l(l({},this.props),{name:"bodyControlClassName",id:c,themeCss:u}))),role:"page-body"},T.createElement(x,{size:"lg",overlay:!0,key:"info",show:a.loading,loadingConfig:p}),!h.forceSilenceInsideError&&a.error&&!1!==r?T.createElement(E,{level:"danger",showCloseButton:!0,onClose:a.clearMessage},a.msg):null,(Array.isArray(d)?~d.indexOf("body"):o)?s("body",o||"",e):null)))},t.prototype.render=function(){var e=this.props,t=e.className,a=e.store;e.body,e.bodyClassName;var o=e.render,n=e.aside,s=e.asideClassName,i=e.classnames;e.showErrorMsg;var r=e.initApi,d=e.regions,c=e.style,u=e.data,m=e.asideResizor,v=e.asideSticky,y=e.pullRefresh,g=e.mobileUI,C=e.translate;e.loadingConfig;var b=e.id,D=e.wrapperCustomStyle,N=e.env,w=e.themeCss,S=e.asidePosition,A={onAction:this.handleAction,onQuery:r?this.handleQuery:void 0,onChange:this.handleChange,onBulkChange:this.handleBulkChange,pageLoading:a.loading},k=Array.isArray(d)?~d.indexOf("aside"):n&&(!Array.isArray(n)||n.length),E=p(c,u),x=this.renderContent(A);return T.createElement("div",{className:i("Page",k?"Page--withSidebar":"",k&&v?"Page--asideSticky":"",k&&S?"Page--".concat(S,"Aside"):"",t,f(l({name:"baseControlClassName",id:b,themeCss:w},this.props)),f(l({name:"wrapperCustomStyle",id:b,themeCss:D},this.props))),onClick:this.handleClick,style:E},k?T.createElement("div",{className:i("Page-aside",m?"relative":"Page-aside--withWidth",s,f(l(l({},this.props),{name:"asideControlClassName",id:b,themeCss:w})))},o("aside",n||"",l(l({},A),"string"==typeof n?{inline:!1,className:"Page-asideTplWrapper"}:null)),m?T.createElement("div",{onMouseDown:this.handleResizeMouseDown,className:i("Page-asideResizor")}):null):null,g&&y&&!y.disabled?T.createElement(M,l({},y,{translate:C,onRefresh:this.handleRefresh}),x):x,o("dialog",l(l({},a.dialogSchema),{type:"dialog"}),{key:"dialog",data:a.dialogData,onConfirm:this.handleDialogConfirm,onClose:this.handleDialogClose,show:a.dialogOpen,onAction:this.handleAction,onQuery:r?this.handleQuery:void 0}),o("drawer",l(l({},a.drawerSchema),{type:"drawer"}),{key:"drawer",data:a.drawerData,onConfirm:this.handleDrawerConfirm,onClose:this.handleDrawerClose,show:a.drawerOpen,onAction:this.handleAction,onQuery:r?this.handleQuery:void 0}),T.createElement(h,l({},this.props,{config:{wrapperCustomStyle:D,id:b,themeCss:w,classNames:[{key:"baseControlClassName",weights:{default:{important:!0},hover:{important:!0},active:{important:!0}}},{key:"bodyControlClassName"},{key:"headerControlClassName"},{key:"titleControlClassName"},{key:"toolbarControlClassName"},{key:"asideControlClassName"}]},env:N})))},t.defaultProps={asideClassName:"",bodyClassName:"",headerClassName:"",initFetch:!0,toolbarClassName:"",messages:{},asideSticky:!0,asidePosition:"left",pullRefresh:{disabled:!0}},t.propsList=["title","subTitle","initApi","initFetchOn","initFetch","headerClassName","bodyClassName","asideClassName","toolbarClassName","toolbar","body","aside","messages","style","showErrorMsg"],i([u,s("design:type",Function),s("design:paramtypes",[Object]),s("design:returntype",void 0)],t.prototype,"handleResizeMouseDown",null),i([u,s("design:type",Function),s("design:paramtypes",[MouseEvent]),s("design:returntype",void 0)],t.prototype,"handleResizeMouseMove",null),i([u,s("design:type",Function),s("design:paramtypes",[]),s("design:returntype",void 0)],t.prototype,"handleResizeMouseUp",null),i([u,s("design:type",Function),s("design:paramtypes",[]),s("design:returntype",Promise)],t.prototype,"handleRefresh",null),t}(T.Component),R=function(e){function t(t,a){var o=e.call(this,t)||this;return a.registerComponent(o),o}return o(t,e),t.prototype.componentWillUnmount=function(){this.context.unRegisterComponent(this),e.prototype.componentWillUnmount.call(this)},t.prototype.reloadTarget=function(e,t){this.context.reload(e,t)},t.prototype.handleAction=function(t,o,s,i,r){return void 0===i&&(i=!1),n(this,void 0,void 0,function(){var n,d;return a(this,function(a){switch(a.label){case 0:return n=r||this.context,"reload"!==o.actionType?[3,1]:(o.target&&n.reload(o.target,s),[3,4]);case 1:return o.target?(o.target.split(",").forEach(function(e){var t=n.getComponentByName(e);t&&t.doAction&&t.doAction(l(l({},o),{target:void 0}),s)}),[3,4]):[3,2];case 2:return[4,e.prototype.handleAction.call(this,t,o,s,i,r)];case 3:return d=a.sent(),o.reload&&~["url","link","jump"].indexOf(o.actionType)&&n.reload(o.reload,s),[2,d];case 4:return[2]}})})},t.prototype.handleDialogConfirm=function(t,a){for(var o,n,s=[],i=2;i<arguments.length;i++)s[i-2]=arguments[i];var l=this.props.store,p=l.action,c=null!==(o=a.reload)&&void 0!==o?o:p.reload,h=l.getDialogScoped()||this.context;e.prototype.handleDialogConfirm.apply(this,d([t,a],r(s),!1)),c?h.reload(c,l.data):(null==h?void 0:h.component)!==this&&(null===(n=h.component)||void 0===n?void 0:n.reload)?h.component.reload():this.context.getComponents().filter(function(e){return"crud"===e.props.type}).forEach(function(e){return e.reload&&e.reload()})},t.prototype.handleDrawerConfirm=function(t,a){for(var o,n=this,s=[],i=2;i<arguments.length;i++)s[i-2]=arguments[i];var r=this.props.store,l=r.action,d=null!==(o=a.reload)&&void 0!==o?o:l.reload,p=r.getDrawerScoped()||this.context;e.prototype.handleDrawerConfirm.call(this,t,a),setTimeout(function(){var e;d?p.reload(d,r.data):p.component!==n&&(null===(e=null==p?void 0:p.component)||void 0===e?void 0:e.reload)?p.component.reload():n.context.getComponents().filter(function(e){return"crud"===e.props.type}).forEach(function(e){return e.reload&&e.reload()})},300)},t.prototype.setData=function(e,t){return this.props.store.updateData(e,void 0,t)},t.prototype.getData=function(){return this.props.store.data},t.contextType=g,t}(P),O=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),i([b({type:"page",storeType:m.name,isolateScope:!0})],t)}(R);export{O as PageRenderer,R as PageRendererBase,P as default};
@@ -1 +1 @@
1
- import{o as t}from"./rolldown-runtime-Cmsah3SL.js";import{t as e}from"./react-COOgDf_T.js";import{a as r,i as n,n as a,o,r as s,t as i}from"./tslib.es6-TRdqp4ac.js";import{Ii as p,Nn as u,Zr as m,it as g,oi as f}from"./esm-Byma-6B-.js";import{X as l}from"./esm-CM4fvlfi.js";var h=/* @__PURE__ */t(e()),c=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.formatNumber=function(t,e){var r=void 0;return"string"==typeof t?r="string"==typeof(t=m(t)?p(t,this.props.data):t)?parseInt(t,10):t:"number"==typeof t&&(r=t),"number"!=typeof r||isNaN(r)?e:r},e.prototype.onPageChange=function(t,e,n){return a(this,void 0,void 0,function(){var a,o,s,i,p;return r(this,function(r){switch(r.label){case 0:return a=this.props,o=a.onPageChange,s=a.dispatchEvent,i=a.data,[4,null==s?void 0:s("change",f(i,{page:t,perPage:e}))];case 1:return(null==(p=r.sent())?void 0:p.prevented)||null==o||o(t,e,n),[2]}})})},e.prototype.render=function(){var t=this.props,e=t.maxButtons,r=t.activePage,n=t.total,a=t.perPage;return h.createElement(l,i({},this.props,{onPageChange:this.onPageChange,maxButtons:this.formatNumber(e),activePage:this.formatNumber(r),total:this.formatNumber(n),perPage:this.formatNumber(a)}))},s([u,o("design:type",Function),o("design:paramtypes",[Number,Number,String]),o("design:returntype",Promise)],e.prototype,"onPageChange",null),e}(h.Component),d=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),s([g({type:"pagination",alias:["pager"],name:"pagination"})],e)}(c);export{d as PaginationRenderer,c as default};
1
+ import{o as t}from"./rolldown-runtime-DXzHzmmG.js";import{t as e}from"./react-CWkhIp2c.js";import{a as r,i as n,n as a,o,r as s,t as i}from"./tslib.es6-TRdqp4ac.js";import{Ii as p,Nn as u,Zr as m,it as g,oi as f}from"./esm-DMJQA23h.js";import{X as l}from"./esm-Dgr2t9Jm.js";var h=/* @__PURE__ */t(e()),c=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.formatNumber=function(t,e){var r=void 0;return"string"==typeof t?r="string"==typeof(t=m(t)?p(t,this.props.data):t)?parseInt(t,10):t:"number"==typeof t&&(r=t),"number"!=typeof r||isNaN(r)?e:r},e.prototype.onPageChange=function(t,e,n){return a(this,void 0,void 0,function(){var a,o,s,i,p;return r(this,function(r){switch(r.label){case 0:return a=this.props,o=a.onPageChange,s=a.dispatchEvent,i=a.data,[4,null==s?void 0:s("change",f(i,{page:t,perPage:e}))];case 1:return(null==(p=r.sent())?void 0:p.prevented)||null==o||o(t,e,n),[2]}})})},e.prototype.render=function(){var t=this.props,e=t.maxButtons,r=t.activePage,n=t.total,a=t.perPage;return h.createElement(l,i({},this.props,{onPageChange:this.onPageChange,maxButtons:this.formatNumber(e),activePage:this.formatNumber(r),total:this.formatNumber(n),perPage:this.formatNumber(a)}))},s([u,o("design:type",Function),o("design:paramtypes",[Number,Number,String]),o("design:returntype",Promise)],e.prototype,"onPageChange",null),e}(h.Component),d=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),s([g({type:"pagination",alias:["pager"],name:"pagination"})],e)}(c);export{d as PaginationRenderer,c as default};
@@ -1 +1 @@
1
- import{o as e}from"./rolldown-runtime-Cmsah3SL.js";import{t}from"./react-COOgDf_T.js";import{i as a,r as o}from"./tslib.es6-TRdqp4ac.js";import{it as p,vt as r}from"./esm-Byma-6B-.js";var s=/* @__PURE__ */e(t()),n=function(e){function t(t){var a=e.call(this,t)||this;return t.store.syncProps(t,void 0,["perPage","mode","ellipsisPageGap","inputName","outputName"]),a}return a(t,e),t.prototype.componentDidUpdate=function(e){this.props.store.syncProps(this.props,e,["perPage","mode","ellipsisPageGap","inputName","outputName"])},t.prototype.render=function(){var e=this.props,t=e.position,a=e.render,o=e.store,p=e.classnames,r=e.style,n=e.body,i=e.translate,l="none"!==t?a("pager",{type:"pagination"},{activePage:o.page,lastPage:o.lastPage,mode:o.mode,ellipsisPageGap:o.ellipsisPageGap,onPageChange:o.switchTo,perPage:o.perPage,className:"PaginationWrapper-pager"}):null;return s.createElement("div",{className:p("PaginationWrapper"),style:r},"top"===t?l:null,n?a("body",n,{data:o.locals}):s.createElement("span",null,i("PaginationWrapper.placeholder")),"bottom"===t?l:null)},t.defaultProps={inputName:"items",outputName:"items",perPage:10,position:"top"},t}(s.Component),i=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),o([p({type:"pagination-wrapper",storeType:r.name})],t)}(n);export{n as PaginationWrapper,i as PaginationWrapperRenderer};
1
+ import{o as e}from"./rolldown-runtime-DXzHzmmG.js";import{t}from"./react-CWkhIp2c.js";import{i as a,r as o}from"./tslib.es6-TRdqp4ac.js";import{it as p,vt as r}from"./esm-DMJQA23h.js";var s=/* @__PURE__ */e(t()),n=function(e){function t(t){var a=e.call(this,t)||this;return t.store.syncProps(t,void 0,["perPage","mode","ellipsisPageGap","inputName","outputName"]),a}return a(t,e),t.prototype.componentDidUpdate=function(e){this.props.store.syncProps(this.props,e,["perPage","mode","ellipsisPageGap","inputName","outputName"])},t.prototype.render=function(){var e=this.props,t=e.position,a=e.render,o=e.store,p=e.classnames,r=e.style,n=e.body,i=e.translate,l="none"!==t?a("pager",{type:"pagination"},{activePage:o.page,lastPage:o.lastPage,mode:o.mode,ellipsisPageGap:o.ellipsisPageGap,onPageChange:o.switchTo,perPage:o.perPage,className:"PaginationWrapper-pager"}):null;return s.createElement("div",{className:p("PaginationWrapper"),style:r},"top"===t?l:null,n?a("body",n,{data:o.locals}):s.createElement("span",null,i("PaginationWrapper.placeholder")),"bottom"===t?l:null)},t.defaultProps={inputName:"items",outputName:"items",perPage:10,position:"top"},t}(s.Component),i=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),o([p({type:"pagination-wrapper",storeType:r.name})],t)}(n);export{n as PaginationWrapper,i as PaginationWrapperRenderer};
@@ -0,0 +1 @@
1
+ import{o as e}from"./rolldown-runtime-DXzHzmmG.js";import{t as a}from"./react-CWkhIp2c.js";import{c as s,i as t,r as o,t as r}from"./tslib.es6-TRdqp4ac.js";import{J as l,Z as n,i,it as m,yn as d}from"./esm-DMJQA23h.js";import"./esm-Dgr2t9Jm.js";import{c as p}from"./_castFunction-CQMNP8A1.js";var c=/* @__PURE__ */e(a()),C=/* @__PURE__ */e(d()),h=function(e){function a(a){var s=e.call(this,a)||this;return s.state={collapsed:!1},a.mobileUI&&a.collapsible&&(s.state.collapsed=!0),s}return t(a,e),a.prototype.renderBody=function(){var e=this.props;e.type,e.className,e.style;var a=e.data;e.header;var t=e.body,o=e.render;e.bodyClassName,e.headerClassName,e.actionsClassName,e.footerClassName;var l=e.children;e.title,e.actions,e.footer,e.classPrefix;var n=e.formMode,m=e.formHorizontal,d=e.subFormMode,p=e.subFormHorizontal;e.id,e.themeCss,e.wrapperCustomStyle;var c=s(e,["type","className","style","data","header","body","render","bodyClassName","headerClassName","actionsClassName","footerClassName","children","title","actions","footer","classPrefix","formMode","formHorizontal","subFormMode","subFormHorizontal","id","themeCss","wrapperCustomStyle"]),h=r(r({data:a},(0,C.default)(c,i)),{formMode:d||n,formHorizontal:p||m});return l?"function"==typeof l?l(this.props):l:t?o("body",t,h):null},a.prototype.renderActions=function(){var e=this.props,a=e.actions,s=e.render;return Array.isArray(a)?a.map(function(e,a){return s("action",e,{type:e.type||"button",key:a})}):null},a.prototype.render=function(){var e=this,a=this.props;a.type;var t=a.className,o=a.style,i=a.data,m=a.header;a.body;var d=a.render,C=a.bodyClassName,h=a.headerClassName,f=a.actionsClassName,N=a.footerClassName,y=a.footerWrapClassName,u=a.headerControlClassName,b=a.headerTitleControlClassName,v=a.bodyControlClassName,P=a.actionsControlClassName;a.children;var w=a.title,E=a.footer,k=a.affixFooter,x=a.classPrefix,g=a.classnames,F=a.id,S=a.collapsible,j=a.themeCss,A=a.wrapperCustomStyle,z=s(a,["type","className","style","data","header","body","render","bodyClassName","headerClassName","actionsClassName","footerClassName","footerWrapClassName","headerControlClassName","headerTitleControlClassName","bodyControlClassName","actionsControlClassName","children","title","footer","affixFooter","classPrefix","classnames","id","collapsible","themeCss","wrapperCustomStyle"]),H=r({data:i},z),M=[],W=this.state.collapsed;W||(Array.isArray(this.props.actions)&&this.props.actions.length&&M.push(c.createElement("div",{key:"actions",className:g("Panel-btnToolbar",f||"Panel-footer",P)},this.renderActions())),E&&M.push(c.createElement("div",{key:"footer",className:g(N||"Panel-footer",P)},d("footer",E,H))));var B=M.length?c.createElement("div",{className:g("Panel-footerWrap",y,k?"Panel-fixedBottom":"",n(r(r({},this.props),{name:"footerControlClassName",id:F,themeCss:j})))},M):null;return c.createElement("div",{"data-id":F,"data-role":"container",className:g("Panel",t||"Panel--default",n(r(r({},this.props),{name:"baseControlClassName",id:F,themeCss:j})),n(r(r({},this.props),{name:"wrapperCustomStyle",id:F,themeCss:A}))),style:o},m?c.createElement("div",{className:g(h||"Panel-heading",u,n(r(r({},this.props),{name:"headerControlClassName",id:F,themeCss:j})))},d("header",m,H)):w?c.createElement("div",{className:g(h||"Panel-heading",u,{"is-collapsible":S},n(r(r({},this.props),{name:"headerControlClassName",id:F,themeCss:j})))},c.createElement("h3",{className:g("Panel-title",b,n(r(r({},this.props),{name:"titleControlClassName",id:F,themeCss:j})))},d("title",w,H)),S?c.createElement("span",{className:g("Panel-arrow-wrap"),onClick:function(){e.setState({collapsed:!W})}},c.createElement(p,{icon:"down-arrow-bold",className:g("Panel-arrow","icon",{"is-collapsed":W})})):null):null,W?null:c.createElement("div",{className:g(C||"Panel-body",v,n(r(r({},this.props),{name:"bodyControlClassName",id:F,themeCss:j})))},this.renderBody()),B,c.createElement(l,r({},this.props,{config:{wrapperCustomStyle:A,id:F,themeCss:j,classNames:[{key:"baseControlClassName"},{key:"bodyControlClassName"},{key:"headerControlClassName",weights:{default:{suf:".".concat(x,"Panel-heading")}}},{key:"titleControlClassName"},{key:"footerControlClassName"}]},env:this.props.env})))},a.propsList=["header","actions","children","headerClassName","footerClassName","footerWrapClassName","actionsClassName","bodyClassName"],a.defaultProps={},a}(c.Component),f=function(e){function a(){return null!==e&&e.apply(this,arguments)||this}return t(a,e),o([m({type:"panel"})],a)}(h);export{f as PanelRenderer,h as default};
@@ -0,0 +1 @@
1
+ import{o as t}from"./rolldown-runtime-DXzHzmmG.js";import{t as s}from"./react-CWkhIp2c.js";import{i as e,o as i,r as o}from"./tslib.es6-TRdqp4ac.js";import{Nn as n,it as r}from"./esm-DMJQA23h.js";import"./esm-Dgr2t9Jm.js";import{c as a}from"./_castFunction-CQMNP8A1.js";var l=/* @__PURE__ */t(s()),p=function(t){function s(){var s=null!==t&&t.apply(this,arguments)||this;return s.state={visible:!1},s}return e(s,t),s.prototype.toggleVisible=function(){this.setState({visible:!this.state.visible})},s.prototype.render=function(){var t=this.props,s=t.classnames,e=t.className,i=t.style,o=t.mosaicText,n=void 0===o?"********":o,r=t.value;return l.createElement("span",{className:s("Password-field",e),style:i},this.state.visible?r:n,this.state.visible?l.createElement(a,{icon:"view",className:"icon",onClick:this.toggleVisible}):l.createElement(a,{icon:"invisible",className:"icon",onClick:this.toggleVisible}))},o([n,i("design:type",Function),i("design:paramtypes",[]),i("design:returntype",void 0)],s.prototype,"toggleVisible",null),s}(l.Component),c=function(t){function s(){return null!==t&&t.apply(this,arguments)||this}return e(s,t),o([r({type:"password"})],s)}(p);export{p as PasswordField,c as PasswordFieldRenderer};
@@ -0,0 +1 @@
1
+ import{o as e}from"./rolldown-runtime-DXzHzmmG.js";import{t}from"./react-CWkhIp2c.js";import{a as n,i as o,n as i,o as s,r,s as a,t as l}from"./tslib.es6-TRdqp4ac.js";import{En as p,Er as c,Ii as d,J as u,Nn as m,P as h,Tn as v,Wi as f,Xr as y,Z as g,Zr as C,an as k,ht as b,oi as O,sn as F,ua as P,vi as w,vn as I,yn as N}from"./esm-DMJQA23h.js";import{t as S}from"./isEqual-CABQKVnq.js";import{mt as E,s as j,tt as T}from"./esm-Dgr2t9Jm.js";import{c as D,s as A}from"./_castFunction-CQMNP8A1.js";import{t as V}from"./StaticHoc-D0pM2bgC.js";var B=/* @__PURE__ */e(t()),x=/* @__PURE__ */e(I()),M=/* @__PURE__ */e(N()),R=/* @__PURE__ */e(v()),U=/* @__PURE__ */e(S()),W=/* @__PURE__ */e(p()),z=/* @__PURE__ */e(f()),H=/* @__PURE__ */e(T()),K=function(e){function t(t){var o=e.call(this,t)||this;o.state={isOpened:!1,schema:o.buildSchema(o.props),isFocused:!1},o.input=B.createRef(),o.toDispose=[],o.mounted=!1;var s=t.formInited,r=t.addHook,a=t.formItem,l=function(){return i(o,void 0,void 0,function(){var e=this;return n(this,function(t){switch(t.label){case 0:return[4,this.fetchOptions()];case 1:return t.sent(),this.mounted&&this.toDispose.push(P(function(){return JSON.stringify(null==a?void 0:a.tmpValue)},function(){return e.fetchOptions()})),[2]}})})};return a&&o.toDispose.push(s||!r?a.addInitHook(l):r(l,"init")),o}return o(t,e),t.prototype.componentDidMount=function(){this.mounted=!0},t.prototype.componentDidUpdate=function(e){var t,n=this.props;["multiple","source","pickerSchema"].some(function(t){return!(0,U.default)(e[t],n[t])})?this.setState({schema:this.buildSchema(n)}):k(e.source,n.source,e.data,n.data)&&null!==(t=n.formItem)&&void 0!==t&&t.inited&&this.fetchOptions()},t.prototype.componentWillUnmount=function(){this.toDispose.forEach(function(e){return e()}),this.toDispose=[],this.mounted=!1},t.prototype.fetchOptions=function(){var e,t,n=this.props,o=n.value,i=n.formItem,s=n.valueField,r=n.labelField,a=n.source,l=n.data;if(a&&i&&(s||"value")!==(r||"label")&&(!(t=i.getSelectedOptions(o))||t.length&&t[0][s||"value"]===t[0][r||"label"])){var p=O(l,((e={value:o})[s||"value"]=o,e.op="loadOptions",e));if(C(a))i.setOptions(d(a,l,"| raw"));else if(F(a,p))return i.loadOptions(a,p,{autoAppend:!0})}},t.prototype.buildSchema=function(e){var t,n,o=C(e.source);return l(l({checkOnItemClick:!0,listItem:{title:"${".concat(e.labelField||"label","|raw}")}},e.pickerSchema),{labelTpl:null!==(n=null===(t=e.pickerSchema)||void 0===t?void 0:t.labelTpl)&&void 0!==n?n:e.labelTpl,type:"crud",pickerMode:!0,syncLocation:!1,filterCanAccessSuperData:!1,api:o?null:e.source,source:o?e.source:null,keepItemSelectionOnPageChange:!0,valueField:e.valueField,labelField:e.labelField,bulkActions:e.multiple?e.pickerSchema.bulkActions:[]})},t.prototype.crudRef=function(e){for(;e&&e.getWrappedInstance;)e=e.getWrappedInstance();this.crud=e},t.prototype.reload=function(e,t){if(this.crud)this.crud.reload(e,t);else{var n=this.props.reloadOptions;n&&n(e,t)}},t.prototype.open=function(){this.setState({isOpened:!0})},t.prototype.close=function(){this.setState({isOpened:!1})},t.prototype.handleModalConfirm=function(e,t,o,s){return i(this,void 0,void 0,function(){var t;return n(this,function(n){switch(n.label){case 0:return t=(0,W.default)(s,function(e){return"crud"===e.props.type}),[4,this.handleChange(e[t].items)];case 1:return n.sent(),this.close(),[2]}})})},t.prototype.handleChange=function(e){return i(this,void 0,void 0,function(){var t,o,i,s,r,a,l,p,c,d,u,m,h,v;return n(this,function(n){switch(n.label){case 0:return t=this.props,o=t.joinValues,i=t.valueField,s=t.delimiter,r=t.extractValue,a=t.multiple,l=t.options,t.data,p=t.dispatchEvent,t.selectedOptions,c=t.setOptions,d=t.onChange,u=e,u=o?e.map(function(e){return e[i||"value"]}).join(s||","):r?a?e.map(function(e){return e[i||"value"]}):e[0]&&e[0][i||"value"]||"":a?e:e[0],m=[],e.forEach(function(e){(0,R.default)(l,function(t){return e[i||"value"]==t[i||"value"]})||m.push(e)}),m.length&&c(l.concat(m)),h=a?e:e[0],[4,p("change",b(this.props,{value:u,option:h,selectedItems:h}))];case 1:return(null==(v=n.sent())?void 0:v.prevented)||d(u),[2]}})})},t.prototype.handleItemClick=function(e){return i(this,void 0,void 0,function(){var t,o,i;return n(this,function(n){switch(n.label){case 0:return t=this.props,o=t.data,[4,(0,t.dispatchEvent)("itemClick",O(o,{item:e}))];case 1:return null==(i=n.sent())||i.prevented,[2]}})})},t.prototype.removeItem=function(e){return i(this,void 0,void 0,function(){var t,o,i,s,r,l,p,c,d,u,m,h,v,f;return n(this,function(n){switch(n.label){case 0:return t=this.props,o=t.selectedOptions,i=t.joinValues,s=t.extractValue,r=t.delimiter,l=t.valueField,p=t.onChange,c=t.multiple,d=t.dispatchEvent,u=o.concat(),m=a(u.splice(e,1),1),h=m[0],v=u,v=i?u.map(function(e){return e[l||"value"]}).join(r||","):s?c?u.map(function(e){return e[l||"value"]}):u[0]&&u[0][l||"value"]||"":c?u:u[0],[4,d("change",b(this.props,{value:v,option:h,selectedItems:h}))];case 1:return(null==(f=n.sent())?void 0:f.prevented)||p(v),[2]}})})},t.prototype.handleKeyDown=function(e){var t=this.props.selectedOptions;" "===e.key?(this.open(),e.preventDefault()):t.length&&"Backspace"==e.key&&this.removeItem(t.length-1)},t.prototype.handleFocus=function(e){this.input.current&&this.input.current.focus(),e.stopPropagation(),this.setState({isFocused:!0})},t.prototype.handleBlur=function(){this.setState({isFocused:!1})},t.prototype.handleClick=function(){this.open()},t.prototype.clearValue=function(e){e.stopPropagation();var t=this.props,n=t.onChange,o=t.resetValue;n(void 0!==o?o:"")},t.prototype.getOverflowConfig=function(){var e=this.props.overflowConfig;return(0,z.default)(t.defaultProps.overflowConfig,e)},t.prototype.handleSelect=function(e,t){var n=this.props,o=n.selectedOptions,i=n.valueField;if(Array.isArray(e)&&Array.isArray(t)&&(e.length||t.length)){var s=(0,H.default)(e,o,function(e,t){var n=e[i||"value"],o=t[i||"value"];return n||o?n===o:(0,U.default)((0,M.default)(e,"value"),(0,M.default)(t,"value"))});s.length===e.length&&s.length===o.length||this.handleChange(e)}},t.prototype.renderTag=function(e,t){var n=this,o=this.props,i=o.itemClearable,s=void 0===i||i,r=o.classPrefix,a=o.classnames,p=o.labelField,c=o.labelTpl;o.translate;var d=o.disabled,u=o.env,m=o.id,h=o.themeCss,v=o.css;return B.createElement("div",{key:t,className:a("".concat(r,"Picker-value"),g(l(l({},this.props),{name:"pickValueWrapClassName",id:m,themeCss:h||v})),{"is-disabled":d})},s&&B.createElement("span",{className:a("".concat(r,"Picker-valueIcon"),g(l(l({},this.props),{name:"pickValueIconClassName",id:m,themeCss:h||v}))),onClick:function(e){e.stopPropagation(),n.removeItem(t)}},"×"),B.createElement(j,{inline:!1,tooltip:w(e,p||"label")},B.createElement("span",{className:a("".concat(r,"Picker-valueLabel"),g(l(l({},this.props),{name:"pickFontClassName",id:m,themeCss:h||v}))),onClick:function(t){t.stopPropagation(),n.handleItemClick(e)}},c?B.createElement(A,{html:y(c,e),filterHtml:u.filterHtml}):"".concat(w(e,p||"label")||w(e,"id")))))},t.prototype.renderValues=function(){var e=this,t=this.props;t.classPrefix;var n=t.selectedOptions,o=t.translate;t.disabled;var i=t.multiple,s=t.popOverContainer;t.id,t.themeCss,t.css;var r=this.getOverflowConfig(),a=r.maxTagCount,p=r.overflowTagPopover,c=n,d=!1!==i&&"number"==typeof a&&a>0,u=l({tooltipClassName:(0,x.default)("Picker-overflow",null==p?void 0:p.tooltipClassName),title:o("已选项")},(0,M.default)(p,["children","content","tooltipClassName"]));return B.createElement(E,{enabled:!!d,tooltipClassName:(0,x.default)("Picker-overflow-wrapper"),items:c,popOverContainer:s,tooltipOptions:u,maxVisibleCount:a,renderItem:function(t,n,o){return e.renderTag(t,n)}})},t.prototype.overrideCRUDProps=function(){return{}},t.prototype.renderBody=function(e){var t=(void 0===e?{}:e).popOverContainer,n=this.props,o=n.render,i=n.selectedOptions,s=n.options,r=n.multiple,a=n.valueField,p=n.embed,c=n.source,d=n.strictMode,u=n.testIdBuilder,m=this.getOverflowConfig(),h=m.maxTagCount,v=m.overflowTagPopoverInCRUD,f=m.displayPosition;return o("modal-body",this.state.schema,l(l({value:i,valueField:a,primaryField:a,options:c?[]:s,multiple:r,strictMode:d,onSelect:p?this.handleSelect:void 0,testIdBuilder:null==u?void 0:u.getChild("body-schema"),ref:this.crudRef,popOverContainer:t},p||Array.isArray(f)&&f.includes("crud")?{maxTagCount:h,overflowTagPopover:v}:{}),this.overrideCRUDProps()))},t.prototype.render=function(){var e=this.props,t=e.className;e.style;var n=e.modalClassName,o=e.classnames,i=e.disabled,s=e.render,r=e.modalMode,a=e.source,p=e.modalSize,d=e.clearable,m=e.multiple,h=e.placeholder,v=e.embed,f=e.selectedOptions,C=e.translate,k=e.popOverContainer,b=e.modalTitle,O=e.data,F=e.mobileUI,P=e.env,w=e.themeCss,I=e.css,N=e.id,S=e.classPrefix,E=e.testIdBuilder;return B.createElement("div",{className:o("PickerControl",{"is-mobile":F},t)},v?B.createElement("div",{className:o("Picker")},this.renderBody({popOverContainer:k})):B.createElement("div",{className:o("Picker",{"Picker--single":!m,"Picker--multi":m,"is-focused":this.state.isFocused,"is-disabled":i})},B.createElement("div",{onClick:this.handleClick,className:o("Picker-input",i&&"is-disabled",this.state.isFocused&&"is-focused",g(l(l({},this.props),{name:"pickControlClassName",id:N,themeCss:w||I})))},!f.length&&h?B.createElement("div",{className:o("Picker-placeholder")},C(h)):B.createElement("div",l({className:o("Picker-valueWrap")},null==E?void 0:E.getTestId()),this.renderValues(),B.createElement("input",{onChange:c,value:"",ref:this.input,onKeyDown:this.handleKeyDown,onClick:this.handleFocus,onBlur:this.handleBlur,readOnly:F})),d&&!i&&f.length?B.createElement("a",{onClick:this.clearValue,className:o("Picker-clear")},B.createElement(D,{icon:"input-clear",className:"icon"})):null,B.createElement("span",l({onClick:this.open,className:o("Picker-btn")},null==E?void 0:E.getChild("picker-open-btn").getTestId()),B.createElement(D,{icon:"window-restore",className:o("icon",g(l(l({},this.props),{name:"pickIconClassName",id:N,themeCss:w||I}))),iconContent:"Picker-icon"}))),s("modal",{title:b&&"string"==typeof b?y(b,O):C("Select.placeholder"),size:p,type:r,className:n,body:{children:this.renderBody},testIdBuilder:null==E?void 0:E.getChild("modal")},{key:"modal",lazyRender:!!a,onConfirm:this.handleModalConfirm,onClose:this.close,show:this.state.isOpened})),B.createElement(u,l({},this.props,{config:{themeCss:w||I,classNames:[{key:"pickControlClassName",weights:{default:{important:!0},hover:{important:!0},focused:{important:!0,parent:".".concat(S,"Picker.is-focused >")},disabled:{important:!0,parent:".".concat(S,"Picker.is-disabled >")}}},{key:"pickFontClassName"},{key:"pickValueWrapClassName",weights:{default:{important:!0}}},{key:"pickValueIconClassName",weights:{default:{important:!0},hover:{important:!0}}},{key:"pickIconClassName",weights:{default:{suf:" svg"}}}],id:N},env:P})))},t.propsList=["modalTitle","modalMode","modalSize","pickerSchema","labelField","onChange","options","value","inline","multiple","embed","resetValue","placeholder","onQuery"],t.defaultProps={modalMode:"dialog",multiple:!1,placeholder:"Picker.placeholder",labelField:"label",valueField:"value",pickerSchema:{mode:"list"},embed:!1,overflowConfig:{maxTagCount:-1,displayPosition:["select","crud"],overflowTagPopover:{placement:"top",trigger:"hover",showArrow:!1,offset:[0,-5]},overflowTagPopoverInCRUD:{placement:"bottom",trigger:"hover",showArrow:!1,offset:[0,0]}}},r([m,s("design:type",Function),s("design:paramtypes",[]),s("design:returntype",Object)],t.prototype,"fetchOptions",null),r([m,s("design:type",Function),s("design:paramtypes",[Object]),s("design:returntype",void 0)],t.prototype,"crudRef",null),r([m,s("design:type",Function),s("design:paramtypes",[]),s("design:returntype",void 0)],t.prototype,"open",null),r([m,s("design:type",Function),s("design:paramtypes",[]),s("design:returntype",void 0)],t.prototype,"close",null),r([m,s("design:type",Function),s("design:paramtypes",[Array,Object,Object,Array]),s("design:returntype",Promise)],t.prototype,"handleModalConfirm",null),r([m,s("design:type",Function),s("design:paramtypes",[Array]),s("design:returntype",Promise)],t.prototype,"handleChange",null),r([m,s("design:type",Function),s("design:paramtypes",[Object]),s("design:returntype",Promise)],t.prototype,"handleItemClick",null),r([m,s("design:type",Function),s("design:paramtypes",[Object]),s("design:returntype",void 0)],t.prototype,"handleKeyDown",null),r([m,s("design:type",Function),s("design:paramtypes",[Object]),s("design:returntype",void 0)],t.prototype,"handleFocus",null),r([m,s("design:type",Function),s("design:paramtypes",[]),s("design:returntype",void 0)],t.prototype,"handleBlur",null),r([m,s("design:type",Function),s("design:paramtypes",[]),s("design:returntype",void 0)],t.prototype,"handleClick",null),r([m,s("design:type",Function),s("design:paramtypes",[Object]),s("design:returntype",void 0)],t.prototype,"clearValue",null),r([m,s("design:type",Function),s("design:paramtypes",[Array,Array]),s("design:returntype",void 0)],t.prototype,"handleSelect",null),r([m,s("design:type",Function),s("design:paramtypes",[]),s("design:returntype",void 0)],t.prototype,"overrideCRUDProps",null),r([m,s("design:type",Function),s("design:paramtypes",[Object]),s("design:returntype",void 0)],t.prototype,"renderBody",null),r([V(),s("design:type",Function),s("design:paramtypes",[]),s("design:returntype",void 0)],t.prototype,"render",null),t}(B.PureComponent),L=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),r([h({type:"picker",autoLoadOptionsFromSource:!1,sizeMutable:!1})],t)}(K);export{L as PickerControlRenderer,K as default};
@@ -1 +1 @@
1
- import{o as e}from"./rolldown-runtime-Cmsah3SL.js";import{t}from"./react-COOgDf_T.js";import{i as n,o as a,r as s}from"./tslib.es6-TRdqp4ac.js";import{$n as o,Nn as i,Xr as r,it as p,oi as l}from"./esm-Byma-6B-.js";var d=/* @__PURE__ */e(t()),u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.handleClick=function(e){var t=this.props,n=t.dispatchEvent,a=t.data;n("click",l(a,{nativeEvent:e}))},t.prototype.handleMouseEnter=function(e){var t=this.props,n=t.dispatchEvent,a=t.data;n(e,l(a,{nativeEvent:e}))},t.prototype.handleMouseLeave=function(e){var t=this.props,n=t.dispatchEvent,a=t.data;n(e,l(a,{nativeEvent:e}))},t.prototype.render=function(){var e=this.props,t=e.className,n=e.style,a=e.wrapperComponent,s=e.text,i=e.data,p=e.tpl,l=e.inline,u=e.placeholder,c=e.classnames,h=o(this.props),m=a||(l?"span":"div");return d.createElement(m,{className:c("PlainField",t),style:n,onClick:this.handleClick,onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave},p||s?r(p||s,i):void 0===h||""===h||null===h?d.createElement("span",{className:"text-muted"},u):String(h))},t.defaultProps={wrapperComponent:"",inline:!0,placeholder:"-"},s([i,a("design:type",Function),a("design:paramtypes",[Object]),a("design:returntype",void 0)],t.prototype,"handleClick",null),s([i,a("design:type",Function),a("design:paramtypes",[Object]),a("design:returntype",void 0)],t.prototype,"handleMouseEnter",null),s([i,a("design:type",Function),a("design:paramtypes",[Object]),a("design:returntype",void 0)],t.prototype,"handleMouseLeave",null),t}(d.Component),c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),s([p({type:"plain",alias:["text"],name:"plain"})],t)}(u);export{u as Plain,c as PlainRenderer};
1
+ import{o as e}from"./rolldown-runtime-DXzHzmmG.js";import{t}from"./react-CWkhIp2c.js";import{i as n,o as a,r as s}from"./tslib.es6-TRdqp4ac.js";import{$n as o,Nn as i,Xr as r,it as p,oi as l}from"./esm-DMJQA23h.js";var d=/* @__PURE__ */e(t()),u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.handleClick=function(e){var t=this.props,n=t.dispatchEvent,a=t.data;n("click",l(a,{nativeEvent:e}))},t.prototype.handleMouseEnter=function(e){var t=this.props,n=t.dispatchEvent,a=t.data;n(e,l(a,{nativeEvent:e}))},t.prototype.handleMouseLeave=function(e){var t=this.props,n=t.dispatchEvent,a=t.data;n(e,l(a,{nativeEvent:e}))},t.prototype.render=function(){var e=this.props,t=e.className,n=e.style,a=e.wrapperComponent,s=e.text,i=e.data,p=e.tpl,l=e.inline,u=e.placeholder,c=e.classnames,h=o(this.props),m=a||(l?"span":"div");return d.createElement(m,{className:c("PlainField",t),style:n,onClick:this.handleClick,onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave},p||s?r(p||s,i):void 0===h||""===h||null===h?d.createElement("span",{className:"text-muted"},u):String(h))},t.defaultProps={wrapperComponent:"",inline:!0,placeholder:"-"},s([i,a("design:type",Function),a("design:paramtypes",[Object]),a("design:returntype",void 0)],t.prototype,"handleClick",null),s([i,a("design:type",Function),a("design:paramtypes",[Object]),a("design:returntype",void 0)],t.prototype,"handleMouseEnter",null),s([i,a("design:type",Function),a("design:paramtypes",[Object]),a("design:returntype",void 0)],t.prototype,"handleMouseLeave",null),t}(d.Component),c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),s([p({type:"plain",alias:["text"],name:"plain"})],t)}(u);export{u as Plain,c as PlainRenderer};
@@ -1 +1 @@
1
- import{o as e}from"./rolldown-runtime-Cmsah3SL.js";import{t}from"./react-COOgDf_T.js";import{i as a,o as n,r,s,t as o,u as l}from"./tslib.es6-TRdqp4ac.js";import{Nn as i,Xr as c,_i as d,dn as u,hr as p,it as m,oi as y,qt as b,ui as f,xr as h}from"./esm-Byma-6B-.js";import{St as v,xt as E}from"./esm-CM4fvlfi.js";var x=/* @__PURE__ */e(t()),N=/* @__PURE__ */e(b()),T=function(e){function t(t){var a=e.call(this,t)||this;return a.state={activeKey:t.activeKey||0},a}return a(t,e),t.prototype.handleSelect=function(e){var t=this.props,a=t.onSelect,n=t.tabs;if("number"==typeof e&&e<n.length&&this.setState({activeKey:e}),"string"==typeof a){var r=u(a,"key","props");r&&r(e,this.props)}else"function"==typeof a&&a(e,this.props)},t.prototype.renderToolbarItem=function(e){var t=this.props.render,a=[];return Array.isArray(e)&&e.forEach(function(e,n){return a.push(t("toolbar/".concat(n),o({type:"button",level:"link",size:"sm"},e),{key:n}))}),a},t.prototype.renderToolbar=function(){var e=this.props,t=e.toolbar,a=e.classnames,n=e.classPrefix,r=e.tabs,s=this.state.activeKey,o=null,l=null,i=t?x.createElement("div",{className:a("".concat(n,"toolbar"))},this.renderToolbarItem(t)):null;return void 0!==s&&(l=(o=r[s].toolbar)?x.createElement("div",{className:a("".concat(n,"tab-toolbar"))},this.renderToolbarItem(o)):null),i||l?x.createElement("div",{className:a("".concat(n,"Portlet-toolbar"))},i,l):null},t.prototype.renderDesc=function(){var e=this.props,t=e.description;e.render;var a=e.classnames,n=e.classPrefix,r=e.data,s=c(t,r);return s?x.createElement("span",{className:a("".concat(n,"Portlet-header-desc"))},s):null},t.prototype.renderTabs=function(){var e,t=this,a=this.props,n=a.classnames,r=a.classPrefix,i=a.tabsClassName,u=a.contentClassName,m=a.linksClassName,b=a.tabRender,N=a.render,T=a.data,O=a.mode,P=a.tabsMode,K=a.unmountOnExit,g=a.source,k=a.mountOnEnter,S=a.scrollable,A=a.translate,C=a.addBtnText,j=a.divider,B=P||O,I=d(g,T),D=this.props.tabs;if(!D)return null;D=Array.isArray(D)?D:[D];var q=[],w=n("".concat(r,"Portlet-tab"),i,((e={})["unactive-select"]=D.length<=1,e["no-divider"]=!j,e));return Array.isArray(I)?I.forEach(function(e,t){var a=y(T,f(e)?o({index:t},e):{item:e,index:t});q.push.apply(q,l([],s(D.map(function(e,n){return h(e,a)?x.createElement(E,o({},e,{title:c(e.title,a),disabled:p(e,a),key:"".concat(1e3*t+n),eventKey:1e3*t+n,mountOnEnter:k,unmountOnExit:"boolean"==typeof e.reload?e.reload:"boolean"==typeof e.unmountOnExit?e.unmountOnExit:K}),N("item/".concat(t,"/").concat(n),(null==e?void 0:e.type)?e:e.tab||e.body,{data:a})):null})),!1))}):q=D.map(function(e,a){return h(e,T)?x.createElement(E,o({},e,{title:c(e.title,T),disabled:p(e,T),key:a,eventKey:a,mountOnEnter:k,unmountOnExit:"boolean"==typeof e.reload?e.reload:"boolean"==typeof e.unmountOnExit?e.unmountOnExit:K}),t.renderTab?t.renderTab(e,t.props,a):b?b(e,t.props,a):N("tab/".concat(a),(null==e?void 0:e.type)?e:e.tab||e.body)):null}),x.createElement(v,{addBtnText:A(C||"add"),classPrefix:r,classnames:n,mode:B,className:w,contentClassName:u,linksClassName:m,activeKey:this.state.activeKey,onSelect:this.handleSelect,toolbar:this.renderToolbar(),additionBtns:this.renderDesc(),scrollable:S},q)},t.prototype.render=function(){var e,t=this.props,a=t.className,n=t.data,r=t.classnames,s=t.classPrefix,o=t.style,l=t.hideHeader,i=r("".concat(s,"Portlet"),a,((e={})["no-header"]=l,e)),c="string"==typeof o?d(o,n)||{}:(0,N.default)(o,function(e){return d(e,n)||e});return x.createElement("div",{className:i,style:c},this.renderTabs())},t.defaultProps={className:"",mode:"line",divider:!0},r([i,n("design:type",Function),n("design:paramtypes",[Number]),n("design:returntype",void 0)],t.prototype,"handleSelect",null),t}(x.Component),O=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),r([m({type:"portlet"})],t)}(T);export{T as Portlet,O as PortletRenderer};
1
+ import{o as e}from"./rolldown-runtime-DXzHzmmG.js";import{t}from"./react-CWkhIp2c.js";import{i as a,o as n,r,s,t as o,u as l}from"./tslib.es6-TRdqp4ac.js";import{Nn as i,Xr as c,_i as d,dn as u,hr as p,it as m,oi as y,qt as b,ui as f,xr as h}from"./esm-DMJQA23h.js";import{St as v,xt as E}from"./esm-Dgr2t9Jm.js";var x=/* @__PURE__ */e(t()),N=/* @__PURE__ */e(b()),T=function(e){function t(t){var a=e.call(this,t)||this;return a.state={activeKey:t.activeKey||0},a}return a(t,e),t.prototype.handleSelect=function(e){var t=this.props,a=t.onSelect,n=t.tabs;if("number"==typeof e&&e<n.length&&this.setState({activeKey:e}),"string"==typeof a){var r=u(a,"key","props");r&&r(e,this.props)}else"function"==typeof a&&a(e,this.props)},t.prototype.renderToolbarItem=function(e){var t=this.props.render,a=[];return Array.isArray(e)&&e.forEach(function(e,n){return a.push(t("toolbar/".concat(n),o({type:"button",level:"link",size:"sm"},e),{key:n}))}),a},t.prototype.renderToolbar=function(){var e=this.props,t=e.toolbar,a=e.classnames,n=e.classPrefix,r=e.tabs,s=this.state.activeKey,o=null,l=null,i=t?x.createElement("div",{className:a("".concat(n,"toolbar"))},this.renderToolbarItem(t)):null;return void 0!==s&&(l=(o=r[s].toolbar)?x.createElement("div",{className:a("".concat(n,"tab-toolbar"))},this.renderToolbarItem(o)):null),i||l?x.createElement("div",{className:a("".concat(n,"Portlet-toolbar"))},i,l):null},t.prototype.renderDesc=function(){var e=this.props,t=e.description;e.render;var a=e.classnames,n=e.classPrefix,r=e.data,s=c(t,r);return s?x.createElement("span",{className:a("".concat(n,"Portlet-header-desc"))},s):null},t.prototype.renderTabs=function(){var e,t=this,a=this.props,n=a.classnames,r=a.classPrefix,i=a.tabsClassName,u=a.contentClassName,m=a.linksClassName,b=a.tabRender,N=a.render,T=a.data,O=a.mode,P=a.tabsMode,K=a.unmountOnExit,g=a.source,k=a.mountOnEnter,S=a.scrollable,A=a.translate,C=a.addBtnText,j=a.divider,B=P||O,I=d(g,T),D=this.props.tabs;if(!D)return null;D=Array.isArray(D)?D:[D];var q=[],w=n("".concat(r,"Portlet-tab"),i,((e={})["unactive-select"]=D.length<=1,e["no-divider"]=!j,e));return Array.isArray(I)?I.forEach(function(e,t){var a=y(T,f(e)?o({index:t},e):{item:e,index:t});q.push.apply(q,l([],s(D.map(function(e,n){return h(e,a)?x.createElement(E,o({},e,{title:c(e.title,a),disabled:p(e,a),key:"".concat(1e3*t+n),eventKey:1e3*t+n,mountOnEnter:k,unmountOnExit:"boolean"==typeof e.reload?e.reload:"boolean"==typeof e.unmountOnExit?e.unmountOnExit:K}),N("item/".concat(t,"/").concat(n),(null==e?void 0:e.type)?e:e.tab||e.body,{data:a})):null})),!1))}):q=D.map(function(e,a){return h(e,T)?x.createElement(E,o({},e,{title:c(e.title,T),disabled:p(e,T),key:a,eventKey:a,mountOnEnter:k,unmountOnExit:"boolean"==typeof e.reload?e.reload:"boolean"==typeof e.unmountOnExit?e.unmountOnExit:K}),t.renderTab?t.renderTab(e,t.props,a):b?b(e,t.props,a):N("tab/".concat(a),(null==e?void 0:e.type)?e:e.tab||e.body)):null}),x.createElement(v,{addBtnText:A(C||"add"),classPrefix:r,classnames:n,mode:B,className:w,contentClassName:u,linksClassName:m,activeKey:this.state.activeKey,onSelect:this.handleSelect,toolbar:this.renderToolbar(),additionBtns:this.renderDesc(),scrollable:S},q)},t.prototype.render=function(){var e,t=this.props,a=t.className,n=t.data,r=t.classnames,s=t.classPrefix,o=t.style,l=t.hideHeader,i=r("".concat(s,"Portlet"),a,((e={})["no-header"]=l,e)),c="string"==typeof o?d(o,n)||{}:(0,N.default)(o,function(e){return d(e,n)||e});return x.createElement("div",{className:i,style:c},this.renderTabs())},t.defaultProps={className:"",mode:"line",divider:!0},r([i,n("design:type",Function),n("design:paramtypes",[Number]),n("design:returntype",void 0)],t.prototype,"handleSelect",null),t}(x.Component),O=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),r([m({type:"portlet"})],t)}(T);export{T as Portlet,O as PortletRenderer};
@@ -1 +1 @@
1
- import{o as e}from"./rolldown-runtime-Cmsah3SL.js";import{t}from"./react-COOgDf_T.js";import{i as a,o,r as s}from"./tslib.es6-TRdqp4ac.js";import{t as r}from"./isEqual-DiNKNUz9.js";import{$n as n,Nn as l,Xr as p,dt as i,it as u,kt as m,oi as c}from"./esm-Byma-6B-.js";import{h}from"./esm-CM4fvlfi.js";var d=/* @__PURE__ */e(t()),f=/* @__PURE__ */e(r()),v=/* @__PURE__ */e(m()),g=["name","value","data","defaultValue"],y=function(e){function t(t){var a=e.call(this,t)||this;return a.state={value:a.getValue()},a}return a(t,e),t.prototype.componentDidUpdate=function(e){(0,f.default)((0,v.default)(e,g),(0,v.default)(this.props,g))||this.setState({value:this.getValue()})},t.prototype.getValue=function(){var e=n(this.props);return e="number"==typeof e?e:p(e,this.props.data),/^\d*\.?\d+$/.test(e)&&(e=parseFloat(e)),e},t.prototype.format=function(e){var t=this.props,a=t.valueTpl,o=t.render,s=t.data;return o("progress-value",a||"${value}%",{data:c(s,{value:e})})},t.prototype.render=function(){var e=this.props,t=e.data,a=e.mode,o=e.className,s=e.style,r=e.placeholder,n=e.progressClassName,l=e.map,i=e.stripe,u=e.animate,m=e.showLabel,c=e.strokeWidth,f=e.gapDegree,v=e.gapPosition;e.classnames;var g=e.threshold,y=e.showThresholdText,b=this.state.value;return g&&(Array.isArray(g)?g.forEach(function(e){e.value="string"==typeof e.value?p(e.value,t):e.value,e.color&&(e.color=p(e.color,t))}):(g.value=p(g.value,t),g.color&&(g.color=p(g.color,t)))),d.createElement(h,{value:b,type:a,map:l,stripe:i,animate:u,showLabel:m,placeholder:r,format:this.format,strokeWidth:c,gapDegree:f,gapPosition:v,className:o,style:s,progressClassName:n,threshold:g,showThresholdText:y})},t.defaultProps={placeholder:"-",progressClassName:"",progressBarClassName:"",map:["bg-danger","bg-warning","bg-info","bg-success","bg-success"],valueTpl:"${value}%",showLabel:!0,stripe:!1,animate:!1},s([l,o("design:type",Function),o("design:paramtypes",[Number]),o("design:returntype",void 0)],t.prototype,"format",null),t}(d.Component),b=function(e){function t(t,a){var o=e.call(this,t)||this;return a.registerComponent(o),o}return a(t,e),t.prototype.componentWillUnmount=function(){var t;null===(t=e.prototype.componentWillUnmount)||void 0===t||t.call(this),this.context.unRegisterComponent(this)},t.prototype.doAction=function(e,t,a,o){"reset"===(null==e?void 0:e.actionType)&&this.setState({value:0})},t.prototype.setData=function(e){"number"!=typeof e&&"number"!=typeof+e||this.setState({value:+e})},t.contextType=i,s([u({type:"progress"}),o("design:paramtypes",[Object,Object])],t)}(y);export{y as ProgressField,b as ProgressFieldRenderer};
1
+ import{o as e}from"./rolldown-runtime-DXzHzmmG.js";import{t}from"./react-CWkhIp2c.js";import{i as a,o,r as s}from"./tslib.es6-TRdqp4ac.js";import{$n as r,Nn as n,Xr as l,dt as p,it as i,kt as u,oi as m}from"./esm-DMJQA23h.js";import{t as c}from"./isEqual-CABQKVnq.js";import{h}from"./esm-Dgr2t9Jm.js";var d=/* @__PURE__ */e(t()),f=/* @__PURE__ */e(c()),v=/* @__PURE__ */e(u()),g=["name","value","data","defaultValue"],y=function(e){function t(t){var a=e.call(this,t)||this;return a.state={value:a.getValue()},a}return a(t,e),t.prototype.componentDidUpdate=function(e){(0,f.default)((0,v.default)(e,g),(0,v.default)(this.props,g))||this.setState({value:this.getValue()})},t.prototype.getValue=function(){var e=r(this.props);return e="number"==typeof e?e:l(e,this.props.data),/^\d*\.?\d+$/.test(e)&&(e=parseFloat(e)),e},t.prototype.format=function(e){var t=this.props,a=t.valueTpl,o=t.render,s=t.data;return o("progress-value",a||"${value}%",{data:m(s,{value:e})})},t.prototype.render=function(){var e=this.props,t=e.data,a=e.mode,o=e.className,s=e.style,r=e.placeholder,n=e.progressClassName,p=e.map,i=e.stripe,u=e.animate,m=e.showLabel,c=e.strokeWidth,f=e.gapDegree,v=e.gapPosition;e.classnames;var g=e.threshold,y=e.showThresholdText,b=this.state.value;return g&&(Array.isArray(g)?g.forEach(function(e){e.value="string"==typeof e.value?l(e.value,t):e.value,e.color&&(e.color=l(e.color,t))}):(g.value=l(g.value,t),g.color&&(g.color=l(g.color,t)))),d.createElement(h,{value:b,type:a,map:p,stripe:i,animate:u,showLabel:m,placeholder:r,format:this.format,strokeWidth:c,gapDegree:f,gapPosition:v,className:o,style:s,progressClassName:n,threshold:g,showThresholdText:y})},t.defaultProps={placeholder:"-",progressClassName:"",progressBarClassName:"",map:["bg-danger","bg-warning","bg-info","bg-success","bg-success"],valueTpl:"${value}%",showLabel:!0,stripe:!1,animate:!1},s([n,o("design:type",Function),o("design:paramtypes",[Number]),o("design:returntype",void 0)],t.prototype,"format",null),t}(d.Component),b=function(e){function t(t,a){var o=e.call(this,t)||this;return a.registerComponent(o),o}return a(t,e),t.prototype.componentWillUnmount=function(){var t;null===(t=e.prototype.componentWillUnmount)||void 0===t||t.call(this),this.context.unRegisterComponent(this)},t.prototype.doAction=function(e,t,a,o){"reset"===(null==e?void 0:e.actionType)&&this.setState({value:0})},t.prototype.setData=function(e){"number"!=typeof e&&"number"!=typeof+e||this.setState({value:+e})},t.contextType=p,s([i({type:"progress"}),o("design:paramtypes",[Object,Object])],t)}(y);export{y as ProgressField,b as ProgressFieldRenderer};
@@ -1 +1 @@
1
- import{o as e}from"./rolldown-runtime-Cmsah3SL.js";import{t}from"./react-COOgDf_T.js";import{d as r,i as n,r as a}from"./tslib.es6-TRdqp4ac.js";import{E as l,Ur as o,it as s}from"./esm-Byma-6B-.js";var c=/* @__PURE__ */e(t()),p=function(e){function t(t){return e.call(this,t)||this}return n(t,e),t.prototype.prepareRows=function(){var e,t,n=this.props,a=n.column,l=void 0===a?3:a,s=n.items,c=n.source,p=n.data,i=[],m=[],u=l,y=0,d=o(s||c||[],p);try{for(var h=r(d),f=h.next();!f.done;f=h.next()){var v=f.value;y+=1;var b=Math.min(v.span||1,l);u-=b;var E={label:v.label,content:v.content,span:b};u>=0?m.push(E):(i.push(m),u=l-b,m=[E]),y===d.length&&i.push(m)}}catch(w){e={error:w}}finally{try{f&&!f.done&&(t=h.return)&&t.call(h)}finally{if(e)throw e.error}}return i},t.prototype.renderRow=function(e){var t=this.props,r=t.render,n=t.contentStyle,a=t.labelStyle,o=t.separator,s=void 0===o?": ":o,p=t.mode,i=void 0===p?"table":p,m=t.data;return e.map(function(e,t){return c.createElement("tr",{key:t},e.map(function(e,t){return"table"===i?c.createElement(c.Fragment,{key:"item-".concat(t)},c.createElement("th",{style:l(a,m)},r("label",e.label)),c.createElement("td",{colSpan:e.span+e.span-1,style:l(n,m)},r("content",e.content))):c.createElement("td",{colSpan:e.span,style:l(n,m),key:"item-".concat(t)},c.createElement("span",{style:l(a,m)},r("label",e.label)),s,r("content",e.content))}))})},t.prototype.render=function(){var e=this.props,t=e.style,r=e.title,n=e.column,a=void 0===n?3:n,o=e.classnames,s=e.className,p=e.titleStyle,i=e.data,m=e.mode,u=void 0===m?"table":m,y=this.prepareRows();return c.createElement("div",{className:o("Property","Property--".concat(u),s),style:l(t,i)},c.createElement("table",null,r?c.createElement("thead",null,c.createElement("tr",null,c.createElement("th",{colSpan:"table"===u?a+a:a,style:l(p,i)},r))):null,c.createElement("tbody",null,this.renderRow(y))))},t}(c.Component),i=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),a([s({type:"property",autoVar:!0})],t)}(p);export{i as PropertyRenderer,p as default};
1
+ import{o as e}from"./rolldown-runtime-DXzHzmmG.js";import{t}from"./react-CWkhIp2c.js";import{d as r,i as n,r as a}from"./tslib.es6-TRdqp4ac.js";import{E as l,Ur as o,it as s}from"./esm-DMJQA23h.js";var c=/* @__PURE__ */e(t()),p=function(e){function t(t){return e.call(this,t)||this}return n(t,e),t.prototype.prepareRows=function(){var e,t,n=this.props,a=n.column,l=void 0===a?3:a,s=n.items,c=n.source,p=n.data,i=[],m=[],u=l,y=0,d=o(s||c||[],p);try{for(var h=r(d),f=h.next();!f.done;f=h.next()){var v=f.value;y+=1;var b=Math.min(v.span||1,l);u-=b;var E={label:v.label,content:v.content,span:b};u>=0?m.push(E):(i.push(m),u=l-b,m=[E]),y===d.length&&i.push(m)}}catch(w){e={error:w}}finally{try{f&&!f.done&&(t=h.return)&&t.call(h)}finally{if(e)throw e.error}}return i},t.prototype.renderRow=function(e){var t=this.props,r=t.render,n=t.contentStyle,a=t.labelStyle,o=t.separator,s=void 0===o?": ":o,p=t.mode,i=void 0===p?"table":p,m=t.data;return e.map(function(e,t){return c.createElement("tr",{key:t},e.map(function(e,t){return"table"===i?c.createElement(c.Fragment,{key:"item-".concat(t)},c.createElement("th",{style:l(a,m)},r("label",e.label)),c.createElement("td",{colSpan:e.span+e.span-1,style:l(n,m)},r("content",e.content))):c.createElement("td",{colSpan:e.span,style:l(n,m),key:"item-".concat(t)},c.createElement("span",{style:l(a,m)},r("label",e.label)),s,r("content",e.content))}))})},t.prototype.render=function(){var e=this.props,t=e.style,r=e.title,n=e.column,a=void 0===n?3:n,o=e.classnames,s=e.className,p=e.titleStyle,i=e.data,m=e.mode,u=void 0===m?"table":m,y=this.prepareRows();return c.createElement("div",{className:o("Property","Property--".concat(u),s),style:l(t,i)},c.createElement("table",null,r?c.createElement("thead",null,c.createElement("tr",null,c.createElement("th",{colSpan:"table"===u?a+a:a,style:l(p,i)},r))):null,c.createElement("tbody",null,this.renderRow(y))))},t}(c.Component),i=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),a([s({type:"property",autoVar:!0})],t)}(p);export{i as PropertyRenderer,p as default};
@@ -1,2 +1,2 @@
1
- import{o as e}from"./rolldown-runtime-Cmsah3SL.js";import{t}from"./react-COOgDf_T.js";import{i as o,o as n,r}from"./tslib.es6-TRdqp4ac.js";import{$n as i,Ii as s,Xr as a,Zr as l,dt as c,it as u,qt as h,rn as d,ui as f,vn as g,vr as m}from"./esm-Byma-6B-.js";var y=/* @__PURE__ */e(t()),p=/* @__PURE__ */e(g());function C(e,t,o){return o=B(o),`M ${B(e-o)}, ${B(t)} a ${o},${o} 0 1,0 ${2*o},0 a ${o},${o} 0 1,0 ${-2*o},0`}function $(e,t,o){e=B(e),t=B(t);const n=B(e+o),r=B(t+o);return`M ${e}, ${t} L ${n}, ${t} L ${n}, ${r} L ${e}, ${r} Z `}function E(e,t,o,n){e=B(e),t=B(t);const r=B(e+n),i=B(t+n),s=B(e+o-n),a=B(t+o-n),l=B(e+o),c=B(t+o);return`M${r} ${t}L${l} ${t}L${l} ${c}L${e} ${c}L${e} ${t}L${r} ${t}L${r} ${a}L${s} ${a}L${s} ${i}L${r} ${i}Z `}function w(e,t,o,n,r){e=B(e),t=B(t),r=B(r);const i=B(e+r),s=B(e+o-r),a=B(t+r),l=B(t+o-r),c=B(e+n),u=B(t+n),h=B(e+o-n),d=B(t+o-n),f=B(e+o),g=B(t+o),m=B(r-n/2),y=B(c+m),p=B(u+m),C=B(h-m),$=B(d-m),E=B(i+m);return`M${i} ${t}L${s} ${t}A${r} ${r} 0 0 1 ${f} ${a}L${f} ${l}A${r} ${r} 0 0 1 ${s} ${g}L${i} ${g}A${r} ${r} 0 0 1 ${e} ${l}L${e} ${a}A${r} ${r} 0 0 1 ${i} ${t}L${i} ${t}L${E} ${d}L${C} ${d}A${m} ${m} 0 0 0 ${h} ${$}L${h} ${p}A${m} ${m} 0 0 0 ${C} ${u}L${y} ${u}A${m} ${m} 0 0 0 ${c} ${p}L${c} ${$}A${m} ${m} 0 0 0 ${y} ${d}L${E} ${d}Z`}function M(e,t,o,n){const r=B(o),i=B(o-n);t=B(t),e=B(e);const s=B(t-r),a=B(t-i);return`M${e},${s} A${r},${r} 0 1,1 ${e},${B(t+r)} A${r},${r} 0 1,1 ${e},${s} M${e},${a} A${i},${i} 0 1,0 ${e},${B(t+i)} A${i},${i} 0 1,0 ${e},${a} Z`}var S,v,z={default:function(e){const{size:t,dotSize:o,borderSize:n,x:r,y:i}=e;return{eyeBorder:E(r,i,t,o*n),eyeInner:$(r+2*o,i+2*o,t-4*o)}},rounded:function(e){const{size:t,dotSize:o,borderSize:n,x:r,y:i}=e;return{eyeBorder:w(r,i,t,o*n,2*o),eyeInner:C(r+t/2,i+t/2,t/2-2*o)}},circle:function(e){const{size:t,dotSize:o,borderSize:n,x:r,y:i}=e;return{eyeBorder:M(r+t/2,i+t/2,t/2,o*n),eyeInner:C(r+t/2,i+t/2,t/2-2*o)}}},A={default:function(e){const{x:t,y:o,dotSize:n,dotScale:r,margin:i}=e;let s="";const a=n*r;return s+=$(t*n+(n-a)/2+i,o*n+(n-a)/2+i,a),s},circle:function(e){const{x:t,y:o,dotSize:n,dotScale:r,margin:i}=e;let s="",a=n/2*r;return s+=C(t*n+(n-2*a)/2+a+i,o*n+(n-2*a)/2+a+i,a),s}};(e=>{const t=class t{constructor(e,o,n,i){if(this.version=e,this.errorCorrectionLevel=o,this.modules=[],this.isFunction=[],e<t.MIN_VERSION||e>t.MAX_VERSION)throw new RangeError("Version value out of range");if(i<-1||i>7)throw new RangeError("Mask value out of range");this.size=4*e+17;let s=[];for(let t=0;t<this.size;t++)s.push(!1);for(let t=0;t<this.size;t++)this.modules.push(s.slice()),this.isFunction.push(s.slice());this.drawFunctionPatterns();const a=this.addEccAndInterleave(n);if(this.drawCodewords(a),-1==i){let e=1e9;for(let t=0;t<8;t++){this.applyMask(t),this.drawFormatBits(t);const o=this.getPenaltyScore();o<e&&(i=t,e=o),this.applyMask(t)}}r(0<=i&&i<=7),this.mask=i,this.applyMask(i),this.drawFormatBits(i),this.isFunction=[]}static encodeText(o,n){const r=e.QrSegment.makeSegments(o);return t.encodeSegments(r,n)}static encodeBinary(o,n){const r=e.QrSegment.makeBytes(o);return t.encodeSegments([r],n)}static encodeSegments(e,n,i=1,a=40,l=-1,c=!0){if(!(t.MIN_VERSION<=i&&i<=a&&a<=t.MAX_VERSION)||l<-1||l>7)throw new RangeError("Invalid value");let u,h;for(u=i;;u++){const o=8*t.getNumDataCodewords(u,n),r=s.getTotalBits(e,u);if(r<=o){h=r;break}if(u>=a)throw new RangeError("Data too long")}for(const o of[t.Ecc.MEDIUM,t.Ecc.QUARTILE,t.Ecc.HIGH])c&&h<=8*t.getNumDataCodewords(u,o)&&(n=o);let d=[];for(const t of e){o(t.mode.modeBits,4,d),o(t.numChars,t.mode.numCharCountBits(u),d);for(const e of t.getData())d.push(e)}r(d.length==h);const f=8*t.getNumDataCodewords(u,n);r(d.length<=f),o(0,Math.min(4,f-d.length),d),o(0,(8-d.length%8)%8,d),r(d.length%8==0);for(let t=236;d.length<f;t^=253)o(t,8,d);let g=[];for(;8*g.length<d.length;)g.push(0);return d.forEach((e,t)=>g[t>>>3]|=e<<7-(7&t)),new t(u,n,g,l)}getModule(e,t){return 0<=e&&e<this.size&&0<=t&&t<this.size&&this.modules[t][e]}drawFunctionPatterns(){for(let o=0;o<this.size;o++)this.setFunctionModule(6,o,o%2==0),this.setFunctionModule(o,6,o%2==0);this.drawFinderPattern(3,3),this.drawFinderPattern(this.size-4,3),this.drawFinderPattern(3,this.size-4);const e=this.getAlignmentPatternPositions(),t=e.length;for(let o=0;o<t;o++)for(let n=0;n<t;n++)0==o&&0==n||0==o&&n==t-1||o==t-1&&0==n||this.drawAlignmentPattern(e[o],e[n]);this.drawFormatBits(0),this.drawVersion()}drawFormatBits(e){const t=this.errorCorrectionLevel.formatBits<<3|e;let o=t;for(let n=0;n<10;n++)o=o<<1^1335*(o>>>9);const i=21522^(t<<10|o);r(i>>>15==0);for(let r=0;r<=5;r++)this.setFunctionModule(8,r,n(i,r));this.setFunctionModule(8,7,n(i,6)),this.setFunctionModule(8,8,n(i,7)),this.setFunctionModule(7,8,n(i,8));for(let r=9;r<15;r++)this.setFunctionModule(14-r,8,n(i,r));for(let r=0;r<8;r++)this.setFunctionModule(this.size-1-r,8,n(i,r));for(let r=8;r<15;r++)this.setFunctionModule(8,this.size-15+r,n(i,r));this.setFunctionModule(8,this.size-8,!0)}drawVersion(){if(this.version<7)return;let e=this.version;for(let o=0;o<12;o++)e=e<<1^7973*(e>>>11);const t=this.version<<12|e;r(t>>>18==0);for(let o=0;o<18;o++){const e=n(t,o),r=this.size-11+o%3,i=Math.floor(o/3);this.setFunctionModule(r,i,e),this.setFunctionModule(i,r,e)}}drawFinderPattern(e,t){for(let o=-4;o<=4;o++)for(let n=-4;n<=4;n++){const r=Math.max(Math.abs(n),Math.abs(o)),i=e+n,s=t+o;0<=i&&i<this.size&&0<=s&&s<this.size&&this.setFunctionModule(i,s,2!=r&&4!=r)}}drawAlignmentPattern(e,t){for(let o=-2;o<=2;o++)for(let n=-2;n<=2;n++)this.setFunctionModule(e+n,t+o,1!=Math.max(Math.abs(n),Math.abs(o)))}setFunctionModule(e,t,o){this.modules[t][e]=o,this.isFunction[t][e]=!0}addEccAndInterleave(e){const o=this.version,n=this.errorCorrectionLevel;if(e.length!=t.getNumDataCodewords(o,n))throw new RangeError("Invalid argument");const i=t.NUM_ERROR_CORRECTION_BLOCKS[n.ordinal][o],s=t.ECC_CODEWORDS_PER_BLOCK[n.ordinal][o],a=Math.floor(t.getNumRawDataModules(o)/8),l=i-a%i,c=Math.floor(a/i);let u=[];const h=t.reedSolomonComputeDivisor(s);for(let r=0,f=0;r<i;r++){let o=e.slice(f,f+c-s+(r<l?0:1));f+=o.length;const n=t.reedSolomonComputeRemainder(o,h);r<l&&o.push(0),u.push(o.concat(n))}let d=[];for(let t=0;t<u[0].length;t++)u.forEach((e,o)=>{(t!=c-s||o>=l)&&d.push(e[t])});return r(d.length==a),d}drawCodewords(e){if(e.length!=Math.floor(t.getNumRawDataModules(this.version)/8))throw new RangeError("Invalid argument");let o=0;for(let t=this.size-1;t>=1;t-=2){6==t&&(t=5);for(let r=0;r<this.size;r++)for(let i=0;i<2;i++){const s=t-i,a=t+1&2?r:this.size-1-r;!this.isFunction[a][s]&&o<8*e.length&&(this.modules[a][s]=n(e[o>>>3],7-(7&o)),o++)}}r(o==8*e.length)}applyMask(e){if(e<0||e>7)throw new RangeError("Mask value out of range");for(let t=0;t<this.size;t++)for(let o=0;o<this.size;o++){let n;switch(e){case 0:n=(o+t)%2==0;break;case 1:n=t%2==0;break;case 2:n=o%3==0;break;case 3:n=(o+t)%3==0;break;case 4:n=(Math.floor(o/3)+Math.floor(t/2))%2==0;break;case 5:n=o*t%2+o*t%3==0;break;case 6:n=(o*t%2+o*t%3)%2==0;break;case 7:n=((o+t)%2+o*t%3)%2==0;break;default:throw new Error("Unreachable")}!this.isFunction[t][o]&&n&&(this.modules[t][o]=!this.modules[t][o])}}getPenaltyScore(){let e=0;for(let r=0;r<this.size;r++){let o=!1,n=0,i=[0,0,0,0,0,0,0];for(let s=0;s<this.size;s++)this.modules[r][s]==o?(n++,5==n?e+=t.PENALTY_N1:n>5&&e++):(this.finderPenaltyAddHistory(n,i),o||(e+=this.finderPenaltyCountPatterns(i)*t.PENALTY_N3),o=this.modules[r][s],n=1);e+=this.finderPenaltyTerminateAndCount(o,n,i)*t.PENALTY_N3}for(let r=0;r<this.size;r++){let o=!1,n=0,i=[0,0,0,0,0,0,0];for(let s=0;s<this.size;s++)this.modules[s][r]==o?(n++,5==n?e+=t.PENALTY_N1:n>5&&e++):(this.finderPenaltyAddHistory(n,i),o||(e+=this.finderPenaltyCountPatterns(i)*t.PENALTY_N3),o=this.modules[s][r],n=1);e+=this.finderPenaltyTerminateAndCount(o,n,i)*t.PENALTY_N3}for(let r=0;r<this.size-1;r++)for(let o=0;o<this.size-1;o++){const n=this.modules[r][o];n==this.modules[r][o+1]&&n==this.modules[r+1][o]&&n==this.modules[r+1][o+1]&&(e+=t.PENALTY_N2)}let o=0;for(const t of this.modules)o=t.reduce((e,t)=>e+(t?1:0),o);const n=this.size*this.size,i=Math.ceil(Math.abs(20*o-10*n)/n)-1;return r(0<=i&&i<=9),e+=i*t.PENALTY_N4,r(0<=e&&e<=2568888),e}getAlignmentPatternPositions(){if(1==this.version)return[];{const e=Math.floor(this.version/7)+2,t=2*Math.floor((8*this.version+3*e+5)/(4*e-4));let o=[6];for(let n=this.size-7;o.length<e;n-=t)o.splice(1,0,n);return o}}static getNumRawDataModules(e){if(e<t.MIN_VERSION||e>t.MAX_VERSION)throw new RangeError("Version number out of range");let o=(16*e+128)*e+64;if(e>=2){const t=Math.floor(e/7)+2;o-=(25*t-10)*t-55,e>=7&&(o-=36)}return r(208<=o&&o<=29648),o}static getNumDataCodewords(e,o){return Math.floor(t.getNumRawDataModules(e)/8)-t.ECC_CODEWORDS_PER_BLOCK[o.ordinal][e]*t.NUM_ERROR_CORRECTION_BLOCKS[o.ordinal][e]}static reedSolomonComputeDivisor(e){if(e<1||e>255)throw new RangeError("Degree out of range");let o=[];for(let t=0;t<e-1;t++)o.push(0);o.push(1);let n=1;for(let r=0;r<e;r++){for(let e=0;e<o.length;e++)o[e]=t.reedSolomonMultiply(o[e],n),e+1<o.length&&(o[e]^=o[e+1]);n=t.reedSolomonMultiply(n,2)}return o}static reedSolomonComputeRemainder(e,o){let n=o.map(e=>0);for(const r of e){const e=r^n.shift();n.push(0),o.forEach((o,r)=>n[r]^=t.reedSolomonMultiply(o,e))}return n}static reedSolomonMultiply(e,t){if(e>>>8||t>>>8)throw new RangeError("Byte out of range");let o=0;for(let n=7;n>=0;n--)o=o<<1^285*(o>>>7),o^=(t>>>n&1)*e;return r(o>>>8==0),o}finderPenaltyCountPatterns(e){const t=e[1];r(t<=3*this.size);const o=t>0&&e[2]==t&&e[3]==3*t&&e[4]==t&&e[5]==t;return(o&&e[0]>=4*t&&e[6]>=t?1:0)+(o&&e[6]>=4*t&&e[0]>=t?1:0)}finderPenaltyTerminateAndCount(e,t,o){return e&&(this.finderPenaltyAddHistory(t,o),t=0),t+=this.size,this.finderPenaltyAddHistory(t,o),this.finderPenaltyCountPatterns(o)}finderPenaltyAddHistory(e,t){0==t[0]&&(e+=this.size),t.pop(),t.unshift(e)}};function o(e,t,o){if(t<0||t>31||e>>>t)throw new RangeError("Value out of range");for(let n=t-1;n>=0;n--)o.push(e>>>n&1)}function n(e,t){return!!(e>>>t&1)}function r(e){if(!e)throw new Error("Assertion error")}t.MIN_VERSION=1,t.MAX_VERSION=40,t.PENALTY_N1=3,t.PENALTY_N2=3,t.PENALTY_N3=40,t.PENALTY_N4=10,t.ECC_CODEWORDS_PER_BLOCK=[[-1,7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],[-1,13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]],t.NUM_ERROR_CORRECTION_BLOCKS=[[-1,1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],[-1,1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],[-1,1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],[-1,1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]],e.QrCode=t;const i=class e{constructor(e,t,o){if(this.mode=e,this.numChars=t,this.bitData=o,t<0)throw new RangeError("Invalid argument");this.bitData=o.slice()}static makeBytes(t){let n=[];for(const e of t)o(e,8,n);return new e(e.Mode.BYTE,t.length,n)}static makeNumeric(t){if(!e.isNumeric(t))throw new RangeError("String contains non-numeric characters");let n=[];for(let e=0;e<t.length;){const r=Math.min(t.length-e,3);o(parseInt(t.substring(e,e+r),10),3*r+1,n),e+=r}return new e(e.Mode.NUMERIC,t.length,n)}static makeAlphanumeric(t){if(!e.isAlphanumeric(t))throw new RangeError("String contains unencodable characters in alphanumeric mode");let n,r=[];for(n=0;n+2<=t.length;n+=2){let i=45*e.ALPHANUMERIC_CHARSET.indexOf(t.charAt(n));i+=e.ALPHANUMERIC_CHARSET.indexOf(t.charAt(n+1)),o(i,11,r)}return n<t.length&&o(e.ALPHANUMERIC_CHARSET.indexOf(t.charAt(n)),6,r),new e(e.Mode.ALPHANUMERIC,t.length,r)}static makeSegments(t){return""==t?[]:e.isNumeric(t)?[e.makeNumeric(t)]:e.isAlphanumeric(t)?[e.makeAlphanumeric(t)]:[e.makeBytes(e.toUtf8ByteArray(t))]}static makeEci(t){let n=[];if(t<0)throw new RangeError("ECI assignment value out of range");if(t<128)o(t,8,n);else if(t<16384)o(2,2,n),o(t,14,n);else{if(!(t<1e6))throw new RangeError("ECI assignment value out of range");o(6,3,n),o(t,21,n)}return new e(e.Mode.ECI,0,n)}static isNumeric(t){return e.NUMERIC_REGEX.test(t)}static isAlphanumeric(t){return e.ALPHANUMERIC_REGEX.test(t)}getData(){return this.bitData.slice()}static getTotalBits(e,t){let o=0;for(const n of e){const e=n.mode.numCharCountBits(t);if(n.numChars>=1<<e)return 1/0;o+=4+e+n.bitData.length}return o}static toUtf8ByteArray(e){e=encodeURI(e);let t=[];for(let o=0;o<e.length;o++)"%"!=e.charAt(o)?t.push(e.charCodeAt(o)):(t.push(parseInt(e.substring(o+1,o+3),16)),o+=2);return t}};i.NUMERIC_REGEX=/^[0-9]*$/,i.ALPHANUMERIC_REGEX=/^[A-Z0-9 $%*+.\/:-]*$/,i.ALPHANUMERIC_CHARSET="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:";let s=i;e.QrSegment=s})(S||(S={})),(e=>{const t=class{constructor(e,t){this.ordinal=e,this.formatBits=t}};t.LOW=new t(0,1),t.MEDIUM=new t(1,0),t.QUARTILE=new t(2,3),t.HIGH=new t(3,2),e.Ecc=t})((v=S||(S={})).QrCode||(v.QrCode={})),(e=>{(e=>{const t=class{constructor(e,t){this.modeBits=e,this.numBitsCharCount=t}numCharCountBits(e){return this.numBitsCharCount[Math.floor((e+7)/17)]}};t.NUMERIC=new t(1,[10,12,14]),t.ALPHANUMERIC=new t(2,[9,11,13]),t.BYTE=new t(4,[8,16,16]),t.KANJI=new t(8,[8,10,12]),t.ECI=new t(7,[0,0,0]),e.Mode=t})(e.QrSegment||(e.QrSegment={}))})(S||(S={}));var R=S,N=R.QrCode,I={L:R.QrCode.Ecc.LOW,M:R.QrCode.Ecc.MEDIUM,Q:R.QrCode.Ecc.QUARTILE,H:R.QrCode.Ecc.HIGH};function L(e,t,o){const n=e.length;return t<8&&o<8||t<8&&o>n-8||t>n-8&&o<8}function P(e){const{modules:t,size:o,dotSize:n,margin:r=0,eyeType:i="default",eyeBorderSize:s="default",pointType:a="default",customSize:l,pointSize:c="default"}=e,u=function(e){return function(e){const t={default:1,sm:.8,xs:.5};return o=>{const{modules:n,dotSize:r,pointSize:i,customSize:s,margin:a}=o;let l="";for(let c=0;c<n.length;c++)for(let o=0;o<n.length;o++)if(n[c][o]&&!L(n,o,c)){let n=s[c][o]||1;l+=e({x:o,y:c,dotSize:r,dotScale:t[i]*n,margin:a})}return l}}(A[e])}(a)({margin:r,modules:t,dotSize:n,pointSize:c,customSize:l}),{eyeBorder:h,eyeInner:d}=function(e){return function(e){const t={default:1,sm:.8,xs:.5};return o=>{const{size:n,dotSize:r,borderSize:i,margin:s}=o,{eyeSize:a,positions:l}=function(e,t,o){const n=7*t;return{eyeSize:n,positions:[{x:o,y:o},{x:o,y:e-n-o},{x:e-n-o,y:o}]}}(n,r,s);let c="",u="";for(const h of l){const{eyeBorder:o,eyeInner:n}=e({size:a,dotSize:r,borderSize:t[i],x:h.x,y:h.y});c+=o,u+=n}return{eyeBorder:c,eyeInner:u}}}(z[e])}(i)({margin:r,dotSize:n,borderSize:s,size:o});return{points:u,eyeBorder:h,eyeInner:d}}function B(e,t=2){return Number(e.toFixed(t))}function x(e){const{config:t,styleConfig:o,logoConfig:n,value:r}=e,{size:i=200,margin:s=0,eyeType:a,eyeBorderSize:l,pointType:c,pointSize:u,pointSizeRandom:h}=o||{},d=y.useMemo(()=>function(e,t){const{level:o="L",minVersion:n=2,maxVersion:r,mask:i,boostLevel:s}=t||{},a=R.QrSegment.makeSegments(e),l=N.encodeSegments(a,I[o],n,r,i,s),c=[];for(let u=0;u<l.size;u++){c.push([]);for(let e=0;e<l.size;e++)c[u].push(l.getModule(e,u))}return c}(r,t),[r,t]),f=y.useMemo(()=>B((i-2*s)/d.length),[d,i,s]),g=y.useMemo(()=>{let e=[];for(let t=0;t<d.length;t++){e.push([]);for(let o=0;o<d.length;o++)h?e[t].push(Math.random()<.5?1:.8):e[t].push(1)}return e},[d,h]),m=y.useMemo(()=>P({modules:d,margin:s,size:i,dotSize:f,eyeType:a,eyeBorderSize:l,pointType:c,pointSize:u,customSize:g}),[d,f,o]);return{logo:y.useMemo(()=>{if(!n)return;let e=i-2*s,{src:t,width:o=e/5,height:r=e/5,x:a=e/2-o/2+s,y:l=e/2-r/2+s}=n||{};const c=d.length,u=Array.from({length:c},(e,t)=>t*f+s),h=u[u.findIndex(e=>e>a)-2]-.5||a,g=u[u.findIndex(e=>e>l)-2]-.5||l;return{src:t,width:o,height:r,x:a,y:l,bg:{x:h,y:g,width:o+2*(a-h),height:r+2*(l-g)}}},[d,f,s,n]),path:m}}function b(e){const{value:t,config:o,styleConfig:n,logoConfig:r,className:i}=e,{size:s=200,margin:a=0,color:l="#000",bgColor:c="#fff",eyeBorderColor:u,eyeInnerColor:h}=n||{},{path:d,logo:f}=x({config:o,styleConfig:n,logoConfig:r,value:t}),{src:g,x:m,y:p,width:C,height:$,bg:E}=f||{};/* @__PURE__ */
1
+ import{o as e}from"./rolldown-runtime-DXzHzmmG.js";import{t}from"./react-CWkhIp2c.js";import{i as o,o as n,r}from"./tslib.es6-TRdqp4ac.js";import{$n as i,Ii as s,Xr as a,Zr as l,dt as c,it as u,qt as h,rn as d,ui as f,vn as g,vr as m}from"./esm-DMJQA23h.js";var y=/* @__PURE__ */e(t()),p=/* @__PURE__ */e(g());function C(e,t,o){return o=B(o),`M ${B(e-o)}, ${B(t)} a ${o},${o} 0 1,0 ${2*o},0 a ${o},${o} 0 1,0 ${-2*o},0`}function $(e,t,o){e=B(e),t=B(t);const n=B(e+o),r=B(t+o);return`M ${e}, ${t} L ${n}, ${t} L ${n}, ${r} L ${e}, ${r} Z `}function E(e,t,o,n){e=B(e),t=B(t);const r=B(e+n),i=B(t+n),s=B(e+o-n),a=B(t+o-n),l=B(e+o),c=B(t+o);return`M${r} ${t}L${l} ${t}L${l} ${c}L${e} ${c}L${e} ${t}L${r} ${t}L${r} ${a}L${s} ${a}L${s} ${i}L${r} ${i}Z `}function w(e,t,o,n,r){e=B(e),t=B(t),r=B(r);const i=B(e+r),s=B(e+o-r),a=B(t+r),l=B(t+o-r),c=B(e+n),u=B(t+n),h=B(e+o-n),d=B(t+o-n),f=B(e+o),g=B(t+o),m=B(r-n/2),y=B(c+m),p=B(u+m),C=B(h-m),$=B(d-m),E=B(i+m);return`M${i} ${t}L${s} ${t}A${r} ${r} 0 0 1 ${f} ${a}L${f} ${l}A${r} ${r} 0 0 1 ${s} ${g}L${i} ${g}A${r} ${r} 0 0 1 ${e} ${l}L${e} ${a}A${r} ${r} 0 0 1 ${i} ${t}L${i} ${t}L${E} ${d}L${C} ${d}A${m} ${m} 0 0 0 ${h} ${$}L${h} ${p}A${m} ${m} 0 0 0 ${C} ${u}L${y} ${u}A${m} ${m} 0 0 0 ${c} ${p}L${c} ${$}A${m} ${m} 0 0 0 ${y} ${d}L${E} ${d}Z`}function M(e,t,o,n){const r=B(o),i=B(o-n);t=B(t),e=B(e);const s=B(t-r),a=B(t-i);return`M${e},${s} A${r},${r} 0 1,1 ${e},${B(t+r)} A${r},${r} 0 1,1 ${e},${s} M${e},${a} A${i},${i} 0 1,0 ${e},${B(t+i)} A${i},${i} 0 1,0 ${e},${a} Z`}var S,v,z={default:function(e){const{size:t,dotSize:o,borderSize:n,x:r,y:i}=e;return{eyeBorder:E(r,i,t,o*n),eyeInner:$(r+2*o,i+2*o,t-4*o)}},rounded:function(e){const{size:t,dotSize:o,borderSize:n,x:r,y:i}=e;return{eyeBorder:w(r,i,t,o*n,2*o),eyeInner:C(r+t/2,i+t/2,t/2-2*o)}},circle:function(e){const{size:t,dotSize:o,borderSize:n,x:r,y:i}=e;return{eyeBorder:M(r+t/2,i+t/2,t/2,o*n),eyeInner:C(r+t/2,i+t/2,t/2-2*o)}}},A={default:function(e){const{x:t,y:o,dotSize:n,dotScale:r,margin:i}=e;let s="";const a=n*r;return s+=$(t*n+(n-a)/2+i,o*n+(n-a)/2+i,a),s},circle:function(e){const{x:t,y:o,dotSize:n,dotScale:r,margin:i}=e;let s="",a=n/2*r;return s+=C(t*n+(n-2*a)/2+a+i,o*n+(n-2*a)/2+a+i,a),s}};(e=>{const t=class t{constructor(e,o,n,i){if(this.version=e,this.errorCorrectionLevel=o,this.modules=[],this.isFunction=[],e<t.MIN_VERSION||e>t.MAX_VERSION)throw new RangeError("Version value out of range");if(i<-1||i>7)throw new RangeError("Mask value out of range");this.size=4*e+17;let s=[];for(let t=0;t<this.size;t++)s.push(!1);for(let t=0;t<this.size;t++)this.modules.push(s.slice()),this.isFunction.push(s.slice());this.drawFunctionPatterns();const a=this.addEccAndInterleave(n);if(this.drawCodewords(a),-1==i){let e=1e9;for(let t=0;t<8;t++){this.applyMask(t),this.drawFormatBits(t);const o=this.getPenaltyScore();o<e&&(i=t,e=o),this.applyMask(t)}}r(0<=i&&i<=7),this.mask=i,this.applyMask(i),this.drawFormatBits(i),this.isFunction=[]}static encodeText(o,n){const r=e.QrSegment.makeSegments(o);return t.encodeSegments(r,n)}static encodeBinary(o,n){const r=e.QrSegment.makeBytes(o);return t.encodeSegments([r],n)}static encodeSegments(e,n,i=1,a=40,l=-1,c=!0){if(!(t.MIN_VERSION<=i&&i<=a&&a<=t.MAX_VERSION)||l<-1||l>7)throw new RangeError("Invalid value");let u,h;for(u=i;;u++){const o=8*t.getNumDataCodewords(u,n),r=s.getTotalBits(e,u);if(r<=o){h=r;break}if(u>=a)throw new RangeError("Data too long")}for(const o of[t.Ecc.MEDIUM,t.Ecc.QUARTILE,t.Ecc.HIGH])c&&h<=8*t.getNumDataCodewords(u,o)&&(n=o);let d=[];for(const t of e){o(t.mode.modeBits,4,d),o(t.numChars,t.mode.numCharCountBits(u),d);for(const e of t.getData())d.push(e)}r(d.length==h);const f=8*t.getNumDataCodewords(u,n);r(d.length<=f),o(0,Math.min(4,f-d.length),d),o(0,(8-d.length%8)%8,d),r(d.length%8==0);for(let t=236;d.length<f;t^=253)o(t,8,d);let g=[];for(;8*g.length<d.length;)g.push(0);return d.forEach((e,t)=>g[t>>>3]|=e<<7-(7&t)),new t(u,n,g,l)}getModule(e,t){return 0<=e&&e<this.size&&0<=t&&t<this.size&&this.modules[t][e]}drawFunctionPatterns(){for(let o=0;o<this.size;o++)this.setFunctionModule(6,o,o%2==0),this.setFunctionModule(o,6,o%2==0);this.drawFinderPattern(3,3),this.drawFinderPattern(this.size-4,3),this.drawFinderPattern(3,this.size-4);const e=this.getAlignmentPatternPositions(),t=e.length;for(let o=0;o<t;o++)for(let n=0;n<t;n++)0==o&&0==n||0==o&&n==t-1||o==t-1&&0==n||this.drawAlignmentPattern(e[o],e[n]);this.drawFormatBits(0),this.drawVersion()}drawFormatBits(e){const t=this.errorCorrectionLevel.formatBits<<3|e;let o=t;for(let n=0;n<10;n++)o=o<<1^1335*(o>>>9);const i=21522^(t<<10|o);r(i>>>15==0);for(let r=0;r<=5;r++)this.setFunctionModule(8,r,n(i,r));this.setFunctionModule(8,7,n(i,6)),this.setFunctionModule(8,8,n(i,7)),this.setFunctionModule(7,8,n(i,8));for(let r=9;r<15;r++)this.setFunctionModule(14-r,8,n(i,r));for(let r=0;r<8;r++)this.setFunctionModule(this.size-1-r,8,n(i,r));for(let r=8;r<15;r++)this.setFunctionModule(8,this.size-15+r,n(i,r));this.setFunctionModule(8,this.size-8,!0)}drawVersion(){if(this.version<7)return;let e=this.version;for(let o=0;o<12;o++)e=e<<1^7973*(e>>>11);const t=this.version<<12|e;r(t>>>18==0);for(let o=0;o<18;o++){const e=n(t,o),r=this.size-11+o%3,i=Math.floor(o/3);this.setFunctionModule(r,i,e),this.setFunctionModule(i,r,e)}}drawFinderPattern(e,t){for(let o=-4;o<=4;o++)for(let n=-4;n<=4;n++){const r=Math.max(Math.abs(n),Math.abs(o)),i=e+n,s=t+o;0<=i&&i<this.size&&0<=s&&s<this.size&&this.setFunctionModule(i,s,2!=r&&4!=r)}}drawAlignmentPattern(e,t){for(let o=-2;o<=2;o++)for(let n=-2;n<=2;n++)this.setFunctionModule(e+n,t+o,1!=Math.max(Math.abs(n),Math.abs(o)))}setFunctionModule(e,t,o){this.modules[t][e]=o,this.isFunction[t][e]=!0}addEccAndInterleave(e){const o=this.version,n=this.errorCorrectionLevel;if(e.length!=t.getNumDataCodewords(o,n))throw new RangeError("Invalid argument");const i=t.NUM_ERROR_CORRECTION_BLOCKS[n.ordinal][o],s=t.ECC_CODEWORDS_PER_BLOCK[n.ordinal][o],a=Math.floor(t.getNumRawDataModules(o)/8),l=i-a%i,c=Math.floor(a/i);let u=[];const h=t.reedSolomonComputeDivisor(s);for(let r=0,f=0;r<i;r++){let o=e.slice(f,f+c-s+(r<l?0:1));f+=o.length;const n=t.reedSolomonComputeRemainder(o,h);r<l&&o.push(0),u.push(o.concat(n))}let d=[];for(let t=0;t<u[0].length;t++)u.forEach((e,o)=>{(t!=c-s||o>=l)&&d.push(e[t])});return r(d.length==a),d}drawCodewords(e){if(e.length!=Math.floor(t.getNumRawDataModules(this.version)/8))throw new RangeError("Invalid argument");let o=0;for(let t=this.size-1;t>=1;t-=2){6==t&&(t=5);for(let r=0;r<this.size;r++)for(let i=0;i<2;i++){const s=t-i,a=t+1&2?r:this.size-1-r;!this.isFunction[a][s]&&o<8*e.length&&(this.modules[a][s]=n(e[o>>>3],7-(7&o)),o++)}}r(o==8*e.length)}applyMask(e){if(e<0||e>7)throw new RangeError("Mask value out of range");for(let t=0;t<this.size;t++)for(let o=0;o<this.size;o++){let n;switch(e){case 0:n=(o+t)%2==0;break;case 1:n=t%2==0;break;case 2:n=o%3==0;break;case 3:n=(o+t)%3==0;break;case 4:n=(Math.floor(o/3)+Math.floor(t/2))%2==0;break;case 5:n=o*t%2+o*t%3==0;break;case 6:n=(o*t%2+o*t%3)%2==0;break;case 7:n=((o+t)%2+o*t%3)%2==0;break;default:throw new Error("Unreachable")}!this.isFunction[t][o]&&n&&(this.modules[t][o]=!this.modules[t][o])}}getPenaltyScore(){let e=0;for(let r=0;r<this.size;r++){let o=!1,n=0,i=[0,0,0,0,0,0,0];for(let s=0;s<this.size;s++)this.modules[r][s]==o?(n++,5==n?e+=t.PENALTY_N1:n>5&&e++):(this.finderPenaltyAddHistory(n,i),o||(e+=this.finderPenaltyCountPatterns(i)*t.PENALTY_N3),o=this.modules[r][s],n=1);e+=this.finderPenaltyTerminateAndCount(o,n,i)*t.PENALTY_N3}for(let r=0;r<this.size;r++){let o=!1,n=0,i=[0,0,0,0,0,0,0];for(let s=0;s<this.size;s++)this.modules[s][r]==o?(n++,5==n?e+=t.PENALTY_N1:n>5&&e++):(this.finderPenaltyAddHistory(n,i),o||(e+=this.finderPenaltyCountPatterns(i)*t.PENALTY_N3),o=this.modules[s][r],n=1);e+=this.finderPenaltyTerminateAndCount(o,n,i)*t.PENALTY_N3}for(let r=0;r<this.size-1;r++)for(let o=0;o<this.size-1;o++){const n=this.modules[r][o];n==this.modules[r][o+1]&&n==this.modules[r+1][o]&&n==this.modules[r+1][o+1]&&(e+=t.PENALTY_N2)}let o=0;for(const t of this.modules)o=t.reduce((e,t)=>e+(t?1:0),o);const n=this.size*this.size,i=Math.ceil(Math.abs(20*o-10*n)/n)-1;return r(0<=i&&i<=9),e+=i*t.PENALTY_N4,r(0<=e&&e<=2568888),e}getAlignmentPatternPositions(){if(1==this.version)return[];{const e=Math.floor(this.version/7)+2,t=2*Math.floor((8*this.version+3*e+5)/(4*e-4));let o=[6];for(let n=this.size-7;o.length<e;n-=t)o.splice(1,0,n);return o}}static getNumRawDataModules(e){if(e<t.MIN_VERSION||e>t.MAX_VERSION)throw new RangeError("Version number out of range");let o=(16*e+128)*e+64;if(e>=2){const t=Math.floor(e/7)+2;o-=(25*t-10)*t-55,e>=7&&(o-=36)}return r(208<=o&&o<=29648),o}static getNumDataCodewords(e,o){return Math.floor(t.getNumRawDataModules(e)/8)-t.ECC_CODEWORDS_PER_BLOCK[o.ordinal][e]*t.NUM_ERROR_CORRECTION_BLOCKS[o.ordinal][e]}static reedSolomonComputeDivisor(e){if(e<1||e>255)throw new RangeError("Degree out of range");let o=[];for(let t=0;t<e-1;t++)o.push(0);o.push(1);let n=1;for(let r=0;r<e;r++){for(let e=0;e<o.length;e++)o[e]=t.reedSolomonMultiply(o[e],n),e+1<o.length&&(o[e]^=o[e+1]);n=t.reedSolomonMultiply(n,2)}return o}static reedSolomonComputeRemainder(e,o){let n=o.map(e=>0);for(const r of e){const e=r^n.shift();n.push(0),o.forEach((o,r)=>n[r]^=t.reedSolomonMultiply(o,e))}return n}static reedSolomonMultiply(e,t){if(e>>>8||t>>>8)throw new RangeError("Byte out of range");let o=0;for(let n=7;n>=0;n--)o=o<<1^285*(o>>>7),o^=(t>>>n&1)*e;return r(o>>>8==0),o}finderPenaltyCountPatterns(e){const t=e[1];r(t<=3*this.size);const o=t>0&&e[2]==t&&e[3]==3*t&&e[4]==t&&e[5]==t;return(o&&e[0]>=4*t&&e[6]>=t?1:0)+(o&&e[6]>=4*t&&e[0]>=t?1:0)}finderPenaltyTerminateAndCount(e,t,o){return e&&(this.finderPenaltyAddHistory(t,o),t=0),t+=this.size,this.finderPenaltyAddHistory(t,o),this.finderPenaltyCountPatterns(o)}finderPenaltyAddHistory(e,t){0==t[0]&&(e+=this.size),t.pop(),t.unshift(e)}};function o(e,t,o){if(t<0||t>31||e>>>t)throw new RangeError("Value out of range");for(let n=t-1;n>=0;n--)o.push(e>>>n&1)}function n(e,t){return!!(e>>>t&1)}function r(e){if(!e)throw new Error("Assertion error")}t.MIN_VERSION=1,t.MAX_VERSION=40,t.PENALTY_N1=3,t.PENALTY_N2=3,t.PENALTY_N3=40,t.PENALTY_N4=10,t.ECC_CODEWORDS_PER_BLOCK=[[-1,7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],[-1,13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]],t.NUM_ERROR_CORRECTION_BLOCKS=[[-1,1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],[-1,1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],[-1,1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],[-1,1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]],e.QrCode=t;const i=class e{constructor(e,t,o){if(this.mode=e,this.numChars=t,this.bitData=o,t<0)throw new RangeError("Invalid argument");this.bitData=o.slice()}static makeBytes(t){let n=[];for(const e of t)o(e,8,n);return new e(e.Mode.BYTE,t.length,n)}static makeNumeric(t){if(!e.isNumeric(t))throw new RangeError("String contains non-numeric characters");let n=[];for(let e=0;e<t.length;){const r=Math.min(t.length-e,3);o(parseInt(t.substring(e,e+r),10),3*r+1,n),e+=r}return new e(e.Mode.NUMERIC,t.length,n)}static makeAlphanumeric(t){if(!e.isAlphanumeric(t))throw new RangeError("String contains unencodable characters in alphanumeric mode");let n,r=[];for(n=0;n+2<=t.length;n+=2){let i=45*e.ALPHANUMERIC_CHARSET.indexOf(t.charAt(n));i+=e.ALPHANUMERIC_CHARSET.indexOf(t.charAt(n+1)),o(i,11,r)}return n<t.length&&o(e.ALPHANUMERIC_CHARSET.indexOf(t.charAt(n)),6,r),new e(e.Mode.ALPHANUMERIC,t.length,r)}static makeSegments(t){return""==t?[]:e.isNumeric(t)?[e.makeNumeric(t)]:e.isAlphanumeric(t)?[e.makeAlphanumeric(t)]:[e.makeBytes(e.toUtf8ByteArray(t))]}static makeEci(t){let n=[];if(t<0)throw new RangeError("ECI assignment value out of range");if(t<128)o(t,8,n);else if(t<16384)o(2,2,n),o(t,14,n);else{if(!(t<1e6))throw new RangeError("ECI assignment value out of range");o(6,3,n),o(t,21,n)}return new e(e.Mode.ECI,0,n)}static isNumeric(t){return e.NUMERIC_REGEX.test(t)}static isAlphanumeric(t){return e.ALPHANUMERIC_REGEX.test(t)}getData(){return this.bitData.slice()}static getTotalBits(e,t){let o=0;for(const n of e){const e=n.mode.numCharCountBits(t);if(n.numChars>=1<<e)return 1/0;o+=4+e+n.bitData.length}return o}static toUtf8ByteArray(e){e=encodeURI(e);let t=[];for(let o=0;o<e.length;o++)"%"!=e.charAt(o)?t.push(e.charCodeAt(o)):(t.push(parseInt(e.substring(o+1,o+3),16)),o+=2);return t}};i.NUMERIC_REGEX=/^[0-9]*$/,i.ALPHANUMERIC_REGEX=/^[A-Z0-9 $%*+.\/:-]*$/,i.ALPHANUMERIC_CHARSET="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:";let s=i;e.QrSegment=s})(S||(S={})),(e=>{const t=class{constructor(e,t){this.ordinal=e,this.formatBits=t}};t.LOW=new t(0,1),t.MEDIUM=new t(1,0),t.QUARTILE=new t(2,3),t.HIGH=new t(3,2),e.Ecc=t})((v=S||(S={})).QrCode||(v.QrCode={})),(e=>{(e=>{const t=class{constructor(e,t){this.modeBits=e,this.numBitsCharCount=t}numCharCountBits(e){return this.numBitsCharCount[Math.floor((e+7)/17)]}};t.NUMERIC=new t(1,[10,12,14]),t.ALPHANUMERIC=new t(2,[9,11,13]),t.BYTE=new t(4,[8,16,16]),t.KANJI=new t(8,[8,10,12]),t.ECI=new t(7,[0,0,0]),e.Mode=t})(e.QrSegment||(e.QrSegment={}))})(S||(S={}));var R=S,N=R.QrCode,I={L:R.QrCode.Ecc.LOW,M:R.QrCode.Ecc.MEDIUM,Q:R.QrCode.Ecc.QUARTILE,H:R.QrCode.Ecc.HIGH};function L(e,t,o){const n=e.length;return t<8&&o<8||t<8&&o>n-8||t>n-8&&o<8}function P(e){const{modules:t,size:o,dotSize:n,margin:r=0,eyeType:i="default",eyeBorderSize:s="default",pointType:a="default",customSize:l,pointSize:c="default"}=e,u=function(e){return function(e){const t={default:1,sm:.8,xs:.5};return o=>{const{modules:n,dotSize:r,pointSize:i,customSize:s,margin:a}=o;let l="";for(let c=0;c<n.length;c++)for(let o=0;o<n.length;o++)if(n[c][o]&&!L(n,o,c)){let n=s[c][o]||1;l+=e({x:o,y:c,dotSize:r,dotScale:t[i]*n,margin:a})}return l}}(A[e])}(a)({margin:r,modules:t,dotSize:n,pointSize:c,customSize:l}),{eyeBorder:h,eyeInner:d}=function(e){return function(e){const t={default:1,sm:.8,xs:.5};return o=>{const{size:n,dotSize:r,borderSize:i,margin:s}=o,{eyeSize:a,positions:l}=function(e,t,o){const n=7*t;return{eyeSize:n,positions:[{x:o,y:o},{x:o,y:e-n-o},{x:e-n-o,y:o}]}}(n,r,s);let c="",u="";for(const h of l){const{eyeBorder:o,eyeInner:n}=e({size:a,dotSize:r,borderSize:t[i],x:h.x,y:h.y});c+=o,u+=n}return{eyeBorder:c,eyeInner:u}}}(z[e])}(i)({margin:r,dotSize:n,borderSize:s,size:o});return{points:u,eyeBorder:h,eyeInner:d}}function B(e,t=2){return Number(e.toFixed(t))}function x(e){const{config:t,styleConfig:o,logoConfig:n,value:r}=e,{size:i=200,margin:s=0,eyeType:a,eyeBorderSize:l,pointType:c,pointSize:u,pointSizeRandom:h}=o||{},d=y.useMemo(()=>function(e,t){const{level:o="L",minVersion:n=2,maxVersion:r,mask:i,boostLevel:s}=t||{},a=R.QrSegment.makeSegments(e),l=N.encodeSegments(a,I[o],n,r,i,s),c=[];for(let u=0;u<l.size;u++){c.push([]);for(let e=0;e<l.size;e++)c[u].push(l.getModule(e,u))}return c}(r,t),[r,t]),f=y.useMemo(()=>B((i-2*s)/d.length),[d,i,s]),g=y.useMemo(()=>{let e=[];for(let t=0;t<d.length;t++){e.push([]);for(let o=0;o<d.length;o++)h?e[t].push(Math.random()<.5?1:.8):e[t].push(1)}return e},[d,h]),m=y.useMemo(()=>P({modules:d,margin:s,size:i,dotSize:f,eyeType:a,eyeBorderSize:l,pointType:c,pointSize:u,customSize:g}),[d,f,o]);return{logo:y.useMemo(()=>{if(!n)return;let e=i-2*s,{src:t,width:o=e/5,height:r=e/5,x:a=e/2-o/2+s,y:l=e/2-r/2+s}=n||{};const c=d.length,u=Array.from({length:c},(e,t)=>t*f+s),h=u[u.findIndex(e=>e>a)-2]-.5||a,g=u[u.findIndex(e=>e>l)-2]-.5||l;return{src:t,width:o,height:r,x:a,y:l,bg:{x:h,y:g,width:o+2*(a-h),height:r+2*(l-g)}}},[d,f,s,n]),path:m}}function b(e){const{value:t,config:o,styleConfig:n,logoConfig:r,className:i}=e,{size:s=200,margin:a=0,color:l="#000",bgColor:c="#fff",eyeBorderColor:u,eyeInnerColor:h}=n||{},{path:d,logo:f}=x({config:o,styleConfig:n,logoConfig:r,value:t}),{src:g,x:m,y:p,width:C,height:$,bg:E}=f||{};/* @__PURE__ */
2
2
  return y.createElement("svg",{width:s,height:s,viewBox:`0 0 ${s} ${s}`,style:{backgroundColor:c},className:"qr-container qr-svg"+(i?` ${i}`:"")},/* @__PURE__ */y.createElement("g",{fill:l},/* @__PURE__ */y.createElement("path",{fill:u||l,d:d.eyeBorder}),/* @__PURE__ */y.createElement("path",{fill:h||l,d:d.eyeInner}),/* @__PURE__ */y.createElement("path",{d:d.points}),g&&/* @__PURE__ */y.createElement(y.Fragment,null,/* @__PURE__ */y.createElement("rect",{fill:c,x:null==E?void 0:E.x,y:null==E?void 0:E.y,width:null==E?void 0:E.width,height:null==E?void 0:E.height}),/* @__PURE__ */y.createElement("image",{href:g,width:C,height:$,x:m,y:p}))))}function _(e){const{value:t,config:o,styleConfig:n,logoConfig:r,className:i}=e,{size:s=200,bgColor:a}=n||{},{path:l,logo:c}=x({config:o,styleConfig:n,logoConfig:r,value:t}),u=y.useRef(null);return(0,y.useEffect)(()=>{if(l&&u.current){const e=u.current.getContext("2d");(function(e){const{ctx:t,path:o,styleConfig:n}=e,{color:r="#000",bgColor:i="#fff",eyeBorderColor:s,eyeInnerColor:a}=n||{};t.clearRect(0,0,t.canvas.width,t.canvas.height),t.fillStyle=i,t.fillRect(0,0,t.canvas.width,t.canvas.height),t.fillStyle=s||r,t.fill(new Path2D(o.eyeBorder)),t.fillStyle=a||r,t.fill(new Path2D(o.eyeInner)),t.fillStyle=r,t.fill(new Path2D(o.points))})({ctx:e,path:l,styleConfig:n}),c&&function({ctx:e,bgColor:t="#fff",logo:o}){const{src:n,width:r,height:i,x:s,y:a,bg:l}=o||{};if(!n)return;const c=new Image;c.src=n,c.onload=()=>{e.fillStyle=t,e.fillRect(l.x,l.y,l.width,l.height);const o=c.width/c.height;let n=r,u=i;o>1?u=r/o:n=i*o,e.drawImage(c,s+(r-n)/2,a+(i-u)/2,n,u)}}({ctx:e,bgColor:a,logo:c})}},[l,r,n]),/* @__PURE__ */y.createElement("canvas",{width:s,height:s,ref:u,className:"qr-container qr-canvas"+(i?` ${i}`:"")})}function T(e){const{mode:t="canvas"}=e;return"svg"===t?/* @__PURE__ */y.createElement(b,{...e}):/* @__PURE__ */y.createElement(_,{...e})}var O=/* @__PURE__ */e(h()),F=d();function k(e,t){return(0,F.saveAs)(e,t)}var D=function(e){function t(t){var o=e.call(this,t)||this;return o.ref=y.createRef(),o}return o(t,e),t.prototype.getImageSettings=function(){var e=this.props,t=e.imageSettings,o=e.data;if(t&&f(t)&&t.src&&"string"==typeof t.src)return l(t.src)&&(t.src=s(t.src,o,"| raw")),(0,O.default)(t,function(e,t){return~["width","height","x","y"].indexOf(t)?m(e)?Number(e):null:e})},t.prototype.doAction=function(e,t,o,n){var r,i=this.props.codeSize;if("saveAs"===(null==e?void 0:e.actionType)&&(null===(r=this.ref)||void 0===r?void 0:r.current))if("svg"===this.props.mode){var s=this.ref.current.querySelector("svg");if(s){var a='<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" height="'.concat(i,'" width="').concat(i,'" viewBox="').concat(s.getAttribute("viewBox")||"0 0 37 37",'">\n ').concat(s.innerHTML,"\n </svg>");k(new Blob([a],{type:"image/svg+xml"}),(null==n?void 0:n.name)||"qr-code.svg")}}else{var l=this.ref.current.querySelector("canvas");l&&l.toBlob(function(e){e&&k(e,(null==n?void 0:n.name)?n.name.replace(/\.svg$/,".png"):"qr-code.png")},"image/png")}},t.prototype.render=function(){var e=this.props,t=e.className,o=e.style,n=e.qrcodeClassName,r=e.codeSize,s=e.backgroundColor,l=e.foregroundColor,c=e.placeholder,u=e.level,h=e.defaultValue,d=e.data,f=e.mode,g=e.eyeType,m=e.eyeBorderColor,C=e.eyeBorderSize,$=e.eyeInnerColor,E=e.pointType,w=e.pointSize,M=e.pointSizeRandom,S=e.translate,v=e.classPrefix,z=i(this.props,function(){return a(h,d,"| raw")||void 0});return y.createElement("div",{className:(0,p.default)("".concat(v,"QrCode"),t),style:o,ref:this.ref},z?z.length>2953?y.createElement("span",{className:"text-danger"},S("QRCode.tooLong",{max:2953})):y.createElement(T,{className:n,value:z,config:{level:u||"L",minVersion:2,boostLevel:!0},styleConfig:{size:r,bgColor:s,color:l,eyeType:g,eyeBorderColor:m,eyeBorderSize:C,eyeInnerColor:$,pointType:E,pointSize:w,pointSizeRandom:M},logoConfig:this.getImageSettings(),mode:f}):y.createElement("span",{className:"".concat(v,"QrCode--placeholder")},c))},t.defaultProps={codeSize:128,qrcodeClassName:"",backgroundColor:"#fff",foregroundColor:"#000",level:"L",placeholder:"-",mode:"canvas"},t}(y.Component),U=function(e){function t(t,o){var n=e.call(this,t)||this;return o.registerComponent(n),n}return o(t,e),t.prototype.componentWillUnmount=function(){var t;null===(t=e.prototype.componentWillUnmount)||void 0===t||t.call(this),this.context.unRegisterComponent(this)},t.contextType=c,r([u({type:"qrcode",alias:["qr-code"],name:"qrcode"}),n("design:paramtypes",[Object,Object])],t)}(D);export{U as QRCodeRenderer,D as default};
@@ -1 +1 @@
1
- import{o as e}from"./rolldown-runtime-Cmsah3SL.js";import{t}from"./react-COOgDf_T.js";import{a as n,i as a,n as r,o,r as i}from"./tslib.es6-TRdqp4ac.js";import{F as s,Nn as l,ht as p,vi as u,vn as d}from"./esm-Byma-6B-.js";import{Nt as c,R as h}from"./esm-CM4fvlfi.js";import{t as v}from"./StaticHoc-CJgNJAEY.js";var m=/* @__PURE__ */e(t()),f=/* @__PURE__ */e(d()),y=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),t.prototype.doAction=function(e,t,n){var a,r,o=this.props,i=o.resetValue,s=o.onChange,l=o.formStore,p=o.store,d=o.name,c=null==e?void 0:e.actionType;if("clear"===c)s("");else if("reset"===c){var h=null!==(r=u(null!==(a=null==l?void 0:l.pristine)&&void 0!==a?a:null==p?void 0:p.pristine,d))&&void 0!==r?r:i;s(null!=h?h:"")}},t.prototype.dispatchChangeEvent=function(e){return void 0===e&&(e={}),r(this,void 0,void 0,function(){var t,a,r,o,i,s,l;return n(this,function(n){switch(n.label){case 0:return t=this.props,a=t.dispatchEvent,r=t.onChange,o=t.submitOnChange,i=t.onRadioChange,s=p(this.props,{value:e}),!1===(null==i?void 0:i(s,this.props))?[2]:[4,a("change",s)];case 1:return(null==(l=n.sent())?void 0:l.prevented)||r&&r(e,o,!0),[2]}})})},t.prototype.renderStatic=function(){var e=this.props,t=e.value,n=e.trueValue,a=e.falseValue,r=e.option,o=e.render,i=e.partial,s=e.optionType,l=e.checked,p=e.labelClassName;return m.createElement(c,{type:"radio",inline:!0,value:t||"",trueValue:n,falseValue:a,disabled:!0,partial:i,optionType:s,checked:l,labelClassName:p},r?o("option",r):null)},t.prototype.render=function(){var e=this,t=this.props,n=t.className;t.style;var a=t.value,r=t.trueValue,o=t.falseValue,i=t.option;t.onChange;var s=t.disabled,l=t.render,p=t.partial,u=t.optionType,d=t.checked,h=t.labelClassName,v=t.classPrefix;return m.createElement("div",{className:(0,f.default)("".concat(v,"CheckboxControl"),n)},m.createElement(c,{type:"radio",inline:!0,value:a||"",trueValue:r,falseValue:o,disabled:s,onChange:function(t){return e.dispatchChangeEvent(t)},partial:p,optionType:u,checked:d,labelClassName:h},i?l("option",i):null))},t.defaultProps={trueValue:!0,falseValue:!1},i([l,o("design:type",Function),o("design:paramtypes",[Object]),o("design:returntype",Promise)],t.prototype,"dispatchChangeEvent",null),i([v(),o("design:type",Function),o("design:paramtypes",[]),o("design:returntype",void 0)],t.prototype,"render",null),t}(m.Component),g=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),i([h,s({type:"radio",sizeMutable:!1,thin:!0})],t)}(y);export{g as RadioControlRenderer,y as default};
1
+ import{o as e}from"./rolldown-runtime-DXzHzmmG.js";import{t}from"./react-CWkhIp2c.js";import{a as n,i as a,n as r,o,r as i}from"./tslib.es6-TRdqp4ac.js";import{F as s,Nn as l,ht as p,vi as u,vn as d}from"./esm-DMJQA23h.js";import{Nt as c,R as h}from"./esm-Dgr2t9Jm.js";import{t as v}from"./StaticHoc-D0pM2bgC.js";var m=/* @__PURE__ */e(t()),f=/* @__PURE__ */e(d()),y=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),t.prototype.doAction=function(e,t,n){var a,r,o=this.props,i=o.resetValue,s=o.onChange,l=o.formStore,p=o.store,d=o.name,c=null==e?void 0:e.actionType;if("clear"===c)s("");else if("reset"===c){var h=null!==(r=u(null!==(a=null==l?void 0:l.pristine)&&void 0!==a?a:null==p?void 0:p.pristine,d))&&void 0!==r?r:i;s(null!=h?h:"")}},t.prototype.dispatchChangeEvent=function(e){return void 0===e&&(e={}),r(this,void 0,void 0,function(){var t,a,r,o,i,s,l;return n(this,function(n){switch(n.label){case 0:return t=this.props,a=t.dispatchEvent,r=t.onChange,o=t.submitOnChange,i=t.onRadioChange,s=p(this.props,{value:e}),!1===(null==i?void 0:i(s,this.props))?[2]:[4,a("change",s)];case 1:return(null==(l=n.sent())?void 0:l.prevented)||r&&r(e,o,!0),[2]}})})},t.prototype.renderStatic=function(){var e=this.props,t=e.value,n=e.trueValue,a=e.falseValue,r=e.option,o=e.render,i=e.partial,s=e.optionType,l=e.checked,p=e.labelClassName;return m.createElement(c,{type:"radio",inline:!0,value:t||"",trueValue:n,falseValue:a,disabled:!0,partial:i,optionType:s,checked:l,labelClassName:p},r?o("option",r):null)},t.prototype.render=function(){var e=this,t=this.props,n=t.className;t.style;var a=t.value,r=t.trueValue,o=t.falseValue,i=t.option;t.onChange;var s=t.disabled,l=t.render,p=t.partial,u=t.optionType,d=t.checked,h=t.labelClassName,v=t.classPrefix;return m.createElement("div",{className:(0,f.default)("".concat(v,"CheckboxControl"),n)},m.createElement(c,{type:"radio",inline:!0,value:a||"",trueValue:r,falseValue:o,disabled:s,onChange:function(t){return e.dispatchChangeEvent(t)},partial:p,optionType:u,checked:d,labelClassName:h},i?l("option",i):null))},t.defaultProps={trueValue:!0,falseValue:!1},i([l,o("design:type",Function),o("design:paramtypes",[Object]),o("design:returntype",Promise)],t.prototype,"dispatchChangeEvent",null),i([v(),o("design:type",Function),o("design:paramtypes",[]),o("design:returntype",void 0)],t.prototype,"render",null),t}(m.Component),g=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),i([h,s({type:"radio",sizeMutable:!1,thin:!0})],t)}(y);export{g as RadioControlRenderer,y as default};
@@ -1 +1 @@
1
- import{o as e}from"./rolldown-runtime-Cmsah3SL.js";import{t as n}from"./react-COOgDf_T.js";import{a,i as t,n as s,o,r as i,t as l}from"./tslib.es6-TRdqp4ac.js";import{J as r,Nn as d,P as c,Xr as u,Z as h,Zn as p,ht as m,vi as C,vn as b}from"./esm-Byma-6B-.js";import{dt as f}from"./esm-CM4fvlfi.js";import{t as v}from"./StaticHoc-CJgNJAEY.js";var k=/* @__PURE__ */e(n()),y=/* @__PURE__ */e(b()),g=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return t(n,e),n.prototype.doAction=function(e,n,a){var t,s,o=this.props,i=o.resetValue,l=o.onChange,r=o.formStore,d=o.store,c=o.name,u=null==e?void 0:e.actionType;if("clear"===u)null==l||l("");else if("reset"===u){var h=null!==(s=C(null!==(t=null==r?void 0:r.pristine)&&void 0!==t?t:null==d?void 0:d.pristine,c))&&void 0!==s?s:i;null==l||l(null!=h?h:"")}},n.prototype.handleChange=function(e){return s(this,void 0,void 0,function(){var n,t,s,o,i,l,r,d,c;return a(this,function(a){switch(a.label){case 0:return n=this.props,t=n.joinValues,s=n.extractValue,o=n.valueField,i=n.onChange,l=n.dispatchEvent,r=n.options,n.selectedOptions,d=e,e&&(t||s)&&(d=e[o||"value"]),[4,l("change",m(this.props,{value:d,options:r,items:r,selectedItems:e}))];case 1:return(null==(c=a.sent())?void 0:c.prevented)||i&&i(d),[2]}})})},n.prototype.reload=function(e,n){var a=this.props.reloadOptions;a&&a(e,n)},n.prototype.renderLabel=function(e,n){var a=n.labelField,t=this.props.data,s=e[a||"label"];return k.createElement(k.Fragment,null,"string"==typeof s?u(s,t):"".concat(s))},n.prototype.render=function(){var e=this.props,n=e.className;e.style;var a=e.classPrefix,t=e.value;e.onChange;var s=e.disabled,o=e.joinValues,i=e.extractValue,d=e.delimiter,c=e.placeholder,u=e.options,m=e.inline,C=void 0===m||m,b=e.formMode,v=e.columnsCount,g=e.classPrefix,x=e.itemClassName,N=e.labelClassName,j=e.optionClassName,F=e.labelField,w=e.valueField;e.data;var P=e.translate,V=e.optionType,E=e.level,I=e.testIdBuilder,O=e.themeCss,L=e.id,S=e.env,T=p(O,"radios");return k.createElement(k.Fragment,null,k.createElement(f,{inline:C||"inline"===b,className:(0,y.default)("".concat(a,"RadiosControl"),n,h(l(l({},this.props),{name:["radiosControlClassName","radiosControlCheckedClassName","radiosClassName","radiosCheckedClassName","radiosCheckedInnerClassName","radiosShowClassName"],id:L,themeCss:T}))),value:null==t?"":t,disabled:s,onChange:this.handleChange,joinValues:o,extractValue:i,delimiter:d,labelClassName:null!=j?j:N,labelField:F,valueField:w,placeholder:P(c),options:u,renderLabel:this.renderLabel,columnsCount:v,classPrefix:g,itemClassName:x,optionType:V,level:E,testIdBuilder:I}),k.createElement(r,l({},this.props,{config:{themeCss:T,classNames:[{key:"radiosControlClassName",weights:{default:{inner:".".concat(a,"Checkbox:not(.checked):not(.disabled)")},hover:{suf:" .".concat(a,"Checkbox:not(.disabled):not(.checked)")},disabled:{inner:".".concat(a,"Checkbox.disabled:not(.checked)")}}},{key:"radiosControlCheckedClassName",weights:{default:{inner:".".concat(a,"Checkbox.checked:not(.disabled)")},hover:{suf:" .".concat(a,"Checkbox.checked:not(.disabled)")},disabled:{inner:".".concat(a,"Checkbox.checked.disabled")}}},{key:"radiosClassName",weights:{default:{inner:".".concat(a,"Checkbox:not(.checked):not(.disabled) > i")},hover:{suf:" .".concat(a,"Checkbox:not(.disabled):not(.checked)"),inner:"> i"},disabled:{inner:".".concat(a,"Checkbox.disabled:not(.checked) > i")}}},{key:"radiosCheckedClassName",weights:{default:{inner:".".concat(a,"Checkbox:not(.disabled) > i")},hover:{suf:" .".concat(a,"Checkbox:not(.disabled)"),inner:"> i"},disabled:{inner:".".concat(a,"Checkbox.disabled > i")}}},{key:"radiosCheckedInnerClassName",weights:{default:{inner:".".concat(a,"Checkbox:not(.disabled) > i .icon")},hover:{suf:" .".concat(a,"Checkbox:not(.disabled)"),inner:"> i .icon"},disabled:{inner:".".concat(a,"Checkbox.disabled > i:before")}}},{key:"radiosShowClassName",weights:{default:{inner:".".concat(a,"Checkbox > i")}}}],id:L},env:S})))},n.defaultProps={columnsCount:1},i([d,o("design:type",Function),o("design:paramtypes",[Object]),o("design:returntype",Promise)],n.prototype,"handleChange",null),i([d,o("design:type",Function),o("design:paramtypes",[Object,Object]),o("design:returntype",void 0)],n.prototype,"renderLabel",null),i([v(),o("design:type",Function),o("design:paramtypes",[]),o("design:returntype",void 0)],n.prototype,"render",null),n}(k.Component),x=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return t(n,e),n.defaultProps={multiple:!1,inline:!0},i([c({type:"radios",sizeMutable:!1,thin:!0})],n)}(g);export{x as RadiosControlRenderer,g as default};
1
+ import{o as e}from"./rolldown-runtime-DXzHzmmG.js";import{t as n}from"./react-CWkhIp2c.js";import{a,i as t,n as s,o,r as i,t as l}from"./tslib.es6-TRdqp4ac.js";import{J as r,Nn as d,P as c,Xr as u,Z as h,Zn as p,ht as m,vi as C,vn as b}from"./esm-DMJQA23h.js";import{dt as f}from"./esm-Dgr2t9Jm.js";import{t as v}from"./StaticHoc-D0pM2bgC.js";var k=/* @__PURE__ */e(n()),y=/* @__PURE__ */e(b()),g=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return t(n,e),n.prototype.doAction=function(e,n,a){var t,s,o=this.props,i=o.resetValue,l=o.onChange,r=o.formStore,d=o.store,c=o.name,u=null==e?void 0:e.actionType;if("clear"===u)null==l||l("");else if("reset"===u){var h=null!==(s=C(null!==(t=null==r?void 0:r.pristine)&&void 0!==t?t:null==d?void 0:d.pristine,c))&&void 0!==s?s:i;null==l||l(null!=h?h:"")}},n.prototype.handleChange=function(e){return s(this,void 0,void 0,function(){var n,t,s,o,i,l,r,d,c;return a(this,function(a){switch(a.label){case 0:return n=this.props,t=n.joinValues,s=n.extractValue,o=n.valueField,i=n.onChange,l=n.dispatchEvent,r=n.options,n.selectedOptions,d=e,e&&(t||s)&&(d=e[o||"value"]),[4,l("change",m(this.props,{value:d,options:r,items:r,selectedItems:e}))];case 1:return(null==(c=a.sent())?void 0:c.prevented)||i&&i(d),[2]}})})},n.prototype.reload=function(e,n){var a=this.props.reloadOptions;a&&a(e,n)},n.prototype.renderLabel=function(e,n){var a=n.labelField,t=this.props.data,s=e[a||"label"];return k.createElement(k.Fragment,null,"string"==typeof s?u(s,t):"".concat(s))},n.prototype.render=function(){var e=this.props,n=e.className;e.style;var a=e.classPrefix,t=e.value;e.onChange;var s=e.disabled,o=e.joinValues,i=e.extractValue,d=e.delimiter,c=e.placeholder,u=e.options,m=e.inline,C=void 0===m||m,b=e.formMode,v=e.columnsCount,g=e.classPrefix,x=e.itemClassName,N=e.labelClassName,j=e.optionClassName,F=e.labelField,w=e.valueField;e.data;var P=e.translate,V=e.optionType,E=e.level,I=e.testIdBuilder,O=e.themeCss,L=e.id,S=e.env,T=p(O,"radios");return k.createElement(k.Fragment,null,k.createElement(f,{inline:C||"inline"===b,className:(0,y.default)("".concat(a,"RadiosControl"),n,h(l(l({},this.props),{name:["radiosControlClassName","radiosControlCheckedClassName","radiosClassName","radiosCheckedClassName","radiosCheckedInnerClassName","radiosShowClassName"],id:L,themeCss:T}))),value:null==t?"":t,disabled:s,onChange:this.handleChange,joinValues:o,extractValue:i,delimiter:d,labelClassName:null!=j?j:N,labelField:F,valueField:w,placeholder:P(c),options:u,renderLabel:this.renderLabel,columnsCount:v,classPrefix:g,itemClassName:x,optionType:V,level:E,testIdBuilder:I}),k.createElement(r,l({},this.props,{config:{themeCss:T,classNames:[{key:"radiosControlClassName",weights:{default:{inner:".".concat(a,"Checkbox:not(.checked):not(.disabled)")},hover:{suf:" .".concat(a,"Checkbox:not(.disabled):not(.checked)")},disabled:{inner:".".concat(a,"Checkbox.disabled:not(.checked)")}}},{key:"radiosControlCheckedClassName",weights:{default:{inner:".".concat(a,"Checkbox.checked:not(.disabled)")},hover:{suf:" .".concat(a,"Checkbox.checked:not(.disabled)")},disabled:{inner:".".concat(a,"Checkbox.checked.disabled")}}},{key:"radiosClassName",weights:{default:{inner:".".concat(a,"Checkbox:not(.checked):not(.disabled) > i")},hover:{suf:" .".concat(a,"Checkbox:not(.disabled):not(.checked)"),inner:"> i"},disabled:{inner:".".concat(a,"Checkbox.disabled:not(.checked) > i")}}},{key:"radiosCheckedClassName",weights:{default:{inner:".".concat(a,"Checkbox:not(.disabled) > i")},hover:{suf:" .".concat(a,"Checkbox:not(.disabled)"),inner:"> i"},disabled:{inner:".".concat(a,"Checkbox.disabled > i")}}},{key:"radiosCheckedInnerClassName",weights:{default:{inner:".".concat(a,"Checkbox:not(.disabled) > i .icon")},hover:{suf:" .".concat(a,"Checkbox:not(.disabled)"),inner:"> i .icon"},disabled:{inner:".".concat(a,"Checkbox.disabled > i:before")}}},{key:"radiosShowClassName",weights:{default:{inner:".".concat(a,"Checkbox > i")}}}],id:L},env:S})))},n.defaultProps={columnsCount:1},i([d,o("design:type",Function),o("design:paramtypes",[Object]),o("design:returntype",Promise)],n.prototype,"handleChange",null),i([d,o("design:type",Function),o("design:paramtypes",[Object,Object]),o("design:returntype",void 0)],n.prototype,"renderLabel",null),i([v(),o("design:type",Function),o("design:paramtypes",[]),o("design:returntype",void 0)],n.prototype,"render",null),n}(k.Component),x=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return t(n,e),n.defaultProps={multiple:!1,inline:!0},i([c({type:"radios",sizeMutable:!1,thin:!0})],n)}(g);export{x as RadiosControlRenderer,g as default};
@@ -0,0 +1 @@
1
+ import{o as e,r as t}from"./rolldown-runtime-DXzHzmmG.js";import{t as n}from"./react-CWkhIp2c.js";import{c as o,i as r,o as a,r as s,t as i}from"./tslib.es6-TRdqp4ac.js";import{Nn as l,Xr as c,it as p,tt as m}from"./esm-DMJQA23h.js";import"./esm-Dgr2t9Jm.js";import{c as u,o as d}from"./_castFunction-CQMNP8A1.js";var f=/* @__PURE__ */t({RemarkRenderer:()=>b,default:()=>h,filterContents:()=>v}),y=/* @__PURE__ */e(n());function v(e,t){if("string"==typeof e)return c(e,t);if(e){var n=e.title,r=e.content,a=e.body,s=o(e,["title","content","body"]);return n||r||a?i(i({},s),{title:c(n,t),content:r||a?c(r||a||"",t):void 0}):void 0}return e}var g=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.showModalTip=function(e){var t=this.props,n=t.onAction,o=t.data;return function(t){n&&n(t,{actionType:"dialog",dialog:{title:e&&"string"!=typeof e?e.title:"",body:e&&"string"!=typeof e?e.content:e,actions:[]}},o)}},t.prototype.renderLabel=function(e,t,n,o){var r=o?"Remark-icon--".concat(o):void 0;return y.createElement(y.Fragment,null,t?y.createElement("span",null,t):null,y.createElement("span",{className:n("Remark-icon",r)},y.createElement(u,{cx:n,icon:e||"question-mark"})))},t.prototype.render=function(){var e,t,n,o=this.props,r=o.className,a=o.style,s=o.icon,i=o.label,l=o.shape,c=o.tooltip,p=o.placement,m=o.rootClose,u=o.trigger,f=o.container,g=o.popOverContainer,h=o.classPrefix,b=o.classnames,C=o.content,k=o.data,N=o.env,R=o.tooltipClassName,j=o.mobileUI,E=null!==(e=null==c?void 0:c.icon)&&void 0!==e?e:s,w=null!==(t=null==c?void 0:c.label)&&void 0!==t?t:i,x=null!==(n=null==c?void 0:c.shape)&&void 0!==n?n:l,L=v(c||C,k);return j?y.createElement("div",{className:b("Remark",c&&c.className||r||"Remark--warning"),style:a,onClick:this.showModalTip(L)},this.renderLabel(E,w,b,x)):y.createElement(d,{classPrefix:h,classnames:b,tooltip:L,tooltipClassName:c&&c.tooltipClassName||R,placement:c&&c.placement||p,rootClose:c&&c.rootClose||m,trigger:c&&c.trigger||u,container:f||g||N.getModalContainer,delay:c&&c.delay},y.createElement("div",{className:b("Remark",c&&c.className||r||"Remark--warning"),style:a},this.renderLabel(E,w,b,x)))},t.propsList=[],t.defaultProps={icon:"",trigger:["hover","focus"]},s([l,a("design:type",Function),a("design:paramtypes",[Object]),a("design:returntype",void 0)],t.prototype,"showModalTip",null),t}(y.Component),h=m(g),b=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),s([p({type:"remark"})],t)}(g);export{v as n,f as t};