@sentry/react 10.53.1 → 10.55.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (78) hide show
  1. package/build/cjs/constants.js +3 -5
  2. package/build/cjs/constants.js.map +1 -1
  3. package/build/cjs/debug-build.js +0 -5
  4. package/build/cjs/debug-build.js.map +1 -1
  5. package/build/cjs/error.js +12 -72
  6. package/build/cjs/error.js.map +1 -1
  7. package/build/cjs/errorboundary.js +22 -77
  8. package/build/cjs/errorboundary.js.map +1 -1
  9. package/build/cjs/hoist-non-react-statics.js +16 -84
  10. package/build/cjs/hoist-non-react-statics.js.map +1 -1
  11. package/build/cjs/isSyntheticEvent.js +10 -0
  12. package/build/cjs/isSyntheticEvent.js.map +1 -0
  13. package/build/cjs/profiler.js +35 -110
  14. package/build/cjs/profiler.js.map +1 -1
  15. package/build/cjs/reactrouter-compat-utils/instrumentation.js +219 -690
  16. package/build/cjs/reactrouter-compat-utils/instrumentation.js.map +1 -1
  17. package/build/cjs/reactrouter-compat-utils/lazy-routes.js +24 -85
  18. package/build/cjs/reactrouter-compat-utils/lazy-routes.js.map +1 -1
  19. package/build/cjs/reactrouter-compat-utils/route-manifest.js +17 -95
  20. package/build/cjs/reactrouter-compat-utils/route-manifest.js.map +1 -1
  21. package/build/cjs/reactrouter-compat-utils/utils.js +48 -190
  22. package/build/cjs/reactrouter-compat-utils/utils.js.map +1 -1
  23. package/build/cjs/reactrouter.js +33 -113
  24. package/build/cjs/reactrouter.js.map +1 -1
  25. package/build/cjs/reactrouterv3.js +27 -59
  26. package/build/cjs/reactrouterv3.js.map +1 -1
  27. package/build/cjs/reactrouterv6.js +8 -41
  28. package/build/cjs/reactrouterv6.js.map +1 -1
  29. package/build/cjs/reactrouterv7.js +8 -41
  30. package/build/cjs/reactrouterv7.js.map +1 -1
  31. package/build/cjs/redux.js +60 -88
  32. package/build/cjs/redux.js.map +1 -1
  33. package/build/cjs/sdk.js +13 -8
  34. package/build/cjs/sdk.js.map +1 -1
  35. package/build/cjs/tanstackrouter.js +24 -64
  36. package/build/cjs/tanstackrouter.js.map +1 -1
  37. package/build/esm/constants.js +3 -5
  38. package/build/esm/constants.js.map +1 -1
  39. package/build/esm/debug-build.js +0 -5
  40. package/build/esm/debug-build.js.map +1 -1
  41. package/build/esm/error.js +12 -72
  42. package/build/esm/error.js.map +1 -1
  43. package/build/esm/errorboundary.js +22 -77
  44. package/build/esm/errorboundary.js.map +1 -1
  45. package/build/esm/hoist-non-react-statics.js +16 -84
  46. package/build/esm/hoist-non-react-statics.js.map +1 -1
  47. package/build/esm/isSyntheticEvent.js +8 -0
  48. package/build/esm/isSyntheticEvent.js.map +1 -0
  49. package/build/esm/package.json +1 -1
  50. package/build/esm/profiler.js +35 -110
  51. package/build/esm/profiler.js.map +1 -1
  52. package/build/esm/reactrouter-compat-utils/instrumentation.js +219 -690
  53. package/build/esm/reactrouter-compat-utils/instrumentation.js.map +1 -1
  54. package/build/esm/reactrouter-compat-utils/lazy-routes.js +24 -85
  55. package/build/esm/reactrouter-compat-utils/lazy-routes.js.map +1 -1
  56. package/build/esm/reactrouter-compat-utils/route-manifest.js +17 -95
  57. package/build/esm/reactrouter-compat-utils/route-manifest.js.map +1 -1
  58. package/build/esm/reactrouter-compat-utils/utils.js +48 -190
  59. package/build/esm/reactrouter-compat-utils/utils.js.map +1 -1
  60. package/build/esm/reactrouter.js +33 -113
  61. package/build/esm/reactrouter.js.map +1 -1
  62. package/build/esm/reactrouterv3.js +27 -59
  63. package/build/esm/reactrouterv3.js.map +1 -1
  64. package/build/esm/reactrouterv6.js +8 -41
  65. package/build/esm/reactrouterv6.js.map +1 -1
  66. package/build/esm/reactrouterv7.js +8 -41
  67. package/build/esm/reactrouterv7.js.map +1 -1
  68. package/build/esm/redux.js +60 -88
  69. package/build/esm/redux.js.map +1 -1
  70. package/build/esm/sdk.js +15 -10
  71. package/build/esm/sdk.js.map +1 -1
  72. package/build/esm/tanstackrouter.js +24 -64
  73. package/build/esm/tanstackrouter.js.map +1 -1
  74. package/build/types/isSyntheticEvent.d.ts +10 -0
  75. package/build/types/isSyntheticEvent.d.ts.map +1 -0
  76. package/build/types/sdk.d.ts.map +1 -1
  77. package/build/types-ts3.8/isSyntheticEvent.d.ts +10 -0
  78. package/package.json +3 -3
