@bynder/compact-view 5.2.3 → 5.2.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (253) hide show
  1. package/AccessToken2.js +1 -1
  2. package/ActiveFilters.js +49 -50
  3. package/AddMedia.js +19 -18
  4. package/Advanced.js +13 -13
  5. package/App.js +60 -59
  6. package/Arrow.js +1 -1
  7. package/AssetFilter.js +38 -38
  8. package/AssetItem.js +10 -17
  9. package/AssetList.js +5 -5
  10. package/AssetTypeItem.js +21 -21
  11. package/AssetsView.js +13 -13
  12. package/Axios2.js +82 -76
  13. package/AxiosError.js +36 -35
  14. package/ButtonAction.js +1 -1
  15. package/CanceledError.js +15 -8
  16. package/Card.js +1 -1
  17. package/Chip.js +1 -1
  18. package/CollectionCard.js +22 -22
  19. package/CollectionItem.js +9 -9
  20. package/CollectionList.js +5 -5
  21. package/CollectionView.js +11 -11
  22. package/ColorPicker.js +1 -1
  23. package/ColorPickerSolid.js +3 -3
  24. package/ColorPickerWithOpacity.js +3 -3
  25. package/Component.js +158 -0
  26. package/Component2.js +4 -0
  27. package/ConfigContext.js +7 -8
  28. package/Container.js +1 -1
  29. package/ContextAction.js +1 -1
  30. package/ControlGroup.js +6 -6
  31. package/Dat.js +33 -32
  32. package/DatDropdownItem.js +1 -1
  33. package/DesignSystemProvider.js +7 -7
  34. package/DirectionSelect.js +11 -10
  35. package/DomainInput.js +19 -11
  36. package/Draggable.js +337 -0
  37. package/Draggable2.js +4 -0
  38. package/DraggableCore.js +312 -0
  39. package/DraggableCore2.js +4 -0
  40. package/Dropdown.js +37 -37
  41. package/Dropdown2.js +1 -1
  42. package/DropdownListItem.js +1 -1
  43. package/FieldSelect.js +19 -17
  44. package/FileSelector.js +38 -37
  45. package/FontPicker.js +1 -1
  46. package/Form.js +1 -1
  47. package/Header.js +5 -4
  48. package/HttpStatusCode.js +7 -1
  49. package/InfiniteScroll.js +1 -1
  50. package/InlineBanner.js +1 -1
  51. package/Input.js +1 -1
  52. package/InterceptorManager.js +2 -1
  53. package/Item.js +8 -8
  54. package/Item4.js +2 -2
  55. package/LeftArrow.js +1 -1
  56. package/ListItem2.js +1 -1
  57. package/ModalBase.js +15 -15
  58. package/NoResults.js +1 -1
  59. package/Option_new.js +36 -29
  60. package/ReactPropTypesSecret.js +10 -0
  61. package/RightArrow.js +1 -1
  62. package/SearchInput.js +1 -1
  63. package/SearchInput2.js +1 -1
  64. package/SelectionFooter.js +41 -31
  65. package/Shield.js +2 -2
  66. package/Smartfilters_new.js +107 -98
  67. package/StatefulAssetList.js +50 -50
  68. package/StoreInitializer.js +32 -16
  69. package/SwitchNLS.js +1 -1
  70. package/TagItem.js +15 -15
  71. package/Tags.js +1 -1
  72. package/Toolbar.js +23 -20
  73. package/Tooltip2.js +1 -1
  74. package/ViewSwitch.js +17 -15
  75. package/_commonjsHelpers.js +28 -3
  76. package/adapters.js +54 -42
  77. package/api/filterAssets.d.ts +1 -1
  78. package/api/getAssets.d.ts +1 -1
  79. package/api/getFilters.d.ts +1 -1
  80. package/api/rest/index.d.ts +1 -1
  81. package/api/rest/types.d.ts +1 -1
  82. package/api2.js +1 -1
  83. package/asset.type.js +1 -1
  84. package/autocomplete.js +1 -1
  85. package/axios.js +1 -1
  86. package/bodyScrollLock.esm.js +68 -0
  87. package/buildURL.js +13 -15
  88. package/checkGlobals.js +1 -1
  89. package/cjs.js +7 -0
  90. package/cjs2.js +15 -0
  91. package/cjs3.js +4 -0
  92. package/clsx.m.js +6 -0
  93. package/clsx.m2.js +15 -0
  94. package/combineMetaproperties.js +3 -1
  95. package/composeSignals.js +1 -1
  96. package/cookieStore.js +1 -1
  97. package/cookies.js +13 -11
  98. package/currentScopes.js +1 -1
  99. package/data.js +1 -1
  100. package/devUtils.js +1 -1
  101. package/dispatchRequest.js +5 -5
  102. package/domFns.js +151 -0
  103. package/domFns2.js +4 -0
  104. package/factoryWithThrowingShims.js +52 -0
  105. package/fetch2.js +156 -128
  106. package/filter/AssetFilterContext.d.ts +3 -3
  107. package/filterAssets.js +1 -1
  108. package/getAsset.js +1 -1
  109. package/getAssetCounts.js +1 -1
  110. package/getAssets.js +1 -1
  111. package/getCollections.js +1 -1
  112. package/getFilterOptions.js +1 -1
  113. package/getFilters.js +1 -1
  114. package/getFilters_new.js +1 -1
  115. package/getPrefix.js +35 -0
  116. package/getPrefix2.js +4 -0
  117. package/getSimilarityAssets.js +1 -1
  118. package/goober.modern.js +75 -0
  119. package/handlers.js +1 -1
  120. package/iconBase.js +56 -0
  121. package/iconContext.js +12 -0
  122. package/iconsManifest.js +222 -0
  123. package/index-esm.js +1 -4
  124. package/index.browser.js +1 -1
  125. package/index.m.js +9 -0
  126. package/index.m2.js +17 -0
  127. package/index10.js +18 -2
  128. package/index11.js +181 -15
  129. package/index112.js +1 -1
  130. package/index12.js +313 -36
  131. package/index13.js +5 -2430
  132. package/index14.js +3 -557
  133. package/index15.js +15 -55
  134. package/index16.js +3 -2
  135. package/index17.js +3 -87
  136. package/index18.js +36 -60
  137. package/index19.js +3 -7
  138. package/index20.js +2429 -12
  139. package/index21.js +557 -10
  140. package/index22.js +1 -1
  141. package/index23.js +119 -6
  142. package/index24.js +39 -7
  143. package/index25.js +2 -5
  144. package/index26.js +86 -9
  145. package/index27.js +55 -8
  146. package/index28.js +6 -636
  147. package/index29.js +8692 -74
  148. package/index3.js +1684 -5
  149. package/index30.js +2 -5
  150. package/index31.js +4 -20
  151. package/index310.js +2 -0
  152. package/index32.js +11 -2
  153. package/index33.js +5083 -4
  154. package/index34.js +2 -18
  155. package/index35.js +59 -5
  156. package/index36.js +2 -2
  157. package/index37.js +13 -11
  158. package/index38.js +46 -10
  159. package/index39.js +6 -12
  160. package/index4.js +5 -1684
  161. package/index40.js +8 -11
  162. package/index41.js +26 -18
  163. package/index42.js +2 -64
  164. package/index43.js +63 -5
  165. package/index44.js +9 -55
  166. package/index45.js +7 -67
  167. package/index46.js +8 -31
  168. package/index47.js +5 -11
  169. package/index48.js +10 -121
  170. package/index49.js +9 -86
  171. package/index5.js +215 -23
  172. package/index50.js +636 -7
  173. package/index51.js +74 -11
  174. package/index52.js +4 -13
  175. package/index53.js +19 -13
  176. package/index54.js +4 -6
  177. package/index55.js +18 -7
  178. package/index56.js +5 -14
  179. package/index57.js +10 -28
  180. package/index58.js +10 -15
  181. package/index59.js +15 -0
  182. package/index6.js +250 -299
  183. package/index60.js +13 -0
  184. package/index61.js +21 -0
  185. package/index62.js +8 -0
  186. package/index63.js +57 -0
  187. package/index64.js +4 -0
  188. package/index65.js +69 -0
  189. package/index66.js +33 -0
  190. package/index67.js +13 -0
  191. package/index68.js +123 -0
  192. package/index69.js +88 -0
  193. package/index7.js +22 -5047
  194. package/index70.js +10 -0
  195. package/index71.js +13 -0
  196. package/index72.js +13 -225
  197. package/index73.js +16 -0
  198. package/index74.js +9 -0
  199. package/index75.js +228 -0
  200. package/index76.js +9 -0
  201. package/index77.js +17 -0
  202. package/index78.js +31 -0
  203. package/index79.js +18 -0
  204. package/index8.js +5044 -47
  205. package/index9.js +50 -15
  206. package/isAbsoluteURL.js +1 -1
  207. package/isURLSameOrigin.js +1 -1
  208. package/localization.js +15 -15
  209. package/log.js +14 -0
  210. package/log2.js +4 -0
  211. package/matchRequestUrl.js +1 -1
  212. package/mergeConfig.js +37 -32
  213. package/notify.js +2 -2
  214. package/package.json +1 -1
  215. package/positionFns.js +101 -0
  216. package/positionFns2.js +4 -0
  217. package/react-laag.esm.js +957 -0
  218. package/react.js +8 -8
  219. package/react2.js +9 -9
  220. package/resolveConfig.js +23 -23
  221. package/select/add-media/AddMedia.d.ts +3 -1
  222. package/select/current-selection/SelectedItems.d.ts +1 -1
  223. package/shims.js +29 -0
  224. package/shims2.js +4 -0
  225. package/store/StoreInitializer.d.ts +5 -1
  226. package/store/useAssetFilterStore.d.ts +55 -0
  227. package/store/useSelectionStore.d.ts +47 -0
  228. package/styled-components.browser.esm.js +2 -2
  229. package/throttle.js +1 -1
  230. package/toURLEncodedForm.js +11 -10
  231. package/tokenExpirationHelper.js +1 -1
  232. package/transformData.js +1 -1
  233. package/transitional.js +4 -3
  234. package/useAssetFilterStore.js +152 -0
  235. package/useDatStore.js +1 -1
  236. package/useEffectEvent.js +7 -7
  237. package/useFonts.js +2 -2
  238. package/useOrderingStore.js +1 -1
  239. package/useRouterStore.js +1 -1
  240. package/useSearchStore.js +1 -1
  241. package/useSelectionStore.js +131 -0
  242. package/useSimilaritySearchStore.js +1 -1
  243. package/useTranslate.js +1 -1
  244. package/utils/combineMetaproperties.d.ts +2 -0
  245. package/utils6.js +160 -118
  246. package/utils7.js +7 -68
  247. package/utils8.js +68 -7
  248. package/xhr.js +47 -46
  249. package/AssetFilterContext.js +0 -161
  250. package/SelectionContext.js +0 -143
  251. package/select/SelectionContext.d.ts +0 -30
  252. /package/{Middleware.js → Middleware2.js} +0 -0
  253. /package/{middleware2.js → middleware.js} +0 -0
