@vaebe/ccui 2.0.0-beta.0 → 2.0.1-beta.1

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 (83) hide show
  1. package/README.md +4 -0
  2. package/button/index.es.js +28 -22
  3. package/button/index.umd.js +1 -1
  4. package/calendar/index.es.js +445 -90
  5. package/calendar/index.umd.js +1 -1
  6. package/ccui-cli.css +1 -1
  7. package/check-box/index.es.js +8 -2
  8. package/check-box/index.umd.js +1 -1
  9. package/chunk-Ndeg2fpE.js +20 -0
  10. package/collapse/index.es.js +10 -7
  11. package/collapse/index.umd.js +1 -1
  12. package/config-provider/chunk-C_CI6nMA.js +13 -0
  13. package/config-provider/en-BG83iZ_P.js +24 -0
  14. package/config-provider/index.es.js +408 -53
  15. package/config-provider/index.umd.js +1 -1
  16. package/config-provider/ja-B-93MQG5.js +56 -0
  17. package/config-provider/ko-86th3uXt.js +56 -0
  18. package/config-provider/zh-cn-BQE-LNg1.js +59 -0
  19. package/date-picker/ccui-cli.css +1 -1
  20. package/date-picker/index.es.js +664 -482
  21. package/date-picker/index.umd.js +1 -1
  22. package/drawer/index.es.js +271 -279
  23. package/drawer/index.umd.js +1 -1
  24. package/dropdown/index.es.js +187 -171
  25. package/dropdown/index.umd.js +1 -1
  26. package/empty/index.es.js +341 -24
  27. package/empty/index.umd.js +1 -1
  28. package/en-BVwCvuzF.js +24 -0
  29. package/float-button/index.es.js +1134 -46
  30. package/float-button/index.umd.js +1 -1
  31. package/form/index.es.js +1357 -261
  32. package/form/index.umd.js +1 -1
  33. package/icon/index.es.js +93 -10
  34. package/icon/index.umd.js +1 -1
  35. package/image/index.es.js +353 -36
  36. package/image/index.umd.js +1 -1
  37. package/input/index.es.js +24 -15
  38. package/input/index.umd.js +1 -1
  39. package/input-number/index.es.js +45 -25
  40. package/input-number/index.umd.js +1 -1
  41. package/ja-B4U4rt8A.js +56 -0
  42. package/ko-BG35I8uK.js +56 -0
  43. package/menu/index.es.js +3 -1
  44. package/menu/index.umd.js +1 -1
  45. package/message/index.es.js +1179 -86
  46. package/message/index.umd.js +1 -1
  47. package/modal/index.es.js +735 -335
  48. package/modal/index.umd.js +1 -1
  49. package/notification/index.es.js +1176 -83
  50. package/notification/index.umd.js +1 -1
  51. package/package.json +9 -9
  52. package/pagination/index.es.js +381 -60
  53. package/pagination/index.umd.js +1 -1
  54. package/popconfirm/index.es.js +469 -143
  55. package/popconfirm/index.umd.js +1 -1
  56. package/popover/index.es.js +192 -175
  57. package/popover/index.umd.js +1 -1
  58. package/radio/index.es.js +8 -2
  59. package/radio/index.umd.js +1 -1
  60. package/rate/index.es.js +22 -12
  61. package/rate/index.umd.js +1 -1
  62. package/select/index.es.js +135 -53
  63. package/select/index.umd.js +1 -1
  64. package/slider/index.es.js +165 -155
  65. package/slider/index.umd.js +1 -1
  66. package/steps/index.es.js +1140 -49
  67. package/steps/index.umd.js +1 -1
  68. package/switch/index.es.js +2 -0
  69. package/switch/index.umd.js +1 -1
  70. package/tabs/index.es.js +31 -5
  71. package/tabs/index.umd.js +1 -1
  72. package/tag/index.es.js +53 -35
  73. package/tag/index.umd.js +1 -1
  74. package/tooltip/index.es.js +78 -77
  75. package/tooltip/index.umd.js +1 -1
  76. package/tree/ccui-cli.css +1 -1
  77. package/tree/index.es.js +1491 -276
  78. package/tree/index.umd.js +1 -1
  79. package/typography/index.es.js +1213 -125
  80. package/typography/index.umd.js +1 -1
  81. package/vue-ccui.es.js +8726 -7604
  82. package/vue-ccui.umd.js +1 -1
  83. package/zh-cn-C8nbfD5S.js +59 -0