@@ -1 +1 @@
1
- {"version":3,"file":"hoist-non-react-statics.js","sources":["../../src/hoist-non-react-statics.ts"],"sourcesContent":["/**\n * Inlined implementation of hoist-non-react-statics\n * Original library: https://github.com/mridgway/hoist-non-react-statics\n * License: BSD-3-Clause\n * Copyright 2015, Yahoo! Inc.\n *\n * This is an inlined version to avoid ESM compatibility issues with the original package.\n */\n\nimport type * as React from 'react';\n\n/**\n * React statics that should not be hoisted\n */\nconst REACT_STATICS = {\n childContextTypes: true,\n contextType: true,\n contextTypes: true,\n defaultProps: true,\n displayName: true,\n getDefaultProps: true,\n getDerivedStateFromError: true,\n getDerivedStateFromProps: true,\n mixins: true,\n propTypes: true,\n type: true,\n} as const;\n\n/**\n * Known JavaScript function statics that should not be hoisted\n */\nconst KNOWN_STATICS = {\n name: true,\n length: true,\n prototype: true,\n caller: true,\n callee: true,\n arguments: true,\n arity: true,\n} as const;\n\n/**\n * Statics specific to ForwardRef components\n */\nconst FORWARD_REF_STATICS = {\n $$typeof: true,\n render: true,\n defaultProps: true,\n displayName: true,\n propTypes: true,\n} as const;\n\n/**\n * Statics specific to Memo components\n */\nconst MEMO_STATICS = {\n $$typeof: true,\n compare: true,\n defaultProps: true,\n displayName: true,\n propTypes: true,\n type: true,\n} as const;\n\n/**\n * Inlined react-is utilities\n * We only need to detect ForwardRef and Memo types\n */\nconst ForwardRefType = Symbol.for('react.forward_ref');\nconst MemoType = Symbol.for('react.memo');\n\n/**\n * Check if a component is a Memo component\n */\nfunction isMemo(component: unknown): boolean {\n return (\n typeof component === 'object' && component !== null && (component as { $$typeof?: symbol }).$$typeof === MemoType\n );\n}\n\n/**\n * Map of React component types to their specific statics\n */\nconst TYPE_STATICS: Record<symbol, Record<string, boolean>> = {};\nTYPE_STATICS[ForwardRefType] = FORWARD_REF_STATICS;\nTYPE_STATICS[MemoType] = MEMO_STATICS;\n\n/**\n * Get the appropriate statics object for a given component\n */\nfunction getStatics(component: React.ComponentType<unknown>): Record<string, boolean> {\n // React v16.11 and below\n if (isMemo(component)) {\n return MEMO_STATICS;\n }\n\n // React v16.12 and above\n const componentType = (component as { $$typeof?: symbol }).$$typeof;\n return (componentType && TYPE_STATICS[componentType]) || REACT_STATICS;\n}\n\nconst defineProperty = Object.defineProperty.bind(Object);\nconst getOwnPropertyNames = Object.getOwnPropertyNames.bind(Object);\nconst getOwnPropertySymbols = Object.getOwnPropertySymbols?.bind(Object);\nconst getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor.bind(Object);\nconst getPrototypeOf = Object.getPrototypeOf.bind(Object);\nconst objectPrototype = Object.prototype;\n\n/**\n * Copies non-react specific statics from a child component to a parent component.\n * Similar to Object.assign, but copies all static properties from source to target,\n * excluding React-specific statics and known JavaScript statics.\n *\n * @param targetComponent - The component to copy statics to\n * @param sourceComponent - The component to copy statics from\n * @param excludelist - An optional object of keys to exclude from hoisting\n * @returns The target component with hoisted statics\n */\nexport function hoistNonReactStatics<\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n T extends React.ComponentType<any>,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n S extends React.ComponentType<any>,\n C extends Record<string, boolean> = Record<string, never>,\n>(targetComponent: T, sourceComponent: S, excludelist?: C): T {\n if (typeof sourceComponent !== 'string') {\n // Don't hoist over string (html) components\n if (objectPrototype) {\n const inheritedComponent = getPrototypeOf(sourceComponent);\n\n if (inheritedComponent && inheritedComponent !== objectPrototype) {\n hoistNonReactStatics(targetComponent, inheritedComponent, excludelist);\n }\n }\n\n let keys: (string | symbol)[] = getOwnPropertyNames(sourceComponent);\n\n if (getOwnPropertySymbols) {\n keys = keys.concat(getOwnPropertySymbols(sourceComponent));\n }\n\n const targetStatics = getStatics(targetComponent);\n const sourceStatics = getStatics(sourceComponent);\n\n for (const key of keys) {\n // Use key directly - String(key) throws for Symbols if minified to '' + key (#18966)\n if (\n !KNOWN_STATICS[key as keyof typeof KNOWN_STATICS] &&\n !excludelist?.[key as keyof C] &&\n !sourceStatics?.[key as string] &&\n !targetStatics?.[key as string] &&\n !getOwnPropertyDescriptor(targetComponent, key) // Don't overwrite existing properties\n ) {\n const descriptor = getOwnPropertyDescriptor(sourceComponent, key);\n\n if (descriptor) {\n try {\n // Avoid failures from read-only properties\n defineProperty(targetComponent, key, descriptor);\n } catch (_e) {\n // Silently ignore errors\n }\n }\n }\n }\n }\n\n return targetComponent;\n}\n"],"names":[],"mappings":"AAWA;AACA;AACA;AACA,MAAM,gBAAgB;AACtB,EAAE,iBAAiB,EAAE,IAAI;AACzB,EAAE,WAAW,EAAE,IAAI;AACnB,EAAE,YAAY,EAAE,IAAI;AACpB,EAAE,YAAY,EAAE,IAAI;AACpB,EAAE,WAAW,EAAE,IAAI;AACnB,EAAE,eAAe,EAAE,IAAI;AACvB,EAAE,wBAAwB,EAAE,IAAI;AAChC,EAAE,wBAAwB,EAAE,IAAI;AAChC,EAAE,MAAM,EAAE,IAAI;AACd,EAAE,SAAS,EAAE,IAAI;AACjB,EAAE,IAAI,EAAE,IAAI;AACZ,CAAA;;AAEA;AACA;AACA;AACA,MAAM,gBAAgB;AACtB,EAAE,IAAI,EAAE,IAAI;AACZ,EAAE,MAAM,EAAE,IAAI;AACd,EAAE,SAAS,EAAE,IAAI;AACjB,EAAE,MAAM,EAAE,IAAI;AACd,EAAE,MAAM,EAAE,IAAI;AACd,EAAE,SAAS,EAAE,IAAI;AACjB,EAAE,KAAK,EAAE,IAAI;AACb,CAAA;;AAEA;AACA;AACA;AACA,MAAM,sBAAsB;AAC5B,EAAE,QAAQ,EAAE,IAAI;AAChB,EAAE,MAAM,EAAE,IAAI;AACd,EAAE,YAAY,EAAE,IAAI;AACpB,EAAE,WAAW,EAAE,IAA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E,QAAQ,IAAI,UAAU,EAAE;AACxB,UAAU,IAAI;AACd;AACA,YAAY,cAAc,CAAC,eAAe,EAAE,GAAG,EAAE,UAAU,CAAC;AAC5D,UAAU,CAAA,CAAE,OAAO,EAAE,EAAE;AACvB;AACA,UAAU;AACV,QAAQ;AACR,MAAM;AACN,IAAI;AACJ,EAAE;;AAEF,EAAE,OAAO,eAAe;AACxB;;;;"}
1
+ {"version":3,"file":"hoist-non-react-statics.js","sources":["../../src/hoist-non-react-statics.ts"],"sourcesContent":["/**\n * Inlined implementation of hoist-non-react-statics\n * Original library: https://github.com/mridgway/hoist-non-react-statics\n * License: BSD-3-Clause\n * Copyright 2015, Yahoo! Inc.\n *\n * This is an inlined version to avoid ESM compatibility issues with the original package.\n */\n\nimport type * as React from 'react';\n\n/**\n * React statics that should not be hoisted\n */\nconst REACT_STATICS = {\n childContextTypes: true,\n contextType: true,\n contextTypes: true,\n defaultProps: true,\n displayName: true,\n getDefaultProps: true,\n getDerivedStateFromError: true,\n getDerivedStateFromProps: true,\n mixins: true,\n propTypes: true,\n type: true,\n} as const;\n\n/**\n * Known JavaScript function statics that should not be hoisted\n */\nconst KNOWN_STATICS = {\n name: true,\n length: true,\n prototype: true,\n caller: true,\n callee: true,\n arguments: true,\n arity: true,\n} as const;\n\n/**\n * Statics specific to ForwardRef components\n */\nconst FORWARD_REF_STATICS = {\n $$typeof: true,\n render: true,\n defaultProps: true,\n displayName: true,\n propTypes: true,\n} as const;\n\n/**\n * Statics specific to Memo components\n */\nconst MEMO_STATICS = {\n $$typeof: true,\n compare: true,\n defaultProps: true,\n displayName: true,\n propTypes: true,\n type: true,\n} as const;\n\n/**\n * Inlined react-is utilities\n * We only need to detect ForwardRef and Memo types\n */\nconst ForwardRefType = Symbol.for('react.forward_ref');\nconst MemoType = Symbol.for('react.memo');\n\n/**\n * Check if a component is a Memo component\n */\nfunction isMemo(component: unknown): boolean {\n return (\n typeof component === 'object' && component !== null && (component as { $$typeof?: symbol }).$$typeof === MemoType\n );\n}\n\n/**\n * Map of React component types to their specific statics\n */\nconst TYPE_STATICS: Record<symbol, Record<string, boolean>> = {};\nTYPE_STATICS[ForwardRefType] = FORWARD_REF_STATICS;\nTYPE_STATICS[MemoType] = MEMO_STATICS;\n\n/**\n * Get the appropriate statics object for a given component\n */\nfunction getStatics(component: React.ComponentType<unknown>): Record<string, boolean> {\n // React v16.11 and below\n if (isMemo(component)) {\n return MEMO_STATICS;\n }\n\n // React v16.12 and above\n const componentType = (component as { $$typeof?: symbol }).$$typeof;\n return (componentType && TYPE_STATICS[componentType]) || REACT_STATICS;\n}\n\nconst defineProperty = Object.defineProperty.bind(Object);\nconst getOwnPropertyNames = Object.getOwnPropertyNames.bind(Object);\nconst getOwnPropertySymbols = Object.getOwnPropertySymbols?.bind(Object);\nconst getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor.bind(Object);\nconst getPrototypeOf = Object.getPrototypeOf.bind(Object);\nconst objectPrototype = Object.prototype;\n\n/**\n * Copies non-react specific statics from a child component to a parent component.\n * Similar to Object.assign, but copies all static properties from source to target,\n * excluding React-specific statics and known JavaScript statics.\n *\n * @param targetComponent - The component to copy statics to\n * @param sourceComponent - The component to copy statics from\n * @param excludelist - An optional object of keys to exclude from hoisting\n * @returns The target component with hoisted statics\n */\nexport function hoistNonReactStatics<\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n T extends React.ComponentType<any>,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n S extends React.ComponentType<any>,\n C extends Record<string, boolean> = Record<string, never>,\n>(targetComponent: T, sourceComponent: S, excludelist?: C): T {\n if (typeof sourceComponent !== 'string') {\n // Don't hoist over string (html) components\n if (objectPrototype) {\n const inheritedComponent = getPrototypeOf(sourceComponent);\n\n if (inheritedComponent && inheritedComponent !== objectPrototype) {\n hoistNonReactStatics(targetComponent, inheritedComponent, excludelist);\n }\n }\n\n let keys: (string | symbol)[] = getOwnPropertyNames(sourceComponent);\n\n if (getOwnPropertySymbols) {\n keys = keys.concat(getOwnPropertySymbols(sourceComponent));\n }\n\n const targetStatics = getStatics(targetComponent);\n const sourceStatics = getStatics(sourceComponent);\n\n for (const key of keys) {\n // Use key directly - String(key) throws for Symbols if minified to '' + key (#18966)\n if (\n !KNOWN_STATICS[key as keyof typeof KNOWN_STATICS] &&\n !excludelist?.[key as keyof C] &&\n !sourceStatics?.[key as string] &&\n !targetStatics?.[key as string] &&\n !getOwnPropertyDescriptor(targetComponent, key) // Don't overwrite existing properties\n ) {\n const descriptor = getOwnPropertyDescriptor(sourceComponent, key);\n\n if (descriptor) {\n try {\n // Avoid failures from read-only properties\n defineProperty(targetComponent, key, descriptor);\n } catch (_e) {\n // Silently ignore errors\n }\n }\n }\n }\n }\n\n return targetComponent;\n}\n"],"names":[],"mappings":"AAcA,MAAM,aAAA,GAAgB;AAAA,EACpB,iBAAA,EAAmB,IAAA;AAAA,EACnB,WAAA,EAAa,IAAA;AAAA,EACb,YAAA,EAAc,IAAA;AAAA,EACd,YAAA,EAAc,IAAA;AAAA,EACd,WAAA,EAAa,IAAA;AAAA,EACb,eAAA,EAAiB,IAAA;AAAA,EACjB,wBAAA,EAA0B,IAAA;AAAA,EAC1B,wBAAA,EAA0B,IAAA;AAAA,EAC1B,MAAA,EAAQ,IAAA;AAAA,EACR,SAAA,EAAW,IAAA;AAAA,EACX,IAAA,EAAM;AACR,CAAA;AAKA,MAAM,aAAA,GAAgB;AAAA,EACpB,IAAA,EAAM,IAAA;AAAA,EACN,MAAA,EAAQ,IAAA;AAAA,EACR,SAAA,EAAW,IAAA;AAAA,EACX,MAAA,EAAQ,IAAA;AAAA,EACR,MAAA,EAAQ,IAAA;AAAA,EACR,SAAA,EAAW,IAAA;AAAA,EACX,KAAA,EAAO;AACT,CAAA;AAKA,MAAM,mBAAA,GAAsB;AAAA,EAC1B,QAAA,EAAU,IAAA;AAAA,EACV,MAAA,EAAQ,IAAA;AAAA,EACR,YAAA,EAAc,IAAA;AAAA,EACd,WAAA,EAAa,IAAA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wat) {
4
+ return isPlainObject(wat) && "nativeEvent" in wat && "preventDefault" in wat && "stopPropagation" in wat;
5
+ }
6
+
7
+ export { isSyntheticEvent };
8
+ //# sourceMappingURL=isSyntheticEvent.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"isSyntheticEvent.js","sources":["../../src/isSyntheticEvent.ts"],"sourcesContent":["import { isPlainObject } from '@sentry/core';\n\n/**\n * Checks whether given value's type is a React `SyntheticEvent`.\n *\n * The check is structural: SyntheticEvent doesn't expose a stable constructor we can\n * use across React versions / module duplicates, so we look for the small surface\n * (`nativeEvent`, `preventDefault`, `stopPropagation`) that every SyntheticEvent has\n * and that's unusual for plain objects to all have at once.\n */\nexport function isSyntheticEvent(wat: unknown): boolean {\n return isPlainObject(wat) && 'nativeEvent' in wat && 'preventDefault' in wat && 'stopPropagation' in wat;\n}\n"],"names":[],"mappings":";;AAUO,SAAS,iBAAiB,GAAA,EAAuB;AACtD,EAAA,OAAO,cAAc,GAAG,CAAA,IAAK,iBAAiB,GAAA,IAAO,gBAAA,IAAoB,OAAO,iBAAA,IAAqB,GAAA;AACvG;;;;"}
@@ -1 +1 @@
1
- {"type":"module","version":"10.53.1","sideEffects":false}
1
+ {"type":"module","version":"10.55.0","sideEffects":false}
@@ -4,56 +4,33 @@ import * as React from 'react';
4
4
  import { REACT_MOUNT_OP, REACT_UPDATE_OP, REACT_RENDER_OP } from './constants.js';
