velloo 0.6.0 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (95) hide show
  1. package/README.md +116 -227
  2. package/THIRD-PARTY-NOTICES.md +3 -3
  3. package/canvas/assets/index-BQ5710lu.js +29 -0
  4. package/canvas/assets/{lucide-all-CH8LmVh0.js → lucide-all-DIRZdJPK.js} +1 -1
  5. package/canvas/index.html +1 -1
  6. package/{chunk-56z5xd5b.js → chunk-0e5j6nqs.js} +1 -1
  7. package/{chunk-esb7n55g.js → chunk-0pxm5v0b.js} +2 -2
  8. package/{chunk-xtwx2p9g.js → chunk-0vaff40g.js} +1 -1
  9. package/{chunk-t6qr2ay9.js → chunk-3m28pvzr.js} +1 -1
  10. package/{chunk-rjjc9vam.js → chunk-4y2xy1kf.js} +2 -2
  11. package/{chunk-63y5gdzw.js → chunk-531xzfq5.js} +1 -1
  12. package/{chunk-c4spp880.js → chunk-5s1wjhtj.js} +1 -1
  13. package/{chunk-8cj4swpr.js → chunk-5x4nw0zz.js} +3 -3
  14. package/{chunk-k423dkjz.js → chunk-5yhnnhkd.js} +1 -1
  15. package/{chunk-8vgpffn7.js → chunk-64pex3mw.js} +1 -1
  16. package/{chunk-x02z2ccm.js → chunk-667ag8ts.js} +1 -1
  17. package/chunk-7gyzh0vq.js +5 -0
  18. package/{chunk-jsvkqae2.js → chunk-82x2jkfq.js} +1 -1
  19. package/{chunk-6813v926.js → chunk-84n18xgx.js} +2 -2
  20. package/{chunk-hjc5eg5c.js → chunk-abr2hgay.js} +1 -1
  21. package/{chunk-ff0jfn0v.js → chunk-acsv6m3n.js} +1 -1
  22. package/{chunk-08mjtg1e.js → chunk-asfgvzse.js} +1 -1
  23. package/{chunk-mfch0b0t.js → chunk-b8vcbbrg.js} +1 -1
  24. package/{chunk-ta84ehgg.js → chunk-bms1sg4c.js} +1 -1
  25. package/chunk-brnkprt5.js +723 -0
  26. package/{chunk-1gkeepkm.js → chunk-bys7pqdb.js} +1 -1
  27. package/{chunk-52m26hh4.js → chunk-d0j8dg1e.js} +1 -1
  28. package/{chunk-ff2vt7cz.js → chunk-d93kpv7s.js} +1 -1
  29. package/chunk-dvh0b2r4.js +3 -0
  30. package/{chunk-1td6z6ey.js → chunk-eh2xp4v6.js} +1 -1
  31. package/{chunk-96qhpth5.js → chunk-ejppcfa5.js} +1 -1
  32. package/{chunk-chtv0yj6.js → chunk-ex36z3b3.js} +144 -27
  33. package/{chunk-3trkmgfr.js → chunk-fmcm06xb.js} +1 -1
  34. package/{chunk-56vfy0db.js → chunk-fvezyap4.js} +1 -1
  35. package/{chunk-tac2wvc7.js → chunk-g7d065ek.js} +1 -1
  36. package/{chunk-ab8fga32.js → chunk-g8xrwjvq.js} +2 -2
  37. package/{chunk-bc7pkjcn.js → chunk-gbq5wv7x.js} +1 -1
  38. package/chunk-gcce587w.js +3 -0
  39. package/{chunk-nx09zqgs.js → chunk-gfppsgvv.js} +1 -1
  40. package/{chunk-qwccndcd.js → chunk-j306gr0c.js} +1 -1
  41. package/{chunk-2q561dec.js → chunk-j4fn2a2b.js} +1 -1
  42. package/chunk-jbgde2v9.js +2 -0
  43. package/{chunk-2ba6edh8.js → chunk-kkvf0xk2.js} +1 -1
  44. package/{chunk-h85hv05d.js → chunk-md4mpvqc.js} +1 -1
  45. package/{chunk-hf4adxe0.js → chunk-mdgwdqnq.js} +1 -1
  46. package/{chunk-w2naqxqt.js → chunk-pjkkp7xa.js} +1 -1
  47. package/chunk-qp3wahg4.js +2 -0
  48. package/{chunk-g185gx8a.js → chunk-qqrac4va.js} +1 -1
  49. package/{chunk-t2x3mztc.js → chunk-qrnkrkkt.js} +1 -1
  50. package/{chunk-8grzf8q1.js → chunk-rqd4swxx.js} +1 -1
  51. package/{chunk-dar6wbf2.js → chunk-rxkvjyst.js} +1 -1
  52. package/chunk-s84vxcdv.js +4 -0
  53. package/chunk-sjjnm4a1.js +2 -0
  54. package/chunk-skk6yvnw.js +3 -0
  55. package/{chunk-pxaxgkaq.js → chunk-sme6hv6f.js} +1 -1
  56. package/chunk-snak5zpr.js +5 -0
  57. package/{chunk-hsfpbjpc.js → chunk-srp5gyr1.js} +1 -1
  58. package/{chunk-eqjtq673.js → chunk-vdbr81a3.js} +1 -1
  59. package/{chunk-8vam2893.js → chunk-vs8j3x6t.js} +1 -1
  60. package/{chunk-69qb8p8s.js → chunk-xg71h7nb.js} +1 -1
  61. package/chunk-xzf52wvn.js +6 -0
  62. package/{chunk-tbd6wn3q.js → chunk-ykpctq15.js} +1 -1
  63. package/{chunk-74yxy75r.js → chunk-zv17t1n7.js} +1 -1
  64. package/cli.js +1 -1
  65. package/launcher.cjs +3 -1
  66. package/package.json +1 -1
  67. package/pkgs/helpers/src/box.tsx +12 -6
  68. package/pkgs/helpers/src/descriptors.ts +6 -0
  69. package/pkgs/helpers/src/icon.tsx +5 -3
  70. package/pkgs/helpers/src/index.ts +2 -2
  71. package/pkgs/helpers/src/text.tsx +29 -5
  72. package/pkgs/provider-antd/src/manifest.ts +1 -0
  73. package/pkgs/provider-chakra/src/manifest.ts +1 -0
  74. package/pkgs/provider-mui/src/manifest.ts +1 -0
  75. package/pkgs/provider-none/src/components-inline.tsx +20 -14
  76. package/pkgs/provider-none/src/components.tsx +2 -4
  77. package/pkgs/schema/src/config.ts +4 -1
  78. package/pkgs/schema/src/index.ts +3 -0
  79. package/pkgs/schema/src/node-identity.ts +6 -1
  80. package/pkgs/schema/src/node.ts +36 -19
  81. package/pkgs/schema/src/snippet-resolve.ts +18 -12
  82. package/pkgs/schema/src/svg-sanitize.ts +3 -0
  83. package/pkgs/schema/src/typeset.ts +21 -4
  84. package/pkgs/shadcn-snapshot/dist/manifest.json +6 -0
  85. package/canvas/assets/index-CnyI3aig.js +0 -29
  86. package/chunk-2web93qz.js +0 -2
  87. package/chunk-azeqkms7.js +0 -6
  88. package/chunk-e2btp1wd.js +0 -3
  89. package/chunk-ey65err5.js +0 -5
  90. package/chunk-rk238m15.js +0 -4
  91. package/chunk-wfhv9jg4.js +0 -2
  92. package/chunk-wnj432fw.js +0 -3
  93. package/chunk-yfvc8d2g.js +0 -716
  94. package/chunk-z73q4dq9.js +0 -2
  95. package/chunk-ztsckexy.js +0 -5
@@ -1,9 +1,9 @@
1
1
  // @bun
