1(function() { 2 try { 3 var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}; 4 e.SENTRY_RELEASE = { id: "b96dc26" }; 5 var n = new e.Error().stack; 6 n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "1ea568c7-18ac-4b67-978d-e4bdaf0bb3a8", e._sentryDebugIdIdentifier = "sentry-dbid-1ea568c7-18ac-4b67-978d-e4bdaf0bb3a8"); 7 } catch (e) {} 8})(); 9import { a as __toESM, n as __esmMin } from "./rolldown-runtime-sLwMD6dS.js"; 10import { a as cn, i as require_compiler_runtime, n as cva, r as init_dist$1, t as require_jsx_runtime, u as init_utils } from "./jsx-runtime-CHSMGLHp.js"; 11import { t as require_react } from "./react-CrLPhuc5.js"; 12import { a as init_dist$3, d as useLayoutEffect2, f as createContextScope, p as init_dist$2, r as Primitive, u as init_dist$4 } from "./dist-UVQLpsj-.js"; 13import { h as useCallbackRef, m as init_dist$5 } from "./dist-CMhZUM1S.js"; 14//#region node_modules/.pnpm/@[email protected]_@[email protected]_@[email protected]__@types+react@_7afe6898fb0821d3b48e9a7a5e9acf8a/node_modules/@radix-ui/react-avatar/dist/index.mjs 15function useImageLoadingStatus(src, { loadingStatus, setLoadingStatus, referrerPolicy, crossOrigin }) { 16 useLayoutEffect2(() => { 17 if (!src) { 18 setLoadingStatus("error"); 19 return; 20 } 21 const image = new window.Image(); 22 const handleLoad = /* @__PURE__ */ __name((event) => { 23 const image2 = event.currentTarget;
24 setLoadingStatus(getImageLoadingStatus(image2)); 25 }, "handleLoad"); 26 const handleError = /* @__PURE__ */ __name(() => setLoadingStatus("error"), "handleError"); 27 image.addEventListener("load", handleLoad); 28 image.addEventListener("error", handleError); 29 if (referrerPolicy) image.referrerPolicy = referrerPolicy; 30 image.crossOrigin = crossOrigin ?? null; 31 image.src = src; 32 setLoadingStatus(getImageLoadingStatus(image)); 33 return () => { 34 image.removeEventListener("load", handleLoad); 35 image.removeEventListener("error", handleError); 36 setLoadingStatus("idle"); 37 }; 38 }, [ 39 src, 40 crossOrigin, 41 referrerPolicy, 42 setLoadingStatus 43 ]); 44 return loadingStatus; 45} 46function getImageLoadingStatus(image) { 47 return image.complete ? image.naturalWidth > 0 ? "loaded" : "error" : "loading"; 48} 49function useImageCount() { 50 return STATIC_IMAGE_COUNT_STATE; 51} 52function useUpdateImageCount(setImageCount) {} 53var import_react$1, import_jsx_runtime$1, __defProp, __name, AVATAR_NAME, createAvatarContext, createAvatarScope, STATIC_IMAGE_COUNT_STATE, AvatarProvider, useAvatarContext, Avatar$1, IMAGE_NAME, AvatarImage$1, FALLBACK_NAME, AvatarFallback$1; 54function init_dist() { 55 return (init_dist = __esmMin((() => { 56 import_react$1 = /* @__PURE__ */ __toESM(require_react(), 1); 57 init_dist$2(); 58 init_dist$5(); 59 init_dist$4(); 60 init_dist$3(); 61 import_jsx_runtime$1 = require_jsx_runtime(); 62 __defProp = Object.defineProperty; 63 __name = (target, value) => __defProp(target, "name", { 64 value, 65 configurable: true 66 }); 67 AVATAR_NAME = "Avatar"; 68 [createAvatarContext, createAvatarScope] = createContextScope(AVATAR_NAME); 69 STATIC_IMAGE_COUNT_STATE = [0, () => void 0]; 70 [AvatarProvider, useAvatarContext] = createAvatarContext(AVATAR_NAME); 71 Avatar$1 = /* @__PURE__ */ import_react$1.forwardRef(/* @__PURE__ */ __name(function Avatar2(props, forwardedRef) { 72 const { __scopeAvatar, ...avatarProps } = props; 73 const [imageLoadingStatus, setImageLoadingStatus] = import_react$1.useState("idle"); 74 const [imageCount, setImageCount] = useImageCount(); 75 return /* @__PURE__ */ (0, import_jsx_runtime$1.jsx)(AvatarProvider, { 76 scope: __scopeAvatar, 77 imageLoadingStatus, 78 setImageLoadingStatus, 79 imageCount, 80 setImageCount, 81 children: /* @__PURE__ */ (0, import_jsx_runtime$1.jsx)(Primitive.span, { 82 ...avatarProps, 83 ref: forwardedRef 84 }) 85 }); 86 }, "Avatar")); 87 IMAGE_NAME = "AvatarImage"; 88 AvatarImage$1 = /* @__PURE__ */ import_react$1.forwardRef(/* @__PURE__ */ __name(function AvatarImage2(props, forwardedRef) { 89 const { __scopeAvatar, src, onLoadingStatusChange, ...imageProps } = props; 90 const context = useAvatarContext(IMAGE_NAME, __scopeAvatar); 91 context.setImageCount; 92 const imageLoadingStatus = useImageLoadingStatus(src, { 93 referrerPolicy: imageProps.referrerPolicy, 94 crossOrigin: imageProps.crossOrigin, 95 loadingStatus: context.imageLoadingStatus, 96 setLoadingStatus: context.setImageLoadingStatus 97 }); 98 const handleLoadingStatusChange = useCallbackRef((status) => { 99 onLoadingStatusChange?.(status); 100 }); 101 const loadingStatusRef = import_react$1.useRef(imageLoadingStatus); 102 useLayoutEffect2(() => { 103 const previousLoadingStatus = loadingStatusRef.current; 104 loadingStatusRef.current = imageLoadingStatus; 105 if (imageLoadingStatus !== previousLoadingStatus) handleLoadingStatusChange(imageLoadingStatus); 106 }, [imageLoadingStatus, handleLoadingStatusChange]);
107 return imageLoadingStatus === "loaded" ? /* @__PURE__ */ (0, import_jsx_runtime$1.jsx)(Primitive.img, { 108 ...imageProps, 109 ref: forwardedRef, 110 src 111 }) : null; 112 }, "AvatarImage")); 113 FALLBACK_NAME = "AvatarFallback"; 114 AvatarFallback$1 = /* @__PURE__ */ import_react$1.forwardRef(/* @__PURE__ */ __name(function AvatarFallback2(props, forwardedRef) { 115 const { __scopeAvatar, delayMs, ...fallbackProps } = props; 116 const context = useAvatarContext(FALLBACK_NAME, __scopeAvatar); 117 const [canRender, setCanRender] = import_react$1.useState(delayMs === void 0); 118 import_react$1.useEffect(() => { 119 if (delayMs !== void 0) { 120 const timerId = window.setTimeout(() => setCanRender(true), delayMs); 121 return () => window.clearTimeout(timerId); 122 } 123 }, [delayMs]); 124 return canRender && context.imageLoadingStatus !== "loaded" ? /* @__PURE__ */ (0, import_jsx_runtime$1.jsx)(Primitive.span, { 125 ...fallbackProps, 126 ref: forwardedRef 127 }) : null; 128 }, "AvatarFallback")); 129 __name(useImageLoadingStatus, "useImageLoadingStatus"); 130 __name(getImageLoadingStatus, "getImageLoadingStatus"); 131 __name(useImageCount, "useImageCount"); 132 __name(useUpdateImageCount, "useUpdateImageCount"); 133 })))(); 134} 135//#endregion 136//#region app/frontend/react/ui/avatar.tsx 137var import_compiler_runtime, import_react, import_jsx_runtime, avatarVariants, Avatar, AvatarImage, AvatarFallback; 138function init_avatar() { 139 return (init_avatar = __esmMin((() => { 140 import_compiler_runtime = require_compiler_runtime(); 141 import_react = /* @__PURE__ */ __toESM(require_react()); 142 init_dist(); 143 init_utils(); 144 init_dist$1(); 145 import_jsx_runtime = require_jsx_runtime(); 146 avatarVariants = cva("h-avatar", { variants: { 147 size: { 148 xs: "h-avatar--xs", 149 sm: "h-avatar--sm", 150 lg: "h-avatar--lg", 151 xxl: "h-avatar--xxl", 152 auto: "h-avatar--auto" 153 }, 154 squared: { true: "h-avatar--squared" } 155 } }); 156 Avatar = import_react.forwardRef((t0, ref) => { 157 const $ = (0, import_compiler_runtime.c)(13); 158 let className; 159 let props; 160 let size; 161 let squared; 162 if ($[0] !== t0) { 163 ({className, size, squared, ...props} = t0); 164 $[0] = t0; 165 $[1] = className; 166 $[2] = props; 167 $[3] = size; 168 $[4] = squared; 169 } else { 170 className = $[1]; 171 props = $[2]; 172 size = $[3]; 173 squared = $[4]; 174 } 175 let t1; 176 if ($[5] !== className || $[6] !== size || $[7] !== squared) { 177 t1 = cn(avatarVariants({ 178 size, 179 squared 180 }), className); 181 $[5] = className; 182 $[6] = size; 183 $[7] = squared; 184 $[8] = t1; 185 } else t1 = $[8]; 186 let t2; 187 if ($[9] !== props || $[10] !== ref || $[11] !== t1) { 188 t2 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Avatar$1, { 189 ref, 190 className: t1, 191 ...props 192 }); 193 $[9] = props; 194 $[10] = ref; 195 $[11] = t1; 196 $[12] = t2; 197 } else t2 = $[12]; 198 return t2; 199 }); 200 Avatar.displayName = Avatar$1.displayName; 201 AvatarImage = import_react.forwardRef((t0, ref) => { 202 const $ = (0, import_compiler_runtime.c)(9); 203 let className; 204 let props; 205 if ($[0] !== t0) { 206 ({className, ...props} = t0); 207 $[0] = t0; 208 $[1] = className; 209 $[2] = props; 210 } else { 211 className = $[1]; 212 props = $[2]; 213 } 214 let t1; 215 if ($[3] !== className) { 216 t1 = cn(className); 217 $[3] = className; 218 $[4] = t1; 219 } else t1 = $[4]; 220 let t2; 221 if ($[5] !== props || $[6] !== ref || $[7] !== t1) { 222 t2 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AvatarImage$1, { 223 ref, 224 className: t1, 225 ...props 226 }); 227 $[5] = props; 228 $[6] = ref; 229 $[7] = t1; 230 $[8] = t2; 231 } else t2 = $[8]; 232 return t2; 233 }); 234 AvatarImage.displayName = AvatarImage$1.displayName; 235 AvatarFallback = import_react.forwardRef((t0, ref) => { 236 const $ = (0, import_compiler_runtime.c)(9); 237 let className; 238 let props; 239 if ($[0] !== t0) { 240 ({className, ...props} = t0); 241 $[0] = t0; 242 $[1] = className; 243 $[2] = props; 244 } else { 245 className = $[1]; 246 props = $[2]; 247 } 248 let t1; 249 if ($[3] !== className) { 250 t1 = cn(className); 251 $[3] = className; 252 $[4] = t1; 253 } else t1 = $[4]; 254 let t2; 255 if ($[5] !== props || $[6] !== ref || $[7] !== t1) { 256 t2 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AvatarFallback$1, { 257 ref, 258 className: t1, 259 ...props 260 }); 261 $[5] = props; 262 $[6] = ref; 263 $[7] = t1; 264 $[8] = t2; 265 } else t2 = $[8]; 266 return t2; 267 }); 268 AvatarFallback.displayName = AvatarFallback$1.displayName; 269 })))(); 270} 271//#endregion 272export { init_avatar as i, AvatarFallback as n, AvatarImage as r, Avatar as t };
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.