You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

2 lines
98 KiB

3 weeks ago
var VueDemi=function(g,d,l){if(g.install)return g;if(!d)return console.error("[vue-demi] no Vue instance found, please be sure to import `vue` before `vue-demi`."),g;if(d.version.slice(0,4)==="2.7."){let B=function(k,A){var U,W={},se={config:d.config,use:d.use.bind(d),mixin:d.mixin.bind(d),component:d.component.bind(d),provide:function(S,Y){return W[S]=Y,this},directive:function(S,Y){return Y?(d.directive(S,Y),se):d.directive(S)},mount:function(S,Y){return U||(U=new d(Object.assign({propsData:A},k,{provide:Object.assign(W,k.provide)})),U.$mount(S,Y),U)},unmount:function(){U&&(U.$destroy(),U=void 0)}};return se};var Pn=B;for(var X in d)g[X]=d[X];g.isVue2=!0,g.isVue3=!1,g.install=function(){},g.Vue=d,g.Vue2=d,g.version=d.version,g.warn=d.util.warn,g.createApp=B}else if(d.version.slice(0,2)==="2.")if(l){for(var X in l)g[X]=l[X];g.isVue2=!0,g.isVue3=!1,g.install=function(){},g.Vue=d,g.Vue2=d,g.version=d.version}else console.error("[vue-demi] no VueCompositionAPI instance found, please be sure to import `@vue/composition-api` before `vue-demi`.");else if(d.version.slice(0,2)==="3."){for(var X in d)g[X]=d[X];g.isVue2=!1,g.isVue3=!0,g.install=function(){},g.Vue=d,g.Vue2=void 0,g.version=d.version,g.set=function(B,k,A){return Array.isArray(B)?(B.length=Math.max(B.length,k),B.splice(k,1,A),A):(B[k]=A,A)},g.del=function(B,k){if(Array.isArray(B)){B.splice(k,1);return}delete B[k]}}else console.error("[vue-demi] Vue version "+d.version+" is unsupported.");return g}(this.VueDemi=this.VueDemi||(typeof VueDemi!="undefined"?VueDemi:{}),this.Vue||(typeof Vue!="undefined"?Vue:void 0),this.VueCompositionAPI||(typeof VueCompositionAPI!="undefined"?VueCompositionAPI:void 0));(function(g,d,l){"use strict";function X(e,t,n){let r;l.isRef(n)?r={evaluating:n}:r=n||{};const{lazy:o=!1,evaluating:s=void 0,shallow:u=!1,onError:a=d.noop}=r,i=l.ref(!o),c=u?l.shallowRef(t):l.ref(t);let f=0;return l.watchEffect(async v=>{if(!i.value)return;f++;const w=f;let y=!1;s&&Promise.resolve().then(()=>{s.value=!0});try{const p=await e(m=>{v(()=>{s&&(s.value=!1),y||m()})});w===f&&(c.value=p)}catch(p){a(p)}finally{s&&w===f&&(s.value=!1),y=!0}}),o?l.computed(()=>(i.value=!0,c.value)):c}function Pn(e,t,n,r){let o=l.inject(e);return n&&(o=l.inject(e,n)),r&&(o=l.inject(e,n,r)),typeof t=="function"?l.computed(s=>t(o,s)):l.computed({get:s=>t.get(o,s),set:t.set})}const B=e=>function(...t){return e.apply(this,t.map(n=>l.unref(n)))};function k(e){var t;const n=d.resolveUnref(e);return(t=n==null?void 0:n.$el)!=null?t:n}const A=d.isClient?window:void 0,U=d.isClient?window.document:void 0,W=d.isClient?window.navigator:void 0,se=d.isClient?window.location:void 0;function S(...e){let t,n,r,o;if(d.isString(e[0])||Array.isArray(e[0])?([n,r,o]=e,t=A):[t,n,r,o]=e,!t)return d.noop;Array.isArray(n)||(n=[n]),Array.isArray(r)||(r=[r]);const s=[],u=()=>{s.forEach(f=>f()),s.length=0},a=(f,v,w,y)=>(f.addEventListener(v,w,y),()=>f.removeEventListener(v,w,y)),i=l.watch(()=>[k(t),d.resolveUnref(o)],([f,v])=>{u(),!!f&&s.push(...n.flatMap(w=>r.map(y=>a(f,w,y,v))))},{immediate:!0,flush:"post"}),c=()=>{i(),u()};return d.tryOnScopeDispose(c),c}let Y=!1;function En(e,t,n={}){const{window:r=A,ignore:o=[],capture:s=!0,detectIframe:u=!1}=n;if(!r)return;d.isIOS&&!Y&&(Y=!0,Array.from(r.document.body.children).forEach(w=>w.addEventListener("click",d.noop)));let a=!0;const i=w=>o.some(y=>{if(typeof y=="string")return Array.from(r.document.querySelectorAll(y)).some(p=>p===w.target||w.composedPath().includes(p));{const p=k(y);return p&&(w.target===p||w.composedPath().includes(p))}}),f=[S(r,"click",w=>{const y=k(e);if(!(!y||y===w.target||w.composedPath().includes(y))){if(w.detail===0&&(a=!i(w)),!a){a=!0;return}t(w)}},{passive:!0,capture:s}),S(r,"pointerdown",w=>{const y=k(e);y&&(a=!w.composedPath().includes(y)&&!i(w))},{passive:!0}),u&&S(r,"blur",w=>{var y;const p=k(e);((y=r.document.activeElement)==null?void 0:y.tagName)==="IFRAME"&&!(p==null?void 0:p.contains(r.document.activeElement))&&t(w)})].filter(Boolean);return()=>f.forEach(w=>w())}var $n=Object.defineProperty,Tn=Object.defineProperties,Fn=Object.get