UNPKG

vue-next

Version:

## Status: Pre-Alpha.

2 lines (1 loc) 37.4 kB
const e={1:"TEXT",2:"CLASS",4:"STYLE",8:"PROPS",32:"NEED_PATCH",16:"FULL_PROPS",64:"KEYED_FRAGMENT",128:"UNKEYED_FRAGMENT",256:"DYNAMIC_SLOTS",[-1]:"BAIL"};function t(e,t){const n=Object.create(null),o=e.split(",");for(let e=0;e<o.length;e++)n[o[e]]=!0;return t?e=>!!n[e.toLowerCase()]:e=>!!n[e]}const n=()=>!1,o=(e,t)=>{for(const n in t)e[n]=t[n];return e},r=Array.isArray,s=e=>"function"==typeof e,c=e=>"string"==typeof e,i=e=>"symbol"==typeof e,l=e=>null!==e&&"object"==typeof e,a=/-(\w)/g;function u(e){throw e}function p(e,t,n){const o=e,r=t?` (${t.start.line}:${t.start.column})`:"",s=new SyntaxError(o+r);return s.code=e,s.loc=t,s}const f={source:"",start:{line:1,column:1,offset:0},end:{line:1,column:1,offset:0}};function d(e,t=f){return{type:16,loc:t,elements:e}}function h(e,t=f){return{type:14,loc:t,properties:e}}function g(e,t){return{type:15,loc:f,key:c(e)?m(e,!0):e,value:t}}function m(e,t,n=f,o=!1){return{type:4,loc:n,isConstant:o,content:e,isStatic:t}}function y(e,t){return{type:5,loc:t,content:c(e)?m(e,!1,t):e}}function v(e,t=f){return{type:8,loc:t,children:e}}function x(e,t=[],n=f){return{type:13,loc:n,callee:e,arguments:t}}function b(e,t,n=!1,o=f){return{type:17,params:e,returns:t,newline:n,loc:o}}function S(e){return{type:18,expressions:e,loc:f}}function N(e,t,n){return{type:19,test:e,consequent:t,alternate:n,loc:f}}function k(e,t,n=!1){return{type:20,index:e,value:t,isVNode:n,loc:f}}const T=Symbol(""),w=Symbol(""),$=Symbol(""),E=Symbol(""),O=Symbol(""),C=Symbol(""),_=Symbol(""),M=Symbol(""),P=Symbol(""),L=Symbol(""),I=Symbol(""),R=Symbol(""),A=Symbol(""),V=Symbol(""),j=Symbol(""),D=Symbol(""),F=Symbol(""),J=Symbol(""),z=Symbol(""),W=Symbol(""),q={[T]:"Fragment",[w]:"Portal",[$]:"Suspense",[E]:"openBlock",[O]:"createBlock",[C]:"createVNode",[_]:"createCommentVNode",[M]:"createTextVNode",[P]:"resolveComponent",[L]:"resolveDynamicComponent",[I]:"resolveDirective",[R]:"withDirectives",[A]:"renderList",[V]:"renderSlot",[j]:"createSlots",[D]:"toString",[F]:"mergeProps",[J]:"toHandlers",[z]:"camelize",[W]:"setBlockTracking"};function B(e){Object.getOwnPropertySymbols(e).forEach(t=>{q[t]=e[t]})}let U,G;function H(e){return"undefined"!=typeof process&&s(require)?require(e):window._deps[e]}const Y=(e,t)=>{return re(!1,"Expression AST analysis can only be performed in non-browser builds."),(U||(U=H("acorn").parse))(e,t)},K=(e,t)=>{return re(!1,"Expression AST analysis can only be performed in non-browser builds."),(G||(G=H("estree-walker").walk))(e,t)},Z=/^\d|[^\$\w]/,Q=e=>!Z.test(e),X=/^[A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*|\[[^\]]+\])*$/,ee=e=>X.test(e);function te(e,t,n){const o={source:e.source.substr(t,n),start:ne(e.start,e.source,t),end:e.end};return null!=n&&(o.end=ne(e.start,e.source,t+n)),o}function ne(e,t,n=t.length){return oe({...e},t,n)}function oe(e,t,n=t.length){let o=0,r=-1;for(let e=0;e<n;e++)10===t.charCodeAt(e)&&(o++,r=e);return e.offset+=n,e.line+=o,e.column=-1===r?e.column+n:Math.max(1,n-r),e}function re(e,t){if(!e)throw new Error(t||"unexpected compiler condition")}function se(e,t,n=!1){for(let o=0;o<e.props.length;o++){const r=e.props[o];if(7===r.type&&(n||r.exp)&&(c(t)?r.name===t:t.test(r.name)))return r}}function ce(e,t,n=!1){for(let o=0;o<e.props.length;o++){const r=e.props[o];if(6===r.type){if(n)continue;if(r.name===t&&r.value)return r}else if("bind"===r.name&&r.arg&&4===r.arg.type&&r.arg.isStatic&&r.arg.content===t&&r.exp)return r}}function ie(e,t){return S([x(t.helper(E)),e])}const le=e=>7===e.type&&"slot"===e.name,ae=e=>1===e.type&&3===e.tagType,ue=e=>1===e.type&&2===e.tagType;function pe(e,t,n){let o;const r=e.callee===V?e.arguments[2]:e.arguments[1];if(null==r||c(r))o=h([t]);else if(13===r.type){const e=r.arguments[0];c(e)||14!==e.type?r.arguments.unshift(h([t])):e.properties.unshift(t),o=r}else 14===r.type?(r.properties.unshift(t),o=r):o=x(n.helper(F),[h([t]),r]);e.callee===V?e.arguments[2]=o:e.arguments[1]=o}function fe(e,t){return`_${t}_${e.replace(/[^\w]/g,"_")}`}function de(e,t){if(!e||0===Object.keys(t).length)return!1;switch(e.type){case 1:for(let n=0;n<e.props.length;n++){const o=e.props[n];if(7===o.type&&(de(o.arg,t)||de(o.exp,t)))return!0}return e.children.some(e=>de(e,t));case 11:return!!de(e.source,t)||e.children.some(e=>de(e,t));case 9:return e.branches.some(e=>de(e,t));case 10:return!!de(e.condition,t)||e.children.some(e=>de(e,t));case 4:return!e.isStatic&&Q(e.content)&&!!t[e.content];case 8:return e.children.some(e=>l(e)&&de(e,t));case 5:case 12:return de(e.content,t);case 2:case 3:default:return!1}}const he={delimiters:["{{","}}"],getNamespace:()=>0,getTextMode:()=>0,isVoidTag:n,isPreTag:n,isCustomElement:n,namedCharacterReferences:{"gt;":">","lt;":"<","amp;":"&","apos;":"'","quot;":'"'},onError:u};function ge(e,t={}){const n=function(e,t){return{options:{...he,...t},column:1,line:1,offset:0,originalSource:e,source:e,maxCRNameLength:Object.keys(t.namedCharacterReferences||he.namedCharacterReferences).reduce((e,t)=>Math.max(e,t.length),0),inPre:!1}}(e,t),o=Oe(n);return{type:0,children:me(n,0,[]),helpers:[],components:[],directives:[],hoists:[],cached:0,codegenNode:void 0,loc:Ce(n,o)}}function me(e,t,n){const o=_e(n),r=o?o.ns:0,s=[];for(;!Ae(e,t,n);){const c=e.source;let i=void 0;if(!e.inPre&&Me(c,e.options.delimiters[0]))i=we(e,t);else if(0===t&&"<"===c[0])if(1===c.length)Re(e,8,1);else if("!"===c[1])Me(c,"\x3c!--")?i=xe(e):Me(c,"<!DOCTYPE")?i=be(e):Me(c,"<![CDATA[")?0!==r?i=ve(e,n):(Re(e,2),i=be(e)):(Re(e,14),i=be(e));else if("/"===c[1])if(2===c.length)Re(e,8,2);else{if(">"===c[2]){Re(e,17,2),Pe(e,3);continue}if(/[a-z]/i.test(c[2])){Re(e,31),Ne(e,1,o);continue}Re(e,15,2),i=be(e)}else/[a-z]/i.test(c[1])?i=Se(e,n):"?"===c[1]?(Re(e,28,1),i=be(e)):Re(e,15,1);if(i||(i=$e(e,t)),Array.isArray(i))for(let e=0;e<i.length;e++)ye(s,i[e]);else ye(s,i)}let c=!1;if(!o||!e.options.isPreTag(o.tag))for(let e=0;e<s.length;e++){const t=s[e];if(2===t.type)if(t.content.trim())t.content=t.content.replace(/\s+/g," ");else{const n=s[e-1],o=s[e+1];!n||!o||3===n.type||3===o.type||1===n.type&&1===o.type&&/[\r\n]/.test(t.content)?(c=!0,s[e]=null):t.content=" "}}return c?s.filter(e=>null!==e):s}function ye(e,t){if(3!==t.type){if(2===t.type){const n=_e(e);if(n&&2===n.type&&n.loc.end.offset===t.loc.start.offset)return n.content+=t.content,n.loc.end=t.loc.end,void(n.loc.source+=t.loc.source)}e.push(t)}}function ve(e,t){Pe(e,9);const n=me(e,3,t);return 0===e.source.length?Re(e,9):Pe(e,3),n}function xe(e){const t=Oe(e);let n;const o=/--(\!)?>/.exec(e.source);if(o){o.index<=3&&Re(e,0),o[1]&&Re(e,13),n=e.source.slice(4,o.index);const t=e.source.slice(0,o.index);let r=1,s=0;for(;-1!==(s=t.indexOf("\x3c!--",r));)Pe(e,s-r+1),s+4<t.length&&Re(e,20),r=s+1;Pe(e,o.index+o[0].length-r+1)}else n=e.source.slice(4),Pe(e,e.source.length),Re(e,10);return{type:3,content:n,loc:Ce(e,t)}}function be(e){const t=Oe(e),n="?"===e.source[1]?1:2;let o;const r=e.source.indexOf(">");return-1===r?(o=e.source.slice(n),Pe(e,e.source.length)):(o=e.source.slice(n,r),Pe(e,r+1)),{type:3,content:o,loc:Ce(e,t)}}function Se(e,t){const n=e.inPre,o=_e(t),r=Ne(e,0,o),s=e.inPre&&!n;if(r.isSelfClosing||e.options.isVoidTag(r.tag))return r;t.push(r);const c=e.options.getTextMode(r.tag,r.ns),i=me(e,c,t);if(t.pop(),r.children=i,Ve(e.source,r.tag))Ne(e,1,o);else if(Re(e,32),0===e.source.length&&"script"===r.tag.toLowerCase()){const t=i[0];t&&Me(t.loc.source,"\x3c!--")&&Re(e,11)}return r.loc=Ce(e,r.loc.start),s&&(e.inPre=!1),r}function Ne(e,t,n){const r=Oe(e),s=/^<\/?([a-z][^\t\r\n\f />]*)/i.exec(e.source),c=s[1],i=e.options.getNamespace(c,n);Pe(e,s[0].length),Le(e);const l=Oe(e),a=e.source;let u=ke(e,t);!e.inPre&&u.some(e=>7===e.type&&"pre"===e.name)&&(e.inPre=!0,o(e,l),e.source=a,u=ke(e,t).filter(e=>"v-pre"!==e.name));let p=!1;0===e.source.length?Re(e,12):(p=Me(e.source,"/>"),1===t&&p&&Re(e,7),Pe(e,p?2:1));let f=0;return e.inPre||e.options.isCustomElement(c)||(e.options.isNativeTag?e.options.isNativeTag(c)||(f=1):/^[A-Z]/.test(c)&&(f=1),"slot"===c?f=2:"template"===c?f=3:"portal"===c||"Portal"===c?f=4:"suspense"!==c&&"Suspense"!==c||(f=5)),{type:1,ns:i,tag:c,tagType:f,props:u,isSelfClosing:p,children:[],loc:Ce(e,r),codegenNode:void 0}}function ke(e,t){const n=[],o=new Set;for(;e.source.length>0&&!Me(e.source,">")&&!Me(e.source,"/>");){if(Me(e.source,"/")){Re(e,29),Pe(e,1),Le(e);continue}1===t&&Re(e,6);const r=Te(e,o);0===t&&n.push(r),/^[^\t\r\n\f />]/.test(e.source)&&Re(e,19),Le(e)}return n}function Te(e,t){const n=Oe(e),o=/^[^\t\r\n\f />][^\t\r\n\f />=]*/.exec(e.source)[0];t.has(o)&&Re(e,5),t.add(o),"="===o[0]&&Re(e,26);{const t=/["'<]/g;let n;for(;null!==(n=t.exec(o));)Re(e,24,n.index)}Pe(e,o.length);let r=void 0;/^[\t\r\n\f ]*=/.test(e.source)&&(Le(e),Pe(e,1),Le(e),(r=function(e){const t=Oe(e);let n;const o=e.source[0],r='"'===o||"'"===o;if(r){Pe(e,1);const t=e.source.indexOf(o);-1===t?n=Ee(e,e.source.length,4):(n=Ee(e,t,4),Pe(e,1))}else{const t=/^[^\t\r\n\f >]+/.exec(e.source);if(!t)return;let o,r=/["'<=`]/g;for(;null!==(o=r.exec(t[0]));)Re(e,25,o.index);n=Ee(e,t[0].length,4)}return{content:n,isQuoted:r,loc:Ce(e,t)}}(e))||Re(e,16));const s=Ce(e,n);if(!e.inPre&&/^(v-|:|@|#)/.test(o)){const t=/(?:^v-([a-z0-9-]+))?(?:(?::|^@|^#)([^\.]+))?(.+)?$/i.exec(o);let c;if(t[2]){const r=o.split(t[2],2).shift().length,s=Ce(e,Ie(e,n,r),Ie(e,n,r+t[2].length));let i=t[2],l=!0;i.startsWith("[")&&(l=!1,i.endsWith("]")||Re(e,34),i=i.substr(1,i.length-2)),c={type:4,content:i,isStatic:l,isConstant:l,loc:s}}if(r&&r.isQuoted){const e=r.loc;e.start.offset++,e.start.column++,e.end=ne(e.start,r.content),e.source=e.source.slice(1,-1)}return{type:7,name:t[1]||(Me(o,":")?"bind":Me(o,"@")?"on":"slot"),exp:r&&{type:4,content:r.content,isStatic:!1,isConstant:!1,loc:r.loc},arg:c,modifiers:t[3]?t[3].substr(1).split("."):[],loc:s}}return{type:6,name:o,value:r&&{type:2,content:r.content,loc:r.loc},loc:s}}function we(e,t){const[n,o]=e.options.delimiters,r=e.source.indexOf(o,n.length);if(-1===r)return void Re(e,33);const s=Oe(e);Pe(e,n.length);const c=Oe(e),i=Oe(e),l=r-n.length,a=e.source.slice(0,l),u=Ee(e,l,t),p=u.trim(),f=u.indexOf(p);return f>0&&oe(c,a,f),oe(i,a,l-(u.length-p.length-f)),Pe(e,o.length),{type:5,content:{type:4,isStatic:!1,isConstant:!1,content:p,loc:Ce(e,c,i)},loc:Ce(e,s)}}function $e(e,t){const[n]=e.options.delimiters,o=Math.min(...[e.source.indexOf("<",1),e.source.indexOf(n,1),3===t?e.source.indexOf("]]>"):-1,e.source.length].filter(e=>-1!==e)),r=Oe(e);return{type:2,content:Ee(e,o,t),loc:Ce(e,r)}}function Ee(e,t,n){if(2===n||3===n){const n=e.source.slice(0,t);return Pe(e,t),n}const o=e.offset+t;let r="";for(;e.offset<o;){const t=/&(?:#x?)?/i.exec(e.source);if(!t||e.offset+t.index>=o){const t=o-e.offset;r+=e.source.slice(0,t),Pe(e,t);break}if(r+=e.source.slice(0,t.index),Pe(e,t.index),"&"===t[0]){let t="",o=void 0;if(/[0-9a-z]/i.test(e.source[1])){for(let n=e.maxCRNameLength;!o&&n>0;--n)t=e.source.substr(1,n),o=e.options.namedCharacterReferences[t];if(o){const s=t.endsWith(";");4===n&&!s&&/[=a-z0-9]/i.test(e.source[1+t.length]||"")?(r+="&",r+=t,Pe(e,1+t.length)):(r+=o,Pe(e,1+t.length),s||Re(e,18))}else Re(e,30),r+="&",r+=t,Pe(e,1+t.length)}else r+="&",Pe(e,1)}else{const n="&#x"===t[0],o=(n?/^&#x([0-9a-f]+);?/i:/^&#([0-9]+);?/).exec(e.source);if(o){let t=Number.parseInt(o[1],n?16:10);0===t?(Re(e,22),t=65533):t>1114111?(Re(e,3),t=65533):t>=55296&&t<=57343?(Re(e,23),t=65533):t>=64976&&t<=65007||65534==(65534&t)?Re(e,21):(t>=1&&t<=8||11===t||t>=13&&t<=31||t>=127&&t<=159)&&(Re(e,4),t=je[t]||t),r+=String.fromCodePoint(t),Pe(e,o[0].length),o[0].endsWith(";")||Re(e,18)}else r+=t[0],Re(e,1),Pe(e,t[0].length)}}return r}function Oe(e){const{column:t,line:n,offset:o}=e;return{column:t,line:n,offset:o}}function Ce(e,t,n){return{start:t,end:n=n||Oe(e),source:e.originalSource.slice(t.offset,n.offset)}}function _e(e){return e[e.length-1]}function Me(e,t){return e.startsWith(t)}function Pe(e,t){const{source:n}=e;oe(e,n,t),e.source=n.slice(t)}function Le(e){const t=/^[\t\r\n\f ]+/.exec(e.source);t&&Pe(e,t[0].length)}function Ie(e,t,n){return ne(t,e.originalSource.slice(t.offset,n),n)}function Re(e,t,n){const o=Oe(e);n&&(o.offset+=n,o.column+=n),e.options.onError(p(t,{start:o,end:o,source:""}))}function Ae(e,t,n){const o=e.source;switch(t){case 0:if(Me(o,"</"))for(let e=n.length-1;e>=0;--e)if(Ve(o,n[e].tag))return!0;break;case 1:case 2:{const e=_e(n);if(e&&Ve(o,e.tag))return!0;break}case 3:if(Me(o,"]]>"))return!0}return!o}function Ve(e,t){return Me(e,"</")&&e.substr(2,t.length).toLowerCase()===t.toLowerCase()&&/[\t\n\f />]/.test(e[2+t.length]||">")}const je={128:8364,130:8218,131:402,132:8222,133:8230,134:8224,135:8225,136:710,137:8240,138:352,139:8249,140:338,142:381,145:8216,146:8217,147:8220,148:8221,149:8226,150:8211,151:8212,152:732,153:8482,154:353,155:8250,156:339,158:382,159:376};function De(e,t){!function e(t,n,o,r=!1){for(let s=0;s<t.length;s++){const c=t[s];if(1===c.type&&0===c.tagType){if(!r&&Je(c,o)){c.codegenNode=n.hoist(c.codegenNode);continue}{const e=c.codegenNode;if(13===e.type){const t=Ge(e);if(!(t&&32!==t&&1!==t||ze(c)||We())){const t=qe(c);t&&"null"!==t&&(Ue(e).arguments[1]=n.hoist(t))}}}}if(1===c.type)e(c.children,n,o);else if(11===c.type)e(c.children,n,o,1===c.children.length);else if(9===c.type)for(let t=0;t<c.branches.length;t++){const r=c.branches[t].children;e(r,n,o,1===r.length)}}}(e.children,t,new Map,Fe(e,e.children[0]))}function Fe(e,t){const{children:n}=e;return 1===n.length&&1===t.type&&!ue(t)}function Je(e,t=new Map){switch(e.type){case 1:if(0!==e.tagType)return!1;const n=t.get(e);if(void 0!==n)return n;const o=e.codegenNode;if(13!==o.type)return!1;if(Ge(o)||ze(e)||We())return t.set(e,!1),!1;for(let n=0;n<e.children.length;n++)if(!Je(e.children[n],t))return t.set(e,!1),!1;return t.set(e,!0),!0;case 2:case 3:return!0;case 9:case 11:return!1;case 5:case 12:return Je(e.content,t);case 4:return e.isConstant;case 8:return e.children.every(e=>c(e)||i(e)||Je(e,t));default:return!1}}function ze(e){return!(!ce(e,"key",!0)&&!ce(e,"ref",!0))}function We(e){return!1}function qe(e){const t=e.codegenNode;if(13===t.type)return Be(t,1)}function Be(e,t){return Ue(e).arguments[t]}function Ue(e){return e.callee===R?e.arguments[0]:e}function Ge(e){const t=Be(e,3);return t?parseInt(t,10):void 0}function He(e,t){const n=function(e,{prefixIdentifiers:t=!1,hoistStatic:n=!1,cacheHandlers:o=!1,nodeTransforms:r=[],directiveTransforms:s={},onError:c=u}){const i={root:e,helpers:new Set,components:new Set,directives:new Set,hoists:[],cached:0,identifiers:{},scopes:{vFor:0,vSlot:0,vPre:0,vOnce:0},prefixIdentifiers:t,hoistStatic:n,cacheHandlers:o,nodeTransforms:r,directiveTransforms:s,onError:c,parent:null,currentNode:e,childIndex:0,helper:e=>(i.helpers.add(e),e),helperString:e=>(i.prefixIdentifiers?"":"_")+q[i.helper(e)],replaceNode(e){i.parent.children[i.childIndex]=i.currentNode=e},removeNode(e){const t=i.parent.children,n=e?t.indexOf(e):i.currentNode?i.childIndex:-1;e&&e!==i.currentNode?i.childIndex>n&&(i.childIndex--,i.onNodeRemoved()):(i.currentNode=null,i.onNodeRemoved()),i.parent.children.splice(n,1)},onNodeRemoved:()=>{},addIdentifiers(e){},removeIdentifiers(e){},hoist:e=>(i.hoists.push(e),m(`_hoisted_${i.hoists.length}`,!1,e.loc,!0)),cache:(e,t=!1)=>k(++i.cached,e,t)};return i}(e,t);Ke(e,n),t.hoistStatic&&De(e,n),function(e,t){const{helper:n}=t,{children:o}=e,r=o[0];if(1===o.length)if(Fe(e,r)&&r.codegenNode){const o=r.codegenNode;20!==o.type?(o.callee===R?o.arguments[0].callee=n(O):o.callee=n(O),e.codegenNode=ie(o,t)):e.codegenNode=o}else e.codegenNode=r;else o.length>1&&(e.codegenNode=ie(x(n(O),[n(T),"null",e.children]),t));e.helpers=[...t.helpers],e.components=[...t.components],e.directives=[...t.directives],e.hoists=t.hoists,e.cached=t.cached}(e,n)}function Ye(e,t){let n=0;const o=()=>{n--};for(;n<e.children.length;n++){const r=e.children[n];c(r)||(t.currentNode=r,t.parent=e,t.childIndex=n,t.onNodeRemoved=o,Ke(r,t))}}function Ke(e,t){const{nodeTransforms:n}=t,o=[];for(let s=0;s<n.length;s++){const c=n[s](e,t);if(c&&(r(c)?o.push(...c):o.push(c)),!t.currentNode)return;e=t.currentNode}switch(e.type){case 3:t.helper(_);break;case 5:t.helper(D);break;case 9:for(let n=0;n<e.branches.length;n++)Ye(e.branches[n],t);break;case 11:case 1:case 0:Ye(e,t)}let s=o.length;for(;s--;)o[s]()}function Ze(e,t){const n=c(e)?t=>t===e:t=>e.test(t);return(e,o)=>{if(1===e.type){const{props:r}=e;if(3===e.tagType&&r.some(le))return;const s=[];for(let c=0;c<r.length;c++){const i=r[c];if(7===i.type&&n(i.name)){r.splice(c,1),c--;const n=t(e,i,o);n&&s.push(n)}}return s}}}function Qe(e,t={}){const n=function(e,{mode:t="function",prefixIdentifiers:n="module"===t,sourceMap:o=!1,filename:r="template.vue.html"}){const s={mode:t,prefixIdentifiers:n,sourceMap:o,filename:r,source:e.loc.source,code:"",column:1,line:1,offset:0,indentLevel:0,map:void 0,helper(e){const t=q[e];return n?t:`_${t}`},push(e,t,n){s.code+=e},resetMapping(e){},indent(){c(++s.indentLevel)},deindent(e=!1){e?--s.indentLevel:c(--s.indentLevel)},newline(){c(s.indentLevel)}};function c(e){s.push("\n"+" ".repeat(e))}return s}(e,t),{mode:o,push:r,helper:s,prefixIdentifiers:c,indent:i,deindent:l,newline:a}=n,u=e.helpers.length>0,p=!c&&"module"!==o;return"function"===o?(u&&(c?r(`const { ${e.helpers.map(s).join(", ")} } = Vue\n`):(r("const _Vue = Vue\n"),e.hoists.length&&(r(`const _${q[C]} = Vue.${q[C]}\n`),e.helpers.includes(_)&&r(`const _${q[_]} = Vue.${q[_]}\n`)))),et(e.hoists,n),a(),r("return ")):(u&&r(`import { ${e.helpers.map(s).join(", ")} } from "vue"\n`),et(e.hoists,n),a(),r("export default ")),r("function render() {"),i(),p?(r("with (this) {"),i(),u&&(r(`const { ${e.helpers.map(e=>`${q[e]}: _${q[e]}`).join(", ")} } = _Vue`),a(),e.cached>0&&(r("const _cache = $cache"),a()),a())):(r("const _ctx = this"),e.cached>0&&(a(),r("const _cache = _ctx.$cache")),a()),e.components.length&&Xe(e.components,"component",n),e.directives.length&&Xe(e.directives,"directive",n),(e.components.length||e.directives.length)&&a(),r("return "),e.codegenNode?ot(e.codegenNode,n):r("null"),p&&(l(),r("}")),l(),r("}"),{ast:e,code:n.code,map:n.map?n.map.toJSON():void 0}}function Xe(e,t,n){const o=n.helper("component"===t?P:I);for(let r=0;r<e.length;r++){const s=e[r];n.push(`const ${fe(s,t)} = ${o}(${JSON.stringify(s)})`),n.newline()}}function et(e,t){e.length&&(t.newline(),e.forEach((e,n)=>{t.push(`const _hoisted_${n+1} = `),ot(e,t),t.newline()}))}function tt(e,t){const n=e.length>3||!1;t.push("["),n&&t.indent(),nt(e,t,n),n&&t.deindent(),t.push("]")}function nt(e,t,n=!1){const{push:o,newline:s}=t;for(let i=0;i<e.length;i++){const l=e[i];c(l)?o(l):r(l)?tt(l,t):ot(l,t),i<e.length-1&&(n?(o(","),s()):o(", "))}}function ot(e,t){if(c(e))t.push(e);else if(i(e))t.push(t.helper(e));else switch(e.type){case 1:case 9:case 11:ot(e.codegenNode,t);break;case 2:!function(e,t){t.push(JSON.stringify(e.content),e)}(e,t);break;case 4:rt(e,t);break;case 5:!function(e,t){const{push:n,helper:o}=t;n(`${o(D)}(`),ot(e.content,t),n(")")}(e,t);break;case 12:ot(e.codegenNode,t);break;case 8:st(e,t);break;case 3:break;case 13:!function(e,t){const n=c(e.callee)?e.callee:t.helper(e.callee);t.push(n+"(",e,!0),nt(e.arguments,t),t.push(")")}(e,t);break;case 14:!function(e,t){const{push:n,indent:o,deindent:r,newline:s,resetMapping:c}=t,{properties:i}=e;if(!i.length)return void n("{}",e);const l=i.length>1||!1;n(l?"{":"{ "),l&&o();for(let e=0;e<i.length;e++){const{key:o,value:r,loc:l}=i[e];c(l),ct(o,t),n(": "),ot(r,t),e<i.length-1&&(n(","),s())}l&&r();const a=t.code[t.code.length-1];n(l||/[\])}]/.test(a)?"}":" }")}(e,t);break;case 16:!function(e,t){tt(e.elements,t)}(e,t);break;case 17:!function(e,t){const{push:n,indent:o,deindent:s}=t,{params:c,returns:i,newline:l}=e;n("(",e),r(c)?nt(c,t):c&&ot(c,t);n(") => "),l&&(n("{"),o(),n("return "));r(i)?tt(i,t):ot(i,t);l&&(s(),n("}"))}(e,t);break;case 18:!function(e,t){t.push("("),nt(e.expressions,t),t.push(")")}(e,t);break;case 19:!function(e,t){const{test:n,consequent:o,alternate:r}=e,{push:s,indent:c,deindent:i,newline:l}=t;if(4===n.type){const e=!Q(n.content);e&&s("("),rt(n,t),e&&s(")")}else s("("),st(n,t),s(")");c(),t.indentLevel++,s("? "),ot(o,t),t.indentLevel--,l(),s(": ");const a=19===r.type;a||t.indentLevel++;ot(r,t),a||t.indentLevel--;i(!0)}(e,t);break;case 20:!function(e,t){const{push:n,helper:o,indent:r,deindent:s,newline:c}=t;n(`_cache[${e.index}] || (`),e.isVNode&&(r(),n(`${o(W)}(-1),`),c());n(`_cache[${e.index}] = `),ot(e.value,t),e.isVNode&&(n(","),c(),n(`${o(W)}(1),`),c(),n(`_cache[${e.index}]`),s());n(")")}(e,t)}}function rt(e,t){const{content:n,isStatic:o}=e;t.push(o?JSON.stringify(n):n,e)}function st(e,t){for(let n=0;n<e.children.length;n++){const o=e.children[n];c(o)?t.push(o):ot(o,t)}}function ct(e,t){const{push:n}=t;if(8===e.type)n("["),st(e,t),n("]");else if(e.isStatic){n(Q(e.content)?e.content:JSON.stringify(e.content),e)}else n(`[${e.content}]`,e)}const it=Ze(/^(if|else|else-if)$/,(e,t,n)=>{if(!("else"===t.name||t.exp&&t.exp.content.trim())){const o=t.exp?t.exp.loc:e.loc;n.onError(p(35,t.loc)),t.exp=m("true",!1,o)}if("if"===t.name){const o=lt(e,t),r=S([x(n.helper(E))]);return n.replaceNode({type:9,loc:e.loc,branches:[o],codegenNode:r}),()=>{r.expressions.push(at(o,0,n))}}{const o=n.parent.children;let r=o.indexOf(e);for(;r-- >=-1;){const s=o[r];if(s&&9===s.type){n.removeNode();const o=lt(e,t);s.branches.push(o),Ye(o,n),n.currentNode=null;let r=s.codegenNode.expressions[1];for(;;){if(19!==r.alternate.type){r.alternate=at(o,s.branches.length-1,n);break}r=r.alternate}}else n.onError(p(36,e.loc));break}}});function lt(e,t){return{type:10,loc:e.loc,condition:"else"===t.name?void 0:t.exp,children:3===e.tagType?e.children:[e]}}function at(e,t,n){return e.condition?N(e.condition,ut(e,t,n),x(n.helper(_),['""',"true"])):ut(e,t,n)}function ut(e,t,n){const{helper:o}=n,r=g("key",m(t+"",!1)),{children:s}=e,c=s[0];if(1!==s.length||1!==c.type){const e=[o(T),h([r]),s];if(1===s.length&&11===c.type){const t=c.codegenNode.expressions[1].arguments;e[2]=t[2],e[3]=t[3]}return x(o(O),e)}{const e=c.codegenNode;let t=e;return t.callee===R&&(t=t.arguments[0]),t.callee===C&&(t.callee=o(O)),pe(t,r,n),e}}const pt=Ze("for",(e,t,n)=>{if(!t.exp)return void n.onError(p(37,t.loc));const o=gt(t.exp);if(!o)return void n.onError(p(38,t.loc));const{helper:r,addIdentifiers:s,removeIdentifiers:c,scopes:i}=n,{source:l,value:a,key:u,index:f}=o,d=x(r(A),[l]),y=ce(e,"key"),v=y?64:128,N=S([x(r(E),["false"]),x(r(O),[r(T),"null",d,v+""])]);return n.replaceNode({type:11,loc:t.loc,source:l,valueAlias:a,keyAlias:u,objectIndexAlias:f,children:3===e.tagType?e.children:[e],codegenNode:N}),i.vFor++,()=>{let t;i.vFor--;const s=ae(e),c=ue(e)?e:s&&1===e.children.length&&ue(e.children[0])?e.children[0]:null,l=y?g("key",6===y.type?m(y.value.content,!0):y.exp):null;if(c)t=c.codegenNode,s&&l&&pe(t,l,n);else if(s)t=ie(x(r(O),[r(T),l?h([l]):"null",e.children]),n);else{let o=e.codegenNode;o.callee===R?o.arguments[0].callee=r(O):o.callee=r(O),t=ie(o,n)}d.arguments.push(b(yt(o),t,!0))}}),ft=/([\s\S]*?)\s+(?:in|of)\s+([\s\S]*)/,dt=/,([^,\}\]]*)(?:,([^,\}\]]*))?$/,ht=/^\(|\)$/g;function gt(e,t){const n=e.loc,o=e.content,r=o.match(ft);if(!r)return;const[,s,c]=r,i={source:mt(n,c.trim(),o.indexOf(c,s.length)),value:void 0,key:void 0,index:void 0};let l=s.trim().replace(ht,"").trim();const a=s.indexOf(l),u=l.match(dt);if(u){l=l.replace(dt,"").trim();const e=u[1].trim();let t;if(e&&(t=o.indexOf(e,a+l.length),i.key=mt(n,e,t)),u[2]){const r=u[2].trim();r&&(i.index=mt(n,r,o.indexOf(r,i.key?t+e.length:a+l.length)))}}return l&&(i.value=mt(n,l,a)),i}function mt(e,t,n){return m(t,!1,te(e,n,t.length))}function yt({value:e,key:t,index:n}){const o=[];return e&&o.push(e),t&&(e||o.push(m("_",!1)),o.push(t)),n&&(t||(e||o.push(m("_",!1)),o.push(m("__",!1))),o.push(n)),o}const vt=e=>4===e.type&&e.isStatic,xt=m("undefined",!1),bt=(e,t)=>{if(1===e.type&&(1===e.tagType||3===e.tagType)){const n=se(e,"slot");if(n){n.exp;return t.scopes.vSlot++,()=>{t.scopes.vSlot--}}}};function St(e,t,n){return g("default",b(e,t,!1,t.length?t[0].loc:n))}function Nt(e,t){return h([g("name",e),g("fn",t)])}const kt=new WeakMap,Tt=(e,t)=>{if(!(1!==e.type||2===e.tagType||3===e.tagType&&e.props.some(le)))return()=>{const n=1===e.tagType;let o,r,s,c=e.props.length>0,i=0;const l=ce(e,"is");if("component"===e.tag&&l)if(6===l.type){const e=l.value&&l.value.content;e&&(t.helper(P),t.components.add(e),s=fe(e,"component"))}else l.exp&&(s=x(t.helper(L),[l.exp]));n&&!s&&(t.helper(P),t.components.add(e.tag));const a=[s||(n?fe(e.tag,"component"):4===e.tagType?t.helper(w):5===e.tagType?t.helper($):`"${e.tag}"`)];if(c){const n=wt(e,t,e.props.filter(e=>e!==l));i=n.patchFlag,r=n.dynamicPropNames,o=n.directives,n.props?a.push(n.props):c=!1}const u=e.children.length>0;if(u)if(c||a.push("null"),n){const{slots:n,hasDynamicSlots:o}=function(e,t){const{children:n,loc:o}=e,r=[],s=[];let c=t.scopes.vSlot>0||t.scopes.vFor>0;const i=se(e,"slot",!0);if(i){const{arg:e,exp:o,loc:s}=i;e&&t.onError(p(42,s)),r.push(St(o,n,s))}let l=!1,a=void 0;const u=new Set;for(let e=0;e<n.length;e++){const o=n[e];let f;if(!ae(o)||!(f=se(o,"slot",!0))){3===o.type||a||(a=o);continue}if(i){t.onError(p(43,f.loc));break}l=!0;const{children:d,loc:h}=o,{arg:y=m("default",!0),exp:v,loc:S}=f;let k;vt(y)?k=y?y.content:"default":c=!0;const T=b(v,d,!1,d.length?d[0].loc:h);let w,$,E;if(w=se(o,"if"))c=!0,s.push(N(w.exp,Nt(y,T),xt));else if($=se(o,/^else(-if)?$/,!0)){let o,r=e;for(;r--&&3===(o=n[r]).type;);if(o&&ae(o)&&se(o,"if")){n.splice(e,1),e--;let t=s[s.length-1];for(;19===t.alternate.type;)t=t.alternate;t.alternate=$.exp?N($.exp,Nt(y,T),xt):Nt(y,T)}else t.onError(p(36,$.loc))}else if(E=se(o,"for")){c=!0;const e=E.parseResult||gt(E.exp);e?s.push(x(t.helper(A),[e.source,b(yt(e),Nt(y,T),!0)])):t.onError(p(38,E.loc))}else{if(k){if(u.has(k)){t.onError(p(44,S));continue}u.add(k)}r.push(g(y,T))}}l&&a&&t.onError(p(45,a.loc)),i||l||r.push(St(void 0,n,o));let f=h(r.concat(g("_compiled",m("true",!1))),o);return s.length&&(f=x(t.helper(j),[f,d(s)])),{slots:f,hasDynamicSlots:c}}(e,t);a.push(n),o&&(i|=256)}else if(1===e.children.length){const t=e.children[0],n=t.type,o=5===n||8===n;o&&!Je(t)&&(i|=1),o||2===n?a.push(t):a.push(e.children)}else a.push(e.children);0!==i&&(u||(c||a.push("null"),a.push("null")),a.push(i+""),r&&r.length&&a.push(`[${r.map(e=>JSON.stringify(e)).join(", ")}]`));const{loc:f}=e,y=x(t.helper(C),a,f);o&&o.length?e.codegenNode=x(t.helper(R),[y,d(o.map(e=>(function(e,t){const n=[],o=kt.get(e);o?(t.helper(o),n.push(t.helperString(o))):(t.helper(I),t.directives.add(e.name),n.push(fe(e.name,"directive")));const{loc:r}=e;e.exp&&n.push(e.exp);e.arg&&(e.exp||n.push("void 0"),n.push(e.arg));Object.keys(e.modifiers).length&&(e.arg||(e.exp||n.push("void 0"),n.push("void 0")),n.push(h(e.modifiers.map(e=>g(e,m("true",!1,r))),r)));return d(n,e.loc)})(e,t)),f)],f):e.codegenNode=y}};function wt(e,t,n=e.props){const o=e.loc,r=1===e.tagType;let s=[];const c=[],l=[];let a=0,u=!1,f=!1,d=!1,y=!1;const v=[],b=({key:e,value:t})=>{if(4===e.type&&e.isStatic){if(20===t.type||(4===t.type||8===t.type)&&Je(t))return;const n=e.content;"ref"===n?u=!0:"class"===n?f=!0:"style"===n?d=!0:"key"!==n&&v.push(n)}else y=!0};for(let a=0;a<n.length;a++){const f=n[a];if(6===f.type){const{loc:e,name:t,value:n}=f;"ref"===t&&(u=!0),s.push(g(m(t,!0,te(e,0,t.length)),m(n?n.content:"",!0,n?n.loc:e)))}else{const{name:n,arg:a,exp:u,loc:d}=f;if("slot"===n){r||t.onError(p(46,d));continue}if("once"===n)continue;const g="bind"===n,m="on"===n;if(!a&&(g||m)){y=!0,u?(s.length&&(c.push(h($t(s),o)),s=[]),g?c.push(u):c.push({type:13,loc:d,callee:t.helper(J),arguments:[u]})):t.onError(p(g?39:40,d));continue}const v=t.directiveTransforms[n];if(v){const{props:n,needRuntime:o}=v(f,e,t);n.forEach(b),s.push(...n),o&&(l.push(f),i(o)&&kt.set(f,o))}else l.push(f)}}let S=void 0;return c.length?(s.length&&c.push(h($t(s),o)),S=c.length>1?x(t.helper(F),c,o):c[0]):s.length&&(S=h($t(s),o)),y?a|=16:(f&&(a|=2),d&&(a|=4),v.length&&(a|=8)),0===a&&(u||l.length>0)&&(a|=32),{props:S,directives:l,patchFlag:a,dynamicPropNames:v}}function $t(e){const t={},n=[];for(let o=0;o<e.length;o++){const r=e[o];if(8===r.key.type||!r.key.isStatic){n.push(r);continue}const s=r.key.content,c=t[s];c?("style"===s||"class"===s||s.startsWith("on")||s.startsWith("vnode"))&&Et(c,r):(t[s]=r,n.push(r))}return n}function Et(e,t){16===e.value.type?e.value.elements.push(t.value):e.value=d([e.value,t.value],e.loc)}const Ot=(e,t)=>{if(ue(e)){const{props:n,children:o,loc:r}=e,s=t.prefixIdentifiers?"_ctx.$slots":"$slots";let c='"default"',i=-1;for(let e=0;e<n.length;e++){const t=n[e];if(6===t.type){if("name"===t.name&&t.value){c=JSON.stringify(t.value.content),i=e;break}}else if("bind"===t.name){const{arg:n,exp:o}=t;if(n&&o&&4===n.type&&n.isStatic&&"name"===n.content){c=o,i=e;break}}}const l=[s,c],a=i>-1?n.slice(0,i).concat(n.slice(i+1)):n;let u=a.length>0;if(u){const{props:n,directives:o}=wt(e,t,a);o.length&&t.onError(p(41,o[0].loc)),n?l.push(n):u=!1}o.length&&(u||l.push("{}"),l.push(o)),e.codegenNode=x(t.helper(V),l,r)}},Ct=/^([\w$_]+|\([^)]*?\))\s*=>|^function(?:\s+[\w$]+)?\s*\(/,_t=(e,t,n,o)=>{const{loc:r,modifiers:s,arg:c}=e;let i;e.exp||s.length||n.onError(p(40,r)),4===c.type?i=c.isStatic?m(`on${(e=>e.charAt(0).toUpperCase()+e.slice(1))(c.content)}`,!0,c.loc):v(['"on" + (',c,")"]):((i=c).children.unshift('"on" + ('),i.children.push(")"));let l=e.exp,a=!l;if(l){const e=ee(l.content);(!(e||Ct.test(l.content))||a&&e)&&(l=v(["$event => (",...4===l.type?[l]:l.children,")"]))}let u={props:[g(i,l||m("() => {}",!1,r))],needRuntime:!1};return o&&(u=o(u)),a&&(u.props[0].value=n.cache(u.props[0].value)),u},Mt=(e,t,n)=>{const{exp:o,modifiers:r,loc:s}=e,c=e.arg;return o||n.onError(p(39,s)),r.includes("camel")&&(4===c.type?c.isStatic?c.content=(e=>e.replace(a,(e,t)=>t?t.toUpperCase():""))(c.content):c.content=`${n.helperString(z)}(${c.content})`:(c.children.unshift(`${n.helperString(z)}(`),c.children.push(")"))),{props:[g(c,o||m("",!0,s))],needRuntime:!1}},Pt=e=>5===e.type||2===e.type,Lt=(t,n)=>{if(0===t.type||1===t.type)return()=>{const o=t.children;let r=void 0,s=!1;for(let e=0;e<o.length;e++){const t=o[e];if(Pt(t)){s=!0;for(let n=e+1;n<o.length;n++){const s=o[n];if(!Pt(s)){r=void 0;break}r||(r=o[e]={type:8,loc:t.loc,children:[t]}),r.children.push(" + ",s),o.splice(n,1),n--}}}if(s&&o.length>1)for(let t=0;t<o.length;t++){const r=o[t];if(Pt(r)||8===r.type){const s=[];2===r.type&&" "===r.content||s.push(r),2!==r.type&&s.push(`1 /* ${e[1]} */`),o[t]={type:12,content:r,loc:r.loc,codegenNode:x(n.helper(M),s)}}}}},It=(e,t)=>{if(1===e.type&&se(e,"once",!0))return t.helper(W),()=>{e.codegenNode&&(e.codegenNode=t.cache(e.codegenNode,!0))}},Rt=(e,t,n)=>{const{exp:o,arg:r}=e;if(!o)return n.onError(p(47,e.loc)),At();const s=4===o.type?o.content:o.loc.source;if(!ee(s))return n.onError(p(48,o.loc)),At();const c=r||m("modelValue",!0),i=r?4===r.type&&r.isStatic?m("onUpdate:"+r.content,!0):v([m("onUpdate:",!0),"+",...4===r.type?[r]:r.children]):m("onUpdate:modelValue",!0),l=[g(c,e.exp),g(i,v(["$event => (",...4===o.type?[o]:o.children," = $event)"]))];if(e.modifiers.length&&1===t.tagType){const t=e.modifiers.map(e=>(Q(e)?e:JSON.stringify(e))+": true").join(", ");l.push(g("modelModifiers",m(`{ ${t} }`,!1,e.loc,!0)))}return At(l)};function At(e=[]){return{props:e,needRuntime:!1}}const Vt=2;function jt(e,t=0,n=e.length){const o=e.split(/\r?\n/);let r=0;const s=[];for(let e=0;e<o.length;e++)if((r+=o[e].length+1)>=t){for(let c=e-Vt;c<=e+Vt||n>r;c++){if(c<0||c>=o.length)continue;s.push(`${c+1}${" ".repeat(3-String(c+1).length)}| ${o[c]}`);const i=o[c].length;if(c===e){const e=t-(r-i)+1,o=n>r?i-e:n-t;s.push(" | "+" ".repeat(e)+"^".repeat(o))}else if(c>e){if(n>r){const e=Math.min(n-r,i);s.push(" | "+"^".repeat(e))}r+=i+1}}break}return s.join("\n")}function Dt(e,t={}){{const e=t.onError||u;!0===t.prefixIdentifiers?e(p(51)):"module"===t.mode&&e(p(52))}const n=c(e)?ge(e,t):e;return He(n,{...t,prefixIdentifiers:!1,nodeTransforms:[It,it,pt,Ot,Tt,bt,Lt,...t.nodeTransforms||[]],directiveTransforms:{on:_t,bind:Mt,model:Rt,...t.directiveTransforms||{}}}),Qe(n,{...t,prefixIdentifiers:!1})}const Ft=t("html,body,base,head,link,meta,style,title,address,article,aside,footer,header,h1,h2,h3,h4,h5,h6,hgroup,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,rtc,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,menuitem,summary,content,element,shadow,template,blockquote,iframe,tfoot"),Jt=t("svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,feDistanceLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,foreignObject,g,hatch,hatchpath,image,line,lineGradient,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"),zt=t("area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr"),Wt=t("style,iframe,script,noscript",!0),qt={isVoidTag:zt,isNativeTag:e=>Ft(e)||Jt(e),isPreTag:e=>"pre"===e,getNamespace(e,t){let n=t?t.ns:0;if(t&&2===n)if("annotation-xml"===t.tag){if("svg"===e)return 1;t.props.some(e=>6===e.type&&"encoding"===e.name&&null!=e.value&&("text/html"===e.value.content||"application/xhtml+xml"===e.value.content))&&(n=0)}else/^m(?:[ions]|text)$/.test(t.tag)&&"mglyph"!==e&&"malignmark"!==e&&(n=0);else t&&1===n&&("foreignObject"!==t.tag&&"desc"!==t.tag&&"title"!==t.tag||(n=0));if(0===n){if("svg"===e)return 1;if("math"===e)return 2}return n},getTextMode(e,t){if(0===t){if("textarea"===e||"title"===e)return 1;if(Wt(e))return 2}return 0}},Bt=(e,t)=>{1===e.type&&e.props.forEach((n,o)=>{if(6===n.type&&"style"===n.name&&n.value){const r=JSON.stringify(function(e){const t={};return e.split(Ut).forEach((function(e){if(e){const n=e.split(Gt);n.length>1&&(t[n[0].trim()]=n[1].trim())}})),t}(n.value.content)),s=t.hoist(m(r,!1,n.loc));e.props[o]={type:7,name:"bind",arg:m("style",!0,n.loc),exp:s,modifiers:[],loc:n.loc}}})},Ut=/;(?![^(]*\))/g,Gt=/:(.+)/;const Ht=(e,t)=>({props:[],needRuntime:!1});function Yt(e,t){return p(e,t)}const Kt=(e,t,n)=>{const{exp:o,loc:r}=e;return o||n.onError(Yt(53,r)),t.children.length&&(n.onError(Yt(54,r)),t.children.length=0),{props:[g(m("innerHTML",!0,r),o||m("",!0))],needRuntime:!1}},Zt=(e,t,n)=>{const{exp:o,loc:r}=e;return o||n.onError(Yt(55,r)),t.children.length&&(n.onError(Yt(56,r)),t.children.length=0),{props:[g(m("textContent",!0,r),o||m("",!0))],needRuntime:!1}},Qt=Symbol(""),Xt=Symbol(""),en=Symbol(""),tn=Symbol(""),nn=Symbol(""),on=Symbol(""),rn=Symbol("");B({[Qt]:"vModelRadio",[Xt]:"vModelCheckbox",[en]:"vModelText",[tn]:"vModelSelect",[nn]:"vModelDynamic",[on]:"withModifiers",[rn]:"withKeys"});const sn=(e,t,n)=>{const o=Rt(e,t,n);if(!o.props.length)return o;const{tag:r,tagType:s}=t;if(0===s)if(e.arg&&n.onError(Yt(58,e.arg.loc)),"input"===r||"textarea"===r||"select"===r){let s=en,c=!1;if("input"===r){const o=ce(t,"type");if(o)if(7===o.type)s=nn;else if(o.value)switch(o.value.content){case"radio":s=Qt;break;case"checkbox":s=Xt;break;case"file":c=!0,n.onError(Yt(59,e.loc))}}else"select"===r&&(s=tn);c||(o.needRuntime=n.helper(s))}else n.onError(Yt(57,e.loc));return o},cn=t("passive,once,capture"),ln=t("stop,prevent,self,ctrl,shift,alt,meta,exact,left,middle,right"),an=t("onkeyup,onkeydown,onkeypress",!0),un=(e,t,n)=>_t(e,t,n,t=>{const{modifiers:o}=e;if(!o.length)return t;let{key:r,value:s}=t.props[0];const c=o.filter(cn),i=o.filter(e=>!cn(e)),l=i.filter(ln);l.length&&(s=x(n.helper(on),[s,JSON.stringify(l)]));const a=i.filter(e=>!ln(e));return!a.length||8!==r.type&&r.isStatic&&!an(r.content)||(s=x(n.helper(rn),[s,JSON.stringify(a)])),c.length&&(s=h([g("handler",s),g("options",h(c.map(e=>g(e,m("true",!1)))))])),{props:[g(r,s)],needRuntime:!1}});function pn(e,t={}){return Dt(e,{...t,...qt,nodeTransforms:[Bt,...t.nodeTransforms||[]],directiveTransforms:{cloak:Ht,html:Kt,text:Zt,model:sn,on:un,...t.directiveTransforms||{}}})}export{ne as advancePositionWithClone,oe as advancePositionWithMutation,re as assert,Dt as baseCompile,pn as compile,d as createArrayExpression,ie as createBlockExpression,k as createCacheExpression,x as createCallExpression,p as createCompilerError,v as createCompoundExpression,N as createConditionalExpression,b as createFunctionExpression,y as createInterpolation,h as createObjectExpression,g as createObjectProperty,S as createSequenceExpression,m as createSimpleExpression,Ze as createStructuralDirectiveTransform,se as findDir,ce as findProp,Qe as generate,jt as generateCodeFrame,te as getInnerRange,de as hasScopeRef,pe as injectProp,Ft as isHTMLTag,ee as isMemberExpression,Jt as isSVGTag,Q as isSimpleIdentifier,ue as isSlotOutlet,ae as isTemplateNode,le as isVSlot,zt as isVoidTag,H as loadDep,f as locStub,ge as parse,Y as parseJS,B as registerRuntimeHelpers,fe as toValidAssetId,He as transform,Rt as transformModel,_t as transformOn,K as walkJS};