@yoopta/themes-shadcn 6.0.0-beta.1 → 6.0.0-beta.10
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.
- package/dist/accordion/elements/accordion-item-heading.d.ts.map +1 -1
- package/dist/accordion.js +1 -0
- package/dist/{withShadcnUI.d.ts → applyTheme.d.ts} +3 -3
- package/dist/applyTheme.d.ts.map +1 -0
- package/dist/blockquote.js +1 -0
- package/dist/callout/elements/callout.d.ts.map +1 -1
- package/dist/callout.js +13 -0
- package/dist/carousel.js +1 -0
- package/dist/chunks/Combination-ee85502b.js +1 -0
- package/dist/chunks/_tslib-35bb891d.js +1 -0
- package/dist/chunks/arrow-right-07affdbc.js +13 -0
- package/dist/chunks/button-ecb0aed1.js +1 -0
- package/dist/chunks/card-94325fef.js +1 -0
- package/dist/chunks/check-9adcfdfa.js +7 -0
- package/dist/chunks/chevron-down-abe5f871.js +7 -0
- package/dist/chunks/chevron-up-5b4801a9.js +7 -0
- package/dist/chunks/code-734dab76.js +7 -0
- package/dist/chunks/createLucideIcon-70ab5429.js +26 -0
- package/dist/chunks/dropdown-menu-b5845753.js +13 -0
- package/dist/chunks/external-link-956d49c0.js +7 -0
- package/dist/chunks/file-text-f268c203.js +7 -0
- package/dist/chunks/hover-card-4448c400.js +1 -0
- package/dist/chunks/index-056e5c06.js +1 -0
- package/dist/chunks/index-13505606.js +1 -0
- package/dist/chunks/index-325e2e09.js +1 -0
- package/dist/chunks/index-3b428d14.js +13 -0
- package/dist/chunks/index-70f4e709.js +1 -0
- package/dist/chunks/index-7725d7e0.js +1 -0
- package/dist/chunks/index-842a4484.js +1 -0
- package/dist/chunks/index-8dc6d938.js +1 -0
- package/dist/chunks/index-91a5b8d5.js +1 -0
- package/dist/chunks/index-aaeb33b0.js +1 -0
- package/dist/chunks/index-b273f426.js +1 -0
- package/dist/chunks/index-e9d6a4a8.js +7 -0
- package/dist/chunks/input-2708c7f4.js +1 -0
- package/dist/chunks/label-a0e6fde2.js +1 -0
- package/dist/chunks/language-select-d2235078.js +7 -0
- package/dist/chunks/play-ae8c52d2.js +7 -0
- package/dist/chunks/plus-0381140e.js +7 -0
- package/dist/chunks/popover-53c769ba.js +1 -0
- package/dist/chunks/scroll-area-f7cd99a3.js +1 -0
- package/dist/chunks/select-c547d76b.js +7 -0
- package/dist/chunks/separator-7be92037.js +1 -0
- package/dist/chunks/sparkles-c8608d1b.js +7 -0
- package/dist/chunks/style-inject.es-e87a8d02.js +1 -0
- package/dist/chunks/tabs-eeea28d9.js +1 -0
- package/dist/chunks/tooltip-bc45d963.js +7 -0
- package/dist/chunks/trash-2-8f855002.js +7 -0
- package/dist/chunks/upload-3b3687f2.js +13 -0
- package/dist/chunks/utils-de9c4c2b.js +1 -0
- package/dist/chunks/x-ec326bc0.js +7 -0
- package/dist/code/elements/code.d.ts.map +1 -1
- package/dist/code/elements/language-select.d.ts.map +1 -1
- package/dist/code-group/elements/code-group-content.d.ts.map +1 -1
- package/dist/code-group/elements/code-group-item-heading.d.ts.map +1 -1
- package/dist/code-group/elements/code-group-list.d.ts.map +1 -1
- package/dist/code-group.js +1 -0
- package/dist/code.js +1 -0
- package/dist/divider/elements/divider.d.ts.map +1 -1
- package/dist/divider.js +1 -0
- package/dist/embed/elements/embed/embed-element.d.ts +3 -0
- package/dist/embed/elements/embed/embed-element.d.ts.map +1 -0
- package/dist/embed/elements/embed/embed-inline-toolbar.d.ts +13 -0
- package/dist/embed/elements/embed/embed-inline-toolbar.d.ts.map +1 -0
- package/dist/embed/elements/embed/embed-placeholder.d.ts +11 -0
- package/dist/embed/elements/embed/embed-placeholder.d.ts.map +1 -0
- package/dist/embed/elements/embed/embed-render.d.ts +18 -0
- package/dist/embed/elements/embed/embed-render.d.ts.map +1 -0
- package/dist/embed/index.d.ts +6 -0
- package/dist/embed/index.d.ts.map +1 -0
- package/dist/embed/types.d.ts +3 -0
- package/dist/embed/types.d.ts.map +1 -0
- package/dist/embed.js +13 -0
- package/dist/file/elements/file/file-element.d.ts +3 -0
- package/dist/file/elements/file/file-element.d.ts.map +1 -0
- package/dist/file/elements/file/file-icons.d.ts +14 -0
- package/dist/file/elements/file/file-icons.d.ts.map +1 -0
- package/dist/file/elements/file/file-inline-toolbar.d.ts +12 -0
- package/dist/file/elements/file/file-inline-toolbar.d.ts.map +1 -0
- package/dist/file/elements/file/file-placeholder.d.ts +15 -0
- package/dist/file/elements/file/file-placeholder.d.ts.map +1 -0
- package/dist/file/elements/file/file-render.d.ts +14 -0
- package/dist/file/elements/file/file-render.d.ts.map +1 -0
- package/dist/file/index.d.ts +6 -0
- package/dist/file/index.d.ts.map +1 -0
- package/dist/file/types.d.ts +3 -0
- package/dist/file/types.d.ts.map +1 -0
- package/dist/file.js +13 -0
- package/dist/headings.js +1 -0
- package/dist/image/elements/image/image-placeholder.d.ts.map +1 -1
- package/dist/image/elements/image/image-render.d.ts +1 -1
- package/dist/image/elements/image/image-render.d.ts.map +1 -1
- package/dist/image.js +7 -0
- package/dist/index.d.ts +8 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -14
- package/dist/link/elements/link/link-element.d.ts.map +1 -1
- package/dist/link/elements/link/link-preview.d.ts.map +1 -1
- package/dist/link.js +7 -0
- package/dist/lists.js +1 -0
- package/dist/mention/elements/mention/mention-avatar.d.ts +10 -0
- package/dist/mention/elements/mention/mention-avatar.d.ts.map +1 -0
- package/dist/mention/elements/mention/mention-dropdown.d.ts +8 -0
- package/dist/mention/elements/mention/mention-dropdown.d.ts.map +1 -0
- package/dist/mention/elements/mention/mention-element.d.ts +3 -0
- package/dist/mention/elements/mention/mention-element.d.ts.map +1 -0
- package/dist/mention/elements/mention/mention-item.d.ts +11 -0
- package/dist/mention/elements/mention/mention-item.d.ts.map +1 -0
- package/dist/mention/index.d.ts +11 -0
- package/dist/mention/index.d.ts.map +1 -0
- package/dist/mention/types.d.ts +17 -0
- package/dist/mention/types.d.ts.map +1 -0
- package/dist/mention.js +13 -0
- package/dist/paragraph.js +1 -0
- package/dist/steps/elements/steps-container.d.ts.map +1 -1
- package/dist/steps/elements/steps-list-item.d.ts.map +1 -1
- package/dist/steps.js +1 -0
- package/dist/table/components/add-column-button.d.ts +1 -3
- package/dist/table/components/add-column-button.d.ts.map +1 -1
- package/dist/table/components/add-row-button.d.ts +1 -3
- package/dist/table/components/add-row-button.d.ts.map +1 -1
- package/dist/table/components/column-controls.d.ts +1 -5
- package/dist/table/components/column-controls.d.ts.map +1 -1
- package/dist/table/components/column-resize-handles.d.ts +6 -0
- package/dist/table/components/column-resize-handles.d.ts.map +1 -0
- package/dist/table/components/row-controls.d.ts +1 -5
- package/dist/table/components/row-controls.d.ts.map +1 -1
- package/dist/table/components/table-controls.d.ts.map +1 -1
- package/dist/table/elements/table-data-cell.d.ts.map +1 -1
- package/dist/table/elements/table.d.ts.map +1 -1
- package/dist/table-of-contents/elements/table-of-contents.d.ts +3 -0
- package/dist/table-of-contents/elements/table-of-contents.d.ts.map +1 -0
- package/dist/table-of-contents/index.d.ts +6 -0
- package/dist/table-of-contents/index.d.ts.map +1 -0
- package/dist/table-of-contents.js +1 -0
- package/dist/table.js +13 -0
- package/dist/tabs/elements/tabs-item-heading.d.ts.map +1 -1
- package/dist/tabs/elements/tabs-list.d.ts.map +1 -1
- package/dist/tabs.js +1 -0
- package/dist/ui/switch.d.ts +5 -0
- package/dist/ui/switch.d.ts.map +1 -0
- package/dist/video/elements/video/video-element.d.ts +3 -0
- package/dist/video/elements/video/video-element.d.ts.map +1 -0
- package/dist/video/elements/video/video-inline-toolbar-settings.d.ts +14 -0
- package/dist/video/elements/video/video-inline-toolbar-settings.d.ts.map +1 -0
- package/dist/video/elements/video/video-inline-toolbar.d.ts +14 -0
- package/dist/video/elements/video/video-inline-toolbar.d.ts.map +1 -0
- package/dist/video/elements/video/video-placeholder.d.ts +16 -0
- package/dist/video/elements/video/video-placeholder.d.ts.map +1 -0
- package/dist/video/elements/video/video-render.d.ts +18 -0
- package/dist/video/elements/video/video-render.d.ts.map +1 -0
- package/dist/video/index.d.ts +6 -0
- package/dist/video/index.d.ts.map +1 -0
- package/dist/video/types.d.ts +4 -0
- package/dist/video/types.d.ts.map +1 -0
- package/dist/video.js +7 -0
- package/package.json +172 -12
- package/dist/withShadcnUI.d.ts.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"accordion-item-heading.d.ts","sourceRoot":"","sources":["../../../src/accordion/elements/accordion-item-heading.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,wBAAwB,EAAgB,MAAM,gBAAgB,CAAC;AAQ7E,eAAO,MAAM,oBAAoB,UAAW,wBAAwB,
|
|
1
|
+
{"version":3,"file":"accordion-item-heading.d.ts","sourceRoot":"","sources":["../../../src/accordion/elements/accordion-item-heading.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,wBAAwB,EAAgB,MAAM,gBAAgB,CAAC;AAQ7E,eAAO,MAAM,oBAAoB,UAAW,wBAAwB,4CA4JnE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as e,jsxs as t}from"react/jsx-runtime";import{_ as n}from"./chunks/_tslib-35bb891d.js";import*as o from"react";import r,{forwardRef as i,useReducer as a,useMemo as s,useCallback as c}from"react";import{c as d,P as l,a as p,b as u,u as f}from"./chunks/index-8dc6d938.js";import{c as m}from"./chunks/index-aaeb33b0.js";import{u as h}from"./chunks/index-91a5b8d5.js";import{u as b}from"./chunks/index-7725d7e0.js";import{u as g}from"./chunks/index-325e2e09.js";import{u as y}from"./chunks/index-13505606.js";import{useYooptaEditor as v,Blocks as k,Elements as x}from"@yoopta/editor";import{Editor as w,Path as j,Transforms as N,Element as C}from"slate";import{P as O}from"./chunks/plus-0381140e.js";import{T as _}from"./chunks/trash-2-8f855002.js";import{C as A}from"./chunks/chevron-down-abe5f871.js";import{s as I}from"./chunks/style-inject.es-e87a8d02.js";import"react-dom";import"./chunks/createLucideIcon-70ab5429.js";var E="Collapsible",[R,D]=d(E),[P,S]=R(E),B=o.forwardRef((t,n)=>{const{__scopeCollapsible:r,open:i,defaultOpen:a,disabled:s,onOpenChange:c,...d}=t,[p,u]=b({prop:i,defaultProp:a??!1,onChange:c,caller:E});return e(P,{scope:r,disabled:s,contentId:g(),open:p,onOpenToggle:o.useCallback(()=>u(e=>!e),[u]),children:e(l.div,{"data-state":F(p),"data-disabled":s?"":void 0,...d,ref:n})})});B.displayName=E;var T="CollapsibleTrigger",V=o.forwardRef((t,n)=>{const{__scopeCollapsible:o,...r}=t,i=S(T,o);return e(l.button,{type:"button","aria-controls":i.contentId,"aria-expanded":i.open||!1,"data-state":F(i.open),"data-disabled":i.disabled?"":void 0,disabled:i.disabled,...r,ref:n,onClick:p(t.onClick,i.onOpenToggle)})});V.displayName=T;var z="CollapsibleContent",H=o.forwardRef((t,n)=>{const{forceMount:o,...r}=t,i=S(z,t.__scopeCollapsible);return e(u,{present:o||i.open,children:({present:t})=>e(L,{...r,ref:n,present:t})})});H.displayName=z;var L=o.forwardRef((t,n)=>{const{__scopeCollapsible:r,present:i,children:a,...s}=t,c=S(z,r),[d,p]=o.useState(i),u=o.useRef(null),m=h(n,u),b=o.useRef(0),g=b.current,y=o.useRef(0),v=y.current,k=c.open||d,x=o.useRef(k),w=o.useRef(void 0);return o.useEffect(()=>{const e=requestAnimationFrame(()=>x.current=!1);return()=>cancelAnimationFrame(e)},[]),f(()=>{const e=u.current;if(e){w.current=w.current||{transitionDuration:e.style.transitionDuration,animationName:e.style.animationName},e.style.transitionDuration="0s",e.style.animationName="none";const t=e.getBoundingClientRect();b.current=t.height,y.current=t.width,x.current||(e.style.transitionDuration=w.current.transitionDuration,e.style.animationName=w.current.animationName),p(i)}},[c.open,i]),e(l.div,{"data-state":F(c.open),"data-disabled":c.disabled?"":void 0,id:c.contentId,hidden:!k,...s,ref:m,style:{"--radix-collapsible-content-height":g?`${g}px`:void 0,"--radix-collapsible-content-width":v?`${v}px`:void 0,...t.style},children:k&&a})});function F(e){return e?"open":"closed"}var K=B,M=V,U=H,$="Accordion",q=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[G,J,Q]=m($),[W,X]=d($,[Q,D]),Y=D(),Z=r.forwardRef((t,n)=>{const{type:o,...r}=t,i=r,a=r;return e(G.Provider,{scope:t.__scopeAccordion,children:"multiple"===o?e(ie,{...a,ref:n}):e(re,{...i,ref:n})})});Z.displayName=$;var[ee,te]=W($),[ne,oe]=W($,{collapsible:!1}),re=r.forwardRef((t,n)=>{const{value:o,defaultValue:i,onValueChange:a=()=>{},collapsible:s=!1,...c}=t,[d,l]=b({prop:o,defaultProp:i??"",onChange:a,caller:$});return e(ee,{scope:t.__scopeAccordion,value:r.useMemo(()=>d?[d]:[],[d]),onItemOpen:l,onItemClose:r.useCallback(()=>s&&l(""),[s,l]),children:e(ne,{scope:t.__scopeAccordion,collapsible:s,children:e(ce,{...c,ref:n})})})}),ie=r.forwardRef((t,n)=>{const{value:o,defaultValue:i,onValueChange:a=()=>{},...s}=t,[c,d]=b({prop:o,defaultProp:i??[],onChange:a,caller:$}),l=r.useCallback(e=>d((t=[])=>[...t,e]),[d]),p=r.useCallback(e=>d((t=[])=>t.filter(t=>t!==e)),[d]);return e(ee,{scope:t.__scopeAccordion,value:c,onItemOpen:l,onItemClose:p,children:e(ne,{scope:t.__scopeAccordion,collapsible:!0,children:e(ce,{...s,ref:n})})})}),[ae,se]=W($),ce=r.forwardRef((t,n)=>{const{__scopeAccordion:o,disabled:i,dir:a,orientation:s="vertical",...c}=t,d=r.useRef(null),u=h(d,n),f=J(o),m="ltr"===y(a),b=p(t.onKeyDown,e=>{if(!q.includes(e.key))return;const t=e.target,n=f().filter(e=>!e.ref.current?.disabled),o=n.findIndex(e=>e.ref.current===t),r=n.length;if(-1===o)return;e.preventDefault();let i=o;const a=r-1,c=()=>{i=o+1,i>a&&(i=0)},d=()=>{i=o-1,i<0&&(i=a)};switch(e.key){case"Home":i=0;break;case"End":i=a;break;case"ArrowRight":"horizontal"===s&&(m?c():d());break;case"ArrowDown":"vertical"===s&&c();break;case"ArrowLeft":"horizontal"===s&&(m?d():c());break;case"ArrowUp":"vertical"===s&&d()}const l=i%r;n[l].ref.current?.focus()});return e(ae,{scope:o,disabled:i,direction:a,orientation:s,children:e(G.Slot,{scope:o,children:e(l.div,{...c,"data-orientation":s,ref:u,onKeyDown:i?void 0:b})})})}),de="AccordionItem",[le,pe]=W(de),ue=r.forwardRef((t,n)=>{const{__scopeAccordion:o,value:r,...i}=t,a=se(de,o),s=te(de,o),c=Y(o),d=g(),l=r&&s.value.includes(r)||!1,p=a.disabled||t.disabled;return e(le,{scope:o,open:l,disabled:p,triggerId:d,children:e(K,{"data-orientation":a.orientation,"data-state":ye(l),...c,...i,ref:n,disabled:p,open:l,onOpenChange:e=>{e?s.onItemOpen(r):s.onItemClose(r)}})})});ue.displayName=de;var fe="AccordionHeader";r.forwardRef((t,n)=>{const{__scopeAccordion:o,...r}=t,i=se($,o),a=pe(fe,o);return e(l.h3,{"data-orientation":i.orientation,"data-state":ye(a.open),"data-disabled":a.disabled?"":void 0,...r,ref:n})}).displayName=fe;var me="AccordionTrigger",he=r.forwardRef((t,n)=>{const{__scopeAccordion:o,...r}=t,i=se($,o),a=pe(me,o),s=oe(me,o),c=Y(o);return e(G.ItemSlot,{scope:o,children:e(M,{"aria-disabled":a.open&&!s.collapsible||void 0,"data-orientation":i.orientation,id:a.triggerId,...c,...r,ref:n})})});he.displayName=me;var be="AccordionContent",ge=r.forwardRef((t,n)=>{const{__scopeAccordion:o,...r}=t,i=se($,o),a=pe(be,o),s=Y(o);return e(U,{role:"region","aria-labelledby":a.triggerId,"data-orientation":i.orientation,...s,...r,ref:n,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...t.style}})});function ye(e){return e?"open":"closed"}ge.displayName=be;var ve=Z,ke=ue,xe=he,we=ge;const je=i((t,o)=>{var{children:r}=t,i=n(t,["children"]);return e(ve,Object.assign({},i,{className:"w-full rounded-md border",ref:o,"data-slot":"accordion"},{children:r}))});je.displayName="Accordion";const Ne=i((t,o)=>{var{children:r}=t,i=n(t,["children"]);return e(ke,Object.assign({},i,{ref:o,"data-slot":"accordion-item",className:"border-b last:border-b-0"},{children:r}))});Ne.displayName="AccordionItem";const Ce=t=>{var{children:o}=t,r=n(t,["children"]);return e(xe,Object.assign({},r,{type:"button",contentEditable:!1,"data-slot":"accordion-trigger",className:"flex shrink-0 items-center justify-center rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50"},{children:o}))},Oe=i((t,o)=>{var{children:r}=t,i=n(t,["children"]);return e(we,Object.assign({},i,{ref:o,"data-slot":"accordion-content",className:"data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden text-sm"},{children:e("div",Object.assign({className:"pt-0 pb-4 text-muted-foreground px-5"},{children:r}))}))});Oe.displayName="AccordionContent";I("[data-element-type=accordion-list-item-content] [data-slate-node=element],[data-element-type=accordion-list-item-heading] [data-slate-node=element]{margin:0}");const _e={"accordion-list":{render:t=>{const{attributes:n,children:o,blockId:r,element:i}=t,a=v(),c=s(()=>{const e=[];return i.children.forEach(t=>{var n;"accordion-list-item"===t.type&&(null===(n=t.props)||void 0===n?void 0:n.isExpanded)&&e.push(t.id)}),e},[i]);return e(je,Object.assign({},n,{type:"multiple",value:c,onValueChange:e=>{const t=k.getBlockSlate(a,{id:r});if(!t)return;const n=w.nodes(t,{match:e=>C.isElement(e)&&"accordion-list-item"===e.type});w.withoutNormalizing(t,()=>{var o;for(const[r,i]of n){const n=r,a=n.id,s=e.includes(a);(null===(o=n.props)||void 0===o?void 0:o.isExpanded)!==s&&N.setNodes(t,{props:Object.assign(Object.assign({},n.props),{isExpanded:s})},{at:i})}})},className:"w-full rounded-md border"},{children:o}))}},"accordion-list-item":{render:t=>{var n;const{attributes:o,children:r,element:i}=t;return e(Ne,Object.assign({value:i.id,"data-state":(null===(n=i.props)||void 0===n?void 0:n.isExpanded)?"open":"closed"},o,{children:r}))}},"accordion-list-item-heading":{render:n=>{var o,r;const{attributes:i,children:d,element:l,blockId:p}=n,u=v(),[,f]=a(e=>e+1,0),m=s(()=>{const e=k.getBlockSlate(u,{id:p});if(e)try{const t=x.getElementPath(u,{blockId:p,element:l});return w.parent(e,t)[0]}catch(e){}},[u,p,l]),h=s(()=>{if(!m)return;if(k.getBlockSlate(u,{id:p}))try{return x.getElementPath(u,{blockId:p,element:m})}catch(e){}},[u,p,m]),b=null!==(r=null===(o=null==m?void 0:m.props)||void 0===o?void 0:o.isExpanded)&&void 0!==r&&r,g=c(()=>{m&&h&&x.updateElement(u,{blockId:p,type:m.type,props:Object.assign(Object.assign({},m.props),{isExpanded:!b}),path:h}),f()},[u,p,m,h,b]),y=c(e=>{if(u.readOnly)return;if(e.preventDefault(),e.stopPropagation(),!m||!h)return;const t=x.getElementChildren(u,{blockId:p,type:"accordion-list"});1!==(null==t?void 0:t.length)?x.deleteElement(u,{blockId:p,type:"accordion-list-item",path:h}):k.deleteBlock(u,{blockId:p})},[u,p,m,h]),C=c(e=>{if(u.readOnly)return;e.preventDefault(),e.stopPropagation();const t=k.getBlockSlate(u,{id:p});if(!t||!h)return;const n=u.y("accordion-list-item",{props:{isExpanded:!1},children:[u.y("accordion-list-item-heading"),u.y("accordion-list-item-content")]});w.withoutNormalizing(t,()=>{const e=j.next(h);N.insertNodes(t,n,{at:e});const o=[...e,0,0];setTimeout(()=>{N.select(t,{offset:0,path:o})},0)})},[u,p,h]);return t("div",Object.assign({},i,{className:"flex flex-1 items-start justify-between gap-4 rounded-md py-4 text-left text-sm font-medium transition-all px-5"},{children:[e("div",Object.assign({className:"flex-1 min-w-0"},{children:d})),t("div",Object.assign({className:"flex shrink-0 items-center gap-1",contentEditable:!1},{children:[!u.readOnly&&e("button",Object.assign({type:"button",contentEditable:!1,onClick:C,className:"flex items-center justify-center rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 p-1",title:"Add accordion item"},{children:e(O,{className:"h-4 w-4 shrink-0 text-muted-foreground"})})),!u.readOnly&&e("button",Object.assign({type:"button",contentEditable:!1,onClick:y,className:"flex items-center justify-center rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 p-1",title:"Delete accordion item"},{children:e(_,{className:"h-4 w-4 shrink-0 text-muted-foreground"})})),e(Ce,Object.assign({type:"button",contentEditable:!1,"data-slot":"accordion-trigger",onClick:g,className:"flex shrink-0 items-center justify-center rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50"},{children:e(A,{className:"h-4 w-4 shrink-0 text-muted-foreground transition-transform duration-200 "+(b?"rotate-180":"")})}))]}))]}))}},"accordion-list-item-content":{render:t=>{const{attributes:n,children:o}=t;return e(Oe,Object.assign({},n,{className:"text-muted-foreground px-5"},{children:o}))}}};export{_e as AccordionUI};
|
|
@@ -15,7 +15,7 @@ type PluginExtensions = Record<string, {
|
|
|
15
15
|
*
|
|
16
16
|
* @example
|
|
17
17
|
* ```typescript
|
|
18
|
-
* const plugins =
|
|
18
|
+
* const plugins = applyTheme([
|
|
19
19
|
* Accordion,
|
|
20
20
|
* Paragraph,
|
|
21
21
|
* Headings.HeadingOne,
|
|
@@ -26,6 +26,6 @@ type PluginExtensions = Record<string, {
|
|
|
26
26
|
* });
|
|
27
27
|
* ```
|
|
28
28
|
*/
|
|
29
|
-
export declare function
|
|
29
|
+
export declare function applyTheme(plugins: PluginWithUI[], extensions?: PluginExtensions): PluginWithUI[];
|
|
30
30
|
export {};
|
|
31
|
-
//# sourceMappingURL=
|
|
31
|
+
//# sourceMappingURL=applyTheme.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"applyTheme.d.ts","sourceRoot":"","sources":["../src/applyTheme.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAwBnD,KAAK,YAAY,GAAG,YAAY,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;AAG3C,KAAK,gBAAgB,GAAG,MAAM,CAC5B,MAAM,EACN;IACE,yBAAyB,CAAC,EAAE,YAAY,EAAE,CAAC;IAE3C,MAAM,CAAC,EAAE,GAAG,CAAC;IAEb,OAAO,CAAC,EAAE,GAAG,CAAC;IAEd,QAAQ,CAAC,EAAE,GAAG,CAAC;CAChB,CACF,CAAC;AAEF;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,UAAU,CACxB,OAAO,EAAE,YAAY,EAAE,EACvB,UAAU,CAAC,EAAE,gBAAgB,GAC5B,YAAY,EAAE,CAuDhB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";const r={blockquote:{render:r=>{const{attributes:t,children:o}=r;return e("blockquote",Object.assign({},t,{className:"mt-6 border-l-2 pl-6"},{children:o}))}}};export{r as BlockquoteUI};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"callout.d.ts","sourceRoot":"","sources":["../../../src/callout/elements/callout.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"callout.d.ts","sourceRoot":"","sources":["../../../src/callout/elements/callout.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,gBAAgB,CAAC;AA6E/D,eAAO,MAAM,OAAO,UAAW,wBAAwB,4CActD,CAAC"}
|
package/dist/callout.js
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";import"@yoopta/ui/element-options";import{c as r}from"./chunks/utils-de9c4c2b.js";import{c as t}from"./chunks/createLucideIcon-70ab5429.js";import"react";
|
|
2
|
+
/**
|
|
3
|
+
* @license lucide-react v0.378.0 - ISC
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the ISC license.
|
|
6
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
7
|
+
*/const l=t("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]),d=t("CircleCheckBig",[["path",{d:"M22 11.08V12a10 10 0 1 1-5.93-9.14",key:"g774vq"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]),a=t("CircleX",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]),o=t("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]),c=t("MessageSquare",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]]),i=(e="default")=>({default:"bg-muted text-muted-foreground border-muted-foreground/20",info:"bg-blue-50 text-blue-900 border-blue-200 dark:bg-blue-950 dark:text-blue-100 dark:border-blue-800",success:"bg-green-50 text-green-900 border-green-200 dark:bg-green-950 dark:text-green-100 dark:border-green-800",warning:"bg-yellow-50 text-yellow-900 border-yellow-200 dark:bg-yellow-950 dark:text-yellow-100 dark:border-yellow-800",error:"bg-red-50 text-red-900 border-red-200 dark:bg-red-950 dark:text-red-100 dark:border-red-800"}[e]);
|
|
8
|
+
/**
|
|
9
|
+
* @license lucide-react v0.378.0 - ISC
|
|
10
|
+
*
|
|
11
|
+
* This source code is licensed under the ISC license.
|
|
12
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
13
|
+
*/e(c,{className:"h-4 w-4"}),e(o,{className:"h-4 w-4 text-blue-500"}),e(d,{className:"h-4 w-4 text-green-500"}),e(l,{className:"h-4 w-4 text-yellow-500"}),e(a,{className:"h-4 w-4 text-red-500"});const s={callout:{render:t=>{var l,d;const{attributes:a,children:o,element:c}=t,s=null!==(d=null===(l=c.props)||void 0===l?void 0:l.theme)&&void 0!==d?d:"default";return e("div",Object.assign({},a,{className:r("group relative rounded-lg border-l-4 p-4 [&>p]:m-0 [&>p]:text-sm",i(s))},{children:o}))}}};export{s as CalloutUI};
|
package/dist/carousel.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as n,jsxs as t}from"react/jsx-runtime";import{useRef as e,useState as r,useCallback as o,useEffect as i,createContext as s,forwardRef as c,useMemo as a,useContext as u}from"react";import{_ as l}from"./chunks/_tslib-35bb891d.js";import{B as d}from"./chunks/button-ecb0aed1.js";import{c as f}from"./chunks/utils-de9c4c2b.js";import{A as p,a as m}from"./chunks/arrow-right-07affdbc.js";import{C as g,a as h}from"./chunks/card-94325fef.js";import"./chunks/createLucideIcon-70ab5429.js";function v(n){return function(n){return"[object Object]"===Object.prototype.toString.call(n)}(n)||Array.isArray(n)}function x(n,t){const e=Object.keys(n),r=Object.keys(t);if(e.length!==r.length)return!1;return JSON.stringify(Object.keys(n.breakpoints||{}))===JSON.stringify(Object.keys(t.breakpoints||{}))&&e.every(e=>{const r=n[e],o=t[e];return"function"==typeof r?`${r}`==`${o}`:v(r)&&v(o)?x(r,o):r===o})}function b(n){return n.concat().sort((n,t)=>n.name>t.name?1:-1).map(n=>n.options)}function y(n){return"number"==typeof n}function w(n){return"string"==typeof n}function S(n){return"boolean"==typeof n}function N(n){return"[object Object]"===Object.prototype.toString.call(n)}function O(n){return Math.abs(n)}function j(n){return Math.sign(n)}function E(n,t){return O(n-t)}function L(n){return I(n).map(Number)}function k(n){return n[z(n)]}function z(n){return Math.max(0,n.length-1)}function A(n,t){return t===z(n)}function D(n,t=0){return Array.from(Array(n),(n,e)=>t+e)}function I(n){return Object.keys(n)}function P(n,t){return[n,t].reduce((n,t)=>(I(t).forEach(e=>{const r=n[e],o=t[e],i=N(r)&&N(o);n[e]=i?P(r,o):o}),n),{})}function M(n,t){return void 0!==t.MouseEvent&&n instanceof t.MouseEvent}function F(){let n=[];const t={add:function(e,r,o,i={passive:!0}){let s;if("addEventListener"in e)e.addEventListener(r,o,i),s=()=>e.removeEventListener(r,o,i);else{const n=e;n.addListener(o),s=()=>n.removeListener(o)}return n.push(s),t},clear:function(){n=n.filter(n=>n())}};return t}function T(n,t,e,r){const o=F(),i=1e3/60;let s=null,c=0,a=0;function u(n){if(!a)return;s||(s=n,e(),e());const o=n-s;for(s=n,c+=o;c>=i;)e(),c-=i;r(c/i),a&&(a=t.requestAnimationFrame(u))}function l(){t.cancelAnimationFrame(a),s=null,c=0,a=0}return{init:function(){o.add(n,"visibilitychange",()=>{n.hidden&&(s=null,c=0)})},destroy:function(){l(),o.clear()},start:function(){a||(a=t.requestAnimationFrame(u))},stop:l,update:e,render:r}}function C(n=0,t=0){const e=O(n-t);function r(t){return t<n}function o(n){return n>t}function i(n){return r(n)||o(n)}return{length:e,max:t,min:n,constrain:function(e){return i(e)?r(e)?n:t:e},reachedAny:i,reachedMax:o,reachedMin:r,removeOffset:function(n){return e?n-e*Math.ceil((n-t)/e):n}}}function H(n,t,e){const{constrain:r}=C(0,n),o=n+1;let i=s(t);function s(n){return e?O((o+n)%o):r(n)}function c(){return i}function a(){return H(n,c(),e)}const u={get:c,set:function(n){return i=s(n),u},add:function(n){return a().set(c()+n)},clone:a};return u}function V(n,t,e,r,o,i,s,c,a,u,l,d,f,p,m,g,h,v,x){const{cross:b,direction:y}=n,w=["INPUT","SELECT","TEXTAREA"],N={passive:!1},L=F(),k=F(),z=C(50,225).constrain(p.measure(20)),A={mouse:300,touch:400},D={mouse:500,touch:600},I=m?43:25;let P=!1,T=0,H=0,V=!1,B=!1,R=!1,q=!1;function G(n){if(!M(n,r)&&n.touches.length>=2)return $(n);const t=i.readPoint(n),e=i.readPoint(n,b),s=E(t,T),a=E(e,H);if(!B&&!q){if(!n.cancelable)return $(n);if(B=s>a,!B)return $(n)}const l=i.pointerMove(n);s>g&&(R=!0),u.useFriction(.3).useDuration(.75),c.start(),o.add(y(l)),n.preventDefault()}function $(n){const t=l.byDistance(0,!1).index!==d.get(),e=i.pointerUp(n)*(m?D:A)[q?"mouse":"touch"],r=function(n,t){const e=d.add(-1*j(n)),r=l.byDistance(n,!m).distance;return m||O(n)<z?r:h&&t?.5*r:l.byIndex(e.get(),0).distance}(y(e),t),o=function(n,t){if(0===n||0===t)return 0;if(O(n)<=O(t))return 0;const e=E(O(n),O(t));return O(e/n)}(e,r),s=I-10*o,c=v+o/50;B=!1,V=!1,k.clear(),u.useDuration(s).useFriction(c),a.distance(r,!m),q=!1,f.emit("pointerUp")}function U(n){R&&(n.stopPropagation(),n.preventDefault(),R=!1)}return{init:function(n){if(!x)return;function c(c){(S(x)||x(n,c))&&function(n){const c=M(n,r);if(q=c,R=m&&c&&!n.buttons&&P,P=E(o.get(),s.get())>=2,c&&0!==n.button)return;if(function(n){const t=n.nodeName||"";return w.includes(t)}(n.target))return;V=!0,i.pointerDown(n),u.useFriction(0).useDuration(0),o.set(s),function(){const n=q?e:t;k.add(n,"touchmove",G,N).add(n,"touchend",$).add(n,"mousemove",G,N).add(n,"mouseup",$)}(),T=i.readPoint(n),H=i.readPoint(n,b),f.emit("pointerDown")}(c)}const a=t;L.add(a,"dragstart",n=>n.preventDefault(),N).add(a,"touchmove",()=>{},N).add(a,"touchend",()=>{}).add(a,"touchstart",c).add(a,"mousedown",c).add(a,"touchcancel",$).add(a,"contextmenu",$).add(a,"click",U,!0)},destroy:function(){L.clear(),k.clear()},pointerDown:function(){return V}}}function B(n,t){let e,r;function o(n){return n.timeStamp}function i(e,r){const o="client"+("x"===(r||n.scroll)?"X":"Y");return(M(e,t)?e:e.touches[0])[o]}return{pointerDown:function(n){return e=n,r=n,i(n)},pointerMove:function(n){const t=i(n)-i(r),s=o(n)-o(e)>170;return r=n,s&&(e=n),t},pointerUp:function(n){if(!e||!r)return 0;const t=i(r)-i(e),s=o(n)-o(e),c=o(n)-o(r)>170,a=t/s;return s&&!c&&O(a)>.1?a:0},readPoint:i}}function R(n,t,e,r,o,i,s){const c=[n].concat(r);let a,u,l=[],d=!1;function f(n){return o.measureSize(s.measure(n))}return{init:function(o){i&&(u=f(n),l=r.map(f),a=new ResizeObserver(e=>{(S(i)||i(o,e))&&function(e){for(const i of e){if(d)return;const e=i.target===n,s=r.indexOf(i.target),c=e?u:l[s];if(O(f(e?n:r[s])-c)>=.5){o.reInit(),t.emit("resize");break}}}(e)}),e.requestAnimationFrame(()=>{c.forEach(n=>a.observe(n))}))},destroy:function(){d=!0,a&&a.disconnect()}}}function q(n,t,e,r,o){const i=o.measure(10),s=o.measure(50),c=C(.1,.99);let a=!1;function u(){return!a&&(!!n.reachedAny(e.get())&&!!n.reachedAny(t.get()))}return{shouldConstrain:u,constrain:function(o){if(!u())return;const a=n.reachedMin(t.get())?"min":"max",l=O(n[a]-t.get()),d=e.get()-t.get(),f=c.constrain(l/s);e.subtract(d*f),!o&&O(d)<i&&(e.set(n.constrain(e.get())),r.useDuration(25).useBaseFriction())},toggleActive:function(n){a=!n}}}function G(n,t,e,r){const o=t.min+.1,i=t.max+.1,{reachedMin:s,reachedMax:c}=C(o,i);return{loop:function(t){if(!function(n){return 1===n?c(e.get()):-1===n&&s(e.get())}(t))return;const o=n*(-1*t);r.forEach(n=>n.add(o))}}}function $(n,t,e,r,o){const{reachedAny:i,removeOffset:s,constrain:c}=r;function a(n){return n.concat().sort((n,t)=>O(n)-O(t))[0]}function u(t,r){const o=[t,t+e,t-e];if(!n)return t;if(!r)return a(o);const i=o.filter(n=>j(n)===r);return i.length?a(i):k(o)-e}return{byDistance:function(e,r){const a=o.get()+e,{index:l,distance:d}=function(e){const r=n?s(e):c(e),o=t.map((n,t)=>({diff:u(n-r,0),index:t})).sort((n,t)=>O(n.diff)-O(t.diff)),{index:i}=o[0];return{index:i,distance:r}}(a),f=!n&&i(a);return!r||f?{index:l,distance:e}:{index:l,distance:e+u(t[l]-d,0)}},byIndex:function(n,e){return{index:n,distance:u(t[n]-o.get(),e)}},shortcut:u}}function U(n,t,e,r,o,i,s,c){const a={passive:!0,capture:!0};let u=0;function l(n){"Tab"===n.code&&(u=(new Date).getTime())}return{init:function(d){c&&(i.add(document,"keydown",l,!1),t.forEach((t,l)=>{i.add(t,"focus",t=>{(S(c)||c(d,t))&&function(t){if((new Date).getTime()-u>10)return;s.emit("slideFocusStart"),n.scrollLeft=0;const i=e.findIndex(n=>n.includes(t));y(i)&&(o.useDuration(0),r.index(i,0),s.emit("slideFocus"))}(l)},a)}))}}}function W(n){let t=n;function e(n){return y(n)?n:n.get()}return{get:function(){return t},set:function(n){t=e(n)},add:function(n){t+=e(n)},subtract:function(n){t-=e(n)}}}function J(n,t){const e="x"===n.scroll?function(n){return`translate3d(${n}px,0px,0px)`}:function(n){return`translate3d(0px,${n}px,0px)`},r=t.style;let o=null,i=!1;return{clear:function(){i||(r.transform="",t.getAttribute("style")||t.removeAttribute("style"))},to:function(t){if(i)return;const s=(c=n.direction(t),Math.round(100*c)/100);var c;s!==o&&(r.transform=e(s),o=s)},toggleActive:function(n){i=!n}}}function Q(n,t,e,r,o,i,s,c,a){const u=L(o),l=L(o).reverse(),d=function(){const n=s[0];return m(p(l,n),e,!1)}().concat(function(){const n=t-s[0]-1;return m(p(u,n),-e,!0)}());function f(n,t){return n.reduce((n,t)=>n-o[t],t)}function p(n,t){return n.reduce((n,e)=>f(n,t)>0?n.concat([e]):n,[])}function m(o,s,u){const l=function(n){return i.map((e,o)=>({start:e-r[o]+.5+n,end:e+t-.5+n}))}(s);return o.map(t=>{const r=u?0:-e,o=u?e:0,i=u?"end":"start",s=l[t][i];return{index:t,loopPoint:s,slideLocation:W(-1),translate:J(n,a[t]),target:()=>c.get()>s?r:o}})}return{canLoop:function(){return d.every(({index:n})=>f(u.filter(t=>t!==n),t)<=.1)},clear:function(){d.forEach(n=>n.translate.clear())},loop:function(){d.forEach(n=>{const{target:t,translate:e,slideLocation:r}=n,o=t();o!==r.get()&&(e.to(o),r.set(o))})},loopPoints:d}}function X(n,t,e){let r,o=!1;return{init:function(i){e&&(r=new MutationObserver(n=>{o||(S(e)||e(i,n))&&function(n){for(const e of n)if("childList"===e.type){i.reInit(),t.emit("slidesChanged");break}}(n)}),r.observe(n,{childList:!0}))},destroy:function(){r&&r.disconnect(),o=!0}}}function _(n,t,e,r){const o={};let i,s=null,c=null,a=!1;return{init:function(){i=new IntersectionObserver(n=>{a||(n.forEach(n=>{const e=t.indexOf(n.target);o[e]=n}),s=null,c=null,e.emit("slidesInView"))},{root:n.parentElement,threshold:r}),t.forEach(n=>i.observe(n))},destroy:function(){i&&i.disconnect(),a=!0},get:function(n=!0){if(n&&s)return s;if(!n&&c)return c;const t=function(n){return I(o).reduce((t,e)=>{const r=parseInt(e),{isIntersecting:i}=o[r];return(n&&i||!n&&!i)&&t.push(r),t},[])}(n);return n&&(s=t),n||(c=t),t}}}function K(n,t,e,r,o,i,s,c,a){const{startEdge:u,endEdge:l,direction:d}=n,f=y(e);return{groupSlides:function(n){return f?function(n,t){return L(n).filter(n=>n%t===0).map(e=>n.slice(e,e+t))}(n,e):function(n){return n.length?L(n).reduce((e,f,p)=>{const m=k(e)||0,g=0===m,h=f===z(n),v=o[u]-i[m][u],x=o[u]-i[f][l],b=!r&&g?d(s):0,y=O(x-(!r&&h?d(c):0)-(v+b));return p&&y>t+a&&e.push(f),h&&e.push(n.length),e},[]).map((t,e,r)=>{const o=Math.max(r[e-1]||0);return n.slice(o,t)}):[]}(n)}}}function Y(n,t,e,r,o,i,s){const{align:c,axis:a,direction:u,startIndex:l,loop:d,duration:f,dragFree:p,dragThreshold:m,inViewThreshold:g,slidesToScroll:h,skipSnaps:v,containScroll:x,watchResize:b,watchSlides:y,watchDrag:S,watchFocus:N}=i,I={measure:function(n){const{offsetTop:t,offsetLeft:e,offsetWidth:r,offsetHeight:o}=n;return{top:t,right:e+r,bottom:t+o,left:e,width:r,height:o}}},P=I.measure(t),M=e.map(I.measure),Y=function(n,t){const e="rtl"===t,r="y"===n,o=!r&&e?-1:1;return{scroll:r?"y":"x",cross:r?"x":"y",startEdge:r?"top":e?"right":"left",endEdge:r?"bottom":e?"left":"right",measureSize:function(n){const{height:t,width:e}=n;return r?t:e},direction:function(n){return n*o}}}(a,u),Z=Y.measureSize(P),nn=function(n){return{measure:function(t){return n*(t/100)}}}(Z),tn=function(n,t){const e={start:function(){return 0},center:function(n){return r(n)/2},end:r};function r(n){return t-n}return{measure:function(r,o){return w(n)?e[n](r):n(t,r,o)}}}(c,Z),en=!d&&!!x,rn=d||!!x,{slideSizes:on,slideSizesWithGaps:sn,startGap:cn,endGap:an}=function(n,t,e,r,o,i){const{measureSize:s,startEdge:c,endEdge:a}=n,u=e[0]&&o,l=function(){if(!u)return 0;const n=e[0];return O(t[c]-n[c])}(),d=function(){if(!u)return 0;const n=i.getComputedStyle(k(r));return parseFloat(n.getPropertyValue(`margin-${a}`))}(),f=e.map(s),p=e.map((n,t,e)=>{const r=!t,o=A(e,t);return r?f[t]+l:o?f[t]+d:e[t+1][c]-n[c]}).map(O);return{slideSizes:f,slideSizesWithGaps:p,startGap:l,endGap:d}}(Y,P,M,e,rn,o),un=K(Y,Z,h,d,P,M,cn,an,2),{snaps:ln,snapsAligned:dn}=function(n,t,e,r,o){const{startEdge:i,endEdge:s}=n,{groupSlides:c}=o,a=c(r).map(n=>k(n)[s]-n[0][i]).map(O).map(t.measure),u=r.map(n=>e[i]-n[i]).map(n=>-O(n)),l=c(u).map(n=>n[0]).map((n,t)=>n+a[t]);return{snaps:u,snapsAligned:l}}(Y,tn,P,M,un),fn=-k(ln)+k(sn),{snapsContained:pn,scrollContainLimit:mn}=function(n,t,e,r,o){const i=C(-t+n,0),s=e.map((n,t)=>{const{min:r,max:o}=i,s=i.constrain(n),c=!t,u=A(e,t);return c?o:u||a(r,s)?r:a(o,s)?o:s}).map(n=>parseFloat(n.toFixed(3))),c=function(){const n=s[0],t=k(s);return C(s.lastIndexOf(n),s.indexOf(t)+1)}();function a(n,t){return E(n,t)<=1}return{snapsContained:function(){if(t<=n+o)return[i.max];if("keepSnaps"===r)return s;const{min:e,max:a}=c;return s.slice(e,a)}(),scrollContainLimit:c}}(Z,fn,dn,x,2),gn=en?pn:dn,{limit:hn}=function(n,t,e){const r=t[0];return{limit:C(e?r-n:k(t),r)}}(fn,gn,d),vn=H(z(gn),l,d),xn=vn.clone(),bn=L(e),yn=T(r,o,()=>(({dragHandler:n,scrollBody:t,scrollBounds:e,options:{loop:r}})=>{r||e.constrain(n.pointerDown()),t.seek()})(Mn),n=>(({scrollBody:n,translate:t,location:e,offsetLocation:r,previousLocation:o,scrollLooper:i,slideLooper:s,dragHandler:c,animation:a,eventHandler:u,scrollBounds:l,options:{loop:d}},f)=>{const p=n.settled(),m=!l.shouldConstrain(),g=d?p:p&&m,h=g&&!c.pointerDown();h&&a.stop();const v=e.get()*f+o.get()*(1-f);r.set(v),d&&(i.loop(n.direction()),s.loop()),t.to(r.get()),h&&u.emit("settle"),g||u.emit("scroll")})(Mn,n)),wn=gn[vn.get()],Sn=W(wn),Nn=W(wn),On=W(wn),jn=W(wn),En=function(n,t,e,r,o,i){let s=0,c=0,a=o,u=i,l=n.get(),d=0;function f(n){return a=n,m}function p(n){return u=n,m}const m={direction:function(){return c},duration:function(){return a},velocity:function(){return s},seek:function(){const t=r.get()-n.get();let o=0;return a?(e.set(n),s+=t/a,s*=u,l+=s,n.add(s),o=l-d):(s=0,e.set(r),n.set(r),o=t),c=j(o),d=l,m},settled:function(){return O(r.get()-t.get())<.001},useBaseFriction:function(){return p(i)},useBaseDuration:function(){return f(o)},useFriction:p,useDuration:f};return m}(Sn,On,Nn,jn,f,.68),Ln=$(d,gn,fn,hn,jn),kn=function(n,t,e,r,o,i,s){function c(o){const c=o.distance,a=o.index!==t.get();i.add(c),c&&(r.duration()?n.start():(n.update(),n.render(1),n.update())),a&&(e.set(t.get()),t.set(o.index),s.emit("select"))}return{distance:function(n,t){c(o.byDistance(n,t))},index:function(n,e){const r=t.clone().set(n);c(o.byIndex(r.get(),e))}}}(yn,vn,xn,En,Ln,jn,s),zn=function(n){const{max:t,length:e}=n;return{get:function(n){return e?(n-t)/-e:0}}}(hn),An=F(),Dn=_(t,e,s,g),{slideRegistry:In}=function(n,t,e,r,o,i){const{groupSlides:s}=o,{min:c,max:a}=r;return{slideRegistry:function(){const r=s(i),o=!n||"keepSnaps"===t;return 1===e.length?[i]:o?r:r.slice(c,a).map((n,t,e)=>{const r=!t,o=A(e,t);return r?D(k(e[0])+1):o?D(z(i)-k(e)[0]+1,k(e)[0]):n})}()}}(en,x,gn,mn,un,bn),Pn=U(n,e,In,kn,En,An,s,N),Mn={ownerDocument:r,ownerWindow:o,eventHandler:s,containerRect:P,slideRects:M,animation:yn,axis:Y,dragHandler:V(Y,n,r,o,jn,B(Y,o),Sn,yn,kn,En,Ln,vn,s,nn,p,m,v,.68,S),eventStore:An,percentOfView:nn,index:vn,indexPrevious:xn,limit:hn,location:Sn,offsetLocation:On,previousLocation:Nn,options:i,resizeHandler:R(t,s,o,e,Y,b,I),scrollBody:En,scrollBounds:q(hn,On,jn,En,nn),scrollLooper:G(fn,hn,On,[Sn,On,Nn,jn]),scrollProgress:zn,scrollSnapList:gn.map(zn.get),scrollSnaps:gn,scrollTarget:Ln,scrollTo:kn,slideLooper:Q(Y,Z,fn,on,sn,ln,gn,On,e),slideFocus:Pn,slidesHandler:X(t,s,y),slidesInView:Dn,slideIndexes:bn,slideRegistry:In,slidesToScroll:un,target:jn,translate:J(Y,t)};return Mn}const Z={align:"center",axis:"x",container:null,slides:null,containScroll:"trimSnaps",direction:"ltr",slidesToScroll:1,inViewThreshold:0,breakpoints:{},dragFree:!1,dragThreshold:10,loop:!1,skipSnaps:!1,duration:25,startIndex:0,active:!0,watchDrag:!0,watchResize:!0,watchSlides:!0,watchFocus:!0};function nn(n){function t(n,t){return P(n,t||{})}const e={mergeOptions:t,optionsAtMedia:function(e){const r=e.breakpoints||{},o=I(r).filter(t=>n.matchMedia(t).matches).map(n=>r[n]).reduce((n,e)=>t(n,e),{});return t(e,o)},optionsMediaQueries:function(t){return t.map(n=>I(n.breakpoints||{})).reduce((n,t)=>n.concat(t),[]).map(n.matchMedia)}};return e}function tn(n,t,e){const r=n.ownerDocument,o=r.defaultView,i=nn(o),s=function(n){let t=[];return{init:function(e,r){return t=r.filter(({options:t})=>!1!==n.optionsAtMedia(t).active),t.forEach(t=>t.init(e,n)),r.reduce((n,t)=>Object.assign(n,{[t.name]:t}),{})},destroy:function(){t=t.filter(n=>n.destroy())}}}(i),c=F(),a=function(){let n,t={};function e(n){return t[n]||[]}const r={init:function(t){n=t},emit:function(t){return e(t).forEach(e=>e(n,t)),r},off:function(n,o){return t[n]=e(n).filter(n=>n!==o),r},on:function(n,o){return t[n]=e(n).concat([o]),r},clear:function(){t={}}};return r}(),{mergeOptions:u,optionsAtMedia:l,optionsMediaQueries:d}=i,{on:f,off:p,emit:m}=a,g=L;let h,v,x,b,y=!1,S=u(Z,tn.globalOptions),N=u(S),O=[];function j(t){const e=Y(n,x,b,r,o,t,a);if(t.loop&&!e.slideLooper.canLoop()){return j(Object.assign({},t,{loop:!1}))}return e}function E(t,e){y||(S=u(S,t),N=l(S),O=e||O,function(){const{container:t,slides:e}=N,r=w(t)?n.querySelector(t):t;x=r||n.children[0];const o=w(e)?x.querySelectorAll(e):e;b=[].slice.call(o||x.children)}(),h=j(N),d([S,...O.map(({options:n})=>n)]).forEach(n=>c.add(n,"change",L)),N.active&&(h.translate.to(h.location.get()),h.animation.init(),h.slidesInView.init(),h.slideFocus.init(D),h.eventHandler.init(D),h.resizeHandler.init(D),h.slidesHandler.init(D),h.options.loop&&h.slideLooper.loop(),x.offsetParent&&b.length&&h.dragHandler.init(D),v=s.init(D,O)))}function L(n,t){const e=A();k(),E(u({startIndex:e},n),t),a.emit("reInit")}function k(){h.dragHandler.destroy(),h.eventStore.clear(),h.translate.clear(),h.slideLooper.clear(),h.resizeHandler.destroy(),h.slidesHandler.destroy(),h.slidesInView.destroy(),h.animation.destroy(),s.destroy(),c.clear()}function z(n,t,e){N.active&&!y&&(h.scrollBody.useBaseFriction().useDuration(!0===t?0:N.duration),h.scrollTo.index(n,e||0))}function A(){return h.index.get()}const D={canScrollNext:function(){return h.index.add(1).get()!==A()},canScrollPrev:function(){return h.index.add(-1).get()!==A()},containerNode:function(){return x},internalEngine:function(){return h},destroy:function(){y||(y=!0,c.clear(),k(),a.emit("destroy"),a.clear())},off:p,on:f,emit:m,plugins:function(){return v},previousScrollSnap:function(){return h.indexPrevious.get()},reInit:g,rootNode:function(){return n},scrollNext:function(n){z(h.index.add(1).get(),n,-1)},scrollPrev:function(n){z(h.index.add(-1).get(),n,1)},scrollProgress:function(){return h.scrollProgress.get(h.offsetLocation.get())},scrollSnapList:function(){return h.scrollSnapList},scrollTo:z,selectedScrollSnap:A,slideNodes:function(){return b},slidesInView:function(){return h.slidesInView.get()},slidesNotInView:function(){return h.slidesInView.get(!1)}};return E(t,e),setTimeout(()=>a.emit("init"),0),D}function en(n={},t=[]){const s=e(n),c=e(t),[a,u]=r(),[l,d]=r(),f=o(()=>{a&&a.reInit(s.current,c.current)},[a]);return i(()=>{x(s.current,n)||(s.current=n,f())},[n,f]),i(()=>{(function(n,t){if(n.length!==t.length)return!1;const e=b(n),r=b(t);return e.every((n,t)=>x(n,r[t]))})(c.current,t)||(c.current=t,f())},[t,f]),i(()=>{if("undefined"!=typeof window&&window.document&&window.document.createElement&&l){tn.globalOptions=en.globalOptions;const n=tn(l,s.current,c.current);return u(n),()=>n.destroy()}u(void 0)},[l,u]),[d,a]}tn.globalOptions=void 0,en.globalOptions=void 0;const rn=s(null);function on(){const n=u(rn);if(!n)throw new Error("useCarousel must be used within a <Carousel />");return n}const sn=c((t,e)=>{var{orientation:s="horizontal",opts:c,setApi:u,plugins:d,className:p,children:m}=t,g=l(t,["orientation","opts","setApi","plugins","className","children"]);const[h,v]=en(Object.assign(Object.assign({},c),{axis:"horizontal"===s?"x":"y"}),d),[x,b]=r(!1),[y,w]=r(!1),S=o(n=>{n&&(b(n.canScrollPrev()),w(n.canScrollNext()))},[]),N=o(()=>{null==v||v.scrollPrev()},[v]),O=o(()=>{null==v||v.scrollNext()},[v]),j=o(n=>{"ArrowLeft"===n.key?(n.preventDefault(),N()):"ArrowRight"===n.key&&(n.preventDefault(),O())},[N,O]);i(()=>{v&&u&&u(v)},[v,u]),i(()=>{if(v)return S(v),v.on("reInit",S),v.on("select",S),()=>{null==v||v.off("select",S)}},[v,S]);const E=a(()=>({carouselRef:h,api:v,opts:c,orientation:s||("y"===(null==c?void 0:c.axis)?"vertical":"horizontal"),scrollPrev:N,scrollNext:O,canScrollPrev:x,canScrollNext:y}),[h,v,c,s,N,O,x,y]);return n(rn.Provider,Object.assign({value:E},{children:n("div",Object.assign({onKeyDownCapture:j,className:f("relative",p),role:"region","aria-roledescription":"carousel","data-slot":"carousel",ref:e},g,{children:m}))}))});sn.displayName="Carousel";const cn=c((t,e)=>{var{className:r}=t,o=l(t,["className"]);const{carouselRef:i,orientation:s}=on();return n("div",Object.assign({ref:i,className:"overflow-hidden","data-slot":"carousel-content"},{children:n("div",Object.assign({ref:e,className:f("flex","horizontal"===s?"-ml-4":"-mt-4 flex-col",r)},o))}))});cn.displayName="CarouselContent";const an=c((t,e)=>{var{className:r}=t,o=l(t,["className"]);const{orientation:i}=on();return n("div",Object.assign({ref:e,role:"group","aria-roledescription":"slide","data-slot":"carousel-item",className:f("min-w-0 shrink-0 grow-0 basis-full","horizontal"===i?"pl-4":"pt-4",r)},o))});an.displayName="CarouselItem";const un=e=>{var{className:r,variant:o="outline",size:i="icon"}=e,s=l(e,["className","variant","size"]);const{orientation:c,scrollPrev:a,canScrollPrev:u}=on();return t(d,Object.assign({"data-slot":"carousel-previous",variant:o,size:i,className:f("absolute size-8 rounded-full","horizontal"===c?"top-1/2 -left-12 -translate-y-1/2":"-top-12 left-1/2 -translate-x-1/2 rotate-90",r),disabled:!u,onClick:a},s,{children:[n(p,{}),n("span",Object.assign({className:"sr-only"},{children:"Previous slide"}))]}))},ln=e=>{var{className:r,variant:o="outline",size:i="icon"}=e,s=l(e,["className","variant","size"]);const{orientation:c,scrollNext:a,canScrollNext:u}=on();return t(d,Object.assign({"data-slot":"carousel-next",variant:o,size:i,className:f("absolute size-8 rounded-full","horizontal"===c?"top-1/2 -right-12 -translate-y-1/2":"-bottom-12 left-1/2 -translate-x-1/2 rotate-90",r),disabled:!u,onClick:a},s,{children:[n(m,{}),n("span",Object.assign({className:"sr-only"},{children:"Next slide"}))]}))},dn={"carousel-container":{render:e=>{const{attributes:o,children:s}=e,[c,a]=r(),[u,l]=r(0),[d,f]=r(0);return i(()=>{c&&(f(c.scrollSnapList().length),l(c.selectedScrollSnap()+1),c.on("select",()=>{l(c.selectedScrollSnap()+1)}))},[c]),n("div",Object.assign({className:"flex w-full justify-center data-[align=center]:items-center data-[align=end]:items-end data-[align=start]:items-start"},{children:t("div",Object.assign({className:"mx-auto\n "},{children:[t(sn,Object.assign({},o,{setApi:a,opts:{align:"start",axis:"x",loop:!0},orientation:"horizontal",className:"w-full max-w-lg"},{children:[n(cn,{children:s}),n(un,{contentEditable:!1,className:"select-none"}),n(ln,{contentEditable:!1,className:"select-none"})]})),t("div",Object.assign({contentEditable:!1,className:"select-none text-muted-foreground py-2 text-center text-sm"},{children:["Slide ",u," of ",d]}))]}))}))}},"carousel-list-item":{render:t=>{const{children:e}=t;return n(an,Object.assign({className:"md:basis-1/2 lg:basis-1/3"},{children:n("div",Object.assign({className:"p-1"},{children:n(g,{children:n(h,Object.assign({className:"flex aspect-square items-center justify-center p-6"},{children:e}))})}))}))}}};export{dn as CarouselUI};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import*as e from"react";import{useState as t}from"react";import{u as n}from"./index-91a5b8d5.js";import{P as r}from"./index-8dc6d938.js";import{u as o}from"./index-70f4e709.js";import{jsx as a}from"react/jsx-runtime";import{b as c,_ as i,c as u}from"./_tslib-35bb891d.js";var s=0;function l(){e.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??d()),document.body.insertAdjacentElement("beforeend",e[1]??d()),s++,()=>{1===s&&document.querySelectorAll("[data-radix-focus-guard]").forEach(e=>e.remove()),s--}},[])}function d(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var f="focusScope.autoFocusOnMount",v="focusScope.autoFocusOnUnmount",m={bubbles:!1,cancelable:!0},p=e.forwardRef((t,c)=>{const{loop:i=!1,trapped:u=!1,onMountAutoFocus:s,onUnmountAutoFocus:l,...d}=t,[p,y]=e.useState(null),w=o(s),S=o(l),C=e.useRef(null),N=n(c,e=>y(e)),k=e.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;e.useEffect(()=>{if(u){let e=function(e){if(k.paused||!p)return;const t=e.target;p.contains(t)?C.current=t:E(C.current,{select:!0})},t=function(e){if(k.paused||!p)return;const t=e.relatedTarget;null!==t&&(p.contains(t)||E(C.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(const t of e)t.removedNodes.length>0&&E(p)};document.addEventListener("focusin",e),document.addEventListener("focusout",t);const r=new MutationObserver(n);return p&&r.observe(p,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t),r.disconnect()}}},[u,p,k.paused]),e.useEffect(()=>{if(p){b.add(k);const t=document.activeElement;if(!p.contains(t)){const n=new CustomEvent(f,m);p.addEventListener(f,w),p.dispatchEvent(n),n.defaultPrevented||(!function(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(E(r,{select:t}),document.activeElement!==n)return}((e=h(p),e.filter(e=>"A"!==e.tagName)),{select:!0}),document.activeElement===t&&E(p))}return()=>{p.removeEventListener(f,w),setTimeout(()=>{const e=new CustomEvent(v,m);p.addEventListener(v,S),p.dispatchEvent(e),e.defaultPrevented||E(t??document.body,{select:!0}),p.removeEventListener(v,S),b.remove(k)},0)}}var e},[p,w,S,k]);const M=e.useCallback(e=>{if(!i&&!u)return;if(k.paused)return;const t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,n=document.activeElement;if(t&&n){const t=e.currentTarget,[r,o]=function(e){const t=h(e),n=g(t,e),r=g(t.reverse(),e);return[n,r]}(t);r&&o?e.shiftKey||n!==o?e.shiftKey&&n===r&&(e.preventDefault(),i&&E(o,{select:!0})):(e.preventDefault(),i&&E(r,{select:!0})):n===t&&e.preventDefault()}},[i,u,k.paused]);return a(r.div,{tabIndex:-1,...d,ref:N,onKeyDown:M})});function h(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{const t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function g(e,t){for(const n of e)if(!y(n,{upTo:t}))return n}function y(e,{upTo:t}){if("hidden"===getComputedStyle(e).visibility)return!0;for(;e;){if(void 0!==t&&e===t)return!1;if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}function E(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&function(e){return e instanceof HTMLInputElement&&"select"in e}(e)&&t&&e.select()}}p.displayName="FocusScope";var b=function(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=w(e,t),e.unshift(t)},remove(t){e=w(e,t),e[0]?.resume()}}}();function w(e,t){const n=[...e],r=n.indexOf(t);return-1!==r&&n.splice(r,1),n}var S=new WeakMap,C=new WeakMap,N={},k=0,M=function(e){return e&&(e.host||M(e.parentNode))},R=function(e,t,n,r){var o=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=M(t);return n&&e.contains(n)?n:(console.error("aria-hidden",t,"in not contained inside",e,". Doing nothing"),null)}).filter(function(e){return Boolean(e)})}(t,Array.isArray(e)?e:[e]);N[n]||(N[n]=new WeakMap);var a=N[n],c=[],i=new Set,u=new Set(o),s=function(e){e&&!i.has(e)&&(i.add(e),s(e.parentNode))};o.forEach(s);var l=function(e){e&&!u.has(e)&&Array.prototype.forEach.call(e.children,function(e){if(i.has(e))l(e);else try{var t=e.getAttribute(r),o=null!==t&&"false"!==t,u=(S.get(e)||0)+1,s=(a.get(e)||0)+1;S.set(e,u),a.set(e,s),c.push(e),1===u&&o&&C.set(e,!0),1===s&&e.setAttribute(n,"true"),o||e.setAttribute(r,"true")}catch(t){console.error("aria-hidden: cannot operate on ",e,t)}})};return l(t),i.clear(),k++,function(){c.forEach(function(e){var t=S.get(e)-1,o=a.get(e)-1;S.set(e,t),a.set(e,o),t||(C.has(e)||e.removeAttribute(r),C.delete(e)),o||e.removeAttribute(n)}),--k||(S=new WeakMap,S=new WeakMap,C=new WeakMap,N={})}},A=function(e,t,n){void 0===n&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=t||function(e){return"undefined"==typeof document?null:(Array.isArray(e)?e[0]:e).ownerDocument.body}(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),R(r,o,n,"aria-hidden")):function(){return null}},T="right-scroll-bar-position",L="width-before-scroll-bar";function x(e,t){return"function"==typeof e?e(t):e&&(e.current=t),e}var P="undefined"!=typeof window?e.useLayoutEffect:e.useEffect,_=new WeakMap;function F(e,n){var r,o,a,c=(r=n||null,o=function(t){return e.forEach(function(e){return x(e,t)})},(a=t(function(){return{value:r,callback:o,facade:{get current(){return a.value},set current(e){var t=a.value;t!==e&&(a.value=e,a.callback(e,t))}}}})[0]).callback=o,a.facade);return P(function(){var t=_.get(c);if(t){var n=new Set(t),r=new Set(e),o=c.current;n.forEach(function(e){r.has(e)||x(e,null)}),r.forEach(function(e){n.has(e)||x(e,o)})}_.set(c,e)},[e]),c}function I(e){return e}var W=function(t){var n=t.sideCar,r=i(t,["sideCar"]);if(!n)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var o=n.read();if(!o)throw new Error("Sidecar medium not found");return e.createElement(o,c({},r))};W.isSideCarExport=!0;var D=function(e){void 0===e&&(e={});var t=function(e,t){void 0===t&&(t=I);var n=[],r=!1;return{read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var o=t(e,r);return n.push(o),function(){n=n.filter(function(e){return e!==o})}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var o=n;n=[],o.forEach(e),t=n}var a=function(){var n=t;t=[],n.forEach(e)},c=function(){return Promise.resolve().then(a)};c(),n={push:function(e){t.push(e),c()},filter:function(e){return t=t.filter(e),n}}}}}(null);return t.options=c({async:!0,ssr:!1},e),t}(),B=function(){},j=e.forwardRef(function(t,n){var r=e.useRef(null),o=e.useState({onScrollCapture:B,onWheelCapture:B,onTouchMoveCapture:B}),a=o[0],u=o[1],s=t.forwardProps,l=t.children,d=t.className,f=t.removeScrollBar,v=t.enabled,m=t.shards,p=t.sideCar,h=t.noRelative,g=t.noIsolation,y=t.inert,E=t.allowPinchZoom,b=t.as,w=void 0===b?"div":b,S=t.gapMode,C=i(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),N=p,k=F([r,n]),M=c(c({},C),a);return e.createElement(e.Fragment,null,v&&e.createElement(N,{sideCar:D,removeScrollBar:f,shards:m,noRelative:h,noIsolation:g,inert:y,setCallbacks:u,allowPinchZoom:!!E,lockRef:r,gapMode:S}),s?e.cloneElement(e.Children.only(l),c(c({},M),{ref:k})):e.createElement(w,c({},M,{className:d,ref:k}),l))});j.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},j.classNames={fullWidth:L,zeroRight:T};function K(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=function(){if("undefined"!=typeof __webpack_nonce__)return __webpack_nonce__}();return t&&e.setAttribute("nonce",t),e}var O=function(){var e=0,t=null;return{add:function(n){var r,o;0==e&&(t=K())&&(o=n,(r=t).styleSheet?r.styleSheet.cssText=o:r.appendChild(document.createTextNode(o)),function(e){(document.head||document.getElementsByTagName("head")[0]).appendChild(e)}(t)),e++},remove:function(){! --e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},X=function(){var t,n=(t=O(),function(n,r){e.useEffect(function(){return t.add(n),function(){t.remove()}},[n&&r])});return function(e){var t=e.styles,r=e.dynamic;return n(t,r),null}},Y={left:0,top:0,right:0,gap:0},H=function(e){return parseInt(e||"",10)||0},U=function(e){if(void 0===e&&(e="margin"),"undefined"==typeof window)return Y;var t=function(e){var t=window.getComputedStyle(document.body),n=t["padding"===e?"paddingLeft":"marginLeft"],r=t["padding"===e?"paddingTop":"marginTop"],o=t["padding"===e?"paddingRight":"marginRight"];return[H(n),H(r),H(o)]}(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},Z=X(),q="data-scroll-locked",z=function(e,t,n,r){var o=e.left,a=e.top,c=e.right,i=e.gap;return void 0===n&&(n="margin"),"\n .".concat("with-scroll-bars-hidden"," {\n overflow: hidden ").concat(r,";\n padding-right: ").concat(i,"px ").concat(r,";\n }\n body[").concat(q,"] {\n overflow: hidden ").concat(r,";\n overscroll-behavior: contain;\n ").concat([t&&"position: relative ".concat(r,";"),"margin"===n&&"\n padding-left: ".concat(o,"px;\n padding-top: ").concat(a,"px;\n padding-right: ").concat(c,"px;\n margin-left:0;\n margin-top:0;\n margin-right: ").concat(i,"px ").concat(r,";\n "),"padding"===n&&"padding-right: ".concat(i,"px ").concat(r,";")].filter(Boolean).join(""),"\n }\n \n .").concat(T," {\n right: ").concat(i,"px ").concat(r,";\n }\n \n .").concat(L," {\n margin-right: ").concat(i,"px ").concat(r,";\n }\n \n .").concat(T," .").concat(T," {\n right: 0 ").concat(r,";\n }\n \n .").concat(L," .").concat(L," {\n margin-right: 0 ").concat(r,";\n }\n \n body[").concat(q,"] {\n ").concat("--removed-body-scroll-bar-size",": ").concat(i,"px;\n }\n")},G=function(){var e=parseInt(document.body.getAttribute(q)||"0",10);return isFinite(e)?e:0},J=function(t){var n=t.noRelative,r=t.noImportant,o=t.gapMode,a=void 0===o?"margin":o;e.useEffect(function(){return document.body.setAttribute(q,(G()+1).toString()),function(){var e=G()-1;e<=0?document.body.removeAttribute(q):document.body.setAttribute(q,e.toString())}},[]);var c=e.useMemo(function(){return U(a)},[a]);return e.createElement(Z,{styles:z(c,!n,a,r?"":"!important")})},Q=!1;if("undefined"!=typeof window)try{var V=Object.defineProperty({},"passive",{get:function(){return Q=!0,!0}});window.addEventListener("test",V,V),window.removeEventListener("test",V,V)}catch(e){Q=!1}var $=!!Q&&{passive:!1},ee=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return"hidden"!==n[t]&&!(n.overflowY===n.overflowX&&!function(e){return"TEXTAREA"===e.tagName}(e)&&"visible"===n[t])},te=function(e,t){var n=t.ownerDocument,r=t;do{if("undefined"!=typeof ShadowRoot&&r instanceof ShadowRoot&&(r=r.host),ne(e,r)){var o=re(e,r);if(o[1]>o[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},ne=function(e,t){return"v"===e?function(e){return ee(e,"overflowY")}(t):function(e){return ee(e,"overflowX")}(t)},re=function(e,t){return"v"===e?[(n=t).scrollTop,n.scrollHeight,n.clientHeight]:function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]}(t);var n},oe=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},ae=function(e){return[e.deltaX,e.deltaY]},ce=function(e){return e&&"current"in e?e.current:e},ie=function(e){return"\n .block-interactivity-".concat(e," {pointer-events: none;}\n .allow-interactivity-").concat(e," {pointer-events: all;}\n")},ue=0,se=[];function le(e){for(var t=null;null!==e;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var de,fe=(de=function(t){var n=e.useRef([]),r=e.useRef([0,0]),o=e.useRef(),a=e.useState(ue++)[0],c=e.useState(X)[0],i=e.useRef(t);e.useEffect(function(){i.current=t},[t]),e.useEffect(function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(a));var e=u([t.lockRef.current],(t.shards||[]).map(ce),!0).filter(Boolean);return e.forEach(function(e){return e.classList.add("allow-interactivity-".concat(a))}),function(){document.body.classList.remove("block-interactivity-".concat(a)),e.forEach(function(e){return e.classList.remove("allow-interactivity-".concat(a))})}}},[t.inert,t.lockRef.current,t.shards]);var s=e.useCallback(function(e,t){if("touches"in e&&2===e.touches.length||"wheel"===e.type&&e.ctrlKey)return!i.current.allowPinchZoom;var n,a=oe(e),c=r.current,u="deltaX"in e?e.deltaX:c[0]-a[0],s="deltaY"in e?e.deltaY:c[1]-a[1],l=e.target,d=Math.abs(u)>Math.abs(s)?"h":"v";if("touches"in e&&"h"===d&&"range"===l.type)return!1;var f=window.getSelection(),v=f&&f.anchorNode;if(v&&(v===l||v.contains(l)))return!1;var m=te(d,l);if(!m)return!0;if(m?n=d:(n="v"===d?"h":"v",m=te(d,l)),!m)return!1;if(!o.current&&"changedTouches"in e&&(u||s)&&(o.current=n),!n)return!0;var p=o.current||n;return function(e,t,n,r,o){var a=function(e,t){return"h"===e&&"rtl"===t?-1:1}(e,window.getComputedStyle(t).direction),c=a*r,i=n.target,u=t.contains(i),s=!1,l=c>0,d=0,f=0;do{if(!i)break;var v=re(e,i),m=v[0],p=v[1]-v[2]-a*m;(m||p)&&ne(e,i)&&(d+=p,f+=m);var h=i.parentNode;i=h&&h.nodeType===Node.DOCUMENT_FRAGMENT_NODE?h.host:h}while(!u&&i!==document.body||u&&(t.contains(i)||t===i));return(l&&(o&&Math.abs(d)<1||!o&&c>d)||!l&&(o&&Math.abs(f)<1||!o&&-c>f))&&(s=!0),s}(p,t,e,"h"===p?u:s,!0)},[]),l=e.useCallback(function(e){var t=e;if(se.length&&se[se.length-1]===c){var r="deltaY"in t?ae(t):oe(t),o=n.current.filter(function(e){return e.name===t.type&&(e.target===t.target||t.target===e.shadowParent)&&(n=e.delta,o=r,n[0]===o[0]&&n[1]===o[1]);var n,o})[0];if(o&&o.should)t.cancelable&&t.preventDefault();else if(!o){var a=(i.current.shards||[]).map(ce).filter(Boolean).filter(function(e){return e.contains(t.target)});(a.length>0?s(t,a[0]):!i.current.noIsolation)&&t.cancelable&&t.preventDefault()}}},[]),d=e.useCallback(function(e,t,r,o){var a={name:e,delta:t,target:r,should:o,shadowParent:le(r)};n.current.push(a),setTimeout(function(){n.current=n.current.filter(function(e){return e!==a})},1)},[]),f=e.useCallback(function(e){r.current=oe(e),o.current=void 0},[]),v=e.useCallback(function(e){d(e.type,ae(e),e.target,s(e,t.lockRef.current))},[]),m=e.useCallback(function(e){d(e.type,oe(e),e.target,s(e,t.lockRef.current))},[]);e.useEffect(function(){return se.push(c),t.setCallbacks({onScrollCapture:v,onWheelCapture:v,onTouchMoveCapture:m}),document.addEventListener("wheel",l,$),document.addEventListener("touchmove",l,$),document.addEventListener("touchstart",f,$),function(){se=se.filter(function(e){return e!==c}),document.removeEventListener("wheel",l,$),document.removeEventListener("touchmove",l,$),document.removeEventListener("touchstart",f,$)}},[]);var p=t.removeScrollBar,h=t.inert;return e.createElement(e.Fragment,null,h?e.createElement(c,{styles:ie(a)}):null,p?e.createElement(J,{noRelative:t.noRelative,gapMode:t.gapMode}):null)},D.useMedium(de),W),ve=e.forwardRef(function(t,n){return e.createElement(j,c({},t,{ref:n,sideCar:fe}))});ve.classNames=j.classNames;var me=ve;export{p as F,me as R,A as h,l as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var t=function(){return t=Object.assign||function(t){for(var r,n=1,e=arguments.length;n<e;n++)for(var o in r=arguments[n])Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o]);return t},t.apply(this,arguments)};function r(t,r){var n={};for(var e in t)Object.prototype.hasOwnProperty.call(t,e)&&r.indexOf(e)<0&&(n[e]=t[e]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(e=Object.getOwnPropertySymbols(t);o<e.length;o++)r.indexOf(e[o])<0&&Object.prototype.propertyIsEnumerable.call(t,e[o])&&(n[e[o]]=t[e[o]])}return n}function n(t,r,n,e){return new(n||(n=Promise))(function(o,c){function a(t){try{i(e.next(t))}catch(t){c(t)}}function p(t){try{i(e.throw(t))}catch(t){c(t)}}function i(t){var r;t.done?o(t.value):(r=t.value,r instanceof n?r:new n(function(t){t(r)})).then(a,p)}i((e=e.apply(t,r||[])).next())})}function e(t,r,n){if(n||2===arguments.length)for(var e,o=0,c=r.length;o<c;o++)!e&&o in r||(e||(e=Array.prototype.slice.call(r,0,o)),e[o]=r[o]);return t.concat(e||Array.prototype.slice.call(r))}"function"==typeof SuppressedError&&SuppressedError;export{r as _,n as a,t as b,e as c};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import{c as a}from"./createLucideIcon-70ab5429.js";
|
|
2
|
+
/**
|
|
3
|
+
* @license lucide-react v0.378.0 - ISC
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the ISC license.
|
|
6
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
7
|
+
*/const t=a("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]),e=a("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);
|
|
8
|
+
/**
|
|
9
|
+
* @license lucide-react v0.378.0 - ISC
|
|
10
|
+
*
|
|
11
|
+
* This source code is licensed under the ISC license.
|
|
12
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
13
|
+
*/export{t as A,e as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_ as e}from"./_tslib-35bb891d.js";import{jsx as r}from"react/jsx-runtime";import*as t from"react";import{a as s,c as a}from"./utils-de9c4c2b.js";const n=e=>"boolean"==typeof e?`${e}`:0===e?"0":e,o=s,i=(e,r)=>t=>{var s;if(null==(null==r?void 0:r.variants))return o(e,null==t?void 0:t.class,null==t?void 0:t.className);const{variants:a,defaultVariants:i}=r,l=Object.keys(a).map(e=>{const r=null==t?void 0:t[e],s=null==i?void 0:i[e];if(null===r)return null;const o=n(r)||n(s);return a[e][o]}),d=t&&Object.entries(t).reduce((e,r)=>{let[t,s]=r;return void 0===s||(e[t]=s),e},{}),u=null==r||null===(s=r.compoundVariants)||void 0===s?void 0:s.reduce((e,r)=>{let{class:t,className:s,...a}=r;return Object.entries(a).every(e=>{let[r,t]=e;return Array.isArray(t)?t.includes({...i,...d}[r]):{...i,...d}[r]===t})?[...e,t,s]:e},[]);return o(e,l,u,null==t?void 0:t.class,null==t?void 0:t.className)},l=i("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),d=t.forwardRef((t,s)=>{var{className:n,variant:o,size:i}=t,d=e(t,["className","variant","size"]);return r("button",Object.assign({className:a(l({variant:o,size:i,className:n})),ref:s},d))});d.displayName="Button";export{d as B,i as c};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_ as a}from"./_tslib-35bb891d.js";import{jsx as e}from"react/jsx-runtime";import*as s from"react";import{c as r}from"./utils-de9c4c2b.js";const t=s.forwardRef((s,t)=>{var{className:c}=s,d=a(s,["className"]);return e("div",Object.assign({ref:t,className:r("rounded-xl border bg-card text-card-foreground shadow",c)},d))});t.displayName="Card";const c=s.forwardRef((s,t)=>{var{className:c}=s,d=a(s,["className"]);return e("div",Object.assign({ref:t,className:r("flex flex-col space-y-1.5 p-6",c)},d))});c.displayName="CardHeader";const d=s.forwardRef((s,t)=>{var{className:c,children:d}=s,l=a(s,["className","children"]);return e("h3",Object.assign({ref:t,className:r("font-semibold leading-none tracking-tight",c)},l,{children:d}))});d.displayName="CardTitle";s.forwardRef((s,t)=>{var{className:c}=s,d=a(s,["className"]);return e("p",Object.assign({ref:t,className:r("text-sm text-muted-foreground",c)},d))}).displayName="CardDescription";const l=s.forwardRef((s,t)=>{var{className:c}=s,d=a(s,["className"]);return e("div",Object.assign({ref:t,className:r("p-6 pt-0",c)},d))});l.displayName="CardContent";s.forwardRef((s,t)=>{var{className:c}=s,d=a(s,["className"]);return e("div",Object.assign({ref:t,className:r("flex items-center p-6 pt-0",c)},d))}).displayName="CardFooter";export{t as C,l as a,c as b,d as c};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import{c}from"./createLucideIcon-70ab5429.js";
|
|
2
|
+
/**
|
|
3
|
+
* @license lucide-react v0.378.0 - ISC
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the ISC license.
|
|
6
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
7
|
+
*/const e=c("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);export{e as C};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import{c as o}from"./createLucideIcon-70ab5429.js";
|
|
2
|
+
/**
|
|
3
|
+
* @license lucide-react v0.378.0 - ISC
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the ISC license.
|
|
6
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
7
|
+
*/const e=o("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);export{e as C};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import{c as e}from"./createLucideIcon-70ab5429.js";
|
|
2
|
+
/**
|
|
3
|
+
* @license lucide-react v0.378.0 - ISC
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the ISC license.
|
|
6
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
7
|
+
*/const o=e("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);export{o as C};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import{c as e}from"./createLucideIcon-70ab5429.js";
|
|
2
|
+
/**
|
|
3
|
+
* @license lucide-react v0.378.0 - ISC
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the ISC license.
|
|
6
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
7
|
+
*/const o=e("Code",[["polyline",{points:"16 18 22 12 16 6",key:"z7tu5w"}],["polyline",{points:"8 6 2 12 8 18",key:"1eg1df"}]]);export{o as C};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import{forwardRef as e,createElement as r}from"react";
|
|
2
|
+
/**
|
|
3
|
+
* @license lucide-react v0.378.0 - ISC
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the ISC license.
|
|
6
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
7
|
+
*/const o=(...e)=>e.filter((e,r,o)=>Boolean(e)&&o.indexOf(e)===r).join(" ");
|
|
8
|
+
/**
|
|
9
|
+
* @license lucide-react v0.378.0 - ISC
|
|
10
|
+
*
|
|
11
|
+
* This source code is licensed under the ISC license.
|
|
12
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
13
|
+
*/
|
|
14
|
+
var t={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};
|
|
15
|
+
/**
|
|
16
|
+
* @license lucide-react v0.378.0 - ISC
|
|
17
|
+
*
|
|
18
|
+
* This source code is licensed under the ISC license.
|
|
19
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
20
|
+
*/const s=e(({color:e="currentColor",size:s=24,strokeWidth:i=2,absoluteStrokeWidth:a,className:n="",children:c,iconNode:l,...d},h)=>r("svg",{ref:h,...t,width:s,height:s,stroke:e,strokeWidth:a?24*Number(i)/Number(s):i,className:o("lucide",n),...d},[...l.map(([e,o])=>r(e,o)),...Array.isArray(c)?c:[c]])),i=(t,i)=>{const a=e(({className:e,...a},n)=>{return r(s,{ref:n,iconNode:i,className:o(`lucide-${c=t,c.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,e),...a});var c});return a.displayName=`${t}`,a};
|
|
21
|
+
/**
|
|
22
|
+
* @license lucide-react v0.378.0 - ISC
|
|
23
|
+
*
|
|
24
|
+
* This source code is licensed under the ISC license.
|
|
25
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
26
|
+
*/export{i as c};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import{c as e}from"./createLucideIcon-70ab5429.js";import{_ as n}from"./_tslib-35bb891d.js";import{jsx as t,jsxs as r}from"react/jsx-runtime";import*as o from"react";import{c as a,b as s,a as i,P as d,d as c,e as u}from"./index-8dc6d938.js";import{u as l,c as p}from"./index-91a5b8d5.js";import{u as f}from"./index-7725d7e0.js";import{c as m}from"./index-aaeb33b0.js";import{u as g}from"./index-13505606.js";import{c as h,A as v,D as w,C as _,b as y,R as b,P as M}from"./index-842a4484.js";import{h as x,u as C,F as D,R}from"./Combination-ee85502b.js";import{u as k}from"./index-325e2e09.js";import{c as O,R as P,I as N}from"./index-b273f426.js";import{u as I}from"./index-70f4e709.js";import{c as E}from"./utils-de9c4c2b.js";
|
|
2
|
+
/**
|
|
3
|
+
* @license lucide-react v0.378.0 - ISC
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the ISC license.
|
|
6
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
7
|
+
*/const T=e("ArrowDown",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]),S=e("ArrowUp",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]),F=e("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]),A=e("EllipsisVertical",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"12",cy:"5",r:"1",key:"gxeob9"}],["circle",{cx:"12",cy:"19",r:"1",key:"lyex9k"}]]);
|
|
8
|
+
/**
|
|
9
|
+
* @license lucide-react v0.378.0 - ISC
|
|
10
|
+
*
|
|
11
|
+
* This source code is licensed under the ISC license.
|
|
12
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
13
|
+
*/var L=["Enter"," "],j=["ArrowUp","PageDown","End"],K=["ArrowDown","PageUp","Home",...j],z={ltr:[...L,"ArrowRight"],rtl:[...L,"ArrowLeft"]},G={ltr:["ArrowLeft"],rtl:["ArrowRight"]},V="Menu",[U,B,X]=m(V),[q,Y]=a(V,[X,h,O]),H=h(),W=O(),[Z,J]=q(V),[Q,$]=q(V),ee=e=>{const{__scopeMenu:n,open:r=!1,children:a,dir:s,onOpenChange:i,modal:d=!0}=e,c=H(n),[u,l]=o.useState(null),p=o.useRef(!1),f=I(i),m=g(s);return o.useEffect(()=>{const e=()=>{p.current=!0,document.addEventListener("pointerdown",n,{capture:!0,once:!0}),document.addEventListener("pointermove",n,{capture:!0,once:!0})},n=()=>p.current=!1;return document.addEventListener("keydown",e,{capture:!0}),()=>{document.removeEventListener("keydown",e,{capture:!0}),document.removeEventListener("pointerdown",n,{capture:!0}),document.removeEventListener("pointermove",n,{capture:!0})}},[]),t(b,{...c,children:t(Z,{scope:n,open:r,onOpenChange:f,content:u,onContentChange:l,children:t(Q,{scope:n,onClose:o.useCallback(()=>f(!1),[f]),isUsingKeyboardRef:p,dir:m,modal:d,children:a})})})};ee.displayName=V;var ne=o.forwardRef((e,n)=>{const{__scopeMenu:r,...o}=e,a=H(r);return t(v,{...a,...o,ref:n})});ne.displayName="MenuAnchor";var te="MenuPortal",[re,oe]=q(te,{forceMount:void 0}),ae=e=>{const{__scopeMenu:n,forceMount:r,children:o,container:a}=e,i=J(te,n);return t(re,{scope:n,forceMount:r,children:t(s,{present:r||i.open,children:t(M,{asChild:!0,container:a,children:o})})})};ae.displayName=te;var se="MenuContent",[ie,de]=q(se),ce=o.forwardRef((e,n)=>{const r=oe(se,e.__scopeMenu),{forceMount:o=r.forceMount,...a}=e,i=J(se,e.__scopeMenu),d=$(se,e.__scopeMenu);return t(U.Provider,{scope:e.__scopeMenu,children:t(s,{present:o||i.open,children:t(U.Slot,{scope:e.__scopeMenu,children:d.modal?t(ue,{...a,ref:n}):t(le,{...a,ref:n})})})})}),ue=o.forwardRef((e,n)=>{const r=J(se,e.__scopeMenu),a=o.useRef(null),s=l(n,a);return o.useEffect(()=>{const e=a.current;if(e)return x(e)},[]),t(fe,{...e,ref:s,trapFocus:r.open,disableOutsidePointerEvents:r.open,disableOutsideScroll:!0,onFocusOutside:i(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>r.onOpenChange(!1)})}),le=o.forwardRef((e,n)=>{const r=J(se,e.__scopeMenu);return t(fe,{...e,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>r.onOpenChange(!1)})}),pe=u("MenuContent.ScrollLock"),fe=o.forwardRef((e,n)=>{const{__scopeMenu:r,loop:a=!1,trapFocus:s,onOpenAutoFocus:d,onCloseAutoFocus:c,disableOutsidePointerEvents:u,onEntryFocus:p,onEscapeKeyDown:f,onPointerDownOutside:m,onFocusOutside:g,onInteractOutside:h,onDismiss:v,disableOutsideScroll:y,...b}=e,M=J(se,r),x=$(se,r),k=H(r),O=W(r),N=B(r),[I,E]=o.useState(null),T=o.useRef(null),S=l(n,T,M.onContentChange),F=o.useRef(0),A=o.useRef(""),L=o.useRef(0),z=o.useRef(null),G=o.useRef("right"),V=o.useRef(0),U=y?R:o.Fragment,X=y?{as:pe,allowPinchZoom:!0}:void 0,q=e=>{const n=A.current+e,t=N().filter(e=>!e.disabled),r=document.activeElement,o=t.find(e=>e.ref.current===r)?.textValue,a=function(e,n,t){const r=n.length>1&&Array.from(n).every(e=>e===n[0]),o=r?n[0]:n,a=t?e.indexOf(t):-1;let s=(i=e,d=Math.max(a,0),i.map((e,n)=>i[(d+n)%i.length]));var i,d;1===o.length&&(s=s.filter(e=>e!==t));const c=s.find(e=>e.toLowerCase().startsWith(o.toLowerCase()));return c!==t?c:void 0}(t.map(e=>e.textValue),n,o),s=t.find(e=>e.textValue===a)?.ref.current;!function e(n){A.current=n,window.clearTimeout(F.current),""!==n&&(F.current=window.setTimeout(()=>e(""),1e3))}(n),s&&setTimeout(()=>s.focus())};o.useEffect(()=>()=>window.clearTimeout(F.current),[]),C();const Y=o.useCallback(e=>G.current===z.current?.side&&function(e,n){if(!n)return!1;const t={x:e.clientX,y:e.clientY};return function(e,n){const{x:t,y:r}=e;let o=!1;for(let e=0,a=n.length-1;e<n.length;a=e++){const s=n[e],i=n[a],d=s.x,c=s.y,u=i.x,l=i.y;c>r!=l>r&&t<(u-d)*(r-c)/(l-c)+d&&(o=!o)}return o}(t,n)}(e,z.current?.area),[]);return t(ie,{scope:r,searchRef:A,onItemEnter:o.useCallback(e=>{Y(e)&&e.preventDefault()},[Y]),onItemLeave:o.useCallback(e=>{Y(e)||(T.current?.focus(),E(null))},[Y]),onTriggerLeave:o.useCallback(e=>{Y(e)&&e.preventDefault()},[Y]),pointerGraceTimerRef:L,onPointerGraceIntentChange:o.useCallback(e=>{z.current=e},[]),children:t(U,{...X,children:t(D,{asChild:!0,trapped:s,onMountAutoFocus:i(d,e=>{e.preventDefault(),T.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:c,children:t(w,{asChild:!0,disableOutsidePointerEvents:u,onEscapeKeyDown:f,onPointerDownOutside:m,onFocusOutside:g,onInteractOutside:h,onDismiss:v,children:t(P,{asChild:!0,...O,dir:x.dir,orientation:"vertical",loop:a,currentTabStopId:I,onCurrentTabStopIdChange:E,onEntryFocus:i(p,e=>{x.isUsingKeyboardRef.current||e.preventDefault()}),preventScrollOnEntryFocus:!0,children:t(_,{role:"menu","aria-orientation":"vertical","data-state":Ge(M.open),"data-radix-menu-content":"",dir:x.dir,...k,...b,ref:S,style:{outline:"none",...b.style},onKeyDown:i(b.onKeyDown,e=>{const n=e.target.closest("[data-radix-menu-content]")===e.currentTarget,t=e.ctrlKey||e.altKey||e.metaKey,r=1===e.key.length;n&&("Tab"===e.key&&e.preventDefault(),!t&&r&&q(e.key));const o=T.current;if(e.target!==o)return;if(!K.includes(e.key))return;e.preventDefault();const a=N().filter(e=>!e.disabled).map(e=>e.ref.current);j.includes(e.key)&&a.reverse(),function(e){const n=document.activeElement;for(const t of e){if(t===n)return;if(t.focus(),document.activeElement!==n)return}}(a)}),onBlur:i(e.onBlur,e=>{e.currentTarget.contains(e.target)||(window.clearTimeout(F.current),A.current="")}),onPointerMove:i(e.onPointerMove,Be(e=>{const n=e.target,t=V.current!==e.clientX;if(e.currentTarget.contains(n)&&t){const n=e.clientX>V.current?"right":"left";G.current=n,V.current=e.clientX}}))})})})})})})});ce.displayName=se;var me=o.forwardRef((e,n)=>{const{__scopeMenu:r,...o}=e;return t(d.div,{role:"group",...o,ref:n})});me.displayName="MenuGroup";var ge=o.forwardRef((e,n)=>{const{__scopeMenu:r,...o}=e;return t(d.div,{...o,ref:n})});ge.displayName="MenuLabel";var he="MenuItem",ve="menu.itemSelect",we=o.forwardRef((e,n)=>{const{disabled:r=!1,onSelect:a,...s}=e,d=o.useRef(null),u=$(he,e.__scopeMenu),p=de(he,e.__scopeMenu),f=l(n,d),m=o.useRef(!1);return t(_e,{...s,ref:f,disabled:r,onClick:i(e.onClick,()=>{const e=d.current;if(!r&&e){const n=new CustomEvent(ve,{bubbles:!0,cancelable:!0});e.addEventListener(ve,e=>a?.(e),{once:!0}),c(e,n),n.defaultPrevented?m.current=!1:u.onClose()}}),onPointerDown:n=>{e.onPointerDown?.(n),m.current=!0},onPointerUp:i(e.onPointerUp,e=>{m.current||e.currentTarget?.click()}),onKeyDown:i(e.onKeyDown,e=>{const n=""!==p.searchRef.current;r||n&&" "===e.key||L.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())})})});we.displayName=he;var _e=o.forwardRef((e,n)=>{const{__scopeMenu:r,disabled:a=!1,textValue:s,...c}=e,u=de(he,r),p=W(r),f=o.useRef(null),m=l(n,f),[g,h]=o.useState(!1),[v,w]=o.useState("");return o.useEffect(()=>{const e=f.current;e&&w((e.textContent??"").trim())},[c.children]),t(U.ItemSlot,{scope:r,disabled:a,textValue:s??v,children:t(N,{asChild:!0,...p,focusable:!a,children:t(d.div,{role:"menuitem","data-highlighted":g?"":void 0,"aria-disabled":a||void 0,"data-disabled":a?"":void 0,...c,ref:m,onPointerMove:i(e.onPointerMove,Be(e=>{if(a)u.onItemLeave(e);else if(u.onItemEnter(e),!e.defaultPrevented){e.currentTarget.focus({preventScroll:!0})}})),onPointerLeave:i(e.onPointerLeave,Be(e=>u.onItemLeave(e))),onFocus:i(e.onFocus,()=>h(!0)),onBlur:i(e.onBlur,()=>h(!1))})})})}),ye=o.forwardRef((e,n)=>{const{checked:r=!1,onCheckedChange:o,...a}=e;return t(Oe,{scope:e.__scopeMenu,checked:r,children:t(we,{role:"menuitemcheckbox","aria-checked":Ve(r)?"mixed":r,...a,ref:n,"data-state":Ue(r),onSelect:i(a.onSelect,()=>o?.(!!Ve(r)||!r),{checkForDefaultPrevented:!1})})})});ye.displayName="MenuCheckboxItem";var be="MenuRadioGroup",[Me,xe]=q(be,{value:void 0,onValueChange:()=>{}}),Ce=o.forwardRef((e,n)=>{const{value:r,onValueChange:o,...a}=e,s=I(o);return t(Me,{scope:e.__scopeMenu,value:r,onValueChange:s,children:t(me,{...a,ref:n})})});Ce.displayName=be;var De="MenuRadioItem",Re=o.forwardRef((e,n)=>{const{value:r,...o}=e,a=xe(De,e.__scopeMenu),s=r===a.value;return t(Oe,{scope:e.__scopeMenu,checked:s,children:t(we,{role:"menuitemradio","aria-checked":s,...o,ref:n,"data-state":Ue(s),onSelect:i(o.onSelect,()=>a.onValueChange?.(r),{checkForDefaultPrevented:!1})})})});Re.displayName=De;var ke="MenuItemIndicator",[Oe,Pe]=q(ke,{checked:!1}),Ne=o.forwardRef((e,n)=>{const{__scopeMenu:r,forceMount:o,...a}=e,i=Pe(ke,r);return t(s,{present:o||Ve(i.checked)||!0===i.checked,children:t(d.span,{...a,ref:n,"data-state":Ue(i.checked)})})});Ne.displayName=ke;var Ie=o.forwardRef((e,n)=>{const{__scopeMenu:r,...o}=e;return t(d.div,{role:"separator","aria-orientation":"horizontal",...o,ref:n})});Ie.displayName="MenuSeparator";var Ee=o.forwardRef((e,n)=>{const{__scopeMenu:r,...o}=e,a=H(r);return t(y,{...a,...o,ref:n})});Ee.displayName="MenuArrow";var Te="MenuSub",[Se,Fe]=q(Te),Ae=e=>{const{__scopeMenu:n,children:r,open:a=!1,onOpenChange:s}=e,i=J(Te,n),d=H(n),[c,u]=o.useState(null),[l,p]=o.useState(null),f=I(s);return o.useEffect(()=>(!1===i.open&&f(!1),()=>f(!1)),[i.open,f]),t(b,{...d,children:t(Z,{scope:n,open:a,onOpenChange:f,content:l,onContentChange:p,children:t(Se,{scope:n,contentId:k(),triggerId:k(),trigger:c,onTriggerChange:u,children:r})})})};Ae.displayName=Te;var Le="MenuSubTrigger",je=o.forwardRef((e,n)=>{const r=J(Le,e.__scopeMenu),a=$(Le,e.__scopeMenu),s=Fe(Le,e.__scopeMenu),d=de(Le,e.__scopeMenu),c=o.useRef(null),{pointerGraceTimerRef:u,onPointerGraceIntentChange:l}=d,f={__scopeMenu:e.__scopeMenu},m=o.useCallback(()=>{c.current&&window.clearTimeout(c.current),c.current=null},[]);return o.useEffect(()=>m,[m]),o.useEffect(()=>{const e=u.current;return()=>{window.clearTimeout(e),l(null)}},[u,l]),t(ne,{asChild:!0,...f,children:t(_e,{id:s.triggerId,"aria-haspopup":"menu","aria-expanded":r.open,"aria-controls":s.contentId,"data-state":Ge(r.open),...e,ref:p(n,s.onTriggerChange),onClick:n=>{e.onClick?.(n),e.disabled||n.defaultPrevented||(n.currentTarget.focus(),r.open||r.onOpenChange(!0))},onPointerMove:i(e.onPointerMove,Be(n=>{d.onItemEnter(n),n.defaultPrevented||e.disabled||r.open||c.current||(d.onPointerGraceIntentChange(null),c.current=window.setTimeout(()=>{r.onOpenChange(!0),m()},100))})),onPointerLeave:i(e.onPointerLeave,Be(e=>{m();const n=r.content?.getBoundingClientRect();if(n){const t=r.content?.dataset.side,o="right"===t,a=o?-5:5,s=n[o?"left":"right"],i=n[o?"right":"left"];d.onPointerGraceIntentChange({area:[{x:e.clientX+a,y:e.clientY},{x:s,y:n.top},{x:i,y:n.top},{x:i,y:n.bottom},{x:s,y:n.bottom}],side:t}),window.clearTimeout(u.current),u.current=window.setTimeout(()=>d.onPointerGraceIntentChange(null),300)}else{if(d.onTriggerLeave(e),e.defaultPrevented)return;d.onPointerGraceIntentChange(null)}})),onKeyDown:i(e.onKeyDown,n=>{const t=""!==d.searchRef.current;e.disabled||t&&" "===n.key||z[a.dir].includes(n.key)&&(r.onOpenChange(!0),r.content?.focus(),n.preventDefault())})})})});je.displayName=Le;var Ke="MenuSubContent",ze=o.forwardRef((e,n)=>{const r=oe(se,e.__scopeMenu),{forceMount:a=r.forceMount,...d}=e,c=J(se,e.__scopeMenu),u=$(se,e.__scopeMenu),p=Fe(Ke,e.__scopeMenu),f=o.useRef(null),m=l(n,f);return t(U.Provider,{scope:e.__scopeMenu,children:t(s,{present:a||c.open,children:t(U.Slot,{scope:e.__scopeMenu,children:t(fe,{id:p.contentId,"aria-labelledby":p.triggerId,...d,ref:m,align:"start",side:"rtl"===u.dir?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:e=>{u.isUsingKeyboardRef.current&&f.current?.focus(),e.preventDefault()},onCloseAutoFocus:e=>e.preventDefault(),onFocusOutside:i(e.onFocusOutside,e=>{e.target!==p.trigger&&c.onOpenChange(!1)}),onEscapeKeyDown:i(e.onEscapeKeyDown,e=>{u.onClose(),e.preventDefault()}),onKeyDown:i(e.onKeyDown,e=>{const n=e.currentTarget.contains(e.target),t=G[u.dir].includes(e.key);n&&t&&(c.onOpenChange(!1),p.trigger?.focus(),e.preventDefault())})})})})})});function Ge(e){return e?"open":"closed"}function Ve(e){return"indeterminate"===e}function Ue(e){return Ve(e)?"indeterminate":e?"checked":"unchecked"}function Be(e){return n=>"mouse"===n.pointerType?e(n):void 0}ze.displayName=Ke;var Xe=ee,qe=ne,Ye=ae,He=ce,We=me,Ze=ge,Je=we,Qe=ye,$e=Ce,en=Re,nn=Ne,tn=Ie,rn=Ee,on=Ae,an=je,sn=ze,dn="DropdownMenu",[cn,un]=a(dn,[Y]),ln=Y(),[pn,fn]=cn(dn),mn=e=>{const{__scopeDropdownMenu:n,children:r,dir:a,open:s,defaultOpen:i,onOpenChange:d,modal:c=!0}=e,u=ln(n),l=o.useRef(null),[p,m]=f({prop:s,defaultProp:i??!1,onChange:d,caller:dn});return t(pn,{scope:n,triggerId:k(),triggerRef:l,contentId:k(),open:p,onOpenChange:m,onOpenToggle:o.useCallback(()=>m(e=>!e),[m]),modal:c,children:t(Xe,{...u,open:p,onOpenChange:m,dir:a,modal:c,children:r})})};mn.displayName=dn;var gn="DropdownMenuTrigger",hn=o.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,disabled:o=!1,...a}=e,s=fn(gn,r),c=ln(r);return t(qe,{asChild:!0,...c,children:t(d.button,{type:"button",id:s.triggerId,"aria-haspopup":"menu","aria-expanded":s.open,"aria-controls":s.open?s.contentId:void 0,"data-state":s.open?"open":"closed","data-disabled":o?"":void 0,disabled:o,...a,ref:p(n,s.triggerRef),onPointerDown:i(e.onPointerDown,e=>{o||0!==e.button||!1!==e.ctrlKey||(s.onOpenToggle(),s.open||e.preventDefault())}),onKeyDown:i(e.onKeyDown,e=>{o||(["Enter"," "].includes(e.key)&&s.onOpenToggle(),"ArrowDown"===e.key&&s.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(e.key)&&e.preventDefault())})})})});hn.displayName=gn;var vn=e=>{const{__scopeDropdownMenu:n,...r}=e,o=ln(n);return t(Ye,{...o,...r})};vn.displayName="DropdownMenuPortal";var wn="DropdownMenuContent",_n=o.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...a}=e,s=fn(wn,r),d=ln(r),c=o.useRef(!1);return t(He,{id:s.contentId,"aria-labelledby":s.triggerId,...d,...a,ref:n,onCloseAutoFocus:i(e.onCloseAutoFocus,e=>{c.current||s.triggerRef.current?.focus(),c.current=!1,e.preventDefault()}),onInteractOutside:i(e.onInteractOutside,e=>{const n=e.detail.originalEvent,t=0===n.button&&!0===n.ctrlKey,r=2===n.button||t;s.modal&&!r||(c.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});_n.displayName=wn;o.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...o}=e,a=ln(r);return t(We,{...a,...o,ref:n})}).displayName="DropdownMenuGroup";o.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...o}=e,a=ln(r);return t(Ze,{...a,...o,ref:n})}).displayName="DropdownMenuLabel";var yn=o.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...o}=e,a=ln(r);return t(Je,{...a,...o,ref:n})});yn.displayName="DropdownMenuItem";o.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...o}=e,a=ln(r);return t(Qe,{...a,...o,ref:n})}).displayName="DropdownMenuCheckboxItem";o.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...o}=e,a=ln(r);return t($e,{...a,...o,ref:n})}).displayName="DropdownMenuRadioGroup";o.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...o}=e,a=ln(r);return t(en,{...a,...o,ref:n})}).displayName="DropdownMenuRadioItem";o.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...o}=e,a=ln(r);return t(nn,{...a,...o,ref:n})}).displayName="DropdownMenuItemIndicator";var bn=o.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...o}=e,a=ln(r);return t(tn,{...a,...o,ref:n})});bn.displayName="DropdownMenuSeparator";o.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...o}=e,a=ln(r);return t(rn,{...a,...o,ref:n})}).displayName="DropdownMenuArrow";var Mn=o.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...o}=e,a=ln(r);return t(an,{...a,...o,ref:n})});Mn.displayName="DropdownMenuSubTrigger";var xn=o.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...o}=e,a=ln(r);return t(sn,{...a,...o,ref:n,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});xn.displayName="DropdownMenuSubContent";var Cn=mn,Dn=hn,Rn=vn,kn=_n,On=yn,Pn=bn,Nn=e=>{const{__scopeDropdownMenu:n,children:r,open:o,onOpenChange:a,defaultOpen:s}=e,i=ln(n),[d,c]=f({prop:o,defaultProp:s??!1,onChange:a,caller:"DropdownMenuSub"});return t(on,{...i,open:d,onOpenChange:c,children:r})},In=Mn,En=xn;const Tn=e=>{var r=n(e,[]);return t(Cn,Object.assign({"data-slot":"dropdown-menu"},r))},Sn=e=>{var r=n(e,[]);return t(Dn,Object.assign({"data-slot":"dropdown-menu-trigger"},r))},Fn=e=>{var{className:r,sideOffset:o=4}=e,a=n(e,["className","sideOffset"]);return t(Rn,{children:t(kn,Object.assign({"data-slot":"dropdown-menu-content",sideOffset:o,className:E("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",r)},a))})},An=e=>{var{className:r,inset:o,variant:a="default"}=e,s=n(e,["className","inset","variant"]);return t(On,Object.assign({"data-slot":"dropdown-menu-item","data-inset":o,"data-variant":a,className:E("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-pointer items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",r)},s))},Ln=e=>{var{className:r}=e,o=n(e,["className"]);return t(Pn,Object.assign({"data-slot":"dropdown-menu-separator",className:E("bg-border -mx-1 my-1 h-px",r)},o))},jn=e=>{var r=n(e,[]);return t(Nn,Object.assign({"data-slot":"dropdown-menu-sub"},r))},Kn=e=>{var{className:o,inset:a,children:s}=e,i=n(e,["className","inset","children"]);return r(In,Object.assign({"data-slot":"dropdown-menu-sub-trigger","data-inset":a,className:E("focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",o)},i,{children:[s,t(F,{className:"ml-auto size-4"})]}))},zn=e=>{var{className:r}=e,o=n(e,["className"]);return t(En,Object.assign({"data-slot":"dropdown-menu-sub-content",className:E("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg",r)},o))};export{S as A,Tn as D,A as E,Sn as a,Fn as b,An as c,T as d,Ln as e,jn as f,Kn as g,zn as h};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import{c as a}from"./createLucideIcon-70ab5429.js";
|
|
2
|
+
/**
|
|
3
|
+
* @license lucide-react v0.378.0 - ISC
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the ISC license.
|
|
6
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
7
|
+
*/const t=a("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);export{t as E};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import{c as a}from"./createLucideIcon-70ab5429.js";
|
|
2
|
+
/**
|
|
3
|
+
* @license lucide-react v0.378.0 - ISC
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the ISC license.
|
|
6
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
7
|
+
*/const e=a("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);export{e as F};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_ as e}from"./_tslib-35bb891d.js";import{jsx as r}from"react/jsx-runtime";import*as t from"react";import{c as o,P as n,a,b as s}from"./index-8dc6d938.js";import{u as i}from"./index-7725d7e0.js";import{u as c}from"./index-91a5b8d5.js";import{c as d,A as l,D as u,C as p,b as f,R as m,P as v}from"./index-842a4484.js";import{c as h}from"./utils-de9c4c2b.js";var g,C="HoverCard",[w,b]=o(C,[d]),O=d(),[P,x]=w(C),R=e=>{const{__scopeHoverCard:o,children:n,open:a,defaultOpen:s,onOpenChange:c,openDelay:d=700,closeDelay:l=300}=e,u=O(o),p=t.useRef(0),f=t.useRef(0),v=t.useRef(!1),h=t.useRef(!1),[g,w]=i({prop:a,defaultProp:s??!1,onChange:c,caller:C}),b=t.useCallback(()=>{clearTimeout(f.current),p.current=window.setTimeout(()=>w(!0),d)},[d,w]),x=t.useCallback(()=>{clearTimeout(p.current),v.current||h.current||(f.current=window.setTimeout(()=>w(!1),l))},[l,w]),R=t.useCallback(()=>w(!1),[w]);return t.useEffect(()=>()=>{clearTimeout(p.current),clearTimeout(f.current)},[]),r(P,{scope:o,open:g,onOpenChange:w,onOpen:b,onClose:x,onDismiss:R,hasSelectionRef:v,isPointerDownOnContentRef:h,children:r(m,{...u,children:n})})};R.displayName=C;var E="HoverCardTrigger",S=t.forwardRef((e,t)=>{const{__scopeHoverCard:o,...s}=e,i=x(E,o),c=O(o);return r(l,{asChild:!0,...c,children:r(n.a,{"data-state":i.open?"open":"closed",...s,ref:t,onPointerEnter:a(e.onPointerEnter,F(i.onOpen)),onPointerLeave:a(e.onPointerLeave,F(i.onClose)),onFocus:a(e.onFocus,i.onOpen),onBlur:a(e.onBlur,i.onClose),onTouchStart:a(e.onTouchStart,e=>e.preventDefault())})})});S.displayName=E;var y="HoverCardPortal",[D,_]=w(y,{forceMount:void 0}),T=e=>{const{__scopeHoverCard:t,forceMount:o,children:n,container:a}=e,i=x(y,t);return r(D,{scope:t,forceMount:o,children:r(s,{present:o||i.open,children:r(v,{asChild:!0,container:a,children:n})})})};T.displayName=y;var N="HoverCardContent",H=t.forwardRef((e,t)=>{const o=_(N,e.__scopeHoverCard),{forceMount:n=o.forceMount,...i}=e,c=x(N,e.__scopeHoverCard);return r(s,{present:n||c.open,children:r(j,{"data-state":c.open?"open":"closed",...i,onPointerEnter:a(e.onPointerEnter,F(c.onOpen)),onPointerLeave:a(e.onPointerLeave,F(c.onClose)),ref:t})})});H.displayName=N;var j=t.forwardRef((e,o)=>{const{__scopeHoverCard:n,onEscapeKeyDown:s,onPointerDownOutside:i,onFocusOutside:d,onInteractOutside:l,...f}=e,m=x(N,n),v=O(n),h=t.useRef(null),C=c(o,h),[w,b]=t.useState(!1);return t.useEffect(()=>{if(w){const e=document.body;return g=e.style.userSelect||e.style.webkitUserSelect,e.style.userSelect="none",e.style.webkitUserSelect="none",()=>{e.style.userSelect=g,e.style.webkitUserSelect=g}}},[w]),t.useEffect(()=>{if(h.current){const e=()=>{b(!1),m.isPointerDownOnContentRef.current=!1,setTimeout(()=>{""!==document.getSelection()?.toString()&&(m.hasSelectionRef.current=!0)})};return document.addEventListener("pointerup",e),()=>{document.removeEventListener("pointerup",e),m.hasSelectionRef.current=!1,m.isPointerDownOnContentRef.current=!1}}},[m.isPointerDownOnContentRef,m.hasSelectionRef]),t.useEffect(()=>{if(h.current){(function(e){const r=[],t=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});for(;t.nextNode();)r.push(t.currentNode);return r})(h.current).forEach(e=>e.setAttribute("tabindex","-1"))}}),r(u,{asChild:!0,disableOutsidePointerEvents:!1,onInteractOutside:l,onEscapeKeyDown:s,onPointerDownOutside:i,onFocusOutside:a(d,e=>{e.preventDefault()}),onDismiss:m.onDismiss,children:r(p,{...v,...f,onPointerDown:a(f.onPointerDown,e=>{e.currentTarget.contains(e.target)&&b(!0),m.hasSelectionRef.current=!1,m.isPointerDownOnContentRef.current=!0}),ref:C,style:{...f.style,userSelect:w?"text":void 0,WebkitUserSelect:w?"text":void 0,"--radix-hover-card-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-hover-card-content-available-width":"var(--radix-popper-available-width)","--radix-hover-card-content-available-height":"var(--radix-popper-available-height)","--radix-hover-card-trigger-width":"var(--radix-popper-anchor-width)","--radix-hover-card-trigger-height":"var(--radix-popper-anchor-height)"}})})});function F(e){return r=>"touch"===r.pointerType?void 0:e()}t.forwardRef((e,t)=>{const{__scopeHoverCard:o,...n}=e,a=O(o);return r(f,{...a,...n,ref:t})}).displayName="HoverCardArrow";var L=R,k=S,I=T,M=H;const A=t=>{var o=e(t,[]);return r(L,Object.assign({"data-slot":"hover-card"},o))},U=t=>{var o=e(t,[]);return r(k,Object.assign({"data-slot":"hover-card-trigger"},o))},z=t=>{var{className:o,align:n="center",sideOffset:a=4}=t,s=e(t,["className","align","sideOffset"]);return r(I,Object.assign({"data-slot":"hover-card-portal"},{children:r(M,Object.assign({"data-slot":"hover-card-content",align:n,sideOffset:a,className:h("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-64 origin-(--radix-hover-card-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden",o)},s))}))};export{A as H,U as a,z as b};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function t(t,[a,n]){return Math.min(n,Math.max(a,t))}export{t as c};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import*as t from"react";import"react/jsx-runtime";var r=t.createContext(void 0);function e(e){const o=t.useContext(r);return e||o||"ltr"}export{e as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import*as r from"react";import{u as t}from"./index-8dc6d938.js";var i=r[" useId ".trim().toString()]||(()=>{}),o=0;function a(a){const[e,n]=r.useState(i());return t(()=>{a||n(r=>r??String(o++))},[a]),a||(e?`radix-${e}`:"")}export{a as u};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import{c as t}from"./createLucideIcon-70ab5429.js";import e,{memo as i,useCallback as o,useMemo as n,PureComponent as r,createElement as s}from"react";import a,{flushSync as h}from"react-dom";import{jsx as l,jsxs as p}from"react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
* @license lucide-react v0.378.0 - ISC
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the ISC license.
|
|
6
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
7
|
+
*/const d=t("AlignCenter",[["line",{x1:"21",x2:"3",y1:"6",y2:"6",key:"1fp77t"}],["line",{x1:"17",x2:"7",y1:"12",y2:"12",key:"rsh8ii"}],["line",{x1:"19",x2:"5",y1:"18",y2:"18",key:"1t0tuv"}]]),u=t("AlignLeft",[["line",{x1:"21",x2:"3",y1:"6",y2:"6",key:"1fp77t"}],["line",{x1:"15",x2:"3",y1:"12",y2:"12",key:"v6grx8"}],["line",{x1:"17",x2:"3",y1:"18",y2:"18",key:"1awlsn"}]]),c=t("AlignRight",[["line",{x1:"21",x2:"3",y1:"6",y2:"6",key:"1fp77t"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}],["line",{x1:"21",x2:"7",y1:"18",y2:"18",key:"1g9eri"}]]),f=t("Link",[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]]);
|
|
8
|
+
/**
|
|
9
|
+
* @license lucide-react v0.378.0 - ISC
|
|
10
|
+
*
|
|
11
|
+
* This source code is licensed under the ISC license.
|
|
12
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
13
|
+
*/function g(t){if(t.__esModule)return t;var e=t.default;if("function"==typeof e){var i=function t(){if(this instanceof t){var i=[null];return i.push.apply(i,arguments),new(Function.bind.apply(e,i))}return e.apply(this,arguments)};i.prototype=e.prototype}else i={};return Object.defineProperty(i,"__esModule",{value:!0}),Object.keys(t).forEach(function(e){var o=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(i,e,o.get?o:{enumerable:!0,get:function(){return t[e]}})}),i}var m,b,y,v,w={},x={get exports(){return w},set exports(t){w=t}},S={},z={};function D(t){var e,i,o="";if("string"==typeof t||"number"==typeof t)o+=t;else if("object"==typeof t)if(Array.isArray(t))for(e=0;e<t.length;e++)t[e]&&(i=D(t[e]))&&(o&&(o+=" "),o+=i);else for(e in t)t[e]&&(o&&(o+=" "),o+=e);return o}function P(){for(var t,e,i=0,o="";i<arguments.length;)(t=arguments[i++])&&(e=D(t))&&(o&&(o+=" "),o+=e);return o}({get exports(){return z},set exports(t){z=t}}).exports=function(){if(v)return y;v=1;var t=b?m:(b=1,m="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");function e(){}function i(){}return i.resetWarningCache=e,y=function(){function o(e,i,o,n,r,s){if(s!==t){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function n(){return o}o.isRequired=o;var r={array:o,bigint:o,bool:o,func:o,number:o,object:o,string:o,symbol:o,any:o,arrayOf:n,element:o,elementType:o,instanceOf:n,node:o,objectOf:n,oneOf:n,oneOfType:n,shape:n,exact:n,checkPropTypes:i,resetWarningCache:e};return r.PropTypes=r,r}}()();var R=g(Object.freeze({__proto__:null,clsx:P,default:P})),M={},W={};Object.defineProperty(W,"__esModule",{value:!0}),W.dontSetMe=function(t,e,i){if(t[e])return new Error("Invalid prop ".concat(e," passed to ").concat(i," - do not set this, set it on the child."))},W.findInArray=function(t,e){for(let i=0,o=t.length;i<o;i++)if(e.apply(e,[t[i],i,t]))return t[i]},W.int=function(t){return parseInt(t,10)},W.isFunction=function(t){return"function"==typeof t||"[object Function]"===Object.prototype.toString.call(t)},W.isNum=function(t){return"number"==typeof t&&!isNaN(t)};var E={};Object.defineProperty(E,"__esModule",{value:!0}),E.browserPrefixToKey=C,E.browserPrefixToStyle=function(t,e){return e?"-".concat(e.toLowerCase(),"-").concat(t):t},E.default=void 0,E.getPrefix=N;const O=["Moz","Webkit","O","ms"];function N(){var t;let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"transform";if("undefined"==typeof window)return"";const i=null===(t=window.document)||void 0===t||null===(t=t.documentElement)||void 0===t?void 0:t.style;if(!i)return"";if(e in i)return"";for(let t=0;t<O.length;t++)if(C(e,O[t])in i)return O[t];return""}function C(t,e){return e?"".concat(e).concat(function(t){let e="",i=!0;for(let o=0;o<t.length;o++)i?(e+=t[o].toUpperCase(),i=!1):"-"===t[o]?i=!0:e+=t[o];return e}(t)):t}E.default=N(),Object.defineProperty(M,"__esModule",{value:!0}),M.addClassName=_,M.addEvent=function(t,e,i,o){if(!t)return;const n={capture:!0,...o};t.addEventListener?t.addEventListener(e,i,n):t.attachEvent?t.attachEvent("on"+e,i):t["on"+e]=i},M.addUserSelectStyles=function(t){if(!t)return;let e=t.getElementById("react-draggable-style-el");e||(e=t.createElement("style"),e.type="text/css",e.id="react-draggable-style-el",e.innerHTML=".react-draggable-transparent-selection *::-moz-selection {all: inherit;}\n",e.innerHTML+=".react-draggable-transparent-selection *::selection {all: inherit;}\n",t.getElementsByTagName("head")[0].appendChild(e));t.body&&_(t.body,"react-draggable-transparent-selection")},M.createCSSTransform=function(t,e){const i=L(t,e,"px");return{[(0,T.browserPrefixToKey)("transform",T.default)]:i}},M.createSVGTransform=function(t,e){return L(t,e,"")},M.getTouch=function(t,e){return t.targetTouches&&(0,H.findInArray)(t.targetTouches,t=>e===t.identifier)||t.changedTouches&&(0,H.findInArray)(t.changedTouches,t=>e===t.identifier)},M.getTouchIdentifier=function(t){if(t.targetTouches&&t.targetTouches[0])return t.targetTouches[0].identifier;if(t.changedTouches&&t.changedTouches[0])return t.changedTouches[0].identifier},M.getTranslation=L,M.innerHeight=function(t){let e=t.clientHeight;const i=t.ownerDocument.defaultView.getComputedStyle(t);return e-=(0,H.int)(i.paddingTop),e-=(0,H.int)(i.paddingBottom),e},M.innerWidth=function(t){let e=t.clientWidth;const i=t.ownerDocument.defaultView.getComputedStyle(t);return e-=(0,H.int)(i.paddingLeft),e-=(0,H.int)(i.paddingRight),e},M.matchesSelector=A,M.matchesSelectorAndParentsTo=function(t,e,i){let o=t;do{if(A(o,e))return!0;if(o===i)return!1;o=o.parentNode}while(o);return!1},M.offsetXYFromParent=function(t,e,i){const o=e===e.ownerDocument.body?{left:0,top:0}:e.getBoundingClientRect(),n=(t.clientX+e.scrollLeft-o.left)/i,r=(t.clientY+e.scrollTop-o.top)/i;return{x:n,y:r}},M.outerHeight=function(t){let e=t.clientHeight;const i=t.ownerDocument.defaultView.getComputedStyle(t);return e+=(0,H.int)(i.borderTopWidth),e+=(0,H.int)(i.borderBottomWidth),e},M.outerWidth=function(t){let e=t.clientWidth;const i=t.ownerDocument.defaultView.getComputedStyle(t);return e+=(0,H.int)(i.borderLeftWidth),e+=(0,H.int)(i.borderRightWidth),e},M.removeClassName=B,M.removeEvent=function(t,e,i,o){if(!t)return;const n={capture:!0,...o};t.removeEventListener?t.removeEventListener(e,i,n):t.detachEvent?t.detachEvent("on"+e,i):t["on"+e]=null},M.removeUserSelectStyles=function(t){if(!t)return;try{if(t.body&&B(t.body,"react-draggable-transparent-selection"),t.selection)t.selection.empty();else{const e=(t.defaultView||window).getSelection();e&&"Caret"!==e.type&&e.removeAllRanges()}}catch(t){}};var H=W,T=function(t,e){if(!e&&t&&t.__esModule)return t;if(null===t||"object"!=typeof t&&"function"!=typeof t)return{default:t};var i=k(e);if(i&&i.has(t))return i.get(t);var o={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in t)if("default"!==r&&Object.prototype.hasOwnProperty.call(t,r)){var s=n?Object.getOwnPropertyDescriptor(t,r):null;s&&(s.get||s.set)?Object.defineProperty(o,r,s):o[r]=t[r]}o.default=t,i&&i.set(t,o);return o}(E);function k(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,i=new WeakMap;return(k=function(t){return t?i:e})(t)}let j="";function A(t,e){return j||(j=(0,H.findInArray)(["matches","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector"],function(e){return(0,H.isFunction)(t[e])})),!!(0,H.isFunction)(t[j])&&t[j](e)}function L(t,e,i){let{x:o,y:n}=t,r="translate(".concat(o).concat(i,",").concat(n).concat(i,")");if(e){const t="".concat("string"==typeof e.x?e.x:e.x+i),o="".concat("string"==typeof e.y?e.y:e.y+i);r="translate(".concat(t,", ").concat(o,")")+r}return r}function _(t,e){t.classList?t.classList.add(e):t.className.match(new RegExp("(?:^|\\s)".concat(e,"(?!\\S)")))||(t.className+=" ".concat(e))}function B(t,e){t.classList?t.classList.remove(e):t.className=t.className.replace(new RegExp("(?:^|\\s)".concat(e,"(?!\\S)"),"g"),"")}var F={};Object.defineProperty(F,"__esModule",{value:!0}),F.canDragX=function(t){return"both"===t.props.axis||"x"===t.props.axis},F.canDragY=function(t){return"both"===t.props.axis||"y"===t.props.axis},F.createCoreData=function(t,e,i){const o=!(0,X.isNum)(t.lastX),n=U(t);return o?{node:n,deltaX:0,deltaY:0,lastX:e,lastY:i,x:e,y:i}:{node:n,deltaX:e-t.lastX,deltaY:i-t.lastY,lastX:t.lastX,lastY:t.lastY,x:e,y:i}},F.createDraggableData=function(t,e){const i=t.props.scale;return{node:e.node,x:t.state.x+e.deltaX/i,y:t.state.y+e.deltaY/i,deltaX:e.deltaX/i,deltaY:e.deltaY/i,lastX:t.state.x,lastY:t.state.y}},F.getBoundPosition=function(t,e,i){if(!t.props.bounds)return[e,i];let{bounds:o}=t.props;o="string"==typeof o?o:function(t){return{left:t.left,top:t.top,right:t.right,bottom:t.bottom}}(o);const n=U(t);if("string"==typeof o){const{ownerDocument:t}=n,e=t.defaultView;let i;if(i="parent"===o?n.parentNode:t.querySelector(o),!(i instanceof e.HTMLElement))throw new Error('Bounds selector "'+o+'" could not find an element.');const r=i,s=e.getComputedStyle(n),a=e.getComputedStyle(r);o={left:-n.offsetLeft+(0,X.int)(a.paddingLeft)+(0,X.int)(s.marginLeft),top:-n.offsetTop+(0,X.int)(a.paddingTop)+(0,X.int)(s.marginTop),right:(0,Y.innerWidth)(r)-(0,Y.outerWidth)(n)-n.offsetLeft+(0,X.int)(a.paddingRight)-(0,X.int)(s.marginRight),bottom:(0,Y.innerHeight)(r)-(0,Y.outerHeight)(n)-n.offsetTop+(0,X.int)(a.paddingBottom)-(0,X.int)(s.marginBottom)}}(0,X.isNum)(o.right)&&(e=Math.min(e,o.right));(0,X.isNum)(o.bottom)&&(i=Math.min(i,o.bottom));(0,X.isNum)(o.left)&&(e=Math.max(e,o.left));(0,X.isNum)(o.top)&&(i=Math.max(i,o.top));return[e,i]},F.getControlPosition=function(t,e,i){const o="number"==typeof e?(0,Y.getTouch)(t,e):null;if("number"==typeof e&&!o)return null;const n=U(i),r=i.props.offsetParent||n.offsetParent||n.ownerDocument.body;return(0,Y.offsetXYFromParent)(o||t,r,i.props.scale)},F.snapToGrid=function(t,e,i){const o=Math.round(e/t[0])*t[0],n=Math.round(i/t[1])*t[1];return[o,n]};var X=W,Y=M;function U(t){const e=t.findDOMNode();if(!e)throw new Error("<DraggableCore>: Unmounted during event!");return e}var G={},I={};Object.defineProperty(I,"__esModule",{value:!0}),I.default=function(){},Object.defineProperty(G,"__esModule",{value:!0}),G.default=void 0;var V=function(t,e){if(!e&&t&&t.__esModule)return t;if(null===t||"object"!=typeof t&&"function"!=typeof t)return{default:t};var i=et(e);if(i&&i.has(t))return i.get(t);var o={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in t)if("default"!==r&&Object.prototype.hasOwnProperty.call(t,r)){var s=n?Object.getOwnPropertyDescriptor(t,r):null;s&&(s.get||s.set)?Object.defineProperty(o,r,s):o[r]=t[r]}o.default=t,i&&i.set(t,o);return o}(e),q=tt(z),K=tt(a),J=M,Q=F,Z=W,$=tt(I);function tt(t){return t&&t.__esModule?t:{default:t}}function et(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,i=new WeakMap;return(et=function(t){return t?i:e})(t)}function it(t,e,i){return(e=function(t){var e=function(t,e){if("object"!=typeof t||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var o=i.call(t,e||"default");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}const ot={start:"touchstart",move:"touchmove",stop:"touchend"},nt={start:"mousedown",move:"mousemove",stop:"mouseup"};let rt=nt,st=class extends V.Component{constructor(){super(...arguments),it(this,"dragging",!1),it(this,"lastX",NaN),it(this,"lastY",NaN),it(this,"touchIdentifier",null),it(this,"mounted",!1),it(this,"handleDragStart",t=>{if(this.props.onMouseDown(t),!this.props.allowAnyClick&&"number"==typeof t.button&&0!==t.button)return!1;const e=this.findDOMNode();if(!e||!e.ownerDocument||!e.ownerDocument.body)throw new Error("<DraggableCore> not mounted on DragStart!");const{ownerDocument:i}=e;if(this.props.disabled||!(t.target instanceof i.defaultView.Node)||this.props.handle&&!(0,J.matchesSelectorAndParentsTo)(t.target,this.props.handle,e)||this.props.cancel&&(0,J.matchesSelectorAndParentsTo)(t.target,this.props.cancel,e))return;"touchstart"===t.type&&t.preventDefault();const o=(0,J.getTouchIdentifier)(t);this.touchIdentifier=o;const n=(0,Q.getControlPosition)(t,o,this);if(null==n)return;const{x:r,y:s}=n,a=(0,Q.createCoreData)(this,r,s);(0,$.default)("DraggableCore: handleDragStart: %j",a),(0,$.default)("calling",this.props.onStart);!1!==this.props.onStart(t,a)&&!1!==this.mounted&&(this.props.enableUserSelectHack&&(0,J.addUserSelectStyles)(i),this.dragging=!0,this.lastX=r,this.lastY=s,(0,J.addEvent)(i,rt.move,this.handleDrag),(0,J.addEvent)(i,rt.stop,this.handleDragStop))}),it(this,"handleDrag",t=>{const e=(0,Q.getControlPosition)(t,this.touchIdentifier,this);if(null==e)return;let{x:i,y:o}=e;if(Array.isArray(this.props.grid)){let t=i-this.lastX,e=o-this.lastY;if([t,e]=(0,Q.snapToGrid)(this.props.grid,t,e),!t&&!e)return;i=this.lastX+t,o=this.lastY+e}const n=(0,Q.createCoreData)(this,i,o);(0,$.default)("DraggableCore: handleDrag: %j",n);if(!1!==this.props.onDrag(t,n)&&!1!==this.mounted)this.lastX=i,this.lastY=o;else try{this.handleDragStop(new MouseEvent("mouseup"))}catch(t){const e=document.createEvent("MouseEvents");e.initMouseEvent("mouseup",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),this.handleDragStop(e)}}),it(this,"handleDragStop",t=>{if(!this.dragging)return;const e=(0,Q.getControlPosition)(t,this.touchIdentifier,this);if(null==e)return;let{x:i,y:o}=e;if(Array.isArray(this.props.grid)){let t=i-this.lastX||0,e=o-this.lastY||0;[t,e]=(0,Q.snapToGrid)(this.props.grid,t,e),i=this.lastX+t,o=this.lastY+e}const n=(0,Q.createCoreData)(this,i,o);if(!1===this.props.onStop(t,n)||!1===this.mounted)return!1;const r=this.findDOMNode();r&&this.props.enableUserSelectHack&&(0,J.removeUserSelectStyles)(r.ownerDocument),(0,$.default)("DraggableCore: handleDragStop: %j",n),this.dragging=!1,this.lastX=NaN,this.lastY=NaN,r&&((0,$.default)("DraggableCore: Removing handlers"),(0,J.removeEvent)(r.ownerDocument,rt.move,this.handleDrag),(0,J.removeEvent)(r.ownerDocument,rt.stop,this.handleDragStop))}),it(this,"onMouseDown",t=>(rt=nt,this.handleDragStart(t))),it(this,"onMouseUp",t=>(rt=nt,this.handleDragStop(t))),it(this,"onTouchStart",t=>(rt=ot,this.handleDragStart(t))),it(this,"onTouchEnd",t=>(rt=ot,this.handleDragStop(t)))}componentDidMount(){this.mounted=!0;const t=this.findDOMNode();t&&(0,J.addEvent)(t,ot.start,this.onTouchStart,{passive:!1})}componentWillUnmount(){this.mounted=!1;const t=this.findDOMNode();if(t){const{ownerDocument:e}=t;(0,J.removeEvent)(e,nt.move,this.handleDrag),(0,J.removeEvent)(e,ot.move,this.handleDrag),(0,J.removeEvent)(e,nt.stop,this.handleDragStop),(0,J.removeEvent)(e,ot.stop,this.handleDragStop),(0,J.removeEvent)(t,ot.start,this.onTouchStart,{passive:!1}),this.props.enableUserSelectHack&&(0,J.removeUserSelectStyles)(e)}}findDOMNode(){var t,e;return null!==(t=this.props)&&void 0!==t&&t.nodeRef?null===(e=this.props)||void 0===e||null===(e=e.nodeRef)||void 0===e?void 0:e.current:K.default.findDOMNode(this)}render(){return V.cloneElement(V.Children.only(this.props.children),{onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp,onTouchEnd:this.onTouchEnd})}};G.default=st,it(st,"displayName","DraggableCore"),it(st,"propTypes",{allowAnyClick:q.default.bool,children:q.default.node.isRequired,disabled:q.default.bool,enableUserSelectHack:q.default.bool,offsetParent:function(t,e){if(t[e]&&1!==t[e].nodeType)throw new Error("Draggable's offsetParent must be a DOM Node.")},grid:q.default.arrayOf(q.default.number),handle:q.default.string,cancel:q.default.string,nodeRef:q.default.object,onStart:q.default.func,onDrag:q.default.func,onStop:q.default.func,onMouseDown:q.default.func,scale:q.default.number,className:Z.dontSetMe,style:Z.dontSetMe,transform:Z.dontSetMe}),it(st,"defaultProps",{allowAnyClick:!1,disabled:!1,enableUserSelectHack:!0,onStart:function(){},onDrag:function(){},onStop:function(){},onMouseDown:function(){},scale:1}),function(t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"DraggableCore",{enumerable:!0,get:function(){return p.default}}),t.default=void 0;var i=function(t,e){if(!e&&t&&t.__esModule)return t;if(null===t||"object"!=typeof t&&"function"!=typeof t)return{default:t};var i=c(e);if(i&&i.has(t))return i.get(t);var o={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in t)if("default"!==r&&Object.prototype.hasOwnProperty.call(t,r)){var s=n?Object.getOwnPropertyDescriptor(t,r):null;s&&(s.get||s.set)?Object.defineProperty(o,r,s):o[r]=t[r]}o.default=t,i&&i.set(t,o);return o}(e),o=u(z),n=u(a),r=u(R),s=M,h=F,l=W,p=u(G),d=u(I);function u(t){return t&&t.__esModule?t:{default:t}}function c(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,i=new WeakMap;return(c=function(t){return t?i:e})(t)}function f(){return f=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(t[o]=i[o])}return t},f.apply(this,arguments)}function g(t,e,i){return(e=function(t){var e=function(t,e){if("object"!=typeof t||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var o=i.call(t,e||"default");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}class m extends i.Component{static getDerivedStateFromProps(t,e){let{position:i}=t,{prevPropsPosition:o}=e;return!i||o&&i.x===o.x&&i.y===o.y?null:((0,d.default)("Draggable: getDerivedStateFromProps %j",{position:i,prevPropsPosition:o}),{x:i.x,y:i.y,prevPropsPosition:{...i}})}constructor(t){super(t),g(this,"onDragStart",(t,e)=>{(0,d.default)("Draggable: onDragStart: %j",e);if(!1===this.props.onStart(t,(0,h.createDraggableData)(this,e)))return!1;this.setState({dragging:!0,dragged:!0})}),g(this,"onDrag",(t,e)=>{if(!this.state.dragging)return!1;(0,d.default)("Draggable: onDrag: %j",e);const i=(0,h.createDraggableData)(this,e),o={x:i.x,y:i.y,slackX:0,slackY:0};if(this.props.bounds){const{x:t,y:e}=o;o.x+=this.state.slackX,o.y+=this.state.slackY;const[n,r]=(0,h.getBoundPosition)(this,o.x,o.y);o.x=n,o.y=r,o.slackX=this.state.slackX+(t-o.x),o.slackY=this.state.slackY+(e-o.y),i.x=o.x,i.y=o.y,i.deltaX=o.x-this.state.x,i.deltaY=o.y-this.state.y}if(!1===this.props.onDrag(t,i))return!1;this.setState(o)}),g(this,"onDragStop",(t,e)=>{if(!this.state.dragging)return!1;if(!1===this.props.onStop(t,(0,h.createDraggableData)(this,e)))return!1;(0,d.default)("Draggable: onDragStop: %j",e);const i={dragging:!1,slackX:0,slackY:0};if(Boolean(this.props.position)){const{x:t,y:e}=this.props.position;i.x=t,i.y=e}this.setState(i)}),this.state={dragging:!1,dragged:!1,x:t.position?t.position.x:t.defaultPosition.x,y:t.position?t.position.y:t.defaultPosition.y,prevPropsPosition:{...t.position},slackX:0,slackY:0,isElementSVG:!1},!t.position||t.onDrag||t.onStop||console.warn("A `position` was applied to this <Draggable>, without drag handlers. This will make this component effectively undraggable. Please attach `onDrag` or `onStop` handlers so you can adjust the `position` of this element.")}componentDidMount(){void 0!==window.SVGElement&&this.findDOMNode()instanceof window.SVGElement&&this.setState({isElementSVG:!0})}componentWillUnmount(){this.setState({dragging:!1})}findDOMNode(){var t,e;return null!==(t=null===(e=this.props)||void 0===e||null===(e=e.nodeRef)||void 0===e?void 0:e.current)&&void 0!==t?t:n.default.findDOMNode(this)}render(){const{axis:t,bounds:e,children:o,defaultPosition:n,defaultClassName:a,defaultClassNameDragging:l,defaultClassNameDragged:d,position:u,positionOffset:c,scale:g,...m}=this.props;let b={},y=null;const v=!Boolean(u)||this.state.dragging,w=u||n,x={x:(0,h.canDragX)(this)&&v?this.state.x:w.x,y:(0,h.canDragY)(this)&&v?this.state.y:w.y};this.state.isElementSVG?y=(0,s.createSVGTransform)(x,c):b=(0,s.createCSSTransform)(x,c);const S=(0,r.default)(o.props.className||"",a,{[l]:this.state.dragging,[d]:this.state.dragged});return i.createElement(p.default,f({},m,{onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop}),i.cloneElement(i.Children.only(o),{className:S,style:{...o.props.style,...b},transform:y}))}}t.default=m,g(m,"displayName","Draggable"),g(m,"propTypes",{...p.default.propTypes,axis:o.default.oneOf(["both","x","y","none"]),bounds:o.default.oneOfType([o.default.shape({left:o.default.number,right:o.default.number,top:o.default.number,bottom:o.default.number}),o.default.string,o.default.oneOf([!1])]),defaultClassName:o.default.string,defaultClassNameDragging:o.default.string,defaultClassNameDragged:o.default.string,defaultPosition:o.default.shape({x:o.default.number,y:o.default.number}),positionOffset:o.default.shape({x:o.default.oneOfType([o.default.number,o.default.string]),y:o.default.oneOfType([o.default.number,o.default.string])}),position:o.default.shape({x:o.default.number,y:o.default.number}),className:l.dontSetMe,style:l.dontSetMe,transform:l.dontSetMe}),g(m,"defaultProps",{...p.default.defaultProps,axis:"both",bounds:!1,defaultClassName:"react-draggable",defaultClassNameDragging:"react-draggable-dragging",defaultClassNameDragged:"react-draggable-dragged",defaultPosition:{x:0,y:0},scale:1})}(S);const{default:at,DraggableCore:ht}=S;x.exports=at,w.default=at,w.DraggableCore=ht;var lt=function(){return lt=Object.assign||function(t){for(var e,i=1,o=arguments.length;i<o;i++)for(var n in e=arguments[i])Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t},lt.apply(this,arguments)},pt={width:"100%",height:"10px",top:"0px",left:"0px",cursor:"row-resize"},dt={width:"10px",height:"100%",top:"0px",left:"0px",cursor:"col-resize"},ut={width:"20px",height:"20px",position:"absolute",zIndex:1},ct={top:lt(lt({},pt),{top:"-5px"}),right:lt(lt({},dt),{left:void 0,right:"-5px"}),bottom:lt(lt({},pt),{top:void 0,bottom:"-5px"}),left:lt(lt({},dt),{left:"-5px"}),topRight:lt(lt({},ut),{right:"-10px",top:"-10px",cursor:"ne-resize"}),bottomRight:lt(lt({},ut),{right:"-10px",bottom:"-10px",cursor:"se-resize"}),bottomLeft:lt(lt({},ut),{left:"-10px",bottom:"-10px",cursor:"sw-resize"}),topLeft:lt(lt({},ut),{left:"-10px",top:"-10px",cursor:"nw-resize"})},ft=i(function(t){var e=t.onResizeStart,i=t.direction,r=t.children,s=t.replaceStyles,a=t.className,h=o(function(t){e(t,i)},[e,i]),p=o(function(t){e(t,i)},[e,i]),d=n(function(){return lt(lt({position:"absolute",userSelect:"none"},ct[i]),null!=s?s:{})},[s,i]);return l("div",{className:a||void 0,style:d,onMouseDown:h,onTouchStart:p,children:r})}),gt=function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function o(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(o.prototype=i.prototype,new o)}}(),mt=function(){return mt=Object.assign||function(t){for(var e,i=1,o=arguments.length;i<o;i++)for(var n in e=arguments[i])Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t},mt.apply(this,arguments)},bt={width:"auto",height:"auto"},yt=function(t,e,i){return Math.max(Math.min(t,i),e)},vt=function(t,e,i){var o=Math.round(t/e);return o*e+i*(o-1)},wt=function(t,e){return new RegExp(t,"i").test(e)},xt=function(t){return Boolean(t.touches&&t.touches.length)},St=function(t,e,i){void 0===i&&(i=0);var o=e.reduce(function(i,o,n){return Math.abs(o-t)<Math.abs(e[i]-t)?n:i},0),n=Math.abs(e[o]-t);return 0===i||n<i?e[o]:t},zt=function(t){return"auto"===(t=t.toString())||t.endsWith("px")||t.endsWith("%")||t.endsWith("vh")||t.endsWith("vw")||t.endsWith("vmax")||t.endsWith("vmin")?t:"".concat(t,"px")},Dt=function(t,e,i,o){if(t&&"string"==typeof t){if(t.endsWith("px"))return Number(t.replace("px",""));if(t.endsWith("%"))return e*(Number(t.replace("%",""))/100);if(t.endsWith("vw"))return i*(Number(t.replace("vw",""))/100);if(t.endsWith("vh"))return o*(Number(t.replace("vh",""))/100)}return t},Pt=["as","ref","style","className","grid","gridGap","snap","bounds","boundsByDirection","size","defaultSize","minWidth","minHeight","maxWidth","maxHeight","lockAspectRatio","lockAspectRatioExtraWidth","lockAspectRatioExtraHeight","enable","handleStyles","handleClasses","handleWrapperStyle","handleWrapperClass","children","onResizeStart","onResize","onResizeStop","handleComponent","scale","resizeRatio","snapGap"],Rt="__resizable_base__",Mt=function(t){function e(e){var i,o,n,r,s=t.call(this,e)||this;return s.ratio=1,s.resizable=null,s.parentLeft=0,s.parentTop=0,s.resizableLeft=0,s.resizableRight=0,s.resizableTop=0,s.resizableBottom=0,s.targetLeft=0,s.targetTop=0,s.delta={width:0,height:0},s.appendBase=function(){if(!s.resizable||!s.window)return null;var t=s.parentNode;if(!t)return null;var e=s.window.document.createElement("div");return e.style.width="100%",e.style.height="100%",e.style.position="absolute",e.style.transform="scale(0, 0)",e.style.left="0",e.style.flex="0 0 100%",e.classList?e.classList.add(Rt):e.className+=Rt,t.appendChild(e),e},s.removeBase=function(t){var e=s.parentNode;e&&e.removeChild(t)},s.state={isResizing:!1,width:null!==(o=null===(i=s.propsSize)||void 0===i?void 0:i.width)&&void 0!==o?o:"auto",height:null!==(r=null===(n=s.propsSize)||void 0===n?void 0:n.height)&&void 0!==r?r:"auto",direction:"right",original:{x:0,y:0,width:0,height:0},backgroundStyle:{height:"100%",width:"100%",backgroundColor:"rgba(0,0,0,0)",cursor:"auto",opacity:0,position:"fixed",zIndex:9999,top:"0",left:"0",bottom:"0",right:"0"},flexBasis:void 0},s.onResizeStart=s.onResizeStart.bind(s),s.onMouseMove=s.onMouseMove.bind(s),s.onMouseUp=s.onMouseUp.bind(s),s}return gt(e,t),Object.defineProperty(e.prototype,"parentNode",{get:function(){return this.resizable?this.resizable.parentNode:null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"window",{get:function(){return this.resizable&&this.resizable.ownerDocument?this.resizable.ownerDocument.defaultView:null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"propsSize",{get:function(){return this.props.size||this.props.defaultSize||bt},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"size",{get:function(){var t=0,e=0;if(this.resizable&&this.window){var i=this.resizable.offsetWidth,o=this.resizable.offsetHeight,n=this.resizable.style.position;"relative"!==n&&(this.resizable.style.position="relative"),t="auto"!==this.resizable.style.width?this.resizable.offsetWidth:i,e="auto"!==this.resizable.style.height?this.resizable.offsetHeight:o,this.resizable.style.position=n}return{width:t,height:e}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"sizeStyle",{get:function(){var t=this,e=this.props.size,i=function(e){var i;if(void 0===t.state[e]||"auto"===t.state[e])return"auto";if(t.propsSize&&t.propsSize[e]&&(null===(i=t.propsSize[e])||void 0===i?void 0:i.toString().endsWith("%"))){if(t.state[e].toString().endsWith("%"))return t.state[e].toString();var o=t.getParentSize(),n=Number(t.state[e].toString().replace("px",""))/o[e]*100;return"".concat(n,"%")}return zt(t.state[e])};return{width:e&&void 0!==e.width&&!this.state.isResizing?zt(e.width):i("width"),height:e&&void 0!==e.height&&!this.state.isResizing?zt(e.height):i("height")}},enumerable:!1,configurable:!0}),e.prototype.getParentSize=function(){if(!this.parentNode)return this.window?{width:this.window.innerWidth,height:this.window.innerHeight}:{width:0,height:0};var t=this.appendBase();if(!t)return{width:0,height:0};var e=!1,i=this.parentNode.style.flexWrap;"wrap"!==i&&(e=!0,this.parentNode.style.flexWrap="wrap"),t.style.position="relative",t.style.minWidth="100%",t.style.minHeight="100%";var o={width:t.offsetWidth,height:t.offsetHeight};return e&&(this.parentNode.style.flexWrap=i),this.removeBase(t),o},e.prototype.bindEvents=function(){this.window&&(this.window.addEventListener("mouseup",this.onMouseUp),this.window.addEventListener("mousemove",this.onMouseMove),this.window.addEventListener("mouseleave",this.onMouseUp),this.window.addEventListener("touchmove",this.onMouseMove,{capture:!0,passive:!1}),this.window.addEventListener("touchend",this.onMouseUp))},e.prototype.unbindEvents=function(){this.window&&(this.window.removeEventListener("mouseup",this.onMouseUp),this.window.removeEventListener("mousemove",this.onMouseMove),this.window.removeEventListener("mouseleave",this.onMouseUp),this.window.removeEventListener("touchmove",this.onMouseMove,!0),this.window.removeEventListener("touchend",this.onMouseUp))},e.prototype.componentDidMount=function(){if(this.resizable&&this.window){var t=this.window.getComputedStyle(this.resizable);this.setState({width:this.state.width||this.size.width,height:this.state.height||this.size.height,flexBasis:"auto"!==t.flexBasis?t.flexBasis:void 0})}},e.prototype.componentWillUnmount=function(){this.window&&this.unbindEvents()},e.prototype.createSizeForCssProperty=function(t,e){var i=this.propsSize&&this.propsSize[e];return"auto"!==this.state[e]||this.state.original[e]!==t||void 0!==i&&"auto"!==i?t:"auto"},e.prototype.calculateNewMaxFromBoundary=function(t,e){var i,o,n=this.props.boundsByDirection,r=this.state.direction,s=n&&wt("left",r),a=n&&wt("top",r);if("parent"===this.props.bounds){var h=this.parentNode;h&&(i=s?this.resizableRight-this.parentLeft:h.offsetWidth+(this.parentLeft-this.resizableLeft),o=a?this.resizableBottom-this.parentTop:h.offsetHeight+(this.parentTop-this.resizableTop))}else"window"===this.props.bounds?this.window&&(i=s?this.resizableRight:this.window.innerWidth-this.resizableLeft,o=a?this.resizableBottom:this.window.innerHeight-this.resizableTop):this.props.bounds&&(i=s?this.resizableRight-this.targetLeft:this.props.bounds.offsetWidth+(this.targetLeft-this.resizableLeft),o=a?this.resizableBottom-this.targetTop:this.props.bounds.offsetHeight+(this.targetTop-this.resizableTop));return i&&Number.isFinite(i)&&(t=t&&t<i?t:i),o&&Number.isFinite(o)&&(e=e&&e<o?e:o),{maxWidth:t,maxHeight:e}},e.prototype.calculateNewSizeFromDirection=function(t,e){var i,o=this.props.scale||1,n=(i=this.props.resizeRatio||1,Array.isArray(i)?i:[i,i]),r=n[0],s=n[1],a=this.state,h=a.direction,l=a.original,p=this.props,d=p.lockAspectRatio,u=p.lockAspectRatioExtraHeight,c=p.lockAspectRatioExtraWidth,f=l.width,g=l.height,m=u||0,b=c||0;return wt("right",h)&&(f=l.width+(t-l.x)*r/o,d&&(g=(f-b)/this.ratio+m)),wt("left",h)&&(f=l.width-(t-l.x)*r/o,d&&(g=(f-b)/this.ratio+m)),wt("bottom",h)&&(g=l.height+(e-l.y)*s/o,d&&(f=(g-m)*this.ratio+b)),wt("top",h)&&(g=l.height-(e-l.y)*s/o,d&&(f=(g-m)*this.ratio+b)),{newWidth:f,newHeight:g}},e.prototype.calculateNewSizeFromAspectRatio=function(t,e,i,o){var n=this.props,r=n.lockAspectRatio,s=n.lockAspectRatioExtraHeight,a=n.lockAspectRatioExtraWidth,h=void 0===o.width?10:o.width,l=void 0===i.width||i.width<0?t:i.width,p=void 0===o.height?10:o.height,d=void 0===i.height||i.height<0?e:i.height,u=s||0,c=a||0;if(r){var f=(p-u)*this.ratio+c,g=(d-u)*this.ratio+c,m=(h-c)/this.ratio+u,b=(l-c)/this.ratio+u,y=Math.max(h,f),v=Math.min(l,g),w=Math.max(p,m),x=Math.min(d,b);t=yt(t,y,v),e=yt(e,w,x)}else t=yt(t,h,l),e=yt(e,p,d);return{newWidth:t,newHeight:e}},e.prototype.setBoundingClientRect=function(){var t=1/(this.props.scale||1);if("parent"===this.props.bounds){var e=this.parentNode;if(e){var i=e.getBoundingClientRect();this.parentLeft=i.left*t,this.parentTop=i.top*t}}if(this.props.bounds&&"string"!=typeof this.props.bounds){var o=this.props.bounds.getBoundingClientRect();this.targetLeft=o.left*t,this.targetTop=o.top*t}if(this.resizable){var n=this.resizable.getBoundingClientRect(),r=n.left,s=n.top,a=n.right,h=n.bottom;this.resizableLeft=r*t,this.resizableRight=a*t,this.resizableTop=s*t,this.resizableBottom=h*t}},e.prototype.onResizeStart=function(t,e){if(this.resizable&&this.window){var i,o=0,n=0;if(t.nativeEvent&&function(t){return Boolean((t.clientX||0===t.clientX)&&(t.clientY||0===t.clientY))}(t.nativeEvent)?(o=t.nativeEvent.clientX,n=t.nativeEvent.clientY):t.nativeEvent&&xt(t.nativeEvent)&&(o=t.nativeEvent.touches[0].clientX,n=t.nativeEvent.touches[0].clientY),this.props.onResizeStart)if(this.resizable)if(!1===this.props.onResizeStart(t,e,this.resizable))return;this.props.size&&(void 0!==this.props.size.height&&this.props.size.height!==this.state.height&&this.setState({height:this.props.size.height}),void 0!==this.props.size.width&&this.props.size.width!==this.state.width&&this.setState({width:this.props.size.width})),this.ratio="number"==typeof this.props.lockAspectRatio?this.props.lockAspectRatio:this.size.width/this.size.height;var r=this.window.getComputedStyle(this.resizable);if("auto"!==r.flexBasis){var s=this.parentNode;if(s){var a=this.window.getComputedStyle(s).flexDirection;this.flexDir=a.startsWith("row")?"row":"column",i=r.flexBasis}}this.setBoundingClientRect(),this.bindEvents();var h={original:{x:o,y:n,width:this.size.width,height:this.size.height},isResizing:!0,backgroundStyle:mt(mt({},this.state.backgroundStyle),{cursor:this.window.getComputedStyle(t.target).cursor||"auto"}),direction:e,flexBasis:i};this.setState(h)}},e.prototype.onMouseMove=function(t){var e=this;if(this.state.isResizing&&this.resizable&&this.window){if(this.window.TouchEvent&&xt(t))try{t.preventDefault(),t.stopPropagation()}catch(t){}var i=this.props,o=i.maxWidth,n=i.maxHeight,r=i.minWidth,s=i.minHeight,a=xt(t)?t.touches[0].clientX:t.clientX,l=xt(t)?t.touches[0].clientY:t.clientY,p=this.state,d=p.direction,u=p.original,c=p.width,f=p.height,g=this.getParentSize(),m=function(t,e,i,o,n,r,s){return o=Dt(o,t.width,e,i),n=Dt(n,t.height,e,i),r=Dt(r,t.width,e,i),s=Dt(s,t.height,e,i),{maxWidth:void 0===o?void 0:Number(o),maxHeight:void 0===n?void 0:Number(n),minWidth:void 0===r?void 0:Number(r),minHeight:void 0===s?void 0:Number(s)}}(g,this.window.innerWidth,this.window.innerHeight,o,n,r,s);o=m.maxWidth,n=m.maxHeight,r=m.minWidth,s=m.minHeight;var b=this.calculateNewSizeFromDirection(a,l),y=b.newHeight,v=b.newWidth,w=this.calculateNewMaxFromBoundary(o,n);this.props.snap&&this.props.snap.x&&(v=St(v,this.props.snap.x,this.props.snapGap)),this.props.snap&&this.props.snap.y&&(y=St(y,this.props.snap.y,this.props.snapGap));var x=this.calculateNewSizeFromAspectRatio(v,y,{width:w.maxWidth,height:w.maxHeight},{width:r,height:s});if(v=x.newWidth,y=x.newHeight,this.props.grid){var S=vt(v,this.props.grid[0],this.props.gridGap?this.props.gridGap[0]:0),z=vt(y,this.props.grid[1],this.props.gridGap?this.props.gridGap[1]:0),D=this.props.snapGap||0;v=0===D||Math.abs(S-v)<=D?S:v,y=0===D||Math.abs(z-y)<=D?z:y}var P={width:v-u.width,height:y-u.height};if(this.delta=P,c&&"string"==typeof c)if(c.endsWith("%")){var R=v/g.width*100;v="".concat(R,"%")}else if(c.endsWith("vw")){var M=v/this.window.innerWidth*100;v="".concat(M,"vw")}else if(c.endsWith("vh")){var W=v/this.window.innerHeight*100;v="".concat(W,"vh")}if(f&&"string"==typeof f)if(f.endsWith("%")){R=y/g.height*100;y="".concat(R,"%")}else if(f.endsWith("vw")){M=y/this.window.innerWidth*100;y="".concat(M,"vw")}else if(f.endsWith("vh")){W=y/this.window.innerHeight*100;y="".concat(W,"vh")}var E={width:this.createSizeForCssProperty(v,"width"),height:this.createSizeForCssProperty(y,"height")};"row"===this.flexDir?E.flexBasis=E.width:"column"===this.flexDir&&(E.flexBasis=E.height);var O=this.state.width!==E.width,N=this.state.height!==E.height,C=this.state.flexBasis!==E.flexBasis,H=O||N||C;H&&h(function(){e.setState(E)}),this.props.onResize&&H&&this.props.onResize(t,d,this.resizable,P)}},e.prototype.onMouseUp=function(t){var e,i,o=this.state,n=o.isResizing,r=o.direction;o.original,n&&this.resizable&&(this.props.onResizeStop&&this.props.onResizeStop(t,r,this.resizable,this.delta),this.props.size&&this.setState({width:null!==(e=this.props.size.width)&&void 0!==e?e:"auto",height:null!==(i=this.props.size.height)&&void 0!==i?i:"auto"}),this.unbindEvents(),this.setState({isResizing:!1,backgroundStyle:mt(mt({},this.state.backgroundStyle),{cursor:"auto"})}))},e.prototype.updateSize=function(t){var e,i;this.setState({width:null!==(e=t.width)&&void 0!==e?e:"auto",height:null!==(i=t.height)&&void 0!==i?i:"auto"})},e.prototype.renderResizer=function(){var t=this,e=this.props,i=e.enable,o=e.handleStyles,n=e.handleClasses,r=e.handleWrapperStyle,s=e.handleWrapperClass,a=e.handleComponent;if(!i)return null;var h=Object.keys(i).map(function(e){return!1!==i[e]?l(ft,{direction:e,onResizeStart:t.onResizeStart,replaceStyles:o&&o[e],className:n&&n[e],children:a&&a[e]?a[e]:null},e):null});return l("div",{className:s,style:r,children:h})},e.prototype.render=function(){var t=this,e=Object.keys(this.props).reduce(function(e,i){return-1!==Pt.indexOf(i)||(e[i]=t.props[i]),e},{}),i=mt(mt(mt({position:"relative",userSelect:this.state.isResizing?"none":"auto"},this.props.style),this.sizeStyle),{maxWidth:this.props.maxWidth,maxHeight:this.props.maxHeight,minWidth:this.props.minWidth,minHeight:this.props.minHeight,boxSizing:"border-box",flexShrink:0});this.state.flexBasis&&(i.flexBasis=this.state.flexBasis);var o=this.props.as||"div";return p(o,mt({style:i,className:this.props.className},e,{ref:function(e){e&&(t.resizable=e)},children:[this.state.isResizing&&l("div",{style:this.state.backgroundStyle}),this.props.children,this.renderResizer()]}))},e.defaultProps={as:"div",onResizeStart:function(){},onResize:function(){},onResizeStop:function(){},enable:{top:!0,right:!0,bottom:!0,left:!0,topRight:!0,bottomRight:!0,bottomLeft:!0,topLeft:!0},style:{},grid:[1,1],gridGap:[0,0],lockAspectRatio:!1,lockAspectRatioExtraWidth:0,lockAspectRatioExtraHeight:0,scale:1,resizeRatio:1,snapGap:0},e}(r),Wt=function(t,e){return Wt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])},Wt(t,e)};var Et=function(){return Et=Object.assign||function(t){for(var e,i=1,o=arguments.length;i<o;i++)for(var n in e=arguments[i])Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t},Et.apply(this,arguments)};var Ot={width:"auto",height:"auto",display:"inline-block",position:"absolute",top:0,left:0},Nt=function(t){function e(e){var i=t.call(this,e)||this;return i.resizingPosition={x:0,y:0},i.offsetFromParent={left:0,top:0},i.resizableElement={current:null},i.originalPosition={x:0,y:0},i.state={resizing:!1,bounds:{top:0,right:0,bottom:0,left:0},maxWidth:e.maxWidth,maxHeight:e.maxHeight},i.onResizeStart=i.onResizeStart.bind(i),i.onResize=i.onResize.bind(i),i.onResizeStop=i.onResizeStop.bind(i),i.onDragStart=i.onDragStart.bind(i),i.onDrag=i.onDrag.bind(i),i.onDragStop=i.onDragStop.bind(i),i.getMaxSizesFromProps=i.getMaxSizesFromProps.bind(i),i}return function(t,e){function i(){this.constructor=t}Wt(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}(e,t),e.prototype.componentDidMount=function(){this.updateOffsetFromParent();var t=this.offsetFromParent,e=t.left,i=t.top,o=this.getDraggablePosition(),n=o.x,r=o.y;this.draggable.setState({x:n-e,y:r-i}),this.forceUpdate()},e.prototype.getDraggablePosition=function(){var t=this.draggable.state;return{x:t.x,y:t.y}},e.prototype.getParent=function(){return this.resizable&&this.resizable.parentNode},e.prototype.getParentSize=function(){return this.resizable.getParentSize()},e.prototype.getMaxSizesFromProps=function(){return{maxWidth:void 0===this.props.maxWidth?Number.MAX_SAFE_INTEGER:this.props.maxWidth,maxHeight:void 0===this.props.maxHeight?Number.MAX_SAFE_INTEGER:this.props.maxHeight}},e.prototype.getSelfElement=function(){return this.resizable&&this.resizable.resizable},e.prototype.getOffsetHeight=function(t){var e=this.props.scale;switch(this.props.bounds){case"window":return window.innerHeight/e;case"body":return document.body.offsetHeight/e;default:return t.offsetHeight}},e.prototype.getOffsetWidth=function(t){var e=this.props.scale;switch(this.props.bounds){case"window":return window.innerWidth/e;case"body":return document.body.offsetWidth/e;default:return t.offsetWidth}},e.prototype.onDragStart=function(t,e){this.props.onDragStart&&this.props.onDragStart(t,e);var i=this.getDraggablePosition();if(this.originalPosition=i,this.props.bounds){var o,n=this.getParent(),r=this.props.scale;if("parent"===this.props.bounds)o=n;else{if("body"===this.props.bounds){var s=n.getBoundingClientRect(),a=s.left,h=s.top,l=document.body.getBoundingClientRect(),p=-(a-n.offsetLeft*r-l.left)/r,d=-(h-n.offsetTop*r-l.top)/r,u=(document.body.offsetWidth-this.resizable.size.width*r)/r+p,c=(document.body.offsetHeight-this.resizable.size.height*r)/r+d;return this.setState({bounds:{top:d,right:u,bottom:c,left:p}})}if("window"===this.props.bounds){if(!this.resizable)return;var f=n.getBoundingClientRect(),g=f.left,m=f.top,b=-(g-n.offsetLeft*r)/r,y=-(m-n.offsetTop*r)/r;u=(window.innerWidth-this.resizable.size.width*r)/r+b,c=(window.innerHeight-this.resizable.size.height*r)/r+y;return this.setState({bounds:{top:y,right:u,bottom:c,left:b}})}"string"==typeof this.props.bounds?o=document.querySelector(this.props.bounds):this.props.bounds instanceof HTMLElement&&(o=this.props.bounds)}if(o instanceof HTMLElement&&n instanceof HTMLElement){var v=o.getBoundingClientRect(),w=v.left,x=v.top,S=n.getBoundingClientRect(),z=(w-S.left)/r,D=x-S.top;if(this.resizable){this.updateOffsetFromParent();var P=this.offsetFromParent;this.setState({bounds:{top:D-P.top,right:z+(o.offsetWidth-this.resizable.size.width)-P.left/r,bottom:D+(o.offsetHeight-this.resizable.size.height)-P.top,left:z-P.left/r}})}}}},e.prototype.onDrag=function(t,e){if(this.props.onDrag){var i=this.offsetFromParent,o=i.left,n=i.top;return this.props.dragAxis&&"both"!==this.props.dragAxis?"x"===this.props.dragAxis?this.props.onDrag(t,Et(Et({},e),{x:e.x+o,y:this.originalPosition.y+n,deltaY:0})):"y"===this.props.dragAxis?this.props.onDrag(t,Et(Et({},e),{x:this.originalPosition.x+o,y:e.y+n,deltaX:0})):void 0:this.props.onDrag(t,Et(Et({},e),{x:e.x+o,y:e.y+n}))}},e.prototype.onDragStop=function(t,e){if(this.props.onDragStop){var i=this.offsetFromParent,o=i.left,n=i.top;return this.props.dragAxis&&"both"!==this.props.dragAxis?"x"===this.props.dragAxis?this.props.onDragStop(t,Et(Et({},e),{x:e.x+o,y:this.originalPosition.y+n,deltaY:0})):"y"===this.props.dragAxis?this.props.onDragStop(t,Et(Et({},e),{x:this.originalPosition.x+o,y:e.y+n,deltaX:0})):void 0:this.props.onDragStop(t,Et(Et({},e),{x:e.x+o,y:e.y+n}))}},e.prototype.onResizeStart=function(t,e,i){t.stopPropagation(),this.setState({resizing:!0});var o=this.props.scale,n=this.offsetFromParent,r=this.getDraggablePosition();if(this.resizingPosition={x:r.x+n.left,y:r.y+n.top},this.originalPosition=r,this.props.bounds){var s=this.getParent(),a=void 0;"parent"===this.props.bounds?a=s:"body"===this.props.bounds?a=document.body:"window"===this.props.bounds?a=window:"string"==typeof this.props.bounds?a=document.querySelector(this.props.bounds):this.props.bounds instanceof HTMLElement&&(a=this.props.bounds);var h=this.getSelfElement();if(h instanceof Element&&(a instanceof HTMLElement||a===window)&&s instanceof HTMLElement){var l=this.getMaxSizesFromProps(),p=l.maxWidth,d=l.maxHeight,u=this.getParentSize();if(p&&"string"==typeof p)if(p.endsWith("%")){var c=Number(p.replace("%",""))/100;p=u.width*c}else p.endsWith("px")&&(p=Number(p.replace("px","")));if(d&&"string"==typeof d)if(d.endsWith("%")){c=Number(d.replace("%",""))/100;d=u.height*c}else d.endsWith("px")&&(d=Number(d.replace("px","")));var f=h.getBoundingClientRect(),g=f.left,m=f.top,b="window"===this.props.bounds?{left:0,top:0}:a.getBoundingClientRect(),y=b.left,v=b.top,w=this.getOffsetWidth(a),x=this.getOffsetHeight(a),S=e.toLowerCase().endsWith("left"),z=e.toLowerCase().endsWith("right"),D=e.startsWith("top"),P=e.startsWith("bottom");if((S||D)&&this.resizable){var R=(g-y)/o+this.resizable.size.width;this.setState({maxWidth:R>Number(p)?p:R})}if(z||this.props.lockAspectRatio&&!S&&!D){R=w+(y-g)/o;this.setState({maxWidth:R>Number(p)?p:R})}if((D||S)&&this.resizable){R=(m-v)/o+this.resizable.size.height;this.setState({maxHeight:R>Number(d)?d:R})}if(P||this.props.lockAspectRatio&&!D&&!S){R=x+(v-m)/o;this.setState({maxHeight:R>Number(d)?d:R})}}}else this.setState({maxWidth:this.props.maxWidth,maxHeight:this.props.maxHeight});this.props.onResizeStart&&this.props.onResizeStart(t,e,i)},e.prototype.onResize=function(t,e,i,o){var n=this,r={x:this.originalPosition.x,y:this.originalPosition.y},s=-o.width,a=-o.height;["top","left","topLeft","bottomLeft","topRight"].includes(e)&&("bottomLeft"===e?r.x+=s:("topRight"===e||(r.x+=s),r.y+=a));var l=this.draggable.state;r.x===l.x&&r.y===l.y||h(function(){n.draggable.setState(r)}),this.updateOffsetFromParent();var p=this.offsetFromParent,d=this.getDraggablePosition().x+p.left,u=this.getDraggablePosition().y+p.top;this.resizingPosition={x:d,y:u},this.props.onResize&&this.props.onResize(t,e,i,o,{x:d,y:u})},e.prototype.onResizeStop=function(t,e,i,o){this.setState({resizing:!1});var n=this.getMaxSizesFromProps(),r=n.maxWidth,s=n.maxHeight;this.setState({maxWidth:r,maxHeight:s}),this.props.onResizeStop&&this.props.onResizeStop(t,e,i,o,this.resizingPosition)},e.prototype.updateSize=function(t){this.resizable&&this.resizable.updateSize({width:t.width,height:t.height})},e.prototype.updatePosition=function(t){this.draggable.setState(t)},e.prototype.updateOffsetFromParent=function(){var t=this.props.scale,e=this.getParent(),i=this.getSelfElement();if(!e||null===i)return{top:0,left:0};var o=e.getBoundingClientRect(),n=o.left,r=o.top,s=i.getBoundingClientRect(),a=this.getDraggablePosition(),h=e.scrollLeft,l=e.scrollTop;this.offsetFromParent={left:s.left-n+h-a.x*t,top:s.top-r+l-a.y*t}},e.prototype.render=function(){var t=this,e=this.props,i=e.disableDragging,o=e.style,n=e.dragHandleClassName,r=e.position,a=e.onMouseDown,h=e.onMouseUp,l=e.dragAxis,p=e.dragGrid,d=e.bounds,u=e.enableUserSelectHack,c=e.cancel,f=e.children;e.onResizeStart,e.onResize,e.onResizeStop,e.onDragStart,e.onDrag,e.onDragStop;var g=e.resizeHandleStyles,m=e.resizeHandleClasses,b=e.resizeHandleComponent,y=e.enableResizing,v=e.resizeGrid,x=e.resizeHandleWrapperClass,S=e.resizeHandleWrapperStyle,z=e.scale,D=e.allowAnyClick,P=e.dragPositionOffset,R=function(t,e){var i={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&e.indexOf(o)<0&&(i[o]=t[o]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(o=Object.getOwnPropertySymbols(t);n<o.length;n++)e.indexOf(o[n])<0&&Object.prototype.propertyIsEnumerable.call(t,o[n])&&(i[o[n]]=t[o[n]])}return i}(e,["disableDragging","style","dragHandleClassName","position","onMouseDown","onMouseUp","dragAxis","dragGrid","bounds","enableUserSelectHack","cancel","children","onResizeStart","onResize","onResizeStop","onDragStart","onDrag","onDragStop","resizeHandleStyles","resizeHandleClasses","resizeHandleComponent","enableResizing","resizeGrid","resizeHandleWrapperClass","resizeHandleWrapperStyle","scale","allowAnyClick","dragPositionOffset"]),M=this.props.default?Et({},this.props.default):void 0;delete R.default;var W,E=i||n?{cursor:"auto"}:{cursor:"move"},O=Et(Et(Et({},Ot),E),o),N=this.offsetFromParent,C=N.left,H=N.top;r&&(W={x:r.x-C,y:r.y-H});var T,k=this.state.resizing?void 0:W,j=this.state.resizing?"both":l;return s(w,{ref:function(e){e&&(t.draggable=e)},handle:n?".".concat(n):void 0,defaultPosition:M,onMouseDown:a,onMouseUp:h,onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop,axis:j,disabled:i,grid:p,bounds:d?this.state.bounds:void 0,position:k,enableUserSelectHack:u,cancel:c,scale:z,allowAnyClick:D,nodeRef:this.resizableElement,positionOffset:P},s(Mt,Et({},R,{ref:function(e){e&&(t.resizable=e,t.resizableElement.current=e.resizable)},defaultSize:M,size:this.props.size,enable:"boolean"==typeof y?(T=y,{bottom:T,bottomLeft:T,bottomRight:T,left:T,right:T,top:T,topLeft:T,topRight:T}):y,onResizeStart:this.onResizeStart,onResize:this.onResize,onResizeStop:this.onResizeStop,style:O,minWidth:this.props.minWidth,minHeight:this.props.minHeight,maxWidth:this.state.resizing?this.state.maxWidth:this.props.maxWidth,maxHeight:this.state.resizing?this.state.maxHeight:this.props.maxHeight,grid:v,handleWrapperClass:x,handleWrapperStyle:S,lockAspectRatio:this.props.lockAspectRatio,lockAspectRatioExtraWidth:this.props.lockAspectRatioExtraWidth,lockAspectRatioExtraHeight:this.props.lockAspectRatioExtraHeight,handleStyles:g,handleClasses:m,handleComponent:b,scale:this.props.scale}),f))},e.defaultProps={maxWidth:Number.MAX_SAFE_INTEGER,maxHeight:Number.MAX_SAFE_INTEGER,scale:1,onResizeStart:function(){},onResize:function(){},onResizeStop:function(){},onDragStart:function(){},onDrag:function(){},onDragStop:function(){}},e}(r);export{u as A,f as L,Nt as R,d as a,c as b};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import*as e from"react";function r(r){const t=e.useRef(r);return e.useEffect(()=>{t.current=r}),e.useMemo(()=>(...e)=>t.current?.(...e),[])}export{r as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import*as e from"react";import{u as o}from"./index-8dc6d938.js";var n=e[" useInsertionEffect ".trim().toString()]||o;function t({prop:o,defaultProp:t,onChange:r=()=>{},caller:c}){const[u,l,s]=function({defaultProp:o,onChange:t}){const[r,c]=e.useState(o),u=e.useRef(r),l=e.useRef(t);return n(()=>{l.current=t},[t]),e.useEffect(()=>{u.current!==r&&(l.current?.(r),u.current=r)},[r,u]),[r,c,l]}({defaultProp:t,onChange:r}),f=void 0!==o,i=f?o:u;{const n=e.useRef(void 0!==o);e.useEffect(()=>{const e=n.current;if(e!==f){const o=e?"controlled":"uncontrolled",n=f?"controlled":"uncontrolled";console.warn(`${c} is changing from ${o} to ${n}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`)}n.current=f},[f,c])}const a=e.useCallback(e=>{if(f){const n=function(e){return"function"==typeof e}(e)?e(o):e;n!==o&&s.current?.(n)}else l(e)},[f,o,l,s]);return[i,a]}export{t as u};
|