ono-react-element 0.0.28 → 0.0.29

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. package/dist/es/AutoSliderList-CVDZG5cu.js +1 -0
  2. package/dist/es/Button-P2AG5fc6.js +1 -0
  3. package/dist/es/Carousel-DOesUSmW.js +1 -0
  4. package/dist/es/Checkbox-DJYMF9I4.js +1 -0
  5. package/dist/es/ContextMenu-DlhlsQrA.js +1 -0
  6. package/dist/es/FileDropZone-BSLGVa4n.js +1 -0
  7. package/dist/es/InjunctiveBox-vLlRm8LB.js +1 -0
  8. package/dist/es/Input-Hy30rZ_v.js +1 -0
  9. package/dist/es/Message-COQA0S8d.js +1 -0
  10. package/dist/es/Modal-CJrgmTMc.js +1 -0
  11. package/dist/es/Radio-CEooiIll.js +1 -0
  12. package/dist/es/ScrollableTabs-okdQWyZ9.js +1 -0
  13. package/dist/es/Select-bhQ7DjXD.js +1 -0
  14. package/dist/es/SvgImg-D_jzo9p9.js +1 -0
  15. package/dist/es/Switch-DZ-GXwol.js +1 -0
  16. package/dist/es/TemplateDialog-iy7z7joV.js +1 -0
  17. package/dist/es/Toast-CZw9LQzq.js +1 -0
  18. package/dist/es/Tooltip-DvUB7xZH.js +1 -0
  19. package/dist/es/VirtualList-CoQKjvuB.js +1 -0
  20. package/dist/es/Waterfall-B9EXJfxK.js +1 -0
  21. package/dist/es/adjustingColors.ts-CpC0GUUO.js +1 -0
  22. package/dist/es/hex2hsl.ts-BLU_9tQG.js +1 -0
  23. package/dist/es/index.js +1 -1
  24. package/dist/es/urlToFile.ts-Dp1k4tJm.js +1 -0
  25. package/dist/style/AutoSliderList.css +1 -0
  26. package/dist/style/index.css +1 -1
  27. package/dist/types/utils/color/getColorType.d.ts +1 -1
  28. package/dist/umd/index.umd.cjs +1 -1
  29. package/dist/umd/index.umd.cjs.br +0 -0
  30. package/dist/umd/index.umd.cjs.gz +0 -0
  31. package/package.json +1 -1
  32. package/dist/es/Button-Ba6Hyv3b.js +0 -1
  33. package/dist/es/Carousel-auG6ltgk.js +0 -1
  34. package/dist/es/Checkbox-CBBjbiRa.js +0 -1
  35. package/dist/es/ContextMenu-DAy5Czn1.js +0 -1
  36. package/dist/es/FileDropZone-C-nGl7e7.js +0 -1
  37. package/dist/es/InjunctiveBox-BBa5LG49.js +0 -1
  38. package/dist/es/Input-DHoxESrC.js +0 -1
  39. package/dist/es/Message-Dum59ayv.js +0 -1
  40. package/dist/es/Modal-CJVYTPGs.js +0 -1
  41. package/dist/es/Radio-DP0UCRO_.js +0 -1
  42. package/dist/es/ScrollableTabs-2OZ2V-Dt.js +0 -1
  43. package/dist/es/Select-fbqZjk6I.js +0 -1
  44. package/dist/es/SvgImg-N7fVyvgv.js +0 -1
  45. package/dist/es/Switch-BBNDCObV.js +0 -1
  46. package/dist/es/TemplateDialog-DzNHI_F8.js +0 -1
  47. package/dist/es/Toast-aOS_XH1g.js +0 -1
  48. package/dist/es/Tooltip-D7d2_43u.js +0 -1
  49. package/dist/es/VirtualList-DPwQMgnX.js +0 -1
  50. package/dist/es/Waterfall-BcKxRr5b.js +0 -1
  51. package/dist/es/adjustingColors.ts-B4vYvLS1.js +0 -1
  52. package/dist/es/distinguishPlatformDelay.ts-BTo3t05U.js +0 -1
  53. package/dist/es/hex2hsl.ts-C-JnVxv_.js +0 -1
  54. package/dist/es/urlToFile.ts-BAbioPDr.js +0 -1
Binary file
Binary file
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ono-react-element",
3
3
  "private": false,
4
- "version": "0.0.28",
4
+ "version": "0.0.29",
5
5
  "description": "Component library by React + Typescript",
6
6
  "type": "module",
7
7
  "main": "./dist/umd/index.umd.cjs",
