13 lines
206 KiB
JavaScript
13 lines
206 KiB
JavaScript
|
/**
|
||
|
* vue v3.5.13
|
||
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
||
|
* @license MIT
|
||
|
**/
|
||
|
var Vue=function(e){"use strict";
|
||
|
/*! #__NO_SIDE_EFFECTS__ */function t(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return e=>e in t}const n=Object.freeze({}),o=Object.freeze([]),s=()=>{},r=()=>!1,i=e=>111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),a=e=>e.startsWith("onUpdate:"),c=Object.assign,l=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},u=Object.prototype.hasOwnProperty,d=(e,t)=>u.call(e,t),p=Array.isArray,h=e=>"[object Map]"===x(e),f=e=>"[object Set]"===x(e),m=e=>"[object Date]"===x(e),g=e=>"function"==typeof e,y=e=>"string"==typeof e,v=e=>"symbol"==typeof e,b=e=>null!==e&&"object"==typeof e,_=e=>(b(e)||g(e))&&g(e.then)&&g(e.catch),S=Object.prototype.toString,x=e=>S.call(e),w=e=>x(e).slice(8,-1),k=e=>"[object Object]"===x(e),C=e=>y(e)&&"NaN"!==e&&"-"!==e[0]&&""+parseInt(e,10)===e,T=t(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),E=t("bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo"),A=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},N=/-(\w)/g,I=A((e=>e.replace(N,((e,t)=>t?t.toUpperCase():"")))),$=/\B([A-Z])/g,O=A((e=>e.replace($,"-$1").toLowerCase())),R=A((e=>e.charAt(0).toUpperCase()+e.slice(1))),M=A((e=>e?`on${R(e)}`:"")),P=(e,t)=>!Object.is(e,t),F=(e,...t)=>{for(let n=0;n<e.length;n++)e[n](...t)},L=(e,t,n,o=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:o,value:n})},D=e=>{const t=parseFloat(e);return isNaN(t)?e:t},V=e=>{const t=y(e)?Number(e):NaN;return isNaN(t)?e:t};let j;const U=()=>j||(j="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{});const B={1:"TEXT",2:"CLASS",4:"STYLE",8:"PROPS",16:"FULL_PROPS",32:"NEED_HYDRATION",64:"STABLE_FRAGMENT",128:"KEYED_FRAGMENT",256:"UNKEYED_FRAGMENT",512:"NEED_PATCH",1024:"DYNAMIC_SLOTS",2048:"DEV_ROOT_FRAGMENT",[-1]:"HOISTED",[-2]:"BAIL"},H={1:"STABLE",2:"DYNAMIC",3:"FORWARDED"},q=t("Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console,Error,Symbol"),W=2;function z(e){if(p(e)){const t={};for(let n=0;n<e.length;n++){const o=e[n],s=y(o)?Y(o):z(o);if(s)for(const e in s)t[e]=s[e]}return t}if(y(e)||b(e))return e}const K=/;(?![^(]*\))/g,J=/:([^]+)/,G=/\/\*[^]*?\*\//g;function Y(e){const t={};return e.replace(G,"").split(K).forEach((e=>{if(e){const n=e.split(J);n.length>1&&(t[n[0].trim()]=n[1].trim())}})),t}function X(e){let t="";if(y(e))t=e;else if(p(e))for(let n=0;n<e.length;n++){const o=X(e[n]);o&&(t+=o+" ")}else if(b(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}const Q=t("html,body,base,head,link,meta,style,title,address,article,aside,footer,header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot"),Z=t("svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,feDistantLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,text,textPath,title,tspan,unknown,use,view"),ee=t("annotation,annotation-xml,maction,m
|
||
|
/*! #__NO_SIDE_EFFECTS__ */
|
||
|
function Zn(e){return t=>{Kn(e,t.appContext.app,t.uid,t.parent?t.parent.uid:void 0,t)}}const eo=no("perf:start"),to=no("perf:end");function no(e){return(t,n,o)=>{Kn(e,t.appContext.app,t.uid,t,n,o)}}let oo=null,so=null;function ro(e){const t=oo;return oo=e,so=e&&e.type.__scopeId||null,t}function io(e,t=oo,n){if(!t)return e;if(e._n)return e;const o=(...n)=>{o._d&&wi(-1);const s=ro(t);let r;try{r=e(...n)}finally{ro(s),o._d&&wi(1)}return Yn(t),r};return o._n=!0,o._c=!0,o._d=!0,o}function ao(e){E(e)&&pn("Do not use built-in directive ids as custom directive id: "+e)}function co(e,t,n,o){const s=e.dirs,r=t&&t.dirs;for(let i=0;i<s.length;i++){const a=s[i];r&&(a.oldValue=r[i].value);let c=a.dir[o];c&&(Le(),vn(c,n,8,[e.el,a,e,t]),De())}}const lo=Symbol("_vte"),uo=e=>e.__isTeleport,po=e=>e&&(e.disabled||""===e.disabled),ho=e=>e&&(e.defer||""===e.defer),fo=e=>"undefined"!=typeof SVGElement&&e instanceof SVGElement,mo=e=>"function"==typeof MathMLElement&&e instanceof MathMLElement,go=(e,t)=>{const n=e&&e.to;if(y(n)){if(t){const o=t(n);return o||po(e)||pn(`Failed to locate Teleport target with selector "${n}". Note the target element must exist before the component is mounted - i.e. the target cannot be rendered by the component itself, and ideally should be outside of the entire Vue component tree.`),o}return pn("Current renderer does not support string target for Teleports. (missing querySelector renderer option)"),null}return n||po(e)||pn(`Invalid Teleport target: ${n}`),n},yo={name:"Teleport",__isTeleport:!0,process(e,t,n,o,s,r,i,a,c,l){const{mc:u,pc:d,pbc:p,o:{insert:h,querySelector:f,createText:m,createComment:g}}=l,y=po(t.props);let{shapeFlag:v,children:b,dynamicChildren:_}=t;if(Ln&&(c=!1,_=null),null==e){const e=t.el=g("teleport start"),l=t.anchor=g("teleport end");h(e,n,o),h(l,n,o);const d=(e,t)=>{16&v&&(s&&s.isCE&&(s.ce._teleportTarget=e),u(b,e,t,s,r,i,a,c))},p=()=>{const e=t.target=go(t.props,f),n=So(e,t,m,h);e?("svg"!==i&&fo(e)?i="svg":"mathml"!==i&&mo(e)&&(i="mathml"),y||(d(e,n),_o(t,!1))):y||pn("Invalid Teleport target on mount:",e,`(${typeof e})`)};y&&(d(n,l),_o(t,!0)),ho(t.props)?Ar((()=>{p(),t.el.__isMounted=!0}),r):p()}else{if(ho(t.props)&&!e.el.__isMounted)return void Ar((()=>{yo.process(e,t,n,o,s,r,i,a,c,l),delete e.el.__isMounted}),r);t.el=e.el,t.targetStart=e.targetStart;const u=t.anchor=e.anchor,h=t.target=e.target,m=t.targetAnchor=e.targetAnchor,g=po(e.props),v=g?n:h,b=g?u:m;if("svg"===i||fo(h)?i="svg":("mathml"===i||mo(h))&&(i="mathml"),_?(p(e.dynamicChildren,_,v,s,r,i,a),Pr(e,t,!0)):c||d(e,t,v,b,s,r,i,a,!1),y)g?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):vo(t,n,u,l,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const e=t.target=go(t.props,f);e?vo(t,e,null,l,0):pn("Invalid Teleport target on update:",h,`(${typeof h})`)}else g&&vo(t,h,m,l,1);_o(t,y)}},remove(e,t,n,{um:o,o:{remove:s}},r){const{shapeFlag:i,children:a,anchor:c,targetStart:l,targetAnchor:u,target:d,props:p}=e;if(d&&(s(l),s(u)),r&&s(c),16&i){const e=r||!po(p);for(let s=0;s<a.length;s++){const r=a[s];o(r,t,n,e,!!r.dynamicChildren)}}},move:vo,hydrate:function(e,t,n,o,s,r,{o:{nextSibling:i,parentNode:a,querySelector:c,insert:l,createText:u}},d){const p=t.target=go(t.props,c);if(p){const c=po(t.props),h=p._lpa||p.firstChild;if(16&t.shapeFlag)if(c)t.anchor=d(i(e),t,a(e),n,o,s,r),t.targetStart=h,t.targetAnchor=h&&i(h);else{t.anchor=i(e);let a=h;for(;a;){if(a&&8===a.nodeType)if("teleport start anchor"===a.data)t.targetStart=a;else if("teleport anchor"===a.data){t.targetAnchor=a,p._lpa=t.targetAnchor&&i(t.targetAnchor);break}a=i(a)}t.targetAnchor||So(p,t,u,l),d(h&&i(h),t,p,n,o,s,r)}_o(t,c)}return t.anchor&&i(t.anchor)}};function vo(e,t,n,{o:{insert:o},m:s},r=2){0===r&&o(e.targetAnchor,t,n);const{el:i,anchor:a,shapeFlag:c,children:l,props:u}=e,d=2===r;if(d&&o(i,t,n),(!d||po(u))&&16&c)for(let e=0;e<l.length;e++)s(l[e],t,n,2);d&&o(a,t,n)}const bo=yo;function _o(e,t){const n=e.ctx;if(n&&n.ut){let o,s;for(t?(o=e.el,s=e.anchor):(o=e.targetStart,s=e.targetAnchor);o&&o!==s;)1===o.nodeType&&o.setAttribute("data-v-owner",n.uid)
|
||
|
/*! #__NO_SIDE_EFFECTS__ */function Fo(e,t){return g(e)?(()=>c({name:e.name},t,{setup:e}))():e}function Lo(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}const Do=new WeakSet;function Vo(e,t,o,s,r=!1){if(p(e))return void e.forEach(((e,n)=>Vo(e,t&&(p(t)?t[n]:t),o,s,r)));if(es(s)&&!r)return void(512&s.shapeFlag&&s.type.__asyncResolved&&s.component.subTree.component&&Vo(e,t,o,s.component.subTree));const i=4&s.shapeFlag?aa(s.component):s.el,a=r?null:i,{i:c,r:u}=e;if(!c)return void pn("Missing ref owner context. ref cannot be used on hoisted vnodes. A vnode with ref must be created inside the render function.");const h=t&&t.r,f=c.refs===n?c.refs={}:c.refs,m=c.setupState,v=Dt(m),b=m===n?()=>!1:e=>(d(v,e)&&!Bt(v[e])&&pn(`Template ref "${e}" used on a non-ref value. It will not work in the production build.`),!Do.has(v[e])&&d(v,e));if(null!=h&&h!==u&&(y(h)?(f[h]=null,b(h)&&(m[h]=null)):Bt(h)&&(h.value=null)),g(u))yn(u,c,12,[a,f]);else{const t=y(u),n=Bt(u);if(t||n){const s=()=>{if(e.f){const n=t?b(u)?m[u]:f[u]:u.value;r?p(n)&&l(n,i):p(n)?n.includes(i)||n.push(i):t?(f[u]=[i],b(u)&&(m[u]=f[u])):(u.value=[i],e.k&&(f[e.k]=u.value))}else t?(f[u]=a,b(u)&&(m[u]=a)):n?(u.value=a,e.k&&(f[e.k]=a)):pn("Invalid template ref type:",u,`(${typeof u})`)};a?(s.id=-1,Ar(s,o)):s()}else pn("Invalid template ref type:",u,`(${typeof u})`)}}let jo=!1;const Uo=()=>{jo||(console.error("Hydration completed but contains mismatches."),jo=!0)},Bo=e=>{if(1===e.nodeType)return(e=>e.namespaceURI.includes("svg")&&"foreignObject"!==e.tagName)(e)?"svg":(e=>e.namespaceURI.includes("MathML"))(e)?"mathml":void 0},Ho=e=>8===e.nodeType;function qo(e){const{mt:t,p:n,o:{patchProp:o,createText:s,nextSibling:r,parentNode:a,remove:c,insert:l,createComment:u}}=e,d=(n,o,i,c,u,b=!1)=>{b=b||!!o.dynamicChildren;const _=Ho(n)&&"["===n.data,S=()=>m(n,o,i,c,u,_),{type:x,ref:w,shapeFlag:k,patchFlag:C}=o;let T=n.nodeType;o.el=n,L(n,"__vnode",o,!0),L(n,"__vueParentComponent",i,!0),-2===C&&(b=!1,o.dynamicChildren=null);let E=null;switch(x){case fi:3!==T?""===o.children?(l(o.el=s(""),a(n),n),E=n):E=S():(n.data!==o.children&&(pn("Hydration text mismatch in",n.parentNode,`\n - rendered on server: ${JSON.stringify(n.data)}\n - expected on client: ${JSON.stringify(o.children)}`),Uo(),n.data=o.children),E=r(n));break;case mi:v(n)?(E=r(n),y(o.el=n.content.firstChild,n,i)):E=8!==T||_?S():r(n);break;case gi:if(_&&(T=(n=r(n)).nodeType),1===T||3===T){E=n;const e=!o.children.length;for(let t=0;t<o.staticCount;t++)e&&(o.children+=1===E.nodeType?E.outerHTML:E.data),t===o.staticCount-1&&(o.anchor=E),E=r(E);return _?r(E):E}S();break;case hi:E=_?f(n,o,i,c,u,b):S();break;default:if(1&k)E=1===T&&o.type.toLowerCase()===n.tagName.toLowerCase()||v(n)?p(n,o,i,c,u,b):S();else if(6&k){o.slotScopeIds=u;const e=a(n);if(E=_?g(n):Ho(n)&&"teleport start"===n.data?g(n,n.data,"teleport end"):r(n),t(o,e,null,i,c,Bo(e),b),es(o)&&!o.type.__asyncResolved){let t;_?(t=$i(hi),t.anchor=E?E.previousSibling:e.lastChild):t=3===n.nodeType?Pi(""):$i("div"),t.el=n,o.component.subTree=t}}else 64&k?E=8!==T?S():o.type.hydrate(n,o,i,c,u,b,e,h):128&k?E=o.type.hydrate(n,o,i,c,Bo(a(n)),u,b,e,d):pn("Invalid HostVNode type:",x,`(${typeof x})`)}return null!=w&&Vo(w,null,c,o),E},p=(e,t,n,s,r,a)=>{a=a||!!t.dynamicChildren;const{type:l,props:u,patchFlag:d,shapeFlag:p,dirs:f,transition:m}=t,g="input"===l||"option"===l;{f&&co(t,null,n,"created");let l,d=!1;if(v(e)){d=Mr(null,m)&&n&&n.vnode.props&&n.vnode.props.appear;const o=e.content.firstChild;d&&m.beforeEnter(o),y(o,e,n),t.el=e=o}if(16&p&&(!u||!u.innerHTML&&!u.textContent)){let o=h(e.firstChild,t,e,n,s,r,a),i=!1;for(;o;){Xo(e,1)||(i||(pn("Hydration children mismatch on",e,"\n Server rendered element contains more child nodes than client vdom."),i=!0),Uo());const t=o;o=o.nextSibling,c(t)}}else if(8&p){let n=t.children;"\n"!==n[0]||"PRE"!==e.tagName&&"TEXTAREA"!==e.tagName||(n=n.slice(1)),e.textContent!==n&&(Xo(e,0)||(pn("Hydration text content mismatch on",e,`\n - rendered on server: ${e.textContent}\n - expected on client: ${t.children}`),Uo()),e.textContent=t.children)}if(u){const
|
||
|
/*! #__NO_SIDE_EFFECTS__ */;function ts(e,t){const{ref:n,props:o,children:s,ce:r}=t.vnode,i=$i(e,o,s);return i.ref=n,i.ce=r,delete t.vnode.ce,i}const ns=e=>e.type.__isKeepAlive,os={name:"KeepAlive",__isKeepAlive:!0,props:{include:[String,RegExp,Array],exclude:[String,RegExp,Array],max:[String,Number]},setup(e,{slots:t}){const n=qi(),o=n.ctx,s=new Map,r=new Set;let i=null;n.__v_cache=s;const a=n.suspense,{renderer:{p:c,m:l,um:u,o:{createElement:d}}}=o,p=d("div");function h(e){ls(e),u(e,n,a,!0)}function f(e){s.forEach(((t,n)=>{const o=ua(t.type);o&&!e(o)&&m(n)}))}function m(e){const t=s.get(e);!t||i&&Ei(t,i)?i&&ls(i):h(t),s.delete(e),r.delete(e)}o.activate=(e,t,n,o,s)=>{const r=e.component;l(e,t,n,0,a),c(r.vnode,e,t,n,r,a,o,e.slotScopeIds,s),Ar((()=>{r.isDeactivated=!1,r.a&&F(r.a);const t=e.props&&e.props.onVnodeMounted;t&&ji(t,r.parent,e)}),a),Gn(r)},o.deactivate=e=>{const t=e.component;Lr(t.m),Lr(t.a),l(e,p,null,1,a),Ar((()=>{t.da&&F(t.da);const n=e.props&&e.props.onVnodeUnmounted;n&&ji(n,t.parent,e),t.isDeactivated=!0}),a),Gn(t)},jr((()=>[e.include,e.exclude]),(([e,t])=>{e&&f((t=>ss(e,t))),t&&f((e=>!ss(t,e)))}),{flush:"post",deep:!0});let g=null;const y=()=>{null!=g&&(si(n.subTree.type)?Ar((()=>{s.set(g,us(n.subTree))}),n.subTree.suspense):s.set(g,us(n.subTree)))};return fs(y),gs(y),ys((()=>{s.forEach((e=>{const{subTree:t,suspense:o}=n,s=us(t);if(e.type!==s.type||e.key!==s.key)h(e);else{ls(s);const e=s.component.da;e&&Ar(e,o)}}))})),()=>{if(g=null,!t.default)return i=null;const n=t.default(),o=n[0];if(n.length>1)return pn("KeepAlive should contain exactly one component child."),i=null,n;if(!(Ti(o)&&(4&o.shapeFlag||128&o.shapeFlag)))return i=null,o;let a=us(o);if(a.type===mi)return i=null,a;const c=a.type,l=ua(es(a)?a.type.__asyncResolved||{}:c),{include:u,exclude:d,max:p}=e;if(u&&(!l||!ss(u,l))||d&&l&&ss(d,l))return a.shapeFlag&=-257,i=a,o;const h=null==a.key?c:a.key,f=s.get(h);return a.el&&(a=Ri(a),128&o.shapeFlag&&(o.ssContent=a)),g=h,f?(a.el=f.el,a.component=f.component,a.transition&&Mo(a,a.transition),a.shapeFlag|=512,r.delete(h),r.add(h)):(r.add(h),p&&r.size>parseInt(p,10)&&m(r.values().next().value)),a.shapeFlag|=256,i=a,si(o.type)?o:a}}};function ss(e,t){return p(e)?e.some((e=>ss(e,t))):y(e)?e.split(",").includes(t):"[object RegExp]"===x(e)&&(e.lastIndex=0,e.test(t))}function rs(e,t){as(e,"a",t)}function is(e,t){as(e,"da",t)}function as(e,t,n=Hi){const o=e.__wdc||(e.__wdc=()=>{let t=n;for(;t;){if(t.isDeactivated)return;t=t.parent}return e()});if(ds(t,o,n),n){let e=n.parent;for(;e&&e.parent;)ns(e.parent.vnode)&&cs(o,t,n,e),e=e.parent}}function cs(e,t,n,o){const s=ds(t,e,o,!0);vs((()=>{l(o[t],s)}),n)}function ls(e){e.shapeFlag&=-257,e.shapeFlag&=-513}function us(e){return 128&e.shapeFlag?e.ssContent:e}function ds(e,t,n=Hi,o=!1){if(n){const s=n[e]||(n[e]=[]),r=t.__weh||(t.__weh=(...o)=>{Le();const s=Ki(n),r=vn(t,n,e,o);return s(),De(),r});return o?s.unshift(r):s.push(r),r}pn(`${M(gn[e].replace(/ hook$/,""))} is called when there is no active component instance to be associated with. Lifecycle injection APIs can only be used during execution of setup(). If you are using async setup(), make sure to register lifecycle hooks before the first await statement.`)}const ps=e=>(t,n=Hi)=>{ea&&"sp"!==e||ds(e,((...e)=>t(...e)),n)},hs=ps("bm"),fs=ps("m"),ms=ps("bu"),gs=ps("u"),ys=ps("bum"),vs=ps("um"),bs=ps("sp"),_s=ps("rtg"),Ss=ps("rtc");function xs(e,t=Hi){ds("ec",e,t)}const ws="components";const ks=Symbol.for("v-ndc");function Cs(e,t,n=!0,o=!1){const s=oo||Hi;if(s){const r=s.type;if(e===ws){const e=ua(r,!1);if(e&&(e===t||e===I(t)||e===R(I(t))))return r}const i=Ts(s[e]||r[e],t)||Ts(s.appContext[e],t);if(!i&&o)return r;if(n&&!i){const n=e===ws?"\n If this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement.":"";pn(`Failed to resolve ${e.slice(0,-1)}: ${t}${n}`)}return i}pn(`resolve${R(e.slice(0,-1))} can only be used in render() or setup().`)}function Ts(e,t){return e&&(e[t]||e[I(t)]||e[R(I(t))])}function Es(e){return e.some((e=>!Ti(e)||e.type!==mi&&!(e.type===
|
||
|
/*! #__NO_SIDE_EFFECTS__ */function bc(e,t,n){const o=Fo(e,t);k(o)&&c(o,t);class s extends Sc{constructor(e){super(o,e,n)}}return s.def=o,s}
|
||
|
/*! #__NO_SIDE_EFFECTS__ */const _c="undefined"!=typeof HTMLElement?HTMLElement:class{};class Sc extends _c{constructor(e,t={},n=el){super(),this._def=e,this._props=t,this._createApp=n,this._isVueCE=!0,this._instance=null,this._app=null,this._nonce=this._def.nonce,this._connected=!1,this._resolved=!1,this._numberProps=null,this._styleChildren=new WeakSet,this._ob=null,this.shadowRoot&&n!==el?this._root=this.shadowRoot:(this.shadowRoot&&va("Custom element has pre-rendered declarative shadow root but is not defined as hydratable. Use `defineSSRCustomElement`."),!1!==e.shadowRoot?(this.attachShadow({mode:"open"}),this._root=this.shadowRoot):this._root=this),this._def.__asyncLoader||this._resolveProps(this._def)}connectedCallback(){if(!this.isConnected)return;this.shadowRoot||this._parseSlots(),this._connected=!0;let e=this;for(;e=e&&(e.parentNode||e.host);)if(e instanceof Sc){this._parent=e;break}this._instance||(this._resolved?(this._setParent(),this._update()):e&&e._pendingResolve?this._pendingResolve=e._pendingResolve.then((()=>{this._pendingResolve=void 0,this._resolveDef()})):this._resolveDef())}_setParent(e=this._parent){e&&(this._instance.parent=e._instance,this._instance.provides=e._instance.provides)}disconnectedCallback(){this._connected=!1,An((()=>{this._connected||(this._ob&&(this._ob.disconnect(),this._ob=null),this._app&&this._app.unmount(),this._instance&&(this._instance.ce=void 0),this._app=this._instance=null)}))}_resolveDef(){if(this._pendingResolve)return;for(let e=0;e<this.attributes.length;e++)this._setAttr(this.attributes[e].name);this._ob=new MutationObserver((e=>{for(const t of e)this._setAttr(t.attributeName)})),this._ob.observe(this,{attributes:!0});const e=(e,t=!1)=>{this._resolved=!0,this._pendingResolve=void 0;const{props:n,styles:o}=e;let s;if(n&&!p(n))for(const e in n){const t=n[e];(t===Number||t&&t.type===Number)&&(e in this._props&&(this._props[e]=V(this._props[e])),(s||(s=Object.create(null)))[I(e)]=!0)}this._numberProps=s,t&&this._resolveProps(e),this.shadowRoot?this._applyStyles(o):o&&va("Custom element style injection is not supported when using shadowRoot: false"),this._mount(e)},t=this._def.__asyncLoader;t?this._pendingResolve=t().then((t=>e(this._def=t,!0))):e(this._def)}_mount(e){e.name||(e.name="VueElement"),this._app=this._createApp(e),e.configureApp&&e.configureApp(this._app),this._app._ceVNode=this._createVNode(),this._app.mount(this._root);const t=this._instance&&this._instance.exposed;if(t)for(const e in t)d(this,e)?va(`Exposed property "${e}" already exists on custom element.`):Object.defineProperty(this,e,{get:()=>Kt(t[e])})}_resolveProps(e){const{props:t}=e,n=p(t)?t:Object.keys(t||{});for(const e of Object.keys(this))"_"!==e[0]&&n.includes(e)&&this._setProp(e,this[e]);for(const e of n.map(I))Object.defineProperty(this,e,{get(){return this._getProp(e)},set(t){this._setProp(e,t,!0,!0)}})}_setAttr(e){if(e.startsWith("data-v-"))return;const t=this.hasAttribute(e);let n=t?this.getAttribute(e):vc;const o=I(e);t&&this._numberProps&&this._numberProps[o]&&(n=V(n)),this._setProp(o,n,!1,!0)}_getProp(e){return this._props[e]}_setProp(e,t,n=!0,o=!1){if(t!==this._props[e]&&(t===vc?delete this._props[e]:(this._props[e]=t,"key"===e&&this._app&&(this._app._ceVNode.key=t)),o&&this._instance&&this._update(),n)){const n=this._ob;n&&n.disconnect(),!0===t?this.setAttribute(O(e),""):"string"==typeof t||"number"==typeof t?this.setAttribute(O(e),t+""):t||this.removeAttribute(O(e)),n&&n.observe(this,{attributes:!0})}}_update(){Zc(this._createVNode(),this._root)}_createVNode(){const e={};this.shadowRoot||(e.onVnodeMounted=e.onVnodeUpdated=this._renderSlots.bind(this));const t=$i(this._def,c(e,this._props));return this._instance||(t.ce=e=>{this._instance=e,e.ce=this,e.isCE=!0,e.ceReload=e=>{this._styles&&(this._styles.forEach((e=>this._root.removeChild(e))),this._styles.length=0),this._applyStyles(e),this._instance=null,this._update()};const t=(e,t)=>{this.dispatchEvent(new CustomEvent(e,k(t[0])?c({detail:t},t[0]):{detail:t}))};e.emit=(e,...n)=>{t(e,n),O(e)!==e&&t(O(e),n)},this._setParent()}),t}_a
|