9 lines
134 KiB
JavaScript
9 lines
134 KiB
JavaScript
|
function Ae(e,t){const n=Object.create(null),s=e.split(",");for(let r=0;r<s.length;r++)n[s[r]]=!0;return t?r=>!!n[r.toLowerCase()]:r=>!!n[r]}const re={},Zt=[],we=()=>{},gs=()=>!1,Mf=/^on[^a-z]/,Vt=e=>Mf.test(e),Zr=e=>e.startsWith("onUpdate:"),X=Object.assign,Xr=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},kf=Object.prototype.hasOwnProperty,ee=(e,t)=>kf.call(e,t),D=Array.isArray,Xt=e=>pn(e)==="[object Map]",jt=e=>pn(e)==="[object Set]",no=e=>pn(e)==="[object Date]",Ff=e=>pn(e)==="[object RegExp]",x=e=>typeof e=="function",J=e=>typeof e=="string",gt=e=>typeof e=="symbol",ie=e=>e!==null&&typeof e=="object",Qr=e=>ie(e)&&x(e.then)&&x(e.catch),ll=Object.prototype.toString,pn=e=>ll.call(e),Lf=e=>pn(e).slice(8,-1),cl=e=>pn(e)==="[object Object]",Gr=e=>J(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,Pt=Ae(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Bf=Ae("bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo"),Vs=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},$f=/-(\w)/g,de=Vs(e=>e.replace($f,(t,n)=>n?n.toUpperCase():"")),Df=/\B([A-Z])/g,Fe=Vs(e=>e.replace(Df,"-$1").toLowerCase()),Kt=Vs(e=>e.charAt(0).toUpperCase()+e.slice(1)),Qt=Vs(e=>e?`on${Kt(e)}`:""),sn=(e,t)=>!Object.is(e,t),Gt=(e,t)=>{for(let n=0;n<e.length;n++)e[n](t)},vs=(e,t,n)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value:n})},Es=e=>{const t=parseFloat(e);return isNaN(t)?e:t},Cs=e=>{const t=J(e)?Number(e):NaN;return isNaN(t)?e:t};let so;const Tr=()=>so||(so=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}),Hf="Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console",Vf=Ae(Hf);function Un(e){if(D(e)){const t={};for(let n=0;n<e.length;n++){const s=e[n],r=J(s)?fl(s):Un(s);if(r)for(const i in r)t[i]=r[i]}return t}else{if(J(e))return e;if(ie(e))return e}}const jf=/;(?![^(]*\))/g,Kf=/:([^]+)/,Uf=/\/\*[^]*?\*\//g;function fl(e){const t={};return e.replace(Uf,"").split(jf).forEach(n=>{if(n){const s=n.split(Kf);s.length>1&&(t[s[0].trim()]=s[1].trim())}}),t}function Wn(e){let t="";if(J(e))t=e;else if(D(e))for(let n=0;n<e.length;n++){const s=Wn(e[n]);s&&(t+=s+" ")}else if(ie(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}function Wf(e){if(!e)return null;let{class:t,style:n}=e;return t&&!J(t)&&(e.class=Wn(t)),n&&(e.style=Un(n)),e}const xf="html,body,base,head,link,meta,style,title,address,article,aside,footer,header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot",qf="svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,feDistantLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,text,textPath,title,tspan,unknown,use,view",Jf="area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr",zf=Ae(xf),Yf=Ae(qf),Zf=Ae(Jf),Xf="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",Qf=Ae(Xf);function ul(e){return!!e||e===""}function Gf(e,t){if(e.length!==t.
|
||
|
`);else if(/[^\t\r\n\f ]/.test(f.content))l&&(f.content=f.content.replace(/[\t\r\n\f ]+/g," "));else{const a=i[c-1],u=i[c+1];!a||!u||l&&(a.type===3&&u.type===3||a.type===3&&u.type===1||a.type===1&&u.type===3||a.type===1&&u.type===1&&/[\r\n]/.test(f.content))?(o=!0,i[c]=null):f.content=" "}else f.type===3&&!e.options.comments&&(o=!0,i[c]=null)}if(e.inPre&&s&&e.options.isPreTag(s.tag)){const c=i[0];c&&c.type===2&&(c.content=c.content.replace(/^\r?\n/,""))}}return o?i.filter(Boolean):i}function xo(e,t){if(t.type===2){const n=cr(e);if(n&&n.type===2&&n.loc.end.offset===t.loc.start.offset){n.content+=t.content,n.loc.end=t.loc.end,n.loc.source+=t.loc.source;return}}e.push(t)}function $h(e,t){me(e,9);const n=Yi(e,3,t);return e.source.length===0?se(e,6):me(e,3),n}function Dh(e){const t=Be(e);let n;const s=/--(\!)?>/.exec(e.source);if(!s)n=e.source.slice(4),me(e,e.source.length),se(e,7);else{s.index<=3&&se(e,0),s[1]&&se(e,10),n=e.source.slice(4,s.index);const r=e.source.slice(0,s.index);let i=1,o=0;for(;(o=r.indexOf("<!--",i))!==-1;)me(e,o-i+1),o+4<r.length&&se(e,16),i=o+1;me(e,s.index+s[0].length-i+1)}return{type:3,content:n,loc:Ke(e,t)}}function _n(e){const t=Be(e),n=e.source[1]==="?"?1:2;let s;const r=e.source.indexOf(">");return r===-1?(s=e.source.slice(n),me(e,e.source.length)):(s=e.source.slice(n,r),me(e,r+1)),{type:3,content:s,loc:Ke(e,t)}}function Hh(e,t){const n=e.inPre,s=e.inVPre,r=cr(t),i=xr(e,Ds.Start,r),o=e.inPre&&!n,l=e.inVPre&&!s;if(i.isSelfClosing||e.options.isVoidTag(i.tag))return o&&(e.inPre=!1),l&&(e.inVPre=!1),i;t.push(i);const c=e.options.getTextMode(i,r),f=Yi(e,c,t);t.pop();{const a=i.props.find(u=>u.type===6&&u.name==="inline-template");if(a&&jn("COMPILER_INLINE_TEMPLATE",e,a.loc)){const u=Ke(e,i.loc.end);a.value={type:2,content:u.source,loc:u}}}if(i.children=f,qr(e.source,i.tag))xr(e,Ds.End,r);else if(se(e,24,0,i.loc.start),e.source.length===0&&i.tag.toLowerCase()==="script"){const a=f[0];a&&Ee(a.loc.source,"<!--")&&se(e,8)}return i.loc=Ke(e,i.loc.start),o&&(e.inPre=!1),l&&(e.inVPre=!1),i}var Ds=(e=>(e[e.Start=0]="Start",e[e.End=1]="End",e))(Ds||{});const sf=Ae("if,else,else-if,for,slot");function xr(e,t,n){const s=Be(e),r=/^<\/?([a-z][^\t\r\n\f />]*)/i.exec(e.source),i=r[1],o=e.options.getNamespace(i,n);me(e,r[0].length),Kn(e);const l=Be(e),c=e.source;e.options.isPreTag(i)&&(e.inPre=!0);let f=qo(e,t);t===0&&!e.inVPre&&f.some(h=>h.type===7&&h.name==="pre")&&(e.inVPre=!0,X(e,l),e.source=c,f=qo(e,t).filter(h=>h.name!=="v-pre"));let a=!1;if(e.source.length===0?se(e,9):(a=Ee(e.source,"/>"),t===1&&a&&se(e,4),me(e,a?2:1)),t===1)return;let u=0;return e.inVPre||(i==="slot"?u=2:i==="template"?f.some(h=>h.type===7&&sf(h.name))&&(u=3):Vh(i,f,e)&&(u=1)),{type:1,ns:o,tag:i,tagType:u,props:f,isSelfClosing:a,children:[],loc:Ke(e,s),codegenNode:void 0}}function Vh(e,t,n){const s=n.options;if(s.isCustomElement(e))return!1;if(e==="component"||/^[A-Z]/.test(e)||Gc(e)||s.isBuiltInComponent&&s.isBuiltInComponent(e)||s.isNativeTag&&!s.isNativeTag(e))return!0;for(let r=0;r<t.length;r++){const i=t[r];if(i.type===6){if(i.name==="is"&&i.value){if(i.value.content.startsWith("vue:"))return!0;if(jn("COMPILER_IS_ON_ELEMENT",n,i.loc))return!0}}else{if(i.name==="is")return!0;if(i.name==="bind"&&Ot(i.arg,"is")&&jn("COMPILER_IS_ON_ELEMENT",n,i.loc))return!0}}}function qo(e,t){const n=[],s=new Set;for(;e.source.length>0&&!Ee(e.source,">")&&!Ee(e.source,"/>");){if(Ee(e.source,"/")){se(e,22),me(e,1),Kn(e);continue}t===1&&se(e,3);const r=jh(e,s);r.type===6&&r.value&&r.name==="class"&&(r.value.content=r.value.content.replace(/\s+/g," ").trim()),t===0&&n.push(r),/^[^\t\r\n\f />]/.test(e.source)&&se(e,15),Kn(e)}return n}function jh(e,t){var n;const s=Be(e),i=/^[^\t\r\n\f />][^\t\r\n\f />=]*/.exec(e.source)[0];t.has(i)&&se(e,2),t.add(i),i[0]==="="&&se(e,19);{const c=/["'<]/g;let f;for(;f=c.exec(i);)se(e,17,f.index)}me(e,i.length);let o;/^[\t\r\n\f ]*=/.test(e.source)&&(Kn(e),me(e,1),Kn(e),o=Kh(e),o||se(e,13));const l=Ke(e,s);if(!e.inVPre&&/^(v-[A-Za-z0-9-]|:|\.|@|#)/.test(i)){const c=/(?:^v-([a-z0-9-]+))?(?:(?::|^\.|^@|^#)(\[[^\]]+\]|[^\.]+))?(.+)
|
||
|
`+" ".repeat(C))}return m}function Qh(e,t={}){const n=zo(e,t);t.onContextCreated&&t.onContextCreated(n);const{mode:s,push:r,prefixIdentifiers:i,indent:o,deindent:l,newline:c,scopeId:f,ssr:a}=n,u=Array.from(e.helpers),h=u.length>0,m=!i&&s!=="module",v=!1,C=v?zo(e,t):n;Gh(e,C);const O=a?"ssrRender":"render",g=(a?["_ctx","_push","_parent","_attrs"]:["_ctx","_cache"]).join(", ");if(r(`function ${O}(${g}) {`),o(),m&&(r("with (_ctx) {"),o(),h&&(r(`const { ${u.map(af).join(", ")} } = _Vue`),r(`
|
||
|
`),c())),e.components.length&&(Cr(e.components,"component",n),(e.directives.length||e.temps>0)&&c()),e.directives.length&&(Cr(e.directives,"directive",n),e.temps>0&&c()),e.filters&&e.filters.length&&(c(),Cr(e.filters,"filter",n),c()),e.temps>0){r("let ");for(let T=0;T<e.temps;T++)r(`${T>0?", ":""}_temp${T}`)}return(e.components.length||e.directives.length||e.temps)&&(r(`
|
||
|
`),c()),a||r("return "),e.codegenNode?Te(e.codegenNode,n):r("null"),m&&(l(),r("}")),l(),r("}"),{ast:e,code:n.code,preamble:v?C.code:"",map:n.map?n.map.toJSON():void 0}}function Gh(e,t){const{ssr:n,prefixIdentifiers:s,push:r,newline:i,runtimeModuleName:o,runtimeGlobalName:l,ssrRuntimeModuleName:c}=t,f=l,a=Array.from(e.helpers);if(a.length>0&&(r(`const _Vue = ${f}
|
||
|
`),e.hoists.length)){const u=[Fi,Li,Yn,Bi,Yc].filter(h=>a.includes(h)).map(af).join(", ");r(`const { ${u} } = _Vue
|
||
|
`)}ed(e.hoists,t),i(),r("return ")}function Cr(e,t,{helper:n,push:s,newline:r,isTS:i}){const o=n(t==="filter"?Hi:t==="component"?$i:Di);for(let l=0;l<e.length;l++){let c=e[l];const f=c.endsWith("__self");f&&(c=c.slice(0,-6)),s(`const ${Vn(c,t)} = ${o}(${JSON.stringify(c)}${f?", true":""})${i?"!":""}`),l<e.length-1&&r()}}function ed(e,t){if(!e.length)return;t.pure=!0;const{push:n,newline:s,helper:r,scopeId:i,mode:o}=t;s();for(let l=0;l<e.length;l++){const c=e[l];c&&(n(`const _hoisted_${l+1} = `),Te(c,t),s())}t.pure=!1}function Zi(e,t){const n=e.length>3||!1;t.push("["),n&&t.indent(),Qn(e,t,n),n&&t.deindent(),t.push("]")}function Qn(e,t,n=!1,s=!0){const{push:r,newline:i}=t;for(let o=0;o<e.length;o++){const l=e[o];J(l)?r(l):D(l)?Zi(l,t):Te(l,t),o<e.length-1&&(n?(s&&r(","),i()):s&&r(", "))}}function Te(e,t){if(J(e)){t.push(e);return}if(gt(e)){t.push(t.helper(e));return}switch(e.type){case 1:case 9:case 11:Te(e.codegenNode,t);break;case 2:td(e,t);break;case 4:pf(e,t);break;case 5:nd(e,t);break;case 12:Te(e.codegenNode,t);break;case 8:hf(e,t);break;case 3:rd(e,t);break;case 13:id(e,t);break;case 14:ld(e,t);break;case 15:cd(e,t);break;case 17:fd(e,t);break;case 18:ud(e,t);break;case 19:ad(e,t);break;case 20:pd(e,t);break;case 21:Qn(e.body,t,!0,!1);break}}function td(e,t){t.push(JSON.stringify(e.content),e)}function pf(e,t){const{content:n,isStatic:s}=e;t.push(s?JSON.stringify(n):n,e)}function nd(e,t){const{push:n,helper:s,pure:r}=t;r&&n(ur),n(`${s(or)}(`),Te(e.content,t),n(")")}function hf(e,t){for(let n=0;n<e.children.length;n++){const s=e.children[n];J(s)?t.push(s):Te(s,t)}}function sd(e,t){const{push:n}=t;if(e.type===8)n("["),hf(e,t),n("]");else if(e.isStatic){const s=zi(e.content)?e.content:JSON.stringify(e.content);n(s,e)}else n(`[${e.content}]`,e)}function rd(e,t){const{push:n,helper:s,pure:r}=t;r&&n(ur),n(`${s(Yn)}(${JSON.stringify(e.content)})`,e)}function id(e,t){const{push:n,helper:s,pure:r}=t,{tag:i,props:o,children:l,patchFlag:c,dynamicProps:f,directives:a,isBlock:u,disableTracking:h,isComponent:m}=e;a&&n(s(Vi)+"("),u&&n(`(${s(Ht)}(${h?"true":""}), `),r&&n(ur);const v=u?an(t.inSSR,m):un(t.inSSR,m);n(s(v)+"(",e),Qn(od([i,o,l,c,f]),t),n(")"),u&&n(")"),a&&(n(", "),Te(a,t),n(")"))}function od(e){let t=e.length;for(;t--&&e[t]==null;);return e.slice(0,t+1).map(n=>n||"null")}function ld(e,t){const{push:n,helper:s,pure:r}=t,i=J(e.callee)?e.callee:s(e.callee);r&&n(ur),n(i+"(",e),Qn(e.arguments,t),n(")")}function cd(e,t){const{push:n,indent:s,deindent:r,newline:i}=t,{properties:o}=e;if(!o.length){n("{}",e);return}const l=o.length>1||!1;n(l?"{":"{ "),l&&s();for(let c=0;c<o.length;c++){const{key:f,value:a}=o[c];sd(f,t),n(": "),Te(a,t),c<o.length-1&&(n(","),i())}l&&r(),n(l?"}":" }")}function fd(e,t){Zi(e.elements,t)}function ud(e,t){const{push:n,indent:s,deindent:r}=t,{params:i,returns:o,body:l,newline:c,isSlot:f}=e;f&&n(`_${cn[xi]}(`),n("(",e),D(i)?Qn(i,t):i&&Te(i,t),n(") => "),(c||l)&&(n("{"),s()),o?(c&&n("return "),D(o)?Zi(o,t):Te(o,t)):l&&Te(l,t),(c||l)&&(r(),n("}")),f&&(e.isNonScopedSlot&&n(", undefined, true"),n(")"))}function ad(e,t){const{test:n,consequent:s,alternate:r,newline:i}=e,{push:o,indent:l,deindent:c,newline:f}=t;if(n.type===4){const u=!zi(n.content);u&&o("("),pf(n,t),u&&o(")")}else o("("),Te(n,t),o(")");i&&l(),t.indentLevel++,i||o(" "),o("? "),Te(s,t),t.indentLevel--,i&&f(),i||o(" "),o(": ");const a=r.type===19;a||t.indentLevel++,Te(r,t),a||t.indentLevel--,i&&c(!0)}function pd(e,t){const{push:n,helper:s,indent:r,deindent:i,newline:o}=t;n(`_cache[${e.index}] || (`),e.isVNode&&(r(),n(`${s(Ms)}(-1),`),o()),n(`_cache[${e.index}] = `),Te(e.value,t),e.isVNode&&(n(","),o(),n(`${s(Ms)}(1),`),o(),n(`_cache[${e.index}]`),i()),n(")")}new RegExp("\\b"+"arguments,await,break,case,catch,class,const,continue,debugger,default,delete,do,else,export,extends,finally,for,function,if,import,let,new,return,super,switch,throw,try,var,void,while,with,yield".split(",").join("\\b|\\b")+"\\b");const hd=uf(/^(if|else|else-if)$/,(e,t,n)=>dd(e,t,n,(s,r,i)=>{const o=n.parent.children;let l=o.indexOf(s),c=0;for(;l-->=0;){const f=o[l];f&&f.t
|
||
|
//# sourceMappingURL=vue.esm-bundler-16b759a1.js.map
|