@txgw/payout-components 1.1.2 → 1.1.4

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 (194) hide show
  1. package/dist/{AMIS-DZNF-wN5.js → AMIS-Bq2mkXpj.js} +1 -1
  2. package/dist/{Action-Bs-w39w3.js → Action-C3QtDUqy.js} +1 -1
  3. package/dist/{Alert-DUrQKj62.js → Alert-D7dRg-Pn.js} +1 -1
  4. package/dist/{AnchorNav-DwqO5tOJ.js → AnchorNav-BkHVvty5.js} +1 -1
  5. package/dist/{App-XGojn9ib.js → App-CP2DIt1G.js} +1 -1
  6. package/dist/{Audio-DgzkufkL.js → Audio-BppDXVEA.js} +1 -1
  7. package/dist/{Avatar-DqhjWFEd.js → Avatar-DJxuYka5.js} +1 -1
  8. package/dist/{BarCode-tjp-bkz9.js → BarCode-D4gon2p5.js} +1 -1
  9. package/dist/{BarCode-BvXPpsQD.js → BarCode-DhOaTHVR.js} +1 -1
  10. package/dist/{Breadcrumb-oAm7DyFM.js → Breadcrumb-Wrkvuo-D.js} +1 -1
  11. package/dist/ButtonGroup-Do35UTdV.js +1 -0
  12. package/dist/{ButtonGroupSelect-BSiLinwi.js → ButtonGroupSelect-BUdkI9ab.js} +1 -1
  13. package/dist/{ButtonToolbar-DreDDViU.js → ButtonToolbar-D2UKzr3I.js} +1 -1
  14. package/dist/{CRUD-DOweSvNT.js → CRUD-4seSk6Da.js} +1 -1
  15. package/dist/{CRUD2-vQ4diTWc.js → CRUD2-DT_SKjjr.js} +1 -1
  16. package/dist/{Calendar-BiO6uAcc.js → Calendar-Cw4oMOLN.js} +1 -1
  17. package/dist/Card-C3k1tiC5.js +1 -0
  18. package/dist/{Card2-7Wp2CxXC.js → Card2-nWNx9EJj.js} +1 -1
  19. package/dist/{Cards-D4nSx5vL.js → Cards-BXvnwLq5.js} +1 -1
  20. package/dist/{Carousel-h335GVnQ.js → Carousel-OpryFVUv.js} +1 -1
  21. package/dist/{ChainedSelect-CgA7EAnm.js → ChainedSelect-BSMLjswV.js} +1 -1
  22. package/dist/{Chart-3iqLVLt0.js → Chart-DeifHM3G.js} +1 -1
  23. package/dist/{ChartRadios-B6Ot4z4V.js → ChartRadios-BX0XgRaT.js} +1 -1
  24. package/dist/Checkbox-C8m4jCbq.js +1 -0
  25. package/dist/{Checkboxes-B57EyVvD.js → Checkboxes-DacWLHrb.js} +1 -1
  26. package/dist/{Code-73HoywPD.js → Code-DcvQoe7q.js} +1 -1
  27. package/dist/{Collapse-Of0m7uH6.js → Collapse-BNe1BLza.js} +1 -1
  28. package/dist/{CollapseGroup-BdfCeJXB.js → CollapseGroup-BjOLc7gy.js} +1 -1
  29. package/dist/{Color-Dex4BTai.js → Color-VTVRP0Yh.js} +1 -1
  30. package/dist/{ColorPicker-CaZhySp2.js → ColorPicker-Bu-Gc0dG.js} +1 -1
  31. package/dist/{ColumnToggler-BT4N08pI.js → ColumnToggler-C3nJ3a2L.js} +1 -1
  32. package/dist/{ColumnToggler-DCYiE7t2.js → ColumnToggler-Dt0txpR3.js} +1 -1
  33. package/dist/{Combo-DhX7fDDG.js → Combo-BvTYUYUH.js} +1 -1
  34. package/dist/{ConditionBuilder-DlYCpqot.js → ConditionBuilder-DgrT7foX.js} +1 -1
  35. package/dist/{Container-Cjl-6k2g.js → Container-Dxat5bhD.js} +1 -1
  36. package/dist/{Control-D0yxiOHV.js → Control-Bf-oCotG.js} +1 -1
  37. package/dist/{Custom-DYfrc-91.js → Custom-D6c7XWuG.js} +1 -1
  38. package/dist/{Date-D_v0tbK0.js → Date-bwXIQ1E2.js} +1 -1
  39. package/dist/{DateRange-DM7ZQogY.js → DateRange-Dziuubwl.js} +1 -1
  40. package/dist/{Dialog-D4mabE0H.js → Dialog-DIPV4_aZ.js} +1 -1
  41. package/dist/{DiffEditor-3RFnxnVZ.js → DiffEditor-DmsB7iU5.js} +1 -1
  42. package/dist/{Divider-X0wd4qMm.js → Divider-DXKjgHnu.js} +1 -1
  43. package/dist/{Drawer-CmNhH-X1.js → Drawer-DoMG_38Z.js} +1 -1
  44. package/dist/{DropDownButton-3OqKMh9I.js → DropDownButton-Deczvc9l.js} +1 -1
  45. package/dist/{Each-CUEt_Fp0.js → Each-BN_RdIk9.js} +1 -1
  46. package/dist/FieldSet-U4D0FvFM.js +1 -0
  47. package/dist/{Flex-vXjawllk.js → Flex-CEOKLccw.js} +1 -1
  48. package/dist/{Formula-td5jVfJP.js → Formula-wHZcZdZe.js} +1 -1
  49. package/dist/{Grid2D-B94XWGD9.js → Grid2D-CjhMs7os.js} +1 -1
  50. package/dist/{GridNav-CjBc3KU2.js → GridNav-CMdtm2Xn.js} +1 -1
  51. package/dist/{Group-BZ4Pg7AG.js → Group-CeX70BQM.js} +1 -1
  52. package/dist/HBox-BN0oN-VJ.js +1 -0
  53. package/dist/{Hidden-BscLTSvF.js → Hidden-BQlhmMF1.js} +1 -1
  54. package/dist/{IFrame-DGSX6045.js → IFrame-BBlU5j3H.js} +1 -1
  55. package/dist/{Icon-iZCnbbZJ.js → Icon-DAUsPZQ-.js} +1 -1
  56. package/dist/{IconPicker-C-73qGJr.js → IconPicker-Cj7Km8sP.js} +1 -1
  57. package/dist/{IconSelect-BPcOP4a-.js → IconSelect-B6VM6qir.js} +1 -1
  58. package/dist/{IconSelectStore-CfOI4fPx.js → IconSelectStore-Dejwl7K4.js} +1 -1
  59. package/dist/{Image-B_euCBkp.js → Image-CD2BqrS9.js} +1 -1
  60. package/dist/{Images-NpK2jr8S.js → Images-Dw6RjBRF.js} +1 -1
  61. package/dist/{InputArray-D_C7sc2K.js → InputArray-BM8mytP0.js} +1 -1
  62. package/dist/{InputCity-DjTVJMDf.js → InputCity-DmKLlwz1.js} +1 -1
  63. package/dist/{InputColor-Cxs2k3zC.js → InputColor-ieTmygEi.js} +1 -1
  64. package/dist/{InputDate-D0ayUi_W.js → InputDate-DClJE5ZQ.js} +1 -1
  65. package/dist/{InputDateRange-D5xZLZ87.js → InputDateRange-ey_IQBMw.js} +1 -1
  66. package/dist/{InputExcel-DJwiAPrG.js → InputExcel-CUuKCckv.js} +1 -1
  67. package/dist/{InputFile-CLgy5Kwa.js → InputFile-CmZchi4z.js} +1 -1
  68. package/dist/{InputFormula-CiNEZ27E.js → InputFormula-kEcGojYn.js} +1 -1
  69. package/dist/{InputGroup-BeE8skgC.js → InputGroup-Cl5NFohz.js} +1 -1
  70. package/dist/InputImage-DVnobwUC.js +1 -0
  71. package/dist/{InputMonthRange-IwvyjfHM.js → InputMonthRange-DRsF3bwK.js} +1 -1
  72. package/dist/{InputNumber-CwgWdQv0.js → InputNumber-12oPLkKS.js} +1 -1
  73. package/dist/{InputQuarterRange-KVLnwl5Z.js → InputQuarterRange-CGI7hpgD.js} +1 -1
  74. package/dist/{InputRange-DuQrlfhv.js → InputRange-khQWegkI.js} +1 -1
  75. package/dist/{InputRating-dpD8uqWr.js → InputRating-CrC43lys.js} +1 -1
  76. package/dist/{InputRepeat-40A83-CG.js → InputRepeat-CfrcyVVp.js} +1 -1
  77. package/dist/InputRichText-B2iCFHNT.js +1 -0
  78. package/dist/{InputSignature-BixhxEHC.js → InputSignature-Dblmb8fX.js} +1 -1
  79. package/dist/{InputSubForm-DY7gjGCI.js → InputSubForm--4RoaGbH.js} +1 -1
  80. package/dist/{InputTable-KQY600uO.js → InputTable-D-tev-dW.js} +1 -1
  81. package/dist/{InputTag-COBAcy-D.js → InputTag-DEsaQpfD.js} +1 -1
  82. package/dist/{InputText-DMKOqEA5.js → InputText-BRZS9DVw.js} +1 -1
  83. package/dist/{InputTree-C5ku3s07.js → InputTree-DwmE5ZVX.js} +1 -1
  84. package/dist/{InputVerificationCode-BG75Q7R0.js → InputVerificationCode-BVS_27Ln.js} +1 -1
  85. package/dist/{InputYearRange-BOCyFqVY.js → InputYearRange-B2O3_F1X.js} +1 -1
  86. package/dist/{JSONSchema-DPtkw1sK.js → JSONSchema-DqDhWtIJ.js} +1 -1
  87. package/dist/{JSONSchemaEditor--MtYcADt.js → JSONSchemaEditor-C9T3PzZJ.js} +1 -1
  88. package/dist/{Json-DzE3RuEL.js → Json-Ce0DNfyT.js} +1 -1
  89. package/dist/{Link-CYr-HaE7.js → Link-C3aOVbZG.js} +1 -1
  90. package/dist/List-B0DvFWZA.js +1 -0
  91. package/dist/{ListSelect-Bqcz5Vsf.js → ListSelect-Bs6wj_-J.js} +1 -1
  92. package/dist/{LocationPicker-DmgXW4e_.js → LocationPicker-B2cA5WeW.js} +1 -1
  93. package/dist/{Log-htr4zYhI.js → Log-FYJPSSrf.js} +1 -1
  94. package/dist/{Mapping-Dp7GXGk0.js → Mapping-BHBXty4A.js} +1 -1
  95. package/dist/{Markdown-CRTswpVP.js → Markdown-C7RRd4iB.js} +1 -1
  96. package/dist/{Markdown-DQXPWcZy.js → Markdown-pNRSLVqI.js} +1 -1
  97. package/dist/{MatrixCheckboxes-CrC-0KV5.js → MatrixCheckboxes-CtcnDPnK.js} +1 -1
  98. package/dist/{MultilineText-pqUIIh-i.js → MultilineText-Cn_RvX_X.js} +1 -1
  99. package/dist/{Nav-C7Q5NTyJ.js → Nav-5cFyq-Sc.js} +1 -1
  100. package/dist/{NestedSelect-cGzGDu2x.js → NestedSelect-jtpny6lv.js} +1 -1
  101. package/dist/{Number-HvZgu-Ps.js → Number-DFfcvMo-.js} +1 -1
  102. package/dist/{OfficeViewer-BwHQtXDM.js → OfficeViewer-BfUW6wzL.js} +1 -1
  103. package/dist/{Operation-BlB9BgWJ.js → Operation-B0qHBEGz.js} +1 -1
  104. package/dist/{Page-DFGe-1EJ.js → Page-wkG_9v7N.js} +1 -1
  105. package/dist/{Pagination-BPnTFeYa.js → Pagination-BML_Z29r.js} +1 -1
  106. package/dist/{PaginationWrapper-Cc_ArWYp.js → PaginationWrapper-CsSgFHB2.js} +1 -1
  107. package/dist/{Panel-YID5Pd0p.js → Panel-BEYSCFb0.js} +1 -1
  108. package/dist/{Password-CQvFKTlR.js → Password-ofzGhp3p.js} +1 -1
  109. package/dist/{Picker-Bd08LYGS.js → Picker-r4DoCAVP.js} +1 -1
  110. package/dist/{Plain-BXvSUnJt.js → Plain-DIFjFdFl.js} +1 -1
  111. package/dist/{PopUp-DTLG0S4M.js → PopUp-COPmnePV.js} +1 -1
  112. package/dist/{Portlet-tFR4gBDB.js → Portlet-CxahIPp7.js} +1 -1
  113. package/dist/{Progress-BsjTAFle.js → Progress-CzaZlXpm.js} +1 -1
  114. package/dist/{Property-DczjnSg8.js → Property-CUyXCXOn.js} +1 -1
  115. package/dist/{QRCode-B3Jistsv.js → QRCode-DfpZebSC.js} +1 -1
  116. package/dist/{Radio-D9rpSDB1.js → Radio-BAbBp9SW.js} +1 -1
  117. package/dist/{Radios-BAkviIMB.js → Radios-CXuxJrci.js} +1 -1
  118. package/dist/{Remark-2nq87f0j.js → Remark-ja0r3wT8.js} +1 -1
  119. package/dist/{RichText-D9hUcBuE.js → RichText-BDj_oSTQ.js} +1 -1
  120. package/dist/{SearchBox-BlOWBFmf.js → SearchBox-bMIN06lN.js} +1 -1
  121. package/dist/{Select-CNRCEqfS.js → Select-Dk0Q_TsK.js} +1 -1
  122. package/dist/{Service-B3evLOnD.js → Service-BJ8d1o0H.js} +1 -1
  123. package/dist/{Shape-oNfw1JQb.js → Shape-DkrB4gFu.js} +1 -1
  124. package/dist/{Slider-BkAJVHJv.js → Slider-DLqHOqM9.js} +1 -1
  125. package/dist/{SparkLine-BHo-1vXu.js → SparkLine-Cffa7llr.js} +1 -1
  126. package/dist/{Spinner-C6lWc4OM.js → Spinner-WSMpYbNE.js} +1 -1
  127. package/dist/{StaticHoc-BGJCCg4f.js → StaticHoc-DlQH6vI9.js} +1 -1
  128. package/dist/{Status-DplNkt0Z.js → Status-BmsTJAq3.js} +1 -1
  129. package/dist/{Steps-DfFUvz_A.js → Steps-q0yTv3Pd.js} +1 -1
  130. package/dist/{Switch-BVSzVpRN.js → Switch-DHZIMer8.js} +1 -1
  131. package/dist/{SwitchContainer-CFA12Afc.js → SwitchContainer-F88HOPkR.js} +1 -1
  132. package/dist/{Table-efibISgA.js → Table-BNyuGw_o.js} +1 -1
  133. package/dist/{Table2-C-el0Wqe.js → Table2-Bg42KkGP.js} +1 -1
  134. package/dist/{TableView-CTG5hc3H.js → TableView-CZBY7L3L.js} +1 -1
  135. package/dist/{Tabs-D_H_s_Lo.js → Tabs-DhwrMAk5.js} +1 -1
  136. package/dist/{TabsTransfer-CtbMgGeJ.js → TabsTransfer-BJf4Hvvx.js} +1 -1
  137. package/dist/{TabsTransferPicker-L3HKNnXE.js → TabsTransferPicker-Q-MyTe1j.js} +1 -1
  138. package/dist/{Tag-VPoGNvKr.js → Tag-NFonQSEh.js} +1 -1
  139. package/dist/{Tasks-DfnQ6J5i.js → Tasks-DKbiwma8.js} +1 -1
  140. package/dist/{Textarea-Dxd2ut9C.js → Textarea-D8LZxjAF.js} +1 -1
  141. package/dist/{Timeline-PSktc7Gj.js → Timeline-BWCeXNwW.js} +1 -1
  142. package/dist/{TooltipWrapper-BMLQMhlo.js → TooltipWrapper-CeftJOeF.js} +1 -1
  143. package/dist/{Tpl-D-0fwqIo.js → Tpl-DhQfxvVG.js} +1 -1
  144. package/dist/{Transfer-U4V9M4hb.js → Transfer-BlN0Xkyp.js} +1 -1
  145. package/dist/{TransferPicker-4u_PHlo2.js → TransferPicker-CWBn7A9e.js} +1 -1
  146. package/dist/{TreeSelect-xFIc1kbp.js → TreeSelect-BNT6Juqj.js} +1 -1
  147. package/dist/{UUID-z-38LjnX.js → UUID-LOMmDPbG.js} +1 -1
  148. package/dist/{UserSelect-kZxushLL.js → UserSelect-Bj3qwZOx.js} +1 -1
  149. package/dist/{VBox-Wx0Hae1x.js → VBox-CO4uhaIu.js} +1 -1
  150. package/dist/{Video-DpUxYlrI.js → Video-Bg6Yw-M5.js} +1 -1
  151. package/dist/{WebComponent-qVXehLOT.js → WebComponent-Dz9rLydw.js} +1 -1
  152. package/dist/{Wizard-CgWXlbIW.js → Wizard-Bf40EE0f.js} +1 -1
  153. package/dist/{Words-BcH_hUuO.js → Words-0Dy7botA.js} +1 -1
  154. package/dist/{Wrapper-goADT8nB.js → Wrapper-CMoRa1D9.js} +1 -1
  155. package/dist/beneficiary-form-DEQbj_Ph.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-ghaRvxaL.js} +1 -1
  159. package/dist/es-B3cNxma7.js +1 -0
  160. package/dist/{esm-DdEfrmRq.js → esm-Bwz-vxIU.js} +1 -1
  161. package/dist/{esm-D3qvBzlk.js → esm-WMdHSo6z.js} +2 -2
  162. package/dist/esm-lQQ8f-8c.js +1 -0
  163. package/dist/{function-CrEuBBd9.js → function-DgD667sG.js} +1 -1
  164. package/dist/index.css +1 -1
  165. package/dist/index.js +1 -1
  166. package/dist/{isEqual-DiNKNUz9.js → isEqual-BS2RhB6Q.js} +1 -1
  167. package/dist/{main-C5HXsudB.js → main-BtAz1nDN.js} +1 -1
  168. package/dist/mi18n-react.esm-DB-6dM6A.js +1 -0
  169. package/dist/{objectSpread2-CaisYh-T.js → objectSpread2-GwfkYN9X.js} +1 -1
  170. package/dist/{omitBy-CXOTk7kv.js → omitBy-ZPSwrvva.js} +1 -1
  171. package/dist/papaparse.min-DVFqGzF3.js +1 -0
  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/rolldown-runtime-DXzHzmmG.js +1 -0
  176. package/dist/xor-D-wxOg18.js +1 -0
  177. package/package.json +6 -6
  178. package/dist/ButtonGroup-DhxYojgw.js +0 -1
  179. package/dist/Card-BIz3TQnU.js +0 -1
  180. package/dist/Checkbox-Dmf4DD3L.js +0 -1
  181. package/dist/FieldSet-xMpwZk45.js +0 -1
  182. package/dist/HBox-mmIRGeNY.js +0 -1
  183. package/dist/InputImage-IH9vczM1.js +0 -1
  184. package/dist/InputRichText-CPs8s7sR.js +0 -1
  185. package/dist/List-CsbZFLho.js +0 -1
  186. package/dist/beneficiary-form-BjZ_GGCu.js +0 -10
  187. package/dist/crypto-js-DfHtkI6b.js +0 -1
  188. package/dist/es-CEgI316R.js +0 -1
  189. package/dist/esm-CMljH72G.js +0 -1
  190. package/dist/mi18n-react.esm-CNXlHzVT.js +0 -1
  191. package/dist/papaparse.min-PX0bGR45.js +0 -1
  192. package/dist/react-dom-D_0O8_TK.js +0 -1
  193. package/dist/rolldown-runtime-Cmsah3SL.js +0 -1
  194. package/dist/xor-6sD3W2X_.js +0 -1
