diff --git a/Gruntfile.js b/Gruntfile.js index 5d5d6ae4c..b8818b3cd 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -1,7 +1,6 @@ 'use strict'; module.exports = function(grunt) { var formBuilderAssets = require('./admin/form-builder/assets/js/form-builder-assets.js'); - var pkg = grunt.file.readJSON('package.json'); grunt.initConfig({ @@ -16,14 +15,11 @@ module.exports = function(grunt) { // Compile all .less files. less: { - - // one to one front: { files: { '<%= dirs.css %>/frontend-forms.css': '<%= dirs.less %>/frontend-forms.less' } }, - admin: { files: { '<%= dirs.css %>/wpuf-form-builder.css': ['admin/form-builder/assets/less/form-builder.less'], @@ -84,11 +80,14 @@ module.exports = function(grunt) { }, watch: { + options: { + debounceDelay: 500, // Add debounce delay + spawn: false // Recommended for better performance + }, less: { files: ['<%= dirs.less %>/*.less'], tasks: ['less:front', 'less:admin'] }, - formBuilder: { files: [ 'admin/form-builder/assets/less/*', @@ -101,126 +100,30 @@ module.exports = function(grunt) { 'concat:formBuilder', 'concat:templates', 'less:front' ] }, - vue: { files: [ - 'assets/js/subscriptions.js', - 'assets/css/admin/subscriptions.css', - 'assets/js/components/**/*.vue', - 'assets/js/stores/**/*.js', - ], - tasks: [ - 'shell:npm_build' - ] - } - }, - - // Clean up build directory - clean: { - main: ['build/'] - }, - - // Copy the plugin into the build directory - copy: { - main: { - src: [ - '**', - '!node_modules/**', - '!build/**', - '!admin/form-builder/assets/**', - '!assets/css/*.less', - '!bin/**', - '!.git/**', - '!includes/pro/.git/**', - '!Gruntfile.js', - '!secret.json', - '!package.json', - '!debug.log', - '!phpunit.xml', - '!.gitignore', - '!.gitmodules', - '!npm-debug.log', - '!plugin-deploy.sh', - '!export.sh', - '!config.codekit', - '!**/nbproject/**', - '!assets/less/**', - '!assets/tailwind/**', - '!tests/**', - '!**/Gruntfile.js', - '!**/package.json', - '!**/readme.md', - '!**/docs.md', - '!**/*~', - '!**/log.txt', - '!**/package-lock.json', - '!**/appsero.json', - '!**/composer.json', - '!**/composer.lock', - '!**/phpcs-report.txt', - '!**/phpcs.xml.dist' + 'assets/js/**/*.{js,vue}', + 'src/js/**/*.{js,vue}', + '!assets/js/**/*.min.js', // Exclude minified files + '!src/js/**/*.min.js' // Exclude minified files ], - dest: 'build/' - } - }, - - //Compress build directory into .zip and -.zip - compress: { - main: { - options: { - mode: 'zip', - archive: './build/wp-user-frontend-v'+pkg.version+'.zip' - }, - expand: true, - cwd: 'build/', - src: ['**/*'], - dest: 'wp-user-frontend' - } - }, - - // jshint - jshint: { - options: { - jshintrc: '.jshintrc', - reporter: require('jshint-stylish') - }, - - formBuilder: [ - 'admin/form-builder/assets/js/**/*.js', - '!admin/form-builder/assets/js/jquery-siaf-start.js', - '!admin/form-builder/assets/js/jquery-siaf-end.js', - 'assets/js/wpuf-form-builder-wpuf-forms.js', - ] - }, - - // concat/join files - concat: { - formBuilder: { - files: { - '<%= dirs.js %>/wpuf-form-builder.js': 'admin/form-builder/assets/js/form-builder.js', - '<%= dirs.js %>/wpuf-form-builder-mixins.js': formBuilderAssets.mixins, - '<%= dirs.js %>/wpuf-form-builder-components.js': formBuilderAssets.components, - }, - }, - - templates: { + tasks: ['shell:npm_build'], options: { - process: function(src, filepath) { - var id = filepath.replace('/template.php', '').split('/').pop(); - - return '\n'; - } - }, - files: { - '<%= dirs.template %>/form-components.php': formBuilderAssets.componentTemplates, + debounceDelay: 1000, // Longer delay for Vue files + spawn: false, + interval: 1000 // Add interval } } }, - // is to run NPM commands through Grunt + // Shell command for npm build shell: { npm_build: { command: 'npm run build', + options: { + stdout: true, + stderr: true + } } } }); @@ -239,13 +142,22 @@ module.exports = function(grunt) { grunt.loadNpmTasks( 'grunt-wp-readme-to-markdown' ); grunt.loadNpmTasks( 'grunt-shell' ); - grunt.registerTask( 'default', [ 'less', 'concat', 'uglify', 'i18n' ] ); + // Task optimization + let changedFiles = Object.create(null); + let onChange = grunt.util._.debounce(function() { + grunt.config('shell.npm_build.src', Object.keys(changedFiles)); + changedFiles = Object.create(null); + }, 200); - // file auto generation - grunt.registerTask( 'i18n', [ 'makepot' ] ); - grunt.registerTask( 'readme', [ 'wp_readme_to_markdown' ] ); + grunt.event.on('watch', function(action, filepath) { + changedFiles[filepath] = action; + onChange(); + }); - // build stuff - grunt.registerTask( 'release', [ 'less', 'concat', 'uglify', 'i18n', 'readme' ] ); - grunt.registerTask( 'zip', [ 'clean', 'copy', 'compress' ] ); + // Define tasks + grunt.registerTask( 'default', ['less', 'concat', 'uglify', 'i18n'] ); + grunt.registerTask( 'i18n', ['makepot'] ); + grunt.registerTask( 'readme', ['wp_readme_to_markdown'] ); + grunt.registerTask( 'release', ['less', 'concat', 'uglify', 'i18n', 'readme'] ); + grunt.registerTask( 'zip', ['clean', 'copy', 'compress'] ); }; diff --git a/assets/assets/_plugin-vue_export-helper-DzwH9eqJ.js b/assets/assets/_plugin-vue_export-helper-DzwH9eqJ.js new file mode 100644 index 000000000..9f0240be8 --- /dev/null +++ b/assets/assets/_plugin-vue_export-helper-DzwH9eqJ.js @@ -0,0 +1,21 @@ +/** +* @vue/shared v3.5.4 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**//*! #__NO_SIDE_EFFECTS__ */function hs(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const Z={},mt=[],Ne=()=>{},to=()=>!1,_n=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),ds=e=>e.startsWith("onUpdate:"),oe=Object.assign,ps=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},no=Object.prototype.hasOwnProperty,z=(e,t)=>no.call(e,t),D=Array.isArray,_t=e=>Wt(e)==="[object Map]",Tr=e=>Wt(e)==="[object Set]",so=e=>Wt(e)==="[object RegExp]",$=e=>typeof e=="function",ne=e=>typeof e=="string",Ze=e=>typeof e=="symbol",te=e=>e!==null&&typeof e=="object",Ar=e=>(te(e)||$(e))&&$(e.then)&&$(e.catch),Ir=Object.prototype.toString,Wt=e=>Ir.call(e),ro=e=>Wt(e).slice(8,-1),Or=e=>Wt(e)==="[object Object]",gs=e=>ne(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,It=hs(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),yn=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},io=/-(\w)/g,Ie=yn(e=>e.replace(io,(t,n)=>n?n.toUpperCase():"")),oo=/\B([A-Z])/g,Qe=yn(e=>e.replace(oo,"-$1").toLowerCase()),bn=yn(e=>e.charAt(0).toUpperCase()+e.slice(1)),Ln=yn(e=>e?`on${bn(e)}`:""),Xe=(e,t)=>!Object.is(e,t),Ot=(e,...t)=>{for(let n=0;n{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:s,value:n})},lo=e=>{const t=parseFloat(e);return isNaN(t)?e:t},co=e=>{const t=ne(e)?Number(e):NaN;return isNaN(t)?e:t};let Bs;const Rr=()=>Bs||(Bs=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function vn(e){if(D(e)){const t={};for(let n=0;n{if(n){const s=n.split(uo);s.length>1&&(t[s[0].trim()]=s[1].trim())}}),t}function xn(e){let t="";if(ne(e))t=e;else if(D(e))for(let n=0;n!!(e&&e.__v_isRef===!0),mo=e=>ne(e)?e:e==null?"":D(e)||te(e)&&(e.toString===Ir||!$(e.toString))?Fr(e)?mo(e.value):JSON.stringify(e,Nr,2):String(e),Nr=(e,t)=>Fr(t)?Nr(e,t.value):_t(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[s,r],i)=>(n[Dn(s,i)+" =>"]=r,n),{})}:Tr(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>Dn(n))}:Ze(t)?Dn(t):te(t)&&!D(t)&&!Or(t)?String(t):t,Dn=(e,t="")=>{var n;return Ze(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};/** +* @vue/reactivity v3.5.4 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/let ge;class Lr{constructor(t=!1){this.detached=t,this._active=!0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=ge,!t&&ge&&(this.index=(ge.scopes||(ge.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,n;if(this.scopes)for(t=0,n=this.scopes.length;t0)return;let e;for(;Pt;){let t=Pt;for(Pt=void 0;t;){const n=t.nextEffect;if(t.nextEffect=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(s){e||(e=s)}t=n}}if(e)throw e}function Vr(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function Br(e){let t,n=e.depsTail;for(let s=n;s;s=s.prevDep)s.version===-1?(s===n&&(n=s.prevDep),ys(s),yo(s)):t=s,s.dep.activeLink=s.prevActiveLink,s.prevActiveLink=void 0;e.deps=t,e.depsTail=n}function Jn(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&Kr(t.dep.computed)||t.dep.version!==t.version)return!0;return!!e._dirty}function Kr(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===jt))return;e.globalVersion=jt;const t=e.dep;if(e.flags|=2,t.version>0&&!e.isSSR&&!Jn(e)){e.flags&=-3;return}const n=X,s=Ae;X=e,Ae=!0;try{Vr(e);const r=e.fn(e._value);(t.version===0||Xe(r,e._value))&&(e._value=r,t.version++)}catch(r){throw t.version++,r}finally{X=n,Ae=s,Br(e),e.flags&=-3}}function ys(e){const{dep:t,prevSub:n,nextSub:s}=e;if(n&&(n.nextSub=s,e.prevSub=void 0),s&&(s.prevSub=n,e.nextSub=void 0),t.subs===e&&(t.subs=n),!t.subs&&t.computed){t.computed.flags&=-5;for(let r=t.computed.deps;r;r=r.nextDep)ys(r)}}function yo(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}let Ae=!0;const Ur=[];function et(){Ur.push(Ae),Ae=!1}function tt(){const e=Ur.pop();Ae=e===void 0?!0:e}function Ks(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=X;X=void 0;try{t()}finally{X=n}}}let jt=0;class Sn{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0}track(t){if(!X||!Ae||X===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==X)n=this.activeLink={dep:this,sub:X,version:this.version,nextDep:void 0,prevDep:void 0,nextSub:void 0,prevSub:void 0,prevActiveLink:void 0},X.deps?(n.prevDep=X.depsTail,X.depsTail.nextDep=n,X.depsTail=n):X.deps=X.depsTail=n,X.flags&4&&Wr(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){const s=n.nextDep;s.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=s),n.prevDep=X.depsTail,n.nextDep=void 0,X.depsTail.nextDep=n,X.depsTail=n,X.deps===n&&(X.deps=s)}return n}trigger(t){this.version++,jt++,this.notify(t)}notify(t){ms();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()}finally{_s()}}}function Wr(e){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let s=t.deps;s;s=s.nextDep)Wr(s)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}const fn=new WeakMap,ft=Symbol(""),Yn=Symbol(""),Ht=Symbol("");function de(e,t,n){if(Ae&&X){let s=fn.get(e);s||fn.set(e,s=new Map);let r=s.get(n);r||s.set(n,r=new Sn),r.track()}}function $e(e,t,n,s,r,i){const o=fn.get(e);if(!o){jt++;return}const l=f=>{f&&f.trigger()};if(ms(),t==="clear")o.forEach(l);else{const f=D(e),h=f&&gs(n);if(f&&n==="length"){const a=Number(s);o.forEach((d,g)=>{(g==="length"||g===Ht||!Ze(g)&&g>=a)&&l(d)})}else switch(n!==void 0&&l(o.get(n)),h&&l(o.get(Ht)),t){case"add":f?h&&l(o.get("length")):(l(o.get(ft)),_t(e)&&l(o.get(Yn)));break;case"delete":f||(l(o.get(ft)),_t(e)&&l(o.get(Yn)));break;case"set":_t(e)&&l(o.get(ft));break}}_s()}function bo(e,t){var n;return(n=fn.get(e))==null?void 0:n.get(t)}function dt(e){const t=G(e);return t===e?t:(de(t,"iterate",Ht),Ee(e)?t:t.map(ae))}function Cn(e){return de(e=G(e),"iterate",Ht),e}const vo={__proto__:null,[Symbol.iterator](){return Hn(this,Symbol.iterator,ae)},concat(...e){return dt(this).concat(...e.map(t=>D(t)?dt(t):t))},entries(){return Hn(this,"entries",e=>(e[1]=ae(e[1]),e))},every(e,t){return De(this,"every",e,t,void 0,arguments)},filter(e,t){return De(this,"filter",e,t,n=>n.map(ae),arguments)},find(e,t){return De(this,"find",e,t,ae,arguments)},findIndex(e,t){return De(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return De(this,"findLast",e,t,ae,arguments)},findLastIndex(e,t){return De(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return De(this,"forEach",e,t,void 0,arguments)},includes(...e){return $n(this,"includes",e)},indexOf(...e){return $n(this,"indexOf",e)},join(e){return dt(this).join(e)},lastIndexOf(...e){return $n(this,"lastIndexOf",e)},map(e,t){return De(this,"map",e,t,void 0,arguments)},pop(){return Ct(this,"pop")},push(...e){return Ct(this,"push",e)},reduce(e,...t){return Us(this,"reduce",e,t)},reduceRight(e,...t){return Us(this,"reduceRight",e,t)},shift(){return Ct(this,"shift")},some(e,t){return De(this,"some",e,t,void 0,arguments)},splice(...e){return Ct(this,"splice",e)},toReversed(){return dt(this).toReversed()},toSorted(e){return dt(this).toSorted(e)},toSpliced(...e){return dt(this).toSpliced(...e)},unshift(...e){return Ct(this,"unshift",e)},values(){return Hn(this,"values",ae)}};function Hn(e,t,n){const s=Cn(e),r=s[t]();return s!==e&&!Ee(e)&&(r._next=r.next,r.next=()=>{const i=r._next();return i.value&&(i.value=n(i.value)),i}),r}const xo=Array.prototype;function De(e,t,n,s,r,i){const o=Cn(e),l=o!==e&&!Ee(e),f=o[t];if(f!==xo[t]){const d=f.apply(e,i);return l?ae(d):d}let h=n;o!==e&&(l?h=function(d,g){return n.call(this,ae(d),g,e)}:n.length>2&&(h=function(d,g){return n.call(this,d,g,e)}));const a=f.call(o,h,s);return l&&r?r(a):a}function Us(e,t,n,s){const r=Cn(e);let i=n;return r!==e&&(Ee(e)?n.length>3&&(i=function(o,l,f){return n.call(this,o,l,f,e)}):i=function(o,l,f){return n.call(this,o,ae(l),f,e)}),r[t](i,...s)}function $n(e,t,n){const s=G(e);de(s,"iterate",Ht);const r=s[t](...n);return(r===-1||r===!1)&&Ss(n[0])?(n[0]=G(n[0]),s[t](...n)):r}function Ct(e,t,n=[]){et(),ms();const s=G(e)[t].apply(e,n);return _s(),tt(),s}const So=hs("__proto__,__v_isRef,__isVue"),kr=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(Ze));function Co(e){Ze(e)||(e=String(e));const t=G(this);return de(t,"has",e),t.hasOwnProperty(e)}class Gr{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,s){const r=this._isReadonly,i=this._isShallow;if(n==="__v_isReactive")return!r;if(n==="__v_isReadonly")return r;if(n==="__v_isShallow")return i;if(n==="__v_raw")return s===(r?i?Do:Yr:i?Jr:zr).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(s)?t:void 0;const o=D(t);if(!r){let f;if(o&&(f=vo[n]))return f;if(n==="hasOwnProperty")return Co}const l=Reflect.get(t,n,re(t)?t:s);return(Ze(n)?kr.has(n):So(n))||(r||de(t,"get",n),i)?l:re(l)?o&&gs(n)?l:l.value:te(l)?r?Xr(l):En(l):l}}class qr extends Gr{constructor(t=!1){super(!1,t)}set(t,n,s,r){let i=t[n];if(!this._isShallow){const f=ht(i);if(!Ee(s)&&!ht(s)&&(i=G(i),s=G(s)),!D(t)&&re(i)&&!re(s))return f?!1:(i.value=s,!0)}const o=D(t)&&gs(n)?Number(n)e,wn=e=>Reflect.getPrototypeOf(e);function Jt(e,t,n=!1,s=!1){e=e.__v_raw;const r=G(e),i=G(t);n||(Xe(t,i)&&de(r,"get",t),de(r,"get",i));const{has:o}=wn(r),l=s?bs:n?ws:ae;if(o.call(r,t))return l(e.get(t));if(o.call(r,i))return l(e.get(i));e!==r&&e.get(t)}function Yt(e,t=!1){const n=this.__v_raw,s=G(n),r=G(e);return t||(Xe(e,r)&&de(s,"has",e),de(s,"has",r)),e===r?n.has(e):n.has(e)||n.has(r)}function Xt(e,t=!1){return e=e.__v_raw,!t&&de(G(e),"iterate",ft),Reflect.get(e,"size",e)}function Ws(e,t=!1){!t&&!Ee(e)&&!ht(e)&&(e=G(e));const n=G(this);return wn(n).has.call(n,e)||(n.add(e),$e(n,"add",e,e)),this}function ks(e,t,n=!1){!n&&!Ee(t)&&!ht(t)&&(t=G(t));const s=G(this),{has:r,get:i}=wn(s);let o=r.call(s,e);o||(e=G(e),o=r.call(s,e));const l=i.call(s,e);return s.set(e,t),o?Xe(t,l)&&$e(s,"set",e,t):$e(s,"add",e,t),this}function Gs(e){const t=G(this),{has:n,get:s}=wn(t);let r=n.call(t,e);r||(e=G(e),r=n.call(t,e)),s&&s.call(t,e);const i=t.delete(e);return r&&$e(t,"delete",e,void 0),i}function qs(){const e=G(this),t=e.size!==0,n=e.clear();return t&&$e(e,"clear",void 0,void 0),n}function Zt(e,t){return function(s,r){const i=this,o=i.__v_raw,l=G(o),f=t?bs:e?ws:ae;return!e&&de(l,"iterate",ft),o.forEach((h,a)=>s.call(r,f(h),f(a),i))}}function Qt(e,t,n){return function(...s){const r=this.__v_raw,i=G(r),o=_t(i),l=e==="entries"||e===Symbol.iterator&&o,f=e==="keys"&&o,h=r[e](...s),a=n?bs:t?ws:ae;return!t&&de(i,"iterate",f?Yn:ft),{next(){const{value:d,done:g}=h.next();return g?{value:d,done:g}:{value:l?[a(d[0]),a(d[1])]:a(d),done:g}},[Symbol.iterator](){return this}}}}function Ue(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function Io(){const e={get(i){return Jt(this,i)},get size(){return Xt(this)},has:Yt,add:Ws,set:ks,delete:Gs,clear:qs,forEach:Zt(!1,!1)},t={get(i){return Jt(this,i,!1,!0)},get size(){return Xt(this)},has:Yt,add(i){return Ws.call(this,i,!0)},set(i,o){return ks.call(this,i,o,!0)},delete:Gs,clear:qs,forEach:Zt(!1,!0)},n={get(i){return Jt(this,i,!0)},get size(){return Xt(this,!0)},has(i){return Yt.call(this,i,!0)},add:Ue("add"),set:Ue("set"),delete:Ue("delete"),clear:Ue("clear"),forEach:Zt(!0,!1)},s={get(i){return Jt(this,i,!0,!0)},get size(){return Xt(this,!0)},has(i){return Yt.call(this,i,!0)},add:Ue("add"),set:Ue("set"),delete:Ue("delete"),clear:Ue("clear"),forEach:Zt(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(i=>{e[i]=Qt(i,!1,!1),n[i]=Qt(i,!0,!1),t[i]=Qt(i,!1,!0),s[i]=Qt(i,!0,!0)}),[e,n,t,s]}const[Oo,Po,Ro,Mo]=Io();function vs(e,t){const n=t?e?Mo:Ro:e?Po:Oo;return(s,r,i)=>r==="__v_isReactive"?!e:r==="__v_isReadonly"?e:r==="__v_raw"?s:Reflect.get(z(n,r)&&r in s?n:s,r,i)}const Fo={get:vs(!1,!1)},No={get:vs(!1,!0)},Lo={get:vs(!0,!1)};const zr=new WeakMap,Jr=new WeakMap,Yr=new WeakMap,Do=new WeakMap;function jo(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Ho(e){return e.__v_skip||!Object.isExtensible(e)?0:jo(ro(e))}function En(e){return ht(e)?e:xs(e,!1,Eo,Fo,zr)}function $o(e){return xs(e,!1,Ao,No,Jr)}function Xr(e){return xs(e,!0,To,Lo,Yr)}function xs(e,t,n,s,r){if(!te(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const i=r.get(e);if(i)return i;const o=Ho(e);if(o===0)return e;const l=new Proxy(e,o===2?s:n);return r.set(e,l),l}function Ve(e){return ht(e)?Ve(e.__v_raw):!!(e&&e.__v_isReactive)}function ht(e){return!!(e&&e.__v_isReadonly)}function Ee(e){return!!(e&&e.__v_isShallow)}function Ss(e){return e?!!e.__v_raw:!1}function G(e){const t=e&&e.__v_raw;return t?G(t):e}function Cs(e){return!z(e,"__v_skip")&&Object.isExtensible(e)&&Pr(e,"__v_skip",!0),e}const ae=e=>te(e)?En(e):e,ws=e=>te(e)?Xr(e):e;function re(e){return e?e.__v_isRef===!0:!1}function Es(e){return Zr(e,!1)}function zc(e){return Zr(e,!0)}function Zr(e,t){return re(e)?e:new Vo(e,t)}class Vo{constructor(t,n){this.dep=new Sn,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:G(t),this._value=n?t:ae(t),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(t){const n=this._rawValue,s=this.__v_isShallow||Ee(t)||ht(t);t=s?t:G(t),Xe(t,n)&&(this._rawValue=t,this._value=s?t:ae(t),this.dep.trigger())}}function Bo(e){return re(e)?e.value:e}const Ko={get:(e,t,n)=>t==="__v_raw"?e:Bo(Reflect.get(e,t,n)),set:(e,t,n,s)=>{const r=e[t];return re(r)&&!re(n)?(r.value=n,!0):Reflect.set(e,t,n,s)}};function Qr(e){return Ve(e)?e:new Proxy(e,Ko)}class Uo{constructor(t){this.__v_isRef=!0,this._value=void 0;const n=this.dep=new Sn,{get:s,set:r}=t(n.track.bind(n),n.trigger.bind(n));this._get=s,this._set=r}get value(){return this._value=this._get()}set value(t){this._set(t)}}function Jc(e){return new Uo(e)}function Wo(e){const t=D(e)?new Array(e.length):{};for(const n in e)t[n]=ei(e,n);return t}class ko{constructor(t,n,s){this._object=t,this._key=n,this._defaultValue=s,this.__v_isRef=!0,this._value=void 0}get value(){const t=this._object[this._key];return this._value=t===void 0?this._defaultValue:t}set value(t){this._object[this._key]=t}get dep(){return bo(G(this._object),this._key)}}class Go{constructor(t){this._getter=t,this.__v_isRef=!0,this.__v_isReadonly=!0,this._value=void 0}get value(){return this._value=this._getter()}}function qo(e,t,n){return re(e)?e:$(e)?new Go(e):te(e)&&arguments.length>1?ei(e,t,n):Es(e)}function ei(e,t,n){const s=e[t];return re(s)?s:new ko(e,t,n)}class zo{constructor(t,n,s){this.fn=t,this.setter=n,this._value=void 0,this.dep=new Sn(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=jt-1,this.effect=this,this.__v_isReadonly=!n,this.isSSR=s}notify(){this.flags|=16,X!==this&&this.dep.notify()}get value(){const t=this.dep.track();return Kr(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function Jo(e,t,n=!1){let s,r;return $(e)?s=e:(s=e.get,r=e.set),new zo(s,r,n)}const en={},un=new WeakMap;let ct;function Yo(e,t=!1,n=ct){if(n){let s=un.get(n);s||un.set(n,s=[]),s.push(e)}}function Xo(e,t,n=Z){const{immediate:s,deep:r,once:i,scheduler:o,augmentJob:l,call:f}=n,h=_=>r?_:Ee(_)||r===!1||r===0?He(_,1):He(_);let a,d,g,C,I=!1,L=!1;if(re(e)?(d=()=>e.value,I=Ee(e)):Ve(e)?(d=()=>h(e),I=!0):D(e)?(L=!0,I=e.some(_=>Ve(_)||Ee(_)),d=()=>e.map(_=>{if(re(_))return _.value;if(Ve(_))return h(_);if($(_))return f?f(_,2):_()})):$(e)?t?d=f?()=>f(e,2):e:d=()=>{if(g){et();try{g()}finally{tt()}}const _=ct;ct=a;try{return f?f(e,3,[C]):e(C)}finally{ct=_}}:d=Ne,t&&r){const _=d,R=r===!0?1/0:r;d=()=>He(_(),R)}const q=jr(),V=()=>{a.stop(),q&&ps(q.effects,a)};if(i)if(t){const _=t;t=(...R)=>{_(...R),V()}}else{const _=d;d=()=>{_(),V()}}let T=L?new Array(e.length).fill(en):en;const O=_=>{if(!(!(a.flags&1)||!a.dirty&&!_))if(t){const R=a.run();if(r||I||(L?R.some((B,K)=>Xe(B,T[K])):Xe(R,T))){g&&g();const B=ct;ct=a;try{const K=[R,T===en?void 0:L&&T[0]===en?[]:T,C];f?f(t,3,K):t(...K),T=R}finally{ct=B}}}else a.run()};return l&&l(O),a=new Hr(d),a.scheduler=o?()=>o(O,!1):O,C=_=>Yo(_,!1,a),g=a.onStop=()=>{const _=un.get(a);if(_){if(f)f(_,4);else for(const R of _)R();un.delete(a)}},t?s?O(!0):T=a.run():o?o(O.bind(null,!0),!0):a.run(),V.pause=a.pause.bind(a),V.resume=a.resume.bind(a),V.stop=V,V}function He(e,t=1/0,n){if(t<=0||!te(e)||e.__v_skip||(n=n||new Set,n.has(e)))return e;if(n.add(e),t--,re(e))He(e.value,t,n);else if(D(e))for(let s=0;s{He(s,t,n)});else if(Or(e)){for(const s in e)He(e[s],t,n);for(const s of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,s)&&He(e[s],t,n)}return e}/** +* @vue/runtime-core v3.5.4 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/function kt(e,t,n,s){try{return s?e(...s):e()}catch(r){Tn(r,t,n)}}function Oe(e,t,n,s){if($(e)){const r=kt(e,t,n,s);return r&&Ar(r)&&r.catch(i=>{Tn(i,t,n)}),r}if(D(e)){const r=[];for(let i=0;i>>1,r=me[s],i=Vt(r);i=Vt(n)?me.push(e):me.splice(Qo(t),0,e),e.flags|=1,si()}}function si(){!$t&&!Xn&&(Xn=!0,Ts=ti.then(ii))}function el(e){D(e)?yt.push(...e):qe&&e.id===-1?qe.splice(gt+1,0,e):e.flags&1||(yt.push(e),e.flags|=1),si()}function zs(e,t,n=$t?Me+1:0){for(;nVt(n)-Vt(s));if(yt.length=0,qe){qe.push(...t);return}for(qe=t,gt=0;gte.id==null?e.flags&2?-1:1/0:e.id;function ii(e){Xn=!1,$t=!0;try{for(Me=0;Me{s._d&&ir(-1);const i=an(t);let o;try{o=e(...r)}finally{an(i),s._d&&ir(1)}return o};return s._n=!0,s._c=!0,s._d=!0,s}function Yc(e,t){if(ie===null)return e;const n=Mn(ie),s=e.dirs||(e.dirs=[]);for(let r=0;re.__isTeleport,Rt=e=>e&&(e.disabled||e.disabled===""),nl=e=>e&&(e.defer||e.defer===""),Js=e=>typeof SVGElement<"u"&&e instanceof SVGElement,Ys=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,Zn=(e,t)=>{const n=e&&e.to;return ne(n)?t?t(n):null:n},sl={name:"Teleport",__isTeleport:!0,process(e,t,n,s,r,i,o,l,f,h){const{mc:a,pc:d,pbc:g,o:{insert:C,querySelector:I,createText:L,createComment:q}}=h,V=Rt(t.props);let{shapeFlag:T,children:O,dynamicChildren:_}=t;if(e==null){const R=t.el=L(""),B=t.anchor=L("");C(R,n,s),C(B,n,s);const K=(S,N)=>{T&16&&a(O,S,N,r,i,o,l,f)},F=()=>{const S=t.target=Zn(t.props,I),N=fi(S,t,L,C);S&&(o!=="svg"&&Js(S)?o="svg":o!=="mathml"&&Ys(S)&&(o="mathml"),V||(K(S,N),rn(t)))};V&&(K(n,B),rn(t)),nl(t.props)?ce(F,i):F()}else{t.el=e.el,t.targetStart=e.targetStart;const R=t.anchor=e.anchor,B=t.target=e.target,K=t.targetAnchor=e.targetAnchor,F=Rt(e.props),S=F?n:B,N=F?R:K;if(o==="svg"||Js(B)?o="svg":(o==="mathml"||Ys(B))&&(o="mathml"),_?(g(e.dynamicChildren,_,S,r,i,o,l),Ms(e,t,!0)):f||d(e,t,S,N,r,i,o,l,!1),V)F?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):tn(t,n,R,h,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const U=t.target=Zn(t.props,I);U&&tn(t,U,null,h,0)}else F&&tn(t,B,K,h,1);rn(t)}},remove(e,t,n,{um:s,o:{remove:r}},i){const{shapeFlag:o,children:l,anchor:f,targetStart:h,targetAnchor:a,target:d,props:g}=e;if(d&&(r(h),r(a)),i&&r(f),o&16){const C=i||!Rt(g);for(let I=0;I{e.isMounted=!0}),Os(()=>{e.isUnmounting=!0}),e}const Ce=[Function,Array],ui={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:Ce,onEnter:Ce,onAfterEnter:Ce,onEnterCancelled:Ce,onBeforeLeave:Ce,onLeave:Ce,onAfterLeave:Ce,onLeaveCancelled:Ce,onBeforeAppear:Ce,onAppear:Ce,onAfterAppear:Ce,onAppearCancelled:Ce},ai=e=>{const t=e.subTree;return t.component?ai(t.component):t},ol={name:"BaseTransition",props:ui,setup(e,{slots:t}){const n=Ns(),s=il();return()=>{const r=t.default&&pi(t.default(),!0);if(!r||!r.length)return;const i=hi(r),o=G(e),{mode:l}=o;if(s.isLeaving)return Vn(i);const f=Xs(i);if(!f)return Vn(i);let h=Qn(f,o,s,n,g=>h=g);f.type!==he&&bt(f,h);const a=n.subTree,d=a&&Xs(a);if(d&&d.type!==he&&!Ye(f,d)&&ai(n).type!==he){const g=Qn(d,o,s,n);if(bt(d,g),l==="out-in"&&f.type!==he)return s.isLeaving=!0,g.afterLeave=()=>{s.isLeaving=!1,n.job.flags&8||n.update(),delete g.afterLeave},Vn(i);l==="in-out"&&f.type!==he&&(g.delayLeave=(C,I,L)=>{const q=di(s,d);q[String(d.key)]=d,C[ze]=()=>{I(),C[ze]=void 0,delete h.delayedLeave},h.delayedLeave=L})}return i}}};function hi(e){let t=e[0];if(e.length>1){for(const n of e)if(n.type!==he){t=n;break}}return t}const ll=ol;function di(e,t){const{leavingVNodes:n}=e;let s=n.get(t.type);return s||(s=Object.create(null),n.set(t.type,s)),s}function Qn(e,t,n,s,r){const{appear:i,mode:o,persisted:l=!1,onBeforeEnter:f,onEnter:h,onAfterEnter:a,onEnterCancelled:d,onBeforeLeave:g,onLeave:C,onAfterLeave:I,onLeaveCancelled:L,onBeforeAppear:q,onAppear:V,onAfterAppear:T,onAppearCancelled:O}=t,_=String(e.key),R=di(n,e),B=(S,N)=>{S&&Oe(S,s,9,N)},K=(S,N)=>{const U=N[1];B(S,N),D(S)?S.every(P=>P.length<=1)&&U():S.length<=1&&U()},F={mode:o,persisted:l,beforeEnter(S){let N=f;if(!n.isMounted)if(i)N=q||f;else return;S[ze]&&S[ze](!0);const U=R[_];U&&Ye(e,U)&&U.el[ze]&&U.el[ze](),B(N,[S])},enter(S){let N=h,U=a,P=d;if(!n.isMounted)if(i)N=V||h,U=T||a,P=O||d;else return;let Y=!1;const le=S[nn]=Le=>{Y||(Y=!0,Le?B(P,[S]):B(U,[S]),F.delayedLeave&&F.delayedLeave(),S[nn]=void 0)};N?K(N,[S,le]):le()},leave(S,N){const U=String(e.key);if(S[nn]&&S[nn](!0),n.isUnmounting)return N();B(g,[S]);let P=!1;const Y=S[ze]=le=>{P||(P=!0,N(),le?B(L,[S]):B(I,[S]),S[ze]=void 0,R[U]===e&&delete R[U])};R[U]=e,C?K(C,[S,Y]):Y()},clone(S){const N=Qn(S,t,n,s,r);return r&&r(N),N}};return F}function Vn(e){if(An(e))return e=Be(e),e.children=null,e}function Xs(e){if(!An(e))return ci(e.type)&&e.children?hi(e.children):e;const{shapeFlag:t,children:n}=e;if(n){if(t&16)return n[0];if(t&32&&$(n.default))return n.default()}}function bt(e,t){e.shapeFlag&6&&e.component?(e.transition=t,bt(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function pi(e,t=!1,n){let s=[],r=0;for(let i=0;i1)for(let i=0;ies(I,t&&(D(t)?t[L]:t),n,s,r));return}if(ut(s)&&!r)return;const i=s.shapeFlag&4?Mn(s.component):s.el,o=r?null:i,{i:l,r:f}=e,h=t&&t.r,a=l.refs===Z?l.refs={}:l.refs,d=l.setupState,g=G(d),C=d===Z?()=>!1:I=>z(g,I);if(h!=null&&h!==f&&(ne(h)?(a[h]=null,C(h)&&(d[h]=null)):re(h)&&(h.value=null)),$(f))kt(f,l,12,[o,a]);else{const I=ne(f),L=re(f);if(I||L){const q=()=>{if(e.f){const V=I?C(f)?d[f]:a[f]:f.value;r?D(V)&&ps(V,i):D(V)?V.includes(i)||V.push(i):I?(a[f]=[i],C(f)&&(d[f]=a[f])):(f.value=[i],e.k&&(a[e.k]=f.value))}else I?(a[f]=o,C(f)&&(d[f]=o)):L&&(f.value=o,e.k&&(a[e.k]=o))};o?(q.id=-1,ce(q,n)):q()}}}const ut=e=>!!e.type.__asyncLoader,An=e=>e.type.__isKeepAlive,cl={name:"KeepAlive",__isKeepAlive:!0,props:{include:[String,RegExp,Array],exclude:[String,RegExp,Array],max:[String,Number]},setup(e,{slots:t}){const n=Ns(),s=n.ctx;if(!s.renderer)return()=>{const T=t.default&&t.default();return T&&T.length===1?T[0]:T};const r=new Map,i=new Set;let o=null;const l=n.suspense,{renderer:{p:f,m:h,um:a,o:{createElement:d}}}=s,g=d("div");s.activate=(T,O,_,R,B)=>{const K=T.component;h(T,O,_,0,l),f(K.vnode,T,O,_,K,l,R,T.slotScopeIds,B),ce(()=>{K.isDeactivated=!1,K.a&&Ot(K.a);const F=T.props&&T.props.onVnodeMounted;F&&we(F,K.parent,T)},l)},s.deactivate=T=>{const O=T.component;dn(O.m),dn(O.a),h(T,g,null,1,l),ce(()=>{O.da&&Ot(O.da);const _=T.props&&T.props.onVnodeUnmounted;_&&we(_,O.parent,T),O.isDeactivated=!0},l)};function C(T){Bn(T),a(T,n,l,!0)}function I(T){r.forEach((O,_)=>{const R=cs(O.type);R&&!T(R)&&L(_)})}function L(T){const O=r.get(T);O&&(!o||!Ye(O,o))?C(O):o&&Bn(o),r.delete(T),i.delete(T)}Nt(()=>[e.include,e.exclude],([T,O])=>{T&&I(_=>Tt(T,_)),O&&I(_=>!Tt(O,_))},{flush:"post",deep:!0});let q=null;const V=()=>{q!=null&&(pn(n.subTree.type)?ce(()=>{r.set(q,sn(n.subTree))},n.subTree.suspense):r.set(q,sn(n.subTree)))};return Is(V),_i(V),Os(()=>{r.forEach(T=>{const{subTree:O,suspense:_}=n,R=sn(O);if(T.type===R.type&&T.key===R.key){Bn(R);const B=R.component.da;B&&ce(B,_);return}C(T)})}),()=>{if(q=null,!t.default)return o=null;const T=t.default(),O=T[0];if(T.length>1)return o=null,T;if(!Kt(O)||!(O.shapeFlag&4)&&!(O.shapeFlag&128))return o=null,O;let _=sn(O);if(_.type===he)return o=null,_;const R=_.type,B=cs(ut(_)?_.type.__asyncResolved||{}:R),{include:K,exclude:F,max:S}=e;if(K&&(!B||!Tt(K,B))||F&&B&&Tt(F,B))return _.shapeFlag&=-257,o=_,O;const N=_.key==null?R:_.key,U=r.get(N);return _.el&&(_=Be(_),O.shapeFlag&128&&(O.ssContent=_)),q=N,U?(_.el=U.el,_.component=U.component,_.transition&&bt(_,_.transition),_.shapeFlag|=512,i.delete(N),i.add(N)):(i.add(N),S&&i.size>parseInt(S,10)&&L(i.values().next().value)),_.shapeFlag|=256,o=_,pn(O.type)?O:_}}},Qc=cl;function Tt(e,t){return D(e)?e.some(n=>Tt(n,t)):ne(e)?e.split(",").includes(t):so(e)?(e.lastIndex=0,e.test(t)):!1}function fl(e,t){mi(e,"a",t)}function ul(e,t){mi(e,"da",t)}function mi(e,t,n=fe){const s=e.__wdc||(e.__wdc=()=>{let r=n;for(;r;){if(r.isDeactivated)return;r=r.parent}return e()});if(In(t,s,n),n){let r=n.parent;for(;r&&r.parent;)An(r.parent.vnode)&&al(s,t,n,r),r=r.parent}}function al(e,t,n,s){const r=In(t,e,s,!0);yi(()=>{ps(s[t],r)},n)}function Bn(e){e.shapeFlag&=-257,e.shapeFlag&=-513}function sn(e){return e.shapeFlag&128?e.ssContent:e}function In(e,t,n=fe,s=!1){if(n){const r=n[e]||(n[e]=[]),i=t.__weh||(t.__weh=(...o)=>{et();const l=Gt(n),f=Oe(t,n,e,o);return l(),tt(),f});return s?r.unshift(i):r.push(i),i}}const Ke=e=>(t,n=fe)=>{(!Rn||e==="sp")&&In(e,(...s)=>t(...s),n)},hl=Ke("bm"),Is=Ke("m"),dl=Ke("bu"),_i=Ke("u"),Os=Ke("bum"),yi=Ke("um"),pl=Ke("sp"),gl=Ke("rtg"),ml=Ke("rtc");function _l(e,t=fe){In("ec",e,t)}const bi="components";function ef(e,t){return xi(bi,e,!0,t)||e}const vi=Symbol.for("v-ndc");function tf(e){return ne(e)?xi(bi,e,!1)||e:e||vi}function xi(e,t,n=!0,s=!1){const r=ie||fe;if(r){const i=r.type;{const l=cs(i,!1);if(l&&(l===t||l===Ie(t)||l===bn(Ie(t))))return i}const o=Zs(r[e]||i[e],t)||Zs(r.appContext[e],t);return!o&&s?i:o}}function Zs(e,t){return e&&(e[t]||e[Ie(t)]||e[bn(Ie(t))])}function nf(e,t,n,s){let r;const i=n,o=D(e);if(o||ne(e)){const l=o&&Ve(e);let f=!1;l&&(f=!Ee(e),e=Cn(e)),r=new Array(e.length);for(let h=0,a=e.length;ht(l,f,void 0,i));else{const l=Object.keys(e);r=new Array(l.length);for(let f=0,h=l.length;f{const i=s.fn(...r);return i&&(i.key=s.key),i}:s.fn)}return e}function rf(e,t,n={},s,r){if(ie.ce||ie.parent&&ut(ie.parent)&&ie.parent.ce)return t!=="default"&&(n.name=t),is(),os(xe,null,[_e("slot",n,s&&s())],64);let i=e[t];i&&i._c&&(i._d=!1),is();const o=i&&Si(i(n)),l=os(xe,{key:(n.key||o&&o.key||`_${t}`)+(!o&&s?"_fb":"")},o||(s?s():[]),o&&e._===1?64:-2);return l.scopeId&&(l.slotScopeIds=[l.scopeId+"-s"]),i&&i._c&&(i._d=!0),l}function Si(e){return e.some(t=>Kt(t)?!(t.type===he||t.type===xe&&!Si(t.children)):!0)?e:null}const ts=e=>e?Bi(e)?Mn(e):ts(e.parent):null,Mt=oe(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>ts(e.parent),$root:e=>ts(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>Ps(e),$forceUpdate:e=>e.f||(e.f=()=>{As(e.update)}),$nextTick:e=>e.n||(e.n=ni.bind(e.proxy)),$watch:e=>Bl.bind(e)}),Kn=(e,t)=>e!==Z&&!e.__isScriptSetup&&z(e,t),yl={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:s,data:r,props:i,accessCache:o,type:l,appContext:f}=e;let h;if(t[0]!=="$"){const C=o[t];if(C!==void 0)switch(C){case 1:return s[t];case 2:return r[t];case 4:return n[t];case 3:return i[t]}else{if(Kn(s,t))return o[t]=1,s[t];if(r!==Z&&z(r,t))return o[t]=2,r[t];if((h=e.propsOptions[0])&&z(h,t))return o[t]=3,i[t];if(n!==Z&&z(n,t))return o[t]=4,n[t];ns&&(o[t]=0)}}const a=Mt[t];let d,g;if(a)return t==="$attrs"&&de(e.attrs,"get",""),a(e);if((d=l.__cssModules)&&(d=d[t]))return d;if(n!==Z&&z(n,t))return o[t]=4,n[t];if(g=f.config.globalProperties,z(g,t))return g[t]},set({_:e},t,n){const{data:s,setupState:r,ctx:i}=e;return Kn(r,t)?(r[t]=n,!0):s!==Z&&z(s,t)?(s[t]=n,!0):z(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(i[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:s,appContext:r,propsOptions:i}},o){let l;return!!n[o]||e!==Z&&z(e,o)||Kn(t,o)||(l=i[0])&&z(l,o)||z(s,o)||z(Mt,o)||z(r.config.globalProperties,o)},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:z(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function of(){return bl().slots}function bl(){const e=Ns();return e.setupContext||(e.setupContext=Ui(e))}function Qs(e){return D(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}let ns=!0;function vl(e){const t=Ps(e),n=e.proxy,s=e.ctx;ns=!1,t.beforeCreate&&er(t.beforeCreate,e,"bc");const{data:r,computed:i,methods:o,watch:l,provide:f,inject:h,created:a,beforeMount:d,mounted:g,beforeUpdate:C,updated:I,activated:L,deactivated:q,beforeDestroy:V,beforeUnmount:T,destroyed:O,unmounted:_,render:R,renderTracked:B,renderTriggered:K,errorCaptured:F,serverPrefetch:S,expose:N,inheritAttrs:U,components:P,directives:Y,filters:le}=t;if(h&&xl(h,s,null),o)for(const W in o){const Q=o[W];$(Q)&&(s[W]=Q.bind(n))}if(r){const W=r.call(n,n);te(W)&&(e.data=En(W))}if(ns=!0,i)for(const W in i){const Q=i[W],nt=$(Q)?Q.bind(n,n):$(Q.get)?Q.get.bind(n,n):Ne,qt=!$(Q)&&$(Q.set)?Q.set.bind(n):Ne,st=Wi({get:nt,set:qt});Object.defineProperty(s,W,{enumerable:!0,configurable:!0,get:()=>st.value,set:Pe=>st.value=Pe})}if(l)for(const W in l)Ci(l[W],s,n,W);if(f){const W=$(f)?f.call(n):f;Reflect.ownKeys(W).forEach(Q=>{Al(Q,W[Q])})}a&&er(a,e,"c");function se(W,Q){D(Q)?Q.forEach(nt=>W(nt.bind(n))):Q&&W(Q.bind(n))}if(se(hl,d),se(Is,g),se(dl,C),se(_i,I),se(fl,L),se(ul,q),se(_l,F),se(ml,B),se(gl,K),se(Os,T),se(yi,_),se(pl,S),D(N))if(N.length){const W=e.exposed||(e.exposed={});N.forEach(Q=>{Object.defineProperty(W,Q,{get:()=>n[Q],set:nt=>n[Q]=nt})})}else e.exposed||(e.exposed={});R&&e.render===Ne&&(e.render=R),U!=null&&(e.inheritAttrs=U),P&&(e.components=P),Y&&(e.directives=Y),S&&gi(e)}function xl(e,t,n=Ne){D(e)&&(e=ss(e));for(const s in e){const r=e[s];let i;te(r)?"default"in r?i=Ft(r.from||s,r.default,!0):i=Ft(r.from||s):i=Ft(r),re(i)?Object.defineProperty(t,s,{enumerable:!0,configurable:!0,get:()=>i.value,set:o=>i.value=o}):t[s]=i}}function er(e,t,n){Oe(D(e)?e.map(s=>s.bind(t.proxy)):e.bind(t.proxy),t,n)}function Ci(e,t,n,s){let r=s.includes(".")?Di(n,s):()=>n[s];if(ne(e)){const i=t[e];$(i)&&Nt(r,i)}else if($(e))Nt(r,e.bind(n));else if(te(e))if(D(e))e.forEach(i=>Ci(i,t,n,s));else{const i=$(e.handler)?e.handler.bind(n):t[e.handler];$(i)&&Nt(r,i,e)}}function Ps(e){const t=e.type,{mixins:n,extends:s}=t,{mixins:r,optionsCache:i,config:{optionMergeStrategies:o}}=e.appContext,l=i.get(t);let f;return l?f=l:!r.length&&!n&&!s?f=t:(f={},r.length&&r.forEach(h=>hn(f,h,o,!0)),hn(f,t,o)),te(t)&&i.set(t,f),f}function hn(e,t,n,s=!1){const{mixins:r,extends:i}=t;i&&hn(e,i,n,!0),r&&r.forEach(o=>hn(e,o,n,!0));for(const o in t)if(!(s&&o==="expose")){const l=Sl[o]||n&&n[o];e[o]=l?l(e[o],t[o]):t[o]}return e}const Sl={data:tr,props:nr,emits:nr,methods:At,computed:At,beforeCreate:pe,created:pe,beforeMount:pe,mounted:pe,beforeUpdate:pe,updated:pe,beforeDestroy:pe,beforeUnmount:pe,destroyed:pe,unmounted:pe,activated:pe,deactivated:pe,errorCaptured:pe,serverPrefetch:pe,components:At,directives:At,watch:wl,provide:tr,inject:Cl};function tr(e,t){return t?e?function(){return oe($(e)?e.call(this,this):e,$(t)?t.call(this,this):t)}:t:e}function Cl(e,t){return At(ss(e),ss(t))}function ss(e){if(D(e)){const t={};for(let n=0;n1)return n&&$(t)?t.call(s&&s.proxy):t}}function Il(){return!!(fe||ie||at)}const Ei={},Ti=()=>Object.create(Ei),Ai=e=>Object.getPrototypeOf(e)===Ei;function Ol(e,t,n,s=!1){const r={},i=Ti();e.propsDefaults=Object.create(null),Ii(e,t,r,i);for(const o in e.propsOptions[0])o in r||(r[o]=void 0);n?e.props=s?r:$o(r):e.type.props?e.props=r:e.props=i,e.attrs=i}function Pl(e,t,n,s){const{props:r,attrs:i,vnode:{patchFlag:o}}=e,l=G(r),[f]=e.propsOptions;let h=!1;if((s||o>0)&&!(o&16)){if(o&8){const a=e.vnode.dynamicProps;for(let d=0;d{f=!0;const[g,C]=Oi(d,t,!0);oe(o,g),C&&l.push(...C)};!n&&t.mixins.length&&t.mixins.forEach(a),e.extends&&a(e.extends),e.mixins&&e.mixins.forEach(a)}if(!i&&!f)return te(e)&&s.set(e,mt),mt;if(D(i))for(let a=0;ae[0]==="_"||e==="$stable",Rs=e=>D(e)?e.map(Fe):[Fe(e)],Ml=(e,t,n)=>{if(t._n)return t;const s=tl((...r)=>Rs(t(...r)),n);return s._c=!1,s},Ri=(e,t,n)=>{const s=e._ctx;for(const r in e){if(Pi(r))continue;const i=e[r];if($(i))t[r]=Ml(r,i,s);else if(i!=null){const o=Rs(i);t[r]=()=>o}}},Mi=(e,t)=>{const n=Rs(t);e.slots.default=()=>n},Fi=(e,t,n)=>{for(const s in t)(n||s!=="_")&&(e[s]=t[s])},Fl=(e,t,n)=>{const s=e.slots=Ti();if(e.vnode.shapeFlag&32){const r=t._;r?(Fi(s,t,n),n&&Pr(s,"_",r,!0)):Ri(t,s)}else t&&Mi(e,t)},Nl=(e,t,n)=>{const{vnode:s,slots:r}=e;let i=!0,o=Z;if(s.shapeFlag&32){const l=t._;l?n&&l===1?i=!1:Fi(r,t,n):(i=!t.$stable,Ri(t,r)),o=t}else t&&(Mi(e,t),o={default:1});if(i)for(const l in r)!Pi(l)&&o[l]==null&&delete r[l]},ce=zl;function Ll(e){return Dl(e)}function Dl(e,t){const n=Rr();n.__VUE__=!0;const{insert:s,remove:r,patchProp:i,createElement:o,createText:l,createComment:f,setText:h,setElementText:a,parentNode:d,nextSibling:g,setScopeId:C=Ne,insertStaticContent:I}=e,L=(c,u,p,b=null,m=null,y=null,E=void 0,w=null,x=!!u.dynamicChildren)=>{if(c===u)return;c&&!Ye(c,u)&&(b=zt(c),Pe(c,m,y,!0),c=null),u.patchFlag===-2&&(x=!1,u.dynamicChildren=null);const{type:v,ref:j,shapeFlag:A}=u;switch(v){case Pn:q(c,u,p,b);break;case he:V(c,u,p,b);break;case on:c==null&&T(u,p,b,E);break;case xe:P(c,u,p,b,m,y,E,w,x);break;default:A&1?R(c,u,p,b,m,y,E,w,x):A&6?Y(c,u,p,b,m,y,E,w,x):(A&64||A&128)&&v.process(c,u,p,b,m,y,E,w,x,xt)}j!=null&&m&&es(j,c&&c.ref,y,u||c,!u)},q=(c,u,p,b)=>{if(c==null)s(u.el=l(u.children),p,b);else{const m=u.el=c.el;u.children!==c.children&&h(m,u.children)}},V=(c,u,p,b)=>{c==null?s(u.el=f(u.children||""),p,b):u.el=c.el},T=(c,u,p,b)=>{[c.el,c.anchor]=I(c.children,u,p,b,c.el,c.anchor)},O=({el:c,anchor:u},p,b)=>{let m;for(;c&&c!==u;)m=g(c),s(c,p,b),c=m;s(u,p,b)},_=({el:c,anchor:u})=>{let p;for(;c&&c!==u;)p=g(c),r(c),c=p;r(u)},R=(c,u,p,b,m,y,E,w,x)=>{u.type==="svg"?E="svg":u.type==="math"&&(E="mathml"),c==null?B(u,p,b,m,y,E,w,x):S(c,u,m,y,E,w,x)},B=(c,u,p,b,m,y,E,w)=>{let x,v;const{props:j,shapeFlag:A,transition:M,dirs:H}=c;if(x=c.el=o(c.type,y,j&&j.is,j),A&8?a(x,c.children):A&16&&F(c.children,x,null,b,m,Un(c,y),E,w),H&&rt(c,null,b,"created"),K(x,c,c.scopeId,E,b),j){for(const ee in j)ee!=="value"&&!It(ee)&&i(x,ee,null,j[ee],y,b);"value"in j&&i(x,"value",null,j.value,y),(v=j.onVnodeBeforeMount)&&we(v,b,c)}H&&rt(c,null,b,"beforeMount");const k=jl(m,M);k&&M.beforeEnter(x),s(x,u,p),((v=j&&j.onVnodeMounted)||k||H)&&ce(()=>{v&&we(v,b,c),k&&M.enter(x),H&&rt(c,null,b,"mounted")},m)},K=(c,u,p,b,m)=>{if(p&&C(c,p),b)for(let y=0;y{for(let v=x;v{const w=u.el=c.el;let{patchFlag:x,dynamicChildren:v,dirs:j}=u;x|=c.patchFlag&16;const A=c.props||Z,M=u.props||Z;let H;if(p&&it(p,!1),(H=M.onVnodeBeforeUpdate)&&we(H,p,u,c),j&&rt(u,c,p,"beforeUpdate"),p&&it(p,!0),(A.innerHTML&&M.innerHTML==null||A.textContent&&M.textContent==null)&&a(w,""),v?N(c.dynamicChildren,v,w,p,b,Un(u,m),y):E||Q(c,u,w,null,p,b,Un(u,m),y,!1),x>0){if(x&16)U(w,A,M,p,m);else if(x&2&&A.class!==M.class&&i(w,"class",null,M.class,m),x&4&&i(w,"style",A.style,M.style,m),x&8){const k=u.dynamicProps;for(let ee=0;ee{H&&we(H,p,u,c),j&&rt(u,c,p,"updated")},b)},N=(c,u,p,b,m,y,E)=>{for(let w=0;w{if(u!==p){if(u!==Z)for(const y in u)!It(y)&&!(y in p)&&i(c,y,u[y],null,m,b);for(const y in p){if(It(y))continue;const E=p[y],w=u[y];E!==w&&y!=="value"&&i(c,y,w,E,m,b)}"value"in p&&i(c,"value",u.value,p.value,m)}},P=(c,u,p,b,m,y,E,w,x)=>{const v=u.el=c?c.el:l(""),j=u.anchor=c?c.anchor:l("");let{patchFlag:A,dynamicChildren:M,slotScopeIds:H}=u;H&&(w=w?w.concat(H):H),c==null?(s(v,p,b),s(j,p,b),F(u.children||[],p,j,m,y,E,w,x)):A>0&&A&64&&M&&c.dynamicChildren?(N(c.dynamicChildren,M,p,m,y,E,w),(u.key!=null||m&&u===m.subTree)&&Ms(c,u,!0)):Q(c,u,p,j,m,y,E,w,x)},Y=(c,u,p,b,m,y,E,w,x)=>{u.slotScopeIds=w,c==null?u.shapeFlag&512?m.ctx.activate(u,p,b,E,x):le(u,p,b,m,y,E,x):Le(c,u,x)},le=(c,u,p,b,m,y,E)=>{const w=c.component=nc(c,b,m);if(An(c)&&(w.ctx.renderer=xt),sc(w,!1,E),w.asyncDep){if(m&&m.registerDep(w,se,E),!c.el){const x=w.subTree=_e(he);V(null,x,u,p)}}else se(w,c,u,p,m,y,E)},Le=(c,u,p)=>{const b=u.component=c.component;if(Gl(c,u,p))if(b.asyncDep&&!b.asyncResolved){W(b,u,p);return}else b.next=u,b.update();else u.el=c.el,b.vnode=u},se=(c,u,p,b,m,y,E)=>{const w=()=>{if(c.isMounted){let{next:A,bu:M,u:H,parent:k,vnode:ee}=c;{const be=Ni(c);if(be){A&&(A.el=ee.el,W(c,A,E)),be.asyncDep.then(()=>{c.isUnmounted||w()});return}}let J=A,ye;it(c,!1),A?(A.el=ee.el,W(c,A,E)):A=ee,M&&Ot(M),(ye=A.props&&A.props.onVnodeBeforeUpdate)&&we(ye,k,A,ee),it(c,!0);const ue=Wn(c),Te=c.subTree;c.subTree=ue,L(Te,ue,d(Te.el),zt(Te),c,m,y),A.el=ue.el,J===null&&ql(c,ue.el),H&&ce(H,m),(ye=A.props&&A.props.onVnodeUpdated)&&ce(()=>we(ye,k,A,ee),m)}else{let A;const{el:M,props:H}=u,{bm:k,m:ee,parent:J,root:ye,type:ue}=c,Te=ut(u);if(it(c,!1),k&&Ot(k),!Te&&(A=H&&H.onVnodeBeforeMount)&&we(A,J,u),it(c,!0),M&&Hs){const be=()=>{c.subTree=Wn(c),Hs(M,c.subTree,c,m,null)};Te&&ue.__asyncHydrate?ue.__asyncHydrate(M,c,be):be()}else{ye.ce&&ye.ce._injectChildStyle(ue);const be=c.subTree=Wn(c);L(null,be,p,b,c,m,y),u.el=be.el}if(ee&&ce(ee,m),!Te&&(A=H&&H.onVnodeMounted)){const be=u;ce(()=>we(A,J,be),m)}(u.shapeFlag&256||J&&ut(J.vnode)&&J.vnode.shapeFlag&256)&&c.a&&ce(c.a,m),c.isMounted=!0,u=p=b=null}};c.scope.on();const x=c.effect=new Hr(w);c.scope.off();const v=c.update=x.run.bind(x),j=c.job=x.runIfDirty.bind(x);j.i=c,j.id=c.uid,x.scheduler=()=>As(j),it(c,!0),v()},W=(c,u,p)=>{u.component=c;const b=c.vnode.props;c.vnode=u,c.next=null,Pl(c,u.props,b,p),Nl(c,u.children,p),et(),zs(c),tt()},Q=(c,u,p,b,m,y,E,w,x=!1)=>{const v=c&&c.children,j=c?c.shapeFlag:0,A=u.children,{patchFlag:M,shapeFlag:H}=u;if(M>0){if(M&128){qt(v,A,p,b,m,y,E,w,x);return}else if(M&256){nt(v,A,p,b,m,y,E,w,x);return}}H&8?(j&16&&vt(v,m,y),A!==v&&a(p,A)):j&16?H&16?qt(v,A,p,b,m,y,E,w,x):vt(v,m,y,!0):(j&8&&a(p,""),H&16&&F(A,p,b,m,y,E,w,x))},nt=(c,u,p,b,m,y,E,w,x)=>{c=c||mt,u=u||mt;const v=c.length,j=u.length,A=Math.min(v,j);let M;for(M=0;Mj?vt(c,m,y,!0,!1,A):F(u,p,b,m,y,E,w,x,A)},qt=(c,u,p,b,m,y,E,w,x)=>{let v=0;const j=u.length;let A=c.length-1,M=j-1;for(;v<=A&&v<=M;){const H=c[v],k=u[v]=x?Je(u[v]):Fe(u[v]);if(Ye(H,k))L(H,k,p,null,m,y,E,w,x);else break;v++}for(;v<=A&&v<=M;){const H=c[A],k=u[M]=x?Je(u[M]):Fe(u[M]);if(Ye(H,k))L(H,k,p,null,m,y,E,w,x);else break;A--,M--}if(v>A){if(v<=M){const H=M+1,k=HM)for(;v<=A;)Pe(c[v],m,y,!0),v++;else{const H=v,k=v,ee=new Map;for(v=k;v<=M;v++){const ve=u[v]=x?Je(u[v]):Fe(u[v]);ve.key!=null&&ee.set(ve.key,v)}let J,ye=0;const ue=M-k+1;let Te=!1,be=0;const St=new Array(ue);for(v=0;v=ue){Pe(ve,m,y,!0);continue}let Re;if(ve.key!=null)Re=ee.get(ve.key);else for(J=k;J<=M;J++)if(St[J-k]===0&&Ye(ve,u[J])){Re=J;break}Re===void 0?Pe(ve,m,y,!0):(St[Re-k]=v+1,Re>=be?be=Re:Te=!0,L(ve,u[Re],p,null,m,y,E,w,x),ye++)}const $s=Te?Hl(St):mt;for(J=$s.length-1,v=ue-1;v>=0;v--){const ve=k+v,Re=u[ve],Vs=ve+1{const{el:y,type:E,transition:w,children:x,shapeFlag:v}=c;if(v&6){st(c.component.subTree,u,p,b);return}if(v&128){c.suspense.move(u,p,b);return}if(v&64){E.move(c,u,p,xt);return}if(E===xe){s(y,u,p);for(let A=0;Aw.enter(y),m);else{const{leave:A,delayLeave:M,afterLeave:H}=w,k=()=>s(y,u,p),ee=()=>{A(y,()=>{k(),H&&H()})};M?M(y,k,ee):ee()}else s(y,u,p)},Pe=(c,u,p,b=!1,m=!1)=>{const{type:y,props:E,ref:w,children:x,dynamicChildren:v,shapeFlag:j,patchFlag:A,dirs:M,cacheIndex:H}=c;if(A===-2&&(m=!1),w!=null&&es(w,null,p,c,!0),H!=null&&(u.renderCache[H]=void 0),j&256){u.ctx.deactivate(c);return}const k=j&1&&M,ee=!ut(c);let J;if(ee&&(J=E&&E.onVnodeBeforeUnmount)&&we(J,u,c),j&6)eo(c.component,p,b);else{if(j&128){c.suspense.unmount(p,b);return}k&&rt(c,null,u,"beforeUnmount"),j&64?c.type.remove(c,u,p,xt,b):v&&!v.hasOnce&&(y!==xe||A>0&&A&64)?vt(v,u,p,!1,!0):(y===xe&&A&384||!m&&j&16)&&vt(x,u,p),b&&Ls(c)}(ee&&(J=E&&E.onVnodeUnmounted)||k)&&ce(()=>{J&&we(J,u,c),k&&rt(c,null,u,"unmounted")},p)},Ls=c=>{const{type:u,el:p,anchor:b,transition:m}=c;if(u===xe){Qi(p,b);return}if(u===on){_(c);return}const y=()=>{r(p),m&&!m.persisted&&m.afterLeave&&m.afterLeave()};if(c.shapeFlag&1&&m&&!m.persisted){const{leave:E,delayLeave:w}=m,x=()=>E(p,y);w?w(c.el,y,x):x()}else y()},Qi=(c,u)=>{let p;for(;c!==u;)p=g(c),r(c),c=p;r(u)},eo=(c,u,p)=>{const{bum:b,scope:m,job:y,subTree:E,um:w,m:x,a:v}=c;dn(x),dn(v),b&&Ot(b),m.stop(),y&&(y.flags|=8,Pe(E,c,u,p)),w&&ce(w,u),ce(()=>{c.isUnmounted=!0},u),u&&u.pendingBranch&&!u.isUnmounted&&c.asyncDep&&!c.asyncResolved&&c.suspenseId===u.pendingId&&(u.deps--,u.deps===0&&u.resolve())},vt=(c,u,p,b=!1,m=!1,y=0)=>{for(let E=y;E{if(c.shapeFlag&6)return zt(c.component.subTree);if(c.shapeFlag&128)return c.suspense.next();const u=g(c.anchor||c.el),p=u&&u[li];return p?g(p):u};let Nn=!1;const Ds=(c,u,p)=>{c==null?u._vnode&&Pe(u._vnode,null,null,!0):L(u._vnode||null,c,u,null,null,null,p),u._vnode=c,Nn||(Nn=!0,zs(),ri(),Nn=!1)},xt={p:L,um:Pe,m:st,r:Ls,mt:le,mc:F,pc:Q,pbc:N,n:zt,o:e};let js,Hs;return{render:Ds,hydrate:js,createApp:Tl(Ds,js)}}function Un({type:e,props:t},n){return n==="svg"&&e==="foreignObject"||n==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function it({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function jl(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function Ms(e,t,n=!1){const s=e.children,r=t.children;if(D(s)&&D(r))for(let i=0;i>1,e[n[l]]0&&(t[s]=n[i-1]),n[i]=s)}}for(i=n.length,o=n[i-1];i-- >0;)n[i]=o,o=t[o];return n}function Ni(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:Ni(t)}function dn(e){if(e)for(let t=0;tFt($l);function Nt(e,t,n){return Li(e,t,n)}function Li(e,t,n=Z){const{immediate:s,deep:r,flush:i,once:o}=n,l=oe({},n);let f;if(Rn)if(i==="sync"){const g=Vl();f=g.__watcherHandles||(g.__watcherHandles=[])}else if(!t||s)l.once=!0;else return{stop:Ne,resume:Ne,pause:Ne};const h=fe;l.call=(g,C,I)=>Oe(g,h,C,I);let a=!1;i==="post"?l.scheduler=g=>{ce(g,h&&h.suspense)}:i!=="sync"&&(a=!0,l.scheduler=(g,C)=>{C?g():As(g)}),l.augmentJob=g=>{t&&(g.flags|=4),a&&(g.flags|=2,h&&(g.id=h.uid,g.i=h))};const d=Xo(e,t,l);return f&&f.push(d),d}function Bl(e,t,n){const s=this.proxy,r=ne(e)?e.includes(".")?Di(s,e):()=>s[e]:e.bind(s,s);let i;$(t)?i=t:(i=t.handler,n=t);const o=Gt(this),l=Li(r,i.bind(s),n);return o(),l}function Di(e,t){const n=t.split(".");return()=>{let s=e;for(let r=0;rt==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${Ie(t)}Modifiers`]||e[`${Qe(t)}Modifiers`];function Ul(e,t,...n){if(e.isUnmounted)return;const s=e.vnode.props||Z;let r=n;const i=t.startsWith("update:"),o=i&&Kl(s,t.slice(7));o&&(o.trim&&(r=n.map(a=>ne(a)?a.trim():a)),o.number&&(r=n.map(lo)));let l,f=s[l=Ln(t)]||s[l=Ln(Ie(t))];!f&&i&&(f=s[l=Ln(Qe(t))]),f&&Oe(f,e,6,r);const h=s[l+"Once"];if(h){if(!e.emitted)e.emitted={};else if(e.emitted[l])return;e.emitted[l]=!0,Oe(h,e,6,r)}}function ji(e,t,n=!1){const s=t.emitsCache,r=s.get(e);if(r!==void 0)return r;const i=e.emits;let o={},l=!1;if(!$(e)){const f=h=>{const a=ji(h,t,!0);a&&(l=!0,oe(o,a))};!n&&t.mixins.length&&t.mixins.forEach(f),e.extends&&f(e.extends),e.mixins&&e.mixins.forEach(f)}return!i&&!l?(te(e)&&s.set(e,null),null):(D(i)?i.forEach(f=>o[f]=null):oe(o,i),te(e)&&s.set(e,o),o)}function On(e,t){return!e||!_n(t)?!1:(t=t.slice(2).replace(/Once$/,""),z(e,t[0].toLowerCase()+t.slice(1))||z(e,Qe(t))||z(e,t))}function Wn(e){const{type:t,vnode:n,proxy:s,withProxy:r,propsOptions:[i],slots:o,attrs:l,emit:f,render:h,renderCache:a,props:d,data:g,setupState:C,ctx:I,inheritAttrs:L}=e,q=an(e);let V,T;try{if(n.shapeFlag&4){const _=r||s,R=_;V=Fe(h.call(R,_,a,d,C,g,I)),T=l}else{const _=t;V=Fe(_.length>1?_(d,{attrs:l,slots:o,emit:f}):_(d,null)),T=t.props?l:Wl(l)}}catch(_){Lt.length=0,Tn(_,e,1),V=_e(he)}let O=V;if(T&&L!==!1){const _=Object.keys(T),{shapeFlag:R}=O;_.length&&R&7&&(i&&_.some(ds)&&(T=kl(T,i)),O=Be(O,T,!1,!0))}return n.dirs&&(O=Be(O,null,!1,!0),O.dirs=O.dirs?O.dirs.concat(n.dirs):n.dirs),n.transition&&bt(O,n.transition),V=O,an(q),V}const Wl=e=>{let t;for(const n in e)(n==="class"||n==="style"||_n(n))&&((t||(t={}))[n]=e[n]);return t},kl=(e,t)=>{const n={};for(const s in e)(!ds(s)||!(s.slice(9)in t))&&(n[s]=e[s]);return n};function Gl(e,t,n){const{props:s,children:r,component:i}=e,{props:o,children:l,patchFlag:f}=t,h=i.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&f>=0){if(f&1024)return!0;if(f&16)return s?rr(s,o,h):!!o;if(f&8){const a=t.dynamicProps;for(let d=0;de.__isSuspense;function zl(e,t){t&&t.pendingBranch?D(e)?t.effects.push(...e):t.effects.push(e):el(e)}const xe=Symbol.for("v-fgt"),Pn=Symbol.for("v-txt"),he=Symbol.for("v-cmt"),on=Symbol.for("v-stc"),Lt=[];let Se=null;function is(e=!1){Lt.push(Se=e?null:[])}function Jl(){Lt.pop(),Se=Lt[Lt.length-1]||null}let Bt=1;function ir(e){Bt+=e,e<0&&Se&&(Se.hasOnce=!0)}function Hi(e){return e.dynamicChildren=Bt>0?Se||mt:null,Jl(),Bt>0&&Se&&Se.push(e),e}function lf(e,t,n,s,r,i){return Hi(Vi(e,t,n,s,r,i,!0))}function os(e,t,n,s,r){return Hi(_e(e,t,n,s,r,!0))}function Kt(e){return e?e.__v_isVNode===!0:!1}function Ye(e,t){return e.type===t.type&&e.key===t.key}const $i=({key:e})=>e??null,ln=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?ne(e)||re(e)||$(e)?{i:ie,r:e,k:t,f:!!n}:e:null);function Vi(e,t=null,n=null,s=0,r=null,i=e===xe?0:1,o=!1,l=!1){const f={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&$i(t),ref:t&&ln(t),scopeId:oi,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:i,patchFlag:s,dynamicProps:r,dynamicChildren:null,appContext:null,ctx:ie};return l?(Fs(f,n),i&128&&e.normalize(f)):n&&(f.shapeFlag|=ne(n)?8:16),Bt>0&&!o&&Se&&(f.patchFlag>0||i&6)&&f.patchFlag!==32&&Se.push(f),f}const _e=Yl;function Yl(e,t=null,n=null,s=0,r=null,i=!1){if((!e||e===vi)&&(e=he),Kt(e)){const l=Be(e,t,!0);return n&&Fs(l,n),Bt>0&&!i&&Se&&(l.shapeFlag&6?Se[Se.indexOf(e)]=l:Se.push(l)),l.patchFlag=-2,l}if(oc(e)&&(e=e.__vccOpts),t){t=Xl(t);let{class:l,style:f}=t;l&&!ne(l)&&(t.class=xn(l)),te(f)&&(Ss(f)&&!D(f)&&(f=oe({},f)),t.style=vn(f))}const o=ne(e)?1:pn(e)?128:ci(e)?64:te(e)?4:$(e)?2:0;return Vi(e,t,n,s,r,o,i,!0)}function Xl(e){return e?Ss(e)||Ai(e)?oe({},e):e:null}function Be(e,t,n=!1,s=!1){const{props:r,ref:i,patchFlag:o,children:l,transition:f}=e,h=t?Ql(r||{},t):r,a={__v_isVNode:!0,__v_skip:!0,type:e.type,props:h,key:h&&$i(h),ref:t&&t.ref?n&&i?D(i)?i.concat(ln(t)):[i,ln(t)]:ln(t):i,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:l,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==xe?o===-1?16:o|16:o,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:f,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Be(e.ssContent),ssFallback:e.ssFallback&&Be(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return f&&s&&bt(a,f.clone(a)),a}function Zl(e=" ",t=0){return _e(Pn,null,e,t)}function cf(e,t){const n=_e(on,null,e);return n.staticCount=t,n}function ff(e="",t=!1){return t?(is(),os(he,null,e)):_e(he,null,e)}function Fe(e){return e==null||typeof e=="boolean"?_e(he):D(e)?_e(xe,null,e.slice()):typeof e=="object"?Je(e):_e(Pn,null,String(e))}function Je(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Be(e)}function Fs(e,t){let n=0;const{shapeFlag:s}=e;if(t==null)t=null;else if(D(t))n=16;else if(typeof t=="object")if(s&65){const r=t.default;r&&(r._c&&(r._d=!1),Fs(e,r()),r._c&&(r._d=!0));return}else{n=32;const r=t._;!r&&!Ai(t)?t._ctx=ie:r===3&&ie&&(ie.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else $(t)?(t={default:t,_ctx:ie},n=32):(t=String(t),s&64?(n=16,t=[Zl(t)]):n=8);e.children=t,e.shapeFlag|=n}function Ql(...e){const t={};for(let n=0;nfe||ie;let gn,ls;{const e=Rr(),t=(n,s)=>{let r;return(r=e[n])||(r=e[n]=[]),r.push(s),i=>{r.length>1?r.forEach(o=>o(i)):r[0](i)}};gn=t("__VUE_INSTANCE_SETTERS__",n=>fe=n),ls=t("__VUE_SSR_SETTERS__",n=>Rn=n)}const Gt=e=>{const t=fe;return gn(e),e.scope.on(),()=>{e.scope.off(),gn(t)}},or=()=>{fe&&fe.scope.off(),gn(null)};function Bi(e){return e.vnode.shapeFlag&4}let Rn=!1;function sc(e,t=!1,n=!1){t&&ls(t);const{props:s,children:r}=e.vnode,i=Bi(e);Ol(e,s,i,t),Fl(e,r,n);const o=i?rc(e,t):void 0;return t&&ls(!1),o}function rc(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,yl);const{setup:s}=n;if(s){const r=e.setupContext=s.length>1?Ui(e):null,i=Gt(e);et();const o=kt(s,e,0,[e.props,r]);if(tt(),i(),Ar(o)){if(ut(e)||gi(e),o.then(or,or),t)return o.then(l=>{lr(e,l,t)}).catch(l=>{Tn(l,e,0)});e.asyncDep=o}else lr(e,o,t)}else Ki(e,t)}function lr(e,t,n){$(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:te(t)&&(e.setupState=Qr(t)),Ki(e,n)}let cr;function Ki(e,t,n){const s=e.type;if(!e.render){if(!t&&cr&&!s.render){const r=s.template||Ps(e).template;if(r){const{isCustomElement:i,compilerOptions:o}=e.appContext.config,{delimiters:l,compilerOptions:f}=s,h=oe(oe({isCustomElement:i,delimiters:l},o),f);s.render=cr(r,h)}}e.render=s.render||Ne}{const r=Gt(e);et();try{vl(e)}finally{tt(),r()}}}const ic={get(e,t){return de(e,"get",""),e[t]}};function Ui(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,ic),slots:e.slots,emit:e.emit,expose:t}}function Mn(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(Qr(Cs(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in Mt)return Mt[n](e)},has(t,n){return n in t||n in Mt}})):e.proxy}function cs(e,t=!0){return $(e)?e.displayName||e.name:e.name||t&&e.__name}function oc(e){return $(e)&&"__vccOpts"in e}const Wi=(e,t)=>Jo(e,t,Rn);function lc(e,t,n){const s=arguments.length;return s===2?te(t)&&!D(t)?Kt(t)?_e(e,null,[t]):_e(e,t):_e(e,null,t):(s>3?n=Array.prototype.slice.call(arguments,2):s===3&&Kt(n)&&(n=[n]),_e(e,t,n))}const cc="3.5.4";/** +* @vue/runtime-dom v3.5.4 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/let fs;const fr=typeof window<"u"&&window.trustedTypes;if(fr)try{fs=fr.createPolicy("vue",{createHTML:e=>e})}catch{}const ki=fs?e=>fs.createHTML(e):e=>e,fc="http://www.w3.org/2000/svg",uc="http://www.w3.org/1998/Math/MathML",je=typeof document<"u"?document:null,ur=je&&je.createElement("template"),ac={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,s)=>{const r=t==="svg"?je.createElementNS(fc,e):t==="mathml"?je.createElementNS(uc,e):n?je.createElement(e,{is:n}):je.createElement(e);return e==="select"&&s&&s.multiple!=null&&r.setAttribute("multiple",s.multiple),r},createText:e=>je.createTextNode(e),createComment:e=>je.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>je.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,s,r,i){const o=n?n.previousSibling:t.lastChild;if(r&&(r===i||r.nextSibling))for(;t.insertBefore(r.cloneNode(!0),n),!(r===i||!(r=r.nextSibling)););else{ur.innerHTML=ki(s==="svg"?`${e}`:s==="mathml"?`${e}`:e);const l=ur.content;if(s==="svg"||s==="mathml"){const f=l.firstChild;for(;f.firstChild;)l.appendChild(f.firstChild);l.removeChild(f)}t.insertBefore(l,n)}return[o?o.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},We="transition",wt="animation",Ut=Symbol("_vtc"),Gi={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},hc=oe({},ui,Gi),dc=e=>(e.displayName="Transition",e.props=hc,e),uf=dc((e,{slots:t})=>lc(ll,pc(e),t)),ot=(e,t=[])=>{D(e)?e.forEach(n=>n(...t)):e&&e(...t)},ar=e=>e?D(e)?e.some(t=>t.length>1):e.length>1:!1;function pc(e){const t={};for(const P in e)P in Gi||(t[P]=e[P]);if(e.css===!1)return t;const{name:n="v",type:s,duration:r,enterFromClass:i=`${n}-enter-from`,enterActiveClass:o=`${n}-enter-active`,enterToClass:l=`${n}-enter-to`,appearFromClass:f=i,appearActiveClass:h=o,appearToClass:a=l,leaveFromClass:d=`${n}-leave-from`,leaveActiveClass:g=`${n}-leave-active`,leaveToClass:C=`${n}-leave-to`}=e,I=gc(r),L=I&&I[0],q=I&&I[1],{onBeforeEnter:V,onEnter:T,onEnterCancelled:O,onLeave:_,onLeaveCancelled:R,onBeforeAppear:B=V,onAppear:K=T,onAppearCancelled:F=O}=t,S=(P,Y,le)=>{lt(P,Y?a:l),lt(P,Y?h:o),le&&le()},N=(P,Y)=>{P._isLeaving=!1,lt(P,d),lt(P,C),lt(P,g),Y&&Y()},U=P=>(Y,le)=>{const Le=P?K:T,se=()=>S(Y,P,le);ot(Le,[Y,se]),hr(()=>{lt(Y,P?f:i),ke(Y,P?a:l),ar(Le)||dr(Y,s,L,se)})};return oe(t,{onBeforeEnter(P){ot(V,[P]),ke(P,i),ke(P,o)},onBeforeAppear(P){ot(B,[P]),ke(P,f),ke(P,h)},onEnter:U(!1),onAppear:U(!0),onLeave(P,Y){P._isLeaving=!0;const le=()=>N(P,Y);ke(P,d),ke(P,g),yc(),hr(()=>{P._isLeaving&&(lt(P,d),ke(P,C),ar(_)||dr(P,s,q,le))}),ot(_,[P,le])},onEnterCancelled(P){S(P,!1),ot(O,[P])},onAppearCancelled(P){S(P,!0),ot(F,[P])},onLeaveCancelled(P){N(P),ot(R,[P])}})}function gc(e){if(e==null)return null;if(te(e))return[kn(e.enter),kn(e.leave)];{const t=kn(e);return[t,t]}}function kn(e){return co(e)}function ke(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[Ut]||(e[Ut]=new Set)).add(t)}function lt(e,t){t.split(/\s+/).forEach(s=>s&&e.classList.remove(s));const n=e[Ut];n&&(n.delete(t),n.size||(e[Ut]=void 0))}function hr(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let mc=0;function dr(e,t,n,s){const r=e._endId=++mc,i=()=>{r===e._endId&&s()};if(n)return setTimeout(i,n);const{type:o,timeout:l,propCount:f}=_c(e,t);if(!o)return s();const h=o+"end";let a=0;const d=()=>{e.removeEventListener(h,g),i()},g=C=>{C.target===e&&++a>=f&&d()};setTimeout(()=>{a(n[I]||"").split(", "),r=s(`${We}Delay`),i=s(`${We}Duration`),o=pr(r,i),l=s(`${wt}Delay`),f=s(`${wt}Duration`),h=pr(l,f);let a=null,d=0,g=0;t===We?o>0&&(a=We,d=o,g=i.length):t===wt?h>0&&(a=wt,d=h,g=f.length):(d=Math.max(o,h),a=d>0?o>h?We:wt:null,g=a?a===We?i.length:f.length:0);const C=a===We&&/\b(transform|all)(,|$)/.test(s(`${We}Property`).toString());return{type:a,timeout:d,propCount:g,hasTransform:C}}function pr(e,t){for(;e.lengthgr(n)+gr(e[s])))}function gr(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function yc(){return document.body.offsetHeight}function bc(e,t,n){const s=e[Ut];s&&(t=(t?[t,...s]:[...s]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const mn=Symbol("_vod"),qi=Symbol("_vsh"),af={beforeMount(e,{value:t},{transition:n}){e[mn]=e.style.display==="none"?"":e.style.display,n&&t?n.beforeEnter(e):Et(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:s}){!t!=!n&&(s?t?(s.beforeEnter(e),Et(e,!0),s.enter(e)):s.leave(e,()=>{Et(e,!1)}):Et(e,t))},beforeUnmount(e,{value:t}){Et(e,t)}};function Et(e,t){e.style.display=t?e[mn]:"none",e[qi]=!t}const vc=Symbol(""),xc=/(^|;)\s*display\s*:/;function Sc(e,t,n){const s=e.style,r=ne(n);let i=!1;if(n&&!r){if(t)if(ne(t))for(const o of t.split(";")){const l=o.slice(0,o.indexOf(":")).trim();n[l]==null&&cn(s,l,"")}else for(const o in t)n[o]==null&&cn(s,o,"");for(const o in n)o==="display"&&(i=!0),cn(s,o,n[o])}else if(r){if(t!==n){const o=s[vc];o&&(n+=";"+o),s.cssText=n,i=xc.test(n)}}else t&&e.removeAttribute("style");mn in e&&(e[mn]=i?s.display:"",e[qi]&&(s.display="none"))}const mr=/\s*!important$/;function cn(e,t,n){if(D(n))n.forEach(s=>cn(e,t,s));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const s=Cc(e,t);mr.test(n)?e.setProperty(Qe(s),n.replace(mr,""),"important"):e[s]=n}}const _r=["Webkit","Moz","ms"],Gn={};function Cc(e,t){const n=Gn[t];if(n)return n;let s=Ie(t);if(s!=="filter"&&s in e)return Gn[t]=s;s=bn(s);for(let r=0;r<_r.length;r++){const i=_r[r]+s;if(i in e)return Gn[t]=i}return t}const yr="http://www.w3.org/1999/xlink";function br(e,t,n,s,r,i=go(t)){s&&t.startsWith("xlink:")?n==null?e.removeAttributeNS(yr,t.slice(6,t.length)):e.setAttributeNS(yr,t,n):n==null||i&&!Mr(n)?e.removeAttribute(t):e.setAttribute(t,i?"":Ze(n)?String(n):n)}function wc(e,t,n,s){if(t==="innerHTML"||t==="textContent"){n!=null&&(e[t]=t==="innerHTML"?ki(n):n);return}const r=e.tagName;if(t==="value"&&r!=="PROGRESS"&&!r.includes("-")){const o=r==="OPTION"?e.getAttribute("value")||"":e.value,l=n==null?e.type==="checkbox"?"on":"":String(n);(o!==l||!("_value"in e))&&(e.value=l),n==null&&e.removeAttribute(t),e._value=n;return}let i=!1;if(n===""||n==null){const o=typeof e[t];o==="boolean"?n=Mr(n):n==null&&o==="string"?(n="",i=!0):o==="number"&&(n=0,i=!0)}try{e[t]=n}catch{}i&&e.removeAttribute(t)}function Ec(e,t,n,s){e.addEventListener(t,n,s)}function Tc(e,t,n,s){e.removeEventListener(t,n,s)}const vr=Symbol("_vei");function Ac(e,t,n,s,r=null){const i=e[vr]||(e[vr]={}),o=i[t];if(s&&o)o.value=s;else{const[l,f]=Ic(t);if(s){const h=i[t]=Rc(s,r);Ec(e,l,h,f)}else o&&(Tc(e,l,o,f),i[t]=void 0)}}const xr=/(?:Once|Passive|Capture)$/;function Ic(e){let t;if(xr.test(e)){t={};let s;for(;s=e.match(xr);)e=e.slice(0,e.length-s[0].length),t[s[0].toLowerCase()]=!0}return[e[2]===":"?e.slice(3):Qe(e.slice(2)),t]}let qn=0;const Oc=Promise.resolve(),Pc=()=>qn||(Oc.then(()=>qn=0),qn=Date.now());function Rc(e,t){const n=s=>{if(!s._vts)s._vts=Date.now();else if(s._vts<=n.attached)return;Oe(Mc(s,n.value),t,5,[s])};return n.value=e,n.attached=Pc(),n}function Mc(e,t){if(D(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(s=>r=>!r._stopped&&s&&s(r))}else return t}const Sr=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,Fc=(e,t,n,s,r,i)=>{const o=r==="svg";t==="class"?bc(e,s,o):t==="style"?Sc(e,n,s):_n(t)?ds(t)||Ac(e,t,n,s,i):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):Nc(e,t,s,o))?(wc(e,t,s),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&br(e,t,s,o,i,t!=="value")):(t==="true-value"?e._trueValue=s:t==="false-value"&&(e._falseValue=s),br(e,t,s,o))};function Nc(e,t,n,s){if(s)return!!(t==="innerHTML"||t==="textContent"||t in e&&Sr(t)&&$(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const r=e.tagName;if(r==="IMG"||r==="VIDEO"||r==="CANVAS"||r==="SOURCE")return!1}return Sr(t)&&ne(n)?!1:!!(t in e||e._isVueCE&&(/[A-Z]/.test(t)||!ne(n)))}const Lc=["ctrl","shift","alt","meta"],Dc={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>Lc.some(n=>e[`${n}Key`]&&!t.includes(n))},hf=(e,t)=>{const n=e._withMods||(e._withMods={}),s=t.join(".");return n[s]||(n[s]=(r,...i)=>{for(let o=0;o{const n=e._withKeys||(e._withKeys={}),s=t.join(".");return n[s]||(n[s]=r=>{if(!("key"in r))return;const i=Qe(r.key);if(t.some(o=>o===i||jc[o]===i))return e(r)})},Hc=oe({patchProp:Fc},ac);let Cr;function zi(){return Cr||(Cr=Ll(Hc))}const pf=(...e)=>{zi().render(...e)},gf=(...e)=>{const t=zi().createApp(...e),{mount:n}=t;return t.mount=s=>{const r=Vc(s);if(!r)return;const i=t._component;!$(i)&&!i.render&&!i.template&&(i.template=r.innerHTML),r.nodeType===1&&(r.textContent="");const o=n(r,!1,$c(r));return r instanceof Element&&(r.removeAttribute("v-cloak"),r.setAttribute("data-v-app","")),o},t};function $c(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function Vc(e){return ne(e)?document.querySelector(e):e}var Bc=!1;/*! + * pinia v2.2.2 + * (c) 2024 Eduardo San Martin Morote + * @license MIT + */let Ji;const Fn=e=>Ji=e,Yi=Symbol();function us(e){return e&&typeof e=="object"&&Object.prototype.toString.call(e)==="[object Object]"&&typeof e.toJSON!="function"}var Dt;(function(e){e.direct="direct",e.patchObject="patch object",e.patchFunction="patch function"})(Dt||(Dt={}));function mf(){const e=Dr(!0),t=e.run(()=>Es({}));let n=[],s=[];const r=Cs({install(i){Fn(r),r._a=i,i.provide(Yi,r),i.config.globalProperties.$pinia=r,s.forEach(o=>n.push(o)),s=[]},use(i){return!this._a&&!Bc?s.push(i):n.push(i),this},_p:n,_a:null,_e:e,_s:new Map,state:t});return r}const Xi=()=>{};function wr(e,t,n,s=Xi){e.push(t);const r=()=>{const i=e.indexOf(t);i>-1&&(e.splice(i,1),s())};return!n&&jr()&&_o(r),r}function pt(e,...t){e.slice().forEach(n=>{n(...t)})}const Kc=e=>e(),Er=Symbol(),zn=Symbol();function as(e,t){e instanceof Map&&t instanceof Map?t.forEach((n,s)=>e.set(s,n)):e instanceof Set&&t instanceof Set&&t.forEach(e.add,e);for(const n in t){if(!t.hasOwnProperty(n))continue;const s=t[n],r=e[n];us(r)&&us(s)&&e.hasOwnProperty(n)&&!re(s)&&!Ve(s)?e[n]=as(r,s):e[n]=s}return e}const Uc=Symbol();function Wc(e){return!us(e)||!e.hasOwnProperty(Uc)}const{assign:Ge}=Object;function kc(e){return!!(re(e)&&e.effect)}function Gc(e,t,n,s){const{state:r,actions:i,getters:o}=t,l=n.state.value[e];let f;function h(){l||(n.state.value[e]=r?r():{});const a=Wo(n.state.value[e]);return Ge(a,i,Object.keys(o||{}).reduce((d,g)=>(d[g]=Cs(Wi(()=>{Fn(n);const C=n._s.get(e);return o[g].call(C,C)})),d),{}))}return f=Zi(e,h,t,n,s,!0),f}function Zi(e,t,n={},s,r,i){let o;const l=Ge({actions:{}},n),f={deep:!0};let h,a,d=[],g=[],C;const I=s.state.value[e];!i&&!I&&(s.state.value[e]={}),Es({});let L;function q(F){let S;h=a=!1,typeof F=="function"?(F(s.state.value[e]),S={type:Dt.patchFunction,storeId:e,events:C}):(as(s.state.value[e],F),S={type:Dt.patchObject,payload:F,storeId:e,events:C});const N=L=Symbol();ni().then(()=>{L===N&&(h=!0)}),a=!0,pt(d,S,s.state.value[e])}const V=i?function(){const{state:S}=n,N=S?S():{};this.$patch(U=>{Ge(U,N)})}:Xi;function T(){o.stop(),d=[],g=[],s._s.delete(e)}const O=(F,S="")=>{if(Er in F)return F[zn]=S,F;const N=function(){Fn(s);const U=Array.from(arguments),P=[],Y=[];function le(W){P.push(W)}function Le(W){Y.push(W)}pt(g,{args:U,name:N[zn],store:R,after:le,onError:Le});let se;try{se=F.apply(this&&this.$id===e?this:R,U)}catch(W){throw pt(Y,W),W}return se instanceof Promise?se.then(W=>(pt(P,W),W)).catch(W=>(pt(Y,W),Promise.reject(W))):(pt(P,se),se)};return N[Er]=!0,N[zn]=S,N},_={_p:s,$id:e,$onAction:wr.bind(null,g),$patch:q,$reset:V,$subscribe(F,S={}){const N=wr(d,F,S.detached,()=>U()),U=o.run(()=>Nt(()=>s.state.value[e],P=>{(S.flush==="sync"?a:h)&&F({storeId:e,type:Dt.direct,events:C},P)},Ge({},f,S)));return N},$dispose:T},R=En(_);s._s.set(e,R);const K=(s._a&&s._a.runWithContext||Kc)(()=>s._e.run(()=>(o=Dr()).run(()=>t({action:O}))));for(const F in K){const S=K[F];if(re(S)&&!kc(S)||Ve(S))i||(I&&Wc(S)&&(re(S)?S.value=I[F]:as(S,I[F])),s.state.value[e][F]=S);else if(typeof S=="function"){const N=O(S,F);K[F]=N,l.actions[F]=S}}return Ge(R,K),Ge(G(R),K),Object.defineProperty(R,"$state",{get:()=>s.state.value[e],set:F=>{q(S=>{Ge(S,F)})}}),s._p.forEach(F=>{Ge(R,o.run(()=>F({store:R,app:s._a,pinia:s,options:l})))}),I&&i&&n.hydrate&&n.hydrate(R.$state,I),h=!0,a=!0,R}function _f(e,t,n){let s,r;const i=typeof t=="function";typeof e=="string"?(s=e,r=i?n:t):(r=e,s=e.id);function o(l,f){const h=Il();return l=l||(h?Ft(Yi,null):null),l&&Fn(l),l=Ji,l._s.has(s)||(i?Zi(s,t,r,l):Gc(s,r,l)),l._s.get(s)}return o.$id=s,o}function yf(e){{e=G(e);const t={};for(const n in e){const s=e[n];(re(s)||Ve(s))&&(t[n]=qo(e,n))}return t}}const bf=(e,t)=>{const n=e.__vccOpts||e;for(const[s,r]of t)n[s]=r;return n};export{Al as $,re as A,os as B,qc as C,Xl as D,tf as E,xe as F,lc as G,pf as H,rf as I,hf as J,uf as K,jr as L,_o as M,dl as N,Yc as O,af as P,df as Q,Wo as R,Ns as S,Xc as T,Os as U,zc as V,Jc as W,cf as X,yf as Y,G as Z,bf as _,Vi as a,hl as a0,Qc as a1,mf as a2,gf as a3,ef as a4,Zl as b,lf as c,_f as d,ff as e,Es as f,En as g,xn as h,Ft as i,Wi as j,Zc as k,of as l,qo as m,vn as n,is as o,Is as p,ni as q,nf as r,yi as s,mo as t,Bo as u,_e as v,Nt as w,sf as x,tl as y,Ql as z}; diff --git a/assets/assets/pinia-BT83akCX.js b/assets/assets/pinia-BT83akCX.js new file mode 100644 index 000000000..af6beeba3 --- /dev/null +++ b/assets/assets/pinia-BT83akCX.js @@ -0,0 +1,7978 @@ +/** +* @vue/shared v3.5.4 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/ +/*! #__NO_SIDE_EFFECTS__ */ +// @__NO_SIDE_EFFECTS__ +function makeMap(str) { + const map = /* @__PURE__ */ Object.create(null); + for (const key of str.split(",")) map[key] = 1; + return (val) => val in map; +} +const EMPTY_OBJ = {}; +const EMPTY_ARR = []; +const NOOP = () => { +}; +const NO = () => false; +const isOn = (key) => key.charCodeAt(0) === 111 && key.charCodeAt(1) === 110 && // uppercase letter +(key.charCodeAt(2) > 122 || key.charCodeAt(2) < 97); +const isModelListener = (key) => key.startsWith("onUpdate:"); +const extend = Object.assign; +const remove = (arr, el) => { + const i = arr.indexOf(el); + if (i > -1) { + arr.splice(i, 1); + } +}; +const hasOwnProperty$1 = Object.prototype.hasOwnProperty; +const hasOwn = (val, key) => hasOwnProperty$1.call(val, key); +const isArray = Array.isArray; +const isMap = (val) => toTypeString(val) === "[object Map]"; +const isSet = (val) => toTypeString(val) === "[object Set]"; +const isRegExp = (val) => toTypeString(val) === "[object RegExp]"; +const isFunction = (val) => typeof val === "function"; +const isString = (val) => typeof val === "string"; +const isSymbol = (val) => typeof val === "symbol"; +const isObject = (val) => val !== null && typeof val === "object"; +const isPromise = (val) => { + return (isObject(val) || isFunction(val)) && isFunction(val.then) && isFunction(val.catch); +}; +const objectToString = Object.prototype.toString; +const toTypeString = (value) => objectToString.call(value); +const toRawType = (value) => { + return toTypeString(value).slice(8, -1); +}; +const isPlainObject$1 = (val) => toTypeString(val) === "[object Object]"; +const isIntegerKey = (key) => isString(key) && key !== "NaN" && key[0] !== "-" && "" + parseInt(key, 10) === key; +const isReservedProp = /* @__PURE__ */ makeMap( + // the leading comma is intentional so empty string "" is also included + ",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted" +); +const cacheStringFunction = (fn) => { + const cache = /* @__PURE__ */ Object.create(null); + return (str) => { + const hit = cache[str]; + return hit || (cache[str] = fn(str)); + }; +}; +const camelizeRE = /-(\w)/g; +const camelize = cacheStringFunction( + (str) => { + return str.replace(camelizeRE, (_, c) => c ? c.toUpperCase() : ""); + } +); +const hyphenateRE = /\B([A-Z])/g; +const hyphenate = cacheStringFunction( + (str) => str.replace(hyphenateRE, "-$1").toLowerCase() +); +const capitalize = cacheStringFunction((str) => { + return str.charAt(0).toUpperCase() + str.slice(1); +}); +const toHandlerKey = cacheStringFunction( + (str) => { + const s = str ? `on${capitalize(str)}` : ``; + return s; + } +); +const hasChanged = (value, oldValue) => !Object.is(value, oldValue); +const invokeArrayFns = (fns, ...arg) => { + for (let i = 0; i < fns.length; i++) { + fns[i](...arg); + } +}; +const def = (obj, key, value, writable = false) => { + Object.defineProperty(obj, key, { + configurable: true, + enumerable: false, + writable, + value + }); +}; +const looseToNumber = (val) => { + const n = parseFloat(val); + return isNaN(n) ? val : n; +}; +const toNumber = (val) => { + const n = isString(val) ? Number(val) : NaN; + return isNaN(n) ? val : n; +}; +let _globalThis; +const getGlobalThis = () => { + return _globalThis || (_globalThis = typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : {}); +}; +function normalizeStyle(value) { + if (isArray(value)) { + const res = {}; + for (let i = 0; i < value.length; i++) { + const item = value[i]; + const normalized = isString(item) ? parseStringStyle(item) : normalizeStyle(item); + if (normalized) { + for (const key in normalized) { + res[key] = normalized[key]; + } + } + } + return res; + } else if (isString(value) || isObject(value)) { + return value; + } +} +const listDelimiterRE = /;(?![^(]*\))/g; +const propertyDelimiterRE = /:([^]+)/; +const styleCommentRE = /\/\*[^]*?\*\//g; +function parseStringStyle(cssText) { + const ret = {}; + cssText.replace(styleCommentRE, "").split(listDelimiterRE).forEach((item) => { + if (item) { + const tmp = item.split(propertyDelimiterRE); + tmp.length > 1 && (ret[tmp[0].trim()] = tmp[1].trim()); + } + }); + return ret; +} +function normalizeClass(value) { + let res = ""; + if (isString(value)) { + res = value; + } else if (isArray(value)) { + for (let i = 0; i < value.length; i++) { + const normalized = normalizeClass(value[i]); + if (normalized) { + res += normalized + " "; + } + } + } else if (isObject(value)) { + for (const name in value) { + if (value[name]) { + res += name + " "; + } + } + } + return res.trim(); +} +function normalizeProps(props) { + if (!props) return null; + let { class: klass, style } = props; + if (klass && !isString(klass)) { + props.class = normalizeClass(klass); + } + if (style) { + props.style = normalizeStyle(style); + } + return props; +} +const specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`; +const isSpecialBooleanAttr = /* @__PURE__ */ makeMap(specialBooleanAttrs); +function includeBooleanAttr(value) { + return !!value || value === ""; +} +const isRef$1 = (val) => { + return !!(val && val["__v_isRef"] === true); +}; +const toDisplayString = (val) => { + return isString(val) ? val : val == null ? "" : isArray(val) || isObject(val) && (val.toString === objectToString || !isFunction(val.toString)) ? isRef$1(val) ? toDisplayString(val.value) : JSON.stringify(val, replacer, 2) : String(val); +}; +const replacer = (_key, val) => { + if (isRef$1(val)) { + return replacer(_key, val.value); + } else if (isMap(val)) { + return { + [`Map(${val.size})`]: [...val.entries()].reduce( + (entries, [key, val2], i) => { + entries[stringifySymbol(key, i) + " =>"] = val2; + return entries; + }, + {} + ) + }; + } else if (isSet(val)) { + return { + [`Set(${val.size})`]: [...val.values()].map((v) => stringifySymbol(v)) + }; + } else if (isSymbol(val)) { + return stringifySymbol(val); + } else if (isObject(val) && !isArray(val) && !isPlainObject$1(val)) { + return String(val); + } + return val; +}; +const stringifySymbol = (v, i = "") => { + var _a; + return ( + // Symbol.description in es2019+ so we need to cast here to pass + // the lib: es2016 check + isSymbol(v) ? `Symbol(${(_a = v.description) != null ? _a : i})` : v + ); +}; +/** +* @vue/reactivity v3.5.4 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/ +let activeEffectScope; +class EffectScope { + constructor(detached = false) { + this.detached = detached; + this._active = true; + this.effects = []; + this.cleanups = []; + this._isPaused = false; + this.parent = activeEffectScope; + if (!detached && activeEffectScope) { + this.index = (activeEffectScope.scopes || (activeEffectScope.scopes = [])).push( + this + ) - 1; + } + } + get active() { + return this._active; + } + pause() { + if (this._active) { + this._isPaused = true; + let i, l; + if (this.scopes) { + for (i = 0, l = this.scopes.length; i < l; i++) { + this.scopes[i].pause(); + } + } + for (i = 0, l = this.effects.length; i < l; i++) { + this.effects[i].pause(); + } + } + } + /** + * Resumes the effect scope, including all child scopes and effects. + */ + resume() { + if (this._active) { + if (this._isPaused) { + this._isPaused = false; + let i, l; + if (this.scopes) { + for (i = 0, l = this.scopes.length; i < l; i++) { + this.scopes[i].resume(); + } + } + for (i = 0, l = this.effects.length; i < l; i++) { + this.effects[i].resume(); + } + } + } + } + run(fn) { + if (this._active) { + const currentEffectScope = activeEffectScope; + try { + activeEffectScope = this; + return fn(); + } finally { + activeEffectScope = currentEffectScope; + } + } + } + /** + * This should only be called on non-detached scopes + * @internal + */ + on() { + activeEffectScope = this; + } + /** + * This should only be called on non-detached scopes + * @internal + */ + off() { + activeEffectScope = this.parent; + } + stop(fromParent) { + if (this._active) { + let i, l; + for (i = 0, l = this.effects.length; i < l; i++) { + this.effects[i].stop(); + } + for (i = 0, l = this.cleanups.length; i < l; i++) { + this.cleanups[i](); + } + if (this.scopes) { + for (i = 0, l = this.scopes.length; i < l; i++) { + this.scopes[i].stop(true); + } + } + if (!this.detached && this.parent && !fromParent) { + const last = this.parent.scopes.pop(); + if (last && last !== this) { + this.parent.scopes[this.index] = last; + last.index = this.index; + } + } + this.parent = void 0; + this._active = false; + } + } +} +function effectScope(detached) { + return new EffectScope(detached); +} +function getCurrentScope() { + return activeEffectScope; +} +function onScopeDispose(fn, failSilently = false) { + if (activeEffectScope) { + activeEffectScope.cleanups.push(fn); + } +} +let activeSub; +const pausedQueueEffects = /* @__PURE__ */ new WeakSet(); +class ReactiveEffect { + constructor(fn) { + this.fn = fn; + this.deps = void 0; + this.depsTail = void 0; + this.flags = 1 | 4; + this.nextEffect = void 0; + this.cleanup = void 0; + this.scheduler = void 0; + if (activeEffectScope && activeEffectScope.active) { + activeEffectScope.effects.push(this); + } + } + pause() { + this.flags |= 64; + } + resume() { + if (this.flags & 64) { + this.flags &= ~64; + if (pausedQueueEffects.has(this)) { + pausedQueueEffects.delete(this); + this.trigger(); + } + } + } + /** + * @internal + */ + notify() { + if (this.flags & 2 && !(this.flags & 32)) { + return; + } + if (!(this.flags & 8)) { + this.flags |= 8; + this.nextEffect = batchedEffect; + batchedEffect = this; + } + } + run() { + if (!(this.flags & 1)) { + return this.fn(); + } + this.flags |= 2; + cleanupEffect(this); + prepareDeps(this); + const prevEffect = activeSub; + const prevShouldTrack = shouldTrack; + activeSub = this; + shouldTrack = true; + try { + return this.fn(); + } finally { + cleanupDeps(this); + activeSub = prevEffect; + shouldTrack = prevShouldTrack; + this.flags &= ~2; + } + } + stop() { + if (this.flags & 1) { + for (let link = this.deps; link; link = link.nextDep) { + removeSub(link); + } + this.deps = this.depsTail = void 0; + cleanupEffect(this); + this.onStop && this.onStop(); + this.flags &= ~1; + } + } + trigger() { + if (this.flags & 64) { + pausedQueueEffects.add(this); + } else if (this.scheduler) { + this.scheduler(); + } else { + this.runIfDirty(); + } + } + /** + * @internal + */ + runIfDirty() { + if (isDirty(this)) { + this.run(); + } + } + get dirty() { + return isDirty(this); + } +} +let batchDepth = 0; +let batchedEffect; +function startBatch() { + batchDepth++; +} +function endBatch() { + if (--batchDepth > 0) { + return; + } + let error; + while (batchedEffect) { + let e = batchedEffect; + batchedEffect = void 0; + while (e) { + const next = e.nextEffect; + e.nextEffect = void 0; + e.flags &= ~8; + if (e.flags & 1) { + try { + e.trigger(); + } catch (err) { + if (!error) error = err; + } + } + e = next; + } + } + if (error) throw error; +} +function prepareDeps(sub) { + for (let link = sub.deps; link; link = link.nextDep) { + link.version = -1; + link.prevActiveLink = link.dep.activeLink; + link.dep.activeLink = link; + } +} +function cleanupDeps(sub) { + let head; + let tail = sub.depsTail; + for (let link = tail; link; link = link.prevDep) { + if (link.version === -1) { + if (link === tail) tail = link.prevDep; + removeSub(link); + removeDep(link); + } else { + head = link; + } + link.dep.activeLink = link.prevActiveLink; + link.prevActiveLink = void 0; + } + sub.deps = head; + sub.depsTail = tail; +} +function isDirty(sub) { + for (let link = sub.deps; link; link = link.nextDep) { + if (link.dep.version !== link.version || link.dep.computed && refreshComputed(link.dep.computed) || link.dep.version !== link.version) { + return true; + } + } + if (sub._dirty) { + return true; + } + return false; +} +function refreshComputed(computed2) { + if (computed2.flags & 4 && !(computed2.flags & 16)) { + return; + } + computed2.flags &= ~16; + if (computed2.globalVersion === globalVersion) { + return; + } + computed2.globalVersion = globalVersion; + const dep = computed2.dep; + computed2.flags |= 2; + if (dep.version > 0 && !computed2.isSSR && !isDirty(computed2)) { + computed2.flags &= ~2; + return; + } + const prevSub = activeSub; + const prevShouldTrack = shouldTrack; + activeSub = computed2; + shouldTrack = true; + try { + prepareDeps(computed2); + const value = computed2.fn(computed2._value); + if (dep.version === 0 || hasChanged(value, computed2._value)) { + computed2._value = value; + dep.version++; + } + } catch (err) { + dep.version++; + throw err; + } finally { + activeSub = prevSub; + shouldTrack = prevShouldTrack; + cleanupDeps(computed2); + computed2.flags &= ~2; + } +} +function removeSub(link) { + const { dep, prevSub, nextSub } = link; + if (prevSub) { + prevSub.nextSub = nextSub; + link.prevSub = void 0; + } + if (nextSub) { + nextSub.prevSub = prevSub; + link.nextSub = void 0; + } + if (dep.subs === link) { + dep.subs = prevSub; + } + if (!dep.subs && dep.computed) { + dep.computed.flags &= ~4; + for (let l = dep.computed.deps; l; l = l.nextDep) { + removeSub(l); + } + } +} +function removeDep(link) { + const { prevDep, nextDep } = link; + if (prevDep) { + prevDep.nextDep = nextDep; + link.prevDep = void 0; + } + if (nextDep) { + nextDep.prevDep = prevDep; + link.nextDep = void 0; + } +} +let shouldTrack = true; +const trackStack = []; +function pauseTracking() { + trackStack.push(shouldTrack); + shouldTrack = false; +} +function resetTracking() { + const last = trackStack.pop(); + shouldTrack = last === void 0 ? true : last; +} +function cleanupEffect(e) { + const { cleanup } = e; + e.cleanup = void 0; + if (cleanup) { + const prevSub = activeSub; + activeSub = void 0; + try { + cleanup(); + } finally { + activeSub = prevSub; + } + } +} +let globalVersion = 0; +class Dep { + constructor(computed2) { + this.computed = computed2; + this.version = 0; + this.activeLink = void 0; + this.subs = void 0; + } + track(debugInfo) { + if (!activeSub || !shouldTrack || activeSub === this.computed) { + return; + } + let link = this.activeLink; + if (link === void 0 || link.sub !== activeSub) { + link = this.activeLink = { + dep: this, + sub: activeSub, + version: this.version, + nextDep: void 0, + prevDep: void 0, + nextSub: void 0, + prevSub: void 0, + prevActiveLink: void 0 + }; + if (!activeSub.deps) { + activeSub.deps = activeSub.depsTail = link; + } else { + link.prevDep = activeSub.depsTail; + activeSub.depsTail.nextDep = link; + activeSub.depsTail = link; + } + if (activeSub.flags & 4) { + addSub(link); + } + } else if (link.version === -1) { + link.version = this.version; + if (link.nextDep) { + const next = link.nextDep; + next.prevDep = link.prevDep; + if (link.prevDep) { + link.prevDep.nextDep = next; + } + link.prevDep = activeSub.depsTail; + link.nextDep = void 0; + activeSub.depsTail.nextDep = link; + activeSub.depsTail = link; + if (activeSub.deps === link) { + activeSub.deps = next; + } + } + } + return link; + } + trigger(debugInfo) { + this.version++; + globalVersion++; + this.notify(debugInfo); + } + notify(debugInfo) { + startBatch(); + try { + if (false) ; + for (let link = this.subs; link; link = link.prevSub) { + link.sub.notify(); + } + } finally { + endBatch(); + } + } +} +function addSub(link) { + const computed2 = link.dep.computed; + if (computed2 && !link.dep.subs) { + computed2.flags |= 4 | 16; + for (let l = computed2.deps; l; l = l.nextDep) { + addSub(l); + } + } + const currentTail = link.dep.subs; + if (currentTail !== link) { + link.prevSub = currentTail; + if (currentTail) currentTail.nextSub = link; + } + link.dep.subs = link; +} +const targetMap = /* @__PURE__ */ new WeakMap(); +const ITERATE_KEY = Symbol( + "" +); +const MAP_KEY_ITERATE_KEY = Symbol( + "" +); +const ARRAY_ITERATE_KEY = Symbol( + "" +); +function track(target, type, key) { + if (shouldTrack && activeSub) { + let depsMap = targetMap.get(target); + if (!depsMap) { + targetMap.set(target, depsMap = /* @__PURE__ */ new Map()); + } + let dep = depsMap.get(key); + if (!dep) { + depsMap.set(key, dep = new Dep()); + } + { + dep.track(); + } + } +} +function trigger(target, type, key, newValue, oldValue, oldTarget) { + const depsMap = targetMap.get(target); + if (!depsMap) { + globalVersion++; + return; + } + const run = (dep) => { + if (dep) { + { + dep.trigger(); + } + } + }; + startBatch(); + if (type === "clear") { + depsMap.forEach(run); + } else { + const targetIsArray = isArray(target); + const isArrayIndex = targetIsArray && isIntegerKey(key); + if (targetIsArray && key === "length") { + const newLength = Number(newValue); + depsMap.forEach((dep, key2) => { + if (key2 === "length" || key2 === ARRAY_ITERATE_KEY || !isSymbol(key2) && key2 >= newLength) { + run(dep); + } + }); + } else { + if (key !== void 0) { + run(depsMap.get(key)); + } + if (isArrayIndex) { + run(depsMap.get(ARRAY_ITERATE_KEY)); + } + switch (type) { + case "add": + if (!targetIsArray) { + run(depsMap.get(ITERATE_KEY)); + if (isMap(target)) { + run(depsMap.get(MAP_KEY_ITERATE_KEY)); + } + } else if (isArrayIndex) { + run(depsMap.get("length")); + } + break; + case "delete": + if (!targetIsArray) { + run(depsMap.get(ITERATE_KEY)); + if (isMap(target)) { + run(depsMap.get(MAP_KEY_ITERATE_KEY)); + } + } + break; + case "set": + if (isMap(target)) { + run(depsMap.get(ITERATE_KEY)); + } + break; + } + } + } + endBatch(); +} +function getDepFromReactive(object, key) { + var _a; + return (_a = targetMap.get(object)) == null ? void 0 : _a.get(key); +} +function reactiveReadArray(array) { + const raw = toRaw(array); + if (raw === array) return raw; + track(raw, "iterate", ARRAY_ITERATE_KEY); + return isShallow(array) ? raw : raw.map(toReactive); +} +function shallowReadArray(arr) { + track(arr = toRaw(arr), "iterate", ARRAY_ITERATE_KEY); + return arr; +} +const arrayInstrumentations = { + __proto__: null, + [Symbol.iterator]() { + return iterator(this, Symbol.iterator, toReactive); + }, + concat(...args) { + return reactiveReadArray(this).concat( + ...args.map((x) => isArray(x) ? reactiveReadArray(x) : x) + ); + }, + entries() { + return iterator(this, "entries", (value) => { + value[1] = toReactive(value[1]); + return value; + }); + }, + every(fn, thisArg) { + return apply(this, "every", fn, thisArg, void 0, arguments); + }, + filter(fn, thisArg) { + return apply(this, "filter", fn, thisArg, (v) => v.map(toReactive), arguments); + }, + find(fn, thisArg) { + return apply(this, "find", fn, thisArg, toReactive, arguments); + }, + findIndex(fn, thisArg) { + return apply(this, "findIndex", fn, thisArg, void 0, arguments); + }, + findLast(fn, thisArg) { + return apply(this, "findLast", fn, thisArg, toReactive, arguments); + }, + findLastIndex(fn, thisArg) { + return apply(this, "findLastIndex", fn, thisArg, void 0, arguments); + }, + // flat, flatMap could benefit from ARRAY_ITERATE but are not straight-forward to implement + forEach(fn, thisArg) { + return apply(this, "forEach", fn, thisArg, void 0, arguments); + }, + includes(...args) { + return searchProxy(this, "includes", args); + }, + indexOf(...args) { + return searchProxy(this, "indexOf", args); + }, + join(separator) { + return reactiveReadArray(this).join(separator); + }, + // keys() iterator only reads `length`, no optimisation required + lastIndexOf(...args) { + return searchProxy(this, "lastIndexOf", args); + }, + map(fn, thisArg) { + return apply(this, "map", fn, thisArg, void 0, arguments); + }, + pop() { + return noTracking(this, "pop"); + }, + push(...args) { + return noTracking(this, "push", args); + }, + reduce(fn, ...args) { + return reduce(this, "reduce", fn, args); + }, + reduceRight(fn, ...args) { + return reduce(this, "reduceRight", fn, args); + }, + shift() { + return noTracking(this, "shift"); + }, + // slice could use ARRAY_ITERATE but also seems to beg for range tracking + some(fn, thisArg) { + return apply(this, "some", fn, thisArg, void 0, arguments); + }, + splice(...args) { + return noTracking(this, "splice", args); + }, + toReversed() { + return reactiveReadArray(this).toReversed(); + }, + toSorted(comparer) { + return reactiveReadArray(this).toSorted(comparer); + }, + toSpliced(...args) { + return reactiveReadArray(this).toSpliced(...args); + }, + unshift(...args) { + return noTracking(this, "unshift", args); + }, + values() { + return iterator(this, "values", toReactive); + } +}; +function iterator(self2, method, wrapValue) { + const arr = shallowReadArray(self2); + const iter = arr[method](); + if (arr !== self2 && !isShallow(self2)) { + iter._next = iter.next; + iter.next = () => { + const result = iter._next(); + if (result.value) { + result.value = wrapValue(result.value); + } + return result; + }; + } + return iter; +} +const arrayProto = Array.prototype; +function apply(self2, method, fn, thisArg, wrappedRetFn, args) { + const arr = shallowReadArray(self2); + const needsWrap = arr !== self2 && !isShallow(self2); + const methodFn = arr[method]; + if (methodFn !== arrayProto[method]) { + const result2 = methodFn.apply(self2, args); + return needsWrap ? toReactive(result2) : result2; + } + let wrappedFn = fn; + if (arr !== self2) { + if (needsWrap) { + wrappedFn = function(item, index) { + return fn.call(this, toReactive(item), index, self2); + }; + } else if (fn.length > 2) { + wrappedFn = function(item, index) { + return fn.call(this, item, index, self2); + }; + } + } + const result = methodFn.call(arr, wrappedFn, thisArg); + return needsWrap && wrappedRetFn ? wrappedRetFn(result) : result; +} +function reduce(self2, method, fn, args) { + const arr = shallowReadArray(self2); + let wrappedFn = fn; + if (arr !== self2) { + if (!isShallow(self2)) { + wrappedFn = function(acc, item, index) { + return fn.call(this, acc, toReactive(item), index, self2); + }; + } else if (fn.length > 3) { + wrappedFn = function(acc, item, index) { + return fn.call(this, acc, item, index, self2); + }; + } + } + return arr[method](wrappedFn, ...args); +} +function searchProxy(self2, method, args) { + const arr = toRaw(self2); + track(arr, "iterate", ARRAY_ITERATE_KEY); + const res = arr[method](...args); + if ((res === -1 || res === false) && isProxy(args[0])) { + args[0] = toRaw(args[0]); + return arr[method](...args); + } + return res; +} +function noTracking(self2, method, args = []) { + pauseTracking(); + startBatch(); + const res = toRaw(self2)[method].apply(self2, args); + endBatch(); + resetTracking(); + return res; +} +const isNonTrackableKeys = /* @__PURE__ */ makeMap(`__proto__,__v_isRef,__isVue`); +const builtInSymbols = new Set( + /* @__PURE__ */ Object.getOwnPropertyNames(Symbol).filter((key) => key !== "arguments" && key !== "caller").map((key) => Symbol[key]).filter(isSymbol) +); +function hasOwnProperty(key) { + if (!isSymbol(key)) key = String(key); + const obj = toRaw(this); + track(obj, "has", key); + return obj.hasOwnProperty(key); +} +class BaseReactiveHandler { + constructor(_isReadonly = false, _isShallow = false) { + this._isReadonly = _isReadonly; + this._isShallow = _isShallow; + } + get(target, key, receiver) { + const isReadonly2 = this._isReadonly, isShallow2 = this._isShallow; + if (key === "__v_isReactive") { + return !isReadonly2; + } else if (key === "__v_isReadonly") { + return isReadonly2; + } else if (key === "__v_isShallow") { + return isShallow2; + } else if (key === "__v_raw") { + if (receiver === (isReadonly2 ? isShallow2 ? shallowReadonlyMap : readonlyMap : isShallow2 ? shallowReactiveMap : reactiveMap).get(target) || // receiver is not the reactive proxy, but has the same prototype + // this means the receiver is a user proxy of the reactive proxy + Object.getPrototypeOf(target) === Object.getPrototypeOf(receiver)) { + return target; + } + return; + } + const targetIsArray = isArray(target); + if (!isReadonly2) { + let fn; + if (targetIsArray && (fn = arrayInstrumentations[key])) { + return fn; + } + if (key === "hasOwnProperty") { + return hasOwnProperty; + } + } + const res = Reflect.get( + target, + key, + // if this is a proxy wrapping a ref, return methods using the raw ref + // as receiver so that we don't have to call `toRaw` on the ref in all + // its class methods + isRef(target) ? target : receiver + ); + if (isSymbol(key) ? builtInSymbols.has(key) : isNonTrackableKeys(key)) { + return res; + } + if (!isReadonly2) { + track(target, "get", key); + } + if (isShallow2) { + return res; + } + if (isRef(res)) { + return targetIsArray && isIntegerKey(key) ? res : res.value; + } + if (isObject(res)) { + return isReadonly2 ? readonly(res) : reactive(res); + } + return res; + } +} +class MutableReactiveHandler extends BaseReactiveHandler { + constructor(isShallow2 = false) { + super(false, isShallow2); + } + set(target, key, value, receiver) { + let oldValue = target[key]; + if (!this._isShallow) { + const isOldValueReadonly = isReadonly(oldValue); + if (!isShallow(value) && !isReadonly(value)) { + oldValue = toRaw(oldValue); + value = toRaw(value); + } + if (!isArray(target) && isRef(oldValue) && !isRef(value)) { + if (isOldValueReadonly) { + return false; + } else { + oldValue.value = value; + return true; + } + } + } + const hadKey = isArray(target) && isIntegerKey(key) ? Number(key) < target.length : hasOwn(target, key); + const result = Reflect.set( + target, + key, + value, + isRef(target) ? target : receiver + ); + if (target === toRaw(receiver)) { + if (!hadKey) { + trigger(target, "add", key, value); + } else if (hasChanged(value, oldValue)) { + trigger(target, "set", key, value); + } + } + return result; + } + deleteProperty(target, key) { + const hadKey = hasOwn(target, key); + target[key]; + const result = Reflect.deleteProperty(target, key); + if (result && hadKey) { + trigger(target, "delete", key, void 0); + } + return result; + } + has(target, key) { + const result = Reflect.has(target, key); + if (!isSymbol(key) || !builtInSymbols.has(key)) { + track(target, "has", key); + } + return result; + } + ownKeys(target) { + track( + target, + "iterate", + isArray(target) ? "length" : ITERATE_KEY + ); + return Reflect.ownKeys(target); + } +} +class ReadonlyReactiveHandler extends BaseReactiveHandler { + constructor(isShallow2 = false) { + super(true, isShallow2); + } + set(target, key) { + return true; + } + deleteProperty(target, key) { + return true; + } +} +const mutableHandlers = /* @__PURE__ */ new MutableReactiveHandler(); +const readonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler(); +const shallowReactiveHandlers = /* @__PURE__ */ new MutableReactiveHandler(true); +const shallowReadonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler(true); +const toShallow = (value) => value; +const getProto = (v) => Reflect.getPrototypeOf(v); +function get(target, key, isReadonly2 = false, isShallow2 = false) { + target = target["__v_raw"]; + const rawTarget = toRaw(target); + const rawKey = toRaw(key); + if (!isReadonly2) { + if (hasChanged(key, rawKey)) { + track(rawTarget, "get", key); + } + track(rawTarget, "get", rawKey); + } + const { has: has2 } = getProto(rawTarget); + const wrap = isShallow2 ? toShallow : isReadonly2 ? toReadonly : toReactive; + if (has2.call(rawTarget, key)) { + return wrap(target.get(key)); + } else if (has2.call(rawTarget, rawKey)) { + return wrap(target.get(rawKey)); + } else if (target !== rawTarget) { + target.get(key); + } +} +function has(key, isReadonly2 = false) { + const target = this["__v_raw"]; + const rawTarget = toRaw(target); + const rawKey = toRaw(key); + if (!isReadonly2) { + if (hasChanged(key, rawKey)) { + track(rawTarget, "has", key); + } + track(rawTarget, "has", rawKey); + } + return key === rawKey ? target.has(key) : target.has(key) || target.has(rawKey); +} +function size(target, isReadonly2 = false) { + target = target["__v_raw"]; + !isReadonly2 && track(toRaw(target), "iterate", ITERATE_KEY); + return Reflect.get(target, "size", target); +} +function add(value, _isShallow = false) { + if (!_isShallow && !isShallow(value) && !isReadonly(value)) { + value = toRaw(value); + } + const target = toRaw(this); + const proto = getProto(target); + const hadKey = proto.has.call(target, value); + if (!hadKey) { + target.add(value); + trigger(target, "add", value, value); + } + return this; +} +function set(key, value, _isShallow = false) { + if (!_isShallow && !isShallow(value) && !isReadonly(value)) { + value = toRaw(value); + } + const target = toRaw(this); + const { has: has2, get: get2 } = getProto(target); + let hadKey = has2.call(target, key); + if (!hadKey) { + key = toRaw(key); + hadKey = has2.call(target, key); + } + const oldValue = get2.call(target, key); + target.set(key, value); + if (!hadKey) { + trigger(target, "add", key, value); + } else if (hasChanged(value, oldValue)) { + trigger(target, "set", key, value); + } + return this; +} +function deleteEntry(key) { + const target = toRaw(this); + const { has: has2, get: get2 } = getProto(target); + let hadKey = has2.call(target, key); + if (!hadKey) { + key = toRaw(key); + hadKey = has2.call(target, key); + } + get2 ? get2.call(target, key) : void 0; + const result = target.delete(key); + if (hadKey) { + trigger(target, "delete", key, void 0); + } + return result; +} +function clear() { + const target = toRaw(this); + const hadItems = target.size !== 0; + const result = target.clear(); + if (hadItems) { + trigger(target, "clear", void 0, void 0); + } + return result; +} +function createForEach(isReadonly2, isShallow2) { + return function forEach(callback, thisArg) { + const observed = this; + const target = observed["__v_raw"]; + const rawTarget = toRaw(target); + const wrap = isShallow2 ? toShallow : isReadonly2 ? toReadonly : toReactive; + !isReadonly2 && track(rawTarget, "iterate", ITERATE_KEY); + return target.forEach((value, key) => { + return callback.call(thisArg, wrap(value), wrap(key), observed); + }); + }; +} +function createIterableMethod(method, isReadonly2, isShallow2) { + return function(...args) { + const target = this["__v_raw"]; + const rawTarget = toRaw(target); + const targetIsMap = isMap(rawTarget); + const isPair = method === "entries" || method === Symbol.iterator && targetIsMap; + const isKeyOnly = method === "keys" && targetIsMap; + const innerIterator = target[method](...args); + const wrap = isShallow2 ? toShallow : isReadonly2 ? toReadonly : toReactive; + !isReadonly2 && track( + rawTarget, + "iterate", + isKeyOnly ? MAP_KEY_ITERATE_KEY : ITERATE_KEY + ); + return { + // iterator protocol + next() { + const { value, done } = innerIterator.next(); + return done ? { value, done } : { + value: isPair ? [wrap(value[0]), wrap(value[1])] : wrap(value), + done + }; + }, + // iterable protocol + [Symbol.iterator]() { + return this; + } + }; + }; +} +function createReadonlyMethod(type) { + return function(...args) { + return type === "delete" ? false : type === "clear" ? void 0 : this; + }; +} +function createInstrumentations() { + const mutableInstrumentations2 = { + get(key) { + return get(this, key); + }, + get size() { + return size(this); + }, + has, + add, + set, + delete: deleteEntry, + clear, + forEach: createForEach(false, false) + }; + const shallowInstrumentations2 = { + get(key) { + return get(this, key, false, true); + }, + get size() { + return size(this); + }, + has, + add(value) { + return add.call(this, value, true); + }, + set(key, value) { + return set.call(this, key, value, true); + }, + delete: deleteEntry, + clear, + forEach: createForEach(false, true) + }; + const readonlyInstrumentations2 = { + get(key) { + return get(this, key, true); + }, + get size() { + return size(this, true); + }, + has(key) { + return has.call(this, key, true); + }, + add: createReadonlyMethod("add"), + set: createReadonlyMethod("set"), + delete: createReadonlyMethod("delete"), + clear: createReadonlyMethod("clear"), + forEach: createForEach(true, false) + }; + const shallowReadonlyInstrumentations2 = { + get(key) { + return get(this, key, true, true); + }, + get size() { + return size(this, true); + }, + has(key) { + return has.call(this, key, true); + }, + add: createReadonlyMethod("add"), + set: createReadonlyMethod("set"), + delete: createReadonlyMethod("delete"), + clear: createReadonlyMethod("clear"), + forEach: createForEach(true, true) + }; + const iteratorMethods = [ + "keys", + "values", + "entries", + Symbol.iterator + ]; + iteratorMethods.forEach((method) => { + mutableInstrumentations2[method] = createIterableMethod(method, false, false); + readonlyInstrumentations2[method] = createIterableMethod(method, true, false); + shallowInstrumentations2[method] = createIterableMethod(method, false, true); + shallowReadonlyInstrumentations2[method] = createIterableMethod( + method, + true, + true + ); + }); + return [ + mutableInstrumentations2, + readonlyInstrumentations2, + shallowInstrumentations2, + shallowReadonlyInstrumentations2 + ]; +} +const [ + mutableInstrumentations, + readonlyInstrumentations, + shallowInstrumentations, + shallowReadonlyInstrumentations +] = /* @__PURE__ */ createInstrumentations(); +function createInstrumentationGetter(isReadonly2, shallow) { + const instrumentations = shallow ? isReadonly2 ? shallowReadonlyInstrumentations : shallowInstrumentations : isReadonly2 ? readonlyInstrumentations : mutableInstrumentations; + return (target, key, receiver) => { + if (key === "__v_isReactive") { + return !isReadonly2; + } else if (key === "__v_isReadonly") { + return isReadonly2; + } else if (key === "__v_raw") { + return target; + } + return Reflect.get( + hasOwn(instrumentations, key) && key in target ? instrumentations : target, + key, + receiver + ); + }; +} +const mutableCollectionHandlers = { + get: /* @__PURE__ */ createInstrumentationGetter(false, false) +}; +const shallowCollectionHandlers = { + get: /* @__PURE__ */ createInstrumentationGetter(false, true) +}; +const readonlyCollectionHandlers = { + get: /* @__PURE__ */ createInstrumentationGetter(true, false) +}; +const shallowReadonlyCollectionHandlers = { + get: /* @__PURE__ */ createInstrumentationGetter(true, true) +}; +const reactiveMap = /* @__PURE__ */ new WeakMap(); +const shallowReactiveMap = /* @__PURE__ */ new WeakMap(); +const readonlyMap = /* @__PURE__ */ new WeakMap(); +const shallowReadonlyMap = /* @__PURE__ */ new WeakMap(); +function targetTypeMap(rawType) { + switch (rawType) { + case "Object": + case "Array": + return 1; + case "Map": + case "Set": + case "WeakMap": + case "WeakSet": + return 2; + default: + return 0; + } +} +function getTargetType(value) { + return value["__v_skip"] || !Object.isExtensible(value) ? 0 : targetTypeMap(toRawType(value)); +} +function reactive(target) { + if (isReadonly(target)) { + return target; + } + return createReactiveObject( + target, + false, + mutableHandlers, + mutableCollectionHandlers, + reactiveMap + ); +} +function shallowReactive(target) { + return createReactiveObject( + target, + false, + shallowReactiveHandlers, + shallowCollectionHandlers, + shallowReactiveMap + ); +} +function readonly(target) { + return createReactiveObject( + target, + true, + readonlyHandlers, + readonlyCollectionHandlers, + readonlyMap + ); +} +function shallowReadonly(target) { + return createReactiveObject( + target, + true, + shallowReadonlyHandlers, + shallowReadonlyCollectionHandlers, + shallowReadonlyMap + ); +} +function createReactiveObject(target, isReadonly2, baseHandlers, collectionHandlers, proxyMap) { + if (!isObject(target)) { + return target; + } + if (target["__v_raw"] && !(isReadonly2 && target["__v_isReactive"])) { + return target; + } + const existingProxy = proxyMap.get(target); + if (existingProxy) { + return existingProxy; + } + const targetType = getTargetType(target); + if (targetType === 0) { + return target; + } + const proxy = new Proxy( + target, + targetType === 2 ? collectionHandlers : baseHandlers + ); + proxyMap.set(target, proxy); + return proxy; +} +function isReactive(value) { + if (isReadonly(value)) { + return isReactive(value["__v_raw"]); + } + return !!(value && value["__v_isReactive"]); +} +function isReadonly(value) { + return !!(value && value["__v_isReadonly"]); +} +function isShallow(value) { + return !!(value && value["__v_isShallow"]); +} +function isProxy(value) { + return value ? !!value["__v_raw"] : false; +} +function toRaw(observed) { + const raw = observed && observed["__v_raw"]; + return raw ? toRaw(raw) : observed; +} +function markRaw(value) { + if (!hasOwn(value, "__v_skip") && Object.isExtensible(value)) { + def(value, "__v_skip", true); + } + return value; +} +const toReactive = (value) => isObject(value) ? reactive(value) : value; +const toReadonly = (value) => isObject(value) ? readonly(value) : value; +function isRef(r) { + return r ? r["__v_isRef"] === true : false; +} +function ref(value) { + return createRef(value, false); +} +function shallowRef(value) { + return createRef(value, true); +} +function createRef(rawValue, shallow) { + if (isRef(rawValue)) { + return rawValue; + } + return new RefImpl(rawValue, shallow); +} +class RefImpl { + constructor(value, isShallow2) { + this.dep = new Dep(); + this["__v_isRef"] = true; + this["__v_isShallow"] = false; + this._rawValue = isShallow2 ? value : toRaw(value); + this._value = isShallow2 ? value : toReactive(value); + this["__v_isShallow"] = isShallow2; + } + get value() { + { + this.dep.track(); + } + return this._value; + } + set value(newValue) { + const oldValue = this._rawValue; + const useDirectValue = this["__v_isShallow"] || isShallow(newValue) || isReadonly(newValue); + newValue = useDirectValue ? newValue : toRaw(newValue); + if (hasChanged(newValue, oldValue)) { + this._rawValue = newValue; + this._value = useDirectValue ? newValue : toReactive(newValue); + { + this.dep.trigger(); + } + } + } +} +function unref(ref2) { + return isRef(ref2) ? ref2.value : ref2; +} +const shallowUnwrapHandlers = { + get: (target, key, receiver) => key === "__v_raw" ? target : unref(Reflect.get(target, key, receiver)), + set: (target, key, value, receiver) => { + const oldValue = target[key]; + if (isRef(oldValue) && !isRef(value)) { + oldValue.value = value; + return true; + } else { + return Reflect.set(target, key, value, receiver); + } + } +}; +function proxyRefs(objectWithRefs) { + return isReactive(objectWithRefs) ? objectWithRefs : new Proxy(objectWithRefs, shallowUnwrapHandlers); +} +class CustomRefImpl { + constructor(factory) { + this["__v_isRef"] = true; + this._value = void 0; + const dep = this.dep = new Dep(); + const { get: get2, set: set2 } = factory(dep.track.bind(dep), dep.trigger.bind(dep)); + this._get = get2; + this._set = set2; + } + get value() { + return this._value = this._get(); + } + set value(newVal) { + this._set(newVal); + } +} +function customRef(factory) { + return new CustomRefImpl(factory); +} +function toRefs(object) { + const ret = isArray(object) ? new Array(object.length) : {}; + for (const key in object) { + ret[key] = propertyToRef(object, key); + } + return ret; +} +class ObjectRefImpl { + constructor(_object, _key, _defaultValue) { + this._object = _object; + this._key = _key; + this._defaultValue = _defaultValue; + this["__v_isRef"] = true; + this._value = void 0; + } + get value() { + const val = this._object[this._key]; + return this._value = val === void 0 ? this._defaultValue : val; + } + set value(newVal) { + this._object[this._key] = newVal; + } + get dep() { + return getDepFromReactive(toRaw(this._object), this._key); + } +} +class GetterRefImpl { + constructor(_getter) { + this._getter = _getter; + this["__v_isRef"] = true; + this["__v_isReadonly"] = true; + this._value = void 0; + } + get value() { + return this._value = this._getter(); + } +} +function toRef(source, key, defaultValue) { + if (isRef(source)) { + return source; + } else if (isFunction(source)) { + return new GetterRefImpl(source); + } else if (isObject(source) && arguments.length > 1) { + return propertyToRef(source, key, defaultValue); + } else { + return ref(source); + } +} +function propertyToRef(source, key, defaultValue) { + const val = source[key]; + return isRef(val) ? val : new ObjectRefImpl(source, key, defaultValue); +} +class ComputedRefImpl { + constructor(fn, setter, isSSR) { + this.fn = fn; + this.setter = setter; + this._value = void 0; + this.dep = new Dep(this); + this.__v_isRef = true; + this.deps = void 0; + this.depsTail = void 0; + this.flags = 16; + this.globalVersion = globalVersion - 1; + this.effect = this; + this["__v_isReadonly"] = !setter; + this.isSSR = isSSR; + } + /** + * @internal + */ + notify() { + this.flags |= 16; + if (activeSub !== this) { + this.dep.notify(); + } + } + get value() { + const link = this.dep.track(); + refreshComputed(this); + if (link) { + link.version = this.dep.version; + } + return this._value; + } + set value(newValue) { + if (this.setter) { + this.setter(newValue); + } + } +} +function computed$1(getterOrOptions, debugOptions, isSSR = false) { + let getter; + let setter; + if (isFunction(getterOrOptions)) { + getter = getterOrOptions; + } else { + getter = getterOrOptions.get; + setter = getterOrOptions.set; + } + const cRef = new ComputedRefImpl(getter, setter, isSSR); + return cRef; +} +const INITIAL_WATCHER_VALUE = {}; +const cleanupMap = /* @__PURE__ */ new WeakMap(); +let activeWatcher = void 0; +function onWatcherCleanup(cleanupFn, failSilently = false, owner = activeWatcher) { + if (owner) { + let cleanups = cleanupMap.get(owner); + if (!cleanups) cleanupMap.set(owner, cleanups = []); + cleanups.push(cleanupFn); + } +} +function watch$1(source, cb, options = EMPTY_OBJ) { + const { immediate, deep, once, scheduler, augmentJob, call } = options; + const reactiveGetter = (source2) => { + if (deep) return source2; + if (isShallow(source2) || deep === false || deep === 0) + return traverse(source2, 1); + return traverse(source2); + }; + let effect2; + let getter; + let cleanup; + let boundCleanup; + let forceTrigger = false; + let isMultiSource = false; + if (isRef(source)) { + getter = () => source.value; + forceTrigger = isShallow(source); + } else if (isReactive(source)) { + getter = () => reactiveGetter(source); + forceTrigger = true; + } else if (isArray(source)) { + isMultiSource = true; + forceTrigger = source.some((s) => isReactive(s) || isShallow(s)); + getter = () => source.map((s) => { + if (isRef(s)) { + return s.value; + } else if (isReactive(s)) { + return reactiveGetter(s); + } else if (isFunction(s)) { + return call ? call(s, 2) : s(); + } else ; + }); + } else if (isFunction(source)) { + if (cb) { + getter = call ? () => call(source, 2) : source; + } else { + getter = () => { + if (cleanup) { + pauseTracking(); + try { + cleanup(); + } finally { + resetTracking(); + } + } + const currentEffect = activeWatcher; + activeWatcher = effect2; + try { + return call ? call(source, 3, [boundCleanup]) : source(boundCleanup); + } finally { + activeWatcher = currentEffect; + } + }; + } + } else { + getter = NOOP; + } + if (cb && deep) { + const baseGetter = getter; + const depth = deep === true ? Infinity : deep; + getter = () => traverse(baseGetter(), depth); + } + const scope = getCurrentScope(); + const watchHandle = () => { + effect2.stop(); + if (scope) { + remove(scope.effects, effect2); + } + }; + if (once) { + if (cb) { + const _cb = cb; + cb = (...args) => { + _cb(...args); + watchHandle(); + }; + } else { + const _getter = getter; + getter = () => { + _getter(); + watchHandle(); + }; + } + } + let oldValue = isMultiSource ? new Array(source.length).fill(INITIAL_WATCHER_VALUE) : INITIAL_WATCHER_VALUE; + const job = (immediateFirstRun) => { + if (!(effect2.flags & 1) || !effect2.dirty && !immediateFirstRun) { + return; + } + if (cb) { + const newValue = effect2.run(); + if (deep || forceTrigger || (isMultiSource ? newValue.some((v, i) => hasChanged(v, oldValue[i])) : hasChanged(newValue, oldValue))) { + if (cleanup) { + cleanup(); + } + const currentWatcher = activeWatcher; + activeWatcher = effect2; + try { + const args = [ + newValue, + // pass undefined as the old value when it's changed for the first time + oldValue === INITIAL_WATCHER_VALUE ? void 0 : isMultiSource && oldValue[0] === INITIAL_WATCHER_VALUE ? [] : oldValue, + boundCleanup + ]; + call ? call(cb, 3, args) : ( + // @ts-expect-error + cb(...args) + ); + oldValue = newValue; + } finally { + activeWatcher = currentWatcher; + } + } + } else { + effect2.run(); + } + }; + if (augmentJob) { + augmentJob(job); + } + effect2 = new ReactiveEffect(getter); + effect2.scheduler = scheduler ? () => scheduler(job, false) : job; + boundCleanup = (fn) => onWatcherCleanup(fn, false, effect2); + cleanup = effect2.onStop = () => { + const cleanups = cleanupMap.get(effect2); + if (cleanups) { + if (call) { + call(cleanups, 4); + } else { + for (const cleanup2 of cleanups) cleanup2(); + } + cleanupMap.delete(effect2); + } + }; + if (cb) { + if (immediate) { + job(true); + } else { + oldValue = effect2.run(); + } + } else if (scheduler) { + scheduler(job.bind(null, true), true); + } else { + effect2.run(); + } + watchHandle.pause = effect2.pause.bind(effect2); + watchHandle.resume = effect2.resume.bind(effect2); + watchHandle.stop = watchHandle; + return watchHandle; +} +function traverse(value, depth = Infinity, seen) { + if (depth <= 0 || !isObject(value) || value["__v_skip"]) { + return value; + } + seen = seen || /* @__PURE__ */ new Set(); + if (seen.has(value)) { + return value; + } + seen.add(value); + depth--; + if (isRef(value)) { + traverse(value.value, depth, seen); + } else if (isArray(value)) { + for (let i = 0; i < value.length; i++) { + traverse(value[i], depth, seen); + } + } else if (isSet(value) || isMap(value)) { + value.forEach((v) => { + traverse(v, depth, seen); + }); + } else if (isPlainObject$1(value)) { + for (const key in value) { + traverse(value[key], depth, seen); + } + for (const key of Object.getOwnPropertySymbols(value)) { + if (Object.prototype.propertyIsEnumerable.call(value, key)) { + traverse(value[key], depth, seen); + } + } + } + return value; +} +/** +* @vue/runtime-core v3.5.4 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/ +const stack = []; +let isWarning = false; +function warn$1(msg, ...args) { + if (isWarning) return; + isWarning = true; + pauseTracking(); + const instance = stack.length ? stack[stack.length - 1].component : null; + const appWarnHandler = instance && instance.appContext.config.warnHandler; + const trace = getComponentTrace(); + if (appWarnHandler) { + callWithErrorHandling( + appWarnHandler, + instance, + 11, + [ + // eslint-disable-next-line no-restricted-syntax + msg + args.map((a) => { + var _a, _b; + return (_b = (_a = a.toString) == null ? void 0 : _a.call(a)) != null ? _b : JSON.stringify(a); + }).join(""), + instance && instance.proxy, + trace.map( + ({ vnode }) => `at <${formatComponentName(instance, vnode.type)}>` + ).join("\n"), + trace + ] + ); + } else { + const warnArgs = [`[Vue warn]: ${msg}`, ...args]; + if (trace.length && // avoid spamming console during tests + true) { + warnArgs.push(` +`, ...formatTrace(trace)); + } + console.warn(...warnArgs); + } + resetTracking(); + isWarning = false; +} +function getComponentTrace() { + let currentVNode = stack[stack.length - 1]; + if (!currentVNode) { + return []; + } + const normalizedStack = []; + while (currentVNode) { + const last = normalizedStack[0]; + if (last && last.vnode === currentVNode) { + last.recurseCount++; + } else { + normalizedStack.push({ + vnode: currentVNode, + recurseCount: 0 + }); + } + const parentInstance = currentVNode.component && currentVNode.component.parent; + currentVNode = parentInstance && parentInstance.vnode; + } + return normalizedStack; +} +function formatTrace(trace) { + const logs = []; + trace.forEach((entry, i) => { + logs.push(...i === 0 ? [] : [` +`], ...formatTraceEntry(entry)); + }); + return logs; +} +function formatTraceEntry({ vnode, recurseCount }) { + const postfix = recurseCount > 0 ? `... (${recurseCount} recursive calls)` : ``; + const isRoot = vnode.component ? vnode.component.parent == null : false; + const open = ` at <${formatComponentName( + vnode.component, + vnode.type, + isRoot + )}`; + const close = `>` + postfix; + return vnode.props ? [open, ...formatProps(vnode.props), close] : [open + close]; +} +function formatProps(props) { + const res = []; + const keys = Object.keys(props); + keys.slice(0, 3).forEach((key) => { + res.push(...formatProp(key, props[key])); + }); + if (keys.length > 3) { + res.push(` ...`); + } + return res; +} +function formatProp(key, value, raw) { + if (isString(value)) { + value = JSON.stringify(value); + return raw ? value : [`${key}=${value}`]; + } else if (typeof value === "number" || typeof value === "boolean" || value == null) { + return raw ? value : [`${key}=${value}`]; + } else if (isRef(value)) { + value = formatProp(key, toRaw(value.value), true); + return raw ? value : [`${key}=Ref<`, value, `>`]; + } else if (isFunction(value)) { + return [`${key}=fn${value.name ? `<${value.name}>` : ``}`]; + } else { + value = toRaw(value); + return raw ? value : [`${key}=`, value]; + } +} +function callWithErrorHandling(fn, instance, type, args) { + try { + return args ? fn(...args) : fn(); + } catch (err) { + handleError(err, instance, type); + } +} +function callWithAsyncErrorHandling(fn, instance, type, args) { + if (isFunction(fn)) { + const res = callWithErrorHandling(fn, instance, type, args); + if (res && isPromise(res)) { + res.catch((err) => { + handleError(err, instance, type); + }); + } + return res; + } + if (isArray(fn)) { + const values = []; + for (let i = 0; i < fn.length; i++) { + values.push(callWithAsyncErrorHandling(fn[i], instance, type, args)); + } + return values; + } +} +function handleError(err, instance, type, throwInDev = true) { + const contextVNode = instance ? instance.vnode : null; + const { errorHandler, throwUnhandledErrorInProduction } = instance && instance.appContext.config || EMPTY_OBJ; + if (instance) { + let cur = instance.parent; + const exposedInstance = instance.proxy; + const errorInfo = `https://vuejs.org/error-reference/#runtime-${type}`; + while (cur) { + const errorCapturedHooks = cur.ec; + if (errorCapturedHooks) { + for (let i = 0; i < errorCapturedHooks.length; i++) { + if (errorCapturedHooks[i](err, exposedInstance, errorInfo) === false) { + return; + } + } + } + cur = cur.parent; + } + if (errorHandler) { + pauseTracking(); + callWithErrorHandling(errorHandler, null, 10, [ + err, + exposedInstance, + errorInfo + ]); + resetTracking(); + return; + } + } + logError(err, type, contextVNode, throwInDev, throwUnhandledErrorInProduction); +} +function logError(err, type, contextVNode, throwInDev = true, throwInProd = false) { + if (throwInProd) { + throw err; + } else { + console.error(err); + } +} +let isFlushing = false; +let isFlushPending = false; +const queue = []; +let flushIndex = 0; +const pendingPostFlushCbs = []; +let activePostFlushCbs = null; +let postFlushIndex = 0; +const resolvedPromise = /* @__PURE__ */ Promise.resolve(); +let currentFlushPromise = null; +function nextTick(fn) { + const p2 = currentFlushPromise || resolvedPromise; + return fn ? p2.then(this ? fn.bind(this) : fn) : p2; +} +function findInsertionIndex(id) { + let start = isFlushing ? flushIndex + 1 : 0; + let end = queue.length; + while (start < end) { + const middle = start + end >>> 1; + const middleJob = queue[middle]; + const middleJobId = getId(middleJob); + if (middleJobId < id || middleJobId === id && middleJob.flags & 2) { + start = middle + 1; + } else { + end = middle; + } + } + return start; +} +function queueJob(job) { + if (!(job.flags & 1)) { + const jobId = getId(job); + const lastJob = queue[queue.length - 1]; + if (!lastJob || // fast path when the job id is larger than the tail + !(job.flags & 2) && jobId >= getId(lastJob)) { + queue.push(job); + } else { + queue.splice(findInsertionIndex(jobId), 0, job); + } + job.flags |= 1; + queueFlush(); + } +} +function queueFlush() { + if (!isFlushing && !isFlushPending) { + isFlushPending = true; + currentFlushPromise = resolvedPromise.then(flushJobs); + } +} +function queuePostFlushCb(cb) { + if (!isArray(cb)) { + if (activePostFlushCbs && cb.id === -1) { + activePostFlushCbs.splice(postFlushIndex + 1, 0, cb); + } else if (!(cb.flags & 1)) { + pendingPostFlushCbs.push(cb); + cb.flags |= 1; + } + } else { + pendingPostFlushCbs.push(...cb); + } + queueFlush(); +} +function flushPreFlushCbs(instance, seen, i = isFlushing ? flushIndex + 1 : 0) { + for (; i < queue.length; i++) { + const cb = queue[i]; + if (cb && cb.flags & 2) { + if (instance && cb.id !== instance.uid) { + continue; + } + queue.splice(i, 1); + i--; + if (cb.flags & 4) { + cb.flags &= ~1; + } + cb(); + cb.flags &= ~1; + } + } +} +function flushPostFlushCbs(seen) { + if (pendingPostFlushCbs.length) { + const deduped = [...new Set(pendingPostFlushCbs)].sort( + (a, b) => getId(a) - getId(b) + ); + pendingPostFlushCbs.length = 0; + if (activePostFlushCbs) { + activePostFlushCbs.push(...deduped); + return; + } + activePostFlushCbs = deduped; + for (postFlushIndex = 0; postFlushIndex < activePostFlushCbs.length; postFlushIndex++) { + const cb = activePostFlushCbs[postFlushIndex]; + if (cb.flags & 4) { + cb.flags &= ~1; + } + if (!(cb.flags & 8)) cb(); + cb.flags &= ~1; + } + activePostFlushCbs = null; + postFlushIndex = 0; + } +} +const getId = (job) => job.id == null ? job.flags & 2 ? -1 : Infinity : job.id; +function flushJobs(seen) { + isFlushPending = false; + isFlushing = true; + try { + for (flushIndex = 0; flushIndex < queue.length; flushIndex++) { + const job = queue[flushIndex]; + if (job && !(job.flags & 8)) { + if (false) ; + if (job.flags & 4) { + job.flags &= ~1; + } + callWithErrorHandling( + job, + job.i, + job.i ? 15 : 14 + ); + job.flags &= ~1; + } + } + } finally { + for (; flushIndex < queue.length; flushIndex++) { + const job = queue[flushIndex]; + if (job) { + job.flags &= ~1; + } + } + flushIndex = 0; + queue.length = 0; + flushPostFlushCbs(); + isFlushing = false; + currentFlushPromise = null; + if (queue.length || pendingPostFlushCbs.length) { + flushJobs(); + } + } +} +let currentRenderingInstance = null; +let currentScopeId = null; +function setCurrentRenderingInstance(instance) { + const prev = currentRenderingInstance; + currentRenderingInstance = instance; + currentScopeId = instance && instance.type.__scopeId || null; + return prev; +} +function withCtx(fn, ctx = currentRenderingInstance, isNonScopedSlot) { + if (!ctx) return fn; + if (fn._n) { + return fn; + } + const renderFnWithContext = (...args) => { + if (renderFnWithContext._d) { + setBlockTracking(-1); + } + const prevInstance = setCurrentRenderingInstance(ctx); + let res; + try { + res = fn(...args); + } finally { + setCurrentRenderingInstance(prevInstance); + if (renderFnWithContext._d) { + setBlockTracking(1); + } + } + return res; + }; + renderFnWithContext._n = true; + renderFnWithContext._c = true; + renderFnWithContext._d = true; + return renderFnWithContext; +} +function withDirectives(vnode, directives) { + if (currentRenderingInstance === null) { + return vnode; + } + const instance = getComponentPublicInstance(currentRenderingInstance); + const bindings = vnode.dirs || (vnode.dirs = []); + for (let i = 0; i < directives.length; i++) { + let [dir, value, arg, modifiers = EMPTY_OBJ] = directives[i]; + if (dir) { + if (isFunction(dir)) { + dir = { + mounted: dir, + updated: dir + }; + } + if (dir.deep) { + traverse(value); + } + bindings.push({ + dir, + instance, + value, + oldValue: void 0, + arg, + modifiers + }); + } + } + return vnode; +} +function invokeDirectiveHook(vnode, prevVNode, instance, name) { + const bindings = vnode.dirs; + const oldBindings = prevVNode && prevVNode.dirs; + for (let i = 0; i < bindings.length; i++) { + const binding = bindings[i]; + if (oldBindings) { + binding.oldValue = oldBindings[i].value; + } + let hook = binding.dir[name]; + if (hook) { + pauseTracking(); + callWithAsyncErrorHandling(hook, instance, 8, [ + vnode.el, + binding, + vnode, + prevVNode + ]); + resetTracking(); + } + } +} +const TeleportEndKey = Symbol("_vte"); +const isTeleport = (type) => type.__isTeleport; +const isTeleportDisabled = (props) => props && (props.disabled || props.disabled === ""); +const isTeleportDeferred = (props) => props && (props.defer || props.defer === ""); +const isTargetSVG = (target) => typeof SVGElement !== "undefined" && target instanceof SVGElement; +const isTargetMathML = (target) => typeof MathMLElement === "function" && target instanceof MathMLElement; +const resolveTarget = (props, select) => { + const targetSelector = props && props.to; + if (isString(targetSelector)) { + if (!select) { + return null; + } else { + const target = select(targetSelector); + return target; + } + } else { + return targetSelector; + } +}; +const TeleportImpl = { + name: "Teleport", + __isTeleport: true, + process(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, internals) { + const { + mc: mountChildren, + pc: patchChildren, + pbc: patchBlockChildren, + o: { insert, querySelector, createText, createComment } + } = internals; + const disabled = isTeleportDisabled(n2.props); + let { shapeFlag, children, dynamicChildren } = n2; + if (n1 == null) { + const placeholder = n2.el = createText(""); + const mainAnchor = n2.anchor = createText(""); + insert(placeholder, container, anchor); + insert(mainAnchor, container, anchor); + const mount = (container2, anchor2) => { + if (shapeFlag & 16) { + mountChildren( + children, + container2, + anchor2, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } + }; + const mountToTarget = () => { + const target = n2.target = resolveTarget(n2.props, querySelector); + const targetAnchor = prepareAnchor(target, n2, createText, insert); + if (target) { + if (namespace !== "svg" && isTargetSVG(target)) { + namespace = "svg"; + } else if (namespace !== "mathml" && isTargetMathML(target)) { + namespace = "mathml"; + } + if (!disabled) { + mount(target, targetAnchor); + updateCssVars(n2); + } + } + }; + if (disabled) { + mount(container, mainAnchor); + updateCssVars(n2); + } + if (isTeleportDeferred(n2.props)) { + queuePostRenderEffect(mountToTarget, parentSuspense); + } else { + mountToTarget(); + } + } else { + n2.el = n1.el; + n2.targetStart = n1.targetStart; + const mainAnchor = n2.anchor = n1.anchor; + const target = n2.target = n1.target; + const targetAnchor = n2.targetAnchor = n1.targetAnchor; + const wasDisabled = isTeleportDisabled(n1.props); + const currentContainer = wasDisabled ? container : target; + const currentAnchor = wasDisabled ? mainAnchor : targetAnchor; + if (namespace === "svg" || isTargetSVG(target)) { + namespace = "svg"; + } else if (namespace === "mathml" || isTargetMathML(target)) { + namespace = "mathml"; + } + if (dynamicChildren) { + patchBlockChildren( + n1.dynamicChildren, + dynamicChildren, + currentContainer, + parentComponent, + parentSuspense, + namespace, + slotScopeIds + ); + traverseStaticChildren(n1, n2, true); + } else if (!optimized) { + patchChildren( + n1, + n2, + currentContainer, + currentAnchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + false + ); + } + if (disabled) { + if (!wasDisabled) { + moveTeleport( + n2, + container, + mainAnchor, + internals, + 1 + ); + } else { + if (n2.props && n1.props && n2.props.to !== n1.props.to) { + n2.props.to = n1.props.to; + } + } + } else { + if ((n2.props && n2.props.to) !== (n1.props && n1.props.to)) { + const nextTarget = n2.target = resolveTarget( + n2.props, + querySelector + ); + if (nextTarget) { + moveTeleport( + n2, + nextTarget, + null, + internals, + 0 + ); + } + } else if (wasDisabled) { + moveTeleport( + n2, + target, + targetAnchor, + internals, + 1 + ); + } + } + updateCssVars(n2); + } + }, + remove(vnode, parentComponent, parentSuspense, { um: unmount, o: { remove: hostRemove } }, doRemove) { + const { + shapeFlag, + children, + anchor, + targetStart, + targetAnchor, + target, + props + } = vnode; + if (target) { + hostRemove(targetStart); + hostRemove(targetAnchor); + } + doRemove && hostRemove(anchor); + if (shapeFlag & 16) { + const shouldRemove = doRemove || !isTeleportDisabled(props); + for (let i = 0; i < children.length; i++) { + const child = children[i]; + unmount( + child, + parentComponent, + parentSuspense, + shouldRemove, + !!child.dynamicChildren + ); + } + } + }, + move: moveTeleport, + hydrate: hydrateTeleport +}; +function moveTeleport(vnode, container, parentAnchor, { o: { insert }, m: move }, moveType = 2) { + if (moveType === 0) { + insert(vnode.targetAnchor, container, parentAnchor); + } + const { el, anchor, shapeFlag, children, props } = vnode; + const isReorder = moveType === 2; + if (isReorder) { + insert(el, container, parentAnchor); + } + if (!isReorder || isTeleportDisabled(props)) { + if (shapeFlag & 16) { + for (let i = 0; i < children.length; i++) { + move( + children[i], + container, + parentAnchor, + 2 + ); + } + } + } + if (isReorder) { + insert(anchor, container, parentAnchor); + } +} +function hydrateTeleport(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized, { + o: { nextSibling, parentNode, querySelector, insert, createText } +}, hydrateChildren) { + const target = vnode.target = resolveTarget( + vnode.props, + querySelector + ); + if (target) { + const targetNode = target._lpa || target.firstChild; + if (vnode.shapeFlag & 16) { + if (isTeleportDisabled(vnode.props)) { + vnode.anchor = hydrateChildren( + nextSibling(node), + vnode, + parentNode(node), + parentComponent, + parentSuspense, + slotScopeIds, + optimized + ); + vnode.targetStart = targetNode; + vnode.targetAnchor = targetNode && nextSibling(targetNode); + } else { + vnode.anchor = nextSibling(node); + let targetAnchor = targetNode; + while (targetAnchor) { + if (targetAnchor && targetAnchor.nodeType === 8) { + if (targetAnchor.data === "teleport start anchor") { + vnode.targetStart = targetAnchor; + } else if (targetAnchor.data === "teleport anchor") { + vnode.targetAnchor = targetAnchor; + target._lpa = vnode.targetAnchor && nextSibling(vnode.targetAnchor); + break; + } + } + targetAnchor = nextSibling(targetAnchor); + } + if (!vnode.targetAnchor) { + prepareAnchor(target, vnode, createText, insert); + } + hydrateChildren( + targetNode && nextSibling(targetNode), + vnode, + target, + parentComponent, + parentSuspense, + slotScopeIds, + optimized + ); + } + } + updateCssVars(vnode); + } + return vnode.anchor && nextSibling(vnode.anchor); +} +const Teleport = TeleportImpl; +function updateCssVars(vnode) { + const ctx = vnode.ctx; + if (ctx && ctx.ut) { + let node = vnode.targetStart; + while (node && node !== vnode.targetAnchor) { + if (node.nodeType === 1) node.setAttribute("data-v-owner", ctx.uid); + node = node.nextSibling; + } + ctx.ut(); + } +} +function prepareAnchor(target, vnode, createText, insert) { + const targetStart = vnode.targetStart = createText(""); + const targetAnchor = vnode.targetAnchor = createText(""); + targetStart[TeleportEndKey] = targetAnchor; + if (target) { + insert(targetStart, target); + insert(targetAnchor, target); + } + return targetAnchor; +} +const leaveCbKey = Symbol("_leaveCb"); +const enterCbKey = Symbol("_enterCb"); +function useTransitionState() { + const state = { + isMounted: false, + isLeaving: false, + isUnmounting: false, + leavingVNodes: /* @__PURE__ */ new Map() + }; + onMounted(() => { + state.isMounted = true; + }); + onBeforeUnmount(() => { + state.isUnmounting = true; + }); + return state; +} +const TransitionHookValidator = [Function, Array]; +const BaseTransitionPropsValidators = { + mode: String, + appear: Boolean, + persisted: Boolean, + // enter + onBeforeEnter: TransitionHookValidator, + onEnter: TransitionHookValidator, + onAfterEnter: TransitionHookValidator, + onEnterCancelled: TransitionHookValidator, + // leave + onBeforeLeave: TransitionHookValidator, + onLeave: TransitionHookValidator, + onAfterLeave: TransitionHookValidator, + onLeaveCancelled: TransitionHookValidator, + // appear + onBeforeAppear: TransitionHookValidator, + onAppear: TransitionHookValidator, + onAfterAppear: TransitionHookValidator, + onAppearCancelled: TransitionHookValidator +}; +const recursiveGetSubtree = (instance) => { + const subTree = instance.subTree; + return subTree.component ? recursiveGetSubtree(subTree.component) : subTree; +}; +const BaseTransitionImpl = { + name: `BaseTransition`, + props: BaseTransitionPropsValidators, + setup(props, { slots }) { + const instance = getCurrentInstance(); + const state = useTransitionState(); + return () => { + const children = slots.default && getTransitionRawChildren(slots.default(), true); + if (!children || !children.length) { + return; + } + const child = findNonCommentChild(children); + const rawProps = toRaw(props); + const { mode } = rawProps; + if (state.isLeaving) { + return emptyPlaceholder(child); + } + const innerChild = getInnerChild$1(child); + if (!innerChild) { + return emptyPlaceholder(child); + } + let enterHooks = resolveTransitionHooks( + innerChild, + rawProps, + state, + instance, + // #11061, ensure enterHooks is fresh after clone + (hooks) => enterHooks = hooks + ); + if (innerChild.type !== Comment) { + setTransitionHooks(innerChild, enterHooks); + } + const oldChild = instance.subTree; + const oldInnerChild = oldChild && getInnerChild$1(oldChild); + if (oldInnerChild && oldInnerChild.type !== Comment && !isSameVNodeType(innerChild, oldInnerChild) && recursiveGetSubtree(instance).type !== Comment) { + const leavingHooks = resolveTransitionHooks( + oldInnerChild, + rawProps, + state, + instance + ); + setTransitionHooks(oldInnerChild, leavingHooks); + if (mode === "out-in" && innerChild.type !== Comment) { + state.isLeaving = true; + leavingHooks.afterLeave = () => { + state.isLeaving = false; + if (!(instance.job.flags & 8)) { + instance.update(); + } + delete leavingHooks.afterLeave; + }; + return emptyPlaceholder(child); + } else if (mode === "in-out" && innerChild.type !== Comment) { + leavingHooks.delayLeave = (el, earlyRemove, delayedLeave) => { + const leavingVNodesCache = getLeavingNodesForType( + state, + oldInnerChild + ); + leavingVNodesCache[String(oldInnerChild.key)] = oldInnerChild; + el[leaveCbKey] = () => { + earlyRemove(); + el[leaveCbKey] = void 0; + delete enterHooks.delayedLeave; + }; + enterHooks.delayedLeave = delayedLeave; + }; + } + } + return child; + }; + } +}; +function findNonCommentChild(children) { + let child = children[0]; + if (children.length > 1) { + for (const c of children) { + if (c.type !== Comment) { + child = c; + break; + } + } + } + return child; +} +const BaseTransition = BaseTransitionImpl; +function getLeavingNodesForType(state, vnode) { + const { leavingVNodes } = state; + let leavingVNodesCache = leavingVNodes.get(vnode.type); + if (!leavingVNodesCache) { + leavingVNodesCache = /* @__PURE__ */ Object.create(null); + leavingVNodes.set(vnode.type, leavingVNodesCache); + } + return leavingVNodesCache; +} +function resolveTransitionHooks(vnode, props, state, instance, postClone) { + const { + appear, + mode, + persisted = false, + onBeforeEnter, + onEnter, + onAfterEnter, + onEnterCancelled, + onBeforeLeave, + onLeave, + onAfterLeave, + onLeaveCancelled, + onBeforeAppear, + onAppear, + onAfterAppear, + onAppearCancelled + } = props; + const key = String(vnode.key); + const leavingVNodesCache = getLeavingNodesForType(state, vnode); + const callHook2 = (hook, args) => { + hook && callWithAsyncErrorHandling( + hook, + instance, + 9, + args + ); + }; + const callAsyncHook = (hook, args) => { + const done = args[1]; + callHook2(hook, args); + if (isArray(hook)) { + if (hook.every((hook2) => hook2.length <= 1)) done(); + } else if (hook.length <= 1) { + done(); + } + }; + const hooks = { + mode, + persisted, + beforeEnter(el) { + let hook = onBeforeEnter; + if (!state.isMounted) { + if (appear) { + hook = onBeforeAppear || onBeforeEnter; + } else { + return; + } + } + if (el[leaveCbKey]) { + el[leaveCbKey]( + true + /* cancelled */ + ); + } + const leavingVNode = leavingVNodesCache[key]; + if (leavingVNode && isSameVNodeType(vnode, leavingVNode) && leavingVNode.el[leaveCbKey]) { + leavingVNode.el[leaveCbKey](); + } + callHook2(hook, [el]); + }, + enter(el) { + let hook = onEnter; + let afterHook = onAfterEnter; + let cancelHook = onEnterCancelled; + if (!state.isMounted) { + if (appear) { + hook = onAppear || onEnter; + afterHook = onAfterAppear || onAfterEnter; + cancelHook = onAppearCancelled || onEnterCancelled; + } else { + return; + } + } + let called = false; + const done = el[enterCbKey] = (cancelled) => { + if (called) return; + called = true; + if (cancelled) { + callHook2(cancelHook, [el]); + } else { + callHook2(afterHook, [el]); + } + if (hooks.delayedLeave) { + hooks.delayedLeave(); + } + el[enterCbKey] = void 0; + }; + if (hook) { + callAsyncHook(hook, [el, done]); + } else { + done(); + } + }, + leave(el, remove2) { + const key2 = String(vnode.key); + if (el[enterCbKey]) { + el[enterCbKey]( + true + /* cancelled */ + ); + } + if (state.isUnmounting) { + return remove2(); + } + callHook2(onBeforeLeave, [el]); + let called = false; + const done = el[leaveCbKey] = (cancelled) => { + if (called) return; + called = true; + remove2(); + if (cancelled) { + callHook2(onLeaveCancelled, [el]); + } else { + callHook2(onAfterLeave, [el]); + } + el[leaveCbKey] = void 0; + if (leavingVNodesCache[key2] === vnode) { + delete leavingVNodesCache[key2]; + } + }; + leavingVNodesCache[key2] = vnode; + if (onLeave) { + callAsyncHook(onLeave, [el, done]); + } else { + done(); + } + }, + clone(vnode2) { + const hooks2 = resolveTransitionHooks( + vnode2, + props, + state, + instance, + postClone + ); + if (postClone) postClone(hooks2); + return hooks2; + } + }; + return hooks; +} +function emptyPlaceholder(vnode) { + if (isKeepAlive(vnode)) { + vnode = cloneVNode(vnode); + vnode.children = null; + return vnode; + } +} +function getInnerChild$1(vnode) { + if (!isKeepAlive(vnode)) { + if (isTeleport(vnode.type) && vnode.children) { + return findNonCommentChild(vnode.children); + } + return vnode; + } + const { shapeFlag, children } = vnode; + if (children) { + if (shapeFlag & 16) { + return children[0]; + } + if (shapeFlag & 32 && isFunction(children.default)) { + return children.default(); + } + } +} +function setTransitionHooks(vnode, hooks) { + if (vnode.shapeFlag & 6 && vnode.component) { + vnode.transition = hooks; + setTransitionHooks(vnode.component.subTree, hooks); + } else if (vnode.shapeFlag & 128) { + vnode.ssContent.transition = hooks.clone(vnode.ssContent); + vnode.ssFallback.transition = hooks.clone(vnode.ssFallback); + } else { + vnode.transition = hooks; + } +} +function getTransitionRawChildren(children, keepComment = false, parentKey) { + let ret = []; + let keyedFragmentCount = 0; + for (let i = 0; i < children.length; i++) { + let child = children[i]; + const key = parentKey == null ? child.key : String(parentKey) + String(child.key != null ? child.key : i); + if (child.type === Fragment) { + if (child.patchFlag & 128) keyedFragmentCount++; + ret = ret.concat( + getTransitionRawChildren(child.children, keepComment, key) + ); + } else if (keepComment || child.type !== Comment) { + ret.push(key != null ? cloneVNode(child, { key }) : child); + } + } + if (keyedFragmentCount > 1) { + for (let i = 0; i < ret.length; i++) { + ret[i].patchFlag = -2; + } + } + return ret; +} +/*! #__NO_SIDE_EFFECTS__ */ +// @__NO_SIDE_EFFECTS__ +function defineComponent(options, extraOptions) { + return isFunction(options) ? ( + // #8236: extend call and options.name access are considered side-effects + // by Rollup, so we have to wrap it in a pure-annotated IIFE. + /* @__PURE__ */ (() => extend({ name: options.name }, extraOptions, { setup: options }))() + ) : options; +} +function markAsyncBoundary(instance) { + instance.ids = [instance.ids[0] + instance.ids[2]++ + "-", 0, 0]; +} +function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) { + if (isArray(rawRef)) { + rawRef.forEach( + (r, i) => setRef( + r, + oldRawRef && (isArray(oldRawRef) ? oldRawRef[i] : oldRawRef), + parentSuspense, + vnode, + isUnmount + ) + ); + return; + } + if (isAsyncWrapper(vnode) && !isUnmount) { + return; + } + const refValue = vnode.shapeFlag & 4 ? getComponentPublicInstance(vnode.component) : vnode.el; + const value = isUnmount ? null : refValue; + const { i: owner, r: ref3 } = rawRef; + const oldRef = oldRawRef && oldRawRef.r; + const refs = owner.refs === EMPTY_OBJ ? owner.refs = {} : owner.refs; + const setupState = owner.setupState; + const rawSetupState = toRaw(setupState); + const canSetSetupRef = setupState === EMPTY_OBJ ? () => false : (key) => { + return hasOwn(rawSetupState, key); + }; + if (oldRef != null && oldRef !== ref3) { + if (isString(oldRef)) { + refs[oldRef] = null; + if (canSetSetupRef(oldRef)) { + setupState[oldRef] = null; + } + } else if (isRef(oldRef)) { + oldRef.value = null; + } + } + if (isFunction(ref3)) { + callWithErrorHandling(ref3, owner, 12, [value, refs]); + } else { + const _isString = isString(ref3); + const _isRef = isRef(ref3); + if (_isString || _isRef) { + const doSet = () => { + if (rawRef.f) { + const existing = _isString ? canSetSetupRef(ref3) ? setupState[ref3] : refs[ref3] : ref3.value; + if (isUnmount) { + isArray(existing) && remove(existing, refValue); + } else { + if (!isArray(existing)) { + if (_isString) { + refs[ref3] = [refValue]; + if (canSetSetupRef(ref3)) { + setupState[ref3] = refs[ref3]; + } + } else { + ref3.value = [refValue]; + if (rawRef.k) refs[rawRef.k] = ref3.value; + } + } else if (!existing.includes(refValue)) { + existing.push(refValue); + } + } + } else if (_isString) { + refs[ref3] = value; + if (canSetSetupRef(ref3)) { + setupState[ref3] = value; + } + } else if (_isRef) { + ref3.value = value; + if (rawRef.k) refs[rawRef.k] = value; + } else ; + }; + if (value) { + doSet.id = -1; + queuePostRenderEffect(doSet, parentSuspense); + } else { + doSet(); + } + } + } +} +const isAsyncWrapper = (i) => !!i.type.__asyncLoader; +const isKeepAlive = (vnode) => vnode.type.__isKeepAlive; +const KeepAliveImpl = { + name: `KeepAlive`, + // Marker for special handling inside the renderer. We are not using a === + // check directly on KeepAlive in the renderer, because importing it directly + // would prevent it from being tree-shaken. + __isKeepAlive: true, + props: { + include: [String, RegExp, Array], + exclude: [String, RegExp, Array], + max: [String, Number] + }, + setup(props, { slots }) { + const instance = getCurrentInstance(); + const sharedContext = instance.ctx; + if (!sharedContext.renderer) { + return () => { + const children = slots.default && slots.default(); + return children && children.length === 1 ? children[0] : children; + }; + } + const cache = /* @__PURE__ */ new Map(); + const keys = /* @__PURE__ */ new Set(); + let current = null; + const parentSuspense = instance.suspense; + const { + renderer: { + p: patch, + m: move, + um: _unmount, + o: { createElement } + } + } = sharedContext; + const storageContainer = createElement("div"); + sharedContext.activate = (vnode, container, anchor, namespace, optimized) => { + const instance2 = vnode.component; + move(vnode, container, anchor, 0, parentSuspense); + patch( + instance2.vnode, + vnode, + container, + anchor, + instance2, + parentSuspense, + namespace, + vnode.slotScopeIds, + optimized + ); + queuePostRenderEffect(() => { + instance2.isDeactivated = false; + if (instance2.a) { + invokeArrayFns(instance2.a); + } + const vnodeHook = vnode.props && vnode.props.onVnodeMounted; + if (vnodeHook) { + invokeVNodeHook(vnodeHook, instance2.parent, vnode); + } + }, parentSuspense); + }; + sharedContext.deactivate = (vnode) => { + const instance2 = vnode.component; + invalidateMount(instance2.m); + invalidateMount(instance2.a); + move(vnode, storageContainer, null, 1, parentSuspense); + queuePostRenderEffect(() => { + if (instance2.da) { + invokeArrayFns(instance2.da); + } + const vnodeHook = vnode.props && vnode.props.onVnodeUnmounted; + if (vnodeHook) { + invokeVNodeHook(vnodeHook, instance2.parent, vnode); + } + instance2.isDeactivated = true; + }, parentSuspense); + }; + function unmount(vnode) { + resetShapeFlag(vnode); + _unmount(vnode, instance, parentSuspense, true); + } + function pruneCache(filter) { + cache.forEach((vnode, key) => { + const name = getComponentName(vnode.type); + if (name && !filter(name)) { + pruneCacheEntry(key); + } + }); + } + function pruneCacheEntry(key) { + const cached = cache.get(key); + if (cached && (!current || !isSameVNodeType(cached, current))) { + unmount(cached); + } else if (current) { + resetShapeFlag(current); + } + cache.delete(key); + keys.delete(key); + } + watch( + () => [props.include, props.exclude], + ([include, exclude]) => { + include && pruneCache((name) => matches(include, name)); + exclude && pruneCache((name) => !matches(exclude, name)); + }, + // prune post-render after `current` has been updated + { flush: "post", deep: true } + ); + let pendingCacheKey = null; + const cacheSubtree = () => { + if (pendingCacheKey != null) { + if (isSuspense(instance.subTree.type)) { + queuePostRenderEffect(() => { + cache.set(pendingCacheKey, getInnerChild(instance.subTree)); + }, instance.subTree.suspense); + } else { + cache.set(pendingCacheKey, getInnerChild(instance.subTree)); + } + } + }; + onMounted(cacheSubtree); + onUpdated(cacheSubtree); + onBeforeUnmount(() => { + cache.forEach((cached) => { + const { subTree, suspense } = instance; + const vnode = getInnerChild(subTree); + if (cached.type === vnode.type && cached.key === vnode.key) { + resetShapeFlag(vnode); + const da = vnode.component.da; + da && queuePostRenderEffect(da, suspense); + return; + } + unmount(cached); + }); + }); + return () => { + pendingCacheKey = null; + if (!slots.default) { + return current = null; + } + const children = slots.default(); + const rawVNode = children[0]; + if (children.length > 1) { + current = null; + return children; + } else if (!isVNode(rawVNode) || !(rawVNode.shapeFlag & 4) && !(rawVNode.shapeFlag & 128)) { + current = null; + return rawVNode; + } + let vnode = getInnerChild(rawVNode); + if (vnode.type === Comment) { + current = null; + return vnode; + } + const comp = vnode.type; + const name = getComponentName( + isAsyncWrapper(vnode) ? vnode.type.__asyncResolved || {} : comp + ); + const { include, exclude, max } = props; + if (include && (!name || !matches(include, name)) || exclude && name && matches(exclude, name)) { + vnode.shapeFlag &= ~256; + current = vnode; + return rawVNode; + } + const key = vnode.key == null ? comp : vnode.key; + const cachedVNode = cache.get(key); + if (vnode.el) { + vnode = cloneVNode(vnode); + if (rawVNode.shapeFlag & 128) { + rawVNode.ssContent = vnode; + } + } + pendingCacheKey = key; + if (cachedVNode) { + vnode.el = cachedVNode.el; + vnode.component = cachedVNode.component; + if (vnode.transition) { + setTransitionHooks(vnode, vnode.transition); + } + vnode.shapeFlag |= 512; + keys.delete(key); + keys.add(key); + } else { + keys.add(key); + if (max && keys.size > parseInt(max, 10)) { + pruneCacheEntry(keys.values().next().value); + } + } + vnode.shapeFlag |= 256; + current = vnode; + return isSuspense(rawVNode.type) ? rawVNode : vnode; + }; + } +}; +const KeepAlive = KeepAliveImpl; +function matches(pattern, name) { + if (isArray(pattern)) { + return pattern.some((p2) => matches(p2, name)); + } else if (isString(pattern)) { + return pattern.split(",").includes(name); + } else if (isRegExp(pattern)) { + pattern.lastIndex = 0; + return pattern.test(name); + } + return false; +} +function onActivated(hook, target) { + registerKeepAliveHook(hook, "a", target); +} +function onDeactivated(hook, target) { + registerKeepAliveHook(hook, "da", target); +} +function registerKeepAliveHook(hook, type, target = currentInstance) { + const wrappedHook = hook.__wdc || (hook.__wdc = () => { + let current = target; + while (current) { + if (current.isDeactivated) { + return; + } + current = current.parent; + } + return hook(); + }); + injectHook(type, wrappedHook, target); + if (target) { + let current = target.parent; + while (current && current.parent) { + if (isKeepAlive(current.parent.vnode)) { + injectToKeepAliveRoot(wrappedHook, type, target, current); + } + current = current.parent; + } + } +} +function injectToKeepAliveRoot(hook, type, target, keepAliveRoot) { + const injected = injectHook( + type, + hook, + keepAliveRoot, + true + /* prepend */ + ); + onUnmounted(() => { + remove(keepAliveRoot[type], injected); + }, target); +} +function resetShapeFlag(vnode) { + vnode.shapeFlag &= ~256; + vnode.shapeFlag &= ~512; +} +function getInnerChild(vnode) { + return vnode.shapeFlag & 128 ? vnode.ssContent : vnode; +} +function injectHook(type, hook, target = currentInstance, prepend = false) { + if (target) { + const hooks = target[type] || (target[type] = []); + const wrappedHook = hook.__weh || (hook.__weh = (...args) => { + pauseTracking(); + const reset = setCurrentInstance(target); + const res = callWithAsyncErrorHandling(hook, target, type, args); + reset(); + resetTracking(); + return res; + }); + if (prepend) { + hooks.unshift(wrappedHook); + } else { + hooks.push(wrappedHook); + } + return wrappedHook; + } +} +const createHook = (lifecycle) => (hook, target = currentInstance) => { + if (!isInSSRComponentSetup || lifecycle === "sp") { + injectHook(lifecycle, (...args) => hook(...args), target); + } +}; +const onBeforeMount = createHook("bm"); +const onMounted = createHook("m"); +const onBeforeUpdate = createHook( + "bu" +); +const onUpdated = createHook("u"); +const onBeforeUnmount = createHook( + "bum" +); +const onUnmounted = createHook("um"); +const onServerPrefetch = createHook( + "sp" +); +const onRenderTriggered = createHook("rtg"); +const onRenderTracked = createHook("rtc"); +function onErrorCaptured(hook, target = currentInstance) { + injectHook("ec", hook, target); +} +const COMPONENTS = "components"; +function resolveComponent(name, maybeSelfReference) { + return resolveAsset(COMPONENTS, name, true, maybeSelfReference) || name; +} +const NULL_DYNAMIC_COMPONENT = Symbol.for("v-ndc"); +function resolveDynamicComponent(component) { + if (isString(component)) { + return resolveAsset(COMPONENTS, component, false) || component; + } else { + return component || NULL_DYNAMIC_COMPONENT; + } +} +function resolveAsset(type, name, warnMissing = true, maybeSelfReference = false) { + const instance = currentRenderingInstance || currentInstance; + if (instance) { + const Component = instance.type; + { + const selfName = getComponentName( + Component, + false + ); + if (selfName && (selfName === name || selfName === camelize(name) || selfName === capitalize(camelize(name)))) { + return Component; + } + } + const res = ( + // local registration + // check instance[type] first which is resolved for options API + resolve(instance[type] || Component[type], name) || // global registration + resolve(instance.appContext[type], name) + ); + if (!res && maybeSelfReference) { + return Component; + } + return res; + } +} +function resolve(registry, name) { + return registry && (registry[name] || registry[camelize(name)] || registry[capitalize(camelize(name))]); +} +function renderList(source, renderItem, cache, index) { + let ret; + const cached = cache; + const sourceIsArray = isArray(source); + if (sourceIsArray || isString(source)) { + const sourceIsReactiveArray = sourceIsArray && isReactive(source); + let needsWrap = false; + if (sourceIsReactiveArray) { + needsWrap = !isShallow(source); + source = shallowReadArray(source); + } + ret = new Array(source.length); + for (let i = 0, l = source.length; i < l; i++) { + ret[i] = renderItem( + needsWrap ? toReactive(source[i]) : source[i], + i, + void 0, + cached + ); + } + } else if (typeof source === "number") { + ret = new Array(source); + for (let i = 0; i < source; i++) { + ret[i] = renderItem(i + 1, i, void 0, cached); + } + } else if (isObject(source)) { + if (source[Symbol.iterator]) { + ret = Array.from( + source, + (item, i) => renderItem(item, i, void 0, cached) + ); + } else { + const keys = Object.keys(source); + ret = new Array(keys.length); + for (let i = 0, l = keys.length; i < l; i++) { + const key = keys[i]; + ret[i] = renderItem(source[key], key, i, cached); + } + } + } else { + ret = []; + } + return ret; +} +function createSlots(slots, dynamicSlots) { + for (let i = 0; i < dynamicSlots.length; i++) { + const slot = dynamicSlots[i]; + if (isArray(slot)) { + for (let j = 0; j < slot.length; j++) { + slots[slot[j].name] = slot[j].fn; + } + } else if (slot) { + slots[slot.name] = slot.key ? (...args) => { + const res = slot.fn(...args); + if (res) res.key = slot.key; + return res; + } : slot.fn; + } + } + return slots; +} +function renderSlot(slots, name, props = {}, fallback, noSlotted) { + if (currentRenderingInstance.ce || currentRenderingInstance.parent && isAsyncWrapper(currentRenderingInstance.parent) && currentRenderingInstance.parent.ce) { + if (name !== "default") props.name = name; + return openBlock(), createBlock( + Fragment, + null, + [createVNode("slot", props, fallback && fallback())], + 64 + ); + } + let slot = slots[name]; + if (slot && slot._c) { + slot._d = false; + } + openBlock(); + const validSlotContent = slot && ensureValidVNode(slot(props)); + const rendered = createBlock( + Fragment, + { + key: (props.key || // slot content array of a dynamic conditional slot may have a branch + // key attached in the `createSlots` helper, respect that + validSlotContent && validSlotContent.key || `_${name}`) + // #7256 force differentiate fallback content from actual content + (!validSlotContent && fallback ? "_fb" : "") + }, + validSlotContent || (fallback ? fallback() : []), + validSlotContent && slots._ === 1 ? 64 : -2 + ); + if (rendered.scopeId) { + rendered.slotScopeIds = [rendered.scopeId + "-s"]; + } + if (slot && slot._c) { + slot._d = true; + } + return rendered; +} +function ensureValidVNode(vnodes) { + return vnodes.some((child) => { + if (!isVNode(child)) return true; + if (child.type === Comment) return false; + if (child.type === Fragment && !ensureValidVNode(child.children)) + return false; + return true; + }) ? vnodes : null; +} +const getPublicInstance = (i) => { + if (!i) return null; + if (isStatefulComponent(i)) return getComponentPublicInstance(i); + return getPublicInstance(i.parent); +}; +const publicPropertiesMap = ( + // Move PURE marker to new line to workaround compiler discarding it + // due to type annotation + /* @__PURE__ */ extend(/* @__PURE__ */ Object.create(null), { + $: (i) => i, + $el: (i) => i.vnode.el, + $data: (i) => i.data, + $props: (i) => i.props, + $attrs: (i) => i.attrs, + $slots: (i) => i.slots, + $refs: (i) => i.refs, + $parent: (i) => getPublicInstance(i.parent), + $root: (i) => getPublicInstance(i.root), + $host: (i) => i.ce, + $emit: (i) => i.emit, + $options: (i) => resolveMergedOptions(i), + $forceUpdate: (i) => i.f || (i.f = () => { + queueJob(i.update); + }), + $nextTick: (i) => i.n || (i.n = nextTick.bind(i.proxy)), + $watch: (i) => instanceWatch.bind(i) + }) +); +const hasSetupBinding = (state, key) => state !== EMPTY_OBJ && !state.__isScriptSetup && hasOwn(state, key); +const PublicInstanceProxyHandlers = { + get({ _: instance }, key) { + if (key === "__v_skip") { + return true; + } + const { ctx, setupState, data, props, accessCache, type, appContext } = instance; + let normalizedProps; + if (key[0] !== "$") { + const n = accessCache[key]; + if (n !== void 0) { + switch (n) { + case 1: + return setupState[key]; + case 2: + return data[key]; + case 4: + return ctx[key]; + case 3: + return props[key]; + } + } else if (hasSetupBinding(setupState, key)) { + accessCache[key] = 1; + return setupState[key]; + } else if (data !== EMPTY_OBJ && hasOwn(data, key)) { + accessCache[key] = 2; + return data[key]; + } else if ( + // only cache other properties when instance has declared (thus stable) + // props + (normalizedProps = instance.propsOptions[0]) && hasOwn(normalizedProps, key) + ) { + accessCache[key] = 3; + return props[key]; + } else if (ctx !== EMPTY_OBJ && hasOwn(ctx, key)) { + accessCache[key] = 4; + return ctx[key]; + } else if (shouldCacheAccess) { + accessCache[key] = 0; + } + } + const publicGetter = publicPropertiesMap[key]; + let cssModule, globalProperties; + if (publicGetter) { + if (key === "$attrs") { + track(instance.attrs, "get", ""); + } + return publicGetter(instance); + } else if ( + // css module (injected by vue-loader) + (cssModule = type.__cssModules) && (cssModule = cssModule[key]) + ) { + return cssModule; + } else if (ctx !== EMPTY_OBJ && hasOwn(ctx, key)) { + accessCache[key] = 4; + return ctx[key]; + } else if ( + // global properties + globalProperties = appContext.config.globalProperties, hasOwn(globalProperties, key) + ) { + { + return globalProperties[key]; + } + } else ; + }, + set({ _: instance }, key, value) { + const { data, setupState, ctx } = instance; + if (hasSetupBinding(setupState, key)) { + setupState[key] = value; + return true; + } else if (data !== EMPTY_OBJ && hasOwn(data, key)) { + data[key] = value; + return true; + } else if (hasOwn(instance.props, key)) { + return false; + } + if (key[0] === "$" && key.slice(1) in instance) { + return false; + } else { + { + ctx[key] = value; + } + } + return true; + }, + has({ + _: { data, setupState, accessCache, ctx, appContext, propsOptions } + }, key) { + let normalizedProps; + return !!accessCache[key] || data !== EMPTY_OBJ && hasOwn(data, key) || hasSetupBinding(setupState, key) || (normalizedProps = propsOptions[0]) && hasOwn(normalizedProps, key) || hasOwn(ctx, key) || hasOwn(publicPropertiesMap, key) || hasOwn(appContext.config.globalProperties, key); + }, + defineProperty(target, key, descriptor) { + if (descriptor.get != null) { + target._.accessCache[key] = 0; + } else if (hasOwn(descriptor, "value")) { + this.set(target, key, descriptor.value, null); + } + return Reflect.defineProperty(target, key, descriptor); + } +}; +function useSlots() { + return getContext().slots; +} +function getContext() { + const i = getCurrentInstance(); + return i.setupContext || (i.setupContext = createSetupContext(i)); +} +function normalizePropsOrEmits(props) { + return isArray(props) ? props.reduce( + (normalized, p2) => (normalized[p2] = null, normalized), + {} + ) : props; +} +let shouldCacheAccess = true; +function applyOptions(instance) { + const options = resolveMergedOptions(instance); + const publicThis = instance.proxy; + const ctx = instance.ctx; + shouldCacheAccess = false; + if (options.beforeCreate) { + callHook$1(options.beforeCreate, instance, "bc"); + } + const { + // state + data: dataOptions, + computed: computedOptions, + methods, + watch: watchOptions, + provide: provideOptions, + inject: injectOptions, + // lifecycle + created, + beforeMount, + mounted, + beforeUpdate, + updated, + activated, + deactivated, + beforeDestroy, + beforeUnmount, + destroyed, + unmounted, + render: render2, + renderTracked, + renderTriggered, + errorCaptured, + serverPrefetch, + // public API + expose, + inheritAttrs, + // assets + components, + directives, + filters + } = options; + const checkDuplicateProperties = null; + if (injectOptions) { + resolveInjections(injectOptions, ctx, checkDuplicateProperties); + } + if (methods) { + for (const key in methods) { + const methodHandler = methods[key]; + if (isFunction(methodHandler)) { + { + ctx[key] = methodHandler.bind(publicThis); + } + } + } + } + if (dataOptions) { + const data = dataOptions.call(publicThis, publicThis); + if (!isObject(data)) ; + else { + instance.data = reactive(data); + } + } + shouldCacheAccess = true; + if (computedOptions) { + for (const key in computedOptions) { + const opt = computedOptions[key]; + const get2 = isFunction(opt) ? opt.bind(publicThis, publicThis) : isFunction(opt.get) ? opt.get.bind(publicThis, publicThis) : NOOP; + const set2 = !isFunction(opt) && isFunction(opt.set) ? opt.set.bind(publicThis) : NOOP; + const c = computed({ + get: get2, + set: set2 + }); + Object.defineProperty(ctx, key, { + enumerable: true, + configurable: true, + get: () => c.value, + set: (v) => c.value = v + }); + } + } + if (watchOptions) { + for (const key in watchOptions) { + createWatcher(watchOptions[key], ctx, publicThis, key); + } + } + if (provideOptions) { + const provides = isFunction(provideOptions) ? provideOptions.call(publicThis) : provideOptions; + Reflect.ownKeys(provides).forEach((key) => { + provide(key, provides[key]); + }); + } + if (created) { + callHook$1(created, instance, "c"); + } + function registerLifecycleHook(register, hook) { + if (isArray(hook)) { + hook.forEach((_hook) => register(_hook.bind(publicThis))); + } else if (hook) { + register(hook.bind(publicThis)); + } + } + registerLifecycleHook(onBeforeMount, beforeMount); + registerLifecycleHook(onMounted, mounted); + registerLifecycleHook(onBeforeUpdate, beforeUpdate); + registerLifecycleHook(onUpdated, updated); + registerLifecycleHook(onActivated, activated); + registerLifecycleHook(onDeactivated, deactivated); + registerLifecycleHook(onErrorCaptured, errorCaptured); + registerLifecycleHook(onRenderTracked, renderTracked); + registerLifecycleHook(onRenderTriggered, renderTriggered); + registerLifecycleHook(onBeforeUnmount, beforeUnmount); + registerLifecycleHook(onUnmounted, unmounted); + registerLifecycleHook(onServerPrefetch, serverPrefetch); + if (isArray(expose)) { + if (expose.length) { + const exposed = instance.exposed || (instance.exposed = {}); + expose.forEach((key) => { + Object.defineProperty(exposed, key, { + get: () => publicThis[key], + set: (val) => publicThis[key] = val + }); + }); + } else if (!instance.exposed) { + instance.exposed = {}; + } + } + if (render2 && instance.render === NOOP) { + instance.render = render2; + } + if (inheritAttrs != null) { + instance.inheritAttrs = inheritAttrs; + } + if (components) instance.components = components; + if (directives) instance.directives = directives; + if (serverPrefetch) { + markAsyncBoundary(instance); + } +} +function resolveInjections(injectOptions, ctx, checkDuplicateProperties = NOOP) { + if (isArray(injectOptions)) { + injectOptions = normalizeInject(injectOptions); + } + for (const key in injectOptions) { + const opt = injectOptions[key]; + let injected; + if (isObject(opt)) { + if ("default" in opt) { + injected = inject( + opt.from || key, + opt.default, + true + ); + } else { + injected = inject(opt.from || key); + } + } else { + injected = inject(opt); + } + if (isRef(injected)) { + Object.defineProperty(ctx, key, { + enumerable: true, + configurable: true, + get: () => injected.value, + set: (v) => injected.value = v + }); + } else { + ctx[key] = injected; + } + } +} +function callHook$1(hook, instance, type) { + callWithAsyncErrorHandling( + isArray(hook) ? hook.map((h2) => h2.bind(instance.proxy)) : hook.bind(instance.proxy), + instance, + type + ); +} +function createWatcher(raw, ctx, publicThis, key) { + let getter = key.includes(".") ? createPathGetter(publicThis, key) : () => publicThis[key]; + if (isString(raw)) { + const handler = ctx[raw]; + if (isFunction(handler)) { + { + watch(getter, handler); + } + } + } else if (isFunction(raw)) { + { + watch(getter, raw.bind(publicThis)); + } + } else if (isObject(raw)) { + if (isArray(raw)) { + raw.forEach((r) => createWatcher(r, ctx, publicThis, key)); + } else { + const handler = isFunction(raw.handler) ? raw.handler.bind(publicThis) : ctx[raw.handler]; + if (isFunction(handler)) { + watch(getter, handler, raw); + } + } + } else ; +} +function resolveMergedOptions(instance) { + const base = instance.type; + const { mixins, extends: extendsOptions } = base; + const { + mixins: globalMixins, + optionsCache: cache, + config: { optionMergeStrategies } + } = instance.appContext; + const cached = cache.get(base); + let resolved; + if (cached) { + resolved = cached; + } else if (!globalMixins.length && !mixins && !extendsOptions) { + { + resolved = base; + } + } else { + resolved = {}; + if (globalMixins.length) { + globalMixins.forEach( + (m) => mergeOptions(resolved, m, optionMergeStrategies, true) + ); + } + mergeOptions(resolved, base, optionMergeStrategies); + } + if (isObject(base)) { + cache.set(base, resolved); + } + return resolved; +} +function mergeOptions(to, from, strats, asMixin = false) { + const { mixins, extends: extendsOptions } = from; + if (extendsOptions) { + mergeOptions(to, extendsOptions, strats, true); + } + if (mixins) { + mixins.forEach( + (m) => mergeOptions(to, m, strats, true) + ); + } + for (const key in from) { + if (asMixin && key === "expose") ; + else { + const strat = internalOptionMergeStrats[key] || strats && strats[key]; + to[key] = strat ? strat(to[key], from[key]) : from[key]; + } + } + return to; +} +const internalOptionMergeStrats = { + data: mergeDataFn, + props: mergeEmitsOrPropsOptions, + emits: mergeEmitsOrPropsOptions, + // objects + methods: mergeObjectOptions, + computed: mergeObjectOptions, + // lifecycle + beforeCreate: mergeAsArray, + created: mergeAsArray, + beforeMount: mergeAsArray, + mounted: mergeAsArray, + beforeUpdate: mergeAsArray, + updated: mergeAsArray, + beforeDestroy: mergeAsArray, + beforeUnmount: mergeAsArray, + destroyed: mergeAsArray, + unmounted: mergeAsArray, + activated: mergeAsArray, + deactivated: mergeAsArray, + errorCaptured: mergeAsArray, + serverPrefetch: mergeAsArray, + // assets + components: mergeObjectOptions, + directives: mergeObjectOptions, + // watch + watch: mergeWatchOptions, + // provide / inject + provide: mergeDataFn, + inject: mergeInject +}; +function mergeDataFn(to, from) { + if (!from) { + return to; + } + if (!to) { + return from; + } + return function mergedDataFn() { + return extend( + isFunction(to) ? to.call(this, this) : to, + isFunction(from) ? from.call(this, this) : from + ); + }; +} +function mergeInject(to, from) { + return mergeObjectOptions(normalizeInject(to), normalizeInject(from)); +} +function normalizeInject(raw) { + if (isArray(raw)) { + const res = {}; + for (let i = 0; i < raw.length; i++) { + res[raw[i]] = raw[i]; + } + return res; + } + return raw; +} +function mergeAsArray(to, from) { + return to ? [...new Set([].concat(to, from))] : from; +} +function mergeObjectOptions(to, from) { + return to ? extend(/* @__PURE__ */ Object.create(null), to, from) : from; +} +function mergeEmitsOrPropsOptions(to, from) { + if (to) { + if (isArray(to) && isArray(from)) { + return [.../* @__PURE__ */ new Set([...to, ...from])]; + } + return extend( + /* @__PURE__ */ Object.create(null), + normalizePropsOrEmits(to), + normalizePropsOrEmits(from != null ? from : {}) + ); + } else { + return from; + } +} +function mergeWatchOptions(to, from) { + if (!to) return from; + if (!from) return to; + const merged = extend(/* @__PURE__ */ Object.create(null), to); + for (const key in from) { + merged[key] = mergeAsArray(to[key], from[key]); + } + return merged; +} +function createAppContext() { + return { + app: null, + config: { + isNativeTag: NO, + performance: false, + globalProperties: {}, + optionMergeStrategies: {}, + errorHandler: void 0, + warnHandler: void 0, + compilerOptions: {} + }, + mixins: [], + components: {}, + directives: {}, + provides: /* @__PURE__ */ Object.create(null), + optionsCache: /* @__PURE__ */ new WeakMap(), + propsCache: /* @__PURE__ */ new WeakMap(), + emitsCache: /* @__PURE__ */ new WeakMap() + }; +} +let uid$1 = 0; +function createAppAPI(render2, hydrate) { + return function createApp2(rootComponent, rootProps = null) { + if (!isFunction(rootComponent)) { + rootComponent = extend({}, rootComponent); + } + if (rootProps != null && !isObject(rootProps)) { + rootProps = null; + } + const context = createAppContext(); + const installedPlugins = /* @__PURE__ */ new WeakSet(); + const pluginCleanupFns = []; + let isMounted = false; + const app = context.app = { + _uid: uid$1++, + _component: rootComponent, + _props: rootProps, + _container: null, + _context: context, + _instance: null, + version, + get config() { + return context.config; + }, + set config(v) { + }, + use(plugin, ...options) { + if (installedPlugins.has(plugin)) ; + else if (plugin && isFunction(plugin.install)) { + installedPlugins.add(plugin); + plugin.install(app, ...options); + } else if (isFunction(plugin)) { + installedPlugins.add(plugin); + plugin(app, ...options); + } else ; + return app; + }, + mixin(mixin) { + { + if (!context.mixins.includes(mixin)) { + context.mixins.push(mixin); + } + } + return app; + }, + component(name, component) { + if (!component) { + return context.components[name]; + } + context.components[name] = component; + return app; + }, + directive(name, directive) { + if (!directive) { + return context.directives[name]; + } + context.directives[name] = directive; + return app; + }, + mount(rootContainer, isHydrate, namespace) { + if (!isMounted) { + const vnode = app._ceVNode || createVNode(rootComponent, rootProps); + vnode.appContext = context; + if (namespace === true) { + namespace = "svg"; + } else if (namespace === false) { + namespace = void 0; + } + if (isHydrate && hydrate) { + hydrate(vnode, rootContainer); + } else { + render2(vnode, rootContainer, namespace); + } + isMounted = true; + app._container = rootContainer; + rootContainer.__vue_app__ = app; + return getComponentPublicInstance(vnode.component); + } + }, + onUnmount(cleanupFn) { + pluginCleanupFns.push(cleanupFn); + }, + unmount() { + if (isMounted) { + callWithAsyncErrorHandling( + pluginCleanupFns, + app._instance, + 16 + ); + render2(null, app._container); + delete app._container.__vue_app__; + } + }, + provide(key, value) { + context.provides[key] = value; + return app; + }, + runWithContext(fn) { + const lastApp = currentApp; + currentApp = app; + try { + return fn(); + } finally { + currentApp = lastApp; + } + } + }; + return app; + }; +} +let currentApp = null; +function provide(key, value) { + if (!currentInstance) ; + else { + let provides = currentInstance.provides; + const parentProvides = currentInstance.parent && currentInstance.parent.provides; + if (parentProvides === provides) { + provides = currentInstance.provides = Object.create(parentProvides); + } + provides[key] = value; + } +} +function inject(key, defaultValue, treatDefaultAsFactory = false) { + const instance = currentInstance || currentRenderingInstance; + if (instance || currentApp) { + const provides = currentApp ? currentApp._context.provides : instance ? instance.parent == null ? instance.vnode.appContext && instance.vnode.appContext.provides : instance.parent.provides : void 0; + if (provides && key in provides) { + return provides[key]; + } else if (arguments.length > 1) { + return treatDefaultAsFactory && isFunction(defaultValue) ? defaultValue.call(instance && instance.proxy) : defaultValue; + } else ; + } +} +function hasInjectionContext() { + return !!(currentInstance || currentRenderingInstance || currentApp); +} +const internalObjectProto = {}; +const createInternalObject = () => Object.create(internalObjectProto); +const isInternalObject = (obj) => Object.getPrototypeOf(obj) === internalObjectProto; +function initProps(instance, rawProps, isStateful, isSSR = false) { + const props = {}; + const attrs = createInternalObject(); + instance.propsDefaults = /* @__PURE__ */ Object.create(null); + setFullProps(instance, rawProps, props, attrs); + for (const key in instance.propsOptions[0]) { + if (!(key in props)) { + props[key] = void 0; + } + } + if (isStateful) { + instance.props = isSSR ? props : shallowReactive(props); + } else { + if (!instance.type.props) { + instance.props = attrs; + } else { + instance.props = props; + } + } + instance.attrs = attrs; +} +function updateProps(instance, rawProps, rawPrevProps, optimized) { + const { + props, + attrs, + vnode: { patchFlag } + } = instance; + const rawCurrentProps = toRaw(props); + const [options] = instance.propsOptions; + let hasAttrsChanged = false; + if ( + // always force full diff in dev + // - #1942 if hmr is enabled with sfc component + // - vite#872 non-sfc component used by sfc component + (optimized || patchFlag > 0) && !(patchFlag & 16) + ) { + if (patchFlag & 8) { + const propsToUpdate = instance.vnode.dynamicProps; + for (let i = 0; i < propsToUpdate.length; i++) { + let key = propsToUpdate[i]; + if (isEmitListener(instance.emitsOptions, key)) { + continue; + } + const value = rawProps[key]; + if (options) { + if (hasOwn(attrs, key)) { + if (value !== attrs[key]) { + attrs[key] = value; + hasAttrsChanged = true; + } + } else { + const camelizedKey = camelize(key); + props[camelizedKey] = resolvePropValue( + options, + rawCurrentProps, + camelizedKey, + value, + instance, + false + ); + } + } else { + if (value !== attrs[key]) { + attrs[key] = value; + hasAttrsChanged = true; + } + } + } + } + } else { + if (setFullProps(instance, rawProps, props, attrs)) { + hasAttrsChanged = true; + } + let kebabKey; + for (const key in rawCurrentProps) { + if (!rawProps || // for camelCase + !hasOwn(rawProps, key) && // it's possible the original props was passed in as kebab-case + // and converted to camelCase (#955) + ((kebabKey = hyphenate(key)) === key || !hasOwn(rawProps, kebabKey))) { + if (options) { + if (rawPrevProps && // for camelCase + (rawPrevProps[key] !== void 0 || // for kebab-case + rawPrevProps[kebabKey] !== void 0)) { + props[key] = resolvePropValue( + options, + rawCurrentProps, + key, + void 0, + instance, + true + ); + } + } else { + delete props[key]; + } + } + } + if (attrs !== rawCurrentProps) { + for (const key in attrs) { + if (!rawProps || !hasOwn(rawProps, key) && true) { + delete attrs[key]; + hasAttrsChanged = true; + } + } + } + } + if (hasAttrsChanged) { + trigger(instance.attrs, "set", ""); + } +} +function setFullProps(instance, rawProps, props, attrs) { + const [options, needCastKeys] = instance.propsOptions; + let hasAttrsChanged = false; + let rawCastValues; + if (rawProps) { + for (let key in rawProps) { + if (isReservedProp(key)) { + continue; + } + const value = rawProps[key]; + let camelKey; + if (options && hasOwn(options, camelKey = camelize(key))) { + if (!needCastKeys || !needCastKeys.includes(camelKey)) { + props[camelKey] = value; + } else { + (rawCastValues || (rawCastValues = {}))[camelKey] = value; + } + } else if (!isEmitListener(instance.emitsOptions, key)) { + if (!(key in attrs) || value !== attrs[key]) { + attrs[key] = value; + hasAttrsChanged = true; + } + } + } + } + if (needCastKeys) { + const rawCurrentProps = toRaw(props); + const castValues = rawCastValues || EMPTY_OBJ; + for (let i = 0; i < needCastKeys.length; i++) { + const key = needCastKeys[i]; + props[key] = resolvePropValue( + options, + rawCurrentProps, + key, + castValues[key], + instance, + !hasOwn(castValues, key) + ); + } + } + return hasAttrsChanged; +} +function resolvePropValue(options, props, key, value, instance, isAbsent) { + const opt = options[key]; + if (opt != null) { + const hasDefault = hasOwn(opt, "default"); + if (hasDefault && value === void 0) { + const defaultValue = opt.default; + if (opt.type !== Function && !opt.skipFactory && isFunction(defaultValue)) { + const { propsDefaults } = instance; + if (key in propsDefaults) { + value = propsDefaults[key]; + } else { + const reset = setCurrentInstance(instance); + value = propsDefaults[key] = defaultValue.call( + null, + props + ); + reset(); + } + } else { + value = defaultValue; + } + if (instance.ce) { + instance.ce._setProp(key, value); + } + } + if (opt[ + 0 + /* shouldCast */ + ]) { + if (isAbsent && !hasDefault) { + value = false; + } else if (opt[ + 1 + /* shouldCastTrue */ + ] && (value === "" || value === hyphenate(key))) { + value = true; + } + } + } + return value; +} +const mixinPropsCache = /* @__PURE__ */ new WeakMap(); +function normalizePropsOptions(comp, appContext, asMixin = false) { + const cache = asMixin ? mixinPropsCache : appContext.propsCache; + const cached = cache.get(comp); + if (cached) { + return cached; + } + const raw = comp.props; + const normalized = {}; + const needCastKeys = []; + let hasExtends = false; + if (!isFunction(comp)) { + const extendProps = (raw2) => { + hasExtends = true; + const [props, keys] = normalizePropsOptions(raw2, appContext, true); + extend(normalized, props); + if (keys) needCastKeys.push(...keys); + }; + if (!asMixin && appContext.mixins.length) { + appContext.mixins.forEach(extendProps); + } + if (comp.extends) { + extendProps(comp.extends); + } + if (comp.mixins) { + comp.mixins.forEach(extendProps); + } + } + if (!raw && !hasExtends) { + if (isObject(comp)) { + cache.set(comp, EMPTY_ARR); + } + return EMPTY_ARR; + } + if (isArray(raw)) { + for (let i = 0; i < raw.length; i++) { + const normalizedKey = camelize(raw[i]); + if (validatePropName(normalizedKey)) { + normalized[normalizedKey] = EMPTY_OBJ; + } + } + } else if (raw) { + for (const key in raw) { + const normalizedKey = camelize(key); + if (validatePropName(normalizedKey)) { + const opt = raw[key]; + const prop = normalized[normalizedKey] = isArray(opt) || isFunction(opt) ? { type: opt } : extend({}, opt); + const propType = prop.type; + let shouldCast = false; + let shouldCastTrue = true; + if (isArray(propType)) { + for (let index = 0; index < propType.length; ++index) { + const type = propType[index]; + const typeName = isFunction(type) && type.name; + if (typeName === "Boolean") { + shouldCast = true; + break; + } else if (typeName === "String") { + shouldCastTrue = false; + } + } + } else { + shouldCast = isFunction(propType) && propType.name === "Boolean"; + } + prop[ + 0 + /* shouldCast */ + ] = shouldCast; + prop[ + 1 + /* shouldCastTrue */ + ] = shouldCastTrue; + if (shouldCast || hasOwn(prop, "default")) { + needCastKeys.push(normalizedKey); + } + } + } + } + const res = [normalized, needCastKeys]; + if (isObject(comp)) { + cache.set(comp, res); + } + return res; +} +function validatePropName(key) { + if (key[0] !== "$" && !isReservedProp(key)) { + return true; + } + return false; +} +const isInternalKey = (key) => key[0] === "_" || key === "$stable"; +const normalizeSlotValue = (value) => isArray(value) ? value.map(normalizeVNode) : [normalizeVNode(value)]; +const normalizeSlot = (key, rawSlot, ctx) => { + if (rawSlot._n) { + return rawSlot; + } + const normalized = withCtx((...args) => { + if (false) ; + return normalizeSlotValue(rawSlot(...args)); + }, ctx); + normalized._c = false; + return normalized; +}; +const normalizeObjectSlots = (rawSlots, slots, instance) => { + const ctx = rawSlots._ctx; + for (const key in rawSlots) { + if (isInternalKey(key)) continue; + const value = rawSlots[key]; + if (isFunction(value)) { + slots[key] = normalizeSlot(key, value, ctx); + } else if (value != null) { + const normalized = normalizeSlotValue(value); + slots[key] = () => normalized; + } + } +}; +const normalizeVNodeSlots = (instance, children) => { + const normalized = normalizeSlotValue(children); + instance.slots.default = () => normalized; +}; +const assignSlots = (slots, children, optimized) => { + for (const key in children) { + if (optimized || key !== "_") { + slots[key] = children[key]; + } + } +}; +const initSlots = (instance, children, optimized) => { + const slots = instance.slots = createInternalObject(); + if (instance.vnode.shapeFlag & 32) { + const type = children._; + if (type) { + assignSlots(slots, children, optimized); + if (optimized) { + def(slots, "_", type, true); + } + } else { + normalizeObjectSlots(children, slots); + } + } else if (children) { + normalizeVNodeSlots(instance, children); + } +}; +const updateSlots = (instance, children, optimized) => { + const { vnode, slots } = instance; + let needDeletionCheck = true; + let deletionComparisonTarget = EMPTY_OBJ; + if (vnode.shapeFlag & 32) { + const type = children._; + if (type) { + if (optimized && type === 1) { + needDeletionCheck = false; + } else { + assignSlots(slots, children, optimized); + } + } else { + needDeletionCheck = !children.$stable; + normalizeObjectSlots(children, slots); + } + deletionComparisonTarget = children; + } else if (children) { + normalizeVNodeSlots(instance, children); + deletionComparisonTarget = { default: 1 }; + } + if (needDeletionCheck) { + for (const key in slots) { + if (!isInternalKey(key) && deletionComparisonTarget[key] == null) { + delete slots[key]; + } + } + } +}; +const queuePostRenderEffect = queueEffectWithSuspense; +function createRenderer(options) { + return baseCreateRenderer(options); +} +function baseCreateRenderer(options, createHydrationFns) { + const target = getGlobalThis(); + target.__VUE__ = true; + const { + insert: hostInsert, + remove: hostRemove, + patchProp: hostPatchProp, + createElement: hostCreateElement, + createText: hostCreateText, + createComment: hostCreateComment, + setText: hostSetText, + setElementText: hostSetElementText, + parentNode: hostParentNode, + nextSibling: hostNextSibling, + setScopeId: hostSetScopeId = NOOP, + insertStaticContent: hostInsertStaticContent + } = options; + const patch = (n1, n2, container, anchor = null, parentComponent = null, parentSuspense = null, namespace = void 0, slotScopeIds = null, optimized = !!n2.dynamicChildren) => { + if (n1 === n2) { + return; + } + if (n1 && !isSameVNodeType(n1, n2)) { + anchor = getNextHostNode(n1); + unmount(n1, parentComponent, parentSuspense, true); + n1 = null; + } + if (n2.patchFlag === -2) { + optimized = false; + n2.dynamicChildren = null; + } + const { type, ref: ref3, shapeFlag } = n2; + switch (type) { + case Text: + processText(n1, n2, container, anchor); + break; + case Comment: + processCommentNode(n1, n2, container, anchor); + break; + case Static: + if (n1 == null) { + mountStaticNode(n2, container, anchor, namespace); + } + break; + case Fragment: + processFragment( + n1, + n2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + break; + default: + if (shapeFlag & 1) { + processElement( + n1, + n2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } else if (shapeFlag & 6) { + processComponent( + n1, + n2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } else if (shapeFlag & 64) { + type.process( + n1, + n2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized, + internals + ); + } else if (shapeFlag & 128) { + type.process( + n1, + n2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized, + internals + ); + } else ; + } + if (ref3 != null && parentComponent) { + setRef(ref3, n1 && n1.ref, parentSuspense, n2 || n1, !n2); + } + }; + const processText = (n1, n2, container, anchor) => { + if (n1 == null) { + hostInsert( + n2.el = hostCreateText(n2.children), + container, + anchor + ); + } else { + const el = n2.el = n1.el; + if (n2.children !== n1.children) { + hostSetText(el, n2.children); + } + } + }; + const processCommentNode = (n1, n2, container, anchor) => { + if (n1 == null) { + hostInsert( + n2.el = hostCreateComment(n2.children || ""), + container, + anchor + ); + } else { + n2.el = n1.el; + } + }; + const mountStaticNode = (n2, container, anchor, namespace) => { + [n2.el, n2.anchor] = hostInsertStaticContent( + n2.children, + container, + anchor, + namespace, + n2.el, + n2.anchor + ); + }; + const moveStaticNode = ({ el, anchor }, container, nextSibling) => { + let next; + while (el && el !== anchor) { + next = hostNextSibling(el); + hostInsert(el, container, nextSibling); + el = next; + } + hostInsert(anchor, container, nextSibling); + }; + const removeStaticNode = ({ el, anchor }) => { + let next; + while (el && el !== anchor) { + next = hostNextSibling(el); + hostRemove(el); + el = next; + } + hostRemove(anchor); + }; + const processElement = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { + if (n2.type === "svg") { + namespace = "svg"; + } else if (n2.type === "math") { + namespace = "mathml"; + } + if (n1 == null) { + mountElement( + n2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } else { + patchElement( + n1, + n2, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } + }; + const mountElement = (vnode, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { + let el; + let vnodeHook; + const { props, shapeFlag, transition, dirs } = vnode; + el = vnode.el = hostCreateElement( + vnode.type, + namespace, + props && props.is, + props + ); + if (shapeFlag & 8) { + hostSetElementText(el, vnode.children); + } else if (shapeFlag & 16) { + mountChildren( + vnode.children, + el, + null, + parentComponent, + parentSuspense, + resolveChildrenNamespace(vnode, namespace), + slotScopeIds, + optimized + ); + } + if (dirs) { + invokeDirectiveHook(vnode, null, parentComponent, "created"); + } + setScopeId(el, vnode, vnode.scopeId, slotScopeIds, parentComponent); + if (props) { + for (const key in props) { + if (key !== "value" && !isReservedProp(key)) { + hostPatchProp(el, key, null, props[key], namespace, parentComponent); + } + } + if ("value" in props) { + hostPatchProp(el, "value", null, props.value, namespace); + } + if (vnodeHook = props.onVnodeBeforeMount) { + invokeVNodeHook(vnodeHook, parentComponent, vnode); + } + } + if (dirs) { + invokeDirectiveHook(vnode, null, parentComponent, "beforeMount"); + } + const needCallTransitionHooks = needTransition(parentSuspense, transition); + if (needCallTransitionHooks) { + transition.beforeEnter(el); + } + hostInsert(el, container, anchor); + if ((vnodeHook = props && props.onVnodeMounted) || needCallTransitionHooks || dirs) { + queuePostRenderEffect(() => { + vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode); + needCallTransitionHooks && transition.enter(el); + dirs && invokeDirectiveHook(vnode, null, parentComponent, "mounted"); + }, parentSuspense); + } + }; + const setScopeId = (el, vnode, scopeId, slotScopeIds, parentComponent) => { + if (scopeId) { + hostSetScopeId(el, scopeId); + } + if (slotScopeIds) { + for (let i = 0; i < slotScopeIds.length; i++) { + hostSetScopeId(el, slotScopeIds[i]); + } + } + if (parentComponent) { + let subTree = parentComponent.subTree; + if (vnode === subTree || isSuspense(subTree.type) && (subTree.ssContent === vnode || subTree.ssFallback === vnode)) { + const parentVNode = parentComponent.vnode; + setScopeId( + el, + parentVNode, + parentVNode.scopeId, + parentVNode.slotScopeIds, + parentComponent.parent + ); + } + } + }; + const mountChildren = (children, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, start = 0) => { + for (let i = start; i < children.length; i++) { + const child = children[i] = optimized ? cloneIfMounted(children[i]) : normalizeVNode(children[i]); + patch( + null, + child, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } + }; + const patchElement = (n1, n2, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { + const el = n2.el = n1.el; + let { patchFlag, dynamicChildren, dirs } = n2; + patchFlag |= n1.patchFlag & 16; + const oldProps = n1.props || EMPTY_OBJ; + const newProps = n2.props || EMPTY_OBJ; + let vnodeHook; + parentComponent && toggleRecurse(parentComponent, false); + if (vnodeHook = newProps.onVnodeBeforeUpdate) { + invokeVNodeHook(vnodeHook, parentComponent, n2, n1); + } + if (dirs) { + invokeDirectiveHook(n2, n1, parentComponent, "beforeUpdate"); + } + parentComponent && toggleRecurse(parentComponent, true); + if (oldProps.innerHTML && newProps.innerHTML == null || oldProps.textContent && newProps.textContent == null) { + hostSetElementText(el, ""); + } + if (dynamicChildren) { + patchBlockChildren( + n1.dynamicChildren, + dynamicChildren, + el, + parentComponent, + parentSuspense, + resolveChildrenNamespace(n2, namespace), + slotScopeIds + ); + } else if (!optimized) { + patchChildren( + n1, + n2, + el, + null, + parentComponent, + parentSuspense, + resolveChildrenNamespace(n2, namespace), + slotScopeIds, + false + ); + } + if (patchFlag > 0) { + if (patchFlag & 16) { + patchProps(el, oldProps, newProps, parentComponent, namespace); + } else { + if (patchFlag & 2) { + if (oldProps.class !== newProps.class) { + hostPatchProp(el, "class", null, newProps.class, namespace); + } + } + if (patchFlag & 4) { + hostPatchProp(el, "style", oldProps.style, newProps.style, namespace); + } + if (patchFlag & 8) { + const propsToUpdate = n2.dynamicProps; + for (let i = 0; i < propsToUpdate.length; i++) { + const key = propsToUpdate[i]; + const prev = oldProps[key]; + const next = newProps[key]; + if (next !== prev || key === "value") { + hostPatchProp(el, key, prev, next, namespace, parentComponent); + } + } + } + } + if (patchFlag & 1) { + if (n1.children !== n2.children) { + hostSetElementText(el, n2.children); + } + } + } else if (!optimized && dynamicChildren == null) { + patchProps(el, oldProps, newProps, parentComponent, namespace); + } + if ((vnodeHook = newProps.onVnodeUpdated) || dirs) { + queuePostRenderEffect(() => { + vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, n2, n1); + dirs && invokeDirectiveHook(n2, n1, parentComponent, "updated"); + }, parentSuspense); + } + }; + const patchBlockChildren = (oldChildren, newChildren, fallbackContainer, parentComponent, parentSuspense, namespace, slotScopeIds) => { + for (let i = 0; i < newChildren.length; i++) { + const oldVNode = oldChildren[i]; + const newVNode = newChildren[i]; + const container = ( + // oldVNode may be an errored async setup() component inside Suspense + // which will not have a mounted element + oldVNode.el && // - In the case of a Fragment, we need to provide the actual parent + // of the Fragment itself so it can move its children. + (oldVNode.type === Fragment || // - In the case of different nodes, there is going to be a replacement + // which also requires the correct parent container + !isSameVNodeType(oldVNode, newVNode) || // - In the case of a component, it could contain anything. + oldVNode.shapeFlag & (6 | 64)) ? hostParentNode(oldVNode.el) : ( + // In other cases, the parent container is not actually used so we + // just pass the block element here to avoid a DOM parentNode call. + fallbackContainer + ) + ); + patch( + oldVNode, + newVNode, + container, + null, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + true + ); + } + }; + const patchProps = (el, oldProps, newProps, parentComponent, namespace) => { + if (oldProps !== newProps) { + if (oldProps !== EMPTY_OBJ) { + for (const key in oldProps) { + if (!isReservedProp(key) && !(key in newProps)) { + hostPatchProp( + el, + key, + oldProps[key], + null, + namespace, + parentComponent + ); + } + } + } + for (const key in newProps) { + if (isReservedProp(key)) continue; + const next = newProps[key]; + const prev = oldProps[key]; + if (next !== prev && key !== "value") { + hostPatchProp(el, key, prev, next, namespace, parentComponent); + } + } + if ("value" in newProps) { + hostPatchProp(el, "value", oldProps.value, newProps.value, namespace); + } + } + }; + const processFragment = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => { + const fragmentStartAnchor = n2.el = n1 ? n1.el : hostCreateText(""); + const fragmentEndAnchor = n2.anchor = n1 ? n1.anchor : hostCreateText(""); + let { patchFlag, dynamicChildren, slotScopeIds: fragmentSlotScopeIds } = n2; + if (fragmentSlotScopeIds) { + slotScopeIds = slotScopeIds ? slotScopeIds.concat(fragmentSlotScopeIds) : fragmentSlotScopeIds; + } + if (n1 == null) { + hostInsert(fragmentStartAnchor, container, anchor); + hostInsert(fragmentEndAnchor, container, anchor); + mountChildren( + // #10007 + // such fragment like `<>` will be compiled into + // a fragment which doesn't have a children. + // In this case fallback to an empty array + n2.children || [], + container, + fragmentEndAnchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); + } else { + if (patchFlag > 0 && patchFlag & 64 && dynamicChildren && // #2715 the previous fragment could've been a BAILed one as a result + // of renderSlot() with no valid children + n1.dynamicChildren) { + patchBlockChildren( + n1.dynamicChildren, + dynamicChildren, + container, + parentComponent, + parentSuspense, + namespace, + slotScopeIds + ); + if ( + // #2080 if the stable fragment has a key, it's a