5
5
  import { hoistNonReactStatics } from './hoist-non-react-statics.js';
6
6
 
7
- const UNKNOWN_COMPONENT = 'unknown';
8
-
9
- /**
10
- * The Profiler component leverages Sentry's Tracing integration to generate
11
- * spans based on component lifecycles.
12
- */
7
+ const UNKNOWN_COMPONENT = "unknown";
13
8
  class Profiler extends React.Component {
14
- /**
15
- * The span of the mount activity
16
- * Made protected for the React Native SDK to access
17
- */
18
-
19
- /**
20
- * The span that represents the duration of time between shouldComponentUpdate and componentDidUpdate
21
- */
22
-
23
- constructor(props) {
9
+ constructor(props) {
24
10
  super(props);
25
11
  const { name, disabled = false } = this.props;
26
-
27
12
  if (disabled) {
28
13
  return;
29
14
  }
30
-
31
15
  this._mountSpan = startInactiveSpan({
32
16
  name: `<${name}>`,
33
17
  onlyIfParent: true,
34
18
  op: REACT_MOUNT_OP,
35
19
  attributes: {
36
- [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.ui.react.profiler',
37
- 'ui.component_name': name,
38
- },
20
+ [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: "auto.ui.react.profiler",
21
+ "ui.component_name": name
22
+ }
39
23
  });
40
24
  }
41
-
42
25
  // If a component mounted, we can finish the mount activity.
43
- componentDidMount() {
26
+ componentDidMount() {
44
27
  if (this._mountSpan) {
45
28
  this._mountSpan.end();
46
29
  }
47
30
  }
48
-
49
- shouldComponentUpdate({ updateProps, includeUpdates = true }) {
50
- // Only generate an update span if includeUpdates is true, if there is a valid mountSpan,
51
- // and if the updateProps have changed. It is ok to not do a deep equality check here as it is expensive.
52
- // We are just trying to give baseline clues for further investigation.
31
+ shouldComponentUpdate({ updateProps, includeUpdates = true }) {
53
32
  if (includeUpdates && this._mountSpan && updateProps !== this.props.updateProps) {
54
- // See what props have changed between the previous props, and the current props. This is
55
- // set as data on the span. We just store the prop keys as the values could be potentially very large.
56
- const changedProps = Object.keys(updateProps).filter(k => updateProps[k] !== this.props.updateProps[k]);
33
+ const changedProps = Object.keys(updateProps).filter((k) => updateProps[k] !== this.props.updateProps[k]);
57
34
  if (changedProps.length > 0) {
58
35
  const now = timestampInSeconds();
59
36
  this._updateSpan = withActiveSpan(this._mountSpan, () => {
@@ -63,31 +40,27 @@ class Profiler extends React.Component {
63
40
  op: REACT_UPDATE_OP,
64
41
  startTime: now,
65
42
  attributes: {
66
- [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.ui.react.profiler',
67
- 'ui.component_name': this.props.name,
68
- 'ui.react.changed_props': changedProps,
69
- },
43
+ [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: "auto.ui.react.profiler",
44
+ "ui.component_name": this.props.name,
45
+ "ui.react.changed_props": changedProps
46
+ }
70
47
  });
71
48
  });
72
49
  }
73
50
  }
74
-
75
51
  return true;
76
52
  }
77
-
78
- componentDidUpdate() {
53
+ componentDidUpdate() {
79
54
  if (this._updateSpan) {
80
55
  this._updateSpan.end();
81
- this._updateSpan = undefined;
56
+ this._updateSpan = void 0;
82
57
  }
83
58
  }
84
-
85
59
  // If a component is unmounted, we can say it is no longer on the screen.
86
60
  // This means we can finish the span representing the component render.
87
- componentWillUnmount() {
61
+ componentWillUnmount() {
88
62
  const endTimestamp = timestampInSeconds();
89
63
  const { name, includeRender = true } = this.props;
90
-
91
64
  if (this._mountSpan && includeRender) {
92
65
  const startTime = spanToJSON(this._mountSpan).timestamp;
93
66
  withActiveSpan(this._mountSpan, () => {
@@ -97,123 +70,75 @@ class Profiler extends React.Component {
97
70
  op: REACT_RENDER_OP,
98
71
  startTime,
99
72
  attributes: {
100
- [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.ui.react.profiler',
101
- 'ui.component_name': name,
102
- },
73
+ [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: "auto.ui.react.profiler",
74
+ "ui.component_name": name
75
+ }
103
76
  });
104
77
  if (renderSpan) {
105
- // Have to cast to Span because the type of _mountSpan is Span | undefined
106
- // and not getting narrowed properly
107
78
  renderSpan.end(endTimestamp);
108
79
  }
109
80
  });
110
81
  }
111
82
  }
112
-
113
- render() {
83
+ render() {
114
84
  return this.props.children;
115
85
  }
116
86
  }
117
-
118
- // React.Component default props are defined as static property on the class
119
87
  Object.assign(Profiler, {
120
88
  defaultProps: {
121
89
  disabled: false,
122
90
  includeRender: true,
123
- includeUpdates: true,
124
- },
91
+ includeUpdates: true
92
+ }
125
93
  });
126
-
127
- /**
128
- * withProfiler is a higher order component that wraps a
129
- * component in a {@link Profiler} component. It is recommended that
130
- * the higher order component be used over the regular {@link Profiler} component.
131
- *
132
- * @param WrappedComponent component that is wrapped by Profiler
133
- * @param options the {@link ProfilerProps} you can pass into the Profiler
134
- */
135
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
136
- function withProfiler(
137
- WrappedComponent,
138
- // We do not want to have `updateProps` given in options, it is instead filled through the HOC.
139
- options,
140
- ) {
141
- const componentDisplayName =
142
- options?.name || WrappedComponent.displayName || WrappedComponent.name || UNKNOWN_COMPONENT;
143
-
144
- const Wrapped = (props) => (
145
- React.createElement(Profiler, { ...options, name: componentDisplayName, updateProps: props,}
146
- , React.createElement(WrappedComponent, { ...props,} )
147
- )
148
- );
149
-
94
+ function withProfiler(WrappedComponent, options) {
95
+ const componentDisplayName = options?.name || WrappedComponent.displayName || WrappedComponent.name || UNKNOWN_COMPONENT;
96
+ const Wrapped = (props) => /* @__PURE__ */ React.createElement(Profiler, { ...options, name: componentDisplayName, updateProps: props }, /* @__PURE__ */ React.createElement(WrappedComponent, { ...props }));
150
97
  Wrapped.displayName = `profiler(${componentDisplayName})`;
151
-
152
- // Copy over static methods from Wrapped component to Profiler HOC
153
- // See: https://reactjs.org/docs/higher-order-components.html#static-methods-must-be-copied-over
154
98
  hoistNonReactStatics(Wrapped, WrappedComponent);
155
99
  return Wrapped;
156
100
  }
157
-
158
- /**
159
- *
160
- * `useProfiler` is a React hook that profiles a React component.
161
- *
162
- * Requires React 16.8 or above.
163
- * @param name displayName of component being profiled
164
- */
165
- function useProfiler(
166
- name,
167
- options = {
168
- disabled: false,
169
- hasRenderSpan: true,
170
- },
171
- ) {
101
+ function useProfiler(name, options = {
102
+ disabled: false,
103
+ hasRenderSpan: true
104
+ }) {
172
105
  const [mountSpan] = React.useState(() => {
173
106
  if (options?.disabled) {
174
- return undefined;
107
+ return void 0;
175
108
  }
176
-
177
109
  return startInactiveSpan({
178
110
  name: `<${name}>`,
179
111
  onlyIfParent: true,
180
112
  op: REACT_MOUNT_OP,
181
113
  attributes: {
182
- [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.ui.react.profiler',
183
- 'ui.component_name': name,
184
- },
114
+ [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: "auto.ui.react.profiler",
115
+ "ui.component_name": name
116
+ }
185
117
  });
186
118
  });
187
-
188
119
  React.useEffect(() => {
189
120
  if (mountSpan) {
190
121
  mountSpan.end();
191
122
  }
192
-
193
123
  return () => {
194
124
  if (mountSpan && options.hasRenderSpan) {
195
125
  const startTime = spanToJSON(mountSpan).timestamp;
196
126
  const endTimestamp = timestampInSeconds();
197
-
198
127
  const renderSpan = startInactiveSpan({
199
128
  name: `<${name}>`,
200
129
  onlyIfParent: true,
201
130
  op: REACT_RENDER_OP,
202
131
  startTime,
203
132
  attributes: {
204
- [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.ui.react.profiler',
205
- 'ui.component_name': name,
206
- },
133
+ [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: "auto.ui.react.profiler",
134
+ "ui.component_name": name
135
+ }
207
136
  });
208
137
  if (renderSpan) {
209
- // Have to cast to Span because the type of _mountSpan is Span | undefined
210
- // and not getting narrowed properly
211
138
  renderSpan.end(endTimestamp);
212
139
  }
213
140
  }
214
141
  };
215
- // We only want this to run once.
216
- // eslint-disable-next-line react-hooks/exhaustive-deps
217
142
  }, []);
218
143
  }
219
144
 
@@ -1 +1 @@
1
- {"version":3,"file":"profiler.js","sources":["../../src/profiler.tsx"],"sourcesContent":["import { startInactiveSpan } from '@sentry/browser';\nimport type { Span } from '@sentry/core';\nimport { SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, spanToJSON, timestampInSeconds, withActiveSpan } from '@sentry/core';\nimport * as React from 'react';\nimport { REACT_MOUNT_OP, REACT_RENDER_OP, REACT_UPDATE_OP } from './constants';\nimport { hoistNonReactStatics } from './hoist-non-react-statics';\n\nexport const UNKNOWN_COMPONENT = 'unknown';\n\nexport type ProfilerProps = {\n // The name of the component being profiled.\n name: string;\n // If the Profiler is disabled. False by default. This is useful if you want to disable profilers\n // in certain environments.\n disabled?: boolean;\n // If time component is on page should be displayed as spans. True by default.\n includeRender?: boolean;\n // If component updates should be displayed as spans. True by default.\n includeUpdates?: boolean;\n // Component that is being profiled.\n children?: React.ReactNode;\n // props given to component being profiled.\n updateProps: { [key: string]: unknown };\n};\n\n/**\n * The Profiler component leverages Sentry's Tracing integration to generate\n * spans based on component lifecycles.\n */\nclass Profiler extends React.Component<ProfilerProps> {\n /**\n * The span of the mount activity\n * Made protected for the React Native SDK to access\n */\n protected _mountSpan: Span | undefined;\n /**\n * The span that represents the duration of time between shouldComponentUpdate and componentDidUpdate\n */\n protected _updateSpan: Span | undefined;\n\n public constructor(props: ProfilerProps) {\n super(props);\n const { name, disabled = false } = this.props;\n\n if (disabled) {\n return;\n }\n\n this._mountSpan = startInactiveSpan({\n name: `<${name}>`,\n onlyIfParent: true,\n op: REACT_MOUNT_OP,\n attributes: {\n [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.ui.react.profiler',\n 'ui.component_name': name,\n },\n });\n }\n\n // If a component mounted, we can finish the mount activity.\n public componentDidMount(): void {\n if (this._mountSpan) {\n this._mountSpan.end();\n }\n }\n\n public shouldComponentUpdate({ updateProps, includeUpdates = true }: ProfilerProps): boolean {\n // Only generate an update span if includeUpdates is true, if there is a valid mountSpan,\n // and if the updateProps have changed. It is ok to not do a deep equality check here as it is expensive.\n // We are just trying to give baseline clues for further investigation.\n if (includeUpdates && this._mountSpan && updateProps !== this.props.updateProps) {\n // See what props have changed between the previous props, and the current props. This is\n // set as data on the span. We just store the prop keys as the values could be potentially very large.\n const changedProps = Object.keys(updateProps).filter(k => updateProps[k] !== this.props.updateProps[k]);\n if (changedProps.length > 0) {\n const now = timestampInSeconds();\n this._updateSpan = withActiveSpan(this._mountSpan, () => {\n return startInactiveSpan({\n name: `<${this.props.name}>`,\n onlyIfParent: true,\n op: REACT_UPDATE_OP,\n startTime: now,\n attributes: {\n [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.ui.react.profiler',\n 'ui.component_name': this.props.name,\n 'ui.react.changed_props': changedProps,\n },\n });\n });\n }\n }\n\n return true;\n }\n\n public componentDidUpdate(): void {\n if (this._updateSpan) {\n this._updateSpan.end();\n this._updateSpan = undefined;\n }\n }\n\n // If a component is unmounted, we can say it is no longer on the screen.\n // This means we can finish the span representing the component render.\n public componentWillUnmount(): void {\n const endTimestamp = timestampInSeconds();\n const { name, includeRender = true } = this.props;\n\n if (this._mountSpan && includeRender) {\n const startTime = spanToJSON(this._mountSpan).timestamp;\n withActiveSpan(this._mountSpan, () => {\n const renderSpan = startInactiveSpan({\n onlyIfParent: true,\n name: `<${name}>`,\n op: REACT_RENDER_OP,\n startTime,\n attributes: {\n [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.ui.react.profiler',\n 'ui.component_name': name,\n },\n });\n if (renderSpan) {\n // Have to cast to Span because the type of _mountSpan is Span | undefined\n // and not getting narrowed properly\n renderSpan.end(endTimestamp);\n }\n });\n }\n }\n\n public render(): React.ReactNode {\n return this.props.children;\n }\n}\n\n// React.Component default props are defined as static property on the class\nObject.assign(Profiler, {\n defaultProps: {\n disabled: false,\n includeRender: true,\n includeUpdates: true,\n },\n});\n\n/**\n * withProfiler is a higher order component that wraps a\n * component in a {@link Profiler} component. It is recommended that\n * the higher order component be used over the regular {@link Profiler} component.\n *\n * @param WrappedComponent component that is wrapped by Profiler\n * @param options the {@link ProfilerProps} you can pass into the Profiler\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction withProfiler<P extends Record<string, any>>(\n WrappedComponent: React.ComponentType<P>,\n // We do not want to have `updateProps` given in options, it is instead filled through the HOC.\n options?: Pick<Partial<ProfilerProps>, Exclude<keyof ProfilerProps, 'updateProps' | 'children'>>,\n): React.FC<P> {\n const componentDisplayName =\n options?.name || WrappedComponent.displayName || WrappedComponent.name || UNKNOWN_COMPONENT;\n\n const Wrapped: React.FC<P> = (props: P) => (\n <Profiler {...options} name={componentDisplayName} updateProps={props}>\n <WrappedComponent {...props} />\n </Profiler>\n );\n\n Wrapped.displayName = `profiler(${componentDisplayName})`;\n\n // Copy over static methods from Wrapped component to Profiler HOC\n // See: https://reactjs.org/docs/higher-order-components.html#static-methods-must-be-copied-over\n hoistNonReactStatics(Wrapped, WrappedComponent);\n return Wrapped;\n}\n\n/**\n *\n * `useProfiler` is a React hook that profiles a React component.\n *\n * Requires React 16.8 or above.\n * @param name displayName of component being profiled\n */\nfunction useProfiler(\n name: string,\n options: { disabled?: boolean; hasRenderSpan?: boolean } = {\n disabled: false,\n hasRenderSpan: true,\n },\n): void {\n const [mountSpan] = React.useState(() => {\n if (options?.disabled) {\n return undefined;\n }\n\n return startInactiveSpan({\n name: `<${name}>`,\n onlyIfParent: true,\n op: REACT_MOUNT_OP,\n attributes: {\n [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.ui.react.profiler',\n 'ui.component_name': name,\n },\n });\n });\n\n React.useEffect(() => {\n if (mountSpan) {\n mountSpan.end();\n }\n\n return (): void => {\n if (mountSpan && options.hasRenderSpan) {\n const startTime = spanToJSON(mountSpan).timestamp;\n const endTimestamp = timestampInSeconds();\n\n const renderSpan = startInactiveSpan({\n name: `<${name}>`,\n onlyIfParent: true,\n op: REACT_RENDER_OP,\n startTime,\n attributes: {\n [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.ui.react.profiler',\n 'ui.component_name': name,\n },\n });\n if (renderSpan) {\n // Have to cast to Span because the type of _mountSpan is Span | undefined\n // and not getting narrowed properly\n renderSpan.end(endTimestamp);\n }\n }\n };\n // We only want this to run once.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n}\n\nexport { Profiler, useProfiler, withProfiler };\n"],"names":[],"mappings":";;;;;;AAOO,MAAM,iBAAA,GAAoB;;AAkBjC;AACA;AACA;AACA;AACA,MAAM,QAAA,SAAiB,KAAK,CAAC,SAAS,CAAgB;AACtD;AACA;AACA;AACA;;AAEA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,wBAAwB;AACxE,YAAY,mBAAmB,EAAE,IAAI;AACrC,WAAW;AACX,SAAS,CAAC;AACV,QAAQ,IAAI,UAAU,EAAE;AACxB;AACA;AACA,UAAU,UAAU,CAAC,GAAG,CAAC,YAAY,CAAC;AACtC,QAAQ;AACR,MAAM;AACN,IAAI,CAAC;AACL;AACA;AACA,EAAE,CAAC,EAAE,EAAE,CAAC;AACR;;;;"}
1
+ {"version":3,"file":"profiler.js","sources":["../../src/profiler.tsx"],"sourcesContent":["import { startInactiveSpan } from '@sentry/browser';\nimport type { Span } from '@sentry/core';\nimport { SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, spanToJSON, timestampInSeconds, withActiveSpan } from '@sentry/core';\nimport * as React from 'react';\nimport { REACT_MOUNT_OP, REACT_RENDER_OP, REACT_UPDATE_OP } from './constants';\nimport { hoistNonReactStatics } from './hoist-non-react-statics';\n\nexport const UNKNOWN_COMPONENT = 'unknown';\n\nexport type ProfilerProps = {\n // The name of the component being profiled.\n name: string;\n // If the Profiler is disabled. False by default. This is useful if you want to disable profilers\n // in certain environments.\n disabled?: boolean;\n // If time component is on page should be displayed as spans. True by default.\n includeRender?: boolean;\n // If component updates should be displayed as spans. True by default.\n includeUpdates?: boolean;\n // Component that is being profiled.\n children?: React.ReactNode;\n // props given to component being profiled.\n updateProps: { [key: string]: unknown };\n};\n\n/**\n * The Profiler component leverages Sentry's Tracing integration to generate\n * spans based on component lifecycles.\n */\nclass Profiler extends React.Component<ProfilerProps> {\n /**\n * The span of the mount activity\n * Made protected for the React Native SDK to access\n */\n protected _mountSpan: Span | undefined;\n /**\n * The span that represents the duration of time between shouldComponentUpdate and componentDidUpdate\n */\n protected _updateSpan: Span | undefined;\n\n public constructor(props: ProfilerProps) {\n super(props);\n const { name, disabled = false } = this.props;\n\n if (disabled) {\n return;\n }\n\n this._mountSpan = startInactiveSpan({\n name: `<${name}>`,\n onlyIfParent: true,\n op: REACT_MOUNT_OP,\n attributes: {\n [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.ui.react.profiler',\n 'ui.component_name': name,\n },\n });\n }\n\n // If a component mounted, we can finish the mount activity.\n public componentDidMount(): void {\n if (this._mountSpan) {\n this._mountSpan.end();\n }\n }\n\n public shouldComponentUpdate({ updateProps, includeUpdates = true }: ProfilerProps): boolean {\n // Only generate an update span if includeUpdates is true, if there is a valid mountSpan,\n // and if the updateProps have changed. It is ok to not do a deep equality check here as it is expensive.\n // We are just trying to give baseline clues for further investigation.\n if (includeUpdates && this._mountSpan && updateProps !== this.props.updateProps) {\n // See what props have changed between the previous props, and the current props. This is\n // set as data on the span. We just store the prop keys as the values could be potentially very large.\n const changedProps = Object.keys(updateProps).filter(k => updateProps[k] !== this.props.updateProps[k]);\n if (changedProps.length > 0) {\n const now = timestampInSeconds();\n this._updateSpan = withActiveSpan(this._mountSpan, () => {\n return startInactiveSpan({\n name: `<${this.props.name}>`,\n onlyIfParent: true,\n op: REACT_UPDATE_OP,\n startTime: now,\n attributes: {\n [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.ui.react.profiler',\n 'ui.component_name': this.props.name,\n 'ui.react.changed_props': changedProps,\n },\n });\n });\n }\n }\n\n return true;\n }\n\n public componentDidUpdate(): void {\n if (this._updateSpan) {\n this._updateSpan.end();\n this._updateSpan = undefined;\n }\n }\n\n // If a component is unmounted, we can say it is no longer on the screen.\n // This means we can finish the span representing the component render.\n public componentWillUnmount(): void {\n const endTimestamp = timestampInSeconds();\n const { name, includeRender = true } = this.props;\n\n if (this._mountSpan && includeRender) {\n const startTime = spanToJSON(this._mountSpan).timestamp;\n withActiveSpan(this._mountSpan, () => {\n const renderSpan = startInactiveSpan({\n onlyIfParent: true,\n name: `<${name}>`,\n op: REACT_RENDER_OP,\n startTime,\n attributes: {\n [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.ui.react.profiler',\n 'ui.component_name': name,\n },\n });\n if (renderSpan) {\n // Have to cast to Span because the type of _mountSpan is Span | undefined\n // and not getting narrowed properly\n renderSpan.end(endTimestamp);\n }\n });\n }\n }\n\n public render(): React.ReactNode {\n return this.props.children;\n }\n}\n\n// React.Component default props are defined as static property on the class\nObject.assign(Profiler, {\n defaultProps: {\n disabled: false,\n includeRender: true,\n includeUpdates: true,\n },\n});\n\n/**\n * withProfiler is a higher order component that wraps a\n * component in a {@link Profiler} component. It is recommended that\n * the higher order component be used over the regular {@link Profiler} component.\n *\n * @param WrappedComponent component that is wrapped by Profiler\n * @param options the {@link ProfilerProps} you can pass into the Profiler\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction withProfiler<P extends Record<string, any>>(\n WrappedComponent: React.ComponentType<P>,\n // We do not want to have `updateProps` given in options, it is instead filled through the HOC.\n options?: Pick<Partial<ProfilerProps>, Exclude<keyof ProfilerProps, 'updateProps' | 'children'>>,\n): React.FC<P> {\n const componentDisplayName =\n options?.name || WrappedComponent.displayName || WrappedComponent.name || UNKNOWN_COMPONENT;\n\n const Wrapped: React.FC<P> = (props: P) => (\n <Profiler {...options} name={componentDisplayName} updateProps={props}>\n <WrappedComponent {...props} />\n </Profiler>\n );\n\n Wrapped.displayName = `profiler(${componentDisplayName})`;\n\n // Copy over static methods from Wrapped component to Profiler HOC\n // See: https://reactjs.org/docs/higher-order-components.html#static-methods-must-be-copied-over\n hoistNonReactStatics(Wrapped, WrappedComponent);\n return Wrapped;\n}\n\n/**\n *\n * `useProfiler` is a React hook that profiles a React component.\n *\n * Requires React 16.8 or above.\n * @param name displayName of component being profiled\n */\nfunction useProfiler(\n name: string,\n options: { disabled?: boolean; hasRenderSpan?: boolean } = {\n disabled: false,\n hasRenderSpan: true,\n },\n): void {\n const [mountSpan] = React.useState(() => {\n if (options?.disabled) {\n return undefined;\n }\n\n return startInactiveSpan({\n name: `<${name}>`,\n onlyIfParent: true,\n op: REACT_MOUNT_OP,\n attributes: {\n [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.ui.react.profiler',\n 'ui.component_name': name,\n },\n });\n });\n\n React.useEffect(() => {\n if (mountSpan) {\n mountSpan.end();\n }\n\n return (): void => {\n if (mountSpan && options.hasRenderSpan) {\n const startTime = spanToJSON(mountSpan).timestamp;\n const endTimestamp = timestampInSeconds();\n\n const renderSpan = startInactiveSpan({\n name: `<${name}>`,\n onlyIfParent: true,\n op: REACT_RENDER_OP,\n startTime,\n attributes: {\n [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.ui.react.profiler',\n 'ui.component_name': name,\n },\n });\n if (renderSpan) {\n // Have to cast to Span because the type of _mountSpan is Span | undefined\n // and not getting narrowed properly\n renderSpan.end(endTimestamp);\n }\n }\n };\n // We only want this to run once.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n}\n\nexport { Profiler, useProfiler, withProfiler };\n"],"names":[],"mappings":";;;;;;AAOO,MAAM,iBAAA,GAAoB;AAsBjC,MAAM,QAAA,SAAiB,MAAM,SAAA,CAAyB;AAAA,EAW7C,YAAY,KAAA,EAAsB;AACvC,IAAA,KAAA,CAAM,KAAK,CAAA;AACX,IAAA,MAAM,EAAE,IAAA,EAAM,QAAA,GAAW,KAAA,KAAU,IAAA,CAAK,KAAA;AAExC,IAAA,IAAI,QAAA,EAAU;AACZ,MAAA;AAAA,IACF;AAEA,IAAA,IAAA,CAAK,aAAa,iBAAA,CAAkB;AAAA,MAClC,IAAA,EAAM,IAAI,IAAI,CAAA,CAAA,CAAA;AAAA,MACd,YAAA,EAAc,IAAA;AAAA,MACd,EAAA,EAAI,cAAA;AAAA,MACJ,UAAA,EAAY;AAAA,QACV,CAAC,gCAAgC,GAAG,wBAAA;AAAA,QACpC,mBAAA,EAAqB;AAAA;AACvB,KACD,CAAA;AAAA,EACH;AAAA;AAAA,EAGO,iBAAA,GAA0B;AAC/B,IAAA,IAAI,KAAK,UAAA,EAAY;AACnB,MAAA,IAAA,CAAK,WAAW,GAAA,EAAI;AAAA,IACtB;AAAA,EACF;AAAA,EAEO,qB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