package/index9.js CHANGED
@@ -1,20 +1,55 @@
1
- import "./index12.js";
2
- import r from "./axios.js";
3
- const n = (e) => e.data, s = r.create({
4
- timeout: 1e4,
5
- headers: {
1
+ import { err as p, ok as u } from "./result.type.js";
2
+ import { ensureValidUrl as q } from "./url.js";
3
+ import { normalizeAssetsResponse as C } from "./normalizeResponse.js";
4
+ import { processAssetsWithLimitedUseFlag as k } from "./getLimitedUseThumbnails.js";
5
+ const o = /* @__PURE__ */ new Map();
6
+ async function G(g) {
7
+ const { query: d, variables: h, auth: a, noCache: l, isNewGQL: y } = g;
8
+ if (!a) return p("No authentication provided");
9
+ const n = a.getAccessToken?.(), $ = "5.2.4";
10
+ let e = a.accountDomain !== void 0 ? q(a.accountDomain.trim()) : `https://${window.location.host}`;
11
+ e.charAt(e.length - 1) === "/" && (e = e.slice(0, -1));
12
+ const i = `${e}:${d}:${JSON.stringify(h)}:${n}`;
13
+ if (o.has(i) && !l)
14
+ return u(o.get(i));
15
+ const m = {
6
16
  Accept: "application/json",
7
- "Content-Type": "application/json"
8
- }
9
- }), i = async (e, o) => {
17
+ "Content-Type": "application/json",
18
+ // Custom header for UCV analytics tracking
19
+ "X-Bynder-Integration": `UCV/v${$}`
20
+ }, v = {
21
+ method: "post",
22
+ headers: n === void 0 ? m : { ...m, Authorization: `Bearer ${n}` },
23
+ body: JSON.stringify({ query: d, variables: h })
24
+ };
25
+ let s, c;
26
+ const w = y ? "/v7/api/graphql" : "/graphql";
10
27
  try {
11
- const t = await s.get(e, o);
12
- return n(t);
13
- } catch (t) {
14
- throw console.error("GET request error:", t), t;
28
+ if (s = await (await fetch(`${e}${w}`, v)).json(), s.errors !== void 0)
29
+ return p(s.errors.map((r) => r.message).join(","));
30
+ const A = ["similaritySearch", "searchAssets"];
31
+ await Promise.all(
32
+ A.map(async (r) => {
33
+ const t = s.data[r];
34
+ if (t?.assets?.nodes) {
35
+ const N = t.assets.nodes, j = await k(N, n);
36
+ s.data[r] = {
37
+ ...t,
38
+ assets: {
39
+ ...t.assets,
40
+ nodes: j,
41
+ pageInfo: t.assets.pageInfo,
42
+ totalCount: t.assets.totalCount
43
+ }
44
+ };
45
+ }
46
+ })
47
+ ), c = C(s.data);
48
+ } catch (f) {
49
+ return p(f);
15
50
  }
16
- };
51
+ return l || (o.set(i, c), o.size > 50 && o.delete(o.keys().next().value)), u(c);
52
+ }
17
53
  export {
18
- i as getRequest,
19
- n as onSuccess
54
+ G as fetchWithGraphql
20
55
  };
