UNPKG

@moohng/dui

Version:

基于 Vue 3 的轻量级组件库

2 lines (1 loc) 23.9 kB
this.actionsheet=function(t){"use strict";var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};var n,r=function(t){return t&&t.Math==Math&&t},o=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof e&&e)||function(){return this}()||Function("return this")(),i=function(t){try{return!!t()}catch(t){return!0}},c=!i((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),u={}.propertyIsEnumerable,a=Object.getOwnPropertyDescriptor,s={f:a&&!u.call({1:2},1)?function(t){var e=a(this,t);return!!e&&e.enumerable}:u},l=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},f={}.toString,p=function(t){return f.call(t).slice(8,-1)},d="".split,v=i((function(){return!Object("z").propertyIsEnumerable(0)}))?function(t){return"String"==p(t)?d.call(t,""):Object(t)}:Object,h=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t},y=function(t){return v(h(t))},g=function(t){return"object"==typeof t?null!==t:"function"==typeof t},m=function(t,e){if(!g(t))return t;var n,r;if(e&&"function"==typeof(n=t.toString)&&!g(r=n.call(t)))return r;if("function"==typeof(n=t.valueOf)&&!g(r=n.call(t)))return r;if(!e&&"function"==typeof(n=t.toString)&&!g(r=n.call(t)))return r;throw TypeError("Can't convert object to primitive value")},b={}.hasOwnProperty,w=function(t,e){return b.call(t,e)},S=o.document,j=g(S)&&g(S.createElement),k=function(t){return j?S.createElement(t):{}},T=!c&&!i((function(){return 7!=Object.defineProperty(k("div"),"a",{get:function(){return 7}}).a})),O=Object.getOwnPropertyDescriptor,C={f:c?O:function(t,e){if(t=y(t),e=m(e,!0),T)try{return O(t,e)}catch(t){}if(w(t,e))return l(!s.f.call(t,e),t[e])}},E=/#|\.prototype\./,P=function(t,e){var n=_[A(t)];return n==L||n!=x&&("function"==typeof e?i(e):!!e)},A=P.normalize=function(t){return String(t).replace(E,".").toLowerCase()},_=P.data={},x=P.NATIVE="N",L=P.POLYFILL="P",I=P,M={},N=function(t){if("function"!=typeof t)throw TypeError(String(t)+" is not a function");return t},B=function(t,e,n){if(N(t),void 0===e)return t;switch(n){case 0:return function(){return t.call(e)};case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,o){return t.call(e,n,r,o)}}return function(){return t.apply(e,arguments)}},D=function(t){if(!g(t))throw TypeError(String(t)+" is not an object");return t},F=Object.defineProperty,R={f:c?F:function(t,e,n){if(D(t),e=m(e,!0),D(n),T)try{return F(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},V=c?function(t,e,n){return R.f(t,e,l(1,n))}:function(t,e,n){return t[e]=n,t},G=C.f,z=function(t){var e=function(e,n,r){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(e);case 2:return new t(e,n)}return new t(e,n,r)}return t.apply(this,arguments)};return e.prototype=t.prototype,e},q=function(t,e){var n,r,i,c,u,a,s,l,f=t.target,p=t.global,d=t.stat,v=t.proto,h=p?o:d?o[f]:(o[f]||{}).prototype,y=p?M:M[f]||(M[f]={}),g=y.prototype;for(i in e)n=!I(p?i:f+(d?".":"#")+i,t.forced)&&h&&w(h,i),u=y[i],n&&(a=t.noTargetGet?(l=G(h,i))&&l.value:h[i]),c=n&&a?a:e[i],n&&typeof u==typeof c||(s=t.bind&&n?B(c,o):t.wrap&&n?z(c):v&&"function"==typeof c?B(Function.call,c):c,(t.sham||c&&c.sham||u&&u.sham)&&V(s,"sham",!0),y[i]=s,v&&(w(M,r=f+"Prototype")||V(M,r,{}),M[r][i]=c,t.real&&g&&!g[i]&&V(g,i,c)))},H=o["__core-js_shared__"]||function(t,e){try{V(o,t,e)}catch(n){o[t]=e}return e}("__core-js_shared__",{}),U=function(t,e,n){return t(n={path:e,exports:{},require:function(t,e){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==e&&n.path)}},n.exports),n.exports}((function(t){(t.exports=function(t,e){return H[t]||(H[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.7.0",mode:"pure",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})})),W=0,$=Math.random(),Y=function(t){return"Symbol("+String(void 0===t?"":t)+")_"+(++W+$).toString(36)},K=U("keys"),X=function(t){return K[t]||(K[t]=Y(t))},J=!i((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype})),Q=X("IE_PROTO"),Z=Object.prototype,tt=J?Object.getPrototypeOf:function(t){return t=Object(h(t)),w(t,Q)?t[Q]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?Z:null},et=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,n={};try{(t=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(n,[]),e=n instanceof Array}catch(t){}return function(n,r){return D(n),function(t){if(!g(t)&&null!==t)throw TypeError("Can't set "+String(t)+" as a prototype")}(r),e?t.call(n,r):n.__proto__=r,n}}():void 0),nt=Math.ceil,rt=Math.floor,ot=function(t){return isNaN(t=+t)?0:(t>0?rt:nt)(t)},it=Math.min,ct=function(t){return t>0?it(ot(t),9007199254740991):0},ut=Math.max,at=Math.min,st=function(t){return function(e,n,r){var o,i=y(e),c=ct(i.length),u=function(t,e){var n=ot(t);return n<0?ut(n+e,0):at(n,e)}(r,c);if(t&&n!=n){for(;c>u;)if((o=i[u++])!=o)return!0}else for(;c>u;u++)if((t||u in i)&&i[u]===n)return t||u||0;return!t&&-1}},lt={includes:st(!0),indexOf:st(!1)},ft={},pt=lt.indexOf,dt=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],vt=Object.keys||function(t){return function(t,e){var n,r=y(t),o=0,i=[];for(n in r)!w(ft,n)&&w(r,n)&&i.push(n);for(;e.length>o;)w(r,n=e[o++])&&(~pt(i,n)||i.push(n));return i}(t,dt)},ht=c?Object.defineProperties:function(t,e){D(t);for(var n,r=vt(e),o=r.length,i=0;o>i;)R.f(t,n=r[i++],e[n]);return t},yt=function(t){return"function"==typeof t?t:void 0},gt=function(t,e){return arguments.length<2?yt(M[t])||yt(o[t]):M[t]&&M[t][e]||o[t]&&o[t][e]},mt=gt("document","documentElement"),bt=X("IE_PROTO"),wt=function(){},St=function(t){return"<script>"+t+"<\/script>"},jt=function(){try{n=document.domain&&new ActiveXObject("htmlfile")}catch(t){}var t,e;jt=n?function(t){t.write(St("")),t.close();var e=t.parentWindow.Object;return t=null,e}(n):((e=k("iframe")).style.display="none",mt.appendChild(e),e.src=String("javascript:"),(t=e.contentWindow.document).open(),t.write(St("document.F=Object")),t.close(),t.F);for(var r=dt.length;r--;)delete jt.prototype[dt[r]];return jt()};ft[bt]=!0;var kt=Object.create||function(t,e){var n;return null!==t?(wt.prototype=D(t),n=new wt,wt.prototype=null,n[bt]=t):n=jt(),void 0===e?n:ht(n,e)},Tt=!!Object.getOwnPropertySymbols&&!i((function(){return!String(Symbol())})),Ot=Tt&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,Ct=U("wks"),Et=o.Symbol,Pt=Ot?Et:Et&&Et.withoutSetter||Y,At=function(t){return w(Ct,t)||(Tt&&w(Et,t)?Ct[t]=Et[t]:Ct[t]=Pt("Symbol."+t)),Ct[t]},_t={},xt=At("iterator"),Lt=Array.prototype,It={};It[At("toStringTag")]="z";var Mt="[object z]"===String(It),Nt=At("toStringTag"),Bt="Arguments"==p(function(){return arguments}()),Dt=Mt?p:function(t){var e,n,r;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),Nt))?n:Bt?p(e):"Object"==(r=p(e))&&"function"==typeof e.callee?"Arguments":r},Ft=At("iterator"),Rt=function(t){var e=t.return;if(void 0!==e)return D(e.call(t)).value},Vt=function(t,e){this.stopped=t,this.result=e},Gt=function(t,e,n){var r,o,i,c,u,a,s,l,f=n&&n.that,p=!(!n||!n.AS_ENTRIES),d=!(!n||!n.IS_ITERATOR),v=!(!n||!n.INTERRUPTED),h=B(e,f,1+p+v),y=function(t){return r&&Rt(r),new Vt(!0,t)},g=function(t){return p?(D(t),v?h(t[0],t[1],y):h(t[0],t[1])):v?h(t,y):h(t)};if(d)r=t;else{if("function"!=typeof(o=function(t){if(null!=t)return t[Ft]||t["@@iterator"]||_t[Dt(t)]}(t)))throw TypeError("Target is not iterable");if(void 0!==(l=o)&&(_t.Array===l||Lt[xt]===l)){for(i=0,c=ct(t.length);c>i;i++)if((u=g(t[i]))&&u instanceof Vt)return u;return new Vt(!1)}r=o.call(t)}for(a=r.next;!(s=a.call(r)).done;){try{u=g(s.value)}catch(t){throw Rt(r),t}if("object"==typeof u&&u&&u instanceof Vt)return u}return new Vt(!1)},zt=function(t,e){var n=this;if(!(n instanceof zt))return new zt(t,e);et&&(n=et(new Error(void 0),tt(n))),void 0!==e&&V(n,"message",String(e));var r=[];return Gt(t,r.push,{that:r}),V(n,"errors",r),n};zt.prototype=kt(Error.prototype,{constructor:l(5,zt),message:l(5,""),name:l(5,"AggregateError")}),q({global:!0},{AggregateError:zt});var qt=Object.freeze({__proto__:null}),Ht=o.Promise,Ut=function(t,e,n,r){r&&r.enumerable?t[e]=n:V(t,e,n)},Wt=Mt?{}.toString:function(){return"[object "+Dt(this)+"]"},$t=R.f,Yt=At("toStringTag"),Kt=function(t,e,n,r){if(t){var o=n?t:t.prototype;w(o,Yt)||$t(o,Yt,{configurable:!0,value:e}),r&&!Mt&&V(o,"toString",Wt)}},Xt=At("species"),Jt=Function.toString;"function"!=typeof H.inspectSource&&(H.inspectSource=function(t){return Jt.call(t)});var Qt=H.inspectSource,Zt=At("iterator"),te=!1;try{var ee=0,ne={next:function(){return{done:!!ee++}},return:function(){te=!0}};ne[Zt]=function(){return this},Array.from(ne,(function(){throw 2}))}catch(t){}var re,oe,ie,ce=At("species"),ue=function(t,e){var n,r=D(t).constructor;return void 0===r||null==(n=D(r)[ce])?e:N(n)},ae=gt("navigator","userAgent")||"",se=/(iphone|ipod|ipad).*applewebkit/i.test(ae),le="process"==p(o.process),fe=o.location,pe=o.setImmediate,de=o.clearImmediate,ve=o.process,he=o.MessageChannel,ye=o.Dispatch,ge=0,me={},be=function(t){if(me.hasOwnProperty(t)){var e=me[t];delete me[t],e()}},we=function(t){return function(){be(t)}},Se=function(t){be(t.data)},je=function(t){o.postMessage(t+"",fe.protocol+"//"+fe.host)};pe&&de||(pe=function(t){for(var e=[],n=1;arguments.length>n;)e.push(arguments[n++]);return me[++ge]=function(){("function"==typeof t?t:Function(t)).apply(void 0,e)},re(ge),ge},de=function(t){delete me[t]},le?re=function(t){ve.nextTick(we(t))}:ye&&ye.now?re=function(t){ye.now(we(t))}:he&&!se?(ie=(oe=new he).port2,oe.port1.onmessage=Se,re=B(ie.postMessage,ie,1)):o.addEventListener&&"function"==typeof postMessage&&!o.importScripts&&fe&&"file:"!==fe.protocol&&!i(je)?(re=je,o.addEventListener("message",Se,!1)):re="onreadystatechange"in k("script")?function(t){mt.appendChild(k("script")).onreadystatechange=function(){mt.removeChild(this),be(t)}}:function(t){setTimeout(we(t),0)});var ke,Te,Oe,Ce,Ee,Pe,Ae,_e,xe={set:pe,clear:de},Le=C.f,Ie=xe.set,Me=o.MutationObserver||o.WebKitMutationObserver,Ne=o.document,Be=o.process,De=o.Promise,Fe=Le(o,"queueMicrotask"),Re=Fe&&Fe.value;Re||(ke=function(){var t,e;for(le&&(t=Be.domain)&&t.exit();Te;){e=Te.fn,Te=Te.next;try{e()}catch(t){throw Te?Ce():Oe=void 0,t}}Oe=void 0,t&&t.enter()},!se&&!le&&Me&&Ne?(Ee=!0,Pe=Ne.createTextNode(""),new Me(ke).observe(Pe,{characterData:!0}),Ce=function(){Pe.data=Ee=!Ee}):De&&De.resolve?(Ae=De.resolve(void 0),_e=Ae.then,Ce=function(){_e.call(Ae,ke)}):Ce=le?function(){Be.nextTick(ke)}:function(){Ie.call(o,ke)});var Ve,Ge,ze,qe=Re||function(t){var e={fn:t,next:void 0};Oe&&(Oe.next=e),Te||(Te=e,Ce()),Oe=e},He=function(t){var e,n;this.promise=new t((function(t,r){if(void 0!==e||void 0!==n)throw TypeError("Bad Promise constructor");e=t,n=r})),this.resolve=N(e),this.reject=N(n)},Ue={f:function(t){return new He(t)}},We=function(t,e){if(D(t),g(e)&&e.constructor===t)return e;var n=Ue.f(t);return(0,n.resolve)(e),n.promise},$e=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}},Ye=o.WeakMap,Ke="function"==typeof Ye&&/native code/.test(Qt(Ye)),Xe=o.WeakMap;if(Ke){var Je=H.state||(H.state=new Xe),Qe=Je.get,Ze=Je.has,tn=Je.set;Ve=function(t,e){return e.facade=t,tn.call(Je,t,e),e},Ge=function(t){return Qe.call(Je,t)||{}},ze=function(t){return Ze.call(Je,t)}}else{var en=X("state");ft[en]=!0,Ve=function(t,e){return e.facade=t,V(t,en,e),e},Ge=function(t){return w(t,en)?t[en]:{}},ze=function(t){return w(t,en)}}var nn,rn,on={set:Ve,get:Ge,has:ze,enforce:function(t){return ze(t)?Ge(t):Ve(t,{})},getterFor:function(t){return function(e){var n;if(!g(e)||(n=Ge(e)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return n}}},cn=o.process,un=cn&&cn.versions,an=un&&un.v8;an?rn=(nn=an.split("."))[0]+nn[1]:ae&&(!(nn=ae.match(/Edge\/(\d+)/))||nn[1]>=74)&&(nn=ae.match(/Chrome\/(\d+)/))&&(rn=nn[1]);var sn,ln,fn,pn=rn&&+rn,dn=xe.set,vn=At("species"),hn="Promise",yn=on.get,gn=on.set,mn=on.getterFor(hn),bn=Ht,wn=o.TypeError,Sn=o.document,jn=o.process,kn=(gt("fetch"),Ue.f),Tn=kn,On=!!(Sn&&Sn.createEvent&&o.dispatchEvent),Cn="function"==typeof PromiseRejectionEvent,En=I(hn,(function(){if(!(Qt(bn)!==String(bn))){if(66===pn)return!0;if(!le&&!Cn)return!0}if(!bn.prototype.finally)return!0;if(pn>=51&&/native code/.test(bn))return!1;var t=bn.resolve(1),e=function(t){t((function(){}),(function(){}))};return(t.constructor={})[vn]=e,!(t.then((function(){}))instanceof e)})),Pn=En||!function(t,e){if(!e&&!te)return!1;var n=!1;try{var r={};r[Zt]=function(){return{next:function(){return{done:n=!0}}}},t(r)}catch(t){}return n}((function(t){bn.all(t).catch((function(){}))})),An=function(t){var e;return!(!g(t)||"function"!=typeof(e=t.then))&&e},_n=function(t,e){if(!t.notified){t.notified=!0;var n=t.reactions;qe((function(){for(var r=t.value,o=1==t.state,i=0;n.length>i;){var c,u,a,s=n[i++],l=o?s.ok:s.fail,f=s.resolve,p=s.reject,d=s.domain;try{l?(o||(2===t.rejection&&Mn(t),t.rejection=1),!0===l?c=r:(d&&d.enter(),c=l(r),d&&(d.exit(),a=!0)),c===s.promise?p(wn("Promise-chain cycle")):(u=An(c))?u.call(c,f,p):f(c)):p(r)}catch(t){d&&!a&&d.exit(),p(t)}}t.reactions=[],t.notified=!1,e&&!t.rejection&&Ln(t)}))}},xn=function(t,e,n){var r,i;On?((r=Sn.createEvent("Event")).promise=e,r.reason=n,r.initEvent(t,!1,!0),o.dispatchEvent(r)):r={promise:e,reason:n},!Cn&&(i=o["on"+t])?i(r):"unhandledrejection"===t&&function(t,e){var n=o.console;n&&n.error&&(1===arguments.length?n.error(t):n.error(t,e))}("Unhandled promise rejection",n)},Ln=function(t){dn.call(o,(function(){var e,n=t.facade,r=t.value;if(In(t)&&(e=$e((function(){le?jn.emit("unhandledRejection",r,n):xn("unhandledrejection",n,r)})),t.rejection=le||In(t)?2:1,e.error))throw e.value}))},In=function(t){return 1!==t.rejection&&!t.parent},Mn=function(t){dn.call(o,(function(){var e=t.facade;le?jn.emit("rejectionHandled",e):xn("rejectionhandled",e,t.value)}))},Nn=function(t,e,n){return function(r){t(e,r,n)}},Bn=function(t,e,n){t.done||(t.done=!0,n&&(t=n),t.value=e,t.state=2,_n(t,!0))},Dn=function(t,e,n){if(!t.done){t.done=!0,n&&(t=n);try{if(t.facade===e)throw wn("Promise can't be resolved itself");var r=An(e);r?qe((function(){var n={done:!1};try{r.call(e,Nn(Dn,n,t),Nn(Bn,n,t))}catch(e){Bn(n,e,t)}})):(t.value=e,t.state=1,_n(t,!1))}catch(e){Bn({done:!1},e,t)}}};En&&(bn=function(t){!function(t,e,n){if(!(t instanceof e))throw TypeError("Incorrect "+(n?n+" ":"")+"invocation")}(this,bn,hn),N(t),sn.call(this);var e=yn(this);try{t(Nn(Dn,e),Nn(Bn,e))}catch(t){Bn(e,t)}},(sn=function(t){gn(this,{type:hn,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=function(t,e,n){for(var r in e)n&&n.unsafe&&t[r]?t[r]=e[r]:Ut(t,r,e[r],n);return t}(bn.prototype,{then:function(t,e){var n=mn(this),r=kn(ue(this,bn));return r.ok="function"!=typeof t||t,r.fail="function"==typeof e&&e,r.domain=le?jn.domain:void 0,n.parent=!0,n.reactions.push(r),0!=n.state&&_n(n,!1),r.promise},catch:function(t){return this.then(void 0,t)}}),ln=function(){var t=new sn,e=yn(t);this.promise=t,this.resolve=Nn(Dn,e),this.reject=Nn(Bn,e)},Ue.f=kn=function(t){return t===bn||t===fn?new ln(t):Tn(t)}),q({global:!0,wrap:!0,forced:En},{Promise:bn}),Kt(bn,hn,!1,!0),function(t){var e=gt(t),n=R.f;c&&e&&!e[Xt]&&n(e,Xt,{configurable:!0,get:function(){return this}})}(hn),fn=gt(hn),q({target:hn,stat:!0,forced:En},{reject:function(t){var e=kn(this);return e.reject.call(void 0,t),e.promise}}),q({target:hn,stat:!0,forced:!0},{resolve:function(t){return We(this===fn?bn:this,t)}}),q({target:hn,stat:!0,forced:Pn},{all:function(t){var e=this,n=kn(e),r=n.resolve,o=n.reject,i=$e((function(){var n=N(e.resolve),i=[],c=0,u=1;Gt(t,(function(t){var a=c++,s=!1;i.push(void 0),u++,n.call(e,t).then((function(t){s||(s=!0,i[a]=t,--u||r(i))}),o)})),--u||r(i)}));return i.error&&o(i.value),n.promise},race:function(t){var e=this,n=kn(e),r=n.reject,o=$e((function(){var o=N(e.resolve);Gt(t,(function(t){o.call(e,t).then(n.resolve,r)}))}));return o.error&&r(o.value),n.promise}}),q({target:"Promise",stat:!0},{allSettled:function(t){var e=this,n=Ue.f(e),r=n.resolve,o=n.reject,i=$e((function(){var n=N(e.resolve),o=[],i=0,c=1;Gt(t,(function(t){var u=i++,a=!1;o.push(void 0),c++,n.call(e,t).then((function(t){a||(a=!0,o[u]={status:"fulfilled",value:t},--c||r(o))}),(function(t){a||(a=!0,o[u]={status:"rejected",reason:t},--c||r(o))}))})),--c||r(o)}));return i.error&&o(i.value),n.promise}});q({target:"Promise",stat:!0},{any:function(t){var e=this,n=Ue.f(e),r=n.resolve,o=n.reject,i=$e((function(){var n=N(e.resolve),i=[],c=0,u=1,a=!1;Gt(t,(function(t){var s=c++,l=!1;i.push(void 0),u++,n.call(e,t).then((function(t){l||a||(a=!0,r(t))}),(function(t){l||a||(l=!0,i[s]=t,--u||o(new(gt("AggregateError"))(i,"No one promise resolved")))}))})),--u||o(new(gt("AggregateError"))(i,"No one promise resolved"))}));return i.error&&o(i.value),n.promise}});var Fn=!!Ht&&i((function(){Ht.prototype.finally.call({then:function(){}},(function(){}))}));q({target:"Promise",proto:!0,real:!0,forced:Fn},{finally:function(t){var e=ue(this,gt("Promise")),n="function"==typeof t;return this.then(n?function(n){return We(e,t()).then((function(){return n}))}:t,n?function(n){return We(e,t()).then((function(){throw n}))}:t)}});var Rn,Vn,Gn,zn=function(t){return function(e,n){var r,o,i=String(h(e)),c=ot(n),u=i.length;return c<0||c>=u?t?"":void 0:(r=i.charCodeAt(c))<55296||r>56319||c+1===u||(o=i.charCodeAt(c+1))<56320||o>57343?t?i.charAt(c):r:t?i.slice(c,c+2):o-56320+(r-55296<<10)+65536}},qn={codeAt:zn(!1),charAt:zn(!0)},Hn=(At("iterator"),!1);[].keys&&("next"in(Gn=[].keys())?(Vn=tt(tt(Gn)))!==Object.prototype&&(Rn=Vn):Hn=!0),null==Rn&&(Rn={});var Un={IteratorPrototype:Rn,BUGGY_SAFARI_ITERATORS:Hn},Wn=Un.IteratorPrototype,$n=function(){return this},Yn=Un.IteratorPrototype,Kn=Un.BUGGY_SAFARI_ITERATORS,Xn=At("iterator"),Jn=function(){return this},Qn=function(t,e,n,r,o,i,c){!function(t,e,n){var r=e+" Iterator";t.prototype=kt(Wn,{next:l(1,n)}),Kt(t,r,!1,!0),_t[r]=$n}(n,e,r);var u,a,s,f=function(t){if(t===o&&y)return y;if(!Kn&&t in v)return v[t];switch(t){case"keys":case"values":case"entries":return function(){return new n(this,t)}}return function(){return new n(this)}},p=e+" Iterator",d=!1,v=t.prototype,h=v[Xn]||v["@@iterator"]||o&&v[o],y=!Kn&&h||f(o),g="Array"==e&&v.entries||h;if(g&&(u=tt(g.call(new t)),Yn!==Object.prototype&&u.next&&(Kt(u,p,!0,!0),_t[p]=Jn)),"values"==o&&h&&"values"!==h.name&&(d=!0,y=function(){return h.call(this)}),c&&v[Xn]!==y&&V(v,Xn,y),_t[e]=y,o)if(a={values:f("values"),keys:i?y:f("keys"),entries:f("entries")},c)for(s in a)(Kn||d||!(s in v))&&Ut(v,s,a[s]);else q({target:e,proto:!0,forced:Kn||d},a);return a},Zn=qn.charAt,tr=on.set,er=on.getterFor("String Iterator");Qn(String,"String",(function(t){tr(this,{type:"String Iterator",string:String(t),index:0})}),(function(){var t,e=er(this),n=e.string,r=e.index;return r>=n.length?{value:void 0,done:!0}:(t=Zn(n,r),e.index+=t.length,{value:t,done:!1})}));var nr=on.set,rr=on.getterFor("Array Iterator");Qn(Array,"Array",(function(t,e){nr(this,{type:"Array Iterator",target:y(t),index:0,kind:e})}),(function(){var t=rr(this),e=t.target,n=t.kind,r=t.index++;return!e||r>=e.length?(t.target=void 0,{value:void 0,done:!0}):"keys"==n?{value:r,done:!1}:"values"==n?{value:e[r],done:!1}:{value:[r,e[r]],done:!1}}),"values");_t.Arguments=_t.Array;var or,ir=At("toStringTag");for(var cr in{CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}){var ur=o[cr],ar=ur&&ur.prototype;ar&&Dt(ar)!==ir&&V(ar,ir,cr),_t[cr]=_t.Array}(or=qt)&&or.default;var sr=M.Promise;const lr=document.body,fr=document.scrollingElement||document.documentElement;let pr;const dr={afterOpen(){pr=fr.scrollTop;const{style:t}=lr;t.position="fixed",t.width="100%",t.top=-pr+"px"},beforeClose(){const{style:t}=lr;t.position="",t.width="",t.top="",fr.scrollTop=pr}};var vr=t.defineComponent({name:"dui-actionsheet",props:{title:{type:String,default:""},menus:{type:[Array,String],default:()=>[]},cancel:{type:[String,Boolean],default:"取消"},cancelClass:{type:[Array,String],default:""},onClick:Function,onClose:Function},emits:["click","close"],data:()=>({show:!1,toggle:!1}),methods:{open(){this.show=!0,window.setTimeout(()=>{this.toggle=!0},20),dr.afterOpen()},close(){this.toggle=!1,window.setTimeout(()=>{dr.beforeClose(),this.show=!1,this.$emit("close")},300)},async handleClick(t,e){var n;"function"==typeof(null==e?void 0:e.onClick)&&await(null==e?void 0:e.onClick()),null===(n=this.onClick)||void 0===n||n.call(this,t,e),this.close()}}});const hr={key:0,class:"dui-item bg-white"},yr={class:"flex-sub text-sm text-gray text-center"},gr={key:1,class:"dui-list bg-white"},mr={key:2,class:"dui-list bg-white safe-bottom"};vr.render=function(e,n,r,o,i,c){return t.openBlock(),t.createBlock(t.Teleport,{to:"body"},[e.show?(t.openBlock(),t.createBlock("div",{key:0,class:["dui-actionsheet",{show:e.toggle}]},[t.createVNode("div",{class:"mask",onClick:n[1]||(n[1]=t=>e.close())}),t.createVNode("div",{class:["dui-actionsheet__body",{"dui-actionsheet__body--default":!e.$slots.default}]},[t.renderSlot(e.$slots,"default",{},()=>[e.title?(t.openBlock(),t.createBlock("div",hr,[t.createVNode("p",yr,t.toDisplayString(e.title),1)])):t.createCommentVNode("v-if",!0),e.menus.length?(t.openBlock(),t.createBlock("div",gr,[(t.openBlock(!0),t.createBlock(t.Fragment,null,t.renderList(e.menus,(n,r)=>(t.openBlock(),t.createBlock("div",{class:["dui-item justify-center text-lg",[].concat(n.class||[])],key:n.id||n.key||r,onClick:t=>e.handleClick(r,n)},t.toDisplayString(n.name||n),11,["onClick"]))),128))])):t.createCommentVNode("v-if",!0),e.cancel?(t.openBlock(),t.createBlock("div",mr,[t.createVNode("div",{class:["dui-item justify-center text-lg",[].concat(e.cancelClass||[])],onClick:n[2]||(n[2]=t=>e.handleClick("cancel"))},t.toDisplayString(e.cancel),3)])):t.createCommentVNode("v-if",!0)])],2)],2)):t.createCommentVNode("v-if",!0)])},vr.__file="src/components/actionsheet/actionsheet.vue";var br=[].slice,wr=/MSIE .\./.test(ae),Sr=function(t){return function(e,n){var r=arguments.length>2,o=r?br.call(arguments,2):void 0;return t(r?function(){("function"==typeof e?e:Function(e)).apply(this,o)}:e,n)}};q({global:!0,bind:!0,forced:wr},{setTimeout:Sr(o.setTimeout),setInterval:Sr(o.setInterval)}),q({target:"Date",stat:!0},{now:function(){return(new Date).getTime()}});M.Date.now;return{install:e=>{const n=t.ref(null),r=t.reactive({});e.config.globalProperties.$actionsheet=(e,{title:o,cancel:i,cancelClass:c,onClick:u})=>new sr(a=>{var s;r.handleClick=(...t)=>{"function"==typeof u&&u(...t),a(t[0])};const{unmount:l}=function(e){const n=document.createElement("div");document.body.appendChild(n);const r=t.createApp(e);return{instance:r.mount(n),unmount:()=>{r.unmount(n),document.body.removeChild(n)}}}({render:()=>t.createVNode(vr,{ref:t=>n.value=t,menus:r.menus,title:r.title,cancel:r.cancel,cancelClass:r.cancelClass,onClick:r.handleClick,onClose:l},null)});r.title=o,r.cancel=i,r.cancelClass=c,r.menus=e,t.nextTick(null==n||null===(s=n.value)||void 0===s?void 0:s.open)}),e.component(vr.name,vr)}}}(Vue);