@sheetxl/studio-vanilla 0.4.13 → 0.4.14

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 (314) hide show
  1. package/README.md +2 -2
  2. package/browser/cjs/10IK8MFijJb-yvV6.cjs +7 -0
  3. package/browser/cjs/1bCMnueqxHW3rn0c.cjs +6 -0
  4. package/browser/cjs/AnJTeEGq7VP4T1b7.cjs +161 -0
  5. package/browser/cjs/BH3MYcOF7rxLX3Bk.cjs +15 -0
  6. package/browser/cjs/BQ4QeJYaIhLaInyR.cjs +6 -0
  7. package/browser/cjs/BU5k1OZewc-Z-kR9.cjs +6 -0
  8. package/browser/cjs/BlwK-VslgEVH2cgX.cjs +145 -0
  9. package/browser/cjs/Bm9fNNMIOLIwq-94.cjs +6 -0
  10. package/browser/cjs/BtiY-n4sGy6WaqNg.cjs +32 -0
  11. package/browser/cjs/BxgDhdrrKrJMEaXd.cjs +6 -0
  12. package/browser/cjs/BzT1y15V6Zs7c_zX.cjs +6 -0
  13. package/browser/cjs/C0ySf2emOB0Mslc-.cjs +6 -0
  14. package/browser/cjs/CE5U7gB5L-PE17gV.cjs +6 -0
  15. package/browser/cjs/CHd9vauNLHnOLflj.cjs +6 -0
  16. package/browser/cjs/CJZtyunL_qaXFylY.cjs +12 -0
  17. package/browser/cjs/CJoJ19i1z94kndlS.cjs +19 -0
  18. package/browser/cjs/CNcsGELwCAV-A5oH.cjs +16 -0
  19. package/browser/cjs/CTuM_aZX8wZICUe_.cjs +6 -0
  20. package/browser/cjs/CWW_yQpIswo7DEAT.cjs +6 -0
  21. package/browser/cjs/CXIHULOe7x4DYKXw.cjs +12 -0
  22. package/browser/cjs/CYLnJHryQcQO4XoG.cjs +6 -0
  23. package/browser/cjs/C_mbaid3FQ52usBI.cjs +6 -0
  24. package/browser/cjs/Cj_1qUo5cZ3FnOpK.cjs +6 -0
  25. package/browser/cjs/Cl0XSnWVDoaHTIlF.cjs +6 -0
  26. package/browser/cjs/CnLdhURNkVXo_0Eg.cjs +6 -0
  27. package/browser/cjs/CpIIsygD5mnJyl47.cjs +1501 -0
  28. package/browser/cjs/CpRfx14is2_4Wgp3.cjs +6 -0
  29. package/browser/cjs/Cuq8Nim-ol5Gdehe.cjs +6 -0
  30. package/browser/cjs/D4NcrJlqcLExwCNT.cjs +124 -0
  31. package/browser/cjs/D4vbOk4hD8-b-c10.cjs +6 -0
  32. package/browser/cjs/D5YUIQeOcujtq6XS.cjs +7 -0
  33. package/browser/cjs/D6uIvR-6Y690_Em2.cjs +11 -0
  34. package/browser/cjs/DAbScbuk-sjZXMIC.cjs +11 -0
  35. package/browser/cjs/DBNXGIWfZmgb_sHL.cjs +6 -0
  36. package/browser/cjs/DCd5OZXj2IRbxEF2.cjs +6 -0
  37. package/browser/cjs/DFNisISrsMnZrV4B.cjs +6 -0
  38. package/browser/cjs/DIYOARVcGtRjKpjZ.cjs +6 -0
  39. package/browser/cjs/DL4HgriZ3TY2K-QP.cjs +6 -0
  40. package/browser/cjs/DPbzY4ppgKPrdbWc.cjs +6 -0
  41. package/browser/cjs/DQGdVVTxixgptLdj.cjs +366 -0
  42. package/browser/cjs/DWzQm8Q32qNP7qKL.cjs +6 -0
  43. package/browser/cjs/D_7RtbQABH1zdcjr.cjs +7 -0
  44. package/browser/cjs/D_Q0s9KLnWHwKxTK.cjs +6 -0
  45. package/browser/cjs/DdTcwutSPJMeCIv3.cjs +6 -0
  46. package/browser/cjs/DlnKrZRyxBfbqaTi.cjs +13 -0
  47. package/browser/cjs/DtpB0PMEtamaB-Hv.cjs +6 -0
  48. package/browser/cjs/Dv8SE05ABKNLPY6A.cjs +6 -0
  49. package/browser/cjs/DxBLU16_E62Umowp.cjs +6 -0
  50. package/browser/cjs/VU_KaqGTjvnisS9e.cjs +6 -0
  51. package/browser/cjs/bS_BOH9cvVCFy36v.cjs +6 -0
  52. package/browser/cjs/dbUUj8LyIitsdYpk.cjs +6 -0
  53. package/browser/cjs/eZGLUWbfY3JdZRM5.cjs +6 -0
  54. package/browser/cjs/index.cjs +3 -4
  55. package/browser/cjs/mBk4Z4LZ65b3f58_.cjs +6 -0
  56. package/browser/cjs/rIOsSIPwxoXlIawS.cjs +6 -0
  57. package/browser/cjs/sMBG5eQ3-iacLXUm.cjs +6 -0
  58. package/browser/cjs/tShlMZrIxsGZSeHX.cjs +42 -0
  59. package/browser/cjs/xDqIifM_--oXscCV.cjs +6 -0
  60. package/browser/cjs/yBSdtSSuNERefFhR.cjs +15 -0
  61. package/{cdn/assets/DHydjLSnijEgtpyU.js → browser/esm/4eRu4yzXkvCBip8J.mjs} +1 -1
  62. package/browser/esm/73gcCsbqgbW3KIoA.mjs +1346 -0
  63. package/browser/esm/B383N9irNfyfYC2l.mjs +20 -0
  64. package/{cdn/assets/C3EFzvmp0DcC_HAx.js → browser/esm/B4ji-HZTY0uvH8r7.mjs} +1 -1
  65. package/{cdn/assets/D-5VYBO5_VEh6fEW.js → browser/esm/B8TNpfJ8ymQcPriE.mjs} +1 -1
  66. package/browser/esm/BBDu-GNDE7ZA-1sJ.mjs +56 -0
  67. package/{cdn/assets/BwpBFv8Ks2ka07ch.js → browser/esm/BF5nlSYZ38RJ0dPX.mjs} +1 -1
  68. package/{cdn/assets/B1Iys8a964LGNZKf.js → browser/esm/BHy77Km4i4t5U7ka.mjs} +1 -1
  69. package/{cdn/assets/BMiA9p1uOrwnooVT.js → browser/esm/BIUVt79NHXdZx2Dz.mjs} +1 -1
  70. package/browser/esm/BP6hA-zc0dMuMOIA.mjs +3755 -0
  71. package/{cdn/assets/BUwNyHytF9St68tJ.js → browser/esm/BPen6C7JE2sWVgdi.mjs} +1 -1
  72. package/{cdn/assets/DvFNLgeMJ9LdQROu.js → browser/esm/BUqd1uVUNoWmepd2.mjs} +54 -55
  73. package/browser/esm/BXABqQEa6kQQcjmt.mjs +820 -0
  74. package/{cdn/assets/BL6TUDSeou6wPejW.js → browser/esm/BZxAttR2mi9td3k1.mjs} +1 -1
  75. package/{cdn/assets/C4vStn7wNlvrxdsp.js → browser/esm/B_pEA9HeXKvEOCdS.mjs} +1 -1
  76. package/browser/esm/BbW_1O3cEhZ4aSgS.mjs +55785 -0
  77. package/browser/esm/BdFNxdtES-3_yQ9R.mjs +421 -0
  78. package/{cdn/assets/BciokME96sykArSM.js → browser/esm/BfFDvyaRcdKS0wPD.mjs} +1 -1
  79. package/browser/esm/Bqqcb80cNalBs-sB.mjs +939 -0
  80. package/browser/esm/BrEcIDq0-c5AiQEf.mjs +21 -0
  81. package/{cdn/assets/CrLrvmlJhYpNpXqR.js → browser/esm/BvYUsRgBXLSuaQ-S.mjs} +1 -1
  82. package/{cdn/assets/C-Z8wvIy20kJ7R-k.js → browser/esm/BzE-61bmpRQzEVPt.mjs} +1 -1
  83. package/browser/esm/C28AZ0Rwo79iGg0v.mjs +13208 -0
  84. package/browser/esm/C5GgK_mW25DZYw-I.mjs +2344 -0
  85. package/{cdn/assets/XysyS9rk9tFdbzZh.js → browser/esm/CHjb5a2xwEWs4RgS.mjs} +505 -513
  86. package/{cdn/assets/DXtbonLk2ESfF4Dh.js → browser/esm/CITPwlsNzJvv551I.mjs} +1 -1
  87. package/browser/esm/CJiHNujoVUdO_G7X.mjs +46 -0
  88. package/{cdn/assets/C5q0qaKi2eeDgoO8.js → browser/esm/CN73n4VDayKh_l1J.mjs} +1 -1
  89. package/{cdn/assets/B2RAJJJFkcaWUfUW.js → browser/esm/CcARDY0PFSWkqsG9.mjs} +1 -1
  90. package/browser/esm/CeF0ZRfeSy83i80_.mjs +1575 -0
  91. package/{cdn/assets/BBJxLS-wB_nXRnI2.js → browser/esm/Cmtx4dAVZrwq5cVO.mjs} +1 -1
  92. package/browser/esm/Crza3kRJdEVylOfk.mjs +29 -0
  93. package/browser/esm/D3L89e08b7ewR6mt.mjs +21 -0
  94. package/browser/esm/D4G17ip9xxOX5jDd.mjs +3934 -0
  95. package/{cdn/assets/CuNqTH3P8mCglRiz.js → browser/esm/D9eVsUckA6bWBHni.mjs} +1 -1
  96. package/browser/esm/DAscSzG63-mM5p50.mjs +41 -0
  97. package/browser/esm/DCyJNVtrh6kEt73Q.mjs +84 -0
  98. package/{cdn/assets/DFHruAftzuzBZ71r.js → browser/esm/DFwxjsVr4xKLPTGf.mjs} +65 -68
  99. package/{cdn/assets/9-cIcj6CRJx5HTn9.js → browser/esm/DHPHhaCxihdR9Hl6.mjs} +1 -1
  100. package/browser/esm/DKbJ-iVPuUbr3iZ_.mjs +47 -0
  101. package/browser/esm/DQLk_UmdpJBt-zZi.mjs +5582 -0
  102. package/browser/esm/DR7oVoNSe0FFWHOr.mjs +48 -0
  103. package/{cdn/assets/CKA4s2hlzSnrdWSD.js → browser/esm/DVRMAeHUj0-TY-vK.mjs} +1 -1
  104. package/{cdn/assets/N3pWBoccPrTedAw-.js → browser/esm/DXIWAG-DUKHzNlRl.mjs} +1 -1
  105. package/browser/esm/DbZJQpjZJIcz2ypV.mjs +39 -0
  106. package/{cdn/assets/KDGtuIzSpkf1vsmH.js → browser/esm/Dft4BSeY0bp0A6z0.mjs} +1 -1
  107. package/browser/esm/DgO85Q5iHe-ZmvtQ.mjs +633 -0
  108. package/browser/esm/DwRHGEuscm3FvnkM.mjs +1665 -0
  109. package/browser/esm/HyTvrvH0vItPFnFG.mjs +472 -0
  110. package/{cdn/assets/F6zW9Vj410C4yRVG.js → browser/esm/Pkb6GWdyZdze_XAw.mjs} +167 -166
  111. package/browser/esm/QZikWr_NQfcFWCBV.mjs +44 -0
  112. package/{cdn/assets/5XdpCWQ6AcxZ6oY1.js → browser/esm/aLv-xujBO4X6ilhV.mjs} +1 -1
  113. package/{cdn/assets/Gz4u4ewyWfB-Pf-a.js → browser/esm/c9fba0RuWGogsH0X.mjs} +4 -5
  114. package/browser/esm/index.mjs +6 -2
  115. package/{cdn/assets/BxblmHGC7YxZcuak.js → browser/esm/jkSJc6Omxbf-rPQY.mjs} +1 -1
  116. package/{cdn/assets/CT0d1P-Aav62lUvV.js → browser/esm/uuCmCmYQQXgwyRSd.mjs} +1 -1
  117. package/{cdn/assets/DD3csu4pddGtMp3n.js → browser/esm/w3TGaFTjdsc4XTcz.mjs} +537 -539
  118. package/browser/esm/wV8riZWKJE7AoKQk.mjs +1365 -0
  119. package/{cdn/assets/CsorxCiOoe7qX9j1.js → browser/esm/wxvli1IH1NkfqE6-.mjs} +1 -1
  120. package/cdn/assets/{C9eQW5GKgPRmKKgJ.js → 0fI22OQK5IczUH6s.js} +2 -2
  121. package/cdn/assets/4eRu4yzXkvCBip8J.js +10 -0
  122. package/cdn/assets/5HYy7pIZxQRDUQl-.js +50 -0
  123. package/cdn/assets/6oc_f4xkoSmftsRd.js +22 -0
  124. package/cdn/assets/73gcCsbqgbW3KIoA.js +1346 -0
  125. package/cdn/assets/B3TPDOzYf_VRBIr6.js +2177 -0
  126. package/cdn/assets/B4HW_cy7gbE01jar.js +390 -0
  127. package/cdn/assets/B4ji-HZTY0uvH8r7.js +10 -0
  128. package/cdn/assets/B7Ky6m4VWP8vxhPt.js +1702 -0
  129. package/cdn/assets/B8TNpfJ8ymQcPriE.js +24 -0
  130. package/cdn/assets/BEfetwH6zTr6B51I.js +3755 -0
  131. package/cdn/assets/BF5nlSYZ38RJ0dPX.js +10 -0
  132. package/cdn/assets/BHy77Km4i4t5U7ka.js +10 -0
  133. package/cdn/assets/BIUVt79NHXdZx2Dz.js +10 -0
  134. package/cdn/assets/BPen6C7JE2sWVgdi.js +10 -0
  135. package/cdn/assets/BS1p7DgoyO-WkvB8.js +41 -0
  136. package/cdn/assets/BZxAttR2mi9td3k1.js +10 -0
  137. package/cdn/assets/B_pEA9HeXKvEOCdS.js +10 -0
  138. package/cdn/assets/BdFNxdtES-3_yQ9R.js +421 -0
  139. package/cdn/assets/BfFDvyaRcdKS0wPD.js +10 -0
  140. package/cdn/assets/{quOP5QFyTT9soNIl.js → BiKaXKU3o287mgkN.js} +1 -1
  141. package/cdn/assets/BvYUsRgBXLSuaQ-S.js +10 -0
  142. package/cdn/assets/BzE-61bmpRQzEVPt.js +10 -0
  143. package/cdn/assets/{CV8UjJPDVplXjK1E.js → C0yI-QYraFhnJUdD.js} +19 -19
  144. package/cdn/assets/C28AZ0Rwo79iGg0v.js +13208 -0
  145. package/cdn/assets/{BDE7FUo2oiivrvBL.js → C3FTuqvfGalOVHql.js} +15 -15
  146. package/cdn/assets/C3W0xsNrt-Was9g-.js +84 -0
  147. package/cdn/assets/C8rQWD8C7ccUHNZL.js +3934 -0
  148. package/cdn/assets/CITPwlsNzJvv551I.js +10 -0
  149. package/cdn/assets/CN73n4VDayKh_l1J.js +10 -0
  150. package/cdn/assets/{0j_nQmV1Bb0lJ6sB.js → CWkF-50YF43t7qge.js} +4 -4
  151. package/cdn/assets/{8U2WVdbZHYCBnd9L.js → CaKPs_ILqLIWfUUN.js} +13 -13
  152. package/cdn/assets/CcARDY0PFSWkqsG9.js +21 -0
  153. package/cdn/assets/{Xwyp21e7L5fTeb_y.js → Cdx6LrqtHZKbwl63.js} +186 -184
  154. package/cdn/assets/{6JtXguBKwGj6dqfy.js → ChB-XZno7w9v221u.js} +385 -387
  155. package/cdn/assets/CkY7wM_4OGwZvJ4f.js +942 -0
  156. package/cdn/assets/Cmtx4dAVZrwq5cVO.js +10 -0
  157. package/cdn/assets/{BlYoycYtR-sUp0iC.js → CrBywNOOyPHSBoTT.js} +4 -4
  158. package/cdn/assets/D9eVsUckA6bWBHni.js +10 -0
  159. package/cdn/assets/{DPQqTIMsRLhMxPIy.js → DBpku3D2DSTmW4II.js} +2 -2
  160. package/cdn/assets/DEOxG6u6itV8bGym.js +2346 -0
  161. package/cdn/assets/DHPHhaCxihdR9Hl6.js +10 -0
  162. package/cdn/assets/{DXHirQMr483hJBil.js → DMWARnjq06oQnfrL.js} +15 -15
  163. package/cdn/assets/{BNh9nSR83reiVMKt.js → DRa6yXWuTlAjuaKT.js} +2 -2
  164. package/cdn/assets/DVRMAeHUj0-TY-vK.js +10 -0
  165. package/{browser/esm/CVeyOpbAhaBhDRye.mjs → cdn/assets/DXIWAG-DUKHzNlRl.js} +7 -2
  166. package/cdn/assets/{0e9wDKSn4SFxSmP5.js → DYowHOSLHcADsXuK.js} +3 -3
  167. package/cdn/assets/{f3_QXO8z0p-q4nJo.js → DZNoPrlxULASVlOi.js} +4 -4
  168. package/cdn/assets/DaUJajqmQYuM0Gew.js +150 -0
  169. package/cdn/assets/DcdQwhlGoI1knRUy.js +46 -0
  170. package/cdn/assets/Dft4BSeY0bp0A6z0.js +10 -0
  171. package/cdn/assets/DgO85Q5iHe-ZmvtQ.js +633 -0
  172. package/cdn/assets/{CR01MBraUPYPpwy4.js → Dm0hrXCbV7DITOhi.js} +2 -2
  173. package/cdn/assets/{BgnlshX157Ob6RLs.js → DnWjhq4ZlgIuFcii.js} +2 -2
  174. package/cdn/assets/DwRHGEuscm3FvnkM.js +1665 -0
  175. package/cdn/assets/DzyNujjbHLXo9UmH.js +1466 -0
  176. package/cdn/assets/{B_2bXmyji3Dr7LRM.js → EYTSqAG9YOdb1vKx.js} +21832 -23233
  177. package/cdn/assets/{BVYDmdUGWvMG5gNK.js → Ux2jUY_EwSsYBCov.js} +1 -1
  178. package/cdn/assets/{Bsa9-Itkf_SdDBM9.js → XoKiuP2ZFq0cNGkH.js} +4 -4
  179. package/cdn/assets/{2mxiQm6dELsqQoX7.js → Zi3E5Kzxw2FPtLVL.js} +1376 -1418
  180. package/cdn/assets/aLv-xujBO4X6ilhV.js +10 -0
  181. package/cdn/assets/jkSJc6Omxbf-rPQY.js +10 -0
  182. package/cdn/assets/uuCmCmYQQXgwyRSd.js +10 -0
  183. package/cdn/assets/wV8riZWKJE7AoKQk.js +1365 -0
  184. package/cdn/assets/wxvli1IH1NkfqE6-.js +10 -0
  185. package/cdn/index.js +2 -2
  186. package/cdn/loader.js +1 -1
  187. package/package.json +3 -3
  188. package/types/index.d.ts +1 -0
  189. package/browser/cjs/-DkdmW3XP1ICRY25.cjs +0 -7
  190. package/browser/cjs/B-KQs1Bf48nEucW7.cjs +0 -7
  191. package/browser/cjs/B1xnY7pDnbnNzknG.cjs +0 -7
  192. package/browser/cjs/B6A5w_aWHkigBc6j.cjs +0 -7
  193. package/browser/cjs/B9jxuOg1CXcmbi9J.cjs +0 -110
  194. package/browser/cjs/BAYjkr4LmsWRLoPr.cjs +0 -7
  195. package/browser/cjs/BG2uV2RpxrfZyCuV.cjs +0 -7
  196. package/browser/cjs/BGCPG4Ip5ZijUQwi.cjs +0 -7
  197. package/browser/cjs/BHTlBOQH-tPGoKgo.cjs +0 -7
  198. package/browser/cjs/BLBNzBvRVl9VLynf.cjs +0 -7
  199. package/browser/cjs/BLh6E7ER8mrM6vc_.cjs +0 -7
  200. package/browser/cjs/BMaq_2S3IFrE5XeJ.cjs +0 -7
  201. package/browser/cjs/BO7Pbclmywy-QCSV.cjs +0 -13
  202. package/browser/cjs/BPlthbyKkqCDjgxO.cjs +0 -7
  203. package/browser/cjs/BUGo0mXtBfFOmQXV.cjs +0 -7
  204. package/browser/cjs/BdHdXCz_K1djQgI4.cjs +0 -7
  205. package/browser/cjs/BfNkb1jDZkJf3wRA.cjs +0 -7
  206. package/browser/cjs/BfdQd2UEOlOc5iF3.cjs +0 -7
  207. package/browser/cjs/Bi9KvObgq_kJ_pjC.cjs +0 -7
  208. package/browser/cjs/BjPpJjnABDd3_WOZ.cjs +0 -7
  209. package/browser/cjs/BsSNzyN8kOGCKzso.cjs +0 -7
  210. package/browser/cjs/BtCcoaKKb8ZDnliG.cjs +0 -7
  211. package/browser/cjs/BwHquG4sSd7OJjxz.cjs +0 -7
  212. package/browser/cjs/BywNBbTVRYbgRbNI.cjs +0 -7
  213. package/browser/cjs/C04Qr5P8uyQ6Vcml.cjs +0 -7
  214. package/browser/cjs/C42ZEPRmW9Wcd7tI.cjs +0 -7
  215. package/browser/cjs/CBpt1PBR1VfBegko.cjs +0 -7
  216. package/browser/cjs/CED8Az5C8GWF7pUT.cjs +0 -7
  217. package/browser/cjs/CbD4Wa5QLTdRCYcz.cjs +0 -7
  218. package/browser/cjs/CbILz9Skl6lWf6yR.cjs +0 -7
  219. package/browser/cjs/CoFQQqIzuvS9PM77.cjs +0 -7
  220. package/browser/cjs/CpDNo2Lhwr5ZHECs.cjs +0 -7
  221. package/browser/cjs/CsamfGfFsItvSgo_.cjs +0 -7
  222. package/browser/cjs/Cx3kn5gBsQ-1bORi.cjs +0 -7
  223. package/browser/cjs/CxLvGnG44-qNI36G.cjs +0 -7
  224. package/browser/cjs/D-xyWit7jxctQCpR.cjs +0 -7
  225. package/browser/cjs/D4XQsK7d7DRctaOO.cjs +0 -7
  226. package/browser/cjs/D9rVEA1BdB0JZwhE.cjs +0 -7
  227. package/browser/cjs/DES2NmIRVZg-HXgs.cjs +0 -7
  228. package/browser/cjs/DFxeLNhACFIHb0nv.cjs +0 -7
  229. package/browser/cjs/DIv1SrLYeyVwcaxE.cjs +0 -7
  230. package/browser/cjs/DJ6L43osbaMzEV5K.cjs +0 -7
  231. package/browser/cjs/DMjLN_HDktNzzUB8.cjs +0 -7
  232. package/browser/cjs/DVPfPZCFjmYu3xyn.cjs +0 -7
  233. package/browser/cjs/DhSlaiQXxEOVtZkA.cjs +0 -7
  234. package/browser/cjs/Dh_dFnagz7dMZlGh.cjs +0 -7
  235. package/browser/cjs/DpF6vgGka2d-RKkb.cjs +0 -10
  236. package/browser/cjs/DtY0Jzlwnr_YKnV4.cjs +0 -7
  237. package/browser/cjs/DwyyFI1Ix0uc0Qoz.cjs +0 -7
  238. package/browser/cjs/Dy5_viRzFls9rOzN.cjs +0 -7
  239. package/browser/cjs/GkINjQ8Te3GKi2mx.cjs +0 -7
  240. package/browser/cjs/aN3KCqswA1SdJIMq.cjs +0 -7
  241. package/browser/cjs/hLJbgylpETByV4wc.cjs +0 -7
  242. package/browser/cjs/qumqKlVHFx89iLeu.cjs +0 -7
  243. package/browser/cjs/rKZjTYQ0WpTriIv6.cjs +0 -7
  244. package/browser/cjs/xjKotAOVt3JH36U7.cjs +0 -7
  245. package/browser/cjs/ymbPxio09Fw7I2BW.cjs +0 -7
  246. package/browser/esm/2P5dQT7wZToOh-n9.mjs +0 -7
  247. package/browser/esm/4GgcUVhUmQmiv9Ha.mjs +0 -110
  248. package/browser/esm/7_x68v6PpvRDox_Z.mjs +0 -7
  249. package/browser/esm/9icgSuuzXq6mlgM8.mjs +0 -7
  250. package/browser/esm/B354iAatN9y9AIIP.mjs +0 -7
  251. package/browser/esm/B5EVyoxm3aSlAnxN.mjs +0 -7
  252. package/browser/esm/BD8rE7MUxuHXsdcf.mjs +0 -7
  253. package/browser/esm/BGFWI1a1PmU8_hCE.mjs +0 -7
  254. package/browser/esm/BI6JAQCQx1V0F2aC.mjs +0 -7
  255. package/browser/esm/BIYg30d_9HaluFFz.mjs +0 -7
  256. package/browser/esm/BKL-uyBp_OE47lXd.mjs +0 -7
  257. package/browser/esm/BMwJCtLAYUW8wExX.mjs +0 -13
  258. package/browser/esm/BNOfK-lGWF2S8vQE.mjs +0 -7
  259. package/browser/esm/Ba433v6lQUMtECiY.mjs +0 -7
  260. package/browser/esm/BbZWfDW2LUyjqUDy.mjs +0 -7
  261. package/browser/esm/C238uBmZN1XXqMUb.mjs +0 -7
  262. package/browser/esm/C34whwRkHO0lhq4-.mjs +0 -7
  263. package/browser/esm/C6FEpAqSZoW5Hgte.mjs +0 -7
  264. package/browser/esm/COlW5ULL29SUKN1Z.mjs +0 -7
  265. package/browser/esm/CRyxOj2xPj9qe9LK.mjs +0 -7
  266. package/browser/esm/CVyVvtlJuCTn4MDh.mjs +0 -7
  267. package/browser/esm/CapeIfjWq-_BHMlE.mjs +0 -7
  268. package/browser/esm/CcQqGNgK2CsgNtuD.mjs +0 -7
  269. package/browser/esm/CdZSxrk3k1Lx6G8W.mjs +0 -7
  270. package/browser/esm/CdchvB_wAbv_6Whw.mjs +0 -7
  271. package/browser/esm/Cf8eDl3Tu5NAWWwG.mjs +0 -7
  272. package/browser/esm/Cfq9tttQlsKvfaCr.mjs +0 -7
  273. package/browser/esm/ClR6uLJoM-xKVYEc.mjs +0 -7
  274. package/browser/esm/Cnl_e-EYkZ3CLbi2.mjs +0 -7
  275. package/browser/esm/CtRS2ZCPF7IH_mXe.mjs +0 -7
  276. package/browser/esm/CuV-bwi1vcXAqFUY.mjs +0 -7
  277. package/browser/esm/CwVE0qelO_xgf-l1.mjs +0 -7
  278. package/browser/esm/D1Dzlta8ZVy08ng6.mjs +0 -7
  279. package/browser/esm/D1TjRQiHLWhpl-dl.mjs +0 -7
  280. package/browser/esm/D8BJ-y3ulgO_ezrj.mjs +0 -10
  281. package/browser/esm/DTDXNEbHVnnZONNL.mjs +0 -7
  282. package/browser/esm/DTWfi8Dl-c2s5moT.mjs +0 -7
  283. package/browser/esm/DYVBXcu1r5KRLB-1.mjs +0 -7
  284. package/browser/esm/DZjWyWMvr2XHQrBg.mjs +0 -7
  285. package/browser/esm/DhHK4QmASvgAq9Xy.mjs +0 -7
  286. package/browser/esm/DoFV2S6Su86IN5Ul.mjs +0 -7
  287. package/browser/esm/Dq3ybkgattcCsF_4.mjs +0 -7
  288. package/browser/esm/DqWoZ4TjweoJWX3o.mjs +0 -7
  289. package/browser/esm/DtXxHirBm16ldE1l.mjs +0 -7
  290. package/browser/esm/DtuWZG6c_8vKRSdr.mjs +0 -7
  291. package/browser/esm/FBG8XXdIMd9PfUIo.mjs +0 -7
  292. package/browser/esm/Nh7JiwvF01PblHQ0.mjs +0 -7
  293. package/browser/esm/PVYiH9vBQM6rqXI4.mjs +0 -7
  294. package/browser/esm/U5-LDZQ0qkJ2Y-p8.mjs +0 -7
  295. package/browser/esm/XhQDWZu47oe6bwHh.mjs +0 -7
  296. package/browser/esm/_BjU6TtI-mQfFpfy.mjs +0 -7
  297. package/browser/esm/gOUfyCw957TzcbNB.mjs +0 -7
  298. package/browser/esm/lmkbfs9sNc7f0oe5.mjs +0 -7
  299. package/browser/esm/naa0kcRwxHEYGaQB.mjs +0 -7
  300. package/browser/esm/qxOkQutRxmAi1vRh.mjs +0 -7
  301. package/browser/esm/tMSro0g2GM5BBTIH.mjs +0 -7
  302. package/cdn/assets/B-kFRtzNNkf4_SiP.js +0 -1701
  303. package/cdn/assets/BAzGoI9gE2G3F3on.js +0 -637
  304. package/cdn/assets/BLqaorJ5Wl-1YOoy.js +0 -3875
  305. package/cdn/assets/BQON-ToGsIBPrPkM.js +0 -1371
  306. package/cdn/assets/CHTspRZD2v_dU_eV.js +0 -22
  307. package/cdn/assets/CMBDD1Mjde6UL5ep.js +0 -84
  308. package/cdn/assets/CwdMjMPFdIs8SAV0.js +0 -1358
  309. package/cdn/assets/DUtu7r6CzW4dtW3E.js +0 -50
  310. package/cdn/assets/Dr5X-ng9wbwUWVr4.js +0 -41
  311. package/cdn/assets/Dvj7UEckqOBrgs9i.js +0 -3947
  312. package/cdn/assets/KtKlo5mM4kTTfFgi.js +0 -46
  313. package/cdn/assets/NTINjW8JjyZudT8s.js +0 -13449
  314. package/cdn/assets/R9RwlorPWfftoboH.js +0 -2373
