@sheetxl/studio-vanilla 0.4.20 → 0.4.21

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 (178) hide show
  1. package/browser/cjs/index.cjs +80 -2
  2. package/browser/cjs/{DlL3FUzHZ4HVF-yg.cjs → n6CXzSocLW_BCO8w.cjs} +6 -6
  3. package/browser/esm/{BFUWwMA9uskwVkew.mjs → NBuS53B7u8hItiXf.mjs} +933 -937
  4. package/browser/esm/index.mjs +176 -4
  5. package/cdn/assets/CY8njwo06MWkoPz2.js +21 -0
  6. package/cdn/index.js +2 -2
  7. package/cdn/loader.js +1 -1
  8. package/package.json +3 -3
  9. package/browser/cjs/B3IrGavp2xDl72qi.cjs +0 -15
  10. package/browser/cjs/B4ScrvWBCXLzvNBz.cjs +0 -145
  11. package/browser/cjs/BBNggAKHDP4QyhrD.cjs +0 -6
  12. package/browser/cjs/BC_a9wiziJZdu6Au.cjs +0 -6
  13. package/browser/cjs/BDxykI6GcXpGGGMz.cjs +0 -42
  14. package/browser/cjs/BK6DsykAfJG4V-cJ.cjs +0 -6
  15. package/browser/cjs/BKow6xaj0GHFH5-V.cjs +0 -6
  16. package/browser/cjs/BOAxaoihJZZzZXhd.cjs +0 -6
  17. package/browser/cjs/BSlU398ba-ACAG1g.cjs +0 -11
  18. package/browser/cjs/BSoRD8INLnGqOd24.cjs +0 -7
  19. package/browser/cjs/BTxfWiE-FbVvlbXz.cjs +0 -11
  20. package/browser/cjs/BdltTXLt7iZT8sku.cjs +0 -6
  21. package/browser/cjs/Bf-D_AYDbEeRcsvz.cjs +0 -6
  22. package/browser/cjs/Bhlan81dumwgyb0S.cjs +0 -6
  23. package/browser/cjs/BlJixWFmG-z3n7dN.cjs +0 -6
  24. package/browser/cjs/BndDL5HS4RNIfwOd.cjs +0 -15
  25. package/browser/cjs/Buw8XeqL6XQwxqnQ.cjs +0 -32
  26. package/browser/cjs/C04_CccTUmfnv-ln.cjs +0 -6
  27. package/browser/cjs/C4AWzM1Uh9cuE1A9.cjs +0 -6
  28. package/browser/cjs/C5TLXtw93fBnRGm7.cjs +0 -378
  29. package/browser/cjs/CKa-Z1SfYc0pkIX2.cjs +0 -6
  30. package/browser/cjs/CLiSJrUNaSxa5Mn7.cjs +0 -16
  31. package/browser/cjs/CODi1uYlZ35lFLh9.cjs +0 -6
  32. package/browser/cjs/CSM5H5PTjrTaUgKK.cjs +0 -6
  33. package/browser/cjs/CTPgM-UqKCo4_hd1.cjs +0 -6
  34. package/browser/cjs/CW5RuE4isKBlwHmQ.cjs +0 -6
  35. package/browser/cjs/CX82d7xySIGMF7yM.cjs +0 -6
  36. package/browser/cjs/CXik9BghKbVW93T0.cjs +0 -124
  37. package/browser/cjs/Ccv5NHm99sYZnKE6.cjs +0 -7
  38. package/browser/cjs/CeH0O9zPmIGKjuT9.cjs +0 -19
  39. package/browser/cjs/CeLG8vmgbEkx4oD1.cjs +0 -6
  40. package/browser/cjs/CvYl4W2vXnvHHHoI.cjs +0 -6
  41. package/browser/cjs/D2J4RLkySRIXFbsa.cjs +0 -6
  42. package/browser/cjs/D2bZuhwA7aCEA0It.cjs +0 -6
  43. package/browser/cjs/D3hV1-QRPKCq0om8.cjs +0 -6
  44. package/browser/cjs/D6WxWENDWFXA_esX.cjs +0 -6
  45. package/browser/cjs/DEiPHs81OFnGI_GL.cjs +0 -6
  46. package/browser/cjs/DHiQ_sK8f-95Ft4X.cjs +0 -12
  47. package/browser/cjs/DMpqQkdCfg2AjXjR.cjs +0 -6
  48. package/browser/cjs/DUjgS2e8jjyhZF41.cjs +0 -6
  49. package/browser/cjs/DWIR1gQMiYyoUVpN.cjs +0 -7
  50. package/browser/cjs/DawJBg8LyIArkwdU.cjs +0 -6
  51. package/browser/cjs/Dn5IBCKPuNI0ypyZ.cjs +0 -6
  52. package/browser/cjs/Dp6UwWmFehNr8oln.cjs +0 -6
  53. package/browser/cjs/Dr95ZpJD5KpADFgL.cjs +0 -6
  54. package/browser/cjs/IxfGyvVPF27qqDF3.cjs +0 -6
  55. package/browser/cjs/P7jR9JAKpf5me2pK.cjs +0 -6
  56. package/browser/cjs/QonkTPcCkOm4Mvas.cjs +0 -6
  57. package/browser/cjs/T4zy652TD1RHF35F.cjs +0 -6
  58. package/browser/cjs/d6ywgaNww4eYXcem.cjs +0 -1501
  59. package/browser/cjs/dQ_t_glP-41DsAl-.cjs +0 -6
  60. package/browser/cjs/iIOyWIrlq0JiZyZX.cjs +0 -6
  61. package/browser/cjs/jX_tynzFoHAGPZOz.cjs +0 -6
  62. package/browser/cjs/nlzloz3gqSXQwTl5.cjs +0 -13
  63. package/browser/cjs/xPUjEhL251Mb-kyD.cjs +0 -161
  64. package/browser/cjs/zreCxaXU5L2iHQ99.cjs +0 -6
  65. package/browser/esm/2vIB3gG-Ct-P7aHY.mjs +0 -24
  66. package/browser/esm/B1qmfUH_Mmjtp3JU.mjs +0 -56
  67. package/browser/esm/B4ABRWtE31zu8-wJ.mjs +0 -21
  68. package/browser/esm/B6c_mMwG96t6MlCE.mjs +0 -10
  69. package/browser/esm/B7ohU_quBXWjiBEw.mjs +0 -3934
  70. package/browser/esm/BGJaDv3Ih-M1lFCD.mjs +0 -10
  71. package/browser/esm/BJkeQi-0GTlyPsTT.mjs +0 -52369
  72. package/browser/esm/BR2yOGMlFrbNy1I_.mjs +0 -472
  73. package/browser/esm/BRzxK84abQUinUUx.mjs +0 -10
  74. package/browser/esm/BS_-p_4yMCoR9FTp.mjs +0 -10
  75. package/browser/esm/BTbBL2qySirAIMIH.mjs +0 -1346
  76. package/browser/esm/Be9tvHxvnxnHNRa4.mjs +0 -12
  77. package/browser/esm/BfiejFYnvgVrrJPI.mjs +0 -10
  78. package/browser/esm/Bj4d7nd4XMugBsBg.mjs +0 -39
  79. package/browser/esm/Bmfu8IUFzu9KyCkA.mjs +0 -10
  80. package/browser/esm/BqgjdQ15LFcefVOZ.mjs +0 -425
  81. package/browser/esm/BuX3I7e8lbon25vL.mjs +0 -1702
  82. package/browser/esm/Bz0TojPavQ5NTjyD.mjs +0 -633
  83. package/browser/esm/CA33PnXmPNl09v6w.mjs +0 -84
  84. package/browser/esm/CPchasanZLQiASse.mjs +0 -10
  85. package/browser/esm/CSDiL3gZro2_BYTj.mjs +0 -10
  86. package/browser/esm/CT_g1GDC8_vSGR0o.mjs +0 -48
  87. package/browser/esm/CVvfga1mKyvzrvCr.mjs +0 -20
  88. package/browser/esm/CXSiJ-t5xz78GMwK.mjs +0 -10
  89. package/browser/esm/CYrbG4T_bwbc4Un4.mjs +0 -390
  90. package/browser/esm/CeSDjV2b8w7KibJw.mjs +0 -1466
  91. package/browser/esm/Cjp7NabZ26PaBnIT.mjs +0 -46
  92. package/browser/esm/CmLCIveZbsUFrSOH.mjs +0 -1665
  93. package/browser/esm/CpDyqZXpstRo2buW.mjs +0 -10
  94. package/browser/esm/CpQM3xIeariuqfsN.mjs +0 -47
  95. package/browser/esm/D2L4EVLdv-YwKGoi.mjs +0 -2344
  96. package/browser/esm/D7bqIxhqlHgc3Fih.mjs +0 -10
  97. package/browser/esm/DJx6S7TOhQyWdjS5.mjs +0 -10
  98. package/browser/esm/DR85glElKOQxCdEw.mjs +0 -820
  99. package/browser/esm/DWnopZ6R26qNLVyV.mjs +0 -10
  100. package/browser/esm/DaoqFa2lhVoZvd16.mjs +0 -421
  101. package/browser/esm/DgxaqoqInkc26SCt.mjs +0 -13208
  102. package/browser/esm/Dkf0_o7D9GkUfOZy.mjs +0 -147
  103. package/browser/esm/DlASr70UXrIpKZQO.mjs +0 -2174
  104. package/browser/esm/DmXkRZFP-WnV2YT9.mjs +0 -10
  105. package/browser/esm/DsabS3TdXZB45_O2.mjs +0 -1575
  106. package/browser/esm/Dvo7tXJcgnIXR-H7.mjs +0 -5582
  107. package/browser/esm/JdOvTKCcf5acl7vA.mjs +0 -10
  108. package/browser/esm/KUyPDaQO4D8lwO7O.mjs +0 -21
  109. package/browser/esm/KWZAe-e6U7Po4gCx.mjs +0 -44
  110. package/browser/esm/Qjkn8L0WuEQToAqm.mjs +0 -41
  111. package/browser/esm/RvEM-YtFLw3OMG0V.mjs +0 -29
  112. package/browser/esm/S2TZ7C9tQtDNeeGo.mjs +0 -10
  113. package/browser/esm/VYFESZA0Jc8C13ZT.mjs +0 -10
  114. package/browser/esm/_sUvLBCLSPhV2gF6.mjs +0 -10
  115. package/browser/esm/dWGGn8a_Ez8kVjgZ.mjs +0 -10
  116. package/browser/esm/dwY5oHtoGa_ktt9_.mjs +0 -1365
  117. package/browser/esm/giu63J2gO2p8JJIf.mjs +0 -10
  118. package/browser/esm/glJJyP0v0nlhAzqM.mjs +0 -10
  119. package/browser/esm/q5jyS6wUD9X8N3dI.mjs +0 -3755
  120. package/browser/esm/xbsV0YR05atX96kb.mjs +0 -10
  121. package/cdn/assets/2vIB3gG-Ct-P7aHY.js +0 -24
  122. package/cdn/assets/9GNkN_zTAHpnP-uq.js +0 -1575
  123. package/cdn/assets/B6c_mMwG96t6MlCE.js +0 -10
  124. package/cdn/assets/BBGivbkBG9VS_rL9.js +0 -3756
  125. package/cdn/assets/BCfZ9L4sqA1AhATQ.js +0 -46
  126. package/cdn/assets/BF0szY6Cs6OTiu4J.js +0 -22
  127. package/cdn/assets/BFvB3zk5mbav2VDI.js +0 -52200
  128. package/cdn/assets/BGJaDv3Ih-M1lFCD.js +0 -10
  129. package/cdn/assets/BGQ19MuEoWb0IGOg.js +0 -425
  130. package/cdn/assets/BKAFXvz5L4pnwrYW.js +0 -41
  131. package/cdn/assets/BRzxK84abQUinUUx.js +0 -10
  132. package/cdn/assets/BS_-p_4yMCoR9FTp.js +0 -10
  133. package/cdn/assets/BTbBL2qySirAIMIH.js +0 -1346
  134. package/cdn/assets/Be9tvHxvnxnHNRa4.js +0 -12
  135. package/cdn/assets/BfiejFYnvgVrrJPI.js +0 -10
  136. package/cdn/assets/Bj6XCGohW0EagXDQ.js +0 -1702
  137. package/cdn/assets/Bmfu8IUFzu9KyCkA.js +0 -10
  138. package/cdn/assets/Bnpwlyv8i_gnevRF.js +0 -3934
  139. package/cdn/assets/BnrLDtUMM23rGXOR.js +0 -390
  140. package/cdn/assets/Bz0TojPavQ5NTjyD.js +0 -633
  141. package/cdn/assets/C-saEYaoPI4gaVAh.js +0 -820
  142. package/cdn/assets/CBG91FlGgFb_NSW3.js +0 -1466
  143. package/cdn/assets/CO9eLmNMi1heLPMx.js +0 -2177
  144. package/cdn/assets/CPchasanZLQiASse.js +0 -10
  145. package/cdn/assets/CSDiL3gZro2_BYTj.js +0 -10
  146. package/cdn/assets/CXSiJ-t5xz78GMwK.js +0 -10
  147. package/cdn/assets/Cc_7h2P328hlBcqK.js +0 -472
  148. package/cdn/assets/CmLCIveZbsUFrSOH.js +0 -1665
  149. package/cdn/assets/CpDyqZXpstRo2buW.js +0 -10
  150. package/cdn/assets/Cv2EzXYuphY8Hlz2.js +0 -23
  151. package/cdn/assets/Cz1EUITrDS2M-lu2.js +0 -2346
  152. package/cdn/assets/D7bqIxhqlHgc3Fih.js +0 -10
  153. package/cdn/assets/DDWoPuN8AcPJHNxL.js +0 -58
  154. package/cdn/assets/DJx6S7TOhQyWdjS5.js +0 -10
  155. package/cdn/assets/DU8_1yjWbaEkXcbL.js +0 -12
  156. package/cdn/assets/DWnopZ6R26qNLVyV.js +0 -10
  157. package/cdn/assets/DYE-hWYAUd_f6MX8.js +0 -46
  158. package/cdn/assets/DaoqFa2lhVoZvd16.js +0 -421
  159. package/cdn/assets/DfpCefkqWIezzC8Z.js +0 -49
  160. package/cdn/assets/DgxaqoqInkc26SCt.js +0 -13208
  161. package/cdn/assets/DmXkRZFP-WnV2YT9.js +0 -10
  162. package/cdn/assets/EN4PLLABu5llaV3T.js +0 -21
  163. package/cdn/assets/JdOvTKCcf5acl7vA.js +0 -10
  164. package/cdn/assets/KUyPDaQO4D8lwO7O.js +0 -21
  165. package/cdn/assets/LbFq2oCowUDgCX8L.js +0 -43
  166. package/cdn/assets/S2TZ7C9tQtDNeeGo.js +0 -10
  167. package/cdn/assets/SPvRfEBpgC5rbgPz.js +0 -29
  168. package/cdn/assets/SsQFeDXfmfXHyy1R.js +0 -5582
  169. package/cdn/assets/TP7wJaHcKRz3uH_W.js +0 -50
  170. package/cdn/assets/UhBzX4vQryCjy6ce.js +0 -84
  171. package/cdn/assets/VYFESZA0Jc8C13ZT.js +0 -10
  172. package/cdn/assets/_sUvLBCLSPhV2gF6.js +0 -10
  173. package/cdn/assets/dWGGn8a_Ez8kVjgZ.js +0 -10
  174. package/cdn/assets/dwY5oHtoGa_ktt9_.js +0 -1365
  175. package/cdn/assets/giu63J2gO2p8JJIf.js +0 -10
  176. package/cdn/assets/glJJyP0v0nlhAzqM.js +0 -10
  177. package/cdn/assets/nsmFGDjpeUcAO4is.js +0 -149
  178. package/cdn/assets/xbsV0YR05atX96kb.js +0 -10