@@ -1 +1 @@
1
- (function(e,t){typeof exports==`object`&&typeof module<`u`?t(exports,require(`vue`)):typeof define==`function`&&define.amd?define([`exports`,`vue`],t):(e=typeof globalThis<`u`?globalThis:e||self,t(e.index={},e.Vue))})(this,function(e,t){Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});function n(e,t,n){let r=e;return t&&(r+=`__${t}`),n&&(r+=`--${n}`),r}function r(e,t=!1){let r=t?`.ccui-${e}`:`ccui-${e}`;return{b:()=>n(r),e:e=>e?n(r,e):``,m:e=>e?n(r,``,e):``,em:(e,t)=>e&&t?n(r,e,t):``,is:e=>`is-${e}`}}var i={id:{type:String,required:!0},content:{type:[String,Object],default:``},type:{type:String,default:`info`},duration:{type:Number,default:3e3},showClose:{type:Boolean,default:!1},icon:{type:String,default:``},customClass:{type:String,default:``},role:{type:String,default:`alert`},pauseOnHover:{type:Boolean,default:!0},classNames:{type:Object,default:void 0},styles:{type:Object,default:void 0}},a={info:`ⓘ`,success:`✓`,warning:`!`,error:`✕`,loading:`⟳`},o=(0,t.defineComponent)({name:`CMessageItem`,props:i,emits:[`close`,`destroy`],setup(e,{emit:n,slots:i}){let o=r(`message`),s=(0,t.ref)(!1),c=null,l=()=>{e.duration>0&&(c=window.setTimeout(d,e.duration))},u=()=>{c!==null&&(clearTimeout(c),c=null)},d=()=>{s.value=!1,n(`close`)},f=()=>{n(`destroy`)},p=()=>{e.pauseOnHover&&u()},m=()=>{e.pauseOnHover&&l()};return(0,t.onMounted)(()=>{s.value=!0,l()}),(0,t.onBeforeUnmount)(()=>u()),()=>(0,t.createVNode)(t.Transition,{name:`${o.b()}-fade`,onAfterLeave:f},{default:()=>[s.value&&(0,t.createVNode)(`div`,{class:[o.e(`item`),o.em(`item`,e.type),e.customClass,e.classNames?.root],style:e.styles?.root,role:e.role,"aria-live":e.role===`alert`?`assertive`:`polite`,onMouseenter:p,onMouseleave:m},[(0,t.createVNode)(`div`,{class:o.e(`inner`)},[(0,t.createVNode)(`span`,{class:[o.e(`icon`),o.em(`icon`,e.type),e.classNames?.icon],style:e.styles?.icon},[e.icon?(0,t.createVNode)(`i`,{class:e.icon},null):a[e.type]]),(0,t.createVNode)(`span`,{class:[o.e(`content`),e.classNames?.content],style:e.styles?.content},[i.default?i.default():e.content]),e.showClose&&(0,t.createVNode)(`button`,{class:o.e(`close`),onClick:d,"aria-label":`Close`},[(0,t.createTextVNode)(`×`)])])])]})}}),s=[`top`,`topLeft`,`topRight`,`bottom`,`bottomLeft`,`bottomRight`],c=0,l=new Map,u=new Map,d=(0,t.reactive)({top:[],topLeft:[],topRight:[],bottom:[],bottomLeft:[],bottomRight:[]}),f={duration:3,maxCount:1/0,stack:!1,pauseOnHover:!0,role:`alert`};function p(e,t){let n=e===void 0?t:e;return n===0?0:n>100?n:n*1e3}function m(e){if(l.has(e))return;let n=document.createElement(`div`);n.className=`ccui-message ccui-message--${e}`,f.stack&&n.classList.add(`ccui-message--stack`),(e===`top`||e.startsWith(`top`))&&f.top!==void 0&&(n.style.top=typeof f.top==`number`?`${f.top}px`:f.top),(e===`bottom`||e.startsWith(`bottom`))&&f.bottom!==void 0&&(n.style.bottom=typeof f.bottom==`number`?`${f.bottom}px`:f.bottom),(f.getContainer?f.getContainer():document.body).appendChild(n),l.set(e,n);let r=(0,t.createApp)({name:`CMessageContainer-${e}`,setup(){let n=t=>{let n=d[e],r=n.findIndex(e=>e.id===t);r!==-1&&n.splice(r,1)};return()=>d[e].map(e=>(0,t.h)(o,{key:e.id,id:e.id,content:e.options.content,type:e.options.type??`info`,duration:p(e.options.duration,f.duration??3),showClose:e.options.showClose??!1,icon:e.options.icon??``,customClass:e.options.customClass??``,role:e.options.role??f.role??`alert`,pauseOnHover:e.options.pauseOnHover??f.pauseOnHover??!0,classNames:e.options.classNames,styles:e.options.styles,onClose:()=>e.options.onClose?.(),onDestroy:()=>n(e.id)}))}});r.mount(n),u.set(e,r)}function h(e){let t=f.maxCount??1/0;if(!isFinite(t)||t<=0)return;let n=d[e];for(;n.length>t;)n.shift()}function g(e){let t=e.placement??`top`;m(t);let n=`msg-${++c}`;return d[t].push({id:n,options:e}),h(t),{close:()=>{let e=d[t],r=e.findIndex(e=>e.id===n);r!==-1&&e.splice(r,1)}}}function _(e){return(t,n)=>g(typeof t==`string`?{content:t,type:e,duration:n}:{...t,type:e})}var v={open:g,info:_(`info`),success:_(`success`),warning:_(`warning`),error:_(`error`),loading:_(`loading`),config(e){Object.assign(f,e),l.forEach(e=>{f.stack?e.classList.add(`ccui-message--stack`):e.classList.remove(`ccui-message--stack`)})},destroy(){s.forEach(e=>{d[e].splice(0,d[e].length);let t=u.get(e),n=l.get(e);t&&(t.unmount(),u.delete(e)),n&&(n.remove(),l.delete(e))})}},y=[`top`,`topLeft`,`topRight`,`bottom`,`bottomLeft`,`bottomRight`];function b(e,t){let n=e===void 0?t:e;return n===0?0:n>100?n:n*1e3}var x=0;function S(){let e=`use-msg-${++x}`,n=0,r=(0,t.reactive)({top:[],topLeft:[],topRight:[],bottom:[],bottomLeft:[],bottomRight:[]}),i={duration:3,maxCount:1/0,stack:!1,pauseOnHover:!0,role:`alert`};function a(e){let t=i.maxCount??1/0;if(!isFinite(t)||t<=0)return;let n=r[e];for(;n.length>t;)n.shift()}function s(t){let i=t.placement??`top`,o=`${e}-${++n}`;return r[i].push({id:o,options:t}),a(i),{close:()=>{let e=r[i],t=e.findIndex(e=>e.id===o);t!==-1&&e.splice(t,1)}}}function c(e){return(t,n)=>s(typeof t==`string`?{content:t,type:e,duration:n}:{...t,type:e})}return{message:{open:s,info:c(`info`),success:c(`success`),warning:c(`warning`),error:c(`error`),loading:c(`loading`),config(e){Object.assign(i,e)},destroy(){y.forEach(e=>{r[e].splice(0,r[e].length)})}},holder:(0,t.defineComponent)({name:`CMessageHolder`,setup(){let e=(e,t)=>{let n=r[e],i=n.findIndex(e=>e.id===t);i!==-1&&n.splice(i,1)};return()=>{let n=y.filter(e=>r[e].length>0).map(n=>{let a={};return(n===`top`||n.startsWith(`top`))&&i.top!==void 0&&(a.top=typeof i.top==`number`?`${i.top}px`:String(i.top)),(n===`bottom`||n.startsWith(`bottom`))&&i.bottom!==void 0&&(a.bottom=typeof i.bottom==`number`?`${i.bottom}px`:String(i.bottom)),(0,t.h)(`div`,{key:n,class:[`ccui-message`,`ccui-message--${n}`,i.stack&&`ccui-message--stack`],style:a},r[n].map(r=>(0,t.h)(o,{key:r.id,id:r.id,content:r.options.content,type:r.options.type??`info`,duration:b(r.options.duration,i.duration??3),showClose:r.options.showClose??!1,icon:r.options.icon??``,customClass:r.options.customClass??``,role:r.options.role??i.role??`alert`,pauseOnHover:r.options.pauseOnHover??i.pauseOnHover??!0,classNames:r.options.classNames,styles:r.options.styles,onClose:()=>r.options.onClose?.(),onDestroy:()=>e(n,r.id)})))});return n.length===0?null:(0,t.h)(t.Teleport,{to:i.getContainer?i.getContainer():`body`},n)}}})}}e.Message=v,e.default={title:`Message 全局提示`,category:`反馈`,status:`100%`,install(e){e.config.globalProperties.$message=v}},e.message=v,e.useMessage=S});
1
+ (function(e,t){typeof exports==`object`&&typeof module<`u`?t(exports,require(`vue`)):typeof define==`function`&&define.amd?define([`exports`,`vue`],t):(e=typeof globalThis<`u`?globalThis:e||self,t(e.index={},e.Vue))})(this,function(e,t){Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});var n=/^[a-z0-9]+(-[a-z0-9]+)*$/,r=(e,t,n,r=``)=>{let a=e.split(`:`);if(e.slice(0,1)===`@`){if(a.length<2||a.length>3)return null;r=a.shift().slice(1)}if(a.length>3||!a.length)return null;if(a.length>1){let e=a.pop(),n=a.pop(),o={provider:a.length>0?a[0]:r,prefix:n,name:e};return t&&!i(o)?null:o}let o=a[0],s=o.split(`-`);if(s.length>1){let e={provider:r,prefix:s.shift(),name:s.join(`-`)};return t&&!i(e)?null:e}if(n&&r===``){let e={provider:r,prefix:``,name:o};return t&&!i(e,n)?null:e}return null},i=(e,t)=>e?!!((t&&e.prefix===``||e.prefix)&&e.name):!1;function a(e,t){let n=e.icons,r=e.aliases||Object.create(null),i=Object.create(null);function a(e){if(n[e])return i[e]=[];if(!(e in i)){i[e]=null;let t=r[e]&&r[e].parent,n=t&&a(t);n&&(i[e]=[t].concat(n))}return i[e]}return Object.keys(n).concat(Object.keys(r)).forEach(a),i}var o=Object.freeze({left:0,top:0,width:16,height:16}),s=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),c=Object.freeze({...o,...s}),l=Object.freeze({...c,body:``,hidden:!1});function u(e,t){let n={};!e.hFlip!=!t.hFlip&&(n.hFlip=!0),!e.vFlip!=!t.vFlip&&(n.vFlip=!0);let r=((e.rotate||0)+(t.rotate||0))%4;return r&&(n.rotate=r),n}function d(e,t){let n=u(e,t);for(let r in l)r in s?r in e&&!(r in n)&&(n[r]=s[r]):r in t?n[r]=t[r]:r in e&&(n[r]=e[r]);return n}function f(e,t,n){let r=e.icons,i=e.aliases||Object.create(null),a={};function o(e){a=d(r[e]||i[e],a)}return o(t),n.forEach(o),d(e,a)}function p(e,t){let n=[];if(typeof e!=`object`||typeof e.icons!=`object`)return n;e.not_found instanceof Array&&e.not_found.forEach(e=>{t(e,null),n.push(e)});let r=a(e);for(let i in r){let a=r[i];a&&(t(i,f(e,i,a)),n.push(i))}return n}var m={provider:``,aliases:{},not_found:{},...o};function h(e,t){for(let n in t)if(n in e&&typeof e[n]!=typeof t[n])return!1;return!0}function g(e){if(typeof e!=`object`||!e)return null;let t=e;if(typeof t.prefix!=`string`||!e.icons||typeof e.icons!=`object`||!h(e,m))return null;let n=t.icons;for(let e in n){let t=n[e];if(!e||typeof t.body!=`string`||!h(t,l))return null}let r=t.aliases||Object.create(null);for(let e in r){let t=r[e],i=t.parent;if(!e||typeof i!=`string`||!n[i]&&!r[i]||!h(t,l))return null}return t}var _=Object.create(null);function v(e,t){return{provider:e,prefix:t,icons:Object.create(null),missing:new Set}}function y(e,t){let n=_[e]||(_[e]=Object.create(null));return n[t]||(n[t]=v(e,t))}function b(e,t){return g(t)?p(t,(t,n)=>{n?e.icons[t]=n:e.missing.add(t)}):[]}function x(e,t,n){try{if(typeof n.body==`string`)return e.icons[t]={...n},!0}catch{}return!1}var S=!1;function ee(e){return typeof e==`boolean`&&(S=e),S}function te(e){let t=typeof e==`string`?r(e,!0,S):e;if(t){let e=y(t.provider,t.prefix),n=t.name;return e.icons[n]||(e.missing.has(n)?null:void 0)}}function ne(e,t){let n=r(e,!0,S);if(!n)return!1;let i=y(n.provider,n.prefix);return t?x(i,n.name,t):(i.missing.add(n.name),!0)}function C(e,t){if(typeof e!=`object`)return!1;if(typeof t!=`string`&&(t=e.provider||``),S&&!t&&!e.prefix){let t=!1;return g(e)&&(e.prefix=``,p(e,(e,n)=>{ne(e,n)&&(t=!0)})),t}let n=e.prefix;return i({prefix:n,name:`a`})?!!b(y(t,n),e):!1}var w=Object.freeze({width:null,height:null}),T=Object.freeze({...w,...s}),re=/(-?[0-9.]*[0-9]+[0-9.]*)/g,ie=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function ae(e,t,n){if(t===1)return e;if(n||=100,typeof e==`number`)return Math.ceil(e*t*n)/n;if(typeof e!=`string`)return e;let r=e.split(re);if(r===null||!r.length)return e;let i=[],a=r.shift(),o=ie.test(a);for(;;){if(o){let e=parseFloat(a);isNaN(e)?i.push(a):i.push(Math.ceil(e*t*n)/n)}else i.push(a);if(a=r.shift(),a===void 0)return i.join(``);o=!o}}function oe(e,t=`defs`){let n=``,r=e.indexOf(`<`+t);for(;r>=0;){let i=e.indexOf(`>`,r),a=e.indexOf(`</`+t);if(i===-1||a===-1)break;let o=e.indexOf(`>`,a);if(o===-1)break;n+=e.slice(i+1,a).trim(),e=e.slice(0,r).trim()+e.slice(o+1)}return{defs:n,content:e}}function se(e,t){return e?`<defs>`+e+`</defs>`+t:t}function ce(e,t,n){let r=oe(e);return se(r.defs,t+r.content+n)}var le=e=>e===`unset`||e===`undefined`||e===`none`;function ue(e,t){let n={...c,...e},r={...T,...t},i={left:n.left,top:n.top,width:n.width,height:n.height},a=n.body;[n,r].forEach(e=>{let t=[],n=e.hFlip,r=e.vFlip,o=e.rotate;n?r?o+=2:(t.push(`translate(`+(i.width+i.left).toString()+` `+(0-i.top).toString()+`)`),t.push(`scale(-1 1)`),i.top=i.left=0):r&&(t.push(`translate(`+(0-i.left).toString()+` `+(i.height+i.top).toString()+`)`),t.push(`scale(1 -1)`),i.top=i.left=0);let s;switch(o<0&&(o-=Math.floor(o/4)*4),o%=4,o){case 1:s=i.height/2+i.top,t.unshift(`rotate(90 `+s.toString()+` `+s.toString()+`)`);break;case 2:t.unshift(`rotate(180 `+(i.width/2+i.left).toString()+` `+(i.height/2+i.top).toString()+`)`);break;case 3:s=i.width/2+i.left,t.unshift(`rotate(-90 `+s.toString()+` `+s.toString()+`)`);break}o%2==1&&(i.left!==i.top&&(s=i.left,i.left=i.top,i.top=s),i.width!==i.height&&(s=i.width,i.width=i.height,i.height=s)),t.length&&(a=ce(a,`<g transform="`+t.join(` `)+`">`,`</g>`))});let o=r.width,s=r.height,l=i.width,u=i.height,d,f;o===null?(f=s===null?`1em`:s===`auto`?u:s,d=ae(f,l/u)):(d=o===`auto`?l:o,f=s===null?ae(d,u/l):s===`auto`?u:s);let p={},m=(e,t)=>{le(t)||(p[e]=t.toString())};m(`width`,d),m(`height`,f);let h=[i.left,i.top,l,u];return p.viewBox=h.join(` `),{attributes:p,viewBox:h,body:a}}var de=/\sid="(\S+)"/g,fe=new Map;function pe(e){e=e.replace(/[0-9]+$/,``)||`a`;let t=fe.get(e)||0;return fe.set(e,t+1),t?`${e}${t}`:e}function me(e){let t=[],n;for(;n=de.exec(e);)t.push(n[1]);if(!t.length)return e;let r=`suffix`+(Math.random()*16777216|Date.now()).toString(16);return t.forEach(t=>{let n=pe(t),i=t.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`);e=e.replace(RegExp(`([#;"])(`+i+`)([")]|\\.[a-z])`,`g`),`$1`+n+r+`$3`)}),e=e.replace(new RegExp(r,`g`),``),e}var E=Object.create(null);function he(e,t){E[e]=t}function D(e){return E[e]||E[``]}function O(e){let t;if(typeof e.resources==`string`)t=[e.resources];else if(t=e.resources,!(t instanceof Array)||!t.length)return null;return{resources:t,path:e.path||`/`,maxURL:e.maxURL||500,rotate:e.rotate||750,timeout:e.timeout||5e3,random:e.random===!0,index:e.index||0,dataAfterTimeout:e.dataAfterTimeout!==!1}}for(var k=Object.create(null),A=[`https://api.simplesvg.com`,`https://api.unisvg.com`],j=[];A.length>0;)A.length===1||Math.random()>.5?j.push(A.shift()):j.push(A.pop());k[``]=O({resources:[`https://api.iconify.design`].concat(j)});function ge(e,t){let n=O(t);return n===null?!1:(k[e]=n,!0)}function M(e){return k[e]}var N=(()=>{let e;try{if(e=fetch,typeof e==`function`)return e}catch{}})();function _e(e,t){let n=M(e);if(!n)return 0;let r;if(!n.maxURL)r=0;else{let e=0;n.resources.forEach(t=>{e=Math.max(e,t.length)});let i=t+`.json?icons=`;r=n.maxURL-e-n.path.length-i.length}return r}function ve(e){return e===404}var ye=(e,t,n)=>{let r=[],i=_e(e,t),a=`icons`,o={type:a,provider:e,prefix:t,icons:[]},s=0;return n.forEach((n,c)=>{s+=n.length+1,s>=i&&c>0&&(r.push(o),o={type:a,provider:e,prefix:t,icons:[]},s=n.length),o.icons.push(n)}),r.push(o),r};function be(e){if(typeof e==`string`){let t=M(e);if(t)return t.path}return`/`}var xe={prepare:ye,send:(e,t,n)=>{if(!N){n(`abort`,424);return}let r=be(t.provider);switch(t.type){case`icons`:{let e=t.prefix,n=t.icons.join(`,`),i=new URLSearchParams({icons:n});r+=e+`.json?`+i.toString();break}case`custom`:{let e=t.uri;r+=e.slice(0,1)===`/`?e.slice(1):e;break}default:n(`abort`,400);return}let i=503;N(e+r).then(e=>{let t=e.status;if(t!==200){setTimeout(()=>{n(ve(t)?`abort`:`next`,t)});return}return i=501,e.json()}).then(e=>{if(typeof e!=`object`||!e){setTimeout(()=>{e===404?n(`abort`,e):n(`next`,i)});return}setTimeout(()=>{n(`success`,e)})}).catch(()=>{n(`next`,i)})}};function P(e,t){e.forEach(e=>{let n=e.loaderCallbacks;n&&(e.loaderCallbacks=n.filter(e=>e.id!==t))})}function Se(e){e.pendingCallbacksFlag||(e.pendingCallbacksFlag=!0,setTimeout(()=>{e.pendingCallbacksFlag=!1;let t=e.loaderCallbacks?e.loaderCallbacks.slice(0):[];if(!t.length)return;let n=!1,r=e.provider,i=e.prefix;t.forEach(t=>{let a=t.icons,o=a.pending.length;a.pending=a.pending.filter(t=>{if(t.prefix!==i)return!0;let o=t.name;if(e.icons[o])a.loaded.push({provider:r,prefix:i,name:o});else if(e.missing.has(o))a.missing.push({provider:r,prefix:i,name:o});else return n=!0,!0;return!1}),a.pending.length!==o&&(n||P([e],t.id),t.callback(a.loaded.slice(0),a.missing.slice(0),a.pending.slice(0),t.abort))})}))}var Ce=0;function we(e,t,n){let r=Ce++,i=P.bind(null,n,r);if(!t.pending.length)return i;let a={id:r,icons:t,callback:e,abort:i};return n.forEach(e=>{(e.loaderCallbacks||=[]).push(a)}),i}function Te(e){let t={loaded:[],missing:[],pending:[]},n=Object.create(null);e.sort((e,t)=>e.provider===t.provider?e.prefix===t.prefix?e.name.localeCompare(t.name):e.prefix.localeCompare(t.prefix):e.provider.localeCompare(t.provider));let r={provider:``,prefix:``,name:``};return e.forEach(e=>{if(r.name===e.name&&r.prefix===e.prefix&&r.provider===e.provider)return;r=e;let i=e.provider,a=e.prefix,o=e.name,s=n[i]||(n[i]=Object.create(null)),c=s[a]||(s[a]=y(i,a)),l;l=o in c.icons?t.loaded:a===``||c.missing.has(o)?t.missing:t.pending;let u={provider:i,prefix:a,name:o};l.push(u)}),t}function Ee(e,t=!0,n=!1){let i=[];return e.forEach(e=>{let a=typeof e==`string`?r(e,t,n):e;a&&i.push(a)}),i}var De={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function Oe(e,t,n,r){let i=e.resources.length,a=e.random?Math.floor(Math.random()*i):e.index,o;if(e.random){let t=e.resources.slice(0);for(o=[];t.length>1;){let e=Math.floor(Math.random()*t.length);o.push(t[e]),t=t.slice(0,e).concat(t.slice(e+1))}o=o.concat(t)}else o=e.resources.slice(a).concat(e.resources.slice(0,a));let s=Date.now(),c=`pending`,l=0,u,d=null,f=[],p=[];typeof r==`function`&&p.push(r);function m(){d&&=(clearTimeout(d),null)}function h(){c===`pending`&&(c=`aborted`),m(),f.forEach(e=>{e.status===`pending`&&(e.status=`aborted`)}),f=[]}function g(e,t){t&&(p=[]),typeof e==`function`&&p.push(e)}function _(){return{startTime:s,payload:t,status:c,queriesSent:l,queriesPending:f.length,subscribe:g,abort:h}}function v(){c=`failed`,p.forEach(e=>{e(void 0,u)})}function y(){f.forEach(e=>{e.status===`pending`&&(e.status=`aborted`)}),f=[]}function b(t,n,r){let i=n!==`success`;switch(f=f.filter(e=>e!==t),c){case`pending`:break;case`failed`:if(i||!e.dataAfterTimeout)return;break;default:return}if(n===`abort`){u=r,v();return}if(i){u=r,f.length||(o.length?x():v());return}if(m(),y(),!e.random){let n=e.resources.indexOf(t.resource);n!==-1&&n!==e.index&&(e.index=n)}c=`completed`,p.forEach(e=>{e(r)})}function x(){if(c!==`pending`)return;m();let r=o.shift();if(r===void 0){if(f.length){d=setTimeout(()=>{m(),c===`pending`&&(y(),v())},e.timeout);return}v();return}let i={status:`pending`,resource:r,callback:(e,t)=>{b(i,e,t)}};f.push(i),l++,d=setTimeout(x,e.rotate),n(r,t,i.callback)}return setTimeout(x),_}function ke(e){let t={...De,...e},n=[];function r(){n=n.filter(e=>e().status===`pending`)}function i(e,i,a){let o=Oe(t,e,i,(e,t)=>{r(),a&&a(e,t)});return n.push(o),o}function a(e){return n.find(t=>e(t))||null}return{query:i,find:a,setIndex:e=>{t.index=e},getIndex:()=>t.index,cleanup:r}}function Ae(){}var F=Object.create(null);function je(e){if(!F[e]){let t=M(e);if(!t)return;F[e]={config:t,redundancy:ke(t)}}return F[e]}function Me(e,t,n){let r,i;if(typeof e==`string`){let t=D(e);if(!t)return n(void 0,424),Ae;i=t.send;let a=je(e);a&&(r=a.redundancy)}else{let t=O(e);if(t){r=ke(t);let n=D(e.resources?e.resources[0]:``);n&&(i=n.send)}}return!r||!i?(n(void 0,424),Ae):r.query(t,i,n)().abort}function Ne(){}function Pe(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,Se(e)}))}function Fe(e){let t=[],r=[];return e.forEach(e=>{(e.match(n)?t:r).push(e)}),{valid:t,invalid:r}}function I(e,t,n){function r(){let n=e.pendingIcons;t.forEach(t=>{n&&n.delete(t),e.icons[t]||e.missing.add(t)})}if(n&&typeof n==`object`)try{if(!b(e,n).length){r();return}}catch(e){console.error(e)}r(),Pe(e)}function L(e,t){e instanceof Promise?e.then(e=>{t(e)}).catch(()=>{t(null)}):t(e)}function Ie(e,t){e.iconsToLoad?e.iconsToLoad=e.iconsToLoad.concat(t).sort():e.iconsToLoad=t,e.iconsQueueFlag||(e.iconsQueueFlag=!0,setTimeout(()=>{e.iconsQueueFlag=!1;let{provider:t,prefix:r}=e,i=e.iconsToLoad;if(delete e.iconsToLoad,!i||!i.length)return;let a=e.loadIcon;if(e.loadIcons&&(i.length>1||!a)){L(e.loadIcons(i,r,t),t=>{I(e,i,t)});return}if(a){i.forEach(n=>{L(a(n,r,t),t=>{I(e,[n],t?{prefix:r,icons:{[n]:t}}:null)})});return}let{valid:o,invalid:s}=Fe(i);if(s.length&&I(e,s,null),!o.length)return;let c=r.match(n)?D(t):null;if(!c){I(e,o,null);return}c.prepare(t,r,o).forEach(n=>{Me(t,n,t=>{I(e,n.icons,t)})})}))}var Le=(e,t)=>{let n=Te(Ee(e,!0,ee()));if(!n.pending.length){let e=!0;return t&&setTimeout(()=>{e&&t(n.loaded,n.missing,n.pending,Ne)}),()=>{e=!1}}let r=Object.create(null),i=[],a,o;return n.pending.forEach(e=>{let{provider:t,prefix:n}=e;if(n===o&&t===a)return;a=t,o=n,i.push(y(t,n));let s=r[t]||(r[t]=Object.create(null));s[n]||(s[n]=[])}),n.pending.forEach(e=>{let{provider:t,prefix:n,name:i}=e,a=y(t,n),o=a.pendingIcons||=new Set;o.has(i)||(o.add(i),r[t][n].push(i))}),i.forEach(e=>{let t=r[e.provider][e.prefix];t.length&&Ie(e,t)}),t?we(t,n,i):Ne};function Re(e,t){let n={...e};for(let e in t){let r=t[e],i=typeof r;e in w?(r===null||r&&(i===`string`||i===`number`))&&(n[e]=r):i===typeof n[e]&&(n[e]=e===`rotate`?r%4:r)}return n}var ze=/[\s,]+/;function Be(e,t){t.split(ze).forEach(t=>{switch(t.trim()){case`horizontal`:e.hFlip=!0;break;case`vertical`:e.vFlip=!0;break}})}function Ve(e,t=0){let n=e.replace(/^-?[0-9.]*/,``);function r(e){for(;e<0;)e+=4;return e%4}if(n===``){let t=parseInt(e);return isNaN(t)?0:r(t)}else if(n!==e){let t=0;switch(n){case`%`:t=25;break;case`deg`:t=90}if(t){let i=parseFloat(e.slice(0,e.length-n.length));return isNaN(i)?0:(i/=t,i%1==0?r(i):0)}}return t}function He(e,t){let n=e.indexOf(`xlink:`)===-1?``:` xmlns:xlink="http://www.w3.org/1999/xlink"`;for(let e in t)n+=` `+e+`="`+t[e]+`"`;return`<svg xmlns="http://www.w3.org/2000/svg"`+n+`>`+e+`</svg>`}function Ue(e){return e.replace(/"/g,`'`).replace(/%/g,`%25`).replace(/#/g,`%23`).replace(/</g,`%3C`).replace(/>/g,`%3E`).replace(/\s+/g,` `)}function We(e){return`data:image/svg+xml,`+Ue(e)}function Ge(e){return`url("`+We(e)+`")`}var R={...T,inline:!1},Ke={xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,"aria-hidden":!0,role:`img`},qe={display:`inline-block`},z={backgroundColor:`currentColor`},B={backgroundColor:`transparent`},V={Image:`var(--svg)`,Repeat:`no-repeat`,Size:`100% 100%`},H={webkitMask:z,mask:z,background:B};for(let e in H){let t=H[e];for(let n in V)t[e+n]=V[n]}var U={};[`horizontal`,`vertical`].forEach(e=>{let t=e.slice(0,1)+`Flip`;U[e+`-flip`]=t,U[e.slice(0,1)+`-flip`]=t,U[e+`Flip`]=t});function W(e){return e+(e.match(/^[-0-9.]+$/)?`px`:``)}var G=(e,n)=>{let r=Re(R,n),i={...Ke},a=n.mode||`svg`,o={},s=n.style,c=typeof s==`object`&&!(s instanceof Array)?s:{};for(let e in n){let t=n[e];if(t!==void 0)switch(e){case`icon`:case`style`:case`onLoad`:case`mode`:case`ssr`:case`customise`:break;case`inline`:case`hFlip`:case`vFlip`:r[e]=t===!0||t===`true`||t===1;break;case`flip`:typeof t==`string`&&Be(r,t);break;case`color`:o.color=t;break;case`rotate`:typeof t==`string`?r[e]=Ve(t):typeof t==`number`&&(r[e]=t);break;case`ariaHidden`:case`aria-hidden`:t!==!0&&t!==`true`&&delete i[`aria-hidden`];break;default:{let n=U[e];n?(t===!0||t===`true`||t===1)&&(r[n]=!0):R[e]===void 0&&(i[e]=t)}}}let l=ue(e,r),u=l.attributes;if(r.inline&&(o.verticalAlign=`-0.125em`),a===`svg`)return i.style={...o,...c},Object.assign(i,u),i.innerHTML=me(l.body),(0,t.h)(`svg`,i);let{body:d,width:f,height:p}=e,m=a===`mask`||(a===`bg`?!1:d.indexOf(`currentColor`)!==-1),h=He(d,{...u,width:f+``,height:p+``});return i.style={...o,"--svg":Ge(h),width:W(u.width),height:W(u.height),...qe,...m?z:B,...c},(0,t.h)(`span`,i)};if(ee(!0),he(``,xe),typeof document<`u`&&typeof window<`u`){let e=window;if(e.IconifyPreload!==void 0){let t=e.IconifyPreload,n=`Invalid IconifyPreload syntax.`;typeof t==`object`&&t&&(t instanceof Array?t:[t]).forEach(e=>{try{(typeof e!=`object`||!e||e instanceof Array||typeof e.icons!=`object`||typeof e.prefix!=`string`||!C(e))&&console.error(n)}catch{console.error(n)}})}if(e.IconifyProviders!==void 0){let t=e.IconifyProviders;if(typeof t==`object`&&t)for(let e in t){let n=`IconifyProviders[`+e+`] is invalid.`;try{let r=t[e];if(typeof r!=`object`||!r||r.resources===void 0)continue;ge(e,r)||console.error(n)}catch{console.error(n)}}}}var Je={...c,body:``},Ye=(0,t.defineComponent)((e,{emit:n})=>{let i=(0,t.ref)(null);function a(){i.value&&=(i.value.abort?.(),null)}let o=(0,t.ref)(!!e.ssr),s=(0,t.ref)(``),l=(0,t.shallowRef)(null);function u(){let o=e.icon;if(typeof o==`object`&&o&&typeof o.body==`string`)return s.value=``,{data:o};let c;if(typeof o!=`string`||(c=r(o,!1,!0))===null)return null;let l=te(c);if(!l){let e=i.value;return(!e||e.name!==o)&&(l===null?i.value={name:o}:i.value={name:o,abort:Le([c],d)}),null}a(),s.value!==o&&(s.value=o,(0,t.nextTick)(()=>{n(`load`,o)}));let u=e.customise;if(u){l=Object.assign({},l);let e=u(l.body,c.name,c.prefix,c.provider);typeof e==`string`&&(l.body=e)}let f=[`iconify`];return c.prefix!==``&&f.push(`iconify--`+c.prefix),c.provider!==``&&f.push(`iconify--`+c.provider),{data:l,classes:f}}function d(){let e=u();e?e.data!==l.value?.data&&(l.value=e):l.value=null}return o.value?d():(0,t.onMounted)(()=>{o.value=!0,d()}),(0,t.watch)(()=>e.icon,d),(0,t.onUnmounted)(a),()=>{let t=l.value;if(!t)return G(Je,e);let n=e;return t.classes&&(n={...e,class:t.classes.join(` `)}),G({...c,...t.data},n)}},{props:[`icon`,`mode`,`ssr`,`width`,`height`,`style`,`color`,`inline`,`rotate`,`hFlip`,`horizontalFlip`,`vFlip`,`verticalFlip`,`flip`,`id`,`ariaHidden`,`customise`,`title`],emits:[`load`]}),Xe={prefix:`mdi`,icons:{"alert-circle":{width:24,height:24,body:`<path fill="currentColor" d="M13 13h-2V7h2m0 10h-2v-2h2M12 2A10 10 0 0 0 2 12a10 10 0 0 0 10 10a10 10 0 0 0 10-10A10 10 0 0 0 12 2Z"/>`},"arrow-up":{width:24,height:24,body:`<path fill="currentColor" d="M13 20h-2V8l-5.5 5.5l-1.42-1.42L12 4.16l7.92 7.92l-1.42 1.42L13 8v12Z"/>`},"calendar-outline":{width:24,height:24,body:`<path fill="currentColor" d="M12 12h5v5h-5v-5m7-9h-1V1h-2v2H8V1H6v2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m0 2v2H5V5h14M5 19V9h14v10H5Z"/>`},check:{width:24,height:24,body:`<path fill="currentColor" d="M21 7L9 19l-5.5-5.5l1.41-1.41L9 16.17L19.59 5.59L21 7Z"/>`},"check-circle":{width:24,height:24,body:`<path fill="currentColor" d="M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10s10-4.5 10-10S17.5 2 12 2m-2 15l-5-5l1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9Z"/>`},"chevron-right":{width:24,height:24,body:`<path fill="currentColor" d="M8.59 16.58L13.17 12L8.59 7.41L10 6l6 6l-6 6l-1.41-1.42Z"/>`},"clock-outline":{width:24,height:24,body:`<path fill="currentColor" d="M12 20a8 8 0 0 0 8-8a8 8 0 0 0-8-8a8 8 0 0 0-8 8a8 8 0 0 0 8 8m0-18a10 10 0 0 1 10 10a10 10 0 0 1-10 10C6.47 22 2 17.5 2 12A10 10 0 0 1 12 2m.5 5v5.25l4.5 2.67l-.75 1.23L11 13V7h1.5Z"/>`},close:{width:24,height:24,body:`<path fill="currentColor" d="M19 6.41L17.59 5L12 10.59L6.41 5L5 6.41L10.59 12L5 17.59L6.41 19L12 13.41L17.59 19L19 17.59L13.41 12L19 6.41Z"/>`},"close-circle":{width:24,height:24,body:`<path fill="currentColor" d="M12 2c5.53 0 10 4.47 10 10s-4.47 10-10 10S2 17.53 2 12S6.47 2 12 2m3.59 5L12 10.59L8.41 7L7 8.41L10.59 12L7 15.59L8.41 17L12 13.41L15.59 17L17 15.59L13.41 12L17 8.41L15.59 7Z"/>`},"content-copy":{width:24,height:24,body:`<path fill="currentColor" d="M19 21H8V7h11m0-2H8a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h11a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2m-3-4H4a2 2 0 0 0-2 2v14h2V3h12V1Z"/>`},loading:{width:24,height:24,body:`<path fill="currentColor" d="M12 4V2A10 10 0 0 0 2 12h2a8 8 0 0 1 8-8Z"/>`},magnify:{width:24,height:24,body:`<path fill="currentColor" d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5l-1.5 1.5l-5-5v-.79l-.27-.27A6.516 6.516 0 0 1 9.5 16A6.5 6.5 0 0 1 3 9.5A6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14S14 12 14 9.5S12 5 9.5 5Z"/>`},"menu-down":{width:24,height:24,body:`<path fill="currentColor" d="m7 10l5 5l5-5H7Z"/>`},"menu-right":{width:24,height:24,body:`<path fill="currentColor" d="m10 17l5-5l-5-5v10Z"/>`}}},Ze=!1;function Qe(){Ze||=(C(Xe),!0)}Qe();function $e(e){return e.includes(`:`)}function et(e){return e?typeof e==`string`?$e(e)?(0,t.h)(Ye,{icon:e}):(0,t.h)(`i`,{class:e}):e:null}function K(e,t,n){let r=e;return t&&(r+=`__${t}`),n&&(r+=`--${n}`),r}function tt(e,t=!1){let n=t?`.ccui-${e}`:`ccui-${e}`;return{b:()=>K(n),e:e=>e?K(n,e):``,m:e=>e?K(n,``,e):``,em:(e,t)=>e&&t?K(n,e,t):``,is:e=>`is-${e}`}}var nt={id:{type:String,required:!0},content:{type:[String,Object],default:``},type:{type:String,default:`info`},duration:{type:Number,default:3e3},showClose:{type:Boolean,default:!1},icon:{type:String,default:``},customClass:{type:String,default:``},role:{type:String,default:`alert`},pauseOnHover:{type:Boolean,default:!0},classNames:{type:Object,default:void 0},styles:{type:Object,default:void 0}},rt={info:`ⓘ`,success:`mdi:check-circle`,warning:`!`,error:`mdi:close-circle`,loading:`⟳`};function it(e){let t=rt[e];return t?t.includes(`:`)?et(t)??t:t:null}var q=(0,t.defineComponent)({name:`CMessageItem`,props:nt,emits:[`close`,`destroy`],setup(e,{emit:n,slots:r}){let i=tt(`message`),a=(0,t.ref)(!1),o=null,s=()=>{e.duration>0&&(o=window.setTimeout(l,e.duration))},c=()=>{o!==null&&(clearTimeout(o),o=null)},l=()=>{a.value=!1,n(`close`)},u=()=>{n(`destroy`)},d=()=>{e.pauseOnHover&&c()},f=()=>{e.pauseOnHover&&s()};return(0,t.onMounted)(()=>{a.value=!0,s()}),(0,t.onBeforeUnmount)(()=>c()),()=>(0,t.createVNode)(t.Transition,{name:`${i.b()}-fade`,onAfterLeave:u},{default:()=>[a.value&&(0,t.createVNode)(`div`,{class:[i.e(`item`),i.em(`item`,e.type),e.customClass,e.classNames?.root],style:e.styles?.root,role:e.role,"aria-live":e.role===`alert`?`assertive`:`polite`,onMouseenter:d,onMouseleave:f},[(0,t.createVNode)(`div`,{class:i.e(`inner`)},[(0,t.createVNode)(`span`,{class:[i.e(`icon`),i.em(`icon`,e.type),e.classNames?.icon],style:e.styles?.icon},[e.icon?(0,t.createVNode)(`i`,{class:e.icon},null):it(e.type)]),(0,t.createVNode)(`span`,{class:[i.e(`content`),e.classNames?.content],style:e.styles?.content},[r.default?r.default():e.content]),e.showClose&&(0,t.createVNode)(`button`,{class:i.e(`close`),onClick:l,"aria-label":`Close`},[(0,t.createTextVNode)(`×`)])])])]})}}),at=[`top`,`topLeft`,`topRight`,`bottom`,`bottomLeft`,`bottomRight`],ot=0,J=new Map,Y=new Map,X=(0,t.reactive)({top:[],topLeft:[],topRight:[],bottom:[],bottomLeft:[],bottomRight:[]}),Z={duration:3,maxCount:1/0,stack:!1,pauseOnHover:!0,role:`alert`};function st(e,t){let n=e===void 0?t:e;return n===0?0:n>100?n:n*1e3}function ct(e){if(J.has(e))return;let n=document.createElement(`div`);n.className=`ccui-message ccui-message--${e}`,Z.stack&&n.classList.add(`ccui-message--stack`),(e===`top`||e.startsWith(`top`))&&Z.top!==void 0&&(n.style.top=typeof Z.top==`number`?`${Z.top}px`:Z.top),(e===`bottom`||e.startsWith(`bottom`))&&Z.bottom!==void 0&&(n.style.bottom=typeof Z.bottom==`number`?`${Z.bottom}px`:Z.bottom),(Z.getContainer?Z.getContainer():document.body).appendChild(n),J.set(e,n);let r=(0,t.createApp)({name:`CMessageContainer-${e}`,setup(){let n=t=>{let n=X[e],r=n.findIndex(e=>e.id===t);r!==-1&&n.splice(r,1)};return()=>X[e].map(e=>(0,t.h)(q,{key:e.id,id:e.id,content:e.options.content,type:e.options.type??`info`,duration:st(e.options.duration,Z.duration??3),showClose:e.options.showClose??!1,icon:e.options.icon??``,customClass:e.options.customClass??``,role:e.options.role??Z.role??`alert`,pauseOnHover:e.options.pauseOnHover??Z.pauseOnHover??!0,classNames:e.options.classNames,styles:e.options.styles,onClose:()=>e.options.onClose?.(),onDestroy:()=>n(e.id)}))}});r.mount(n),Y.set(e,r)}function lt(e){let t=Z.maxCount??1/0;if(!isFinite(t)||t<=0)return;let n=X[e];for(;n.length>t;)n.shift()}function ut(e){let t=e.placement??`top`;ct(t);let n=`msg-${++ot}`;return X[t].push({id:n,options:e}),lt(t),{close:()=>{let e=X[t],r=e.findIndex(e=>e.id===n);r!==-1&&e.splice(r,1)}}}function Q(e){return(t,n)=>ut(typeof t==`string`?{content:t,type:e,duration:n}:{...t,type:e})}var $={open:ut,info:Q(`info`),success:Q(`success`),warning:Q(`warning`),error:Q(`error`),loading:Q(`loading`),config(e){Object.assign(Z,e),J.forEach(e=>{Z.stack?e.classList.add(`ccui-message--stack`):e.classList.remove(`ccui-message--stack`)})},destroy(){at.forEach(e=>{X[e].splice(0,X[e].length);let t=Y.get(e),n=J.get(e);t&&(t.unmount(),Y.delete(e)),n&&(n.remove(),J.delete(e))})}},dt=[`top`,`topLeft`,`topRight`,`bottom`,`bottomLeft`,`bottomRight`];function ft(e,t){let n=e===void 0?t:e;return n===0?0:n>100?n:n*1e3}var pt=0;function mt(){let e=`use-msg-${++pt}`,n=0,r=(0,t.reactive)({top:[],topLeft:[],topRight:[],bottom:[],bottomLeft:[],bottomRight:[]}),i={duration:3,maxCount:1/0,stack:!1,pauseOnHover:!0,role:`alert`};function a(e){let t=i.maxCount??1/0;if(!isFinite(t)||t<=0)return;let n=r[e];for(;n.length>t;)n.shift()}function o(t){let i=t.placement??`top`,o=`${e}-${++n}`;return r[i].push({id:o,options:t}),a(i),{close:()=>{let e=r[i],t=e.findIndex(e=>e.id===o);t!==-1&&e.splice(t,1)}}}function s(e){return(t,n)=>o(typeof t==`string`?{content:t,type:e,duration:n}:{...t,type:e})}return{message:{open:o,info:s(`info`),success:s(`success`),warning:s(`warning`),error:s(`error`),loading:s(`loading`),config(e){Object.assign(i,e)},destroy(){dt.forEach(e=>{r[e].splice(0,r[e].length)})}},holder:(0,t.defineComponent)({name:`CMessageHolder`,setup(){let e=(e,t)=>{let n=r[e],i=n.findIndex(e=>e.id===t);i!==-1&&n.splice(i,1)};return()=>{let n=dt.filter(e=>r[e].length>0).map(n=>{let a={};return(n===`top`||n.startsWith(`top`))&&i.top!==void 0&&(a.top=typeof i.top==`number`?`${i.top}px`:String(i.top)),(n===`bottom`||n.startsWith(`bottom`))&&i.bottom!==void 0&&(a.bottom=typeof i.bottom==`number`?`${i.bottom}px`:String(i.bottom)),(0,t.h)(`div`,{key:n,class:[`ccui-message`,`ccui-message--${n}`,i.stack&&`ccui-message--stack`],style:a},r[n].map(r=>(0,t.h)(q,{key:r.id,id:r.id,content:r.options.content,type:r.options.type??`info`,duration:ft(r.options.duration,i.duration??3),showClose:r.options.showClose??!1,icon:r.options.icon??``,customClass:r.options.customClass??``,role:r.options.role??i.role??`alert`,pauseOnHover:r.options.pauseOnHover??i.pauseOnHover??!0,classNames:r.options.classNames,styles:r.options.styles,onClose:()=>r.options.onClose?.(),onDestroy:()=>e(n,r.id)})))});return n.length===0?null:(0,t.h)(t.Teleport,{to:i.getContainer?i.getContainer():`body`},n)}}})}}e.Message=$,e.default={title:`Message 全局提示`,category:`反馈`,status:`100%`,install(e){e.config.globalProperties.$message=$}},e.message=$,e.useMessage=mt});