@@ -1,3875 +0,0 @@
1
- import { r as re } from "./BlYoycYtR-sUp0iC.js";
2
- /**
3
- * @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.4.13
4
- *
5
- * (C) 2025-present SheetXL Inc. & Michael T. Ford
6
- * License: The license can be found at https://www.sheetxl.com/license.
7
- */
8
- function Hr(e, t) {
9
- for (var n = e.length, r = 0; r < n; ++r) if (t(e[r], r)) return !0;
10
- return !1;
11
- }
12
- function ro(e, t) {
13
- for (var n = e.length, r = 0; r < n; ++r) if (t(e[r], r)) return e[r];
14
- return null;
15
- }
16
- function pi(e) {
17
- var t = e;
18
- if (t === void 0) {
19
- if (typeof navigator > "u" || !navigator) return "";
20
- t = navigator.userAgent || "";
21
- }
22
- return t.toLowerCase();
23
- }
24
- function Er(e, t) {
25
- try {
26
- return new RegExp(e, "g").exec(t);
27
- } catch {
28
- return null;
29
- }
30
- }
31
- function Sr(e) {
32
- return e.replace(/_/g, ".");
33
- }
34
- function mn(e, t) {
35
- var n = null, r = "-1";
36
- return Hr(e, function(i) {
37
- var o = Er("(" + i.test + ")((?:\\/|\\s|:)([0-9|\\.|_]+))?", t);
38
- return !(!o || i.brand || (n = i, r = o[3] || "-1", i.versionAlias ? r = i.versionAlias : i.versionTest && (r = function(a, s) {
39
- var u = Er("(" + a + ")((?:\\/|\\s|:)([0-9|\\.|_]+))", s);
40
- return u ? u[3] : "";
41
- }(i.versionTest.toLowerCase(), t) || r), r = Sr(r), 0));
42
- }), { preset: n, version: r };
43
- }
44
- function zn(e, t) {
45
- var n = { brand: "", version: "-1" };
46
- return Hr(e, function(r) {
47
- var i = io(t, r);
48
- return !!i && (n.brand = r.id, n.version = r.versionAlias || i.version, n.version !== "-1");
49
- }), n;
50
- }
51
- function io(e, t) {
52
- return ro(e, function(n) {
53
- var r = n.brand;
54
- return Er("" + t.test, r.toLowerCase());
55
- });
56
- }
57
- var di = [{ test: "phantomjs", id: "phantomjs" }, { test: "whale", id: "whale" }, { test: "edgios|edge|edg", id: "edge" }, { test: "msie|trident|windows phone", id: "ie", versionTest: "iemobile|msie|rv" }, { test: "miuibrowser", id: "miui browser" }, { test: "samsungbrowser", id: "samsung internet" }, { test: "samsung", id: "samsung internet", versionTest: "version" }, { test: "chrome|crios", id: "chrome" }, { test: "firefox|fxios", id: "firefox" }, { test: "android", id: "android browser", versionTest: "version" }, { test: "safari|iphone|ipad|ipod", id: "safari", versionTest: "version" }], hi = [{ test: "(?=.*applewebkit/(53[0-7]|5[0-2]|[0-4]))(?=.*\\schrome)", id: "chrome", versionTest: "chrome" }, { test: "chromium", id: "chrome" }, { test: "whale", id: "chrome", versionAlias: "-1", brand: !0 }], sr = [{ test: "applewebkit", id: "webkit", versionTest: "applewebkit|safari" }], oo = [{ test: "(?=(iphone|ipad))(?!(.*version))", id: "webview" }, { test: "(?=(android|iphone|ipad))(?=.*(naver|daum|; wv))", id: "webview" }, { test: "webview", id: "webview" }], gi = [{ test: "windows phone", id: "windows phone" }, { test: "windows 2000", id: "window", versionAlias: "5.0" }, { test: "windows nt", id: "window" }, { test: "win32|windows", id: "window" }, { test: "iphone|ipad|ipod", id: "ios", versionTest: "iphone os|cpu os" }, { test: "macos|macintel|mac os x", id: "mac" }, { test: "android|linux armv81", id: "android" }, { test: "tizen", id: "tizen" }, { test: "webos|web0s", id: "webos" }];
58
- function vi(e) {
59
- return !!mn(oo, e).preset;
60
- }
61
- function la(e) {
62
- for (var t = [], n = 1; n < arguments.length; n++) t[n - 1] = arguments[n];
63
- return t.map(function(r) {
64
- return r.split(" ").map(function(i) {
65
- return i ? "" + e + i : "";
66
- }).join(" ");
67
- }).join(" ");
68
- }
69
- function Ne(e, t) {
70
- return function(n) {
71
- n && (e[t] = n);
72
- };
73
- }
74
- function ao(e, t, n) {
75
- return function(r) {
76
- r && (e[t][n] = r);
77
- };
78
- }
79
- var qr = "undefined", so = typeof window !== qr, fa = typeof document !== qr && document, pa = [{ open: "(", close: ")" }, { open: '"', close: '"' }, { open: "'", close: "'" }, { open: '\\"', close: '\\"' }, { open: "\\'", close: "\\'" }], It = 1e-7, Gn = { cm: function(e) {
80
- return 96 * e / 2.54;
81
- }, mm: function(e) {
82
- return 96 * e / 254;
83
- }, in: function(e) {
84
- return 96 * e;
85
- }, pt: function(e) {
86
- return 96 * e / 72;
87
- }, pc: function(e) {
88
- return 96 * e / 6;
89
- }, "%": function(e, t) {
90
- return e * t / 100;
91
- }, vw: function(e, t) {
92
- return t === void 0 && (t = window.innerWidth), e / 100 * t;
93
- }, vh: function(e, t) {
94
- return t === void 0 && (t = window.innerHeight), e / 100 * t;
95
- }, vmax: function(e, t) {
96
- return t === void 0 && (t = Math.max(window.innerWidth, window.innerHeight)), e / 100 * t;
97
- }, vmin: function(e, t) {
98
- return t === void 0 && (t = Math.min(window.innerWidth, window.innerHeight)), e / 100 * t;
99
- } };
100
- function mi(e, t, n, r) {
101
- return (e * r + t * n) / (n + r);
102
- }
103
- function Lr(e) {
104
- return typeof e === qr;
105
- }
106
- function Re(e) {
107
- return e && typeof e == "object";
108
- }
109
- function ie(e) {
110
- return Array.isArray(e);
111
- }
112
- function fn(e) {
113
- return typeof e == "string";
114
- }
115
- function Vn(e) {
116
- return typeof e == "number";
117
- }
118
- function uo(e) {
119
- return typeof e == "function";
120
- }
121
- function co(e, t, n, r, i) {
122
- return Dr(e, t, n) ? n : function(o, a, s, u, c) {
123
- for (var p, f = function(h) {
124
- var g = a[h].trim();
125
- if (g === o.close && !Dr(o, a, h)) return { value: h };
126
- var v = h, m = xe(c, function(x) {
127
- return x.open === g;
128
- });
129
- if (m && (v = co(m, a, h, u, c)), v === -1) return p = h, "break";
130
- p = h = v;
131
- }, l = s; l < u; ++l) {
132
- var d = f(l);
133
- if (l = p, typeof d == "object") return d.value;
134
- if (d === "break") break;
135
- }
136
- return -1;
137
- }(e, t, n + 1, r, i);
138
- }
139
- function Dr(e, t, n) {
140
- if (!e.ignore) return null;
141
- var r = t.slice(Math.max(n - 3, 0), n + 3).join("");
142
- return new RegExp(e.ignore).exec(r);
143
- }
144
- function jr(e, t) {
145
- var n = fn(t) ? { separator: t } : t, r = n.separator, i = r === void 0 ? "," : r, o = n.isSeparateFirst, a = n.isSeparateOnlyOpenClose, s = n.isSeparateOpenClose, u = s === void 0 ? a : s, c = n.openCloseCharacters, p = c === void 0 ? pa : c, f = p.map(function(b) {
146
- var w = b.open, _ = b.close;
147
- return w === _ ? w : w + "|" + _;
148
- }).join("|"), l = new RegExp("(\\s*" + i + "\\s*|" + f + "|\\s+)", "g"), d = e.split(l).filter(function(b) {
149
- return b && b !== "undefined";
150
- }), h = d.length, g = [], v = [];
151
- function m() {
152
- return !!v.length && (g.push(v.join("")), v = [], !0);
153
- }
154
- for (var x, y = function(b) {
155
- var w = d[b].trim(), _ = b, M = xe(p, function(C) {
156
- return C.open === w;
157
- }), B = xe(p, function(C) {
158
- return C.close === w;
159
- });
160
- if (M) {
161
- if ((_ = co(M, d, b, h, p)) !== -1 && u) return m() && o ? (x = b, "break") : (g.push(d.slice(b, _ + 1).join("")), b = _, o ? (x = b, "break") : (x = b, "continue"));
162
- } else {
163
- if (B && !Dr(B, d, b)) {
164
- var S = function() {
165
- for (var C = 0, O = 0, k = arguments.length; O < k; O++) C += arguments[O].length;
166
- var z = Array(C), R = 0;
167
- for (O = 0; O < k; O++) for (var A = arguments[O], F = 0, G = A.length; F < G; F++, R++) z[R] = A[F];
168
- return z;
169
- }(p);
170
- return S.splice(p.indexOf(B), 1), { value: jr(e, { separator: i, isSeparateFirst: o, isSeparateOnlyOpenClose: a, isSeparateOpenClose: u, openCloseCharacters: S }) };
171
- }
172
- if (function(C, O) {
173
- return (O === "" || O == " ") && (C === "" || C == " ") || C === O;
174
- }(w, i) && !a) return m(), o ? (x = b, "break") : (x = b, "continue");
175
- }
176
- _ === -1 && (_ = h - 1), v.push(d.slice(b, _ + 1).join("")), x = b = _;
177
- }, E = 0; E < h; ++E) {
178
- var D = y(E);
179
- if (E = x, typeof D == "object") return D.value;
180
- if (D === "break") break;
181
- }
182
- return v.length && g.push(v.join("")), g;
183
- }
184
- function wn(e) {
185
- return jr(e, "");
186
- }
187
- function bn(e) {
188
- return jr(e, ",");
189
- }
190
- function nr(e) {
191
- var t = /^([^\d|e|\-|\+]*)((?:\d|\.|-|e-|e\+)+)(\S*)$/g.exec(e);
192
- if (!t) return { prefix: "", unit: "", value: NaN };
193
- var n = t[1], r = t[2];
194
- return { prefix: n, unit: t[3], value: parseFloat(r) };
195
- }
196
- function Kn() {
197
- return Date.now ? Date.now() : (/* @__PURE__ */ new Date()).getTime();
198
- }
199
- function an(e, t, n) {
200
- n === void 0 && (n = -1);
201
- for (var r = e.length, i = 0; i < r; ++i) if (t(e[i], i, e)) return i;
202
- return n;
203
- }
204
- function xe(e, t, n) {
205
- var r = an(e, t);
206
- return r > -1 ? e[r] : n;
207
- }
208
- var bi, xi, yi, lo = (bi = Kn(), (xi = so && (window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.msRequestAnimationFrame)) ? xi.bind(window) : function(e) {
209
- var t = Kn();
210
- return setTimeout(function() {
211
- e(t - bi);
212
- }, 1e3 / 60);
213
- }), da = (yi = so && (window.cancelAnimationFrame || window.webkitCancelAnimationFrame || window.mozCancelAnimationFrame || window.msCancelAnimationFrame)) ? yi.bind(window) : function(e) {
214
- clearTimeout(e);
215
- };
216
- function Cn(e) {
217
- return Object.keys(e);
218
- }
219
- function ue(e, t) {
220
- var n = nr(e), r = n.value, i = n.unit;
221
- if (Re(t)) {
222
- var o = t[i];
223
- if (o) {
224
- if (uo(o)) return o(r);
225
- if (Gn[i]) return Gn[i](r, o);
226
- }
227
- } else if (i === "%") return r * t / 100;
228
- return Gn[i] ? Gn[i](r) : r;
229
- }
230
- function Mr(e, t, n) {
231
- return Math.max(t, Math.min(e, n));
232
- }
233
- function Ei(e, t, n, r) {
234
- return r === void 0 && (r = e[0] / e[1]), [[St(t[0], It), St(t[0] / r, It)], [St(t[1] * r, It), St(t[1], It)]].filter(function(i) {
235
- return i.every(function(o, a) {
236
- var s = t[a], u = St(s, It);
237
- return n ? o <= s || o <= u : o >= s || o >= u;
238
- });
239
- })[0] || e;
240
- }
241
- function wr(e) {
242
- for (var t = e.length, n = 0, r = t - 1; r >= 0; --r) n += e[r];
243
- return t ? n / t : 0;
244
- }
245
- function be(e, t) {
246
- var n = t[0] - e[0], r = t[1] - e[1], i = Math.atan2(r, n);
247
- return i >= 0 ? i : i + 2 * Math.PI;
248
- }
249
- function Si(e) {
250
- var t = function(i) {
251
- return [0, 1].map(function(o) {
252
- return wr(i.map(function(a) {
253
- return a[o];
254
- }));
255
- });
256
- }(e), n = be(t, e[0]), r = be(t, e[1]);
257
- return n < r && r - n < Math.PI || n > r && r - n < -Math.PI ? 1 : -1;
258
- }
259
- function xn(e, t) {
260
- return Math.sqrt(Math.pow((t ? t[0] : 0) - e[0], 2) + Math.pow((t ? t[1] : 0) - e[1], 2));
261
- }
262
- function St(e, t) {
263
- if (!t) return e;
264
- var n = 1 / t;
265
- return Math.round(e / t) / n;
266
- }
267
- function Di(e, t) {
268
- return e.forEach(function(n, r) {
269
- e[r] = St(e[r], t);
270
- }), e;
271
- }
272
- function Ce(e, t) {
273
- return e.classList ? e.classList.contains(t) : !!e.className.match(new RegExp("(\\s|^)" + t + "(\\s|$)"));
274
- }
275
- function fo(e, t) {
276
- e.classList ? e.classList.add(t) : e.className += " " + t;
277
- }
278
- function po(e, t) {
279
- if (e.classList) e.classList.remove(t);
280
- else {
281
- var n = new RegExp("(\\s|^)" + t + "(\\s|$)");
282
- e.className = e.className.replace(n, " ");
283
- }
284
- }
285
- function te(e, t, n, r) {
286
- e.addEventListener(t, n, r);
287
- }
288
- function Vt(e, t, n, r) {
289
- e.removeEventListener(t, n, r);
290
- }
291
- function Vr(e) {
292
- return e?.ownerDocument || fa;
293
- }
294
- function Ur(e) {
295
- return Vr(e).documentElement;
296
- }
297
- function ze(e) {
298
- return Vr(e).body;
299
- }
300
- function Fe(e) {
301
- var t;
302
- return ((t = e?.ownerDocument) === null || t === void 0 ? void 0 : t.defaultView) || window;
303
- }
304
- function ho(e) {
305
- return e && "postMessage" in e && "blur" in e && "self" in e;
306
- }
307
- function Kr(e) {
308
- return Re(e) && e.nodeName && e.nodeType && "ownerDocument" in e;
309
- }
310
- function ha(e, t, n, r, i, o) {
311
- for (var a = 0; a < i; ++a) {
312
- var s = n + a * i, u = r + a * i;
313
- e[s] += e[u] * o, t[s] += t[u] * o;
314
- }
315
- }
316
- function ga(e, t, n, r, i) {
317
- for (var o = 0; o < i; ++o) {
318
- var a = n + o * i, s = r + o * i, u = e[a], c = t[a];
319
- e[a] = e[s], e[s] = u, t[a] = t[s], t[s] = c;
320
- }
321
- }
322
- function va(e, t, n, r, i) {
323
- for (var o = 0; o < r; ++o) {
324
- var a = n + o * r;
325
- e[a] /= i, t[a] /= i;
326
- }
327
- }
328
- function We(e, t) {
329
- t === void 0 && (t = Math.sqrt(e.length));
330
- for (var n = e.slice(), r = _t(t), i = 0; i < t; ++i) {
331
- var o = t * i + i;
332
- if (!St(n[o], It)) {
333
- for (var a = i + 1; a < t; ++a) if (n[t * i + a]) {
334
- ga(n, r, i, a, t);
335
- break;
336
- }
337
- }
338
- if (!St(n[o], It)) return [];
339
- for (va(n, r, i, t, n[o]), a = 0; a < t; ++a) {
340
- var s = a, u = n[a + i * t];
341
- St(u, It) && i !== a && ha(n, r, s, i, t, -u);
342
- }
343
- }
344
- return r;
345
- }
346
- function Rn(e, t) {
347
- for (var n = e.slice(), r = e.length; r < t - 1; ++r) n[r] = 0;
348
- return n[t - 1] = 1, n;
349
- }
350
- function He(e, t, n) {
351
- if (t === void 0 && (t = Math.sqrt(e.length)), t === n) return e;
352
- for (var r = _t(n), i = Math.min(t, n), o = 0; o < i - 1; ++o) {
353
- for (var a = 0; a < i - 1; ++a) r[o * n + a] = e[o * t + a];
354
- r[(o + 1) * n - 1] = e[(o + 1) * t - 1], r[(n - 1) * n + o] = e[(t - 1) * t + o];
355
- }
356
- return r[n * n - 1] = e[t * t - 1], r;
357
- }
358
- function Qn(e) {
359
- for (var t = [], n = 1; n < arguments.length; n++) t[n - 1] = arguments[n];
360
- var r = _t(e);
361
- return t.forEach(function(i) {
362
- r = Wt(r, i, e);
363
- }), r;
364
- }
365
- function Wt(e, t, n) {
366
- n === void 0 && (n = Math.sqrt(e.length));
367
- var r = [], i = e.length / n, o = t.length / i;
368
- if (!i) return t;
369
- if (!o) return e;
370
- for (var a = 0; a < n; ++a) for (var s = 0; s < o; ++s) {
371
- r[s * n + a] = 0;
372
- for (var u = 0; u < i; ++u) r[s * n + a] += e[u * n + a] * t[s * i + u];
373
- }
374
- return r;
375
- }
376
- function kt(e, t) {
377
- for (var n = Math.min(e.length, t.length), r = e.slice(), i = 0; i < n; ++i) r[i] = r[i] + t[i];
378
- return r;
379
- }
380
- function ut(e, t) {
381
- for (var n = Math.min(e.length, t.length), r = e.slice(), i = 0; i < n; ++i) r[i] = r[i] - t[i];
382
- return r;
383
- }
384
- function ma(e, t) {
385
- return t === void 0 && (t = e.length === 6), t ? [e[0], e[1], 0, e[2], e[3], 0, e[4], e[5], 1] : e;
386
- }
387
- function go(e, t) {
388
- return t === void 0 && (t = e.length === 9), t ? [e[0], e[1], e[3], e[4], e[6], e[7]] : e;
389
- }
390
- function Se(e, t, n) {
391
- n === void 0 && (n = t.length);
392
- var r = Wt(e, t, n), i = r[n - 1];
393
- return r.map(function(o) {
394
- return o / i;
395
- });
396
- }
397
- function ba(e, t) {
398
- return Wt(e, [1, 0, 0, 0, 0, Math.cos(t), Math.sin(t), 0, 0, -Math.sin(t), Math.cos(t), 0, 0, 0, 0, 1], 4);
399
- }
400
- function xa(e, t) {
401
- return Wt(e, [Math.cos(t), 0, -Math.sin(t), 0, 0, 1, 0, 0, Math.sin(t), 0, Math.cos(t), 0, 0, 0, 0, 1], 4);
402
- }
403
- function ya(e, t) {
404
- return Wt(e, rr(t, 4));
405
- }
406
- function In(e, t) {
407
- var n = t[0], r = n === void 0 ? 1 : n, i = t[1], o = i === void 0 ? 1 : i, a = t[2];
408
- return Wt(e, [r, 0, 0, 0, 0, o, 0, 0, 0, 0, a === void 0 ? 1 : a, 0, 0, 0, 0, 1], 4);
409
- }
410
- function ur(e, t) {
411
- var n = t[0], r = n === void 0 ? 0 : n, i = t[1], o = i === void 0 ? 0 : i, a = t[2];
412
- return Wt(e, [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, r, o, a === void 0 ? 0 : a, 1], 4);
413
- }
414
- function Mi(e, t) {
415
- return Wt(e, t, 4);
416
- }
417
- function rr(e, t) {
418
- var n = Math.cos(e), r = Math.sin(e), i = _t(t);
419
- return i[0] = n, i[1] = r, i[t] = -r, i[t + 1] = n, i;
420
- }
421
- function _t(e) {
422
- for (var t = e * e, n = [], r = 0; r < t; ++r) n[r] = r % (e + 1) ? 0 : 1;
423
- return n;
424
- }
425
- function vo(e, t) {
426
- for (var n = _t(t), r = Math.min(e.length, t - 1), i = 0; i < r; ++i) n[(t + 1) * i] = e[i];
427
- return n;
428
- }
429
- function qe(e, t) {
430
- for (var n = _t(t), r = Math.min(e.length, t - 1), i = 0; i < r; ++i) n[t * (t - 1) + i] = e[i];
431
- return n;
432
- }
433
- function mo(e, t, n, r, i, o, a, s) {
434
- var u = e[0], c = e[1], p = t[0], f = t[1], l = n[0], d = n[1], h = r[0], g = r[1], v = i[0], m = i[1], x = o[0], y = o[1], E = a[0], D = a[1], b = s[0], w = s[1], _ = We([u, 0, p, 0, l, 0, h, 0, c, 0, f, 0, d, 0, g, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, u, 0, p, 0, l, 0, h, 0, c, 0, f, 0, d, 0, g, 0, 1, 0, 1, 0, 1, 0, 1, -v * u, -m * u, -x * p, -y * p, -E * l, -D * l, -b * h, -w * h, -v * c, -m * c, -x * f, -y * f, -E * d, -D * d, -b * g, -w * g], 8);
435
- if (!_.length) return [];
436
- var M = Wt(_, [v, m, x, y, E, D, b, w], 8);
437
- return M[8] = 1, He(function(B, S) {
438
- S === void 0 && (S = Math.sqrt(B.length));
439
- for (var C = [], O = 0; O < S; ++O) for (var k = 0; k < S; ++k) C[k * S + O] = B[S * O + k];
440
- return C;
441
- }(M), 3, 4);
442
- }
443
- var yn = function() {
444
- return yn = Object.assign || function(e) {
445
- for (var t, n = 1, r = arguments.length; n < r; n++) for (var i in t = arguments[n]) Object.prototype.hasOwnProperty.call(t, i) && (e[i] = t[i]);
446
- return e;
447
- }, yn.apply(this, arguments);
448
- };
449
- function Qr(e, t) {
450
- return t === void 0 && (t = 0), Ue(sn(e, t));
451
- }
452
- function Ue(e) {
453
- var t = [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1];
454
- return e.forEach(function(n) {
455
- var r = n.matrixFunction, i = n.functionValue;
456
- r && (t = r(t, i));
457
- }), t;
458
- }
459
- function sn(e, t) {
460
- return t === void 0 && (t = 0), (ie(e) ? e : wn(e)).map(function(n) {
461
- var r, i = !(r = /([^(]*)\(([\s\S]*)\)([\s\S]*)/g.exec(n)) || r.length < 4 ? {} : { prefix: r[1], value: r[2], suffix: r[3] }, o = i.prefix, a = i.value, s = null, u = o, c = "";
462
- if (o === "translate" || o === "translateX" || o === "translate3d") {
463
- var p = Re(t) ? yn(yn({}, t), { "o%": t["%"] }) : { "%": t, "o%": t }, f = bn(a).map(function(M, B) {
464
- return p["%"] = B === 0 && "x%" in p ? t["x%"] : B === 1 && "y%" in p ? t["y%"] : t["o%"], ue(M, p);
465
- }), l = f[0], d = f[1], h = d === void 0 ? 0 : d, g = f[2];
466
- s = ur, c = [l, h, g === void 0 ? 0 : g];
467
- } else if (o === "translateY") s = ur, c = [0, h = ue(a, Re(t) ? yn({ "%": t["y%"] }, t) : { "%": t }), 0];
468
- else if (o === "translateZ") s = ur, c = [0, 0, parseFloat(a)];
469
- else if (o === "scale" || o === "scale3d") {
470
- var v = bn(a).map(function(M) {
471
- return parseFloat(M);
472
- }), m = v[0], x = v[1], y = x === void 0 ? m : x, E = v[2];
473
- s = In, c = [m, y, E === void 0 ? 1 : E];
474
- } else if (o === "scaleX") s = In, c = [m = parseFloat(a), 1, 1];
475
- else if (o === "scaleY") s = In, c = [1, y = parseFloat(a), 1];
476
- else if (o === "scaleZ") s = In, c = [1, 1, parseFloat(a)];
477
- else if (o === "rotate" || o === "rotateZ" || o === "rotateX" || o === "rotateY") {
478
- var D = nr(a), b = D.unit, w = D.value;
479
- o === "rotate" || o === "rotateZ" ? (u = "rotateZ", s = ya) : o === "rotateX" ? s = ba : o === "rotateY" && (s = xa), c = b === "rad" ? w : w * Math.PI / 180;
480
- } else if (o === "matrix3d") s = Mi, c = bn(a).map(function(M) {
481
- return parseFloat(M);
482
- });
483
- else if (o === "matrix") {
484
- var _ = bn(a).map(function(M) {
485
- return parseFloat(M);
486
- });
487
- s = Mi, c = [_[0], _[1], 0, 0, _[2], _[3], 0, 0, 0, 0, 1, 0, _[4], _[5], 0, 1];
488
- } else u = "";
489
- return { name: o, functionName: u, value: a, matrixFunction: s, functionValue: c };
490
- });
491
- }
492
- var Ea = function() {
493
- function e() {
494
- this.keys = [], this.values = [];
495
- }
496
- var t = e.prototype;
497
- return t.get = function(n) {
498
- return this.values[this.keys.indexOf(n)];
499
- }, t.set = function(n, r) {
500
- var i = this.keys, o = this.values, a = i.indexOf(n), s = a === -1 ? i.length : a;
501
- i[s] = n, o[s] = r;
502
- }, e;
503
- }(), Sa = function() {
504
- function e() {
505
- this.object = {};
506
- }
507
- var t = e.prototype;
508
- return t.get = function(n) {
509
- return this.object[n];
510
- }, t.set = function(n, r) {
511
- this.object[n] = r;
512
- }, e;
513
- }(), Da = typeof Map == "function", Ma = function() {
514
- function e() {
515
- }
516
- var t = e.prototype;
517
- return t.connect = function(n, r) {
518
- this.prev = n, this.next = r, n && (n.next = this), r && (r.prev = this);
519
- }, t.disconnect = function() {
520
- var n = this.prev, r = this.next;
521
- n && (n.next = r), r && (r.prev = n);
522
- }, t.getIndex = function() {
523
- for (var n = this, r = -1; n; ) n = n.prev, ++r;
524
- return r;
525
- }, e;
526
- }(), wa = function() {
527
- function e(n, r, i, o, a, s, u, c) {
528
- this.prevList = n, this.list = r, this.added = i, this.removed = o, this.changed = a, this.maintained = s, this.changedBeforeAdded = u, this.fixed = c;
529
- }
530
- var t = e.prototype;
531
- return Object.defineProperty(t, "ordered", { get: function() {
532
- return this.cacheOrdered || this.caculateOrdered(), this.cacheOrdered;
533
- }, enumerable: !0, configurable: !0 }), Object.defineProperty(t, "pureChanged", { get: function() {
534
- return this.cachePureChanged || this.caculateOrdered(), this.cachePureChanged;
535
- }, enumerable: !0, configurable: !0 }), t.caculateOrdered = function() {
536
- var n = function(o, a) {
537
- var s = [], u = [];
538
- return o.forEach(function(c) {
539
- var p = c[0], f = c[1], l = new Ma();
540
- s[p] = l, u[f] = l;
541
- }), s.forEach(function(c, p) {
542
- c.connect(s[p - 1]);
543
- }), o.filter(function(c, p) {
544
- return !a[p];
545
- }).map(function(c, p) {
546
- var f = c[0], l = c[1];
547
- if (f === l) return [0, 0];
548
- var d = s[f], h = u[l - 1], g = d.getIndex();
549
- return d.disconnect(), h ? d.connect(h, h.next) : d.connect(void 0, s[0]), [g, d.getIndex()];
550
- });
551
- }(this.changedBeforeAdded, this.fixed), r = this.changed, i = [];
552
- this.cacheOrdered = n.filter(function(o, a) {
553
- var s = o[0], u = o[1], c = r[a], p = c[0], f = c[1];
554
- if (s !== u) return i.push([p, f]), !0;
555
- }), this.cachePureChanged = i;
556
- }, e;
557
- }();
558
- function bo(e, t, n) {
559
- var r = Da ? Map : n ? Sa : Ea, i = n || function(x) {
560
- return x;
561
- }, o = [], a = [], s = [], u = e.map(i), c = t.map(i), p = new r(), f = new r(), l = [], d = [], h = {}, g = [], v = 0, m = 0;
562
- return u.forEach(function(x, y) {
563
- p.set(x, y);
564
- }), c.forEach(function(x, y) {
565
- f.set(x, y);
566
- }), u.forEach(function(x, y) {
567
- var E = f.get(x);
568
- E === void 0 ? (++m, a.push(y)) : h[E] = m;
569
- }), c.forEach(function(x, y) {
570
- var E = p.get(x);
571
- E === void 0 ? (o.push(y), ++v) : (s.push([E, y]), m = h[y] || 0, l.push([E - m, y - v]), d.push(y === E), E !== y && g.push([E, y]));
572
- }), a.reverse(), new wa(e, t, o, a, g, s, l, d);
573
- }
574
- var wi, Ca = function() {
575
- function e(t, n) {
576
- t === void 0 && (t = []), this.findKeyCallback = n, this.list = [].slice.call(t);
577
- }
578
- return e.prototype.update = function(t) {
579
- var n = [].slice.call(t), r = bo(this.list, n, this.findKeyCallback);
580
- return this.list = n, r;
581
- }, e;
582
- }(), Cr = function(e, t) {
583
- return Cr = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, r) {
584
- n.__proto__ = r;
585
- } || function(n, r) {
586
- for (var i in r) r.hasOwnProperty(i) && (n[i] = r[i]);
587
- }, Cr(e, t);
588
- }, _a = typeof Map == "function" ? void 0 : (wi = 0, function(e) {
589
- return e.__DIFF_KEY__ || (e.__DIFF_KEY__ = ++wi);
590
- }), xo = function(e) {
591
- function t(n) {
592
- return n === void 0 && (n = []), e.call(this, n, _a) || this;
593
- }
594
- return function(n, r) {
595
- function i() {
596
- this.constructor = n;
597
- }
598
- Cr(n, r), n.prototype = r === null ? Object.create(r) : (i.prototype = r.prototype, new i());
599
- }(t, e), t;
600
- }(Ca), _r = function() {
601
- return _r = Object.assign || function(e) {
602
- for (var t, n = 1, r = arguments.length; n < r; n++) for (var i in t = arguments[n]) Object.prototype.hasOwnProperty.call(t, i) && (e[i] = t[i]);
603
- return e;
604
- }, _r.apply(this, arguments);
605
- }, yo = function() {
606
- function e() {
607
- this._events = {};
608
- }
609
- var t = e.prototype;
610
- return t.on = function(n, r) {
611
- if (Re(n)) for (var i in n) this.on(i, n[i]);
612
- else this._addEvent(n, r, {});
613
- return this;
614
- }, t.off = function(n, r) {
615
- if (n) if (Re(n)) for (var i in n) this.off(i);
616
- else if (r) {
617
- var o = this._events[n];
618
- if (o) {
619
- var a = an(o, function(s) {
620
- return s.listener === r;
621
- });
622
- a > -1 && o.splice(a, 1);
623
- }
624
- } else this._events[n] = [];
625
- else this._events = {};
626
- return this;
627
- }, t.once = function(n, r) {
628
- var i = this;
629
- return r && this._addEvent(n, r, { once: !0 }), new Promise(function(o) {
630
- i._addEvent(n, o, { once: !0 });
631
- });
632
- }, t.emit = function(n, r) {
633
- var i = this;
634
- r === void 0 && (r = {});
635
- var o = this._events[n];
636
- if (!n || !o) return !0;
637
- var a = !1;
638
- return r.eventType = n, r.stop = function() {
639
- a = !0;
640
- }, r.currentTarget = this, function() {
641
- for (var s = 0, u = 0, c = arguments.length; u < c; u++) s += arguments[u].length;
642
- var p = Array(s), f = 0;
643
- for (u = 0; u < c; u++) for (var l = arguments[u], d = 0, h = l.length; d < h; d++, f++) p[f] = l[d];
644
- return p;
645
- }(o).forEach(function(s) {
646
- s.listener(r), s.once && i.off(n, s.listener);
647
- }), !a;
648
- }, t.trigger = function(n, r) {
649
- return r === void 0 && (r = {}), this.emit(n, r);
650
- }, t._addEvent = function(n, r, i) {
651
- var o = this._events;
652
- o[n] = o[n] || [], o[n].push(_r({ listener: r }, i));
653
- }, e;
654
- }();
655
- function se(e) {
656
- return St(e, It);
657
- }
658
- function Ci(e) {
659
- return e.length < 3 ? 0 : Math.abs(function(t) {
660
- for (var n = 0, r = t.length - 1; r >= 0; --r) n += t[r];
661
- return n;
662
- }(e.map(function(t, n) {
663
- var r = e[n + 1] || e[0];
664
- return t[0] * r[1] - r[0] * t[1];
665
- }))) / 2;
666
- }
667
- function _i(e, t) {
668
- var n = t.width, r = t.height, i = t.left, o = t.top, a = en(e), s = a.minX, u = a.minY, c = a.maxX, p = a.maxY, f = n / (c - s), l = r / (p - u);
669
- return e.map(function(d) {
670
- return [i + (d[0] - s) * f, o + (d[1] - u) * l];
671
- });
672
- }
673
- function en(e) {
674
- var t = e.map(function(r) {
675
- return r[0];
676
- }), n = e.map(function(r) {
677
- return r[1];
678
- });
679
- return { minX: Math.min.apply(Math, t), minY: Math.min.apply(Math, n), maxX: Math.max.apply(Math, t), maxY: Math.max.apply(Math, n) };
680
- }
681
- function cr(e, t, n) {
682
- var r = e[0], i = e[1], o = en(t), a = o.minX, s = o.maxX, u = [[a, i], [s, i]], c = Jn(u[0], u[1]), p = Tr(t), f = [];
683
- if (p.forEach(function(h) {
684
- var g, v = Jn(h[0], h[1]), m = h[0];
685
- g = v, c.every(function(x, y) {
686
- return se(x - g[y]) === 0;
687
- }) ? f.push({ pos: e, line: h, type: "line" }) : Eo(Jr(c, v), [u, h]).forEach(function(x) {
688
- h.some(function(y) {
689
- return D = x, !se((E = y)[0] - D[0]) && !se(E[1] - D[1]);
690
- var E, D;
691
- }) ? f.push({ pos: x, line: h, type: "point" }) : se(m[1] - i) !== 0 && f.push({ pos: x, line: h, type: "intersection" });
692
- });
693
- }), xe(f, function(h) {
694
- return h[0] === r;
695
- })) return !0;
696
- var l = 0, d = {};
697
- return f.forEach(function(h) {
698
- var g = h.pos, v = h.type, m = h.line;
699
- if (!(g[0] > r)) if (v === "intersection") ++l;
700
- else {
701
- if (v === "line") return;
702
- if (v === "point") {
703
- var x = xe(m, function(D) {
704
- return D[1] !== i;
705
- }), y = d[g[0]], E = x[1] > i ? 1 : -1;
706
- y ? y !== E && ++l : d[g[0]] = E;
707
- }
708
- }
709
- }), l % 2 == 1;
710
- }
711
- function Jn(e, t) {
712
- var n = e[0], r = e[1], i = t[0] - n, o = t[1] - r;
713
- Math.abs(i) < It && (i = 0), Math.abs(o) < It && (o = 0);
714
- var a = 0, s = 0, u = 0;
715
- return i ? o ? (s = 1, u = -(a = -o / i) * n - r) : (s = 1, u = -r) : o && (a = -1, u = n), [a, s, u];
716
- }
717
- function Jr(e, t) {
718
- var n = e[0], r = e[1], i = e[2], o = t[0], a = t[1], s = t[2], u = n === 0 && o === 0, c = r === 0 && a === 0, p = [];
719
- if (u && c) return [];
720
- if (u) {
721
- var f = -i / r;
722
- return f !== -s / a ? [] : [[-1 / 0, f], [1 / 0, f]];
723
- }
724
- if (c) {
725
- var l = -i / n;
726
- return l !== -s / o ? [] : [[l, -1 / 0], [l, 1 / 0]];
727
- }
728
- if (n === 0) p = [[d = -(a * (h = -i / r) + s) / o, h]];
729
- else if (o === 0) p = [[d = -(r * (h = -s / a) + i) / n, h]];
730
- else if (r === 0) p = [[d = -i / n, h = -(o * d + s) / a]];
731
- else if (a === 0) p = [[d = -s / o, h = -(n * d + i) / r]];
732
- else {
733
- var d, h;
734
- p = [[d = (r * s - a * i) / (a * n - r * o), h = -(n * d + i) / r]];
735
- }
736
- return p.map(function(g) {
737
- return [g[0], g[1]];
738
- });
739
- }
740
- function Eo(e, t) {
741
- var n = t.map(function(f) {
742
- return [0, 1].map(function(l) {
743
- return [Math.min(f[0][l], f[1][l]), Math.max(f[0][l], f[1][l])];
744
- });
745
- }), r = [];
746
- if (e.length === 2) {
747
- var i = e[0], o = i[0], a = i[1];
748
- if (se(o - e[1][0])) {
749
- if (!se(a - e[1][1])) {
750
- var s = Math.max.apply(Math, n.map(function(f) {
751
- return f[0][0];
752
- })), u = Math.min.apply(Math, n.map(function(f) {
753
- return f[0][1];
754
- }));
755
- if (se(s - u) > 0) return [];
756
- r = [[s, a], [u, a]];
757
- }
758
- } else {
759
- var c = Math.max.apply(Math, n.map(function(f) {
760
- return f[1][0];
761
- })), p = Math.min.apply(Math, n.map(function(f) {
762
- return f[1][1];
763
- }));
764
- if (se(c - p) > 0) return [];
765
- r = [[o, c], [o, p]];
766
- }
767
- }
768
- return r.length || (r = e.filter(function(f) {
769
- var l = f[0], d = f[1];
770
- return n.every(function(h) {
771
- return 0 <= se(l - h[0][0]) && 0 <= se(h[0][1] - l) && 0 <= se(d - h[1][0]) && 0 <= se(h[1][1] - d);
772
- });
773
- })), r.map(function(f) {
774
- return [se(f[0]), se(f[1])];
775
- });
776
- }
777
- function Tr(e) {
778
- return function() {
779
- for (var t = 0, n = 0, r = arguments.length; n < r; n++) t += arguments[n].length;
780
- var i = Array(t), o = 0;
781
- for (n = 0; n < r; n++) for (var a = arguments[n], s = 0, u = a.length; s < u; s++, o++) i[o] = a[s];
782
- return i;
783
- }(e.slice(1), [e[0]]).map(function(t, n) {
784
- return [e[n], t];
785
- });
786
- }
787
- var Or = function(e, t) {
788
- return Or = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, r) {
789
- n.__proto__ = r;
790
- } || function(n, r) {
791
- for (var i in r) r.hasOwnProperty(i) && (n[i] = r[i]);
792
- }, Or(e, t);
793
- }, Gt = function() {
794
- return Gt = Object.assign || function(e) {
795
- for (var t, n = 1, r = arguments.length; n < r; n++) for (var i in t = arguments[n]) Object.prototype.hasOwnProperty.call(t, i) && (e[i] = t[i]);
796
- return e;
797
- }, Gt.apply(this, arguments);
798
- };
799
- function lr(e) {
800
- return 180 * (t = [e[0].clientX, e[0].clientY], r = (n = [e[1].clientX, e[1].clientY])[0] - t[0], i = n[1] - t[1], ((o = Math.atan2(i, r)) >= 0 ? o : o + 2 * Math.PI) / Math.PI);
801
- var t, n, r, i, o;
802
- }
803
- function Yn(e) {
804
- return e ? e.touches ? function(t) {
805
- for (var n = Math.min(t.length, 2), r = [], i = 0; i < n; ++i) r.push(Oi(t[i]));
806
- return r;
807
- }(e.touches) : [Oi(e)] : [];
808
- }
809
- function Ti(e, t, n) {
810
- var r = n.length, i = En(e, r), o = i.clientX, a = i.clientY, s = i.originalClientX, u = i.originalClientY, c = En(t, r), p = c.clientX, f = c.clientY, l = En(n, r);
811
- return { clientX: s, clientY: u, deltaX: o - p, deltaY: a - f, distX: o - l.clientX, distY: a - l.clientY };
812
- }
813
- function fr(e) {
814
- return Math.sqrt(Math.pow(e[0].clientX - e[1].clientX, 2) + Math.pow(e[0].clientY - e[1].clientY, 2));
815
- }
816
- function Oi(e) {
817
- return { clientX: e.clientX, clientY: e.clientY };
818
- }
819
- function En(e, t) {
820
- t === void 0 && (t = e.length);
821
- for (var n = { clientX: 0, clientY: 0, originalClientX: 0, originalClientY: 0 }, r = Math.min(e.length, t), i = 0; i < r; ++i) {
822
- var o = e[i];
823
- n.originalClientX += "originalClientX" in o ? o.originalClientX : o.clientX, n.originalClientY += "originalClientY" in o ? o.originalClientY : o.clientY, n.clientX += o.clientX, n.clientY += o.clientY;
824
- }
825
- return t ? { clientX: n.clientX / t, clientY: n.clientY / t, originalClientX: n.originalClientX / t, originalClientY: n.originalClientY / t } : n;
826
- }
827
- var pr = function() {
828
- function e(t) {
829
- this.prevClients = [], this.startClients = [], this.movement = 0, this.length = 0, this.startClients = t, this.prevClients = t, this.length = t.length;
830
- }
831
- return e.prototype.getAngle = function(t) {
832
- return t === void 0 && (t = this.prevClients), lr(t);
833
- }, e.prototype.getRotation = function(t) {
834
- return t === void 0 && (t = this.prevClients), lr(t) - lr(this.startClients);
835
- }, e.prototype.getPosition = function(t, n) {
836
- t === void 0 && (t = this.prevClients);
837
- var r = Ti(t || this.prevClients, this.prevClients, this.startClients), i = r.deltaX, o = r.deltaY;
838
- return this.movement += Math.sqrt(i * i + o * o), this.prevClients = t, r;
839
- }, e.prototype.getPositions = function(t) {
840
- t === void 0 && (t = this.prevClients);
841
- for (var n = this.prevClients, r = this.startClients, i = Math.min(this.length, n.length), o = [], a = 0; a < i; ++a) o[a] = Ti([t[a]], [n[a]], [r[a]]);
842
- return o;
843
- }, e.prototype.getMovement = function(t) {
844
- var n = this.movement;
845
- if (!t) return n;
846
- var r = En(t, this.length), i = En(this.prevClients, this.length), o = r.clientX - i.clientX, a = r.clientY - i.clientY;
847
- return Math.sqrt(o * o + a * a) + n;
848
- }, e.prototype.getDistance = function(t) {
849
- return t === void 0 && (t = this.prevClients), fr(t);
850
- }, e.prototype.getScale = function(t) {
851
- return t === void 0 && (t = this.prevClients), fr(t) / fr(this.startClients);
852
- }, e.prototype.move = function(t, n) {
853
- this.startClients.forEach(function(r) {
854
- r.clientX -= t, r.clientY -= n;
855
- }), this.prevClients.forEach(function(r) {
856
- r.clientX -= t, r.clientY -= n;
857
- });
858
- }, e;
859
- }(), Pi = ["textarea", "input"], Ta = function(e) {
860
- function t(n, r) {
861
- r === void 0 && (r = {});
862
- var i = e.call(this) || this;
863
- i.options = {}, i.flag = !1, i.pinchFlag = !1, i.data = {}, i.isDrag = !1, i.isPinch = !1, i.clientStores = [], i.targets = [], i.prevTime = 0, i.doubleFlag = !1, i._useMouse = !1, i._useTouch = !1, i._useDrag = !1, i._dragFlag = !1, i._isTrusted = !1, i._isMouseEvent = !1, i._isSecondaryButton = !1, i._preventMouseEvent = !1, i._prevInputEvent = null, i._isDragAPI = !1, i._isIdle = !0, i._preventMouseEventId = 0, i._window = window, i.onDragStart = function(l, d) {
864
- if (d === void 0 && (d = !0), i.flag || l.cancelable !== !1) {
865
- var h = l.type.indexOf("drag") >= -1;
866
- if (!i.flag || !h) {
867
- i._isDragAPI = !0;
868
- var g = i.options, v = g.container, m = g.pinchOutside, x = g.preventWheelClick, y = g.preventRightClick, E = g.preventDefault, D = g.checkInput, b = g.dragFocusedInput, w = g.preventClickEventOnDragStart, _ = g.preventClickEventOnDrag, M = g.preventClickEventByCondition, B = i._useTouch, S = !i.flag;
869
- if (i._isSecondaryButton = l.which === 3 || l.button === 2, x && (l.which === 2 || l.button === 1) || y && (l.which === 3 || l.button === 2)) return i.stop(), !1;
870
- if (S) {
871
- var C = i._window.document.activeElement, O = l.target;
872
- if (O) {
873
- var k = O.tagName.toLowerCase(), z = Pi.indexOf(k) > -1, R = O.isContentEditable;
874
- if (z || R) {
875
- if (D || !b && C === O) return !1;
876
- if (C && (C === O || R && C.isContentEditable && C.contains(O))) {
877
- if (!b) return !1;
878
- O.blur();
879
- }
880
- } else if ((E || l.type === "touchstart") && C) {
881
- var A = C.tagName.toLowerCase();
882
- (C.isContentEditable || Pi.indexOf(A) > -1) && C.blur();
883
- }
884
- (w || _ || M) && te(i._window, "click", i._onClick, !0);
885
- }
886
- i.clientStores = [new pr(Yn(l))], i._isIdle = !1, i.flag = !0, i.isDrag = !1, i._isTrusted = d, i._dragFlag = !0, i._prevInputEvent = l, i.data = {}, i.doubleFlag = Kn() - i.prevTime < 200, i._isMouseEvent = function(G) {
887
- return G && (G.type.indexOf("mouse") > -1 || "button" in G);
888
- }(l), !i._isMouseEvent && i._preventMouseEvent && i._allowMouseEvent(), (i._preventMouseEvent || i.emit("dragStart", Gt(Gt({ data: i.data, datas: i.data, inputEvent: l, isMouseEvent: i._isMouseEvent, isSecondaryButton: i._isSecondaryButton, isTrusted: d, isDouble: i.doubleFlag }, i.getCurrentStore().getPosition()), { preventDefault: function() {
889
- l.preventDefault();
890
- }, preventDrag: function() {
891
- i._dragFlag = !1;
892
- } }))) === !1 && i.stop(), i._isMouseEvent && i.flag && E && l.preventDefault();
893
- }
894
- if (!i.flag) return !1;
895
- var F = 0;
896
- if (S ? (i._attchDragEvent(), B && m && (F = setTimeout(function() {
897
- te(v, "touchstart", i.onDragStart, { passive: !1 });
898
- }))) : B && m && Vt(v, "touchstart", i.onDragStart), i.flag && function(G) {
899
- return G.touches && G.touches.length >= 2;
900
- }(l)) {
901
- if (clearTimeout(F), S && l.touches.length !== l.changedTouches.length) return;
902
- i.pinchFlag || i.onPinchStart(l);
903
- }
904
- }
905
- }
906
- }, i.onDrag = function(l, d) {
907
- if (i.flag) {
908
- var h = i.options.preventDefault;
909
- !i._isMouseEvent && h && l.preventDefault(), i._prevInputEvent = l;
910
- var g = Yn(l), v = i.moveClients(g, l, !1);
911
- if (i._dragFlag) {
912
- if ((i.pinchFlag || v.deltaX || v.deltaY) && (i._preventMouseEvent || i.emit("drag", Gt(Gt({}, v), { isScroll: !!d, inputEvent: l }))) === !1) return void i.stop();
913
- i.pinchFlag && i.onPinch(l, g);
914
- }
915
- i.getCurrentStore().getPosition(g, !0);
916
- }
917
- }, i.onDragEnd = function(l) {
918
- if (i.flag) {
919
- var d = i.options, h = d.pinchOutside, g = d.container, v = d.preventClickEventOnDrag, m = d.preventClickEventOnDragStart, x = d.preventClickEventByCondition, y = i.isDrag;
920
- (v || m || x) && requestAnimationFrame(function() {
921
- i._allowClickEvent();
922
- }), x || m || !v || y || i._allowClickEvent(), i._useTouch && h && Vt(g, "touchstart", i.onDragStart), i.pinchFlag && i.onPinchEnd(l);
923
- var E = l?.touches ? Yn(l) : [];
924
- E.length !== 0 && i.options.keepDragging ? i._addStore(new pr(E)) : i.flag = !1;
925
- var D = i._getPosition(), b = Kn(), w = !y && i.doubleFlag;
926
- i._prevInputEvent = null, i.prevTime = y || w ? 0 : b, i.flag || (i._dettachDragEvent(), i._preventMouseEvent || i.emit("dragEnd", Gt({ data: i.data, datas: i.data, isDouble: w, isDrag: y, isClick: !y, isMouseEvent: i._isMouseEvent, isSecondaryButton: i._isSecondaryButton, inputEvent: l, isTrusted: i._isTrusted }, D)), i.clientStores = [], i._isMouseEvent || (i._preventMouseEvent = !0, clearTimeout(i._preventMouseEventId), i._preventMouseEventId = setTimeout(function() {
927
- i._preventMouseEvent = !1;
928
- }, 200)), i._isIdle = !0);
929
- }
930
- }, i.onBlur = function() {
931
- i.onDragEnd();
932
- }, i._allowClickEvent = function() {
933
- Vt(i._window, "click", i._onClick, !0);
934
- }, i._onClick = function(l) {
935
- i._allowClickEvent(), i._allowMouseEvent();
936
- var d = i.options.preventClickEventByCondition;
937
- d?.(l) || (l.stopPropagation(), l.preventDefault());
938
- }, i._onContextMenu = function(l) {
939
- i.options.preventRightClick ? i.onDragEnd(l) : l.preventDefault();
940
- }, i._passCallback = function() {
941
- };
942
- var o = [].concat(n), a = o[0];
943
- i._window = ho(a) ? a : Fe(a), i.options = Gt({ checkInput: !1, container: a && !("document" in a) ? Fe(a) : a, preventRightClick: !0, preventWheelClick: !0, preventClickEventOnDragStart: !1, preventClickEventOnDrag: !1, preventClickEventByCondition: null, preventDefault: !0, checkWindowBlur: !1, keepDragging: !1, pinchThreshold: 0, events: ["touch", "mouse"] }, r);
944
- var s = i.options, u = s.container, c = s.events, p = s.checkWindowBlur;
945
- if (i._useDrag = c.indexOf("drag") > -1, i._useTouch = c.indexOf("touch") > -1, i._useMouse = c.indexOf("mouse") > -1, i.targets = o, i._useDrag && o.forEach(function(l) {
946
- te(l, "dragstart", i.onDragStart);
947
- }), i._useMouse && (o.forEach(function(l) {
948
- te(l, "mousedown", i.onDragStart), te(l, "mousemove", i._passCallback);
949
- }), te(u, "contextmenu", i._onContextMenu)), p && te(Fe(), "blur", i.onBlur), i._useTouch) {
950
- var f = { passive: !1 };
951
- o.forEach(function(l) {
952
- te(l, "touchstart", i.onDragStart, f), te(l, "touchmove", i._passCallback, f);
953
- });
954
- }
955
- return i;
956
- }
957
- return function(n, r) {
958
- function i() {
959
- this.constructor = n;
960
- }
961
- Or(n, r), n.prototype = r === null ? Object.create(r) : (i.prototype = r.prototype, new i());
962
- }(t, e), t.prototype.stop = function() {
963
- this.isDrag = !1, this.data = {}, this.clientStores = [], this.pinchFlag = !1, this.doubleFlag = !1, this.prevTime = 0, this.flag = !1, this._isIdle = !0, this._allowClickEvent(), this._dettachDragEvent(), this._isDragAPI = !1;
964
- }, t.prototype.getMovement = function(n) {
965
- return this.getCurrentStore().getMovement(n) + this.clientStores.slice(1).reduce(function(r, i) {
966
- return r + i.movement;
967
- }, 0);
968
- }, t.prototype.isDragging = function() {
969
- return this.isDrag;
970
- }, t.prototype.isIdle = function() {
971
- return this._isIdle;
972
- }, t.prototype.isFlag = function() {
973
- return this.flag;
974
- }, t.prototype.isPinchFlag = function() {
975
- return this.pinchFlag;
976
- }, t.prototype.isDoubleFlag = function() {
977
- return this.doubleFlag;
978
- }, t.prototype.isPinching = function() {
979
- return this.isPinch;
980
- }, t.prototype.scrollBy = function(n, r, i, o) {
981
- o === void 0 && (o = !0), this.flag && (this.clientStores[0].move(n, r), o && this.onDrag(i, !0));
982
- }, t.prototype.move = function(n, r) {
983
- var i = n[0], o = n[1], a = this.getCurrentStore().prevClients;
984
- return this.moveClients(a.map(function(s) {
985
- var u = s.clientX, c = s.clientY;
986
- return { clientX: u + i, clientY: c + o, originalClientX: u, originalClientY: c };
987
- }), r, !0);
988
- }, t.prototype.triggerDragStart = function(n) {
989
- this.onDragStart(n, !1);
990
- }, t.prototype.setEventData = function(n) {
991
- var r = this.data;
992
- for (var i in n) r[i] = n[i];
993
- return this;
994
- }, t.prototype.setEventDatas = function(n) {
995
- return this.setEventData(n);
996
- }, t.prototype.getCurrentEvent = function(n) {
997
- return n === void 0 && (n = this._prevInputEvent), Gt(Gt({ data: this.data, datas: this.data }, this._getPosition()), { movement: this.getMovement(), isDrag: this.isDrag, isPinch: this.isPinch, isScroll: !1, inputEvent: n });
998
- }, t.prototype.getEventData = function() {
999
- return this.data;
1000
- }, t.prototype.getEventDatas = function() {
1001
- return this.data;
1002
- }, t.prototype.unset = function() {
1003
- var n = this, r = this.targets, i = this.options.container;
1004
- this.off(), Vt(this._window, "blur", this.onBlur), this._useDrag && r.forEach(function(o) {
1005
- Vt(o, "dragstart", n.onDragStart);
1006
- }), this._useMouse && (r.forEach(function(o) {
1007
- Vt(o, "mousedown", n.onDragStart);
1008
- }), Vt(i, "contextmenu", this._onContextMenu)), this._useTouch && (r.forEach(function(o) {
1009
- Vt(o, "touchstart", n.onDragStart);
1010
- }), Vt(i, "touchstart", this.onDragStart)), this._prevInputEvent = null, this._allowClickEvent(), this._dettachDragEvent();
1011
- }, t.prototype.onPinchStart = function(n) {
1012
- var r = this, i = this.options.pinchThreshold;
1013
- if (!(this.isDrag && this.getMovement() > i)) {
1014
- var o = new pr(Yn(n));
1015
- this.pinchFlag = !0, this._addStore(o), this.emit("pinchStart", Gt(Gt({ data: this.data, datas: this.data, angle: o.getAngle(), touches: this.getCurrentStore().getPositions() }, o.getPosition()), { inputEvent: n, isTrusted: this._isTrusted, preventDefault: function() {
1016
- n.preventDefault();
1017
- }, preventDrag: function() {
1018
- r._dragFlag = !1;
1019
- } })) === !1 && (this.pinchFlag = !1);
1020
- }
1021
- }, t.prototype.onPinch = function(n, r) {
1022
- if (this.flag && this.pinchFlag && !(r.length < 2)) {
1023
- var i = this.getCurrentStore();
1024
- this.isPinch = !0, this.emit("pinch", Gt(Gt({ data: this.data, datas: this.data, movement: this.getMovement(r), angle: i.getAngle(r), rotation: i.getRotation(r), touches: i.getPositions(r), scale: i.getScale(r), distance: i.getDistance(r) }, i.getPosition(r)), { inputEvent: n, isTrusted: this._isTrusted }));
1025
- }
1026
- }, t.prototype.onPinchEnd = function(n) {
1027
- if (this.pinchFlag) {
1028
- var r = this.isPinch;
1029
- this.isPinch = !1, this.pinchFlag = !1;
1030
- var i = this.getCurrentStore();
1031
- this.emit("pinchEnd", Gt(Gt({ data: this.data, datas: this.data, isPinch: r, touches: i.getPositions() }, i.getPosition()), { inputEvent: n }));
1032
- }
1033
- }, t.prototype.getCurrentStore = function() {
1034
- return this.clientStores[0];
1035
- }, t.prototype.moveClients = function(n, r, i) {
1036
- var o = this._getPosition(n, i), a = this.isDrag;
1037
- (o.deltaX || o.deltaY) && (this.isDrag = !0);
1038
- var s = !1;
1039
- return !a && this.isDrag && (s = !0), Gt(Gt({ data: this.data, datas: this.data }, o), { movement: this.getMovement(n), isDrag: this.isDrag, isPinch: this.isPinch, isScroll: !1, isMouseEvent: this._isMouseEvent, isSecondaryButton: this._isSecondaryButton, inputEvent: r, isTrusted: this._isTrusted, isFirstDrag: s });
1040
- }, t.prototype._addStore = function(n) {
1041
- this.clientStores.splice(0, 0, n);
1042
- }, t.prototype._getPosition = function(n, r) {
1043
- var i = this.getCurrentStore().getPosition(n, r), o = this.clientStores.slice(1).reduce(function(u, c) {
1044
- var p = c.getPosition();
1045
- return u.distX += p.distX, u.distY += p.distY, u;
1046
- }, i), a = o.distX, s = o.distY;
1047
- return Gt(Gt({}, i), { distX: a, distY: s });
1048
- }, t.prototype._attchDragEvent = function() {
1049
- var n = this._window, r = this.options.container, i = { passive: !1 };
1050
- this._isDragAPI && (te(r, "dragover", this.onDrag, i), te(n, "dragend", this.onDragEnd)), this._useMouse && (te(r, "mousemove", this.onDrag), te(n, "mouseup", this.onDragEnd)), this._useTouch && (te(r, "touchmove", this.onDrag, i), te(n, "touchend", this.onDragEnd, i), te(n, "touchcancel", this.onDragEnd, i));
1051
- }, t.prototype._dettachDragEvent = function() {
1052
- var n = this._window, r = this.options.container;
1053
- this._isDragAPI && (Vt(r, "dragover", this.onDrag), Vt(n, "dragend", this.onDragEnd)), this._useMouse && (Vt(r, "mousemove", this.onDrag), Vt(n, "mouseup", this.onDragEnd)), this._useTouch && (Vt(r, "touchstart", this.onDragStart), Vt(r, "touchmove", this.onDrag), Vt(n, "touchend", this.onDragEnd), Vt(n, "touchcancel", this.onDragEnd));
1054
- }, t.prototype._allowMouseEvent = function() {
1055
- this._preventMouseEvent = !1, clearTimeout(this._preventMouseEventId);
1056
- }, t;
1057
- }(yo), Pr = function() {
1058
- return Pr = Object.assign || function(e) {
1059
- for (var t, n = 1, r = arguments.length; n < r; n++) for (var i in t = arguments[n]) Object.prototype.hasOwnProperty.call(t, i) && (e[i] = t[i]);
1060
- return e;
1061
- }, Pr.apply(this, arguments);
1062
- };
1063
- function So(e, t) {
1064
- var n = function(i) {
1065
- var o = "rCS" + function(a) {
1066
- for (var s = 5381, u = a.length; u; ) s = 33 * s ^ a.charCodeAt(--u);
1067
- return s >>> 0;
1068
- }(i).toString(36);
1069
- return { className: o, inject: function(a, s) {
1070
- s === void 0 && (s = {});
1071
- var u = function(f) {
1072
- if (f && f.getRootNode) {
1073
- var l = f.getRootNode();
1074
- if (l.nodeType === 11) return l;
1075
- }
1076
- }(a), c = (u || a.ownerDocument || document).querySelector('style[data-styled-id="'.concat(o, '"]'));
1077
- if (c) {
1078
- var p = parseFloat(c.getAttribute("data-styled-count")) || 0;
1079
- c.setAttribute("data-styled-count", "".concat(p + 1));
1080
- } else c = function(f, l, d, h, g) {
1081
- var v = Vr(h), m = v.createElement("style");
1082
- return m.setAttribute("type", "text/css"), m.setAttribute("data-styled-id", f), m.setAttribute("data-styled-count", "1"), d.nonce && m.setAttribute("nonce", d.nonce), m.innerHTML = function(x, y, E) {
1083
- return E.original ? y : y.replace(/([^};{\s}][^};{]*|^\s*){/gm, function(D, b) {
1084
- var w = b.trim();
1085
- return (w ? bn(w) : [""]).map(function(_) {
1086
- var M = _.trim();
1087
- return M.indexOf("@") === 0 ? M : M.indexOf(":global") > -1 ? M.replace(/\:global/g, "") : M.indexOf(":host") > -1 ? "".concat(M.replace(/\:host/g, ".".concat(x))) : M ? ".".concat(x, " ").concat(M) : ".".concat(x);
1088
- }).join(", ") + " {";
1089
- });
1090
- }(f, l, d), (g || v.head || v.body).appendChild(m), m;
1091
- }(o, i, s, a, u);
1092
- return { destroy: function() {
1093
- var f, l = parseFloat(c.getAttribute("data-styled-count")) || 0;
1094
- l <= 1 ? (c.remove ? c.remove() : (f = c.parentNode) === null || f === void 0 || f.removeChild(c), c = null) : c.setAttribute("data-styled-count", "".concat(l - 1));
1095
- } };
1096
- } };
1097
- }(t), r = n.className;
1098
- return re.forwardRef(function(i, o) {
1099
- var a = i.className, s = a === void 0 ? "" : a;
1100
- i.cspNonce;
1101
- var u = function(p, f) {
1102
- var l = {};
1103
- for (var d in p) Object.prototype.hasOwnProperty.call(p, d) && f.indexOf(d) < 0 && (l[d] = p[d]);
1104
- if (p != null && typeof Object.getOwnPropertySymbols == "function") {
1105
- var h = 0;
1106
- for (d = Object.getOwnPropertySymbols(p); h < d.length; h++) f.indexOf(d[h]) < 0 && Object.prototype.propertyIsEnumerable.call(p, d[h]) && (l[d[h]] = p[d[h]]);
1107
- }
1108
- return l;
1109
- }(i, ["className", "cspNonce"]), c = re.useRef();
1110
- return re.useImperativeHandle(o, function() {
1111
- return c.current;
1112
- }, []), re.useEffect(function() {
1113
- var p = n.inject(c.current, { nonce: i.cspNonce });
1114
- return function() {
1115
- p.destroy();
1116
- };
1117
- }, []), re.createElement(e, Pr({ ref: c, "data-styled-id": r, className: "".concat(s, " ").concat(r) }, u));
1118
- });
1119
- }
1120
- var Rr = function(e, t) {
1121
- return Rr = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, r) {
1122
- n.__proto__ = r;
1123
- } || function(n, r) {
1124
- for (var i in r) Object.prototype.hasOwnProperty.call(r, i) && (n[i] = r[i]);
1125
- }, Rr(e, t);
1126
- };
1127
- function Bn(e, t) {
1128
- if (typeof t != "function" && t !== null) throw new TypeError("Class extends value " + String(t) + " is not a constructor or null");
1129
- function n() {
1130
- this.constructor = e;
1131
- }
1132
- Rr(e, t), e.prototype = t === null ? Object.create(t) : (n.prototype = t.prototype, new n());
1133
- }
1134
- var T = function() {
1135
- return T = Object.assign || function(e) {
1136
- for (var t, n = 1, r = arguments.length; n < r; n++) for (var i in t = arguments[n]) Object.prototype.hasOwnProperty.call(t, i) && (e[i] = t[i]);
1137
- return e;
1138
- }, T.apply(this, arguments);
1139
- };
1140
- function P(e, t) {
1141
- var n = typeof Symbol == "function" && e[Symbol.iterator];
1142
- if (!n) return e;
1143
- var r, i, o = n.call(e), a = [];
1144
- try {
1145
- for (; (t === void 0 || t-- > 0) && !(r = o.next()).done; ) a.push(r.value);
1146
- } catch (s) {
1147
- i = { error: s };
1148
- } finally {
1149
- try {
1150
- r && !r.done && (n = o.return) && n.call(o);
1151
- } finally {
1152
- if (i) throw i.error;
1153
- }
1154
- }
1155
- return a;
1156
- }
1157
- function L(e, t, n) {
1158
- if (arguments.length === 2) for (var r, i = 0, o = t.length; i < o; i++) !r && i in t || (r || (r = Array.prototype.slice.call(t, 0, i)), r[i] = t[i]);
1159
- return e.concat(r || Array.prototype.slice.call(t));
1160
- }
1161
- function _n(e, t) {
1162
- return T({ events: [], props: [], name: e }, t);
1163
- }
1164
- var Ri, Bi, Oa = ["n", "w", "s", "e"], Zr = ["n", "w", "s", "e", "nw", "ne", "sw", "se"], pn = function() {
1165
- if (typeof navigator > "u" || !navigator || !navigator.userAgentData) return !1;
1166
- var e = navigator.userAgentData, t = e.brands || e.uaList;
1167
- return !(!t || !t.length);
1168
- }() ? function() {
1169
- var e = navigator.userAgentData, t = (e.uaList || e.brands).slice(), n = e.mobile || !1, r = t[0], i = (e.platform || navigator.platform).toLowerCase(), o = { name: r.brand, version: r.version, majorVersion: -1, webkit: !1, webkitVersion: "-1", chromium: !1, chromiumVersion: "-1", webview: !!zn(oo, t).brand || vi(pi()) }, a = { name: "unknown", version: "-1", majorVersion: -1 };
1170
- o.webkit = !o.chromium && Hr(sr, function(f) {
1171
- return io(t, f);
1172
- });
1173
- var s = zn(hi, t);
1174
- if (o.chromium = !!s.brand, o.chromiumVersion = s.version || "-1", !o.chromium) {
1175
- var u = zn(sr, t);
1176
- o.webkit = !!u.brand, o.webkitVersion = u.version || "-1";
1177
- }
1178
- var c = ro(gi, function(f) {
1179
- return new RegExp("" + f.test, "g").exec(i);
1180
- });
1181
- a.name = c ? c.id : "";
1182
- var p = zn(di, t);
1183
- return o.name = p.brand || o.name, o.version = (p.brand, p.version), o.webkit && (a.name = n ? "ios" : "mac"), a.name === "ios" && o.webview && (o.version = "-1"), a.version = Sr(a.version), o.version = Sr(o.version), a.majorVersion = parseInt(a.version, 10), o.majorVersion = parseInt(o.version, 10), { browser: o, os: a, isMobile: n, isHints: !0 };
1184
- }() : function() {
1185
- var e = pi(void 0), t = !!/mobi/g.exec(e), n = { name: "unknown", version: "-1", majorVersion: -1, webview: vi(e), chromium: !1, chromiumVersion: "-1", webkit: !1, webkitVersion: "-1" }, r = { name: "unknown", version: "-1", majorVersion: -1 }, i = mn(di, e), o = i.preset, a = i.version, s = mn(gi, e), u = s.preset, c = s.version, p = mn(hi, e);
1186
- if (n.chromium = !!p.preset, n.chromiumVersion = p.version, !n.chromium) {
1187
- var f = mn(sr, e);
1188
- n.webkit = !!f.preset, n.webkitVersion = f.version;
1189
- }
1190
- return u && (r.name = u.id, r.version = c, r.majorVersion = parseInt(c, 10)), o && (n.name = o.id, n.version = a, n.webview && r.name === "ios" && n.name !== "safari" && (n.webview = !1)), n.majorVersion = parseInt(n.version, 10), { browser: n, os: r, isMobile: t, isHints: !1 };
1191
- }(), Do = pn.browser.webkit, Mo = Do && (Ri = typeof window > "u" ? { userAgent: "" } : window.navigator, !!(Bi = /applewebkit\/([^\s]+)/g.exec(Ri.userAgent.toLowerCase())) && parseFloat(Bi[1]) < 605), wo = pn.browser.name, Co = parseInt(pn.browser.version, 10), Pa = wo === "chrome", Ra = pn.browser.chromium, Ba = parseInt(pn.browser.chromiumVersion, 10) || 0, ka = Pa && Co >= 109 || Ra && Ba >= 109, Fa = wo === "firefox", Aa = parseInt(pn.browser.webkitVersion, 10) >= 612 || Co >= 15, $r = "moveable-", za = Zr.map(function(e) {
1192
- var t = "", n = "", r = "center", i = "center", o = "calc(var(--moveable-control-padding, 20) * -1px)";
1193
- return e.indexOf("n") > -1 && (t = "top: ".concat(o, ";"), i = "bottom"), e.indexOf("s") > -1 && (t = "top: 0px;", i = "top"), e.indexOf("w") > -1 && (n = "left: ".concat(o, ";"), r = "right"), e.indexOf("e") > -1 && (n = "left: 0px;", r = "left"), '.around-control[data-direction*="'.concat(e, `"] {
1194
- `).concat(n).concat(t, `
1195
- transform-origin: `).concat(r, " ").concat(i, `;
1196
- }`);
1197
- }).join(`
1198
- `), Ga = `
1199
- {
1200
- position: absolute;
1201
- width: 1px;
1202
- height: 1px;
1203
- left: 0;
1204
- top: 0;
1205
- z-index: 3000;
1206
- --moveable-color: #4af;
1207
- --zoom: 1;
1208
- --zoompx: 1px;
1209
- --moveable-line-padding: 0;
1210
- --moveable-control-padding: 0;
1211
- will-change: transform;
1212
- outline: 1px solid transparent;
1213
- }
1214
- .control-box {
1215
- z-index: 0;
1216
- }
1217
- .line, .control {
1218
- position: absolute;
1219
- left: 0;
1220
- top: 0;
1221
- will-change: transform;
1222
- }
1223
- .control {
1224
- width: 14px;
1225
- height: 14px;
1226
- border-radius: 50%;
1227
- border: 2px solid #fff;
1228
- box-sizing: border-box;
1229
- background: #4af;
1230
- background: var(--moveable-color);
1231
- margin-top: -7px;
1232
- margin-left: -7px;
1233
- border: 2px solid #fff;
1234
- z-index: 10;
1235
- }
1236
- .around-control {
1237
- position: absolute;
1238
- will-change: transform;
1239
- width: calc(var(--moveable-control-padding, 20) * 1px);
1240
- height: calc(var(--moveable-control-padding, 20) * 1px);
1241
- left: calc(var(--moveable-control-padding, 20) * -0.5px);
1242
- top: calc(var(--moveable-control-padding, 20) * -0.5px);
1243
- box-sizing: border-box;
1244
- background: transparent;
1245
- z-index: 8;
1246
- cursor: alias;
1247
- transform-origin: center center;
1248
- }
1249
- `.concat(za, `
1250
- .padding {
1251
- position: absolute;
1252
- top: 0px;
1253
- left: 0px;
1254
- width: 100px;
1255
- height: 100px;
1256
- transform-origin: 0 0;
1257
- }
1258
- .line {
1259
- width: 1px;
1260
- height: 1px;
1261
- background: #4af;
1262
- background: var(--moveable-color);
1263
- transform-origin: 0px 50%;
1264
- }
1265
- .line.edge {
1266
- z-index: 1;
1267
- background: transparent;
1268
- }
1269
- .line.dashed {
1270
- box-sizing: border-box;
1271
- background: transparent;
1272
- }
1273
- .line.dashed.horizontal {
1274
- border-top: 1px dashed #4af;
1275
- border-top-color: #4af;
1276
- border-top-color: var(--moveable-color);
1277
- }
1278
- .line.dashed.vertical {
1279
- border-left: 1px dashed #4af;
1280
- border-left-color: #4af;
1281
- border-left-color: var(--moveable-color);
1282
- }
1283
- .line.vertical {
1284
- transform: translateX(-50%);
1285
- }
1286
- .line.horizontal {
1287
- transform: translateY(-50%);
1288
- }
1289
- .line.vertical.bold {
1290
- width: 2px;
1291
- }
1292
- .line.horizontal.bold {
1293
- height: 2px;
1294
- }
1295
-
1296
- .control.origin {
1297
- border-color: #f55;
1298
- background: #fff;
1299
- width: 12px;
1300
- height: 12px;
1301
- margin-top: -6px;
1302
- margin-left: -6px;
1303
- pointer-events: none;
1304
- }
1305
- `).concat([0, 15, 30, 45, 60, 75, 90, 105, 120, 135, 150, 165].map(function(e) {
1306
- return `
1307
- .direction[data-rotation="`.concat(e, '"], :global .view-control-rotation').concat(e, ` {
1308
- `).concat(function(t) {
1309
- var n = function(o, a) {
1310
- return 'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="'.concat(32, 'px" height="').concat(32, 'px" viewBox="0 0 32 32" ><path d="M 16,5 L 12,10 L 14.5,10 L 14.5,22 L 12,22 L 16,27 L 20,22 L 17.5,22 L 17.5,10 L 20, 10 L 16,5 Z" stroke-linejoin="round" stroke-width="1.2" fill="black" stroke="white" style="transform:rotate(').concat(a, 'deg);transform-origin: 16px 16px"></path></svg>');
1311
- }(0, t), r = 45 * Math.round(t / 45) % 180, i = "ns-resize";
1312
- return r === 135 ? i = "nwse-resize" : r === 45 ? i = "nesw-resize" : r === 90 && (i = "ew-resize"), "cursor:".concat(i, ";cursor: url('").concat(n, "') 16 16, ").concat(i, ";");
1313
- }(e), `
1314
- }
1315
- `);
1316
- }).join(`
1317
- `), `
1318
-
1319
- .line.direction:before {
1320
- content: "";
1321
- position: absolute;
1322
- width: 100%;
1323
- height: calc(var(--moveable-line-padding, 0) * 1px);
1324
- bottom: 0;
1325
- left: 0;
1326
- }
1327
- .group {
1328
- z-index: -1;
1329
- }
1330
- .area {
1331
- position: absolute;
1332
- }
1333
- .area-pieces {
1334
- position: absolute;
1335
- top: 0;
1336
- left: 0;
1337
- display: none;
1338
- }
1339
- .area.avoid, .area.pass {
1340
- pointer-events: none;
1341
- }
1342
- .area.avoid+.area-pieces {
1343
- display: block;
1344
- }
1345
- .area-piece {
1346
- position: absolute;
1347
- }
1348
-
1349
- `).concat(Mo ? `:global svg *:before {
1350
- content:"";
1351
- transform-origin: inherit;
1352
- }` : "", `
1353
- `), dr = 1e-4, he = 1e-7, Br = Math.pow(10, 10), ki = -Br, kr = { n: [0, 1], e: [1, 3], s: [3, 2], w: [2, 0], nw: [0], ne: [1], sw: [2], se: [3] }, Fi = { n: 0, s: 180, w: 270, e: 90, nw: 315, ne: 45, sw: 225, se: 135 }, Ia = ["isMoveableElement", "updateRect", "updateTarget", "destroy", "dragStart", "isInside", "hitTest", "setState", "getRect", "request", "isDragging", "getManager", "forceUpdate", "waitToChangeTarget", "updateSelectors", "getTargets", "stopDrag", "getControlBoxElement", "getMoveables", "getDragElement"];
1354
- function _o(e, t, n, r, i, o) {
1355
- var a, s, u = (s = (a = t.gestos[o]) === null || a === void 0 ? void 0 : a.move(n, e.inputEvent)) !== null && s !== void 0 ? s : {}, c = u.originalDatas || u.datas, p = c[o] || (c[o] = {});
1356
- return T(T({}, u), { isPinch: !!r, parentEvent: !0, datas: p, originalDatas: e.originalDatas });
1357
- }
1358
- var To = function() {
1359
- function e(t) {
1360
- var n;
1361
- t === void 0 && (t = "draggable"), this.ableName = t, this.prevX = 0, this.prevY = 0, this.startX = 0, this.startY = 0, this.isDrag = !1, this.isFlag = !1, this.datas = { draggable: {} }, this.datas = ((n = {})[t] = {}, n);
1362
- }
1363
- return e.prototype.dragStart = function(t, n) {
1364
- this.isDrag = !1, this.isFlag = !1;
1365
- var r = n.originalDatas;
1366
- return this.datas = r, r[this.ableName] || (r[this.ableName] = {}), T(T({}, this.move(t, n.inputEvent)), { type: "dragstart" });
1367
- }, e.prototype.drag = function(t, n) {
1368
- return this.move([t[0] - this.prevX, t[1] - this.prevY], n);
1369
- }, e.prototype.move = function(t, n) {
1370
- var r, i, o = !1;
1371
- if (this.isFlag) {
1372
- var a = this.isDrag;
1373
- r = this.prevX + t[0], i = this.prevY + t[1], (t[0] || t[1]) && (this.isDrag = !0), !a && this.isDrag && (o = !0);
1374
- } else this.prevX = t[0], this.prevY = t[1], this.startX = t[0], this.startY = t[1], r = t[0], i = t[1], this.isFlag = !0;
1375
- return this.prevX = r, this.prevY = i, { type: "drag", clientX: r, clientY: i, inputEvent: n, isFirstDrag: o, isDrag: this.isDrag, distX: r - this.startX, distY: i - this.startY, deltaX: t[0], deltaY: t[1], datas: this.datas[this.ableName], originalDatas: this.datas, parentEvent: !0, parentGesto: this };
1376
- }, e;
1377
- }();
1378
- function gn(e, t, n, r) {
1379
- var i = e.length === 16 ? 4 : 3, o = P(cn(e, n, r, i), 4), a = P(o[0], 2), s = a[0], u = a[1], c = P(o[1], 2), p = c[0], f = c[1], l = P(o[2], 2), d = l[0], h = l[1], g = P(o[3], 2), v = g[0], m = g[1], x = P(_e(e, t, i), 2), y = x[0], E = x[1], D = Math.min(s, p, d, v), b = Math.min(u, f, h, m), w = Math.max(s, p, d, v);
1380
- return s = s - D || 0, { left: D, top: b, right: w, bottom: Math.max(u, f, h, m), origin: [y = y - D || 0, E = E - b || 0], pos1: [s, u = u - b || 0], pos2: [p = p - D || 0, f = f - b || 0], pos3: [d = d - D || 0, h = h - b || 0], pos4: [v = v - D || 0, m = m - b || 0], direction: on(e[0] * e[i + 1]) };
1381
- }
1382
- function Oo(e, t) {
1383
- var n = t.datas, r = e.state, i = r.allMatrix, o = r.beforeMatrix, a = r.is3d, s = r.left, u = r.top, c = r.origin, p = r.offsetMatrix, f = r.targetMatrix, l = r.transformOrigin, d = a ? 4 : 3;
1384
- n.is3d = a, n.matrix = i, n.targetMatrix = f, n.beforeMatrix = o, n.offsetMatrix = p, n.transformOrigin = l, n.inverseMatrix = We(i, d), n.inverseBeforeMatrix = We(o, d), n.absoluteOrigin = Rn(kt([s, u], c), d), n.startDragBeforeDist = Se(n.inverseBeforeMatrix, n.absoluteOrigin, d), n.startDragDist = Se(n.inverseMatrix, n.absoluteOrigin, d);
1385
- }
1386
- function Ya(e, t, n) {
1387
- var r = t.datas, i = t.originalDatas.beforeRenderable, o = r.transformIndex, a = i.nextTransforms, s = a.length, u = i.nextTransformAppendedIndexes, c = -1;
1388
- o === -1 ? ((c = 0) == -1 && (c = a.length), r.transformIndex = c) : c = xe(u, function(d) {
1389
- return d.index === o && d.functionName === n;
1390
- }) ? o : o + u.filter(function(d) {
1391
- return d.index < o;
1392
- }).length;
1393
- var p = function(d, h, g) {
1394
- var v, m = sn(d, { "x%": function(F) {
1395
- return F / 100 * h.offsetWidth;
1396
- }, "y%": function(F) {
1397
- return F / 100 * h.offsetHeight;
1398
- } }), x = d.slice(0, g < 0 ? void 0 : g), y = d.slice(0, g < 0 ? void 0 : g + 1), E = d[g] || "", D = g < 0 ? [] : d.slice(g), b = g < 0 ? [] : d.slice(g + 1), w = m.slice(0, g < 0 ? void 0 : g), _ = m.slice(0, g < 0 ? void 0 : g + 1), M = (v = m[g]) !== null && v !== void 0 ? v : sn([""])[0], B = g < 0 ? [] : m.slice(g), S = g < 0 ? [] : m.slice(g + 1), C = M ? [M] : [], O = Ue(w), k = Ue(_), z = Ue(B), R = Ue(S), A = Wt(O, z, 4);
1399
- return { transforms: d, beforeFunctionMatrix: O, beforeFunctionMatrix2: k, targetFunctionMatrix: Ue(C), afterFunctionMatrix: z, afterFunctionMatrix2: R, allFunctionMatrix: A, beforeFunctions: w, beforeFunctions2: _, targetFunction: C[0], afterFunctions: B, afterFunctions2: S, beforeFunctionTexts: x, beforeFunctionTexts2: y, targetFunctionText: E, afterFunctionTexts: D, afterFunctionTexts2: b };
1400
- }(a, e.state, c), f = p.targetFunction, l = n;
1401
- r.beforeFunctionTexts = p.beforeFunctionTexts, r.afterFunctionTexts = p.afterFunctionTexts, r.beforeTransform = p.beforeFunctionMatrix, r.beforeTransform2 = p.beforeFunctionMatrix2, r.targetTansform = p.targetFunctionMatrix, r.afterTransform = p.afterFunctionMatrix, r.afterTransform2 = p.afterFunctionMatrix2, r.targetAllTransform = p.allFunctionMatrix, f.functionName === l ? (r.afterFunctionTexts.splice(0, 1), r.isAppendTransform = !1) : s > c && (r.isAppendTransform = !0, i.nextTransformAppendedIndexes = L(L([], P(u), !1), [{ functionName: n, index: c, isAppend: !0 }], !1));
1402
- }
1403
- function Ai(e) {
1404
- var t = e.datas, n = e.distX, r = e.distY, i = t.inverseBeforeMatrix, o = t.is3d, a = t.startDragBeforeDist, s = o ? 4 : 3;
1405
- return ut(Se(i, kt(t.absoluteOrigin, [n, r]), s), a);
1406
- }
1407
- function Tn(e, t) {
1408
- var n = e.datas, r = e.distX, i = e.distY;
1409
- n.inverseBeforeMatrix;
1410
- var o = n.inverseMatrix, a = n.is3d;
1411
- n.startDragBeforeDist;
1412
- var s = n.startDragDist, u = a ? 4 : 3;
1413
- return ut(Se(o, kt(n.absoluteOrigin, [r, i]), u), s);
1414
- }
1415
- function hr(e, t) {
1416
- var n = (t + 1) / 2;
1417
- return [mi(e[0][0], e[1][0], n, 1 - n), mi(e[0][1], e[1][1], n, 1 - n)];
1418
- }
1419
- function ce(e, t) {
1420
- var n = hr([e[0], e[1]], t[0]), r = hr([e[2], e[3]], t[0]);
1421
- return hr([n, r], t[1]);
1422
- }
1423
- function Po(e, t, n, r) {
1424
- return Wt(e, Sn(t, r, n), r);
1425
- }
1426
- function gr(e, t, n) {
1427
- var r = nn(t), i = t.datas;
1428
- if (i.transformIndex = n, n !== -1) {
1429
- var o = r.startTransforms[n];
1430
- if (o) {
1431
- var a = e.state, s = sn([o], { "x%": function(u) {
1432
- return u / 100 * a.offsetWidth;
1433
- }, "y%": function(u) {
1434
- return u / 100 * a.offsetHeight;
1435
- } });
1436
- i.startValue = s[0].functionValue;
1437
- }
1438
- }
1439
- }
1440
- function nn(e) {
1441
- return e.originalDatas.beforeRenderable;
1442
- }
1443
- function Zn(e) {
1444
- return e.originalDatas.beforeRenderable.nextTransforms;
1445
- }
1446
- function Xn(e) {
1447
- return (Zn(e) || []).join(" ");
1448
- }
1449
- function Nn(e) {
1450
- return nn(e).nextStyle;
1451
- }
1452
- function Xa(e, t, n, r, i, o) {
1453
- var a = e.props.groupable, s = e.state, u = s.transformOrigin, c = s.offsetMatrix, p = s.is3d, f = s.width, l = s.height, d = s.left, h = s.top, g = o.fixedDirection, v = o.nextTargetMatrix || s.targetMatrix, m = p ? 4 : 3, x = function(b, w, _, M, B, S) {
1454
- return M === void 0 && (M = w), B === void 0 && (B = _), S === void 0 && (S = [0, 0]), b ? b.map(function(C, O) {
1455
- var k = nr(C), z = k.value, R = k.unit, A = O ? B : M, F = O ? _ : w;
1456
- return C === "%" || isNaN(z) ? F * (A ? S[O] / A : 0) : R !== "%" ? z : F * z / 100;
1457
- }) : S;
1458
- }(i, t, n, f, l, u), y = a ? d : 0, E = a ? h : 0, D = function(b, w, _, M, B, S) {
1459
- var C = ce(cn(w, _, M, B), S);
1460
- return [b[0] - C[0], b[1] - C[1]];
1461
- }(r, Po(c, v, x, m), t, n, m, g);
1462
- return ut(D, [y, E]);
1463
- }
1464
- function Na(e) {
1465
- if (e && e.getRootNode) {
1466
- var t = e.getRootNode();
1467
- if (t.nodeType === 11) return t;
1468
- }
1469
- }
1470
- function Wa(e) {
1471
- var t = e("scale"), n = e("rotate"), r = e("translate"), i = [];
1472
- return r && r !== "0px" && r !== "none" && i.push("translate(".concat(r.split(/\s+/).join(","), ")")), n && n !== "1" && n !== "none" && i.push("rotate(".concat(n, ")")), t && t !== "1" && t !== "none" && i.push("scale(".concat(t.split(/\s+/).join(","), ")")), i;
1473
- }
1474
- function zi(e, t, n) {
1475
- for (var r, i, o, a = e, s = [], u = Ur(e) || ze(e), c = !n && e === t || e === u, p = c, f = !1, l = 3, d = !1, h = On(t, t, !0).offsetParent, g = 1; a && !p; ) {
1476
- p = c;
1477
- var v = ge(a), m = v("position"), x = Yo(a), y = m === "fixed", E = Wa(v), D = ma(Ua(x)), b = void 0, w = !1, _ = !1, M = 0, B = 0, S = 0, C = 0, O = { hasTransform: !1, fixedContainer: null };
1478
- y && (d = !0, h = (O = Qa(a)).fixedContainer);
1479
- var k = D.length;
1480
- f || k !== 16 && !E.length || (f = !0, l = 4, zr(s), o && (o = He(o, 3, 4))), f && k === 9 && (D = He(D, 3, 4));
1481
- var z = Ka(a, e), R = z.tagName, A = z.hasOffset, F = z.isSVG, G = z.origin, X = z.targetOrigin, V = P(z.offset, 2), nt = V[0], Z = V[1];
1482
- R === "svg" && !a.ownerSVGElement && o && (s.push({ type: "target", target: a, matrix: Ja(a, l) }), s.push({ type: "offset", target: a, matrix: _t(l) }));
1483
- var U = parseFloat(v("zoom")) || 1;
1484
- if (y) b = O.fixedContainer, w = !0;
1485
- else {
1486
- var H = On(a, t, !1, !0, v), W = H.offsetZoom;
1487
- if (b = H.offsetParent, w = H.isEnd, _ = H.isStatic, g *= W, (H.isCustomElement || W !== 1) && _) nt -= b.offsetLeft, Z -= b.offsetTop;
1488
- else if ((Fa || ka) && H.parentSlotElement) {
1489
- for (var j = b, rt = 0, gt = 0; j && Na(j); ) rt += j.offsetLeft, gt += j.offsetTop, j = j.offsetParent;
1490
- nt -= rt, Z -= gt;
1491
- }
1492
- }
1493
- if (!Do || Aa || !A || F || !_ || m !== "relative" && m !== "static" || (nt -= b.offsetLeft, Z -= b.offsetTop, c = c || w), y) A && O.hasTransform && (S = b.clientLeft, C = b.clientTop);
1494
- else if (A && h !== b && (M = b.clientLeft, B = b.clientTop), A && b === u) {
1495
- var q = Xo(a, !1);
1496
- nt += q[0], Z += q[1];
1497
- }
1498
- if (s.push({ type: "target", target: a, matrix: Sn(D, l, G) }), E.length && (s.push({ type: "offset", target: a, matrix: _t(l) }), s.push({ type: "target", target: a, matrix: Sn(Qr(E), l, G) })), A) {
1499
- var Y = a === e, $ = Y ? 0 : a.scrollLeft, J = Y ? 0 : a.scrollTop;
1500
- s.push({ type: "offset", target: a, matrix: qe([nt - $ + M - S, Z - J + B - C], l) });
1501
- } else s.push({ type: "offset", target: a, origin: G });
1502
- if (U !== 1 && s.push({ type: "zoom", target: a, matrix: Sn(vo([U, U], l), l, [0, 0]) }), o || (o = D), r || (r = G), i || (i = X), p || y) break;
1503
- a = b, c = w, n && a !== u || (p = c);
1504
- }
1505
- return o || (o = _t(l)), r || (r = [0, 0]), i || (i = [0, 0]), { zoom: g, offsetContainer: h, matrixes: s, targetMatrix: o, transformOrigin: r, targetOrigin: i, is3d: f, hasFixed: d };
1506
- }
1507
- var Ke = null, Qe = null, Je = null;
1508
- function un(e) {
1509
- e ? (window.Map && (Ke = /* @__PURE__ */ new Map(), Qe = /* @__PURE__ */ new Map()), Je = []) : (Ke = null, Je = null, Qe = null);
1510
- }
1511
- function ge(e) {
1512
- var t = Ke?.get(e);
1513
- if (!t) {
1514
- var n = Fe(e).getComputedStyle(e);
1515
- if (!Ke) return function(o) {
1516
- return n[o];
1517
- };
1518
- t = { style: n, cached: {} }, Ke.set(e, t);
1519
- }
1520
- var r = t.cached, i = t.style;
1521
- return function(o) {
1522
- return o in r || (r[o] = i[o]), r[o];
1523
- };
1524
- }
1525
- function Le(e, t, n) {
1526
- var r = n.originalDatas;
1527
- r.groupable = r.groupable || {};
1528
- var i = r.groupable;
1529
- i.childDatas = i.childDatas || [];
1530
- var o = i.childDatas;
1531
- return e.moveables.map(function(a, s) {
1532
- return o[s] = o[s] || {}, o[s][t] = o[s][t] || {}, T(T({}, n), { isRequestChild: !0, datas: o[s][t], originalDatas: o[s] });
1533
- });
1534
- }
1535
- function vr(e, t, n, r, i, o, a) {
1536
- var s = !!n.match(/Start$/g), u = !!n.match(/End$/g), c = i.isPinch, p = i.datas, f = Le(e, t.name, i), l = e.moveables, d = [], h = f.map(function(g, v) {
1537
- var m = l[v], x = m.state, y = x.gestos, E = g;
1538
- if (s) E = new To(a).dragStart(r, g), d.push(E);
1539
- else {
1540
- if (y[a] || (y[a] = p.childGestos[v]), !y[a]) return;
1541
- E = _o(g, x, r, c, 0, a), d.push(E);
1542
- }
1543
- var D = t[n](m, T(T({}, E), { parentFlag: !0 }));
1544
- return u && (y[a] = null), D;
1545
- });
1546
- return s && (p.childGestos = l.map(function(g) {
1547
- return g.state.gestos[a];
1548
- })), { eventParams: h, childEvents: d };
1549
- }
1550
- function mr(e, t, n, r, i, o) {
1551
- i === void 0 && (i = function(c, p) {
1552
- return p;
1553
- });
1554
- var a = !!n.match(/End$/g), s = Le(e, t.name, r), u = e.moveables;
1555
- return s.map(function(c, p) {
1556
- var f, l = u[p];
1557
- f = i(l, c);
1558
- var d = t[n](l, T(T({}, f), { parentFlag: !0 }));
1559
- return a && (l.state.gestos = {}), d;
1560
- });
1561
- }
1562
- function Gi(e, t, n, r) {
1563
- var i = n.fixedDirection, o = n.fixedPosition, a = ce(r.datas.startPositions || Ae(t.state), i), s = P(Se(rr(-e.rotation / 180 * Math.PI, 3), [a[0] - o[0], a[1] - o[1], 1], 3), 2), u = s[0], c = s[1];
1564
- return r.datas.originalX = u, r.datas.originalY = c, r;
1565
- }
1566
- function Ii(e, t, n, r) {
1567
- var i = Dn(e.props, n), o = i.renderDirections, a = o === void 0 ? t : o, s = i.displayAroundControls;
1568
- if (!a) return [];
1569
- var u = a === !0 ? Zr : a;
1570
- return L(L([], P(s ? function(c, p, f, l) {
1571
- var d = c.renderState;
1572
- d.renderDirectionMap || (d.renderDirectionMap = {});
1573
- var h = c.getState(), g = h.renderPoses, v = h.rotation, m = h.direction, x = d.renderDirectionMap, y = c.props.zoom, E = on(m), D = v / Math.PI * 180;
1574
- return (l || Cn(x)).map(function(b) {
1575
- var w = kr[b];
1576
- if (!w) return null;
1577
- var _ = (St(D, 15) + E * Fi[b] + 720) % 180, M = ["around-control"];
1578
- return f && M.push("direction", f), p.createElement("div", { className: Ot.apply(void 0, L([], P(M), !1)), "data-rotation": _, "data-direction": b, key: "direction-around-".concat(b), style: tr.apply(void 0, L([v, y], P(w.map(function(B) {
1579
- return g[B];
1580
- })), !1)) });
1581
- });
1582
- }(e, r, n, u) : []), !1), P(function(c, p, f, l) {
1583
- var d, h = c.getState(), g = h.renderPoses, v = h.rotation, m = h.direction, x = Dn(c.props, p).zoom, y = ((d = v / Math.PI * 180) < 0 && (d = d % 360 + 360), d % 360), E = {}, D = c.renderState;
1584
- D.renderDirectionMap || (D.renderDirectionMap = {});
1585
- var b = D.renderDirectionMap;
1586
- f.forEach(function(_) {
1587
- var M = _.dir;
1588
- E[M] = !0;
1589
- });
1590
- var w = on(m);
1591
- return f.map(function(_) {
1592
- var M = _.data, B = _.classNames, S = _.dir, C = kr[S];
1593
- if (!C || !E[S]) return null;
1594
- b[S] = !0;
1595
- var O = (St(y, 15) + w * Fi[S] + 720) % 180, k = {};
1596
- return Cn(M).forEach(function(z) {
1597
- k["data-".concat(z)] = M[z];
1598
- }), l.createElement("div", T({ className: Ot.apply(void 0, L(["control", "direction", S, p], P(B), !1)), "data-rotation": O, "data-direction": S }, k, { key: "direction-".concat(S), style: tr.apply(void 0, L([v, x], P(C.map(function(z) {
1599
- return g[z];
1600
- })), !1)) }));
1601
- });
1602
- }(e, n, u.map(function(c) {
1603
- return { data: {}, classNames: [], dir: c };
1604
- }), r)), !1);
1605
- }
1606
- function ti(e, t, n, r, i, o) {
1607
- for (var a = [], s = 6; s < arguments.length; s++) a[s - 6] = arguments[s];
1608
- var u = be(n, r), c = t ? St(u / Math.PI * 180, 15) % 180 : -1;
1609
- return e.createElement("div", { key: "line-".concat(o), className: Ot.apply(void 0, L(["line", "direction", t ? "edge" : "", t], P(a), !1)), "data-rotation": c, "data-line-key": o, "data-direction": t, style: Za(n, r, i, u) });
1610
- }
1611
- function Ro(e, t, n, r, i) {
1612
- return (n === !0 ? Oa : n).map(function(o, a) {
1613
- var s = P(kr[o], 2), u = s[0], c = s[1];
1614
- if (c != null) return ti(e, o, r[u], r[c], i, "".concat(t, "Edge").concat(a), t);
1615
- }).filter(Boolean);
1616
- }
1617
- function Bo(e, t) {
1618
- var n = e.state, r = n.containerClientRect, i = r.clientHeight, o = r.clientWidth, a = r.clientLeft, s = r.clientTop, u = n.snapOffset, c = u.left, p = u.top, f = u.right, l = u.bottom, d = e.props.bounds || {}, h = (d.position || "client") === "css", g = d.left, v = g === void 0 ? -1 / 0 : g, m = d.top, x = m === void 0 ? -1 / 0 : m, y = d.right, E = y === void 0 ? h ? -1 / 0 : 1 / 0 : y, D = d.bottom, b = D === void 0 ? h ? -1 / 0 : 1 / 0 : D;
1619
- return h && (E = o + f - c - E, b = i + l - p - b), { left: v + c - a, right: E + c - a, top: x + p - s, bottom: b + p - s };
1620
- }
1621
- function Yi(e, t, n) {
1622
- var r = e[n ? "left" : "top"], i = e[n ? "right" : "bottom"], o = Math.min.apply(Math, L([], P(t), !1)), a = Math.max.apply(Math, L([], P(t), !1)), s = [];
1623
- return r + 1 > o && s.push({ direction: "start", isBound: !0, offset: o - r, pos: r }), i - 1 < a && s.push({ direction: "end", isBound: !0, offset: a - i, pos: i }), s.length || s.push({ isBound: !1, offset: 0, pos: 0 }), s.sort(function(u, c) {
1624
- return I(c.offset) - I(u.offset);
1625
- });
1626
- }
1627
- var Ha = ["left", "right", "center"], qa = ["top", "bottom", "middle"];
1628
- function ko(e, t) {
1629
- var n = e.props, r = n.snappable, i = n.bounds, o = n.innerBounds, a = n.verticalGuidelines, s = n.horizontalGuidelines, u = n.snapGridWidth, c = n.snapGridHeight, p = e.state, f = p.guidelines, l = p.enableSnap;
1630
- return !(!r || !l || t && r !== !0 && r.indexOf(t) < 0 || !(u || c || i || o || f && f.length || a && a.length || s && s.length));
1631
- }
1632
- function Xi(e) {
1633
- return e === !1 ? {} : e !== !0 && e ? e : { left: !0, right: !0, top: !0, bottom: !0 };
1634
- }
1635
- function Fo(e, t, n, r, i, o, a) {
1636
- var s;
1637
- r === void 0 && (r = []), i === void 0 && (i = []);
1638
- var u = e.props, c = ((s = e.state.snapThresholdInfo) === null || s === void 0 ? void 0 : s.multiples) || [1, 1], p = Ki(a, u.snapHorizontalThreshold, 5), f = Ki(o, u.snapVerticalThreshold, 5);
1639
- return function(l, d, h, g, v, m, x, y) {
1640
- return { vertical: Ni(l, "vertical", d, x * y[0], g), horizontal: Ni(l, "horizontal", h, m * y[1], v) };
1641
- }(e.state.guidelines, t, n, r, i, p, f, c);
1642
- }
1643
- function Fr(e) {
1644
- var t = e.isSnap;
1645
- if (!t) return { isSnap: !1, offset: 0, dist: -1, pos: 0, guideline: null };
1646
- var n = e.posInfos[0], r = n.guidelineInfos[0], i = r.offset, o = r.dist, a = r.guideline;
1647
- return { isSnap: t, offset: i, dist: o, pos: n.pos, guideline: a };
1648
- }
1649
- function Ni(e, t, n, r, i) {
1650
- var o, a;
1651
- if (i === void 0 && (i = []), !e || !e.length) return { isSnap: !1, index: -1, direction: "", posInfos: [] };
1652
- var s = t === "vertical" ? 0 : 1, u = n.map(function(p, f) {
1653
- var l = i[f] || "", d = e.map(function(h) {
1654
- var g = h.pos, v = p - g[s];
1655
- return { offset: v, dist: I(v), guideline: h, direction: l };
1656
- }).filter(function(h) {
1657
- var g = h.guideline, v = h.dist;
1658
- return !(g.type !== t || v > r);
1659
- }).sort(function(h, g) {
1660
- return h.dist - g.dist;
1661
- });
1662
- return { pos: p, index: f, guidelineInfos: d, direction: l };
1663
- }).filter(function(p) {
1664
- return p.guidelineInfos.length > 0;
1665
- }).sort(function(p, f) {
1666
- return p.guidelineInfos[0].dist - f.guidelineInfos[0].dist;
1667
- }), c = u.length > 0;
1668
- return { isSnap: c, index: c ? u[0].index : -1, direction: (a = (o = u[0]) === null || o === void 0 ? void 0 : o.direction) !== null && a !== void 0 ? a : "", posInfos: u };
1669
- }
1670
- function $n(e, t) {
1671
- return e.slice().sort(function(n, r) {
1672
- var i = n.sign[t], o = r.sign[t], a = n.offset[t], s = r.offset[t];
1673
- return i ? o ? function(u, c) {
1674
- var p = I(u.offset), f = I(c.offset);
1675
- return u.isBound && c.isBound ? f - p : u.isBound ? -1 : c.isBound ? 1 : u.isSnap && c.isSnap ? f - p : u.isSnap ? -1 : c.isSnap || p < he ? 1 : f < he ? -1 : p - f;
1676
- }({ isBound: n.isBound, isSnap: n.isSnap, offset: a }, { isBound: r.isBound, isSnap: r.isSnap, offset: s }) : -1 : 1;
1677
- })[0];
1678
- }
1679
- function Ao(e, t) {
1680
- var n, r, i = P(t, 2), o = i[0], a = i[1], s = a[0] - o[0], u = a[1] - o[1];
1681
- return I(s) < he && (s = 0), I(u) < he && (u = 0), s ? u ? (n = u / s * (e[0] - o[0]) + o[1], r = e[1]) : (n = o[1], r = e[1]) : (n = o[0], r = e[0]), n - r;
1682
- }
1683
- function Wi(e, t, n, r, i) {
1684
- return i === void 0 && (i = 0), r && t - i <= e || !r && e <= n + i ? { isBound: !0, offset: r ? t - e : n - e } : { isBound: !1, offset: 0 };
1685
- }
1686
- function Wn(e, t, n, r, i, o) {
1687
- var a, s, u = P(t, 2), c = u[0], p = u[1], f = e[0], l = n[0], d = n[1], h = er(d[1] - l[1]), g = p, v = -c / p;
1688
- return er(d[0] - l[0]) ? h ? { isBound: !1, offset: 0 } : c ? Wi((l[1] - f[1]) / v + f[0], l[0], d[0], r, i) : { isBound: s = I(a = l[1] - f[1]) <= 0, offset: s ? a : 0 } : g ? Wi(v * (l[0] - f[0]) + f[1], l[1], d[1], r, i) : { isBound: s = I(a = l[0] - f[0]) <= 0, offset: s ? a : 0 };
1689
- }
1690
- function zo(e, t, n) {
1691
- return t.map(function(r) {
1692
- var i = function(f, l) {
1693
- var d = l.line, h = l.centerSign, g = l.verticalSign, v = l.horizontalSign, m = l.lineConstants, x = f.props.innerBounds;
1694
- if (!x) return { isAllBound: !1, isBound: !1, isVerticalBound: !1, isHorizontalBound: !1, offset: [0, 0] };
1695
- var y = x.left, E = x.top, D = x.width, b = x.height, w = [[y, E], [y, E + b]], _ = [[y, E], [y + D, E]], M = [[y + D, E], [y + D, E + b]], B = [[y, E + b], [y + D, E + b]];
1696
- if (function(U, H, W, j) {
1697
- return j === void 0 && (j = he), U.every(function(rt) {
1698
- var gt = Ao(rt, H);
1699
- return gt <= 0 === W || I(gt) <= j;
1700
- });
1701
- }([[y, E], [y + D, E], [y, E + b], [y + D, E + b]], d, h)) return { isAllBound: !1, isBound: !1, isVerticalBound: !1, isHorizontalBound: !1, offset: [0, 0] };
1702
- var S = Wn(d, m, _, g), C = Wn(d, m, B, g), O = Wn(d, m, w, v), k = Wn(d, m, M, v), z = S.isBound && C.isBound, R = S.isBound || C.isBound, A = O.isBound && k.isBound, F = O.isBound || k.isBound, G = tn(S.offset, C.offset), X = tn(O.offset, k.offset), V = [0, 0], nt = !1, Z = !1;
1703
- return I(X) < I(G) ? (V = [G, 0], nt = R, Z = z) : (V = [0, X], nt = F, Z = A), { isAllBound: Z, isVerticalBound: R, isHorizontalBound: F, isBound: nt, offset: V };
1704
- }(e, r), o = i.isBound, a = i.offset, s = i.isVerticalBound, u = i.isHorizontalBound, c = r.multiple, p = Tn({ datas: n, distX: a[0], distY: a[1] }).map(function(f, l) {
1705
- return f * (c[l] ? 2 / c[l] : 0);
1706
- });
1707
- return { sign: c, isBound: o, isVerticalBound: s, isHorizontalBound: u, isSnap: !1, offset: p };
1708
- });
1709
- }
1710
- function Go(e, t, n, r) {
1711
- var i = e.state, o = cn(i.allMatrix, 100, 100, i.is3d ? 4 : 3), a = ce(o, [0, 0]);
1712
- return function(s, u) {
1713
- var c = [], p = s[0], f = s[1];
1714
- return p && f ? c.push([[0, 2 * f], s, [-p, f]], [[2 * p, 0], s, [p, -f]]) : p ? (c.push([[2 * p, 0], [p, 1], [p, -1]]), u && c.push([[0, -1], [p, -1], [-p, -1]], [[0, 1], [p, 1], [-p, 1]])) : f ? (c.push([[0, 2 * f], [1, f], [-1, f]]), u && c.push([[-1, 0], [-1, f], [-1, -f]], [[1, 0], [1, f], [1, -f]])) : c.push([[-1, 0], [-1, -1], [-1, 1]], [[1, 0], [1, -1], [1, 1]], [[0, -1], [-1, -1], [1, -1]], [[0, 1], [-1, 1], [1, 1]]), c;
1715
- }(n, r).map(function(s) {
1716
- var u = P(s, 3), c = u[0], p = u[1], f = u[2], l = [ce(o, p), ce(o, f)], d = function(m) {
1717
- var x = P(m, 2), y = x[0], E = x[1], D = E[0] - y[0], b = E[1] - y[1];
1718
- Math.abs(D) < It && (D = 0), Math.abs(b) < It && (b = 0);
1719
- var w = 0, _ = 0, M = 0;
1720
- return D ? b ? (_ = 1, M = (w = -b / D) * y[0] - y[1]) : (_ = 1, M = -y[1]) : (w = -1, M = y[0]), [w, _, M].map(function(B) {
1721
- return St(B, It);
1722
- });
1723
- }(l), h = function(m, x) {
1724
- var y = wr([x[0][0], x[1][0]]), E = wr([x[0][1], x[1][1]]);
1725
- return { vertical: y <= m[0], horizontal: E <= m[1] };
1726
- }(a, l), g = h.vertical, v = h.horizontal;
1727
- return { multiple: c, centerSign: Ao(a, l) <= 0, verticalSign: g, horizontalSign: v, lineConstants: d, line: [ce(t, p), ce(t, f)] };
1728
- });
1729
- }
1730
- function Ar(e, t, n, r, i) {
1731
- var o = function(f, l, d, h) {
1732
- var g = l[0] - f[0], v = l[1] - f[1];
1733
- if (I(g) < It && (g = 0), I(v) < It && (v = 0), !g) return h ? [0, 0] : [0, d];
1734
- if (!v) return h ? [d, 0] : [0, 0];
1735
- var m = v / g, x = f[1] - m * f[0];
1736
- return h ? [d, m * (l[0] + d) + x - l[1]] : [(l[1] + d - x) / m - l[0], d];
1737
- }(e, t, n, r);
1738
- if (!o) return { isOutside: !1, offset: [0, 0] };
1739
- var a = xn(e, t), s = xn(o, e), u = xn(o, t), c = s > a || u > a, p = P(Tn({ datas: i, distX: o[0], distY: o[1] }), 2);
1740
- return { offset: [p[0], p[1]], isOutside: c };
1741
- }
1742
- function Hi(e, t) {
1743
- return e.isBound ? e.offset : t.isSnap ? Fr(t).offset : 0;
1744
- }
1745
- function La(e, t, n, r, i, o) {
1746
- if (!ko(e, "draggable")) return [{ isSnap: !1, isBound: !1, offset: 0 }, { isSnap: !1, isBound: !1, offset: 0 }];
1747
- var a = ri(o.absolutePoses, [t, n]), s = ir(a), u = s.left, c = s.right, p = s.top, f = s.bottom, l = { horizontal: a.map(function(_) {
1748
- return _[1];
1749
- }), vertical: a.map(function(_) {
1750
- return _[0];
1751
- }) }, d = ei(e, i, function(_, M) {
1752
- var B = function(O, k) {
1753
- var z = Xi(O), R = {};
1754
- for (var A in z) A in k && z[A] && (R[A] = k[A]);
1755
- return R;
1756
- }(_, M), S = qa.filter(function(O) {
1757
- return O in B;
1758
- }), C = Ha.filter(function(O) {
1759
- return O in B;
1760
- });
1761
- return { horizontalNames: S, verticalNames: C, horizontal: S.map(function(O) {
1762
- return B[O];
1763
- }), vertical: C.map(function(O) {
1764
- return B[O];
1765
- }) };
1766
- }(Xi(e.props.snapDirections), { left: u, right: c, top: p, bottom: f, center: (u + c) / 2, middle: (p + f) / 2 }), l), h = d.vertical, g = d.horizontal, v = function(_, M, B) {
1767
- var S, C = zo(_, Go(_, M, [0, 0], !1).map(function(G) {
1768
- return T(T({}, G), { multiple: G.multiple.map(function(X) {
1769
- return 2 * I(X);
1770
- }) });
1771
- }), B), O = $n(C, 0), k = $n(C, 1), z = 0, R = 0, A = O.isVerticalBound || k.isVerticalBound, F = O.isHorizontalBound || k.isHorizontalBound;
1772
- return (A || F) && (S = P(function(G) {
1773
- var X = G.datas, V = G.distX, nt = G.distY;
1774
- X.beforeMatrix;
1775
- var Z = X.matrix, U = X.is3d;
1776
- X.startDragBeforeDist;
1777
- var H = X.startDragDist, W = X.absoluteOrigin, j = U ? 4 : 3;
1778
- return ut(Se(Z, kt(H, [V, nt]), j), W);
1779
- }({ datas: B, distX: -O.offset[0], distY: -k.offset[1] }), 2), z = S[0], R = S[1]), { vertical: { isBound: A, offset: z }, horizontal: { isBound: F, offset: R } };
1780
- }(e, a, o), m = v.vertical, x = v.horizontal, y = h.isSnap, E = g.isSnap, D = h.isBound || m.isBound, b = g.isBound || x.isBound, w = P(function(_, M, B, S, C) {
1781
- var O = P(M, 2), k = O[0], z = O[1], R = P(B, 2), A = R[0], F = R[1], G = P(S, 2), X = G[0], V = G[1], nt = P(C, 2), Z = nt[0], U = nt[1], H = -Z, W = -U;
1782
- if (_ && k && z) {
1783
- H = 0, W = 0;
1784
- var j = [];
1785
- if (A && F ? j.push([0, U], [Z, 0]) : A ? j.push([Z, 0]) : F ? j.push([0, U]) : X && V ? j.push([0, U], [Z, 0]) : X ? j.push([Z, 0]) : V && j.push([0, U]), j.length) {
1786
- j.sort(function(Y, $) {
1787
- return Te(ut([k, z], Y)) - Te(ut([k, z], $));
1788
- });
1789
- var rt = j[0];
1790
- if (rt[0] && I(k) > It) H = -rt[0], W = z * I(k + H) / I(k) - z;
1791
- else if (rt[1] && I(z) > It) {
1792
- var gt = z;
1793
- W = -rt[1], H = k * I(z + W) / I(gt) - k;
1794
- }
1795
- if (_ && F && A) if (I(H) > It && I(H) < I(Z)) H *= q = I(Z) / I(H), W *= q;
1796
- else if (I(W) > It && I(W) < I(U)) {
1797
- var q;
1798
- H *= q = I(U) / I(W), W *= q;
1799
- } else H = tn(-Z, H), W = tn(-U, W);
1800
- }
1801
- } else H = k || A ? -Z : 0, W = z || F ? -U : 0;
1802
- return [H, W];
1803
- }(r, [t, n], [D, b], [y, E], [tn(h.offset, m.offset), tn(g.offset, x.offset)]), 2);
1804
- return [{ isBound: D, isSnap: y, offset: w[0] }, { isBound: b, isSnap: E, offset: w[1] }];
1805
- }
1806
- function ei(e, t, n, r) {
1807
- r === void 0 && (r = n);
1808
- var i = function(h, g, v) {
1809
- var m = h || {}, x = m.position, y = x === void 0 ? "client" : x, E = m.left, D = E === void 0 ? -1 / 0 : E, b = m.top, w = b === void 0 ? -1 / 0 : b, _ = m.right, M = _ === void 0 ? 1 / 0 : _, B = m.bottom, S = { position: y, left: D, top: w, right: M, bottom: B === void 0 ? 1 / 0 : B };
1810
- return { vertical: Yi(S, g, !0), horizontal: Yi(S, v, !1) };
1811
- }(Bo(e), r.vertical, r.horizontal), o = i.horizontal, a = i.vertical, s = t ? { horizontal: { isSnap: !1, index: -1 }, vertical: { isSnap: !1, index: -1 } } : Fo(e, n.vertical, n.horizontal, void 0, void 0, void 0, void 0), u = s.horizontal, c = s.vertical, p = Hi(o[0], u), f = Hi(a[0], c), l = I(p), d = I(f);
1812
- return { horizontal: { isBound: o[0].isBound, isSnap: u.isSnap, snapIndex: u.index, offset: p, dist: l, bounds: o, snap: u }, vertical: { isBound: a[0].isBound, isSnap: c.isSnap, snapIndex: c.index, offset: f, dist: d, bounds: a, snap: c } };
1813
- }
1814
- function qi(e, t) {
1815
- return e.isBound ? e.offset : t.isSnap ? t.offset : 0;
1816
- }
1817
- var vn, we = { name: "draggable", props: ["draggable", "throttleDrag", "throttleDragRotate", "hideThrottleDragRotateLine", "startDragRotate", "edgeDraggable"], events: ["dragStart", "drag", "dragEnd", "dragGroupStart", "dragGroup", "dragGroupEnd"], requestStyle: function() {
1818
- return ["left", "top", "right", "bottom"];
1819
- }, requestChildStyle: function() {
1820
- return ["left", "top", "right", "bottom"];
1821
- }, render: function(e, t) {
1822
- var n = e.props, r = n.hideThrottleDragRotateLine, i = n.throttleDragRotate, o = n.zoom, a = e.getState(), s = a.dragInfo, u = a.beforeOrigin;
1823
- if (r || !i || !s) return [];
1824
- var c = s.dist;
1825
- if (!c[0] && !c[1]) return [];
1826
- var p = Te(c), f = be(c, [0, 0]);
1827
- return [t.createElement("div", { className: Ot("line", "horizontal", "dragline", "dashed"), key: "dragRotateGuideline", style: { width: "".concat(p, "px"), transform: "translate(".concat(u[0], "px, ").concat(u[1], "px) rotate(").concat(f, "rad) scaleY(").concat(o, ")") } })];
1828
- }, dragStart: function(e, t) {
1829
- var n = t.datas, r = t.parentEvent, i = t.parentGesto, o = e.state, a = o.gestos, s = o.style;
1830
- if (a.draggable) return !1;
1831
- a.draggable = i || e.targetGesto, n.datas = {}, n.left = parseFloat(s.left || "") || 0, n.top = parseFloat(s.top || "") || 0, n.bottom = parseFloat(s.bottom || "") || 0, n.right = parseFloat(s.right || "") || 0, n.startValue = [0, 0], Oo(e, t), function(c, p) {
1832
- gr(c, p, an(nn(p).startTransforms, function(f) {
1833
- return f.indexOf("".concat("translate", "(")) === 0;
1834
- }));
1835
- }(e, t), function(c, p) {
1836
- p.absolutePoses = Ae(c.state);
1837
- }(e, n), n.prevDist = [0, 0], n.prevBeforeDist = [0, 0], n.isDrag = !1, n.deltaOffset = [0, 0];
1838
- var u = Tt(e, t, T({ set: function(c) {
1839
- n.startValue = c;
1840
- } }, function(c, p) {
1841
- var f = nn(p);
1842
- return { setTransform: function(l, d) {
1843
- d === void 0 && (d = -1), f.startTransforms = ie(l) ? l : wn(l), gr(c, p, d);
1844
- }, setTransformIndex: function(l) {
1845
- gr(c, p, l);
1846
- } };
1847
- }(e, t)));
1848
- return (r || lt(e, "onDragStart", u)) !== !1 ? (n.isDrag = !0, e.state.dragInfo = { startRect: e.getRect(), dist: [0, 0] }) : (a.draggable = null, n.isPinch = !1), !!n.isDrag && u;
1849
- }, drag: function(e, t) {
1850
- if (t) {
1851
- Ya(e, t, "translate");
1852
- var n = t.datas, r = t.parentEvent, i = t.parentFlag, o = t.isPinch, a = t.deltaOffset, s = t.useSnap, u = t.isRequest, c = t.isGroup, p = t.parentThrottleDrag, f = t.distX, l = t.distY, d = n.isDrag, h = n.prevDist, g = n.prevBeforeDist, v = n.startValue;
1853
- if (d) {
1854
- a && (f += a[0], l += a[1]);
1855
- var m = e.props, x = m.parentMoveable, y = c ? 0 : m.throttleDrag || p || 0, E = r ? 0 : m.throttleDragRotate || 0, D = 0, b = !1, w = !1, _ = !1, M = !1;
1856
- if (!r && E > 0 && (f || l)) {
1857
- var B = m.startDragRotate || 0, S = St(B + 180 * be([0, 0], [f, l]) / Math.PI, E) - B, C = l * Math.abs(Math.cos((S - 90) / 180 * Math.PI)), O = Te([f * Math.abs(Math.cos(S / 180 * Math.PI)), C]);
1858
- D = S * Math.PI / 180, f = O * Math.cos(D), l = O * Math.sin(D);
1859
- }
1860
- if (!o && !r && !i) {
1861
- var k = P(La(e, f, l, E, !s && u || a, n), 2), z = k[0], R = k[1];
1862
- b = z.isSnap, w = z.isBound, _ = R.isSnap, M = R.isBound, f += z.offset, l += R.offset;
1863
- }
1864
- var A = kt(Ai({ datas: n, distX: f, distY: l }), v), F = kt(function($) {
1865
- var J = $.datas, At = P(Ai({ datas: J, distX: $.distX, distY: $.distY }), 2), le = function(Pt, tt) {
1866
- var it = Pt.beforeTransform, xt = Pt.afterTransform;
1867
- Pt.beforeTransform2, Pt.afterTransform2;
1868
- var yt = Wt(tt, Pt.targetAllTransform, 4), Rt = Wt(We(it, 4), yt, 4);
1869
- return Wt(Rt, We(xt, 4), 4);
1870
- }(J, function(Pt) {
1871
- for (var tt = _t(4), it = 0; it < 3; ++it) tt[12 + it] = Pt[it] || 0;
1872
- return tt;
1873
- }([At[0], At[1]]));
1874
- return Se(le, Rn([0, 0, 0], 4), 4);
1875
- }({ datas: n, distX: f, distY: l }), v);
1876
- Di(F, he), Di(A, he), E || (b || w || (F[0] = St(F[0], y), A[0] = St(A[0], y)), _ || M || (F[1] = St(F[1], y), A[1] = St(A[1], y)));
1877
- var G = ut(A, v), X = ut(F, v), V = ut(X, h), nt = ut(G, g);
1878
- n.prevDist = X, n.prevBeforeDist = G, n.passDelta = V, n.passDist = X;
1879
- var Z = n.left + G[0], U = n.top + G[1], H = n.right - G[0], W = n.bottom - G[1], j = function($, J, At) {
1880
- return "".concat($.beforeFunctionTexts.join(" "), " ").concat($.isAppendTransform ? At : J, " ").concat($.afterFunctionTexts.join(" "));
1881
- }(n, "translate(".concat(F[0], "px, ").concat(F[1], "px)"), "translate(".concat(X[0], "px, ").concat(X[1], "px)"));
1882
- if (function($, J) {
1883
- nn($).nextTransforms = wn(J);
1884
- }(t, j), e.state.dragInfo.dist = r ? [0, 0] : X, r || x || !V.every(function($) {
1885
- return !$;
1886
- }) || !nt.some(function($) {
1887
- return !$;
1888
- })) {
1889
- var rt = e.state, gt = rt.width, q = rt.height, Y = Tt(e, t, T({ transform: j, dist: X, delta: V, translate: F, beforeDist: G, beforeDelta: nt, beforeTranslate: A, left: Z, top: U, right: H, bottom: W, width: gt, height: q, isPinch: o }, $e({ transform: j }, t)));
1890
- return !r && lt(e, "onDrag", Y), Y;
1891
- }
1892
- }
1893
- }
1894
- }, dragAfter: function(e, t) {
1895
- var n = t.datas, r = n.deltaOffset;
1896
- return !(!r[0] && !r[1]) && (n.deltaOffset = [0, 0], this.drag(e, T(T({}, t), { deltaOffset: r })));
1897
- }, dragEnd: function(e, t) {
1898
- var n = t.parentEvent, r = t.datas;
1899
- if (e.state.dragInfo = null, r.isDrag) {
1900
- r.isDrag = !1;
1901
- var i = Pn(e, t, {});
1902
- return !n && lt(e, "onDragEnd", i), i;
1903
- }
1904
- }, dragGroupStart: function(e, t) {
1905
- var n, r, i = t.datas, o = t.clientX, a = t.clientY, s = this.dragStart(e, t);
1906
- if (!s) return !1;
1907
- var u = vr(e, this, "dragStart", [o || 0, a || 0], t, 0, "draggable"), c = u.childEvents, p = u.eventParams, f = lt(e, "onDragGroupStart", T(T({}, s), { targets: e.props.targets, events: p }));
1908
- i.isDrag = f !== !1;
1909
- var l = (r = (n = c[0]) === null || n === void 0 ? void 0 : n.datas.startValue) !== null && r !== void 0 ? r : [0, 0];
1910
- return i.throttleOffset = [l[0] % 1, l[1] % 1], !!i.isDrag && s;
1911
- }, dragGroup: function(e, t) {
1912
- if (t.datas.isDrag) {
1913
- var n = this.drag(e, T(T({}, t), { parentThrottleDrag: e.props.throttleDrag })), r = vr(e, this, "drag", t.datas.passDelta, t, 0, "draggable").eventParams;
1914
- if (n) {
1915
- var i = T({ targets: e.props.targets, events: r }, n);
1916
- return lt(e, "onDragGroup", i), i;
1917
- }
1918
- }
1919
- }, dragGroupEnd: function(e, t) {
1920
- var n = t.isDrag;
1921
- if (t.datas.isDrag) {
1922
- this.dragEnd(e, t);
1923
- var r = vr(e, this, "dragEnd", [0, 0], t, 0, "draggable").eventParams;
1924
- return lt(e, "onDragGroupEnd", Pn(e, t, { targets: e.props.targets, events: r })), n;
1925
- }
1926
- }, request: function(e) {
1927
- var t = {}, n = e.getRect(), r = 0, i = 0, o = !1;
1928
- return { isControl: !1, requestStart: function(a) {
1929
- return o = a.useSnap, { datas: t, useSnap: o };
1930
- }, request: function(a) {
1931
- return "x" in a ? r = a.x - n.left : "deltaX" in a && (r += a.deltaX), "y" in a ? i = a.y - n.top : "deltaY" in a && (i += a.deltaY), { datas: t, distX: r, distY: i, useSnap: o };
1932
- }, requestEnd: function() {
1933
- return { datas: t, isDrag: !0, useSnap: o };
1934
- } };
1935
- }, unset: function(e) {
1936
- e.state.gestos.draggable = null, e.state.dragInfo = null;
1937
- } }, Li = Xr("resizable"), ja = { name: "resizable", ableGroup: "size", canPinch: !0, props: ["resizable", "throttleResize", "renderDirections", "displayAroundControls", "keepRatio", "resizeFormat", "keepRatioFinally", "edge", "checkResizableError"], events: ["resizeStart", "beforeResize", "resize", "resizeEnd", "resizeGroupStart", "beforeResizeGroup", "resizeGroup", "resizeGroupEnd"], render: (vn = "resizable", function(e, t) {
1938
- var n = Dn(e.props, vn).edge;
1939
- return n && (n === !0 || n.length) ? L(L([], P(Ro(t, vn, n, e.getState().renderPoses, e.props.zoom)), !1), P(function(r, i, o) {
1940
- return Ii(r, ["nw", "ne", "sw", "se"], vn, o);
1941
- }(e, 0, t)), !1) : function(r, i, o) {
1942
- return Ii(r, Zr, vn, o);
1943
- }(e, 0, t);
1944
- }), dragControlCondition: Li, viewClassName: /* @__PURE__ */ function(e) {
1945
- return function(t) {
1946
- if (!t.isDragging(e)) return "";
1947
- var n = function(i, o) {
1948
- var a, s = i.targetGesto, u = i.controlGesto;
1949
- return s?.isFlag() && (a = s.getEventData()[o]), !a && u?.isFlag() && (a = u.getEventData()[o]), a || {};
1950
- }(t, e), r = n.deg;
1951
- return r ? Ot("view-control-rotation".concat(r)) : "";
1952
- };
1953
- }("resizable"), dragControlStart: function(e, t) {
1954
- var n, r = t.inputEvent, i = t.isPinch, o = t.isGroup, a = t.parentDirection, s = t.parentGesto, u = t.datas, c = t.parentFixedDirection, p = t.parentEvent, f = function(M, B, S, C) {
1955
- var O;
1956
- return O = M || (B ? [0, 0] : function(k, z) {
1957
- if (k) {
1958
- var R = k.getAttribute("data-rotation") || "", A = k.getAttribute("data-direction");
1959
- if (z.deg = R, A) {
1960
- var F = [0, 0];
1961
- return A.indexOf("w") > -1 && (F[0] = -1), A.indexOf("e") > -1 && (F[0] = 1), A.indexOf("n") > -1 && (F[1] = -1), A.indexOf("s") > -1 && (F[1] = 1), F;
1962
- }
1963
- }
1964
- }(S.target, C)), O;
1965
- }(a, i, r, u), l = e.state, d = l.target, h = l.width, g = l.height, v = l.gestos;
1966
- if (!f || !d || v.resizable) return !1;
1967
- v.resizable = s || e.controlGesto, !i && Oo(e, t), u.datas = {}, u.direction = f, u.startOffsetWidth = h, u.startOffsetHeight = g, u.prevWidth = 0, u.prevHeight = 0, u.minSize = [0, 0], u.startWidth = l.inlineCSSWidth || l.cssWidth, u.startHeight = l.inlineCSSHeight || l.cssHeight, u.maxSize = [1 / 0, 1 / 0], o || (u.minSize = [l.minOffsetWidth, l.minOffsetHeight], u.maxSize = [l.maxOffsetWidth, l.maxOffsetHeight]);
1968
- var m = e.props.transformOrigin || "% %";
1969
- function x(M) {
1970
- u.ratio = M && isFinite(M) ? M : 0;
1971
- }
1972
- function y(M) {
1973
- var B = function(S, C) {
1974
- return { fixedPosition: ce(S, C), fixedDirection: C, fixedOffset: [0, 0] };
1975
- }(u.startPositions, M);
1976
- u.fixedDirection = B.fixedDirection, u.fixedPosition = B.fixedPosition, u.fixedOffset = B.fixedOffset;
1977
- }
1978
- function E(M) {
1979
- var B = function(S, C) {
1980
- var O = S.allMatrix, k = S.is3d, z = S.width, R = S.height, A = k ? 4 : 3, F = function(G, X, V) {
1981
- return [X ? G[0] / (X / 2) - 1 : 0, V ? G[1] / (V / 2) - 1 : 0];
1982
- }(C, z, R);
1983
- return { fixedPosition: _e(O, C, A), fixedDirection: F, fixedOffset: [z ? 0 : C[0], R ? 0 : C[1]] };
1984
- }(e.state, M);
1985
- u.fixedDirection = B.fixedDirection, u.fixedPosition = B.fixedPosition, u.fixedOffset = B.fixedOffset;
1986
- }
1987
- function D(M) {
1988
- u.minSize = [ue("".concat(M[0]), 0) || 0, ue("".concat(M[1]), 0) || 0];
1989
- }
1990
- function b(M) {
1991
- var B = [M[0] || 1 / 0, M[1] || 1 / 0];
1992
- Vn(B[0]) && !isFinite(B[0]) || (B[0] = ue("".concat(B[0]), 0) || 1 / 0), Vn(B[1]) && !isFinite(B[1]) || (B[1] = ue("".concat(B[1]), 0) || 1 / 0), u.maxSize = B;
1993
- }
1994
- u.transformOrigin = fn(m) ? m.split(" ") : m, u.startOffsetMatrix = l.offsetMatrix, u.startTransformOrigin = l.transformOrigin, u.isWidth = (n = t?.parentIsWidth) !== null && n !== void 0 ? n : !f[0] && !f[1] || f[0] || !f[1], u.startPositions = Ae(e.state), x(h / g), y(c || [-f[0], -f[1]]), u.setFixedDirection = y, u.setFixedPosition = E, u.setMin = D, u.setMax = b;
1995
- var w = Tt(e, t, { direction: f, startRatio: u.ratio, set: function(M) {
1996
- var B = P(M, 2), S = B[0], C = B[1];
1997
- u.startWidth = S, u.startHeight = C;
1998
- }, setMin: D, setMax: b, setRatio: x, setFixedDirection: y, setFixedPosition: E, setOrigin: function(M) {
1999
- u.transformOrigin = M;
2000
- }, dragStart: we.dragStart(e, new To().dragStart([0, 0], t)) }), _ = p || lt(e, "onResizeStart", w);
2001
- return u.startFixedDirection = u.fixedDirection, u.startFixedPosition = u.fixedPosition, _ !== !1 && (u.isResize = !0, e.state.snapRenderInfo = { request: t.isRequest, direction: f }), !!u.isResize && w;
2002
- }, dragControl: function(e, t) {
2003
- var n, r = t.datas, i = t.parentFlag, o = t.isPinch, a = t.parentKeepRatio, s = t.dragClient, u = t.parentDist, c = t.useSnap, p = t.isRequest, f = t.isGroup, l = t.parentEvent, d = t.resolveMatrix, h = r.isResize, g = r.transformOrigin, v = r.startWidth, m = r.startHeight, x = r.prevWidth, y = r.prevHeight, E = r.minSize, D = r.maxSize, b = r.ratio, w = r.startOffsetWidth, _ = r.startOffsetHeight, M = r.isWidth;
2004
- if (h) {
2005
- if (d) {
2006
- var B = e.state.is3d, S = r.startOffsetMatrix, C = r.startTransformOrigin, O = B ? 4 : 3, k = Qr(Zn(t)), z = Math.sqrt(k.length);
2007
- O !== z && (k = He(k, z, O));
2008
- var R = Po(S, k, C, O), A = cn(R, w, _, O);
2009
- r.startPositions = A, r.nextTargetMatrix = k, r.nextAllMatrix = R;
2010
- }
2011
- var F = Dn(e.props, "resizable"), G = F.resizeFormat, X = F.throttleResize, V = X === void 0 ? i ? 0 : 1 : X, nt = F.parentMoveable, Z = F.keepRatioFinally, U = r.direction, H = U, W = 0, j = 0;
2012
- U[0] || U[1] || (H = [1, 1]);
2013
- var rt = b && (a ?? F.keepRatio) || !1, gt = P(Ft(), 2), q = gt[0], Y = gt[1];
2014
- l || (r.setFixedDirection(r.fixedDirection), lt(e, "onBeforeResize", Tt(e, t, { startFixedDirection: r.startFixedDirection, startFixedPosition: r.startFixedPosition, setFixedDirection: function(N) {
2015
- var Q;
2016
- return r.setFixedDirection(N), Q = P(Ft(), 2), q = Q[0], Y = Q[1], [q, Y];
2017
- }, setFixedPosition: function(N) {
2018
- var Q;
2019
- return r.setFixedPosition(N), Q = P(Ft(), 2), q = Q[0], Y = Q[1], [q, Y];
2020
- }, boundingWidth: q, boundingHeight: Y, setSize: function(N) {
2021
- var Q;
2022
- Q = P(N, 2), q = Q[0], Y = Q[1];
2023
- } }, !0)));
2024
- var $ = s;
2025
- s || ($ = !i && o ? function(N) {
2026
- return ce(Ae(N.state), [0, 0]);
2027
- }(e) : r.fixedPosition);
2028
- var J = [0, 0];
2029
- if (o || (J = function(N, Q, ct, at, st, pt, ot) {
2030
- if (!ko(N, "resizable")) return [0, 0];
2031
- var bt = ot.fixedDirection, Et = ot.nextAllMatrix, Ht = N.state, Ut = Ht.allMatrix, Kt = Ht.is3d;
2032
- return function(K, et, dt, Ct, Dt, Bt, Xt, Mt) {
2033
- for (var ee = Ae(K.state), Qt = K.props.keepRatio, Lt = 0, Jt = 0, zt = 0; zt < 2; ++zt) {
2034
- var fe = Va(K, et(Lt, Jt), Dt, Qt, Xt, Mt), oe = fe.width, ae = fe.height, wt = oe.isBound, ve = ae.isBound, Nt = oe.offset, ye = ae.offset;
2035
- if (zt === 1 && (wt || (Nt = 0), ve || (ye = 0)), zt === 0 && Xt && !wt && !ve) return [0, 0];
2036
- if (Qt) {
2037
- var Ge = I(Nt) * (dt ? 1 / dt : 1), Ie = I(ye) * (Ct ? 1 / Ct : 1);
2038
- (wt && ve ? Ge < Ie : ve || !wt && Ge < Ie) ? Nt = dt * ye / Ct : ye = Ct * Nt / dt;
2039
- }
2040
- Lt += Nt, Jt += ye;
2041
- }
2042
- if (!Qt && Dt[0] && Dt[1]) {
2043
- var Be = function(Me, Oe, ne, qt, de) {
2044
- var Zt = [-ne[0], -ne[1]], jt = Me.state, $t = jt.width, Pe = jt.height, Ee = Me.props.bounds, ke = 1 / 0, Ye = 1 / 0;
2045
- if (Ee) {
2046
- var kn = [[ne[0], -ne[1]], [-ne[0], ne[1]]], dn = Ee.left, or = dn === void 0 ? -1 / 0 : dn, Fn = Ee.top, ra = Fn === void 0 ? -1 / 0 : Fn, ai = Ee.right, ia = ai === void 0 ? 1 / 0 : ai, si = Ee.bottom, oa = si === void 0 ? 1 / 0 : si;
2047
- kn.forEach(function(ar) {
2048
- var aa = ar[0] !== Zt[0], sa = ar[1] !== Zt[1], Xe = ce(Oe, ar), An = 360 * be(qt, Xe) / Math.PI;
2049
- if (sa) {
2050
- var hn = Xe.slice();
2051
- (I(An - 360) < 2 || I(An - 180) < 2) && (hn[1] = qt[1]);
2052
- var ui = Ar(qt, hn, (qt[1] < Xe[1] ? oa : ra) - Xe[1], !1, de), ci = P(ui.offset, 2)[1], ua = ui.isOutside;
2053
- isNaN(ci) || (Ye = Pe + (ua ? 1 : -1) * I(ci));
2054
- }
2055
- if (aa) {
2056
- hn = Xe.slice(), (I(An - 90) < 2 || I(An - 270) < 2) && (hn[0] = qt[0]);
2057
- var li = Ar(qt, hn, (qt[0] < Xe[0] ? ia : or) - Xe[0], !0, de), fi = P(li.offset, 1)[0], ca = li.isOutside;
2058
- isNaN(fi) || (ke = $t + (ca ? 1 : -1) * I(fi));
2059
- }
2060
- });
2061
- }
2062
- return { maxWidth: ke, maxHeight: Ye };
2063
- }(K, ee, Dt, Bt, Mt), pe = Be.maxWidth, De = Be.maxHeight, je = P(function(Me, Oe, ne, qt, de, Zt, jt, $t, Pe) {
2064
- var Ee = ce(Oe, jt), ke = ei(Me, $t, { vertical: [Ee[0]], horizontal: [Ee[1]] }), Ye = ke.horizontal.offset, kn = ke.vertical.offset;
2065
- if (St(kn, dr) || St(Ye, dr)) {
2066
- var dn = P(Tn({ datas: Pe, distX: -kn, distY: -Ye }), 2), or = dn[0], Fn = dn[1];
2067
- return [Math.min(de || 1 / 0, ne + jt[0] * or) - ne, Math.min(Zt || 1 / 0, qt + jt[1] * Fn) - qt];
2068
- }
2069
- return [0, 0];
2070
- }(K, et(Lt, Jt).map(function(Me) {
2071
- return Me.map(function(Oe) {
2072
- return St(Oe, dr);
2073
- });
2074
- }), dt + Lt, Ct + Jt, pe, De, Dt, Xt, Mt), 2);
2075
- Lt += Nt = je[0], Jt += ye = je[1];
2076
- }
2077
- return [Lt, Jt];
2078
- }(N, function(K, et) {
2079
- return function(dt, Ct, Dt, Bt, Xt, Mt) {
2080
- var ee = cn(dt, Ct, Dt, Mt ? 4 : 3);
2081
- return ri(ee, ut(Xt, ce(ee, Bt)));
2082
- }(Et || Ut, Q + K, ct + et, bt, st, Kt);
2083
- }, Q, ct, at, st, pt, ot);
2084
- }(e, q, Y, U, $, !c && p, r)), u && (!u[0] && (J[0] = 0), !u[1] && (J[1] = 0)), rt) {
2085
- H[0] && H[1] && J[0] && J[1] && (I(J[0]) > I(J[1]) ? J[1] = 0 : J[0] = 0);
2086
- var At = !J[0] && !J[1];
2087
- At && mt(), H[0] && !H[1] || J[0] && !J[1] || At && M ? (q += J[0], Y = q / b) : (!H[0] && H[1] || !J[0] && J[1] || At && !M) && (Y += J[1], q = Y * b);
2088
- } else q += J[0], Y += J[1], q = Math.max(0, q), Y = Math.max(0, Y);
2089
- n = P(function(N, Q, ct, at) {
2090
- if (!at) return N.map(function(et, dt) {
2091
- return Mr(et, Q[dt], ct[dt]);
2092
- });
2093
- var st = N[0], pt = N[1], ot = at === !0 ? st / pt : at, bt = Ei(N, Q, !1, ot), Et = bt[0], Ht = bt[1], Ut = Ei(N, ct, !0, ot), Kt = Ut[0], K = Ut[1];
2094
- return st < Et || pt < Ht ? (st = Et, pt = Ht) : (st > Kt || pt > K) && (st = Kt, pt = K), [st, pt];
2095
- }([q, Y], E, D, !!rt && b), 2), q = n[0], Y = n[1], mt(), rt && (f || Z) && (M ? Y = q / b : q = Y * b);
2096
- var le = [(W = q - w) - x, (j = Y - _) - y];
2097
- r.prevWidth = W, r.prevHeight = j;
2098
- var Pt = Xa(e, q, Y, $, g, r);
2099
- if (nt || !le.every(function(N) {
2100
- return !N;
2101
- }) || !Pt.every(function(N) {
2102
- return !N;
2103
- })) {
2104
- var tt, it, xt, yt, Rt = we.drag(e, _o(t, e.state, Pt, !!o, 0, "draggable")), Yt = Rt.transform, vt = v + W, ft = m + j, ht = Tt(e, t, T({ width: vt, height: ft, offsetWidth: Math.round(q), offsetHeight: Math.round(Y), startRatio: b, boundingWidth: q, boundingHeight: Y, direction: U, dist: [W, j], delta: le, isPinch: !!o, drag: Rt }, (tt = { style: { width: "".concat(vt, "px"), height: "".concat(ft, "px") }, transform: Yt }, xt = t, yt = (it = Rt).afterTransform || it.transform, T(T({}, $e(T(T(T({}, tt.style), it.style), { transform: yt }), xt)), { afterTransform: yt, transform: tt.transform }))));
2105
- return !l && lt(e, "onResize", ht), ht;
2106
- }
2107
- }
2108
- function Ft() {
2109
- var N = r.fixedDirection, Q = function(st, pt, ot, bt) {
2110
- var Et, Ht = ot.ratio, Ut = ot.startOffsetWidth, Kt = ot.startOffsetHeight, K = 0, et = 0, dt = bt.distX, Ct = bt.distY, Dt = bt.pinchScale, Bt = bt.parentDistance, Xt = bt.parentDist, Mt = bt.parentScale, ee = ot.fixedDirection, Qt = [0, 1].map(function(ae) {
2111
- return I(st[ae] - ee[ae]);
2112
- }), Lt = [0, 1].map(function(ae) {
2113
- var wt = Qt[ae];
2114
- return wt !== 0 && (wt = 2 / wt), wt;
2115
- });
2116
- if (Xt) K = Xt[0], et = Xt[1], pt && (K ? et || (et = K / Ht) : K = et * Ht);
2117
- else if (Vn(Dt)) K = (Dt - 1) * Ut, et = (Dt - 1) * Kt;
2118
- else if (Mt) K = (Mt[0] - 1) * Ut, et = (Mt[1] - 1) * Kt;
2119
- else if (Bt) {
2120
- var Jt = Ut * Qt[0], zt = Kt * Qt[1], fe = Te([Jt, zt]);
2121
- K = Bt / fe * Jt * Lt[0], et = Bt / fe * zt * Lt[1];
2122
- } else {
2123
- var oe = Tn({ datas: ot, distX: dt, distY: Ct });
2124
- oe = Lt.map(function(ae, wt) {
2125
- return oe[wt] * ae;
2126
- }), Et = P(function(ae, wt, ve, Nt, ye) {
2127
- var Ge = P(ae, 2), Ie = Ge[0], Be = Ge[1], pe = 0, De = 0;
2128
- if (ye && Ie && Be) {
2129
- var je = be([0, 0], wt), Me = be([0, 0], Nt), Oe = Te(wt), ne = Math.cos(je - Me) * Oe;
2130
- if (Nt[0]) if (Nt[1]) {
2131
- var qt = Nt[0] * Ie, de = Nt[1] * Be, Zt = Math.atan2(qt + wt[0], de + wt[1]), jt = Math.atan2(qt, de);
2132
- Zt < 0 && (Zt += 2 * Math.PI), jt < 0 && (jt += 2 * Math.PI);
2133
- var $t = 0;
2134
- ($t = I(Zt - jt) < Math.PI / 2 || I(Zt - jt) > Math.PI / 2 * 3 ? Zt - jt : Zt - (jt += Math.PI)) > 2 * Math.PI ? $t -= 2 * Math.PI : $t > Math.PI ? $t = 2 * Math.PI - $t : $t < -Math.PI && ($t = -2 * Math.PI - $t);
2135
- var Pe = Te([qt + wt[0], de + wt[1]]) * Math.cos($t);
2136
- pe = Pe * Math.sin(jt) - qt, De = Pe * Math.cos(jt) - de, Nt[0] < 0 && (pe *= -1), Nt[1] < 0 && (De *= -1);
2137
- } else De = (pe = ne) / ve;
2138
- else pe = (De = ne) * ve;
2139
- } else pe = Nt[0] * wt[0], De = Nt[1] * wt[1];
2140
- return [pe, De];
2141
- }([Ut, Kt], oe, Ht, st, pt), 2), K = Et[0], et = Et[1];
2142
- }
2143
- return { distWidth: K, distHeight: et };
2144
- }(H, rt, r, t);
2145
- W = Q.distWidth, j = Q.distHeight;
2146
- var ct = H[0] - N[0] || rt ? Math.max(w + W, he) : w, at = H[1] - N[1] || rt ? Math.max(_ + j, he) : _;
2147
- return rt && w && _ && (M ? at = ct / b : ct = at * b), [ct, at];
2148
- }
2149
- function mt() {
2150
- var N;
2151
- G && (N = P(G([q, Y]), 2), q = N[0], Y = N[1]), q = St(q, V), Y = St(Y, V);
2152
- }
2153
- }, dragControlAfter: function(e, t) {
2154
- var n = t.datas, r = n.isResize, i = n.startOffsetWidth, o = n.startOffsetHeight, a = n.prevWidth, s = n.prevHeight;
2155
- if (r && e.props.checkResizableError !== !1) {
2156
- var u = e.state, c = u.width - (i + a), p = u.height - (o + s), f = I(c) > 3, l = I(p) > 3;
2157
- return f && (n.startWidth += c, n.startOffsetWidth += c, n.prevWidth += c), l && (n.startHeight += p, n.startOffsetHeight += p, n.prevHeight += p), f || l ? this.dragControl(e, t) : void 0;
2158
- }
2159
- }, dragControlEnd: function(e, t) {
2160
- var n = t.datas, r = t.parentEvent;
2161
- if (n.isResize) {
2162
- n.isResize = !1;
2163
- var i = Pn(e, t, {});
2164
- return !r && lt(e, "onResizeEnd", i), i;
2165
- }
2166
- }, dragGroupControlCondition: Li, dragGroupControlStart: function(e, t) {
2167
- var n = t.datas, r = this.dragControlStart(e, T(T({}, t), { isGroup: !0 }));
2168
- if (!r) return !1;
2169
- var i = Le(e, "resizable", t), o = n.startOffsetWidth, a = n.startOffsetHeight;
2170
- function s() {
2171
- var d = n.minSize;
2172
- i.forEach(function(h) {
2173
- var g = h.datas, v = g.minSize, m = g.startOffsetWidth, x = g.startOffsetHeight, y = o * (m ? v[0] / m : 0), E = a * (x ? v[1] / x : 0);
2174
- d[0] = Math.max(d[0], y), d[1] = Math.max(d[1], E);
2175
- });
2176
- }
2177
- function u() {
2178
- var d = n.maxSize;
2179
- i.forEach(function(h) {
2180
- var g = h.datas, v = g.maxSize, m = g.startOffsetWidth, x = g.startOffsetHeight, y = o * (m ? v[0] / m : 0), E = a * (x ? v[1] / x : 0);
2181
- d[0] = Math.min(d[0], y), d[1] = Math.min(d[1], E);
2182
- });
2183
- }
2184
- var c = mr(e, this, "dragControlStart", t, function(d, h) {
2185
- return Gi(e, d, n, h);
2186
- });
2187
- s(), u();
2188
- var p = function(d) {
2189
- r.setFixedDirection(d), c.forEach(function(h, g) {
2190
- h.setFixedDirection(d), Gi(e, h.moveable, n, i[g]);
2191
- });
2192
- };
2193
- n.setFixedDirection = p;
2194
- var f = T(T({}, r), { targets: e.props.targets, events: c.map(function(d) {
2195
- return T(T({}, d), { setMin: function(h) {
2196
- d.setMin(h), s();
2197
- }, setMax: function(h) {
2198
- d.setMax(h), u();
2199
- } });
2200
- }), setFixedDirection: p, setMin: function(d) {
2201
- r.setMin(d), s();
2202
- }, setMax: function(d) {
2203
- r.setMax(d), u();
2204
- } }), l = lt(e, "onResizeGroupStart", f);
2205
- return n.isResize = l !== !1, !!n.isResize && r;
2206
- }, dragGroupControl: function(e, t) {
2207
- var n = t.datas;
2208
- if (n.isResize) {
2209
- var r = Dn(e.props, "resizable");
2210
- (function(d, h, g) {
2211
- d._emitter.on("onBeforeResize", g);
2212
- })(e, 0, function(d) {
2213
- lt(e, "onBeforeResizeGroup", Tt(e, t, T(T({}, d), { targets: r.targets }), !0));
2214
- });
2215
- var i = this.dragControl(e, T(T({}, t), { isGroup: !0 }));
2216
- if (i) {
2217
- var o = i.boundingWidth, a = i.boundingHeight, s = i.dist, u = r.keepRatio, c = [o / (o - s[0]), a / (a - s[1])], p = n.fixedPosition, f = mr(e, this, "dragControl", t, function(d, h) {
2218
- var g = P(Se(rr(e.rotation / 180 * Math.PI, 3), [h.datas.originalX * c[0], h.datas.originalY * c[1], 1], 3), 2), v = g[0], m = g[1];
2219
- return T(T({}, h), { parentDist: null, parentScale: c, dragClient: kt(p, [v, m]), parentKeepRatio: u });
2220
- }), l = T({ targets: r.targets, events: f }, i);
2221
- return lt(e, "onResizeGroup", l), l;
2222
- }
2223
- }
2224
- }, dragGroupControlEnd: function(e, t) {
2225
- var n = t.isDrag;
2226
- if (t.datas.isResize) {
2227
- this.dragControlEnd(e, t);
2228
- var r = mr(e, this, "dragControlEnd", t);
2229
- return lt(e, "onResizeGroupEnd", Pn(e, t, { targets: e.props.targets, events: r })), n;
2230
- }
2231
- }, request: function(e) {
2232
- var t = {}, n = 0, r = 0, i = !1, o = e.getRect();
2233
- return { isControl: !0, requestStart: function(a) {
2234
- var s;
2235
- return i = a.useSnap, { datas: t, parentDirection: a.direction || [1, 1], parentIsWidth: (s = a?.horizontal) === null || s === void 0 || s, useSnap: i };
2236
- }, request: function(a) {
2237
- return "offsetWidth" in a ? n = a.offsetWidth - o.offsetWidth : "deltaWidth" in a && (n += a.deltaWidth), "offsetHeight" in a ? r = a.offsetHeight - o.offsetHeight : "deltaHeight" in a && (r += a.deltaHeight), { datas: t, parentDist: [n, r], parentKeepRatio: a.keepRatio, useSnap: i };
2238
- }, requestEnd: function() {
2239
- return { datas: t, isDrag: !0, useSnap: i };
2240
- } };
2241
- }, unset: function(e) {
2242
- e.state.gestos.resizable = null;
2243
- } };
2244
- function ji(e) {
2245
- return e ? e / I(e) : 0;
2246
- }
2247
- function Va(e, t, n, r, i, o) {
2248
- var a = function(f, l, d) {
2249
- var h = [];
2250
- if (d) I(l[0]) !== 1 || I(l[1]) !== 1 ? h.push([l, [-1, -1]], [l, [-1, 1]], [l, [1, -1]], [l, [1, 1]]) : h.push([l, [f[0], -f[1]]], [l, [-f[0], f[1]]]), h.push([l, f]);
2251
- else if (f[0] && f[1] || !f[0] && !f[1]) {
2252
- var g = f[0] ? f : [1, 1];
2253
- [1, -1].forEach(function(v) {
2254
- [1, -1].forEach(function(m) {
2255
- var x = [v * g[0], m * g[1]];
2256
- l[0] === x[0] && l[1] === x[1] || h.push([l, x]);
2257
- });
2258
- });
2259
- } else f[0] ? (I(l[0]) === 1 ? [1] : [1, -1]).forEach(function(v) {
2260
- h.push([[l[0], -1], [v * f[0], -1]], [[l[0], 0], [v * f[0], 0]], [[l[0], 1], [v * f[0], 1]]);
2261
- }) : f[1] && (I(l[1]) === 1 ? [1] : [1, -1]).forEach(function(v) {
2262
- h.push([[-1, l[1]], [-1, v * f[1]]], [[0, l[1]], [0, v * f[1]]], [[1, l[1]], [1, v * f[1]]]);
2263
- });
2264
- return h;
2265
- }(n, o.fixedDirection, r), s = Go(e, t, n, r), u = L(L([], P(function(f, l, d, h, g, v) {
2266
- return d.map(function(m) {
2267
- var x = P(m, 2), y = x[0], E = x[1], D = ce(l, y), b = ce(l, E), w = h ? function(X, V, nt, Z) {
2268
- var U = function(At, le, Pt) {
2269
- var tt = Bo(At), it = tt.left, xt = tt.top, yt = tt.right, Rt = tt.bottom, Yt = P(Pt, 2), vt = Yt[0], ft = Yt[1], ht = P(ut(Pt, le), 2), Ft = ht[0], mt = ht[1];
2270
- I(Ft) < he && (Ft = 0), I(mt) < he && (mt = 0);
2271
- var N = mt > 0, Q = Ft > 0, ct = { isBound: !1, offset: 0, pos: 0 }, at = { isBound: !1, offset: 0, pos: 0 };
2272
- if (Ft === 0 && mt === 0) return { vertical: ct, horizontal: at };
2273
- if (Ft === 0) N ? Rt < ft && (at.pos = Rt, at.offset = ft - Rt) : xt > ft && (at.pos = xt, at.offset = ft - xt);
2274
- else if (mt === 0) Q ? yt < vt && (ct.pos = yt, ct.offset = vt - yt) : it > vt && (ct.pos = it, ct.offset = vt - it);
2275
- else {
2276
- var st = mt / Ft, pt = Pt[1] - st * vt, ot = 0, bt = 0, Et = !1;
2277
- Q && yt <= vt ? (ot = st * yt + pt, bt = yt, Et = !0) : !Q && vt <= it && (ot = st * it + pt, bt = it, Et = !0), Et && (ot < xt || ot > Rt) && (Et = !1), Et || (N && Rt <= ft ? (bt = ((ot = Rt) - pt) / st, Et = !0) : !N && ft <= xt && (bt = ((ot = xt) - pt) / st, Et = !0)), Et && (ct.isBound = !0, ct.pos = bt, ct.offset = vt - bt, at.isBound = !0, at.pos = ot, at.offset = ft - ot);
2278
- }
2279
- return { vertical: ct, horizontal: at };
2280
- }(X, V, nt), H = U.horizontal, W = U.vertical, j = Z ? { horizontal: { isSnap: !1 }, vertical: { isSnap: !1 } } : function(At, le, Pt) {
2281
- var tt = P(Pt, 2), it = tt[0], xt = tt[1], yt = P(le, 2), Rt = yt[0], Yt = yt[1], vt = P(ut(Pt, le), 2), ft = vt[0], ht = vt[1], Ft = ht > 0, mt = ft > 0;
2282
- ft = er(ft), ht = er(ht);
2283
- var N = { isSnap: !1, offset: 0, pos: 0 }, Q = { isSnap: !1, offset: 0, pos: 0 };
2284
- if (ft === 0 && ht === 0) return { vertical: N, horizontal: Q };
2285
- var ct = Fo(At, ft ? [it] : [], ht ? [xt] : [], [], [], void 0, void 0), at = ct.vertical, st = ct.horizontal;
2286
- at.posInfos.filter(function(Xt) {
2287
- var Mt = Xt.pos;
2288
- return mt ? Mt >= Rt : Mt <= Rt;
2289
- }), st.posInfos.filter(function(Xt) {
2290
- var Mt = Xt.pos;
2291
- return Ft ? Mt >= Yt : Mt <= Yt;
2292
- }), at.isSnap = at.posInfos.length > 0, st.isSnap = st.posInfos.length > 0;
2293
- var pt = Fr(at), ot = pt.isSnap, bt = pt.guideline, Et = Fr(st), Ht = Et.isSnap, Ut = Et.guideline, Kt = Ht ? Ut.pos[1] : 0, K = ot ? bt.pos[0] : 0;
2294
- if (ft === 0) Ht && (Q.isSnap = !0, Q.pos = Ut.pos[1], Q.offset = xt - Q.pos);
2295
- else if (ht === 0) ot && (N.isSnap = !0, N.pos = K, N.offset = it - K);
2296
- else {
2297
- var et = ht / ft, dt = Pt[1] - et * it, Ct = 0, Dt = 0, Bt = !1;
2298
- ot ? (Ct = et * (Dt = K) + dt, Bt = !0) : Ht && (Dt = ((Ct = Kt) - dt) / et, Bt = !0), Bt && (N.isSnap = !0, N.pos = Dt, N.offset = it - Dt, Q.isSnap = !0, Q.pos = Ct, Q.offset = xt - Ct);
2299
- }
2300
- return { vertical: N, horizontal: Q };
2301
- }(X, V, nt), rt = j.horizontal, gt = j.vertical, q = qi(H, rt), Y = qi(W, gt), $ = I(q), J = I(Y);
2302
- return { horizontal: { isBound: H.isBound, isSnap: rt.isSnap, offset: q, dist: $ }, vertical: { isBound: W.isBound, isSnap: gt.isSnap, offset: Y, dist: J } };
2303
- }(f, D, b, g) : ei(f, g, { vertical: [b[0]], horizontal: [b[1]] }), _ = w.horizontal, M = _.offset, B = _.isBound, S = _.isSnap, C = w.vertical, O = C.offset, k = C.isBound, z = C.isSnap, R = ut(E, y);
2304
- if (!O && !M) return { isBound: k || B, isSnap: z || S, sign: R, offset: [0, 0] };
2305
- var A = function(X, V, nt, Z) {
2306
- var U = be(X, V) / Math.PI * 180, H = nt.vertical, W = H.isBound, j = H.isSnap, rt = H.dist, gt = nt.horizontal, q = gt.isBound, Y = gt.isSnap, $ = U % 180, J = $ < 3 || $ > 177, At = $ > 87 && $ < 93;
2307
- return gt.dist < rt && (W || j && !At && (!Z || !J)) ? "vertical" : !q && (!Y || J || Z && At) ? "" : "horizontal";
2308
- }(D, b, w, h);
2309
- if (!A) return { sign: R, isBound: !1, isSnap: !1, offset: [0, 0] };
2310
- var F = A === "vertical", G = [0, 0];
2311
- return G = (G = h || I(E[0]) !== 1 || I(E[1]) !== 1 || y[0] === E[0] || y[1] === E[1] ? Ar(D, b, -(F ? O : M), F, v).offset : Tn({ datas: v, distX: -O, distY: -M })).map(function(X, V) {
2312
- return X * (R[V] ? 2 / R[V] : 0);
2313
- }), { sign: R, isBound: F ? k : B, isSnap: F ? z : S, offset: G };
2314
- });
2315
- }(e, t, a, r, i, o)), !1), P(zo(e, s, o)), !1), c = $n(u, 0), p = $n(u, 1);
2316
- return { width: { isBound: c.isBound, offset: c.offset[0] }, height: { isBound: p.isBound, offset: p.offset[1] } };
2317
- }
2318
- function Ot() {
2319
- for (var e = [], t = 0; t < arguments.length; t++) e[t] = arguments[t];
2320
- return la.apply(void 0, L([$r], P(e), !1));
2321
- }
2322
- function Io(e) {
2323
- e();
2324
- }
2325
- function Ua(e) {
2326
- return e && e !== "none" ? Re(e) ? e : Qr(e) : [1, 0, 0, 1, 0, 0];
2327
- }
2328
- function Sn(e, t, n) {
2329
- return Qn(t, qe(n, t), e, qe(n.map(function(r) {
2330
- return -r;
2331
- }), t));
2332
- }
2333
- function Un(e) {
2334
- return e ? e.split(" ") : ["0", "0"];
2335
- }
2336
- function Yo(e) {
2337
- var t = ge(e)("transform");
2338
- if (t && t !== "none") return t;
2339
- if ("transform" in e) {
2340
- var n = e.transform.baseVal;
2341
- if (!n) return "";
2342
- var r = n.length;
2343
- if (!r) return "";
2344
- for (var i = [], o = function(s) {
2345
- var u = n[s].matrix;
2346
- i.push("matrix(".concat(["a", "b", "c", "d", "e", "f"].map(function(c) {
2347
- return u[c];
2348
- }).join(", "), ")"));
2349
- }, a = 0; a < r; ++a) o(a);
2350
- return i.join(" ");
2351
- }
2352
- return "";
2353
- }
2354
- function On(e, t, n, r, i) {
2355
- var o, a, s, u, c = Ur(e) || ze(e), p = !1;
2356
- if (!e || n) s = e;
2357
- else {
2358
- var f = (o = e?.assignedSlot) === null || o === void 0 ? void 0 : o.parentElement, l = e.parentElement;
2359
- f ? (p = !0, u = l, s = f) : s = l;
2360
- }
2361
- for (var d = !1, h = e === t || s === t, g = "relative", v = 1, m = parseFloat(i?.("zoom")) || 1, x = i?.("position"); s && s !== c; ) {
2362
- t === s && (h = !0);
2363
- var y = ge(s), E = s.tagName.toLowerCase(), D = Yo(s), b = y("willChange"), w = parseFloat(y("zoom")) || 1;
2364
- if (g = y("position"), r && w !== 1) {
2365
- v = w;
2366
- break;
2367
- }
2368
- if (!n && r && m !== 1 && x && x !== "absolute" || E === "svg" || E === "foreignobject" || g !== "static" || D && D !== "none" || b === "transform") break;
2369
- var _ = (a = e?.assignedSlot) === null || a === void 0 ? void 0 : a.parentNode, M = s.parentNode;
2370
- _ && (p = !0, u = M);
2371
- var B = M;
2372
- if (B && B.nodeType === 11) {
2373
- d = !0, g = ge(s = B.host)("position");
2374
- break;
2375
- }
2376
- s = B, g = "relative";
2377
- }
2378
- return { offsetZoom: v, hasSlot: p, parentSlotElement: u, isCustomElement: d, isStatic: g === "static", isEnd: h || !s || s === c, offsetParent: s || c };
2379
- }
2380
- function Ka(e, t) {
2381
- var n, r, i, o = e.tagName.toLowerCase(), a = e.offsetLeft, s = e.offsetTop, u = ge(e), c = Lr(a), p = !c;
2382
- return p || o === "svg" && !e.ownerSVGElement ? i = (r = Un(u("transformOrigin")).map(function(f) {
2383
- return parseFloat(f);
2384
- })).slice() : (i = (r = Mo ? function(f) {
2385
- return Un(Wo(f, ":before").transformOrigin).map(function(l, d) {
2386
- var h = nr(l), g = h.value, v = h.unit;
2387
- return g * function(m, x, y) {
2388
- return x === "%" ? Gr(m.ownerSVGElement)[y ? "width" : "height"] / 100 : 1;
2389
- }(f, v, d === 0);
2390
- });
2391
- }(e) : Un(u("transformOrigin")).map(function(f) {
2392
- return parseFloat(f);
2393
- })).slice(), p = !0, o === "svg" ? (a = 0, s = 0) : (n = P(function(f, l, d) {
2394
- var h = f.tagName.toLowerCase();
2395
- if (!f.getBBox || !d && h === "g") return [0, 0, 0, 0];
2396
- var g = ge(f)("transform-box") === "fill-box", v = f.getBBox(), m = Gr(f.ownerSVGElement), x = v.x, y = v.y;
2397
- h !== "foreignobject" || x || y || (x = parseFloat(f.getAttribute("x")) || 0, y = parseFloat(f.getAttribute("y")) || 0);
2398
- var E = x - m.x, D = y - m.y;
2399
- return [E, D, g ? l[0] : l[0] - E, g ? l[1] : l[1] - D];
2400
- }(e, r, e === t && t.tagName.toLowerCase() === "g"), 4), a = n[0], s = n[1], r[0] = n[2], r[1] = n[3])), { tagName: o, isSVG: c, hasOffset: p, offset: [a || 0, s || 0], origin: r, targetOrigin: i };
2401
- }
2402
- function Xo(e, t) {
2403
- var n = ge(e), r = ge(ze(e)), i = r("position");
2404
- if (!(t || i && i !== "static")) return [0, 0];
2405
- var o = parseInt(r("marginLeft"), 10), a = parseInt(r("marginTop"), 10);
2406
- return n("position") === "absolute" && (n("top") === "auto" && n("bottom") === "auto" || (a = 0), n("left") === "auto" && n("right") === "auto" || (o = 0)), [o, a];
2407
- }
2408
- function zr(e) {
2409
- e.forEach(function(t) {
2410
- var n = t.matrix;
2411
- n && (t.matrix = He(n, 3, 4));
2412
- });
2413
- }
2414
- function Qa(e) {
2415
- for (var t = e.parentElement, n = !1, r = ze(e); t; ) {
2416
- var i = Wo(t).transform;
2417
- if (i && i !== "none") {
2418
- n = !0;
2419
- break;
2420
- }
2421
- if (t === r) break;
2422
- t = t.parentElement;
2423
- }
2424
- return { fixedContainer: t || r, hasTransform: n };
2425
- }
2426
- function ni(e, t) {
2427
- return t === void 0 && (t = e.length > 9), "".concat(t ? "matrix3d" : "matrix", "(").concat(go(e, !t).join(","), ")");
2428
- }
2429
- function Gr(e) {
2430
- var t = e.clientWidth, n = e.clientHeight;
2431
- if (!e) return { x: 0, y: 0, width: 0, height: 0, clientWidth: t, clientHeight: n };
2432
- var r = e.viewBox, i = r && r.baseVal || { x: 0, y: 0, width: 0, height: 0 };
2433
- return { x: i.x, y: i.y, width: i.width || t, height: i.height || n, clientWidth: t, clientHeight: n };
2434
- }
2435
- function Ja(e, t) {
2436
- var n, r = Gr(e), i = r.width, o = r.height, a = r.clientWidth, s = r.clientHeight, u = a / i, c = s / o, p = e.preserveAspectRatio.baseVal, f = p.align, l = p.meetOrSlice, d = [0, 0], h = [u, c], g = [0, 0];
2437
- if (f !== 1) {
2438
- var v = (f - 2) % 3, m = Math.floor((f - 2) / 3);
2439
- d[0] = i * v / 2, d[1] = o * m / 2;
2440
- var x = l === 2 ? Math.max(c, u) : Math.min(u, c);
2441
- h[0] = x, h[1] = x, g[0] = (a - i) / 2 * v, g[1] = (s - o) / 2 * m;
2442
- }
2443
- var y = vo(h, t);
2444
- return n = P(g, 2), y[t * (t - 1)] = n[0], y[t * (t - 1) + 1] = n[1], Sn(y, t, d);
2445
- }
2446
- function _e(e, t, n) {
2447
- return Se(e, Rn(t, n), n);
2448
- }
2449
- function cn(e, t, n, r) {
2450
- return [[0, 0], [t, 0], [0, n], [t, n]].map(function(i) {
2451
- return _e(e, i, r);
2452
- });
2453
- }
2454
- function ir(e) {
2455
- var t = e.map(function(s) {
2456
- return s[0];
2457
- }), n = e.map(function(s) {
2458
- return s[1];
2459
- }), r = Math.min.apply(Math, L([], P(t), !1)), i = Math.min.apply(Math, L([], P(n), !1)), o = Math.max.apply(Math, L([], P(t), !1)), a = Math.max.apply(Math, L([], P(n), !1));
2460
- return { left: r, top: i, right: o, bottom: a, width: o - r, height: a - i };
2461
- }
2462
- function Vi(e, t, n, r) {
2463
- return ir(cn(e, t, n, r));
2464
- }
2465
- function Te(e) {
2466
- return Math.sqrt(e[0] * e[0] + e[1] * e[1]);
2467
- }
2468
- function Za(e, t, n, r) {
2469
- n === void 0 && (n = 1), r === void 0 && (r = be(e, t));
2470
- var i = function(o, a) {
2471
- return Te([a[0] - o[0], a[1] - o[1]]);
2472
- }(e, t);
2473
- return { transform: "translateY(-50%) translate(".concat(e[0], "px, ").concat(e[1], "px) rotate(").concat(r, "rad) scaleY(").concat(n, ")"), width: "".concat(i, "px") };
2474
- }
2475
- function tr(e, t) {
2476
- for (var n = [], r = 2; r < arguments.length; r++) n[r - 2] = arguments[r];
2477
- var i = n.length, o = n.reduce(function(s, u) {
2478
- return s + u[0];
2479
- }, 0) / i, a = n.reduce(function(s, u) {
2480
- return s + u[1];
2481
- }, 0) / i;
2482
- return { transform: "translateZ(0px) translate(".concat(o, "px, ").concat(a, "px) rotate(").concat(e, "rad) scale(").concat(t, ")") };
2483
- }
2484
- function Dn(e, t) {
2485
- var n = e[t];
2486
- return Re(n) ? T(T({}, e), n) : e;
2487
- }
2488
- function Ui(e) {
2489
- var t = e && !Lr(e.offsetWidth), n = 0, r = 0, i = 0, o = 0, a = 0, s = 0, u = 0, c = 0, p = 0, f = 0, l = 0, d = 0, h = 1 / 0, g = 1 / 0, v = 1 / 0, m = 1 / 0, x = 0, y = 0, E = !1;
2490
- if (e) if (!t && e.ownerSVGElement) {
2491
- var D = e.getBBox();
2492
- E = !0, a = n = D.width, s = r = D.height, u = n, c = r, i = n, o = r;
2493
- } else {
2494
- var b = ge(e), w = e.style, _ = b("boxSizing") === "border-box", M = parseFloat(b("borderLeftWidth")) || 0, B = parseFloat(b("borderRightWidth")) || 0, S = parseFloat(b("borderTopWidth")) || 0, C = parseFloat(b("borderBottomWidth")) || 0, O = (parseFloat(b("paddingLeft")) || 0) + (parseFloat(b("paddingRight")) || 0), k = (parseFloat(b("paddingTop")) || 0) + (parseFloat(b("paddingBottom")) || 0), z = O + (M + B), R = k + (S + C), A = b("position"), F = 0, G = 0;
2495
- if ("clientLeft" in e) {
2496
- var X;
2497
- if (X = A === "absolute" ? On(e, ze(e)).offsetParent : e.parentElement) {
2498
- var V = ge(X);
2499
- F = parseFloat(V("width")), G = parseFloat(V("height"));
2500
- }
2501
- }
2502
- p = Math.max(O, ue(b("minWidth"), F) || 0), f = Math.max(k, ue(b("minHeight"), G) || 0), h = ue(b("maxWidth"), F), g = ue(b("maxHeight"), G), isNaN(h) && (h = 1 / 0), isNaN(g) && (g = 1 / 0), x = ue(w.width, 0) || 0, y = ue(w.height, 0) || 0, a = parseFloat(b("width")) || 0, s = parseFloat(b("height")) || 0, n = u = I(a - x) < 1 ? Mr(p, x || a, h) : a, r = c = I(s - y) < 1 ? Mr(f, y || s, g) : s, i = u, o = c, _ ? (v = h, m = g, l = p, d = f, u = n - z, c = r - R) : (v = h + z, m = g + R, l = p + z, d = f + R, n = u + z, r = c + R), i = u + O, o = c + k;
2503
- }
2504
- return { svg: E, offsetWidth: n, offsetHeight: r, clientWidth: i, clientHeight: o, contentWidth: u, contentHeight: c, inlineCSSWidth: x, inlineCSSHeight: y, cssWidth: a, cssHeight: s, minWidth: p, minHeight: f, maxWidth: h, maxHeight: g, minOffsetWidth: l, minOffsetHeight: d, maxOffsetWidth: v, maxOffsetHeight: m };
2505
- }
2506
- function No(e, t) {
2507
- var n = e === ze(e) || e === Ur(e), r = { clientLeft: e.clientLeft, clientTop: e.clientTop, clientWidth: e.clientWidth, clientHeight: e.clientHeight, scrollWidth: e.scrollWidth, scrollHeight: e.scrollHeight, overflow: !1 };
2508
- return n && (r.clientHeight = Math.max(t.height, r.clientHeight), r.scrollHeight = Math.max(t.height, r.scrollHeight)), r.overflow = ge(e)("overflow") !== "visible", T(T({}, t), r);
2509
- }
2510
- function br(e, t, n, r) {
2511
- var i = e.left, o = e.right, a = e.top, s = e.bottom, u = t.top, c = t.left, p = { left: c + i, top: u + a, right: c + o, bottom: u + s, width: o - i, height: s - a };
2512
- return n && r ? No(n, p) : p;
2513
- }
2514
- function Hn(e, t) {
2515
- var n = 0, r = 0, i = 0, o = 0;
2516
- if (e) {
2517
- var a = e.getBoundingClientRect();
2518
- n = a.left, r = a.top, i = a.width, o = a.height;
2519
- }
2520
- var s = { left: n, top: r, width: i, height: o, right: n + i, bottom: r + o };
2521
- return e && t ? No(e, s) : s;
2522
- }
2523
- function ri(e, t) {
2524
- return [kt(t, e[0]), kt(t, e[1]), kt(t, e[2]), kt(t, e[3])];
2525
- }
2526
- function Ae(e) {
2527
- var t = e.left, n = e.top;
2528
- return ri([e.pos1, e.pos2, e.pos3, e.pos4], [t, n]);
2529
- }
2530
- function Ir(e, t) {
2531
- e[t ? "controlAbles" : "targetAbles"].forEach(function(n) {
2532
- n.unset && n.unset(e);
2533
- });
2534
- }
2535
- function Ze(e, t) {
2536
- var n = t ? "controlGesto" : "targetGesto", r = e[n];
2537
- r?.isIdle() === !1 && Ir(e, t), r?.unset(), e[n] = null;
2538
- }
2539
- function $e(e, t) {
2540
- if (t) {
2541
- var n = nn(t);
2542
- n.nextStyle = T(T({}, n.nextStyle), e);
2543
- }
2544
- return { style: e, cssText: Cn(e).map(function(r) {
2545
- return "".concat((i = r, i.replace(/([a-z])([A-Z])/g, function(o, a, s) {
2546
- return a + "-" + s.toLowerCase();
2547
- })), ": ").concat(e[r], ";");
2548
- var i;
2549
- }).join("") };
2550
- }
2551
- function Tt(e, t, n, r) {
2552
- var i = t.datas;
2553
- i.datas || (i.datas = {});
2554
- var o = T(T({}, n), { target: e.state.target, clientX: t.clientX, clientY: t.clientY, inputEvent: t.inputEvent, currentTarget: e, moveable: e, datas: i.datas, isRequest: t.isRequest, isRequestChild: t.isRequestChild, isFirstDrag: !!t.isFirstDrag, isTrusted: t.isTrusted !== !1, stopAble: function() {
2555
- i.isEventStart = !1;
2556
- }, stopDrag: function() {
2557
- var a;
2558
- (a = t.stop) === null || a === void 0 || a.call(t);
2559
- } });
2560
- return i.isStartEvent ? r || (i.lastEvent = o) : i.isStartEvent = !0, o;
2561
- }
2562
- function Pn(e, t, n) {
2563
- var r = t.datas, i = "isDrag" in n ? n.isDrag : t.isDrag;
2564
- return r.datas || (r.datas = {}), T(T({ isDrag: i }, n), { moveable: e, target: e.state.target, clientX: t.clientX, clientY: t.clientY, inputEvent: t.inputEvent, currentTarget: e, lastEvent: r.lastEvent, isDouble: t.isDouble, datas: r.datas, isFirstDrag: !!t.isFirstDrag });
2565
- }
2566
- function lt(e, t, n, r, i) {
2567
- return e.triggerEvent(t, n, r, i);
2568
- }
2569
- function Wo(e, t) {
2570
- return Fe(e).getComputedStyle(e, t);
2571
- }
2572
- function qn(e, t, n) {
2573
- var r = {}, i = {};
2574
- return e.filter(function(o) {
2575
- var a = o.name;
2576
- if (r[a] || !t.some(function(s) {
2577
- return o[s];
2578
- })) return !1;
2579
- if (!n && o.ableGroup) {
2580
- if (i[o.ableGroup]) return !1;
2581
- i[o.ableGroup] = !0;
2582
- }
2583
- return r[a] = !0, !0;
2584
- });
2585
- }
2586
- function Yr(e, t) {
2587
- return e === t || e == null && t == null;
2588
- }
2589
- function Ki() {
2590
- for (var e = [], t = 0; t < arguments.length; t++) e[t] = arguments[t];
2591
- for (var n = e.length - 1, r = 0; r < n; ++r) {
2592
- var i = e[r];
2593
- if (!Lr(i)) return i;
2594
- }
2595
- return e[n];
2596
- }
2597
- function Ho(e) {
2598
- return e.reduce(function(t, n) {
2599
- return t.concat(n);
2600
- }, []);
2601
- }
2602
- function tn() {
2603
- for (var e = [], t = 0; t < arguments.length; t++) e[t] = arguments[t];
2604
- return e.sort(function(n, r) {
2605
- return I(r) - I(n);
2606
- }), e[0];
2607
- }
2608
- function ii(e, t, n) {
2609
- return Se(We(e, n), Rn(t, n), n);
2610
- }
2611
- function me(e, t, n, r) {
2612
- if (!n[0] && !n[1]) return t;
2613
- var i = _e(e, [ji(n[0] || 1), 0], r), o = _e(e, [0, ji(n[1] || 1)], r);
2614
- return kt(t, _e(e, [n[0] / Te(i), n[1] / Te(o)], r));
2615
- }
2616
- function er(e) {
2617
- return I(e) <= he ? 0 : e;
2618
- }
2619
- function Xr(e, t) {
2620
- return t === void 0 && (t = [e]), function(n, r) {
2621
- if (r.isRequest) return !!t.some(function(o) {
2622
- return r.requestAble === o;
2623
- }) && r.parentDirection;
2624
- var i = r.inputEvent.target;
2625
- return Ce(i, Ot("direction")) && (!e || Ce(i, Ot(e)));
2626
- };
2627
- }
2628
- function rn(e, t) {
2629
- return e ? Kr(e) ? e : fn(e) ? t ? document.querySelector(e) : e : uo(e) ? e() : ho(e) ? e : "current" in e ? e.current : e : null;
2630
- }
2631
- function qo(e, t) {
2632
- return e ? ((n = e) && Re(n) && !Kr(n) && (ie(n) || "length" in n) ? [].slice.call(e) : [e]).reduce(function(r, i) {
2633
- return ie(i) ? r.push(qo(i, t)) : r.push(rn(i, t)), r;
2634
- }, []) : [];
2635
- var n;
2636
- }
2637
- function Nr(e, t) {
2638
- if (t) {
2639
- if (e === "left") return { x: "0%", y: "50%" };
2640
- if (e === "top") return { x: "50%", y: "50%" };
2641
- if (e === "center") return { x: "50%", y: "50%" };
2642
- if (e === "right") return { x: "100%", y: "50%" };
2643
- if (e === "bottom") return { x: "50%", y: "100%" };
2644
- var n = P(e.split(" "), 2), r = n[0], i = n[1], o = Nr(r || ""), a = Nr(i || ""), s = T(T({}, o), a), u = { x: "50%", y: "50%" };
2645
- return s.x && (u.x = s.x), s.y && (u.y = s.y), s.value && (s.x && !s.y && (u.y = s.value), !s.x && s.y && (u.x = s.value)), u;
2646
- }
2647
- return e === "left" ? { x: "0%" } : e === "right" ? { x: "100%" } : e === "top" ? { y: "0%" } : e === "bottom" ? { y: "100%" } : e ? e === "center" ? { value: "50%" } : { value: e } : {};
2648
- }
2649
- function Lo(e, t, n) {
2650
- var r = Nr(e, !0), i = r.x, o = r.y;
2651
- return [ue(i, t) || 0, ue(o, n) || 0];
2652
- }
2653
- function jo(e, t) {
2654
- return e.length === t.length && e.every(function(n, r) {
2655
- var i = t[r], o = ie(n), a = ie(i);
2656
- return o && a ? jo(n, i) : !o && !a && n === i;
2657
- });
2658
- }
2659
- function Qi(e, t, n, r, i) {
2660
- var o = e._store, a = o[t];
2661
- return !(t in o) || a !== n && r(a) !== r(n) ? (o[t] = n, n) : a;
2662
- }
2663
- function on(e) {
2664
- return e >= 0 ? 1 : -1;
2665
- }
2666
- function I(e) {
2667
- return Math.abs(e);
2668
- }
2669
- function Vo(e) {
2670
- return Vn(e) ? { top: e, left: e, right: e, bottom: e } : { left: e.left || 0, top: e.top || 0, right: e.right || 0, bottom: e.bottom || 0 };
2671
- }
2672
- Xr("", ["resizable", "scalable"]), _n("pinchable", { props: ["pinchable"], events: ["pinchStart", "pinch", "pinchEnd", "pinchGroupStart", "pinchGroup", "pinchGroupEnd"], dragStart: function() {
2673
- return !0;
2674
- }, pinchStart: function(e, t) {
2675
- var n = t.datas, r = t.targets, i = t.angle, o = t.originalDatas, a = e.props, s = a.pinchable, u = a.ables;
2676
- if (!s) return !1;
2677
- var c = "onPinch".concat(r ? "Group" : "", "Start"), p = "drag".concat(r ? "Group" : "", "ControlStart"), f = (s === !0 ? e.controlAbles : u.filter(function(g) {
2678
- return s.indexOf(g.name) > -1;
2679
- })).filter(function(g) {
2680
- return g.canPinch && g[p];
2681
- }), l = Tt(e, t, {});
2682
- r && (l.targets = r);
2683
- var d = lt(e, c, l);
2684
- n.isPinch = d !== !1, n.ables = f;
2685
- var h = n.isPinch;
2686
- return !!h && (f.forEach(function(g) {
2687
- if (o[g.name] = o[g.name] || {}, g[p]) {
2688
- var v = T(T({}, t), { datas: o[g.name], parentRotate: i, isPinch: !0 });
2689
- g[p](e, v);
2690
- }
2691
- }), e.state.snapRenderInfo = { request: t.isRequest, direction: [0, 0] }, h);
2692
- }, pinch: function(e, t) {
2693
- var n = t.datas, r = t.scale, i = t.distance, o = t.originalDatas, a = t.inputEvent, s = t.targets, u = t.angle;
2694
- if (n.isPinch) {
2695
- var c = i * (1 - 1 / r), p = Tt(e, t, {});
2696
- s && (p.targets = s);
2697
- var f = "onPinch".concat(s ? "Group" : "");
2698
- lt(e, f, p);
2699
- var l = n.ables, d = "drag".concat(s ? "Group" : "", "Control");
2700
- return l.forEach(function(h) {
2701
- h[d] && h[d](e, T(T({}, t), { datas: o[h.name], inputEvent: a, resolveMatrix: !0, pinchScale: r, parentDistance: c, parentRotate: u, isPinch: !0 }));
2702
- }), p;
2703
- }
2704
- }, pinchEnd: function(e, t) {
2705
- var n = t.datas, r = t.isPinch, i = t.inputEvent, o = t.targets, a = t.originalDatas;
2706
- if (n.isPinch) {
2707
- var s = "onPinch".concat(o ? "Group" : "", "End"), u = Pn(e, t, { isDrag: r });
2708
- o && (u.targets = o), lt(e, s, u);
2709
- var c = n.ables, p = "drag".concat(o ? "Group" : "", "ControlEnd");
2710
- return c.forEach(function(f) {
2711
- f[p] && f[p](e, T(T({}, t), { isDrag: r, datas: a[f.name], inputEvent: i, isPinch: !0 }));
2712
- }), r;
2713
- }
2714
- }, pinchGroupStart: function(e, t) {
2715
- return this.pinchStart(e, T(T({}, t), { targets: e.props.targets }));
2716
- }, pinchGroup: function(e, t) {
2717
- return this.pinch(e, T(T({}, t), { targets: e.props.targets }));
2718
- }, pinchGroupEnd: function(e, t) {
2719
- return this.pinchEnd(e, T(T({}, t), { targets: e.props.targets }));
2720
- } }), Xr("scalable");
2721
- var $a = Ot("area-pieces"), Ln = Ot("area-piece"), Uo = Ot("avoid"), ts = Ot("view-dragging");
2722
- function xr(e) {
2723
- var t = e.areaElement;
2724
- if (t) {
2725
- var n = e.state, r = n.width, i = n.height;
2726
- po(t, Uo), t.style.cssText += "left: 0px; top: 0px; width: ".concat(r, "px; height: ").concat(i, "px");
2727
- }
2728
- }
2729
- function Ji(e) {
2730
- return e.createElement("div", { key: "area_pieces", className: $a }, e.createElement("div", { className: Ln }), e.createElement("div", { className: Ln }), e.createElement("div", { className: Ln }), e.createElement("div", { className: Ln }));
2731
- }
2732
- var es = { name: "dragArea", props: ["dragArea", "passDragArea"], events: ["click", "clickGroup"], render: function(e, t) {
2733
- var n = e.props, r = n.target, i = n.dragArea, o = n.groupable, a = n.passDragArea, s = e.getState(), u = s.width, c = s.height, p = s.renderPoses, f = a ? Ot("area", "pass") : Ot("area");
2734
- if (o) return [t.createElement("div", { key: "area", ref: Ne(e, "areaElement"), className: f }), Ji(t)];
2735
- if (!r || !i) return [];
2736
- var l = mo([0, 0], [u, 0], [0, c], [u, c], p[0], p[1], p[2], p[3]), d = l.length ? ni(l, !0) : "none";
2737
- return [t.createElement("div", { key: "area", ref: Ne(e, "areaElement"), className: f, style: { top: "0px", left: "0px", width: "".concat(u, "px"), height: "".concat(c, "px"), transformOrigin: "0 0", transform: d } }), Ji(t)];
2738
- }, dragStart: function(e, t) {
2739
- var n = t.datas, r = t.clientX, i = t.clientY;
2740
- if (!t.inputEvent) return !1;
2741
- n.isDragArea = !1;
2742
- var o = e.areaElement, a = e.state, s = a.moveableClientRect, u = a.renderPoses, c = a.rootMatrix, p = a.is3d, f = s.left, l = s.top, d = ir(u), h = d.left, g = d.top, v = d.width, m = d.height, x = P(ii(c, [r - f, i - l], p ? 4 : 3), 2), y = x[0], E = x[1], D = [{ left: h, top: g, width: v, height: (E -= g) - 10 }, { left: h, top: g, width: (y -= h) - 10, height: m }, { left: h, top: g + E + 10, width: v, height: m - E - 10 }, { left: h + y + 10, top: g, width: v - y - 10, height: m }], b = [].slice.call(o.nextElementSibling.children);
2743
- D.forEach(function(w, _) {
2744
- b[_].style.cssText = "left: ".concat(w.left, "px;top: ").concat(w.top, "px; width: ").concat(w.width, "px; height: ").concat(w.height, "px;");
2745
- }), fo(o, Uo), a.disableNativeEvent = !0;
2746
- }, drag: function(e, t) {
2747
- var n = t.datas, r = t.inputEvent;
2748
- if (this.enableNativeEvent(e), !r) return !1;
2749
- n.isDragArea || (n.isDragArea = !0, xr(e));
2750
- }, dragEnd: function(e, t) {
2751
- this.enableNativeEvent(e);
2752
- var n = t.inputEvent, r = t.datas;
2753
- if (!n) return !1;
2754
- r.isDragArea || xr(e);
2755
- }, dragGroupStart: function(e, t) {
2756
- return this.dragStart(e, t);
2757
- }, dragGroup: function(e, t) {
2758
- return this.drag(e, t);
2759
- }, dragGroupEnd: function(e, t) {
2760
- return this.dragEnd(e, t);
2761
- }, unset: function(e) {
2762
- xr(e), e.state.disableNativeEvent = !1;
2763
- }, enableNativeEvent: function(e) {
2764
- var t = e.state;
2765
- t.disableNativeEvent && lo(function() {
2766
- t.disableNativeEvent = !1;
2767
- });
2768
- } };
2769
- _n("origin", { props: ["origin", "svgOrigin"], render: function(e, t) {
2770
- var n, r = e.props, i = r.zoom, o = r.svgOrigin, a = r.groupable, s = e.getState(), u = s.beforeOrigin, c = s.rotation, p = s.svg, f = s.allMatrix, l = s.is3d, d = s.left, h = s.top, g = s.offsetWidth, v = s.offsetHeight;
2771
- if (!a && p && o) {
2772
- var m = P(Lo(o, g, v), 2);
2773
- n = tr(c, i, ut(_e(f, [m[0], m[1]], l ? 4 : 3), [d, h]));
2774
- } else n = tr(c, i, u);
2775
- return [t.createElement("div", { className: Ot("control", "origin"), style: n, key: "beforeOrigin" })];
2776
- } });
2777
- var ns = { name: "", props: ["target", "dragTargetSelf", "dragTarget", "dragContainer", "container", "warpSelf", "rootContainer", "useResizeObserver", "useMutationObserver", "zoom", "dragFocusedInput", "transformOrigin", "ables", "className", "pinchThreshold", "pinchOutside", "triggerAblesSimultaneously", "checkInput", "cspNonce", "translateZ", "hideDefaultLines", "props", "flushSync", "stopPropagation", "preventClickEventOnDrag", "preventClickDefault", "viewContainer", "persistData", "useAccuratePosition", "firstRenderState", "linePadding", "controlPadding", "preventDefault", "preventRightClick", "preventWheelClick", "requestStyles"], events: ["changeTargets"] };
2778
- _n("padding", { props: ["padding"], render: function(e, t) {
2779
- var n = e.props;
2780
- if (n.dragArea) return [];
2781
- var r = Vo(n.padding || {}), i = r.left, o = r.top, a = r.right, s = r.bottom, u = e.getState(), c = u.renderPoses, p = [u.pos1, u.pos2, u.pos3, u.pos4], f = [];
2782
- return i > 0 && f.push([0, 2]), o > 0 && f.push([0, 1]), a > 0 && f.push([1, 3]), s > 0 && f.push([2, 3]), f.map(function(l, d) {
2783
- var h = P(l, 2), g = h[0], v = h[1], m = mo([0, 0], [100, 0], [0, 100], [100, 100], p[g], p[v], c[g], c[v]);
2784
- if (m.length) return t.createElement("div", { key: "padding".concat(d), className: Ot("padding"), style: { transform: ni(m, !0) } });
2785
- });
2786
- } });
2787
- var rs = { isPinch: !0, name: "beforeRenderable", props: [], events: ["beforeRenderStart", "beforeRender", "beforeRenderEnd", "beforeRenderGroupStart", "beforeRenderGroup", "beforeRenderGroupEnd"], dragRelation: "weak", setTransform: function(e, t) {
2788
- var n = e.state, r = n.is3d, i = n.targetMatrix, o = n.inlineTransform, a = r ? "matrix3d(".concat(i.join(","), ")") : "matrix(".concat(go(i, !0), ")"), s = o && o !== "none" ? o : a;
2789
- t.datas.startTransforms = function(u, c) {
2790
- var p = _t(c ? 4 : 3);
2791
- return u === "matrix".concat(c ? "3d" : "", "(").concat(p.join(","), ")") || u === "matrix(1,0,0,1,0,0)";
2792
- }(s, r) ? [] : wn(s);
2793
- }, resetStyle: function(e) {
2794
- var t = e.datas;
2795
- t.nextStyle = {}, t.nextTransforms = e.datas.startTransforms, t.nextTransformAppendedIndexes = [];
2796
- }, fillDragStartParams: function(e, t) {
2797
- return Tt(e, t, { setTransform: function(n) {
2798
- t.datas.startTransforms = ie(n) ? n : wn(n);
2799
- }, isPinch: !!t.isPinch });
2800
- }, fillDragParams: function(e, t) {
2801
- return Tt(e, t, { isPinch: !!t.isPinch });
2802
- }, dragStart: function(e, t) {
2803
- this.setTransform(e, t), this.resetStyle(t), lt(e, "onBeforeRenderStart", this.fillDragStartParams(e, t));
2804
- }, drag: function(e, t) {
2805
- t.datas.startTransforms || this.setTransform(e, t), this.resetStyle(t), lt(e, "onBeforeRender", Tt(e, t, { isPinch: !!t.isPinch }));
2806
- }, dragEnd: function(e, t) {
2807
- t.datas.startTransforms || (this.setTransform(e, t), this.resetStyle(t)), lt(e, "onBeforeRenderEnd", Tt(e, t, { isPinch: !!t.isPinch, isDrag: t.isDrag }));
2808
- }, dragGroupStart: function(e, t) {
2809
- var n = this;
2810
- this.dragStart(e, t);
2811
- var r = Le(e, "beforeRenderable", t), i = e.moveables, o = r.map(function(a, s) {
2812
- var u = i[s];
2813
- return n.setTransform(u, a), n.resetStyle(a), n.fillDragStartParams(u, a);
2814
- });
2815
- lt(e, "onBeforeRenderGroupStart", Tt(e, t, { isPinch: !!t.isPinch, targets: e.props.targets, setTransform: function() {
2816
- }, events: o }));
2817
- }, dragGroup: function(e, t) {
2818
- var n = this;
2819
- this.drag(e, t);
2820
- var r = Le(e, "beforeRenderable", t), i = e.moveables, o = r.map(function(a, s) {
2821
- var u = i[s];
2822
- return n.resetStyle(a), n.fillDragParams(u, a);
2823
- });
2824
- lt(e, "onBeforeRenderGroup", Tt(e, t, { isPinch: !!t.isPinch, targets: e.props.targets, events: o }));
2825
- }, dragGroupEnd: function(e, t) {
2826
- this.dragEnd(e, t), lt(e, "onBeforeRenderGroupEnd", Tt(e, t, { isPinch: !!t.isPinch, isDrag: t.isDrag, targets: e.props.targets }));
2827
- }, dragControlStart: function(e, t) {
2828
- return this.dragStart(e, t);
2829
- }, dragControl: function(e, t) {
2830
- return this.drag(e, t);
2831
- }, dragControlEnd: function(e, t) {
2832
- return this.dragEnd(e, t);
2833
- }, dragGroupControlStart: function(e, t) {
2834
- return this.dragGroupStart(e, t);
2835
- }, dragGroupControl: function(e, t) {
2836
- return this.dragGroup(e, t);
2837
- }, dragGroupControlEnd: function(e, t) {
2838
- return this.dragGroupEnd(e, t);
2839
- } }, is = { name: "renderable", props: [], events: ["renderStart", "render", "renderEnd", "renderGroupStart", "renderGroup", "renderGroupEnd"], dragRelation: "weak", dragStart: function(e, t) {
2840
- lt(e, "onRenderStart", Tt(e, t, { isPinch: !!t.isPinch }));
2841
- }, drag: function(e, t) {
2842
- lt(e, "onRender", this.fillDragParams(e, t));
2843
- }, dragAfter: function(e, t) {
2844
- return this.drag(e, t);
2845
- }, dragEnd: function(e, t) {
2846
- lt(e, "onRenderEnd", this.fillDragEndParams(e, t));
2847
- }, dragGroupStart: function(e, t) {
2848
- lt(e, "onRenderGroupStart", Tt(e, t, { isPinch: !!t.isPinch, targets: e.props.targets }));
2849
- }, dragGroup: function(e, t) {
2850
- var n = this, r = Le(e, "beforeRenderable", t), i = e.moveables, o = r.map(function(a, s) {
2851
- var u = i[s];
2852
- return n.fillDragParams(u, a);
2853
- });
2854
- lt(e, "onRenderGroup", Tt(e, t, T(T({ isPinch: !!t.isPinch, targets: e.props.targets, transform: Xn(t), transformObject: {} }, $e(Nn(t))), { events: o })));
2855
- }, dragGroupEnd: function(e, t) {
2856
- var n = this, r = Le(e, "beforeRenderable", t), i = e.moveables, o = r.map(function(a, s) {
2857
- var u = i[s];
2858
- return n.fillDragEndParams(u, a);
2859
- });
2860
- lt(e, "onRenderGroupEnd", Tt(e, t, T({ isPinch: !!t.isPinch, isDrag: t.isDrag, targets: e.props.targets, events: o, transformObject: {}, transform: Xn(t) }, $e(Nn(t)))));
2861
- }, dragControlStart: function(e, t) {
2862
- return this.dragStart(e, t);
2863
- }, dragControl: function(e, t) {
2864
- return this.drag(e, t);
2865
- }, dragControlAfter: function(e, t) {
2866
- return this.dragAfter(e, t);
2867
- }, dragControlEnd: function(e, t) {
2868
- return this.dragEnd(e, t);
2869
- }, dragGroupControlStart: function(e, t) {
2870
- return this.dragGroupStart(e, t);
2871
- }, dragGroupControl: function(e, t) {
2872
- return this.dragGroup(e, t);
2873
- }, dragGroupControlEnd: function(e, t) {
2874
- return this.dragGroupEnd(e, t);
2875
- }, fillDragParams: function(e, t) {
2876
- var n = {};
2877
- return sn(Zn(t) || []).forEach(function(r) {
2878
- n[r.name] = r.functionValue;
2879
- }), Tt(e, t, T({ isPinch: !!t.isPinch, transformObject: n, transform: Xn(t) }, $e(Nn(t))));
2880
- }, fillDragEndParams: function(e, t) {
2881
- var n = {};
2882
- return sn(Zn(t) || []).forEach(function(r) {
2883
- n[r.name] = r.functionValue;
2884
- }), Tt(e, t, T({ isPinch: !!t.isPinch, isDrag: t.isDrag, transformObject: n, transform: Xn(t) }, $e(Nn(t))));
2885
- } };
2886
- function Mn(e, t, n, r, i, o, a) {
2887
- o.clientDistX = o.distX, o.clientDistY = o.distY;
2888
- var s = i === "Start", u = i === "End", c = i === "After", p = e.state.target, f = o.isRequest, l = r.indexOf("Control") > -1;
2889
- if (!p || s && l && !f && e.areaElement === o.inputEvent.target) return !1;
2890
- var d = L([], P(t), !1);
2891
- if (f) {
2892
- var h = o.requestAble;
2893
- d.some(function(S) {
2894
- return S.name === h;
2895
- }) || d.push.apply(d, L([], P(e.props.ables.filter(function(S) {
2896
- return S.name === h;
2897
- })), !1));
2898
- }
2899
- if (!d.length || d.every(function(S) {
2900
- return S.dragRelation;
2901
- })) return !1;
2902
- var g, v = o.inputEvent;
2903
- u && v && (g = document.elementFromPoint(o.clientX, o.clientY) || v.target);
2904
- var m = !1, x = function() {
2905
- var S;
2906
- m = !0, (S = o.stop) === null || S === void 0 || S.call(o);
2907
- }, y = s && (!e.targetGesto || !e.controlGesto || !e.targetGesto.isFlag() || !e.controlGesto.isFlag());
2908
- y && e.updateRect(i, !0, !1);
2909
- var E = o.datas, D = l ? "controlGesto" : "targetGesto", b = e[D], w = function(S, C, O) {
2910
- if (!(C in S) || b !== e[D]) return !1;
2911
- var k = S.name, z = E[k] || (E[k] = {});
2912
- if (s && (z.isEventStart = !O || !S[O] || S[O](e, o)), !z.isEventStart) return !1;
2913
- var R = S[C](e, T(T({}, o), { stop: x, datas: z, originalDatas: E, inputTarget: g }));
2914
- return e._emitter.off(), s && R === !1 && (z.isEventStart = !1), R;
2915
- };
2916
- y && d.forEach(function(S) {
2917
- S.unset && S.unset(e);
2918
- }), w(rs, "drag".concat(r).concat(i));
2919
- var _ = 0, M = 0;
2920
- n.forEach(function(S) {
2921
- if (m) return !1;
2922
- var C = "".concat(S).concat(r).concat(i), O = "".concat(S).concat(r, "Condition");
2923
- i !== "" || f || function(R, A) {
2924
- var F, G = R.is3d ? 4 : 3;
2925
- F = P(ii(R.rootMatrix, [A.distX, A.distY], G), 2), A.distX = F[0], A.distY = F[1];
2926
- }(e.state, o);
2927
- var k = d.filter(function(R) {
2928
- return R[C];
2929
- }), z = (k = k.filter(function(R, A) {
2930
- return R.name && k.indexOf(R) === A;
2931
- })).filter(function(R) {
2932
- return w(R, C, O);
2933
- }).length;
2934
- m && ++_, z && ++M, !m && s && k.length && !z && (_ += k.filter(function(R) {
2935
- var A = R.name;
2936
- return !!E[A].isEventStart && R.dragRelation !== "strong";
2937
- }).length ? 1 : 0);
2938
- }), c && !M || w(is, "drag".concat(r).concat(i));
2939
- var B = b !== e[D] || _ === n.length;
2940
- return (u || m || B) && (e.state.gestos = {}, e.moveables && e.moveables.forEach(function(S) {
2941
- S.state.gestos = {};
2942
- }), d.forEach(function(S) {
2943
- S.unset && S.unset(e);
2944
- })), s && !B && !f && M && e.props.preventDefault && o?.preventDefault(), !e.isUnmounted && !B && ((!s && M && !a || u) && (e.props.flushSync || Io)(function() {
2945
- e.updateRect(u ? i : "", !0, !1), e.forceUpdate();
2946
- }), s || u || c || !M || a || Mn(e, t, n, r, i + "After", o), !0);
2947
- }
2948
- function oi(e, t) {
2949
- return function(n, r) {
2950
- var i;
2951
- r === void 0 && (r = n.inputEvent.target);
2952
- var o = r, a = e.areaElement, s = e._dragTarget;
2953
- return !(!s || !t && (!((i = e.controlGesto) === null || i === void 0) && i.isFlag())) && (o === s || s.contains(o) || o === a || !e.isMoveableElement(o) && !e.controlBox.contains(o) || Ce(o, "moveable-area") || Ce(o, "moveable-padding") || Ce(o, "moveable-edgeDraggable"));
2954
- };
2955
- }
2956
- function Ko(e, t, n) {
2957
- var r = e.controlBox, i = [], o = e.props, a = o.dragArea, s = e.state.target, u = o.dragTarget;
2958
- i.push(r), a && !u || i.push(t), !a && u && s && t !== s && o.dragTargetSelf && i.push(s);
2959
- var c = oi(e);
2960
- return Jo(e, i, "targetAbles", n, { dragStart: c, pinchStart: c });
2961
- }
2962
- function Qo(e, t) {
2963
- var n = e.controlBox, r = [];
2964
- r.push(n);
2965
- var i = oi(e, !0), o = function(a, s) {
2966
- return s === void 0 && (s = a.inputEvent.target), s === n || !i(a, s);
2967
- };
2968
- return Jo(e, r, "controlAbles", t, { dragStart: o, pinchStart: o });
2969
- }
2970
- function Jo(e, t, n, r, i) {
2971
- i === void 0 && (i = {});
2972
- var o = n === "targetAbles", a = e.props, s = a.pinchOutside, u = a.pinchThreshold, c = a.preventClickEventOnDrag, p = a.preventClickDefault, f = a.checkInput, l = a.dragFocusedInput, d = a.preventDefault, h = d === void 0 || d, g = a.preventRightClick, v = g === void 0 || g, m = a.preventWheelClick, x = { preventDefault: h, preventRightClick: v, preventWheelClick: m === void 0 || m, container: rn(a.dragContainer, !0) || Fe(e.getControlBoxElement()), pinchThreshold: u, pinchOutside: s, preventClickEventOnDrag: !!o && c, preventClickEventOnDragStart: !!o && p, preventClickEventByCondition: o ? null : function(D) {
2973
- return e.controlBox.contains(D.target);
2974
- }, checkInput: !!o && f, dragFocusedInput: l }, y = new Ta(t, x), E = r === "Control";
2975
- return ["drag", "pinch"].forEach(function(D) {
2976
- ["Start", "", "End"].forEach(function(b) {
2977
- y.on("".concat(D).concat(b), function(w) {
2978
- var _, M = w.eventType, B = D === "drag" && w.isPinch;
2979
- if (!i[M] || i[M](w)) {
2980
- if (!B) {
2981
- var S = D === "drag" ? [D] : ["drag", D], C = L([], P(e[n]), !1);
2982
- Mn(e, C, S, r, b, w) ? (e.props.stopPropagation || b === "Start" && E) && ((_ = w?.inputEvent) === null || _ === void 0 || _.stopPropagation()) : w.stop();
2983
- }
2984
- } else w.stop();
2985
- });
2986
- });
2987
- }), y;
2988
- }
2989
- var os = function() {
2990
- function e(t, n, r) {
2991
- var i = this;
2992
- this.target = t, this.moveable = n, this.eventName = r, this.ables = [], this._onEvent = function(o) {
2993
- var a = i.eventName, s = i.moveable;
2994
- s.state.disableNativeEvent || i.ables.forEach(function(u) {
2995
- u[a](s, { inputEvent: o });
2996
- });
2997
- }, t.addEventListener(r.toLowerCase(), this._onEvent);
2998
- }
2999
- return e.prototype.setAbles = function(t) {
3000
- this.ables = t;
3001
- }, e.prototype.destroy = function() {
3002
- this.target.removeEventListener(this.eventName.toLowerCase(), this._onEvent), this.target = null, this.moveable = null;
3003
- }, e;
3004
- }();
3005
- function Wr(e, t, n, r, i, o) {
3006
- o === void 0 && (o = []);
3007
- var a = 1, s = [0, 0], u = { left: 0, top: 0, width: 0, height: 0, right: 0, bottom: 0, clientLeft: 0, clientTop: 0, clientWidth: 0, clientHeight: 0, scrollWidth: 0, scrollHeight: 0 }, c = { left: 0, top: 0, width: 0, height: 0, right: 0, bottom: 0, clientLeft: 0, clientTop: 0, clientWidth: 0, clientHeight: 0, scrollWidth: 0, scrollHeight: 0 }, p = { left: 0, top: 0, width: 0, height: 0, right: 0, bottom: 0, clientLeft: 0, clientTop: 0, clientWidth: 0, clientHeight: 0, scrollWidth: 0, scrollHeight: 0 }, f = { left: 0, top: 0, width: 0, height: 0, right: 0, bottom: 0, clientLeft: 0, clientTop: 0, clientWidth: 0, clientHeight: 0, scrollWidth: 0, scrollHeight: 0 }, l = [0, 0], d = {}, h = function(C, O, k, z) {
3008
- k === void 0 && (k = O);
3009
- var R, A, F = 0, G = 0, X = 0, V = {}, nt = Ui(C);
3010
- if (C && (F = nt.offsetWidth, G = nt.offsetHeight), C) {
3011
- var Z = function(W, j, rt, gt) {
3012
- var q;
3013
- rt === void 0 && (rt = j);
3014
- var Y = zi(W, j), $ = Y.matrixes, J = Y.is3d, At = Y.targetMatrix, le = Y.transformOrigin, Pt = Y.targetOrigin, tt = Y.offsetContainer, it = Y.hasFixed, xt = Y.zoom, yt = function(K, et) {
3015
- if (Je) {
3016
- var dt = xe(Je, function(Dt) {
3017
- return Dt[0][0] == K && Dt[0][1] == et;
3018
- });
3019
- if (dt) return dt[1];
3020
- }
3021
- var Ct = zi(K, et, !0);
3022
- return Je && Je.push([[K, et], Ct]), Ct;
3023
- }(tt, rt), Rt = yt.matrixes, Yt = yt.is3d, vt = yt.offsetContainer, ft = yt.zoom, ht = gt, Ft = W.tagName.toLowerCase() !== "svg" && "ownerSVGElement" in W, mt = At, N = _t(4), Q = _t(4), ct = _t(4), at = _t(4), st = $.length, pt = Rt.map(function(K) {
3024
- return T(T({}, K), { matrix: K.matrix ? L([], P(K.matrix), !1) : void 0 });
3025
- }).reverse();
3026
- $.reverse(), !J && ht && (mt = He(mt, 3, 4), zr($)), !Yt && ht && zr(pt), pt.forEach(function(K) {
3027
- Q = Wt(Q, K.matrix, 4);
3028
- });
3029
- var ot = rt || ze(W), bt = ((q = pt[0]) === null || q === void 0 ? void 0 : q.target) || On(ot, ot, !0).offsetParent, Et = pt.slice(1).reduce(function(K, et) {
3030
- return Wt(K, et.matrix, 4);
3031
- }, _t(4));
3032
- $.forEach(function(K, et) {
3033
- if (st - 2 === et && (ct = N.slice()), st - 1 === et && (at = N.slice()), !K.matrix) {
3034
- var dt = function(Ct, Dt, Bt, Xt, Mt) {
3035
- var ee, Qt = Ct.target, Lt = Ct.origin, Jt = Dt.matrix, zt = Ui(Qt), fe = zt.offsetWidth, oe = zt.offsetHeight, ae = Bt.getBoundingClientRect(), wt = [0, 0];
3036
- Bt === ze(Bt) && (wt = Xo(Qt, !0));
3037
- for (var ve = Qt.getBoundingClientRect(), Nt = ve.left - ae.left + Bt.scrollLeft - (Bt.clientLeft || 0) + wt[0], ye = ve.top - ae.top + Bt.scrollTop - (Bt.clientTop || 0) + wt[1], Ge = ve.width, Ie = ve.height, Be = Qn(4, Mt, Jt), pe = Vi(Be, fe, oe, 4), De = pe.left, je = pe.top, Me = pe.width, Oe = pe.height, ne = _e(Be, Lt, 4), qt = ut(ne, [De, je]), de = [Nt + qt[0] * Ge / Me, ye + qt[1] * Ie / Oe], Zt = [0, 0], jt = 0; ++jt < 10; ) {
3038
- var $t = We(Mt, 4);
3039
- ee = P(ut(_e($t, de, 4), _e($t, ne, 4)), 2), Zt[0] = ee[0], Zt[1] = ee[1];
3040
- var Pe = Vi(Qn(4, Mt, qe(Zt, 4), Jt), fe, oe, 4), Ee = Pe.left - Nt, ke = Pe.top - ye;
3041
- if (I(Ee) < 2 && I(ke) < 2) break;
3042
- de[0] -= Ee, de[1] -= ke;
3043
- }
3044
- return Zt.map(function(Ye) {
3045
- return Math.round(Ye);
3046
- });
3047
- }(K, $[et + 1], bt, 0, Wt(Et, N, 4));
3048
- K.matrix = qe(dt, 4);
3049
- }
3050
- N = Wt(N, K.matrix, 4);
3051
- });
3052
- var Ht = !Ft && J;
3053
- mt || (mt = _t(Ht ? 4 : 3));
3054
- var Ut = ni(Ft && mt.length === 16 ? He(mt, 4, 3) : mt, Ht), Kt = Q;
3055
- return Q = function(K) {
3056
- for (var et = K.slice(), dt = 0; dt < 4; ++dt) et[4 * dt + 4 - 1] = 0, et[12 + dt] = 0;
3057
- return et[15] = 1, et;
3058
- }(Q), { hasZoom: xt !== 1 || ft !== 1, hasFixed: it, matrixes: $, rootMatrix: Q, originalRootMatrix: Kt, beforeMatrix: ct, offsetMatrix: at, allMatrix: N, targetMatrix: mt, targetTransform: Ut, inlineTransform: W.style.transform, transformOrigin: le, targetOrigin: Pt, is3d: ht, offsetContainer: tt, offsetRootContainer: vt };
3059
- }(C, O, k, z), U = gn(Z.allMatrix, Z.transformOrigin, F, G);
3060
- V = T(T({}, Z), U);
3061
- var H = gn(Z.allMatrix, [50, 50], 100, 100);
3062
- R = [H.pos1, H.pos2], X = be((A = H.direction) > 0 ? R[0] : R[1], A > 0 ? R[1] : R[0]);
3063
- }
3064
- return T(T(T({ hasZoom: !1, width: F, height: G, rotation: X }, nt), { originalRootMatrix: _t(4), rootMatrix: _t(4), beforeMatrix: _t(4), offsetMatrix: _t(4), allMatrix: _t(4), targetMatrix: _t(4), targetTransform: "", inlineTransform: "", transformOrigin: [0, 0], targetOrigin: [0, 0], is3d: !0, left: 0, top: 0, right: 0, bottom: 0, origin: [0, 0], pos1: [0, 0], pos2: [0, 0], pos3: [0, 0], pos4: [0, 0], direction: 1, hasFixed: !1, offsetContainer: null, offsetRootContainer: null, matrixes: [] }), V);
3065
- }(t, n, i, !0);
3066
- if (t) {
3067
- var g = ge(t);
3068
- o.forEach(function(C) {
3069
- d[C] = g(C);
3070
- });
3071
- var v = h.is3d ? 4 : 3, m = gn(h.offsetMatrix, kt(h.transformOrigin, function(C, O) {
3072
- O === void 0 && (O = Math.sqrt(C.length));
3073
- for (var k = [], z = C[O * O - 1], R = 0; R < O - 1; ++R) k[R] = C[O * (O - 1) + R] / z;
3074
- return k[O - 1] = 0, k;
3075
- }(h.targetMatrix, v)), h.width, h.height);
3076
- a = m.direction, s = kt(m.origin, [m.left - h.left, m.top - h.top]), f = Hn(h.offsetRootContainer);
3077
- var x = On(r, r, !0).offsetParent || h.offsetRootContainer;
3078
- if (h.hasZoom) {
3079
- var y = gn(Wt(h.originalRootMatrix, h.allMatrix), h.transformOrigin, h.width, h.height), E = gn(h.originalRootMatrix, Un(ge(x)("transformOrigin")).map(function(C) {
3080
- return parseFloat(C);
3081
- }), x.offsetWidth, x.offsetHeight);
3082
- if (u = br(y, f), p = br(E, f, x, !0), e) {
3083
- var D = y.left, b = y.top;
3084
- c = br({ left: D, top: b, bottom: b, right: b }, f);
3085
- }
3086
- } else {
3087
- u = Hn(t), p = function(C) {
3088
- var O = Qe?.get(C);
3089
- if (O) return O;
3090
- var k = Hn(C, !0);
3091
- return Qe && Qe.set(C, k), k;
3092
- }(x), e && (c = Hn(e));
3093
- var w = p.left, _ = p.top, M = p.clientLeft, B = p.clientTop, S = [u.left - w, u.top - _];
3094
- l = ut(ii(h.rootMatrix, S, 4), [M + h.left, B + h.top]);
3095
- }
3096
- }
3097
- return T({ targetClientRect: u, containerClientRect: p, moveableClientRect: c, rootContainerClientRect: f, beforeDirection: a, beforeOrigin: s, originalBeforeOrigin: s, target: t, style: d, offsetDelta: l }, h);
3098
- }
3099
- function Zi(e) {
3100
- var t = e.pos1, n = e.pos2, r = e.pos3, i = e.pos4;
3101
- if (!(t && n && r && i)) return null;
3102
- var o = en([t, n, r, i]), a = [o.minX, o.minY], s = ut(e.origin, a);
3103
- return t = ut(t, a), n = ut(n, a), r = ut(r, a), i = ut(i, a), T(T({}, e), { left: e.left, top: e.top, posDelta: a, pos1: t, pos2: n, pos3: r, pos4: i, origin: s, beforeOrigin: s, isPersisted: !0 });
3104
- }
3105
- var ln = function(e) {
3106
- function t() {
3107
- var n = e !== null && e.apply(this, arguments) || this;
3108
- return n.state = T({ container: null, gestos: {}, renderLines: [[[0, 0], [0, 0]], [[0, 0], [0, 0]], [[0, 0], [0, 0]], [[0, 0], [0, 0]]], renderPoses: [[0, 0], [0, 0], [0, 0], [0, 0]], disableNativeEvent: !1, posDelta: [0, 0] }, Wr(null)), n.renderState = {}, n.enabledAbles = [], n.targetAbles = [], n.controlAbles = [], n.rotation = 0, n.scale = [1, 1], n.isMoveableMounted = !1, n.isUnmounted = !1, n.events = { mouseEnter: null, mouseLeave: null }, n._emitter = new yo(), n._prevOriginalDragTarget = null, n._originalDragTarget = null, n._prevDragTarget = null, n._dragTarget = null, n._prevPropTarget = null, n._propTarget = null, n._prevDragArea = !1, n._isPropTargetChanged = !1, n._hasFirstTarget = !1, n._reiszeObserver = null, n._observerId = 0, n._mutationObserver = null, n._rootContainer = null, n._viewContainer = null, n._viewClassNames = [], n._store = {}, n.checkUpdateRect = function() {
3109
- if (!n.isDragging()) {
3110
- var r = n.props.parentMoveable;
3111
- r ? r.checkUpdateRect() : (da(n._observerId), n._observerId = lo(function() {
3112
- n.isDragging() || n.updateRect();
3113
- }));
3114
- }
3115
- }, n._onPreventClick = function(r) {
3116
- r.stopPropagation(), r.preventDefault();
3117
- }, n;
3118
- }
3119
- return Bn(t, e), t.prototype.render = function() {
3120
- var n = this.props, r = this.getState(), i = n.parentPosition, o = n.className, a = n.target, s = n.zoom, u = n.cspNonce, c = n.translateZ, p = n.cssStyled, f = n.groupable, l = n.linePadding, d = n.controlPadding;
3121
- this._checkUpdateRootContainer(), this.checkUpdate(), this.updateRenderPoses();
3122
- var h = P(i || [0, 0], 2), g = h[0], v = h[1], m = r.left, x = r.top, y = r.target, E = r.direction, D = r.hasFixed, b = r.offsetDelta, w = n.targets, _ = this.isDragging(), M = {};
3123
- this.getEnabledAbles().forEach(function(z) {
3124
- M["data-able-".concat(z.name.toLowerCase())] = !0;
3125
- });
3126
- var B = this._getAbleClassName(), S = w && w.length && (y || f) || a || !this._hasFirstTarget && this.state.isPersisted, C = this.controlBox || this.props.firstRenderState || this.props.persistData, O = [m - g, x - v];
3127
- !f && n.useAccuratePosition && (O[0] += b[0], O[1] += b[1]);
3128
- var k = { position: D ? "fixed" : "absolute", display: S ? "block" : "none", visibility: C ? "visible" : "hidden", transform: "translate3d(".concat(O[0], "px, ").concat(O[1], "px, ").concat(c, ")"), "--zoom": s, "--zoompx": "".concat(s, "px") };
3129
- return l && (k["--moveable-line-padding"] = l), d && (k["--moveable-control-padding"] = d), re.createElement(p, T({ cspNonce: u, ref: Ne(this, "controlBox"), className: "".concat(Ot("control-box", E === -1 ? "reverse" : "", _ ? "dragging" : ""), " ").concat(B, " ").concat(o) }, M, { onClick: this._onPreventClick, style: k }), this.renderAbles(), this._renderLines());
3130
- }, t.prototype.componentDidMount = function() {
3131
- this.isMoveableMounted = !0, this.isUnmounted = !1;
3132
- var n = this.props, r = n.parentMoveable, i = n.container;
3133
- this._checkUpdateRootContainer(), this._checkUpdateViewContainer(), this._updateTargets(), this._updateNativeEvents(), this._updateEvents(), this.updateCheckInput(), this._updateObserver(this.props), i || r || this.state.isPersisted || (this.updateRect("", !1, !1), this.forceUpdate());
3134
- }, t.prototype.componentDidUpdate = function(n) {
3135
- this._checkUpdateRootContainer(), this._checkUpdateViewContainer(), this._updateNativeEvents(), this._updateTargets(), this._updateEvents(), this.updateCheckInput(), this._updateObserver(n);
3136
- }, t.prototype.componentWillUnmount = function() {
3137
- var n, r;
3138
- this.isMoveableMounted = !1, this.isUnmounted = !0, this._emitter.off(), (n = this._reiszeObserver) === null || n === void 0 || n.disconnect(), (r = this._mutationObserver) === null || r === void 0 || r.disconnect(), this._viewContainer && this._changeAbleViewClassNames([]), Ze(this, !1), Ze(this, !0);
3139
- var i = this.events;
3140
- for (var o in i) {
3141
- var a = i[o];
3142
- a && a.destroy();
3143
- }
3144
- }, t.prototype.getTargets = function() {
3145
- var n = this.props.target;
3146
- return n ? [n] : [];
3147
- }, t.prototype.getAble = function(n) {
3148
- return xe(this.props.ables || [], function(r) {
3149
- return r.name === n;
3150
- });
3151
- }, t.prototype.getContainer = function() {
3152
- var n = this.props, r = n.parentMoveable, i = n.wrapperMoveable;
3153
- return n.container || i && i.getContainer() || r && r.getContainer() || this.controlBox.parentElement;
3154
- }, t.prototype.getControlBoxElement = function() {
3155
- return this.controlBox;
3156
- }, t.prototype.getDragElement = function() {
3157
- return this._dragTarget;
3158
- }, t.prototype.isMoveableElement = function(n) {
3159
- var r;
3160
- return n && (((r = n.getAttribute) === null || r === void 0 ? void 0 : r.call(n, "class")) || "").indexOf($r) > -1;
3161
- }, t.prototype.dragStart = function(n, r) {
3162
- r === void 0 && (r = n.target);
3163
- var i = this.targetGesto, o = this.controlGesto;
3164
- return i && oi(this)({ inputEvent: n }, r) ? i.isFlag() || i.triggerDragStart(n) : o && this.isMoveableElement(r) && (o.isFlag() || o.triggerDragStart(n)), this;
3165
- }, t.prototype.hitTest = function(n) {
3166
- var r, i = this.state, o = i.target, a = i.pos1, s = i.pos2, u = i.pos3, c = i.pos4, p = i.targetClientRect;
3167
- if (!o) return 0;
3168
- if (Kr(n)) {
3169
- var f = n.getBoundingClientRect();
3170
- r = { left: f.left, top: f.top, width: f.width, height: f.height };
3171
- } else r = T({ width: 0, height: 0 }, n);
3172
- var l = r.left, d = r.top, h = r.width, g = r.height, v = _i([a, s, c, u], p), m = Ci(function(y, E) {
3173
- var D = function(b, w) {
3174
- var _ = b.slice(), M = w.slice();
3175
- Si(_) === -1 && _.reverse(), Si(M) === -1 && M.reverse();
3176
- var B = Tr(_), S = Tr(M), C = B.map(function(R) {
3177
- return Jn(R[0], R[1]);
3178
- }), O = S.map(function(R) {
3179
- return Jn(R[0], R[1]);
3180
- }), k = [];
3181
- C.forEach(function(R, A) {
3182
- var F = B[A], G = [];
3183
- O.forEach(function(X, V) {
3184
- var nt = Eo(Jr(R, X), [F, S[V]]);
3185
- G.push.apply(G, nt.map(function(Z) {
3186
- return { index1: A, index2: V, pos: Z, type: "intersection" };
3187
- }));
3188
- }), G.sort(function(X, V) {
3189
- return xn(F[0], X.pos) - xn(F[0], V.pos);
3190
- }), k.push.apply(k, G), cr(F[1], M) && k.push({ index1: A, index2: -1, pos: F[1], type: "inside" });
3191
- }), S.forEach(function(R, A) {
3192
- if (cr(R[1], _)) {
3193
- var F = !1, G = an(k, function(X) {
3194
- return X.index2 === A ? (F = !0, !1) : !!F;
3195
- });
3196
- G === -1 && (F = !1, G = an(k, function(X) {
3197
- var V = X.index1, nt = X.index2;
3198
- return V === -1 && nt + 1 === A ? (F = !0, !1) : !!F;
3199
- })), G === -1 ? k.push({ index1: -1, index2: A, pos: R[1], type: "inside" }) : k.splice(G, 0, { index1: -1, index2: A, pos: R[1], type: "inside" });
3200
- }
3201
- });
3202
- var z = {};
3203
- return k.filter(function(R) {
3204
- var A = R.pos, F = A[0] + "x" + A[1];
3205
- return !z[F] && (z[F] = !0, !0);
3206
- });
3207
- }(y, E);
3208
- return D.map(function(b) {
3209
- return b.pos;
3210
- });
3211
- }(v, [[l, d], [l + h, d], [l + h, d + g], [l, d + g]])), x = Ci(v);
3212
- return m && x ? Math.min(100, m / x * 100) : 0;
3213
- }, t.prototype.isInside = function(n, r) {
3214
- var i = this.state, o = i.target, a = i.pos1, s = i.pos2, u = i.pos3, c = i.pos4, p = i.targetClientRect;
3215
- return !!o && cr([n, r], _i([a, s, c, u], p));
3216
- }, t.prototype.updateRect = function(n, r, i) {
3217
- i === void 0 && (i = !0);
3218
- var o = this.props, a = !o.parentPosition && !o.wrapperMoveable;
3219
- a && un(!0);
3220
- var s = o.parentMoveable, u = this.state.target || o.target, c = this.getContainer(), p = s ? s._rootContainer : this._rootContainer, f = Wr(this.controlBox, u, c, c, p || c, this._getRequestStyles());
3221
- if (!u && this._hasFirstTarget && o.persistData) {
3222
- var l = Zi(o.persistData);
3223
- for (var d in l) f[d] = l[d];
3224
- }
3225
- a && un(), this.updateState(f, !s && i);
3226
- }, t.prototype.isDragging = function(n) {
3227
- var r, i, o = this.targetGesto, a = this.controlGesto;
3228
- return o?.isFlag() ? !n || !!(!((r = o.getEventData()[n]) === null || r === void 0) && r.isEventStart) : !(!a?.isFlag() || n && !(!((i = a.getEventData()[n]) === null || i === void 0) && i.isEventStart));
3229
- }, t.prototype.updateTarget = function(n) {
3230
- this.updateRect(n, !0);
3231
- }, t.prototype.getRect = function() {
3232
- var n = this.state, r = Ae(this.state), i = P(r, 4), o = i[0], a = i[1], s = i[2], u = i[3], c = ir(r), p = n.width, f = n.height, l = c.width, d = c.height, h = c.left, g = c.top, v = [n.left, n.top], m = kt(v, n.origin);
3233
- return { width: l, height: d, left: h, top: g, pos1: o, pos2: a, pos3: s, pos4: u, offsetWidth: p, offsetHeight: f, beforeOrigin: kt(v, n.beforeOrigin), origin: m, transformOrigin: n.transformOrigin, rotation: this.getRotation() };
3234
- }, t.prototype.getManager = function() {
3235
- return this;
3236
- }, t.prototype.stopDrag = function(n) {
3237
- var r;
3238
- n && n !== "target" || (((r = this.targetGesto) == null ? void 0 : r.isIdle()) === !1 && Ir(this, !1), r?.stop()), n && n !== "control" || (((r = this.controlGesto) == null ? void 0 : r.isIdle()) === !1 && Ir(this, !0), r?.stop());
3239
- }, t.prototype.getRotation = function() {
3240
- var n = this.state;
3241
- return function(r, i, o) {
3242
- var a = be(r, i) / Math.PI * 180;
3243
- return (a = o >= 0 ? a : 180 - a) >= 0 ? a : 360 + a;
3244
- }(n.pos1, n.pos2, n.direction);
3245
- }, t.prototype.request = function(n, r, i) {
3246
- r === void 0 && (r = {});
3247
- var o = this, a = o.props, s = a.parentMoveable || a.wrapperMoveable || o, u = s.props.ables, c = a.groupable, p = xe(u, function(m) {
3248
- return m.name === n;
3249
- });
3250
- if (this.isDragging() || !p || !p.request) return { request: function() {
3251
- return this;
3252
- }, requestEnd: function() {
3253
- return this;
3254
- } };
3255
- var f = p.request(o), l = i || r.isInstant, d = f.isControl ? "controlAbles" : "targetAbles", h = "".concat(c ? "Group" : "").concat(f.isControl ? "Control" : ""), g = L([], P(s[d]), !1), v = { request: function(m) {
3256
- return Mn(o, g, ["drag"], h, "", T(T({}, f.request(m)), { requestAble: n, isRequest: !0 }), l), v;
3257
- }, requestEnd: function() {
3258
- return Mn(o, g, ["drag"], h, "End", T(T({}, f.requestEnd()), { requestAble: n, isRequest: !0 }), l), v;
3259
- } };
3260
- return Mn(o, g, ["drag"], h, "Start", T(T({}, f.requestStart(r)), { requestAble: n, isRequest: !0 }), l), l ? v.request(r).requestEnd() : v;
3261
- }, t.prototype.getMoveables = function() {
3262
- return [this];
3263
- }, t.prototype.destroy = function() {
3264
- this.componentWillUnmount();
3265
- }, t.prototype.updateRenderPoses = function() {
3266
- var n = this.getState(), r = this.props, i = r.padding, o = n.originalBeforeOrigin, a = n.transformOrigin, s = n.allMatrix, u = n.is3d, c = n.pos1, p = n.pos2, f = n.pos3, l = n.pos4, d = n.left, h = n.top, g = n.isPersisted, v = r.zoom || 1;
3267
- if (!i && v <= 1) return n.renderPoses = [c, p, f, l], void (n.renderLines = [[c, p], [p, l], [l, f], [f, c]]);
3268
- var m = Vo(i || {}), x = m.left, y = m.top, E = m.bottom, D = m.right, b = u ? 4 : 3, w = Qn(b, qe((g ? a : this.controlBox && r.groupable ? o : kt(o, [d, h])).map(function(O) {
3269
- return -O;
3270
- }), b), s, qe(a, b)), _ = me(w, c, [-x, -y], b), M = me(w, p, [D, -y], b), B = me(w, f, [-x, E], b), S = me(w, l, [D, E], b);
3271
- n.renderPoses = [_, M, B, S], n.renderLines = [[_, M], [M, S], [S, B], [B, _]];
3272
- var C = v / 2;
3273
- n.renderLines = [[me(w, c, [-x - C, -y], b), me(w, p, [D + C, -y], b)], [me(w, p, [D, -y - C], b), me(w, l, [D, E + C], b)], [me(w, l, [D + C, E], b), me(w, f, [-x - C, E], b)], [me(w, f, [-x, E + C], b), me(w, c, [-x, -y - C], b)]];
3274
- }, t.prototype.checkUpdate = function() {
3275
- this._isPropTargetChanged = !1;
3276
- var n = this.props, r = n.target, i = n.container, o = n.parentMoveable, a = this.state, s = a.target, u = a.container;
3277
- if (s || r) {
3278
- this.updateAbles();
3279
- var c = !Yr(s, r);
3280
- if (c || !Yr(u, i)) {
3281
- var p = i || this.controlBox;
3282
- p && this.unsetAbles(), this.updateState({ target: r, container: i }), !o && p && this.updateRect("End", !1, !1), this._isPropTargetChanged = c;
3283
- }
3284
- }
3285
- }, t.prototype.waitToChangeTarget = function() {
3286
- return new Promise(function() {
3287
- });
3288
- }, t.prototype.triggerEvent = function(n, r) {
3289
- var i = this.props;
3290
- if (this._emitter.trigger(n, r), i.parentMoveable && r.isRequest && !r.isRequestChild) return i.parentMoveable.triggerEvent(n, r, !0);
3291
- var o = i[n];
3292
- return o && o(r);
3293
- }, t.prototype.useCSS = function(n, r) {
3294
- var i = this.props.customStyledMap, o = n + r;
3295
- return i[o] || (i[o] = So(n, r)), i[o];
3296
- }, t.prototype.getState = function() {
3297
- var n, r = this.props;
3298
- (r.target || !((n = r.targets) === null || n === void 0) && n.length) && (this._hasFirstTarget = !0);
3299
- var i = this.controlBox, o = r.persistData, a = r.firstRenderState;
3300
- if (a && !i) return a;
3301
- if (!this._hasFirstTarget && o) {
3302
- var s = Zi(o);
3303
- if (s) return this.updateState(s, !1), this.state;
3304
- }
3305
- return this.state.isPersisted = !1, this.state;
3306
- }, t.prototype.updateSelectors = function() {
3307
- }, t.prototype.unsetAbles = function() {
3308
- var n = this;
3309
- this.targetAbles.forEach(function(r) {
3310
- r.unset && r.unset(n);
3311
- });
3312
- }, t.prototype.updateAbles = function(n, r) {
3313
- n === void 0 && (n = this.props.ables), r === void 0 && (r = "");
3314
- var i = this.props.triggerAblesSimultaneously, o = this.getEnabledAbles(n), a = "drag".concat(r, "Start"), s = "pinch".concat(r, "Start"), u = "drag".concat(r, "ControlStart"), c = qn(o, [a, s], i), p = qn(o, [u], i);
3315
- this.enabledAbles = o, this.targetAbles = c, this.controlAbles = p;
3316
- }, t.prototype.updateState = function(n, r) {
3317
- if (r) {
3318
- if (this.isUnmounted) return;
3319
- this.setState(n);
3320
- } else {
3321
- var i = this.state;
3322
- for (var o in n) i[o] = n[o];
3323
- }
3324
- }, t.prototype.getEnabledAbles = function(n) {
3325
- n === void 0 && (n = this.props.ables);
3326
- var r = this.props;
3327
- return n.filter(function(i) {
3328
- return i && (i.always && r[i.name] !== !1 || r[i.name]);
3329
- });
3330
- }, t.prototype.renderAbles = function() {
3331
- var n, r, i, o, a = this, s = this.props.triggerAblesSimultaneously, u = { createElement: re.createElement };
3332
- return this.renderState = {}, (n = Ho(qn(this.getEnabledAbles(), ["render"], s).map(function(c) {
3333
- return (0, c.render)(a, u) || [];
3334
- })).filter(function(c) {
3335
- return c;
3336
- }), r = function(c) {
3337
- return c.key;
3338
- }, i = [], o = {}, n.forEach(function(c, p) {
3339
- var f = r(c), l = o[f];
3340
- l || (l = [], o[f] = l, i.push(l)), l.push(c);
3341
- }), i).map(function(c) {
3342
- return c[0];
3343
- });
3344
- }, t.prototype.updateCheckInput = function() {
3345
- this.targetGesto && (this.targetGesto.options.checkInput = this.props.checkInput);
3346
- }, t.prototype._getRequestStyles = function() {
3347
- return this.getEnabledAbles().reduce(function(n, r) {
3348
- var i, o, a = (o = (i = r.requestStyle) === null || i === void 0 ? void 0 : i.call(r)) !== null && o !== void 0 ? o : [];
3349
- return L(L([], P(n), !1), P(a), !1);
3350
- }, L([], P(this.props.requestStyles || []), !1));
3351
- }, t.prototype._updateObserver = function(n) {
3352
- this._updateResizeObserver(n), this._updateMutationObserver(n);
3353
- }, t.prototype._updateEvents = function() {
3354
- var n = this.targetAbles.length, r = this.controlAbles.length, i = this._dragTarget;
3355
- (!n && this.targetGesto || this._isTargetChanged(!0)) && (Ze(this, !1), this.updateState({ gestos: {} })), r || Ze(this, !0), i && n && !this.targetGesto && (this.targetGesto = Ko(this, i, "")), !this.controlGesto && r && (this.controlGesto = Qo(this, "Control"));
3356
- }, t.prototype._updateTargets = function() {
3357
- var n = this.props;
3358
- this._prevPropTarget = this._propTarget, this._prevDragTarget = this._dragTarget, this._prevOriginalDragTarget = this._originalDragTarget, this._prevDragArea = n.dragArea, this._propTarget = n.target, this._originalDragTarget = n.dragTarget || n.target, this._dragTarget = rn(this._originalDragTarget, !0);
3359
- }, t.prototype._renderLines = function() {
3360
- var n = this.props, r = n.zoom, i = n.hideDefaultLines, o = n.hideChildMoveableDefaultLines, a = n.parentMoveable;
3361
- if (i || a && o) return [];
3362
- var s = this.getState(), u = { createElement: re.createElement };
3363
- return s.renderLines.map(function(c, p) {
3364
- return ti(u, "", c[0], c[1], r, "render-line-".concat(p));
3365
- });
3366
- }, t.prototype._isTargetChanged = function(n) {
3367
- var r = this.props, i = r.dragTarget || r.target, o = this._prevOriginalDragTarget, a = this._prevDragArea, s = r.dragArea;
3368
- return !s && o !== i || (n || s) && a !== s || this._prevPropTarget != this._propTarget;
3369
- }, t.prototype._updateNativeEvents = function() {
3370
- var n = this, r = this.props.dragArea ? this.areaElement : this.state.target, i = this.events, o = Cn(i);
3371
- if (this._isTargetChanged()) for (var a in i) {
3372
- var s = i[a];
3373
- s && s.destroy(), i[a] = null;
3374
- }
3375
- if (r) {
3376
- var u = this.enabledAbles;
3377
- o.forEach(function(c) {
3378
- var p = qn(u, [c]), f = p.length > 0, l = i[c];
3379
- f ? (l || (l = new os(r, n, c), i[c] = l), l.setAbles(p)) : l && (l.destroy(), i[c] = null);
3380
- });
3381
- }
3382
- }, t.prototype._checkUpdateRootContainer = function() {
3383
- var n = this.props.rootContainer;
3384
- !this._rootContainer && n && (this._rootContainer = rn(n, !0));
3385
- }, t.prototype._checkUpdateViewContainer = function() {
3386
- var n = this.props.viewContainer;
3387
- !this._viewContainer && n && (this._viewContainer = rn(n, !0)), this._viewContainer && this._changeAbleViewClassNames(L(L([], P(this._getAbleViewClassNames()), !1), [this.isDragging() ? ts : ""], !1));
3388
- }, t.prototype._changeAbleViewClassNames = function(n) {
3389
- var r, i, o, a = this._viewContainer, s = (r = n.filter(Boolean), i = [], o = [], r.forEach(function(l, d) {
3390
- var h = l, g = o.indexOf(h), v = i[g] || [];
3391
- g === -1 && (o.push(h), i.push(v)), v.push(l);
3392
- }), i).map(function(l) {
3393
- return P(l, 1)[0];
3394
- }), u = this._viewClassNames, c = bo(u, s), p = c.removed, f = c.added;
3395
- p.forEach(function(l) {
3396
- po(a, u[l]);
3397
- }), f.forEach(function(l) {
3398
- fo(a, s[l]);
3399
- }), this._viewClassNames = s;
3400
- }, t.prototype._getAbleViewClassNames = function() {
3401
- var n = this;
3402
- return (this.getEnabledAbles().map(function(r) {
3403
- var i;
3404
- return ((i = r.viewClassName) === null || i === void 0 ? void 0 : i.call(r, n)) || "";
3405
- }).join(" ") + " ".concat(this._getAbleClassName("-view"))).split(/\s+/g);
3406
- }, t.prototype._getAbleClassName = function(n) {
3407
- var r = this;
3408
- n === void 0 && (n = "");
3409
- var i = this.getEnabledAbles(), o = this.targetGesto, a = this.controlGesto, s = o?.isFlag() ? o.getEventData() : {}, u = a?.isFlag() ? a.getEventData() : {};
3410
- return i.map(function(c) {
3411
- var p, f, l, d = c.name, h = ((p = c.className) === null || p === void 0 ? void 0 : p.call(c, r)) || "";
3412
- return (!((f = s[d]) === null || f === void 0) && f.isEventStart || !((l = u[d]) === null || l === void 0) && l.isEventStart) && (h += " ".concat(Ot("".concat(d).concat(n, "-dragging")))), h.trim();
3413
- }).filter(Boolean).join(" ");
3414
- }, t.prototype._updateResizeObserver = function(n) {
3415
- var r, i = this.props, o = i.target, a = Fe(this.getControlBoxElement());
3416
- if (a.ResizeObserver && o && i.useResizeObserver) {
3417
- if (n.target !== o || !this._reiszeObserver) {
3418
- var s = new a.ResizeObserver(this.checkUpdateRect);
3419
- s.observe(o, { box: "border-box" }), this._reiszeObserver = s;
3420
- }
3421
- } else (r = this._reiszeObserver) === null || r === void 0 || r.disconnect();
3422
- }, t.prototype._updateMutationObserver = function(n) {
3423
- var r, i = this, o = this.props, a = o.target, s = Fe(this.getControlBoxElement());
3424
- if (s.MutationObserver && a && o.useMutationObserver) {
3425
- if (n.target !== a || !this._mutationObserver) {
3426
- var u = new s.MutationObserver(function(c) {
3427
- var p, f;
3428
- try {
3429
- for (var l = function(g) {
3430
- var v = typeof Symbol == "function" && Symbol.iterator, m = v && g[v], x = 0;
3431
- if (m) return m.call(g);
3432
- if (g && typeof g.length == "number") return { next: function() {
3433
- return g && x >= g.length && (g = void 0), { value: g && g[x++], done: !g };
3434
- } };
3435
- throw new TypeError(v ? "Object is not iterable." : "Symbol.iterator is not defined.");
3436
- }(c), d = l.next(); !d.done; d = l.next()) {
3437
- var h = d.value;
3438
- h.type === "attributes" && h.attributeName === "style" && i.checkUpdateRect();
3439
- }
3440
- } catch (g) {
3441
- p = { error: g };
3442
- } finally {
3443
- try {
3444
- d && !d.done && (f = l.return) && f.call(l);
3445
- } finally {
3446
- if (p) throw p.error;
3447
- }
3448
- }
3449
- });
3450
- u.observe(a, { attributes: !0 }), this._mutationObserver = u;
3451
- }
3452
- } else (r = this._mutationObserver) === null || r === void 0 || r.disconnect();
3453
- }, t.defaultProps = { dragTargetSelf: !1, target: null, dragTarget: null, container: null, rootContainer: null, origin: !0, parentMoveable: null, wrapperMoveable: null, isWrapperMounted: !1, parentPosition: null, warpSelf: !1, svgOrigin: "", dragContainer: null, useResizeObserver: !1, useMutationObserver: !1, preventDefault: !0, preventRightClick: !0, preventWheelClick: !0, linePadding: 0, controlPadding: 0, ables: [], pinchThreshold: 20, dragArea: !1, passDragArea: !1, transformOrigin: "", className: "", zoom: 1, triggerAblesSimultaneously: !1, padding: {}, pinchOutside: !0, checkInput: !1, dragFocusedInput: !1, groupable: !1, hideDefaultLines: !1, cspNonce: "", translateZ: 0, cssStyled: null, customStyledMap: {}, props: {}, stopPropagation: !1, preventClickDefault: !1, preventClickEventOnDrag: !0, flushSync: Io, firstRenderState: null, persistData: null, viewContainer: null, requestStyles: [], useAccuratePosition: !1 }, t;
3454
- }(re.PureComponent), Zo = { name: "groupable", props: ["defaultGroupRotate", "useDefaultGroupRotate", "defaultGroupOrigin", "groupable", "groupableProps", "targetGroups", "hideChildMoveableDefaultLines"], events: [], render: function(e, t) {
3455
- var n, r = e.props, i = r.targets || [], o = e.getState(), a = o.left, s = o.top, u = o.isPersisted, c = r.zoom || 1, p = e.renderGroupRects, f = ((n = r.persistData) === null || n === void 0 ? void 0 : n.children) || [];
3456
- u ? i = f.map(function() {
3457
- return null;
3458
- }) : f = [];
3459
- var l = Qi(e, "parentPosition", [a, s], function(h) {
3460
- return h.join(",");
3461
- }), d = Qi(e, "requestStyles", e.getRequestChildStyles(), function(h) {
3462
- return h.join(",");
3463
- });
3464
- return e.moveables = e.moveables.slice(0, i.length), L(L([], P(i.map(function(h, g) {
3465
- return t.createElement(ln, { key: "moveable" + g, ref: ao(e, "moveables", g), target: h, origin: !1, requestStyles: d, cssStyled: r.cssStyled, customStyledMap: r.customStyledMap, useResizeObserver: r.useResizeObserver, useMutationObserver: r.useMutationObserver, hideChildMoveableDefaultLines: r.hideChildMoveableDefaultLines, parentMoveable: e, parentPosition: [a, s], persistData: f[g], zoom: c });
3466
- })), !1), P(Ho(p.map(function(h, g) {
3467
- var v = [h.pos1, h.pos2, h.pos3, h.pos4];
3468
- return [[0, 1], [1, 3], [3, 2], [2, 0]].map(function(m, x) {
3469
- var y = P(m, 2), E = y[0], D = y[1];
3470
- return ti(t, "", ut(v[E], l), ut(v[D], l), c, "group-rect-".concat(g, "-").concat(x));
3471
- });
3472
- }))), !1);
3473
- } };
3474
- function Ve(e) {
3475
- var t = e.originalDatas.draggable;
3476
- return t || (e.originalDatas.draggable = {}, t = e.originalDatas.draggable), T(T({}, e), { datas: t });
3477
- }
3478
- _n("clickable", { props: ["clickable"], events: ["click", "clickGroup"], always: !0, dragRelation: "weak", dragStart: function() {
3479
- }, dragControlStart: function() {
3480
- }, dragGroupStart: function(e, t) {
3481
- t.datas.inputTarget = t.inputEvent && t.inputEvent.target;
3482
- }, dragEnd: function(e, t) {
3483
- var n = e.props.target, r = t.inputEvent, i = t.inputTarget, o = !e.isMoveableElement(i) && e.controlBox.contains(i);
3484
- if (r && i && !t.isDrag && !e.isMoveableElement(i) && !o) {
3485
- var a = n.contains(i);
3486
- lt(e, "onClick", Tt(e, t, { isDouble: t.isDouble, inputTarget: i, isTarget: n === i, moveableTarget: e.props.target, containsTarget: a }));
3487
- }
3488
- }, dragGroupEnd: function(e, t) {
3489
- var n = t.inputEvent, r = t.inputTarget;
3490
- if (n && r && !t.isDrag && !e.isMoveableElement(r) && t.datas.inputTarget !== r) {
3491
- var i = e.props.targets, o = i.indexOf(r), a = o > -1, s = !1;
3492
- o === -1 && (s = (o = an(i, function(u) {
3493
- return u.contains(r);
3494
- })) > -1), lt(e, "onClickGroup", Tt(e, t, { isDouble: t.isDouble, targets: i, inputTarget: r, targetIndex: o, isTarget: a, containsTarget: s, moveableTarget: i[o] }));
3495
- }
3496
- }, dragControlEnd: function(e, t) {
3497
- this.dragEnd(e, t);
3498
- }, dragGroupControlEnd: function(e, t) {
3499
- this.dragEnd(e, t);
3500
- } }), _n("edgeDraggable", { css: [`.edge.edgeDraggable.line {
3501
- cursor: move;
3502
- }`], render: function(e, t) {
3503
- var n = e.props, r = n.edgeDraggable;
3504
- return r ? Ro(t, "edgeDraggable", r, e.getState().renderPoses, n.zoom) : [];
3505
- }, dragCondition: function(e, t) {
3506
- var n, r = e.props, i = (n = t.inputEvent) === null || n === void 0 ? void 0 : n.target;
3507
- return !(!r.edgeDraggable || !i) && !r.draggable && Ce(i, Ot("direction")) && Ce(i, Ot("edge")) && Ce(i, Ot("edgeDraggable"));
3508
- }, dragStart: function(e, t) {
3509
- return we.dragStart(e, Ve(t));
3510
- }, drag: function(e, t) {
3511
- return we.drag(e, Ve(t));
3512
- }, dragEnd: function(e, t) {
3513
- return we.dragEnd(e, Ve(t));
3514
- }, dragGroupCondition: function(e, t) {
3515
- var n, r = e.props, i = (n = t.inputEvent) === null || n === void 0 ? void 0 : n.target;
3516
- return !(!r.edgeDraggable || !i) && !r.draggable && Ce(i, Ot("direction")) && Ce(i, Ot("line"));
3517
- }, dragGroupStart: function(e, t) {
3518
- return we.dragGroupStart(e, Ve(t));
3519
- }, dragGroup: function(e, t) {
3520
- return we.dragGroup(e, Ve(t));
3521
- }, dragGroupEnd: function(e, t) {
3522
- return we.dragGroupEnd(e, Ve(t));
3523
- }, unset: function(e) {
3524
- return we.unset(e);
3525
- } });
3526
- var as = { name: "individualGroupable", props: ["individualGroupable", "individualGroupableProps"], events: [] };
3527
- function $i(e, t) {
3528
- var n = P(e, 3), r = n[0], i = n[1], o = n[2];
3529
- return (r * t[0] + i * t[1] + o) / Math.sqrt(r * r + i * i);
3530
- }
3531
- function jn(e, t) {
3532
- var n = P(e, 2), r = n[0], i = n[1];
3533
- return -r * t[0] - i * t[1];
3534
- }
3535
- function to(e, t) {
3536
- return Math.max.apply(Math, L([], P(e.map(function(n) {
3537
- var r = P(n, 4), i = r[0], o = r[1], a = r[2], s = r[3];
3538
- return Math.max(i[t], o[t], a[t], s[t]);
3539
- })), !1));
3540
- }
3541
- function eo(e, t) {
3542
- return Math.min.apply(Math, L([], P(e.map(function(n) {
3543
- var r = P(n, 4), i = r[0], o = r[1], a = r[2], s = r[3];
3544
- return Math.min(i[t], o[t], a[t], s[t]);
3545
- })), !1));
3546
- }
3547
- function $o(e, t) {
3548
- var n = t.map(function(r) {
3549
- if (ie(r)) {
3550
- var i = $o(e, r), o = i.length;
3551
- return o > 1 ? i : o === 1 ? i[0] : null;
3552
- }
3553
- var a = xe(e, function(s) {
3554
- return s.manager.props.target === r;
3555
- });
3556
- return a ? (a.finded = !0, a.manager) : null;
3557
- }).filter(Boolean);
3558
- return n.length === 1 && ie(n[0]) ? n[0] : n;
3559
- }
3560
- var ss = function(e) {
3561
- function t() {
3562
- var n = e !== null && e.apply(this, arguments) || this;
3563
- return n.differ = new xo(), n.moveables = [], n.transformOrigin = "50% 50%", n.renderGroupRects = [], n._targetGroups = [], n._hasFirstTargets = !1, n;
3564
- }
3565
- return Bn(t, e), t.prototype.componentDidMount = function() {
3566
- e.prototype.componentDidMount.call(this);
3567
- }, t.prototype.checkUpdate = function() {
3568
- this._isPropTargetChanged = !1, this.updateAbles();
3569
- }, t.prototype.getTargets = function() {
3570
- return this.props.targets;
3571
- }, t.prototype.updateRect = function(n, r, i) {
3572
- var o;
3573
- i === void 0 && (i = !0);
3574
- var a = this.state;
3575
- if (this.controlBox && !a.isPersisted) {
3576
- un(!0), this.moveables.forEach(function(W) {
3577
- W.updateRect(n, !1, !1);
3578
- });
3579
- var s = this.props, u = this.moveables, c = a.target || s.target, p = u.map(function(W) {
3580
- return { finded: !1, manager: W };
3581
- }), f = this.props.targetGroups || [], l = $o(p, f), d = s.useDefaultGroupRotate;
3582
- l.push.apply(l, L([], P(p.filter(function(W) {
3583
- return !W.finded;
3584
- }).map(function(W) {
3585
- return W.manager;
3586
- })), !1));
3587
- var h = [], g = !r || n !== "" && s.updateGroup, v = s.defaultGroupRotate || 0;
3588
- if (!this._hasFirstTargets) {
3589
- var m = (o = s.persistData) === null || o === void 0 ? void 0 : o.rotation;
3590
- m != null && (v = m);
3591
- }
3592
- var x = function W(j, rt, gt) {
3593
- var q, Y = j.map(function(tt) {
3594
- if (ie(tt)) {
3595
- var it = W(tt, rt), xt = [it.pos1, it.pos2, it.pos3, it.pos4];
3596
- return h.push(it), { poses: xt, rotation: it.rotation };
3597
- }
3598
- return { poses: Ae(tt.state), rotation: tt.getRotation() };
3599
- }), $ = Y.map(function(tt) {
3600
- return tt.rotation;
3601
- }), J = $[0], At = $.every(function(tt) {
3602
- return Math.abs(J - tt) < 0.1;
3603
- });
3604
- q = g ? !d && At ? J : v : d || gt || !At ? rt : J;
3605
- var le = Y.map(function(tt) {
3606
- return tt.poses;
3607
- }), Pt = function(tt, it) {
3608
- var xt, yt, Rt, Yt = [0, 0], vt = [0, 0], ft = [0, 0], ht = [0, 0], Ft = 0, mt = 0;
3609
- if (!tt.length) return { pos1: Yt, pos2: vt, pos3: ft, pos4: ht, minX: 0, minY: 0, maxX: 0, maxY: 0, width: Ft, height: mt, rotation: it };
3610
- var N = St(it, he);
3611
- if (N % 90) {
3612
- var Q = N / 180 * Math.PI, ct = Math.tan(Q), at = -1 / ct, st = [Br, ki], pt = [[0, 0], [0, 0]], ot = [Br, ki], bt = [[0, 0], [0, 0]];
3613
- tt.forEach(function(Jt) {
3614
- Jt.forEach(function(zt) {
3615
- var fe = $i([-ct, 1, 0], zt), oe = $i([-at, 1, 0], zt);
3616
- st[0] > fe && (pt[0] = zt, st[0] = fe), st[1] < fe && (pt[1] = zt, st[1] = fe), ot[0] > oe && (bt[0] = zt, ot[0] = oe), ot[1] < oe && (bt[1] = zt, ot[1] = oe);
3617
- });
3618
- });
3619
- var Et = P(pt, 2), Ht = Et[0], Ut = Et[1], Kt = P(bt, 2), K = Kt[0], et = Kt[1], dt = [-ct, 1, jn([-ct, 1], Ht)], Ct = [-ct, 1, jn([-ct, 1], Ut)], Dt = [-at, 1, jn([-at, 1], K)], Bt = [-at, 1, jn([-at, 1], et)];
3620
- xt = P([[dt, Dt], [dt, Bt], [Ct, Dt], [Ct, Bt]].map(function(Jt) {
3621
- var zt = P(Jt, 2);
3622
- return Jr(zt[0], zt[1])[0];
3623
- }), 4), Yt = xt[0], vt = xt[1], ft = xt[2], ht = xt[3], Ft = ot[1] - ot[0], mt = st[1] - st[0];
3624
- } else {
3625
- var Xt = eo(tt, 0), Mt = eo(tt, 1), ee = to(tt, 0), Qt = to(tt, 1);
3626
- Yt = [Xt, Mt], vt = [ee, Mt], ft = [Xt, Qt], ht = [ee, Qt], Ft = ee - Xt, mt = Qt - Mt, N % 180 && (Yt = (yt = P([ft, Yt, ht, vt], 4))[0], vt = yt[1], ft = yt[2], ht = yt[3], Ft = Qt - Mt, mt = ee - Xt);
3627
- }
3628
- N % 360 > 180 && (Yt = (Rt = P([ht, ft, vt, Yt], 4))[0], vt = Rt[1], ft = Rt[2], ht = Rt[3]);
3629
- var Lt = en([Yt, vt, ft, ht]);
3630
- return { pos1: Yt, pos2: vt, pos3: ft, pos4: ht, width: Ft, height: mt, minX: Lt.minX, minY: Lt.minY, maxX: Lt.maxX, maxY: Lt.maxY, rotation: it };
3631
- }(le, q);
3632
- return Pt;
3633
- }(l, this.rotation, !0);
3634
- g && (this.rotation = x.rotation, this.transformOrigin = s.defaultGroupOrigin || "50% 50%", this.scale = [1, 1]), this._targetGroups = f, this.renderGroupRects = h;
3635
- var y = this.transformOrigin, E = this.rotation, D = this.scale, b = x.width, w = x.height, _ = x.minX, M = x.minY, B = en(function(W, j, rt) {
3636
- var gt = W.map(function(Y) {
3637
- return ut(Y, j);
3638
- }), q = gt.map(function(Y) {
3639
- return function($, J) {
3640
- return Se(rr(J, 3), Rn($, 3));
3641
- }(Y, rt);
3642
- });
3643
- return { prev: gt, next: q, result: q.map(function(Y) {
3644
- return kt(Y, j);
3645
- }) };
3646
- }([[0, 0], [b, 0], [0, w], [b, w]], Lo(y, b, w), this.rotation / 180 * Math.PI).result), S = B.minX, C = B.minY, O = " rotate(".concat(E, "deg)") + " scale(".concat(on(D[0]), ", ").concat(on(D[1]), ")"), k = "translate(".concat(-S, "px, ").concat(-C, "px)").concat(O);
3647
- this.controlBox.style.transform = "translate3d(".concat(_, "px, ").concat(M, "px, ").concat(this.props.translateZ || 0, ")"), c.style.cssText += "left:0px;top:0px;" + "transform-origin:".concat(y, ";") + "width:".concat(b, "px;height:").concat(w, "px;") + "transform: ".concat(k), a.width = b, a.height = w;
3648
- var z = this.getContainer(), R = Wr(this.controlBox, c, this.controlBox, this.getContainer(), this._rootContainer || z, []), A = [R.left, R.top], F = P(Ae(R), 4), G = F[0], X = F[1], V = F[2], nt = F[3], Z = en([G, X, V, nt]), U = [Z.minX, Z.minY], H = on(D[0] * D[1]);
3649
- R.pos1 = ut(G, U), R.pos2 = ut(X, U), R.pos3 = ut(V, U), R.pos4 = ut(nt, U), R.left = _ - R.left + U[0], R.top = M - R.top + U[1], R.origin = ut(kt(A, R.origin), U), R.beforeOrigin = ut(kt(A, R.beforeOrigin), U), R.originalBeforeOrigin = kt(A, R.originalBeforeOrigin), R.transformOrigin = ut(kt(A, R.transformOrigin), U), c.style.transform = "translate(".concat(-S - U[0], "px, ").concat(-C - U[1], "px)") + O, un(), this.updateState(T(T({}, R), { posDelta: U, direction: H, beforeDirection: H }), i);
3650
- }
3651
- }, t.prototype.getRect = function() {
3652
- return T(T({}, e.prototype.getRect.call(this)), { children: this.moveables.map(function(n) {
3653
- return n.getRect();
3654
- }) });
3655
- }, t.prototype.triggerEvent = function(n, r, i) {
3656
- if (i || n.indexOf("Group") > -1) return e.prototype.triggerEvent.call(this, n, r);
3657
- this._emitter.trigger(n, r);
3658
- }, t.prototype.getRequestChildStyles = function() {
3659
- return this.getEnabledAbles().reduce(function(n, r) {
3660
- var i, o, a = (o = (i = r.requestChildStyle) === null || i === void 0 ? void 0 : i.call(r)) !== null && o !== void 0 ? o : [];
3661
- return L(L([], P(n), !1), P(a), !1);
3662
- }, []);
3663
- }, t.prototype.getMoveables = function() {
3664
- return L([], P(this.moveables), !1);
3665
- }, t.prototype.updateAbles = function() {
3666
- e.prototype.updateAbles.call(this, L(L([], P(this.props.ables), !1), [Zo], !1), "Group");
3667
- }, t.prototype._updateTargets = function() {
3668
- e.prototype._updateTargets.call(this), this._originalDragTarget = this.props.dragTarget || this.areaElement, this._dragTarget = rn(this._originalDragTarget, !0);
3669
- }, t.prototype._updateEvents = function() {
3670
- var n = this.state, r = this.props, i = this._prevDragTarget, o = r.dragTarget || this.areaElement, a = r.targets, s = this.differ.update(a), u = s.added, c = s.changed, p = s.removed, f = u.length || p.length;
3671
- (f || this._prevOriginalDragTarget !== this._originalDragTarget) && (Ze(this, !1), Ze(this, !0), this.updateState({ gestos: {} })), i !== o && (n.target = null), n.target || (n.target = this.areaElement, this.controlBox.style.display = "block"), n.target && (this.targetGesto || (this.targetGesto = Ko(this, this._dragTarget, "Group")), this.controlGesto || (this.controlGesto = Qo(this, "GroupControl")));
3672
- var l = !Yr(n.container, r.container);
3673
- l && (n.container = r.container), (l || f || this.transformOrigin !== (r.defaultGroupOrigin || "50% 50%") || c.length || a.length && !jo(this._targetGroups, r.targetGroups || [])) && (this.updateRect(), this._hasFirstTargets = !0), this._isPropTargetChanged = !!f;
3674
- }, t.prototype._updateObserver = function() {
3675
- }, t.defaultProps = T(T({}, ln.defaultProps), { transformOrigin: ["50%", "50%"], groupable: !0, dragArea: !0, keepRatio: !0, targets: [], defaultGroupRotate: 0, defaultGroupOrigin: "50% 50%" }), t;
3676
- }(ln), us = function(e) {
3677
- function t() {
3678
- var n = e !== null && e.apply(this, arguments) || this;
3679
- return n.moveables = [], n;
3680
- }
3681
- return Bn(t, e), t.prototype.render = function() {
3682
- var n, r = this, i = this.props, o = i.cspNonce, a = i.cssStyled, s = i.persistData, u = i.targets || [], c = u.length, p = this.isUnmounted || !c, f = (n = s?.children) !== null && n !== void 0 ? n : [];
3683
- return p && !c && f.length ? u = f.map(function() {
3684
- return null;
3685
- }) : p || (f = []), re.createElement(a, { cspNonce: o, ref: Ne(this, "controlBox"), className: Ot("control-box") }, u.map(function(l, d) {
3686
- var h, g, v = (g = (h = i.individualGroupableProps) === null || h === void 0 ? void 0 : h.call(i, l, d)) !== null && g !== void 0 ? g : {};
3687
- return re.createElement(ln, T({ key: "moveable" + d, ref: ao(r, "moveables", d) }, i, v, { target: l, wrapperMoveable: r, isWrapperMounted: r.isMoveableMounted, persistData: f[d] }));
3688
- }));
3689
- }, t.prototype.componentDidMount = function() {
3690
- }, t.prototype.componentDidUpdate = function() {
3691
- }, t.prototype.getTargets = function() {
3692
- return this.props.targets;
3693
- }, t.prototype.updateRect = function(n, r, i) {
3694
- i === void 0 && (i = !0), un(!0), this.moveables.forEach(function(o) {
3695
- o.updateRect(n, r, i);
3696
- }), un();
3697
- }, t.prototype.getRect = function() {
3698
- return T(T({}, e.prototype.getRect.call(this)), { children: this.moveables.map(function(n) {
3699
- return n.getRect();
3700
- }) });
3701
- }, t.prototype.request = function(n, r, i) {
3702
- r === void 0 && (r = {});
3703
- var o = this.moveables.map(function(s) {
3704
- return s.request(n, T(T({}, r), { isInstant: !1 }), !1);
3705
- }), a = { request: function(s) {
3706
- return o.forEach(function(u) {
3707
- return u.request(s);
3708
- }), this;
3709
- }, requestEnd: function() {
3710
- return o.forEach(function(s) {
3711
- return s.requestEnd();
3712
- }), this;
3713
- } };
3714
- return i || r.isInstant ? a.request(r).requestEnd() : a;
3715
- }, t.prototype.dragStart = function(n, r) {
3716
- r === void 0 && (r = n.target);
3717
- var i = r, o = xe(this.moveables, function(a) {
3718
- var s = a.getTargets()[0], u = a.getControlBoxElement(), c = a.getDragElement();
3719
- return !(!s || !c) && (c === i || c.contains(i) || c !== s && s === i || s.contains(i) || u === i || u.contains(i));
3720
- });
3721
- return o && o.dragStart(n, r), this;
3722
- }, t.prototype.hitTest = function() {
3723
- return 0;
3724
- }, t.prototype.isInside = function() {
3725
- return !1;
3726
- }, t.prototype.isDragging = function() {
3727
- return !1;
3728
- }, t.prototype.getDragElement = function() {
3729
- return null;
3730
- }, t.prototype.getMoveables = function() {
3731
- return L([], P(this.moveables), !1);
3732
- }, t.prototype.updateRenderPoses = function() {
3733
- }, t.prototype.checkUpdate = function() {
3734
- }, t.prototype.triggerEvent = function() {
3735
- }, t.prototype.updateAbles = function() {
3736
- }, t.prototype._updateEvents = function() {
3737
- }, t.prototype._updateObserver = function() {
3738
- }, t;
3739
- }(ln);
3740
- function ta(e, t) {
3741
- var n = [];
3742
- return e.forEach(function(r) {
3743
- r && (fn(r) ? t[r] && n.push.apply(n, L([], P(t[r]), !1)) : ie(r) ? n.push.apply(n, L([], P(ta(r, t)), !1)) : n.push(r));
3744
- }), n;
3745
- }
3746
- function ea(e, t) {
3747
- var n = [];
3748
- return e.forEach(function(r) {
3749
- r && (fn(r) ? t[r] && n.push.apply(n, L([], P(t[r]), !1)) : ie(r) ? n.push(ea(r, t)) : n.push(r));
3750
- }), n;
3751
- }
3752
- function na(e, t) {
3753
- return e.length !== t.length || e.some(function(n, r) {
3754
- var i = t[r];
3755
- return !(!n && !i) && n != i && (!ie(n) || !ie(i) || na(n, i));
3756
- });
3757
- }
3758
- var cs = function(e) {
3759
- function t() {
3760
- var i = e !== null && e.apply(this, arguments) || this;
3761
- return i.refTargets = [], i.selectorMap = {}, i._differ = new xo(), i._elementTargets = [], i._tmpRefTargets = [], i._tmpSelectorMap = {}, i._onChangeTargets = null, i;
3762
- }
3763
- var n, r;
3764
- return Bn(t, e), t.makeStyled = function() {
3765
- var i = {};
3766
- this.getTotalAbles().forEach(function(a) {
3767
- var s = a.css;
3768
- s && s.forEach(function(u) {
3769
- i[u] = !0;
3770
- });
3771
- });
3772
- var o = Cn(i).join(`
3773
- `);
3774
- this.defaultStyled = So("div", function(a, s) {
3775
- return s.replace(/([^}{]*){/gm, function(u, c) {
3776
- return c.replace(/\.([^{,\s\d.]+)/g, "." + a + "$1") + "{";
3777
- });
3778
- }($r, Ga + o));
3779
- }, t.getTotalAbles = function() {
3780
- return L([ns, Zo, as, es], P(this.defaultAbles), !1);
3781
- }, t.prototype.render = function() {
3782
- var i, o = this.constructor;
3783
- o.defaultStyled || o.makeStyled();
3784
- var a = this.props, s = a.ables, u = a.props, c = function(_, M) {
3785
- var B = {};
3786
- for (var S in _) Object.prototype.hasOwnProperty.call(_, S) && M.indexOf(S) < 0 && (B[S] = _[S]);
3787
- if (_ != null && typeof Object.getOwnPropertySymbols == "function") {
3788
- var C = 0;
3789
- for (S = Object.getOwnPropertySymbols(_); C < S.length; C++) M.indexOf(S[C]) < 0 && Object.prototype.propertyIsEnumerable.call(_, S[C]) && (B[S[C]] = _[S[C]]);
3790
- }
3791
- return B;
3792
- }(a, ["ables", "props"]), p = P(this._updateRefs(!0), 2), f = p[0], l = p[1], d = ta(f, l), h = d.length > 1, g = L(L([], P(o.getTotalAbles()), !1), P(s || []), !1), v = T(T(T({}, c), u || {}), { ables: g, cssStyled: o.defaultStyled, customStyledMap: o.customStyledMap });
3793
- this._elementTargets = d;
3794
- var m = null, x = this.moveable, y = c.persistData;
3795
- if (y?.children && (h = !0), c.individualGroupable) return re.createElement(us, T({ key: "individual-group", ref: Ne(this, "moveable") }, v, { target: null, targets: d }));
3796
- if (h) {
3797
- var E = ea(f, l);
3798
- if (x && !x.props.groupable && !x.props.individualGroupable) {
3799
- var D = x.props.target;
3800
- D && d.indexOf(D) > -1 && (m = T({}, x.state));
3801
- }
3802
- return re.createElement(ss, T({ key: "group", ref: Ne(this, "moveable") }, v, (i = c.groupableProps) !== null && i !== void 0 ? i : {}, { target: null, targets: d, targetGroups: E, firstRenderState: m }));
3803
- }
3804
- var b = d[0];
3805
- if (x && (x.props.groupable || x.props.individualGroupable)) {
3806
- var w = xe(x.moveables || [], function(_) {
3807
- return _.props.target === b;
3808
- });
3809
- w && (m = T({}, w.state));
3810
- }
3811
- return re.createElement(ln, T({ key: "single", ref: Ne(this, "moveable") }, v, { target: b, firstRenderState: m }));
3812
- }, t.prototype.componentDidMount = function() {
3813
- this._checkChangeTargets();
3814
- }, t.prototype.componentDidUpdate = function() {
3815
- this._checkChangeTargets();
3816
- }, t.prototype.componentWillUnmount = function() {
3817
- this.selectorMap = {}, this.refTargets = [];
3818
- }, t.prototype.getTargets = function() {
3819
- var i, o;
3820
- return (o = (i = this.moveable) === null || i === void 0 ? void 0 : i.getTargets()) !== null && o !== void 0 ? o : [];
3821
- }, t.prototype.updateSelectors = function() {
3822
- this.selectorMap = {}, this._updateRefs(), this.forceUpdate();
3823
- }, t.prototype.waitToChangeTarget = function() {
3824
- var i, o = this;
3825
- return this._onChangeTargets = function() {
3826
- o._onChangeTargets = null, i();
3827
- }, new Promise(function(a) {
3828
- i = a;
3829
- });
3830
- }, t.prototype.waitToChangeTargets = function() {
3831
- return this.waitToChangeTarget();
3832
- }, t.prototype.getManager = function() {
3833
- return this.moveable;
3834
- }, t.prototype.getMoveables = function() {
3835
- return this.moveable.getMoveables();
3836
- }, t.prototype.getDragElement = function() {
3837
- return this.moveable.getDragElement();
3838
- }, t.prototype._updateRefs = function(i) {
3839
- var o = this.refTargets, a = qo(this.props.target || this.props.targets), s = typeof document < "u", u = na(o, a), c = this.selectorMap, p = {};
3840
- return this.refTargets.forEach(function f(l) {
3841
- fn(l) ? c[l] ? p[l] = c[l] : s && (u = !0, p[l] = [].slice.call(document.querySelectorAll(l))) : ie(l) && l.forEach(f);
3842
- }), this._tmpRefTargets = a, this._tmpSelectorMap = p, [a, p, !i && u];
3843
- }, t.prototype._checkChangeTargets = function() {
3844
- var i, o, a;
3845
- this.refTargets = this._tmpRefTargets, this.selectorMap = this._tmpSelectorMap;
3846
- var s = this._differ.update(this._elementTargets), u = s.added, c = s.removed;
3847
- (u.length || c.length) && ((o = (i = this.props).onChangeTargets) === null || o === void 0 || o.call(i, { moveable: this.moveable, targets: this._elementTargets }), (a = this._onChangeTargets) === null || a === void 0 || a.call(this));
3848
- var p = P(this._updateRefs(), 3), f = p[0], l = p[1], d = p[2];
3849
- this.refTargets = f, this.selectorMap = l, d && this.forceUpdate();
3850
- }, t.defaultAbles = [], t.customStyledMap = {}, t.defaultStyled = null, function(i, o, a, s) {
3851
- var u, c = arguments.length, p = c < 3 ? o : s;
3852
- if (typeof Reflect == "object" && typeof Reflect.decorate == "function") p = Reflect.decorate(i, o, a, s);
3853
- else for (var f = i.length - 1; f >= 0; f--) (u = i[f]) && (p = (c < 3 ? u(p) : c > 3 ? u(o, a, p) : u(o, a)) || p);
3854
- c > 3 && p && Object.defineProperty(o, a, p);
3855
- }([(n = Ia, r === void 0 && (r = {}), function(i, o) {
3856
- n.forEach(function(a) {
3857
- var s = r[a] || a;
3858
- s in i || (i[s] = function() {
3859
- for (var u, c = [], p = 0; p < arguments.length; p++) c[p] = arguments[p];
3860
- var f = (u = this[o])[a].apply(u, c);
3861
- return f === this[o] ? this : f;
3862
- });
3863
- });
3864
- })], t.prototype, "moveable", void 0), t;
3865
- }(re.PureComponent);
3866
- const fs = (no = [we, ja], yr = function(e) {
3867
- function t() {
3868
- return e !== null && e.apply(this, arguments) || this;
3869
- }
3870
- return Bn(t, e), t;
3871
- }(cs), yr.defaultAbles = no, yr);
3872
- var no, yr;
3873
- export {
3874
- fs as default
3875
- };