@@ -1 +0,0 @@
1
- import{o as e}from"./rolldown-runtime-Cmsah3SL.js";import{t as n}from"./react-COOgDf_T.js";var t=/* @__PURE__ */e(n());function a(e){return Boolean(e&&"function"==typeof e.then)}function i(e,n){return a(e)?Promise.resolve(e).then(n):n(e)}function o(e){const n=(Array.isArray(e)?e:[e]).map(e=>`'${e}'`),t=n.slice(-2).join(" or ");return`Mi18n: You need to specify ${[...n.slice(0,-2),t].join(", ")} option`}function r(e){return"string"==typeof e?[e]:Array.isArray(e)?e:void 0}function s(e){return r(e)||[]}function c(e,n){return"object"!=typeof(t=n)||Array.isArray(t)||null===t?s(n):s(null==n?void 0:n[e]);var t}function g(e){return Array.from(new Set(e))}function u(e){return e?e.replace(/\/+$/,""):e}var l=(e,n)=>fetch(e,n),d=(e=l)=>(n,t)=>e(n,Object.assign(Object.assign({},t),{headers:Object.assign({"X-Mi18n-SDK-Type":"JS","X-Mi18n-SDK-Version":"5.16.2"},null==t?void 0:t.headers)}));function p(e){let n=[];return Object.freeze({listen(e){const t=n=>{e(n)};return n.push(t),{unsubscribe(){n=n.filter(e=>t!==e)}}},emit(t){e()&&n.forEach(e=>e({value:t}))}})}function f(e,n,t){const a=/* @__PURE__ */new Set,i=/* @__PURE__ */new Set;let o=[];function r(){if(0===o.length)return;const e=o;o=[],a.forEach(e=>{e({value:void 0})});let t=/* @__PURE__ */new Set;e.forEach(e=>{void 0===e?t=void 0:void 0!==t&&e.forEach(e=>t.add(e))}),function(e){const t=new Set(n());i.forEach(n=>{void 0!==e&&-1===(null==e?void 0:e.findIndex(e=>t.has(e)||n.namespaces.has(e)))||n.fn({value:void 0})})}(t?Array.from(t.keys()):void 0)}return Object.freeze({emit(n,t){e()&&(o.push(n),t?setTimeout(r,0):r())},listen:e=>(a.add(e),{unsubscribe:()=>{a.delete(e)}}),listenSome(e){const n={fn:n=>{e(n)},namespaces:/* @__PURE__ */new Set};i.add(n);const a={unsubscribe:()=>{i.delete(n)},subscribeNs:e=>(s(e).forEach(e=>n.namespaces.add(e)),void 0===e&&n.namespaces.add(t()),a)};return a}})}var v=e=>{const n=/* @__PURE__ */new Map;return Object.entries(e).forEach(([e,t])=>{null!=t&&("object"!=typeof t?n.set(e,t):v(t).forEach((t,a)=>{n.set(e+"."+a,t)}))}),n},m=e=>{const[n,...t]=e.split(":");return{language:n,namespace:t.join(":")||""}},h=({language:e,namespace:n})=>n?`${e}:${n}`:e;function b(e,n){var t={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&n.indexOf(a)<0&&(t[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(a=Object.getOwnPropertySymbols(e);i<a.length;i++)n.indexOf(a[i])<0&&Object.prototype.propertyIsEnumerable.call(e,a[i])&&(t[a[i]]=e[a[i]])}return t}var y="invalid",L={defaultNs:"",observerOptions:{tagAttributes:{textarea:["placeholder"],input:["value","placeholder"],img:["alt"],"*":["aria-label","title"]},restrictedElements:["script","style"],highlightKeys:["Alt"],highlightColor:"rgb(255, 0, 0)",highlightWidth:5,inputPrefix:"%-%mi18n:",inputSuffix:"%-%",passToParent:["option","optgroup"],fullKeyEncode:!1},observerType:"invisible",onFormatError:y,apiUrl:"https://admin.midasbuy.com/i18n/api",fetch:d()},O=(...e)=>{let n={};return e.forEach(e=>{n=Object.assign(Object.assign(Object.assign({},n),e),{observerOptions:Object.assign(Object.assign({},n.observerOptions),null==e?void 0:e.observerOptions)})}),n};function j(e,n){const t=O(L,null==n?void 0:n.initialOptions,e);return t.apiUrl=u(t.apiUrl),(null==e?void 0:e.fetch)&&(t.fetch=d(e.fetch)),{initialOptions:t,activeNamespaces:(null==n?void 0:n.activeNamespaces)||/* @__PURE__ */new Map,language:null==n?void 0:n.language,pendingLanguage:null==n?void 0:n.language,isInitialLoading:!1,isRunning:!1}}var w=(e,n,t)=>{let a=e;return Object.freeze({init(e){a=e},notify(){const e=n();a!==e&&t(e),a=e}})},k=(e,...n)=>{let t,a={};return"object"==typeof e?a=e:(a.key=e,"string"==typeof n[0]?(a.defaultValue=n[0],t=n[1]):"object"==typeof n[0]&&(t=n[0])),t&&(a=Object.assign(Object.assign({},function(e){var{ns:n,noWrap:t,orEmpty:a,params:i,language:o}=e,r=b(e,["ns","noWrap","orEmpty","params","language"]);return Object.assign(Object.assign({},{ns:n,noWrap:t,orEmpty:a,language:o}),{params:Object.assign({},r)})}(t)),a)),a},E=class extends Error{constructor(e,n,t){let a;a=0===e?"Empty parameter":1===e?"Unexpected character":"Unexpected end",super(`Mi18n parser: ${a} at ${n} in "${t}"`),this.code=e,this.index=n}};function R(e){return/\s/.test(e)}var N=new Set([2,1,0]),S=new Set(["{","}","'"]),I=()=>(e,n)=>(n.setFinalFormatter({format:({translation:e,params:n})=>function(e,n){const[t,a]=function(e){let n=0,t="",a="",i="";const o=[],r=[];let s=0;function c(n){throw new E(n,s,e)}const g=()=>{o.push(t),t=""},u=()=>{/[0-9a-zA-Z_]/.test(i)||c(1),a+=i},l=()=>{""===a&&c(0),r.push(a),a=""};for(s=0;s<e.length;s++)switch(i=e[s],n){case 0:"'"===i?(t+=i,n=1):"{"===i?(g(),n=3):(t+=i,n=0);break;case 1:S.has(i)?(t=t.slice(0,-1)+i,n=2):(t+=i,n=0);break;case 2:"'"===i?n=0:(t+=i,n=2);break;case 3:"}"===i?(l(),n=0):R(i)?""!==a&&(l(),n=4):(u(),n=3);break;case 4:"}"==i?n=0:R(i)?n=4:c(1)}return N.has(n)||c(2),g(),[o,r]}(e),i=[t[0]];for(let o=1;o<t.length;o++){const r=null==n?void 0:n[a[o-1]];if(void 0===r)throw new Error(`Missing parameter "${a[o-1]}" in "${e}"`);i.push(String(r)),i.push(t[o])}return i.join("")}(e,n)}),e);function D(e){if(void 0===(null===(t=null===(n=globalThis.window)||void 0===n?void 0:n.document)||void 0===t?void 0:t.createElement))throw new Error(`${e}: Can't run on the server`);var n,t}String(Number.MAX_SAFE_INTEGER),RegExp(`([${["‌","‍"].join("")}]{9})+`,"gu");var C=e=>(n,t)=>(t.setDevBackend(function(e){const n=(null==e?void 0:e.host)||"pagedoo.midasbuy.com",t=(null==e?void 0:e.pathTemplate)||"/i18n/project-export/{env}/{projectId}/{language}.json",a=(null==e?void 0:e.env)||"release";return{getRecord:({language:e,fetch:i,projectId:o,apiKey:r})=>i(`https://${n}${t.replace("{projectId}",`${o}`).replace("{language}",e).replace("{env}",a)}`,{headers:{"X-API-Key":r||"","Content-Type":"application/json"}}).then(e=>{if(e.ok)return e.json();throw new Error(e.statusText)})}}(e)),n),P=null,A="__mi18n_apiKey",F="__mi18n_apiUrl";function T(){const e=sessionStorage.getItem(A)||void 0,n=sessionStorage.getItem(F)||void 0;if(e&&n)return{apiKey:e,apiUrl:n}}function U(){sessionStorage.removeItem(A),sessionStorage.removeItem(F)}var x=()=>e=>e;(()=>{if("undefined"==typeof window)return!1;try{return"undefined"!=typeof sessionStorage&&sessionStorage}catch(e){return console.error("sessionStorage not available",e),!1}})()&&(x=()=>e=>{const n=function(){let e;return{update:async function(n){null==e||e();const{cancel:t,promise:a}=function({message:e,recievingMessage:n,data:t,attempts:a=1,timeout:i=300}){let o=!1;const r=()=>new Promise((a,o)=>{const r=function(e){const n=n=>{var t,i;e.includes(null===(t=n.data)||void 0===t?void 0:t.type)&&function(e){clearTimeout(s),c(),a(e)}(null===(i=n.data)||void 0===i?void 0:i.data)};return window.addEventListener("message",n,!1),{unsubscribe(){window.removeEventListener("message",n)}}}(n);window.postMessage({type:e,data:t},window.origin);const s=setTimeout(function(){c(),o()},i);function c(){r.unsubscribe()}});return{cancel(){o=!0},promise:(async()=>{for(let n=0;n<a;n++){if(o)return new Promise(()=>{});try{return await r()}catch(e){continue}}if(!o)throw`Didn't recieve ${n.join(" or ")} in time.`;return new Promise(()=>{})})()}}({message:"MI18N_READY",recievingMessage:["MI18N_PLUGIN_READY","MI18N_PLUGIN_UPDATED"],data:n,attempts:4});return e=t,a}}}();return e.on("running",({value:t})=>{var a;t&&(a=()=>{n.update({uiPresent:!0,uiVersion:void 0,mode:e.isDev()?"development":"production",config:{apiUrl:e.getInitialOptions().apiUrl||"",apiKey:e.getInitialOptions().apiKey||""}}).catch(U)},"loading"!==document.readyState?Promise.resolve().then(()=>{a()}):document.addEventListener&&document.addEventListener("DOMContentLoaded",a))}),T()&&(async()=>{const e=await(P||(P=new Promise((e,n)=>{const t=document.createElement("script");t.src="https://cdn.jsdelivr.net/npm/@mi18n/web/dist/mi18n-in-context-tools.umd.min.js",t.addEventListener("load",()=>e()),t.addEventListener("error",e=>n(e.error)),document.body.appendChild(t)}).then(()=>window["@mi18n/in-context-tools"].InContextTools)),P);return n=>{const t=T();return n.addPlugin(e({credentials:t})),n}})().then(n=>{e.addPlugin(n)}).catch(e=>{console.error("Mi18n: Failed to load in-context tools"),console.error(e)}),e});var B="__mi18n_currentLanguage",M=()=>localStorage.getItem(B),K=()=>(e,n)=>(n.setLanguageStorage({getLanguage:()=>(D("LanguageStorage"),localStorage.getItem(B)||void 0),setLanguage(e){D("LanguageStorage"),localStorage.setItem(B,e)}}),e),$=()=>(e,n)=>(n.setLanguageDetector({getLanguage({availableLanguages:e}){D("LanguageDetector");const n=window.navigator.language,t=e.find(e=>e===n);if(t)return t;const a=e=>e.replace(/^(.+?)(-.*)?$/,"$1"),i=a(window.navigator.language);return e.find(e=>a(e)===i)||void 0}}),e);function _(){return(()=>{const e={plugins:[],options:{}},n=Object.freeze({use:t=>(e.plugins.push(t),n),updateDefaults:t=>(e.options=O(e.options,t),n),init(n){const t=function(e){const n=function({options:e}){const n=function(e,n){let t=!0;function a(){return t}const i=Object.freeze({onPendingLanguageChange:p(a),onLanguageChange:p(a),onLoadingChange:p(a),onFetchingChange:p(a),onInitialLoaded:p(a),onRunningChange:p(a),onCacheChange:p(a),onUpdate:f(a,e,n),onPermanentChange:p(a),setEmitterActive(e){t=e},on:(e,n)=>{switch(e){case"pendingLanguage":return i.onPendingLanguageChange.listen(n);case"language":return i.onLanguageChange.listen(n);case"loading":return i.onLoadingChange.listen(n);case"fetching":return i.onFetchingChange.listen(n);case"initialLoad":return i.onInitialLoaded.listen(n);case"running":return i.onRunningChange.listen(n);case"cache":return i.onCacheChange.listen(n);case"update":return i.onUpdate.listen(n);case"permanentChange":return i.onPermanentChange.listen(n)}}});return i.onInitialLoaded.listen(()=>i.onUpdate.emit()),i.onLanguageChange.listen(()=>i.onUpdate.emit()),i.onCacheChange.listen(({value:e})=>i.onUpdate.emit([e.namespace],!0)),i}(E,R),t=w(!1,()=>L.isFetching(),n.onFetchingChange.emit),r=w(!1,()=>F.isLoading(),n.onLoadingChange.emit),l=function(e,n,t){let a,i=j();const o=Object.freeze({init(e){i=j(e,i)},isRunning:()=>i.isRunning,setRunning(e){i.isRunning!==e&&(i.isRunning=e,t.emit(e))},isInitialLoading:()=>i.isInitialLoading,setInitialLoading(e){i.isInitialLoading=e},getLanguage:()=>i.language||i.initialOptions.language,setLanguage(n){i.language!==n&&(i.language=n,e.emit(n))},getPendingLanguage:()=>i.pendingLanguage||o.getLanguage(),setPendingLanguage(e){i.pendingLanguage!==e&&(i.pendingLanguage=e,n.emit(e))},getInitialOptions:()=>Object.assign(Object.assign({},i.initialOptions),a),addActiveNs(e){s(e).forEach(e=>{const n=i.activeNamespaces.get(e);void 0!==n?i.activeNamespaces.set(e,n+1):i.activeNamespaces.set(e,1)})},removeActiveNs(e){s(e).forEach(e=>{const n=i.activeNamespaces.get(e);void 0!==n&&n>1?i.activeNamespaces.set(e,n-1):i.activeNamespaces.delete(e)})},getRequiredNamespaces:()=>g([...i.initialOptions.ns||[i.initialOptions.defaultNs],...s(i.initialOptions.fallbackNs),...i.activeNamespaces.keys()]),getFallbackLangs(e){const n=e||o.getLanguage();return n?g([n,...c(n,i.initialOptions.fallbackLanguage)]):[]},getFallbackNs:()=>s(i.initialOptions.fallbackNs),getDefaultNs:e=>void 0===e?i.initialOptions.defaultNs:e,getAvailableLanguages(){if(i.initialOptions.availableLanguages)return i.initialOptions.availableLanguages;if(i.initialOptions.staticData){const e=Object.keys(i.initialOptions.staticData).map(e=>m(e).language);return Array.from(new Set(e))}},withDefaultNs:e=>({namespace:void 0===e.namespace?o.getInitialOptions().defaultNs:e.namespace,language:e.language}),overrideCredentials(e){a=e?Object.assign(Object.assign({},e),{apiUrl:u(e.apiUrl)}):void 0}});return o}(n.onLanguageChange,n.onPendingLanguageChange,n.onRunningChange),d=function(e,n,t,o,r,s,c,g){const u={ui:void 0},l={formatters:[],finalFormatter:void 0,observer:void 0,devBackend:void 0,backends:[],ui:void 0,languageDetector:void 0,languageStorage:void 0},d=async({keysAndDefaults:e,event:n})=>{var t;const a=e.map(({key:e,ns:n,defaultValue:t})=>{const{translation:a}=s({key:e,ns:n});return{key:e,defaultValue:t,fallbackNamespaces:o(n),namespace:r({key:e,ns:n})[0],translation:a}});null===(t=l.ui)||void 0===t||t.handleElementClick(a,n)},p=(e,n)=>{var t;return(null===(t=l.observer)||void 0===t?void 0:t.findPositions(e,n))||[]};function f(e){const{translation:n}=s({key:e.key,ns:e.ns});return S.formatTranslation(Object.assign(Object.assign({},e),{translation:n,formatEnabled:!0}))}function v(){return{fetch:n().fetch}}function m(e){l.observer=null==e?void 0:e()}function h(){return Boolean(l.observer)}function L(e){e&&l.formatters.push(e)}function O(e){l.finalFormatter=e}function j(e){u.ui=e}function w(){return Boolean(u.ui)}function k(e){l.languageStorage=e}function E(e){l.languageDetector=e}function R(e){e&&l.backends.push(e)}function N(e){l.devBackend=e}const S=Object.freeze({addPlugin:function(e,n){n(e,Object.freeze({setFinalFormatter:O,addFormatter:L,setObserver:m,hasObserver:h,setUi:j,hasUi:w,setDevBackend:N,addBackend:R,setLanguageDetector:E,setLanguageStorage:k}))},run(){var e,t;const{apiKey:a,apiUrl:i,projectId:o,observerOptions:r}=n();l.ui=null===(e=u.ui)||void 0===e?void 0:e.call(u,{apiKey:a,apiUrl:i,projectId:o,highlight:S.highlight,changeTranslation:c,findPositions:p,onPermanentChange:g}),null===(t=l.observer)||void 0===t||t.run({mouseHighlight:!0,options:r,translate:f,onClick:d})},stop(){var e;l.ui=void 0,null===(e=l.observer)||void 0===e||e.stop()},getLanguageStorage:()=>l.languageStorage,getInitialLanguage(){var e;const n=t();return i(null===(e=l.languageStorage)||void 0===e?void 0:e.getLanguage(v()),e=>n&&!n.includes(e)||!e?function(){if(!l.languageDetector)return;const e=t();return l.languageDetector.getLanguage(Object.assign({availableLanguages:e},v()))}():e)},setStoredLanguage(e){var n;null===(n=l.languageStorage)||void 0===n||n.setLanguage(e,v())},getDevBackend:()=>l.devBackend,getBackendRecord:({language:e,namespace:n})=>{for(const t of l.backends){const i=t.getRecord(Object.assign({language:e,namespace:n},v()));if(a(i))return null==i?void 0:i.catch(e=>(console.error(e),{}));if(void 0!==i)return i}},getBackendDevRecord:({language:e,namespace:t})=>{var a;const{apiKey:i,apiUrl:o,projectId:r}=n();return null===(a=l.devBackend)||void 0===a?void 0:a.getRecord(Object.assign({apiKey:i,apiUrl:o,projectId:r,language:e,namespace:t},v()))},getLanguageDetector:()=>l.languageDetector,retranslate(){var e;null===(e=l.observer)||void 0===e||e.retranslate()},highlight:(e,n)=>{var t,a;return(null===(a=null===(t=l.observer)||void 0===t?void 0:t.highlight)||void 0===a?void 0:a.call(t,e,n))||{unhighlight(){}}},unwrap(e){var n;return l.observer?null===(n=l.observer)||void 0===n?void 0:n.unwrap(e):{text:e,keys:[]}},wrap(e){var n;return l.observer?null===(n=l.observer)||void 0===n?void 0:n.wrap(e):e.translation},hasDevBackend:()=>Boolean(S.getDevBackend()),formatTranslation(t){var a,{formatEnabled:i}=t,o=b(t,["formatEnabled"]);const{key:r,translation:s,defaultValue:c,noWrap:g,params:u,orEmpty:d,ns:p}=o,f=s||c||(d?"":r);let v=f||(d?"":r);const m=e(),h=i||!(null===(a=l.observer)||void 0===a?void 0:a.outputNotFormattable),L=e=>l.observer&&!g?l.observer.wrap({key:r,translation:e,defaultValue:c,params:u,ns:p}):e;v=L(v);try{if(f&&m&&h)for(const e of l.formatters)v=e.format({translation:v,language:m,params:u});l.finalFormatter&&f&&m&&h&&(v=l.finalFormatter.format({translation:v,language:m,params:u}))}catch(j){console.error(j);const e=("string"==typeof(O=j)?O:"string"==typeof(null==O?void 0:O.message)?O.message:void 0)||y,t=n().onFormatError,a=typeof t;v="string"===a?t:"function"===a?t(e,o):y,v=L(v)}var O;return v}});return S}(l.getLanguage,l.getInitialOptions,l.getAvailableLanguages,N,P,A,I,function(e){n.onPermanentChange.emit({key:e.key,namespace:e.namespace})}),L=function(e,n,t,a,i,o,r){const c=/* @__PURE__ */new Map,u=/* @__PURE__ */new Map;let l={},d=0;function p(n,t,a){const i=h(n);u.set(i,{data:v(t),version:a}),e.emit(n)}function f(e){let t;if(!t){const n=l[h(e)];"function"==typeof n&&(t=n())}return t||(t=n(e)),t}const b=Object.freeze({addStaticData(e){e&&(l=Object.assign(Object.assign({},l),e),Object.entries(e).forEach(([e,n])=>{if("function"!=typeof n){const t=m(e),a=u.get(e);a&&0!==a.version||(p(t,n,0),b.addNamespaceRecord(t,n,0))}}))},invalidate(){c.clear(),d+=1},addNamespaceRecord(e,n,t){!e.namespace&&Object.values(n).some(e=>"object"==typeof e&&e)&&Object.entries(n).forEach(([n,a])=>{"object"==typeof a&&a&&p(Object.assign(Object.assign({},e),{namespace:n}),a,t)})},addRecord(e,n){p(e,n,d),b.addNamespaceRecord(e,n,d)},exists(e,n=!1){const t=u.get(h(e));return t&&n?t.version===d:Boolean(t)},getRecord(e){var n;return null===(n=u.get(h(a(e))))||void 0===n?void 0:n.data},getTranslation(e,n){var t;return null===(t=u.get(h(e)))||void 0===t?void 0:t.data.get(n)},getTranslationNs(e,n,t){var a;for(const i of e)for(const e of n)if(null!=(null===(a=u.get(h({language:e,namespace:i})))||void 0===a?void 0:a.data.get(t)))return[i];return g(e)},getTranslationFallback(e,n,t){var a;for(const i of e)for(const e of n){const n=null===(a=u.get(h({language:e,namespace:i})))||void 0===a?void 0:a.data.get(t);if(null!=n)return{translation:n,namespace:i}}return{translation:void 0,namespace:e[0]}},changeTranslation(n,t,a){var i;const o=null===(i=u.get(h(n)))||void 0===i?void 0:i.data;null==o||o.set(t,a),e.emit(Object.assign(Object.assign({},n),{key:t}))},isFetching(e){if(i())return!0;if(void 0===e)return c.size>0;const n=s(e);return Boolean(Array.from(c.keys()).find(e=>n.includes(m(e).namespace)))},isLoading(e,n){const t=s(n);return Boolean(i()||Array.from(c.keys()).find(n=>{const a=m(n);return(!t.length||t.includes(a.namespace))&&!b.exists({namespace:a.namespace,language:e})}))},async loadRecords(e,n){const i=e.map(e=>{const i=a(e),o=h(i),r=c.get(o);if(r)return{new:!1,promise:r,keyObject:i,cacheKey:o};const s=function(e,n){var a;let i;return n&&(i=null===(a=t(e))||void 0===a?void 0:a.catch(()=>(console.warn("Mi18n: Failed to fetch data from dev backend"),f(e)))),i||(i=f(e)),i}(i,n)||Promise.resolve(void 0);return c.set(o,s),{new:!0,promise:s,keyObject:i,cacheKey:o}});o.notify(),r.notify();const s=await Promise.all(i.map(e=>e.promise));return i.forEach((e,n)=>{const t=c.get(e.cacheKey)!==e.promise;if(e.new&&!t){c.delete(e.cacheKey);const t=s[n];t?b.addRecord(e.keyObject,t):b.getRecord(e.keyObject)||b.addRecord(e.keyObject,{})}}),o.notify(),r.notify(),i.map(e=>b.getRecord(e.keyObject))},getAllRecords:()=>Array.from(u.entries()).map(([e,n])=>Object.assign(Object.assign({},m(e)),{data:n.data}))});return b}(n.onCacheChange,d.getBackendRecord,d.getBackendDevRecord,l.withDefaultNs,l.isInitialLoading,t,r);let O;function E(){return l.getFallbackNs()}function R(e){return l.getDefaultNs(e)}function N(e){return[...s(R(e)),...E()]}function S(e){return[...s(null!=e?e:R()),...l.getRequiredNamespaces()]}function I(e,n,t){const a=l.withDefaultNs(e),i=L.getTranslation(a,n);return L.changeTranslation(a,n,t),{revert(){L.changeTranslation(a,n,i)}}}function D(e){l.init(e),L.addStaticData(l.getInitialOptions().staticData)}function C(e,n){const t=function(e,n){const t=l.getFallbackLangs(e),a=S(n),i=[];return t.forEach(e=>{a.forEach(n=>{L.exists({language:e,namespace:n},!0)||i.push({language:e,namespace:n})})}),i}(e,n);if(t.length)return i(F.loadRecords(t),()=>{})}function P({key:e,ns:n}){const t=l.getFallbackLangs(),a=N(null!=n?n:void 0);return L.getTranslationNs(a,t,e)}function A({key:e,ns:n,language:t}){const a=N(null!=n?n:void 0),i=l.getFallbackLangs(t);return L.getTranslationFallback(a,i,e)}e&&D(e),n.onUpdate.listen(()=>{l.isRunning()&&d.retranslate()});const F=Object.freeze(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},n),l),d),L),{init:D,getTranslation:A,changeTranslation:I,getTranslationNs:P,getDefaultAndFallbackNs:N,async changeLanguage(e){l.getPendingLanguage()===e&&l.getLanguage()===e||(l.setPendingLanguage(e),l.isRunning()&&await C(e),e===l.getPendingLanguage()&&(l.setLanguage(e),d.setStoredLanguage(e)))},async addActiveNs(e,n){n||l.addActiveNs(e),l.isRunning()&&await C(void 0,e)},loadRecords:e=>L.loadRecords(e,F.isDev()),loadRecord:async e=>(await F.loadRecords([e]))[0],isLoading:e=>L.isLoading(l.getLanguage(),e),isLoaded(e){const n=l.getLanguage();if(!n)return!1;const t=l.getFallbackLangs(n),a=S(e),i=[];return t.forEach(e=>{a.forEach(n=>{L.exists({language:e,namespace:n})||i.push({language:e,namespace:n})})}),0===i.length},t:(...e)=>{const n=k(...e),{translation:t,namespace:a}=A(n);return d.formatTranslation(Object.assign(Object.assign({},n),{translation:t,ns:a}))},isDev:()=>Boolean(l.getInitialOptions().apiKey&&l.getInitialOptions().apiUrl),run:()=>(function(){if((d.getLanguageDetector()||d.getLanguageStorage())&&!l.getAvailableLanguages())throw new Error(o("availableLanguages"));if(!l.getLanguage()&&!l.getInitialOptions().defaultLanguage)throw new Error(o(["defaultLanguage","language"]))}(),l.isRunning()||(l.setRunning(!0),d.run(),O=function(){const e=i(function(){if(!l.getLanguage())return i(d.getInitialLanguage(),e=>{const n=e||l.getInitialOptions().defaultLanguage;n&&l.setLanguage(n)})}(),()=>C());if(a(e))return l.setInitialLoading(!0),t.notify(),r.notify(),Promise.resolve(e).then(()=>{l.setInitialLoading(!1),t.notify(),r.notify(),n.onInitialLoaded.emit()});n.onInitialLoaded.emit()}()),Promise.resolve(O)),stop(){l.isRunning()&&(d.stop(),l.setRunning(!1))}}));return F}({options:e});function t(e){const t=n.isRunning();t&&n.stop(),e(),n.isDev()&&n.invalidate(),t&&n.run()}n.isDev()&&n.invalidate();const r=Object.freeze({on:n.on,onNsUpdate:n.onUpdate.listenSome,setEmitterActive:n.setEmitterActive,getLanguage:n.getLanguage,getPendingLanguage:n.getPendingLanguage,changeLanguage:n.changeLanguage,changeTranslation:n.changeTranslation,addActiveNs:n.addActiveNs,removeActiveNs:n.removeActiveNs,loadRecords:n.loadRecords,loadRecord:n.loadRecord,addStaticData:n.addStaticData,getRecord:n.getRecord,getAllRecords:n.getAllRecords,isLoaded:n.isLoaded,isInitialLoading:n.isInitialLoading,isLoading:n.isLoading,isFetching:n.isFetching,isRunning:n.isRunning,run:n.run,stop:n.stop,t:n.t,highlight:n.highlight,getInitialOptions:n.getInitialOptions,isDev:n.isDev,wrap:n.wrap,unwrap:n.unwrap,overrideCredentials(e){t(()=>n.overrideCredentials(e))},addPlugin(e){e&&t(()=>n.addPlugin(r,e))},updateOptions(e){e&&t(()=>n.init(e))}});return r}(O(e.options,n));return e.plugins.forEach(t.addPlugin),t}});return n})().use(x())}var z,V={useSuspense:!0},W=()=>(z||(z=t.createContext(void 0)),z),X=({mi18n:e,options:n,children:a,fallback:i})=>{const[o,r]=(0,t.useState)(!e.isLoaded());(0,t.useEffect)(()=>{e.run().catch(e=>{console.error(e)}).finally(()=>{r(!1)})},[e]);const s=Object.assign(Object.assign({},V),n),c=W();return s.useSuspense?t.createElement(c.Provider,{value:{mi18n:e,options:s}},o?i:t.createElement(t.Suspense,{fallback:i||null},a)):t.createElement(c.Provider,{value:{mi18n:e,options:s}},o?i:a)},G=()=>{const e=(0,t.useContext)(W())||void 0;if(!e)throw new Error("Couldn't find mi18n instance, did you forgot to use `Mi18nProvider`?");return e},Y=()=>{const[e,n]=(0,t.useState)(0);return{instance:e,rerender:(0,t.useCallback)(()=>{n(e=>e+1)},[n])}},q=(e,n)=>{const{t:a,isLoading:i}=((e,n)=>{const{mi18n:a,options:i}=G(),o=r(e),c=s(o).join(":"),g=Object.assign(Object.assign({},i),n),{rerender:u,instance:l}=Y(),d=(0,t.useRef)(),p=(0,t.useRef)([]);p.current=[];const f=a.isLoaded(o);(0,t.useEffect)(()=>{const e=a.onNsUpdate(u);return d.current=e,e.subscribeNs(o),p.current.forEach(n=>{e.subscribeNs(n)}),()=>{e.unsubscribe()}},[c,a]),(0,t.useEffect)(()=>(a.addActiveNs(o),()=>a.removeActiveNs(o)),[c,a]);const v=(0,t.useCallback)(e=>{var n;const t=null!==(n=e.ns)&&void 0!==n?n:null==o?void 0:o[0];return(e=>{var n;p.current.push(e),null===(n=d.current)||void 0===n||n.subscribeNs(e)})(t),a.t(Object.assign(Object.assign({},e),{ns:t}))},[a,l]);if(g.useSuspense&&!f)throw a.addActiveNs(o,!0);return{t:v,isLoading:!f}})(e,n);return{t:(0,t.useCallback)((...e)=>a(k(...e)),[a]),isLoading:i}},H=e=>{const{mi18n:n}=G(),{rerender:a}=Y();return(0,t.useEffect)(()=>{const t=null==e?void 0:e.map(e=>n.on(e,a));return()=>{null==t||t.forEach(e=>e.unsubscribe())}},[null==e?void 0:e.join(":")]),n};export{I as a,_ as c,C as i,M as l,H as n,$ as o,q as r,K as s,X as t};
@@ -1 +0,0 @@
1
- import{t as e}from"./rolldown-runtime-Cmsah3SL.js";var t=/* @__PURE__ */e((e,t)=>{var i,r;i=e,r=function e(){var t,i="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==i?i:{},r=!i.document&&!!i.postMessage,n=i.IS_PAPA_WORKER||!1,s={},a=0,o={};function h(e){this._handle=null,this._finished=!1,this._completed=!1,this._halted=!1,this._input=null,this._baseIndex=0,this._partialLine="",this._rowCount=0,this._start=0,this._nextChunk=null,this.isFirstChunk=!0,this._completeResults={data:[],errors:[],meta:{}},function(e){var t=k(e);t.chunkSize=parseInt(t.chunkSize),e.step||e.chunk||(t.chunkSize=null),this._handle=new c(t),(this._handle.streamer=this)._config=t}.call(this,e),this.parseChunk=function(e,t){var r=parseInt(this._config.skipFirstNLines)||0;if(this.isFirstChunk&&0<r){let t=this._config.newline;t||(s=this._config.quoteChar||'"',t=this._handle.guessLineEndings(e,s)),e=[...e.split(t).slice(r)].join(t)}this.isFirstChunk&&w(this._config.beforeFirstChunk)&&void 0!==(s=this._config.beforeFirstChunk(e))&&(e=s),this.isFirstChunk=!1,this._halted=!1,r=this._partialLine+e;var s=(this._partialLine="",this._handle.parse(r,this._baseIndex,!this._finished));if(!this._handle.paused()&&!this._handle.aborted()){if(e=s.meta.cursor,this._finished||(this._partialLine=r.substring(e-this._baseIndex),this._baseIndex=e),s&&s.data&&(this._rowCount+=s.data.length),r=this._finished||this._config.preview&&this._rowCount>=this._config.preview,n)i.postMessage({results:s,workerId:o.WORKER_ID,finished:r});else if(w(this._config.chunk)&&!t){if(this._config.chunk(s,this._handle),this._handle.paused()||this._handle.aborted())return void(this._halted=!0);this._completeResults=s=void 0}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(s.data),this._completeResults.errors=this._completeResults.errors.concat(s.errors),this._completeResults.meta=s.meta),this._completed||!r||!w(this._config.complete)||s&&s.meta.aborted||(this._config.complete(this._completeResults,this._input),this._completed=!0),r||s&&s.meta.paused||this._nextChunk(),s}this._halted=!0},this._sendError=function(e){w(this._config.error)?this._config.error(e):n&&this._config.error&&i.postMessage({workerId:o.WORKER_ID,error:e,finished:!1})}}function u(e){var t;(e=e||{}).chunkSize||(e.chunkSize=o.RemoteChunkSize),h.call(this,e),this._nextChunk=r?function(){this._readChunk(),this._chunkLoaded()}:function(){this._readChunk()},this.stream=function(e){this._input=e,this._nextChunk()},this._readChunk=function(){if(this._finished)this._chunkLoaded();else{if(t=new XMLHttpRequest,this._config.withCredentials&&(t.withCredentials=this._config.withCredentials),r||(t.onload=v(this._chunkLoaded,this),t.onerror=v(this._chunkError,this)),t.open(this._config.downloadRequestBody?"POST":"GET",this._input,!r),this._config.downloadRequestHeaders){var e,i=this._config.downloadRequestHeaders;for(e in i)t.setRequestHeader(e,i[e])}var n;this._config.chunkSize&&(n=this._start+this._config.chunkSize-1,t.setRequestHeader("Range","bytes="+this._start+"-"+n));try{t.send(this._config.downloadRequestBody)}catch(e){this._chunkError(e.message)}r&&0===t.status&&this._chunkError()}},this._chunkLoaded=function(){4===t.readyState&&(t.status<200||400<=t.status?this._chunkError():(this._start+=this._config.chunkSize||t.responseText.length,this._finished=!this._config.chunkSize||this._start>=(e=>null!==(e=e.getResponseHeader("Content-Range"))?parseInt(e.substring(e.lastIndexOf("/")+1)):-1)(t),this.parseChunk(t.responseText)))},this._chunkError=function(e){e=t.statusText||e,this._sendError(new Error(e))}}function d(e){(e=e||{}).chunkSize||(e.chunkSize=o.LocalChunkSize),h.call(this,e);var t,i,r="undefined"!=typeof FileReader;this.stream=function(e){this._input=e,i=e.slice||e.webkitSlice||e.mozSlice,r?((t=new FileReader).onload=v(this._chunkLoaded,this),t.onerror=v(this._chunkError,this)):t=new FileReaderSync,this._nextChunk()},this._nextChunk=function(){this._finished||this._config.preview&&!(this._rowCount<this._config.preview)||this._readChunk()},this._readChunk=function(){var e=this._input,n=(this._config.chunkSize&&(n=Math.min(this._start+this._config.chunkSize,this._input.size),e=i.call(e,this._start,n)),t.readAsText(e,this._config.encoding));r||this._chunkLoaded({target:{result:n}})},this._chunkLoaded=function(e){this._start+=this._config.chunkSize,this._finished=!this._config.chunkSize||this._start>=this._input.size,this.parseChunk(e.target.result)},this._chunkError=function(){this._sendError(t.error)}}function f(e){var t;h.call(this,e=e||{}),this.stream=function(e){return t=e,this._nextChunk()},this._nextChunk=function(){var e,i;if(!this._finished)return e=this._config.chunkSize,t=e?(i=t.substring(0,e),t.substring(e)):(i=t,""),this._finished=!t,this.parseChunk(i)}}function l(e){h.call(this,e=e||{});var t=[],i=!0,r=!1;this.pause=function(){h.prototype.pause.apply(this,arguments),this._input.pause()},this.resume=function(){h.prototype.resume.apply(this,arguments),this._input.resume()},this.stream=function(e){this._input=e,this._input.on("data",this._streamData),this._input.on("end",this._streamEnd),this._input.on("error",this._streamError)},this._checkIsFinished=function(){r&&1===t.length&&(this._finished=!0)},this._nextChunk=function(){this._checkIsFinished(),t.length?this.parseChunk(t.shift()):i=!0},this._streamData=v(function(e){try{t.push("string"==typeof e?e:e.toString(this._config.encoding)),i&&(i=!1,this._checkIsFinished(),this.parseChunk(t.shift()))}catch(e){this._streamError(e)}},this),this._streamError=v(function(e){this._streamCleanUp(),this._sendError(e)},this),this._streamEnd=v(function(){this._streamCleanUp(),r=!0,this._streamData("")},this),this._streamCleanUp=v(function(){this._input.removeListener("data",this._streamData),this._input.removeListener("end",this._streamEnd),this._input.removeListener("error",this._streamError)},this)}function c(e){var t,i,r,n,s=Math.pow(2,53),a=-s,h=/^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/,u=/^((\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z)))$/,d=this,f=0,l=0,c=!1,_=!1,m=[],y={data:[],errors:[],meta:{}};function v(t){return"greedy"===e.skipEmptyLines?""===t.join("").trim():1===t.length&&0===t[0].length}function E(){if(y&&r&&(R("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+o.DefaultDelimiter+"'"),r=!1),e.skipEmptyLines&&(y.data=y.data.filter(function(e){return!v(e)})),b()){if(y)if(Array.isArray(y.data[0])){for(var t=0;b()&&t<y.data.length;t++)y.data[t].forEach(d);y.data.splice(0,1)}else y.data.forEach(d);function d(t,i){w(e.transformHeader)&&(t=e.transformHeader(t,i)),m.push(t)}}function i(t,i){for(var r=e.header?{}:[],n=0;n<t.length;n++){var o=n,d=t[n];d=((t,i)=>(t=>(e.dynamicTypingFunction&&void 0===e.dynamicTyping[t]&&(e.dynamicTyping[t]=e.dynamicTypingFunction(t)),!0===(e.dynamicTyping[t]||e.dynamicTyping)))(t)?"true"===i||"TRUE"===i||"false"!==i&&"FALSE"!==i&&((e=>{if(h.test(e)&&(e=parseFloat(e),a<e&&e<s))return 1})(i)?parseFloat(i):u.test(i)?new Date(i):""===i?null:i):i)(o=e.header?n>=m.length?"__parsed_extra":m[n]:o,d=e.transform?e.transform(d,o):d),"__parsed_extra"===o?(r[o]=r[o]||[],r[o].push(d)):r[o]=d}return e.header&&(n>m.length?R("FieldMismatch","TooManyFields","Too many fields: expected "+m.length+" fields but parsed "+n,l+i):n<m.length&&R("FieldMismatch","TooFewFields","Too few fields: expected "+m.length+" fields but parsed "+n,l+i)),r}var n;y&&(e.header||e.dynamicTyping||e.transform)&&(n=1,!y.data.length||Array.isArray(y.data[0])?(y.data=y.data.map(i),n=y.data.length):y.data=i(y.data,0),e.header&&y.meta&&(y.meta.fields=m),l+=n)}function b(){return e.header&&0===m.length}function R(e,t,i,r){e={type:e,code:t,message:i},void 0!==r&&(e.row=r),y.errors.push(e)}w(e.step)&&(n=e.step,e.step=function(t){y=t,b()?E():(E(),0!==y.data.length&&(f+=t.data.length,e.preview&&f>e.preview?i.abort():(y.data=y.data[0],n(y,d))))}),this.parse=function(n,s,a){var h=e.quoteChar||'"';return e.newline||(e.newline=this.guessLineEndings(n,h)),r=!1,e.delimiter?w(e.delimiter)&&(e.delimiter=e.delimiter(n),y.meta.delimiter=e.delimiter):((h=((t,i,r,n,s)=>{var a,h,u,d;s=s||[",","\t","|",";",o.RECORD_SEP,o.UNIT_SEP];for(var f=0;f<s.length;f++){for(var l,c=s[f],p=0,_=0,m=0,y=(u=void 0,new g({comments:n,delimiter:c,newline:i,preview:10}).parse(t)),k=0;k<y.data.length;k++)r&&v(y.data[k])?m++:(_+=l=y.data[k].length,void 0===u?u=l:0<l&&(p+=Math.abs(l-u),u=l));0<y.data.length&&(_/=y.data.length-m),(void 0===h||p<=h)&&(void 0===d||d<_)&&1.99<_&&(h=p,a=c,d=_)}return{successful:!!(e.delimiter=a),bestDelimiter:a}})(n,e.newline,e.skipEmptyLines,e.comments,e.delimitersToGuess)).successful?e.delimiter=h.bestDelimiter:(r=!0,e.delimiter=o.DefaultDelimiter),y.meta.delimiter=e.delimiter),h=k(e),e.preview&&e.header&&h.preview++,t=n,i=new g(h),y=i.parse(t,s,a),E(),c?{meta:{paused:!0}}:y||{meta:{paused:!1}}},this.paused=function(){return c},this.pause=function(){c=!0,i.abort(),t=w(e.chunk)?"":t.substring(i.getCharIndex())},this.resume=function(){d.streamer._halted?(c=!1,d.streamer.parseChunk(t,!0)):setTimeout(d.resume,3)},this.aborted=function(){return _},this.abort=function(){_=!0,i.abort(),y.meta.aborted=!0,w(e.complete)&&e.complete(y),t=""},this.guessLineEndings=function(e,t){e=e.substring(0,1048576),t=new RegExp(p(t)+"([^]*?)"+p(t),"gm");var i=(e=e.replace(t,"")).split("\r");if(e=1<(t=e.split("\n")).length&&t[0].length<i[0].length,1===i.length||e)return"\n";for(var r=0,n=0;n<i.length;n++)"\n"===i[n][0]&&r++;return r>=i.length/2?"\r\n":"\r"}}function p(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function g(e){var t=(e=e||{}).delimiter,i=e.newline,r=e.comments,n=e.step,s=e.preview,a=e.fastMode,h=null,u=!1,d=null==e.quoteChar?'"':e.quoteChar,f=d;if(void 0!==e.escapeChar&&(f=e.escapeChar),("string"!=typeof t||-1<o.BAD_DELIMITERS.indexOf(t))&&(t=","),r===t)throw new Error("Comment character same as delimiter");!0===r?r="#":("string"!=typeof r||-1<o.BAD_DELIMITERS.indexOf(r))&&(r=!1),"\n"!==i&&"\r"!==i&&"\r\n"!==i&&(i="\n");var l=0,c=!1;this.parse=function(o,g,_){if("string"!=typeof o)throw new Error("Input must be a string");var m=o.length,y=t.length,k=i.length,v=r.length,E=w(n),b=[],R=[],C=[],S=l=0;if(!o)return P();if(a||!1!==a&&-1===o.indexOf(d)){for(var O=o.split(i),x=0;x<O.length;x++){if(C=O[x],l+=C.length,x!==O.length-1)l+=i.length;else if(_)return P();if(!r||C.substring(0,v)!==r){if(E){if(b=[],F(C.split(t)),U(),c)return P()}else F(C.split(t));if(s&&s<=x)return b=b.slice(0,s),P(!0)}}return P()}for(var I=o.indexOf(t,l),A=o.indexOf(i,l),T=new RegExp(p(f)+p(d),"g"),D=o.indexOf(d,l);;)if(o[l]===d)for(D=l,l++;;){if(-1===(D=o.indexOf(d,D+1)))return _||R.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:b.length,index:l}),z();if(D===m-1)return z(o.substring(l,D).replace(T,d));if(d===f&&o[D+1]===f)D++;else if(d===f||0===D||o[D-1]!==f){-1!==I&&I<D+1&&(I=o.indexOf(t,D+1));var L=j(-1===(A=-1!==A&&A<D+1?o.indexOf(i,D+1):A)?I:Math.min(I,A));if(o.substr(D+1+L,y)===t){C.push(o.substring(l,D).replace(T,d)),o[l=D+1+L+y]!==d&&(D=o.indexOf(d,l)),I=o.indexOf(t,l),A=o.indexOf(i,l);break}if(L=j(A),o.substring(D+1+L,D+1+L+k)===i){if(C.push(o.substring(l,D).replace(T,d)),M(D+1+L+k),I=o.indexOf(t,l),D=o.indexOf(d,l),E&&(U(),c))return P();if(s&&b.length>=s)return P(!0);break}R.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:b.length,index:l}),D++}}else if(r&&0===C.length&&o.substring(l,l+v)===r){if(-1===A)return P();l=A+k,A=o.indexOf(i,l),I=o.indexOf(t,l)}else if(-1!==I&&(I<A||-1===A))C.push(o.substring(l,I)),l=I+y,I=o.indexOf(t,l);else{if(-1===A)break;if(C.push(o.substring(l,A)),M(A+k),E&&(U(),c))return P();if(s&&b.length>=s)return P(!0)}return z();function F(e){b.push(e),S=l}function j(e){return-1!==e&&(e=o.substring(D+1,e))&&""===e.trim()?e.length:0}function z(e){return _||(void 0===e&&(e=o.substring(l)),C.push(e),l=m,F(C),E&&U()),P()}function M(e){l=e,F(C),C=[],A=o.indexOf(i,l)}function P(r){if(e.header&&!g&&b.length&&!u){var n=b[0],s=Object.create(null),a=new Set(n);let t=!1;for(let i=0;i<n.length;i++){let r=n[i];if(s[r=w(e.transformHeader)?e.transformHeader(r,i):r]){let e,o=s[r];for(;e=r+"_"+o,o++,a.has(e););a.add(e),n[i]=e,s[r]++,t=!0,(h=null===h?{}:h)[e]=r}else s[r]=1,n[i]=r;a.add(r)}t&&console.warn("Duplicate headers found and renamed."),u=!0}return{data:b,errors:R,meta:{delimiter:t,linebreak:i,aborted:c,truncated:!!r,cursor:S+(g||0),renamedHeaders:h}}}function U(){n(P()),b=[],R=[]}},this.abort=function(){c=!0},this.getCharIndex=function(){return l}}function _(e){var t=e.data,i=s[t.workerId],r=!1;if(t.error)i.userError(t.error,t.file);else if(t.results&&t.results.data){var n={abort:function(){r=!0,m(t.workerId,{data:[],errors:[],meta:{aborted:!0}})},pause:y,resume:y};if(w(i.userStep)){for(var a=0;a<t.results.data.length&&(i.userStep({data:t.results.data[a],errors:t.results.errors,meta:t.results.meta},n),!r);a++);delete t.results}else w(i.userChunk)&&(i.userChunk(t.results,n,t.file),delete t.results)}t.finished&&!r&&m(t.workerId,t.results)}function m(e,t){var i=s[e];w(i.userComplete)&&i.userComplete(t),i.terminate(),delete s[e]}function y(){throw new Error("Not implemented.")}function k(e){if("object"!=typeof e||null===e)return e;var t,i=Array.isArray(e)?[]:{};for(t in e)i[t]=k(e[t]);return i}function v(e,t){return function(){e.apply(t,arguments)}}function w(e){return"function"==typeof e}return o.parse=function(t,r){var n=(r=r||{}).dynamicTyping||!1;if(w(n)&&(r.dynamicTypingFunction=n,n={}),r.dynamicTyping=n,r.transform=!!w(r.transform)&&r.transform,!r.worker||!o.WORKERS_SUPPORTED)return n=null,o.NODE_STREAM_INPUT,"string"==typeof t?(t=(e=>65279!==e.charCodeAt(0)?e:e.slice(1))(t),n=new(r.download?u:f)(r)):!0===t.readable&&w(t.read)&&w(t.on)?n=new l(r):(i.File&&t instanceof File||t instanceof Object)&&(n=new d(r)),n.stream(t);(n=(()=>{var t;return!!o.WORKERS_SUPPORTED&&(t=(()=>{var t=i.URL||i.webkitURL||null,r=e.toString();return o.BLOB_URL||(o.BLOB_URL=t.createObjectURL(new Blob(["var global = (function() { if (typeof self !== 'undefined') { return self; } if (typeof window !== 'undefined') { return window; } if (typeof global !== 'undefined') { return global; } return {}; })(); global.IS_PAPA_WORKER=true; ","(",r,")();"],{type:"text/javascript"})))})(),(t=new i.Worker(t)).onmessage=_,t.id=a++,s[t.id]=t)})()).userStep=r.step,n.userChunk=r.chunk,n.userComplete=r.complete,n.userError=r.error,r.step=w(r.step),r.chunk=w(r.chunk),r.complete=w(r.complete),r.error=w(r.error),delete r.worker,n.postMessage({input:t,config:r,workerId:n.id})},o.unparse=function(e,t){var i=!1,r=!0,n=",",s="\r\n",a='"',h=a+a,u=!1,d=null,f=!1,l=((()=>{if("object"==typeof t){if("string"!=typeof t.delimiter||o.BAD_DELIMITERS.filter(function(e){return-1!==t.delimiter.indexOf(e)}).length||(n=t.delimiter),"boolean"!=typeof t.quotes&&"function"!=typeof t.quotes&&!Array.isArray(t.quotes)||(i=t.quotes),"boolean"!=typeof t.skipEmptyLines&&"string"!=typeof t.skipEmptyLines||(u=t.skipEmptyLines),"string"==typeof t.newline&&(s=t.newline),"string"==typeof t.quoteChar&&(a=t.quoteChar),"boolean"==typeof t.header&&(r=t.header),Array.isArray(t.columns)){if(0===t.columns.length)throw new Error("Option columns is empty");d=t.columns}void 0!==t.escapeChar&&(h=t.escapeChar+a),t.escapeFormulae instanceof RegExp?f=t.escapeFormulae:"boolean"==typeof t.escapeFormulae&&t.escapeFormulae&&(f=/^[=+\-@\t\r].*$/)}})(),new RegExp(p(a),"g"));if("string"==typeof e&&(e=JSON.parse(e)),Array.isArray(e)){if(!e.length||Array.isArray(e[0]))return c(null,e,u);if("object"==typeof e[0])return c(d||Object.keys(e[0]),e,u)}else if("object"==typeof e)return"string"==typeof e.data&&(e.data=JSON.parse(e.data)),Array.isArray(e.data)&&(e.fields||(e.fields=e.meta&&e.meta.fields||d),e.fields||(e.fields=Array.isArray(e.data[0])?e.fields:"object"==typeof e.data[0]?Object.keys(e.data[0]):[]),Array.isArray(e.data[0])||"object"==typeof e.data[0]||(e.data=[e.data])),c(e.fields||[],e.data||[],u);throw new Error("Unable to serialize unrecognized input");function c(e,t,i){var a="",o=("string"==typeof e&&(e=JSON.parse(e)),"string"==typeof t&&(t=JSON.parse(t)),Array.isArray(e)&&0<e.length),h=!Array.isArray(t[0]);if(o&&r){for(var u=0;u<e.length;u++)0<u&&(a+=n),a+=g(e[u],u);0<t.length&&(a+=s)}for(var d=0;d<t.length;d++){var f=(o?e:t[d]).length,l=!1,c=o?0===Object.keys(t[d]).length:0===t[d].length;if(i&&!o&&(l="greedy"===i?""===t[d].join("").trim():1===t[d].length&&0===t[d][0].length),"greedy"===i&&o){for(var p=[],_=0;_<f;_++){var m=h?e[_]:_;p.push(t[d][m])}l=""===p.join("").trim()}if(!l){for(var y=0;y<f;y++){0<y&&!c&&(a+=n);var k=o&&h?e[y]:y;a+=g(t[d][k],y)}d<t.length-1&&(!i||0<f&&!c)&&(a+=s)}}return a}function g(e,t){var r,s;return null==e?"":e.constructor===Date?JSON.stringify(e).slice(1,25):(s=!1,f&&"string"==typeof e&&f.test(e)&&(e="'"+e,s=!0),r=e.toString().replace(l,h),(s=s||!0===i||"function"==typeof i&&i(e,t)||Array.isArray(i)&&i[t]||((e,t)=>{for(var i=0;i<t.length;i++)if(-1<e.indexOf(t[i]))return!0;return!1})(r,o.BAD_DELIMITERS)||-1<r.indexOf(n)||" "===r.charAt(0)||" "===r.charAt(r.length-1))?a+r+a:r)}},o.RECORD_SEP=String.fromCharCode(30),o.UNIT_SEP=String.fromCharCode(31),o.BYTE_ORDER_MARK="\ufeff",o.BAD_DELIMITERS=["\r","\n",'"',o.BYTE_ORDER_MARK],o.WORKERS_SUPPORTED=!r&&!!i.Worker,o.NODE_STREAM_INPUT=1,o.LocalChunkSize=10485760,o.RemoteChunkSize=5242880,o.DefaultDelimiter=",",o.Parser=g,o.ParserHandle=c,o.NetworkStreamer=u,o.FileStreamer=d,o.StringStreamer=f,o.ReadableStreamStreamer=l,i.jQuery&&((t=i.jQuery).fn.parse=function(e){var r=e.config||{},n=[];return this.each(function(e){if("INPUT"!==t(this).prop("tagName").toUpperCase()||"file"!==t(this).attr("type").toLowerCase()||!i.FileReader||!this.files||0===this.files.length)return!0;for(var s=0;s<this.files.length;s++)n.push({file:this.files[s],inputElem:this,instanceConfig:t.extend({},r)})}),s(),this;function s(){if(0===n.length)w(e.complete)&&e.complete();else{var i,r,s,h=n[0];if(w(e.before)){var u=e.before(h.file,h.inputElem);if("object"==typeof u){if("abort"===u.action)return i=h.file,r=h.inputElem,s=u.reason,void(w(e.error)&&e.error({name:"AbortError"},i,r,s));if("skip"===u.action)return void a();"object"==typeof u.config&&(h.instanceConfig=t.extend(h.instanceConfig,u.config))}else if("skip"===u)return void a()}var d=h.instanceConfig.complete;h.instanceConfig.complete=function(e){w(d)&&d(e,h.file,h.inputElem),a()},o.parse(h.file,h.instanceConfig)}}function a(){n.splice(0,1),s()}}),n&&(i.onmessage=function(e){e=e.data,void 0===o.WORKER_ID&&e&&(o.WORKER_ID=e.workerId),"string"==typeof e.input?i.postMessage({workerId:o.WORKER_ID,results:o.parse(e.input,e.config),finished:!0}):(i.File&&e.input instanceof File||e.input instanceof Object)&&(e=o.parse(e.input,e.config))&&i.postMessage({workerId:o.WORKER_ID,results:e,finished:!0})}),(u.prototype=Object.create(h.prototype)).constructor=u,(d.prototype=Object.create(h.prototype)).constructor=d,(f.prototype=Object.create(f.prototype)).constructor=f,(l.prototype=Object.create(h.prototype)).constructor=l,o},"function"==typeof define&&define.amd?define([],r):"object"==typeof t&&void 0!==e?t.exports=r():i.Papa=r()});export default t();