@@ -1 +0,0 @@
1
- import{j as o}from "./dependencies-B7YNjh_z.js";import "./index.js";import{c as N}from "./chainClassNames.ts-B9vmfsc1.js";import{t as w}from "./throttle.ts-D_EqcNzV.js";import{forwardRef as B,useState as L,useRef as m,useEffect as l}from "react";const E=B(({onClick:d,children:h,disabled:r,loading:t,plain:g,shape:u="default",htmlType:y="button",type:x="primary",throttleDuration:c,className:b,style:j,icon:a},s)=>{const [f,p]=L(!1),n=m(null),i=m(null),C=d ? w(d,c ? typeof c=="number" ? c:500:0):void 0;return l(()=>{(()=>{if(!i.current)return;const e=i.current;t ?(p(!0),e.classList.add("ono-loading-start")):(setTimeout(()=>{p(!1);},300),e.classList.remove("ono-loading-start"),e.classList.add("ono-loading-end"));})();},[t,i]),l(()=>{(()=>{if(!n.current)return;const e=n.current,v=e.getBoundingClientRect();e.style.setProperty("--btn-height",v.height+"px");})();},[n]),l(()=>{s&&n&&(typeof s=="function" ? s(n.current):s.current=n.current);},[s,n]),o.jsxs("button",{ref:n,className:N(`ono-btn-${x}`,t||f ? "ono-is-loading":"",t||a ? "ono-is-icon":"",r ? "ono-btn-is-disabled":"",u==="round" ? "ono-is-round":u==="circle" ? "ono-is-circle":"",g ? "ono-is-plain":"",b ?? ""),type:y,disabled:(typeof r=="function" ? r():r)||!!t,style:j,onClick:C,children:[(()=>{const e=o.jsx("span",{ref:i,className:"ono-btn-icon",children:o.jsx("span",{children:typeof t=="object" ? t.icon:o.jsx("svg",{viewBox:"0 0 1024 1024",focusable:"false","data-icon":"loading",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:o.jsx("path",{d:"M988 548c-19.9 0-36-16.1-36-36 0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 00-94.3-139.9 437.71 437.71 0 00-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3.1 19.9-16 36-35.9 36z"})})})});return t||f ? e:a ? o.jsx("span",{children:a}):o.jsx(o.Fragment,{});})(),h]});});export{E as B};
@@ -1 +0,0 @@
1
- import{j as l}from "./dependencies-B7YNjh_z.js";import "./index.js";import{c as H}from "./chainClassNames.ts-B9vmfsc1.js";import{useState as c,useRef as b,useEffect as z}from "react";const Q=({style:Y,current:i,children:o,className:D,prevButton:x,nextButton:y,dots:E=!0,speed:p=300,afterChange:N,duration:k=2e3,autoPlay:d=!1,isShowArrow:L=!0,waitForAnimate:R=!0,direction:n="horizontal"})=>{const [s,T]=c(typeof i=="number" ? i+1:1),[B,v]=c(typeof i=="number" ? i:0),[u,F]=c(),[q,G]=c([]),[S,C]=c(!1),[A,M]=c(!1),[P,h]=c(!1),f=b(null),r=b(null),$=b(null),g=(t)=>{r.current.style.transform=n==="horizontal" ? `translateX(-${((u==null ? void 0:u.width)||0)*(t+1)}px)`:`translateY(-${((u==null ? void 0:u.height)||0)*(t+1)}px)`;},w=(t)=>{const e=t-s;if(e===0||R&&S)return;C(!0),h(!1);const a=e<0 ? "prev":"next",m=a==="prev" ? 1:o.length;s===m ?(T(a==="prev" ? o.length:1),v(a==="prev" ? o.length-1:0),g(t-1),setTimeout(()=>{var j;(j=r.current)==null||j.classList.remove("ono-carousel-slider"),g(a==="prev" ? o.length-1:0),setTimeout(()=>{var X;(X=r.current)==null||X.classList.add("ono-carousel-slider"),C(!1),h(!0);},20);},p)):(v(t-1),T(t),g(t-1),setTimeout(()=>{C(!1),h(!0);},p));};return z(()=>{(()=>{if(!o||!f.current)return;f.current.style.setProperty("--speed",`${p}ms`);const t=f.current.getBoundingClientRect();F(t);const e=[...o];var a;e.push(o[0]),e.unshift(o[o.length-1]),G(e.map((m,j)=>l.jsx("div",{style:{width:t.width,height:t.height,flexShrink:0},children:m},j))),a=t,r.current&&(r.current.style.transform=n==="horizontal" ? `translateX(-${a.width*s}px)`:`translateY(-${a.height*s}px)`,r.current.style.flexDirection=n==="horizontal" ? "row":"column",h(d),setTimeout(()=>{var m;return(m=r.current)==null ? void 0:m.classList.add("ono-carousel-slider");},p));})();},[f,r,n,d]),z(()=>{N==null||N(B);},[B]),z(()=>{(()=>{if(A||!d||!P)return clearTimeout($.current),void($.current=null);$.current=setTimeout(()=>w(s+1),k);})();},[d,P,S,s,A]),z(()=>{typeof i=="number"&&(h(!1),w(i+1),setTimeout(()=>h(d),k-p));},[r,i]),l.jsxs("div",{ref:f,className:H("ono-carousel-container",D),style:Y,onMouseEnter:()=>M(!0),onMouseLeave:()=>M(!1),children:[l.jsx("div",{ref:r,className:"ono-carousel-wrapper",children:q}),L&&l.jsx("button",{className:n==="horizontal" ? "ono-carousel-left":"ono-carousel-top",onClick:()=>w(s-1),children:x ? typeof x=="function" ? x():x:n==="horizontal" ? "left":"top"}),L&&l.jsx("button",{className:n==="horizontal" ? "ono-carousel-right":"ono-carousel-bottom",onClick:()=>w(s+1),children:y ? typeof y=="function" ? y():y:n==="horizontal" ? "right":"bottom"}),E&&l.jsx("div",{className:"ono-carousel-indicators",children:o.map((t,e)=>l.jsx("button",{className:"ono-carousel-indicator",onClick:()=>{g(e),v(e),T(e+1);}},e))})]});};export{Q as C};
@@ -1 +0,0 @@
1
- import{j as b}from "./dependencies-B7YNjh_z.js";import "./index.js";import{c as x}from "./chainClassNames.ts-B9vmfsc1.js";import{useState as g,useRef as v,useEffect as w}from "react";const N=({id:d,style:n,checked:c,onChange:h,className:a,indeterminate:t=!1,checkedColor:s="#0077cc",indeterminateStyle:p="line",indeterminateColor:y="#0077cc"})=>{const [i,f]=g(""),e=v(null),C=[{value:s,name:"checkedColor"},{value:y,name:"indeterminateColor"}];return w(()=>{(()=>{if(!e.current)return;const r=getComputedStyle(e.current);i||f(r.borderColor),e.current.style.height=r.width,[{value:r.width,name:"w"},{value:c||t ? s:i,name:"border-color"},...C].forEach(({value:l,name:k})=>{l&&((o,u,m)=>{typeof o=="string" ? m.style.setProperty(`--${u}`,o):m.style.setProperty(`--${u}`,`${o}px`);})(l,k,e.current);});})(),e.current&&(e.current.indeterminate=t);},[e,a,n,t]),b.jsx("input",{id:d,type:"checkbox",ref:e,checked:c,onChange:h,className:x(a,p==="line" ? "ono-checkbox-line":"ono-checkbox-border"),style:n});};export{N as C};
@@ -1 +0,0 @@
1
- import{j as v}from "./dependencies-B7YNjh_z.js";import "./index.js";import{u as k}from "./useEventListener.tsx-C8V9Qip6.js";import{useRef as w,useLayoutEffect as D}from "react";import{p as g}from "./PortalRenderer-izu9LyVc.js";const N=({className:e,content:o,style:i,onClick:r,onDoubleClick:M,onContextMenu:x,onMouseDown:y,onMouseUp:f,onMouseEnter:d,onMouseLeave:h,onMouseMove:C,destroy:l,position:t})=>{const n=w(null);return k("click",l),D(()=>{if(n.current){const{width:s,height:a}=n.current.getBoundingClientRect(),{innerWidth:p,innerHeight:m}=window;let c=t.x,u=t.y;c+s>p&&(c=Math.max(0,p-s)),u+a>m&&(u=Math.max(0,m-a)),n.current.style.left=`${c}px`,n.current.style.top=`${u}px`;}},[t]),v.jsx("div",{ref:n,className:e,style:{...i,position:"fixed",left:t.x,top:t.y},onClick:r,onDoubleClick:M,onContextMenu:x,onMouseDown:y,onMouseUp:f,onMouseEnter:d,onMouseLeave:h,onMouseMove:C,children:typeof o=="function" ? o((s)=>{l(),s&&s();}):o});},U=({e,style:o,content:i,className:r})=>{e.preventDefault(),g(N,{className:r,content:i,position:{x:e.clientX,y:e.clientY},style:{zIndex:9999,...o}},"content-menu-root");};export{U as c};
@@ -1 +0,0 @@
1
- import{j as g}from "./dependencies-B7YNjh_z.js";import "./index.js";import{c as b}from "./chainClassNames.ts-B9vmfsc1.js";import{useState as A,useRef as G,useMemo as N}from "react";const M=({isBox:o=!1,multiple:y=!1,children:l,allowFileType:D="image",style:C={},className:E="",isCanClick:v=!0,getFileListData:w,onFileTypeError:c,readingAnimationOptions:n})=>{const [a,F]=A(!1),S=G(null);let f=0,p=[],m=[],s=[],T=[];const x=N(()=>D==="all" ? ["image","video","audio","document","directory"]:D,[D]),j=(e)=>{const r=[];s.forEach((t)=>r.push({name:t.name,fileType:"directory",file:"",isFile:!1,fileSize:0,children:[],parent:""}));for(let t=0;t<r.length;t++)for(let i=0;i<e.length;i++)e[i].parent===r[t].name&&e[i].name!==".DS_Store"&&r[t].children.push(e[i]);r.length===0&&r.push(...e),w(r),p=[],f=0,m=[],s=[],T=[],F(!1);},u=(e,r="")=>{if(e.isDirectory){if(!x.includes("directory"))return c&&c();const t=e.createReader(),i=(O)=>O.readEntries((k)=>{let z=0;k.forEach((d)=>{z++,d.isDirectory&&u(d);}),m.push(...k),T.includes(e.name)||(s.push(e),T.push(e.name)),z>=100 ? i(O):m.forEach((d)=>u(d,e.name));});i(t);}else e.file((t)=>{if(!x.includes(t.type.split("/")[0])&&t.name!==".DS_Store")return c&&c();p.push({name:t.name,fileType:t.type,file:t,isFile:!0,fileSize:t.size,children:[],parent:r});const i=f>=s.length&&s.length===0 ? f:m.length;p.length===i&&j(p);});};return g.jsxs(g.Fragment,{children:[g.jsx("input",{ref:S,type:"file",style:{display:"none"},multiple:y,value:"",onChange:(e)=>{const r=[...e.target.files],t=[];F(!0),r.forEach((i)=>t.push({name:i.name,fileType:i.type,file:i,isFile:!0,fileSize:i.size,children:[],parent:""})),j(t);}}),g.jsx("div",{className:b("ono-file-process-container",o ? "ono-file-process-container-box":"",typeof E=="string" ? E:E(a)),style:{justifyContent:o&&!l ? "center":"initial",cursor:o&&v ? a ? "not-allowed":"pointer":"",...C instanceof Function ? C(a):C},onClick:()=>{if(o&&v){if(a&&(n!=null&&n.readingCannotOperattion))return;S.current.click();}},onDragEnter:(e)=>e.preventDefault(),onDragOver:(e)=>e.preventDefault(),onDrop:(e)=>{if(e.preventDefault(),!a||!(n!=null&&n.readingCannotOperattion))if(f=y ? e.dataTransfer.items.length:1,F(!0),y)for(const r of e.dataTransfer.items)u(r.webkitGetAsEntry());else u(e.dataTransfer.items[0].webkitGetAsEntry());},children:o ? l ? a&&(n!=null&&n.readingCannotOperattion)?(n==null ? void 0:n.animations)||"正在读取文件...":l:a&&(n!=null&&n.readingCannotOperattion)?(n==null ? void 0:n.animations)||"正在读取文件...":"请将要上传的文件拖拽到此处":l})]});};export{M as F};
@@ -1 +0,0 @@
1
- import{j as t,R as v}from "./dependencies-B7YNjh_z.js";import "./index.js";import{u as k}from "./useEventListener.tsx-C8V9Qip6.js";let l,o=null;const x=({className:e,content:n,style:u,onClick:i,onDoubleClick:c,onContextMenu:r,onMouseDown:M,onMouseUp:a,onMouseEnter:m,onMouseLeave:d,onMouseMove:p,isClickBoxToClose:C})=>(k("click",()=>{C&&o&&(o.remove(),o=null);}),t.jsx("div",{className:e,style:u,onClick:i,onDoubleClick:c,onContextMenu:r,onMouseDown:M,onMouseUp:a,onMouseEnter:m,onMouseLeave:d,onMouseMove:p,children:typeof n=="function" ? n((s)=>{o&&(o.remove(),o=null,s&&s());}):n})),j=(e)=>(f(e.isSingle||!1).render(t.jsx(x,{...e})),o),f=(e)=>(e&&o&&l||(o=document.createElement("div"),document.body.appendChild(o),l=v.createRoot(o)),l);export{j as i};
@@ -1 +0,0 @@
1
- import{j as n}from "./dependencies-B7YNjh_z.js";import "./index.js";import{c as q}from "./chainClassNames.ts-B9vmfsc1.js";import{forwardRef as I,useState as f,useRef as T,useEffect as P}from "react";import{u as J}from "./useKeyPress.tsx-hgs6v_Jt.js";const X=()=>n.jsx("svg",{className:"ono-input-icon",viewBox:"64 64 896 896",focusable:"false","data-icon":"close-circle",fill:"currentColor","aria-hidden":"true",children:n.jsx("path",{d:"M512 64c247.4 0 448 200.6 448 448S759.4 960 512 960 64 759.4 64 512 264.6 64 512 64zm127.98 274.82h-.04l-.08.06L512 466.75 384.14 338.88c-.04-.05-.06-.06-.08-.06a.12.12 0 00-.07 0c-.03 0-.05.01-.09.05l-45.02 45.02a.2.2 0 00-.05.09.12.12 0 000 .07v.02a.27.27 0 00.06.06L466.75 512 338.88 639.86c-.05.04-.06.06-.06.08a.12.12 0 000 .07c0 .03.01.05.05.09l45.02 45.02a.2.2 0 00.09.05.12.12 0 00.07 0c.02 0 .04-.01.08-.05L512 557.25l127.86 127.87c.04.04.06.05.08.05a.12.12 0 00.07 0c.03 0 .05-.01.09-.05l45.02-45.02a.2.2 0 00.05-.09.12.12 0 000-.07v-.02a.27.27 0 00-.05-.06L557.25 512l127.87-127.86c.04-.04.05-.06.05-.08a.12.12 0 000-.07c0-.03-.01-.05-.05-.09l-45.02-45.02a.2.2 0 00-.09-.05.12.12 0 00-.07 0z"})}),Z=({open:x})=>n.jsx("svg",{viewBox:"64 64 896 896",focusable:"false","data-icon":x ? "eye":"eye-invisible",fill:"currentColor","aria-hidden":"true",className:"ono-input-icon",children:x ? n.jsx("path",{d:"M942.2 486.2C847.4 286.5 704.1 186 512 186c-192.2 0-335.4 100.5-430.2 300.3a60.3 60.3 0 000 51.5C176.6 737.5 319.9 838 512 838c192.2 0 335.4-100.5 430.2-300.3 7.7-16.2 7.7-35 0-51.5zM512 766c-161.3 0-279.4-81.8-362.7-254C232.6 339.8 350.7 258 512 258c161.3 0 279.4 81.8 362.7 254C791.5 684.2 673.4 766 512 766zm-4-430c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm0 288c-61.9 0-112-50.1-112-112s50.1-112 112-112 112 50.1 112 112-50.1 112-112 112z"}):n.jsxs(n.Fragment,{children:[n.jsx("path",{d:"M942.2 486.2Q889.47 375.11 816.7 305l-50.88 50.88C807.31 395.53 843.45 447.4 874.7 512 791.5 684.2 673.4 766 512 766q-72.67 0-133.87-22.38L323 798.75Q408 838 512 838q288.3 0 430.2-300.3a60.29 60.29 0 000-51.5zm-63.57-320.64L836 122.88a8 8 0 00-11.32 0L715.31 232.2Q624.86 186 512 186q-288.3 0-430.2 300.3a60.3 60.3 0 000 51.5q56.69 119.4 136.5 191.41L112.48 835a8 8 0 000 11.31L155.17 889a8 8 0 0011.31 0l712.15-712.12a8 8 0 000-11.32zM149.3 512C232.6 339.8 350.7 258 512 258c54.54 0 104.13 9.36 149.12 28.39l-70.3 70.3a176 176 0 00-238.13 238.13l-83.42 83.42C223.1 637.49 183.3 582.28 149.3 512zm246.7 0a112.11 112.11 0 01146.2-106.69L401.31 546.2A112 112 0 01396 512z"}),n.jsx("path",{d:"M508 624c-3.46 0-6.87-.16-10.25-.47l-52.82 52.82a176.09 176.09 0 00227.42-227.42l-52.82 52.82c.31 3.38.47 6.79.47 10.25a111.94 111.94 0 01-112 112z"})]})}),ae=I(({id:x,name:D,max:F,min:j,maxLength:L,minLength:M,type:Q="text",className:Y,defaultValue:B,placeholder:E,readonly:V,autocomplete:W="off",autofocus:R,form:y,disabled:g,clearable:k,showPassword:K,prepend:p,append:i,prefix:b,suffix:v,showCount:O,border:$="1px solid #5644b8",boxShadow:m="0 0 0 2px #7969d11a",value:h="",onChange:d,onFocus:z,onBlur:w,onClear:u,onKeyUp:A,onKeyDown:N},U)=>{const [t,C]=f(h),[H,o]=f(!1),[e,s]=f(!1),l=T(null),c=k&&!g&&t,a=K&&!g;return P(()=>{l.current&&(l.current.style.setProperty("--ono-input-border",$),l.current.style.setProperty("--ono-input-box-shadow",m));},[l]),P(()=>{C(h);},[h]),n.jsxs("div",{className:q("ono-input","ono-input-border",g ? "ono-input-is-disabled":""),children:[p&&n.jsx("div",{className:"ono-prepend",children:p}),n.jsxs("div",{ref:l,className:q("ono-input-wrapper",H ? "ono-input-is-focus":"",Y),onMouseDown:(r)=>{r.target.tagName!=="INPUT"&&r.preventDefault();},children:[b&&n.jsx("span",{className:"ono-prefix",children:b}),n.jsx("input",{id:x,ref:U,max:F,min:j,name:D,maxLength:L,minLength:M,defaultValue:B,className:"ono-input-inner",type:K ? e ? "text":"password":Q,placeholder:E,readOnly:V,autoComplete:W,autoFocus:R,form:y,disabled:g,onFocus:(r)=>{z==null||z(r),o(!0);},onBlur:(r)=>{w==null||w(r),o(!1);},value:t,onChange:(r)=>{d==null||d(r),C(r.target.value);},onKeyUp:A,onKeyDown:N}),(v||c||a||O)&&n.jsxs("span",{className:"ono-suffix",children:[v,c&&n.jsx("button",{className:"ono-clear-icon",onClick:()=>{u==null||u(),C("");},children:n.jsx(X,{})}),a&&n.jsx("button",{className:"ono-eye-icon",onClick:()=>s(!e),children:n.jsx(Z,{open:e})}),O&&L&&n.jsxs("p",{className:"ono-count",children:[t.length,"/",L]})]})]}),i&&n.jsx("div",{className:"ono-append",children:i})]});}),re=I(({id:x,name:D,rows:F,maxLength:j,minLength:L,className:M,placeholder:Q,readonly:Y,resize:B=!0,autocomplete:E="off",autofocus:V,form:W,disabled:R,autoSize:y,showCount:g,border:k="1px solid #5644b8",boxShadow:K="0 0 0 2px #7969d11a",value:p="",onChange:i,onFocus:b,onBlur:v,onKeyUp:O,onKeyDown:$},m)=>{const [h,d]=f(p),[z,w]=f(!1),[u,A]=f([p]),[N,U]=f(0),t=T(null),C=(o)=>{const e=u.slice(0,N+1);e.push(o),A(e),U(e.length-1);};return [{key:"CommandOrControl+z",handler:(o)=>{document.activeElement===t.current&&(o.preventDefault(),(()=>{if(N>0&&t.current){const e=N-1,s=u[e];if(t.current.value=s,d(s),U(e),i){const l={target:t.current};i(l);}}})());},deps:[u]},{key:"CommandOrControl+d",handler:(o)=>{if(t.current&&document.activeElement===t.current){o.preventDefault();const e=((s)=>{const{value:l,selectionStart:c,selectionEnd:a}=s,r=l.substring(0,c)+l.substring(a);return s.value=r,s.setSelectionRange(c,c),r;})(t.current);if(d(e),C(e),i){const s={target:t.current};i(s);}}},deps:[u]}].forEach(({key:o,handler:e,deps:s})=>J(o,e,{target:t.current,deps:s})),P(()=>{d(p);},[p]),P(()=>{(()=>{if(!t.current)return;const o=t.current;((e,s,l,c,a)=>{const r=e.parentNode;e.style.resize=s ? "none":l ? "vertical":"none",r.style.setProperty("--ono-input-border",c),r.style.setProperty("--ono-input-box-shadow",a),r.style.setProperty("--ono-input-height","auto");})(o,y||!1,B,k,K),y&&((e,s)=>{const{minRows:l=2,maxRows:c}=typeof s=="object" ? s:{},a=document.createElement("div");a.style.position="absolute",a.style.visibility="hidden",a.style.whiteSpace="pre-wrap",a.style.wordWrap="break-word",a.style.width=`${e.clientWidth}px`,a.style.font=getComputedStyle(e).font,a.style.padding=getComputedStyle(e).padding,a.style.border=getComputedStyle(e).border,a.style.boxSizing="border-box",document.body.appendChild(a);const r=34*l;let S=r;if(e.value){a.textContent=e.value;const G=a.offsetHeight;S=Math.max(r,G),c&&S>34*c ?(S=34*c,e.style.overflowY="auto"):e.style.overflowY="hidden";}else e.style.overflowY="hidden";e.style.height=`${S}px`,e.style.resize=s ? "none":"vertical",document.body.removeChild(a),Math.floor(S/34);})(o,y);})();},[t,y,h]),P(()=>{m&&t.current&&(m instanceof Function ? m(t.current):m.current=t.current);},[m,t]),n.jsxs("div",{className:q("ono-textarea",R ? "ono-input-is-disabled":""),children:[n.jsx("div",{className:q("ono-textarea-wrapper",z ? k==="none" ? "":"ono-input-is-focus":"",M),onClick:()=>{var o;return(o=t.current)==null ? void 0:o.focus();},children:n.jsx("textarea",{ref:t,className:"ono-textarea-inner",id:x,rows:F,name:D,maxLength:j,minLength:L,placeholder:Q,readOnly:Y,autoComplete:E,autoFocus:V,form:W,disabled:R,onFocus:(o)=>{b==null||b(o),w(!0);},onBlur:(o)=>{v==null||v(o),w(!1);},value:h,onChange:(o)=>{d(o.target.value),C(o.target.value),i==null||i(o);},onKeyUp:O,onKeyDown:$})}),g&&j&&n.jsx("p",{className:"ono-count-bar",onClick:(o)=>o.stopPropagation(),children:h.length+"/"+j})]});});export{ae as O,re as a};
@@ -1 +0,0 @@
1
- import{j as o}from "./dependencies-B7YNjh_z.js";import "./index.js";import{c as D}from "./chainClassNames.ts-B9vmfsc1.js";import{useState as j,useRef as O,useMemo as Q,useCallback as U,useEffect as M}from "react";import{p as W}from "./PortalRenderer-izu9LyVc.js";let I=1;const c=[],m=(e,a,r)=>(c.length===0&&(I=1),X(a.instancesKey||"",e,{id:`${r}-${I++}`,key:a.instancesKey||"",reactNode:e,props:a,offsetOptions:{topOffset:0,height:0,bottomOffset:0}}),c),S=(e)=>{const a=c.findIndex((r)=>r.id===e);return a<=0 ? 0:c[a-1].offsetOptions.bottomOffset;},X=(e,a,r)=>{const p=(t)=>W(a,{zIndex:999+I-1,...t.props,id:t.id},t.id,"ono-message-root");if(!e){const t=p(r);c.push({...r,props:{...r.props,id:r.id,destroy:t},destroy:t});}let y=!1;const k=c.map((t)=>{if(t.key===e){y=!0;const f={...t.props,...r.props};return{...t,props:f};}{const f=p(t);return{...t,props:{...t.props,id:t.id,destroy:f},destroy:f};}});if(Object.assign(c,k),!y){const t=p(r);c.push({...r,props:{...r.props,id:r.id,destroy:t},destroy:t});}},Y={info:{light:"#1677ff",dark:"#1677ff"},success:{light:"#52c41a",dark:"#49aa19"},error:{light:"#ff4d4f",dark:"#a61d24"},warning:{light:"#faad14",dark:"#d89614"},loading:{light:"#9254de",dark:"#f5f5f5"}},C=(e,a)=>Y[e][a],K=(e)=>{switch(e){case "success":return o.jsx("svg",{className:"ono-type-icon",viewBox:"0 0 1024 1024",focusable:"false","data-icon":"check-circle",fill:C(e,"light"),"aria-hidden":"true",children:o.jsx("path",{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm193.5 301.7l-210.6 292a31.8 31.8 0 01-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z"})});case "error":return o.jsx("svg",{className:"ono-type-icon",viewBox:"0 0 1024 1024",focusable:"false","data-icon":"close-circle",fill:C(e,"light"),"aria-hidden":"true",children:o.jsx("path",{d:"M512 64c247.4 0 448 200.6 448 448S759.4 960 512 960 64 759.4 64 512 264.6 64 512 64zm127.98 274.82h-.04l-.08.06L512 466.75 384.14 338.88c-.04-.05-.06-.06-.08-.06a.12.12 0 00-.07 0c-.03 0-.05.01-.09.05l-45.02 45.02a.2.2 0 00-.05.09.12.12 0 000 .07v.02a.27.27 0 00.06.06L466.75 512 338.88 639.86c-.05.04-.06.06-.06.08a.12.12 0 000 .07c0 .03.01.05.05.09l45.02 45.02a.2.2 0 00.09.05.12.12 0 00.07 0c.02 0 .04-.01.08-.05L512 557.25l127.86 127.87c.04.04.06.05.08.05a.12.12 0 00.07 0c.03 0 .05-.01.09-.05l45.02-45.02a.2.2 0 00.05-.09.12.12 0 000-.07v-.02a.27.27 0 00-.05-.06L557.25 512l127.87-127.86c.04-.04.05-.06.05-.08a.12.12 0 000-.07c0-.03-.01-.05-.05-.09l-45.02-45.02a.2.2 0 00-.09-.05.12.12 0 00-.07 0z"})});case "loading":return o.jsx("svg",{className:D("ono-info-icon","ono-loading"),viewBox:"0 0 1024 1024",focusable:"false","data-icon":"loading",fill:C(e,"light"),"aria-hidden":"true",children:o.jsx("path",{d:"M988 548c-19.9 0-36-16.1-36-36 0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 00-94.3-139.9 437.71 437.71 0 00-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3.1 19.9-16 36-35.9 36z"})});default:return o.jsx("svg",{className:"ono-info-icon",viewBox:"64 64 896 896",focusable:"false","data-icon":"exclamation-circle",fill:C(e,"light"),"aria-hidden":"true",children:o.jsx("path",{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm-32 232c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V296zm32 440a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"})});}},T=({handleDestroy:e})=>o.jsx("button",{onClick:e,children:o.jsx("svg",{className:"ono-clear-icon",viewBox:"64 64 896 896",focusable:"false","data-icon":"close-circle",fill:"currentColor","aria-hidden":"true",children:o.jsx("path",{d:"M512 64c247.4 0 448 200.6 448 448S759.4 960 512 960 64 759.4 64 512 264.6 64 512 64zm127.98 274.82h-.04l-.08.06L512 466.75 384.14 338.88c-.04-.05-.06-.06-.08-.06a.12.12 0 00-.07 0c-.03 0-.05.01-.09.05l-45.02 45.02a.2.2 0 00-.05.09.12.12 0 000 .07v.02a.27.27 0 00.06.06L466.75 512 338.88 639.86c-.05.04-.06.06-.06.08a.12.12 0 000 .07c0 .03.01.05.05.09l45.02 45.02a.2.2 0 00.09.05.12.12 0 00.07 0c.02 0 .04-.01.08-.05L512 557.25l127.86 127.87c.04.04.06.05.08.05a.12.12 0 00.07 0c.03 0 .05-.01.09-.05l45.02-45.02a.2.2 0 00.05-.09.12.12 0 000-.07v-.02a.27.27 0 00-.05-.06L557.25 512l127.87-127.86c.04-.04.05-.06.05-.08a.12.12 0 000-.07c0-.03-.01-.05-.05-.09l-45.02-45.02a.2.2 0 00-.09-.05.12.12 0 00-.07 0z"})})}),g=({id:e,instancesKey:a,duration:r=3e3,speed:p=300,offset:y=20,message:k,type:t,plain:f=!0,showClose:F=!1,zIndex:E,onClose:P=()=>{},destroy:R})=>{const [,q]=j(!1),[w,A]=j(0),[x,H]=j(((n)=>{const i=c.findIndex((l)=>l.id===n);return i<=0 ? 0:c[i-1].offsetOptions.topOffset;})(e)),[s,V]=j({duration:r,speed:p,message:k,type:t,showClose:F,onClose:P}),v=O(null),z=O(null),d=O(null),N=x+w,G=Q(()=>({translate:`-50%${x}px`,transition:`translate ${p}ms ease-in-out`,zIndex:E}),[x,p]),L=()=>{d.current&&(d.current.classList.remove("ono-message-enter"),d.current.classList.add("ono-message-leave"),d.current.style.translate=`-50%${S(e)-w}px`,((n)=>{const i=c.findIndex((l)=>l.id===n);i!==-1&&c.splice(i,1);})(e),setTimeout(()=>R(s.onClose),p));},b=(n,i,l)=>{n!=="loading"&&(v.current=setTimeout(L,i-l));},$=()=>{const n=S(e);q((i)=>(i&&H(n+y),!0)),requestAnimationFrame($);},B=U(()=>{if(s.type==="loading"){if(z.current)return;z.current=setTimeout(()=>{var l;z.current=null;const n=(i=a||"")?(l=c.find((u)=>u.key===i))==null ? void 0:l.props:null;var i;n&&(((u)=>{V((J)=>({...J,...u}));})({...n}),b(s.type,n.duration||s.duration,n.speed||s.speed),B());},100);}},[s]);return M(()=>{b(s.type,s.duration,s.speed),$(),B();},[s.type,s.duration,s.speed]),M(()=>{(()=>{if(!d.current)return;const{height:n}=d.current.getBoundingClientRect();d.current.style.setProperty("--speed",`${s.speed}ms`),A(n);})();},[d]),M(()=>{((n,i)=>{const l=c.findIndex((u)=>u.id===n);l<0||(c[l].offsetOptions=i);})(e,{topOffset:x,height:w,bottomOffset:N});},[N]),o.jsx("div",{ref:d,className:D("ono-message",`ono-message-${s.type}`,"ono-message-enter",f ? "":"ono-message-color"),style:G,onMouseEnter:()=>{v.current&&(clearTimeout(v.current),v.current=null);},onMouseLeave:()=>b(s.type,s.duration,s.speed),children:typeof s.message=="function" ? s.message(K(s.type),s.showClose&&o.jsx(T,{handleDestroy:L})):o.jsxs(o.Fragment,{children:[K(s.type),o.jsx("div",{children:s.message}),s.showClose&&o.jsx(T,{handleDestroy:L})]})});},h=(e)=>{if(typeof e=="string")return{message:e};{const a={...e,instancesKey:e.key};return delete a.key,{...a};}},o0={info:(e)=>{m(g,{...h(e),type:"info"},"ono-message");},success:(e)=>{m(g,{...h(e),type:"success"},"ono-message");},warning:(e)=>{m(g,{...h(e),type:"warning"},"ono-message");},error:(e)=>{m(g,{...h(e),type:"error"},"ono-message");},loading:(e)=>{m(g,{...h(e),type:"loading"},"ono-message");}};export{o0 as m};
@@ -1 +0,0 @@
1
- import{j as o}from "./dependencies-B7YNjh_z.js";import "./index.js";import{a as h}from "./adjustingColors.ts-B4vYvLS1.js";import{c as D}from "./chainClassNames.ts-B9vmfsc1.js";import{useState as E,useRef as j,useEffect as y}from "react";import{p as F}from "./PortalRenderer-izu9LyVc.js";import{B as w}from "./Button-Ba6Hyv3b.js";const M=({title:c="This is a modal title",icon:k,content:B="This is a modal content",okText:N="confirm",cancelText:v="cancel",confirmDisabled:g,cancelDisabled:P,startPosition:t,onConfirm:d,onCancel:m,mask:x=!0,maskClosable:T=!1,width:f,btnClr:a,footer:u=({OkBtn:s,CancelBtn:i})=>o.jsxs(o.Fragment,{children:[o.jsx(i,{}),o.jsx(s,{})]}),modalBody:b,destroy:p})=>{const [s,i]=E(!1),l=j(null),n=j(null),z=[{label:"themeColor",value:a||""},{label:"themeHoverColor",value:a&&h(a,"light",10)||""},{label:"themeActiveColor",value:a&&h(a,"dark",20)||""},{label:"themeDisabledClr",value:a&&h(a,"light",20)||""}],r=()=>{if(t){if(!n.current)return;n.current.classList.remove("ono-modal-enter"),n.current.classList.add("ono-modal-leave"),setTimeout(()=>{p();},300);}else p();};return y(()=>(l.current&&(x ? l.current.showModal():l.current.show()),()=>{l.current&&l.current.close();}),[l.current,x]),y(()=>{(()=>{if(!n.current)return;const e=n.current.style;f&&e.setProperty("--width",f+"px"),t&&(e.setProperty("--left",(t.x/window.innerWidth*100).toFixed(2)+"%"),e.setProperty("--top",(t.y/window.innerHeight*100).toFixed(2)+"%")),a&&z.forEach((C)=>e.setProperty(`--${C.label}`,C.value));})();},[n]),o.jsx("dialog",{ref:l,className:"ono-modal",onClick:()=>T&&r(),children:b ? b(r):o.jsxs("div",{ref:n,className:D("ono-modal-box",t ? "ono-modal-enter":""),onClick:(e)=>e.stopPropagation(),children:[o.jsxs("div",{className:"ono-modal-box-body",children:[k ?? o.jsx("div",{className:"ono-modal-box-body-icon",children:o.jsx("svg",{color:"#faad14",viewBox:"64 64 896 896",focusable:"false","data-icon":"exclamation-circle",width:"22px",height:"22px",fill:"currentColor","aria-hidden":"true",style:{marginInlineEnd:"12px"},children:o.jsx("path",{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm-32 232c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V296zm32 440a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"})})}),o.jsxs("div",{className:"ono-modal-box-body-contentBar",children:[o.jsx("h1",{className:"ono-modal-box-body-contentBar-title",children:c}),o.jsx("p",{className:"ono-modal-box-body-contentBar-content",children:B})]})]}),u&&o.jsx("div",{className:"ono-modal-box-footer",children:u({OkBtn:()=>o.jsx(w,{className:"ono-modal-box-footer-confirmBtn",loading:s,disabled:g,onClick:async()=>{i(!0);try{const e=d==null ? void 0:d();e instanceof Promise&&await e;}finally{i(!1),r();}},children:N ?? "Confirm"}),CancelBtn:()=>o.jsx(w,{className:"ono-modal-box-footer-cancelBtn",disabled:P||s,onClick:()=>{m==null||m(),r();},children:v ?? "Cancel"}),handleClose:()=>r()})})]})});},V=(c)=>F(M,c,"ono-modal");export{V as M};
@@ -1 +0,0 @@
1
- import{j as o}from "./dependencies-B7YNjh_z.js";import "./index.js";import{c as g}from "./chainClassNames.ts-B9vmfsc1.js";import{useState as E,useRef as y,useEffect as P}from "react";const R=({name:m,value:a,style:h,checked:l,onChange:p,children:r,className:C,radioW:f=16,radioGap:k=4,checkedColor:s="#532ce1",unCheckedColor:t="transparent",disabled:d=!1})=>{const [e,n]=E(""),b=y(null),i=y(null),c=y(null),j=[{value:f,name:"w"},{value:k,name:"gap"},{value:s,name:"checkedColor"},{value:t,name:"unCheckedColor"}];return P(()=>{(()=>{if(!c.current||!i.current)return;j.forEach(({value:x,name:N})=>{x&&((v,w,G)=>{const W=typeof v=="number";G.style.setProperty(`--${w}`,W ? `${v}px`:v);})(x,N,i.current);});const u=getComputedStyle(c.current);e||n(u.borderColor),c.current.style.borderColor=l ? s:e;})();},[i,c,l,e]),o.jsxs("div",{ref:i,className:g("ono-radio-box",C),style:h,children:[o.jsx("div",{ref:c,className:"ono-radio",onClick:()=>{var u;return(u=b.current)==null ? void 0:u.click();},children:o.jsx("input",{type:"radio",name:m,ref:b,value:a+"",checked:l,disabled:d,id:a+""+r,onChange:p})}),r&&o.jsx("label",{htmlFor:a+""+r||"",children:r})]});},q=({name:m,style:a,options:h,onChange:l,className:p,radioW:r=16,radioGap:C=4,labelPosition:f="right",checkedColor:k="#532ce1",unCheckedColor:s="transparent",value:t})=>o.jsx("div",{className:g("ono-radio-group",p),style:a,children:h.map(({label:d,value:e,disabled:n})=>o.jsx(R,{name:m,value:e,radioW:r,radioGap:C,style:{flexDirection:f==="left" ? "row-reverse":"row"},checkedColor:k,unCheckedColor:s,onChange:()=>l(e),checked:t+""==e+"",disabled:typeof n=="function" ? n(t):n||!1,children:d},d))});export{R,q as a};
@@ -1 +0,0 @@
1
- import{j as g}from "./dependencies-B7YNjh_z.js";import "./index.js";import{c as y}from "./chainClassNames.ts-B9vmfsc1.js";import{forwardRef as k,useState as C,useRef as x,useEffect as p}from "react";const N=({children:s,disabled:i,className:h,style:n,onClick:c})=>g.jsx("li",{className:y("ono-scrollable-tab",h),style:n,onClick:(o)=>!i&&(c==null ? void 0:c(o)),children:s}),w=k(({activeIndex:s,children:i,className:h,style:n,position:c="center",onChange:o},a)=>{const [l,m]=C(0),r=x(null);return p(()=>{const e=r.current;if(!e||l<0)return;const u=e.offsetWidth,t=Array.from(e.children);if(l>=t.length)return;const d=parseInt(((n==null ? void 0:n.gap)||getComputedStyle(e).gap||"0").toString(),10)||0;let f=0;switch(t.slice(0,l+1).forEach((b)=>f+=b.offsetWidth+d),c){case "start":e.scrollLeft=f-t[l].offsetWidth-d;break;case "end":e.scrollLeft=f-u;break;default:f-=t[l].offsetWidth/2+(s!==t.length-1 ? d:0),e.scrollLeft=f-u/2;}},[r,i,s,c]),p(()=>{m(s||0);},[s]),p(()=>{a&&(typeof a=="function" ? a(r.current):a.current=r.current);},[a]),g.jsx("ul",{ref:r,className:y("ono-scrollable-tabs",h),style:n,onClick:(e)=>{r.current&&Array.from(r.current.children).some((u,t)=>{if(u.contains(e.target))return m(t),o==null||o(t),!0;});},children:i(N)});});export{w as S};
@@ -1 +0,0 @@
1
- import{j as n}from "./dependencies-B7YNjh_z.js";import "./index.js";import{c as b}from "./chainClassNames.ts-B9vmfsc1.js";import{useState as r,useEffect as M}from "react";import{T as F}from "./Tooltip-D7d2_43u.js";import{O as z}from "./Input-DHoxESrC.js";import{L as D}from "./List-DXRmDwDo.js";const P=({label:e,value:t,disabled:i,onChange:c,selectValue:d,optionRender:h,currentValue:m,onChangeCursor:p})=>n.jsx("button",{role:"option","aria-label":e,disabled:i,className:"ono-option-item",onClick:()=>c==null ? void 0:c(t),onMouseEnter:()=>!i&&(p==null ? void 0:p(e)),children:h ? h({label:e,value:t,disabled:i},d===e):n.jsx("div",{className:b("ono-option-item-content",m===e&&d!==e ? "ono-option-item-content-active":"",d===e ? "ono-option-item-content-selected":"",i ? "ono-option-item-content-disabled":""),children:e})}),Q=({options:e,defaultValue:t,placeholder:i,inputBorder:c,isShowArrow:d,disabled:h,clearable:m,selectClassName:p,optionsClassName:O,notFoundContent:w,optionRender:y,onClear:g,onChange:s,filterOption:a})=>{const [f,N]=r(""),[E,C]=r(""),[u,j]=r(""),[L,S]=r(!1),[V,R]=r(!1),[A,v]=r(""),k=(o)=>{const l=e.find((x)=>x.value===o);N(l ? l.label:"");},B=(o)=>{s==null||s(o),v(o),k(o);};return M(()=>{t&&k(t);},[t]),M(()=>{var o;if(e.length>0){if(t){const l=e.find((x)=>x.value===t);l&&C(l.label);}else e:for(let l=0;l<e.length;l++)if(((o=e[l])==null ? void 0:o.disabled)!==!0){C(e[0].label);break e;}}},[e,t]),n.jsx(F,{sameWidth:!0,trigger:"click",placement:"bottom",isShowArrow:d,className:b("ono-option-container",O),onOpenChange:(o)=>{R(o),a&&u&&!o&&j("");},content:n.jsx(D,{list:a ? typeof a=="function" ? a(u,e):e.filter((o)=>o.label.toLocaleLowerCase().includes(u.toLocaleLowerCase())):e,fallback:n.jsx("div",{className:"ono-option-item",children:n.jsx("div",{className:"ono-option-item-content-no-data",onClick:(o)=>o.stopPropagation(),children:w ?? "No Data"})}),children:(o)=>n.jsx(P,{...o,onChange:B,selectValue:f.toString(),currentValue:E.toString(),optionRender:y,onChangeCursor:C},o.value)}),children:n.jsx("div",{className:"ono-select",onMouseEnter:()=>S(!0),onMouseLeave:()=>S(!1),children:n.jsx(z,{className:b(a ? "":"ono-select-readonly",p),border:c,disabled:h,placeholder:a&&A ? f.toString()||"":i,readonly:!a,value:a&&V ? u:f.toString(),clearable:L&&m,suffix:L&&m&&f||m&&u&&a ? n.jsx(n.Fragment,{}):n.jsx(T,{isVisible:V}),onClear:()=>{g==null||g(),s==null||s(""),v(""),N(""),j("");},onChange:(o)=>j(o.target.value)})})});},T=({isVisible:e})=>n.jsx("svg",{className:b("ono-select-arrow-down-icon",e ? "ono-select-arrow-down-active":""),viewBox:"64 64 896 896",focusable:"false","data-icon":"down",fill:"currentColor","aria-hidden":"true",children:n.jsx("path",{d:"M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"})});export{Q as O};
@@ -1 +0,0 @@
1
- import{j as c}from "./dependencies-B7YNjh_z.js";import "./index.js";import{c as f}from "./chainClassNames.ts-B9vmfsc1.js";import{useRef as v,useEffect as y}from "react";const $=({w:l,h:m,src:n,clr:o,className:i,onClick:u})=>{const r=v(null),p=[{value:l,name:"w"},{value:m,name:"h"},{value:o,name:"clr"}];return y(()=>{r.current&&p.forEach((s)=>{var e,a,t;s.value&&(e=s.value,a=s.name,t=r.current,typeof e=="string" ? t.style.setProperty(`--${a}`,e):t.style.setProperty(`--${a}`,`${e}px`));});},[r,o]),c.jsx("div",{ref:r,className:f("ono-svg-img",i),onClick:u,children:c.jsx("img",{src:n,alt:""})});};export{$ as S};
@@ -1 +0,0 @@
1
- import{j as t}from "./dependencies-B7YNjh_z.js";import "./index.js";import{c as y}from "./chainClassNames.ts-B9vmfsc1.js";import{p as j}from "./pureNumber.ts-LjeTI9RC.js";import{useRef as n,useEffect as k}from "react";const T=({id:g,text:e,style:h,color:c,checked:u,onChange:d,name:N="",className:m,disabled:v=!1})=>{const o=n(null),i=n(null),s=n(null),l=n(null),p=n(null),x=n(null),b=[{value:typeof c=="string" ? c:c==null ? void 0:c.active,name:"checkedClr"},{value:typeof c=="string"||c==null ? void 0:c.inactive,name:"uncheckedClr"}];return k(()=>{(()=>{if(!i.current||!o.current)return;let r=60,w=32;if(m||h){const a=getComputedStyle(i.current);r=j(a.width),w=j(a.height);}[...b,{value:r,name:"w"},{value:w,name:"h"}].forEach(({value:a,name:C})=>{a&&((f,E,S)=>{const $=typeof f=="number";S.style.setProperty(`--${E}`,$ ? `${f}px`:f);})(a,C,o.current);}),requestAnimationFrame(()=>{l.current&&(l.current.style.transition="translate 0.3s");});})();},[i,o,l,m,h,c,e,p,x]),k(()=>{s.current&&(s.current.checked=u);},[s,u]),t.jsxs("div",{ref:o,className:y("ono-switch",v ? "ono-switch-is-disabled":""),children:[t.jsx("input",{id:g,name:N,role:"switch",ref:s,type:"checkbox",checked:u,onChange:(r)=>{v||(d==null||d(r.currentTarget.checked,r));}}),t.jsx("div",{ref:i,className:y("ono-switch-box",m),style:h,onClick:()=>{var r;return(r=s.current)==null ? void 0:r.click();},children:t.jsxs("div",{ref:l,className:"ono-switch-children-bar",children:[(e==null ? void 0:e.active)&&t.jsx("div",{ref:p,className:"ono-switch-children",children:e==null ? void 0:e.active}),t.jsx("div",{className:"ono-switch-slider"}),(e==null ? void 0:e.inactive)&&t.jsx("div",{ref:x,className:"ono-switch-children",children:e==null ? void 0:e.inactive})]})})]});};export{T as S};
@@ -1 +0,0 @@
1
- import{j as m}from "./dependencies-B7YNjh_z.js";import "./index.js";import{c as v}from "./chainClassNames.ts-B9vmfsc1.js";import{g as b}from "./getElementCenterPosition.ts-CpWYej6j.js";import{useState as P,useRef as w,useEffect as $,useCallback as j}from "react";const T=({children:r,animation:e,className:p,duration:i=300,style:u,maskColor:d="rgba(0,0,0,0.5)",disableContextMenu:f,maskClickClose:y=!0,dialogClose:c})=>{const [s,k]=P(!1),o=w(null),l=()=>{if(o.current)if(k(!0),e){const t=o.current;t.classList.remove(`ono-${e.type}-enter`),t.classList.add(`ono-${e.type}-leave`),setTimeout(c,i);}else c();};$(()=>{(()=>{if(!e||!o.current)return;const t=o.current.parentElement.style,n=o.current.style;switch(t.setProperty("--duration",i/1e3+"s"),e.type){case "zoom":{const{x:a,y:C}=b(e.element),x=(a/window.innerWidth*100).toFixed(2)+"%",h=(C/window.innerHeight*100).toFixed(2)+"%";n.setProperty("--left",x),n.setProperty("--top",h);break;}case "fade":{const a=e.direction==="left-center" ? "--left":"--top";n.setProperty(a,e.startPosition);break;}}})();},[o,e]);const g=j(()=>{if(!e)return "";const t=`ono-${e.type}-enter`,n=`ono-${e.type}-leave`;return s ? n:t;},[e,s]);return m.jsx("div",{className:"ono-dialog-mask ono-dialog-mask-"+(s ? "leave":"enter"),style:{background:d},onClick:()=>y&&l(),onContextMenu:(t)=>f&&t.preventDefault(),children:m.jsx("div",{ref:o,className:v("ono-dialog",p,g()),style:u,onClick:(t)=>t.stopPropagation(),children:typeof r=="function" ? r(l):r})});};export{T};
@@ -1 +0,0 @@
1
- import{j as r}from "./dependencies-B7YNjh_z.js";import "./index.js";import{c as u}from "./chainClassNames.ts-B9vmfsc1.js";import{useEffect as f,useRef as _}from "react";import{i as v}from "./InjunctiveBox-BBa5LG49.js";const L="_enter_974ly_32";let t=[];const w={success:{light:"#52c41a",dark:"#49aa19"},error:{light:"#ff4d4f",dark:"#a61d24"},warning:{light:"#faad14",dark:"#d89614"},promise:{light:"",dark:""}},y=(e,i)=>w[e][i],j=(e)=>{switch(e){case "success":return r.jsx("svg",{viewBox:"0 0 1024 1024",focusable:"false","data-icon":"check-circle",width:"24px",height:"24px",fill:y(e,"light"),"aria-hidden":"true",children:r.jsx("path",{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm193.5 301.7l-210.6 292a31.8 31.8 0 01-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z"})});case "error":return r.jsx("svg",{viewBox:"0 0 1024 1024",focusable:"false","data-icon":"close-circle",width:"24px",height:"24px",fill:y(e,"light"),"aria-hidden":"true",children:r.jsx("path",{d:"M512 64c247.4 0 448 200.6 448 448S759.4 960 512 960 64 759.4 64 512 264.6 64 512 64zm127.98 274.82h-.04l-.08.06L512 466.75 384.14 338.88c-.04-.05-.06-.06-.08-.06a.12.12 0 00-.07 0c-.03 0-.05.01-.09.05l-45.02 45.02a.2.2 0 00-.05.09.12.12 0 000 .07v.02a.27.27 0 00.06.06L466.75 512 338.88 639.86c-.05.04-.06.06-.06.08a.12.12 0 000 .07c0 .03.01.05.05.09l45.02 45.02a.2.2 0 00.09.05.12.12 0 00.07 0c.02 0 .04-.01.08-.05L512 557.25l127.86 127.87c.04.04.06.05.08.05a.12.12 0 00.07 0c.03 0 .05-.01.09-.05l45.02-45.02a.2.2 0 00.05-.09.12.12 0 000-.07v-.02a.27.27 0 00-.05-.06L557.25 512l127.87-127.86c.04-.04.05-.06.05-.08a.12.12 0 000-.07c0-.03-.01-.05-.05-.09l-45.02-45.02a.2.2 0 00-.09-.05.12.12 0 00-.07 0z"})});case "warning":return r.jsx("svg",{viewBox:"0 0 1024 1024",focusable:"false","data-icon":"exclamation-circle",width:"24px",height:"24px",fill:y(e,"light"),"aria-hidden":"true",children:r.jsx("path",{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm-32 232c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V296zm32 440a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"})});}},z=({type:e,speed:i=200,message:c,duration:m=2e3,className:d,style:h,isUseEnterAnimation:g=!0,promiseOptions:s,toastList:p,handleDestroy:o})=>{const a=_(null);return f(()=>{a.current&&(a.current.style.setProperty("--speed",i/1e3+"s"),g&&a.current.classList.add(L),e!=="promise"&&setTimeout(()=>{var n,x;(n=a.current)==null||n.classList.remove(L),(x=a.current)==null||x.classList.add("_leave_974ly_36");},m-i));},[a]),f(()=>{e==="promise" ?(typeof c=="function" ? c():c).then((n)=>setTimeout(()=>{o(),l({type:"success",message:typeof(s==null ? void 0:s.success)=="function" ? s.success(n):(s==null ? void 0:s.success)||"",isUseEnterAnimation:!1,toastList:p});},i)).catch((n)=>setTimeout(()=>{o(),l({type:"error",message:typeof(s==null ? void 0:s.error)=="function" ? s.error(n):(s==null ? void 0:s.error)||"",isUseEnterAnimation:!1,toastList:p});},i)):setTimeout(()=>o(()=>p=[]),m);},[e]),r.jsxs("div",{ref:a,className:u(e==="promise" ? "_promise_974ly_15":"_base_974ly_15",d),style:h,onClick:()=>{},children:[r.jsx("div",{className:"_icon_974ly_40",children:j(e)}),r.jsx("p",{children:typeof c=="string" ? c:s&&s.loading})]});},l=({type:e,speed:i=200,message:c,duration:m=2e3,zIndex:d=9999,className:h,style:g,isUseEnterAnimation:s=!0,promiseOptions:p,toastList:o})=>v({className:"_container_974ly_1",isSingle:!0,style:{zIndex:d},content:(a)=>(f(()=>{},[o]),r.jsx(z,{className:h,style:g,type:e,message:c,speed:i,duration:m,isUseEnterAnimation:s,promiseOptions:p,handleDestroy:a,toastList:o}))}),b={success:(e)=>{t.push({type:"success",message:e}),l(typeof e=="string" ?{type:"success",message:e,toastList:t}:{type:"success",...e,toastList:t});},error:(e)=>{t.push({type:"error",message:e}),l(typeof e=="string" ?{type:"error",message:e,toastList:t}:{type:"error",...e,toastList:t});},warning:(e)=>{t.push({type:"warning",message:e}),l(typeof e=="string" ?{type:"warning",message:e,toastList:t}:{type:"warning",...e,toastList:t});},promise:(e,i)=>{t.push({type:"promise",message:e}),l({type:"promise",message:e,promiseOptions:i,toastList:t});}};export{b as t};
@@ -1 +0,0 @@
1
- import{j as o}from "./dependencies-B7YNjh_z.js";import "./index.js";import{u as b}from "./useClickOutSide.tsx-C6XuLZzd.js";import{c as k}from "./chainClassNames.ts-B9vmfsc1.js";import{createPopper as W}from "@popperjs/core";import{useState as A,useRef as d,useEffect as h}from "react";let u=null,p=null;const R=({children:c,content:a,onOpenChange:l,trigger:n="hover",placement:f="top",popperOptions:m={},className:w,style:x,isShowArrow:v=!0,sameWidth:y,autoAdjustOverflow:g=!0})=>{const [s,j]=A(!1),i=d(null),e=d(null),r=(t)=>{l==null||l(t),j(t);};return b(e,()=>{n!=="click"&&n!=="contextmenu"||r(!1);},{event:["click","contextmenu"],deps:[n,l]}),h(()=>{(()=>{if(!e.current)return;const t=Array.from(e.current.children);if(t.length>1)throw new Error("Tooltip only support one child");e.current.style.width=t[0].getBoundingClientRect().width+"px";})();},[e,c]),h(()=>{e.current&&(n==="hover" ?(e.current.onmouseenter=()=>r(!0),e.current.onmouseleave=()=>r(!1)):n==="click" ? e.current.onclick=()=>r(!s):n==="focus" ?(e.current.onfocus=()=>r(!0),e.current.onblur=()=>r(!1)):e.current.oncontextmenu=()=>r(!s)),s&&e.current&&i.current ? p=W(e.current,i.current,{placement:f,modifiers:[{name:"offset",options:{offset:[0,6]}},y ?{name:"sameWidth",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn({state:t}){t.styles.popper.width=`${t.rects.reference.width}px`;},effect({state:t}){t.elements.popper.style.width=`${t.elements.reference.offsetWidth}px`;}}:{},g ?{name:"flip",enabled:!0}:{}],...m}):p&&(p.destroy(),p=null,u&&u.remove(),u=null);},[s,e,i]),o.jsxs(o.Fragment,{children:[s&&o.jsxs("div",{ref:i,style:x,className:k("ono-tooltip-popper",w),"data-popper-placement":m.placement||f,children:[o.jsx("div",{children:a instanceof Function ? a():a}),v&&o.jsx("div",{className:"ono-tooltip-popper-arrow","data-popper-arrow":!0})]}),o.jsx("div",{ref:e,children:c instanceof Function ? c():c})]});};export{R as T};
@@ -1 +0,0 @@
1
- import{j as x}from "./dependencies-B7YNjh_z.js";import "./index.js";import{u as k}from "./useEventListener.tsx-C8V9Qip6.js";import{t as B}from "./throttle.ts-D_EqcNzV.js";import{memo as q,useState as N,useMemo as z,useRef as b,useEffect as C}from "react";import{L as F}from "./List-DXRmDwDo.js";const U=q(({containerClassName:w,dataSource:d,containerStyle:I={},onEndCallback:p,refreshSpeed:E=50,wrapperClassName:A,wrapperStyle:H={},estimatedSize:y=35,updateDataSourceScroll2Top:L,direction:n="vertical"})=>{const [s,M]=N({viewSize:0,startIndex:0,listSize:0,renderCount:0,prevLen:0}),[l,T]=N([]),h=typeof y=="number" ? y:y(),j=z(()=>Math.min(d.length,s.startIndex+s.renderCount),[d,s]),m=z(()=>{var t;return s.startIndex>0 ?(t=l[s.startIndex-1])==null ? void 0:t.end:0;},[s.startIndex,l]),W=z(()=>x.jsx(F,{list:d.slice(s.startIndex,j),children:({id:t,data:r})=>x.jsx("li",{"data-virtual-id":t,style:n==="vertical" ?{width:"100%"}:{height:"100%"},children:r},t)}),[j,d,s.startIndex,n]),D=z(()=>({display:"flex",listStyle:"none",flexDirection:n==="vertical" ? "column":"row",height:n==="vertical" ? s.listSize-m+"px":"100%",width:n==="vertical" ? "auto":s.listSize-m+"px",translate:n==="vertical" ? `0 ${m}px 0`:`${m}px 0 0`}),[s.listSize,m,n]),u=b(null),f=b(null),S=(t)=>M((r)=>({...r,...t})),R=B(()=>{const{scrollTop:t,clientHeight:r,scrollHeight:c,scrollLeft:a,clientWidth:i,scrollWidth:e}=u.current,o=n==="vertical" ? c-r-t:e-i-a;S({startIndex:$(l,n==="vertical" ? t:a)}),(n==="vertical" ? t===h/2:a===h/2)&&S({startIndex:0}),o<=20&&p&&p();},E),$=(t,r)=>{let c=0,a=t.length-1,i=-1;for(;c<=a;){const e=c+Math.floor((a-c)/2),o=t[e].end;if(o===r)return e+1;o<r ? c=e+1:((i===-1||i>e)&&(i=e),a=e-1);}return i;};return k("scroll",R,{target:u.current,deps:[l,n]}),C(()=>{(()=>{if(!u.current)return;const t=(n==="vertical" ? u.current.offsetHeight:u.current.offsetWidth)||0;S({viewSize:t,renderCount:Math.ceil(t/h)+1});})();},[u,n]),C(()=>{d.length&&f&&(()=>{var i;const t=[],r=d.length-s.prevLen,c=r>0 ? l.length:0,a=c>0 ? l[c-1].end:0;for(let e=0;e<(r>0 ? r:d.length);e++){const o=d[(r>0 ? s.prevLen:0)+e];t.push({index:o.id,size:h,start:a ? a+e*h:o.id*h,end:a ? a+(e+1)*h:(o.id+1)*h,dSize:0});}T((e)=>[...r>0 ? e:[],...t]),S({prevLen:d.length}),L&&((i=u.current)==null||i.scrollTo(0,0));})();},[f,d,L]),C(()=>{(()=>{if(!f.current||l.length===0)return;const t=Array.from(f.current.childNodes);if(!t.length)return;t.forEach((i)=>{const e=i.getBoundingClientRect(),o=+i.getAttribute("data-virtual-id"),v=l[o],g=v.size-(n==="vertical" ? e.height:e.width);g&&(v.size=n==="vertical" ? e.height:e.width,v.end=v.end-g,v.dSize=g);});const r=+t[0].getAttribute("data-virtual-id"),c=l.length;let a=l[r].dSize;l[r].dSize=0;for(let i=r+1;i<c;i++){const e=l[i];e.start=l[i-1].end,e.end=e.end-a,e.dSize&&(a+=e.dSize,e.dSize=0);}S({listSize:l[c-1].end});})();},[f,l,s.startIndex,n]),x.jsx("div",{ref:u,className:w,style:{width:"100%",height:"100%",overflow:"auto",...I},children:x.jsx("ul",{ref:f,className:A,style:{...D,...H},children:W})});}),V=(w,d)=>w.map((I,p)=>({id:p,data:d(I,p)}));export{U as E,V as c};
@@ -1 +0,0 @@
1
- import{j as l}from "./dependencies-B7YNjh_z.js";import "./index.js";import{u as J}from "./useEventListener.tsx-C8V9Qip6.js";import{c as R}from "./chainClassNames.ts-B9vmfsc1.js";import{t as B}from "./throttle.ts-D_EqcNzV.js";import{useState as v,useRef as L,useCallback as G,useEffect as z}from "react";import{L as I}from "./List-DXRmDwDo.js";const Z=({options:t,pageSize:h,children:$,request:A,reloadData:o,className:S,style:H,updateData:j,loading:c=!0,bottomThreshold:O=50})=>{const [a,p]=v({page:1,reloadData:o,loading:!1,isFinish:!1,gap:typeof t=="number" ? 0:t.gap,imageWidth:typeof t=="number" ? t:0,columns:typeof t=="number" ? 0:t.columns,imageList:[]}),[f,D]=v([]),[y,N]=v([]),x=L(null),g=L(null),d=L(null),u=(i)=>p((e)=>({...e,...i})),w=async(i,e)=>{const r=o&&a.reloadData!==o;if(a.isFinish)return;u({loading:!0});const n=await A(i,e);k(n),u({isFinish:!n.length,imageList:r ? [...n]:[...a.imageList,...n],page:i+1,loading:!1});},k=(i)=>p((e)=>{const r=o&&a.reloadData!==o,n=r ? []:[...y],m=r ? Array(e.columns).fill(0):[...JSON.stringify(f)!=="[]" ? f:Array(e.columns).fill(0)];return i.forEach((M)=>{const s=((W)=>{let b=0,T=0;return b=W.indexOf(Math.min(...W)),T=W[b],{index:b,height:T};})(m),C=Math.floor(M.height*e.imageWidth/M.width);n.push({x:s.index%e.columns!==0 ? s.index*e.imageWidth+e.gap*s.index:s.index*e.imageWidth,y:s.height}),m[s.index]+=C+e.gap,D(m);}),N(n),e;}),E=G(()=>{if(!d.current)return;const i=d.current.clientWidth;let e=0,r=a.page;if(o&&a.reloadData!==o&&(p({page:1,reloadData:o,loading:!1,isFinish:!1,gap:typeof t=="number" ? 0:t.gap,imageWidth:typeof t=="number" ? t:0,columns:typeof t=="number" ? 0:t.columns,imageList:[]}),D([]),N([]),r=1),typeof t=="number"){const n=Math.floor(i/a.imageWidth);e=n-1;const m=e ?(i-n*a.imageWidth)/e:0;u({columns:n,gap:m});}else{e=a.columns-1;const n=(i-e*a.gap)/a.columns;u({imageWidth:n});}w(r,h);},[a,o]),F=()=>{x.current&&clearTimeout(x.current),x.current=setTimeout(E,50);},q=B(()=>{const{scrollTop:i,clientHeight:e,scrollHeight:r}=g.current;r-e-i>O||!a.loading&&w(a.page,h);},50);return J("scroll",q,{target:g.current,deps:[a.loading,a.page]}),z(()=>(E(),window.addEventListener("resize",F),()=>{window.removeEventListener("resize",F);}),[d,o]),z(()=>{j&&w(a.page,h);},[j,a.loading,a.page,g.current]),l.jsxs("div",{className:"ono-waterfall-container",children:[l.jsx("div",{ref:g,className:R(S,"ono-waterfall-content"),style:H,children:l.jsx("div",{ref:d,className:"ono-waterfall-wrapper",style:{height:Math.max(...f)-a.gap+"px"},children:l.jsx(I,{list:a.imageList,children:(i,e)=>l.jsx("div",{className:"ono-waterfall-item",style:{width:`${a.imageWidth}px`,translate:`${y[e].x}px ${y[e].y}px`},children:$(i,e)},i.id)})})}),a.loading&&(typeof c=="function" ? c():c&&typeof c=="boolean" ? l.jsx("div",{className:"ono-waterfall-loading",children:"loading..."}):c)]});};export{Z as W};
@@ -1 +0,0 @@
1
- import{g as s}from "./getAllTheNumbers.ts-DaNxVd8a.js";import{h as i}from "./hex2hsl.ts-C-JnVxv_.js";import{h as l}from "./hsl2hex.ts-D9xS0UDg.js";import{r as m}from "./rgb2hsl.ts-BPiSggZg.js";const b=(e,t,o)=>{let r=[];if(e.includes("#"))r=s(i(e));else if(e.includes("rgb"))r=s(m(e));else{if(!e.includes("hsl"))throw new Error("颜色格式错误");r=s(e);}return l(`${r[0]},${r[1]}%,${t==="light" ? Number(r[2])+o>100 ? 100:Number(r[2])+o:Number(r[2])-o<0 ? 0:Number(r[2])-o}%`);};export{b as a};
@@ -1 +0,0 @@
1
- import "./index.js";import{d as i}from "./distinguishPlatform.ts-D2huTxC3.js";const e=({onAndroid:o,onIOS:n,onUnknown:t,timeout:d=500})=>()=>{setTimeout(()=>i({onAndroid:o,onIOS:n,onUnknown:t}),d);};export{e as d};
@@ -1 +0,0 @@
1
- import{h as r}from "./hex2rgb.ts-BQpml6Tb.js";import{r as t}from "./rgb2hsl.ts-BPiSggZg.js";const p=(o)=>t(r(o));export{p as h};
@@ -1 +0,0 @@
1
- import{b as o}from "./blobToFile.ts-BXmUv6W-.js";import{u as s}from "./urlToBlob.ts-DDhIhkMn.js";const m=async(a)=>o(await s(a));export{m as u};