package/isAbsoluteURL.js CHANGED
@@ -1,5 +1,5 @@
1
1
  function e(t) {
2
- return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(t);
2
+ return typeof t != "string" ? !1 : /^([a-z][a-z\d+\-.]*:)?\/\//i.test(t);
3
3
  }
4
4
  export {
5
5
  e as default
@@ -1,4 +1,4 @@
1
- import o from "./index19.js";
1
+ import o from "./index28.js";
2
2
  const n = o.hasStandardBrowserEnv ? /* @__PURE__ */ ((r, e) => (t) => (t = new URL(t, o.origin), r.protocol === t.protocol && r.host === t.host && (e || r.port === t.port)))(
3
3
  new URL(o.origin),
4
4
  o.navigator && /(msie|trident)/i.test(o.navigator.userAgent)
package/localization.js CHANGED
@@ -1,18 +1,18 @@
1
1
  import { jsx as p } from "react/jsx-runtime";
2
2
  import e from "react";
3
- import { Localization as f } from "./index6.js";
3
+ import { Localization as f } from "./index12.js";
4
4
  import r from "./en_US.json.js";
5
5
  import n from "./de_DE.json.js";
6
6
  import _ from "./es_ES.json.js";
7
7
  import a from "./es_MX.json.js";
8
- import s from "./fr_FR.json.js";
9
- import c from "./it_IT.json.js";
10
- import l from "./ja_JP.json.js";
8
+ import l from "./fr_FR.json.js";
9
+ import s from "./it_IT.json.js";
10
+ import c from "./ja_JP.json.js";
11
11
  import R from "./ko_KR.json.js";
12
- import z from "./nl_NL.json.js";
13
- import L from "./pl_PL.json.js";
14
- import d from "./pt_BR.json.js";
15
- import u from "./ru_RU.json.js";
12
+ import d from "./nl_NL.json.js";
13
+ import u from "./pl_PL.json.js";
14
+ import z from "./pt_BR.json.js";
15
+ import L from "./ru_RU.json.js";
16
16
  import P from "./tr_TR.json.js";
17
17
  import T from "./zh_CN.json.js";
18
18
  import h from "./zh_TW.json.js";
@@ -21,14 +21,14 @@ const v = {
21
21
  "en-US": r,
22
22
  "es-ES": _,
23
23
  "es-MX": a,
24
- "fr-FR": s,
25
- "it-IT": c,
26
- "ja-JP": l,
24
+ "fr-FR": l,
25
+ "it-IT": s,
26
+ "ja-JP": c,
27
27
  "ko-KR": R,
28
- "nl-NL": z,
29
- "pl-PL": L,
30
- "pt-BR": d,
31
- "ru-RU": u,
28
+ "nl-NL": d,
29
+ "pl-PL": u,
30
+ "pt-BR": z,
31
+ "ru-RU": L,
32
32
  "tr-TR": P,
33
33
  "zh-CN": T,
34
34
  "zh-TW": h
package/log.js ADDED
@@ -0,0 +1,14 @@
1
+ import { __exports as e } from "./log2.js";
2
+ var r;
3
+ function u() {
4
+ if (r) return e;
5
+ r = 1, Object.defineProperty(e, "__esModule", {
6
+ value: !0
7
+ }), e.default = o;
8
+ function o() {
9
+ }
10
+ return e;
11
+ }
12
+ export {
13
+ u as __require
14
+ };
package/log2.js ADDED
@@ -0,0 +1,4 @@
1
+ var o = {};
2
+ export {
3
+ o as __exports
4
+ };
@@ -1,4 +1,4 @@
1
- import { match as l } from "./index72.js";
1
+ import { match as l } from "./index75.js";
2
2
  import { getCleanUrl as i } from "./index82.js";
3
3
  import { normalizePath as p } from "./normalizePath.js";
4
4
  function f(e) {
package/mergeConfig.js CHANGED
@@ -1,38 +1,38 @@
1
- import i from "./utils6.js";
1
+ import r from "./utils6.js";
2
2
  import h from "./AxiosHeaders.js";
3
- const c = (s) => s instanceof h ? { ...s } : s;
4
- function C(s, a) {
5
- a = a || {};
3
+ const g = (s) => s instanceof h ? { ...s } : s;
4
+ function C(s, f) {
5
+ f = f || {};
6
6
  const u = {};
7
- function d(t, e, r, o) {
8
- return i.isPlainObject(t) && i.isPlainObject(e) ? i.merge.call({ caseless: o }, t, e) : i.isPlainObject(e) ? i.merge({}, e) : i.isArray(e) ? e.slice() : e;
7
+ function o(t, e, i, d) {
8
+ return r.isPlainObject(t) && r.isPlainObject(e) ? r.merge.call({ caseless: d }, t, e) : r.isPlainObject(e) ? r.merge({}, e) : r.isArray(e) ? e.slice() : e;
9
9
  }
10
- function l(t, e, r, o) {
11
- if (i.isUndefined(e)) {
12
- if (!i.isUndefined(t))
13
- return d(void 0, t, r, o);
14
- } else return d(t, e, r, o);
10
+ function l(t, e, i, d) {
11
+ if (r.isUndefined(e)) {
12
+ if (!r.isUndefined(t))
13
+ return o(void 0, t, i, d);
14
+ } else return o(t, e, i, d);
15
15
  }
16
- function f(t, e) {
17
- if (!i.isUndefined(e))
18
- return d(void 0, e);
16
+ function a(t, e) {
17
+ if (!r.isUndefined(e))
18
+ return o(void 0, e);
19
19
  }
20
20
  function n(t, e) {
21
- if (i.isUndefined(e)) {
22
- if (!i.isUndefined(t))
23
- return d(void 0, t);
24
- } else return d(void 0, e);
21
+ if (r.isUndefined(e)) {
22
+ if (!r.isUndefined(t))
23
+ return o(void 0, t);
24
+ } else return o(void 0, e);
25
25
  }
26
- function m(t, e, r) {
27
- if (r in a)
28
- return d(t, e);
29
- if (r in s)
30
- return d(void 0, t);
26
+ function m(t, e, i) {
27
+ if (i in f)
28
+ return o(t, e);
29
+ if (i in s)
30
+ return o(void 0, t);
31
31
  }
32
- const g = {
33
- url: f,
34
- method: f,
35
- data: f,
32
+ const c = {
33
+ url: a,
34
+ method: a,
35
+ data: a,
36
36
  baseURL: n,
37
37
  transformRequest: n,
38
38
  transformResponse: n,
@@ -58,12 +58,17 @@ function C(s, a) {
58
58
  socketPath: n,
59
59
  responseEncoding: n,
60
60
  validateStatus: m,
61
- headers: (t, e, r) => l(c(t), c(e), r, !0)
61
+ headers: (t, e, i) => l(g(t), g(e), i, !0)
62
62
  };
63
- return i.forEach(Object.keys(Object.assign({}, s, a)), function(e) {
64
- const r = g[e] || l, o = r(s[e], a[e], e);
65
- i.isUndefined(o) && r !== m || (u[e] = o);
66
- }), u;
63
+ return r.forEach(
64
+ Object.keys({ ...s, ...f }),
65
+ function(e) {
66
+ if (e === "__proto__" || e === "constructor" || e === "prototype")
67
+ return;
68
+ const i = r.hasOwnProp(c, e) ? c[e] : l, d = i(s[e], f[e], e);
69
+ r.isUndefined(d) && i !== m || (u[e] = d);
70
+ }
71
+ ), u;
67
72
  }
68
73
  export {
69
74
  C as default
package/notify.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import { jsx as i } from "react/jsx-runtime";
2
2
  import { cloneElement as f } from "react";
3
- import { toast as n } from "react-hot-toast";
3
+ import { toast as n } from "./index6.js";
4
4
  import { nanoid as u } from "./index.browser.js";
5
- import { IconCancel as s, IconCheck as d } from "./index4.js";
5
+ import { IconCancel as s, IconCheck as d } from "./index3.js";
6
6
  import { Button as C } from "./Button.js";
7
7
  import { Thumbnail as c } from "./Thumbnail.js";
8
8
  import { Spinner as h } from "./Spinner2.js";
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@bynder/compact-view",
3
3
  "description": "Bynder Compact View",
4
- "version": "5.2.3",
4
+ "version": "5.2.4",
5
5
  "author": "Bynder",
6
6
  "license": "UNLICENSED",
7
7
  "main": "index.js",
package/positionFns.js ADDED
@@ -0,0 +1,101 @@
1
+ import { __exports as s } from "./positionFns2.js";
2
+ import { __require as q } from "./shims.js";
3
+ import { __require as y } from "./domFns.js";
4
+ var h;
5
+ function F() {
6
+ if (h) return s;
7
+ h = 1, Object.defineProperty(s, "__esModule", {
8
+ value: !0
9
+ }), s.canDragX = D, s.canDragY = _, s.createCoreData = P, s.createDraggableData = M, s.getBoundPosition = X, s.getControlPosition = N, s.snapToGrid = Y;
10
+ var i = q(), u = y();
11
+ function X(t, o, e) {
12
+ if (!t.props.bounds) return [o, e];
13
+ let {
14
+ bounds: n
15
+ } = t.props;
16
+ n = typeof n == "string" ? n : w(n);
17
+ const r = c(t);
18
+ if (typeof n == "string") {
19
+ const {
20
+ ownerDocument: f
21
+ } = r, m = f.defaultView;
22
+ let a;
23
+ if (n === "parent" ? a = r.parentNode : a = f.querySelector(n), !(a instanceof m.HTMLElement))
24
+ throw new Error('Bounds selector "' + n + '" could not find an element.');
25
+ const d = a, p = m.getComputedStyle(r), l = m.getComputedStyle(d);
26
+ n = {
27
+ left: -r.offsetLeft + (0, i.int)(l.paddingLeft) + (0, i.int)(p.marginLeft),
28
+ top: -r.offsetTop + (0, i.int)(l.paddingTop) + (0, i.int)(p.marginTop),
29
+ right: (0, u.innerWidth)(d) - (0, u.outerWidth)(r) - r.offsetLeft + (0, i.int)(l.paddingRight) - (0, i.int)(p.marginRight),
30
+ bottom: (0, u.innerHeight)(d) - (0, u.outerHeight)(r) - r.offsetTop + (0, i.int)(l.paddingBottom) - (0, i.int)(p.marginBottom)
31
+ };
32
+ }
33
+ return (0, i.isNum)(n.right) && (o = Math.min(o, n.right)), (0, i.isNum)(n.bottom) && (e = Math.min(e, n.bottom)), (0, i.isNum)(n.left) && (o = Math.max(o, n.left)), (0, i.isNum)(n.top) && (e = Math.max(e, n.top)), [o, e];
34
+ }
35
+ function Y(t, o, e) {
36
+ const n = Math.round(o / t[0]) * t[0], r = Math.round(e / t[1]) * t[1];
37
+ return [n, r];
38
+ }
39
+ function D(t) {
40
+ return t.props.axis === "both" || t.props.axis === "x";
41
+ }
42
+ function _(t) {
43
+ return t.props.axis === "both" || t.props.axis === "y";
44
+ }
45
+ function N(t, o, e) {
46
+ const n = typeof o == "number" ? (0, u.getTouch)(t, o) : null;
47
+ if (typeof o == "number" && !n) return null;
48
+ const r = c(e), f = e.props.offsetParent || r.offsetParent || r.ownerDocument.body;
49
+ return (0, u.offsetXYFromParent)(n || t, f, e.props.scale);
50
+ }
51
+ function P(t, o, e) {
52
+ const n = !(0, i.isNum)(t.lastX), r = c(t);
53
+ return n ? {
54
+ node: r,
55
+ deltaX: 0,
56
+ deltaY: 0,
57
+ lastX: o,
58
+ lastY: e,
59
+ x: o,
60
+ y: e
61
+ } : {
62
+ node: r,
63
+ deltaX: o - t.lastX,
64
+ deltaY: e - t.lastY,
65
+ lastX: t.lastX,
66
+ lastY: t.lastY,
67
+ x: o,
68
+ y: e
69
+ };
70
+ }
71
+ function M(t, o) {
72
+ const e = t.props.scale;
73
+ return {
74
+ node: o.node,
75
+ x: t.state.x + o.deltaX / e,
76
+ y: t.state.y + o.deltaY / e,
77
+ deltaX: o.deltaX / e,
78
+ deltaY: o.deltaY / e,
79
+ lastX: t.state.x,
80
+ lastY: t.state.y
81
+ };
82
+ }
83
+ function w(t) {
84
+ return {
85
+ left: t.left,
86
+ top: t.top,
87
+ right: t.right,
88
+ bottom: t.bottom
89
+ };
90
+ }
91
+ function c(t) {
92
+ const o = t.findDOMNode();
93
+ if (!o)
94
+ throw new Error("<DraggableCore>: Unmounted during event!");
95
+ return o;
96
+ }
97
+ return s;
98
+ }
99
+ export {
100
+ F as __require
101
+ };
@@ -0,0 +1,4 @@
1
+ var o = {};
2
+ export {
3
+ o as __exports
4
+ };