1;!function(){try { var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof global?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&((e._debugIds|| (e._debugIds={}))[n]="9ea81070-1e71-063f-fdca-0293d774071a")}catch(e){}}(); 2(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push([typeof document === "object" ? document.currentScript : undefined, 3898892, ((__turbopack_context__, module, exports) => { 4 5var baseIsEqual = __turbopack_context__.r(14943); 6/** 7 * Performs a deep comparison between two values to determine if they are 8 * equivalent. 9 * 10 * **Note:** This method supports comparing arrays, array buffers, booleans, 11 * date objects, error objects, maps, numbers, `Object` objects, regexes, 12 * sets, strings, symbols, and typed arrays. `Object` objects are compared 13 * by their own, not inherited, enumerable properties. Functions and DOM 14 * nodes are compared by strict equality, i.e. `===`. 15 * 16 * @static 17 * @memberOf _ 18 * @since 0.1.0 19 * @category Lang 20 * @param {*} value The value to compare. 21 * @param {*} other The other value to compare. 22 * @returns {boolean} Returns `true` if the values are equivalent, else `false`. 23 * @example 24 * 25 * var object = { 'a': 1 }; 26 * var other = { 'a': 1 }; 27 * 28 * _.isEqual(object, other); 29 * // => true 30 * 31 * object === other; 32 * // => false 33 */ function isEqual(value, other) { 34 return baseIsEqual(value, other); 35} 36module.exports = isEqual; 37}), 38635804, ((__turbopack_context__) => { 39"use strict"; 40
41// src/use-size.tsx 42var __TURBOPACK__imported__module__271645__ = __turbopack_context__.i(271645); 43var __TURBOPACK__imported__module__934620__ = __turbopack_context__.i(934620); 44var __defProp = Object.defineProperty; 45var __name = (target, value)=>__defProp(target, "name", { 46 value, 47 configurable: true 48 }); 49; 50; 51function useSize(element) { 52 const [size, setSize] = __TURBOPACK__imported__module__271645__["useState"](void 0); 53 (0, __TURBOPACK__imported__module__934620__["useLayoutEffect"])(()=>{ 54 if (element) { 55 setSize({ 56 width: element.offsetWidth, 57 height: element.offsetHeight 58 }); 59 const resizeObserver = new ResizeObserver((entries)=>{ 60 if (!Array.isArray(entries)) { 61 return; 62 } 63 if (!entries.length) { 64 return; 65 } 66 const entry = entries[0]; 67 let width; 68 let height; 69 if ("borderBoxSize" in entry) { 70 const borderSizeEntry = entry["borderBoxSize"]; 71 const borderSize = Array.isArray(borderSizeEntry) ? borderSizeEntry[0] : borderSizeEntry; 72 width = borderSize["inlineSize"]; 73 height = borderSize["blockSize"]; 74 } else { 75 width = element.offsetWidth; 76 height = element.offsetHeight; 77 } 78 setSize({ 79 width, 80 height 81 }); 82 }); 83 resizeObserver.observe(element, { 84 box: "border-box" 85 }); 86 return ()=>resizeObserver.unobserve(element); 87 } else { 88 setSize(void 0); 89 } 90 }, [ 91 element 92 ]); 93 return size; 94} 95__name(useSize, "useSize"); 96; 97__turbopack_context__.s([ 98 "useSize", 99 0, 100 useSize 101]); 102}), 103853660, ((__turbopack_context__) => { 104"use strict"; 105 106// MERGED MODULE: [project]/node_modules/@radix-ui/react-popper/dist/index.mjs [app-client] (ecmascript) 107;
108// src/popper.tsx 109var __TURBOPACK__imported__module__271645__ = __turbopack_context__.i(271645); 110var __TURBOPACK__imported__module__258950__ = __turbopack_context__.i(258950); 111var __TURBOPACK__imported__module__953760__ = __turbopack_context__.i(953760); 112// MERGED MODULE: [project]/node_modules/@radix-ui/react-arrow/dist/index.mjs [app-client] (ecmascript) 113; 114var __TURBOPACK__imported__module__271645__1 = __TURBOPACK__imported__module__271645__; 115var __TURBOPACK__imported__module__248425__ = __turbopack_context__.i(248425); 116var __TURBOPACK__imported__module__843476__ = __turbopack_context__.i(843476); 117var __defProp = Object.defineProperty; 118var __name = (target, value)=>__defProp(target, "name", { 119 value, 120 configurable: true 121 }); 122; 123; 124; 125var Arrow = /* @__PURE__ */ __TURBOPACK__imported__module__271645__1["forwardRef"](/* @__PURE__ */ __name(function Arrow2(props, forwardedRef) { 126 const { children, width = 10, height = 5, ...arrowProps } = props; 127 return /* @__PURE__ */ (0, __TURBOPACK__imported__module__843476__["jsx"])(__TURBOPACK__imported__module__248425__["Primitive"].svg, { 128 ...arrowProps, 129 ref: forwardedRef, 130 width, 131 height,
132 viewBox: "0 0 30 10", 133 preserveAspectRatio: "none", 134 children: props.asChild ? children : /* @__PURE__ */ (0, __TURBOPACK__imported__module__843476__["jsx"])("polygon", { 135 points: "0,0 30,0 15,10" 136 }) 137 }); 138}, "Arrow")); 139var Root = Arrow; 140; 141var __TURBOPACK__imported__module__820783__ = __turbopack_context__.i(820783); 142var __TURBOPACK__imported__module__30030__ = __turbopack_context__.i(30030); 143var __TURBOPACK__imported__module__248425__1 = __TURBOPACK__imported__module__248425__; 144var __TURBOPACK__imported__module__30207__ = __turbopack_context__.i(30207); 145var __TURBOPACK__imported__module__934620__ = __turbopack_context__.i(934620); 146var __TURBOPACK__imported__module__635804__ = __turbopack_context__.i(635804); 147var __TURBOPACK__imported__module__843476__1 = __TURBOPACK__imported__module__843476__; 148"use client"; 149var __defProp1 = Object.defineProperty; 150var __name1 = (target, value)=>__defProp1(target, "name", { 151 value, 152 configurable: true 153 }); 154; 155; 156; 157; 158; 159; 160; 161; 162; 163; 164var SIDE_OPTIONS = [ 165 "top", 166 "right", 167 "bottom", 168 "left" 169]; 170var ALIGN_OPTIONS = [ 171 "start", 172 "center", 173 "end" 174]; 175var POPPER_NAME = "Popper"; 176var [createPopperContext, createPopperScope] = (0, __TURBOPACK__imported__module__30030__["createContextScope"])(POPPER_NAME); 177var [PopperProvider, usePopperContext] = createPopperContext(POPPER_NAME); 178var Popper = /* @__PURE__ */ __name1((props)=>{ 179 const { __scopePopper, children } = props; 180 const [anchor, setAnchor] = __TURBOPACK__imported__module__271645__["useState"](null); 181 const [placementState, setPlacementState] = __TURBOPACK__imported__module__271645__["useState"](void 0); 182 return /* @__PURE__ */ (0, __TURBOPACK__imported__module__843476__1["jsx"])(PopperProvider, { 183 scope: __scopePopper, 184 anchor, 185 onAnchorChange: setAnchor, 186 placementState, 187 setPlacementState, 188 children 189 }); 190}, "Popper"); 191var ANCHOR_NAME = "PopperAnchor"; 192var PopperAnchor = /* @__PURE__ */ __TURBOPACK__imported__module__271645__["forwardRef"](/* @__PURE__ */ __name1(function PopperAnchor2(props, forwardedRef) { 193 const { __scopePopper, virtualRef, ...anchorProps } = props; 194 const context = usePopperContext(ANCHOR_NAME, __scopePopper); 195 const ref = __TURBOPACK__imported__module__271645__["useRef"](null); 196 const onAnchorChange = context.onAnchorChange; 197 const callbackRef = __TURBOPACK__imported__module__271645__["useCallback"]((node)=>{ 198 ref.current = node; 199 if (node) { 200 onAnchorChange(node); 201 } 202 }, [ 203 onAnchorChange 204 ]); 205 const composedRefs = (0, __TURBOPACK__imported__module__820783__["useComposedRefs"])(forwardedRef, callbackRef); 206 const anchorRef = __TURBOPACK__imported__module__271645__["useRef"](null); 207 __TURBOPACK__imported__module__271645__["useEffect"](()=>{ 208 if (!virtualRef) { 209 return; 210 } 211 const previousAnchor = anchorRef.current; 212 anchorRef.current = virtualRef.current; 213 if (previousAnchor !== anchorRef.current) { 214 onAnchorChange(anchorRef.current); 215 } 216 }); 217 const sideAndAlign = context.placementState && getSideAndAlignFromPlacement(context.placementState); 218 const placedSide = sideAndAlign === null || sideAndAlign === void 0 ? void 0 : sideAndAlign[0]; 219 const placedAlign = sideAndAlign === null || sideAndAlign === void 0 ? void 0 : sideAndAlign[1]; 220 return virtualRef ? null : /* @__PURE__ */ (0, __TURBOPACK__imported__module__843476__1["jsx"])(__TURBOPACK__imported__module__248425__1["Primitive"].div, { 221 "data-radix-popper-side": placedSide, 222 "data-radix-popper-align": placedAlign, 223 ...anchorProps, 224 ref: composedRefs 225 }); 226}, "PopperAnchor")); 227var CONTENT_NAME = "PopperContent"; 228var [PopperContentProvider, useContentContext] = createPopperContext(CONTENT_NAME); 229var PopperContent = /* @__PURE__ */ __TURBOPACK__imported__module__271645__["forwardRef"](/* @__PURE__ */ __name1(function PopperContent2(props, forwardedRef) { 230 var _ref, _ref1; 231 var _middlewareData_arrow, _middlewareData_arrow1, _middlewareData_arrow2, _middlewareData_transformOrigin, _middlewareData_transformOrigin1, _middlewareData_hide, _contentProps_style; 232 const { __scopePopper, side = "bottom", sideOffset = 0, align = "center", alignOffset = 0, arrowPadding = 0, avoidCollisions = true, collisionBoundary = [], collisionPadding: collisionPaddingProp = 0, sticky = "partial", hideWhenDetached = false, updatePositionStrategy = "optimized", onPlaced, ...contentProps } = props; 233 const context = usePopperContext(CONTENT_NAME, __scopePopper); 234 const [content, setContent] = __TURBOPACK__imported__module__271645__["useState"](null); 235 const composedRefs = (0, __TURBOPACK__imported__module__820783__["useComposedRefs"])(forwardedRef, setContent); 236 const [arrow, setArrow] = __TURBOPACK__imported__module__271645__["useState"](null); 237 const arrowSize = (0, __TURBOPACK__imported__module__635804__["useSize"])(arrow); 238 const arrowWidth = (_ref = arrowSize === null || arrowSize === void 0 ? void 0 : arrowSize.width) !== null && _ref !== void 0 ? _ref : 0; 239 const arrowHeight = (_ref1 = arrowSize === null || arrowSize === void 0 ? void 0 : arrowSize.height) !== null && _ref1 !== void 0 ? _ref1 : 0; 240 const desiredPlacement = side + (align !== "center" ? "-" + align : ""); 241 const collisionPadding = typeof collisionPaddingProp === "number" ? collisionPaddingProp : { 242 top: 0, 243 right: 0, 244 bottom: 0, 245 left: 0, 246 ...collisionPaddingProp 247 }; 248 const boundary = Array.isArray(collisionBoundary) ? collisionBoundary : [ 249 collisionBoundary 250 ]; 251 const hasExplicitBoundaries = boundary.length > 0; 252 const detectOverflowOptions = { 253 padding: collisionPadding, 254 boundary: boundary.filter(isNotNull), 255 // with `strategy: 'fixed'`, this is the only way to get it to respect boundaries 256 altBoundary: hasExplicitBoundaries 257 }; 258 const { refs, floatingStyles, placement, isPositioned, middlewareData } = (0, __TURBOPACK__imported__module__258950__["useFloating"])({ 259 // default to `fixed` strategy so users don't have to pick and we also avoid focus scroll issues 260 strategy: "fixed", 261 placement: desiredPlacement, 262 whileElementsMounted: /* @__PURE__ */ __name1(function() { 263 for(var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++){ 264 args[_key] = arguments[_key]; 265 } 266 const cleanup = (0, __TURBOPACK__imported__module__953760__["autoUpdate"])(...args, { 267 animationFrame: updatePositionStrategy === "always" 268 }); 269 return cleanup; 270 }, "whileElementsMounted"), 271 elements: { 272 reference: context.anchor 273 }, 274 middleware: [ 275 (0, __TURBOPACK__imported__module__258950__["offset"])({ 276 mainAxis: sideOffset + arrowHeight, 277 alignmentAxis: alignOffset 278 }), 279 avoidCollisions && (0, __TURBOPACK__imported__module__258950__["shift"])({ 280 mainAxis: true,
281 crossAxis: false, 282 limiter: sticky === "partial" ? (0, __TURBOPACK__imported__module__258950__["limitShift"])() : void 0, 283 ...detectOverflowOptions 284 }), 285 avoidCollisions && (0, __TURBOPACK__imported__module__258950__["flip"])({ 286 ...detectOverflowOptions 287 }), 288 (0, __TURBOPACK__imported__module__258950__["size"])({ 289 ...detectOverflowOptions, 290 apply: /* @__PURE__ */ __name1((param)=>{ 291 let { elements, rects, availableWidth, availableHeight } = param; 292 const { width: anchorWidth, height: anchorHeight } = rects.reference; 293 const contentStyle = elements.floating.style; 294 contentStyle.setProperty("--radix-popper-available-width", "".concat(availableWidth, "px")); 295 contentStyle.setProperty("--radix-popper-available-height", "".concat(availableHeight, "px")); 296 contentStyle.setProperty("--radix-popper-anchor-width", "".concat(anchorWidth, "px")); 297 contentStyle.setProperty("--radix-popper-anchor-height", "".concat(anchorHeight, "px")); 298 }, "apply") 299 }), 300 arrow && (0, __TURBOPACK__imported__module__258950__["arrow"])({ 301 element: arrow, 302 padding: arrowPadding 303 }), 304 transformOrigin({ 305 arrowWidth, 306 arrowHeight 307 }), 308 hideWhenDetached && (0, __TURBOPACK__imported__module__258950__["hide"])({ 309 strategy: "referenceHidden", 310 ...detectOverflowOptions, 311 // `hide` detects whether the anchor (reference) is clipped, so when 312 // no explicit `collisionBoundary` is set we fall back to Floating 313 // UI's default clipping ancestors (e.g. a scrollable menu). This 314 // lets an occluded submenu hide once its anchor scrolls out of view 315 // (#3237). The collision/size middlewares deliberately keep the 316 // viewport-based default to avoid clamping content rendered inside 317 // transformed or overflow-clipping portal containers. 318 boundary: hasExplicitBoundaries ? detectOverflowOptions.boundary : void 0 319 }) 320 ] 321 }); 322 const setPlacementState = context.setPlacementState; 323 (0, __TURBOPACK__imported__module__934620__["useLayoutEffect"])(()=>{ 324 setPlacementState(placement); 325 return ()=>{ 326 setPlacementState(void 0); 327 }; 328 }, [ 329 placement, 330 setPlacementState 331 ]); 332 const [placedSide, placedAlign] = getSideAndAlignFromPlacement(placement); 333 const handlePlaced = (0, __TURBOPACK__imported__module__30207__["useCallbackRef"])(onPlaced); 334 (0, __TURBOPACK__imported__module__934620__["useLayoutEffect"])(()=>{ 335 if (isPositioned) { 336 handlePlaced === null || handlePlaced === void 0 ? void 0 : handlePlaced(); 337 } 338 }, [ 339 isPositioned, 340 handlePlaced 341 ]); 342 const arrowX = (_middlewareData_arrow = middlewareData.arrow) === null || _middlewareData_arrow === void 0 ? void 0 : _middlewareData_arrow.x; 343 const arrowY = (_middlewareData_arrow1 = middlewareData.arrow) === null || _middlewareData_arrow1 === void 0 ? void 0 : _middlewareData_arrow1.y; 344 const cannotCenterArrow = ((_middlewareData_arrow2 = middlewareData.arrow) === null || _middlewareData_arrow2 === void 0 ? void 0 : _middlewareData_arrow2.centerOffset) !== 0; 345 const [contentZIndex, setContentZIndex] = __TURBOPACK__imported__module__271645__["useState"](); 346 (0, __TURBOPACK__imported__module__934620__["useLayoutEffect"])(()=>{ 347 if (content) setContentZIndex(window.getComputedStyle(content).zIndex); 348 }, [ 349 content 350 ]); 351 return /* @__PURE__ */ (0, __TURBOPACK__imported__module__843476__1["jsx"])("div", { 352 ref: refs.setFloating, 353 "data-radix-popper-content-wrapper": "", 354 style: { 355 ...floatingStyles, 356 transform: isPositioned ? floatingStyles.transform : "translate(0, -200%)", 357 // keep off the page when measuring 358 minWidth: "max-content", 359 zIndex: contentZIndex, 360 "--radix-popper-transform-origin": [ 361 (_middlewareData_transformOrigin = middlewareData.transformOrigin) === null || _middlewareData_transformOrigin === void 0 ? void 0 : _middlewareData_transformOrigin.x, 362 (_middlewareData_transformOrigin1 = middlewareData.transformOrigin) === null || _middlewareData_transformOrigin1 === void 0 ? void 0 : _middlewareData_transformOrigin1.y 363 ].join(" "), 364 // hide the content if using the hide middleware and should be hidden 365 // set visibility to hidden and disable pointer events so the UI behaves 366 // as if the PopperContent isn't there at all 367 ...((_middlewareData_hide = middlewareData.hide) === null || _middlewareData_hide === void 0 ? void 0 : _middlewareData_hide.referenceHidden) && { 368 visibility: "hidden", 369 pointerEvents: "none" 370 } 371 }, 372 dir: props.dir, 373 children: /* @__PURE__ */ (0, __TURBOPACK__imported__module__843476__1["jsx"])(PopperContentProvider, { 374 scope: __scopePopper, 375 placedSide, 376 placedAlign, 377 onArrowChange: setArrow, 378 arrowX, 379 arrowY, 380 shouldHideArrow: cannotCenterArrow, 381 children: /* @__PURE__ */ (0, __TURBOPACK__imported__module__843476__1["jsx"])(__TURBOPACK__imported__module__248425__1["Primitive"].div, { 382 "data-side": placedSide, 383 "data-align": placedAlign, 384 ...contentProps, 385 ref: composedRefs, 386 style: { 387 ...contentProps.style, 388 // if the PopperContent hasn't been placed yet (not all 389 // measurements done) we prevent animations so that users' 390 // animations don't kick in too early from the wrong sides. 391 animation: !isPositioned ? "none" : (_contentProps_style = contentProps.style) === null || _contentProps_style === void 0 ? void 0 : _contentProps_style.animation 392 } 393 }) 394 }) 395 }); 396}, "PopperContent")); 397var ARROW_NAME = "PopperArrow"; 398var OPPOSITE_SIDE = { 399 top: "bottom", 400 right: "left", 401 bottom: "top", 402 left: "right" 403}; 404var PopperArrow = /* @__PURE__ */ __TURBOPACK__imported__module__271645__["forwardRef"](/* @__PURE__ */ __name1(function PopperArrow2(props, forwardedRef) { 405 const { __scopePopper, ...arrowProps } = props; 406 const contentContext = useContentContext(ARROW_NAME, __scopePopper); 407 const baseSide = OPPOSITE_SIDE[contentContext.placedSide]; 408 return(// we have to use an extra wrapper because `ResizeObserver` (used by `useSize`) 409 // doesn't report size as we'd expect on SVG elements. 410 // it reports their bounding box which is effectively the largest path inside the SVG.
411 /* @__PURE__ */ (0, __TURBOPACK__imported__module__843476__1["jsx"])("span", { 412 ref: contentContext.onArrowChange, 413 style: { 414 position: "absolute", 415 left: contentContext.arrowX, 416 top: contentContext.arrowY, 417 [baseSide]: 0, 418 transformOrigin: { 419 top: "", 420 right: "0 0", 421 bottom: "center 0", 422 left: "100% 0" 423 }[contentContext.placedSide], 424 transform: { 425 top: "translateY(100%)", 426 right: "translateY(50%) rotate(90deg) translateX(-50%)", 427 bottom: "rotate(180deg)", 428 left: "translateY(50%) rotate(-90deg) translateX(50%)" 429 }[contentContext.placedSide], 430 visibility: contentContext.shouldHideArrow ? "hidden" : void 0 431 }, 432 children: /* @__PURE__ */ (0, __TURBOPACK__imported__module__843476__1["jsx"])(Root, { 433 ...arrowProps, 434 ref: forwardedRef, 435 style: { 436 ...arrowProps.style, 437 // ensures the element can be measured correctly (mostly for if SVG) 438 display: "block" 439 } 440 }) 441 })); 442}, "PopperArrow")); 443function isNotNull(value) { 444 return value !== null; 445} 446__name1(isNotNull, "isNotNull"); 447var transformOrigin = /* @__PURE__ */ __name1((options)=>({ 448 name: "transformOrigin", 449 options, 450 fn (data) { 451 var _ref, _ref1; 452 var _middlewareData_arrow, _middlewareData_arrow1, _middlewareData_arrow2; 453 const { placement, rects, middlewareData } = data; 454 const cannotCenterArrow = ((_middlewareData_arrow = middlewareData.arrow) === null || _middlewareData_arrow === void 0 ? void 0 : _middlewareData_arrow.centerOffset) !== 0; 455 const isArrowHidden = cannotCenterArrow; 456 const arrowWidth = isArrowHidden ? 0 : options.arrowWidth; 457 const arrowHeight = isArrowHidden ? 0 : options.arrowHeight; 458 const [placedSide, placedAlign] = getSideAndAlignFromPlacement(placement); 459 const noArrowAlign = { 460 start: "0%", 461 center: "50%", 462 end: "100%" 463 }[placedAlign]; 464 const arrowXCenter = ((_ref = (_middlewareData_arrow1 = middlewareData.arrow) === null || _middlewareData_arrow1 === void 0 ? void 0 : _middlewareData_arrow1.x) !== null && _ref !== void 0 ? _ref : 0) + arrowWidth / 2; 465 const arrowYCenter = ((_ref1 = (_middlewareData_arrow2 = middlewareData.arrow) === null || _middlewareData_arrow2 === void 0 ? void 0 : _middlewareData_arrow2.y) !== null && _ref1 !== void 0 ? _ref1 : 0) + arrowHeight / 2; 466 let x = ""; 467 let y = ""; 468 if (placedSide === "bottom") { 469 x = isArrowHidden ? noArrowAlign : "".concat(arrowXCenter, "px"); 470 y = "".concat(-arrowHeight, "px"); 471 } else if (placedSide === "top") { 472 x = isArrowHidden ? noArrowAlign : "".concat(arrowXCenter, "px"); 473 y = "".concat(rects.floating.height + arrowHeight, "px"); 474 } else if (placedSide === "right") { 475 x = "".concat(-arrowHeight, "px"); 476 y = isArrowHidden ? noArrowAlign : "".concat(arrowYCenter, "px"); 477 } else if (placedSide === "left") { 478 x = "".concat(rects.floating.width + arrowHeight, "px"); 479 y = isArrowHidden ? noArrowAlign : "".concat(arrowYCenter, "px"); 480 } 481 return { 482 data: { 483 x, 484 y 485 } 486 }; 487 } 488 }), "transformOrigin"); 489function getSideAndAlignFromPlacement(placement) { 490 const [side, align = "center"] = placement.split("-"); 491 return [ 492 side, 493 align 494 ]; 495} 496__name1(getSideAndAlignFromPlacement, "getSideAndAlignFromPlacement"); 497var Root2 = Popper; 498var Anchor = PopperAnchor; 499var Content = PopperContent; 500var Arrow1 = PopperArrow; 501; 502__turbopack_context__.s([ 503 "Anchor", 504 0, 505 Anchor, 506 "Arrow", 507 0, 508 Arrow1, 509 "Content", 510 0, 511 Content, 512 "Root", 513 0, 514 Root2, 515 "createPopperScope", 516 0, 517 createPopperScope 518], 853660); 519}), 520959411, ((__turbopack_context__) => { 521"use strict"; 522
523// src/visually-hidden.tsx 524var __TURBOPACK__imported__module__271645__ = __turbopack_context__.i(271645); 525var __TURBOPACK__imported__module__248425__ = __turbopack_context__.i(248425); 526var __TURBOPACK__imported__module__843476__ = __turbopack_context__.i(843476); 527var __defProp = Object.defineProperty; 528var __name = (target, value)=>__defProp(target, "name", { 529 value, 530 configurable: true 531 }); 532; 533; 534; 535var VISUALLY_HIDDEN_STYLES = Object.freeze({ 536 // See: https://github.com/twbs/bootstrap/blob/main/scss/mixins/_visually-hidden.scss 537 position: "absolute", 538 border: 0, 539 width: 1, 540 height: 1, 541 padding: 0, 542 margin: -1, 543 overflow: "hidden", 544 clip: "rect(0, 0, 0, 0)", 545 whiteSpace: "nowrap", 546 wordWrap: "normal" 547}); 548var VisuallyHidden = /* @__PURE__ */ __TURBOPACK__imported__module__271645__["forwardRef"](/* @__PURE__ */ __name(function VisuallyHidden2(props, forwardedRef) { 549 return /* @__PURE__ */ (0, __TURBOPACK__imported__module__843476__["jsx"])(__TURBOPACK__imported__module__248425__["Primitive"].span, { 550 ...props, 551 ref: forwardedRef, 552 style: { 553 ...VISUALLY_HIDDEN_STYLES, 554 ...props.style 555 } 556 }); 557}, "VisuallyHidden")); 558var Root = VisuallyHidden; 559; 560__turbopack_context__.s([ 561 "Root", 562 0, 563 Root, 564 "VISUALLY_HIDDEN_STYLES", 565 0, 566 VISUALLY_HIDDEN_STYLES 567]); 568}), 569186336, ((__turbopack_context__) => { 570"use strict"; 571
572// src/tooltip.tsx 573var __TURBOPACK__imported__module__271645__ = __turbopack_context__.i(271645); 574var __TURBOPACK__imported__module__981140__ = __turbopack_context__.i(981140); 575var __TURBOPACK__imported__module__820783__ = __turbopack_context__.i(820783); 576var __TURBOPACK__imported__module__30030__ = __turbopack_context__.i(30030); 577var __TURBOPACK__imported__module__726330__ = __turbopack_context__.i(726330); 578var __TURBOPACK__imported__module__610772__ = __turbopack_context__.i(610772); 579var __TURBOPACK__imported__module__853660__ = __turbopack_context__.i(853660); 580var __TURBOPACK__imported__module__774606__ = __turbopack_context__.i(774606); 581var __TURBOPACK__imported__module__296626__ = __turbopack_context__.i(296626); 582var __TURBOPACK__imported__module__248425__ = __turbopack_context__.i(248425); 583var __TURBOPACK__imported__module__991918__ = __turbopack_context__.i(991918); 584var __TURBOPACK__imported__module__369340__ = __turbopack_context__.i(369340); 585var __TURBOPACK__imported__module__934620__ = __turbopack_context__.i(934620); 586var __TURBOPACK__imported__module__959411__ = __turbopack_context__.i(959411); 587var __TURBOPACK__imported__module__843476__ = __turbopack_context__.i(843476); 588"use client"; 589var __defProp = Object.defineProperty; 590var __name = (target, value)=>__defProp(target, "name", { 591 value, 592 configurable: true 593 }); 594; 595; 596; 597; 598; 599; 600; 601; 602; 603; 604; 605; 606; 607; 608; 609; 610var [createTooltipContext, createTooltipScope] = (0, __TURBOPACK__imported__module__30030__["createContextScope"])("Tooltip", [ 611 __TURBOPACK__imported__module__853660__["createPopperScope"] 612]); 613var usePopperScope = (0, __TURBOPACK__imported__module__853660__["createPopperScope"])(); 614var PROVIDER_NAME = "TooltipProvider"; 615var DEFAULT_DELAY_DURATION = 700; 616var TOOLTIP_OPEN = "tooltip.open"; 617var [TooltipProviderContextProvider, useTooltipProviderContext] = createTooltipContext(PROVIDER_NAME); 618var TooltipProvider = /* @__PURE__ */ __name((props)=>{ 619 const { __scopeTooltip, delayDuration = DEFAULT_DELAY_DURATION, skipDelayDuration = 300, disableHoverableContent = false, children } = props; 620 const isOpenDelayedRef = __TURBOPACK__imported__module__271645__["useRef"](true); 621 const isPointerInTransitRef = __TURBOPACK__imported__module__271645__["useRef"](false); 622 const skipDelayTimerRef = __TURBOPACK__imported__module__271645__["useRef"](0); 623 __TURBOPACK__imported__module__271645__["useEffect"](()=>{ 624 const skipDelayTimer = skipDelayTimerRef.current; 625 return ()=>window.clearTimeout(skipDelayTimer); 626 }, []); 627 return /* @__PURE__ */ (0, __TURBOPACK__imported__module__843476__["jsx"])(TooltipProviderContextProvider, { 628 scope: __scopeTooltip, 629 isOpenDelayedRef, 630 delayDuration, 631 onOpen: __TURBOPACK__imported__module__271645__["useCallback"](()=>{ 632 if (skipDelayDuration <= 0) return; 633 window.clearTimeout(skipDelayTimerRef.current); 634 isOpenDelayedRef.current = false; 635 }, [ 636 skipDelayDuration 637 ]), 638 onClose: __TURBOPACK__imported__module__271645__["useCallback"](()=>{ 639 if (skipDelayDuration <= 0) return; 640 window.clearTimeout(skipDelayTimerRef.current); 641 skipDelayTimerRef.current = window.setTimeout(()=>isOpenDelayedRef.current = true, skipDelayDuration); 642 }, [ 643 skipDelayDuration 644 ]), 645 isPointerInTransitRef, 646 onPointerInTransitChange: __TURBOPACK__imported__module__271645__["useCallback"]((inTransit)=>{ 647 isPointerInTransitRef.current = inTransit; 648 }, []), 649 disableHoverableContent, 650 children 651 }); 652}, "TooltipProvider"); 653var TOOLTIP_NAME = "Tooltip"; 654var [TooltipContextProvider, useTooltipContext] = createTooltipContext(TOOLTIP_NAME); 655var Tooltip = /* @__PURE__ */ __name((props)=>{ 656 const { __scopeTooltip, children, open: openProp, defaultOpen, onOpenChange, disableHoverableContent: disableHoverableContentProp, delayDuration: delayDurationProp } = props; 657 const providerContext = useTooltipProviderContext(TOOLTIP_NAME, props.__scopeTooltip); 658 const popperScope = usePopperScope(__scopeTooltip); 659 const [trigger, setTrigger] = __TURBOPACK__imported__module__271645__["useState"](null); 660 const [contentIdState, setContentId] = __TURBOPACK__imported__module__271645__["useState"](void 0); 661 const generatedContentId = (0, __TURBOPACK__imported__module__610772__["useId"])(); 662 const openTimerRef = __TURBOPACK__imported__module__271645__["useRef"](0); 663 const disableHoverableContent = disableHoverableContentProp !== null && disableHoverableContentProp !== void 0 ? disableHoverableContentProp : providerContext.disableHoverableContent; 664 const delayDuration = delayDurationProp !== null && delayDurationProp !== void 0 ? delayDurationProp : providerContext.delayDuration; 665 const wasOpenDelayedRef = __TURBOPACK__imported__module__271645__["useRef"](false); 666 const [open, setOpen] = (0, __TURBOPACK__imported__module__369340__["useControllableState"])({ 667 prop: openProp, 668 defaultProp: defaultOpen !== null && defaultOpen !== void 0 ? defaultOpen : false, 669 onChange: /* @__PURE__ */ __name((open2)=>{ 670 if (open2) { 671 providerContext.onOpen(); 672 document.dispatchEvent(new CustomEvent(TOOLTIP_OPEN)); 673 } else { 674 providerContext.onClose(); 675 } 676 onOpenChange === null || onOpenChange === void 0 ? void 0 : onOpenChange(open2); 677 }
677, "onChange"), 678 caller: TOOLTIP_NAME 679 }); 680 const stateAttribute = __TURBOPACK__imported__module__271645__["useMemo"](()=>{ 681 return open ? wasOpenDelayedRef.current ? "delayed-open" : "instant-open" : "closed"; 682 }, [ 683 open 684 ]); 685 const handleOpen = __TURBOPACK__imported__module__271645__["useCallback"](()=>{ 686 window.clearTimeout(openTimerRef.current); 687 openTimerRef.current = 0; 688 wasOpenDelayedRef.current = false; 689 setOpen(true); 690 }, [ 691 setOpen 692 ]); 693 const handleClose = __TURBOPACK__imported__module__271645__["useCallback"](()=>{ 694 window.clearTimeout(openTimerRef.current); 695 openTimerRef.current = 0; 696 setOpen(false); 697 }, [ 698 setOpen 699 ]); 700 const handleDelayedOpen = __TURBOPACK__imported__module__271645__["useCallback"](()=>{ 701 window.clearTimeout(openTimerRef.current); 702 openTimerRef.current = window.setTimeout(()=>{ 703 wasOpenDelayedRef.current = true; 704 setOpen(true); 705 openTimerRef.current = 0; 706 }, delayDuration); 707 }, [ 708 delayDuration, 709 setOpen 710 ]); 711 __TURBOPACK__imported__module__271645__["useEffect"](()=>{ 712 return ()=>{ 713 if (openTimerRef.current) { 714 window.clearTimeout(openTimerRef.current); 715 openTimerRef.current = 0; 716 } 717 }; 718 }, []); 719 const contentId = contentIdState !== null && contentIdState !== void 0 ? contentIdState : generatedContentId; 720 return /* @__PURE__ */ (0, __TURBOPACK__imported__module__843476__["jsx"])(__TURBOPACK__imported__module__853660__["Root"], { 721 ...popperScope, 722 children: /* @__PURE__ */ (0, __TURBOPACK__imported__module__843476__["jsx"])(TooltipContextProvider, { 723 scope: __scopeTooltip, 724 contentId, 725 setContentId, 726 open, 727 stateAttribute, 728 trigger, 729 onTriggerChange: setTrigger, 730 onTriggerEnter: __TURBOPACK__imported__module__271645__["useCallback"](()=>{ 731 if (providerContext.isOpenDelayedRef.current) handleDelayedOpen(); 732 else handleOpen(); 733 }, [ 734 providerContext.isOpenDelayedRef, 735 handleDelayedOpen, 736 handleOpen 737 ]), 738 onTriggerLeave: __TURBOPACK__imported__module__271645__["useCallback"](()=>{ 739 if (disableHoverableContent) { 740 handleClose(); 741 } else { 742 window.clearTimeout(openTimerRef.current); 743 openTimerRef.current = 0; 744 } 745 }, [ 746 handleClose, 747 disableHoverableContent 748 ]), 749 onOpen: handleOpen, 750 onClose: handleClose, 751 disableHoverableContent, 752 children 753 }) 754 }); 755}, "Tooltip"); 756var TRIGGER_NAME = "TooltipTrigger"; 757var TooltipTrigger = /* @__PURE__ */ __TURBOPACK__imported__module__271645__["forwardRef"](/* @__PURE__ */ __name(function TooltipTrigger2(props, forwardedRef) { 758 const { __scopeTooltip, ...triggerProps } = props; 759 const context = useTooltipContext(TRIGGER_NAME, __scopeTooltip); 760 const providerContext = useTooltipProviderContext(TRIGGER_NAME, __scopeTooltip); 761 const popperScope = usePopperScope(__scopeTooltip); 762 const ref = __TURBOPACK__imported__module__271645__["useRef"](null); 763 const composedRefs = (0, __TURBOPACK__imported__module__820783__["useComposedRefs"])(forwardedRef, ref, context.onTriggerChange); 764 const isPointerDownRef = __TURBOPACK__imported__module__271645__["useRef"](false); 765 const hasPointerMoveOpenedRef = __TURBOPACK__imported__module__271645__["useRef"](false); 766 const handlePointerUp = __TURBOPACK__imported__module__271645__["useCallback"](()=>isPointerDownRef.current = false, []); 767 __TURBOPACK__imported__module__271645__["useEffect"](()=>{ 768 return ()=>document.removeEventListener("pointerup", handlePointerUp); 769 }, [ 770 handlePointerUp 771 ]); 772 return /* @__PURE__ */ (0, __TURBOPACK__imported__module__843476__["jsx"])(__TURBOPACK__imported__module__853660__["Anchor"], { 773 asChild: true, 774 ...popperScope, 775 children: /* @__PURE__ */ (0, __TURBOPACK__imported__module__843476__["jsx"])(__TURBOPACK__imported__module__248425__["Primitive"].button, { 776 "aria-describedby": context.open ? context.contentId : void 0, 777 "data-state": context.stateAttribute, 778 ...triggerProps, 779 ref: composedRefs, 780 onPointerMove: (0, __TURBOPACK__imported__module__981140__["composeEventHandlers"])(props.onPointerMove, (event)=>{ 781 if (event.pointerType === "touch") return; 782 if (!hasPointerMoveOpenedRef.current && !providerContext.
782isPointerInTransitRef.current) { 783 context.onTriggerEnter(); 784 hasPointerMoveOpenedRef.current = true; 785 } 786 }), 787 onPointerLeave: (0, __TURBOPACK__imported__module__981140__["composeEventHandlers"])(props.onPointerLeave, ()=>{ 788 context.onTriggerLeave(); 789 hasPointerMoveOpenedRef.current = false; 790 }), 791 onPointerDown: (0, __TURBOPACK__imported__module__981140__["composeEventHandlers"])(props.onPointerDown, ()=>{ 792 if (context.open) { 793 context.onClose(); 794 } 795 isPointerDownRef.current = true; 796 document.addEventListener("pointerup", handlePointerUp, { 797 once: true 798 }); 799 }), 800 onFocus: (0, __TURBOPACK__imported__module__981140__["composeEventHandlers"])(props.onFocus, ()=>{ 801 if (!isPointerDownRef.current) context.onOpen(); 802 }), 803 onBlur: (0, __TURBOPACK__imported__module__981140__["composeEventHandlers"])(props.onBlur, context.onClose), 804 onClick: (0, __TURBOPACK__imported__module__981140__["composeEventHandlers"])(props.onClick, context.onClose) 805 }) 806 }); 807}, "TooltipTrigger")); 808var PORTAL_NAME = "TooltipPortal"; 809var [PortalProvider, usePortalContext] = createTooltipContext(PORTAL_NAME, { 810 forceMount: void 0 811}); 812var TooltipPortal = /* @__PURE__ */ __name((props)=>{ 813 const { __scopeTooltip, forceMount, children, container } = props; 814 const context = useTooltipContext(PORTAL_NAME, __scopeTooltip); 815 return /* @__PURE__ */ (0, __TURBOPACK__imported__module__843476__["jsx"])(PortalProvider, { 816 scope: __scopeTooltip, 817 forceMount, 818 children: /* @__PURE__ */ (0, __TURBOPACK__imported__module__843476__["jsx"])(__TURBOPACK__imported__module__296626__["Presence"], { 819 present: forceMount || context.open, 820 children: /* @__PURE__ */ (0, __TURBOPACK__imported__module__843476__["jsx"])(__TURBOPACK__imported__module__774606__["Portal"], { 821 asChild: true, 822 container, 823 children 824 }) 825 }) 826 }); 827}, "TooltipPortal"); 828var CONTENT_NAME = "TooltipContent"; 829var TooltipContent = /* @__PURE__ */ __TURBOPACK__imported__module__271645__["forwardRef"](/* @__PURE__ */ __name(function TooltipContent2(props, forwardedRef) { 830 const portalContext = usePortalContext(CONTENT_NAME, props.__scopeTooltip); 831 const { forceMount = portalContext.forceMount, side = "top", ...contentProps } = props; 832 const context = useTooltipContext(CONTENT_NAME, props.__scopeTooltip); 833 return /* @__PURE__ */ (0, __TURBOPACK__imported__module__843476__["jsx"])(__TURBOPACK__imported__module__296626__["Presence"], { 834 present: forceMount || context.open, 835 children: context.disableHoverableContent ? /* @__PURE__ */ (0, __TURBOPACK__imported__module__843476__["jsx"])(TooltipContentImpl, { 836 side, 837 ...contentProps, 838 ref: forwardedRef 839 }) : /* @__PURE__ */ (0, __TURBOPACK__imported__module__843476__["jsx"])(TooltipContentHoverable, { 840 side, 841 ...contentProps, 842 ref: forwardedRef 843 }) 844 }); 845}, "TooltipContent")); 846var TooltipContentHoverable = /* @__PURE__ */ __TURBOPACK__imported__module__271645__["forwardRef"](/* @__PURE__ */ __name(function TooltipContentHoverable2(props, forwardedRef) { 847 const context = useTooltipContext(CONTENT_NAME, props.__scopeTooltip); 848 const providerContext = useTooltipProviderContext(CONTENT_NAME, props.__scopeTooltip); 849 const ref = __TURBOPACK__imported__module__271645__["useRef"](null); 850 const composedRefs = (0, __TURBOPACK__imported__module__820783__["useComposedRefs"])(forwardedRef, ref); 851 const [pointerGraceArea, setPointerGraceArea] = __TURBOPACK__imported__module__271645__["useState"](null); 852 const { trigger, onClose } = context; 853 const content = ref.current; 854 const { onPointerInTransitChange } = providerContext; 855 const handleRemoveGraceArea = __TURBOPACK__imported__module__271645__["useCallback"](()=>{ 856 setPointerGraceArea(null); 857 onPointerInTransitChange(false); 858 }, [ 859 onPointerInTransitChange 860 ]); 861 const handleCreateGraceArea = __TURBOPACK__imported__module__271645__["useCallback"]((event, hoverTarget)=>{ 862 const currentTarget = event.currentTarget; 863 const exitPoint = { 864 x: event.clientX, 865 y: event.clientY 866 }; 867 const exitSide = getExitSideFromRect(exitPoint, currentTarget.getBoundingClientRect()); 868 const paddedExitPoints = getPaddedExitPoints(exitPoint, exitSide); 869 const hoverTargetPoints = getPointsFromRect(hoverTarget.getBoundingClientRect()); 870 const graceArea = getHull([ 871 ...paddedExitPoints, 872 ...hoverTargetPoints 873 ]); 874 setPointerGraceArea(graceArea); 875 onPointerInTransitChange(true); 876 }, [ 877 onPointerInTransitChange 878 ]); 879 __TURBOPACK__imported__module__271645__["useEffect"](()=>{ 880 return ()=>handleRemoveGraceArea(); 881 }, [ 882 handleRemoveGraceArea 883 ]); 884 __TURBOPACK__imported__module__271645__["useEffect"](()=>{ 885 if (trigger && content) { 886 const handleTriggerLeave = /* @__PURE__ */ __name((event)=>handleCreateGraceArea(event, content), "handleTriggerLeave"); 887 const handleContentLeave = /* @__PURE__ */ __name((event)=>handleCreateGraceArea(event, trigger), "handleContentLeave"); 888 trigger.addEventListener("pointerleave", handleTriggerLeave); 889 content.addEventListener("pointerleave", handleContentLeave); 890 return ()=>{ 891 trigger.removeEventListener("pointerleave", handleTriggerLeave); 892 content.removeEventListener("pointerleave", handleContentLeave); 893 }; 894 } 895 }, [ 896 trigger, 897 content, 898 handleCreateGraceArea, 899 handleRemoveGraceArea 900 ]); 901 __TURBOPACK__imported__module__271645__["useEffect"](()=>{ 902 if (pointerGraceArea) { 903 const handleTrackPointerGrace = /* @__PURE__ */ __name((event)=>{ 904 const target = event.target; 905 const pointerPosition = { 906 x: event.clientX, 907 y: event.clientY 908 }; 909 const hasEnteredTarget = (trigger === null || trigger === void 0 ? void 0 : trigger.contains(target)) || (content === null || content === void 0 ? void 0 : content.contains(target)); 910 const isPointerOutsideGraceArea = !isPointInPolygon(pointerPosition, pointerGraceArea); 911 if (hasEnteredTarget) { 912 handleRemoveGraceArea(); 913 } else if (isPointerOutsideGraceArea) { 914 handleRemoveGraceArea(); 915 onClose(); 916 } 917 }, "handleTrackPointerGrace"); 918 document.addEventListener("pointermove", handleTrackPointerGrace); 919 return ()=>document.removeEventListener("pointermove", handleTrackPointerGrace); 920 } 921 }, [ 922 trigger, 923 content, 924 pointerGraceArea, 925 onClose, 926 handleRemoveGraceArea 927 ]); 928 return /* @__PURE__ */ (0, __TURBOPACK__imported__module__843476__["jsx"])(TooltipContentImpl, { 929 ...props, 930 ref: composedRefs 931 }); 932}, "TooltipContentHoverable")); 933var Slottable = (0, __TURBOPACK__imported__module__991918__["createSlottable"])("TooltipContent"); 934var TooltipContentImpl = /* @__PURE__ */ __TURBOPACK__imported__module__271645__["forwardRef"](// blank line to reduce diff noise 935/* @__PURE__ */ __name(function TooltipContentImpl2(props, forwardedRef) { 936 const { __scopeTooltip, children, "aria-label": ariaLabel, id: idProp, onEscapeKeyDown, onPointerDownOutside, ...contentProps } = props; 937 const context = useTooltipContext(CONTENT_NAME, __scopeTooltip); 938 const popperScope = usePopperScope(__scopeTooltip); 939 const { onClose } = context; 940 __TURBOPACK__imported__module__271645__["useEffect"](()=>{ 941 document.addEventListener(TOOLTIP_OPEN, onClose); 942 return ()=>document.removeEventListener(TOOLTIP_OPEN, onClose); 943 }, [ 944 onClose 945 ]); 946 __TURBOPACK__imported__module__271645__["useEffect"](()=>{ 947 if (context.trigger) { 948 const handleScroll = /* @__PURE__ */ __name((event)=>{ 949 if (event.target instanceof Node && event.target.contains(context.trigger)) { 950 onClose(); 951 } 952 }, "handleScroll"); 953 window.addEventListener("scroll", handleScroll, { 954 capture: true 955 }); 956 return ()=>window.removeEventListener("scroll", handleScroll, { 957 capture: true 958 }); 959 } 960 }, [ 961 context.trigger, 962 onClose 963 ]); 964 const { setContentId } = context; 965 (0, __TURBOPACK__imported__module__934620__["useLayoutEffect"])(()=>{ 966 setContentId(idProp); 967 return ()=>{ 968 setContentId(void 0); 969 }; 970 }, [ 971 idProp, 972 setContentId 973 ]); 974 return /* @__PURE__ */ (0, __TURBOPACK__imported__module__843476__["jsx"])(__TURBOPACK__imported__module__726330__["DismissableLayer"], { 975 asChild: true, 976 disableOutsidePointerEvents: false, 977 onEscapeKeyDown, 978 onPointerDownOutside, 979 onFocusOutside: (event)=>event.preventDefault(), 980 onDismiss: onClose, 981 children: /* @__PURE__ */ (0, __TURBOPACK__imported__module__843476__["jsxs"])(__TURBOPACK__imported__module__853660__["Content"], { 982 "data-state": context.stateAttribute, 983 role: ariaLabel ? void 0 : "tooltip", 984 id: ariaLabel ? void 0 : context.contentId, 985 ...popperScope, 986 ...contentProps, 987 ref: forwardedRef, 988 style: { 989 ...contentProps.style, 990 // re-namespace exposed content custom properties 991 ...{ 992 "--radix-tooltip-content-transform-origin": "var(--radix-popper-transform-origin)", 993 "--radix-tooltip-content-available-width": "var(--radix-popper-available-width)", 994 "--radix-tooltip-content-available-height": "var(--radix-popper-available-height)", 995 "--radix-tooltip-trigger-width": "var(--radix-popper-anchor-width)", 996 "--radix-tooltip-trigger-height": "var(--radix-popper-anchor-height)" 997 } 998 }, 999 children: [
1000 /* @__PURE__ */ (0, __TURBOPACK__imported__module__843476__["jsx"])(Slottable, { 1001 children 1002 }), 1003 ariaLabel ? /* @__PURE__ */ (0, __TURBOPACK__imported__module__843476__["jsx"])(__TURBOPACK__imported__module__959411__["Root"], { 1004 id: context.contentId, 1005 role: "tooltip", 1006 children: ariaLabel 1007 }) : null 1008 ] 1009 }) 1010 }); 1011}, "TooltipContentImpl")); 1012var TooltipArrow = /* @__PURE__ */ __TURBOPACK__imported__module__271645__["forwardRef"](/* @__PURE__ */ __name(function TooltipArrow2(props, forwardedRef) { 1013 const { __scopeTooltip, ...arrowProps } = props; 1014 const popperScope = usePopperScope(__scopeTooltip); 1015 return /* @__PURE__ */ (0, __TURBOPACK__imported__module__843476__["jsx"])(__TURBOPACK__imported__module__853660__["Arrow"], { 1016 ...popperScope, 1017 ...arrowProps, 1018 ref: forwardedRef 1019 }); 1020}, "TooltipArrow")); 1021function getExitSideFromRect(point, rect) { 1022 const top = Math.abs(rect.top - point.y); 1023 const bottom = Math.abs(rect.bottom - point.y); 1024 const right = Math.abs(rect.right - point.x); 1025 const left = Math.abs(rect.left - point.x); 1026 switch(Math.min(top, bottom, right, left)){ 1027 case left: 1028 return "left"; 1029 case right: 1030 return "right"; 1031 case top: 1032 return "top"; 1033 case bottom: 1034 return "bottom"; 1035 default: 1036 throw new Error("unreachable"); 1037 } 1038} 1039__name(getExitSideFromRect, "getExitSideFromRect"); 1040function getPaddedExitPoints(exitPoint, exitSide) { 1041 let padding = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 5; 1042 const paddedExitPoints = []; 1043 switch(exitSide){ 1044 case "top": 1045 paddedExitPoints.push({ 1046 x: exitPoint.x - padding, 1047 y: exitPoint.y + padding 1048 }, { 1049 x: exitPoint.x + padding, 1050 y: exitPoint.y + padding 1051 }); 1052 break; 1053 case "bottom": 1054 paddedExitPoints.push({ 1055 x: exitPoint.x - padding, 1056 y: exitPoint.y - padding 1057 }, { 1058 x: exitPoint.x + padding, 1059 y: exitPoint.y - padding 1060 }); 1061 break; 1062 case "left": 1063 paddedExitPoints.push({ 1064 x: exitPoint.x + padding, 1065 y: exitPoint.y - padding 1066 }, { 1067 x: exitPoint.x + padding, 1068 y: exitPoint.y + padding 1069 }); 1070 break; 1071 case "right": 1072 paddedExitPoints.push({ 1073 x: exitPoint.x - padding, 1074 y: exitPoint.y - padding 1075 }, { 1076 x: exitPoint.x - padding, 1077 y: exitPoint.y + padding 1078 }); 1079 break; 1080 } 1081 return paddedExitPoints; 1082} 1083__name(getPaddedExitPoints, "getPaddedExitPoints"); 1084function getPointsFromRect(rect) { 1085 const { top, right, bottom, left } = rect; 1086 return [ 1087 { 1088 x: left, 1089 y: top 1090 }, 1091 { 1092 x: right, 1093 y: top 1094 }, 1095 { 1096 x: right, 1097 y: bottom 1098 }, 1099 { 1100 x: left, 1101 y: bottom 1102 } 1103 ]; 1104} 1105__name(getPointsFromRect, "getPointsFromRect"); 1106function isPointInPolygon(point, polygon) { 1107 const { x, y } = point; 1108 let inside = false;
1109 for(let i = 0, j = polygon.length - 1; i < polygon.length; j = i++){ 1110 const ii = polygon[i]; 1111 const jj = polygon[j]; 1112 const xi = ii.x; 1113 const yi = ii.y; 1114 const xj = jj.x; 1115 const yj = jj.y; 1116 const intersect = yi > y !== yj > y && x < (xj - xi) * (y - yi) / (yj - yi) + xi; 1117 if (intersect) inside = !inside; 1118 } 1119 return inside; 1120} 1121__name(isPointInPolygon, "isPointInPolygon"); 1122function getHull(points) { 1123 const newPoints = points.slice(); 1124 newPoints.sort((a, b)=>{ 1125 if (a.x < b.x) return -1; 1126 else if (a.x > b.x) return 1; 1127 else if (a.y < b.y) return -1; 1128 else if (a.y > b.y) return 1; 1129 else return 0; 1130 }); 1131 return getHullPresorted(newPoints); 1132} 1133__name(getHull, "getHull"); 1134function getHullPresorted(points) { 1135 if (points.length <= 1) return points.slice(); 1136 const upperHull = []; 1137 for(let i = 0; i < points.length; i++){ 1138 const p = points[i]; 1139 while(upperHull.length >= 2){ 1140 const q = upperHull[upperHull.length - 1]; 1141 const r = upperHull[upperHull.length - 2]; 1142 if ((q.x - r.x) * (p.y - r.y) >= (q.y - r.y) * (p.x - r.x)) upperHull.pop(); 1143 else break; 1144 } 1145 upperHull.push(p); 1146 } 1147 upperHull.pop(); 1148 const lowerHull = []; 1149 for(let i = points.length - 1; i >= 0; i--){ 1150 const p = points[i]; 1151 while(lowerHull.length >= 2){ 1152 const q = lowerHull[lowerHull.length - 1]; 1153 const r = lowerHull[lowerHull.length - 2]; 1154 if ((q.x - r.x) * (p.y - r.y) >= (q.y - r.y) * (p.x - r.x)) lowerHull.pop(); 1155 else break; 1156 } 1157 lowerHull.push(p); 1158 } 1159 lowerHull.pop(); 1160 if (upperHull.length === 1 && lowerHull.length === 1 && upperHull[0].x === lowerHull[0].x && upperHull[0].y === lowerHull[0].y) { 1161 return upperHull; 1162 } else { 1163 return upperHull.concat(lowerHull); 1164 } 1165} 1166__name(getHullPresorted, "getHullPresorted"); 1167var Provider = TooltipProvider; 1168var Root3 = Tooltip; 1169var Trigger = TooltipTrigger; 1170var Portal = TooltipPortal; 1171var Content2 = TooltipContent; 1172var Arrow2 = TooltipArrow; 1173; 1174__turbopack_context__.s([ 1175 "Arrow", 1176 0, 1177 Arrow2, 1178 "Content", 1179 0, 1180 Content2, 1181 "Portal", 1182 0, 1183 Portal, 1184 "Provider", 1185 0, 1186 Provider, 1187 "Root", 1188 0, 1189 Root3, 1190 "Tooltip", 1191 0, 1192 Tooltip, 1193 "TooltipArrow", 1194 0, 1195 TooltipArrow, 1196 "TooltipContent", 1197 0, 1198 TooltipContent, 1199 "TooltipPortal", 1200 0, 1201 TooltipPortal, 1202 "TooltipProvider", 1203 0, 1204 TooltipProvider, 1205 "TooltipTrigger", 1206 0, 1207 TooltipTrigger, 1208 "Trigger", 1209 0, 1210 Trigger, 1211 "createTooltipScope", 1212 0, 1213 createTooltipScope 1214]); 1215}), 1216991844, ((__turbopack_context__) => { 1217"use strict"; 1218 1219var __TURBOPACK__imported__module__843476__ = __turbopack_context__.i(843476); 1220var __TURBOPACK__imported__module__271645__ = __turbopack_context__.i(271645); 1221var __TURBOPACK__imported__module__186336__ = __turbopack_context__.i(186336); 1222var __TURBOPACK__imported__module__945060__ = __turbopack_context__.i(945060); 1223"use client"; 1224; 1225; 1226; 1227; 1228const TooltipProvider = __TURBOPACK__imported__module__186336__["Provider"]; 1229const Tooltip = __TURBOPACK__imported__module__186336__["Root"]; 1230const TooltipTrigger = __TURBOPACK__imported__module__186336__["Trigger"]; 1231const TooltipContent = /*#__PURE__*/ __TURBOPACK__imported__module__271645__["forwardRef"]((param, ref)=>{ 1232 let { className, sideOffset = 4, ...props } = param; 1233 return /*#__PURE__*/ (0, __TURBOPACK__imported__module__843476__["jsx"])(__TURBOPACK__imported__module__186336__["Content"], { 1234 ref: ref, 1235 sideOffset: sideOffset, 1236 className: (0, __TURBOPACK__imported__module__945060__["cn"])("z-60 overflow-hidden rounded-md border border-brand-100 shadow-md bg-white px-2 py-1 text-sm text-dark-500", className), 1237 ...props 1238 }); 1239}); 1240TooltipContent.displayName = __TURBOPACK__imported__module__186336__["Content"].displayName; 1241; 1242__turbopack_context__.s([ 1243 "Tooltip", 1244 0, 1245 Tooltip, 1246 "TooltipContent", 1247 0, 1248 TooltipContent, 1249 "TooltipProvider", 1250 0, 1251 TooltipProvider, 1252 "TooltipTrigger", 1253 0, 1254 TooltipTrigger 1255]); 1256}), 1257372225, ((__turbopack_context__) => { 1258"use strict"; 1259 1260// MERGED MODULE: [project]/src/branding/Logo.tsx [app-client] (ecmascript) 1261; 1262var __TURBOPACK__imported__module__843476__ = __turbopack_context__.i(843476); 1263var __TURBOPACK__imported__module__271645__ = __turbopack_context__.i(271645);
1264var __TURBOPACK__imported__module__773447__ = __turbopack_context__.i(773447); 1265var __TURBOPACK__imported__module__948148__ = __turbopack_context__.i(948148); 1266// MERGED MODULE: [project]/src/icon/Logo.tsx [app-client] (ecmascript) 1267; 1268var __TURBOPACK__imported__module__843476__1 = __TURBOPACK__imported__module__843476__; 1269var __TURBOPACK__imported__module__271645__1 = __TURBOPACK__imported__module__271645__; 1270; 1271; 1272const SvgLogo = (props, ref)=>/*#__PURE__*/ (0, __TURBOPACK__imported__module__843476__1["jsxs"])("svg", { 1273 xmlns: "http://www.w3.org/2000/svg", 1274 width: 112, 1275 height: 64, 1276 fill: "none", 1277 viewBox: "0 0 112 64", 1278 ref: ref, 1279 ...props, 1280 children: [ 1281 /*#__PURE__*/ (0, __TURBOPACK__imported__module__843476__1["jsxs"])("g", { 1282 clipPath: "url(#a)", 1283 children: [ 1284 /*#__PURE__*/ (0, __TURBOPACK__imported__module__843476__1["jsx"])("path", { 1285 fill: "#050C43", 1286 d: "M112 0H0v64h112z" 1287 }), 1288 /*#__PURE__*/ (0, __TURBOPACK__imported__module__843476__1["jsx"])("path", { 1289 fill: "#F0C800", 1290 d: "M49.39 42.44h-5.493l2.22-20.88h5.493zM74.975 21.56H67.9l-8.051 8.576.903-8.577H55.26l-2.22 20.882h5.493l.903-8.577 6.246 8.577h7.073L65.192 32zM24.22 21.56h7.788c5.87 0 10.234 4.586 9.594 10.44-.64 5.892-5.982 10.44-11.814 10.44H22zm3.725 16.294h1.241c3.273 0 6.246-1.79 6.697-5.854.414-3.729-1.88-5.854-5.38-5.854h-1.28l-1.24 11.708zM88.218 26.929c-.903-.82-2.144-1.38-3.499-1.38s-2.408.597-2.52 1.753 1.316 1.678 2.22 1.976l1.354.41c2.86.858 4.966 2.312 4.59 5.705-.226 2.088-.94 4.214-2.784 5.63C85.773 42.404 83.515 43 81.37 43s-5.155-.895-7.149-2.386l2.822-4.363c1.242 1.193 2.747 2.163 4.628 2.163s2.709-.634 2.86-2.126c.15-1.529-1.92-2.05-3.086-2.386-3.349-.97-5.493-1.865-5.08-5.892.452-4.25 3.8-7.01 8.015-7.01 4.214 0 4.665.671 6.433 1.715l-2.633 4.214z" 1291 }) 1292 ] 1293 }), 1294 /*#__PURE__*/ (0, __TURBOPACK__imported__module__843476__1["jsx"])("defs", { 1295 children: /*#__PURE__*/ (0, __TURBOPACK__imported__module__843476__1["jsx"])("clipPath", { 1296 id: "a", 1297 children: /*#__PURE__*/ (0, __TURBOPACK__imported__module__843476__1["jsx"])("path", { 1298 fill: "#fff", 1299 d: "M0 0h112v64H0z" 1300 }) 1301 }) 1302 }) 1303 ] 1304 }); 1305const ForwardRef = /*#__PURE__*/ (0, __TURBOPACK__imported__module__271645__1["forwardRef"])(SvgLogo); 1306const Memo = /*#__PURE__*/ (0, __TURBOPACK__imported__module__271645__1["memo"])(ForwardRef); 1307const __TURBOPACK__default__export__ = Memo; 1308var __TURBOPACK__imported__module__945060__ = __turbopack_context__.i(945060); 1309"use client"; 1310; 1311; 1312; 1313; 1314; 1315const Logo = /*#__PURE__*/ __TURBOPACK__imported__module__271645__["default"].memo(function Logo(param) { 1316 let { className, alt } = param; 1317 const t = (0, __TURBOPACK__imported__module__948148__["useTranslations"])("common"); 1318 return /*#__PURE__*/ (0, __TURBOPACK__imported__module__843476__["jsx"])(__TURBOPACK__default__export__, { 1319 "aria-label": alt || t("appName"), 1320 className: (0, __TURBOPACK__imported__module__945060__["cn"])("aspect-80/40", className) 1321 }); 1322}); 1323const DiksLabel = /*#__PURE__*/ __TURBOPACK__imported__module__271645__["default"].memo(function DiksLabel(props) { 1324 var _props_arialabel; 1325 const t = (0, __TURBOPACK__imported__module__948148__["useTranslations"])("common"); 1326 return /*#__PURE__*/ (0, __TURBOPACK__imported__module__843476__["jsxs"])("svg", { 1327 "aria-label": (_props_arialabel = props["aria-label"]) !== null && _props_arialabel !== void 0 ? _props_arialabel : t("appName"),
1328 viewBox: "0 0 75 24", 1329 fill: "none", 1330 xmlns: "http://www.w3.org/2000/svg", 1331 ...props, 1332 children: [ 1333 /*#__PURE__*/ (0, __TURBOPACK__imported__module__843476__["jsx"])("path", { 1334 d: "M29.9022 23.3943H23.978L26.3722 0.605469H32.2964L29.9005 23.3943H29.9022Z", 1335 fill: "currentColor" 1336 }), 1337 /*#__PURE__*/ (0, __TURBOPACK__imported__module__843476__["jsx"])("path", { 1338 d: "M57.5549 0.605469H49.8937L41.1845 9.98252L42.1712 0.605469H36.247L33.8511 23.3943H39.7753L40.7603 14.0173L47.4995 23.3943H55.1606L46.9719 11.9999L57.5549 0.605469Z", 1339 fill: "currentColor" 1340 }), 1341 /*#__PURE__*/ (0, __TURBOPACK__imported__module__843476__["jsx"])("path", { 1342 d: "M2.67722 0.605469H11.0798C17.4264 0.605469 22.1324 5.59196 21.4576 11.9999C20.7846 18.4078 15.0006 23.3943 8.68379 23.3943H0.28125L2.67722 0.605469ZM6.73301 18.3781H8.06333C11.6003 18.3781 14.8253 16.443 15.2933 11.9999C15.7227 7.91957 13.2742 5.62175 9.46551 5.62175H8.0756L6.73477 18.3763L6.73301 18.3781Z", 1343 fill: "currentColor" 1344 }), 1345 /*#__PURE__*/ (0, __TURBOPACK__imported__module__843476__["jsx"])("path", { 1346 d: "M71.8797 6.46929C70.8877 5.56313 69.5609 4.95845 68.1096 4.95845C67.0212 4.95845 65.5033 5.59293 65.3701 6.8619C65.2299 8.19221 66.7776 8.70576 67.7714 9.03878L69.2349 9.49273C72.3091 10.4304 74.5894 12.0324 74.2021 15.7184C73.9637 17.9847 73.175 20.3123 71.1997 21.8547C69.2577 23.3655 66.8039 24 64.506 24C61.6351 24 58.9254 23.0325 56.7695 21.4007L59.8105 16.6246C61.1548 17.9251 62.7971 18.982 64.8215 18.982C66.2114 18.982 67.7661 18.2861 67.9344 16.6841C68.1096 15.0226 65.8416 14.4477 64.6112 14.0849C61.0041 13.0262 58.659 12.0605 59.1217 7.64712C59.6072 3.02344 63.2195 0 67.7836 0C70.0814 0 72.8157 0.725626 74.7191 1.87366L71.878 6.46754L71.8797 6.46929Z", 1347 fill: "currentColor" 1348 }) 1349 ] 1350 }); 1351}); 1352const __TURBOPACK__default__export__1 = Logo; 1353__turbopack_context__.s([ 1354 "DiksLabel", 1355 0, 1356 DiksLabel, 1357 "default", 1358 0, 1359 __TURBOPACK__default__export__1 1360], 372225); 1361}), 1362808341, ((__turbopack_context__, module, exports) => { 1363"use strict"; 1364 1365Object.defineProperty(exports, "__esModule", { 1366 value: true 1367}); 13680 && (module.exports = { 1369 cancelIdleCallback: null, 1370 requestIdleCallback: null 1371}); 1372function _export(target, all) { 1373 for(var name in all)Object.defineProperty(target, name, { 1374 enumerable: true, 1375 get: all[name] 1376 }); 1377} 1378_export(exports, { 1379 cancelIdleCallback: function() { 1380 return cancelIdleCallback; 1381 }, 1382 requestIdleCallback: function() { 1383 return requestIdleCallback; 1384 } 1385}); 1386const requestIdleCallback = typeof self !== 'undefined' && self.requestIdleCallback && self.requestIdleCallback.bind(window) || function(cb) { 1387 let start = Date.now(); 1388 return self.setTimeout(function() { 1389 cb({ 1390 didTimeout: false, 1391 timeRemaining: function() { 1392 return Math.max(0, 50 - (Date.now() - start)); 1393 } 1394 }); 1395 }, 1); 1396}; 1397const cancelIdleCallback = typeof self !== 'undefined' && self.cancelIdleCallback && self.cancelIdleCallback.bind(window) || function(id) { 1398 return clearTimeout(id); 1399}; 1400if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') { 1401 Object.defineProperty(exports.default, '__esModule', { 1402 value: true 1403 }); 1404 Object.assign(exports.default, exports); 1405 module.exports = exports.default; 1406} 1407}), 1408519083, ((__turbopack_context__, module, exports) => { 1409"use strict"; 1410 1411// This utility is based on https://github.com/zertosh/htmlescape 1412// License: https://github.com/zertosh/htmlescape/blob/0527ca7156a524d256101bb310a9f970f63078ad/LICENSE 1413Object.defineProperty(exports, "__esModule", { 1414 value: true 1415}); 14160 && (module.exports = { 1417 ESCAPE_REGEX: null, 1418 htmlEscapeAttributeString: null, 1419 htmlEscapeJsonString: null 1420}); 1421function _export(target, all) { 1422 for(var name in all)Object.defineProperty(target, name, { 1423 enumerable: true, 1424 get: all[name] 1425 }); 1426} 1427_export(exports, { 1428 ESCAPE_REGEX: function() { 1429 return ESCAPE_REGEX; 1430 }, 1431 htmlEscapeAttributeString: function() { 1432 return htmlEscapeAttributeString; 1433 }, 1434 htmlEscapeJsonString: function() { 1435 return htmlEscapeJsonString; 1436 } 1437}); 1438const ESCAPE_LOOKUP = { 1439 '&': '\\u0026', 1440 '>': '\\u003e', 1441 '<': '\\u003c', 1442 '\u2028': '\\u2028', 1443 '\u2029': '\\u2029' 1444}; 1445const ESCAPE_REGEX = /[&><\u2028\u2029]/g; 1446const ATTRIBUTE_ESCAPE_LOOKUP = { 1447 '&': '&', 1448 '"': '"', 1449 "'": ''', 1450 '<': '<', 1451 '>': '>' 1452}; 1453const ATTRIBUTE_ESCAPE_REGEX = /[&"'<>]/g; 1454function htmlEscapeJsonString(str) { 1455 return str.replace(ESCAPE_REGEX, (match)=>ESCAPE_LOOKUP[match]); 1456} 1457function htmlEscapeAttributeString(str) { 1458 return str.replace(ATTRIBUTE_ESCAPE_REGEX, (match)=>ATTRIBUTE_ESCAPE_LOOKUP[match]); 1459} 1460}),
1461479520, ((__turbopack_context__, module, exports) => { 1462"use strict"; 1463 1464Object.defineProperty(exports, "__esModule", { 1465 value: true 1466}); 14670 && (module.exports = { 1468 default: null, 1469 handleClientScriptLoad: null, 1470 initScriptLoader: null 1471}); 1472function _export(target, all) { 1473 for(var name in all)Object.defineProperty(target, name, { 1474 enumerable: true, 1475 get: all[name] 1476 }); 1477} 1478_export(exports, { 1479 default: function() { 1480 return _default; 1481 }, 1482 handleClientScriptLoad: function() { 1483 return handleClientScriptLoad; 1484 }, 1485 initScriptLoader: function() { 1486 return initScriptLoader; 1487 } 1488}); 1489const _interop_require_default = __turbopack_context__.r(563141); 1490const _interop_require_wildcard = __turbopack_context__.r(151836); 1491const _jsxruntime = __turbopack_context__.r(843476); 1492const _reactdom = /*#__PURE__*/ _interop_require_default._(__turbopack_context__.r(174080)); 1493const _react = /*#__PURE__*/ _interop_require_wildcard._(__turbopack_context__.r(271645)); 1494const _headmanagercontextsharedruntime = __turbopack_context__.r(742732); 1495const _setattributesfromprops = __turbopack_context__.r(922737); 1496const _requestidlecallback = __turbopack_context__.r(808341); 1497const _htmlescape = __turbopack_context__.r(519083); 1498const ScriptCache = new Map(); 1499const LoadCache = new Set(); 1500const insertStylesheets = (stylesheets)=>{ 1501 // Case 1: Styles for afterInteractive/lazyOnload with appDir injected via handleClientScriptLoad 1502 // 1503 // Using ReactDOM.preinit to feature detect appDir and inject styles 1504 // Stylesheets might have already been loaded if initialized with Script component 1505 // Re-inject styles here to handle scripts loaded via handleClientScriptLoad 1506 // ReactDOM.preinit handles dedup and ensures the styles are loaded only once 1507 if (_reactdom.default.preinit) { 1508 stylesheets.forEach((stylesheet)=>{ 1509 _reactdom.default.preinit(stylesheet, { 1510 as: 'style' 1511 }); 1512 }); 1513 return; 1514 } 1515 // Case 2: Styles for afterInteractive/lazyOnload with pages injected via handleClientScriptLoad 1516 // 1517 // We use this function to load styles when appdir is not detected 1518 // TODO: Use React float APIs to load styles once available for pages dir 1519 if (typeof window !== 'undefined') { 1520 let head = document.head; 1521 stylesheets.forEach((stylesheet)=>{ 1522 let link = document.createElement('link'); 1523 link.type = 'text/css'; 1524 link.rel = 'stylesheet'; 1525 link.href = stylesheet; 1526 head.appendChild(link); 1527 }); 1528 } 1529}; 1530const loadScript = (props)=>{ 1531 const { src, id, onLoad = ()=>{}, onReady = null, dangerouslySetInnerHTML, children = '', strategy = 'afterInteractive', onError, stylesheets } = props; 1532 const cacheKey = id || src; 1533 // Script has already loaded 1534 if (cacheKey && LoadCache.has(cacheKey)) { 1535 return; 1536 } 1537 // Contents of this script are already loading/loaded 1538 if (ScriptCache.has(src)) { 1539 LoadCache.add(cacheKey); 1540 // It is possible that multiple `next/script` components all have same "src", but has different "onLoad" 1541 // This is to make sure the same remote script will only load once, but "onLoad" are executed in order 1542 ScriptCache.get(src).then(onLoad, onError); 1543 return; 1544 } 1545 /** Execute after the script first loaded */ const afterLoad = ()=>{ 1546 // Run onReady for the first time after load event 1547 if (onReady) { 1548 onReady(); 1549 } 1550 // add cacheKey to LoadCache when load successfully 1551 LoadCache.add(cacheKey); 1552 }; 1553 const el = document.createElement('script'); 1554 const loadPromise = new Promise((resolve, reject)=>{ 1555 el.addEventListener('load', function(e) { 1556 resolve(); 1557 if (onLoad) { 1558 onLoad.call(this, e); 1559 } 1560 afterLoad(); 1561 }); 1562 el.addEventListener('error', function(e) { 1563 reject(e); 1564 }); 1565 }).catch(function(e) { 1566 if (onError) { 1567 onError(e); 1568 } 1569 }); 1570 if (dangerouslySetInnerHTML) { 1571 // Casting since lib.dom.d.ts doesn't have TrustedHTML yet. 1572 el.innerHTML = dangerouslySetInnerHTML.__html || ''; 1573 afterLoad(); 1574 } else if (children) { 1575 el.textContent = typeof children === 'string' ? children : Array.isArray(children) ? children.join('') : ''; 1576 afterLoad(); 1577 } else if (src) { 1578 el.src = src; 1579 // do not add cacheKey into LoadCache for remote script here 1580 // cacheKey will be added to LoadCache when it is actually loaded (see loadPromise above) 1581 ScriptCache.set(src, loadPromise); 1582 } 1583 (0, _setattributesfromprops.setAttributesFromProps)(el, props); 1584 if (strategy === 'worker') { 1585 el.setAttribute('type', 'text/partytown'); 1586 } 1587 el.setAttribute('data-nscript', strategy); 1588 // Load styles associated with this script 1589 if (stylesheets) { 1590 insertStylesheets(stylesheets); 1591 } 1592 document.body.appendChild(el); 1593}; 1594function handleClientScriptLoad(props) { 1595 const { strategy = 'afterInteractive' }
1595 = props; 1596 if (strategy === 'lazyOnload') { 1597 window.addEventListener('load', ()=>{ 1598 (0, _requestidlecallback.requestIdleCallback)(()=>loadScript(props)); 1599 }); 1600 } else { 1601 loadScript(props); 1602 } 1603} 1604function loadLazyScript(props) { 1605 if (document.readyState === 'complete') { 1606 (0, _requestidlecallback.requestIdleCallback)(()=>loadScript(props)); 1607 } else { 1608 window.addEventListener('load', ()=>{ 1609 (0, _requestidlecallback.requestIdleCallback)(()=>loadScript(props)); 1610 }); 1611 } 1612} 1613function addBeforeInteractiveToCache() { 1614 const scripts = [ 1615 ...document.querySelectorAll('[data-nscript="beforeInteractive"]'), 1616 ...document.querySelectorAll('[data-nscript="beforePageRender"]') 1617 ]; 1618 scripts.forEach((script)=>{ 1619 const cacheKey = script.id || script.getAttribute('src'); 1620 LoadCache.add(cacheKey); 1621 }); 1622} 1623function initScriptLoader(scriptLoaderItems) { 1624 scriptLoaderItems.forEach(handleClientScriptLoad); 1625 addBeforeInteractiveToCache(); 1626} 1627/** 1628 * Load a third-party scripts in an optimized way. 1629 * 1630 * Read more: [Next.js Docs: `next/script`](https://nextjs.org/docs/app/api-reference/components/script) 1631 */ function Script(props) { 1632 const { id, src = '', onLoad = ()=>{}, onReady = null, strategy = 'afterInteractive', onError, stylesheets, ...restProps } = props; 1633 // Context is available only during SSR 1634 let { updateScripts, scripts, getIsSsr, appDir, nonce } = (0, _react.useContext)(_headmanagercontextsharedruntime.HeadManagerContext); 1635 // if a nonce is explicitly passed to the script tag, favor that over the automatic handling 1636 nonce = restProps.nonce || nonce; 1637 /** 1638 * - First mount: 1639 * 1. The useEffect for onReady executes 1640 * 2. hasOnReadyEffectCalled.current is false, but the script hasn't loaded yet (not in LoadCache) 1641 * onReady is skipped, set hasOnReadyEffectCalled.current to true 1642 * 3. The useEffect for loadScript executes 1643 * 4. hasLoadScriptEffectCalled.current is false, loadScript executes 1644 * Once the script is loaded, the onLoad and onReady will be called by then 1645 * [If strict mode is enabled / is wrapped in <OffScreen /> component] 1646 * 5. The useEffect for onReady executes again 1647 * 6. hasOnReadyEffectCalled.current is true, so entire effect is skipped 1648 * 7. The useEffect for loadScript executes again 1649 * 8. hasLoadScriptEffectCalled.current is true, so entire effect is skipped 1650 * 1651 * - Second mount: 1652 * 1. The useEffect for onReady executes 1653 * 2. hasOnReadyEffectCalled.current is false, but the script has already loaded (found in LoadCache) 1654 * onReady is called, set hasOnReadyEffectCalled.current to true 1655 * 3. The useEffect for loadScript executes 1656 * 4. The script is already loaded, loadScript bails out 1657 * [If strict mode is enabled / is wrapped in <OffScreen /> component] 1658 * 5. The useEffect for onReady executes again 1659 * 6. hasOnReadyEffectCalled.current is true, so entire effect is skipped 1660 * 7. The useEffect for loadScript executes again 1661 * 8. hasLoadScriptEffectCalled.current is true, so entire effect is skipped 1662 */ const hasOnReadyEffectCalled = (0, _react.useRef)(false); 1663 (0, _react.useEffect)(()=>{ 1664 const cacheKey = id || src; 1665 if (!hasOnReadyEffectCalled.current) { 1666 // Run onReady if script has loaded before but component is re-mounted 1667 if (onReady && cacheKey && LoadCache.has(cacheKey)) { 1668 onReady(); 1669 } 1670 hasOnReadyEffectCalled.current = true; 1671 } 1672 }, [ 1673 onReady, 1674 id, 1675 src 1676 ]); 1677 const hasLoadScriptEffectCalled = (0, _react.useRef)(false); 1678 (0, _react.useEffect)(()=>{ 1679 if (!hasLoadScriptEffectCalled.current) { 1680 if (strategy === 'afterInteractive') { 1681 loadScript(props); 1682 } else if (strategy === 'lazyOnload') { 1683 loadLazyScript(props); 1684 } 1685 hasLoadScriptEffectCalled.current = true; 1686 } 1687 }, [ 1688 props, 1689 strategy 1690 ]); 1691 if (strategy === 'beforeInteractive' || strategy === 'worker') { 1692 if (updateScripts) { 1693 scripts[strategy] = (scripts[strategy] || []).concat([ 1694 { 1695 id, 1696 src, 1697 onLoad, 1698 onReady, 1699 onError, 1700 ...restProps, 1701 nonce 1702 } 1703 ]); 1704 updateScripts(scripts); 1705 } else if (getIsSsr && getIsSsr()) { 1706 // Script has already loaded during SSR 1707 LoadCache.add(id || src); 1708 } else if (getIsSsr && !getIsSsr()) { 1709 loadScript({ 1710 ...props, 1711 nonce 1712 }); 1713 } 1714 } 1715 // For the app directory, we need React Float to preload these scripts. 1716 if (appDir) { 1717 // Injecting stylesheets here handles beforeInteractive and worker scripts correctly 1718 // For other strategies injecting here ensures correct stylesheet order 1719 // ReactDOM.preinit handles loading the styles in the correct order, 1720 // also ensures the stylesheet is loaded only once and in a consistent manner 1721 // 1722 // Case 1: Styles for beforeInteractive/worker with appDir - handled here 1723 // Case 2: Styles for beforeInteractive/worker with pages dir - Not handled yet 1724 // Case 3: Styles for afterInteractive/lazyOnload with appDir - handled here 1725 // Case 4: Styles for afterInteractive/lazyOnload with pages dir - handled in insertStylesheets function 1726 if (stylesheets) {
1727 stylesheets.forEach((styleSrc)=>{ 1728 _reactdom.default.preinit(styleSrc, { 1729 as: 'style' 1730 }); 1731 }); 1732 } 1733 // Before interactive scripts need to be loaded by Next.js' runtime instead 1734 // of native <script> tags, because they no longer have `defer`. 1735 if (strategy === 'beforeInteractive') { 1736 if (!src) { 1737 // For inlined scripts, we put the content in `children`. 1738 if (restProps.dangerouslySetInnerHTML) { 1739 // Casting since lib.dom.d.ts doesn't have TrustedHTML yet. 1740 restProps.children = restProps.dangerouslySetInnerHTML.__html; 1741 delete restProps.dangerouslySetInnerHTML; 1742 } 1743 return /*#__PURE__*/ (0, _jsxruntime.jsx)("script", { 1744 nonce: nonce, 1745 dangerouslySetInnerHTML: { 1746 __html: "(self.__next_s=self.__next_s||[]).push(".concat((0, _htmlescape.htmlEscapeJsonString)(JSON.stringify([ 1747 0, 1748 { 1749 ...restProps, 1750 id 1751 } 1752 ])), ")") 1753 } 1754 }); 1755 } else { 1756 // @ts-ignore 1757 _reactdom.default.preload(src, restProps.integrity ? { 1758 as: 'script', 1759 integrity: restProps.integrity, 1760 nonce, 1761 crossOrigin: restProps.crossOrigin 1762 } : { 1763 as: 'script', 1764 nonce, 1765 crossOrigin: restProps.crossOrigin 1766 }); 1767 return /*#__PURE__*/ (0, _jsxruntime.jsx)("script", { 1768 nonce: nonce, 1769 dangerouslySetInnerHTML: { 1770 __html: "(self.__next_s=self.__next_s||[]).push(".concat((0, _htmlescape.htmlEscapeJsonString)(JSON.stringify([ 1771 src, 1772 { 1773 ...restProps, 1774 id 1775 } 1776 ])), ")") 1777 } 1778 }); 1779 } 1780 } else if (strategy === 'afterInteractive') { 1781 if (src) { 1782 // @ts-ignore 1783 _reactdom.default.preload(src, restProps.integrity ? { 1784 as: 'script', 1785 integrity: restProps.integrity, 1786 nonce, 1787 crossOrigin: restProps.crossOrigin 1788 } : { 1789 as: 'script', 1790 nonce, 1791 crossOrigin: restProps.crossOrigin 1792 }); 1793 } 1794 } 1795 } 1796 return null; 1797} 1798Object.defineProperty(Script, '__nextScript', { 1799 value: true 1800}); 1801const _default = Script; 1802if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') { 1803 Object.defineProperty(exports.default, '__esModule', { 1804 value: true 1805 }); 1806 Object.assign(exports.default, exports); 1807 module.exports = exports.default; 1808} 1809}), 181019746, 886282, 1811((__turbopack_context__) => { 1812"use strict"; 1813 1814// MERGED MODULE: [project]/src/cms/graphql.ts [app-client] (ecmascript) <locals> 1815; 1816// MERGED MODULE: [project]/node_modules/gql.tada/dist/gql-tada.mjs [app-client] (ecmascript) <locals> 1817; 1818// MERGED MODULE: [project]/node_modules/@0no-co/graphql.web/dist/graphql.web.mjs [app-client] (ecmascript) 1819; 1820var e = { 1821 NAME: "Name", 1822 DOCUMENT: "Document", 1823 OPERATION_DEFINITION: "OperationDefinition", 1824 VARIABLE_DEFINITION: "VariableDefinition", 1825 SELECTION_SET: "SelectionSet", 1826 FIELD: "Field", 1827 ARGUMENT: "Argument", 1828 FRAGMENT_SPREAD: "FragmentSpread", 1829 INLINE_FRAGMENT: "InlineFragment", 1830 FRAGMENT_DEFINITION: "FragmentDefinition", 1831 VARIABLE: "Variable", 1832 INT: "IntValue", 1833 FLOAT: "FloatValue", 1834 STRING: "StringValue", 1835 BOOLEAN: "BooleanValue", 1836 NULL: "NullValue", 1837 ENUM: "EnumValue", 1838 LIST: "ListValue", 1839 OBJECT: "ObjectValue", 1840 OBJECT_FIELD: "ObjectField", 1841 DIRECTIVE: "Directive", 1842 NAMED_TYPE: "NamedType", 1843 LIST_TYPE: "ListType", 1844 NON_NULL_TYPE: "NonNullType" 1845}; 1846var r1 = { 1847 QUERY: "query", 1848 MUTATION: "mutation", 1849 SUBSCRIPTION: "subscription" 1850};
1851class GraphQLError extends Error { 1852 toJSON() { 1853 return { 1854 ...this, 1855 message: this.message 1856 }; 1857 } 1858 toString() { 1859 return this.message; 1860 } 1861 get [Symbol.toStringTag]() { 1862 return "GraphQLError"; 1863 } 1864 constructor(e, r1, i, n, t, a, o){ 1865 if (super(e), this.name = "GraphQLError", this.message = e, t) { 1866 this.path = t; 1867 } 1868 if (r1) { 1869 this.nodes = Array.isArray(r1) ? r1 : [ 1870 r1 1871 ]; 1872 } 1873 if (i) { 1874 this.source = i; 1875 } 1876 if (n) { 1877 this.positions = n; 1878 } 1879 if (a) { 1880 this.originalError = a; 1881 } 1882 var l = o; 1883 if (!l && a) { 1884 var d = a.extensions; 1885 if (d && "object" == typeof d) { 1886 l = d; 1887 } 1888 } 1889 this.extensions = l || {}; 1890 } 1891} 1892var i; 1893var n; 1894function error(e) { 1895 return new GraphQLError("Syntax Error: Unexpected token at ".concat(n, " in ").concat(e)); 1896} 1897function advance(e) { 1898 if (e.lastIndex = n, e.test(i)) { 1899 return i.slice(n, n = e.lastIndex); 1900 } 1901} 1902var t = / +(?=[^\s])/y; 1903function blockString(e) { 1904 var r1 = e.split("\n"); 1905 var i = ""; 1906 var n = 0; 1907 var a = 0; 1908 var o = r1.length - 1; 1909 for(var l = 0; l < r1.length; l++){ 1910 if (t.lastIndex = 0, t.test(r1[l])) { 1911 if (l && (!n || t.lastIndex < n)) { 1912 n = t.lastIndex; 1913 } 1914 a = a || l, o = l; 1915 } 1916 } 1917 for(var d = a; d <= o; d++){ 1918 if (d !== a) { 1919 i += "\n"; 1920 } 1921 i += r1[d].slice(n).replace(/\\"""/g, '"""'); 1922 } 1923 return i; 1924} 1925function ignored() { 1926 for(var e = 0 | i.charCodeAt(n++); 9 === e || 10 === e || 13 === e || 32 === e || 35 === e || 44 === e || 65279 === e; e = 0 | i.charCodeAt(n++)){ 1927 if (35 === e) { 1928 for(; (e = 0 | i.charCodeAt(n++)) && 10 !== e && 13 !== e;){} 1929 } 1930 } 1931 n--; 1932} 1933function name() { 1934 var e = n; 1935 for(var r1 = 0 | i.charCodeAt(n++); r1 >= 48 && r1 <= 57 || r1 >= 65 && r1 <= 90 || 95 === r1 || r1 >= 97 && r1 <= 122; r1 = 0 | i.charCodeAt(n++)){} 1936 if (e === n - 1) { 1937 throw error("Name"); 1938 } 1939 var t = i.slice(e, --n); 1940 return ignored(), t; 1941} 1942function nameNode() { 1943 return { 1944 kind: "Name", 1945 value: name() 1946 }; 1947} 1948var a = /(?:"""|(?:[\s\S]*?[^\\])""")/y; 1949var o = /(?:(?:\.\d+)?[eE][+-]?\d+|\.\d+)/y; 1950function value(e) { 1951 var r1; 1952 switch(i.charCodeAt(n)){ 1953 case 91: 1954 n++, ignored(); 1955 var t = []; 1956 for(; 93 !== i.charCodeAt(n);){ 1957 t.push(value(e)); 1958 } 1959 return n++, ignored(), { 1960 kind: "ListValue", 1961 values: t 1962 }; 1963 case 123: 1964 n++, ignored(); 1965 var l = []; 1966 for(; 125 !== i.charCodeAt(n);){ 1967 var d = nameNode(); 1968 if (58 !== i.charCodeAt(n++)) { 1969 throw error("ObjectField"); 1970 } 1971 ignored(), l.push({ 1972 kind: "ObjectField", 1973 name: d, 1974 value: value(e) 1975 }); 1976 } 1977 return n++, ignored(), { 1978 kind: "ObjectValue", 1979 fields: l 1980 }; 1981 case 36: 1982 if (e) { 1983 throw error("Variable"); 1984 } 1985 return n++, { 1986 kind: "Variable", 1987 name: nameNode() 1988 }; 1989 case 34: 1990 if (34 === i.charCodeAt(n + 1) && 34 === i.charCodeAt(n + 2)) { 1991 if (n += 3, null == (r1 = advance(a))) { 1992 throw error("StringValue"); 1993 } 1994 return ignored(), { 1995 kind: "StringValue", 1996 value: blockString(r1.slice(0, -3)), 1997 block: !0 1998 }; 1999 } else { 2000 var u = n; 2001 var s; 2002 n++; 2003 var c = !1;
2004 for(s = 0 | i.charCodeAt(n++); 92 === s && (n++, c = !0) || 10 !== s && 13 !== s && 34 !== s && s; s = 0 | i.charCodeAt(n++)){} 2005 if (34 !== s) { 2006 throw error("StringValue"); 2007 } 2008 return r1 = i.slice(u, n), ignored(), { 2009 kind: "StringValue", 2010 value: c ? JSON.parse(r1) : r1.slice(1, -1), 2011 block: !1 2012 }; 2013 } 2014 case 45: 2015 case 48: 2016 case 49: 2017 case 50: 2018 case 51: 2019 case 52: 2020 case 53: 2021 case 54: 2022 case 55: 2023 case 56: 2024 case 57: 2025 var v = n++; 2026 var f; 2027 for(; (f = 0 | i.charCodeAt(n++)) >= 48 && f <= 57;){} 2028 var m = i.slice(v, --n); 2029 if (46 === (f = i.charCodeAt(n)) || 69 === f || 101 === f) { 2030 if (null == (r1 = advance(o))) { 2031 throw error("FloatValue"); 2032 } 2033 return ignored(), { 2034 kind: "FloatValue", 2035 value: m + r1 2036 }; 2037 } else { 2038 return ignored(), { 2039 kind: "IntValue", 2040 value: m 2041 }; 2042 } 2043 case 110: 2044 if (117 === i.charCodeAt(n + 1) && 108 === i.charCodeAt(n + 2) && 108 === i.charCodeAt(n + 3)) { 2045 return n += 4, ignored(), { 2046 kind: "NullValue" 2047 }; 2048 } else { 2049 break; 2050 } 2051 case 116: 2052 if (114 === i.charCodeAt(n + 1) && 117 === i.charCodeAt(n + 2) && 101 === i.charCodeAt(n + 3)) { 2053 return n += 4, ignored(), { 2054 kind: "BooleanValue", 2055 value: !0 2056 }; 2057 } else { 2058 break; 2059 } 2060 case 102: 2061 if (97 === i.charCodeAt(n + 1) && 108 === i.charCodeAt(n + 2) && 115 === i.charCodeAt(n + 3) && 101 === i.charCodeAt(n + 4)) { 2062 return n += 5, ignored(), { 2063 kind: "BooleanValue", 2064 value: !1 2065 }; 2066 } else { 2067 break; 2068 } 2069 } 2070 return { 2071 kind: "EnumValue", 2072 value: name() 2073 }; 2074} 2075function arguments_(e) { 2076 if (40 === i.charCodeAt(n)) { 2077 var r1 = []; 2078 n++, ignored(); 2079 do { 2080 var t = nameNode(); 2081 if (58 !== i.charCodeAt(n++)) { 2082 throw error("Argument"); 2083 } 2084 ignored(), r1.push({ 2085 kind: "Argument", 2086 name: t, 2087 value: value(e) 2088 }); 2089 }while (41 !== i.charCodeAt(n)) 2090 return n++, ignored(), r1; 2091 } 2092} 2093function directives(e) { 2094 if (64 === i.charCodeAt(n)) { 2095 var r1 = []; 2096 do { 2097 n++, r1.push({ 2098 kind: "Directive", 2099 name: nameNode(), 2100 arguments: arguments_(e) 2101 }); 2102 }while (64 === i.charCodeAt(n)) 2103 return r1; 2104 } 2105} 2106function type() { 2107 var e = 0; 2108 for(; 91 === i.charCodeAt(n);){ 2109 e++, n++, ignored(); 2110 } 2111 var r1 = { 2112 kind: "NamedType", 2113 name: nameNode() 2114 }; 2115 do { 2116 if (33 === i.charCodeAt(n)) { 2117 n++, ignored(), r1 = {
2118 kind: "NonNullType", 2119 type: r1 2120 }; 2121 } 2122 if (e) { 2123 if (93 !== i.charCodeAt(n++)) { 2124 throw error("NamedType"); 2125 } 2126 ignored(), r1 = { 2127 kind: "ListType", 2128 type: r1 2129 }; 2130 } 2131 }while (e--) 2132 return r1; 2133} 2134function selectionSetStart() { 2135 if (123 !== i.charCodeAt(n++)) { 2136 throw error("SelectionSet"); 2137 } 2138 return ignored(), selectionSet(); 2139} 2140function selectionSet() { 2141 var e = []; 2142 do { 2143 if (46 === i.charCodeAt(n)) { 2144 if (46 !== i.charCodeAt(++n) || 46 !== i.charCodeAt(++n)) { 2145 throw error("SelectionSet"); 2146 } 2147 switch(n++, ignored(), i.charCodeAt(n)){ 2148 case 64: 2149 e.push({ 2150 kind: "InlineFragment", 2151 typeCondition: void 0, 2152 directives: directives(!1), 2153 selectionSet: selectionSetStart() 2154 }); 2155 break; 2156 case 111: 2157 if (110 === i.charCodeAt(n + 1)) { 2158 n += 2, ignored(), e.push({ 2159 kind: "InlineFragment", 2160 typeCondition: { 2161 kind: "NamedType", 2162 name: nameNode() 2163 }, 2164 directives: directives(!1), 2165 selectionSet: selectionSetStart() 2166 }); 2167 } else { 2168 e.push({ 2169 kind: "FragmentSpread", 2170 name: nameNode(), 2171 directives: directives(!1) 2172 }); 2173 } 2174 break; 2175 case 123: 2176 n++, ignored(), e.push({ 2177 kind: "InlineFragment", 2178 typeCondition: void 0, 2179 directives: void 0, 2180 selectionSet: selectionSet() 2181 }); 2182 break; 2183 default: 2184 e.push({ 2185 kind: "FragmentSpread", 2186 name: nameNode(), 2187 directives: directives(!1) 2188 }); 2189 } 2190 } else { 2191 var r1 = nameNode(); 2192 var t = void 0; 2193 if (58 === i.charCodeAt(n)) { 2194 n++, ignored(), t = r1, r1 = nameNode(); 2195 } 2196 var a = arguments_(!1); 2197 var o = directives(!1); 2198 var l = void 0; 2199 if (123 === i.charCodeAt(n)) { 2200 n++, ignored(), l = selectionSet(); 2201 } 2202 e.push({ 2203 kind: "Field", 2204 alias: t, 2205 name: r1, 2206 arguments: a, 2207 directives: o, 2208 selectionSet: l 2209 }); 2210 } 2211 }while (125 !== i.charCodeAt(n)) 2212 return n++, ignored(), { 2213 kind: "SelectionSet", 2214 selections: e 2215 }; 2216} 2217function variableDefinitions() { 2218 if (ignored(), 40 === i.charCodeAt(n)) { 2219 var e = []; 2220 n++, ignored(); 2221 do { 2222 var r1 = void 0; 2223 if (34 === i.charCodeAt(n)) { 2224 r1 = value(!0); 2225 } 2226 if (36 !== i.charCodeAt(n++)) { 2227 throw error("Variable"); 2228 } 2229 var t = nameNode(); 2230 if (58 !== i.charCodeAt(n++)) { 2231 throw error("VariableDefinition"); 2232 } 2233 ignored(); 2234 var a = type(); 2235 var o = void 0; 2236 if (61 === i.charCodeAt(n)) { 2237 n++, ignored(), o = value(!0); 2238 } 2239 ignored(); 2240 var l = { 2241 kind: "VariableDefinition", 2242 variable: { 2243 kind: "Variable", 2244 name: t 2245 }, 2246 type: a, 2247 defaultValue: o, 2248 directives: directives(!0) 2249 }; 2250 if (r1) { 2251 l.description = r1; 2252 } 2253 e.push(l); 2254 }
2254while (41 !== i.charCodeAt(n)) 2255 return n++, ignored(), e; 2256 } 2257} 2258function fragmentDefinition(e) { 2259 var r1 = nameNode(); 2260 if (111 !== i.charCodeAt(n++) || 110 !== i.charCodeAt(n++)) { 2261 throw error("FragmentDefinition"); 2262 } 2263 ignored(); 2264 var t = { 2265 kind: "FragmentDefinition", 2266 name: r1, 2267 typeCondition: { 2268 kind: "NamedType", 2269 name: nameNode() 2270 }, 2271 directives: directives(!1), 2272 selectionSet: selectionSetStart() 2273 }; 2274 if (e) { 2275 t.description = e; 2276 } 2277 return t; 2278} 2279function definitions() { 2280 var e = []; 2281 do { 2282 var r1 = void 0; 2283 if (34 === i.charCodeAt(n)) { 2284 r1 = value(!0); 2285 } 2286 if (123 === i.charCodeAt(n)) { 2287 if (r1) { 2288 throw error("Document"); 2289 } 2290 n++, ignored(), e.push({ 2291 kind: "OperationDefinition", 2292 operation: "query", 2293 name: void 0, 2294 variableDefinitions: void 0, 2295 directives: void 0, 2296 selectionSet: selectionSet() 2297 }); 2298 } else { 2299 var t = name(); 2300 switch(t){ 2301 case "fragment": 2302 e.push(fragmentDefinition(r1)); 2303 break; 2304 case "query": 2305 case "mutation": 2306 case "subscription": 2307 var a; 2308 var o = void 0; 2309 if (40 !== (a = i.charCodeAt(n)) && 64 !== a && 123 !== a) { 2310 o = nameNode(); 2311 } 2312 var l = { 2313 kind: "OperationDefinition", 2314 operation: t, 2315 name: o, 2316 variableDefinitions: variableDefinitions(), 2317 directives: directives(!1), 2318 selectionSet: selectionSetStart() 2319 }; 2320 if (r1) { 2321 l.description = r1; 2322 } 2323 e.push(l); 2324 break; 2325 default: 2326 throw error("Document"); 2327 } 2328 } 2329 }while (n < i.length) 2330 return e; 2331} 2332function parse(e, r1) { 2333 if (i = e.body ? e.body : e, n = 0, ignored(), r1 && r1.noLocation) { 2334 return { 2335 kind: "Document", 2336 definitions: definitions() 2337 }; 2338 } else { 2339 return { 2340 kind: "Document", 2341 definitions: definitions(), 2342 loc: { 2343 start: 0, 2344 end: i.length, 2345 startToken: void 0, 2346 endToken: void 0, 2347 source: { 2348 body: i, 2349 name: "graphql.web", 2350 locationOffset: { 2351 line: 1, 2352 column: 1 2353 } 2354 } 2355 } 2356 }; 2357 } 2358} 2359function parseValue(e, r1) { 2360 return i = e.body ? e.body : e, n = 0, ignored(), value(!1); 2361} 2362function parseType(e, r1) { 2363 return i = e.body ? e.body : e, n = 0, type(); 2364} 2365var l = {}; 2366function visit(e, r1) { 2367 var i = []; 2368 var n = []; 2369 try { 2370 var t = function traverse(e, t, a) { 2371 var o = !1; 2372 var d = r1[e.kind] && r1[e.kind].enter || r1[e.kind] || r1.enter; 2373 var u = d && d.call(r1, e, t, a, n, i); 2374 if (!1 === u) { 2375 return e; 2376 } else if (null === u) { 2377 return null; 2378 } else if (u === l) { 2379 throw l; 2380 } else if (u && "string" == typeof u.kind) { 2381 o = u !== e, e = u; 2382 } 2383 if (a) { 2384 i.push(a); 2385 } 2386 var s; 2387 var c = { 2388 ...e 2389 }; 2390 for(var v in e){ 2391 n.push(v); 2392 var f = e[v]; 2393 if (Array.isArray(f)) { 2394 var m = []; 2395 for(var p = 0; p < f.length; p++){ 2396 if (null != f[p] && "string" == typeof f[p].kind) { 2397 if (i.push(e), n.push(p), s = traverse(f[p], p, f), n.pop(), i.pop(), null == s) { 2398 o = !0; 2399 } else { 2400 o = o || s !== f[p], m.push(s); 2401 } 2402 } 2403 } 2404 f = m; 2405 } else if (null != f && "string" == typeof f.kind) { 2406 if (void 0 !== (s = traverse(f, v, e))) { 2407 o = o || f !== s, f = s; 2408 } 2409 } 2410 if (n.pop(), o) { 2411 c[v] = f; 2412 } 2413 } 2414 if (a) { 2415 i.pop(); 2416 } 2417 var h = r1[e.kind] && r1[e.kind].leave || r1.leave; 2418 var g = h && h.call(r1, e, t, a, n, i); 2419 if (g === l) { 2420 throw l; 2421 } else if (void 0 !== g) { 2422 return g; 2423 } else if (void 0 !== u) { 2424 return o ? c : u; 2425 } else { 2426 return o ? c : e; 2427 } 2428 }(e); 2429 return void 0 !== t && !1 !== t ? t : e; 2430 } catch (r1) { 2431 if (r1 !== l) { 2432 throw r1; 2433 } 2434 return e; 2435 } 2436} 2437function mapJoin(e, r1, i) { 2438 var n = ""; 2439 for(var t = 0; t < e.length; t++){ 2440 if (t) { 2441 n += r1; 2442 } 2443 n += i(e[t]); 2444 } 2445 return n; 2446} 2447function printString(e) { 2448 return JSON.stringify(e); 2449} 2450function printBlockString(e) { 2451 return '"""\n' + e.replace(/"""/g, '\\"""') + '\n"""'; 2452} 2453var d = "\n"; 2454var u = { 2455 OperationDefinition (e) { 2456 var r1 = ""; 2457 if (e.description) { 2458 r1 += u.StringValue(e.description) + "\n"; 2459 } 2460 if (r1 += e.operation, e.name) { 2461 r1 += " " + e.name.value; 2462 } 2463 if (e.variableDefinitions && e.variableDefinitions.length) { 2464 if (!e.name) { 2465 r1 += " "; 2466 } 2467 r1 += "(" + mapJoin(e.variableDefinitions, ", ", u.VariableDefinition) + ")"; 2468 } 2469 if (e.directives && e.directives.length) { 2470 r1 += " " + mapJoin(e.directives, " ", u.Directive); 2471 } 2472 var i = u.SelectionSet(e.selectionSet); 2473 return "query" !== r1 ? r1 + " " + i : i; 2474 }, 2475 VariableDefinition (e) { 2476 var r1 = ""; 2477 if (e.description) { 2478 r1 += u.StringValue(e.description) + " "; 2479 } 2480 if (r1 += u.Variable(e.variable) + ": " + _print(e.type), e.defaultValue) { 2481 r1 += " = " + _print(e.defaultValue); 2482 } 2483 if (e.directives && e.directives.length) { 2484 r1 += " " + mapJoin(e.directives, " ", u.Directive); 2485 } 2486 return r1; 2487 }, 2488 Field (e) { 2489 var r1 = e.alias ? e.alias.value + ": " + e.name.value : e.name.value; 2490 if (e.arguments && e.arguments.length) { 2491 var i = mapJoin(e.arguments, ", ", u.Argument); 2492 if (r1.length + i.length + 2 > 80) { 2493 r1 += "(" + (d += " ") + mapJoin(e.arguments, d, u.Argument) + (d = d.slice(0, -2)) + ")"; 2494 } else { 2495 r1 += "(" + i + ")"; 2496 } 2497 } 2498 if (e.directives && e.directives.length) { 2499 r1 += " " + mapJoin(e.directives, " ", u.Directive); 2500 } 2501 if (e.selectionSet && e.selectionSet.selections.length) { 2502 r1 += " " + u.SelectionSet(e.selectionSet); 2503 } 2504 return r1; 2505 }, 2506 StringValue (e) { 2507 if (e.block) { 2508 return printBlockString(e.value).replace(/\n/g, d); 2509 } else { 2510 return printString(e.value); 2511 } 2512 }, 2513 BooleanValue: (e)=>"" + e.value,
2514 NullValue: (e)=>"null", 2515 IntValue: (e)=>e.value, 2516 FloatValue: (e)=>e.value, 2517 EnumValue: (e)=>e.value, 2518 Name: (e)=>e.value, 2519 Variable: (e)=>"$" + e.name.value, 2520 ListValue: (e)=>"[" + mapJoin(e.values, ", ", _print) + "]", 2521 ObjectValue: (e)=>"{" + mapJoin(e.fields, ", ", u.ObjectField) + "}", 2522 ObjectField: (e)=>e.name.value + ": " + _print(e.value), 2523 Document (e) { 2524 if (!e.definitions || !e.definitions.length) { 2525 return ""; 2526 } else { 2527 return mapJoin(e.definitions, "\n\n", _print); 2528 } 2529 }, 2530 SelectionSet: (e)=>"{" + (d += " ") + mapJoin(e.selections, d, _print) + (d = d.slice(0, -2)) + "}", 2531 Argument: (e)=>e.name.value + ": " + _print(e.value), 2532 FragmentSpread (e) { 2533 var r1 = "..." + e.name.value; 2534 if (e.directives && e.directives.length) { 2535 r1 += " " + mapJoin(e.directives, " ", u.Directive); 2536 } 2537 return r1; 2538 }, 2539 InlineFragment (e) { 2540 var r1 = "..."; 2541 if (e.typeCondition) { 2542 r1 += " on " + e.typeCondition.name.value; 2543 } 2544 if (e.directives && e.directives.length) { 2545 r1 += " " + mapJoin(e.directives, " ", u.Directive); 2546 } 2547 return r1 += " " + u.SelectionSet(e.selectionSet); 2548 }, 2549 FragmentDefinition (e) { 2550 var r1 = ""; 2551 if (e.description) { 2552 r1 += u.StringValue(e.description) + "\n"; 2553 } 2554 if (r1 += "fragment " + e.name.value, r1 += " on " + e.typeCondition.name.value, e.directives && e.directives.length) { 2555 r1 += " " + mapJoin(e.directives, " ", u.Directive); 2556 } 2557 return r1 + " " + u.SelectionSet(e.selectionSet); 2558 }, 2559 Directive (e) { 2560 var r1 = "@" + e.name.value; 2561 if (e.arguments && e.arguments.length) { 2562 r1 += "(" + mapJoin(e.arguments, ", ", u.Argument) + ")"; 2563 } 2564 return r1; 2565 }, 2566 NamedType: (e)=>e.name.value, 2567 ListType: (e)=>"[" + _print(e.type) + "]", 2568 NonNullType: (e)=>_print(e.type) + "!" 2569}; 2570var _print = (e)=>u[e.kind](e); 2571function print(e) { 2572 return d = "\n", u[e.kind] ? u[e.kind](e) : ""; 2573} 2574function valueFromASTUntyped(e, r1) { 2575 switch(e.kind){ 2576 case "NullValue": 2577 return null; 2578 case "IntValue": 2579 return parseInt(e.value, 10); 2580 case "FloatValue": 2581 return parseFloat(e.value); 2582 case "StringValue": 2583 case "EnumValue": 2584 case "BooleanValue": 2585 return e.value; 2586 case "ListValue": 2587 var i = []; 2588 for(var n = 0, t = e.values.length; n < t; n++){ 2589 i.push(valueFromASTUntyped(e.values[n], r1)); 2590 } 2591 return i; 2592 case "ObjectValue": 2593 var a = Object.create(null); 2594 for(var o = 0, l = e.fields.length; o < l; o++){ 2595 var d = e.fields[o]; 2596 a[d.name.value] = valueFromASTUntyped(d.value, r1); 2597 } 2598 return a; 2599 case "Variable": 2600 return r1 && r1[e.name.value]; 2601 } 2602} 2603function valueFromTypeNode(e, r1, i) { 2604 if ("Variable" === e.kind) { 2605 return i ? valueFromTypeNode(i[e.name.value], r1, i) : void 0; 2606 } else if ("NonNullType" === r1.kind) { 2607 return "NullValue" !== e.kind ? valueFromTypeNode(e, r1, i) : void 0; 2608 } else if ("NullValue" === e.kind) { 2609 return null; 2610 } else if ("ListType" === r1.kind) { 2611 if ("ListValue" === e.kind) { 2612 var n = []; 2613 for(var t = 0, a = e.values.length; t < a; t++){ 2614 var o = valueFromTypeNode(e.values[t], r1.type, i); 2615 if (void 0 === o) { 2616 return; 2617 } else { 2618 n.push(o); 2619 } 2620 } 2621 return n; 2622 } 2623 } else if ("NamedType" === r1.kind) { 2624 switch(r1.name.value){ 2625 case "Int": 2626 case "Float": 2627 case "String": 2628 case "Bool": 2629 return r1.name.value + "Value" === e.kind ? valueFromASTUntyped(e, i) : void 0; 2630 default: 2631 return valueFromASTUntyped(e, i); 2632 } 2633 } 2634} 2635function isSelectionNode(e) { 2636 return "Field" === e.kind || "FragmentSpread" === e.kind || "InlineFragment" === e.kind; 2637} 2638function Source(e, r1, i) { 2639 return { 2640 body: e, 2641 name: r1, 2642 locationOffset: i || { 2643 line: 1, 2644 column: 1 2645 } 2646 }; 2647} 2648; 2649; 2650; 2651var n1 = 0; 2652var e1 = new Set; 2653function initGraphQLTada() { 2654 function graphql(t, i) { 2655 var o = parse(t).definitions; 2656 var s = new Set; 2657 for (var d of i || []){ 2658 for (var f of d.definitions){ 2659 if (f.kind === e.FRAGMENT_DEFINITION && !s.has(f)) { 2660 o.push(f); 2661 s.add(f); 2662 } 2663 } 2664 } 2665 var c; 2666 if ((c = o[0].kind === e.FRAGMENT_DEFINITION) && o[0].directives) { 2667 o[0].directives = o[0].directives.filter((r1)=>"_unmask" !== r1.name.value); 2668 } 2669 var u; 2670 return { 2671 kind: e.DOCUMENT, 2672 definitions: o, 2673 get loc () { 2674 if (!u && c) { 2675 var r1 = t + function concatLocSources(r1) { 2676 try { 2677 n1++; 2678 var a = ""; 2679 for (var t of r1){ 2680 if (!e1.has(t)) { 2681 e1.add(t); 2682 var { loc: i } = t; 2683 if (i) { 2684 a += i.source.body; 2685 } 2686 } 2687 } 2688 return a; 2689 } finally{ 2690 if (0 == --n1) { 2691 e1.clear(); 2692 } 2693 } 2694 }(i || []); 2695 return { 2696 start: 0, 2697 end: r1.length, 2698 source: { 2699 body: r1, 2700 name: "GraphQLTada", 2701 locationOffset: { 2702 line: 1, 2703 column: 1 2704 } 2705 } 2706 }; 2707 } 2708 return u; 2709 }, 2710 set loc (r){ 2711 u = r; 2712 } 2713 }; 2714 }
2715 graphql.scalar = function scalar(r1, a) { 2716 return a; 2717 }; 2718 graphql.persisted = function persisted(a, n) { 2719 return { 2720 kind: e.DOCUMENT, 2721 definitions: n ? n.definitions : [], 2722 documentId: a 2723 }; 2724 }; 2725 return graphql; 2726} 2727function parse1(r1) { 2728 return parse(r1); 2729} 2730function readFragment() { 2731 for(var _len = arguments.length, r1 = new Array(_len), _key = 0; _key < _len; _key++){ 2732 r1[_key] = arguments[_key]; 2733 } 2734 return 2 === r1.length ? r1[1] : r1[0]; 2735} 2736var t1 = initGraphQLTada(); 2737; 2738__turbopack_context__.s([ 2739 "initGraphQLTada", 2740 0, 2741 initGraphQLTada, 2742 "readFragment", 2743 0, 2744 readFragment 2745], 886282); 2746; 2747const graphql = initGraphQLTada(); 2748; 2749__turbopack_context__.s([ 2750 "graphql", 2751 0, 2752 graphql 2753], 19746); 2754}), 2755551438, ((__turbopack_context__) => { 2756"use strict"; 2757 2758var __TURBOPACK__imported__module__19746__ = __turbopack_context__.i(19746); 2759; 2760const responsiveImageFragment = (0, __TURBOPACK__imported__module__19746__["graphql"])("\n fragment responsiveImageFragment on ResponsiveImage {\n srcSet\n webpSrcSet\n sizes\n src\n width\n height\n aspectRatio\n alt\n title\n bgColor\n base64\n }\n"); 2761__turbopack_context__.s([ 2762 "responsiveImageFragment", 2763 0, 2764 responsiveImageFragment 2765]); 2766}), 2767]); 2768 2769//# debugId=9ea81070-1e71-063f-fdca-0293d774071a
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.