2
- import{sanitizeCssTokenValue,resolveColors,TYPESET_DEFAULT,DEFAULT_TYPESET_NAME,typesetScale}from"./chunk-8cj4swpr.js";import{helpersRegistry,parse_default,formatRgb}from"./chunk-yfvc8d2g.js";import{STYLE_PROP,catalogFromManifest,identifierRef,require_react_development,require_react_dom}from"./chunk-chtv0yj6.js";import{__toESM,__commonJS}from"./chunk-2smsg2ct.js";import{ANTD_VERSION}from"./chunk-0t68szgr.js";import{_objectWithoutPropertiesLoose,_extends,_assertThisInitialized,_setPrototypeOf}from"./chunk-h6gchare.js";import{resolveProviderSrcDir}from"./chunk-v6c3h9ft.js";var require_classnames=__commonJS(function(exports,module){/*!
2
+ import{sanitizeCssTokenValue,resolveColors,TYPESET_DEFAULT,DEFAULT_TYPESET_NAME,typesetScale}from"./chunk-5x4nw0zz.js";import{helpersRegistry,parse_default,formatRgb}from"./chunk-brnkprt5.js";import{STYLE_PROP,catalogFromManifest,identifierRef,require_react_development,require_react_dom}from"./chunk-ex36z3b3.js";import{__toESM,__commonJS}from"./chunk-2smsg2ct.js";import{ANTD_VERSION}from"./chunk-0t68szgr.js";import{_objectWithoutPropertiesLoose,_extends,_assertThisInitialized,_setPrototypeOf}from"./chunk-h6gchare.js";import{resolveProviderSrcDir}from"./chunk-v6c3h9ft.js";var require_classnames=__commonJS(function(exports,module){/*!
3
3
  Copyright (c) 2018 Jed Watson.
4
4
  Licensed under the MIT License (MIT), see
5
5
  http://jedwatson.github.io/classnames
6
- */(function(){var hasOwn={}.hasOwnProperty;function classNames(){var classes="";for(var i=0;i<arguments.length;i++){var arg=arguments[i];if(arg)classes=appendClass(classes,parseValue(arg))}return classes}function parseValue(arg){if(typeof arg==="string"||typeof arg==="number")return arg;if(typeof arg!=="object")return"";if(Array.isArray(arg))return classNames.apply(null,arg);if(arg.toString!==Object.prototype.toString&&!arg.toString.toString().includes("[native code]"))return arg.toString();var classes="";for(var key in arg)if(hasOwn.call(arg,key)&&arg[key])classes=appendClass(classes,key);return classes}function appendClass(value,newClass){if(!newClass)return value;if(value)return value+" "+newClass;return value+newClass}if(typeof module<"u"&&module.exports)classNames.default=classNames,module.exports=classNames;else if(typeof define==="function"&&typeof define.amd==="object"&&define.amd)define("classnames",[],function(){return classNames});else window.classNames=classNames})()});var require_react_is_development=__commonJS(function(exports){(function(){var REACT_ELEMENT_TYPE=Symbol.for("react.element"),REACT_PORTAL_TYPE=Symbol.for("react.portal"),REACT_FRAGMENT_TYPE=Symbol.for("react.fragment"),REACT_STRICT_MODE_TYPE=Symbol.for("react.strict_mode"),REACT_PROFILER_TYPE=Symbol.for("react.profiler"),REACT_PROVIDER_TYPE=Symbol.for("react.provider"),REACT_CONTEXT_TYPE=Symbol.for("react.context"),REACT_SERVER_CONTEXT_TYPE=Symbol.for("react.server_context"),REACT_FORWARD_REF_TYPE=Symbol.for("react.forward_ref"),REACT_SUSPENSE_TYPE=Symbol.for("react.suspense"),REACT_SUSPENSE_LIST_TYPE=Symbol.for("react.suspense_list"),REACT_MEMO_TYPE=Symbol.for("react.memo"),REACT_LAZY_TYPE=Symbol.for("react.lazy"),REACT_OFFSCREEN_TYPE=Symbol.for("react.offscreen"),enableScopeAPI=!1,enableCacheElement=!1,enableTransitionTracing=!1,enableLegacyHidden=!1,enableDebugTracing=!1,REACT_MODULE_REFERENCE;REACT_MODULE_REFERENCE=Symbol.for("react.module.reference");function isValidElementType(type){if(typeof type==="string"||typeof type==="function")return!0;if(type===REACT_FRAGMENT_TYPE||type===REACT_PROFILER_TYPE||enableDebugTracing||type===REACT_STRICT_MODE_TYPE||type===REACT_SUSPENSE_TYPE||type===REACT_SUSPENSE_LIST_TYPE||enableLegacyHidden||type===REACT_OFFSCREEN_TYPE||enableScopeAPI||enableCacheElement||enableTransitionTracing)return!0;if(typeof type==="object"&&type!==null){if(type.$$typeof===REACT_LAZY_TYPE||type.$$typeof===REACT_MEMO_TYPE||type.$$typeof===REACT_PROVIDER_TYPE||type.$$typeof===REACT_CONTEXT_TYPE||type.$$typeof===REACT_FORWARD_REF_TYPE||type.$$typeof===REACT_MODULE_REFERENCE||type.getModuleId!==void 0)return!0}return!1}function typeOf(object){if(typeof object==="object"&&object!==null){var $$typeof=object.$$typeof;switch($$typeof){case REACT_ELEMENT_TYPE:var type=object.type;switch(type){case REACT_FRAGMENT_TYPE:case REACT_PROFILER_TYPE:case REACT_STRICT_MODE_TYPE:case REACT_SUSPENSE_TYPE:case REACT_SUSPENSE_LIST_TYPE:return type;default:var $$typeofType=type&&type.$$typeof;switch($$typeofType){case REACT_SERVER_CONTEXT_TYPE:case REACT_CONTEXT_TYPE:case REACT_FORWARD_REF_TYPE:case REACT_LAZY_TYPE:case REACT_MEMO_TYPE:case REACT_PROVIDER_TYPE:return $$typeofType;default:return $$typeof}}case REACT_PORTAL_TYPE:return $$typeof}}return}var ContextConsumer=REACT_CONTEXT_TYPE,ContextProvider=REACT_PROVIDER_TYPE,Element2=REACT_ELEMENT_TYPE,ForwardRef=REACT_FORWARD_REF_TYPE,Fragment=REACT_FRAGMENT_TYPE,Lazy=REACT_LAZY_TYPE,Memo=REACT_MEMO_TYPE,Portal=REACT_PORTAL_TYPE,Profiler=REACT_PROFILER_TYPE,StrictMode=REACT_STRICT_MODE_TYPE,Suspense=REACT_SUSPENSE_TYPE,SuspenseList=REACT_SUSPENSE_LIST_TYPE,hasWarnedAboutDeprecatedIsAsyncMode=!1,hasWarnedAboutDeprecatedIsConcurrentMode=!1;function isAsyncMode(object){if(!hasWarnedAboutDeprecatedIsAsyncMode)hasWarnedAboutDeprecatedIsAsyncMode=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.");return!1}function isConcurrentMode(object){if(!hasWarnedAboutDeprecatedIsConcurrentMode)hasWarnedAboutDeprecatedIsConcurrentMode=!0,console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.");return!1}function isContextConsumer(object){return typeOf(object)===REACT_CONTEXT_TYPE}function isContextProvider(object){return typeOf(object)===REACT_PROVIDER_TYPE}function isElement(object){return typeof object==="object"&&object!==null&&object.$$typeof===REACT_ELEMENT_TYPE}function isForwardRef(object){return typeOf(object)===REACT_FORWARD_REF_TYPE}function isFragment(object){return typeOf(object)===REACT_FRAGMENT_TYPE}function isLazy(object){return typeOf(object)===REACT_LAZY_TYPE}function isMemo(object){return typeOf(object)===REACT_MEMO_TYPE}function isPortal(object){return typeOf(object)===REACT_PORTAL_TYPE}function isProfiler(object){return typeOf(object)===REACT_PROFILER_TYPE}function isStrictMode(object){return typeOf(object)===REACT_STRICT_MODE_TYPE}function isSuspense(object){return typeOf(object)===REACT_SUSPENSE_TYPE}function isSuspenseList(object){return typeOf(object)===REACT_SUSPENSE_LIST_TYPE}exports.ContextConsumer=ContextConsumer,exports.ContextProvider=ContextProvider,exports.Element=Element2,exports.ForwardRef=ForwardRef,exports.Fragment=Fragment,exports.Lazy=Lazy,exports.Memo=Memo,exports.Portal=Portal,exports.Profiler=Profiler,exports.StrictMode=StrictMode,exports.Suspense=Suspense,exports.SuspenseList=SuspenseList,exports.isAsyncMode=isAsyncMode,exports.isConcurrentMode=isConcurrentMode,exports.isContextConsumer=isContextConsumer,exports.isContextProvider=isContextProvider,exports.isElement=isElement,exports.isForwardRef=isForwardRef,exports.isFragment=isFragment,exports.isLazy=isLazy,exports.isMemo=isMemo,exports.isPortal=isPortal,exports.isProfiler=isProfiler,exports.isStrictMode=isStrictMode,exports.isSuspense=isSuspense,exports.isSuspenseList=isSuspenseList,exports.isValidElementType=isValidElementType,exports.typeOf=typeOf})()});var require_toggle_selection=__commonJS(function(exports,module){module.exports=function(){var selection=document.getSelection();if(!selection.rangeCount)return function(){};var active=document.activeElement,ranges=[];for(var i=0;i<selection.rangeCount;i++)ranges.push(selection.getRangeAt(i));switch(active.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":active.blur();break;default:active=null;break}return selection.removeAllRanges(),function(){if(selection.type==="Caret"&&selection.removeAllRanges(),!selection.rangeCount)ranges.forEach(function(range){selection.addRange(range)});active&&active.focus()}}});var require_copy_to_clipboard=__commonJS(function(exports,module){var deselectCurrent=require_toggle_selection(),clipboardToIE11Formatting={"text/plain":"Text","text/html":"Url",default:"Text"},defaultMessage="Copy to clipboard: #{key}, Enter";function format(message){var copyKey=(/mac os x/i.test(navigator.userAgent)?"\u2318":"Ctrl")+"+C";return message.replace(/#{\s*key\s*}/g,copyKey)}function copy(text,options){var debug,message,reselectPrevious,range,selection,mark,success=!1;if(!options)options={};debug=options.debug||!1;try{reselectPrevious=deselectCurrent(),range=document.createRange(),selection=document.getSelection(),mark=document.createElement("span"),mark.textContent=text,mark.ariaHidden="true",mark.style.all="unset",mark.style.position="fixed",mark.style.top=0,mark.style.clip="rect(0, 0, 0, 0)",mark.style.whiteSpace="pre",mark.style.webkitUserSelect="text",mark.style.MozUserSelect="text",mark.style.msUserSelect="text",mark.style.userSelect="text",mark.addEventListener("copy",function(e){if(e.stopPropagation(),options.format)if(e.preventDefault(),typeof e.clipboardData>"u"){debug&&console.warn("unable to use e.clipboardData"),debug&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var format=clipboardToIE11Formatting[options.format]||clipboardToIE11Formatting.default;window.clipboardData.setData(format,text)}else e.clipboardData.clearData(),e.clipboardData.setData(options.format,text);if(options.onCopy)e.preventDefault(),options.onCopy(e.clipboardData)}),document.body.appendChild(mark),range.selectNodeContents(mark),selection.addRange(range);var successful=document.execCommand("copy");if(!successful)throw Error("copy command was unsuccessful");success=!0}catch(err){debug&&console.error("unable to copy using execCommand: ",err),debug&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(options.format||"text",text),options.onCopy&&options.onCopy(window.clipboardData),success=!0}catch(err){debug&&console.error("unable to copy using clipboardData: ",err),debug&&console.error("falling back to prompt"),message=format("message"in options?options.message:defaultMessage),window.prompt(message,text)}}finally{if(selection)if(typeof selection.removeRange=="function")selection.removeRange(range);else selection.removeAllRanges();if(mark)document.body.removeChild(mark);reselectPrevious()}return success}module.exports=copy});import{dirname,join}from"path";import{fileURLToPath}from"url";var ANTD_INTRO=["**This folder targets Ant Design v5.** Components are real antd: `Flex`/`Space`/`Row`+`Col` for layout, `Card`, `TypographyTitle`/`TypographyText`/`TypographyParagraph` (ALL text \u2014 antd's `Typography.Title/Text/Paragraph`, which compose under flat ids because a `$ref` can't carry a dot, and emit as the dotted exports), `Button`, `Input`/`Select`/`Checkbox`/`Radio`/`Switch`/`Segmented`/`Slider`/`Rate`, `Tag`/`Badge`/`Avatar`/`Alert`/`Statistic`/`Progress`/`Skeleton`/`Empty`, `Table`/`List`+`ListItem`/`Tabs`/`Steps`/`Breadcrumb`/`Pagination`/`Menu` (data components take `items`/`columns` arrays \u2014 no render functions), and the overlay surface `Modal`/`Drawer`/`Popover`/`Tooltip`/`Dropdown` (rendered open + inline in design mode). Call `list_components` for the full set and per-component `example` props.","",'**Style through the inline `style` object.** `update_props { style: { display: "flex", alignItems: "center", gap: "16px", padding: "24px" } }` \u2014 a plain React style object (merges shallowly; an inner `null` drops a key, `style: null` clears). The theme runs in antd\'s `cssVar` mode, so antd tokens are CSS variables: inside any antd component subtree you can reference `var(--ant-color-primary)`, `var(--ant-color-text-secondary)`, `var(--ant-color-bg-container)`, `var(--ant-border-radius)` etc. to stay themable; plain CSS values always work. Prefer component props (`type`, `size`, `gap`) over style overrides where they exist. A plain `<div>`/`<span>` composes as `Box` and emits as the bare element.',"","`emit_code` emits idiomatic antd JSX with `style={{\u2026}}`, already written against the real exports \u2014 `<Typography.Title>`, `<List.Item.Meta>` \u2014 and `packagesToImport` names the package they come from. `emit_theme` emits a ConfigProvider `ThemeConfig` module (default `antd-theme.ts`) \u2014 wire it with `<ConfigProvider theme={theme}>`. Tailwind utility diagnostics do not apply here.",""];var style={name:"style",type:"CSSProperties | undefined",optional:!0,control:"string"},children={name:"children",type:"ReactNode",optional:!0,control:"string"},enumProp=(name,values,defaultValue)=>({name,type:values.map((v)=>typeof v==="string"?`"${v}"`:`${v}`).join(" | "),optional:!0,control:"enum",enumValues:values,defaultValue}),str=(name,optional=!0)=>({name,type:"string",optional,control:"string"}),num=(name)=>({name,type:"number",optional:!0,control:"number"}),bool=(name)=>({name,type:"boolean",optional:!0,control:"boolean"}),node=(name)=>({name,type:"ReactNode",optional:!0,control:"string"}),json=(name,type)=>({name,type,optional:!0,control:"string"}),color=(name)=>({name,type:"string",optional:!0,control:"color"}),css=(name)=>json(name,"CSSProperties"),styles=(parts)=>json("styles",`{ ${parts.split(" ").map((part)=>`${part}?: CSSProperties`).join("; ")} }`),SIZES=["small","middle","large"],STATUS=["error","warning"],VARIANTS=["outlined","borderless","filled","underlined"],PLACEMENTS=["top","left","right","bottom","topLeft","topRight","bottomLeft","bottomRight","leftTop","leftBottom","rightTop","rightBottom"],TEXT_DECORATIONS=[bool("code"),bool("mark"),bool("keyboard"),bool("italic"),bool("underline"),bool("delete"),bool("disabled"),json("ellipsis","boolean | { rows?: number; expandable?: boolean }"),json("copyable","boolean | { text?: string }")];function ui(id,props,notes,example){return{id,category:"ui",source:"antd",props:[...props,style],designModeNotes:notes,example}}function sub(nativeExport,props,notes,example){return{...ui(nativeExport.replaceAll(".",""),props,notes,example),nativeExport}}var className={name:"className",type:"string | undefined",optional:!0,control:"string"};function helper(id,props,notes,example){return{id,category:"ui",source:"velloo",props:[...props,className],designModeNotes:notes,example}}var ANTD_MANIFEST=[ui("Flex",[children,bool("vertical"),json("gap",'"small" | "middle" | "large" | number'),str("align"),str("justify"),json("wrap",'boolean | "wrap" | "nowrap" | "wrap-reverse"'),json("flex","string | number"),str("component")],"The flex layout primitive \u2014 use it for every row/column wrapper.",{vertical:!1,gap:"middle",align:"center"}),ui("Space",[children,enumProp("direction",["horizontal","vertical"],"horizontal"),json("size",'"small" | "middle" | "large" | number | [number, number]'),enumProp("align",["start","end","center","baseline"]),bool("wrap"),node("split"),styles("item")],"Inline spacing between adjacent items (buttons, tags).",{size:"middle"}),ui("Row",[children,json("gutter","number | [number, number] | Partial<Record<Breakpoint, number>>"),enumProp("align",["top","middle","bottom","stretch"]),enumProp("justify",["start","end","center","space-around","space-between","space-evenly"]),bool("wrap")],"Grid row; pair with Col spans (24-column grid).",{gutter:16}),ui("Col",[children,num("span"),num("offset"),num("order"),num("push"),num("pull"),json("flex","string | number"),...["xs","sm","md","lg","xl","xxl"].map((bp)=>json(bp,"number | { span?: number; offset?: number; order?: number }"))],"Grid column inside a Row; span is out of 24.",{span:12}),ui("Card",[children,node("title"),node("extra"),enumProp("size",["default","small"],"default"),enumProp("variant",["outlined","borderless"],"outlined"),bool("bordered"),bool("hoverable"),bool("loading"),node("cover"),json("actions","ReactNode[]"),enumProp("type",["inner"]),styles("header body extra title actions cover")],"Card surface with an optional title bar.",{title:"Team"}),ui("Alert",[node("message"),node("description"),enumProp("type",["success","info","warning","error"],"info"),bool("showIcon"),node("icon"),node("action"),bool("banner"),bool("closable")],"Inline alert banner. `message` is the headline; `description` the body.",{type:"info",message:"Workspace synced",showIcon:!0}),ui("Tag",[children,str("color"),bool("bordered"),node("icon"),bool("closable")],'Label chip. `color` takes a preset ("success", "processing", "error", "warning") or any CSS color.',{color:"success",children:"Active"}),ui("Badge",[children,json("count","number | ReactNode"),bool("dot"),num("overflowCount"),bool("showZero"),color("color"),enumProp("status",["success","processing","default","error","warning"]),node("text"),enumProp("size",["default","small"],"default"),json("offset","[number, number]")],"Count/dot indicator wrapping its child (an Avatar, an icon).",{count:5}),ui("Avatar",[children,str("src"),str("alt"),json("size",'"large" | "small" | "default" | number'),enumProp("shape",["circle","square"],"circle"),node("icon"),num("gap")],"Avatar \u2014 `src` image or text children.",{children:"AB"}),ui("Divider",[children,enumProp("type",["horizontal","vertical"],"horizontal"),enumProp("orientation",["left","right","center","start","end"],"center"),json("orientationMargin","string | number"),bool("dashed"),enumProp("variant",["solid","dashed","dotted"],"solid"),bool("plain")]),ui("Skeleton",[bool("active"),json("avatar","boolean | { shape?: 'circle' | 'square'; size?: number }"),json("paragraph","boolean | { rows?: number; width?: number | string | (number | string)[] }"),bool("round"),bool("loading"),children],"Loading placeholder blocks.",{active:!0}),ui("Empty",[node("description"),node("image"),children],"Empty-state illustration + caption.",{description:"No data yet"}),ui("Statistic",[node("title"),json("value","string | number"),node("prefix"),node("suffix"),css("valueStyle"),num("precision"),str("groupSeparator"),str("decimalSeparator"),bool("loading")],"A KPI number with a label.",{title:"Active users",value:112893}),ui("Progress",[num("percent"),enumProp("type",["line","circle","dashboard"],"line"),enumProp("status",["normal","active","success","exception"]),json("strokeColor","string | string[] | { from: string; to: string; direction?: string }"),color("trailColor"),bool("showInfo"),json("size",'"small" | "default" | number | [number | string, number]'),num("strokeWidth"),enumProp("strokeLinecap",["round","butt","square"],"round"),num("steps"),json("success","{ percent?: number; strokeColor?: string }"),num("gapDegree"),json("percentPosition",'{ align?: "start" | "center" | "end"; type?: "inner" | "outer" }')],void 0,{percent:62}),sub("Typography.Title",[children,enumProp("level",[1,2,3,4,5],"1"),enumProp("type",["secondary","success","warning","danger"]),...TEXT_DECORATIONS],"A heading \u2014 antd's Typography.Title. Pick `level` for the scale (1 largest).",{level:2,children:"Team analytics"}),sub("Typography.Text",[children,enumProp("type",["secondary","success","warning","danger"]),bool("strong"),...TEXT_DECORATIONS],"Inline text \u2014 antd's Typography.Text. `type` picks the semantic tone.",{type:"secondary",children:"Updated 2 hours ago"}),sub("Typography.Paragraph",[children,enumProp("type",["secondary","success","warning","danger"]),bool("strong"),...TEXT_DECORATIONS],"Block paragraph \u2014 antd's Typography.Paragraph.",{children:"Body copy for a section."}),ui("Button",[children,enumProp("type",["primary","default","dashed","text","link"],"default"),bool("danger"),enumProp("size",SIZES,"middle"),bool("block"),node("icon"),enumProp("iconPosition",["start","end"],"start"),enumProp("shape",["default","circle","round"],"default"),enumProp("color",["default","primary","danger"]),enumProp("variant",["outlined","dashed","solid","filled","text","link"]),bool("ghost"),bool("loading"),bool("disabled"),str("href"),enumProp("htmlType",["button","submit","reset"],"button"),styles("icon")],"Action button.",{type:"primary",children:"Submit"}),ui("Input",[str("placeholder"),str("value"),enumProp("size",SIZES,"middle"),str("type"),node("prefix"),node("suffix"),node("addonBefore"),node("addonAfter"),bool("allowClear"),bool("disabled"),bool("readOnly"),num("maxLength"),bool("showCount"),enumProp("status",STATUS),enumProp("variant",VARIANTS,"outlined")],void 0,{placeholder:"Email address"}),ui("Select",[str("placeholder"),json("value","string | number | (string | number)[]"),json("options","{ value: string; label: string }[]"),enumProp("size",SIZES,"middle"),enumProp("mode",["multiple","tags"]),bool("allowClear"),bool("disabled"),bool("loading"),bool("showSearch"),node("prefix"),node("suffixIcon"),json("maxTagCount",'number | "responsive"'),enumProp("status",STATUS),enumProp("variant",VARIANTS,"outlined")],"Closed select field in design mode (the dropdown is a portal).",{placeholder:"Pick a role",options:[{value:"admin",label:"Admin"},{value:"viewer",label:"Viewer"}]}),ui("Checkbox",[children,bool("checked"),bool("indeterminate"),bool("disabled")],void 0,{checked:!0,children:"Remember me"}),ui("Radio",[children,bool("checked"),bool("disabled"),json("value","string | number")],void 0,{checked:!0,children:"Monthly"}),ui("Switch",[bool("checked"),enumProp("size",["default","small"],"default"),bool("disabled"),bool("loading"),node("checkedChildren"),node("unCheckedChildren")],void 0,{checked:!0}),ui("Segmented",[json("options","(string | number | { label: ReactNode; value: string | number })[]"),json("value","string | number"),enumProp("size",SIZES,"middle"),bool("block"),bool("disabled"),bool("vertical"),enumProp("shape",["default","round"],"default")],"Segmented control.",{options:["Daily","Weekly","Monthly"],value:"Weekly"}),ui("Slider",[json("value","number | [number, number]"),num("min"),num("max"),num("step"),bool("range"),json("marks","Record<number, ReactNode>"),bool("dots"),bool("included"),bool("reverse"),bool("vertical"),bool("disabled"),styles("track tracks rail handle")],void 0,{value:30}),ui("Rate",[num("value"),num("count"),bool("allowHalf"),bool("disabled"),node("character")],"Star rating.",{value:4}),ui("Table",[json("columns","{ title: string; dataIndex: string; key: string }[]"),json("dataSource","Record<string, ReactNode>[] (each row needs a `key`)"),enumProp("size",["large","middle","small"],"large"),json("pagination","false | object"),bool("bordered"),bool("loading"),bool("showHeader"),str("rowKey"),json("scroll","{ x?: number | string; y?: number | string }"),bool("sticky"),enumProp("tableLayout",["auto","fixed"]),json("rowSelection",'{ type?: "checkbox" | "radio"; selectedRowKeys?: (string | number)[] }'),node("caption")],"Data table \u2014 drive it with `columns` + `dataSource` (no render functions in design JSON).",{columns:[{title:"Name",dataIndex:"name",key:"name"},{title:"Role",dataIndex:"role",key:"role"}],dataSource:[{key:"1",name:"Ada Lovelace",role:"Admin"},{key:"2",name:"Grace Hopper",role:"Member"}],pagination:!1}),ui("List",[children,enumProp("size",["default","small","large"],"default"),bool("bordered"),node("header"),node("footer"),bool("split"),enumProp("itemLayout",["horizontal","vertical"],"horizontal"),bool("loading"),json("grid","{ gutter?: number; column?: number }")],"Compose with ListItem children (skip `dataSource`/`renderItem` \u2014 functions don't fit design JSON).",{bordered:!0}),sub("List.Item",[children,node("extra"),json("actions","ReactNode[]")],"One row inside a List \u2014 antd's List.Item."),sub("List.Item.Meta",[node("title"),node("description"),node("avatar")],"Title/description/avatar layout inside a ListItem \u2014 antd's List.Item.Meta.",{title:"Deploy finished",description:"2 minutes ago"}),ui("Tabs",[json("items","{ key: string; label: string; children?: ReactNode }[]"),str("activeKey"),enumProp("type",["line","card","editable-card"],"line"),enumProp("size",SIZES,"middle"),bool("centered"),enumProp("tabPosition",["top","right","bottom","left"],"top"),node("tabBarExtraContent"),num("tabBarGutter"),css("tabBarStyle")],"Tab bar + active pane, driven by `items`.",{items:[{key:"1",label:"Overview",children:"Overview content"},{key:"2",label:"Settings",children:"Settings content"}]}),ui("Steps",[num("current"),json("items","{ title: string; description?: string }[]"),enumProp("direction",["horizontal","vertical"],"horizontal"),enumProp("size",["default","small"],"default"),enumProp("status",["wait","process","finish","error"],"process"),enumProp("type",["default","navigation","inline"],"default"),enumProp("labelPlacement",["horizontal","vertical"],"horizontal"),bool("progressDot"),num("percent"),num("initial")],void 0,{current:1,items:[{title:"Build"},{title:"Review"},{title:"Ship"}]}),ui("Breadcrumb",[json("items","{ title: ReactNode }[]"),node("separator")],void 0,{items:[{title:"Home"},{title:"Reports"}]}),ui("Pagination",[num("current"),num("total"),num("pageSize"),bool("simple"),enumProp("size",["default","small"],"default"),enumProp("align",["start","center","end"],"start"),bool("showSizeChanger"),bool("showQuickJumper"),bool("showLessItems"),bool("hideOnSinglePage"),bool("disabled")],void 0,{current:1,total:50}),ui("Menu",[json("items","{ key: string; label: ReactNode; icon?: ReactNode }[]"),enumProp("mode",["vertical","horizontal","inline"],"vertical"),json("selectedKeys","string[]"),json("openKeys","string[]"),enumProp("theme",["light","dark"],"light"),bool("inlineCollapsed"),num("inlineIndent"),bool("selectable"),bool("multiple")],"Navigation menu driven by `items` (antd v5 dropped JSX children menus).",{mode:"inline",items:[{key:"home",label:"Home"},{key:"reports",label:"Reports"}],selectedKeys:["home"]}),ui("Modal",[children,node("title"),json("width","number | string"),node("footer"),bool("open"),bool("centered"),bool("closable"),node("okText"),node("cancelText"),enumProp("okType",["primary","default","dashed","text","link"],"primary"),bool("confirmLoading"),bool("loading"),json("okButtonProps","ButtonProps"),json("cancelButtonProps","ButtonProps"),styles("header body footer content mask")],"Modal dialog surface \u2014 renders open + inline in design mode. Put the body in children; `footer` renders as a right-aligned action row.",{title:"Delete item?"}),ui("Drawer",[children,node("title"),node("extra"),node("footer"),bool("open"),enumProp("placement",["top","right","bottom","left"],"right"),enumProp("size",["default","large"],"default"),json("width","number | string"),json("height","number | string"),bool("closable"),bool("loading"),styles("header body footer content wrapper mask")],"A side panel \u2014 renders inline as a fixed-width column in design mode.",{title:"Filters"}),ui("Popover",[children,node("title"),node("content"),enumProp("placement",PLACEMENTS,"top"),bool("open"),json("arrow","boolean | { pointAtCenter?: boolean }"),color("color"),styles("root body")],"A popover \u2014 the trigger child renders inline with the surface pinned open below it.",{title:"Details",content:"Popover body"}),ui("Tooltip",[children,node("title"),enumProp("placement",PLACEMENTS,"top"),bool("open"),json("arrow","boolean | { pointAtCenter?: boolean }"),color("color"),styles("root body")],"The trigger child renders inline; `title` shows beside it as a dark pill in design mode.",{title:"Copy to clipboard"}),ui("Dropdown",[children,json("menu","{ items: { key: string; label: ReactNode }[] }"),enumProp("placement",["bottomLeft","bottom","bottomRight","topLeft","top","topRight"],"bottomLeft"),bool("open"),json("arrow","boolean | { pointAtCenter?: boolean }"),json("trigger",'("click" | "hover" | "contextMenu")[]'),bool("disabled")],"The trigger child renders inline with the menu surface pinned open below it.",{menu:{items:[{key:"edit",label:"Edit"},{key:"delete",label:"Delete"}]}}),{id:"Box",category:"ui",source:"velloo",plainElement:!0,props:[children,{name:"as",type:"string",optional:!0,control:"string"},style],designModeNotes:'A plain HTML element \u2014 a div unless `as` names another lowercase tag ("span", "section", "ul"). Compose writes `<div>`/`<span>` as Box for you. Emits as the bare element with its `style`. Reach for antd\'s `Flex`/`Space` for layout and `Typography*` for text first.'},helper("Icon",[{name:"name",type:"string",optional:!1,control:"icon"},{name:"size",type:"number",optional:!0,control:"number"}],"A lucide icon \u2014 antd's icon set isn't bundled. Set the pixel `size` prop (not Tailwind). `name` is a lucide id (PascalCase or kebab). Emits a `lucide-react` import.",{name:"ArrowRight",size:20}),helper("Image",[{name:"src",type:"string",optional:!1,control:"string"},{name:"alt",type:"string",optional:!1,control:"string"}],"An image. Use velloo assets (`/assets/\u2026`) or a URL."),helper("Placeholder",[{name:"label",type:"string",optional:!0,control:"string"}],"A labeled placeholder box for imagery you haven't authored yet (avatars, hero shots)."),helper("SVG",[{name:"content",type:"string",optional:!1,control:"string"},{name:"viewBox",type:"string",optional:!1,control:"string"}],"Raw inline SVG markup."),helper("Layer",[children],"An absolutely-positioned overlay layer for stacked composition."),helper("Gradient",[{name:"from",type:"string",optional:!0,control:"color"}],"A gradient fill block."),helper("Prose",[children,{name:"preset",type:"string",optional:!0,control:"string"},{name:"as",type:"string",optional:!0,control:"string"}],"A long-form content region. Everything inside \u2014 Typography, headings, lists, quotes, code, tables \u2014 picks up the theme typeset's proportions and vertical rhythm automatically. `preset` selects a named typeset (see set_typeset). Reach for this for articles, docs, and marketing copy instead of setting sizes block by block.",{as:"article"})];var React7=__toESM(require_react_development());function _typeof(o){return _typeof=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(o){return typeof o}:function(o){return o&&typeof Symbol=="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}var REACT_ELEMENT_TYPE_18=Symbol.for("react.element"),REACT_ELEMENT_TYPE_19=Symbol.for("react.transitional.element"),REACT_FRAGMENT_TYPE=Symbol.for("react.fragment");function isFragment(object){return object&&_typeof(object)==="object"&&(object.$$typeof===REACT_ELEMENT_TYPE_18||object.$$typeof===REACT_ELEMENT_TYPE_19)&&object.type===REACT_FRAGMENT_TYPE}var import_react=__toESM(require_react_development());function toArray(children){var option=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ret=[];return import_react.default.Children.forEach(children,function(child){if((child===void 0||child===null)&&!option.keepEmpty)return;if(Array.isArray(child))ret=ret.concat(toArray(child));else if(isFragment(child)&&child.props)ret=ret.concat(toArray(child.props.children,option));else ret.push(child)}),ret}var warned={},preWarningFns=[],preMessage=function(fn){preWarningFns.push(fn)};function warning(valid,message){if(!valid&&console!==void 0){var finalMessage=preWarningFns.reduce(function(msg,preMessageFn){return preMessageFn(msg!==null&&msg!==void 0?msg:"","warning")},message);if(finalMessage)console.error("Warning: ".concat(finalMessage))}}function note(valid,message){if(!valid&&console!==void 0){var finalMessage=preWarningFns.reduce(function(msg,preMessageFn){return preMessageFn(msg!==null&&msg!==void 0?msg:"","note")},message);if(finalMessage)console.warn("Note: ".concat(finalMessage))}}function resetWarned(){warned={}}function call(method,valid,message){if(!valid&&!warned[message])method(!1,message),warned[message]=!0}function warningOnce(valid,message){call(warning,valid,message)}function noteOnce(valid,message){call(note,valid,message)}warningOnce.preMessage=preMessage;warningOnce.resetWarned=resetWarned;warningOnce.noteOnce=noteOnce;var warning_default=warningOnce;function toPrimitive(t,r){if(_typeof(t)!="object"||!t)return t;var e=t[Symbol.toPrimitive];if(e!==void 0){var i=e.call(t,r||"default");if(_typeof(i)!="object")return i;throw TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(t)}function toPropertyKey(t){var i=toPrimitive(t,"string");return _typeof(i)=="symbol"?i:i+""}function _defineProperty(e,r,t){return(r=toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),t.push.apply(t,o)}return t}function _objectSpread2(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?ownKeys(Object(t),!0).forEach(function(r){_defineProperty(e,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))})}return e}var import_react2=__toESM(require_react_development()),import_react_dom=__toESM(require_react_dom());function isDOM(node){return node instanceof HTMLElement||node instanceof SVGElement}function getDOM(node){if(node&&_typeof(node)==="object"&&isDOM(node.nativeElement))return node.nativeElement;if(isDOM(node))return node;return null}function findDOMNode(node){var domNode=getDOM(node);if(domNode)return domNode;if(node instanceof import_react2.default.Component){var _ReactDOM$findDOMNode;return(_ReactDOM$findDOMNode=import_react_dom.default.findDOMNode)===null||_ReactDOM$findDOMNode===void 0?void 0:_ReactDOM$findDOMNode.call(import_react_dom.default,node)}return null}var import_react3=__toESM(require_react_development()),import_react_is=__toESM(require_react_is_development());var React3=__toESM(require_react_development());function useMemo(getValue,condition,shouldUpdate){var cacheRef=React3.useRef({});if(!("value"in cacheRef.current)||shouldUpdate(cacheRef.current.condition,condition))cacheRef.current.value=getValue(),cacheRef.current.condition=condition;return cacheRef.current.value}var ReactMajorVersion=Number(import_react3.version.split(".")[0]),fillRef=function(ref,node){if(typeof ref==="function")ref(node);else if(_typeof(ref)==="object"&&ref&&"current"in ref)ref.current=node},composeRef=function(){for(var _len=arguments.length,refs=Array(_len),_key=0;_key<_len;_key++)refs[_key]=arguments[_key];var refList=refs.filter(Boolean);if(refList.length<=1)return refList[0];return function(node){refs.forEach(function(ref){fillRef(ref,node)})}},useComposeRef=function(){for(var _len2=arguments.length,refs=Array(_len2),_key2=0;_key2<_len2;_key2++)refs[_key2]=arguments[_key2];return useMemo(function(){return composeRef.apply(void 0,refs)},refs,function(prev,next){return prev.length!==next.length||prev.every(function(ref,i){return ref!==next[i]})})},supportRef=function(nodeOrComponent){var _type$prototype,_nodeOrComponent$prot;if(!nodeOrComponent)return!1;if(isReactElement(nodeOrComponent)&&ReactMajorVersion>=19)return!0;var type=import_react_is.isMemo(nodeOrComponent)?nodeOrComponent.type.type:nodeOrComponent.type;if(typeof type==="function"&&!((_type$prototype=type.prototype)!==null&&_type$prototype!==void 0&&_type$prototype.render)&&type.$$typeof!==import_react_is.ForwardRef)return!1;if(typeof nodeOrComponent==="function"&&!((_nodeOrComponent$prot=nodeOrComponent.prototype)!==null&&_nodeOrComponent$prot!==void 0&&_nodeOrComponent$prot.render)&&nodeOrComponent.$$typeof!==import_react_is.ForwardRef)return!1;return!0};function isReactElement(node){return import_react3.isValidElement(node)&&!isFragment(node)}var supportNodeRef=function(node){return isReactElement(node)&&supportRef(node)},getNodeRef=function(node){if(node&&isReactElement(node)){var ele=node;return ele.props.propertyIsEnumerable("ref")?ele.props.ref:ele.ref}return null};var React6=__toESM(require_react_development());var React4=__toESM(require_react_development()),CollectionContext=React4.createContext(null);function Collection(_ref){var{children,onBatchResize}=_ref,resizeIdRef=React4.useRef(0),resizeInfosRef=React4.useRef([]),onCollectionResize=React4.useContext(CollectionContext),onResize=React4.useCallback(function(size,element,data){resizeIdRef.current+=1;var currentId=resizeIdRef.current;resizeInfosRef.current.push({size,element,data}),Promise.resolve().then(function(){if(currentId===resizeIdRef.current)onBatchResize===null||onBatchResize===void 0||onBatchResize(resizeInfosRef.current),resizeInfosRef.current=[]}),onCollectionResize===null||onCollectionResize===void 0||onCollectionResize(size,element,data)},[onBatchResize,onCollectionResize]);return React4.createElement(CollectionContext.Provider,{value:onResize},children)}var MapShim=function(){if(typeof Map<"u")return Map;function getIndex(arr,key){var result=-1;return arr.some(function(entry,index){if(entry[0]===key)return result=index,!0;return!1}),result}return function(){function class_1(){this.__entries__=[]}return Object.defineProperty(class_1.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),class_1.prototype.get=function(key){var index=getIndex(this.__entries__,key),entry=this.__entries__[index];return entry&&entry[1]},class_1.prototype.set=function(key,value){var index=getIndex(this.__entries__,key);if(~index)this.__entries__[index][1]=value;else this.__entries__.push([key,value])},class_1.prototype.delete=function(key){var entries=this.__entries__,index=getIndex(entries,key);if(~index)entries.splice(index,1)},class_1.prototype.has=function(key){return!!~getIndex(this.__entries__,key)},class_1.prototype.clear=function(){this.__entries__.splice(0)},class_1.prototype.forEach=function(callback,ctx){if(ctx===void 0)ctx=null;for(var _i=0,_a=this.__entries__;_i<_a.length;_i++){var entry=_a[_i];callback.call(ctx,entry[1],entry[0])}},class_1}()}(),isBrowser=typeof window<"u"&&typeof document<"u"&&window.document===document,global$1=function(){if(typeof global<"u"&&global.Math===Math)return global;if(typeof self<"u"&&self.Math===Math)return self;if(typeof window<"u"&&window.Math===Math)return window;return Function("return this")()}(),requestAnimationFrame$1=function(){if(typeof requestAnimationFrame==="function")return requestAnimationFrame.bind(global$1);return function(callback){return setTimeout(function(){return callback(Date.now())},16.666666666666668)}}(),trailingTimeout=2;function throttle(callback,delay){var leadingCall=!1,trailingCall=!1,lastCallTime=0;function resolvePending(){if(leadingCall)leadingCall=!1,callback();if(trailingCall)proxy()}function timeoutCallback(){requestAnimationFrame$1(resolvePending)}function proxy(){var timeStamp=Date.now();if(leadingCall){if(timeStamp-lastCallTime<trailingTimeout)return;trailingCall=!0}else leadingCall=!0,trailingCall=!1,setTimeout(timeoutCallback,delay);lastCallTime=timeStamp}return proxy}var REFRESH_DELAY=20,transitionKeys=["top","right","bottom","left","width","height","size","weight"],mutationObserverSupported=typeof MutationObserver<"u",ResizeObserverController=function(){function ResizeObserverController(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=throttle(this.refresh.bind(this),REFRESH_DELAY)}return ResizeObserverController.prototype.addObserver=function(observer){if(!~this.observers_.indexOf(observer))this.observers_.push(observer);if(!this.connected_)this.connect_()},ResizeObserverController.prototype.removeObserver=function(observer){var observers=this.observers_,index=observers.indexOf(observer);if(~index)observers.splice(index,1);if(!observers.length&&this.connected_)this.disconnect_()},ResizeObserverController.prototype.refresh=function(){var changesDetected=this.updateObservers_();if(changesDetected)this.refresh()},ResizeObserverController.prototype.updateObservers_=function(){var activeObservers=this.observers_.filter(function(observer){return observer.gatherActive(),observer.hasActive()});return activeObservers.forEach(function(observer){return observer.broadcastActive()}),activeObservers.length>0},ResizeObserverController.prototype.connect_=function(){if(!isBrowser||this.connected_)return;if(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),mutationObserverSupported)this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0});else document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0;this.connected_=!0},ResizeObserverController.prototype.disconnect_=function(){if(!isBrowser||!this.connected_)return;if(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_)this.mutationsObserver_.disconnect();if(this.mutationEventsAdded_)document.removeEventListener("DOMSubtreeModified",this.refresh);this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1},ResizeObserverController.prototype.onTransitionEnd_=function(_a){var _b=_a.propertyName,propertyName=_b===void 0?"":_b,isReflowProperty=transitionKeys.some(function(key){return!!~propertyName.indexOf(key)});if(isReflowProperty)this.refresh()},ResizeObserverController.getInstance=function(){if(!this.instance_)this.instance_=new ResizeObserverController;return this.instance_},ResizeObserverController.instance_=null,ResizeObserverController}(),defineConfigurable=function(target,props){for(var _i=0,_a=Object.keys(props);_i<_a.length;_i++){var key=_a[_i];Object.defineProperty(target,key,{value:props[key],enumerable:!1,writable:!1,configurable:!0})}return target},getWindowOf=function(target){var ownerGlobal=target&&target.ownerDocument&&target.ownerDocument.defaultView;return ownerGlobal||global$1},emptyRect=createRectInit(0,0,0,0);function toFloat(value){return parseFloat(value)||0}function getBordersSize(styles){var positions=[];for(var _i=1;_i<arguments.length;_i++)positions[_i-1]=arguments[_i];return positions.reduce(function(size,position){var value=styles["border-"+position+"-width"];return size+toFloat(value)},0)}function getPaddings(styles){var positions=["top","right","bottom","left"],paddings={};for(var _i=0,positions_1=positions;_i<positions_1.length;_i++){var position=positions_1[_i],value=styles["padding-"+position];paddings[position]=toFloat(value)}return paddings}function getSVGContentRect(target){var bbox=target.getBBox();return createRectInit(0,0,bbox.width,bbox.height)}function getHTMLElementContentRect(target){var{clientWidth,clientHeight}=target;if(!clientWidth&&!clientHeight)return emptyRect;var styles=getWindowOf(target).getComputedStyle(target),paddings=getPaddings(styles),horizPad=paddings.left+paddings.right,vertPad=paddings.top+paddings.bottom,width=toFloat(styles.width),height=toFloat(styles.height);if(styles.boxSizing==="border-box"){if(Math.round(width+horizPad)!==clientWidth)width-=getBordersSize(styles,"left","right")+horizPad;if(Math.round(height+vertPad)!==clientHeight)height-=getBordersSize(styles,"top","bottom")+vertPad}if(!isDocumentElement(target)){var vertScrollbar=Math.round(width+horizPad)-clientWidth,horizScrollbar=Math.round(height+vertPad)-clientHeight;if(Math.abs(vertScrollbar)!==1)width-=vertScrollbar;if(Math.abs(horizScrollbar)!==1)height-=horizScrollbar}return createRectInit(paddings.left,paddings.top,width,height)}var isSVGGraphicsElement=function(){if(typeof SVGGraphicsElement<"u")return function(target){return target instanceof getWindowOf(target).SVGGraphicsElement};return function(target){return target instanceof getWindowOf(target).SVGElement&&typeof target.getBBox==="function"}}();function isDocumentElement(target){return target===getWindowOf(target).document.documentElement}function getContentRect(target){if(!isBrowser)return emptyRect;if(isSVGGraphicsElement(target))return getSVGContentRect(target);return getHTMLElementContentRect(target)}function createReadOnlyRect(_a){var{x,y,width,height}=_a,Constr=typeof DOMRectReadOnly<"u"?DOMRectReadOnly:Object,rect=Object.create(Constr.prototype);return defineConfigurable(rect,{x,y,width,height,top:y,right:x+width,bottom:height+y,left:x}),rect}function createRectInit(x,y,width,height){return{x,y,width,height}}var ResizeObservation=function(){function ResizeObservation(target){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=createRectInit(0,0,0,0),this.target=target}return ResizeObservation.prototype.isActive=function(){var rect=getContentRect(this.target);return this.contentRect_=rect,rect.width!==this.broadcastWidth||rect.height!==this.broadcastHeight},ResizeObservation.prototype.broadcastRect=function(){var rect=this.contentRect_;return this.broadcastWidth=rect.width,this.broadcastHeight=rect.height,rect},ResizeObservation}(),ResizeObserverEntry=function(){function ResizeObserverEntry(target,rectInit){var contentRect=createReadOnlyRect(rectInit);defineConfigurable(this,{target,contentRect})}return ResizeObserverEntry}(),ResizeObserverSPI=function(){function ResizeObserverSPI(callback,controller,callbackCtx){if(this.activeObservations_=[],this.observations_=new MapShim,typeof callback!=="function")throw TypeError("The callback provided as parameter 1 is not a function.");this.callback_=callback,this.controller_=controller,this.callbackCtx_=callbackCtx}return ResizeObserverSPI.prototype.observe=function(target){if(!arguments.length)throw TypeError("1 argument required, but only 0 present.");if(typeof Element>"u"||!(Element instanceof Object))return;if(!(target instanceof getWindowOf(target).Element))throw TypeError('parameter 1 is not of type "Element".');var observations=this.observations_;if(observations.has(target))return;observations.set(target,new ResizeObservation(target)),this.controller_.addObserver(this),this.controller_.refresh()},ResizeObserverSPI.prototype.unobserve=function(target){if(!arguments.length)throw TypeError("1 argument required, but only 0 present.");if(typeof Element>"u"||!(Element instanceof Object))return;if(!(target instanceof getWindowOf(target).Element))throw TypeError('parameter 1 is not of type "Element".');var observations=this.observations_;if(!observations.has(target))return;if(observations.delete(target),!observations.size)this.controller_.removeObserver(this)},ResizeObserverSPI.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},ResizeObserverSPI.prototype.gatherActive=function(){var _this=this;this.clearActive(),this.observations_.forEach(function(observation){if(observation.isActive())_this.activeObservations_.push(observation)})},ResizeObserverSPI.prototype.broadcastActive=function(){if(!this.hasActive())return;var ctx=this.callbackCtx_,entries=this.activeObservations_.map(function(observation){return new ResizeObserverEntry(observation.target,observation.broadcastRect())});this.callback_.call(ctx,entries,ctx),this.clearActive()},ResizeObserverSPI.prototype.clearActive=function(){this.activeObservations_.splice(0)},ResizeObserverSPI.prototype.hasActive=function(){return this.activeObservations_.length>0},ResizeObserverSPI}(),observers=typeof WeakMap<"u"?new WeakMap:new MapShim,ResizeObserver2=function(){function ResizeObserver2(callback){if(!(this instanceof ResizeObserver2))throw TypeError("Cannot call a class as a function.");if(!arguments.length)throw TypeError("1 argument required, but only 0 present.");var controller=ResizeObserverController.getInstance(),observer=new ResizeObserverSPI(callback,controller,this);observers.set(this,observer)}return ResizeObserver2}();["observe","unobserve","disconnect"].forEach(function(method){ResizeObserver2.prototype[method]=function(){var _a;return(_a=observers.get(this))[method].apply(_a,arguments)}});var index=function(){if(typeof global$1.ResizeObserver<"u")return global$1.ResizeObserver;return ResizeObserver2}(),ResizeObserver_es_default=index;var elementListeners=new Map;function onResize(entities){entities.forEach(function(entity){var _elementListeners$get,target=entity.target;(_elementListeners$get=elementListeners.get(target))===null||_elementListeners$get===void 0||_elementListeners$get.forEach(function(listener){return listener(target)})})}var resizeObserver=new ResizeObserver_es_default(onResize);function observe(element,callback){if(!elementListeners.has(element))elementListeners.set(element,new Set),resizeObserver.observe(element);elementListeners.get(element).add(callback)}function unobserve(element,callback){if(elementListeners.has(element)){if(elementListeners.get(element).delete(callback),!elementListeners.get(element).size)resizeObserver.unobserve(element),elementListeners.delete(element)}}function _classCallCheck(a,n){if(!(a instanceof n))throw TypeError("Cannot call a class as a function")}function _defineProperties(e,r){for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,toPropertyKey(o.key),o)}}function _createClass(e,r,t){return r&&_defineProperties(e.prototype,r),t&&_defineProperties(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function _inherits(t,e){if(typeof e!="function"&&e!==null)throw TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&_setPrototypeOf(t,e)}function _getPrototypeOf(t){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},_getPrototypeOf(t)}function _isNativeReflectConstruct(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(_isNativeReflectConstruct=function(){return!!t})()}function _possibleConstructorReturn(t,e){if(e&&(_typeof(e)=="object"||typeof e=="function"))return e;if(e!==void 0)throw TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(t)}function _createSuper(t){var r=_isNativeReflectConstruct();return function(){var e,o=_getPrototypeOf(t);if(r){var s=_getPrototypeOf(this).constructor;e=Reflect.construct(o,arguments,s)}else e=o.apply(this,arguments);return _possibleConstructorReturn(this,e)}}var React5=__toESM(require_react_development()),DomWrapper=function(_React$Component){_inherits(DomWrapper,_React$Component);var _super=_createSuper(DomWrapper);function DomWrapper(){return _classCallCheck(this,DomWrapper),_super.apply(this,arguments)}return _createClass(DomWrapper,[{key:"render",value:function(){return this.props.children}}]),DomWrapper}(React5.Component);function SingleObserver(props,ref){var{children,disabled}=props,elementRef=React6.useRef(null),wrapperRef=React6.useRef(null),onCollectionResize=React6.useContext(CollectionContext),isRenderProps=typeof children==="function",mergedChildren=isRenderProps?children(elementRef):children,sizeRef=React6.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),canRef=!isRenderProps&&React6.isValidElement(mergedChildren)&&supportRef(mergedChildren),originRef=canRef?getNodeRef(mergedChildren):null,mergedRef=useComposeRef(originRef,elementRef),getDom=function(){var _elementRef$current;return findDOMNode(elementRef.current)||(elementRef.current&&_typeof(elementRef.current)==="object"?findDOMNode((_elementRef$current=elementRef.current)===null||_elementRef$current===void 0?void 0:_elementRef$current.nativeElement):null)||findDOMNode(wrapperRef.current)};React6.useImperativeHandle(ref,function(){return getDom()});var propsRef=React6.useRef(props);propsRef.current=props;var onInternalResize=React6.useCallback(function(target){var _propsRef$current=propsRef.current,{onResize,data}=_propsRef$current,_target$getBoundingCl=target.getBoundingClientRect(),{width,height}=_target$getBoundingCl,{offsetWidth,offsetHeight}=target,fixedWidth=Math.floor(width),fixedHeight=Math.floor(height);if(sizeRef.current.width!==fixedWidth||sizeRef.current.height!==fixedHeight||sizeRef.current.offsetWidth!==offsetWidth||sizeRef.current.offsetHeight!==offsetHeight){var size={width:fixedWidth,height:fixedHeight,offsetWidth,offsetHeight};sizeRef.current=size;var mergedOffsetWidth=offsetWidth===Math.round(width)?width:offsetWidth,mergedOffsetHeight=offsetHeight===Math.round(height)?height:offsetHeight,sizeInfo=_objectSpread2(_objectSpread2({},size),{},{offsetWidth:mergedOffsetWidth,offsetHeight:mergedOffsetHeight});if(onCollectionResize===null||onCollectionResize===void 0||onCollectionResize(sizeInfo,target,data),onResize)Promise.resolve().then(function(){onResize(sizeInfo,target)})}},[]);return React6.useEffect(function(){var currentElement=getDom();if(currentElement&&!disabled)observe(currentElement,onInternalResize);return function(){return unobserve(currentElement,onInternalResize)}},[elementRef.current,disabled]),React6.createElement(DomWrapper,{ref:wrapperRef},canRef?React6.cloneElement(mergedChildren,{ref:mergedRef}):mergedChildren)}var RefSingleObserver=React6.forwardRef(SingleObserver);RefSingleObserver.displayName="SingleObserver";var SingleObserver_default=RefSingleObserver;var INTERNAL_PREFIX_KEY="rc-observer-key";function ResizeObserver3(props,ref){var children=props.children,childNodes=typeof children==="function"?[children]:toArray(children);if(childNodes.length>1)warning(!1,"Find more than one child node with `children` in ResizeObserver. Please use ResizeObserver.Collection instead.");else if(childNodes.length===0)warning(!1,"`children` of ResizeObserver is empty. Nothing is in observe.");return childNodes.map(function(child,index){var key=(child===null||child===void 0?void 0:child.key)||"".concat(INTERNAL_PREFIX_KEY,"-").concat(index);return React7.createElement(SingleObserver_default,_extends({},props,{key,ref:index===0?ref:void 0}),child)})}var RefResizeObserver=React7.forwardRef(ResizeObserver3);RefResizeObserver.displayName="ResizeObserver";RefResizeObserver.Collection=Collection;var es_default=RefResizeObserver;function _arrayLikeToArray(r,a){(a==null||a>r.length)&&(a=r.length);for(var e=0,n=Array(a);e<a;e++)n[e]=r[e];return n}function _arrayWithoutHoles(r){if(Array.isArray(r))return _arrayLikeToArray(r)}function _iterableToArray(r){if(typeof Symbol<"u"&&r[Symbol.iterator]!=null||r["@@iterator"]!=null)return Array.from(r)}function _unsupportedIterableToArray(r,a){if(r){if(typeof r=="string")return _arrayLikeToArray(r,a);var t={}.toString.call(r).slice(8,-1);return t==="Object"&&r.constructor&&(t=r.constructor.name),t==="Map"||t==="Set"?Array.from(r):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?_arrayLikeToArray(r,a):void 0}}function _nonIterableSpread(){throw TypeError(`Invalid attempt to spread non-iterable instance.
6
+ */(function(){var hasOwn={}.hasOwnProperty;function classNames(){var classes="";for(var i=0;i<arguments.length;i++){var arg=arguments[i];if(arg)classes=appendClass(classes,parseValue(arg))}return classes}function parseValue(arg){if(typeof arg==="string"||typeof arg==="number")return arg;if(typeof arg!=="object")return"";if(Array.isArray(arg))return classNames.apply(null,arg);if(arg.toString!==Object.prototype.toString&&!arg.toString.toString().includes("[native code]"))return arg.toString();var classes="";for(var key in arg)if(hasOwn.call(arg,key)&&arg[key])classes=appendClass(classes,key);return classes}function appendClass(value,newClass){if(!newClass)return value;if(value)return value+" "+newClass;return value+newClass}if(typeof module<"u"&&module.exports)classNames.default=classNames,module.exports=classNames;else if(typeof define==="function"&&typeof define.amd==="object"&&define.amd)define("classnames",[],function(){return classNames});else window.classNames=classNames})()});var require_react_is_development=__commonJS(function(exports){(function(){var REACT_ELEMENT_TYPE=Symbol.for("react.element"),REACT_PORTAL_TYPE=Symbol.for("react.portal"),REACT_FRAGMENT_TYPE=Symbol.for("react.fragment"),REACT_STRICT_MODE_TYPE=Symbol.for("react.strict_mode"),REACT_PROFILER_TYPE=Symbol.for("react.profiler"),REACT_PROVIDER_TYPE=Symbol.for("react.provider"),REACT_CONTEXT_TYPE=Symbol.for("react.context"),REACT_SERVER_CONTEXT_TYPE=Symbol.for("react.server_context"),REACT_FORWARD_REF_TYPE=Symbol.for("react.forward_ref"),REACT_SUSPENSE_TYPE=Symbol.for("react.suspense"),REACT_SUSPENSE_LIST_TYPE=Symbol.for("react.suspense_list"),REACT_MEMO_TYPE=Symbol.for("react.memo"),REACT_LAZY_TYPE=Symbol.for("react.lazy"),REACT_OFFSCREEN_TYPE=Symbol.for("react.offscreen"),enableScopeAPI=!1,enableCacheElement=!1,enableTransitionTracing=!1,enableLegacyHidden=!1,enableDebugTracing=!1,REACT_MODULE_REFERENCE;REACT_MODULE_REFERENCE=Symbol.for("react.module.reference");function isValidElementType(type){if(typeof type==="string"||typeof type==="function")return!0;if(type===REACT_FRAGMENT_TYPE||type===REACT_PROFILER_TYPE||enableDebugTracing||type===REACT_STRICT_MODE_TYPE||type===REACT_SUSPENSE_TYPE||type===REACT_SUSPENSE_LIST_TYPE||enableLegacyHidden||type===REACT_OFFSCREEN_TYPE||enableScopeAPI||enableCacheElement||enableTransitionTracing)return!0;if(typeof type==="object"&&type!==null){if(type.$$typeof===REACT_LAZY_TYPE||type.$$typeof===REACT_MEMO_TYPE||type.$$typeof===REACT_PROVIDER_TYPE||type.$$typeof===REACT_CONTEXT_TYPE||type.$$typeof===REACT_FORWARD_REF_TYPE||type.$$typeof===REACT_MODULE_REFERENCE||type.getModuleId!==void 0)return!0}return!1}function typeOf(object){if(typeof object==="object"&&object!==null){var $$typeof=object.$$typeof;switch($$typeof){case REACT_ELEMENT_TYPE:var type=object.type;switch(type){case REACT_FRAGMENT_TYPE:case REACT_PROFILER_TYPE:case REACT_STRICT_MODE_TYPE:case REACT_SUSPENSE_TYPE:case REACT_SUSPENSE_LIST_TYPE:return type;default:var $$typeofType=type&&type.$$typeof;switch($$typeofType){case REACT_SERVER_CONTEXT_TYPE:case REACT_CONTEXT_TYPE:case REACT_FORWARD_REF_TYPE:case REACT_LAZY_TYPE:case REACT_MEMO_TYPE:case REACT_PROVIDER_TYPE:return $$typeofType;default:return $$typeof}}case REACT_PORTAL_TYPE:return $$typeof}}return}var ContextConsumer=REACT_CONTEXT_TYPE,ContextProvider=REACT_PROVIDER_TYPE,Element2=REACT_ELEMENT_TYPE,ForwardRef=REACT_FORWARD_REF_TYPE,Fragment=REACT_FRAGMENT_TYPE,Lazy=REACT_LAZY_TYPE,Memo=REACT_MEMO_TYPE,Portal=REACT_PORTAL_TYPE,Profiler=REACT_PROFILER_TYPE,StrictMode=REACT_STRICT_MODE_TYPE,Suspense=REACT_SUSPENSE_TYPE,SuspenseList=REACT_SUSPENSE_LIST_TYPE,hasWarnedAboutDeprecatedIsAsyncMode=!1,hasWarnedAboutDeprecatedIsConcurrentMode=!1;function isAsyncMode(object){if(!hasWarnedAboutDeprecatedIsAsyncMode)hasWarnedAboutDeprecatedIsAsyncMode=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.");return!1}function isConcurrentMode(object){if(!hasWarnedAboutDeprecatedIsConcurrentMode)hasWarnedAboutDeprecatedIsConcurrentMode=!0,console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.");return!1}function isContextConsumer(object){return typeOf(object)===REACT_CONTEXT_TYPE}function isContextProvider(object){return typeOf(object)===REACT_PROVIDER_TYPE}function isElement(object){return typeof object==="object"&&object!==null&&object.$$typeof===REACT_ELEMENT_TYPE}function isForwardRef(object){return typeOf(object)===REACT_FORWARD_REF_TYPE}function isFragment(object){return typeOf(object)===REACT_FRAGMENT_TYPE}function isLazy(object){return typeOf(object)===REACT_LAZY_TYPE}function isMemo(object){return typeOf(object)===REACT_MEMO_TYPE}function isPortal(object){return typeOf(object)===REACT_PORTAL_TYPE}function isProfiler(object){return typeOf(object)===REACT_PROFILER_TYPE}function isStrictMode(object){return typeOf(object)===REACT_STRICT_MODE_TYPE}function isSuspense(object){return typeOf(object)===REACT_SUSPENSE_TYPE}function isSuspenseList(object){return typeOf(object)===REACT_SUSPENSE_LIST_TYPE}exports.ContextConsumer=ContextConsumer,exports.ContextProvider=ContextProvider,exports.Element=Element2,exports.ForwardRef=ForwardRef,exports.Fragment=Fragment,exports.Lazy=Lazy,exports.Memo=Memo,exports.Portal=Portal,exports.Profiler=Profiler,exports.StrictMode=StrictMode,exports.Suspense=Suspense,exports.SuspenseList=SuspenseList,exports.isAsyncMode=isAsyncMode,exports.isConcurrentMode=isConcurrentMode,exports.isContextConsumer=isContextConsumer,exports.isContextProvider=isContextProvider,exports.isElement=isElement,exports.isForwardRef=isForwardRef,exports.isFragment=isFragment,exports.isLazy=isLazy,exports.isMemo=isMemo,exports.isPortal=isPortal,exports.isProfiler=isProfiler,exports.isStrictMode=isStrictMode,exports.isSuspense=isSuspense,exports.isSuspenseList=isSuspenseList,exports.isValidElementType=isValidElementType,exports.typeOf=typeOf})()});var require_toggle_selection=__commonJS(function(exports,module){module.exports=function(){var selection=document.getSelection();if(!selection.rangeCount)return function(){};var active=document.activeElement,ranges=[];for(var i=0;i<selection.rangeCount;i++)ranges.push(selection.getRangeAt(i));switch(active.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":active.blur();break;default:active=null;break}return selection.removeAllRanges(),function(){if(selection.type==="Caret"&&selection.removeAllRanges(),!selection.rangeCount)ranges.forEach(function(range){selection.addRange(range)});active&&active.focus()}}});var require_copy_to_clipboard=__commonJS(function(exports,module){var deselectCurrent=require_toggle_selection(),clipboardToIE11Formatting={"text/plain":"Text","text/html":"Url",default:"Text"},defaultMessage="Copy to clipboard: #{key}, Enter";function format(message){var copyKey=(/mac os x/i.test(navigator.userAgent)?"\u2318":"Ctrl")+"+C";return message.replace(/#{\s*key\s*}/g,copyKey)}function copy(text,options){var debug,message,reselectPrevious,range,selection,mark,success=!1;if(!options)options={};debug=options.debug||!1;try{reselectPrevious=deselectCurrent(),range=document.createRange(),selection=document.getSelection(),mark=document.createElement("span"),mark.textContent=text,mark.ariaHidden="true",mark.style.all="unset",mark.style.position="fixed",mark.style.top=0,mark.style.clip="rect(0, 0, 0, 0)",mark.style.whiteSpace="pre",mark.style.webkitUserSelect="text",mark.style.MozUserSelect="text",mark.style.msUserSelect="text",mark.style.userSelect="text",mark.addEventListener("copy",function(e){if(e.stopPropagation(),options.format)if(e.preventDefault(),typeof e.clipboardData>"u"){debug&&console.warn("unable to use e.clipboardData"),debug&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var format=clipboardToIE11Formatting[options.format]||clipboardToIE11Formatting.default;window.clipboardData.setData(format,text)}else e.clipboardData.clearData(),e.clipboardData.setData(options.format,text);if(options.onCopy)e.preventDefault(),options.onCopy(e.clipboardData)}),document.body.appendChild(mark),range.selectNodeContents(mark),selection.addRange(range);var successful=document.execCommand("copy");if(!successful)throw Error("copy command was unsuccessful");success=!0}catch(err){debug&&console.error("unable to copy using execCommand: ",err),debug&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(options.format||"text",text),options.onCopy&&options.onCopy(window.clipboardData),success=!0}catch(err){debug&&console.error("unable to copy using clipboardData: ",err),debug&&console.error("falling back to prompt"),message=format("message"in options?options.message:defaultMessage),window.prompt(message,text)}}finally{if(selection)if(typeof selection.removeRange=="function")selection.removeRange(range);else selection.removeAllRanges();if(mark)document.body.removeChild(mark);reselectPrevious()}return success}module.exports=copy});import{dirname,join}from"path";import{fileURLToPath}from"url";var ANTD_INTRO=["**This folder targets Ant Design v5.** Components are real antd: `Flex`/`Space`/`Row`+`Col` for layout, `Card`, `TypographyTitle`/`TypographyText`/`TypographyParagraph` (ALL text \u2014 antd's `Typography.Title/Text/Paragraph`, which compose under flat ids because a `$ref` can't carry a dot, and emit as the dotted exports), `Button`, `Input`/`Select`/`Checkbox`/`Radio`/`Switch`/`Segmented`/`Slider`/`Rate`, `Tag`/`Badge`/`Avatar`/`Alert`/`Statistic`/`Progress`/`Skeleton`/`Empty`, `Table`/`List`+`ListItem`/`Tabs`/`Steps`/`Breadcrumb`/`Pagination`/`Menu` (data components take `items`/`columns` arrays \u2014 no render functions), and the overlay surface `Modal`/`Drawer`/`Popover`/`Tooltip`/`Dropdown` (rendered open + inline in design mode). Call `list_components` for the full set and per-component `example` props.","",'**Style through the inline `style` object.** `update_props { style: { display: "flex", alignItems: "center", gap: "16px", padding: "24px" } }` \u2014 a plain React style object (merges shallowly; an inner `null` drops a key, `style: null` clears). The theme runs in antd\'s `cssVar` mode, so antd tokens are CSS variables: inside any antd component subtree you can reference `var(--ant-color-primary)`, `var(--ant-color-text-secondary)`, `var(--ant-color-bg-container)`, `var(--ant-border-radius)` etc. to stay themable; plain CSS values always work. Prefer component props (`type`, `size`, `gap`) over style overrides where they exist. A plain `<div>`/`<span>` composes as `Box` and emits as the bare element.',"","`emit_code` emits idiomatic antd JSX with `style={{\u2026}}`, already written against the real exports \u2014 `<Typography.Title>`, `<List.Item.Meta>` \u2014 and `packagesToImport` names the package they come from. `emit_theme` emits a ConfigProvider `ThemeConfig` module (default `antd-theme.ts`) \u2014 wire it with `<ConfigProvider theme={theme}>`. Tailwind utility diagnostics do not apply here.",""];var style={name:"style",type:"CSSProperties | undefined",optional:!0,control:"string"},children={name:"children",type:"ReactNode",optional:!0,control:"string"},enumProp=(name,values,defaultValue)=>({name,type:values.map((v)=>typeof v==="string"?`"${v}"`:`${v}`).join(" | "),optional:!0,control:"enum",enumValues:values,defaultValue}),str=(name,optional=!0)=>({name,type:"string",optional,control:"string"}),num=(name)=>({name,type:"number",optional:!0,control:"number"}),bool=(name)=>({name,type:"boolean",optional:!0,control:"boolean"}),node=(name)=>({name,type:"ReactNode",optional:!0,control:"string"}),json=(name,type)=>({name,type,optional:!0,control:"string"}),color=(name)=>({name,type:"string",optional:!0,control:"color"}),css=(name)=>json(name,"CSSProperties"),styles=(parts)=>json("styles",`{ ${parts.split(" ").map((part)=>`${part}?: CSSProperties`).join("; ")} }`),SIZES=["small","middle","large"],STATUS=["error","warning"],VARIANTS=["outlined","borderless","filled","underlined"],PLACEMENTS=["top","left","right","bottom","topLeft","topRight","bottomLeft","bottomRight","leftTop","leftBottom","rightTop","rightBottom"],TEXT_DECORATIONS=[bool("code"),bool("mark"),bool("keyboard"),bool("italic"),bool("underline"),bool("delete"),bool("disabled"),json("ellipsis","boolean | { rows?: number; expandable?: boolean }"),json("copyable","boolean | { text?: string }")];function ui(id,props,notes,example){return{id,category:"ui",source:"antd",props:[...props,style],designModeNotes:notes,example}}function sub(nativeExport,props,notes,example){return{...ui(nativeExport.replaceAll(".",""),props,notes,example),nativeExport}}var className={name:"className",type:"string | undefined",optional:!0,control:"string"};function helper(id,props,notes,example){return{id,category:"ui",source:"velloo",props:[...props,className],designModeNotes:notes,example}}var ANTD_MANIFEST=[ui("Flex",[children,bool("vertical"),json("gap",'"small" | "middle" | "large" | number'),str("align"),str("justify"),json("wrap",'boolean | "wrap" | "nowrap" | "wrap-reverse"'),json("flex","string | number"),str("component")],"The flex layout primitive \u2014 use it for every row/column wrapper.",{vertical:!1,gap:"middle",align:"center"}),ui("Space",[children,enumProp("direction",["horizontal","vertical"],"horizontal"),json("size",'"small" | "middle" | "large" | number | [number, number]'),enumProp("align",["start","end","center","baseline"]),bool("wrap"),node("split"),styles("item")],"Inline spacing between adjacent items (buttons, tags).",{size:"middle"}),ui("Row",[children,json("gutter","number | [number, number] | Partial<Record<Breakpoint, number>>"),enumProp("align",["top","middle","bottom","stretch"]),enumProp("justify",["start","end","center","space-around","space-between","space-evenly"]),bool("wrap")],"Grid row; pair with Col spans (24-column grid).",{gutter:16}),ui("Col",[children,num("span"),num("offset"),num("order"),num("push"),num("pull"),json("flex","string | number"),...["xs","sm","md","lg","xl","xxl"].map((bp)=>json(bp,"number | { span?: number; offset?: number; order?: number }"))],"Grid column inside a Row; span is out of 24.",{span:12}),ui("Card",[children,node("title"),node("extra"),enumProp("size",["default","small"],"default"),enumProp("variant",["outlined","borderless"],"outlined"),bool("bordered"),bool("hoverable"),bool("loading"),node("cover"),json("actions","ReactNode[]"),enumProp("type",["inner"]),styles("header body extra title actions cover")],"Card surface with an optional title bar.",{title:"Team"}),ui("Alert",[node("message"),node("description"),enumProp("type",["success","info","warning","error"],"info"),bool("showIcon"),node("icon"),node("action"),bool("banner"),bool("closable")],"Inline alert banner. `message` is the headline; `description` the body.",{type:"info",message:"Workspace synced",showIcon:!0}),ui("Tag",[children,str("color"),bool("bordered"),node("icon"),bool("closable")],'Label chip. `color` takes a preset ("success", "processing", "error", "warning") or any CSS color.',{color:"success",children:"Active"}),ui("Badge",[children,json("count","number | ReactNode"),bool("dot"),num("overflowCount"),bool("showZero"),color("color"),enumProp("status",["success","processing","default","error","warning"]),node("text"),enumProp("size",["default","small"],"default"),json("offset","[number, number]")],"Count/dot indicator wrapping its child (an Avatar, an icon).",{count:5}),ui("Avatar",[children,str("src"),str("alt"),json("size",'"large" | "small" | "default" | number'),enumProp("shape",["circle","square"],"circle"),node("icon"),num("gap")],"Avatar \u2014 `src` image or text children.",{children:"AB"}),ui("Divider",[children,enumProp("type",["horizontal","vertical"],"horizontal"),enumProp("orientation",["left","right","center","start","end"],"center"),json("orientationMargin","string | number"),bool("dashed"),enumProp("variant",["solid","dashed","dotted"],"solid"),bool("plain")]),ui("Skeleton",[bool("active"),json("avatar","boolean | { shape?: 'circle' | 'square'; size?: number }"),json("paragraph","boolean | { rows?: number; width?: number | string | (number | string)[] }"),bool("round"),bool("loading"),children],"Loading placeholder blocks.",{active:!0}),ui("Empty",[node("description"),node("image"),children],"Empty-state illustration + caption.",{description:"No data yet"}),ui("Statistic",[node("title"),json("value","string | number"),node("prefix"),node("suffix"),css("valueStyle"),num("precision"),str("groupSeparator"),str("decimalSeparator"),bool("loading")],"A KPI number with a label.",{title:"Active users",value:112893}),ui("Progress",[num("percent"),enumProp("type",["line","circle","dashboard"],"line"),enumProp("status",["normal","active","success","exception"]),json("strokeColor","string | string[] | { from: string; to: string; direction?: string }"),color("trailColor"),bool("showInfo"),json("size",'"small" | "default" | number | [number | string, number]'),num("strokeWidth"),enumProp("strokeLinecap",["round","butt","square"],"round"),num("steps"),json("success","{ percent?: number; strokeColor?: string }"),num("gapDegree"),json("percentPosition",'{ align?: "start" | "center" | "end"; type?: "inner" | "outer" }')],void 0,{percent:62}),sub("Typography.Title",[children,enumProp("level",[1,2,3,4,5],"1"),enumProp("type",["secondary","success","warning","danger"]),...TEXT_DECORATIONS],"A heading \u2014 antd's Typography.Title. Pick `level` for the scale (1 largest).",{level:2,children:"Team analytics"}),sub("Typography.Text",[children,enumProp("type",["secondary","success","warning","danger"]),bool("strong"),...TEXT_DECORATIONS],"Inline text \u2014 antd's Typography.Text. `type` picks the semantic tone.",{type:"secondary",children:"Updated 2 hours ago"}),sub("Typography.Paragraph",[children,enumProp("type",["secondary","success","warning","danger"]),bool("strong"),...TEXT_DECORATIONS],"Block paragraph \u2014 antd's Typography.Paragraph.",{children:"Body copy for a section."}),ui("Button",[children,enumProp("type",["primary","default","dashed","text","link"],"default"),bool("danger"),enumProp("size",SIZES,"middle"),bool("block"),node("icon"),enumProp("iconPosition",["start","end"],"start"),enumProp("shape",["default","circle","round"],"default"),enumProp("color",["default","primary","danger"]),enumProp("variant",["outlined","dashed","solid","filled","text","link"]),bool("ghost"),bool("loading"),bool("disabled"),str("href"),enumProp("htmlType",["button","submit","reset"],"button"),styles("icon")],"Action button.",{type:"primary",children:"Submit"}),ui("Input",[str("placeholder"),str("value"),enumProp("size",SIZES,"middle"),str("type"),node("prefix"),node("suffix"),node("addonBefore"),node("addonAfter"),bool("allowClear"),bool("disabled"),bool("readOnly"),num("maxLength"),bool("showCount"),enumProp("status",STATUS),enumProp("variant",VARIANTS,"outlined")],void 0,{placeholder:"Email address"}),ui("Select",[str("placeholder"),json("value","string | number | (string | number)[]"),json("options","{ value: string; label: string }[]"),enumProp("size",SIZES,"middle"),enumProp("mode",["multiple","tags"]),bool("allowClear"),bool("disabled"),bool("loading"),bool("showSearch"),node("prefix"),node("suffixIcon"),json("maxTagCount",'number | "responsive"'),enumProp("status",STATUS),enumProp("variant",VARIANTS,"outlined")],"Closed select field in design mode (the dropdown is a portal).",{placeholder:"Pick a role",options:[{value:"admin",label:"Admin"},{value:"viewer",label:"Viewer"}]}),ui("Checkbox",[children,bool("checked"),bool("indeterminate"),bool("disabled")],void 0,{checked:!0,children:"Remember me"}),ui("Radio",[children,bool("checked"),bool("disabled"),json("value","string | number")],void 0,{checked:!0,children:"Monthly"}),ui("Switch",[bool("checked"),enumProp("size",["default","small"],"default"),bool("disabled"),bool("loading"),node("checkedChildren"),node("unCheckedChildren")],void 0,{checked:!0}),ui("Segmented",[json("options","(string | number | { label: ReactNode; value: string | number })[]"),json("value","string | number"),enumProp("size",SIZES,"middle"),bool("block"),bool("disabled"),bool("vertical"),enumProp("shape",["default","round"],"default")],"Segmented control.",{options:["Daily","Weekly","Monthly"],value:"Weekly"}),ui("Slider",[json("value","number | [number, number]"),num("min"),num("max"),num("step"),bool("range"),json("marks","Record<number, ReactNode>"),bool("dots"),bool("included"),bool("reverse"),bool("vertical"),bool("disabled"),styles("track tracks rail handle")],void 0,{value:30}),ui("Rate",[num("value"),num("count"),bool("allowHalf"),bool("disabled"),node("character")],"Star rating.",{value:4}),ui("Table",[json("columns","{ title: string; dataIndex: string; key: string }[]"),json("dataSource","Record<string, ReactNode>[] (each row needs a `key`)"),enumProp("size",["large","middle","small"],"large"),json("pagination","false | object"),bool("bordered"),bool("loading"),bool("showHeader"),str("rowKey"),json("scroll","{ x?: number | string; y?: number | string }"),bool("sticky"),enumProp("tableLayout",["auto","fixed"]),json("rowSelection",'{ type?: "checkbox" | "radio"; selectedRowKeys?: (string | number)[] }'),node("caption")],"Data table \u2014 drive it with `columns` + `dataSource` (no render functions in design JSON).",{columns:[{title:"Name",dataIndex:"name",key:"name"},{title:"Role",dataIndex:"role",key:"role"}],dataSource:[{key:"1",name:"Ada Lovelace",role:"Admin"},{key:"2",name:"Grace Hopper",role:"Member"}],pagination:!1}),ui("List",[children,enumProp("size",["default","small","large"],"default"),bool("bordered"),node("header"),node("footer"),bool("split"),enumProp("itemLayout",["horizontal","vertical"],"horizontal"),bool("loading"),json("grid","{ gutter?: number; column?: number }")],"Compose with ListItem children (skip `dataSource`/`renderItem` \u2014 functions don't fit design JSON).",{bordered:!0}),sub("List.Item",[children,node("extra"),json("actions","ReactNode[]")],"One row inside a List \u2014 antd's List.Item."),sub("List.Item.Meta",[node("title"),node("description"),node("avatar")],"Title/description/avatar layout inside a ListItem \u2014 antd's List.Item.Meta.",{title:"Deploy finished",description:"2 minutes ago"}),ui("Tabs",[json("items","{ key: string; label: string; children?: ReactNode }[]"),str("activeKey"),enumProp("type",["line","card","editable-card"],"line"),enumProp("size",SIZES,"middle"),bool("centered"),enumProp("tabPosition",["top","right","bottom","left"],"top"),node("tabBarExtraContent"),num("tabBarGutter"),css("tabBarStyle")],"Tab bar + active pane, driven by `items`.",{items:[{key:"1",label:"Overview",children:"Overview content"},{key:"2",label:"Settings",children:"Settings content"}]}),ui("Steps",[num("current"),json("items","{ title: string; description?: string }[]"),enumProp("direction",["horizontal","vertical"],"horizontal"),enumProp("size",["default","small"],"default"),enumProp("status",["wait","process","finish","error"],"process"),enumProp("type",["default","navigation","inline"],"default"),enumProp("labelPlacement",["horizontal","vertical"],"horizontal"),bool("progressDot"),num("percent"),num("initial")],void 0,{current:1,items:[{title:"Build"},{title:"Review"},{title:"Ship"}]}),ui("Breadcrumb",[json("items","{ title: ReactNode }[]"),node("separator")],void 0,{items:[{title:"Home"},{title:"Reports"}]}),ui("Pagination",[num("current"),num("total"),num("pageSize"),bool("simple"),enumProp("size",["default","small"],"default"),enumProp("align",["start","center","end"],"start"),bool("showSizeChanger"),bool("showQuickJumper"),bool("showLessItems"),bool("hideOnSinglePage"),bool("disabled")],void 0,{current:1,total:50}),ui("Menu",[json("items","{ key: string; label: ReactNode; icon?: ReactNode }[]"),enumProp("mode",["vertical","horizontal","inline"],"vertical"),json("selectedKeys","string[]"),json("openKeys","string[]"),enumProp("theme",["light","dark"],"light"),bool("inlineCollapsed"),num("inlineIndent"),bool("selectable"),bool("multiple")],"Navigation menu driven by `items` (antd v5 dropped JSX children menus).",{mode:"inline",items:[{key:"home",label:"Home"},{key:"reports",label:"Reports"}],selectedKeys:["home"]}),ui("Modal",[children,node("title"),json("width","number | string"),node("footer"),bool("open"),bool("centered"),bool("closable"),node("okText"),node("cancelText"),enumProp("okType",["primary","default","dashed","text","link"],"primary"),bool("confirmLoading"),bool("loading"),json("okButtonProps","ButtonProps"),json("cancelButtonProps","ButtonProps"),styles("header body footer content mask")],"Modal dialog surface \u2014 renders open + inline in design mode. Put the body in children; `footer` renders as a right-aligned action row.",{title:"Delete item?"}),ui("Drawer",[children,node("title"),node("extra"),node("footer"),bool("open"),enumProp("placement",["top","right","bottom","left"],"right"),enumProp("size",["default","large"],"default"),json("width","number | string"),json("height","number | string"),bool("closable"),bool("loading"),styles("header body footer content wrapper mask")],"A side panel \u2014 renders inline as a fixed-width column in design mode.",{title:"Filters"}),ui("Popover",[children,node("title"),node("content"),enumProp("placement",PLACEMENTS,"top"),bool("open"),json("arrow","boolean | { pointAtCenter?: boolean }"),color("color"),styles("root body")],"A popover \u2014 the trigger child renders inline with the surface pinned open below it.",{title:"Details",content:"Popover body"}),ui("Tooltip",[children,node("title"),enumProp("placement",PLACEMENTS,"top"),bool("open"),json("arrow","boolean | { pointAtCenter?: boolean }"),color("color"),styles("root body")],"The trigger child renders inline; `title` shows beside it as a dark pill in design mode.",{title:"Copy to clipboard"}),ui("Dropdown",[children,json("menu","{ items: { key: string; label: ReactNode }[] }"),enumProp("placement",["bottomLeft","bottom","bottomRight","topLeft","top","topRight"],"bottomLeft"),bool("open"),json("arrow","boolean | { pointAtCenter?: boolean }"),json("trigger",'("click" | "hover" | "contextMenu")[]'),bool("disabled")],"The trigger child renders inline with the menu surface pinned open below it.",{menu:{items:[{key:"edit",label:"Edit"},{key:"delete",label:"Delete"}]}}),{id:"Box",category:"ui",source:"velloo",plainElement:!0,props:[children,{name:"as",type:"string",optional:!0,control:"string"},style],designModeNotes:'A plain HTML element \u2014 a div unless `as` names another lowercase tag ("span", "section", "ul"). Compose writes `<div>`/`<span>` as Box for you. Emits as the bare element with its `style`. Reach for antd\'s `Flex`/`Space` for layout and `Typography*` for text first.'},helper("Icon",[{name:"name",type:"string",optional:!1,control:"icon"},{name:"size",type:"number",optional:!0,control:"number"}],"A lucide icon \u2014 antd's icon set isn't bundled. Set the pixel `size` prop (not Tailwind). `name` is a lucide id (PascalCase or kebab). Emits a `lucide-react` import.",{name:"ArrowRight",size:20}),helper("Image",[{name:"src",type:"string",optional:!1,control:"string"},{name:"alt",type:"string",optional:!1,control:"string"}],"An image. Use velloo assets (`/assets/\u2026`) or a URL."),helper("Placeholder",[{name:"label",type:"string",optional:!0,control:"string"}],"A labeled placeholder box for imagery you haven't authored yet (avatars, hero shots)."),helper("SVG",[{name:"content",type:"string",optional:!1,control:"string"},{name:"viewBox",type:"string",optional:!1,control:"string"},{name:"preserveAspectRatio",type:"string",optional:!0,control:"string"}],"Raw inline SVG markup."),helper("Layer",[children],"An absolutely-positioned overlay layer for stacked composition."),helper("Gradient",[{name:"from",type:"string",optional:!0,control:"color"}],"A gradient fill block."),helper("Prose",[children,{name:"preset",type:"string",optional:!0,control:"string"},{name:"as",type:"string",optional:!0,control:"string"}],"A long-form content region. Everything inside \u2014 Typography, headings, lists, quotes, code, tables \u2014 picks up the theme typeset's proportions and vertical rhythm automatically. `preset` selects a named typeset (see set_typeset). Reach for this for articles, docs, and marketing copy instead of setting sizes block by block.",{as:"article"})];var React7=__toESM(require_react_development());function _typeof(o){return _typeof=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(o){return typeof o}:function(o){return o&&typeof Symbol=="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}var REACT_ELEMENT_TYPE_18=Symbol.for("react.element"),REACT_ELEMENT_TYPE_19=Symbol.for("react.transitional.element"),REACT_FRAGMENT_TYPE=Symbol.for("react.fragment");function isFragment(object){return object&&_typeof(object)==="object"&&(object.$$typeof===REACT_ELEMENT_TYPE_18||object.$$typeof===REACT_ELEMENT_TYPE_19)&&object.type===REACT_FRAGMENT_TYPE}var import_react=__toESM(require_react_development());function toArray(children){var option=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ret=[];return import_react.default.Children.forEach(children,function(child){if((child===void 0||child===null)&&!option.keepEmpty)return;if(Array.isArray(child))ret=ret.concat(toArray(child));else if(isFragment(child)&&child.props)ret=ret.concat(toArray(child.props.children,option));else ret.push(child)}),ret}var warned={},preWarningFns=[],preMessage=function(fn){preWarningFns.push(fn)};function warning(valid,message){if(!valid&&console!==void 0){var finalMessage=preWarningFns.reduce(function(msg,preMessageFn){return preMessageFn(msg!==null&&msg!==void 0?msg:"","warning")},message);if(finalMessage)console.error("Warning: ".concat(finalMessage))}}function note(valid,message){if(!valid&&console!==void 0){var finalMessage=preWarningFns.reduce(function(msg,preMessageFn){return preMessageFn(msg!==null&&msg!==void 0?msg:"","note")},message);if(finalMessage)console.warn("Note: ".concat(finalMessage))}}function resetWarned(){warned={}}function call(method,valid,message){if(!valid&&!warned[message])method(!1,message),warned[message]=!0}function warningOnce(valid,message){call(warning,valid,message)}function noteOnce(valid,message){call(note,valid,message)}warningOnce.preMessage=preMessage;warningOnce.resetWarned=resetWarned;warningOnce.noteOnce=noteOnce;var warning_default=warningOnce;function toPrimitive(t,r){if(_typeof(t)!="object"||!t)return t;var e=t[Symbol.toPrimitive];if(e!==void 0){var i=e.call(t,r||"default");if(_typeof(i)!="object")return i;throw TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(t)}function toPropertyKey(t){var i=toPrimitive(t,"string");return _typeof(i)=="symbol"?i:i+""}function _defineProperty(e,r,t){return(r=toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),t.push.apply(t,o)}return t}function _objectSpread2(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?ownKeys(Object(t),!0).forEach(function(r){_defineProperty(e,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))})}return e}var import_react2=__toESM(require_react_development()),import_react_dom=__toESM(require_react_dom());function isDOM(node){return node instanceof HTMLElement||node instanceof SVGElement}function getDOM(node){if(node&&_typeof(node)==="object"&&isDOM(node.nativeElement))return node.nativeElement;if(isDOM(node))return node;return null}function findDOMNode(node){var domNode=getDOM(node);if(domNode)return domNode;if(node instanceof import_react2.default.Component){var _ReactDOM$findDOMNode;return(_ReactDOM$findDOMNode=import_react_dom.default.findDOMNode)===null||_ReactDOM$findDOMNode===void 0?void 0:_ReactDOM$findDOMNode.call(import_react_dom.default,node)}return null}var import_react3=__toESM(require_react_development()),import_react_is=__toESM(require_react_is_development());var React3=__toESM(require_react_development());function useMemo(getValue,condition,shouldUpdate){var cacheRef=React3.useRef({});if(!("value"in cacheRef.current)||shouldUpdate(cacheRef.current.condition,condition))cacheRef.current.value=getValue(),cacheRef.current.condition=condition;return cacheRef.current.value}var ReactMajorVersion=Number(import_react3.version.split(".")[0]),fillRef=function(ref,node){if(typeof ref==="function")ref(node);else if(_typeof(ref)==="object"&&ref&&"current"in ref)ref.current=node},composeRef=function(){for(var _len=arguments.length,refs=Array(_len),_key=0;_key<_len;_key++)refs[_key]=arguments[_key];var refList=refs.filter(Boolean);if(refList.length<=1)return refList[0];return function(node){refs.forEach(function(ref){fillRef(ref,node)})}},useComposeRef=function(){for(var _len2=arguments.length,refs=Array(_len2),_key2=0;_key2<_len2;_key2++)refs[_key2]=arguments[_key2];return useMemo(function(){return composeRef.apply(void 0,refs)},refs,function(prev,next){return prev.length!==next.length||prev.every(function(ref,i){return ref!==next[i]})})},supportRef=function(nodeOrComponent){var _type$prototype,_nodeOrComponent$prot;if(!nodeOrComponent)return!1;if(isReactElement(nodeOrComponent)&&ReactMajorVersion>=19)return!0;var type=import_react_is.isMemo(nodeOrComponent)?nodeOrComponent.type.type:nodeOrComponent.type;if(typeof type==="function"&&!((_type$prototype=type.prototype)!==null&&_type$prototype!==void 0&&_type$prototype.render)&&type.$$typeof!==import_react_is.ForwardRef)return!1;if(typeof nodeOrComponent==="function"&&!((_nodeOrComponent$prot=nodeOrComponent.prototype)!==null&&_nodeOrComponent$prot!==void 0&&_nodeOrComponent$prot.render)&&nodeOrComponent.$$typeof!==import_react_is.ForwardRef)return!1;return!0};function isReactElement(node){return import_react3.isValidElement(node)&&!isFragment(node)}var supportNodeRef=function(node){return isReactElement(node)&&supportRef(node)},getNodeRef=function(node){if(node&&isReactElement(node)){var ele=node;return ele.props.propertyIsEnumerable("ref")?ele.props.ref:ele.ref}return null};var React6=__toESM(require_react_development());var React4=__toESM(require_react_development()),CollectionContext=React4.createContext(null);function Collection(_ref){var{children,onBatchResize}=_ref,resizeIdRef=React4.useRef(0),resizeInfosRef=React4.useRef([]),onCollectionResize=React4.useContext(CollectionContext),onResize=React4.useCallback(function(size,element,data){resizeIdRef.current+=1;var currentId=resizeIdRef.current;resizeInfosRef.current.push({size,element,data}),Promise.resolve().then(function(){if(currentId===resizeIdRef.current)onBatchResize===null||onBatchResize===void 0||onBatchResize(resizeInfosRef.current),resizeInfosRef.current=[]}),onCollectionResize===null||onCollectionResize===void 0||onCollectionResize(size,element,data)},[onBatchResize,onCollectionResize]);return React4.createElement(CollectionContext.Provider,{value:onResize},children)}var MapShim=function(){if(typeof Map<"u")return Map;function getIndex(arr,key){var result=-1;return arr.some(function(entry,index){if(entry[0]===key)return result=index,!0;return!1}),result}return function(){function class_1(){this.__entries__=[]}return Object.defineProperty(class_1.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),class_1.prototype.get=function(key){var index=getIndex(this.__entries__,key),entry=this.__entries__[index];return entry&&entry[1]},class_1.prototype.set=function(key,value){var index=getIndex(this.__entries__,key);if(~index)this.__entries__[index][1]=value;else this.__entries__.push([key,value])},class_1.prototype.delete=function(key){var entries=this.__entries__,index=getIndex(entries,key);if(~index)entries.splice(index,1)},class_1.prototype.has=function(key){return!!~getIndex(this.__entries__,key)},class_1.prototype.clear=function(){this.__entries__.splice(0)},class_1.prototype.forEach=function(callback,ctx){if(ctx===void 0)ctx=null;for(var _i=0,_a=this.__entries__;_i<_a.length;_i++){var entry=_a[_i];callback.call(ctx,entry[1],entry[0])}},class_1}()}(),isBrowser=typeof window<"u"&&typeof document<"u"&&window.document===document,global$1=function(){if(typeof global<"u"&&global.Math===Math)return global;if(typeof self<"u"&&self.Math===Math)return self;if(typeof window<"u"&&window.Math===Math)return window;return Function("return this")()}(),requestAnimationFrame$1=function(){if(typeof requestAnimationFrame==="function")return requestAnimationFrame.bind(global$1);return function(callback){return setTimeout(function(){return callback(Date.now())},16.666666666666668)}}(),trailingTimeout=2;function throttle(callback,delay){var leadingCall=!1,trailingCall=!1,lastCallTime=0;function resolvePending(){if(leadingCall)leadingCall=!1,callback();if(trailingCall)proxy()}function timeoutCallback(){requestAnimationFrame$1(resolvePending)}function proxy(){var timeStamp=Date.now();if(leadingCall){if(timeStamp-lastCallTime<trailingTimeout)return;trailingCall=!0}else leadingCall=!0,trailingCall=!1,setTimeout(timeoutCallback,delay);lastCallTime=timeStamp}return proxy}var REFRESH_DELAY=20,transitionKeys=["top","right","bottom","left","width","height","size","weight"],mutationObserverSupported=typeof MutationObserver<"u",ResizeObserverController=function(){function ResizeObserverController(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=throttle(this.refresh.bind(this),REFRESH_DELAY)}return ResizeObserverController.prototype.addObserver=function(observer){if(!~this.observers_.indexOf(observer))this.observers_.push(observer);if(!this.connected_)this.connect_()},ResizeObserverController.prototype.removeObserver=function(observer){var observers=this.observers_,index=observers.indexOf(observer);if(~index)observers.splice(index,1);if(!observers.length&&this.connected_)this.disconnect_()},ResizeObserverController.prototype.refresh=function(){var changesDetected=this.updateObservers_();if(changesDetected)this.refresh()},ResizeObserverController.prototype.updateObservers_=function(){var activeObservers=this.observers_.filter(function(observer){return observer.gatherActive(),observer.hasActive()});return activeObservers.forEach(function(observer){return observer.broadcastActive()}),activeObservers.length>0},ResizeObserverController.prototype.connect_=function(){if(!isBrowser||this.connected_)return;if(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),mutationObserverSupported)this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0});else document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0;this.connected_=!0},ResizeObserverController.prototype.disconnect_=function(){if(!isBrowser||!this.connected_)return;if(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_)this.mutationsObserver_.disconnect();if(this.mutationEventsAdded_)document.removeEventListener("DOMSubtreeModified",this.refresh);this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1},ResizeObserverController.prototype.onTransitionEnd_=function(_a){var _b=_a.propertyName,propertyName=_b===void 0?"":_b,isReflowProperty=transitionKeys.some(function(key){return!!~propertyName.indexOf(key)});if(isReflowProperty)this.refresh()},ResizeObserverController.getInstance=function(){if(!this.instance_)this.instance_=new ResizeObserverController;return this.instance_},ResizeObserverController.instance_=null,ResizeObserverController}(),defineConfigurable=function(target,props){for(var _i=0,_a=Object.keys(props);_i<_a.length;_i++){var key=_a[_i];Object.defineProperty(target,key,{value:props[key],enumerable:!1,writable:!1,configurable:!0})}return target},getWindowOf=function(target){var ownerGlobal=target&&target.ownerDocument&&target.ownerDocument.defaultView;return ownerGlobal||global$1},emptyRect=createRectInit(0,0,0,0);function toFloat(value){return parseFloat(value)||0}function getBordersSize(styles){var positions=[];for(var _i=1;_i<arguments.length;_i++)positions[_i-1]=arguments[_i];return positions.reduce(function(size,position){var value=styles["border-"+position+"-width"];return size+toFloat(value)},0)}function getPaddings(styles){var positions=["top","right","bottom","left"],paddings={};for(var _i=0,positions_1=positions;_i<positions_1.length;_i++){var position=positions_1[_i],value=styles["padding-"+position];paddings[position]=toFloat(value)}return paddings}function getSVGContentRect(target){var bbox=target.getBBox();return createRectInit(0,0,bbox.width,bbox.height)}function getHTMLElementContentRect(target){var{clientWidth,clientHeight}=target;if(!clientWidth&&!clientHeight)return emptyRect;var styles=getWindowOf(target).getComputedStyle(target),paddings=getPaddings(styles),horizPad=paddings.left+paddings.right,vertPad=paddings.top+paddings.bottom,width=toFloat(styles.width),height=toFloat(styles.height);if(styles.boxSizing==="border-box"){if(Math.round(width+horizPad)!==clientWidth)width-=getBordersSize(styles,"left","right")+horizPad;if(Math.round(height+vertPad)!==clientHeight)height-=getBordersSize(styles,"top","bottom")+vertPad}if(!isDocumentElement(target)){var vertScrollbar=Math.round(width+horizPad)-clientWidth,horizScrollbar=Math.round(height+vertPad)-clientHeight;if(Math.abs(vertScrollbar)!==1)width-=vertScrollbar;if(Math.abs(horizScrollbar)!==1)height-=horizScrollbar}return createRectInit(paddings.left,paddings.top,width,height)}var isSVGGraphicsElement=function(){if(typeof SVGGraphicsElement<"u")return function(target){return target instanceof getWindowOf(target).SVGGraphicsElement};return function(target){return target instanceof getWindowOf(target).SVGElement&&typeof target.getBBox==="function"}}();function isDocumentElement(target){return target===getWindowOf(target).document.documentElement}function getContentRect(target){if(!isBrowser)return emptyRect;if(isSVGGraphicsElement(target))return getSVGContentRect(target);return getHTMLElementContentRect(target)}function createReadOnlyRect(_a){var{x,y,width,height}=_a,Constr=typeof DOMRectReadOnly<"u"?DOMRectReadOnly:Object,rect=Object.create(Constr.prototype);return defineConfigurable(rect,{x,y,width,height,top:y,right:x+width,bottom:height+y,left:x}),rect}function createRectInit(x,y,width,height){return{x,y,width,height}}var ResizeObservation=function(){function ResizeObservation(target){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=createRectInit(0,0,0,0),this.target=target}return ResizeObservation.prototype.isActive=function(){var rect=getContentRect(this.target);return this.contentRect_=rect,rect.width!==this.broadcastWidth||rect.height!==this.broadcastHeight},ResizeObservation.prototype.broadcastRect=function(){var rect=this.contentRect_;return this.broadcastWidth=rect.width,this.broadcastHeight=rect.height,rect},ResizeObservation}(),ResizeObserverEntry=function(){function ResizeObserverEntry(target,rectInit){var contentRect=createReadOnlyRect(rectInit);defineConfigurable(this,{target,contentRect})}return ResizeObserverEntry}(),ResizeObserverSPI=function(){function ResizeObserverSPI(callback,controller,callbackCtx){if(this.activeObservations_=[],this.observations_=new MapShim,typeof callback!=="function")throw TypeError("The callback provided as parameter 1 is not a function.");this.callback_=callback,this.controller_=controller,this.callbackCtx_=callbackCtx}return ResizeObserverSPI.prototype.observe=function(target){if(!arguments.length)throw TypeError("1 argument required, but only 0 present.");if(typeof Element>"u"||!(Element instanceof Object))return;if(!(target instanceof getWindowOf(target).Element))throw TypeError('parameter 1 is not of type "Element".');var observations=this.observations_;if(observations.has(target))return;observations.set(target,new ResizeObservation(target)),this.controller_.addObserver(this),this.controller_.refresh()},ResizeObserverSPI.prototype.unobserve=function(target){if(!arguments.length)throw TypeError("1 argument required, but only 0 present.");if(typeof Element>"u"||!(Element instanceof Object))return;if(!(target instanceof getWindowOf(target).Element))throw TypeError('parameter 1 is not of type "Element".');var observations=this.observations_;if(!observations.has(target))return;if(observations.delete(target),!observations.size)this.controller_.removeObserver(this)},ResizeObserverSPI.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},ResizeObserverSPI.prototype.gatherActive=function(){var _this=this;this.clearActive(),this.observations_.forEach(function(observation){if(observation.isActive())_this.activeObservations_.push(observation)})},ResizeObserverSPI.prototype.broadcastActive=function(){if(!this.hasActive())return;var ctx=this.callbackCtx_,entries=this.activeObservations_.map(function(observation){return new ResizeObserverEntry(observation.target,observation.broadcastRect())});this.callback_.call(ctx,entries,ctx),this.clearActive()},ResizeObserverSPI.prototype.clearActive=function(){this.activeObservations_.splice(0)},ResizeObserverSPI.prototype.hasActive=function(){return this.activeObservations_.length>0},ResizeObserverSPI}(),observers=typeof WeakMap<"u"?new WeakMap:new MapShim,ResizeObserver2=function(){function ResizeObserver2(callback){if(!(this instanceof ResizeObserver2))throw TypeError("Cannot call a class as a function.");if(!arguments.length)throw TypeError("1 argument required, but only 0 present.");var controller=ResizeObserverController.getInstance(),observer=new ResizeObserverSPI(callback,controller,this);observers.set(this,observer)}return ResizeObserver2}();["observe","unobserve","disconnect"].forEach(function(method){ResizeObserver2.prototype[method]=function(){var _a;return(_a=observers.get(this))[method].apply(_a,arguments)}});var index=function(){if(typeof global$1.ResizeObserver<"u")return global$1.ResizeObserver;return ResizeObserver2}(),ResizeObserver_es_default=index;var elementListeners=new Map;function onResize(entities){entities.forEach(function(entity){var _elementListeners$get,target=entity.target;(_elementListeners$get=elementListeners.get(target))===null||_elementListeners$get===void 0||_elementListeners$get.forEach(function(listener){return listener(target)})})}var resizeObserver=new ResizeObserver_es_default(onResize);function observe(element,callback){if(!elementListeners.has(element))elementListeners.set(element,new Set),resizeObserver.observe(element);elementListeners.get(element).add(callback)}function unobserve(element,callback){if(elementListeners.has(element)){if(elementListeners.get(element).delete(callback),!elementListeners.get(element).size)resizeObserver.unobserve(element),elementListeners.delete(element)}}function _classCallCheck(a,n){if(!(a instanceof n))throw TypeError("Cannot call a class as a function")}function _defineProperties(e,r){for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,toPropertyKey(o.key),o)}}function _createClass(e,r,t){return r&&_defineProperties(e.prototype,r),t&&_defineProperties(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function _inherits(t,e){if(typeof e!="function"&&e!==null)throw TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&_setPrototypeOf(t,e)}function _getPrototypeOf(t){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},_getPrototypeOf(t)}function _isNativeReflectConstruct(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(_isNativeReflectConstruct=function(){return!!t})()}function _possibleConstructorReturn(t,e){if(e&&(_typeof(e)=="object"||typeof e=="function"))return e;if(e!==void 0)throw TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(t)}function _createSuper(t){var r=_isNativeReflectConstruct();return function(){var e,o=_getPrototypeOf(t);if(r){var s=_getPrototypeOf(this).constructor;e=Reflect.construct(o,arguments,s)}else e=o.apply(this,arguments);return _possibleConstructorReturn(this,e)}}var React5=__toESM(require_react_development()),DomWrapper=function(_React$Component){_inherits(DomWrapper,_React$Component);var _super=_createSuper(DomWrapper);function DomWrapper(){return _classCallCheck(this,DomWrapper),_super.apply(this,arguments)}return _createClass(DomWrapper,[{key:"render",value:function(){return this.props.children}}]),DomWrapper}(React5.Component);function SingleObserver(props,ref){var{children,disabled}=props,elementRef=React6.useRef(null),wrapperRef=React6.useRef(null),onCollectionResize=React6.useContext(CollectionContext),isRenderProps=typeof children==="function",mergedChildren=isRenderProps?children(elementRef):children,sizeRef=React6.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),canRef=!isRenderProps&&React6.isValidElement(mergedChildren)&&supportRef(mergedChildren),originRef=canRef?getNodeRef(mergedChildren):null,mergedRef=useComposeRef(originRef,elementRef),getDom=function(){var _elementRef$current;return findDOMNode(elementRef.current)||(elementRef.current&&_typeof(elementRef.current)==="object"?findDOMNode((_elementRef$current=elementRef.current)===null||_elementRef$current===void 0?void 0:_elementRef$current.nativeElement):null)||findDOMNode(wrapperRef.current)};React6.useImperativeHandle(ref,function(){return getDom()});var propsRef=React6.useRef(props);propsRef.current=props;var onInternalResize=React6.useCallback(function(target){var _propsRef$current=propsRef.current,{onResize,data}=_propsRef$current,_target$getBoundingCl=target.getBoundingClientRect(),{width,height}=_target$getBoundingCl,{offsetWidth,offsetHeight}=target,fixedWidth=Math.floor(width),fixedHeight=Math.floor(height);if(sizeRef.current.width!==fixedWidth||sizeRef.current.height!==fixedHeight||sizeRef.current.offsetWidth!==offsetWidth||sizeRef.current.offsetHeight!==offsetHeight){var size={width:fixedWidth,height:fixedHeight,offsetWidth,offsetHeight};sizeRef.current=size;var mergedOffsetWidth=offsetWidth===Math.round(width)?width:offsetWidth,mergedOffsetHeight=offsetHeight===Math.round(height)?height:offsetHeight,sizeInfo=_objectSpread2(_objectSpread2({},size),{},{offsetWidth:mergedOffsetWidth,offsetHeight:mergedOffsetHeight});if(onCollectionResize===null||onCollectionResize===void 0||onCollectionResize(sizeInfo,target,data),onResize)Promise.resolve().then(function(){onResize(sizeInfo,target)})}},[]);return React6.useEffect(function(){var currentElement=getDom();if(currentElement&&!disabled)observe(currentElement,onInternalResize);return function(){return unobserve(currentElement,onInternalResize)}},[elementRef.current,disabled]),React6.createElement(DomWrapper,{ref:wrapperRef},canRef?React6.cloneElement(mergedChildren,{ref:mergedRef}):mergedChildren)}var RefSingleObserver=React6.forwardRef(SingleObserver);RefSingleObserver.displayName="SingleObserver";var SingleObserver_default=RefSingleObserver;var INTERNAL_PREFIX_KEY="rc-observer-key";function ResizeObserver3(props,ref){var children=props.children,childNodes=typeof children==="function"?[children]:toArray(children);if(childNodes.length>1)warning(!1,"Find more than one child node with `children` in ResizeObserver. Please use ResizeObserver.Collection instead.");else if(childNodes.length===0)warning(!1,"`children` of ResizeObserver is empty. Nothing is in observe.");return childNodes.map(function(child,index){var key=(child===null||child===void 0?void 0:child.key)||"".concat(INTERNAL_PREFIX_KEY,"-").concat(index);return React7.createElement(SingleObserver_default,_extends({},props,{key,ref:index===0?ref:void 0}),child)})}var RefResizeObserver=React7.forwardRef(ResizeObserver3);RefResizeObserver.displayName="ResizeObserver";RefResizeObserver.Collection=Collection;var es_default=RefResizeObserver;function _arrayLikeToArray(r,a){(a==null||a>r.length)&&(a=r.length);for(var e=0,n=Array(a);e<a;e++)n[e]=r[e];return n}function _arrayWithoutHoles(r){if(Array.isArray(r))return _arrayLikeToArray(r)}function _iterableToArray(r){if(typeof Symbol<"u"&&r[Symbol.iterator]!=null||r["@@iterator"]!=null)return Array.from(r)}function _unsupportedIterableToArray(r,a){if(r){if(typeof r=="string")return _arrayLikeToArray(r,a);var t={}.toString.call(r).slice(8,-1);return t==="Object"&&r.constructor&&(t=r.constructor.name),t==="Map"||t==="Set"?Array.from(r):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?_arrayLikeToArray(r,a):void 0}}function _nonIterableSpread(){throw TypeError(`Invalid attempt to spread non-iterable instance.
7
7
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _toConsumableArray(r){return _arrayWithoutHoles(r)||_iterableToArray(r)||_unsupportedIterableToArray(r)||_nonIterableSpread()}var raf=function(callback){return+setTimeout(callback,16)},caf=function(num){return clearTimeout(num)};if(typeof window<"u"&&"requestAnimationFrame"in window)raf=function(callback){return window.requestAnimationFrame(callback)},caf=function(handle){return window.cancelAnimationFrame(handle)};var rafUUID=0,rafIds=new Map;function cleanup(id){rafIds.delete(id)}var wrapperRaf=function(callback){var times=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;rafUUID+=1;var id=rafUUID;function callRef(leftTimes){if(leftTimes===0)cleanup(id),callback();else{var realId=raf(function(){callRef(leftTimes-1)});rafIds.set(id,realId)}}return callRef(times),id};wrapperRaf.cancel=function(id){var realId=rafIds.get(id);return cleanup(id),caf(realId)};wrapperRaf.ids=function(){return rafIds};var raf_default=wrapperRaf;var React38=__toESM(require_react_development());function _arrayWithHoles(r){if(Array.isArray(r))return r}function _iterableToArrayLimit(r,l){var t=r==null?null:typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(t!=null){var e,n,i,u,a=[],f=!0,o=!1;try{if(i=(t=t.call(r)).next,l===0){if(Object(t)!==t)return;f=!1}else for(;!(f=(e=i.call(t)).done)&&(a.push(e.value),a.length!==l);f=!0);}catch(r){o=!0,n=r}finally{try{if(!f&&t.return!=null&&(u=t.return(),Object(u)!==u))return}finally{if(o)throw n}}return a}}function _nonIterableRest(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
8
8
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _slicedToArray(r,e){return _arrayWithHoles(r)||_iterableToArrayLimit(r,e)||_unsupportedIterableToArray(r,e)||_nonIterableRest()}function murmur2(str){var h=0,k,i=0,len=str.length;for(;len>=4;++i,len-=4)k=str.charCodeAt(i)&255|(str.charCodeAt(++i)&255)<<8|(str.charCodeAt(++i)&255)<<16|(str.charCodeAt(++i)&255)<<24,k=(k&65535)*1540483477+((k>>>16)*59797<<16),k^=k>>>24,h=(k&65535)*1540483477+((k>>>16)*59797<<16)^(h&65535)*1540483477+((h>>>16)*59797<<16);switch(len){case 3:h^=(str.charCodeAt(i+2)&255)<<16;case 2:h^=(str.charCodeAt(i+1)&255)<<8;case 1:h^=str.charCodeAt(i)&255,h=(h&65535)*1540483477+((h>>>16)*59797<<16)}return h^=h>>>13,h=(h&65535)*1540483477+((h>>>16)*59797<<16),((h^h>>>15)>>>0).toString(36)}var hash_esm_default=murmur2;function canUseDom(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function contains(root,n){if(!root)return!1;if(root.contains)return root.contains(n);var node=n;while(node){if(node===root)return!0;node=node.parentNode}return!1}var APPEND_ORDER="data-rc-order",APPEND_PRIORITY="data-rc-priority",MARK_KEY="rc-util-key",containerCache=new Map;function getMark(){var _ref=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},mark=_ref.mark;if(mark)return mark.startsWith("data-")?mark:"data-".concat(mark);return MARK_KEY}function getContainer(option){if(option.attachTo)return option.attachTo;var head=document.querySelector("head");return head||document.body}function getOrder(prepend){if(prepend==="queue")return"prependQueue";return prepend?"prepend":"append"}function findStyles(container){return Array.from((containerCache.get(container)||container).children).filter(function(node){return node.tagName==="STYLE"})}function injectCSS(css){var option=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!canUseDom())return null;var{csp,prepend,priority:_option$priority}=option,priority=_option$priority===void 0?0:_option$priority,mergedOrder=getOrder(prepend),isPrependQueue=mergedOrder==="prependQueue",styleNode=document.createElement("style");if(styleNode.setAttribute(APPEND_ORDER,mergedOrder),isPrependQueue&&priority)styleNode.setAttribute(APPEND_PRIORITY,"".concat(priority));if(csp!==null&&csp!==void 0&&csp.nonce)styleNode.nonce=csp===null||csp===void 0?void 0:csp.nonce;styleNode.innerHTML=css;var container=getContainer(option),firstChild=container.firstChild;if(prepend){if(isPrependQueue){var existStyle=(option.styles||findStyles(container)).filter(function(node){if(!["prepend","prependQueue"].includes(node.getAttribute(APPEND_ORDER)))return!1;var nodePriority=Number(node.getAttribute(APPEND_PRIORITY)||0);return priority>=nodePriority});if(existStyle.length)return container.insertBefore(styleNode,existStyle[existStyle.length-1].nextSibling),styleNode}container.insertBefore(styleNode,firstChild)}else container.appendChild(styleNode);return styleNode}function findExistNode(key){var option=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},container=getContainer(option);return(option.styles||findStyles(container)).find(function(node){return node.getAttribute(getMark(option))===key})}function removeCSS(key){var option=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},existNode=findExistNode(key,option);if(existNode){var container=getContainer(option);container.removeChild(existNode)}}function syncRealContainer(container,option){var cachedRealContainer=containerCache.get(container);if(!cachedRealContainer||!contains(document,cachedRealContainer)){var placeholderStyle=injectCSS("",option),parentNode=placeholderStyle.parentNode;containerCache.set(container,parentNode),container.removeChild(placeholderStyle)}}function updateCSS(css,key){var originOption=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},container=getContainer(originOption),styles=findStyles(container),option=_objectSpread2(_objectSpread2({},originOption),{},{styles});syncRealContainer(container,option);var existNode=findExistNode(key,option);if(existNode){var _option$csp,_option$csp2;if((_option$csp=option.csp)!==null&&_option$csp!==void 0&&_option$csp.nonce&&existNode.nonce!==((_option$csp2=option.csp)===null||_option$csp2===void 0?void 0:_option$csp2.nonce)){var _option$csp3;existNode.nonce=(_option$csp3=option.csp)===null||_option$csp3===void 0?void 0:_option$csp3.nonce}if(existNode.innerHTML!==css)existNode.innerHTML=css;return existNode}var newNode=injectCSS(css,option);return newNode.setAttribute(getMark(option),key),newNode}var import_react4=__toESM(require_react_development());function _objectWithoutProperties(e,t){if(e==null)return{};var o,r,i=_objectWithoutPropertiesLoose(e,t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(r=0;r<n.length;r++)o=n[r],t.indexOf(o)===-1&&{}.propertyIsEnumerable.call(e,o)&&(i[o]=e[o])}return i}function isEqual(obj1,obj2){var shallow=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,refSet=new Set;function deepEqual(a,b){var level=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,circular=refSet.has(a);if(warning_default(!circular,"Warning: There may be circular references"),circular)return!1;if(a===b)return!0;if(shallow&&level>1)return!1;refSet.add(a);var newLevel=level+1;if(Array.isArray(a)){if(!Array.isArray(b)||a.length!==b.length)return!1;for(var i=0;i<a.length;i++)if(!deepEqual(a[i],b[i],newLevel))return!1;return!0}if(a&&b&&_typeof(a)==="object"&&_typeof(b)==="object"){var keys=Object.keys(a);if(keys.length!==Object.keys(b).length)return!1;return keys.every(function(key){return deepEqual(a[key],b[key],newLevel)})}return!1}return deepEqual(obj1,obj2)}var isEqual_default=isEqual;var React8=__toESM(require_react_development());var SPLIT="%";function pathKey(keys){return keys.join(SPLIT)}var Entity=function(){function Entity(instanceId){_classCallCheck(this,Entity),_defineProperty(this,"instanceId",void 0),_defineProperty(this,"cache",new Map),_defineProperty(this,"extracted",new Set),this.instanceId=instanceId}return _createClass(Entity,[{key:"get",value:function(keys){return this.opGet(pathKey(keys))}},{key:"opGet",value:function(keyPathStr){return this.cache.get(keyPathStr)||null}},{key:"update",value:function(keys,valueFn){return this.opUpdate(pathKey(keys),valueFn)}},{key:"opUpdate",value:function(keyPathStr,valueFn){var prevValue=this.cache.get(keyPathStr),nextValue=valueFn(prevValue);if(nextValue===null)this.cache.delete(keyPathStr);else this.cache.set(keyPathStr,nextValue)}}]),Entity}(),Cache_default=Entity;var _excluded=["children"],ATTR_TOKEN="data-token-hash",ATTR_MARK="data-css-hash",ATTR_CACHE_PATH="data-cache-path",CSS_IN_JS_INSTANCE="__cssinjs_instance__";function createCache(){var cssinjsInstanceId=Math.random().toString(12).slice(2);if(typeof document<"u"&&document.head&&document.body){var styles=document.body.querySelectorAll("style[".concat(ATTR_MARK,"]"))||[],firstChild=document.head.firstChild;Array.from(styles).forEach(function(style){if(style[CSS_IN_JS_INSTANCE]=style[CSS_IN_JS_INSTANCE]||cssinjsInstanceId,style[CSS_IN_JS_INSTANCE]===cssinjsInstanceId)document.head.insertBefore(style,firstChild)});var styleHash={};Array.from(document.querySelectorAll("style[".concat(ATTR_MARK,"]"))).forEach(function(style){var hash=style.getAttribute(ATTR_MARK);if(styleHash[hash]){if(style[CSS_IN_JS_INSTANCE]===cssinjsInstanceId){var _style$parentNode;(_style$parentNode=style.parentNode)===null||_style$parentNode===void 0||_style$parentNode.removeChild(style)}}else styleHash[hash]=!0})}return new Cache_default(cssinjsInstanceId)}var StyleContext=React8.createContext({hashPriority:"low",cache:createCache(),defaultCache:!0}),StyleProvider=function(props){var children=props.children,restProps=_objectWithoutProperties(props,_excluded),parentContext=React8.useContext(StyleContext),context=useMemo(function(){var mergedContext=_objectSpread2({},parentContext);Object.keys(restProps).forEach(function(key){var value=restProps[key];if(restProps[key]!==void 0)mergedContext[key]=value});var cache=restProps.cache;return mergedContext.cache=mergedContext.cache||createCache(),mergedContext.defaultCache=!cache&&parentContext.defaultCache,mergedContext},[parentContext,restProps],function(prev,next){return!isEqual_default(prev[0],next[0],!0)||!isEqual_default(prev[1],next[1],!0)});return React8.createElement(StyleContext.Provider,{value:context},children)},StyleContext_default=StyleContext;var CALC_UNIT="CALC_UNIT",regexp=new RegExp(CALC_UNIT,"g");function sameDerivativeOption(left,right){if(left.length!==right.length)return!1;for(var i=0;i<left.length;i++)if(left[i]!==right[i])return!1;return!0}var ThemeCache=function(){function ThemeCache(){_classCallCheck(this,ThemeCache),_defineProperty(this,"cache",void 0),_defineProperty(this,"keys",void 0),_defineProperty(this,"cacheCallTimes",void 0),this.cache=new Map,this.keys=[],this.cacheCallTimes=0}return _createClass(ThemeCache,[{key:"size",value:function(){return this.keys.length}},{key:"internalGet",value:function(derivativeOption){var _cache2,_cache3,updateCallTimes=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,cache={map:this.cache};if(derivativeOption.forEach(function(derivative){if(!cache)cache=void 0;else{var _cache;cache=(_cache=cache)===null||_cache===void 0||(_cache=_cache.map)===null||_cache===void 0?void 0:_cache.get(derivative)}}),(_cache2=cache)!==null&&_cache2!==void 0&&_cache2.value&&updateCallTimes)cache.value[1]=this.cacheCallTimes++;return(_cache3=cache)===null||_cache3===void 0?void 0:_cache3.value}},{key:"get",value:function(derivativeOption){var _this$internalGet;return(_this$internalGet=this.internalGet(derivativeOption,!0))===null||_this$internalGet===void 0?void 0:_this$internalGet[0]}},{key:"has",value:function(derivativeOption){return!!this.internalGet(derivativeOption)}},{key:"set",value:function(derivativeOption,value){var _this=this;if(!this.has(derivativeOption)){if(this.size()+1>ThemeCache.MAX_CACHE_SIZE+ThemeCache.MAX_CACHE_OFFSET){var _this$keys$reduce=this.keys.reduce(function(result,key){var _result=_slicedToArray(result,2),callTimes=_result[1];if(_this.internalGet(key)[1]<callTimes)return[key,_this.internalGet(key)[1]];return result},[this.keys[0],this.cacheCallTimes]),_this$keys$reduce2=_slicedToArray(_this$keys$reduce,1),targetKey=_this$keys$reduce2[0];this.delete(targetKey)}this.keys.push(derivativeOption)}var cache=this.cache;derivativeOption.forEach(function(derivative,index){if(index===derivativeOption.length-1)cache.set(derivative,{value:[value,_this.cacheCallTimes++]});else{var cacheValue=cache.get(derivative);if(!cacheValue)cache.set(derivative,{map:new Map});else if(!cacheValue.map)cacheValue.map=new Map;cache=cache.get(derivative).map}})}},{key:"deleteByPath",value:function(currentCache,derivatives){var cache=currentCache.get(derivatives[0]);if(derivatives.length===1){var _cache$value;if(!cache.map)currentCache.delete(derivatives[0]);else currentCache.set(derivatives[0],{map:cache.map});return(_cache$value=cache.value)===null||_cache$value===void 0?void 0:_cache$value[0]}var result=this.deleteByPath(cache.map,derivatives.slice(1));if((!cache.map||cache.map.size===0)&&!cache.value)currentCache.delete(derivatives[0]);return result}},{key:"delete",value:function(derivativeOption){if(this.has(derivativeOption))return this.keys=this.keys.filter(function(item){return!sameDerivativeOption(item,derivativeOption)}),this.deleteByPath(this.cache,derivativeOption);return}}]),ThemeCache}();_defineProperty(ThemeCache,"MAX_CACHE_SIZE",20);_defineProperty(ThemeCache,"MAX_CACHE_OFFSET",5);var uuid=0,Theme=function(){function Theme(derivatives){if(_classCallCheck(this,Theme),_defineProperty(this,"derivatives",void 0),_defineProperty(this,"id",void 0),this.derivatives=Array.isArray(derivatives)?derivatives:[derivatives],this.id=uuid,derivatives.length===0)warning(derivatives.length>0,"[Ant Design CSS-in-JS] Theme should have at least one derivative function.");uuid+=1}return _createClass(Theme,[{key:"getDerivativeToken",value:function(token){return this.derivatives.reduce(function(result,derivative){return derivative(token,result)},void 0)}}]),Theme}();var cacheThemes=new ThemeCache;function createTheme(derivatives){var derivativeArr=Array.isArray(derivatives)?derivatives:[derivatives];if(!cacheThemes.has(derivativeArr))cacheThemes.set(derivativeArr,new Theme(derivativeArr));return cacheThemes.get(derivativeArr)}var resultCache=new WeakMap,RESULT_VALUE={};function memoResult(callback,deps){var current=resultCache;for(var i=0;i<deps.length;i+=1){var dep=deps[i];if(!current.has(dep))current.set(dep,new WeakMap);current=current.get(dep)}if(!current.has(RESULT_VALUE))current.set(RESULT_VALUE,callback());return current.get(RESULT_VALUE)}var flattenTokenCache=new WeakMap;function flattenToken(token){var str=flattenTokenCache.get(token)||"";if(!str)Object.keys(token).forEach(function(key){var value=token[key];if(str+=key,value instanceof Theme)str+=value.id;else if(value&&_typeof(value)==="object")str+=flattenToken(value);else str+=value}),str=hash_esm_default(str),flattenTokenCache.set(token,str);return str}function token2key(token,salt){return hash_esm_default("".concat(salt,"_").concat(flattenToken(token)))}var randomSelectorKey="random-".concat(Date.now(),"-").concat(Math.random()).replace(/\./g,"");var isClientSide=canUseDom();function unit(num){if(typeof num==="number")return"".concat(num,"px");return num}function toStyleStr(style,tokenKey,styleId){var customizeAttrs=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},plain=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1;if(plain)return style;var attrs=_objectSpread2(_objectSpread2({},customizeAttrs),{},_defineProperty(_defineProperty({},ATTR_TOKEN,tokenKey),ATTR_MARK,styleId)),attrStr=Object.keys(attrs).map(function(attr){var val=attrs[attr];return val?"".concat(attr,'="').concat(val,'"'):null}).filter(function(v){return v}).join(" ");return"<style ".concat(attrStr,">").concat(style,"</style>")}var token2CSSVar=function(token){var prefix=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return"--".concat(prefix?"".concat(prefix,"-"):"").concat(token).replace(/([a-z0-9])([A-Z])/g,"$1-$2").replace(/([A-Z]+)([A-Z][a-z0-9]+)/g,"$1-$2").replace(/([a-z])([A-Z0-9])/g,"$1-$2").toLowerCase()},serializeCSSVar=function(cssVars,hashId,options){if(!Object.keys(cssVars).length)return"";return".".concat(hashId).concat(options!==null&&options!==void 0&&options.scope?".".concat(options.scope):"","{").concat(Object.entries(cssVars).map(function(_ref){var _ref2=_slicedToArray(_ref,2),key=_ref2[0],value=_ref2[1];return"".concat(key,":").concat(value,";")}).join(""),"}")},transformToken=function(token,themeKey,config){var cssVars={},result={};return Object.entries(token).forEach(function(_ref3){var _config$preserve,_config$ignore,_ref4=_slicedToArray(_ref3,2),key=_ref4[0],value=_ref4[1];if(config!==null&&config!==void 0&&(_config$preserve=config.preserve)!==null&&_config$preserve!==void 0&&_config$preserve[key])result[key]=value;else if((typeof value==="string"||typeof value==="number")&&!(config!==null&&config!==void 0&&(_config$ignore=config.ignore)!==null&&_config$ignore!==void 0&&_config$ignore[key])){var _config$unitless,cssVar=token2CSSVar(key,config===null||config===void 0?void 0:config.prefix);cssVars[cssVar]=typeof value==="number"&&!(config!==null&&config!==void 0&&(_config$unitless=config.unitless)!==null&&_config$unitless!==void 0&&_config$unitless[key])?"".concat(value,"px"):String(value),result[key]="var(".concat(cssVar,")")}}),[result,serializeCSSVar(cssVars,themeKey,{scope:config===null||config===void 0?void 0:config.scope})]};var React12=__toESM(require_react_development());var React9=__toESM(require_react_development());var useInternalLayoutEffect=canUseDom()?React9.useLayoutEffect:React9.useEffect,useLayoutEffect2=function(callback,deps){var firstMountRef=React9.useRef(!0);useInternalLayoutEffect(function(){return callback(firstMountRef.current)},deps),useInternalLayoutEffect(function(){return firstMountRef.current=!1,function(){firstMountRef.current=!0}},[])},useLayoutUpdateEffect=function(callback,deps){useLayoutEffect2(function(firstMount){if(!firstMount)return callback()},deps)},useLayoutEffect_default=useLayoutEffect2;var React10=__toESM(require_react_development()),fullClone=_objectSpread2({},React10),useInsertionEffect=fullClone.useInsertionEffect,useInsertionEffectPolyfill=function(renderEffect,effect,deps){React10.useMemo(renderEffect,deps),useLayoutEffect_default(function(){return effect(!0)},deps)},useCompatibleInsertionEffect=useInsertionEffect?function(renderEffect,effect,deps){return useInsertionEffect(function(){return renderEffect(),effect()},deps)}:useInsertionEffectPolyfill,useCompatibleInsertionEffect_default=useCompatibleInsertionEffect;var React11=__toESM(require_react_development()),fullClone2=_objectSpread2({},React11),useInsertionEffect2=fullClone2.useInsertionEffect,useCleanupRegister=function(deps){var effectCleanups=[],cleanupFlag=!1;function register(fn){if(cleanupFlag){warning(!1,"[Ant Design CSS-in-JS] You are registering a cleanup function after unmount, which will not have any effect.");return}effectCleanups.push(fn)}return React11.useEffect(function(){return cleanupFlag=!1,function(){if(cleanupFlag=!0,effectCleanups.length)effectCleanups.forEach(function(fn){return fn()})}},deps),register},useRun=function(){return function(fn){fn()}},useEffectCleanupRegister=typeof useInsertionEffect2<"u"?useCleanupRegister:useRun,useEffectCleanupRegister_default=useEffectCleanupRegister;var webpackHMR=!1;function useDevHMR(){return webpackHMR}var useHMR_default=useDevHMR;if(typeof module_useHMR<"u"&&module_useHMR&&module_useHMR.hot&&typeof window<"u"){if(win=typeof globalThis<"u"?globalThis:typeof window<"u"?window:null,win&&typeof win.webpackHotUpdate==="function")originWebpackHotUpdate=win.webpackHotUpdate,win.webpackHotUpdate=function(){return webpackHMR=!0,setTimeout(function(){webpackHMR=!1},0),originWebpackHotUpdate.apply(void 0,arguments)}}var win,originWebpackHotUpdate;function useGlobalCache(prefix,keyPath,cacheFn,onCacheRemove,onCacheEffect){var _React$useContext=React12.useContext(StyleContext_default),globalCache=_React$useContext.cache,fullPath=[prefix].concat(_toConsumableArray(keyPath)),fullPathStr=pathKey(fullPath),register=useEffectCleanupRegister_default([fullPathStr]),HMRUpdate=useHMR_default(),buildCache=function(updater){globalCache.opUpdate(fullPathStr,function(prevCache){var _ref=prevCache||[void 0,void 0],_ref2=_slicedToArray(_ref,2),_ref2$=_ref2[0],times=_ref2$===void 0?0:_ref2$,cache=_ref2[1],tmpCache=cache;if(cache&&HMRUpdate)onCacheRemove===null||onCacheRemove===void 0||onCacheRemove(tmpCache,HMRUpdate),tmpCache=null;var mergedCache=tmpCache||cacheFn(),data=[times,mergedCache];return updater?updater(data):data})};React12.useMemo(function(){buildCache()},[fullPathStr]);var cacheEntity=globalCache.opGet(fullPathStr);if(!cacheEntity)buildCache(),cacheEntity=globalCache.opGet(fullPathStr);var cacheContent=cacheEntity[1];return useCompatibleInsertionEffect_default(function(){onCacheEffect===null||onCacheEffect===void 0||onCacheEffect(cacheContent)},function(polyfill){return buildCache(function(_ref3){var _ref4=_slicedToArray(_ref3,2),times=_ref4[0],cache=_ref4[1];if(polyfill&&times===0)onCacheEffect===null||onCacheEffect===void 0||onCacheEffect(cacheContent);return[times+1,cache]}),function(){globalCache.opUpdate(fullPathStr,function(prevCache){var _ref5=prevCache||[],_ref6=_slicedToArray(_ref5,2),_ref6$=_ref6[0],times=_ref6$===void 0?0:_ref6$,cache=_ref6[1],nextCount=times-1;if(nextCount===0)return register(function(){if(polyfill||!globalCache.opGet(fullPathStr))onCacheRemove===null||onCacheRemove===void 0||onCacheRemove(cache,!1)}),null;return[times-1,cache]})}},[fullPathStr]),cacheContent}var EMPTY_OVERRIDE={},hashPrefix="css-dev-only-do-not-override",tokenKeys=new Map;function recordCleanToken(tokenKey){tokenKeys.set(tokenKey,(tokenKeys.get(tokenKey)||0)+1)}function removeStyleTags(key,instanceId){if(typeof document<"u"){var styles=document.querySelectorAll("style[".concat(ATTR_TOKEN,'="').concat(key,'"]'));styles.forEach(function(style){if(style[CSS_IN_JS_INSTANCE]===instanceId){var _style$parentNode;(_style$parentNode=style.parentNode)===null||_style$parentNode===void 0||_style$parentNode.removeChild(style)}})}}var TOKEN_THRESHOLD=0;function cleanTokenStyle(tokenKey,instanceId){tokenKeys.set(tokenKey,(tokenKeys.get(tokenKey)||0)-1);var cleanableKeyList=new Set;if(tokenKeys.forEach(function(value,key){if(value<=0)cleanableKeyList.add(key)}),tokenKeys.size-cleanableKeyList.size>TOKEN_THRESHOLD)cleanableKeyList.forEach(function(key){removeStyleTags(key,instanceId),tokenKeys.delete(key)})}var getComputedToken=function(originToken,overrideToken,theme,format){var derivativeToken=theme.getDerivativeToken(originToken),mergedDerivativeToken=_objectSpread2(_objectSpread2({},derivativeToken),overrideToken);if(format)mergedDerivativeToken=format(mergedDerivativeToken);return mergedDerivativeToken},TOKEN_PREFIX="token";function useCacheToken(theme,tokens){var option=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},_useContext=import_react4.useContext(StyleContext_default),instanceId=_useContext.cache.instanceId,container=_useContext.container,_option$salt=option.salt,salt=_option$salt===void 0?"":_option$salt,_option$override=option.override,override=_option$override===void 0?EMPTY_OVERRIDE:_option$override,{formatToken,getComputedToken:compute,cssVar}=option,mergedToken=memoResult(function(){return Object.assign.apply(Object,[{}].concat(_toConsumableArray(tokens)))},tokens),tokenStr=flattenToken(mergedToken),overrideTokenStr=flattenToken(override),cssVarStr=cssVar?flattenToken(cssVar):"",cachedToken=useGlobalCache(TOKEN_PREFIX,[salt,theme.id,tokenStr,overrideTokenStr,cssVarStr],function(){var _cssVar$key,mergedDerivativeToken=compute?compute(mergedToken,override,theme):getComputedToken(mergedToken,override,theme,formatToken),actualToken=_objectSpread2({},mergedDerivativeToken),cssVarsStr="";if(cssVar){var _transformToken=transformToken(mergedDerivativeToken,cssVar.key,{prefix:cssVar.prefix,ignore:cssVar.ignore,unitless:cssVar.unitless,preserve:cssVar.preserve}),_transformToken2=_slicedToArray(_transformToken,2);mergedDerivativeToken=_transformToken2[0],cssVarsStr=_transformToken2[1]}var tokenKey=token2key(mergedDerivativeToken,salt);mergedDerivativeToken._tokenKey=tokenKey,actualToken._tokenKey=token2key(actualToken,salt);var themeKey=(_cssVar$key=cssVar===null||cssVar===void 0?void 0:cssVar.key)!==null&&_cssVar$key!==void 0?_cssVar$key:tokenKey;mergedDerivativeToken._themeKey=themeKey,recordCleanToken(themeKey);var hashId="".concat(hashPrefix,"-").concat(hash_esm_default(tokenKey));return mergedDerivativeToken._hashId=hashId,[mergedDerivativeToken,hashId,actualToken,cssVarsStr,(cssVar===null||cssVar===void 0?void 0:cssVar.key)||""]},function(cache){cleanTokenStyle(cache[0]._themeKey,instanceId)},function(_ref){var _ref2=_slicedToArray(_ref,4),token=_ref2[0],cssVarsStr=_ref2[3];if(cssVar&&cssVarsStr){var style=updateCSS(cssVarsStr,hash_esm_default("css-variables-".concat(token._themeKey)),{mark:ATTR_MARK,prepend:"queue",attachTo:container,priority:-999});style[CSS_IN_JS_INSTANCE]=instanceId,style.setAttribute(ATTR_TOKEN,token._themeKey)}});return cachedToken}var extract=function(cache,effectStyles,options){var _cache=_slicedToArray(cache,5),realToken=_cache[2],styleStr=_cache[3],cssVarKey=_cache[4],_ref3=options||{},plain=_ref3.plain;if(!styleStr)return null;var styleId=realToken._tokenKey,order=-999,sharedAttrs={"data-rc-order":"prependQueue","data-rc-priority":"".concat(order)},styleText=toStyleStr(styleStr,cssVarKey,styleId,sharedAttrs,plain);return[order,styleId,styleText]};var import_react5=__toESM(require_react_development());var React13=__toESM(require_react_development());var unitlessKeys={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},unitless_esm_default=unitlessKeys;var COMMENT="comm",RULESET="rule",DECLARATION="decl";var IMPORT="@import";var NAMESPACE="@namespace",KEYFRAMES="@keyframes";var LAYER="@layer";var abs=Math.abs,from=String.fromCharCode;function trim(value){return value.trim()}function replace(value,pattern,replacement){return value.replace(pattern,replacement)}function charat(value,index){return value.charCodeAt(index)|0}function substr(value,begin,end){return value.slice(begin,end)}function strlen(value){return value.length}function sizeof(value){return value.length}function append(value,array){return array.push(value),value}var line=1,column=1,length=0,position=0,character=0,characters="";function node2(value,root,parent,type,props,children,length,siblings){return{value,root,parent,type,props,children,line,column,length,return:"",siblings}}function char(){return character}function prev(){if(character=position>0?charat(characters,--position):0,column--,character===10)column=1,line--;return character}function next(){if(character=position<length?charat(characters,position++):0,column++,character===10)column=1,line++;return character}function peek(){return charat(characters,position)}function caret(){return position}function slice(begin,end){return substr(characters,begin,end)}function token(type){switch(type){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function alloc(value){return line=column=1,length=strlen(characters=value),position=0,[]}function dealloc(value){return characters="",value}function delimit(type){return trim(slice(position-1,delimiter(type===91?type+2:type===40?type+1:type)))}function whitespace(type){while(character=peek())if(character<33)next();else break;return token(type)>2||token(character)>3?"":" "}function escaping(index,count){while(--count&&next())if(character<48||character>102||character>57&&character<65||character>70&&character<97)break;return slice(index,caret()+(count<6&&peek()==32&&next()==32))}function delimiter(type){while(next())switch(character){case type:return position;case 34:case 39:if(type!==34&&type!==39)delimiter(character);break;case 40:if(type===41)delimiter(type);break;case 92:next();break}return position}function commenter(type,index){while(next())if(type+character===57)break;else if(type+character===84&&peek()===47)break;return"/*"+slice(index,position-1)+"*"+from(type===47?type:next())}function identifier(index){while(!token(peek()))next();return slice(index,position)}function compile(value){return dealloc(parse("",null,null,null,[""],value=alloc(value),0,[0],value))}function parse(value,root,parent,rule,rules,rulesets,pseudo,points,declarations){var index=0,offset=0,length=pseudo,atrule=0,property=0,previous=0,variable=1,scanning=1,ampersand=1,parens=0,character=0,type="",props=rules,children=rulesets,reference=rule,characters=type;while(scanning)switch(previous=character,character=next()){case 40:if(previous!=108&&charat(characters,length-1)==58)parens++,characters+="(";else characters+=delimit(character);break;case 41:parens--,characters+=")";break;case 34:case 39:case 91:characters+=delimit(character);break;case 9:case 10:case 13:case 32:if(parens>0){characters+=from(character);break}characters+=whitespace(previous);break;case 92:characters+=escaping(caret()-1,7);continue;case 47:switch(peek()){case 42:case 47:if(append(comment(commenter(next(),caret()),root,parent,declarations),declarations),(token(previous||1)==5||token(peek()||1)==5)&&strlen(characters)&&substr(characters,-1,void 0)!==" ")characters+=" ";break;default:characters+="/"}break;case 123*variable:points[index++]=strlen(characters)*ampersand;case 125*variable:case 59:case 0:if(parens>0&&character){characters+=from(character);break}switch(character){case 0:case 125:scanning=0;case 59+offset:if(ampersand==-1)characters=replace(characters,/\f/g,"");if(property>0&&(strlen(characters)-length||variable===0))append(property>32?declaration(characters+";",rule,parent,length-1,declarations):declaration(replace(characters," ","")+";",rule,parent,length-2,declarations),declarations);break;case 59:characters+=";";default:if(append(reference=ruleset(characters,root,parent,index,offset,rules,points,type,props=[],children=[],length,rulesets),rulesets),character===123)if(offset===0)parse(characters,root,reference,reference,props,rulesets,length,points,children);else{switch(atrule){case 99:if(charat(characters,3)===110)break;case 108:if(charat(characters,2)===97)break;default:offset=0;case 100:case 109:case 115:}if(offset)parse(value,reference,reference,rule&&append(ruleset(value,reference,reference,0,0,rules,points,type,rules,props=[],length,children),children),rules,children,length,points,rule?props:children);else parse(characters,reference,reference,reference,[""],children,0,points,children)}}index=offset=property=0,variable=ampersand=1,type=characters="",length=pseudo;break;case 58:length=1+strlen(characters),property=previous;default:if(variable<1){if(character==123)--variable;else if(character==125&&variable++==0&&prev()==125)continue}switch(characters+=from(character),character*variable){case 38:ampersand=offset>0?1:(characters+="\f",-1);break;case 44:if(parens>0)break;points[index++]=(strlen(characters)-1)*ampersand,ampersand=1;break;case 64:if(peek()===45)characters+=delimit(next());atrule=peek(),offset=length=strlen(type=characters+=identifier(caret())),character++;break;case 45:if(previous===45&&strlen(characters)==2)variable=0}}return rulesets}function ruleset(value,root,parent,index,offset,rules,points,type,props,children,length,siblings){var post=offset-1,rule=offset===0?rules:[""],size=sizeof(rule);for(var i=0,j=0,k=0;i<index;++i)for(var x=0,y=substr(value,post+1,post=abs(j=points[i])),z=value;x<size;++x)if(z=trim(j>0?rule[x]+" "+y:replace(y,/&\f/g,rule[x])))props[k++]=z;return node2(value,root,parent,offset===0?RULESET:type,props,children,length,siblings)}function comment(value,root,parent,siblings){return node2(value,root,parent,COMMENT,from(char()),substr(value,2,-2),0,siblings)}function declaration(value,root,parent,length,siblings){return node2(value,root,parent,DECLARATION,substr(value,0,length),substr(value,length+1,-1),length,siblings)}function serialize(children,callback){var output="";for(var i=0;i<children.length;i++)output+=callback(children[i],i,children,callback)||"";return output}function stringify(element,index,children,callback){switch(element.type){case LAYER:if(element.children.length)break;case IMPORT:case NAMESPACE:case DECLARATION:return element.return=element.return||element.value;case COMMENT:return"";case KEYFRAMES:return element.return=element.value+"{"+serialize(element.children,callback)+"}";case RULESET:if(!strlen(element.value=element.props.join(",")))return""}return strlen(children=serialize(element.children,callback))?element.return=element.value+"{"+children+"}":""}function lintWarning(message,info){var{path,parentSelectors}=info;warning_default(!1,"[Ant Design CSS-in-JS] ".concat(path?"Error in ".concat(path,": "):"").concat(message).concat(parentSelectors.length?" Selector: ".concat(parentSelectors.join(" | ")):""))}var linter=function(key,value,info){if(key==="content"){var contentValuePattern=/(attr|counters?|url|(((repeating-)?(linear|radial))|conic)-gradient)\(|(no-)?(open|close)-quote/,contentValues=["normal","none","initial","inherit","unset"];if(typeof value!=="string"||contentValues.indexOf(value)===-1&&!contentValuePattern.test(value)&&(value.charAt(0)!==value.charAt(value.length-1)||value.charAt(0)!=='"'&&value.charAt(0)!=="'"))lintWarning("You seem to be using a value for 'content' without quotes, try replacing it with `content: '\"".concat(value,"\"'`."),info)}},contentQuotesLinter_default=linter;var linter2=function(key,value,info){if(key==="animation"){if(info.hashId&&value!=="none")lintWarning("You seem to be using hashed animation '".concat(value,"', in which case 'animationName' with Keyframe as value is recommended."),info)}},hashedAnimationLinter_default=linter2;var ATTR_CACHE_MAP="data-ant-cssinjs-cache-path",CSS_FILE_STYLE="_FILE_STYLE__";function serialize2(cachePathMap){return Object.keys(cachePathMap).map(function(path){var hash=cachePathMap[path];return"".concat(path,":").concat(hash)}).join(";")}var cachePathMap,fromCSSFile=!0;function prepare(){if(!cachePathMap){if(cachePathMap={},canUseDom()){var div=document.createElement("div");div.className=ATTR_CACHE_MAP,div.style.position="fixed",div.style.visibility="hidden",div.style.top="-9999px",document.body.appendChild(div);var content=getComputedStyle(div).content||"";content=content.replace(/^"/,"").replace(/"$/,""),content.split(";").forEach(function(item){var _item$split=item.split(":"),_item$split2=_slicedToArray(_item$split,2),path=_item$split2[0],hash=_item$split2[1];cachePathMap[path]=hash});var inlineMapStyle=document.querySelector("style[".concat(ATTR_CACHE_MAP,"]"));if(inlineMapStyle){var _inlineMapStyle$paren;fromCSSFile=!1,(_inlineMapStyle$paren=inlineMapStyle.parentNode)===null||_inlineMapStyle$paren===void 0||_inlineMapStyle$paren.removeChild(inlineMapStyle)}document.body.removeChild(div)}}}function existPath(path){return prepare(),!!cachePathMap[path]}function getStyleAndHash(path){var hash=cachePathMap[path],styleStr=null;if(hash&&canUseDom())if(fromCSSFile)styleStr=CSS_FILE_STYLE;else{var _style=document.querySelector("style[".concat(ATTR_MARK,'="').concat(cachePathMap[path],'"]'));if(_style)styleStr=_style.innerHTML;else delete cachePathMap[path]}return[styleStr,hash]}var SKIP_CHECK="_skip_check_",MULTI_VALUE="_multi_value_";function normalizeStyle(styleStr){var serialized=serialize(compile(styleStr),stringify);return serialized.replace(/\{%%%\:[^;];}/g,";")}function isCompoundCSSProperty(value){return _typeof(value)==="object"&&value&&((SKIP_CHECK in value)||(MULTI_VALUE in value))}function injectSelectorHash(key,hashId,hashPriority){if(!hashId)return key;var hashClassName=".".concat(hashId),hashSelector=hashPriority==="low"?":where(".concat(hashClassName,")"):hashClassName,keys=key.split(",").map(function(k){var _firstPath$match,fullPath=k.trim().split(/\s+/),firstPath=fullPath[0]||"",htmlElement=((_firstPath$match=firstPath.match(/^\w+/))===null||_firstPath$match===void 0?void 0:_firstPath$match[0])||"";return firstPath="".concat(htmlElement).concat(hashSelector).concat(firstPath.slice(htmlElement.length)),[firstPath].concat(_toConsumableArray(fullPath.slice(1))).join(" ")});return keys.join(",")}var parseStyle=function parseStyle(interpolation){var config=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},_ref=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{root:!0,parentSelectors:[]},{root,injectHash,parentSelectors}=_ref,{hashId,layer,path,hashPriority,transformers:_config$transformers}=config,transformers=_config$transformers===void 0?[]:_config$transformers,_config$linters=config.linters,linters=_config$linters===void 0?[]:_config$linters,styleStr="",effectStyle={};function parseKeyframes(keyframes){var animationName=keyframes.getName(hashId);if(!effectStyle[animationName]){var _parseStyle=parseStyle(keyframes.style,config,{root:!1,parentSelectors}),_parseStyle2=_slicedToArray(_parseStyle,1),_parsedStr=_parseStyle2[0];effectStyle[animationName]="@keyframes ".concat(keyframes.getName(hashId)).concat(_parsedStr)}}function flattenList(list){var fullList=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return list.forEach(function(item){if(Array.isArray(item))flattenList(item,fullList);else if(item)fullList.push(item)}),fullList}var flattenStyleList=flattenList(Array.isArray(interpolation)?interpolation:[interpolation]);if(flattenStyleList.forEach(function(originStyle){var style=typeof originStyle==="string"&&!root?{}:originStyle;if(typeof style==="string")styleStr+="".concat(style,`
9
9
  `);else if(style._keyframe)parseKeyframes(style);else{var mergedStyle=transformers.reduce(function(prev,trans){var _trans$visit;return(trans===null||trans===void 0||(_trans$visit=trans.visit)===null||_trans$visit===void 0?void 0:_trans$visit.call(trans,prev))||prev},style);Object.keys(mergedStyle).forEach(function(key){var value=mergedStyle[key];if(_typeof(value)==="object"&&value&&(key!=="animationName"||!value._keyframe)&&!isCompoundCSSProperty(value)){var subInjectHash=!1,mergedKey=key.trim(),nextRoot=!1;if((root||injectHash)&&hashId)if(mergedKey.startsWith("@"))subInjectHash=!0;else if(mergedKey==="&")mergedKey=injectSelectorHash("",hashId,hashPriority);else mergedKey=injectSelectorHash(key,hashId,hashPriority);else if(root&&!hashId&&(mergedKey==="&"||mergedKey===""))mergedKey="",nextRoot=!0;var _parseStyle3=parseStyle(value,config,{root:nextRoot,injectHash:subInjectHash,parentSelectors:[].concat(_toConsumableArray(parentSelectors),[mergedKey])}),_parseStyle4=_slicedToArray(_parseStyle3,2),_parsedStr2=_parseStyle4[0],childEffectStyle=_parseStyle4[1];effectStyle=_objectSpread2(_objectSpread2({},effectStyle),childEffectStyle),styleStr+="".concat(mergedKey).concat(_parsedStr2)}else{let appendStyle=function(cssKey,cssValue){if(_typeof(value)!=="object"||!(value!==null&&value!==void 0&&value[SKIP_CHECK]))[contentQuotesLinter_default,hashedAnimationLinter_default].concat(_toConsumableArray(linters)).forEach(function(linter){return linter(cssKey,cssValue,{path,hashId,parentSelectors})});var styleName=cssKey.replace(/[A-Z]/g,function(match){return"-".concat(match.toLowerCase())}),formatValue=cssValue;if(!unitless_esm_default[cssKey]&&typeof formatValue==="number"&&formatValue!==0)formatValue="".concat(formatValue,"px");if(cssKey==="animationName"&&cssValue!==null&&cssValue!==void 0&&cssValue._keyframe)parseKeyframes(cssValue),formatValue=cssValue.getName(hashId);styleStr+="".concat(styleName,":").concat(formatValue,";")};var _value,actualValue=(_value=value===null||value===void 0?void 0:value.value)!==null&&_value!==void 0?_value:value;if(_typeof(value)==="object"&&value!==null&&value!==void 0&&value[MULTI_VALUE]&&Array.isArray(actualValue))actualValue.forEach(function(item){appendStyle(key,item)});else appendStyle(key,actualValue)}})}}),!root)styleStr="{".concat(styleStr,"}");else if(layer){if(styleStr)styleStr="@layer ".concat(layer.name," {").concat(styleStr,"}");if(layer.dependencies)effectStyle["@layer ".concat(layer.name)]=layer.dependencies.map(function(deps){return"@layer ".concat(deps,", ").concat(layer.name,";")}).join(`
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- import{AuthConfigResponseSchema,HealthResponseSchema,cloudJson}from"./chunk-1gkeepkm.js";var BUILT_DEFAULT="https://api.velloo.ai";function defaultCloudUrl(){return(process.env.VELLOO_CLOUD_URL??BUILT_DEFAULT).replace(/\/+$/,"")}var CONFIG_TIMEOUT_MS=5000;function cloudOrigin(baseUrl){return new URL(baseUrl).origin}async function fetchCloudAppUrl(baseUrl,timeoutMs=CONFIG_TIMEOUT_MS){let fallback=cloudOrigin(baseUrl),res;try{res=await fetch(`${fallback}/v1/auth/config`,{signal:AbortSignal.timeout(timeoutMs)})}catch{return fallback}if(!res.ok)return fallback;let config=await cloudJson(res,AuthConfigResponseSchema,"reading the cloud's config");if(!config.ok||config.value.appUrl===void 0)return fallback;try{let advertised=new URL(config.value.appUrl).origin;return isSecureCloudUrl(advertised)?advertised:fallback}catch{return fallback}}async function publishedBoardsUrl(baseUrl){return`${await fetchCloudAppUrl(baseUrl)}/boards`}async function billingPageUrl(baseUrl){return`${await fetchCloudAppUrl(baseUrl)}/billing`}var LOOPBACK=new Set(["localhost","127.0.0.1","::1","[::1]"]);function isSecureCloudUrl(cloudUrl){try{let u=new URL(cloudUrl);if(u.protocol==="https:")return!0;return u.protocol==="http:"&&LOOPBACK.has(u.hostname)}catch{return!1}}function assertSecureCloudUrl(cloudUrl){if(!isSecureCloudUrl(cloudUrl))throw Error(`refusing to send credentials to a non-HTTPS cloud URL: ${cloudUrl} (use https:// or a loopback host)`)}async function checkCloudHealth(baseUrl){let res;try{res=await fetch(`${baseUrl}/health`,{signal:AbortSignal.timeout(8000)})}catch(error){return{status:"unreachable",reason:error instanceof Error?error.message:String(error)}}let health=await cloudJson(res,HealthResponseSchema,"reading the cloud's health");if(!health.ok||health.value.ok!==!1)return{status:"ok"};let down=[health.value.db?.ok===!1?"database":null,health.value.blob?.ok===!1?"storage backend":null].filter((part)=>part!==null);return{status:"unhealthy",detail:`the cloud's ${down.length>0?down.join(" and "):"a dependency"} is unavailable \u2014 publishes and share links are down; try again later.`}}
2
+ import{AuthConfigResponseSchema,HealthResponseSchema,cloudJson}from"./chunk-bys7pqdb.js";var BUILT_DEFAULT="https://api.velloo.ai";function defaultCloudUrl(){return(process.env.VELLOO_CLOUD_URL??BUILT_DEFAULT).replace(/\/+$/,"")}var CONFIG_TIMEOUT_MS=5000;function cloudOrigin(baseUrl){return new URL(baseUrl).origin}async function fetchCloudAppUrl(baseUrl,timeoutMs=CONFIG_TIMEOUT_MS){let fallback=cloudOrigin(baseUrl),res;try{res=await fetch(`${fallback}/v1/auth/config`,{signal:AbortSignal.timeout(timeoutMs)})}catch{return fallback}if(!res.ok)return fallback;let config=await cloudJson(res,AuthConfigResponseSchema,"reading the cloud's config");if(!config.ok||config.value.appUrl===void 0)return fallback;try{let advertised=new URL(config.value.appUrl).origin;return isSecureCloudUrl(advertised)?advertised:fallback}catch{return fallback}}async function publishedBoardsUrl(baseUrl){return`${await fetchCloudAppUrl(baseUrl)}/boards`}async function billingPageUrl(baseUrl){return`${await fetchCloudAppUrl(baseUrl)}/billing`}var LOOPBACK=new Set(["localhost","127.0.0.1","::1","[::1]"]);function isSecureCloudUrl(cloudUrl){try{let u=new URL(cloudUrl);if(u.protocol==="https:")return!0;return u.protocol==="http:"&&LOOPBACK.has(u.hostname)}catch{return!1}}function assertSecureCloudUrl(cloudUrl){if(!isSecureCloudUrl(cloudUrl))throw Error(`refusing to send credentials to a non-HTTPS cloud URL: ${cloudUrl} (use https:// or a loopback host)`)}async function checkCloudHealth(baseUrl){let res;try{res=await fetch(`${baseUrl}/health`,{signal:AbortSignal.timeout(8000)})}catch(error){return{status:"unreachable",reason:error instanceof Error?error.message:String(error)}}let health=await cloudJson(res,HealthResponseSchema,"reading the cloud's health");if(!health.ok||health.value.ok!==!1)return{status:"ok"};let down=[health.value.db?.ok===!1?"database":null,health.value.blob?.ok===!1?"storage backend":null].filter((part)=>part!==null);return{status:"unhealthy",detail:`the cloud's ${down.length>0?down.join(" and "):"a dependency"} is unavailable \u2014 publishes and share links are down; try again later.`}}
3
3
  export{defaultCloudUrl,fetchCloudAppUrl,publishedBoardsUrl,billingPageUrl,isSecureCloudUrl,assertSecureCloudUrl,checkCloudHealth};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- import{fail,failWithError}from"./chunk-s23gtejf.js";import{firstPositional}from"./chunk-94vx1yb0.js";import{traceEnabled}from"./chunk-6tx68d90.js";var TOLERATED={upgrade:["folder-only"]},BUILTIN_FLAGS=["help","h","version","v"],camel=(name)=>name.replace(/-([a-z0-9])/g,(_,c)=>c.toUpperCase()),kebab=(name)=>name.replace(/[A-Z]/g,(c)=>`-${c.toLowerCase()}`);async function knownFlags(args){let defs=(typeof args==="function"?await args():await args)??{},known=new Set(BUILTIN_FLAGS);for(let[name,def]of Object.entries(defs)){if(def.type==="positional")continue;let alias="alias"in def?def.alias:void 0;for(let spelling of[name,...alias===void 0?[]:[alias].flat()])known.add(spelling),known.add(camel(spelling)),known.add(kebab(spelling))}return known}function flagsIn(rawArgs){let flags=[];for(let token of rawArgs){if(token==="--")break;if(!token.startsWith("-")||token==="-"||/^-\d/.test(token))continue;if(token.startsWith("--")){let name=token.slice(2).split("=")[0]??"";flags.push(name.startsWith("no-")?name.slice(3):name)}else flags.push(...token.slice(1).split("=")[0]?.split("")??[])}return flags}function strictFlags(name,cmd){let subCommands=cmd.subCommands,table=async()=>typeof subCommands==="function"?await subCommands():await subCommands,checked=subCommands?{...cmd,subCommands:async()=>Object.fromEntries(Object.entries(await table()??{}).map(([child,load])=>[child,async()=>{let def=typeof load==="function"?await load():await load;return strictFlags(`${name} ${child}`,def)}]))}:cmd;if(subCommands&&!cmd.run)return checked;let setup=cmd.setup;return{...checked,async setup(context){if(subCommands){let child=await firstPositional(context.rawArgs,cmd.args);if(child!==void 0&&Object.hasOwn(await table()??{},child)){await setup?.(context);return}}let known=await knownFlags(cmd.args),tolerated=TOLERATED[name]??[],unknown=flagsIn(context.rawArgs).filter((flag)=>flag!==""&&!known.has(flag)&&!tolerated.includes(flag));if(unknown.length>0){let listed=[...known].filter((f)=>f.length>1&&!BUILTIN_FLAGS.includes(f)&&f===kebab(f)),hint=listed.length>0?` (it takes ${listed.map((f)=>`--${f}`).join(", ")})`:"";fail(name,`unknown option ${unknown.map((f)=>f.length===1?`-${f}`:`--${f}`).join(", ")}${hint}`)}await setup?.(context)}}}var LOADERS={init:()=>import("./chunk-z73q4dq9.js").then((m)=>m.default),login:()=>import("./chunk-nx09zqgs.js").then((m)=>m.default),logout:()=>import("./chunk-hsfpbjpc.js").then((m)=>m.default),connect:()=>import("./chunk-e2btp1wd.js").then((m)=>m.default),run:()=>import("./chunk-tac2wvc7.js").then((m)=>m.default),design:()=>import("./chunk-tbd6wn3q.js").then((m)=>m.default),mcp:()=>import("./chunk-pxaxgkaq.js").then((m)=>m.default),stop:()=>import("./chunk-52m26hh4.js").then((m)=>m.default),status:()=>import("./chunk-x02z2ccm.js").then((m)=>m.default),__daemon:()=>import("./chunk-g185gx8a.js").then((m)=>m.default),__update_check:()=>import("./chunk-bc7pkjcn.js").then((m)=>m.default),render:()=>import("./chunk-8grzf8q1.js").then((m)=>m.default),capture:()=>import("./chunk-56vfy0db.js").then((m)=>m.default),browser:()=>import("./chunk-c4spp880.js").then((m)=>m.default),export:()=>import("./chunk-wfhv9jg4.js").then((m)=>m.default),upgrade:()=>import("./chunk-2web93qz.js").then((m)=>m.default),publish:()=>import("./chunk-ztsckexy.js").then((m)=>m.default),emit:()=>import("./chunk-ff2vt7cz.js").then((m)=>m.default),theme:()=>import("./chunk-qwccndcd.js").then((m)=>m.default),completions:()=>import("./chunk-eqjtq673.js").then((m)=>m.default),...traceEnabled()?{trace:()=>import("./chunk-63y5gdzw.js").then((m)=>m.default)}:{}};function guarded(name,load){return async()=>{let cmd=strictFlags(name,await load()),run=cmd.run;if(!run)return cmd;return{...cmd,async run(ctx){try{await run(ctx)}catch(err){failWithError(name,err)}}}}}var COMMANDS=Object.fromEntries(Object.entries(LOADERS).map(([name,load])=>[name,guarded(name,load)]));
2
+ import{fail,failWithError}from"./chunk-s23gtejf.js";import{firstPositional}from"./chunk-94vx1yb0.js";import{traceEnabled}from"./chunk-6tx68d90.js";var TOLERATED={upgrade:["folder-only"]},BUILTIN_FLAGS=["help","h","version","v"],camel=(name)=>name.replace(/-([a-z0-9])/g,(_,c)=>c.toUpperCase()),kebab=(name)=>name.replace(/[A-Z]/g,(c)=>`-${c.toLowerCase()}`);async function knownFlags(args){let defs=(typeof args==="function"?await args():await args)??{},known=new Set(BUILTIN_FLAGS);for(let[name,def]of Object.entries(defs)){if(def.type==="positional")continue;let alias="alias"in def?def.alias:void 0;for(let spelling of[name,...alias===void 0?[]:[alias].flat()])known.add(spelling),known.add(camel(spelling)),known.add(kebab(spelling))}return known}function flagsIn(rawArgs){let flags=[];for(let token of rawArgs){if(token==="--")break;if(!token.startsWith("-")||token==="-"||/^-\d/.test(token))continue;if(token.startsWith("--")){let name=token.slice(2).split("=")[0]??"";flags.push(name.startsWith("no-")?name.slice(3):name)}else flags.push(...token.slice(1).split("=")[0]?.split("")??[])}return flags}function strictFlags(name,cmd){let subCommands=cmd.subCommands,table=async()=>typeof subCommands==="function"?await subCommands():await subCommands,checked=subCommands?{...cmd,subCommands:async()=>Object.fromEntries(Object.entries(await table()??{}).map(([child,load])=>[child,async()=>{let def=typeof load==="function"?await load():await load;return strictFlags(`${name} ${child}`,def)}]))}:cmd;if(subCommands&&!cmd.run)return checked;let setup=cmd.setup;return{...checked,async setup(context){if(subCommands){let child=await firstPositional(context.rawArgs,cmd.args);if(child!==void 0&&Object.hasOwn(await table()??{},child)){await setup?.(context);return}}let known=await knownFlags(cmd.args),tolerated=TOLERATED[name]??[],unknown=flagsIn(context.rawArgs).filter((flag)=>flag!==""&&!known.has(flag)&&!tolerated.includes(flag));if(unknown.length>0){let listed=[...known].filter((f)=>f.length>1&&!BUILTIN_FLAGS.includes(f)&&f===kebab(f)),hint=listed.length>0?` (it takes ${listed.map((f)=>`--${f}`).join(", ")})`:"";fail(name,`unknown option ${unknown.map((f)=>f.length===1?`-${f}`:`--${f}`).join(", ")}${hint}`)}await setup?.(context)}}}var LOADERS={init:()=>import("./chunk-jbgde2v9.js").then((m)=>m.default),login:()=>import("./chunk-gfppsgvv.js").then((m)=>m.default),logout:()=>import("./chunk-srp5gyr1.js").then((m)=>m.default),connect:()=>import("./chunk-dvh0b2r4.js").then((m)=>m.default),run:()=>import("./chunk-g7d065ek.js").then((m)=>m.default),design:()=>import("./chunk-ykpctq15.js").then((m)=>m.default),mcp:()=>import("./chunk-sme6hv6f.js").then((m)=>m.default),stop:()=>import("./chunk-d0j8dg1e.js").then((m)=>m.default),status:()=>import("./chunk-667ag8ts.js").then((m)=>m.default),__daemon:()=>import("./chunk-qqrac4va.js").then((m)=>m.default),__update_check:()=>import("./chunk-gbq5wv7x.js").then((m)=>m.default),render:()=>import("./chunk-rqd4swxx.js").then((m)=>m.default),capture:()=>import("./chunk-fvezyap4.js").then((m)=>m.default),browser:()=>import("./chunk-5s1wjhtj.js").then((m)=>m.default),export:()=>import("./chunk-qp3wahg4.js").then((m)=>m.default),upgrade:()=>import("./chunk-sjjnm4a1.js").then((m)=>m.default),publish:()=>import("./chunk-7gyzh0vq.js").then((m)=>m.default),emit:()=>import("./chunk-d93kpv7s.js").then((m)=>m.default),theme:()=>import("./chunk-j306gr0c.js").then((m)=>m.default),completions:()=>import("./chunk-vdbr81a3.js").then((m)=>m.default),...traceEnabled()?{trace:()=>import("./chunk-531xzfq5.js").then((m)=>m.default)}:{}};function guarded(name,load){return async()=>{let cmd=strictFlags(name,await load()),run=cmd.run;if(!run)return cmd;return{...cmd,async run(ctx){try{await run(ctx)}catch(err){failWithError(name,err)}}}}}var COMMANDS=Object.fromEntries(Object.entries(LOADERS).map(([name,load])=>[name,guarded(name,load)]));
3
3
  export{COMMANDS};
@@ -1,4 +1,4 @@
1
1
  // @bun
2
- import{isCancel,select}from"./chunk-80fjfyha.js";import{preflightScreens}from"./chunk-yfvc8d2g.js";import{fail}from"./chunk-s23gtejf.js";import{copyToClipboard}from"./chunk-vbk1qhdz.js";import{require_picocolors}from"./chunk-jrsknzjt.js";import{__toESM}from"./chunk-2smsg2ct.js";import{stripVTControlCharacters}from"util";var import_picocolors=__toESM(require_picocolors(),1);function plural(count,noun){return`${count} ${noun}${count===1?"":"s"}`}function formatFailures(command,failures){let byScreen=new Map;for(let failure of failures)byScreen.set(failure.screenId,[...byScreen.get(failure.screenId)??[],failure]);let notDrawn=[...byScreen.values()].filter((group)=>group.some((failure)=>failure.componentId===null)),placeholders=[...byScreen.values()].filter((group)=>!notDrawn.includes(group)).reduce((sum,group)=>sum+group.length,0),consequences=[placeholders>0&&`${plural(placeholders,"component")} will appear as placeholders`,notDrawn.length>0&&`${plural(notDrawn.length,"screen")} will not render at all`].filter(Boolean),lines=[`${import_picocolors.default.yellow(`velloo ${command}:`)} render failures on ${plural(byScreen.size,"screen")} \u2014 ${consequences.join(", and ")}:`];for(let group of byScreen.values()){let[first]=group;if(!first)continue;let boards=first.boards.length>0?first.boards.map((board)=>board.name).join(", "):"no board";lines.push("",` ${import_picocolors.default.dim(`${boards} \u203A`)} ${import_picocolors.default.bold(first.screenName)} ${import_picocolors.default.dim(`(${first.screenId})`)}`);let pinned=group.some((failure)=>failure.componentId!==null);for(let failure of group)if(failure.componentId!==null)lines.push(` ${import_picocolors.default.cyan(failure.componentId)}: ${failure.reason}`);else{let label=pinned?"screen not drawn":"screen not drawn \u2014 the error could not be pinned on one component";lines.push(` ${import_picocolors.default.red(label)}: ${failure.reason}`)}}return lines}async function confirmRenderFailures(command,source,screens,yes){let failures=preflightScreens(source,screens);if(failures.length===0)return;let report=formatFailures(command,failures);for(let line of report)console.error(line);if(console.error(""),yes)return;if(!process.stdin.isTTY)fail(command,"refusing to continue \u2014 re-run with --yes to accept the placeholders.");for(;;){let choice=await select({message:"Continue anyway?",options:[{value:"cancel",label:"No, cancel"},{value:"continue",label:"Yes, continue with the failures"},{value:"copy",label:"Copy errors to clipboard"}],initialValue:"cancel"});if(isCancel(choice)||choice==="cancel")fail(command,"cancelled.");if(choice==="continue")return;let copied=await copyToClipboard(stripVTControlCharacters(report.join(`
2
+ import{isCancel,select}from"./chunk-80fjfyha.js";import{preflightScreens}from"./chunk-brnkprt5.js";import{fail}from"./chunk-s23gtejf.js";import{copyToClipboard}from"./chunk-vbk1qhdz.js";import{require_picocolors}from"./chunk-jrsknzjt.js";import{__toESM}from"./chunk-2smsg2ct.js";import{stripVTControlCharacters}from"util";var import_picocolors=__toESM(require_picocolors(),1);function plural(count,noun){return`${count} ${noun}${count===1?"":"s"}`}function formatFailures(command,failures){let byScreen=new Map;for(let failure of failures)byScreen.set(failure.screenId,[...byScreen.get(failure.screenId)??[],failure]);let notDrawn=[...byScreen.values()].filter((group)=>group.some((failure)=>failure.componentId===null)),placeholders=[...byScreen.values()].filter((group)=>!notDrawn.includes(group)).reduce((sum,group)=>sum+group.length,0),consequences=[placeholders>0&&`${plural(placeholders,"component")} will appear as placeholders`,notDrawn.length>0&&`${plural(notDrawn.length,"screen")} will not render at all`].filter(Boolean),lines=[`${import_picocolors.default.yellow(`velloo ${command}:`)} render failures on ${plural(byScreen.size,"screen")} \u2014 ${consequences.join(", and ")}:`];for(let group of byScreen.values()){let[first]=group;if(!first)continue;let boards=first.boards.length>0?first.boards.map((board)=>board.name).join(", "):"no board";lines.push("",` ${import_picocolors.default.dim(`${boards} \u203A`)} ${import_picocolors.default.bold(first.screenName)} ${import_picocolors.default.dim(`(${first.screenId})`)}`);let pinned=group.some((failure)=>failure.componentId!==null);for(let failure of group)if(failure.componentId!==null)lines.push(` ${import_picocolors.default.cyan(failure.componentId)}: ${failure.reason}`);else{let label=pinned?"screen not drawn":"screen not drawn \u2014 the error could not be pinned on one component";lines.push(` ${import_picocolors.default.red(label)}: ${failure.reason}`)}}return lines}async function confirmRenderFailures(command,source,screens,yes){let failures=preflightScreens(source,screens);if(failures.length===0)return;let report=formatFailures(command,failures);for(let line of report)console.error(line);if(console.error(""),yes)return;if(!process.stdin.isTTY)fail(command,"refusing to continue \u2014 re-run with --yes to accept the placeholders.");for(;;){let choice=await select({message:"Continue anyway?",options:[{value:"cancel",label:"No, cancel"},{value:"continue",label:"Yes, continue with the failures"},{value:"copy",label:"Copy errors to clipboard"}],initialValue:"cancel"});if(isCancel(choice)||choice==="cancel")fail(command,"cancelled.");if(choice==="continue")return;let copied=await copyToClipboard(stripVTControlCharacters(report.join(`
3
3
  `)));console.error(copied?` ${import_picocolors.default.green("\u2713")} Errors copied to the clipboard.`:import_picocolors.default.dim(" Couldn't reach a clipboard tool \u2014 copy the errors printed above."))}}
4
4
  export{confirmRenderFailures};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- import{detectTailwindMajor,tsconfigAliases,findDesignSystemIn}from"./chunk-yfvc8d2g.js";import{isServerRenderedApp,hasHtmxMarkup}from"./chunk-nbbnb5e9.js";import{existsSync,readFileSync}from"fs";import{join,posix}from"path";function readJson(path){try{return JSON.parse(readFileSync(path,"utf8"))}catch{return null}}function depRange(deps,name){let v=deps[name];return typeof v==="string"?v:void 0}var REACT_DEPS=["react","react-dom","next","preact","@remix-run/react","react-router"],SCRIPT_UI_DEPS=[...REACT_DEPS,"vue","nuxt","svelte","@sveltejs/kit","@angular/core","solid-js","astro","lit","@builder.io/qwik"];function isStaticSite(appRoot,deps){return existsSync(join(appRoot,"index.html"))&&!SCRIPT_UI_DEPS.some((name)=>depRange(deps,name))}function detectHost(appRoot,repoRoot=appRoot){let pkg=readJson(join(appRoot,"package.json"))??{},deps={...pkg.dependencies??{},...pkg.devDependencies??{}},tailwindMajor=detectTailwindMajor(appRoot),componentsJson=readJson(join(appRoot,"components.json")),shadcn=componentsJson!==null,shadcnStyle=typeof componentsJson?.style==="string"?componentsJson.style:void 0,react=REACT_DEPS.some((name)=>depRange(deps,name)),uiLibrary=depRange(deps,"@mui/material")?"mui":depRange(deps,"antd")?"antd":depRange(deps,"@chakra-ui/react")?"chakra":shadcn?"shadcn":!react&&(depRange(deps,"htmx.org")||depRange(deps,"htmx")||isServerRenderedApp(appRoot)||hasHtmxMarkup(appRoot)||isStaticSite(appRoot,deps))?"html":void 0,unsupportedUi=uiLibrary?void 0:detectUnsupportedUi(deps),designMdPath=findDesignSystemIn([appRoot,repoRoot])??void 0;return{shadcn,shadcnStyle,tailwindMajor,globalsCssPath:findGlobalsCss(appRoot,componentsJson),...designMdPath?{designMdPath}:{},...uiLibrary?{uiLibrary}:{},...unsupportedUi?{unsupportedUi}:{}}}var COMPONENT_DIR_CANDIDATES=["src/components/ui","components/ui","app/components/ui","src/app/components/ui","src/components","components"];function findComponentsDir(appRoot){return componentsJsonUiDir(appRoot)??COMPONENT_DIR_CANDIDATES.find((rel)=>existsSync(join(appRoot,rel)))}function componentsJsonUiDir(appRoot){let aliases=readJson(join(appRoot,"components.json"))?.aliases,ui=typeof aliases?.ui==="string"?aliases.ui:typeof aliases?.components==="string"?`${aliases.components}/ui`:void 0;if(ui===void 0)return;for(let{from,to}of tsconfigAliases(appRoot)){if(!from||!ui.startsWith(from))continue;let rel=posix.normalize(`${to}${ui.slice(from.length)}`).replace(/\/$/,"");if(existsSync(join(appRoot,rel)))return rel}return}function detectUnsupportedUi(deps){let known=[["@mantine/core","Mantine"],["@nextui-org/react","NextUI"],["@heroui/react","HeroUI"],["react-bootstrap","React Bootstrap"],["@fluentui/react-components","Fluent UI"],["@untitledui/icons","Untitled UI"],["@untitledui/file-icons","Untitled UI"],["react-aria-components","React Aria"]];for(let[pkg,label]of known)if(depRange(deps,pkg))return label;return}function findGlobalsCss(appRoot,componentsJson){let candidates=[componentsJson&&typeof componentsJson.tailwind?.css==="string"?componentsJson.tailwind.css:void 0,"src/app/globals.css","app/globals.css","src/styles/globals.css","styles/globals.css","src/index.css","src/globals.css","src/app.css"].filter((c)=>Boolean(c));for(let rel of candidates){let abs=join(appRoot,rel);if(existsSync(abs))return abs}return}
2
+ import{detectTailwindMajor,tsconfigAliases,findDesignSystemIn}from"./chunk-brnkprt5.js";import{isServerRenderedApp,hasHtmxMarkup}from"./chunk-nbbnb5e9.js";import{existsSync,readFileSync}from"fs";import{join,posix}from"path";function readJson(path){try{return JSON.parse(readFileSync(path,"utf8"))}catch{return null}}function depRange(deps,name){let v=deps[name];return typeof v==="string"?v:void 0}var REACT_DEPS=["react","react-dom","next","preact","@remix-run/react","react-router"],SCRIPT_UI_DEPS=[...REACT_DEPS,"vue","nuxt","svelte","@sveltejs/kit","@angular/core","solid-js","astro","lit","@builder.io/qwik"];function isStaticSite(appRoot,deps){return existsSync(join(appRoot,"index.html"))&&!SCRIPT_UI_DEPS.some((name)=>depRange(deps,name))}function detectHost(appRoot,repoRoot=appRoot){let pkg=readJson(join(appRoot,"package.json"))??{},deps={...pkg.dependencies??{},...pkg.devDependencies??{}},tailwindMajor=detectTailwindMajor(appRoot),componentsJson=readJson(join(appRoot,"components.json")),shadcn=componentsJson!==null,shadcnStyle=typeof componentsJson?.style==="string"?componentsJson.style:void 0,react=REACT_DEPS.some((name)=>depRange(deps,name)),uiLibrary=depRange(deps,"@mui/material")?"mui":depRange(deps,"antd")?"antd":depRange(deps,"@chakra-ui/react")?"chakra":shadcn?"shadcn":!react&&(depRange(deps,"htmx.org")||depRange(deps,"htmx")||isServerRenderedApp(appRoot)||hasHtmxMarkup(appRoot)||isStaticSite(appRoot,deps))?"html":void 0,unsupportedUi=uiLibrary?void 0:detectUnsupportedUi(deps),designMdPath=findDesignSystemIn([appRoot,repoRoot])??void 0;return{shadcn,shadcnStyle,tailwindMajor,globalsCssPath:findGlobalsCss(appRoot,componentsJson),...designMdPath?{designMdPath}:{},...uiLibrary?{uiLibrary}:{},...unsupportedUi?{unsupportedUi}:{}}}var COMPONENT_DIR_CANDIDATES=["src/components/ui","components/ui","app/components/ui","src/app/components/ui","src/components","components"];function findComponentsDir(appRoot){return componentsJsonUiDir(appRoot)??COMPONENT_DIR_CANDIDATES.find((rel)=>existsSync(join(appRoot,rel)))}function componentsJsonUiDir(appRoot){let aliases=readJson(join(appRoot,"components.json"))?.aliases,ui=typeof aliases?.ui==="string"?aliases.ui:typeof aliases?.components==="string"?`${aliases.components}/ui`:void 0;if(ui===void 0)return;for(let{from,to}of tsconfigAliases(appRoot)){if(!from||!ui.startsWith(from))continue;let rel=posix.normalize(`${to}${ui.slice(from.length)}`).replace(/\/$/,"");if(existsSync(join(appRoot,rel)))return rel}return}function detectUnsupportedUi(deps){let known=[["@mantine/core","Mantine"],["@nextui-org/react","NextUI"],["@heroui/react","HeroUI"],["react-bootstrap","React Bootstrap"],["@fluentui/react-components","Fluent UI"],["@untitledui/icons","Untitled UI"],["@untitledui/file-icons","Untitled UI"],["react-aria-components","React Aria"]];for(let[pkg,label]of known)if(depRange(deps,pkg))return label;return}function findGlobalsCss(appRoot,componentsJson){let candidates=[componentsJson&&typeof componentsJson.tailwind?.css==="string"?componentsJson.tailwind.css:void 0,"src/app/globals.css","app/globals.css","src/styles/globals.css","styles/globals.css","src/index.css","src/globals.css","src/app.css"].filter((c)=>Boolean(c));for(let rel of candidates){let abs=join(appRoot,rel);if(existsSync(abs))return abs}return}
3
3
  export{detectHost,findComponentsDir};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{helperSourcePath}from"./chunk-yfvc8d2g.js";import"./chunk-8cj4swpr.js";import{snapshotVersion2,entryCssPath3,componentsDir3}from"./chunk-p93x4pn2.js";import{registry2}from"./chunk-69qb8p8s.js";import{TAILWIND_CLASSNAME}from"./chunk-chtv0yj6.js";import"./chunk-56z5xd5b.js";import{readFile}from"fs/promises";import{join}from"path";async function readManifest(cacheDir){let raw=await readFile(join(cacheDir,"manifest.json"),"utf8");return JSON.parse(raw)}import{existsSync as existsSync4,readFileSync as readFileSync4}from"fs";import{basename,join as join5}from"path";import{existsSync as existsSync3,readFileSync as readFileSync3}from"fs";import{join as join4}from"path";import{existsSync,readFileSync}from"fs";import{join as join2}from"path";function exportsName(source,id){let name=id.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");if(new RegExp(`\\bexport\\s+(?:async\\s+)?(?:function|const|let|var|class)\\s+${name}\\b`).test(source))return!0;for(let match of source.matchAll(/\bexport\s*\{([^}]*)\}/g)){let clause=match[1]??"";for(let part of clause.split(",")){let local=part.trim().split(/\s+as\s+/);if((local.length>1?local[1]:local[0])?.trim()===id)return!0}}return/\bexport\s+\*\s+from\b/.test(source)}function hostComponentFile(uiDir,addName,id){for(let extension of["tsx","ts","jsx","js"]){let path=join2(uiDir,`${addName}.${extension}`);if(!existsSync(path))continue;try{return exportsName(readFileSync(path,"utf8"),id)?path:null}catch{return null}}return null}import{existsSync as existsSync2,readdirSync,readFileSync as readFileSync2}from"fs";import{join as join3,resolve}from"path";function kebab(id){return id.replace(/(?<!^)(?=[A-Z])/g,"-").toLowerCase()}function addNameIndex(manifest){let byId=new Map(manifest.flatMap((c)=>c.registryName?[[c.id,c.registryName]]:[]));return(id)=>byId.get(id)??kebab(id)}function findUiDir(hostAppRoot){let candidates=[];try{let cj=JSON.parse(readFileSync2(join3(hostAppRoot,"components.json"),"utf8")),fromAlias=(alias,suffix="")=>{if(!alias)return;let srcBase=existsSync2(join3(hostAppRoot,"src"))?"src":"",rel=alias.replace(/^@\//,srcBase?`${srcBase}/`:"")+suffix;candidates.push(resolve(hostAppRoot,rel))};fromAlias(cj.aliases?.ui),fromAlias(cj.aliases?.components,"/ui")}catch{}candidates.push(resolve(hostAppRoot,"src/components/ui"),resolve(hostAppRoot,"components/ui"),resolve(hostAppRoot,"app/components/ui"));for(let dir of candidates)if(existsSync2(dir))return dir;return null}function installedAddNames(dir){if(!dir)return new Set;try{return new Set(readdirSync(dir).filter((f)=>f.endsWith(".tsx")||f.endsWith(".ts")).map((f)=>f.replace(/\.(tsx|ts)$/,"")))}catch{return new Set}}function enrichManifestFromHost(manifest,uiDir){if(!uiDir)return manifest;let addNameOf=addNameIndex(manifest),byFile=new Map,read=(addName)=>{if(byFile.has(addName))return byFile.get(addName)??null;for(let ext of["tsx","ts","jsx","js"]){let path=join4(uiDir,`${addName}.${ext}`);if(!existsSync3(path))continue;let source=readFileSync3(path,"utf8");return byFile.set(addName,source),source}return byFile.set(addName,""),null};return manifest.map((descriptor)=>{if(descriptor.source==="velloo")return descriptor;let source=read(addNameOf(descriptor.id));if(!source||!exportsName(source,descriptor.id))return descriptor;let additions=[...variantPropsFor(source,descriptor.id===descriptor.family),...declaredPropsFor(source,descriptor.id)];if(additions.length===0)return descriptor;let props=[...descriptor.props];for(let addition of additions){let index=props.findIndex((prop)=>prop.name===addition.name);if(index>=0)props[index]={...props[index],...addition};else props.push(addition)}return{...descriptor,props,designModeNotes:appendNote(descriptor.designModeNotes,"Props include variants detected from the app's component source.")}})}function appendNote(current,next){return current?`${current} ${next}`:next}function variantPropsFor(source,primary){let out=[];if(!primary)return out;let variantsAt=source.indexOf("variants:");if(variantsAt<0)return out;let open=source.indexOf("{",variantsAt),block=balancedBlock(source,open);if(!block)return out;for(let[name,value]of objectEntries(block.slice(1,-1))){let values=objectEntries(value.slice(1,-1)).map(([key])=>key);if(values.length===0)continue;out.push({name,type:`${values.map((value)=>JSON.stringify(value)).join(" | ")} | undefined`,optional:!0,control:"enum",enumValues:values,...defaultVariant(source,name)?{defaultValue:defaultVariant(source,name)}:{}})}return out}function defaultVariant(source,name){let at=source.indexOf("defaultVariants:");if(at<0)return;let open=source.indexOf("{",at),block=balancedBlock(source,open);if(!block)return;return objectEntries(block.slice(1,-1)).find(([key])=>key===name)?.[1].replace(/["'`\s]/g,"")}function declaredPropsFor(source,componentId){let match=[new RegExp(`interface\\s+${componentId}Props(?:\\s+extends[^\\{]+)?\\s*\\{`,"m"),new RegExp(`type\\s+${componentId}Props\\s*=.*?&\\s*\\{`,"m")].map((pattern)=>pattern.exec(source)).find(Boolean);if(!match||match.index===void 0)return[];let open=source.indexOf("{",match.index),block=balancedBlock(source,open);if(!block)return[];let out=[],property=/(?:^|[;{\n])\s*([A-Za-z_$][\w$]*)(\?)?\s*:\s*([^;\n}]+)/gm;for(let found of block.slice(1,-1).matchAll(property)){let name=found[1],raw=found[3]?.trim();if(!name||!raw||name==="children")continue;let enumValues=[...raw.matchAll(/["']([^"']+)["']/g)].map((value)=>value[1]),optional=found[2]==="?"||raw.includes("undefined");out.push({name,type:optional&&!raw.includes("undefined")?`${raw} | undefined`:raw,optional,control:enumValues.length>0?"enum":/boolean/.test(raw)?"boolean":/number/.test(raw)?"number":"string",...enumValues.length>0?{enumValues}:{}})}return out}function balancedBlock(source,open){if(open<0||source[open]!=="{")return null;let depth=0,quote="";for(let index=open;index<source.length;index++){let char=source[index],prev=source[index-1];if(quote){if(char===quote&&prev!=="\\")quote="";continue}if(char==='"'||char==="'"||char==="`"){quote=char;continue}if(char==="{")depth++;if(char==="}"&&--depth===0)return source.slice(open,index+1)}return null}function objectEntries(body){let out=[],index=0;while(index<body.length){while(index<body.length&&/[\s,]/.test(body[index]))index++;let keyMatch=/^(?:["']([^"']+)["']|([A-Za-z_$][\w$-]*))\s*:/.exec(body.slice(index));if(!keyMatch)break;let key=keyMatch[1]??keyMatch[2];if(!key)break;index+=keyMatch[0].length;while(/\s/.test(body[index]??""))index++;if(body[index]==="{"){let block=balancedBlock(body,index);if(!block)break;out.push([key,block]),index+=block.length;continue}let end=valueEnd(body,index);out.push([key,body.slice(index,end).trim()]),index=end+1}return out}function valueEnd(body,start){let quote="",depth=0;for(let index=start;index<body.length;index++){let char=body[index];if(quote){if(char===quote&&body[index-1]!=="\\")quote=""}else if(char==='"'||char==="'"||char==="`")quote=char;else if("([{".includes(char))depth++;else if(")]}".includes(char))depth--;else if(char===","&&depth===0)return index}return body.length}function createProvider(opts={}){let cacheDir=opts.cacheDir,plannedUiDir=cacheDir?join5(cacheDir,"ui"):void 0,hostUiDir=()=>plannedUiDir&&existsSync4(plannedUiDir)?plannedUiDir:opts.hostAppRoot?findUiDir(opts.hostAppRoot):null,componentsDir=componentsDir3,version=opts.version??snapshotVersion2,loadManifest=async()=>{if(cacheDir&&existsSync4(join5(cacheDir,"manifest.json")))return enrichManifestFromHost(await readManifest(cacheDir),hostUiDir());let{loadManifest:snapshotManifest}=await import("./chunk-2q561dec.js");return enrichManifestFromHost(await snapshotManifest(),hostUiDir())};return{id:"shadcn-upstream",version,componentsDir,styleEntryPath:entryCssPath3,registry:registry2,loadManifest,label:`shadcn (upstream @ ${version})`,styleChannel:TAILWIND_CLASSNAME,styleChannels:["tailwind-classname"],mcpIntro:()=>['**This folder targets shadcn/ui with Tailwind.** The canvas imports client-safe components directly from the app\'s `components/ui`, adapts overlay families to stay inline, and falls back per component when a file is missing \u2014 `component_status` says which, before you claim fidelity. Style with a className string: `update_props { style: "flex gap-4 p-6" }`.',""],catalog:async()=>{let manifest=await loadManifest(),addNameOf=addNameIndex(manifest),shadcn=manifest.filter((c)=>c.source!=="velloo"),present=installedAddNames(hostUiDir());return shadcn.map((c)=>{let addName=addNameOf(c.id);return{id:c.id,installed:present.has(addName),importPath:`@/components/ui/${addName}`}})},ownedModules:{dirs:()=>{let uiDir=hostUiDir();return uiDir?[uiDir]:[]},supplies:(file,exportName)=>{let family=basename(file).replace(/\.[jt]sx?$/,""),counterpart=join5(componentsDir3,"ui",`${family}.tsx`);return familyExports(counterpart).has(exportName)}},canvasBundleSpec:{styleRuntime:{kind:"none"},components:async(ids)=>{let manifest=await loadManifest(),addNameOf=addNameIndex(manifest),sourceById=new Map(manifest.map((entry)=>[entry.id,entry.source])),uiDir=hostUiDir();return ids.flatMap((id)=>{if(sourceById.get(id)==="velloo"){let path=helperSourcePath(id);return path?[{id,sources:[{importPath:path,exportName:id,fidelity:"exact",note:"Velloo helper, mounted beside the app's components."}]}]:[]}if(!sourceById.has(id))return[];let addName=addNameOf(id),snapshotPath=join5(componentsDir3,"ui",`${addName}.tsx`);if(CANVAS_ADAPTED_FAMILIES.has(addName))return[{id,sources:[{importPath:snapshotPath,exportName:id,fidelity:"adapted",note:"The app component uses portals or runtime state; Velloo renders its canvas-safe counterpart inline."}]}];let hostPath=uiDir?hostComponentFile(uiDir,addName,id):null;return[{id,sources:[...hostPath?[{importPath:hostPath,exportName:id,fidelity:"exact",preflight:!0,note:"Rendered directly from the app's shadcn source file."}]:[],{importPath:snapshotPath,exportName:id,fidelity:"fallback",note:hostPath?"The app source did not compile for the browser canvas; using the bundled canvas fallback.":"The app does not install this component under this name (it may be renamed in its own file); using the bundled canvas fallback."}]}]})},sourceDirs:()=>{let uiDir=hostUiDir()??plannedUiDir;return uiDir?[uiDir]:[]}}}}var CANVAS_ADAPTED_FAMILIES=new Set(["alert-dialog","calendar","carousel","chart","dialog","dropdown-menu","popover","select","sheet","sonner","tooltip"]),familyExportCache=new Map;function familyExports(path){let names=familyExportCache.get(path);if(!names){names=new Set;try{let source=readFileSync4(path,"utf8");for(let id of Object.keys(registry2))if(exportsName(source,id))names.add(id)}catch{}familyExportCache.set(path,names)}return names}export{createProvider};
2
+ import{helperSourcePath}from"./chunk-brnkprt5.js";import"./chunk-5x4nw0zz.js";import{snapshotVersion2,entryCssPath3,componentsDir3}from"./chunk-p93x4pn2.js";import{registry2}from"./chunk-xg71h7nb.js";import{TAILWIND_CLASSNAME}from"./chunk-ex36z3b3.js";import"./chunk-0e5j6nqs.js";import{readFile}from"fs/promises";import{join}from"path";async function readManifest(cacheDir){let raw=await readFile(join(cacheDir,"manifest.json"),"utf8");return JSON.parse(raw)}import{existsSync as existsSync4,readFileSync as readFileSync4}from"fs";import{basename,join as join5}from"path";import{existsSync as existsSync3,readFileSync as readFileSync3}from"fs";import{join as join4}from"path";import{existsSync,readFileSync}from"fs";import{join as join2}from"path";function exportsName(source,id){let name=id.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");if(new RegExp(`\\bexport\\s+(?:async\\s+)?(?:function|const|let|var|class)\\s+${name}\\b`).test(source))return!0;for(let match of source.matchAll(/\bexport\s*\{([^}]*)\}/g)){let clause=match[1]??"";for(let part of clause.split(",")){let local=part.trim().split(/\s+as\s+/);if((local.length>1?local[1]:local[0])?.trim()===id)return!0}}return/\bexport\s+\*\s+from\b/.test(source)}function hostComponentFile(uiDir,addName,id){for(let extension of["tsx","ts","jsx","js"]){let path=join2(uiDir,`${addName}.${extension}`);if(!existsSync(path))continue;try{return exportsName(readFileSync(path,"utf8"),id)?path:null}catch{return null}}return null}import{existsSync as existsSync2,readdirSync,readFileSync as readFileSync2}from"fs";import{join as join3,resolve}from"path";function kebab(id){return id.replace(/(?<!^)(?=[A-Z])/g,"-").toLowerCase()}function addNameIndex(manifest){let byId=new Map(manifest.flatMap((c)=>c.registryName?[[c.id,c.registryName]]:[]));return(id)=>byId.get(id)??kebab(id)}function findUiDir(hostAppRoot){let candidates=[];try{let cj=JSON.parse(readFileSync2(join3(hostAppRoot,"components.json"),"utf8")),fromAlias=(alias,suffix="")=>{if(!alias)return;let srcBase=existsSync2(join3(hostAppRoot,"src"))?"src":"",rel=alias.replace(/^@\//,srcBase?`${srcBase}/`:"")+suffix;candidates.push(resolve(hostAppRoot,rel))};fromAlias(cj.aliases?.ui),fromAlias(cj.aliases?.components,"/ui")}catch{}candidates.push(resolve(hostAppRoot,"src/components/ui"),resolve(hostAppRoot,"components/ui"),resolve(hostAppRoot,"app/components/ui"));for(let dir of candidates)if(existsSync2(dir))return dir;return null}function installedAddNames(dir){if(!dir)return new Set;try{return new Set(readdirSync(dir).filter((f)=>f.endsWith(".tsx")||f.endsWith(".ts")).map((f)=>f.replace(/\.(tsx|ts)$/,"")))}catch{return new Set}}function enrichManifestFromHost(manifest,uiDir){if(!uiDir)return manifest;let addNameOf=addNameIndex(manifest),byFile=new Map,read=(addName)=>{if(byFile.has(addName))return byFile.get(addName)??null;for(let ext of["tsx","ts","jsx","js"]){let path=join4(uiDir,`${addName}.${ext}`);if(!existsSync3(path))continue;let source=readFileSync3(path,"utf8");return byFile.set(addName,source),source}return byFile.set(addName,""),null};return manifest.map((descriptor)=>{if(descriptor.source==="velloo")return descriptor;let source=read(addNameOf(descriptor.id));if(!source||!exportsName(source,descriptor.id))return descriptor;let additions=[...variantPropsFor(source,descriptor.id===descriptor.family),...declaredPropsFor(source,descriptor.id)];if(additions.length===0)return descriptor;let props=[...descriptor.props];for(let addition of additions){let index=props.findIndex((prop)=>prop.name===addition.name);if(index>=0)props[index]={...props[index],...addition};else props.push(addition)}return{...descriptor,props,designModeNotes:appendNote(descriptor.designModeNotes,"Props include variants detected from the app's component source.")}})}function appendNote(current,next){return current?`${current} ${next}`:next}function variantPropsFor(source,primary){let out=[];if(!primary)return out;let variantsAt=source.indexOf("variants:");if(variantsAt<0)return out;let open=source.indexOf("{",variantsAt),block=balancedBlock(source,open);if(!block)return out;for(let[name,value]of objectEntries(block.slice(1,-1))){let values=objectEntries(value.slice(1,-1)).map(([key])=>key);if(values.length===0)continue;out.push({name,type:`${values.map((value)=>JSON.stringify(value)).join(" | ")} | undefined`,optional:!0,control:"enum",enumValues:values,...defaultVariant(source,name)?{defaultValue:defaultVariant(source,name)}:{}})}return out}function defaultVariant(source,name){let at=source.indexOf("defaultVariants:");if(at<0)return;let open=source.indexOf("{",at),block=balancedBlock(source,open);if(!block)return;return objectEntries(block.slice(1,-1)).find(([key])=>key===name)?.[1].replace(/["'`\s]/g,"")}function declaredPropsFor(source,componentId){let match=[new RegExp(`interface\\s+${componentId}Props(?:\\s+extends[^\\{]+)?\\s*\\{`,"m"),new RegExp(`type\\s+${componentId}Props\\s*=.*?&\\s*\\{`,"m")].map((pattern)=>pattern.exec(source)).find(Boolean);if(!match||match.index===void 0)return[];let open=source.indexOf("{",match.index),block=balancedBlock(source,open);if(!block)return[];let out=[],property=/(?:^|[;{\n])\s*([A-Za-z_$][\w$]*)(\?)?\s*:\s*([^;\n}]+)/gm;for(let found of block.slice(1,-1).matchAll(property)){let name=found[1],raw=found[3]?.trim();if(!name||!raw||name==="children")continue;let enumValues=[...raw.matchAll(/["']([^"']+)["']/g)].map((value)=>value[1]),optional=found[2]==="?"||raw.includes("undefined");out.push({name,type:optional&&!raw.includes("undefined")?`${raw} | undefined`:raw,optional,control:enumValues.length>0?"enum":/boolean/.test(raw)?"boolean":/number/.test(raw)?"number":"string",...enumValues.length>0?{enumValues}:{}})}return out}function balancedBlock(source,open){if(open<0||source[open]!=="{")return null;let depth=0,quote="";for(let index=open;index<source.length;index++){let char=source[index],prev=source[index-1];if(quote){if(char===quote&&prev!=="\\")quote="";continue}if(char==='"'||char==="'"||char==="`"){quote=char;continue}if(char==="{")depth++;if(char==="}"&&--depth===0)return source.slice(open,index+1)}return null}function objectEntries(body){let out=[],index=0;while(index<body.length){while(index<body.length&&/[\s,]/.test(body[index]))index++;let keyMatch=/^(?:["']([^"']+)["']|([A-Za-z_$][\w$-]*))\s*:/.exec(body.slice(index));if(!keyMatch)break;let key=keyMatch[1]??keyMatch[2];if(!key)break;index+=keyMatch[0].length;while(/\s/.test(body[index]??""))index++;if(body[index]==="{"){let block=balancedBlock(body,index);if(!block)break;out.push([key,block]),index+=block.length;continue}let end=valueEnd(body,index);out.push([key,body.slice(index,end).trim()]),index=end+1}return out}function valueEnd(body,start){let quote="",depth=0;for(let index=start;index<body.length;index++){let char=body[index];if(quote){if(char===quote&&body[index-1]!=="\\")quote=""}else if(char==='"'||char==="'"||char==="`")quote=char;else if("([{".includes(char))depth++;else if(")]}".includes(char))depth--;else if(char===","&&depth===0)return index}return body.length}function createProvider(opts={}){let cacheDir=opts.cacheDir,plannedUiDir=cacheDir?join5(cacheDir,"ui"):void 0,hostUiDir=()=>plannedUiDir&&existsSync4(plannedUiDir)?plannedUiDir:opts.hostAppRoot?findUiDir(opts.hostAppRoot):null,componentsDir=componentsDir3,version=opts.version??snapshotVersion2,loadManifest=async()=>{if(cacheDir&&existsSync4(join5(cacheDir,"manifest.json")))return enrichManifestFromHost(await readManifest(cacheDir),hostUiDir());let{loadManifest:snapshotManifest}=await import("./chunk-j4fn2a2b.js");return enrichManifestFromHost(await snapshotManifest(),hostUiDir())};return{id:"shadcn-upstream",version,componentsDir,styleEntryPath:entryCssPath3,registry:registry2,loadManifest,label:`shadcn (upstream @ ${version})`,styleChannel:TAILWIND_CLASSNAME,styleChannels:["tailwind-classname"],mcpIntro:()=>['**This folder targets shadcn/ui with Tailwind.** The canvas imports client-safe components directly from the app\'s `components/ui`, adapts overlay families to stay inline, and falls back per component when a file is missing \u2014 `component_status` says which, before you claim fidelity. Style with a className string: `update_props { style: "flex gap-4 p-6" }`.',""],catalog:async()=>{let manifest=await loadManifest(),addNameOf=addNameIndex(manifest),shadcn=manifest.filter((c)=>c.source!=="velloo"),present=installedAddNames(hostUiDir());return shadcn.map((c)=>{let addName=addNameOf(c.id);return{id:c.id,installed:present.has(addName),importPath:`@/components/ui/${addName}`}})},ownedModules:{dirs:()=>{let uiDir=hostUiDir();return uiDir?[uiDir]:[]},supplies:(file,exportName)=>{let family=basename(file).replace(/\.[jt]sx?$/,""),counterpart=join5(componentsDir3,"ui",`${family}.tsx`);return familyExports(counterpart).has(exportName)}},canvasBundleSpec:{styleRuntime:{kind:"none"},components:async(ids)=>{let manifest=await loadManifest(),addNameOf=addNameIndex(manifest),sourceById=new Map(manifest.map((entry)=>[entry.id,entry.source])),uiDir=hostUiDir();return ids.flatMap((id)=>{if(sourceById.get(id)==="velloo"){let path=helperSourcePath(id);return path?[{id,sources:[{importPath:path,exportName:id,fidelity:"exact",note:"Velloo helper, mounted beside the app's components."}]}]:[]}if(!sourceById.has(id))return[];let addName=addNameOf(id),snapshotPath=join5(componentsDir3,"ui",`${addName}.tsx`);if(CANVAS_ADAPTED_FAMILIES.has(addName))return[{id,sources:[{importPath:snapshotPath,exportName:id,fidelity:"adapted",note:"The app component uses portals or runtime state; Velloo renders its canvas-safe counterpart inline."}]}];let hostPath=uiDir?hostComponentFile(uiDir,addName,id):null;return[{id,sources:[...hostPath?[{importPath:hostPath,exportName:id,fidelity:"exact",preflight:!0,note:"Rendered directly from the app's shadcn source file."}]:[],{importPath:snapshotPath,exportName:id,fidelity:"fallback",note:hostPath?"The app source did not compile for the browser canvas; using the bundled canvas fallback.":"The app does not install this component under this name (it may be renamed in its own file); using the bundled canvas fallback."}]}]})},sourceDirs:()=>{let uiDir=hostUiDir()??plannedUiDir;return uiDir?[uiDir]:[]}}}}var CANVAS_ADAPTED_FAMILIES=new Set(["alert-dialog","calendar","carousel","chart","dialog","dropdown-menu","popover","select","sheet","sonner","tooltip"]),familyExportCache=new Map;function familyExports(path){let names=familyExportCache.get(path);if(!names){names=new Set;try{let source=readFileSync4(path,"utf8");for(let id of Object.keys(registry2))if(exportsName(source,id))names.add(id)}catch{}familyExportCache.set(path,names)}return names}export{createProvider};