{"ast":null,"code":"import _defineProperty from \"C:/Users/user/Desktop/08portreact/node_modules/@babel/runtime/helpers/esm/defineProperty.js\";\nimport _objectSpread from \"C:/Users/user/Desktop/08portreact/node_modules/@babel/runtime/helpers/esm/objectSpread2.js\";\nimport _objectWithoutProperties from \"C:/Users/user/Desktop/08portreact/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js\";\nvar _excluded = [\"asChild\"];\nimport $4q5Fq$babelruntimehelpersesmextends from \"@babel/runtime/helpers/esm/extends\";\nimport { forwardRef as $4q5Fq$forwardRef, useEffect as $4q5Fq$useEffect, createElement as $4q5Fq$createElement } from \"react\";\nimport { flushSync as $4q5Fq$flushSync } from \"react-dom\";\nimport { Slot as $4q5Fq$Slot } from \"@radix-ui/react-slot\";\nvar $8927f6f2acc4f386$var$NODES = ['a', 'button', 'div', 'form', 'h2', 'h3', 'img', 'input', 'label', 'li', 'nav', 'ol', 'p', 'span', 'svg', 'ul']; // Temporary while we await merge of this fix:\n// https://github.com/DefinitelyTyped/DefinitelyTyped/pull/55396\n// prettier-ignore\n/* -------------------------------------------------------------------------------------------------\n * Primitive\n * -----------------------------------------------------------------------------------------------*/\nvar $8927f6f2acc4f386$export$250ffa63cdc0d034 = $8927f6f2acc4f386$var$NODES.reduce(function (primitive, node) {\n  var Node = /*#__PURE__*/$4q5Fq$forwardRef(function (props, forwardedRef) {\n    var asChild = props.asChild,\n      primitiveProps = _objectWithoutProperties(props, _excluded);\n    var Comp = asChild ? $4q5Fq$Slot : node;\n    $4q5Fq$useEffect(function () {\n      window[Symbol.for('radix-ui')] = true;\n    }, []);\n    return /*#__PURE__*/$4q5Fq$createElement(Comp, $4q5Fq$babelruntimehelpersesmextends({}, primitiveProps, {\n      ref: forwardedRef\n    }));\n  });\n  Node.displayName = \"Primitive.\".concat(node);\n  return _objectSpread(_objectSpread({}, primitive), {}, _defineProperty({}, node, Node));\n}, {});\n/* -------------------------------------------------------------------------------------------------\n * Utils\n * -----------------------------------------------------------------------------------------------*/ /**\n                                                                                                     * Flush custom event dispatch\n                                                                                                     * https://github.com/radix-ui/primitives/pull/1378\n                                                                                                     *\n                                                                                                     * React batches *all* event handlers since version 18, this introduces certain considerations when using custom event types.\n                                                                                                     *\n                                                                                                     * Internally, React prioritises events in the following order:\n                                                                                                     *  - discrete\n                                                                                                     *  - continuous\n                                                                                                     *  - default\n                                                                                                     *\n                                                                                                     * https://github.com/facebook/react/blob/a8a4742f1c54493df00da648a3f9d26e3db9c8b5/packages/react-dom/src/events/ReactDOMEventListener.js#L294-L350\n                                                                                                     *\n                                                                                                     * `discrete` is an  important distinction as updates within these events are applied immediately.\n                                                                                                     * React however, is not able to infer the priority of custom event types due to how they are detected internally.\n                                                                                                     * Because of this, it's possible for updates from custom events to be unexpectedly batched when\n                                                                                                     * dispatched by another `discrete` event.\n                                                                                                     *\n                                                                                                     * In order to ensure that updates from custom events are applied predictably, we need to manually flush the batch.\n                                                                                                     * This utility should be used when dispatching a custom event from within another `discrete` event, this utility\n                                                                                                     * is not nessesary when dispatching known event types, or if dispatching a custom type inside a non-discrete event.\n                                                                                                     * For example:\n                                                                                                     *\n                                                                                                     * dispatching a known click 👎\n                                                                                                     * target.dispatchEvent(new Event(‘click’))\n                                                                                                     *\n                                                                                                     * dispatching a custom type within a non-discrete event 👎\n                                                                                                     * onScroll={(event) => event.target.dispatchEvent(new CustomEvent(‘customType’))}\n                                                                                                     *\n                                                                                                     * dispatching a custom type within a `discrete` event 👍\n                                                                                                     * onPointerDown={(event) => dispatchDiscreteCustomEvent(event.target, new CustomEvent(‘customType’))}\n                                                                                                     *\n                                                                                                     * Note: though React classifies `focus`, `focusin` and `focusout` events as `discrete`, it's  not recommended to use\n                                                                                                     * this utility with them. This is because it's possible for those handlers to be called implicitly during render\n                                                                                                     * e.g. when focus is within a component as it is unmounted, or when managing focus on mount.\n                                                                                                     */\nfunction $8927f6f2acc4f386$export$6d1a0317bde7de7f(target, event) {\n  if (target) $4q5Fq$flushSync(function () {\n    return target.dispatchEvent(event);\n  });\n}\n/* -----------------------------------------------------------------------------------------------*/\nvar $8927f6f2acc4f386$export$be92b6f5f03c0fe9 = $8927f6f2acc4f386$export$250ffa63cdc0d034;\nexport { $8927f6f2acc4f386$export$250ffa63cdc0d034 as Primitive, $8927f6f2acc4f386$export$be92b6f5f03c0fe9 as Root, $8927f6f2acc4f386$export$6d1a0317bde7de7f as dispatchDiscreteCustomEvent };","map":{"version":3,"names":["$8927f6f2acc4f386$var$NODES","$8927f6f2acc4f386$export$250ffa63cdc0d034","reduce","primitive","node","Node","$4q5Fq$forwardRef","props","forwardedRef","asChild","primitiveProps","_objectWithoutProperties","_excluded","Comp","$4q5Fq$Slot","$4q5Fq$useEffect","window","Symbol","for","$4q5Fq$createElement","$4q5Fq$babelruntimehelpersesmextends","ref","displayName","concat","_objectSpread","_defineProperty","$8927f6f2acc4f386$export$6d1a0317bde7de7f","dispatchDiscreteCustomEvent","target","event","$4q5Fq$flushSync","dispatchEvent","$8927f6f2acc4f386$export$be92b6f5f03c0fe9"],"sources":["C:\\Users\\user\\Desktop\\08portreact\\node_modules\\@radix-ui\\react-primitive\\dist\\packages\\react\\primitive\\src\\index.ts","C:\\Users\\user\\Desktop\\08portreact\\node_modules\\@radix-ui\\react-primitive\\dist\\packages\\react\\primitive\\src\\Primitive.tsx"],"sourcesContent":["export {\n  Primitive,\n  //\n  Root,\n  //\n  dispatchDiscreteCustomEvent,\n} from './Primitive';\nexport type { ComponentPropsWithoutRef, PrimitivePropsWithRef } from './Primitive';\n","import * as React from 'react';\nimport * as ReactDOM from 'react-dom';\nimport { Slot } from '@radix-ui/react-slot';\n\nconst NODES = [\n  'a',\n  'button',\n  'div',\n  'form',\n  'h2',\n  'h3',\n  'img',\n  'input',\n  'label',\n  'li',\n  'nav',\n  'ol',\n  'p',\n  'span',\n  'svg',\n  'ul',\n] as const;\n\n// Temporary while we await merge of this fix:\n// https://github.com/DefinitelyTyped/DefinitelyTyped/pull/55396\n// prettier-ignore\ntype PropsWithoutRef<P> = P extends any ? ('ref' extends keyof P ? Pick<P, Exclude<keyof P, 'ref'>> : P) : P;\ntype ComponentPropsWithoutRef<T extends React.ElementType> = PropsWithoutRef<\n  React.ComponentProps<T>\n>;\n\ntype Primitives = { [E in typeof NODES[number]]: PrimitiveForwardRefComponent<E> };\ntype PrimitivePropsWithRef<E extends React.ElementType> = React.ComponentPropsWithRef<E> & {\n  asChild?: boolean;\n};\n\ninterface PrimitiveForwardRefComponent<E extends React.ElementType>\n  extends React.ForwardRefExoticComponent<PrimitivePropsWithRef<E>> {}\n\n/* -------------------------------------------------------------------------------------------------\n * Primitive\n * -----------------------------------------------------------------------------------------------*/\n\nconst Primitive = NODES.reduce((primitive, node) => {\n  const Node = React.forwardRef((props: PrimitivePropsWithRef<typeof node>, forwardedRef: any) => {\n    const { asChild, ...primitiveProps } = props;\n    const Comp: any = asChild ? Slot : node;\n\n    React.useEffect(() => {\n      (window as any)[Symbol.for('radix-ui')] = true;\n    }, []);\n\n    return <Comp {...primitiveProps} ref={forwardedRef} />;\n  });\n\n  Node.displayName = `Primitive.${node}`;\n\n  return { ...primitive, [node]: Node };\n}, {} as Primitives);\n\n/* -------------------------------------------------------------------------------------------------\n * Utils\n * -----------------------------------------------------------------------------------------------*/\n\n/**\n * Flush custom event dispatch\n * https://github.com/radix-ui/primitives/pull/1378\n *\n * React batches *all* event handlers since version 18, this introduces certain considerations when using custom event types.\n *\n * Internally, React prioritises events in the following order:\n *  - discrete\n *  - continuous\n *  - default\n *\n * https://github.com/facebook/react/blob/a8a4742f1c54493df00da648a3f9d26e3db9c8b5/packages/react-dom/src/events/ReactDOMEventListener.js#L294-L350\n *\n * `discrete` is an  important distinction as updates within these events are applied immediately.\n * React however, is not able to infer the priority of custom event types due to how they are detected internally.\n * Because of this, it's possible for updates from custom events to be unexpectedly batched when\n * dispatched by another `discrete` event.\n *\n * In order to ensure that updates from custom events are applied predictably, we need to manually flush the batch.\n * This utility should be used when dispatching a custom event from within another `discrete` event, this utility\n * is not nessesary when dispatching known event types, or if dispatching a custom type inside a non-discrete event.\n * For example:\n *\n * dispatching a known click 👎\n * target.dispatchEvent(new Event(‘click’))\n *\n * dispatching a custom type within a non-discrete event 👎\n * onScroll={(event) => event.target.dispatchEvent(new CustomEvent(‘customType’))}\n *\n * dispatching a custom type within a `discrete` event 👍\n * onPointerDown={(event) => dispatchDiscreteCustomEvent(event.target, new CustomEvent(‘customType’))}\n *\n * Note: though React classifies `focus`, `focusin` and `focusout` events as `discrete`, it's  not recommended to use\n * this utility with them. This is because it's possible for those handlers to be called implicitly during render\n * e.g. when focus is within a component as it is unmounted, or when managing focus on mount.\n */\n\nfunction dispatchDiscreteCustomEvent<E extends CustomEvent>(target: E['target'], event: E) {\n  if (target) ReactDOM.flushSync(() => target.dispatchEvent(event));\n}\n\n/* -----------------------------------------------------------------------------------------------*/\n\nconst Root = Primitive;\n\nexport {\n  Primitive,\n  //\n  Root,\n  //\n  dispatchDiscreteCustomEvent,\n};\nexport type { ComponentPropsWithoutRef, PrimitivePropsWithRef };\n"],"mappings":";;;;;;;;ACIA,IAAMA,2BAAK,GAAG,CACZ,GADY,EAEZ,QAFY,EAGZ,KAHY,EAIZ,MAJY,EAKZ,IALY,EAMZ,IANY,EAOZ,KAPY,EAQZ,OARY,EASZ,OATY,EAUZ,IAVY,EAWZ,KAXY,EAYZ,IAZY,EAaZ,GAbY,EAcZ,MAdY,EAeZ,KAfY,EAgBZ,IAhBY,CAAd,C,CAmBA;AACA;AACA;AAcA;;;AAIA,IAAMC,yCAAS,GAAGD,2BAAK,CAACE,MAAN,CAAa,UAACC,SAAD,EAAYC,IAAZ,EAAqB;EAClD,IAAMC,IAAI,gBAAGC,iBAAA,CAAiB,UAACC,KAAD,EAA4CC,YAA5C,EAAkE;IAC9F,IAAQC,OAAF,GAAiCF,KAAvC,C;MAAoBG,cAAH,GAAAC,wBAAA,CAAsBJ,KAAvC,EAAAK,SAAA;IACA,IAAMC,IAAS,GAAGJ,OAAO,GAAGK,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