System.register(["./index-legacy-69c33129.js"],(function(e,t){"use strict";var o,r,n,a,l,s,c,i,u,f,d,g,p,b,m,y,h,w,v;return{setters:[e=>{o=e.y,r=e.E,n=e.d,a=e.I,l=e.r,s=e.ag,c=e.a2,i=e.n,u=e.ac,f=e.j,d=e.au,g=e.aA,p=e.a,b=e.V,m=e.a8,y=e.as,h=e.X,w=e.ah,v=e.w}],execute:function(){const[t,k]=o("notice-bar"),x={text:String,mode:String,color:String,delay:r(1),speed:r(60),leftIcon:String,wrapable:Boolean,background:String,scrollable:{type:Boolean,"default":null}};var S=n({name:t,props:x,emits:["close","replay"],setup(e,{emit:t,slots:o}){let r,n=0,v=0;const x=a(),S=a(),j=l({show:!0,offset:0,duration:0}),A=o=>{"closeable"===e.mode&&(j.show=!1,t("close",o))},I=()=>{if(o["right-icon"])return o["right-icon"]();const t="closeable"===e.mode?"cross":"link"===e.mode?"arrow":void 0;return t?p(b,{name:t,"class":k("right-icon"),onClick:A},null):void 0},T=()=>{j.offset=n,j.duration=0,h((()=>{y((()=>{j.offset=-v,j.duration=(v+n)/+e.speed,t("replay")}))}))},B=()=>{const t=!1===e.scrollable&&!e.wrapable,r={transform:j.offset?`translateX(${j.offset}px)`:"",transitionDuration:`${j.duration}s`};return p("div",{ref:x,role:"marquee","class":k("wrap")},[p("div",{ref:S,style:r,"class":[k("content"),{"van-ellipsis":t}],onTransitionend:T},[o["default"]?o["default"]():e.text])])},E=()=>{const{delay:t,speed:o,scrollable:a}=e,l=w(t)?1e3*+t:0;n=0,v=0,j.offset=0,j.duration=0,clearTimeout(r),r=setTimeout((()=>{if(!x.value||!S.value||!1===a)return;const e=m(x).width,t=m(S).width;(a||t>e)&&y((()=>{n=e,v=t,j.offset=-v,j.duration=v/+o}))}),l)};return s(E),c(E),i("pageshow",E),u({reset:E}),f((()=>[e.text,e.scrollable]),E),()=>{const{color:t,wrapable:r,background:n}=e;return d(p("div",{role:"alert","class":k({wrapable:r}),style:{color:t,background:n}},[o["left-icon"]?o["left-icon"]():e.leftIcon?p(b,{"class":k("left-icon"),name:e.leftIcon},null):void 0,B(),I()]),[[g,j.show]])}}});e("N",v(S));const j=e("d",(e=>{if(null===e)return null;const t=Object.assign({},e);return Object.keys(t).forEach((o=>t[o]="object"==typeof e[o]?j(e[o]):e[o])),Array.isArray(e)?(t.length=e.length,Array.from(t)):t}))}}}));