@@ -1,161 +0,0 @@
1
- "use strict";/**
2
- * @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.4.20
3
- *
4
- * (C) 2025-present SheetXL Inc. & Michael T. Ford
5
- * License: The license can be found at https://www.sheetxl.com/license.
6
- */Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const xe=require("./C5TLXtw93fBnRGm7.cjs");function gi(e,t){for(var n=e.length,i=0;i<n;++i)if(t(e[i],i))return!0;return!1}function Ro(e,t){for(var n=e.length,i=0;i<n;++i)if(t(e[i],i))return e[i];return null}function Ii(e){var t=e;if(t===void 0){if(typeof navigator>"u"||!navigator)return"";t=navigator.userAgent||""}return t.toLowerCase()}function $r(e,t){try{return new RegExp(e,"g").exec(t)}catch{return null}}function Kr(e){return e.replace(/_/g,".")}function Hn(e,t){var n=null,i="-1";return gi(e,function(r){var o,a,s,c=$r("("+r.test+")((?:\\/|\\s|:)([0-9|\\.|_]+))?",t);return!(!c||r.brand||(n=r,i=c[3]||"-1",r.versionAlias?i=r.versionAlias:r.versionTest&&(o=r.versionTest.toLowerCase(),a=t,s=$r("("+o+")((?:\\/|\\s|:)([0-9|\\.|_]+))",a),i=(s?s[3]:"")||i),i=Kr(i),0))}),{preset:n,version:i}}function fr(e,t){var n={brand:"",version:"-1"};return gi(e,function(i){var r=Fo(t,i);return!!r&&(n.brand=i.id,n.version=i.versionAlias||r.version,n.version!=="-1")}),n}function Fo(e,t){return Ro(e,function(n){var i=n.brand;return $r(""+t.test,i.toLowerCase())})}var Ni=[{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"}],Yi=[{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}],zr=[{test:"applewebkit",id:"webkit",versionTest:"applewebkit|safari"}],Bo=[{test:"(?=(iphone|ipad))(?!(.*version))",id:"webview"},{test:"(?=(android|iphone|ipad))(?=.*(naver|daum|; wv))",id:"webview"},{test:"webview",id:"webview"}],Wi=[{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"}];function Xi(e){return!!Hn(Bo,e).preset}function Na(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return t.map(function(i){return i.split(" ").map(function(r){return r?""+e+r:""}).join(" ")}).join(" ")}function un(e,t){return function(n){n&&(e[t]=n)}}function Go(e,t,n){return function(i){i&&(e[t][n]=i)}}var vi="undefined",ko=typeof window!==vi,Ya=typeof document!==vi&&document,Wa=[{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"},{open:'\\"',close:'\\"'},{open:"\\'",close:"\\'"}],ee=1e-7,pr={cm:function(e){return 96*e/2.54},mm:function(e){return 96*e/254},in:function(e){return 96*e},pt:function(e){return 96*e/72},pc:function(e){return 96*e/6},"%":function(e,t){return e*t/100},vw:function(e,t){return t===void 0&&(t=window.innerWidth),e/100*t},vh:function(e,t){return t===void 0&&(t=window.innerHeight),e/100*t},vmax:function(e,t){return t===void 0&&(t=Math.max(window.innerWidth,window.innerHeight)),e/100*t},vmin:function(e,t){return t===void 0&&(t=Math.min(window.innerWidth,window.innerHeight)),e/100*t}};function Hi(e,t,n,i){return(e*i+t*n)/(n+i)}function mi(e){return typeof e===vi}function qe(e){return e&&typeof e=="object"}function ye(e){return Array.isArray(e)}function On(e){return typeof e=="string"}function Sr(e){return typeof e=="number"}function zo(e){return typeof e=="function"}function Ao(e,t,n,i,r){return Jr(e,t,n)?n:function(o,a,s,c,u){for(var f,p=function(h){var g=a[h].trim();if(g===o.close&&!Jr(o,a,h))return{value:h};var v=h,m=Be(u,function(y){return y.open===g});if(m&&(v=Ao(m,a,h,c,u)),v===-1)return f=h,"break";f=h=v},l=s;l<c;++l){var d=p(l);if(l=f,typeof d=="object")return d.value;if(d==="break")break}return-1}(e,t,n+1,i,r)}function Jr(e,t,n){if(!e.ignore)return null;var i=t.slice(Math.max(n-3,0),n+3).join("");return new RegExp(e.ignore).exec(i)}function bi(e,t){var n=On(t)?{separator:t}:t,i=n.separator,r=i===void 0?",":i,o=n.isSeparateFirst,a=n.isSeparateOnlyOpenClose,s=n.isSeparateOpenClose,c=s===void 0?a:s,u=n.openCloseCharacters,f=u===void 0?Wa:u,p=f.map(function(b){var S=b.open,R=b.close;return S===R?S:S+"|"+R}).join("|"),l=new RegExp("(\\s*"+r+"\\s*|"+p+"|\\s+)","g"),d=e.split(l).filter(function(b){return b&&b!=="undefined"}),h=d.length,g=[],v=[];function m(){return!!v.length&&(g.push(v.join("")),v=[],!0)}for(var y,x=function(b){var S,R,G=d[b].trim(),P=b,D=Be(f,function(F){return F.open===G}),_=Be(f,function(F){return F.close===G});if(D){if((P=Ao(D,d,b,h,f))!==-1&&c)return m()&&o?(y=b,"break"):(g.push(d.slice(b,P+1).join("")),b=P,o?(y=b,"break"):(y=b,"continue"))}else{if(_&&!Jr(_,d,b)){var T=function(){for(var F=0,B=0,O=arguments.length;B<O;B++)F+=arguments[B].length;var I=Array(F),A=0;for(B=0;B<O;B++)for(var W=arguments[B],j=0,N=W.length;j<N;j++,A++)I[A]=W[j];return I}(f);return T.splice(f.indexOf(_),1),{value:bi(e,{separator:r,isSeparateFirst:o,isSeparateOnlyOpenClose:a,isSeparateOpenClose:c,openCloseCharacters:T})}}if(S=G,!(((R=r)!==""&&R!=" "||S!==""&&S!=" ")&&S!==R||a))return m(),o?(y=b,"break"):(y=b,"continue")}P===-1&&(P=h-1),v.push(d.slice(b,P+1).join("")),y=b=P},E=0;E<h;++E){var M=x(E);if(E=y,typeof M=="object")return M.value;if(M==="break")break}return v.length&&g.push(v.join("")),g}function Qn(e){return bi(e,"")}function jn(e){return bi(e,",")}function Rr(e){var t=/^([^\d|e|\-|\+]*)((?:\d|\.|-|e-|e\+)+)(\S*)$/g.exec(e);if(!t)return{prefix:"",unit:"",value:NaN};var n=t[1],i=t[2];return{prefix:n,unit:t[3],value:parseFloat(i)}}function Mr(){return Date.now?Date.now():new Date().getTime()}function wn(e,t,n){n===void 0&&(n=-1);for(var i=e.length,r=0;r<i;++r)if(t(e[r],r,e))return r;return n}function Be(e,t,n){var i=wn(e,t);return i>-1?e[i]:n}var ji,Li,qi,Io=(ji=Mr(),(Li=ko&&(window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.msRequestAnimationFrame))?Li.bind(window):function(e){var t=Mr();return setTimeout(function(){e(t-ji)},1e3/60)}),Xa=(qi=ko&&(window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||window.msCancelAnimationFrame))?qi.bind(window):function(e){clearTimeout(e)};function tr(e){return Object.keys(e)}function Se(e,t){var n=Rr(e),i=n.value,r=n.unit;if(qe(t)){var o=t[r];if(o){if(zo(o))return o(i);if(pr[r])return pr[r](i,o)}}else if(r==="%")return i*t/100;return pr[r]?pr[r](i):i}function Qr(e,t,n){return Math.max(t,Math.min(e,n))}function Vi(e,t,n,i){return i===void 0&&(i=e[0]/e[1]),[[kt(t[0],ee),kt(t[0]/i,ee)],[kt(t[1]*i,ee),kt(t[1],ee)]].filter(function(r){return r.every(function(o,a){var s=t[a],c=kt(s,ee);return n?o<=s||o<=c:o>=s||o>=c})})[0]||e}function ti(e){for(var t=e.length,n=0,i=t-1;i>=0;--i)n+=e[i];return t?n/t:0}function Fe(e,t){var n=t[0]-e[0],i=t[1]-e[1],r=Math.atan2(i,n);return r>=0?r:r+2*Math.PI}function Ui(e){var t,n=(t=e,[0,1].map(function(o){return ti(t.map(function(a){return a[o]}))})),i=Fe(n,e[0]),r=Fe(n,e[1]);return i<r&&r-i<Math.PI||i>r&&r-i<-Math.PI?1:-1}function Ln(e,t){return Math.sqrt(Math.pow((t?t[0]:0)-e[0],2)+Math.pow((t?t[1]:0)-e[1],2))}function kt(e,t){if(!t)return e;var n=1/t;return Math.round(e/t)/n}function Zi(e,t){return e.forEach(function(n,i){e[i]=kt(e[i],t)}),e}function We(e,t){return e.classList?e.classList.contains(t):!!e.className.match(new RegExp("(\\s|^)"+t+"(\\s|$)"))}function No(e,t){e.classList?e.classList.add(t):e.className+=" "+t}function Yo(e,t){if(e.classList)e.classList.remove(t);else{var n=new RegExp("(\\s|^)"+t+"(\\s|$)");e.className=e.className.replace(n," ")}}function ge(e,t,n,i){e.addEventListener(t,n,i)}function fe(e,t,n,i){e.removeEventListener(t,n,i)}function xi(e){return e?.ownerDocument||Ya}function yi(e){return xi(e).documentElement}function en(e){return xi(e).body}function Qe(e){var t;return((t=e?.ownerDocument)===null||t===void 0?void 0:t.defaultView)||window}function Wo(e){return e&&"postMessage"in e&&"blur"in e&&"self"in e}function Ei(e){return qe(e)&&e.nodeName&&e.nodeType&&"ownerDocument"in e}function Ha(e,t,n,i,r,o){for(var a=0;a<r;++a){var s=n+a*r,c=i+a*r;e[s]+=e[c]*o,t[s]+=t[c]*o}}function ja(e,t,n,i,r){for(var o=0;o<r;++o){var a=n+o*r,s=i+o*r,c=e[a],u=t[a];e[a]=e[s],e[s]=c,t[a]=t[s],t[s]=u}}function La(e,t,n,i,r){for(var o=0;o<i;++o){var a=n+o*i;e[a]/=r,t[a]/=r}}function cn(e,t){t===void 0&&(t=Math.sqrt(e.length));for(var n=e.slice(),i=Wt(t),r=0;r<t;++r){var o=t*r+r;if(!kt(n[o],ee)){for(var a=r+1;a<t;++a)if(n[t*r+a]){ja(n,i,r,a,t);break}}if(!kt(n[o],ee))return[];for(La(n,i,r,t,n[o]),a=0;a<t;++a){var s=a,c=n[a+r*t];kt(c,ee)&&r!==a&&Ha(n,i,s,r,t,-c)}}return i}function or(e,t){for(var n=e.slice(),i=e.length;i<t-1;++i)n[i]=0;return n[t-1]=1,n}function ln(e,t,n){if(t===void 0&&(t=Math.sqrt(e.length)),t===n)return e;for(var i=Wt(n),r=Math.min(t,n),o=0;o<r-1;++o){for(var a=0;a<r-1;++a)i[o*n+a]=e[o*t+a];i[(o+1)*n-1]=e[(o+1)*t-1],i[(n-1)*n+o]=e[(t-1)*t+o]}return i[n*n-1]=e[t*t-1],i}function wr(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var i=Wt(e);return t.forEach(function(r){i=ie(i,r,e)}),i}function ie(e,t,n){n===void 0&&(n=Math.sqrt(e.length));var i=[],r=e.length/n,o=t.length/r;if(!r)return t;if(!o)return e;for(var a=0;a<n;++a)for(var s=0;s<o;++s){i[s*n+a]=0;for(var c=0;c<r;++c)i[s*n+a]+=e[c*n+a]*t[s*r+c]}return i}function Ut(e,t){for(var n=Math.min(e.length,t.length),i=e.slice(),r=0;r<n;++r)i[r]=i[r]+t[r];return i}function ct(e,t){for(var n=Math.min(e.length,t.length),i=e.slice(),r=0;r<n;++r)i[r]=i[r]-t[r];return i}function qa(e,t){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}function Xo(e,t){return t===void 0&&(t=e.length===9),t?[e[0],e[1],e[3],e[4],e[6],e[7]]:e}function ze(e,t,n){n===void 0&&(n=t.length);var i=ie(e,t,n),r=i[n-1];return i.map(function(o){return o/r})}function Va(e,t){return ie(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)}function Ua(e,t){return ie(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)}function Za(e,t){return ie(e,Fr(t,4))}function dr(e,t){var n=t[0],i=n===void 0?1:n,r=t[1],o=r===void 0?1:r,a=t[2];return ie(e,[i,0,0,0,0,o,0,0,0,0,a===void 0?1:a,0,0,0,0,1],4)}function Ar(e,t){var n=t[0],i=n===void 0?0:n,r=t[1],o=r===void 0?0:r,a=t[2];return ie(e,[1,0,0,0,0,1,0,0,0,0,1,0,i,o,a===void 0?0:a,1],4)}function $i(e,t){return ie(e,t,4)}function Fr(e,t){var n=Math.cos(e),i=Math.sin(e),r=Wt(t);return r[0]=n,r[1]=i,r[t]=-i,r[t+1]=n,r}function Wt(e){for(var t=e*e,n=[],i=0;i<t;++i)n[i]=i%(e+1)?0:1;return n}function Ho(e,t){for(var n=Wt(t),i=Math.min(e.length,t-1),r=0;r<i;++r)n[(t+1)*r]=e[r];return n}function fn(e,t){for(var n=Wt(t),i=Math.min(e.length,t-1),r=0;r<i;++r)n[t*(t-1)+r]=e[r];return n}function jo(e,t,n,i,r,o,a,s){var c=e[0],u=e[1],f=t[0],p=t[1],l=n[0],d=n[1],h=i[0],g=i[1],v=r[0],m=r[1],y=o[0],x=o[1],E=a[0],M=a[1],b=s[0],S=s[1],R=cn([c,0,f,0,l,0,h,0,u,0,p,0,d,0,g,0,1,0,1,0,1,0,1,0,0,c,0,f,0,l,0,h,0,u,0,p,0,d,0,g,0,1,0,1,0,1,0,1,-v*c,-m*c,-y*f,-x*f,-E*l,-M*l,-b*h,-S*h,-v*u,-m*u,-y*p,-x*p,-E*d,-M*d,-b*g,-S*g],8);if(!R.length)return[];var G=ie(R,[v,m,y,x,E,M,b,S],8);return G[8]=1,ln(function(P,D){D===void 0&&(D=Math.sqrt(P.length));for(var _=[],T=0;T<D;++T)for(var F=0;F<D;++F)_[F*D+T]=P[D*T+F];return _}(G),3,4)}var qn=function(){return qn=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},qn.apply(this,arguments)};function Si(e,t){return t===void 0&&(t=0),gn(Cn(e,t))}function gn(e){var t=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];return e.forEach(function(n){var i=n.matrixFunction,r=n.functionValue;i&&(t=i(t,r))}),t}function Cn(e,t){return t===void 0&&(t=0),(ye(e)?e:Qn(e)).map(function(n){var i,r=!(i=/([^(]*)\(([\s\S]*)\)([\s\S]*)/g.exec(n))||i.length<4?{}:{prefix:i[1],value:i[2],suffix:i[3]},o=r.prefix,a=r.value,s=null,c=o,u="";if(o==="translate"||o==="translateX"||o==="translate3d"){var f=qe(t)?qn(qn({},t),{"o%":t["%"]}):{"%":t,"o%":t},p=jn(a).map(function(G,P){return f["%"]=P===0&&"x%"in f?t["x%"]:P===1&&"y%"in f?t["y%"]:t["o%"],Se(G,f)}),l=p[0],d=p[1],h=d===void 0?0:d,g=p[2];s=Ar,u=[l,h,g===void 0?0:g]}else if(o==="translateY")s=Ar,u=[0,h=Se(a,qe(t)?qn({"%":t["y%"]},t):{"%":t}),0];else if(o==="translateZ")s=Ar,u=[0,0,parseFloat(a)];else if(o==="scale"||o==="scale3d"){var v=jn(a).map(function(G){return parseFloat(G)}),m=v[0],y=v[1],x=y===void 0?m:y,E=v[2];s=dr,u=[m,x,E===void 0?1:E]}else if(o==="scaleX")s=dr,u=[m=parseFloat(a),1,1];else if(o==="scaleY")s=dr,u=[1,x=parseFloat(a),1];else if(o==="scaleZ")s=dr,u=[1,1,parseFloat(a)];else if(o==="rotate"||o==="rotateZ"||o==="rotateX"||o==="rotateY"){var M=Rr(a),b=M.unit,S=M.value;o==="rotate"||o==="rotateZ"?(c="rotateZ",s=Za):o==="rotateX"?s=Va:o==="rotateY"&&(s=Ua),u=b==="rad"?S:S*Math.PI/180}else if(o==="matrix3d")s=$i,u=jn(a).map(function(G){return parseFloat(G)});else if(o==="matrix"){var R=jn(a).map(function(G){return parseFloat(G)});s=$i,u=[R[0],R[1],0,0,R[2],R[3],0,0,0,0,1,0,R[4],R[5],0,1]}else c="";return{name:o,functionName:c,value:a,matrixFunction:s,functionValue:u}})}var $a=function(){function e(){this.keys=[],this.values=[]}var t=e.prototype;return t.get=function(n){return this.values[this.keys.indexOf(n)]},t.set=function(n,i){var r=this.keys,o=this.values,a=r.indexOf(n),s=a===-1?r.length:a;r[s]=n,o[s]=i},e}(),Ka=function(){function e(){this.object={}}var t=e.prototype;return t.get=function(n){return this.object[n]},t.set=function(n,i){this.object[n]=i},e}(),Ja=typeof Map=="function",Qa=function(){function e(){}var t=e.prototype;return t.connect=function(n,i){this.prev=n,this.next=i,n&&(n.next=this),i&&(i.prev=this)},t.disconnect=function(){var n=this.prev,i=this.next;n&&(n.next=i),i&&(i.prev=n)},t.getIndex=function(){for(var n=this,i=-1;n;)n=n.prev,++i;return i},e}(),ts=function(){function e(n,i,r,o,a,s,c,u){this.prevList=n,this.list=i,this.added=r,this.removed=o,this.changed=a,this.maintained=s,this.changedBeforeAdded=c,this.fixed=u}var t=e.prototype;return Object.defineProperty(t,"ordered",{get:function(){return this.cacheOrdered||this.caculateOrdered(),this.cacheOrdered},enumerable:!0,configurable:!0}),Object.defineProperty(t,"pureChanged",{get:function(){return this.cachePureChanged||this.caculateOrdered(),this.cachePureChanged},enumerable:!0,configurable:!0}),t.caculateOrdered=function(){var n,i,r,o,a=(n=this.changedBeforeAdded,i=this.fixed,r=[],o=[],n.forEach(function(u){var f=u[0],p=u[1],l=new Qa;r[f]=l,o[p]=l}),r.forEach(function(u,f){u.connect(r[f-1])}),n.filter(function(u,f){return!i[f]}).map(function(u,f){var p=u[0],l=u[1];if(p===l)return[0,0];var d=r[p],h=o[l-1],g=d.getIndex();return d.disconnect(),h?d.connect(h,h.next):d.connect(void 0,r[0]),[g,d.getIndex()]})),s=this.changed,c=[];this.cacheOrdered=a.filter(function(u,f){var p=u[0],l=u[1],d=s[f],h=d[0],g=d[1];if(p!==l)return c.push([h,g]),!0}),this.cachePureChanged=c},e}();function Lo(e,t,n){var i=Ja?Map:n?Ka:$a,r=n||function(y){return y},o=[],a=[],s=[],c=e.map(r),u=t.map(r),f=new i,p=new i,l=[],d=[],h={},g=[],v=0,m=0;return c.forEach(function(y,x){f.set(y,x)}),u.forEach(function(y,x){p.set(y,x)}),c.forEach(function(y,x){var E=p.get(y);E===void 0?(++m,a.push(x)):h[E]=m}),u.forEach(function(y,x){var E=f.get(y);E===void 0?(o.push(x),++v):(s.push([E,x]),m=h[x]||0,l.push([E-m,x-v]),d.push(x===E),E!==x&&g.push([E,x]))}),a.reverse(),new ts(e,t,o,a,g,s,l,d)}var Ki,es=function(){function e(t,n){t===void 0&&(t=[]),this.findKeyCallback=n,this.list=[].slice.call(t)}return e.prototype.update=function(t){var n=[].slice.call(t),i=Lo(this.list,n,this.findKeyCallback);return this.list=n,i},e}(),qo=function(e,t){return(qo=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var r in i)i.hasOwnProperty(r)&&(n[r]=i[r])})(e,t)},ns=typeof Map=="function"?void 0:(Ki=0,function(e){return e.__DIFF_KEY__||(e.__DIFF_KEY__=++Ki)}),Vo=function(e){function t(n){return n===void 0&&(n=[]),e.call(this,n,ns)||this}return function(n,i){function r(){this.constructor=n}qo(n,i),n.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}(t,e),t}(es),ei=function(){return ei=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},ei.apply(this,arguments)},Uo=function(){function e(){this._events={}}var t=e.prototype;return t.on=function(n,i){if(qe(n))for(var r in n)this.on(r,n[r]);else this._addEvent(n,i,{});return this},t.off=function(n,i){if(n)if(qe(n))for(var r in n)this.off(r);else if(i){var o=this._events[n];if(o){var a=wn(o,function(s){return s.listener===i});a>-1&&o.splice(a,1)}}else this._events[n]=[];else this._events={};return this},t.once=function(n,i){var r=this;return i&&this._addEvent(n,i,{once:!0}),new Promise(function(o){r._addEvent(n,o,{once:!0})})},t.emit=function(n,i){var r=this;i===void 0&&(i={});var o=this._events[n];if(!n||!o)return!0;var a=!1;return i.eventType=n,i.stop=function(){a=!0},i.currentTarget=this,function(){for(var s=0,c=0,u=arguments.length;c<u;c++)s+=arguments[c].length;var f=Array(s),p=0;for(c=0;c<u;c++)for(var l=arguments[c],d=0,h=l.length;d<h;d++,p++)f[p]=l[d];return f}(o).forEach(function(s){s.listener(i),s.once&&r.off(n,s.listener)}),!a},t.trigger=function(n,i){return i===void 0&&(i={}),this.emit(n,i)},t._addEvent=function(n,i,r){var o=this._events;o[n]=o[n]||[],o[n].push(ei({listener:i},r))},e}();function Ee(e){return kt(e,ee)}function Ji(e){return e.length<3?0:Math.abs(function(t){for(var n=0,i=t.length-1;i>=0;--i)n+=t[i];return n}(e.map(function(t,n){var i=e[n+1]||e[0];return t[0]*i[1]-i[0]*t[1]})))/2}function Qi(e,t){var n=t.width,i=t.height,r=t.left,o=t.top,a=yn(e),s=a.minX,c=a.minY,u=a.maxX,f=a.maxY,p=n/(u-s),l=i/(f-c);return e.map(function(d){return[r+(d[0]-s)*p,o+(d[1]-c)*l]})}function yn(e){var t=e.map(function(i){return i[0]}),n=e.map(function(i){return i[1]});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)}}function Ir(e,t,n){var i=e[0],r=e[1],o=yn(t),a=o.minX,s=o.maxX,c=[[a,r],[s,r]],u=Cr(c[0],c[1]),f=ni(t),p=[];if(f.forEach(function(h){var g,v=Cr(h[0],h[1]),m=h[0];g=v,u.every(function(y,x){return Ee(y-g[x])===0})?p.push({pos:e,line:h,type:"line"}):Zo(Di(u,v),[c,h]).forEach(function(y){h.some(function(x){return M=y,!Ee((E=x)[0]-M[0])&&!Ee(E[1]-M[1]);var E,M})?p.push({pos:y,line:h,type:"point"}):Ee(m[1]-r)!==0&&p.push({pos:y,line:h,type:"intersection"})})}),Be(p,function(h){return h[0]===i}))return!0;var l=0,d={};return p.forEach(function(h){var g=h.pos,v=h.type,m=h.line;if(!(g[0]>i))if(v==="intersection")++l;else{if(v==="line")return;if(v==="point"){var y=Be(m,function(M){return M[1]!==r}),x=d[g[0]],E=y[1]>r?1:-1;x?x!==E&&++l:d[g[0]]=E}}}),l%2==1}function Cr(e,t){var n=e[0],i=e[1],r=t[0]-n,o=t[1]-i;Math.abs(r)<ee&&(r=0),Math.abs(o)<ee&&(o=0);var a=0,s=0,c=0;return r?o?(s=1,c=-(a=-o/r)*n-i):(s=1,c=-i):o&&(a=-1,c=n),[a,s,c]}function Di(e,t){var n=e[0],i=e[1],r=e[2],o=t[0],a=t[1],s=t[2],c=n===0&&o===0,u=i===0&&a===0,f=[];if(c&&u)return[];if(c){var p=-r/i;return p!==-s/a?[]:[[-1/0,p],[1/0,p]]}if(u){var l=-r/n;return l!==-s/o?[]:[[l,-1/0],[l,1/0]]}if(n===0)f=[[d=-(a*(h=-r/i)+s)/o,h]];else if(o===0)f=[[d=-(i*(h=-s/a)+r)/n,h]];else if(i===0)f=[[d=-r/n,h=-(o*d+s)/a]];else if(a===0)f=[[d=-s/o,h=-(n*d+r)/i]];else{var d,h;f=[[d=(i*s-a*r)/(a*n-i*o),h=-(n*d+r)/i]]}return f.map(function(g){return[g[0],g[1]]})}function Zo(e,t){var n=t.map(function(p){return[0,1].map(function(l){return[Math.min(p[0][l],p[1][l]),Math.max(p[0][l],p[1][l])]})}),i=[];if(e.length===2){var r=e[0],o=r[0],a=r[1];if(Ee(o-e[1][0])){if(!Ee(a-e[1][1])){var s=Math.max.apply(Math,n.map(function(p){return p[0][0]})),c=Math.min.apply(Math,n.map(function(p){return p[0][1]}));if(Ee(s-c)>0)return[];i=[[s,a],[c,a]]}}else{var u=Math.max.apply(Math,n.map(function(p){return p[1][0]})),f=Math.min.apply(Math,n.map(function(p){return p[1][1]}));if(Ee(u-f)>0)return[];i=[[o,u],[o,f]]}}return i.length||(i=e.filter(function(p){var l=p[0],d=p[1];return n.every(function(h){return 0<=Ee(l-h[0][0])&&0<=Ee(h[0][1]-l)&&0<=Ee(d-h[1][0])&&0<=Ee(h[1][1]-d)})})),i.map(function(p){return[Ee(p[0]),Ee(p[1])]})}function ni(e){return function(){for(var t=0,n=0,i=arguments.length;n<i;n++)t+=arguments[n].length;var r=Array(t),o=0;for(n=0;n<i;n++)for(var a=arguments[n],s=0,c=a.length;s<c;s++,o++)r[o]=a[s];return r}(e.slice(1),[e[0]]).map(function(t,n){return[e[n],t]})}var $o=function(e,t){return($o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var r in i)i.hasOwnProperty(r)&&(n[r]=i[r])})(e,t)},te=function(){return te=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},te.apply(this,arguments)};function Nr(e){return 180*(t=[e[0].clientX,e[0].clientY],i=(n=[e[1].clientX,e[1].clientY])[0]-t[0],r=n[1]-t[1],((o=Math.atan2(r,i))>=0?o:o+2*Math.PI)/Math.PI);var t,n,i,r,o}function hr(e){return e?e.touches?function(t){for(var n=Math.min(t.length,2),i=[],r=0;r<n;++r)i.push(eo(t[r]));return i}(e.touches):[eo(e)]:[]}function to(e,t,n){var i=n.length,r=Vn(e,i),o=r.clientX,a=r.clientY,s=r.originalClientX,c=r.originalClientY,u=Vn(t,i),f=u.clientX,p=u.clientY,l=Vn(n,i);return{clientX:s,clientY:c,deltaX:o-f,deltaY:a-p,distX:o-l.clientX,distY:a-l.clientY}}function Yr(e){return Math.sqrt(Math.pow(e[0].clientX-e[1].clientX,2)+Math.pow(e[0].clientY-e[1].clientY,2))}function eo(e){return{clientX:e.clientX,clientY:e.clientY}}function Vn(e,t){t===void 0&&(t=e.length);for(var n={clientX:0,clientY:0,originalClientX:0,originalClientY:0},i=Math.min(e.length,t),r=0;r<i;++r){var o=e[r];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}return t?{clientX:n.clientX/t,clientY:n.clientY/t,originalClientX:n.originalClientX/t,originalClientY:n.originalClientY/t}:n}var Wr=function(){function e(t){this.prevClients=[],this.startClients=[],this.movement=0,this.length=0,this.startClients=t,this.prevClients=t,this.length=t.length}return e.prototype.getAngle=function(t){return t===void 0&&(t=this.prevClients),Nr(t)},e.prototype.getRotation=function(t){return t===void 0&&(t=this.prevClients),Nr(t)-Nr(this.startClients)},e.prototype.getPosition=function(t,n){t===void 0&&(t=this.prevClients);var i=to(t||this.prevClients,this.prevClients,this.startClients),r=i.deltaX,o=i.deltaY;return this.movement+=Math.sqrt(r*r+o*o),this.prevClients=t,i},e.prototype.getPositions=function(t){t===void 0&&(t=this.prevClients);for(var n=this.prevClients,i=this.startClients,r=Math.min(this.length,n.length),o=[],a=0;a<r;++a)o[a]=to([t[a]],[n[a]],[i[a]]);return o},e.prototype.getMovement=function(t){var n=this.movement;if(!t)return n;var i=Vn(t,this.length),r=Vn(this.prevClients,this.length),o=i.clientX-r.clientX,a=i.clientY-r.clientY;return Math.sqrt(o*o+a*a)+n},e.prototype.getDistance=function(t){return t===void 0&&(t=this.prevClients),Yr(t)},e.prototype.getScale=function(t){return t===void 0&&(t=this.prevClients),Yr(t)/Yr(this.startClients)},e.prototype.move=function(t,n){this.startClients.forEach(function(i){i.clientX-=t,i.clientY-=n}),this.prevClients.forEach(function(i){i.clientX-=t,i.clientY-=n})},e}(),no=["textarea","input"],rs=function(e){function t(n,i){i===void 0&&(i={});var r=e.call(this)||this;r.options={},r.flag=!1,r.pinchFlag=!1,r.data={},r.isDrag=!1,r.isPinch=!1,r.clientStores=[],r.targets=[],r.prevTime=0,r.doubleFlag=!1,r._useMouse=!1,r._useTouch=!1,r._useDrag=!1,r._dragFlag=!1,r._isTrusted=!1,r._isMouseEvent=!1,r._isSecondaryButton=!1,r._preventMouseEvent=!1,r._prevInputEvent=null,r._isDragAPI=!1,r._isIdle=!0,r._preventMouseEventId=0,r._window=window,r.onDragStart=function(l,d){if(d===void 0&&(d=!0),r.flag||l.cancelable!==!1){var h=l.type.indexOf("drag")>=-1;if(!r.flag||!h){r._isDragAPI=!0;var g=r.options,v=g.container,m=g.pinchOutside,y=g.preventWheelClick,x=g.preventRightClick,E=g.preventDefault,M=g.checkInput,b=g.dragFocusedInput,S=g.preventClickEventOnDragStart,R=g.preventClickEventOnDrag,G=g.preventClickEventByCondition,P=r._useTouch,D=!r.flag;if(r._isSecondaryButton=l.which===3||l.button===2,y&&(l.which===2||l.button===1)||x&&(l.which===3||l.button===2))return r.stop(),!1;if(D){var _=r._window.document.activeElement,T=l.target;if(T){var F=T.tagName.toLowerCase(),B=no.indexOf(F)>-1,O=T.isContentEditable;if(B||O){if(M||!b&&_===T)return!1;if(_&&(_===T||O&&_.isContentEditable&&_.contains(T))){if(!b)return!1;T.blur()}}else if((E||l.type==="touchstart")&&_){var I=_.tagName.toLowerCase();(_.isContentEditable||no.indexOf(I)>-1)&&_.blur()}(S||R||G)&&ge(r._window,"click",r._onClick,!0)}r.clientStores=[new Wr(hr(l))],r._isIdle=!1,r.flag=!0,r.isDrag=!1,r._isTrusted=d,r._dragFlag=!0,r._prevInputEvent=l,r.data={},r.doubleFlag=Mr()-r.prevTime<200,r._isMouseEvent=(j=l)&&(j.type.indexOf("mouse")>-1||"button"in j),!r._isMouseEvent&&r._preventMouseEvent&&r._allowMouseEvent(),(r._preventMouseEvent||r.emit("dragStart",te(te({data:r.data,datas:r.data,inputEvent:l,isMouseEvent:r._isMouseEvent,isSecondaryButton:r._isSecondaryButton,isTrusted:d,isDouble:r.doubleFlag},r.getCurrentStore().getPosition()),{preventDefault:function(){l.preventDefault()},preventDrag:function(){r._dragFlag=!1}})))===!1&&r.stop(),r._isMouseEvent&&r.flag&&E&&l.preventDefault()}if(!r.flag)return!1;var A=0;if(D?(r._attchDragEvent(),P&&m&&(A=setTimeout(function(){ge(v,"touchstart",r.onDragStart,{passive:!1})}))):P&&m&&fe(v,"touchstart",r.onDragStart),r.flag&&(W=l).touches&&W.touches.length>=2){if(clearTimeout(A),D&&l.touches.length!==l.changedTouches.length)return;r.pinchFlag||r.onPinchStart(l)}}}var W,j},r.onDrag=function(l,d){if(r.flag){var h=r.options.preventDefault;!r._isMouseEvent&&h&&l.preventDefault(),r._prevInputEvent=l;var g=hr(l),v=r.moveClients(g,l,!1);if(r._dragFlag){if((r.pinchFlag||v.deltaX||v.deltaY)&&(r._preventMouseEvent||r.emit("drag",te(te({},v),{isScroll:!!d,inputEvent:l})))===!1)return void r.stop();r.pinchFlag&&r.onPinch(l,g)}r.getCurrentStore().getPosition(g,!0)}},r.onDragEnd=function(l){if(r.flag){var d=r.options,h=d.pinchOutside,g=d.container,v=d.preventClickEventOnDrag,m=d.preventClickEventOnDragStart,y=d.preventClickEventByCondition,x=r.isDrag;(v||m||y)&&requestAnimationFrame(function(){r._allowClickEvent()}),y||m||!v||x||r._allowClickEvent(),r._useTouch&&h&&fe(g,"touchstart",r.onDragStart),r.pinchFlag&&r.onPinchEnd(l);var E=l?.touches?hr(l):[];E.length!==0&&r.options.keepDragging?r._addStore(new Wr(E)):r.flag=!1;var M=r._getPosition(),b=Mr(),S=!x&&r.doubleFlag;r._prevInputEvent=null,r.prevTime=x||S?0:b,r.flag||(r._dettachDragEvent(),r._preventMouseEvent||r.emit("dragEnd",te({data:r.data,datas:r.data,isDouble:S,isDrag:x,isClick:!x,isMouseEvent:r._isMouseEvent,isSecondaryButton:r._isSecondaryButton,inputEvent:l,isTrusted:r._isTrusted},M)),r.clientStores=[],r._isMouseEvent||(r._preventMouseEvent=!0,clearTimeout(r._preventMouseEventId),r._preventMouseEventId=setTimeout(function(){r._preventMouseEvent=!1},200)),r._isIdle=!0)}},r.onBlur=function(){r.onDragEnd()},r._allowClickEvent=function(){fe(r._window,"click",r._onClick,!0)},r._onClick=function(l){r._allowClickEvent(),r._allowMouseEvent();var d=r.options.preventClickEventByCondition;d?.(l)||(l.stopPropagation(),l.preventDefault())},r._onContextMenu=function(l){r.options.preventRightClick?r.onDragEnd(l):l.preventDefault()},r._passCallback=function(){};var o=[].concat(n),a=o[0];r._window=Wo(a)?a:Qe(a),r.options=te({checkInput:!1,container:a&&!("document"in a)?Qe(a):a,preventRightClick:!0,preventWheelClick:!0,preventClickEventOnDragStart:!1,preventClickEventOnDrag:!1,preventClickEventByCondition:null,preventDefault:!0,checkWindowBlur:!1,keepDragging:!1,pinchThreshold:0,events:["touch","mouse"]},i);var s=r.options,c=s.container,u=s.events,f=s.checkWindowBlur;if(r._useDrag=u.indexOf("drag")>-1,r._useTouch=u.indexOf("touch")>-1,r._useMouse=u.indexOf("mouse")>-1,r.targets=o,r._useDrag&&o.forEach(function(l){ge(l,"dragstart",r.onDragStart)}),r._useMouse&&(o.forEach(function(l){ge(l,"mousedown",r.onDragStart),ge(l,"mousemove",r._passCallback)}),ge(c,"contextmenu",r._onContextMenu)),f&&ge(Qe(),"blur",r.onBlur),r._useTouch){var p={passive:!1};o.forEach(function(l){ge(l,"touchstart",r.onDragStart,p),ge(l,"touchmove",r._passCallback,p)})}return r}return function(n,i){function r(){this.constructor=n}$o(n,i),n.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}(t,e),t.prototype.stop=function(){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},t.prototype.getMovement=function(n){return this.getCurrentStore().getMovement(n)+this.clientStores.slice(1).reduce(function(i,r){return i+r.movement},0)},t.prototype.isDragging=function(){return this.isDrag},t.prototype.isIdle=function(){return this._isIdle},t.prototype.isFlag=function(){return this.flag},t.prototype.isPinchFlag=function(){return this.pinchFlag},t.prototype.isDoubleFlag=function(){return this.doubleFlag},t.prototype.isPinching=function(){return this.isPinch},t.prototype.scrollBy=function(n,i,r,o){o===void 0&&(o=!0),this.flag&&(this.clientStores[0].move(n,i),o&&this.onDrag(r,!0))},t.prototype.move=function(n,i){var r=n[0],o=n[1],a=this.getCurrentStore().prevClients;return this.moveClients(a.map(function(s){var c=s.clientX,u=s.clientY;return{clientX:c+r,clientY:u+o,originalClientX:c,originalClientY:u}}),i,!0)},t.prototype.triggerDragStart=function(n){this.onDragStart(n,!1)},t.prototype.setEventData=function(n){var i=this.data;for(var r in n)i[r]=n[r];return this},t.prototype.setEventDatas=function(n){return this.setEventData(n)},t.prototype.getCurrentEvent=function(n){return n===void 0&&(n=this._prevInputEvent),te(te({data:this.data,datas:this.data},this._getPosition()),{movement:this.getMovement(),isDrag:this.isDrag,isPinch:this.isPinch,isScroll:!1,inputEvent:n})},t.prototype.getEventData=function(){return this.data},t.prototype.getEventDatas=function(){return this.data},t.prototype.unset=function(){var n=this,i=this.targets,r=this.options.container;this.off(),fe(this._window,"blur",this.onBlur),this._useDrag&&i.forEach(function(o){fe(o,"dragstart",n.onDragStart)}),this._useMouse&&(i.forEach(function(o){fe(o,"mousedown",n.onDragStart)}),fe(r,"contextmenu",this._onContextMenu)),this._useTouch&&(i.forEach(function(o){fe(o,"touchstart",n.onDragStart)}),fe(r,"touchstart",this.onDragStart)),this._prevInputEvent=null,this._allowClickEvent(),this._dettachDragEvent()},t.prototype.onPinchStart=function(n){var i=this,r=this.options.pinchThreshold;if(!(this.isDrag&&this.getMovement()>r)){var o=new Wr(hr(n));this.pinchFlag=!0,this._addStore(o),this.emit("pinchStart",te(te({data:this.data,datas:this.data,angle:o.getAngle(),touches:this.getCurrentStore().getPositions()},o.getPosition()),{inputEvent:n,isTrusted:this._isTrusted,preventDefault:function(){n.preventDefault()},preventDrag:function(){i._dragFlag=!1}}))===!1&&(this.pinchFlag=!1)}},t.prototype.onPinch=function(n,i){if(this.flag&&this.pinchFlag&&!(i.length<2)){var r=this.getCurrentStore();this.isPinch=!0,this.emit("pinch",te(te({data:this.data,datas:this.data,movement:this.getMovement(i),angle:r.getAngle(i),rotation:r.getRotation(i),touches:r.getPositions(i),scale:r.getScale(i),distance:r.getDistance(i)},r.getPosition(i)),{inputEvent:n,isTrusted:this._isTrusted}))}},t.prototype.onPinchEnd=function(n){if(this.pinchFlag){var i=this.isPinch;this.isPinch=!1,this.pinchFlag=!1;var r=this.getCurrentStore();this.emit("pinchEnd",te(te({data:this.data,datas:this.data,isPinch:i,touches:r.getPositions()},r.getPosition()),{inputEvent:n}))}},t.prototype.getCurrentStore=function(){return this.clientStores[0]},t.prototype.moveClients=function(n,i,r){var o=this._getPosition(n,r),a=this.isDrag;(o.deltaX||o.deltaY)&&(this.isDrag=!0);var s=!1;return!a&&this.isDrag&&(s=!0),te(te({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:i,isTrusted:this._isTrusted,isFirstDrag:s})},t.prototype._addStore=function(n){this.clientStores.splice(0,0,n)},t.prototype._getPosition=function(n,i){var r=this.getCurrentStore().getPosition(n,i),o=this.clientStores.slice(1).reduce(function(c,u){var f=u.getPosition();return c.distX+=f.distX,c.distY+=f.distY,c},r),a=o.distX,s=o.distY;return te(te({},r),{distX:a,distY:s})},t.prototype._attchDragEvent=function(){var n=this._window,i=this.options.container,r={passive:!1};this._isDragAPI&&(ge(i,"dragover",this.onDrag,r),ge(n,"dragend",this.onDragEnd)),this._useMouse&&(ge(i,"mousemove",this.onDrag),ge(n,"mouseup",this.onDragEnd)),this._useTouch&&(ge(i,"touchmove",this.onDrag,r),ge(n,"touchend",this.onDragEnd,r),ge(n,"touchcancel",this.onDragEnd,r))},t.prototype._dettachDragEvent=function(){var n=this._window,i=this.options.container;this._isDragAPI&&(fe(i,"dragover",this.onDrag),fe(n,"dragend",this.onDragEnd)),this._useMouse&&(fe(i,"mousemove",this.onDrag),fe(n,"mouseup",this.onDragEnd)),this._useTouch&&(fe(i,"touchstart",this.onDragStart),fe(i,"touchmove",this.onDrag),fe(n,"touchend",this.onDragEnd),fe(n,"touchcancel",this.onDragEnd))},t.prototype._allowMouseEvent=function(){this._preventMouseEvent=!1,clearTimeout(this._preventMouseEventId)},t}(Uo),ri=function(){return ri=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},ri.apply(this,arguments)};function Ko(e,t){var n=function(r){var o="rCS"+function(a){for(var s=5381,c=a.length;c;)s=33*s^a.charCodeAt(--c);return s>>>0}(r).toString(36);return{className:o,inject:function(a,s){s===void 0&&(s={});var c,u,f,p,l,d,h,g,v=function(x){if(x&&x.getRootNode){var E=x.getRootNode();if(E.nodeType===11)return E}}(a),m=(v||a.ownerDocument||document).querySelector('style[data-styled-id="'.concat(o,'"]'));if(m){var y=parseFloat(m.getAttribute("data-styled-count"))||0;m.setAttribute("data-styled-count","".concat(y+1))}else c=o,u=r,f=s,p=v,(g=(h=xi(a)).createElement("style")).setAttribute("type","text/css"),g.setAttribute("data-styled-id",c),g.setAttribute("data-styled-count","1"),f.nonce&&g.setAttribute("nonce",f.nonce),g.innerHTML=(l=c,d=u,f.original?d:d.replace(/([^};{\s}][^};{]*|^\s*){/gm,function(x,E){var M=E.trim();return(M?jn(M):[""]).map(function(b){var S=b.trim();return S.indexOf("@")===0?S:S.indexOf(":global")>-1?S.replace(/\:global/g,""):S.indexOf(":host")>-1?"".concat(S.replace(/\:host/g,".".concat(l))):S?".".concat(l," ").concat(S):".".concat(l)}).join(", ")+" {"})),(p||h.head||h.body).appendChild(g),m=g;return{destroy:function(){var x,E=parseFloat(m.getAttribute("data-styled-count"))||0;E<=1?(m.remove?m.remove():(x=m.parentNode)===null||x===void 0||x.removeChild(m),m=null):m.setAttribute("data-styled-count","".concat(E-1))}}}}}(t),i=n.className;return xe.reactExports.forwardRef(function(r,o){var a=r.className,s=a===void 0?"":a;r.cspNonce;var c=function(f,p){var l={};for(var d in f)Object.prototype.hasOwnProperty.call(f,d)&&p.indexOf(d)<0&&(l[d]=f[d]);if(f!=null&&typeof Object.getOwnPropertySymbols=="function"){var h=0;for(d=Object.getOwnPropertySymbols(f);h<d.length;h++)p.indexOf(d[h])<0&&Object.prototype.propertyIsEnumerable.call(f,d[h])&&(l[d[h]]=f[d[h]])}return l}(r,["className","cspNonce"]),u=xe.reactExports.useRef();return xe.reactExports.useImperativeHandle(o,function(){return u.current},[]),xe.reactExports.useEffect(function(){var f=n.inject(u.current,{nonce:r.cspNonce});return function(){f.destroy()}},[]),xe.reactExports.createElement(e,ri({ref:u,"data-styled-id":i,className:"".concat(s," ").concat(i)},c))})}var Jo=function(e,t){return(Jo=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var r in i)Object.prototype.hasOwnProperty.call(i,r)&&(n[r]=i[r])})(e,t)};function ar(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}Jo(e,t),e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var w=function(){return w=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},w.apply(this,arguments)};function C(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var i,r,o=n.call(e),a=[];try{for(;(t===void 0||t-- >0)&&!(i=o.next()).done;)a.push(i.value)}catch(s){r={error:s}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return a}function L(e,t,n){if(arguments.length===2)for(var i,r=0,o=t.length;r<o;r++)!i&&r in t||(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}function er(e,t){return w({events:[],props:[],name:e},t)}var ro,io,is=["n","w","s","e"],Mi=["n","w","s","e","nw","ne","sw","se"],Pn=function(){if(typeof navigator>"u"||!navigator||!navigator.userAgentData)return!1;var e=navigator.userAgentData,t=e.brands||e.uaList;return!(!t||!t.length)}()?function(){var e=navigator.userAgentData,t=(e.uaList||e.brands).slice(),n=e.mobile||!1,i=t[0],r=(e.platform||navigator.platform).toLowerCase(),o={name:i.brand,version:i.version,majorVersion:-1,webkit:!1,webkitVersion:"-1",chromium:!1,chromiumVersion:"-1",webview:!!fr(Bo,t).brand||Xi(Ii())},a={name:"unknown",version:"-1",majorVersion:-1};o.webkit=!o.chromium&&gi(zr,function(p){return Fo(t,p)});var s=fr(Yi,t);if(o.chromium=!!s.brand,o.chromiumVersion=s.version||"-1",!o.chromium){var c=fr(zr,t);o.webkit=!!c.brand,o.webkitVersion=c.version||"-1"}var u=Ro(Wi,function(p){return new RegExp(""+p.test,"g").exec(r)});a.name=u?u.id:"";var f=fr(Ni,t);return o.name=f.brand||o.name,o.version=(f.brand,f.version),o.webkit&&(a.name=n?"ios":"mac"),a.name==="ios"&&o.webview&&(o.version="-1"),a.version=Kr(a.version),o.version=Kr(o.version),a.majorVersion=parseInt(a.version,10),o.majorVersion=parseInt(o.version,10),{browser:o,os:a,isMobile:n,isHints:!0}}():function(){var e=Ii(void 0),t=!!/mobi/g.exec(e),n={name:"unknown",version:"-1",majorVersion:-1,webview:Xi(e),chromium:!1,chromiumVersion:"-1",webkit:!1,webkitVersion:"-1"},i={name:"unknown",version:"-1",majorVersion:-1},r=Hn(Ni,e),o=r.preset,a=r.version,s=Hn(Wi,e),c=s.preset,u=s.version,f=Hn(Yi,e);if(n.chromium=!!f.preset,n.chromiumVersion=f.version,!n.chromium){var p=Hn(zr,e);n.webkit=!!p.preset,n.webkitVersion=p.version}return c&&(i.name=c.id,i.version=u,i.majorVersion=parseInt(u,10)),o&&(n.name=o.id,n.version=a,n.webview&&i.name==="ios"&&n.name!=="safari"&&(n.webview=!1)),n.majorVersion=parseInt(n.version,10),{browser:n,os:i,isMobile:t,isHints:!1}}(),Qo=Pn.browser.webkit,ta=Qo&&(ro=typeof window>"u"?{userAgent:""}:window.navigator,!!(io=/applewebkit\/([^\s]+)/g.exec(ro.userAgent.toLowerCase()))&&parseFloat(io[1])<605),ea=Pn.browser.name,na=parseInt(Pn.browser.version,10),os=ea==="chrome",as=Pn.browser.chromium,ss=parseInt(Pn.browser.chromiumVersion,10)||0,us=os&&na>=109||as&&ss>=109,cs=ea==="firefox",ls=parseInt(Pn.browser.webkitVersion,10)>=612||na>=15,wi="moveable-",fs=Mi.map(function(e){var t="",n="",i="center",r="center",o="calc(var(--moveable-control-padding, 20) * -1px)";return e.indexOf("n")>-1&&(t="top: ".concat(o,";"),r="bottom"),e.indexOf("s")>-1&&(t="top: 0px;",r="top"),e.indexOf("w")>-1&&(n="left: ".concat(o,";"),i="right"),e.indexOf("e")>-1&&(n="left: 0px;",i="left"),'.around-control[data-direction*="'.concat(e,`"] {
7
- `).concat(n).concat(t,`
8
- transform-origin: `).concat(i," ").concat(r,`;
9
- }`)}).join(`
10
- `),ps=`
11
- {
12
- position: absolute;
13
- width: 1px;
14
- height: 1px;
15
- left: 0;
16
- top: 0;
17
- z-index: 3000;
18
- --moveable-color: #4af;
19
- --zoom: 1;
20
- --zoompx: 1px;
21
- --moveable-line-padding: 0;
22
- --moveable-control-padding: 0;
23
- will-change: transform;
24
- outline: 1px solid transparent;
25
- }
26
- .control-box {
27
- z-index: 0;
28
- }
29
- .line, .control {
30
- position: absolute;
31
- left: 0;
32
- top: 0;
33
- will-change: transform;
34
- }
35
- .control {
36
- width: 14px;
37
- height: 14px;
38
- border-radius: 50%;
39
- border: 2px solid #fff;
40
- box-sizing: border-box;
41
- background: #4af;
42
- background: var(--moveable-color);
43
- margin-top: -7px;
44
- margin-left: -7px;
45
- border: 2px solid #fff;
46
- z-index: 10;
47
- }
48
- .around-control {
49
- position: absolute;
50
- will-change: transform;
51
- width: calc(var(--moveable-control-padding, 20) * 1px);
52
- height: calc(var(--moveable-control-padding, 20) * 1px);
53
- left: calc(var(--moveable-control-padding, 20) * -0.5px);
54
- top: calc(var(--moveable-control-padding, 20) * -0.5px);
55
- box-sizing: border-box;
56
- background: transparent;
57
- z-index: 8;
58
- cursor: alias;
59
- transform-origin: center center;
60
- }
61
- `.concat(fs,`
62
- .padding {
63
- position: absolute;
64
- top: 0px;
65
- left: 0px;
66
- width: 100px;
67
- height: 100px;
68
- transform-origin: 0 0;
69
- }
70
- .line {
71
- width: 1px;
72
- height: 1px;
73
- background: #4af;
74
- background: var(--moveable-color);
75
- transform-origin: 0px 50%;
76
- }
77
- .line.edge {
78
- z-index: 1;
79
- background: transparent;
80
- }
81
- .line.dashed {
82
- box-sizing: border-box;
83
- background: transparent;
84
- }
85
- .line.dashed.horizontal {
86
- border-top: 1px dashed #4af;
87
- border-top-color: #4af;
88
- border-top-color: var(--moveable-color);
89
- }
90
- .line.dashed.vertical {
91
- border-left: 1px dashed #4af;
92
- border-left-color: #4af;
93
- border-left-color: var(--moveable-color);
94
- }
95
- .line.vertical {
96
- transform: translateX(-50%);
97
- }
98
- .line.horizontal {
99
- transform: translateY(-50%);
100
- }
101
- .line.vertical.bold {
102
- width: 2px;
103
- }
104
- .line.horizontal.bold {
105
- height: 2px;
106
- }
107
-
108
- .control.origin {
109
- border-color: #f55;
110
- background: #fff;
111
- width: 12px;
112
- height: 12px;
113
- margin-top: -6px;
114
- margin-left: -6px;
115
- pointer-events: none;
116
- }
117
- `).concat([0,15,30,45,60,75,90,105,120,135,150,165].map(function(e){return`
118
- .direction[data-rotation="`.concat(e,'"], :global .view-control-rotation').concat(e,` {
119
- `).concat((n=t=e,i='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(n,'deg);transform-origin: 16px 16px"></path></svg>'),r=45*Math.round(t/45)%180,o="ns-resize",r===135?o="nwse-resize":r===45?o="nesw-resize":r===90&&(o="ew-resize"),"cursor:".concat(o,";cursor: url('").concat(i,"') 16 16, ").concat(o,";")),`
120
- }
121
- `);var t,n,i,r,o}).join(`
122
- `),`
123
-
124
- .line.direction:before {
125
- content: "";
126
- position: absolute;
127
- width: 100%;
128
- height: calc(var(--moveable-line-padding, 0) * 1px);
129
- bottom: 0;
130
- left: 0;
131
- }
132
- .group {
133
- z-index: -1;
134
- }
135
- .area {
136
- position: absolute;
137
- }
138
- .area-pieces {
139
- position: absolute;
140
- top: 0;
141
- left: 0;
142
- display: none;
143
- }
144
- .area.avoid, .area.pass {
145
- pointer-events: none;
146
- }
147
- .area.avoid+.area-pieces {
148
- display: block;
149
- }
150
- .area-piece {
151
- position: absolute;
152
- }
153
-
154
- `).concat(ta?`:global svg *:before {
155
- content:"";
156
- transform-origin: inherit;
157
- }`:"",`
158
- `),Xr=1e-4,Ce=1e-7,ii=Math.pow(10,10),oo=-ii,oi={n:[0,1],e:[1,3],s:[3,2],w:[2,0],nw:[0],ne:[1],sw:[2],se:[3]},ao={n:0,s:180,w:270,e:90,nw:315,ne:45,sw:225,se:135},ds=["isMoveableElement","updateRect","updateTarget","destroy","dragStart","isInside","hitTest","setState","getRect","request","isDragging","getManager","forceUpdate","waitToChangeTarget","updateSelectors","getTargets","stopDrag","getControlBoxElement","getMoveables","getDragElement"];function ra(e,t,n,i,r,o){var a,s,c=(s=(a=t.gestos[o])===null||a===void 0?void 0:a.move(n,e.inputEvent))!==null&&s!==void 0?s:{},u=c.originalDatas||c.datas,f=u[o]||(u[o]={});return w(w({},c),{isPinch:!!i,parentEvent:!0,datas:f,originalDatas:e.originalDatas})}var ia=function(){function e(t){var n;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)}return e.prototype.dragStart=function(t,n){this.isDrag=!1,this.isFlag=!1;var i=n.originalDatas;return this.datas=i,i[this.ableName]||(i[this.ableName]={}),w(w({},this.move(t,n.inputEvent)),{type:"dragstart"})},e.prototype.drag=function(t,n){return this.move([t[0]-this.prevX,t[1]-this.prevY],n)},e.prototype.move=function(t,n){var i,r,o=!1;if(this.isFlag){var a=this.isDrag;i=this.prevX+t[0],r=this.prevY+t[1],(t[0]||t[1])&&(this.isDrag=!0),!a&&this.isDrag&&(o=!0)}else this.prevX=t[0],this.prevY=t[1],this.startX=t[0],this.startY=t[1],i=t[0],r=t[1],this.isFlag=!0;return this.prevX=i,this.prevY=r,{type:"drag",clientX:i,clientY:r,inputEvent:n,isFirstDrag:o,isDrag:this.isDrag,distX:i-this.startX,distY:r-this.startY,deltaX:t[0],deltaY:t[1],datas:this.datas[this.ableName],originalDatas:this.datas,parentEvent:!0,parentGesto:this}},e}();function Wn(e,t,n,i){var r=e.length===16?4:3,o=C(Sn(e,n,i,r),4),a=C(o[0],2),s=a[0],c=a[1],u=C(o[1],2),f=u[0],p=u[1],l=C(o[2],2),d=l[0],h=l[1],g=C(o[3],2),v=g[0],m=g[1],y=C(He(e,t,r),2),x=y[0],E=y[1],M=Math.min(s,f,d,v),b=Math.min(c,p,h,m),S=Math.max(s,f,d,v);return s=s-M||0,{left:M,top:b,right:S,bottom:Math.max(c,p,h,m),origin:[x=x-M||0,E=E-b||0],pos1:[s,c=c-b||0],pos2:[f=f-M||0,p=p-b||0],pos3:[d=d-M||0,h=h-b||0],pos4:[v=v-M||0,m=m-b||0],direction:Mn(e[0]*e[r+1])}}function oa(e,t){var n=t.datas,i=e.state,r=i.allMatrix,o=i.beforeMatrix,a=i.is3d,s=i.left,c=i.top,u=i.origin,f=i.offsetMatrix,p=i.targetMatrix,l=i.transformOrigin,d=a?4:3;n.is3d=a,n.matrix=r,n.targetMatrix=p,n.beforeMatrix=o,n.offsetMatrix=f,n.transformOrigin=l,n.inverseMatrix=cn(r,d),n.inverseBeforeMatrix=cn(o,d),n.absoluteOrigin=or(Ut([s,c],u),d),n.startDragBeforeDist=ze(n.inverseBeforeMatrix,n.absoluteOrigin,d),n.startDragDist=ze(n.inverseMatrix,n.absoluteOrigin,d)}function so(e){var t=e.datas,n=e.distX,i=e.distY,r=t.inverseBeforeMatrix,o=t.is3d,a=t.startDragBeforeDist,s=o?4:3;return ct(ze(r,Ut(t.absoluteOrigin,[n,i]),s),a)}function nr(e,t){var n=e.datas,i=e.distX,r=e.distY;n.inverseBeforeMatrix;var o=n.inverseMatrix,a=n.is3d;n.startDragBeforeDist;var s=n.startDragDist,c=a?4:3;return ct(ze(o,Ut(n.absoluteOrigin,[i,r]),c),s)}function Hr(e,t){var n=(t+1)/2;return[Hi(e[0][0],e[1][0],n,1-n),Hi(e[0][1],e[1][1],n,1-n)]}function De(e,t){var n=Hr([e[0],e[1]],t[0]),i=Hr([e[2],e[3]],t[0]);return Hr([n,i],t[1])}function uo(e,t,n,i){return ie(e,$n(t,i,n),i)}function jr(e,t,n){var i=En(t),r=t.datas;if(r.transformIndex=n,n!==-1){var o=i.startTransforms[n];if(o){var a=e.state,s=Cn([o],{"x%":function(c){return c/100*a.offsetWidth},"y%":function(c){return c/100*a.offsetHeight}});r.startValue=s[0].functionValue}}}function En(e){return e.originalDatas.beforeRenderable}function _r(e){return e.originalDatas.beforeRenderable.nextTransforms}function gr(e){return(_r(e)||[]).join(" ")}function vr(e){return En(e).nextStyle}function hs(e){if(e&&e.getRootNode){var t=e.getRootNode();if(t.nodeType===11)return t}}function gs(e){var t=e("scale"),n=e("rotate"),i=e("translate"),r=[];return i&&i!=="0px"&&i!=="none"&&r.push("translate(".concat(i.split(/\s+/).join(","),")")),n&&n!=="1"&&n!=="none"&&r.push("rotate(".concat(n,")")),t&&t!=="1"&&t!=="none"&&r.push("scale(".concat(t.split(/\s+/).join(","),")")),r}function co(e,t,n){for(var i,r,o,a=e,s=[],c=yi(e)||en(e),u=!n&&e===t||e===c,f=u,p=!1,l=3,d=!1,h=rr(t,t,!0).offsetParent,g=1;a&&!f;){f=u;var v=_e(a),m=v("position"),y=ha(a),x=m==="fixed",E=gs(v),M=qa(ys(y)),b=void 0,S=!1,R=!1,G=0,P=0,D=0,_=0,T={hasTransform:!1,fixedContainer:null};x&&(d=!0,h=(T=Ss(a)).fixedContainer);var F=M.length;p||F!==16&&!E.length||(p=!0,l=4,ui(s),o&&(o=ln(o,3,4))),p&&F===9&&(M=ln(M,3,4));var B=Es(a,e),O=B.tagName,I=B.hasOffset,A=B.isSVG,W=B.origin,j=B.targetOrigin,N=C(B.offset,2),dt=N[0],Ft=N[1];O==="svg"&&!a.ownerSVGElement&&o&&(s.push({type:"target",target:a,matrix:Ds(a,l)}),s.push({type:"offset",target:a,matrix:Wt(l)}));var ne=parseFloat(v("zoom"))||1;if(x)b=T.fixedContainer,S=!0;else{var _t=rr(a,t,!1,!0,v),At=_t.offsetZoom;if(b=_t.offsetParent,S=_t.isEnd,R=_t.isStatic,g*=At,(_t.isCustomElement||At!==1)&&R)dt-=b.offsetLeft,Ft-=b.offsetTop;else if((cs||us)&&_t.parentSlotElement){for(var It=b,Zt=0,Dt=0;It&&hs(It);)Zt+=It.offsetLeft,Dt+=It.offsetTop,It=It.offsetParent;dt-=Zt,Ft-=Dt}}if(!Qo||ls||!I||A||!R||m!=="relative"&&m!=="static"||(dt-=b.offsetLeft,Ft-=b.offsetTop,u=u||S),x)I&&T.hasTransform&&(D=b.clientLeft,_=b.clientTop);else if(I&&h!==b&&(G=b.clientLeft,P=b.clientTop),I&&b===c){var ue=ga(a,!1);dt+=ue[0],Ft+=ue[1]}if(s.push({type:"target",target:a,matrix:$n(M,l,W)}),E.length&&(s.push({type:"offset",target:a,matrix:Wt(l)}),s.push({type:"target",target:a,matrix:$n(Si(E),l,W)})),I){var Q=a===e,jt=Q?0:a.scrollLeft,ce=Q?0:a.scrollTop;s.push({type:"offset",target:a,matrix:fn([dt-jt+G-D,Ft-ce+P-_],l)})}else s.push({type:"offset",target:a,origin:W});if(ne!==1&&s.push({type:"zoom",target:a,matrix:$n(Ho([ne,ne],l),l,[0,0])}),o||(o=M),i||(i=W),r||(r=j),f||x)break;a=b,u=S,n&&a!==c||(f=u)}return o||(o=Wt(l)),i||(i=[0,0]),r||(r=[0,0]),{zoom:g,offsetContainer:h,matrixes:s,targetMatrix:o,transformOrigin:i,targetOrigin:r,is3d:p,hasFixed:d}}var Un=null,Zn=null,vn=null;function _n(e){e?(window.Map&&(Un=new Map,Zn=new Map),vn=[]):(Un=null,vn=null,Zn=null)}function _e(e){var t=Un?.get(e);if(!t){var n=Qe(e).getComputedStyle(e);if(!Un)return function(o){return n[o]};t={style:n,cached:{}},Un.set(e,t)}var i=t.cached,r=t.style;return function(o){return o in i||(i[o]=r[o]),i[o]}}function pn(e,t,n){var i=n.originalDatas;i.groupable=i.groupable||{};var r=i.groupable;r.childDatas=r.childDatas||[];var o=r.childDatas;return e.moveables.map(function(a,s){return o[s]=o[s]||{},o[s][t]=o[s][t]||{},w(w({},n),{isRequestChild:!0,datas:o[s][t],originalDatas:o[s]})})}function Lr(e,t,n,i,r,o,a){var s=!!n.match(/Start$/g),c=!!n.match(/End$/g),u=r.isPinch,f=r.datas,p=pn(e,t.name,r),l=e.moveables,d=[],h=p.map(function(g,v){var m=l[v],y=m.state,x=y.gestos,E=g;if(s)E=new ia(a).dragStart(i,g),d.push(E);else{if(x[a]||(x[a]=f.childGestos[v]),!x[a])return;E=ra(g,y,i,u,0,a),d.push(E)}var M=t[n](m,w(w({},E),{parentFlag:!0}));return c&&(x[a]=null),M});return s&&(f.childGestos=l.map(function(g){return g.state.gestos[a]})),{eventParams:h,childEvents:d}}function qr(e,t,n,i,r,o){r===void 0&&(r=function(u,f){return f});var a=!!n.match(/End$/g),s=pn(e,t.name,i),c=e.moveables;return s.map(function(u,f){var p,l=c[f];p=r(l,u);var d=t[n](l,w(w({},p),{parentFlag:!0}));return a&&(l.state.gestos={}),d})}function lo(e,t,n,i){var r=n.fixedDirection,o=n.fixedPosition,a=De(i.datas.startPositions||tn(t.state),r),s=C(ze(Fr(-e.rotation/180*Math.PI,3),[a[0]-o[0],a[1]-o[1],1],3),2),c=s[0],u=s[1];return i.datas.originalX=c,i.datas.originalY=u,i}function fo(e,t,n,i){var r=Kn(e.props,n),o=r.renderDirections,a=o===void 0?t:o,s=r.displayAroundControls;if(!a)return[];var c=a===!0?Mi:a;return L(L([],C(s?function(u,f,p,l){var d=u.renderState;d.renderDirectionMap||(d.renderDirectionMap={});var h=u.getState(),g=h.renderPoses,v=h.rotation,m=h.direction,y=d.renderDirectionMap,x=u.props.zoom,E=Mn(m),M=v/Math.PI*180;return(l||tr(y)).map(function(b){var S=oi[b];if(!S)return null;var R=(kt(M,15)+E*ao[b]+720)%180,G=["around-control"];return p&&G.push("direction",p),f.createElement("div",{className:Ht.apply(void 0,L([],C(G),!1)),"data-rotation":R,"data-direction":b,key:"direction-around-".concat(b),style:Or.apply(void 0,L([v,x],C(S.map(function(P){return g[P]})),!1))})})}(e,i,n,c):[]),!1),C(function(u,f,p,l){var d,h=u.getState(),g=h.renderPoses,v=h.rotation,m=h.direction,y=Kn(u.props,f).zoom,x=((d=v/Math.PI*180)<0&&(d=d%360+360),d%360),E={},M=u.renderState;M.renderDirectionMap||(M.renderDirectionMap={});var b=M.renderDirectionMap;p.forEach(function(R){var G=R.dir;E[G]=!0});var S=Mn(m);return p.map(function(R){var G=R.data,P=R.classNames,D=R.dir,_=oi[D];if(!_||!E[D])return null;b[D]=!0;var T=(kt(x,15)+S*ao[D]+720)%180,F={};return tr(G).forEach(function(B){F["data-".concat(B)]=G[B]}),l.createElement("div",w({className:Ht.apply(void 0,L(["control","direction",D,f],C(P),!1)),"data-rotation":T,"data-direction":D},F,{key:"direction-".concat(D),style:Or.apply(void 0,L([v,y],C(_.map(function(B){return g[B]})),!1))}))})}(e,n,c.map(function(u){return{data:{},classNames:[],dir:u}}),i)),!1)}function Ci(e,t,n,i,r,o){for(var a=[],s=6;s<arguments.length;s++)a[s-6]=arguments[s];var c=Fe(n,i),u=t?kt(c/Math.PI*180,15)%180:-1;return e.createElement("div",{key:"line-".concat(o),className:Ht.apply(void 0,L(["line","direction",t?"edge":"",t],C(a),!1)),"data-rotation":u,"data-line-key":o,"data-direction":t,style:Ms(n,i,r,c)})}function aa(e,t,n,i,r){return(n===!0?is:n).map(function(o,a){var s=C(oi[o],2),c=s[0],u=s[1];if(u!=null)return Ci(e,o,i[c],i[u],r,"".concat(t,"Edge").concat(a),t)}).filter(Boolean)}function sa(e,t){var n=e.state,i=n.containerClientRect,r=i.clientHeight,o=i.clientWidth,a=i.clientLeft,s=i.clientTop,c=n.snapOffset,u=c.left,f=c.top,p=c.right,l=c.bottom,d=e.props.bounds||{},h=(d.position||"client")==="css",g=d.left,v=g===void 0?-1/0:g,m=d.top,y=m===void 0?-1/0:m,x=d.right,E=x===void 0?h?-1/0:1/0:x,M=d.bottom,b=M===void 0?h?-1/0:1/0:M;return h&&(E=o+p-u-E,b=r+l-f-b),{left:v+u-a,right:E+u-a,top:y+f-s,bottom:b+f-s}}function po(e,t,n){var i=e[n?"left":"top"],r=e[n?"right":"bottom"],o=Math.min.apply(Math,L([],C(t),!1)),a=Math.max.apply(Math,L([],C(t),!1)),s=[];return i+1>o&&s.push({direction:"start",isBound:!0,offset:o-i,pos:i}),r-1<a&&s.push({direction:"end",isBound:!0,offset:a-r,pos:r}),s.length||s.push({isBound:!1,offset:0,pos:0}),s.sort(function(c,u){return z(u.offset)-z(c.offset)})}var vs=["left","right","center"],ms=["top","bottom","middle"];function ua(e,t){var n=e.props,i=n.snappable,r=n.bounds,o=n.innerBounds,a=n.verticalGuidelines,s=n.horizontalGuidelines,c=n.snapGridWidth,u=n.snapGridHeight,f=e.state,p=f.guidelines,l=f.enableSnap;return!(!i||!l||t&&i!==!0&&i.indexOf(t)<0||!(c||u||r||o||p&&p.length||a&&a.length||s&&s.length))}function ho(e){return e===!1?{}:e!==!0&&e?e:{left:!0,right:!0,top:!0,bottom:!0}}function ca(e,t,n,i,r,o,a){var s;i===void 0&&(i=[]),r===void 0&&(r=[]);var c,u,f,p,l,d,h=e.props,g=((s=e.state.snapThresholdInfo)===null||s===void 0?void 0:s.multiples)||[1,1],v=Do(a,h.snapHorizontalThreshold,5),m=Do(o,h.snapVerticalThreshold,5);return u=n,f=i,p=r,l=v,{vertical:go(c=e.state.guidelines,"vertical",t,m*(d=g)[0],f),horizontal:go(c,"horizontal",u,l*d[1],p)}}function ai(e){var t=e.isSnap;if(!t)return{isSnap:!1,offset:0,dist:-1,pos:0,guideline:null};var n=e.posInfos[0],i=n.guidelineInfos[0],r=i.offset,o=i.dist,a=i.guideline;return{isSnap:t,offset:r,dist:o,pos:n.pos,guideline:a}}function go(e,t,n,i,r){var o,a;if(r===void 0&&(r=[]),!e||!e.length)return{isSnap:!1,index:-1,direction:"",posInfos:[]};var s=t==="vertical"?0:1,c=n.map(function(f,p){var l=r[p]||"",d=e.map(function(h){var g=h.pos,v=f-g[s];return{offset:v,dist:z(v),guideline:h,direction:l}}).filter(function(h){var g=h.guideline,v=h.dist;return!(g.type!==t||v>i)}).sort(function(h,g){return h.dist-g.dist});return{pos:f,index:p,guidelineInfos:d,direction:l}}).filter(function(f){return f.guidelineInfos.length>0}).sort(function(f,p){return f.guidelineInfos[0].dist-p.guidelineInfos[0].dist}),u=c.length>0;return{isSnap:u,index:u?c[0].index:-1,direction:(a=(o=c[0])===null||o===void 0?void 0:o.direction)!==null&&a!==void 0?a:"",posInfos:c}}function Tr(e,t){return e.slice().sort(function(n,i){var r,o,a,s,c=n.sign[t],u=i.sign[t],f=n.offset[t],p=i.offset[t];return c?u?(r={isBound:n.isBound,isSnap:n.isSnap,offset:f},o={isBound:i.isBound,isSnap:i.isSnap,offset:p},a=z(r.offset),s=z(o.offset),r.isBound&&o.isBound?s-a:r.isBound?-1:o.isBound?1:r.isSnap&&o.isSnap?s-a:r.isSnap?-1:o.isSnap||a<Ce?1:s<Ce?-1:a-s):-1:1})[0]}function la(e,t){var n,i,r=C(t,2),o=r[0],a=r[1],s=a[0]-o[0],c=a[1]-o[1];return z(s)<Ce&&(s=0),z(c)<Ce&&(c=0),s?c?(n=c/s*(e[0]-o[0])+o[1],i=e[1]):(n=o[1],i=e[1]):(n=o[0],i=e[0]),n-i}function vo(e,t,n,i,r){return r===void 0&&(r=0),i&&t-r<=e||!i&&e<=n+r?{isBound:!0,offset:i?t-e:n-e}:{isBound:!1,offset:0}}function mr(e,t,n,i,r,o){var a,s,c=C(t,2),u=c[0],f=c[1],p=e[0],l=n[0],d=n[1],h=Pr(d[1]-l[1]),g=f,v=-u/f;return Pr(d[0]-l[0])?h?{isBound:!1,offset:0}:u?vo((l[1]-p[1])/v+p[0],l[0],d[0],i,r):{isBound:s=z(a=l[1]-p[1])<=0,offset:s?a:0}:g?vo(v*(l[0]-p[0])+p[1],l[1],d[1],i,r):{isBound:s=z(a=l[0]-p[0])<=0,offset:s?a:0}}function fa(e,t,n){return t.map(function(i){var r=function(p,l){var d=l.line,h=l.centerSign,g=l.verticalSign,v=l.horizontalSign,m=l.lineConstants,y=p.props.innerBounds;if(!y)return{isAllBound:!1,isBound:!1,isVerticalBound:!1,isHorizontalBound:!1,offset:[0,0]};var x,E,M,b=y.left,S=y.top,R=y.width,G=y.height,P=[[b,S],[b,S+G]],D=[[b,S],[b+R,S]],_=[[b+R,S],[b+R,S+G]],T=[[b,S+G],[b+R,S+G]];if(x=d,E=h,M===void 0&&(M=Ce),[[b,S],[b+R,S],[b,S+G],[b+R,S+G]].every(function(It){var Zt=la(It,x);return Zt<=0===E||z(Zt)<=M}))return{isAllBound:!1,isBound:!1,isVerticalBound:!1,isHorizontalBound:!1,offset:[0,0]};var F=mr(d,m,D,g),B=mr(d,m,T,g),O=mr(d,m,P,v),I=mr(d,m,_,v),A=F.isBound&&B.isBound,W=F.isBound||B.isBound,j=O.isBound&&I.isBound,N=O.isBound||I.isBound,dt=xn(F.offset,B.offset),Ft=xn(O.offset,I.offset),ne=[0,0],_t=!1,At=!1;return z(Ft)<z(dt)?(ne=[dt,0],_t=W,At=A):(ne=[0,Ft],_t=N,At=j),{isAllBound:At,isVerticalBound:W,isHorizontalBound:N,isBound:_t,offset:ne}}(e,i),o=r.isBound,a=r.offset,s=r.isVerticalBound,c=r.isHorizontalBound,u=i.multiple,f=nr({datas:n,distX:a[0],distY:a[1]}).map(function(p,l){return p*(u[l]?2/u[l]:0)});return{sign:u,isBound:o,isVerticalBound:s,isHorizontalBound:c,isSnap:!1,offset:f}})}function pa(e,t,n,i){var r,o,a,s,c,u=e.state,f=Sn(u.allMatrix,100,100,u.is3d?4:3),p=De(f,[0,0]);return(r=n,o=i,a=[],s=r[0],c=r[1],s&&c?a.push([[0,2*c],r,[-s,c]],[[2*s,0],r,[s,-c]]):s?(a.push([[2*s,0],[s,1],[s,-1]]),o&&a.push([[0,-1],[s,-1],[-s,-1]],[[0,1],[s,1],[-s,1]])):c?(a.push([[0,2*c],[1,c],[-1,c]]),o&&a.push([[-1,0],[-1,c],[-1,-c]],[[1,0],[1,c],[1,-c]])):a.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]]),a).map(function(l){var d,h,g,v,m=C(l,3),y=m[0],x=m[1],E=m[2],M=[De(f,x),De(f,E)],b=function(P){var D=C(P,2),_=D[0],T=D[1],F=T[0]-_[0],B=T[1]-_[1];Math.abs(F)<ee&&(F=0),Math.abs(B)<ee&&(B=0);var O=0,I=0,A=0;return F?B?(I=1,A=(O=-B/F)*_[0]-_[1]):(I=1,A=-_[1]):(O=-1,A=_[0]),[O,I,A].map(function(W){return kt(W,ee)})}(M),S=(d=p,g=ti([(h=M)[0][0],h[1][0]]),v=ti([h[0][1],h[1][1]]),{vertical:g<=d[0],horizontal:v<=d[1]}),R=S.vertical,G=S.horizontal;return{multiple:y,centerSign:la(p,M)<=0,verticalSign:R,horizontalSign:G,lineConstants:b,line:[De(t,x),De(t,E)]}})}function si(e,t,n,i,r){var o=function(p,l,d,h){var g=l[0]-p[0],v=l[1]-p[1];if(z(g)<ee&&(g=0),z(v)<ee&&(v=0),!g)return h?[0,0]:[0,d];if(!v)return h?[d,0]:[0,0];var m=v/g,y=p[1]-m*p[0];return h?[d,m*(l[0]+d)+y-l[1]]:[(l[1]+d-y)/m-l[0],d]}(e,t,n,i);if(!o)return{isOutside:!1,offset:[0,0]};var a=Ln(e,t),s=Ln(o,e),c=Ln(o,t),u=s>a||c>a,f=C(nr({datas:r,distX:o[0],distY:o[1]}),2);return{offset:[f[0],f[1]],isOutside:u}}function mo(e,t){return e.isBound?e.offset:t.isSnap?ai(t).offset:0}function _i(e,t,n,i){i===void 0&&(i=n);var r,o,a,s,c,u,f,p,l,d,h=(r=sa(e),o=i.vertical,a=i.horizontal,{vertical:po(d={position:(c=(s=r||{}).position)===void 0?"client":c,left:(u=s.left)===void 0?-1/0:u,top:(f=s.top)===void 0?-1/0:f,right:(p=s.right)===void 0?1/0:p,bottom:(l=s.bottom)===void 0?1/0:l},o,!0),horizontal:po(d,a,!1)}),g=h.horizontal,v=h.vertical,m=t?{horizontal:{isSnap:!1,index:-1},vertical:{isSnap:!1,index:-1}}:ca(e,n.vertical,n.horizontal,void 0,void 0,void 0,void 0),y=m.horizontal,x=m.vertical,E=mo(g[0],y),M=mo(v[0],x),b=z(E),S=z(M);return{horizontal:{isBound:g[0].isBound,isSnap:y.isSnap,snapIndex:y.index,offset:E,dist:b,bounds:g,snap:y},vertical:{isBound:v[0].isBound,isSnap:x.isSnap,snapIndex:x.index,offset:M,dist:S,bounds:v,snap:x}}}function bo(e,t){return e.isBound?e.offset:t.isSnap?t.offset:0}var Xn,Ye={name:"draggable",props:["draggable","throttleDrag","throttleDragRotate","hideThrottleDragRotateLine","startDragRotate","edgeDraggable"],events:["dragStart","drag","dragEnd","dragGroupStart","dragGroup","dragGroupEnd"],requestStyle:function(){return["left","top","right","bottom"]},requestChildStyle:function(){return["left","top","right","bottom"]},render:function(e,t){var n=e.props,i=n.hideThrottleDragRotateLine,r=n.throttleDragRotate,o=n.zoom,a=e.getState(),s=a.dragInfo,c=a.beforeOrigin;if(i||!r||!s)return[];var u=s.dist;if(!u[0]&&!u[1])return[];var f=Xe(u),p=Fe(u,[0,0]);return[t.createElement("div",{className:Ht("line","horizontal","dragline","dashed"),key:"dragRotateGuideline",style:{width:"".concat(f,"px"),transform:"translate(".concat(c[0],"px, ").concat(c[1],"px) rotate(").concat(p,"rad) scaleY(").concat(o,")")}})]},dragStart:function(e,t){var n,i,r=t.datas,o=t.parentEvent,a=t.parentGesto,s=e.state,c=s.gestos,u=s.style;if(c.draggable)return!1;c.draggable=a||e.targetGesto,r.datas={},r.left=parseFloat(u.left||"")||0,r.top=parseFloat(u.top||"")||0,r.bottom=parseFloat(u.bottom||"")||0,r.right=parseFloat(u.right||"")||0,r.startValue=[0,0],oa(e,t),jr(e,n=t,wn(En(n).startTransforms,function(p){return p.indexOf("".concat("translate","("))===0})),i=e,r.absolutePoses=tn(i.state),r.prevDist=[0,0],r.prevBeforeDist=[0,0],r.isDrag=!1,r.deltaOffset=[0,0];var f=Xt(e,t,w({set:function(p){r.startValue=p}},function(p,l){var d=En(l);return{setTransform:function(h,g){g===void 0&&(g=-1),d.startTransforms=ye(h)?h:Qn(h),jr(p,l,g)},setTransformIndex:function(h){jr(p,l,h)}}}(e,t)));return(o||pt(e,"onDragStart",f))!==!1?(r.isDrag=!0,e.state.dragInfo={startRect:e.getRect(),dist:[0,0]}):(c.draggable=null,r.isPinch=!1),!!r.isDrag&&f},drag:function(e,t){if(t){(function(it,qt,Z){var tt=qt.datas,Bt=qt.originalDatas.beforeRenderable,Tt=tt.transformIndex,$t=Bt.nextTransforms,bt=$t.length,xt=Bt.nextTransformAppendedIndexes,U=-1;Tt===-1?((U=0)==-1&&(U=$t.length),tt.transformIndex=U):U=Be(xt,function(ut){return ut.index===Tt&&ut.functionName===Z})?Tt:Tt+xt.filter(function(ut){return ut.index<Tt}).length;var J,lt,q,Mt,Ot,ot,ht,at,rt,et,Nt,V,k,K,X,st,Pt,wt,H=(J=$t,lt=it.state,q=U,Ot=Cn(J,{"x%":function(ut){return ut/100*lt.offsetWidth},"y%":function(ut){return ut/100*lt.offsetHeight}}),ot=J.slice(0,q<0?void 0:q),J.slice(0,q<0?void 0:q+1),J[q],ht=q<0?[]:J.slice(q),q<0||J.slice(q+1),at=Ot.slice(0,q<0?void 0:q),rt=Ot.slice(0,q<0?void 0:q+1),et=(Mt=Ot[q])!==null&&Mt!==void 0?Mt:Cn([""])[0],Nt=q<0?[]:Ot.slice(q),V=q<0?[]:Ot.slice(q+1),k=et?[et]:[],K=gn(at),X=gn(rt),st=gn(Nt),Pt=gn(V),wt=ie(K,st,4),{beforeFunctionMatrix:K,beforeFunctionMatrix2:X,targetFunctionMatrix:gn(k),afterFunctionMatrix:st,afterFunctionMatrix2:Pt,allFunctionMatrix:wt,targetFunction:k[0],beforeFunctionTexts:ot,afterFunctionTexts:ht}),yt=H.targetFunction,ft=Z;tt.beforeFunctionTexts=H.beforeFunctionTexts,tt.afterFunctionTexts=H.afterFunctionTexts,tt.beforeTransform=H.beforeFunctionMatrix,tt.beforeTransform2=H.beforeFunctionMatrix2,tt.targetTansform=H.targetFunctionMatrix,tt.afterTransform=H.afterFunctionMatrix,tt.afterTransform2=H.afterFunctionMatrix2,tt.targetAllTransform=H.allFunctionMatrix,yt.functionName===ft?(tt.afterFunctionTexts.splice(0,1),tt.isAppendTransform=!1):bt>U&&(tt.isAppendTransform=!0,Bt.nextTransformAppendedIndexes=L(L([],C(xt),!1),[{functionName:Z,index:U,isAppend:!0}],!1))})(e,t,"translate");var n=t.datas,i=t.parentEvent,r=t.parentFlag,o=t.isPinch,a=t.deltaOffset,s=t.useSnap,c=t.isRequest,u=t.isGroup,f=t.parentThrottleDrag,p=t.distX,l=t.distY,d=n.isDrag,h=n.prevDist,g=n.prevBeforeDist,v=n.startValue;if(d){a&&(p+=a[0],l+=a[1]);var m=e.props,y=m.parentMoveable,x=u?0:m.throttleDrag||f||0,E=i?0:m.throttleDragRotate||0,M=0,b=!1,S=!1,R=!1,G=!1;if(!i&&E>0&&(p||l)){var P=m.startDragRotate||0,D=kt(P+180*Fe([0,0],[p,l])/Math.PI,E)-P,_=l*Math.abs(Math.cos((D-90)/180*Math.PI)),T=Xe([p*Math.abs(Math.cos(D/180*Math.PI)),_]);M=D*Math.PI/180,p=T*Math.cos(M),l=T*Math.sin(M)}if(!o&&!i&&!r){var F=C(function(it,qt,Z,tt,Bt,Tt){if(!ua(it,"draggable"))return[{isSnap:!1,isBound:!1,offset:0},{isSnap:!1,isBound:!1,offset:0}];var $t,bt,xt,U,J=Oi(Tt.absolutePoses,[qt,Z]),lt=Br(J),q=lt.left,Mt=lt.right,Ot=lt.top,ot=lt.bottom,ht={horizontal:J.map(function(H){return H[1]}),vertical:J.map(function(H){return H[0]})},at=_i(it,Bt,($t=ho(it.props.snapDirections),bt=function(H,yt){var ft=ho(H),ut={};for(var Yt in ft)Yt in yt&&ft[Yt]&&(ut[Yt]=yt[Yt]);return ut}($t,{left:q,right:Mt,top:Ot,bottom:ot,center:(q+Mt)/2,middle:(Ot+ot)/2}),xt=ms.filter(function(H){return H in bt}),U=vs.filter(function(H){return H in bt}),{horizontalNames:xt,verticalNames:U,horizontal:xt.map(function(H){return bt[H]}),vertical:U.map(function(H){return bt[H]})}),ht),rt=at.vertical,et=at.horizontal,Nt=function(H,yt,ft){var ut,Yt=fa(H,pa(H,yt,[0,0],!1).map(function(Y){return w(w({},Y),{multiple:Y.multiple.map(function($){return 2*z($)})})}),ft),oe=Tr(Yt,0),Et=Tr(Yt,1),Ct=0,ae=0,gt=oe.isVerticalBound||Et.isVerticalBound,zt=oe.isHorizontalBound||Et.isHorizontalBound;return(gt||zt)&&(Ct=(ut=C(function(Y){var $=Y.datas,Rt=Y.distX,Jt=Y.distY;$.beforeMatrix;var St=$.matrix,vt=$.is3d;$.startDragBeforeDist;var nt=$.startDragDist,mt=$.absoluteOrigin,Kt=vt?4:3;return ct(ze(St,Ut(nt,[Rt,Jt]),Kt),mt)}({datas:ft,distX:-oe.offset[0],distY:-Et.offset[1]}),2))[0],ae=ut[1]),{vertical:{isBound:gt,offset:Ct},horizontal:{isBound:zt,offset:ae}}}(it,J,Tt),V=Nt.vertical,k=Nt.horizontal,K=rt.isSnap,X=et.isSnap,st=rt.isBound||V.isBound,Pt=et.isBound||k.isBound,wt=C(function(H,yt,ft,ut,Yt){var oe=C(yt,2),Et=oe[0],Ct=oe[1],ae=C(ft,2),gt=ae[0],zt=ae[1],Y=C(ut,2),$=Y[0],Rt=Y[1],Jt=C(Yt,2),St=Jt[0],vt=Jt[1],nt=-St,mt=-vt;if(H&&Et&&Ct){nt=0,mt=0;var Kt=[];if(gt&&zt?Kt.push([0,vt],[St,0]):gt?Kt.push([St,0]):zt?Kt.push([0,vt]):$&&Rt?Kt.push([0,vt],[St,0]):$?Kt.push([St,0]):Rt&&Kt.push([0,vt]),Kt.length){Kt.sort(function(Gt,Vt){return Xe(ct([Et,Ct],Gt))-Xe(ct([Et,Ct],Vt))});var de=Kt[0];if(de[0]&&z(Et)>ee)nt=-de[0],mt=Ct*z(Et+nt)/z(Et)-Ct;else if(de[1]&&z(Ct)>ee){var Me=Ct;mt=-de[1],nt=Et*z(Ct+mt)/z(Me)-Et}if(H&&zt&&gt)if(z(nt)>ee&&z(nt)<z(St))nt*=le=z(St)/z(nt),mt*=le;else if(z(mt)>ee&&z(mt)<z(vt)){var le;nt*=le=z(vt)/z(mt),mt*=le}else nt=xn(-St,nt),mt=xn(-vt,mt)}}else nt=Et||gt?-St:0,mt=Ct||zt?-vt:0;return[nt,mt]}(tt,[qt,Z],[st,Pt],[K,X],[xn(rt.offset,V.offset),xn(et.offset,k.offset)]),2);return[{isBound:st,isSnap:K,offset:wt[0]},{isBound:Pt,isSnap:X,offset:wt[1]}]}(e,p,l,E,!s&&c||a,n),2),B=F[0],O=F[1];b=B.isSnap,S=B.isBound,R=O.isSnap,G=O.isBound,p+=B.offset,l+=O.offset}var I=Ut(so({datas:n,distX:p,distY:l}),v),A=Ut((Te=C(so({datas:ce=(jt={datas:n,distX:p,distY:l}).datas,distX:jt.distX,distY:jt.distY}),2),ze(function(it,qt){var Z=it.beforeTransform,tt=it.afterTransform;it.beforeTransform2,it.afterTransform2;var Bt=ie(qt,it.targetAllTransform,4),Tt=ie(cn(Z,4),Bt,4);return ie(Tt,cn(tt,4),4)}(ce,function(it){for(var qt=Wt(4),Z=0;Z<3;++Z)qt[12+Z]=it[Z]||0;return qt}([Te[0],Te[1]])),or([0,0,0],4),4)),v);Zi(A,Ce),Zi(I,Ce),E||(b||S||(A[0]=kt(A[0],x),I[0]=kt(I[0],x)),R||G||(A[1]=kt(A[1],x),I[1]=kt(I[1],x)));var W=ct(I,v),j=ct(A,v),N=ct(j,h),dt=ct(W,g);n.prevDist=j,n.prevBeforeDist=W,n.passDelta=N,n.passDist=j;var Ft=n.left+W[0],ne=n.top+W[1],_t=n.right-W[0],At=n.bottom-W[1],It=(Lt=n,pe="translate(".concat(A[0],"px, ").concat(A[1],"px)"),re="translate(".concat(j[0],"px, ").concat(j[1],"px)"),"".concat(Lt.beforeFunctionTexts.join(" ")," ").concat(Lt.isAppendTransform?re:pe," ").concat(Lt.afterFunctionTexts.join(" ")));if(function(it,qt){En(it).nextTransforms=Qn(qt)}(t,It),e.state.dragInfo.dist=i?[0,0]:j,i||y||!N.every(function(it){return!it})||!dt.some(function(it){return!it})){var Zt=e.state,Dt=Zt.width,ue=Zt.height,Q=Xt(e,t,w({transform:It,dist:j,delta:N,translate:A,beforeDist:W,beforeDelta:dt,beforeTranslate:I,left:Ft,top:ne,right:_t,bottom:At,width:Dt,height:ue,isPinch:o},bn({transform:It},t)));return!i&&pt(e,"onDrag",Q),Q}}}var jt,ce,Te,Lt,pe,re},dragAfter:function(e,t){var n=t.datas,i=n.deltaOffset;return!(!i[0]&&!i[1])&&(n.deltaOffset=[0,0],this.drag(e,w(w({},t),{deltaOffset:i})))},dragEnd:function(e,t){var n=t.parentEvent,i=t.datas;if(e.state.dragInfo=null,i.isDrag){i.isDrag=!1;var r=ir(e,t,{});return!n&&pt(e,"onDragEnd",r),r}},dragGroupStart:function(e,t){var n,i,r=t.datas,o=t.clientX,a=t.clientY,s=this.dragStart(e,t);if(!s)return!1;var c=Lr(e,this,"dragStart",[o||0,a||0],t,0,"draggable"),u=c.childEvents,f=c.eventParams,p=pt(e,"onDragGroupStart",w(w({},s),{targets:e.props.targets,events:f}));r.isDrag=p!==!1;var l=(i=(n=u[0])===null||n===void 0?void 0:n.datas.startValue)!==null&&i!==void 0?i:[0,0];return r.throttleOffset=[l[0]%1,l[1]%1],!!r.isDrag&&s},dragGroup:function(e,t){if(t.datas.isDrag){var n=this.drag(e,w(w({},t),{parentThrottleDrag:e.props.throttleDrag})),i=Lr(e,this,"drag",t.datas.passDelta,t,0,"draggable").eventParams;if(n){var r=w({targets:e.props.targets,events:i},n);return pt(e,"onDragGroup",r),r}}},dragGroupEnd:function(e,t){var n=t.isDrag;if(t.datas.isDrag){this.dragEnd(e,t);var i=Lr(e,this,"dragEnd",[0,0],t,0,"draggable").eventParams;return pt(e,"onDragGroupEnd",ir(e,t,{targets:e.props.targets,events:i})),n}},request:function(e){var t={},n=e.getRect(),i=0,r=0,o=!1;return{isControl:!1,requestStart:function(a){return o=a.useSnap,{datas:t,useSnap:o}},request:function(a){return"x"in a?i=a.x-n.left:"deltaX"in a&&(i+=a.deltaX),"y"in a?r=a.y-n.top:"deltaY"in a&&(r+=a.deltaY),{datas:t,distX:i,distY:r,useSnap:o}},requestEnd:function(){return{datas:t,isDrag:!0,useSnap:o}}}},unset:function(e){e.state.gestos.draggable=null,e.state.dragInfo=null}},xo=pi("resizable"),bs={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:(Xn="resizable",function(e,t){var n=Kn(e.props,Xn).edge;return n&&(n===!0||n.length)?L(L([],C(aa(t,Xn,n,e.getState().renderPoses,e.props.zoom)),!1),C(fo(e,["nw","ne","sw","se"],Xn,t)),!1):fo(e,Mi,Xn,t)}),dragControlCondition:xo,viewClassName:function(e){return function(t){if(!t.isDragging(e))return"";var n,i,r,o,a,s=(i=e,o=(n=t).targetGesto,a=n.controlGesto,o?.isFlag()&&(r=o.getEventData()[i]),!r&&a?.isFlag()&&(r=a.getEventData()[i]),r||{}).deg;return s?Ht("view-control-rotation".concat(s)):""}}("resizable"),dragControlStart:function(e,t){var n,i,r=t.inputEvent,o=t.isPinch,a=t.isGroup,s=t.parentDirection,c=t.parentGesto,u=t.datas,f=t.parentFixedDirection,p=t.parentEvent,l=(i=u,s||(o?[0,0]:function(P,D){if(P){var _=P.getAttribute("data-rotation")||"",T=P.getAttribute("data-direction");if(D.deg=_,T){var F=[0,0];return T.indexOf("w")>-1&&(F[0]=-1),T.indexOf("e")>-1&&(F[0]=1),T.indexOf("n")>-1&&(F[1]=-1),T.indexOf("s")>-1&&(F[1]=1),F}}}(r.target,i))),d=e.state,h=d.target,g=d.width,v=d.height,m=d.gestos;if(!l||!h||m.resizable)return!1;m.resizable=c||e.controlGesto,!o&&oa(e,t),u.datas={},u.direction=l,u.startOffsetWidth=g,u.startOffsetHeight=v,u.prevWidth=0,u.prevHeight=0,u.minSize=[0,0],u.startWidth=d.inlineCSSWidth||d.cssWidth,u.startHeight=d.inlineCSSHeight||d.cssHeight,u.maxSize=[1/0,1/0],a||(u.minSize=[d.minOffsetWidth,d.minOffsetHeight],u.maxSize=[d.maxOffsetWidth,d.maxOffsetHeight]);var y=e.props.transformOrigin||"% %";function x(P){u.ratio=P&&isFinite(P)?P:0}function E(P){var D,_={fixedPosition:De(u.startPositions,D=P),fixedDirection:D,fixedOffset:[0,0]};u.fixedDirection=_.fixedDirection,u.fixedPosition=_.fixedPosition,u.fixedOffset=_.fixedOffset}function M(P){var D,_,T,F,B,O,I,A,W,j,N,dt=(D=e.state,_=P,O=D.allMatrix,I=D.is3d,A=D.width,W=D.height,j=I?4:3,T=_,B=W,N=[(F=A)?T[0]/(F/2)-1:0,B?T[1]/(B/2)-1:0],{fixedPosition:He(O,_,j),fixedDirection:N,fixedOffset:[A?0:_[0],W?0:_[1]]});u.fixedDirection=dt.fixedDirection,u.fixedPosition=dt.fixedPosition,u.fixedOffset=dt.fixedOffset}function b(P){u.minSize=[Se("".concat(P[0]),0)||0,Se("".concat(P[1]),0)||0]}function S(P){var D=[P[0]||1/0,P[1]||1/0];Sr(D[0])&&!isFinite(D[0])||(D[0]=Se("".concat(D[0]),0)||1/0),Sr(D[1])&&!isFinite(D[1])||(D[1]=Se("".concat(D[1]),0)||1/0),u.maxSize=D}u.transformOrigin=On(y)?y.split(" "):y,u.startOffsetMatrix=d.offsetMatrix,u.startTransformOrigin=d.transformOrigin,u.isWidth=(n=t?.parentIsWidth)!==null&&n!==void 0?n:!l[0]&&!l[1]||l[0]||!l[1],u.startPositions=tn(e.state),x(g/v),E(f||[-l[0],-l[1]]),u.setFixedDirection=E,u.setFixedPosition=M,u.setMin=b,u.setMax=S;var R=Xt(e,t,{direction:l,startRatio:u.ratio,set:function(P){var D=C(P,2),_=D[0],T=D[1];u.startWidth=_,u.startHeight=T},setMin:b,setMax:S,setRatio:x,setFixedDirection:E,setFixedPosition:M,setOrigin:function(P){u.transformOrigin=P},dragStart:Ye.dragStart(e,new ia().dragStart([0,0],t))}),G=p||pt(e,"onResizeStart",R);return u.startFixedDirection=u.fixedDirection,u.startFixedPosition=u.fixedPosition,G!==!1&&(u.isResize=!0,e.state.snapRenderInfo={request:t.isRequest,direction:l}),!!u.isResize&&R},dragControl:function(e,t){var n,i,r,o,a,s,c,u,f,p,l,d,h,g,v,m,y,x,E,M,b,S,R,G,P,D,_,T,F,B,O=t.datas,I=t.parentFlag,A=t.isPinch,W=t.parentKeepRatio,j=t.dragClient,N=t.parentDist,dt=t.useSnap,Ft=t.isRequest,ne=t.isGroup,_t=t.parentEvent,At=t.resolveMatrix,It=O.isResize,Zt=O.transformOrigin,Dt=O.startWidth,ue=O.startHeight,Q=O.prevWidth,jt=O.prevHeight,ce=O.minSize,Te=O.maxSize,Lt=O.ratio,pe=O.startOffsetWidth,re=O.startOffsetHeight,it=O.isWidth;if(It){if(At){var qt=e.state.is3d,Z=O.startOffsetMatrix,tt=O.startTransformOrigin,Bt=qt?4:3,Tt=Si(_r(t)),$t=Math.sqrt(Tt.length);Bt!==$t&&(Tt=ln(Tt,$t,Bt));var bt=uo(Z,Tt,tt,Bt),xt=Sn(bt,pe,re,Bt);O.startPositions=xt,O.nextTargetMatrix=Tt,O.nextAllMatrix=bt}var U=Kn(e.props,"resizable"),J=U.resizeFormat,lt=U.throttleResize,q=lt===void 0?I?0:1:lt,Mt=U.parentMoveable,Ot=U.keepRatioFinally,ot=O.direction,ht=ot,at=0,rt=0;ot[0]||ot[1]||(ht=[1,1]);var et=Lt&&(W??U.keepRatio)||!1,Nt=C(gt(),2),V=Nt[0],k=Nt[1];_t||(O.setFixedDirection(O.fixedDirection),pt(e,"onBeforeResize",Xt(e,t,{startFixedDirection:O.startFixedDirection,startFixedPosition:O.startFixedPosition,setFixedDirection:function(Y){var $;return O.setFixedDirection(Y),$=C(gt(),2),V=$[0],k=$[1],[V,k]},setFixedPosition:function(Y){var $;return O.setFixedPosition(Y),$=C(gt(),2),V=$[0],k=$[1],[V,k]},boundingWidth:V,boundingHeight:k,setSize:function(Y){var $;$=C(Y,2),V=$[0],k=$[1]}},!0)));var K=j;j||(K=!I&&A?De(tn(e.state),[0,0]):O.fixedPosition);var X=[0,0];if(A||(X=function(Y,$,Rt,Jt,St,vt,nt){if(!ua(Y,"resizable"))return[0,0];var mt=nt.fixedDirection,Kt=nt.nextAllMatrix,de=Y.state,Me=de.allMatrix,le=de.is3d;return function(Gt,Vt,se,Oe,ve,Ve,Ae,Ie){for(var Rn=tn(Gt.state),nn=Gt.props.keepRatio,Ne=0,je=0,rn=0;rn<2;++rn){var Fn=xs(Gt,Vt(Ne,je),ve,nn,Ae,Ie),Bn=Fn.width,Ge=Fn.height,Qt=Bn.isBound,on=Ge.isBound,he=Bn.offset,Ue=Ge.offset;if(rn===1&&(Qt||(he=0),on||(Ue=0)),rn===0&&Ae&&!Qt&&!on)return[0,0];if(nn){var Gn=z(he)*(se?1/se:1),kn=z(Ue)*(Oe?1/Oe:1);(Qt&&on?Gn<kn:on||!Qt&&Gn<kn)?he=se*Ue/Oe:Ue=Oe*he/se}Ne+=he,je+=Ue}if(!nn&&ve[0]&&ve[1]){var zn=function(Ke,an,Pe,me,Le){var ke=[-Pe[0],-Pe[1]],be=Ke.state,we=be.width,dn=be.height,Je=Ke.props.bounds,An=1/0,In=1/0;if(Je){var ur=[[Pe[0],-Pe[1]],[-Pe[0],Pe[1]]],Nn=Je.left,Gr=Nn===void 0?-1/0:Nn,cr=Je.top,Fa=cr===void 0?-1/0:cr,Fi=Je.right,Ba=Fi===void 0?1/0:Fi,Bi=Je.bottom,Ga=Bi===void 0?1/0:Bi;ur.forEach(function(kr){var ka=kr[0]!==ke[0],za=kr[1]!==ke[1],sn=De(an,kr),lr=360*Fe(me,sn)/Math.PI;if(za){var Yn=sn.slice();(z(lr-360)<2||z(lr-180)<2)&&(Yn[1]=me[1]);var Gi=si(me,Yn,(me[1]<sn[1]?Ga:Fa)-sn[1],!1,Le),ki=C(Gi.offset,2)[1],Aa=Gi.isOutside;isNaN(ki)||(In=dn+(Aa?1:-1)*z(ki))}if(ka){Yn=sn.slice(),(z(lr-90)<2||z(lr-270)<2)&&(Yn[0]=me[0]);var zi=si(me,Yn,(me[0]<sn[0]?Ba:Gr)-sn[0],!0,Le),Ai=C(zi.offset,1)[0],Ia=zi.isOutside;isNaN(Ai)||(An=we+(Ia?1:-1)*z(Ai))}})}return{maxWidth:An,maxHeight:In}}(Gt,Rn,ve,Ve,Ie),Ze=zn.maxWidth,$e=zn.maxHeight,sr=C(function(Ke,an,Pe,me,Le,ke,be,we,dn){var Je=De(an,be),An=_i(Ke,we,{vertical:[Je[0]],horizontal:[Je[1]]}),In=An.horizontal.offset,ur=An.vertical.offset;if(kt(ur,Xr)||kt(In,Xr)){var Nn=C(nr({datas:dn,distX:-ur,distY:-In}),2),Gr=Nn[0],cr=Nn[1];return[Math.min(Le||1/0,Pe+be[0]*Gr)-Pe,Math.min(ke||1/0,me+be[1]*cr)-me]}return[0,0]}(Gt,Vt(Ne,je).map(function(Ke){return Ke.map(function(an){return kt(an,Xr)})}),se+Ne,Oe+je,Ze,$e,ve,Ae,Ie),2);Ne+=he=sr[0],je+=Ue=sr[1]}return[Ne,je]}(Y,function(Gt,Vt){return se=mt,Oe=St,Oi(ve=Sn(Kt||Me,$+Gt,Rt+Vt,le?4:3),ct(Oe,De(ve,se)));var se,Oe,ve},$,Rt,Jt,St,vt,nt)}(e,V,k,ot,K,!dt&&Ft,O)),N&&(!N[0]&&(X[0]=0),!N[1]&&(X[1]=0)),et){ht[0]&&ht[1]&&X[0]&&X[1]&&(z(X[0])>z(X[1])?X[1]=0:X[0]=0);var st=!X[0]&&!X[1];st&&zt(),ht[0]&&!ht[1]||X[0]&&!X[1]||st&&it?(V+=X[0],k=V/Lt):(!ht[0]&&ht[1]||!X[0]&&X[1]||st&&!it)&&(k+=X[1],V=k*Lt)}else V+=X[0],k+=X[1],V=Math.max(0,V),k=Math.max(0,k);n=C(function(Y,$,Rt,Jt){if(!Jt)return Y.map(function(Vt,se){return Qr(Vt,$[se],Rt[se])});var St=Y[0],vt=Y[1],nt=Jt===!0?St/vt:Jt,mt=Vi(Y,$,!1,nt),Kt=mt[0],de=mt[1],Me=Vi(Y,Rt,!0,nt),le=Me[0],Gt=Me[1];return St<Kt||vt<de?(St=Kt,vt=de):(St>le||vt>Gt)&&(St=le,vt=Gt),[St,vt]}([V,k],ce,Te,!!et&&Lt),2),V=n[0],k=n[1],zt(),et&&(ne||Ot)&&(it?k=V/Lt:V=k*Lt);var Pt=[(at=V-pe)-Q,(rt=k-re)-jt];O.prevWidth=at,O.prevHeight=rt;var wt=(r=V,o=k,a=K,s=Zt,c=O,x=(i=e).props.groupable,E=i.state,M=E.transformOrigin,b=E.offsetMatrix,S=E.is3d,R=E.width,G=E.height,P=E.left,D=E.top,_=c.fixedDirection,T=S?4:3,F=x?P:0,B=x?D:0,ct((g=a,v=uo(b,c.nextTargetMatrix||E.targetMatrix,(f=r,p=o,(l=R)===void 0&&(l=f),(d=G)===void 0&&(d=p),(h=M)===void 0&&(h=[0,0]),(u=s)?u.map(function(Y,$){var Rt=Rr(Y),Jt=Rt.value,St=Rt.unit,vt=$?d:l,nt=$?p:f;return Y==="%"||isNaN(Jt)?nt*(vt?h[$]/vt:0):St!=="%"?Jt:nt*Jt/100}):h),T),m=_,y=De(Sn(v,r,o,T),m),[g[0]-y[0],g[1]-y[1]]),[F,B]));if(Mt||!Pt.every(function(Y){return!Y})||!wt.every(function(Y){return!Y})){var H,yt,ft,ut,Yt=Ye.drag(e,ra(t,e.state,wt,!!A,0,"draggable")),oe=Yt.transform,Et=Dt+at,Ct=ue+rt,ae=Xt(e,t,w({width:Et,height:Ct,offsetWidth:Math.round(V),offsetHeight:Math.round(k),startRatio:Lt,boundingWidth:V,boundingHeight:k,direction:ot,dist:[at,rt],delta:Pt,isPinch:!!A,drag:Yt},(H={style:{width:"".concat(Et,"px"),height:"".concat(Ct,"px")},transform:oe},ft=t,ut=(yt=Yt).afterTransform||yt.transform,w(w({},bn(w(w(w({},H.style),yt.style),{transform:ut}),ft)),{afterTransform:ut,transform:H.transform}))));return!_t&&pt(e,"onResize",ae),ae}}function gt(){var Y=O.fixedDirection,$=function(St,vt,nt,mt){var Kt,de=nt.ratio,Me=nt.startOffsetWidth,le=nt.startOffsetHeight,Gt=0,Vt=0,se=mt.distX,Oe=mt.distY,ve=mt.pinchScale,Ve=mt.parentDistance,Ae=mt.parentDist,Ie=mt.parentScale,Rn=nt.fixedDirection,nn=[0,1].map(function(Ge){return z(St[Ge]-Rn[Ge])}),Ne=[0,1].map(function(Ge){var Qt=nn[Ge];return Qt!==0&&(Qt=2/Qt),Qt});if(Ae)Gt=Ae[0],Vt=Ae[1],vt&&(Gt?Vt||(Vt=Gt/de):Gt=Vt*de);else if(Sr(ve))Gt=(ve-1)*Me,Vt=(ve-1)*le;else if(Ie)Gt=(Ie[0]-1)*Me,Vt=(Ie[1]-1)*le;else if(Ve){var je=Me*nn[0],rn=le*nn[1],Fn=Xe([je,rn]);Gt=Ve/Fn*je*Ne[0],Vt=Ve/Fn*rn*Ne[1]}else{var Bn=nr({datas:nt,distX:se,distY:Oe});Gt=(Kt=C(function(Ge,Qt,on,he,Ue){var Gn=C(Ge,2),kn=Gn[0],zn=Gn[1],Ze=0,$e=0;if(Ue&&kn&&zn){var sr=Fe([0,0],Qt),Ke=Fe([0,0],he),an=Xe(Qt),Pe=Math.cos(sr-Ke)*an;if(he[0])if(he[1]){var me=he[0]*kn,Le=he[1]*zn,ke=Math.atan2(me+Qt[0],Le+Qt[1]),be=Math.atan2(me,Le);ke<0&&(ke+=2*Math.PI),be<0&&(be+=2*Math.PI);var we=0;(we=z(ke-be)<Math.PI/2||z(ke-be)>Math.PI/2*3?ke-be:ke-(be+=Math.PI))>2*Math.PI?we-=2*Math.PI:we>Math.PI?we=2*Math.PI-we:we<-Math.PI&&(we=-2*Math.PI-we);var dn=Xe([me+Qt[0],Le+Qt[1]])*Math.cos(we);Ze=dn*Math.sin(be)-me,$e=dn*Math.cos(be)-Le,he[0]<0&&(Ze*=-1),he[1]<0&&($e*=-1)}else $e=(Ze=Pe)/on;else Ze=($e=Pe)*on}else Ze=he[0]*Qt[0],$e=he[1]*Qt[1];return[Ze,$e]}([Me,le],Bn=Ne.map(function(Ge,Qt){return Bn[Qt]*Ge}),de,St,vt),2))[0],Vt=Kt[1]}return{distWidth:Gt,distHeight:Vt}}(ht,et,O,t);at=$.distWidth,rt=$.distHeight;var Rt=ht[0]-Y[0]||et?Math.max(pe+at,Ce):pe,Jt=ht[1]-Y[1]||et?Math.max(re+rt,Ce):re;return et&&pe&&re&&(it?Jt=Rt/Lt:Rt=Jt*Lt),[Rt,Jt]}function zt(){var Y;J&&(Y=C(J([V,k]),2),V=Y[0],k=Y[1]),V=kt(V,q),k=kt(k,q)}},dragControlAfter:function(e,t){var n=t.datas,i=n.isResize,r=n.startOffsetWidth,o=n.startOffsetHeight,a=n.prevWidth,s=n.prevHeight;if(i&&e.props.checkResizableError!==!1){var c=e.state,u=c.width-(r+a),f=c.height-(o+s),p=z(u)>3,l=z(f)>3;return p&&(n.startWidth+=u,n.startOffsetWidth+=u,n.prevWidth+=u),l&&(n.startHeight+=f,n.startOffsetHeight+=f,n.prevHeight+=f),p||l?this.dragControl(e,t):void 0}},dragControlEnd:function(e,t){var n=t.datas,i=t.parentEvent;if(n.isResize){n.isResize=!1;var r=ir(e,t,{});return!i&&pt(e,"onResizeEnd",r),r}},dragGroupControlCondition:xo,dragGroupControlStart:function(e,t){var n=t.datas,i=this.dragControlStart(e,w(w({},t),{isGroup:!0}));if(!i)return!1;var r=pn(e,"resizable",t),o=n.startOffsetWidth,a=n.startOffsetHeight;function s(){var d=n.minSize;r.forEach(function(h){var g=h.datas,v=g.minSize,m=g.startOffsetWidth,y=g.startOffsetHeight,x=o*(m?v[0]/m:0),E=a*(y?v[1]/y:0);d[0]=Math.max(d[0],x),d[1]=Math.max(d[1],E)})}function c(){var d=n.maxSize;r.forEach(function(h){var g=h.datas,v=g.maxSize,m=g.startOffsetWidth,y=g.startOffsetHeight,x=o*(m?v[0]/m:0),E=a*(y?v[1]/y:0);d[0]=Math.min(d[0],x),d[1]=Math.min(d[1],E)})}var u=qr(e,this,"dragControlStart",t,function(d,h){return lo(e,d,n,h)});s(),c();var f=function(d){i.setFixedDirection(d),u.forEach(function(h,g){h.setFixedDirection(d),lo(e,h.moveable,n,r[g])})};n.setFixedDirection=f;var p=w(w({},i),{targets:e.props.targets,events:u.map(function(d){return w(w({},d),{setMin:function(h){d.setMin(h),s()},setMax:function(h){d.setMax(h),c()}})}),setFixedDirection:f,setMin:function(d){i.setMin(d),s()},setMax:function(d){i.setMax(d),c()}}),l=pt(e,"onResizeGroupStart",p);return n.isResize=l!==!1,!!n.isResize&&i},dragGroupControl:function(e,t){var n=t.datas;if(n.isResize){var i=Kn(e.props,"resizable");e._emitter.on("onBeforeResize",function(d){pt(e,"onBeforeResizeGroup",Xt(e,t,w(w({},d),{targets:i.targets}),!0))});var r=this.dragControl(e,w(w({},t),{isGroup:!0}));if(r){var o=r.boundingWidth,a=r.boundingHeight,s=r.dist,c=i.keepRatio,u=[o/(o-s[0]),a/(a-s[1])],f=n.fixedPosition,p=qr(e,this,"dragControl",t,function(d,h){var g=C(ze(Fr(e.rotation/180*Math.PI,3),[h.datas.originalX*u[0],h.datas.originalY*u[1],1],3),2),v=g[0],m=g[1];return w(w({},h),{parentDist:null,parentScale:u,dragClient:Ut(f,[v,m]),parentKeepRatio:c})}),l=w({targets:i.targets,events:p},r);return pt(e,"onResizeGroup",l),l}}},dragGroupControlEnd:function(e,t){var n=t.isDrag;if(t.datas.isResize){this.dragControlEnd(e,t);var i=qr(e,this,"dragControlEnd",t);return pt(e,"onResizeGroupEnd",ir(e,t,{targets:e.props.targets,events:i})),n}},request:function(e){var t={},n=0,i=0,r=!1,o=e.getRect();return{isControl:!0,requestStart:function(a){var s;return r=a.useSnap,{datas:t,parentDirection:a.direction||[1,1],parentIsWidth:(s=a?.horizontal)===null||s===void 0||s,useSnap:r}},request:function(a){return"offsetWidth"in a?n=a.offsetWidth-o.offsetWidth:"deltaWidth"in a&&(n+=a.deltaWidth),"offsetHeight"in a?i=a.offsetHeight-o.offsetHeight:"deltaHeight"in a&&(i+=a.deltaHeight),{datas:t,parentDist:[n,i],parentKeepRatio:a.keepRatio,useSnap:r}},requestEnd:function(){return{datas:t,isDrag:!0,useSnap:r}}}},unset:function(e){e.state.gestos.resizable=null}};function yo(e){return e?e/z(e):0}function xs(e,t,n,i,r,o){var a,s,c,u,f,p=function(v,m,y){var x=[];if(y)z(m[0])!==1||z(m[1])!==1?x.push([m,[-1,-1]],[m,[-1,1]],[m,[1,-1]],[m,[1,1]]):x.push([m,[v[0],-v[1]]],[m,[-v[0],v[1]]]),x.push([m,v]);else if(v[0]&&v[1]||!v[0]&&!v[1]){var E=v[0]?v:[1,1];[1,-1].forEach(function(M){[1,-1].forEach(function(b){var S=[M*E[0],b*E[1]];m[0]===S[0]&&m[1]===S[1]||x.push([m,S])})})}else v[0]?(z(m[0])===1?[1]:[1,-1]).forEach(function(M){x.push([[m[0],-1],[M*v[0],-1]],[[m[0],0],[M*v[0],0]],[[m[0],1],[M*v[0],1]])}):v[1]&&(z(m[1])===1?[1]:[1,-1]).forEach(function(M){x.push([[-1,m[1]],[-1,M*v[1]]],[[0,m[1]],[0,M*v[1]]],[[1,m[1]],[1,M*v[1]]])});return x}(n,o.fixedDirection,i),l=pa(e,t,n,i),d=L(L([],C((a=e,s=t,c=i,u=r,f=o,p.map(function(v){var m,y,x,E,M,b,S,R,G,P,D,_,T,F,B=C(v,2),O=B[0],I=B[1],A=De(s,O),W=De(s,I),j=c?(E=u,b=(M=function(xt,U,J){var lt=sa(xt),q=lt.left,Mt=lt.top,Ot=lt.right,ot=lt.bottom,ht=C(J,2),at=ht[0],rt=ht[1],et=C(ct(J,U),2),Nt=et[0],V=et[1];z(Nt)<Ce&&(Nt=0),z(V)<Ce&&(V=0);var k=V>0,K=Nt>0,X={isBound:!1,offset:0,pos:0},st={isBound:!1,offset:0,pos:0};if(Nt===0&&V===0)return{vertical:X,horizontal:st};if(Nt===0)k?ot<rt&&(st.pos=ot,st.offset=rt-ot):Mt>rt&&(st.pos=Mt,st.offset=rt-Mt);else if(V===0)K?Ot<at&&(X.pos=Ot,X.offset=at-Ot):q>at&&(X.pos=q,X.offset=at-q);else{var Pt=V/Nt,wt=J[1]-Pt*at,H=0,yt=0,ft=!1;K&&Ot<=at?(H=Pt*Ot+wt,yt=Ot,ft=!0):!K&&at<=q&&(H=Pt*q+wt,yt=q,ft=!0),ft&&(H<Mt||H>ot)&&(ft=!1),ft||(k&&ot<=rt?(yt=((H=ot)-wt)/Pt,ft=!0):!k&&rt<=Mt&&(yt=((H=Mt)-wt)/Pt,ft=!0)),ft&&(X.isBound=!0,X.pos=yt,X.offset=at-yt,st.isBound=!0,st.pos=H,st.offset=rt-H)}return{vertical:X,horizontal:st}}(m=a,y=A,x=W)).horizontal,S=M.vertical,G=(R=E?{horizontal:{isSnap:!1},vertical:{isSnap:!1}}:function(xt,U,J){var lt=C(J,2),q=lt[0],Mt=lt[1],Ot=C(U,2),ot=Ot[0],ht=Ot[1],at=C(ct(J,U),2),rt=at[0],et=at[1],Nt=et>0,V=rt>0;rt=Pr(rt),et=Pr(et);var k={isSnap:!1,offset:0,pos:0},K={isSnap:!1,offset:0,pos:0};if(rt===0&&et===0)return{vertical:k,horizontal:K};var X=ca(xt,rt?[q]:[],et?[Mt]:[],[],[],void 0,void 0),st=X.vertical,Pt=X.horizontal;st.posInfos.filter(function($){var Rt=$.pos;return V?Rt>=ot:Rt<=ot}),Pt.posInfos.filter(function($){var Rt=$.pos;return Nt?Rt>=ht:Rt<=ht}),st.isSnap=st.posInfos.length>0,Pt.isSnap=Pt.posInfos.length>0;var wt=ai(st),H=wt.isSnap,yt=wt.guideline,ft=ai(Pt),ut=ft.isSnap,Yt=ft.guideline,oe=ut?Yt.pos[1]:0,Et=H?yt.pos[0]:0;if(rt===0)ut&&(K.isSnap=!0,K.pos=Yt.pos[1],K.offset=Mt-K.pos);else if(et===0)H&&(k.isSnap=!0,k.pos=Et,k.offset=q-Et);else{var Ct=et/rt,ae=J[1]-Ct*q,gt=0,zt=0,Y=!1;H?(gt=Ct*(zt=Et)+ae,Y=!0):ut&&(zt=((gt=oe)-ae)/Ct,Y=!0),Y&&(k.isSnap=!0,k.pos=zt,k.offset=q-zt,K.isSnap=!0,K.pos=gt,K.offset=Mt-gt)}return{vertical:k,horizontal:K}}(m,y,x)).horizontal,P=R.vertical,D=bo(b,G),_=bo(S,P),T=z(D),F=z(_),{horizontal:{isBound:b.isBound,isSnap:G.isSnap,offset:D,dist:T},vertical:{isBound:S.isBound,isSnap:P.isSnap,offset:_,dist:F}}):_i(a,u,{vertical:[W[0]],horizontal:[W[1]]}),N=j.horizontal,dt=N.offset,Ft=N.isBound,ne=N.isSnap,_t=j.vertical,At=_t.offset,It=_t.isBound,Zt=_t.isSnap,Dt=ct(I,O);if(!At&&!dt)return{isBound:It||Ft,isSnap:Zt||ne,sign:Dt,offset:[0,0]};var ue,Q,jt,ce,Te,Lt,pe,re,it,qt,Z,tt,Bt,Tt=(ue=j,Q=c,jt=Fe(A,W)/Math.PI*180,ce=ue.vertical,Te=ce.isBound,Lt=ce.isSnap,pe=ce.dist,re=ue.horizontal,it=re.isBound,qt=re.isSnap,tt=(Z=jt%180)<3||Z>177,Bt=Z>87&&Z<93,re.dist<pe&&(Te||Lt&&!Bt&&(!Q||!tt))?"vertical":!it&&(!qt||tt||Q&&Bt)?"":"horizontal");if(!Tt)return{sign:Dt,isBound:!1,isSnap:!1,offset:[0,0]};var $t=Tt==="vertical",bt=[0,0];return bt=(bt=c||z(I[0])!==1||z(I[1])!==1||O[0]===I[0]||O[1]===I[1]?si(A,W,-($t?At:dt),$t,f).offset:nr({datas:f,distX:-At,distY:-dt})).map(function(xt,U){return xt*(Dt[U]?2/Dt[U]:0)}),{sign:Dt,isBound:$t?It:Ft,isSnap:$t?Zt:ne,offset:bt}}))),!1),C(fa(e,l,o)),!1),h=Tr(d,0),g=Tr(d,1);return{width:{isBound:h.isBound,offset:h.offset[0]},height:{isBound:g.isBound,offset:g.offset[1]}}}function Ht(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Na.apply(void 0,L([wi],C(e),!1))}function da(e){e()}function ys(e){return e&&e!=="none"?qe(e)?e:Si(e):[1,0,0,1,0,0]}function $n(e,t,n){return wr(t,fn(n,t),e,fn(n.map(function(i){return-i}),t))}function Dr(e){return e?e.split(" "):["0","0"]}function ha(e){var t=_e(e)("transform");if(t&&t!=="none")return t;if("transform"in e){var n=e.transform.baseVal;if(!n)return"";var i=n.length;if(!i)return"";for(var r=[],o=function(s){var c=n[s].matrix;r.push("matrix(".concat(["a","b","c","d","e","f"].map(function(u){return c[u]}).join(", "),")"))},a=0;a<i;++a)o(a);return r.join(" ")}return""}function rr(e,t,n,i,r){var o,a,s,c,u=yi(e)||en(e),f=!1;if(!e||n)s=e;else{var p=(o=e?.assignedSlot)===null||o===void 0?void 0:o.parentElement,l=e.parentElement;p?(f=!0,c=l,s=p):s=l}for(var d=!1,h=e===t||s===t,g="relative",v=1,m=parseFloat(r?.("zoom"))||1,y=r?.("position");s&&s!==u;){t===s&&(h=!0);var x=_e(s),E=s.tagName.toLowerCase(),M=ha(s),b=x("willChange"),S=parseFloat(x("zoom"))||1;if(g=x("position"),i&&S!==1){v=S;break}if(!n&&i&&m!==1&&y&&y!=="absolute"||E==="svg"||E==="foreignobject"||g!=="static"||M&&M!=="none"||b==="transform")break;var R=(a=e?.assignedSlot)===null||a===void 0?void 0:a.parentNode,G=s.parentNode;R&&(f=!0,c=G);var P=G;if(P&&P.nodeType===11){d=!0,g=_e(s=P.host)("position");break}s=P,g="relative"}return{offsetZoom:v,hasSlot:f,parentSlotElement:c,isCustomElement:d,isStatic:g==="static",isEnd:h||!s||s===u,offsetParent:s||u}}function Es(e,t){var n,i,r,o,a=e.tagName.toLowerCase(),s=e.offsetLeft,c=e.offsetTop,u=_e(e),f=mi(s),p=!f;return p||a==="svg"&&!e.ownerSVGElement?r=(i=Dr(u("transformOrigin")).map(function(l){return parseFloat(l)})).slice():(r=(i=ta?(o=e,Dr(ma(o,":before").transformOrigin).map(function(l,d){var h,g=Rr(l);return g.value*(h=d===0,g.unit==="%"?ci(o.ownerSVGElement)[h?"width":"height"]/100:1)})):Dr(u("transformOrigin")).map(function(l){return parseFloat(l)})).slice(),p=!0,a==="svg"?(s=0,c=0):(s=(n=C(function(l,d,h){var g=l.tagName.toLowerCase();if(!l.getBBox||!h&&g==="g")return[0,0,0,0];var v=_e(l)("transform-box")==="fill-box",m=l.getBBox(),y=ci(l.ownerSVGElement),x=m.x,E=m.y;g!=="foreignobject"||x||E||(x=parseFloat(l.getAttribute("x"))||0,E=parseFloat(l.getAttribute("y"))||0);var M=x-y.x,b=E-y.y;return[M,b,v?d[0]:d[0]-M,v?d[1]:d[1]-b]}(e,i,e===t&&t.tagName.toLowerCase()==="g"),4))[0],c=n[1],i[0]=n[2],i[1]=n[3])),{tagName:a,isSVG:f,hasOffset:p,offset:[s||0,c||0],origin:i,targetOrigin:r}}function ga(e,t){var n=_e(e),i=_e(en(e)),r=i("position");if(!(t||r&&r!=="static"))return[0,0];var o=parseInt(i("marginLeft"),10),a=parseInt(i("marginTop"),10);return n("position")==="absolute"&&(n("top")==="auto"&&n("bottom")==="auto"||(a=0),n("left")==="auto"&&n("right")==="auto"||(o=0)),[o,a]}function ui(e){e.forEach(function(t){var n=t.matrix;n&&(t.matrix=ln(n,3,4))})}function Ss(e){for(var t=e.parentElement,n=!1,i=en(e);t;){var r=ma(t).transform;if(r&&r!=="none"){n=!0;break}if(t===i)break;t=t.parentElement}return{fixedContainer:t||i,hasTransform:n}}function Ti(e,t){return t===void 0&&(t=e.length>9),"".concat(t?"matrix3d":"matrix","(").concat(Xo(e,!t).join(","),")")}function ci(e){var t=e.clientWidth,n=e.clientHeight;if(!e)return{x:0,y:0,width:0,height:0,clientWidth:t,clientHeight:n};var i=e.viewBox,r=i&&i.baseVal||{x:0,y:0,width:0,height:0};return{x:r.x,y:r.y,width:r.width||t,height:r.height||n,clientWidth:t,clientHeight:n}}function Ds(e,t){var n,i=ci(e),r=i.width,o=i.height,a=i.clientWidth,s=i.clientHeight,c=a/r,u=s/o,f=e.preserveAspectRatio.baseVal,p=f.align,l=f.meetOrSlice,d=[0,0],h=[c,u],g=[0,0];if(p!==1){var v=(p-2)%3,m=Math.floor((p-2)/3);d[0]=r*v/2,d[1]=o*m/2;var y=l===2?Math.max(u,c):Math.min(c,u);h[0]=y,h[1]=y,g[0]=(a-r)/2*v,g[1]=(s-o)/2*m}var x=Ho(h,t);return n=C(g,2),x[t*(t-1)]=n[0],x[t*(t-1)+1]=n[1],$n(x,t,d)}function He(e,t,n){return ze(e,or(t,n),n)}function Sn(e,t,n,i){return[[0,0],[t,0],[0,n],[t,n]].map(function(r){return He(e,r,i)})}function Br(e){var t=e.map(function(s){return s[0]}),n=e.map(function(s){return s[1]}),i=Math.min.apply(Math,L([],C(t),!1)),r=Math.min.apply(Math,L([],C(n),!1)),o=Math.max.apply(Math,L([],C(t),!1)),a=Math.max.apply(Math,L([],C(n),!1));return{left:i,top:r,right:o,bottom:a,width:o-i,height:a-r}}function Eo(e,t,n,i){return Br(Sn(e,t,n,i))}function Xe(e){return Math.sqrt(e[0]*e[0]+e[1]*e[1])}function Ms(e,t,n,i){n===void 0&&(n=1),i===void 0&&(i=Fe(e,t));var r,o,a=(r=e,Xe([(o=t)[0]-r[0],o[1]-r[1]]));return{transform:"translateY(-50%) translate(".concat(e[0],"px, ").concat(e[1],"px) rotate(").concat(i,"rad) scaleY(").concat(n,")"),width:"".concat(a,"px")}}function Or(e,t){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];var r=n.length,o=n.reduce(function(s,c){return s+c[0]},0)/r,a=n.reduce(function(s,c){return s+c[1]},0)/r;return{transform:"translateZ(0px) translate(".concat(o,"px, ").concat(a,"px) rotate(").concat(e,"rad) scale(").concat(t,")")}}function Kn(e,t){var n=e[t];return qe(n)?w(w({},e),n):e}function So(e){var t=e&&!mi(e.offsetWidth),n=0,i=0,r=0,o=0,a=0,s=0,c=0,u=0,f=0,p=0,l=0,d=0,h=1/0,g=1/0,v=1/0,m=1/0,y=0,x=0,E=!1;if(e)if(!t&&e.ownerSVGElement){var M=e.getBBox();E=!0,a=n=M.width,s=i=M.height,c=n,u=i,r=n,o=i}else{var b=_e(e),S=e.style,R=b("boxSizing")==="border-box",G=parseFloat(b("borderLeftWidth"))||0,P=parseFloat(b("borderRightWidth"))||0,D=parseFloat(b("borderTopWidth"))||0,_=parseFloat(b("borderBottomWidth"))||0,T=(parseFloat(b("paddingLeft"))||0)+(parseFloat(b("paddingRight"))||0),F=(parseFloat(b("paddingTop"))||0)+(parseFloat(b("paddingBottom"))||0),B=T+(G+P),O=F+(D+_),I=b("position"),A=0,W=0;if("clientLeft"in e){var j;if(j=I==="absolute"?rr(e,en(e)).offsetParent:e.parentElement){var N=_e(j);A=parseFloat(N("width")),W=parseFloat(N("height"))}}f=Math.max(T,Se(b("minWidth"),A)||0),p=Math.max(F,Se(b("minHeight"),W)||0),h=Se(b("maxWidth"),A),g=Se(b("maxHeight"),W),isNaN(h)&&(h=1/0),isNaN(g)&&(g=1/0),y=Se(S.width,0)||0,x=Se(S.height,0)||0,a=parseFloat(b("width"))||0,s=parseFloat(b("height"))||0,n=c=z(a-y)<1?Qr(f,y||a,h):a,i=u=z(s-x)<1?Qr(p,x||s,g):s,r=c,o=u,R?(v=h,m=g,l=f,d=p,c=n-B,u=i-O):(v=h+B,m=g+O,l=f+B,d=p+O,n=c+B,i=u+O),r=c+T,o=u+F}return{svg:E,offsetWidth:n,offsetHeight:i,clientWidth:r,clientHeight:o,contentWidth:c,contentHeight:u,inlineCSSWidth:y,inlineCSSHeight:x,cssWidth:a,cssHeight:s,minWidth:f,minHeight:p,maxWidth:h,maxHeight:g,minOffsetWidth:l,minOffsetHeight:d,maxOffsetWidth:v,maxOffsetHeight:m}}function va(e,t){var n=e===en(e)||e===yi(e),i={clientLeft:e.clientLeft,clientTop:e.clientTop,clientWidth:e.clientWidth,clientHeight:e.clientHeight,scrollWidth:e.scrollWidth,scrollHeight:e.scrollHeight,overflow:!1};return n&&(i.clientHeight=Math.max(t.height,i.clientHeight),i.scrollHeight=Math.max(t.height,i.scrollHeight)),i.overflow=_e(e)("overflow")!=="visible",w(w({},t),i)}function Vr(e,t,n,i){var r=e.left,o=e.right,a=e.top,s=e.bottom,c=t.top,u=t.left,f={left:u+r,top:c+a,right:u+o,bottom:c+s,width:o-r,height:s-a};return n&&i?va(n,f):f}function br(e,t){var n=0,i=0,r=0,o=0;if(e){var a=e.getBoundingClientRect();n=a.left,i=a.top,r=a.width,o=a.height}var s={left:n,top:i,width:r,height:o,right:n+r,bottom:i+o};return e&&t?va(e,s):s}function Oi(e,t){return[Ut(t,e[0]),Ut(t,e[1]),Ut(t,e[2]),Ut(t,e[3])]}function tn(e){var t=e.left,n=e.top;return Oi([e.pos1,e.pos2,e.pos3,e.pos4],[t,n])}function li(e,t){e[t?"controlAbles":"targetAbles"].forEach(function(n){n.unset&&n.unset(e)})}function mn(e,t){var n=t?"controlGesto":"targetGesto",i=e[n];i?.isIdle()===!1&&li(e,t),i?.unset(),e[n]=null}function bn(e,t){if(t){var n=En(t);n.nextStyle=w(w({},n.nextStyle),e)}return{style:e,cssText:tr(e).map(function(i){return"".concat((r=i,r.replace(/([a-z])([A-Z])/g,function(o,a,s){return a+"-"+s.toLowerCase()})),": ").concat(e[i],";");var r}).join("")}}function Xt(e,t,n,i){var r=t.datas;r.datas||(r.datas={});var o=w(w({},n),{target:e.state.target,clientX:t.clientX,clientY:t.clientY,inputEvent:t.inputEvent,currentTarget:e,moveable:e,datas:r.datas,isRequest:t.isRequest,isRequestChild:t.isRequestChild,isFirstDrag:!!t.isFirstDrag,isTrusted:t.isTrusted!==!1,stopAble:function(){r.isEventStart=!1},stopDrag:function(){var a;(a=t.stop)===null||a===void 0||a.call(t)}});return r.isStartEvent?i||(r.lastEvent=o):r.isStartEvent=!0,o}function ir(e,t,n){var i=t.datas,r="isDrag"in n?n.isDrag:t.isDrag;return i.datas||(i.datas={}),w(w({isDrag:r},n),{moveable:e,target:e.state.target,clientX:t.clientX,clientY:t.clientY,inputEvent:t.inputEvent,currentTarget:e,lastEvent:i.lastEvent,isDouble:t.isDouble,datas:i.datas,isFirstDrag:!!t.isFirstDrag})}function pt(e,t,n,i,r){return e.triggerEvent(t,n,i,r)}function ma(e,t){return Qe(e).getComputedStyle(e,t)}function xr(e,t,n){var i={},r={};return e.filter(function(o){var a=o.name;if(i[a]||!t.some(function(s){return o[s]}))return!1;if(!n&&o.ableGroup){if(r[o.ableGroup])return!1;r[o.ableGroup]=!0}return i[a]=!0,!0})}function fi(e,t){return e===t||e==null&&t==null}function Do(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n=e.length-1,i=0;i<n;++i){var r=e[i];if(!mi(r))return r}return e[n]}function ba(e){return e.reduce(function(t,n){return t.concat(n)},[])}function xn(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.sort(function(n,i){return z(i)-z(n)}),e[0]}function Pi(e,t,n){return ze(cn(e,n),or(t,n),n)}function Re(e,t,n,i){if(!n[0]&&!n[1])return t;var r=He(e,[yo(n[0]||1),0],i),o=He(e,[0,yo(n[1]||1)],i);return Ut(t,He(e,[n[0]/Xe(r),n[1]/Xe(o)],i))}function Pr(e){return z(e)<=Ce?0:e}function pi(e,t){return t===void 0&&(t=[e]),function(n,i){if(i.isRequest)return!!t.some(function(o){return i.requestAble===o})&&i.parentDirection;var r=i.inputEvent.target;return We(r,Ht("direction"))&&(!e||We(r,Ht(e)))}}function Dn(e,t){return e?Ei(e)?e:On(e)?t?document.querySelector(e):e:zo(e)?e():Wo(e)?e:"current"in e?e.current:e:null}function xa(e,t){return e?((n=e)&&qe(n)&&!Ei(n)&&(ye(n)||"length"in n)?[].slice.call(e):[e]).reduce(function(i,r){return ye(r)?i.push(xa(r,t)):i.push(Dn(r,t)),i},[]):[];var n}function di(e,t){if(t){if(e==="left")return{x:"0%",y:"50%"};if(e==="top")return{x:"50%",y:"50%"};if(e==="center")return{x:"50%",y:"50%"};if(e==="right")return{x:"100%",y:"50%"};if(e==="bottom")return{x:"50%",y:"100%"};var n=C(e.split(" "),2),i=n[0],r=n[1],o=di(i||""),a=di(r||""),s=w(w({},o),a),c={x:"50%",y:"50%"};return s.x&&(c.x=s.x),s.y&&(c.y=s.y),s.value&&(s.x&&!s.y&&(c.y=s.value),!s.x&&s.y&&(c.x=s.value)),c}return e==="left"?{x:"0%"}:e==="right"?{x:"100%"}:e==="top"?{y:"0%"}:e==="bottom"?{y:"100%"}:e?e==="center"?{value:"50%"}:{value:e}:{}}function ya(e,t,n){var i=di(e,!0),r=i.x,o=i.y;return[Se(r,t)||0,Se(o,n)||0]}function Ea(e,t){return e.length===t.length&&e.every(function(n,i){var r=t[i],o=ye(n),a=ye(r);return o&&a?Ea(n,r):!o&&!a&&n===r})}function Mo(e,t,n,i,r){var o=e._store,a=o[t];return!(t in o)||a!==n&&i(a)!==i(n)?(o[t]=n,n):a}function Mn(e){return e>=0?1:-1}function z(e){return Math.abs(e)}function Sa(e){return Sr(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}}pi("",["resizable","scalable"]),er("pinchable",{props:["pinchable"],events:["pinchStart","pinch","pinchEnd","pinchGroupStart","pinchGroup","pinchGroupEnd"],dragStart:function(){return!0},pinchStart:function(e,t){var n=t.datas,i=t.targets,r=t.angle,o=t.originalDatas,a=e.props,s=a.pinchable,c=a.ables;if(!s)return!1;var u="onPinch".concat(i?"Group":"","Start"),f="drag".concat(i?"Group":"","ControlStart"),p=(s===!0?e.controlAbles:c.filter(function(g){return s.indexOf(g.name)>-1})).filter(function(g){return g.canPinch&&g[f]}),l=Xt(e,t,{});i&&(l.targets=i);var d=pt(e,u,l);n.isPinch=d!==!1,n.ables=p;var h=n.isPinch;return!!h&&(p.forEach(function(g){if(o[g.name]=o[g.name]||{},g[f]){var v=w(w({},t),{datas:o[g.name],parentRotate:r,isPinch:!0});g[f](e,v)}}),e.state.snapRenderInfo={request:t.isRequest,direction:[0,0]},h)},pinch:function(e,t){var n=t.datas,i=t.scale,r=t.distance,o=t.originalDatas,a=t.inputEvent,s=t.targets,c=t.angle;if(n.isPinch){var u=r*(1-1/i),f=Xt(e,t,{});s&&(f.targets=s);var p="onPinch".concat(s?"Group":"");pt(e,p,f);var l=n.ables,d="drag".concat(s?"Group":"","Control");return l.forEach(function(h){h[d]&&h[d](e,w(w({},t),{datas:o[h.name],inputEvent:a,resolveMatrix:!0,pinchScale:i,parentDistance:u,parentRotate:c,isPinch:!0}))}),f}},pinchEnd:function(e,t){var n=t.datas,i=t.isPinch,r=t.inputEvent,o=t.targets,a=t.originalDatas;if(n.isPinch){var s="onPinch".concat(o?"Group":"","End"),c=ir(e,t,{isDrag:i});o&&(c.targets=o),pt(e,s,c);var u=n.ables,f="drag".concat(o?"Group":"","ControlEnd");return u.forEach(function(p){p[f]&&p[f](e,w(w({},t),{isDrag:i,datas:a[p.name],inputEvent:r,isPinch:!0}))}),i}},pinchGroupStart:function(e,t){return this.pinchStart(e,w(w({},t),{targets:e.props.targets}))},pinchGroup:function(e,t){return this.pinch(e,w(w({},t),{targets:e.props.targets}))},pinchGroupEnd:function(e,t){return this.pinchEnd(e,w(w({},t),{targets:e.props.targets}))}}),pi("scalable");var ws=Ht("area-pieces"),yr=Ht("area-piece"),Da=Ht("avoid"),Cs=Ht("view-dragging");function Ur(e){var t=e.areaElement;if(t){var n=e.state,i=n.width,r=n.height;Yo(t,Da),t.style.cssText+="left: 0px; top: 0px; width: ".concat(i,"px; height: ").concat(r,"px")}}function wo(e){return e.createElement("div",{key:"area_pieces",className:ws},e.createElement("div",{className:yr}),e.createElement("div",{className:yr}),e.createElement("div",{className:yr}),e.createElement("div",{className:yr}))}var _s={name:"dragArea",props:["dragArea","passDragArea"],events:["click","clickGroup"],render:function(e,t){var n=e.props,i=n.target,r=n.dragArea,o=n.groupable,a=n.passDragArea,s=e.getState(),c=s.width,u=s.height,f=s.renderPoses,p=a?Ht("area","pass"):Ht("area");if(o)return[t.createElement("div",{key:"area",ref:un(e,"areaElement"),className:p}),wo(t)];if(!i||!r)return[];var l=jo([0,0],[c,0],[0,u],[c,u],f[0],f[1],f[2],f[3]),d=l.length?Ti(l,!0):"none";return[t.createElement("div",{key:"area",ref:un(e,"areaElement"),className:p,style:{top:"0px",left:"0px",width:"".concat(c,"px"),height:"".concat(u,"px"),transformOrigin:"0 0",transform:d}}),wo(t)]},dragStart:function(e,t){var n=t.datas,i=t.clientX,r=t.clientY;if(!t.inputEvent)return!1;n.isDragArea=!1;var o=e.areaElement,a=e.state,s=a.moveableClientRect,c=a.renderPoses,u=a.rootMatrix,f=a.is3d,p=s.left,l=s.top,d=Br(c),h=d.left,g=d.top,v=d.width,m=d.height,y=C(Pi(u,[i-p,r-l],f?4:3),2),x=y[0],E=y[1],M=[{left:h,top:g,width:v,height:(E-=g)-10},{left:h,top:g,width:(x-=h)-10,height:m},{left:h,top:g+E+10,width:v,height:m-E-10},{left:h+x+10,top:g,width:v-x-10,height:m}],b=[].slice.call(o.nextElementSibling.children);M.forEach(function(S,R){b[R].style.cssText="left: ".concat(S.left,"px;top: ").concat(S.top,"px; width: ").concat(S.width,"px; height: ").concat(S.height,"px;")}),No(o,Da),a.disableNativeEvent=!0},drag:function(e,t){var n=t.datas,i=t.inputEvent;if(this.enableNativeEvent(e),!i)return!1;n.isDragArea||(n.isDragArea=!0,Ur(e))},dragEnd:function(e,t){this.enableNativeEvent(e);var n=t.inputEvent,i=t.datas;if(!n)return!1;i.isDragArea||Ur(e)},dragGroupStart:function(e,t){return this.dragStart(e,t)},dragGroup:function(e,t){return this.drag(e,t)},dragGroupEnd:function(e,t){return this.dragEnd(e,t)},unset:function(e){Ur(e),e.state.disableNativeEvent=!1},enableNativeEvent:function(e){var t=e.state;t.disableNativeEvent&&Io(function(){t.disableNativeEvent=!1})}};er("origin",{props:["origin","svgOrigin"],render:function(e,t){var n,i=e.props,r=i.zoom,o=i.svgOrigin,a=i.groupable,s=e.getState(),c=s.beforeOrigin,u=s.rotation,f=s.svg,p=s.allMatrix,l=s.is3d,d=s.left,h=s.top,g=s.offsetWidth,v=s.offsetHeight;if(!a&&f&&o){var m=C(ya(o,g,v),2);n=Or(u,r,ct(He(p,[m[0],m[1]],l?4:3),[d,h]))}else n=Or(u,r,c);return[t.createElement("div",{className:Ht("control","origin"),style:n,key:"beforeOrigin"})]}});var Ts={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"]};er("padding",{props:["padding"],render:function(e,t){var n=e.props;if(n.dragArea)return[];var i=Sa(n.padding||{}),r=i.left,o=i.top,a=i.right,s=i.bottom,c=e.getState(),u=c.renderPoses,f=[c.pos1,c.pos2,c.pos3,c.pos4],p=[];return r>0&&p.push([0,2]),o>0&&p.push([0,1]),a>0&&p.push([1,3]),s>0&&p.push([2,3]),p.map(function(l,d){var h=C(l,2),g=h[0],v=h[1],m=jo([0,0],[100,0],[0,100],[100,100],f[g],f[v],u[g],u[v]);if(m.length)return t.createElement("div",{key:"padding".concat(d),className:Ht("padding"),style:{transform:Ti(m,!0)}})})}});var Os={isPinch:!0,name:"beforeRenderable",props:[],events:["beforeRenderStart","beforeRender","beforeRenderEnd","beforeRenderGroupStart","beforeRenderGroup","beforeRenderGroupEnd"],dragRelation:"weak",setTransform:function(e,t){var n,i,r,o=e.state,a=o.is3d,s=o.targetMatrix,c=o.inlineTransform,u=a?"matrix3d(".concat(s.join(","),")"):"matrix(".concat(Xo(s,!0),")"),f=c&&c!=="none"?c:u;t.datas.startTransforms=(n=f,r=Wt((i=a)?4:3),n==="matrix".concat(i?"3d":"","(").concat(r.join(","),")")||n==="matrix(1,0,0,1,0,0)"?[]:Qn(f))},resetStyle:function(e){var t=e.datas;t.nextStyle={},t.nextTransforms=e.datas.startTransforms,t.nextTransformAppendedIndexes=[]},fillDragStartParams:function(e,t){return Xt(e,t,{setTransform:function(n){t.datas.startTransforms=ye(n)?n:Qn(n)},isPinch:!!t.isPinch})},fillDragParams:function(e,t){return Xt(e,t,{isPinch:!!t.isPinch})},dragStart:function(e,t){this.setTransform(e,t),this.resetStyle(t),pt(e,"onBeforeRenderStart",this.fillDragStartParams(e,t))},drag:function(e,t){t.datas.startTransforms||this.setTransform(e,t),this.resetStyle(t),pt(e,"onBeforeRender",Xt(e,t,{isPinch:!!t.isPinch}))},dragEnd:function(e,t){t.datas.startTransforms||(this.setTransform(e,t),this.resetStyle(t)),pt(e,"onBeforeRenderEnd",Xt(e,t,{isPinch:!!t.isPinch,isDrag:t.isDrag}))},dragGroupStart:function(e,t){var n=this;this.dragStart(e,t);var i=pn(e,"beforeRenderable",t),r=e.moveables,o=i.map(function(a,s){var c=r[s];return n.setTransform(c,a),n.resetStyle(a),n.fillDragStartParams(c,a)});pt(e,"onBeforeRenderGroupStart",Xt(e,t,{isPinch:!!t.isPinch,targets:e.props.targets,setTransform:function(){},events:o}))},dragGroup:function(e,t){var n=this;this.drag(e,t);var i=pn(e,"beforeRenderable",t),r=e.moveables,o=i.map(function(a,s){var c=r[s];return n.resetStyle(a),n.fillDragParams(c,a)});pt(e,"onBeforeRenderGroup",Xt(e,t,{isPinch:!!t.isPinch,targets:e.props.targets,events:o}))},dragGroupEnd:function(e,t){this.dragEnd(e,t),pt(e,"onBeforeRenderGroupEnd",Xt(e,t,{isPinch:!!t.isPinch,isDrag:t.isDrag,targets:e.props.targets}))},dragControlStart:function(e,t){return this.dragStart(e,t)},dragControl:function(e,t){return this.drag(e,t)},dragControlEnd:function(e,t){return this.dragEnd(e,t)},dragGroupControlStart:function(e,t){return this.dragGroupStart(e,t)},dragGroupControl:function(e,t){return this.dragGroup(e,t)},dragGroupControlEnd:function(e,t){return this.dragGroupEnd(e,t)}},Ps={name:"renderable",props:[],events:["renderStart","render","renderEnd","renderGroupStart","renderGroup","renderGroupEnd"],dragRelation:"weak",dragStart:function(e,t){pt(e,"onRenderStart",Xt(e,t,{isPinch:!!t.isPinch}))},drag:function(e,t){pt(e,"onRender",this.fillDragParams(e,t))},dragAfter:function(e,t){return this.drag(e,t)},dragEnd:function(e,t){pt(e,"onRenderEnd",this.fillDragEndParams(e,t))},dragGroupStart:function(e,t){pt(e,"onRenderGroupStart",Xt(e,t,{isPinch:!!t.isPinch,targets:e.props.targets}))},dragGroup:function(e,t){var n=this,i=pn(e,"beforeRenderable",t),r=e.moveables,o=i.map(function(a,s){var c=r[s];return n.fillDragParams(c,a)});pt(e,"onRenderGroup",Xt(e,t,w(w({isPinch:!!t.isPinch,targets:e.props.targets,transform:gr(t),transformObject:{}},bn(vr(t))),{events:o})))},dragGroupEnd:function(e,t){var n=this,i=pn(e,"beforeRenderable",t),r=e.moveables,o=i.map(function(a,s){var c=r[s];return n.fillDragEndParams(c,a)});pt(e,"onRenderGroupEnd",Xt(e,t,w({isPinch:!!t.isPinch,isDrag:t.isDrag,targets:e.props.targets,events:o,transformObject:{},transform:gr(t)},bn(vr(t)))))},dragControlStart:function(e,t){return this.dragStart(e,t)},dragControl:function(e,t){return this.drag(e,t)},dragControlAfter:function(e,t){return this.dragAfter(e,t)},dragControlEnd:function(e,t){return this.dragEnd(e,t)},dragGroupControlStart:function(e,t){return this.dragGroupStart(e,t)},dragGroupControl:function(e,t){return this.dragGroup(e,t)},dragGroupControlEnd:function(e,t){return this.dragGroupEnd(e,t)},fillDragParams:function(e,t){var n={};return Cn(_r(t)||[]).forEach(function(i){n[i.name]=i.functionValue}),Xt(e,t,w({isPinch:!!t.isPinch,transformObject:n,transform:gr(t)},bn(vr(t))))},fillDragEndParams:function(e,t){var n={};return Cn(_r(t)||[]).forEach(function(i){n[i.name]=i.functionValue}),Xt(e,t,w({isPinch:!!t.isPinch,isDrag:t.isDrag,transformObject:n,transform:gr(t)},bn(vr(t))))}};function Jn(e,t,n,i,r,o,a){o.clientDistX=o.distX,o.clientDistY=o.distY;var s=r==="Start",c=r==="End",u=r==="After",f=e.state.target,p=o.isRequest,l=i.indexOf("Control")>-1;if(!f||s&&l&&!p&&e.areaElement===o.inputEvent.target)return!1;var d=L([],C(t),!1);if(p){var h=o.requestAble;d.some(function(D){return D.name===h})||d.push.apply(d,L([],C(e.props.ables.filter(function(D){return D.name===h})),!1))}if(!d.length||d.every(function(D){return D.dragRelation}))return!1;var g,v=o.inputEvent;c&&v&&(g=document.elementFromPoint(o.clientX,o.clientY)||v.target);var m=!1,y=function(){var D;m=!0,(D=o.stop)===null||D===void 0||D.call(o)},x=s&&(!e.targetGesto||!e.controlGesto||!e.targetGesto.isFlag()||!e.controlGesto.isFlag());x&&e.updateRect(r,!0,!1);var E=o.datas,M=l?"controlGesto":"targetGesto",b=e[M],S=function(D,_,T){if(!(_ in D)||b!==e[M])return!1;var F=D.name,B=E[F]||(E[F]={});if(s&&(B.isEventStart=!T||!D[T]||D[T](e,o)),!B.isEventStart)return!1;var O=D[_](e,w(w({},o),{stop:y,datas:B,originalDatas:E,inputTarget:g}));return e._emitter.off(),s&&O===!1&&(B.isEventStart=!1),O};x&&d.forEach(function(D){D.unset&&D.unset(e)}),S(Os,"drag".concat(i).concat(r));var R=0,G=0;n.forEach(function(D){if(m)return!1;var _,T,F,B,O="".concat(D).concat(i).concat(r),I="".concat(D).concat(i,"Condition");r!==""||p||(_=e.state,T=o,B=_.is3d?4:3,F=C(Pi(_.rootMatrix,[T.distX,T.distY],B),2),T.distX=F[0],T.distY=F[1]);var A=d.filter(function(j){return j[O]}),W=(A=A.filter(function(j,N){return j.name&&A.indexOf(j)===N})).filter(function(j){return S(j,O,I)}).length;m&&++R,W&&++G,!m&&s&&A.length&&!W&&(R+=A.filter(function(j){var N=j.name;return!!E[N].isEventStart&&j.dragRelation!=="strong"}).length?1:0)}),u&&!G||S(Ps,"drag".concat(i).concat(r));var P=b!==e[M]||R===n.length;return(c||m||P)&&(e.state.gestos={},e.moveables&&e.moveables.forEach(function(D){D.state.gestos={}}),d.forEach(function(D){D.unset&&D.unset(e)})),s&&!P&&!p&&G&&e.props.preventDefault&&o?.preventDefault(),!e.isUnmounted&&!P&&((!s&&G&&!a||c)&&(e.props.flushSync||da)(function(){e.updateRect(c?r:"",!0,!1),e.forceUpdate()}),s||c||u||!G||a||Jn(e,t,n,i,r+"After",o),!0)}function Ri(e,t){return function(n,i){var r;i===void 0&&(i=n.inputEvent.target);var o=i,a=e.areaElement,s=e._dragTarget;return!(!s||!t&&(r=e.controlGesto)!==null&&r!==void 0&&r.isFlag())&&(o===s||s.contains(o)||o===a||!e.isMoveableElement(o)&&!e.controlBox.contains(o)||We(o,"moveable-area")||We(o,"moveable-padding")||We(o,"moveable-edgeDraggable"))}}function Ma(e,t,n){var i=e.controlBox,r=[],o=e.props,a=o.dragArea,s=e.state.target,c=o.dragTarget;r.push(i),a&&!c||r.push(t),!a&&c&&s&&t!==s&&o.dragTargetSelf&&r.push(s);var u=Ri(e);return Ca(e,r,"targetAbles",n,{dragStart:u,pinchStart:u})}function wa(e,t){var n=e.controlBox,i=[];i.push(n);var r=Ri(e,!0),o=function(a,s){return s===void 0&&(s=a.inputEvent.target),s===n||!r(a,s)};return Ca(e,i,"controlAbles",t,{dragStart:o,pinchStart:o})}function Ca(e,t,n,i,r){r===void 0&&(r={});var o=n==="targetAbles",a=e.props,s=a.pinchOutside,c=a.pinchThreshold,u=a.preventClickEventOnDrag,f=a.preventClickDefault,p=a.checkInput,l=a.dragFocusedInput,d=a.preventDefault,h=d===void 0||d,g=a.preventRightClick,v=g===void 0||g,m=a.preventWheelClick,y={preventDefault:h,preventRightClick:v,preventWheelClick:m===void 0||m,container:Dn(a.dragContainer,!0)||Qe(e.getControlBoxElement()),pinchThreshold:c,pinchOutside:s,preventClickEventOnDrag:!!o&&u,preventClickEventOnDragStart:!!o&&f,preventClickEventByCondition:o?null:function(M){return e.controlBox.contains(M.target)},checkInput:!!o&&p,dragFocusedInput:l},x=new rs(t,y),E=i==="Control";return["drag","pinch"].forEach(function(M){["Start","","End"].forEach(function(b){x.on("".concat(M).concat(b),function(S){var R,G=S.eventType,P=M==="drag"&&S.isPinch;if(!r[G]||r[G](S)){if(!P){var D=M==="drag"?[M]:["drag",M],_=L([],C(e[n]),!1);Jn(e,_,D,i,b,S)?(e.props.stopPropagation||b==="Start"&&E)&&((R=S?.inputEvent)===null||R===void 0||R.stopPropagation()):S.stop()}}else S.stop()})})}),x}var Rs=function(){function e(t,n,i){var r=this;this.target=t,this.moveable=n,this.eventName=i,this.ables=[],this._onEvent=function(o){var a=r.eventName,s=r.moveable;s.state.disableNativeEvent||r.ables.forEach(function(c){c[a](s,{inputEvent:o})})},t.addEventListener(i.toLowerCase(),this._onEvent)}return e.prototype.setAbles=function(t){this.ables=t},e.prototype.destroy=function(){this.target.removeEventListener(this.eventName.toLowerCase(),this._onEvent),this.target=null,this.moveable=null},e}();function hi(e,t,n,i,r,o){o===void 0&&(o=[]);var a=1,s=[0,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},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},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},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},l=[0,0],d={},h=function(_,T,F,B){F===void 0&&(F=T);var O,I,A=0,W=0,j=0,N={},dt=So(_);if(_&&(A=dt.offsetWidth,W=dt.offsetHeight),_){var Ft=function(At,It,Zt,Dt){var ue;Zt===void 0&&(Zt=It);var Q=co(At,It),jt=Q.matrixes,ce=Q.is3d,Te=Q.targetMatrix,Lt=Q.transformOrigin,pe=Q.targetOrigin,re=Q.offsetContainer,it=Q.hasFixed,qt=Q.zoom,Z=function(k,K){if(vn){var X=Be(vn,function(Pt){return Pt[0][0]==k&&Pt[0][1]==K});if(X)return X[1]}var st=co(k,K,!0);return vn&&vn.push([[k,K],st]),st}(re,Zt),tt=Z.matrixes,Bt=Z.is3d,Tt=Z.offsetContainer,$t=Z.zoom,bt=Dt,xt=At.tagName.toLowerCase()!=="svg"&&"ownerSVGElement"in At,U=Te,J=Wt(4),lt=Wt(4),q=Wt(4),Mt=Wt(4),Ot=jt.length,ot=tt.map(function(k){return w(w({},k),{matrix:k.matrix?L([],C(k.matrix),!1):void 0})}).reverse();jt.reverse(),!ce&&bt&&(U=ln(U,3,4),ui(jt)),!Bt&&bt&&ui(ot),ot.forEach(function(k){lt=ie(lt,k.matrix,4)});var ht=Zt||en(At),at=((ue=ot[0])===null||ue===void 0?void 0:ue.target)||rr(ht,ht,!0).offsetParent,rt=ot.slice(1).reduce(function(k,K){return ie(k,K.matrix,4)},Wt(4));jt.forEach(function(k,K){if(Ot-2===K&&(q=J.slice()),Ot-1===K&&(Mt=J.slice()),!k.matrix){var X=function(st,Pt,wt,H,yt){var ft,ut=st.target,Yt=st.origin,oe=Pt.matrix,Et=So(ut),Ct=Et.offsetWidth,ae=Et.offsetHeight,gt=wt.getBoundingClientRect(),zt=[0,0];wt===en(wt)&&(zt=ga(ut,!0));for(var Y=ut.getBoundingClientRect(),$=Y.left-gt.left+wt.scrollLeft-(wt.clientLeft||0)+zt[0],Rt=Y.top-gt.top+wt.scrollTop-(wt.clientTop||0)+zt[1],Jt=Y.width,St=Y.height,vt=wr(4,yt,oe),nt=Eo(vt,Ct,ae,4),mt=nt.left,Kt=nt.top,de=nt.width,Me=nt.height,le=He(vt,Yt,4),Gt=ct(le,[mt,Kt]),Vt=[$+Gt[0]*Jt/de,Rt+Gt[1]*St/Me],se=[0,0],Oe=0;++Oe<10;){var ve=cn(yt,4);ft=C(ct(He(ve,Vt,4),He(ve,le,4)),2),se[0]=ft[0],se[1]=ft[1];var Ve=Eo(wr(4,yt,fn(se,4),oe),Ct,ae,4),Ae=Ve.left-$,Ie=Ve.top-Rt;if(z(Ae)<2&&z(Ie)<2)break;Vt[0]-=Ae,Vt[1]-=Ie}return se.map(function(Rn){return Math.round(Rn)})}(k,jt[K+1],at,0,ie(rt,J,4));k.matrix=fn(X,4)}J=ie(J,k.matrix,4)});var et=!xt&&ce;U||(U=Wt(et?4:3));var Nt=Ti(xt&&U.length===16?ln(U,4,3):U,et),V=lt;return lt=function(k){for(var K=k.slice(),X=0;X<4;++X)K[4*X+4-1]=0,K[12+X]=0;return K[15]=1,K}(lt),{hasZoom:qt!==1||$t!==1,hasFixed:it,matrixes:jt,rootMatrix:lt,originalRootMatrix:V,beforeMatrix:q,offsetMatrix:Mt,allMatrix:J,targetMatrix:U,targetTransform:Nt,inlineTransform:At.style.transform,transformOrigin:Lt,targetOrigin:pe,is3d:bt,offsetContainer:re,offsetRootContainer:Tt}}(_,T,F,B),ne=Wn(Ft.allMatrix,Ft.transformOrigin,A,W);N=w(w({},Ft),ne);var _t=Wn(Ft.allMatrix,[50,50],100,100);O=[_t.pos1,_t.pos2],j=Fe((I=_t.direction)>0?O[0]:O[1],I>0?O[1]:O[0])}return w(w(w({hasZoom:!1,width:A,height:W,rotation:j},dt),{originalRootMatrix:Wt(4),rootMatrix:Wt(4),beforeMatrix:Wt(4),offsetMatrix:Wt(4),allMatrix:Wt(4),targetMatrix:Wt(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:[]}),N)}(t,n,r,!0);if(t){var g=_e(t);o.forEach(function(_){d[_]=g(_)});var v=h.is3d?4:3,m=Wn(h.offsetMatrix,Ut(h.transformOrigin,function(_,T){T===void 0&&(T=Math.sqrt(_.length));for(var F=[],B=_[T*T-1],O=0;O<T-1;++O)F[O]=_[T*(T-1)+O]/B;return F[T-1]=0,F}(h.targetMatrix,v)),h.width,h.height);a=m.direction,s=Ut(m.origin,[m.left-h.left,m.top-h.top]),p=br(h.offsetRootContainer);var y=rr(i,i,!0).offsetParent||h.offsetRootContainer;if(h.hasZoom){var x=Wn(ie(h.originalRootMatrix,h.allMatrix),h.transformOrigin,h.width,h.height),E=Wn(h.originalRootMatrix,Dr(_e(y)("transformOrigin")).map(function(_){return parseFloat(_)}),y.offsetWidth,y.offsetHeight);if(c=Vr(x,p),f=Vr(E,p,y,!0),e){var M=x.left,b=x.top;u=Vr({left:M,top:b,bottom:b,right:b},p)}}else{c=br(t),f=function(_){var T=Zn?.get(_);if(T)return T;var F=br(_,!0);return Zn&&Zn.set(_,F),F}(y),e&&(u=br(e));var S=f.left,R=f.top,G=f.clientLeft,P=f.clientTop,D=[c.left-S,c.top-R];l=ct(Pi(h.rootMatrix,D,4),[G+h.left,P+h.top])}}return w({targetClientRect:c,containerClientRect:f,moveableClientRect:u,rootContainerClientRect:p,beforeDirection:a,beforeOrigin:s,originalBeforeOrigin:s,target:t,style:d,offsetDelta:l},h)}function Co(e){var t=e.pos1,n=e.pos2,i=e.pos3,r=e.pos4;if(!(t&&n&&i&&r))return null;var o=yn([t,n,i,r]),a=[o.minX,o.minY],s=ct(e.origin,a);return t=ct(t,a),n=ct(n,a),i=ct(i,a),r=ct(r,a),w(w({},e),{left:e.left,top:e.top,posDelta:a,pos1:t,pos2:n,pos3:i,pos4:r,origin:s,beforeOrigin:s,isPersisted:!0})}var Tn=function(e){function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.state=w({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]},hi(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 Uo,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(){if(!n.isDragging()){var i=n.props.parentMoveable;i?i.checkUpdateRect():(Xa(n._observerId),n._observerId=Io(function(){n.isDragging()||n.updateRect()}))}},n._onPreventClick=function(i){i.stopPropagation(),i.preventDefault()},n}return ar(t,e),t.prototype.render=function(){var n=this.props,i=this.getState(),r=n.parentPosition,o=n.className,a=n.target,s=n.zoom,c=n.cspNonce,u=n.translateZ,f=n.cssStyled,p=n.groupable,l=n.linePadding,d=n.controlPadding;this._checkUpdateRootContainer(),this.checkUpdate(),this.updateRenderPoses();var h=C(r||[0,0],2),g=h[0],v=h[1],m=i.left,y=i.top,x=i.target,E=i.direction,M=i.hasFixed,b=i.offsetDelta,S=n.targets,R=this.isDragging(),G={};this.getEnabledAbles().forEach(function(B){G["data-able-".concat(B.name.toLowerCase())]=!0});var P=this._getAbleClassName(),D=S&&S.length&&(x||p)||a||!this._hasFirstTarget&&this.state.isPersisted,_=this.controlBox||this.props.firstRenderState||this.props.persistData,T=[m-g,y-v];!p&&n.useAccuratePosition&&(T[0]+=b[0],T[1]+=b[1]);var F={position:M?"fixed":"absolute",display:D?"block":"none",visibility:_?"visible":"hidden",transform:"translate3d(".concat(T[0],"px, ").concat(T[1],"px, ").concat(u,")"),"--zoom":s,"--zoompx":"".concat(s,"px")};return l&&(F["--moveable-line-padding"]=l),d&&(F["--moveable-control-padding"]=d),xe.reactExports.createElement(f,w({cspNonce:c,ref:un(this,"controlBox"),className:"".concat(Ht("control-box",E===-1?"reverse":"",R?"dragging":"")," ").concat(P," ").concat(o)},G,{onClick:this._onPreventClick,style:F}),this.renderAbles(),this._renderLines())},t.prototype.componentDidMount=function(){this.isMoveableMounted=!0,this.isUnmounted=!1;var n=this.props,i=n.parentMoveable,r=n.container;this._checkUpdateRootContainer(),this._checkUpdateViewContainer(),this._updateTargets(),this._updateNativeEvents(),this._updateEvents(),this.updateCheckInput(),this._updateObserver(this.props),r||i||this.state.isPersisted||(this.updateRect("",!1,!1),this.forceUpdate())},t.prototype.componentDidUpdate=function(n){this._checkUpdateRootContainer(),this._checkUpdateViewContainer(),this._updateNativeEvents(),this._updateTargets(),this._updateEvents(),this.updateCheckInput(),this._updateObserver(n)},t.prototype.componentWillUnmount=function(){var n,i;this.isMoveableMounted=!1,this.isUnmounted=!0,this._emitter.off(),(n=this._reiszeObserver)===null||n===void 0||n.disconnect(),(i=this._mutationObserver)===null||i===void 0||i.disconnect(),this._viewContainer&&this._changeAbleViewClassNames([]),mn(this,!1),mn(this,!0);var r=this.events;for(var o in r){var a=r[o];a&&a.destroy()}},t.prototype.getTargets=function(){var n=this.props.target;return n?[n]:[]},t.prototype.getAble=function(n){return Be(this.props.ables||[],function(i){return i.name===n})},t.prototype.getContainer=function(){var n=this.props,i=n.parentMoveable,r=n.wrapperMoveable;return n.container||r&&r.getContainer()||i&&i.getContainer()||this.controlBox.parentElement},t.prototype.getControlBoxElement=function(){return this.controlBox},t.prototype.getDragElement=function(){return this._dragTarget},t.prototype.isMoveableElement=function(n){var i;return n&&(((i=n.getAttribute)===null||i===void 0?void 0:i.call(n,"class"))||"").indexOf(wi)>-1},t.prototype.dragStart=function(n,i){i===void 0&&(i=n.target);var r=this.targetGesto,o=this.controlGesto;return r&&Ri(this)({inputEvent:n},i)?r.isFlag()||r.triggerDragStart(n):o&&this.isMoveableElement(i)&&(o.isFlag()||o.triggerDragStart(n)),this},t.prototype.hitTest=function(n){var i,r=this.state,o=r.target,a=r.pos1,s=r.pos2,c=r.pos3,u=r.pos4,f=r.targetClientRect;if(!o)return 0;if(Ei(n)){var p=n.getBoundingClientRect();i={left:p.left,top:p.top,width:p.width,height:p.height}}else i=w({width:0,height:0},n);var l=i.left,d=i.top,h=i.width,g=i.height,v=Qi([a,s,u,c],f),m=Ji(function(x,E){var M=x.slice(),b=E.slice();Ui(M)===-1&&M.reverse(),Ui(b)===-1&&b.reverse();var S=ni(M),R=ni(b),G=S.map(function(T){return Cr(T[0],T[1])}),P=R.map(function(T){return Cr(T[0],T[1])}),D=[];G.forEach(function(T,F){var B=S[F],O=[];P.forEach(function(I,A){var W=Zo(Di(T,I),[B,R[A]]);O.push.apply(O,W.map(function(j){return{index1:F,index2:A,pos:j,type:"intersection"}}))}),O.sort(function(I,A){return Ln(B[0],I.pos)-Ln(B[0],A.pos)}),D.push.apply(D,O),Ir(B[1],b)&&D.push({index1:F,index2:-1,pos:B[1],type:"inside"})}),R.forEach(function(T,F){if(Ir(T[1],M)){var B=!1,O=wn(D,function(I){return I.index2===F?(B=!0,!1):!!B});O===-1&&(B=!1,O=wn(D,function(I){var A=I.index1,W=I.index2;return A===-1&&W+1===F?(B=!0,!1):!!B})),O===-1?D.push({index1:-1,index2:F,pos:T[1],type:"inside"}):D.splice(O,0,{index1:-1,index2:F,pos:T[1],type:"inside"})}});var _={};return D.filter(function(T){var F=T.pos,B=F[0]+"x"+F[1];return!_[B]&&(_[B]=!0,!0)})}(v,[[l,d],[l+h,d],[l+h,d+g],[l,d+g]]).map(function(x){return x.pos})),y=Ji(v);return m&&y?Math.min(100,m/y*100):0},t.prototype.isInside=function(n,i){var r=this.state,o=r.target,a=r.pos1,s=r.pos2,c=r.pos3,u=r.pos4,f=r.targetClientRect;return!!o&&Ir([n,i],Qi([a,s,u,c],f))},t.prototype.updateRect=function(n,i,r){r===void 0&&(r=!0);var o=this.props,a=!o.parentPosition&&!o.wrapperMoveable;a&&_n(!0);var s=o.parentMoveable,c=this.state.target||o.target,u=this.getContainer(),f=s?s._rootContainer:this._rootContainer,p=hi(this.controlBox,c,u,u,f||u,this._getRequestStyles());if(!c&&this._hasFirstTarget&&o.persistData){var l=Co(o.persistData);for(var d in l)p[d]=l[d]}a&&_n(),this.updateState(p,!s&&r)},t.prototype.isDragging=function(n){var i,r,o=this.targetGesto,a=this.controlGesto;return o?.isFlag()?!n||!((i=o.getEventData()[n])===null||i===void 0||!i.isEventStart):!(!a?.isFlag()||n&&((r=a.getEventData()[n])===null||r===void 0||!r.isEventStart))},t.prototype.updateTarget=function(n){this.updateRect(n,!0)},t.prototype.getRect=function(){var n=this.state,i=tn(this.state),r=C(i,4),o=r[0],a=r[1],s=r[2],c=r[3],u=Br(i),f=n.width,p=n.height,l=u.width,d=u.height,h=u.left,g=u.top,v=[n.left,n.top],m=Ut(v,n.origin);return{width:l,height:d,left:h,top:g,pos1:o,pos2:a,pos3:s,pos4:c,offsetWidth:f,offsetHeight:p,beforeOrigin:Ut(v,n.beforeOrigin),origin:m,transformOrigin:n.transformOrigin,rotation:this.getRotation()}},t.prototype.getManager=function(){return this},t.prototype.stopDrag=function(n){var i;n&&n!=="target"||(((i=this.targetGesto)==null?void 0:i.isIdle())===!1&&li(this,!1),i?.stop()),n&&n!=="control"||(((i=this.controlGesto)==null?void 0:i.isIdle())===!1&&li(this,!0),i?.stop())},t.prototype.getRotation=function(){var n,i,r,o,a=this.state;return n=a.pos1,i=a.pos2,r=a.direction,o=Fe(n,i)/Math.PI*180,(o=r>=0?o:180-o)>=0?o:360+o},t.prototype.request=function(n,i,r){i===void 0&&(i={});var o=this,a=o.props,s=a.parentMoveable||a.wrapperMoveable||o,c=s.props.ables,u=a.groupable,f=Be(c,function(m){return m.name===n});if(this.isDragging()||!f||!f.request)return{request:function(){return this},requestEnd:function(){return this}};var p=f.request(o),l=r||i.isInstant,d=p.isControl?"controlAbles":"targetAbles",h="".concat(u?"Group":"").concat(p.isControl?"Control":""),g=L([],C(s[d]),!1),v={request:function(m){return Jn(o,g,["drag"],h,"",w(w({},p.request(m)),{requestAble:n,isRequest:!0}),l),v},requestEnd:function(){return Jn(o,g,["drag"],h,"End",w(w({},p.requestEnd()),{requestAble:n,isRequest:!0}),l),v}};return Jn(o,g,["drag"],h,"Start",w(w({},p.requestStart(i)),{requestAble:n,isRequest:!0}),l),l?v.request(i).requestEnd():v},t.prototype.getMoveables=function(){return[this]},t.prototype.destroy=function(){this.componentWillUnmount()},t.prototype.updateRenderPoses=function(){var n=this.getState(),i=this.props,r=i.padding,o=n.originalBeforeOrigin,a=n.transformOrigin,s=n.allMatrix,c=n.is3d,u=n.pos1,f=n.pos2,p=n.pos3,l=n.pos4,d=n.left,h=n.top,g=n.isPersisted,v=i.zoom||1;if(!r&&v<=1)return n.renderPoses=[u,f,p,l],void(n.renderLines=[[u,f],[f,l],[l,p],[p,u]]);var m=Sa(r||{}),y=m.left,x=m.top,E=m.bottom,M=m.right,b=c?4:3,S=wr(b,fn((g?a:this.controlBox&&i.groupable?o:Ut(o,[d,h])).map(function(T){return-T}),b),s,fn(a,b)),R=Re(S,u,[-y,-x],b),G=Re(S,f,[M,-x],b),P=Re(S,p,[-y,E],b),D=Re(S,l,[M,E],b);n.renderPoses=[R,G,P,D],n.renderLines=[[R,G],[G,D],[D,P],[P,R]];var _=v/2;n.renderLines=[[Re(S,u,[-y-_,-x],b),Re(S,f,[M+_,-x],b)],[Re(S,f,[M,-x-_],b),Re(S,l,[M,E+_],b)],[Re(S,l,[M+_,E],b),Re(S,p,[-y-_,E],b)],[Re(S,p,[-y,E+_],b),Re(S,u,[-y,-x-_],b)]]},t.prototype.checkUpdate=function(){this._isPropTargetChanged=!1;var n=this.props,i=n.target,r=n.container,o=n.parentMoveable,a=this.state,s=a.target,c=a.container;if(s||i){this.updateAbles();var u=!fi(s,i);if(u||!fi(c,r)){var f=r||this.controlBox;f&&this.unsetAbles(),this.updateState({target:i,container:r}),!o&&f&&this.updateRect("End",!1,!1),this._isPropTargetChanged=u}}},t.prototype.waitToChangeTarget=function(){return new Promise(function(){})},t.prototype.triggerEvent=function(n,i){var r=this.props;if(this._emitter.trigger(n,i),r.parentMoveable&&i.isRequest&&!i.isRequestChild)return r.parentMoveable.triggerEvent(n,i,!0);var o=r[n];return o&&o(i)},t.prototype.useCSS=function(n,i){var r=this.props.customStyledMap,o=n+i;return r[o]||(r[o]=Ko(n,i)),r[o]},t.prototype.getState=function(){var n,i=this.props;(i.target||(n=i.targets)!==null&&n!==void 0&&n.length)&&(this._hasFirstTarget=!0);var r=this.controlBox,o=i.persistData,a=i.firstRenderState;if(a&&!r)return a;if(!this._hasFirstTarget&&o){var s=Co(o);if(s)return this.updateState(s,!1),this.state}return this.state.isPersisted=!1,this.state},t.prototype.updateSelectors=function(){},t.prototype.unsetAbles=function(){var n=this;this.targetAbles.forEach(function(i){i.unset&&i.unset(n)})},t.prototype.updateAbles=function(n,i){n===void 0&&(n=this.props.ables),i===void 0&&(i="");var r=this.props.triggerAblesSimultaneously,o=this.getEnabledAbles(n),a="drag".concat(i,"Start"),s="pinch".concat(i,"Start"),c="drag".concat(i,"ControlStart"),u=xr(o,[a,s],r),f=xr(o,[c],r);this.enabledAbles=o,this.targetAbles=u,this.controlAbles=f},t.prototype.updateState=function(n,i){if(i){if(this.isUnmounted)return;this.setState(n)}else{var r=this.state;for(var o in n)r[o]=n[o]}},t.prototype.getEnabledAbles=function(n){n===void 0&&(n=this.props.ables);var i=this.props;return n.filter(function(r){return r&&(r.always&&i[r.name]!==!1||i[r.name])})},t.prototype.renderAbles=function(){var n,i,r,o,a=this,s=this.props.triggerAblesSimultaneously,c={createElement:xe.reactExports.createElement};return this.renderState={},(n=ba(xr(this.getEnabledAbles(),["render"],s).map(function(u){return(0,u.render)(a,c)||[]})).filter(function(u){return u}),i=function(u){return u.key},r=[],o={},n.forEach(function(u,f){var p=i(u),l=o[p];l||(l=[],o[p]=l,r.push(l)),l.push(u)}),r).map(function(u){return u[0]})},t.prototype.updateCheckInput=function(){this.targetGesto&&(this.targetGesto.options.checkInput=this.props.checkInput)},t.prototype._getRequestStyles=function(){return this.getEnabledAbles().reduce(function(n,i){var r,o,a=(o=(r=i.requestStyle)===null||r===void 0?void 0:r.call(i))!==null&&o!==void 0?o:[];return L(L([],C(n),!1),C(a),!1)},L([],C(this.props.requestStyles||[]),!1))},t.prototype._updateObserver=function(n){this._updateResizeObserver(n),this._updateMutationObserver(n)},t.prototype._updateEvents=function(){var n=this.targetAbles.length,i=this.controlAbles.length,r=this._dragTarget;(!n&&this.targetGesto||this._isTargetChanged(!0))&&(mn(this,!1),this.updateState({gestos:{}})),i||mn(this,!0),r&&n&&!this.targetGesto&&(this.targetGesto=Ma(this,r,"")),!this.controlGesto&&i&&(this.controlGesto=wa(this,"Control"))},t.prototype._updateTargets=function(){var n=this.props;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=Dn(this._originalDragTarget,!0)},t.prototype._renderLines=function(){var n=this.props,i=n.zoom,r=n.hideDefaultLines,o=n.hideChildMoveableDefaultLines,a=n.parentMoveable;if(r||a&&o)return[];var s=this.getState(),c={createElement:xe.reactExports.createElement};return s.renderLines.map(function(u,f){return Ci(c,"",u[0],u[1],i,"render-line-".concat(f))})},t.prototype._isTargetChanged=function(n){var i=this.props,r=i.dragTarget||i.target,o=this._prevOriginalDragTarget,a=this._prevDragArea,s=i.dragArea;return!s&&o!==r||(n||s)&&a!==s||this._prevPropTarget!=this._propTarget},t.prototype._updateNativeEvents=function(){var n=this,i=this.props.dragArea?this.areaElement:this.state.target,r=this.events,o=tr(r);if(this._isTargetChanged())for(var a in r){var s=r[a];s&&s.destroy(),r[a]=null}if(i){var c=this.enabledAbles;o.forEach(function(u){var f=xr(c,[u]),p=f.length>0,l=r[u];p?(l||(l=new Rs(i,n,u),r[u]=l),l.setAbles(f)):l&&(l.destroy(),r[u]=null)})}},t.prototype._checkUpdateRootContainer=function(){var n=this.props.rootContainer;!this._rootContainer&&n&&(this._rootContainer=Dn(n,!0))},t.prototype._checkUpdateViewContainer=function(){var n=this.props.viewContainer;!this._viewContainer&&n&&(this._viewContainer=Dn(n,!0)),this._viewContainer&&this._changeAbleViewClassNames(L(L([],C(this._getAbleViewClassNames()),!1),[this.isDragging()?Cs:""],!1))},t.prototype._changeAbleViewClassNames=function(n){var i,r,o,a=this._viewContainer,s=(i=n.filter(Boolean),r=[],o=[],i.forEach(function(l,d){var h=l,g=o.indexOf(h),v=r[g]||[];g===-1&&(o.push(h),r.push(v)),v.push(l)}),r).map(function(l){return C(l,1)[0]}),c=this._viewClassNames,u=Lo(c,s),f=u.removed,p=u.added;f.forEach(function(l){Yo(a,c[l])}),p.forEach(function(l){No(a,s[l])}),this._viewClassNames=s},t.prototype._getAbleViewClassNames=function(){var n=this;return(this.getEnabledAbles().map(function(i){var r;return((r=i.viewClassName)===null||r===void 0?void 0:r.call(i,n))||""}).join(" ")+" ".concat(this._getAbleClassName("-view"))).split(/\s+/g)},t.prototype._getAbleClassName=function(n){var i=this;n===void 0&&(n="");var r=this.getEnabledAbles(),o=this.targetGesto,a=this.controlGesto,s=o?.isFlag()?o.getEventData():{},c=a?.isFlag()?a.getEventData():{};return r.map(function(u){var f,p,l,d=u.name,h=((f=u.className)===null||f===void 0?void 0:f.call(u,i))||"";return(!((p=s[d])===null||p===void 0)&&p.isEventStart||!((l=c[d])===null||l===void 0)&&l.isEventStart)&&(h+=" ".concat(Ht("".concat(d).concat(n,"-dragging")))),h.trim()}).filter(Boolean).join(" ")},t.prototype._updateResizeObserver=function(n){var i,r=this.props,o=r.target,a=Qe(this.getControlBoxElement());if(a.ResizeObserver&&o&&r.useResizeObserver){if(n.target!==o||!this._reiszeObserver){var s=new a.ResizeObserver(this.checkUpdateRect);s.observe(o,{box:"border-box"}),this._reiszeObserver=s}}else(i=this._reiszeObserver)===null||i===void 0||i.disconnect()},t.prototype._updateMutationObserver=function(n){var i,r=this,o=this.props,a=o.target,s=Qe(this.getControlBoxElement());if(s.MutationObserver&&a&&o.useMutationObserver){if(n.target!==a||!this._mutationObserver){var c=new s.MutationObserver(function(u){var f,p;try{for(var l=function(g){var v=typeof Symbol=="function"&&Symbol.iterator,m=v&&g[v],y=0;if(m)return m.call(g);if(g&&typeof g.length=="number")return{next:function(){return g&&y>=g.length&&(g=void 0),{value:g&&g[y++],done:!g}}};throw new TypeError(v?"Object is not iterable.":"Symbol.iterator is not defined.")}(u),d=l.next();!d.done;d=l.next()){var h=d.value;h.type==="attributes"&&h.attributeName==="style"&&r.checkUpdateRect()}}catch(g){f={error:g}}finally{try{d&&!d.done&&(p=l.return)&&p.call(l)}finally{if(f)throw f.error}}});c.observe(a,{attributes:!0}),this._mutationObserver=c}}else(i=this._mutationObserver)===null||i===void 0||i.disconnect()},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:da,firstRenderState:null,persistData:null,viewContainer:null,requestStyles:[],useAccuratePosition:!1},t}(xe.reactExports.PureComponent),_a={name:"groupable",props:["defaultGroupRotate","useDefaultGroupRotate","defaultGroupOrigin","groupable","groupableProps","targetGroups","hideChildMoveableDefaultLines"],events:[],render:function(e,t){var n,i=e.props,r=i.targets||[],o=e.getState(),a=o.left,s=o.top,c=o.isPersisted,u=i.zoom||1,f=e.renderGroupRects,p=((n=i.persistData)===null||n===void 0?void 0:n.children)||[];c?r=p.map(function(){return null}):p=[];var l=Mo(e,"parentPosition",[a,s],function(h){return h.join(",")}),d=Mo(e,"requestStyles",e.getRequestChildStyles(),function(h){return h.join(",")});return e.moveables=e.moveables.slice(0,r.length),L(L([],C(r.map(function(h,g){return t.createElement(Tn,{key:"moveable"+g,ref:Go(e,"moveables",g),target:h,origin:!1,requestStyles:d,cssStyled:i.cssStyled,customStyledMap:i.customStyledMap,useResizeObserver:i.useResizeObserver,useMutationObserver:i.useMutationObserver,hideChildMoveableDefaultLines:i.hideChildMoveableDefaultLines,parentMoveable:e,parentPosition:[a,s],persistData:p[g],zoom:u})})),!1),C(ba(f.map(function(h,g){var v=[h.pos1,h.pos2,h.pos3,h.pos4];return[[0,1],[1,3],[3,2],[2,0]].map(function(m,y){var x=C(m,2),E=x[0],M=x[1];return Ci(t,"",ct(v[E],l),ct(v[M],l),u,"group-rect-".concat(g,"-").concat(y))})}))),!1)}};function hn(e){var t=e.originalDatas.draggable;return t||(e.originalDatas.draggable={},t=e.originalDatas.draggable),w(w({},e),{datas:t})}er("clickable",{props:["clickable"],events:["click","clickGroup"],always:!0,dragRelation:"weak",dragStart:function(){},dragControlStart:function(){},dragGroupStart:function(e,t){t.datas.inputTarget=t.inputEvent&&t.inputEvent.target},dragEnd:function(e,t){var n=e.props.target,i=t.inputEvent,r=t.inputTarget,o=!e.isMoveableElement(r)&&e.controlBox.contains(r);if(i&&r&&!t.isDrag&&!e.isMoveableElement(r)&&!o){var a=n.contains(r);pt(e,"onClick",Xt(e,t,{isDouble:t.isDouble,inputTarget:r,isTarget:n===r,moveableTarget:e.props.target,containsTarget:a}))}},dragGroupEnd:function(e,t){var n=t.inputEvent,i=t.inputTarget;if(n&&i&&!t.isDrag&&!e.isMoveableElement(i)&&t.datas.inputTarget!==i){var r=e.props.targets,o=r.indexOf(i),a=o>-1,s=!1;o===-1&&(s=(o=wn(r,function(c){return c.contains(i)}))>-1),pt(e,"onClickGroup",Xt(e,t,{isDouble:t.isDouble,targets:r,inputTarget:i,targetIndex:o,isTarget:a,containsTarget:s,moveableTarget:r[o]}))}},dragControlEnd:function(e,t){this.dragEnd(e,t)},dragGroupControlEnd:function(e,t){this.dragEnd(e,t)}}),er("edgeDraggable",{css:[`.edge.edgeDraggable.line {
159
- cursor: move;
160
- }`],render:function(e,t){var n=e.props,i=n.edgeDraggable;return i?aa(t,"edgeDraggable",i,e.getState().renderPoses,n.zoom):[]},dragCondition:function(e,t){var n,i=e.props,r=(n=t.inputEvent)===null||n===void 0?void 0:n.target;return!(!i.edgeDraggable||!r)&&!i.draggable&&We(r,Ht("direction"))&&We(r,Ht("edge"))&&We(r,Ht("edgeDraggable"))},dragStart:function(e,t){return Ye.dragStart(e,hn(t))},drag:function(e,t){return Ye.drag(e,hn(t))},dragEnd:function(e,t){return Ye.dragEnd(e,hn(t))},dragGroupCondition:function(e,t){var n,i=e.props,r=(n=t.inputEvent)===null||n===void 0?void 0:n.target;return!(!i.edgeDraggable||!r)&&!i.draggable&&We(r,Ht("direction"))&&We(r,Ht("line"))},dragGroupStart:function(e,t){return Ye.dragGroupStart(e,hn(t))},dragGroup:function(e,t){return Ye.dragGroup(e,hn(t))},dragGroupEnd:function(e,t){return Ye.dragGroupEnd(e,hn(t))},unset:function(e){return Ye.unset(e)}});var Fs={name:"individualGroupable",props:["individualGroupable","individualGroupableProps"],events:[]};function _o(e,t){var n=C(e,3),i=n[0],r=n[1],o=n[2];return(i*t[0]+r*t[1]+o)/Math.sqrt(i*i+r*r)}function Er(e,t){var n=C(e,2),i=n[0],r=n[1];return-i*t[0]-r*t[1]}function To(e,t){return Math.max.apply(Math,L([],C(e.map(function(n){var i=C(n,4),r=i[0],o=i[1],a=i[2],s=i[3];return Math.max(r[t],o[t],a[t],s[t])})),!1))}function Oo(e,t){return Math.min.apply(Math,L([],C(e.map(function(n){var i=C(n,4),r=i[0],o=i[1],a=i[2],s=i[3];return Math.min(r[t],o[t],a[t],s[t])})),!1))}function Ta(e,t){var n=t.map(function(i){if(ye(i)){var r=Ta(e,i),o=r.length;return o>1?r:o===1?r[0]:null}var a=Be(e,function(s){return s.manager.props.target===i});return a?(a.finded=!0,a.manager):null}).filter(Boolean);return n.length===1&&ye(n[0])?n[0]:n}var Bs=function(e){function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.differ=new Vo,n.moveables=[],n.transformOrigin="50% 50%",n.renderGroupRects=[],n._targetGroups=[],n._hasFirstTargets=!1,n}return ar(t,e),t.prototype.componentDidMount=function(){e.prototype.componentDidMount.call(this)},t.prototype.checkUpdate=function(){this._isPropTargetChanged=!1,this.updateAbles()},t.prototype.getTargets=function(){return this.props.targets},t.prototype.updateRect=function(n,i,r){var o;r===void 0&&(r=!0);var a,s,c,u,f,p=this.state;if(this.controlBox&&!p.isPersisted){_n(!0),this.moveables.forEach(function(Q){Q.updateRect(n,!1,!1)});var l=this.props,d=this.moveables,h=p.target||l.target,g=d.map(function(Q){return{finded:!1,manager:Q}}),v=this.props.targetGroups||[],m=Ta(g,v),y=l.useDefaultGroupRotate;m.push.apply(m,L([],C(g.filter(function(Q){return!Q.finded}).map(function(Q){return Q.manager})),!1));var x=[],E=!i||n!==""&&l.updateGroup,M=l.defaultGroupRotate||0;if(!this._hasFirstTargets){var b=(o=l.persistData)===null||o===void 0?void 0:o.rotation;b!=null&&(M=b)}var S=function Q(jt,ce,Te){var Lt,pe=jt.map(function(Z){if(ye(Z)){var tt=Q(Z,ce),Bt=[tt.pos1,tt.pos2,tt.pos3,tt.pos4];return x.push(tt),{poses:Bt,rotation:tt.rotation}}return{poses:tn(Z.state),rotation:Z.getRotation()}}),re=pe.map(function(Z){return Z.rotation}),it=re[0],qt=re.every(function(Z){return Math.abs(it-Z)<.1});return Lt=E?!y&&qt?it:M:y||Te||!qt?ce:it,function(Z,tt){var Bt,Tt,$t,bt=[0,0],xt=[0,0],U=[0,0],J=[0,0],lt=0,q=0;if(!Z.length)return{pos1:bt,pos2:xt,pos3:U,pos4:J,minX:0,minY:0,maxX:0,maxY:0,width:lt,height:q,rotation:tt};var Mt=kt(tt,Ce);if(Mt%90){var Ot=Mt/180*Math.PI,ot=Math.tan(Ot),ht=-1/ot,at=[ii,oo],rt=[[0,0],[0,0]],et=[ii,oo],Nt=[[0,0],[0,0]];Z.forEach(function(ae){ae.forEach(function(gt){var zt=_o([-ot,1,0],gt),Y=_o([-ht,1,0],gt);at[0]>zt&&(rt[0]=gt,at[0]=zt),at[1]<zt&&(rt[1]=gt,at[1]=zt),et[0]>Y&&(Nt[0]=gt,et[0]=Y),et[1]<Y&&(Nt[1]=gt,et[1]=Y)})});var V=C(rt,2),k=V[0],K=V[1],X=C(Nt,2),st=X[0],Pt=X[1],wt=[-ot,1,Er([-ot,1],k)],H=[-ot,1,Er([-ot,1],K)],yt=[-ht,1,Er([-ht,1],st)],ft=[-ht,1,Er([-ht,1],Pt)];bt=(Bt=C([[wt,yt],[wt,ft],[H,yt],[H,ft]].map(function(ae){var gt=C(ae,2);return Di(gt[0],gt[1])[0]}),4))[0],xt=Bt[1],U=Bt[2],J=Bt[3],lt=et[1]-et[0],q=at[1]-at[0]}else{var ut=Oo(Z,0),Yt=Oo(Z,1),oe=To(Z,0),Et=To(Z,1);bt=[ut,Yt],xt=[oe,Yt],U=[ut,Et],J=[oe,Et],lt=oe-ut,q=Et-Yt,Mt%180&&(bt=(Tt=C([U,bt,J,xt],4))[0],xt=Tt[1],U=Tt[2],J=Tt[3],lt=Et-Yt,q=oe-ut)}Mt%360>180&&(bt=($t=C([J,U,xt,bt],4))[0],xt=$t[1],U=$t[2],J=$t[3]);var Ct=yn([bt,xt,U,J]);return{pos1:bt,pos2:xt,pos3:U,pos4:J,width:lt,height:q,minX:Ct.minX,minY:Ct.minY,maxX:Ct.maxX,maxY:Ct.maxY,rotation:tt}}(pe.map(function(Z){return Z.poses}),Lt)}(m,this.rotation,!0);E&&(this.rotation=S.rotation,this.transformOrigin=l.defaultGroupOrigin||"50% 50%",this.scale=[1,1]),this._targetGroups=v,this.renderGroupRects=x;var R=this.transformOrigin,G=this.rotation,P=this.scale,D=S.width,_=S.height,T=S.minX,F=S.minY,B=yn((a=[[0,0],[D,0],[0,_],[D,_]],s=ya(R,D,_),c=this.rotation/180*Math.PI,u=a.map(function(Q){return ct(Q,s)}),f=u.map(function(Q){return jt=Q,ze(Fr(c,3),or(jt,3));var jt}),{prev:u,next:f,result:f.map(function(Q){return Ut(Q,s)})}).result),O=B.minX,I=B.minY,A=" rotate(".concat(G,"deg)")+" scale(".concat(Mn(P[0]),", ").concat(Mn(P[1]),")"),W="translate(".concat(-O,"px, ").concat(-I,"px)").concat(A);this.controlBox.style.transform="translate3d(".concat(T,"px, ").concat(F,"px, ").concat(this.props.translateZ||0,")"),h.style.cssText+="left:0px;top:0px;"+"transform-origin:".concat(R,";")+"width:".concat(D,"px;height:").concat(_,"px;")+"transform: ".concat(W),p.width=D,p.height=_;var j=this.getContainer(),N=hi(this.controlBox,h,this.controlBox,this.getContainer(),this._rootContainer||j,[]),dt=[N.left,N.top],Ft=C(tn(N),4),ne=Ft[0],_t=Ft[1],At=Ft[2],It=Ft[3],Zt=yn([ne,_t,At,It]),Dt=[Zt.minX,Zt.minY],ue=Mn(P[0]*P[1]);N.pos1=ct(ne,Dt),N.pos2=ct(_t,Dt),N.pos3=ct(At,Dt),N.pos4=ct(It,Dt),N.left=T-N.left+Dt[0],N.top=F-N.top+Dt[1],N.origin=ct(Ut(dt,N.origin),Dt),N.beforeOrigin=ct(Ut(dt,N.beforeOrigin),Dt),N.originalBeforeOrigin=Ut(dt,N.originalBeforeOrigin),N.transformOrigin=ct(Ut(dt,N.transformOrigin),Dt),h.style.transform="translate(".concat(-O-Dt[0],"px, ").concat(-I-Dt[1],"px)")+A,_n(),this.updateState(w(w({},N),{posDelta:Dt,direction:ue,beforeDirection:ue}),r)}},t.prototype.getRect=function(){return w(w({},e.prototype.getRect.call(this)),{children:this.moveables.map(function(n){return n.getRect()})})},t.prototype.triggerEvent=function(n,i,r){if(r||n.indexOf("Group")>-1)return e.prototype.triggerEvent.call(this,n,i);this._emitter.trigger(n,i)},t.prototype.getRequestChildStyles=function(){return this.getEnabledAbles().reduce(function(n,i){var r,o,a=(o=(r=i.requestChildStyle)===null||r===void 0?void 0:r.call(i))!==null&&o!==void 0?o:[];return L(L([],C(n),!1),C(a),!1)},[])},t.prototype.getMoveables=function(){return L([],C(this.moveables),!1)},t.prototype.updateAbles=function(){e.prototype.updateAbles.call(this,L(L([],C(this.props.ables),!1),[_a],!1),"Group")},t.prototype._updateTargets=function(){e.prototype._updateTargets.call(this),this._originalDragTarget=this.props.dragTarget||this.areaElement,this._dragTarget=Dn(this._originalDragTarget,!0)},t.prototype._updateEvents=function(){var n=this.state,i=this.props,r=this._prevDragTarget,o=i.dragTarget||this.areaElement,a=i.targets,s=this.differ.update(a),c=s.added,u=s.changed,f=s.removed,p=c.length||f.length;(p||this._prevOriginalDragTarget!==this._originalDragTarget)&&(mn(this,!1),mn(this,!0),this.updateState({gestos:{}})),r!==o&&(n.target=null),n.target||(n.target=this.areaElement,this.controlBox.style.display="block"),n.target&&(this.targetGesto||(this.targetGesto=Ma(this,this._dragTarget,"Group")),this.controlGesto||(this.controlGesto=wa(this,"GroupControl")));var l=!fi(n.container,i.container);l&&(n.container=i.container),(l||p||this.transformOrigin!==(i.defaultGroupOrigin||"50% 50%")||u.length||a.length&&!Ea(this._targetGroups,i.targetGroups||[]))&&(this.updateRect(),this._hasFirstTargets=!0),this._isPropTargetChanged=!!p},t.prototype._updateObserver=function(){},t.defaultProps=w(w({},Tn.defaultProps),{transformOrigin:["50%","50%"],groupable:!0,dragArea:!0,keepRatio:!0,targets:[],defaultGroupRotate:0,defaultGroupOrigin:"50% 50%"}),t}(Tn),Gs=function(e){function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.moveables=[],n}return ar(t,e),t.prototype.render=function(){var n,i=this,r=this.props,o=r.cspNonce,a=r.cssStyled,s=r.persistData,c=r.targets||[],u=c.length,f=this.isUnmounted||!u,p=(n=s?.children)!==null&&n!==void 0?n:[];return f&&!u&&p.length?c=p.map(function(){return null}):f||(p=[]),xe.reactExports.createElement(a,{cspNonce:o,ref:un(this,"controlBox"),className:Ht("control-box")},c.map(function(l,d){var h,g,v=(g=(h=r.individualGroupableProps)===null||h===void 0?void 0:h.call(r,l,d))!==null&&g!==void 0?g:{};return xe.reactExports.createElement(Tn,w({key:"moveable"+d,ref:Go(i,"moveables",d)},r,v,{target:l,wrapperMoveable:i,isWrapperMounted:i.isMoveableMounted,persistData:p[d]}))}))},t.prototype.componentDidMount=function(){},t.prototype.componentDidUpdate=function(){},t.prototype.getTargets=function(){return this.props.targets},t.prototype.updateRect=function(n,i,r){r===void 0&&(r=!0),_n(!0),this.moveables.forEach(function(o){o.updateRect(n,i,r)}),_n()},t.prototype.getRect=function(){return w(w({},e.prototype.getRect.call(this)),{children:this.moveables.map(function(n){return n.getRect()})})},t.prototype.request=function(n,i,r){i===void 0&&(i={});var o=this.moveables.map(function(s){return s.request(n,w(w({},i),{isInstant:!1}),!1)}),a={request:function(s){return o.forEach(function(c){return c.request(s)}),this},requestEnd:function(){return o.forEach(function(s){return s.requestEnd()}),this}};return r||i.isInstant?a.request(i).requestEnd():a},t.prototype.dragStart=function(n,i){i===void 0&&(i=n.target);var r=i,o=Be(this.moveables,function(a){var s=a.getTargets()[0],c=a.getControlBoxElement(),u=a.getDragElement();return!(!s||!u)&&(u===r||u.contains(r)||u!==s&&s===r||s.contains(r)||c===r||c.contains(r))});return o&&o.dragStart(n,i),this},t.prototype.hitTest=function(){return 0},t.prototype.isInside=function(){return!1},t.prototype.isDragging=function(){return!1},t.prototype.getDragElement=function(){return null},t.prototype.getMoveables=function(){return L([],C(this.moveables),!1)},t.prototype.updateRenderPoses=function(){},t.prototype.checkUpdate=function(){},t.prototype.triggerEvent=function(){},t.prototype.updateAbles=function(){},t.prototype._updateEvents=function(){},t.prototype._updateObserver=function(){},t}(Tn);function Oa(e,t){var n=[];return e.forEach(function(i){i&&(On(i)?t[i]&&n.push.apply(n,L([],C(t[i]),!1)):ye(i)?n.push.apply(n,L([],C(Oa(i,t)),!1)):n.push(i))}),n}function Pa(e,t){var n=[];return e.forEach(function(i){i&&(On(i)?t[i]&&n.push.apply(n,L([],C(t[i]),!1)):ye(i)?n.push(Pa(i,t)):n.push(i))}),n}function Ra(e,t){return e.length!==t.length||e.some(function(n,i){var r=t[i];return!(!n&&!r)&&n!=r&&(!ye(n)||!ye(r)||Ra(n,r))})}var ks=function(e){function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.refTargets=[],r.selectorMap={},r._differ=new Vo,r._elementTargets=[],r._tmpRefTargets=[],r._tmpSelectorMap={},r._onChangeTargets=null,r}var n,i;return ar(t,e),t.makeStyled=function(){var r={};this.getTotalAbles().forEach(function(s){var c=s.css;c&&c.forEach(function(u){r[u]=!0})});var o,a=tr(r).join(`
161
- `);this.defaultStyled=Ko("div",(o=wi,(ps+a).replace(/([^}{]*){/gm,function(s,c){return c.replace(/\.([^{,\s\d.]+)/g,"."+o+"$1")+"{"})))},t.getTotalAbles=function(){return L([Ts,_a,Fs,_s],C(this.defaultAbles),!1)},t.prototype.render=function(){var r,o=this.constructor;o.defaultStyled||o.makeStyled();var a=this.props,s=a.ables,c=a.props,u=function(R,G){var P={};for(var D in R)Object.prototype.hasOwnProperty.call(R,D)&&G.indexOf(D)<0&&(P[D]=R[D]);if(R!=null&&typeof Object.getOwnPropertySymbols=="function"){var _=0;for(D=Object.getOwnPropertySymbols(R);_<D.length;_++)G.indexOf(D[_])<0&&Object.prototype.propertyIsEnumerable.call(R,D[_])&&(P[D[_]]=R[D[_]])}return P}(a,["ables","props"]),f=C(this._updateRefs(!0),2),p=f[0],l=f[1],d=Oa(p,l),h=d.length>1,g=L(L([],C(o.getTotalAbles()),!1),C(s||[]),!1),v=w(w(w({},u),c||{}),{ables:g,cssStyled:o.defaultStyled,customStyledMap:o.customStyledMap});this._elementTargets=d;var m=null,y=this.moveable,x=u.persistData;if(x?.children&&(h=!0),u.individualGroupable)return xe.reactExports.createElement(Gs,w({key:"individual-group",ref:un(this,"moveable")},v,{target:null,targets:d}));if(h){var E=Pa(p,l);if(y&&!y.props.groupable&&!y.props.individualGroupable){var M=y.props.target;M&&d.indexOf(M)>-1&&(m=w({},y.state))}return xe.reactExports.createElement(Bs,w({key:"group",ref:un(this,"moveable")},v,(r=u.groupableProps)!==null&&r!==void 0?r:{},{target:null,targets:d,targetGroups:E,firstRenderState:m}))}var b=d[0];if(y&&(y.props.groupable||y.props.individualGroupable)){var S=Be(y.moveables||[],function(R){return R.props.target===b});S&&(m=w({},S.state))}return xe.reactExports.createElement(Tn,w({key:"single",ref:un(this,"moveable")},v,{target:b,firstRenderState:m}))},t.prototype.componentDidMount=function(){this._checkChangeTargets()},t.prototype.componentDidUpdate=function(){this._checkChangeTargets()},t.prototype.componentWillUnmount=function(){this.selectorMap={},this.refTargets=[]},t.prototype.getTargets=function(){var r,o;return(o=(r=this.moveable)===null||r===void 0?void 0:r.getTargets())!==null&&o!==void 0?o:[]},t.prototype.updateSelectors=function(){this.selectorMap={},this._updateRefs(),this.forceUpdate()},t.prototype.waitToChangeTarget=function(){var r,o=this;return this._onChangeTargets=function(){o._onChangeTargets=null,r()},new Promise(function(a){r=a})},t.prototype.waitToChangeTargets=function(){return this.waitToChangeTarget()},t.prototype.getManager=function(){return this.moveable},t.prototype.getMoveables=function(){return this.moveable.getMoveables()},t.prototype.getDragElement=function(){return this.moveable.getDragElement()},t.prototype._updateRefs=function(r){var o=this.refTargets,a=xa(this.props.target||this.props.targets),s=typeof document<"u",c=Ra(o,a),u=this.selectorMap,f={};return this.refTargets.forEach(function p(l){On(l)?u[l]?f[l]=u[l]:s&&(c=!0,f[l]=[].slice.call(document.querySelectorAll(l))):ye(l)&&l.forEach(p)}),this._tmpRefTargets=a,this._tmpSelectorMap=f,[a,f,!r&&c]},t.prototype._checkChangeTargets=function(){var r,o,a;this.refTargets=this._tmpRefTargets,this.selectorMap=this._tmpSelectorMap;var s=this._differ.update(this._elementTargets),c=s.added,u=s.removed;(c.length||u.length)&&((o=(r=this.props).onChangeTargets)===null||o===void 0||o.call(r,{moveable:this.moveable,targets:this._elementTargets}),(a=this._onChangeTargets)===null||a===void 0||a.call(this));var f=C(this._updateRefs(),3),p=f[0],l=f[1],d=f[2];this.refTargets=p,this.selectorMap=l,d&&this.forceUpdate()},t.defaultAbles=[],t.customStyledMap={},t.defaultStyled=null,function(r,o,a,s){var c,u=arguments.length,f=u<3?o:s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")f=Reflect.decorate(r,o,a,s);else for(var p=r.length-1;p>=0;p--)(c=r[p])&&(f=(u<3?c(f):u>3?c(o,a,f):c(o,a))||f);u>3&&f&&Object.defineProperty(o,a,f)}([(n=ds,i===void 0&&(i={}),function(r,o){n.forEach(function(a){var s=i[a]||a;s in r||(r[s]=function(){for(var c,u=[],f=0;f<arguments.length;f++)u[f]=arguments[f];var p=(c=this[o])[a].apply(c,u);return p===this[o]?this:p})})})],t.prototype,"moveable",void 0),t}(xe.reactExports.PureComponent);const zs=(Po=[Ye,bs],Zr=function(e){function t(){return e!==null&&e.apply(this,arguments)||this}return ar(t,e),t}(ks),Zr.defaultAbles=Po,Zr);var Po,Zr;exports.default=zs;
@@ -1,6 +0,0 @@
1
- "use strict";/**
2
- * @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.4.20
3
- *
4
- * (C) 2025-present SheetXL Inc. & Michael T. Ford
5
- * License: The license can be found at https://www.sheetxl.com/license.
6
- */Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});exports.default={ADDRESS:{s:"Creates a cell reference as text, given specified row and column numbers",p:{rowNum:{d:"is the row number to use in the cell reference: Row_number = 1 for row 1"},columnNum:{d:"is the column number to use in the cell reference. For example, Column_number = 4 for column D"},absNum:{d:"specifies the reference type: absolute = 1; absolute row/relative column = 2; relative row/absolute column = 3; relative = 4",v:1},a1:{d:"is a logical value that specifies the reference style: A1 style = 1 or TRUE; R1C1 style = 0 or FALSE",v:!0},sheetText:{d:"is text specifying the name of the worksheet to be used as the external reference",v:""}}},AREAS:{s:"Returns the number of areas in a reference. An area is a range of contiguous cells or a single cell",p:{references:{d:"is a reference to a cell or range of cells and can refer to multiple areas"}}},CHOOSE:{s:"Chooses a value or action to perform from a list of values, based on an index number",p:{indexNum:{d:"specifies which value argument is selected. Index_num must be between 1 and 254, or a formula or a reference to a number between 1 and 254"},value1:{d:"value1,value2,... are 1 to 254 numbers, cell references, defined names, formulas, functions, or text arguments from which CHOOSE selects"},value:{}}},CHOOSECOLS:{s:"Returns columns from an array or reference.",p:{array:{d:"The array or reference from which to choose columns."},colNum1:{d:"col_num1,col_num2,... The number of the column to be returned."},colNum:{}}},CHOOSEROWS:{s:"Returns rows from an array or reference.",p:{array:{d:"The array or reference from which to choose rows."},rowNum1:{d:"row_num1,row_num2,... The number of the row to be returned."},rowNum:{}}},COLUMN:{s:"Returns the column number of a reference",p:{reference:{d:"is the cell or range of contiguous cells for which you want the column number. If omitted, the cell containing the COLUMN function is used"}}},COLUMNS:{s:"Returns the number of columns in an array or reference",p:{array:{d:"is an array or array formula, or a reference to a range of cells for which you want the number of columns"}}},DROP:{s:"Drops rows or columns from array start or end.",p:{array:{d:"The array from which to drop rows or columns."},row:{d:"The number of rows to drop. A negative value drops from the end of the array."},columns:{d:"The number of columns to drop. A negative value drops from the end of the array.",v:0}},h:"Unimplemented"},EXPAND:{s:"Expands an array to the specified dimensions.",p:{array:{d:"The array to expand."},row:{d:"The number of rows in the expanded array. If missing, rows will not be expanded."},columns:{d:"The number of columns in the expanded array. If missing, columns will not be expanded.",v:0},padWidth:{d:"The value with which to pad. The default is #N/A.",v:"FormulaError.BuiltIn.NA"}},h:"Unimplemented"},FIELDVALUE:{s:"Extracts a value from a field of a given record",p:{value:{d:"The record from which you want to extract the field"},fieldName:{d:"The names of the field or fields that you want to extract"}},h:"Unimplemented"},FILTER:{s:"Filter a range or array",p:{array:{d:"the range or array to filter"},include:{d:"an array of booleans where TRUE represents a row or column to retain"},ifEmpty:{d:"return if no items are retained"}},h:"Unimplemented"},FORMULATEXT:{s:"Returns a formula as a string",p:{reference:{d:"is a reference to a formula"}}},GETPIVOTDATA:{s:"Extracts data stored in a PivotTable.",p:{dataField:{d:"is the name of the data field to extract data from"},pivotTable:{d:"is a reference to a cell or range of cells in the PivotTable that contains the data you want to retrieve"},field1:{d:"field1,field2,... field to refer to"},item1:{d:"item1,item2,... field item to refer to"}},h:"Unimplemented"},GROUPBY:{s:"Aggregate values by row fields",p:{rowFields:{d:"The range or array containing the row fields"},values:{d:"The range or array containing the values to aggregate"},fn:{d:"The function used to do the aggregations"},fieldHeaders:{d:"A number between 0 and 3 that specifies whether the field data has headers and whether field headers should be returned in the results",v:null},totalDepth:{d:"Show totals for the row fields. 0 for none, 1 for grand totals, 2 for grand total and first level subtotals, etc",v:2},sortOrder:{d:"The column index to sort the row fields on. A negative index will sort in reverse order",v:null},filterArray:{d:"param-534 paramName-535",v:null},fieldRelationship:{d:"The relationship of fields when multiple columns are supplied to the row_fields argument",v:0}},h:"Unimplemented"},HLOOKUP:{p:{lookupValue:{d:"is the value to be found in the first row of the table and can be a value, a reference, or a text string"},tableArray:{d:"is a table of text, numbers, or logical values in which data is looked up. Table_array can be a reference to a range or a range name"},rowIndexNum:{d:"is the row number in table_array from which the matching value should be returned. The first row of values in the table is row 1"},rangeLookup:{d:"is a logical value: to find the closest match in the top row (sorted in ascending order) = TRUE; find an exact match = FALSE",v:!0}}},HSTACK:{s:"Horizontally stacks arrays into one array.",p:{array1:{},array:{d:"array1,array2,... An array or reference to be stacked."}},h:"Unimplemented"},HYPERLINK:{s:"Creates a shortcut or jump that opens a document stored on your hard drive, a network server, or on the Internet",p:{linkLocation:{d:"is the text giving the path and file name to the document to be opened, a hard drive location, UNC address, or URL path"},friendlyName:{d:"is text or a number that is displayed in the cell. If omitted, the cell displays the Link_location text"}},h:"Unimplemented"},IMAGE:{s:"Returns an image from a given source",p:{source:{d:"The path of the source that points to the image"},alternateText:{d:"The alternative text that describes the image for accessibility"},sizing:{d:"The setting that determines the dimensions in which the image will be rendered in the cell"},height:{d:"The custom height of the image in pixels"},width:{d:"The custom width of the image in pixels"}},h:"Unimplemented"},INDEX:{s:"Returns a value or reference of the cell at the intersection of a particular row and column, in a given range",p:{array:{d:"is a range of cells or an array constant."},rowNum:{d:"selects the row in Array or Reference from which to return a value. If omitted, Column_num is required",v:0},colNum:{d:"selects the column in Array or Reference from which to return a value. If omitted, Row_num is required",v:0},areaNum:{d:"selects the area in Array or Reference from which to return a value. If omitted, the first area is used",v:1}}},INDIRECT:{s:"Returns the reference specified by a text string",p:{refText:{d:"is a reference to a cell that contains an A1- or R1C1-style reference, a name defined as a reference, or a reference to a cell as a text string"},a1:{d:"is a logical value that specifies the type of reference in Ref_text: R1C1-style = FALSE; A1-style = TRUE.",v:!0}}},LOOKUP:{s:"Looks up a value either from a one-row or one-column range or from an array. Provided for backward compatibility",p:{lookupValue:{d:"is a value that LOOKUP searches for in Lookup_vector and can be a number, text, a logical value, or a name or reference to a value"},lookupVector:{d:"is a range that contains only one row or one column of text, numbers, or logical values, placed in ascending order"},resultVector:{d:"is a range that contains only one row or column, the same size as Lookup_vector"}},h:"Unimplemented"},MATCH:{s:"Returns the relative position of an item in an array that matches a specified value in a specified order",p:{lookupValue:{d:"is the value you use to find the value you want in the array, a number, text, or logical value, or a reference to one of these"},lookupArray:{d:"is a contiguous range of cells containing possible lookup values, an array of values, or a reference to an array"},matchType:{d:"is a number 1, 0, or -1 indicating which value to return."}},h:"Unimplemented"},OFFSET:{s:"Returns a reference to a range that is a given number of rows and columns from a given reference",p:{reference:{d:"is the reference from which you want to base the offset, a reference to a cell or range of adjacent cells"},rows:{d:"is the number of rows, up or down, that you want the upper-left cell of the result to refer to"},cols:{d:"is the number of columns, to the left or right, that you want the upper-left cell of the result to refer to"},height:{d:"is the height, in number of rows, that you want the result to be, the same height as Reference if omitted"},width:{d:"is the width, in number of columns, that you want the result to be, the same width as Reference if omitted"}}},PIVOTBY:{p:{rowFields:{},colFields:{},values:{},fn:{},fieldHeaders:{v:null},rowTotalDepth:{v:2},rowSortOrder:{v:null},colTotalDepth:{v:2},colSortOrder:{v:null},filterArray:{v:null},relativeTo:{v:0}},h:"Unimplemented"},ROW:{s:"Returns the row number of a reference",p:{reference:{d:"is the cell or a single range of cells for which you want the row number; if omitted, returns the cell containing the ROW function"}}},ROWS:{s:"Returns the number of rows in a reference or array",p:{array:{d:"is an array, an array formula, or a reference to a range of cells for which you want the number of rows"}}},RTD:{s:"Retrieves the real-time data (RTD) from a program that supports COM automation",p:{progId:{d:"is the programmatic identifier (ProgID) of a registered COM automation add-in. Enclose the id in quotation marks"},server:{d:"is the name of the server that provides the real-time data. If running locally us an empty string"},topic:{d:"topic1,topic2,... are 1 to 38 parameters that specify a piece of data"}},h:"Unimplemented"},SORT:{s:"Sorts a range or array",p:{array:{d:"the range or array to sort"},sortIndex:{d:"a number indicating the row or column to sort by"},sortOrder:{d:"a number indicating the desired sort order; 1 for ascending order (default), -1 for descending order"},byCol:{d:"a logical value indicating the desired sort direction: FALSE to sort by row (default), TRUE to sort by column",v:!1}},h:"Unimplemented"},SORTBY:{s:"Sorts a range or array based on the values in a corresponding range or array",p:{array:{d:"the range or array to sort"},byArray1:{d:"by_array1,by_array2,... the range or array to sort on"},sortOrder:{d:"sort_order1,sort_order2,... a number indicating the desired sort order; 1 for ascending order (default), -1 for descending order"}},h:"Unimplemented"},TAKE:{s:"Returns rows or columns from array start or end.",p:{array:{d:"The array from which to take rows or columns."},rows:{d:"The number of rows to take. A negative value takes from the end of the array."},columns:{d:"The number of columns to take. A negative value takes from the end of the array.",v:0}},h:"Unimplemented"},TOCOL:{s:"Returns the array as one column.",p:{array:{d:"The array or reference to return as a column."},ignore:{d:"Whether to ignore certain types of values. By default, no values are ignored.",v:0},scanByColumn:{d:"Scan the array by column. By default, the array is scanned by row.",v:!1}},h:"Unimplemented"},TOROW:{s:"Returns the array as one row.",p:{array:{d:"The array or reference to return as a column."},ignore:{d:"Whether to ignore certain types of values. By default, no values are ignored.",v:0},scanByColumn:{d:"Scan the array by column. By default, the array is scanned by row.",v:!1}},h:"Unimplemented"},TRANSPOSE:{s:"Converts a vertical range of cells to a horizontal range, or vice versa",p:{array:{d:"is a range of cells on a worksheet or an array of values that you want to transpose"}}},TRIMRANGE:{s:"Trims a range to the last used cell in any direction.",p:{range:{d:"The range to be trimmed"},rowTrimMode:{d:"Row trim direction. 0 - none, 1 - leading, 2 - trailing, 3 - both.",v:3},colTrimMode:{d:"Column trim direction. 0 - none. 1 - leading, 2 - trailing, 3 - both.",v:3}}},UNIQUE:{s:"Returns the unique values from a range or array.",p:{array:{d:"the range or array from which to return unique rows or columns"},byCol:{d:"is a logical value: compare rows against each other and return the unique rows = FALSE; compare columns against each other and return the unique columns = TRUE",v:!1},exactlyOnce:{d:"is a logical value: return rows or columns that occur exactly once from the array = TRUE; return all distinct rows or columns from the array = FALSE",v:!1}},h:"Unimplemented"},VLOOKUP:{s:"Looks for a value in the leftmost column of a table, and then returns a value in the same row from a column you specify. By default, the table must be sorted in an ascending order",p:{lookupValue:{d:"is the value to be found in the first column of the table, and can be a value, a reference, or a text string"},tableArray:{d:"is a table of text, numbers, or logical values, in which data is retrieved. Table_array can be a reference to a range or a range name"},colIndexNum:{d:"is the column number in table_array from which the matching value should be returned. The first column of values in the table is column 1"},rangeLookup:{d:"is a logical value: to find the closest match in the first column (sorted in ascending order) = TRUE; find an exact match = FALSE",v:!0}}},VSTACK:{s:"Vertically stacks arrays into one array.",p:{array1:{d:"array1,array2,... An array or reference to be stacked."},array:{d:"array1,array2,... An array or reference to be stacked."}},h:"Unimplemented"},WRAPCOLS:{s:"Wraps a row or column vector after a specified number of values.",p:{vector:{d:"The vector or reference to wrap."},wrapCount:{d:"The maximum number of values per column."},padWith:{d:"The value with which to pad. The default is #N/A.",v:"FormulaError.BuiltIn.NA"}},h:"Unimplemented"},WRAPROWS:{s:"Wraps a row or column vector after a specified number of values.",p:{vector:{d:"The vector or reference to wrap."},wrapCount:{d:"The maximum number of values per column."},padWith:{d:"The value with which to pad. The default is #N/A.",v:"FormulaError.BuiltIn.NA"}},h:"Unimplemented"},XLOOKUP:{s:"Searches a range or an array for a match and returns the corresponding item from a second range or array. By default, an exact match is used",p:{lookupValue:{d:"is the value to search for"},lookupArray:{d:"is the array or range to search"},returnArray:{d:"is the array or range to return"},ifNotFound:{d:"returned if no match is found"},rangeLookup:{v:!0},matchMode:{d:"specify how to match lookup_value against the values in lookup_array"},searchMode:{d:"specify the search mode to use. By default, a first to last search will be used",v:!0}},h:"Unimplemented"},XMATCH:{s:"Returns the relative position of an item in an array. By default, an exact match is required",p:{lookupValue:{d:"is the value to search for"},lookupArray:{d:"is the array or range to search"},matchMode:{d:"specify how to match the lookup_value against the values in lookup_array"},searchMode:{d:"specify the search mode to use. By default, a first to last search will be used",v:!0}},h:"Unimplemented"}};
@@ -1,24 +0,0 @@
1
- /**
2
- * @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.4.20
3
- *
4
- * (C) 2025-present SheetXL Inc. & Michael T. Ford
5
- * License: The license can be found at https://www.sheetxl.com/license.
6
- */
7
- let s = null;
8
- async function l() {
9
- return s || (s = new Promise(async (e, a) => {
10
- try {
11
- const i = "0.20.2", r = `https://esm.sh/esbuild-wasm@${i}`, n = `https://esm.sh/esbuild-wasm@${i}/esbuild.wasm`, t = (await import(
12
- /* webpackIgnore: true */
13
- /* @vite-ignore */
14
- r
15
- )).default;
16
- await t.initialize({ wasmURL: n, worker: !1 }), e(t);
17
- } catch (i) {
18
- console.error("Error initializing esbuild:", i), a(i);
19
- }
20
- }), s);
21
- }
22
- export {
23
- l as initialize
24
- };